Commit Graph

35 Commits

Author SHA1 Message Date
Lephenixnoir 073f1ba9b0
Add basic demo recording with M_WriteFile 2021-10-01 11:48:33 +02:00
Lephenixnoir 341392e364
Improve controls
* Strafe and run keys
* Slightly faster turning
2021-09-20 20:56:52 +02:00
Lephenixnoir 516be94294
Officially support Doom II: Hell On Earth 2021-09-20 17:41:32 +02:00
Lephenixnoir 3df65755bc
Improve the BFile API in libfxcg 2021-09-19 21:36:51 +02:00
Lephenixnoir db04c99446
Enable the Save Game menu (exits game after save) 2021-09-18 19:03:21 +02:00
Lephenixnoir a7afb12294
Allow crossing the 2MB line on OS 3.60 2021-09-18 12:04:05 +02:00
Lephenixnoir d0c1dc0666
Much-needed README update 2021-09-10 22:54:54 +02:00
Lephenixnoir 535a55e60c
The proper case is "CGDoom" 2021-09-10 22:22:31 +02:00
Lephenixnoir 751d5f186d
Add a PRAM heap and move some of the data there
It's a 32-bit-access-only heap. On the Ultimate Doom WAD the amount of
data moved is about 17 kiB, which is not a lot, but arrays with 4-byte
elements are not easy to find in Doom.
2021-08-12 21:01:35 +02:00
Lephenixnoir 1639adce59
Fix Doom episode 2&3 and Doom II switches not animating properly 2021-08-12 17:19:32 +02:00
Lephenixnoir 5520a6e5ee
Restore video mode after an error
When using direct-DD access, the window size would not be restored,
producing complete nonsense.
2021-08-12 13:12:48 +02:00
Lephenixnoir 64452f9f74
Fix probabilistic crash in Quit Game menu entry 2021-08-11 20:23:05 +02:00
Lephenixnoir d9f23fc156
Show FPS counter in its own top-right widget 2021-08-04 19:15:25 +02:00
Lephenixnoir 9c6ed32fee
G3A update 2021-08-04 18:50:00 +02:00
Lephenixnoir 4832390802
Add secondary VRAM as heap when using direct-DD access
Ultimate Doom E1M6 now loads!
2021-08-04 15:58:40 +02:00
Lephenixnoir 977f23a965
Add FPS counter, toggled with [(] 2021-08-04 14:26:36 +02:00
Lephenixnoir bb86fd1145
Add an option to start at any map 2021-08-04 11:34:02 +02:00
Lephenixnoir 8b7649c824
Restore all menu options to sane behavior
Load/Save game is still not supported.
2021-08-04 11:07:14 +02:00
Lephenixnoir 27f40b003e
Add brightness setting (gamma correction) on FRAC 2021-08-04 10:22:35 +02:00
Lephenixnoir 5e420d7c4a
TODO list update 2021-08-04 10:02:34 +02:00
Lephenixnoir 1e98b33a93
TODO list update 2021-08-03 17:54:12 +02:00
Lephenixnoir 92c1cfe522
Restore the V_Clear function
I removed it before because I had missed the point about clearing the
screen when changing "details" (= the level of detail).
2021-08-03 17:50:27 +02:00
Lephenixnoir e4c06f1ec5
Enable all composite textures (for now) 2021-08-03 14:55:12 +02:00
Lephenixnoir 0f9658279b
Add the LICENSE file and description 2021-08-02 22:00:46 +02:00
Lephenixnoir d64ef29d58
Properly credit authors of Nspire ports 2021-08-01 13:22:58 +02:00
Lephenixnoir b8eed6f5d0
Enable menu (X,O,T is ESCAPE, log is RETURN)
This is temporary, the keymap will likely be changed later.
2021-07-30 17:42:44 +02:00
Lephenixnoir 1ada53589f
TODO list update 2021-07-30 16:46:26 +02:00
Lephenixnoir dc7519fe3e
Fix level end screen
This was using screens[1] which I had deallocated when fixing the status
bar (I incorrectly assumed it was used only for that).

While the CGDOOM technique to share screens[1] to avoid allocating the
320x20 buffer for the status bar makes clear sense with that new
information, I think I'll keep this 6.4 kB buffer there and rather
search for ways to use more memory zones.
2021-07-29 10:13:00 +02:00
Lephenixnoir 55f9d43237
Optimize loading speed (x2.7) and game speed (+35%)
Loading is measured by RTC_GetTicks().

* Initial version: 9.8s
  This was a regression due to using 512-byte sectors instead of 4 kiB
  clusters as previously.

* Do BFile reads of 4 kiB: 5.2s (-47%)
  Feels similar to original code, I'll take this as my baseline.

* Test second half of Flash first: 3.6s (-31%)
  By reading from FLASH_FS_HINT to FLASH_END first many OS sectors can
  be skipped (without missing on other sectors just in case).

* Load to XRAM instead or RAM with BFile
  The DMA is 10% slower to XRAM than to RAM, but this benefits memcmp()
  because of faster memory accesses through the operand bus. No effect
  at this point, but ends up saving 8% after memcmp is optimized.

* Optimize memcmp for sectors: 3376 ms (-8%)
  The optimized memcmp uses word accesses for ROM (which is fastest),
  and weaves loop iterations to exploit superscalar parallelism.

* Search sectors most likely to contain data first: 2744 ms (-19%)
  File fragments almost always start on 4-kiB boundaries between
  FLASH_FS_HINT and FLASH_END, so these are tested first.

* Index most likely sectors, improve FLASH_FS_HINT: 2096 ms (-24%)
  Most likely sectors are indexed by first 4 bytes and binary searched,
  and a slightly larger region is considered for hints. The cache hits
  119/129 fragments in my case.

* Use optimized memcmp for consecutive fragments: 1408 ms (-33%)
  I only set it for the search of the first sector in each fragment and
  forgot to use it where it is really needed. x)

Game speed is measured roughly by the time it takes to hit a wall by
walking straight after spawning in Hangar.

* Initial value: 4.4s

* Use cached ROM when loading data from the WAD: 2.9s (-35%)
  Cached accesses are quite detrimental for sector search, I assume
  because everything is aligned like crazy, but it's still a major help
  when reading sequential data in real-time.
2021-07-28 23:06:42 +02:00
Lephenixnoir 75c8730451
Restore fast copies using the fxlibc memcpy() 2021-07-27 15:05:42 +02:00
Lephenixnoir d7ee5a1bbb
Restore video system screens and memcpy bug in V_CopyRect
* Restore screen numbers; BG is 4, at least in the ST module.
* Let ST module allocate BG, which is just 32 pixels high and not a full
  VRAM (huge memory gain!)
* Fix V_CopyRect() not working because memcpy is still broken (this will
  be changed later with a proper memcpy)
2021-07-27 14:20:14 +02:00
Lephenixnoir f869f45d0d
Split in ROM sectors of 512 bytes instead of clusters of 4 kiB
This makes the search quite a bit slower, I'll look into that later.
2021-07-26 17:25:26 +02:00
Lephenixnoir 7a75e46715
Use memset() in CGDCalloc() again
The bug was libfxcg's sys_calloc() using a memsetZero() function which
simply doesn't work properly.
2021-07-17 16:36:31 +02:00
Lephenixnoir 55c2e64000
G3A for first working version + README 2021-07-17 10:51:07 +02:00
ComputerNerd bd6bb43473 Inital commit 2015-04-14 19:16:51 -05:00