Thank you very much! I think it's time for an update. As you have found, there is this topic on Plančte Casio
and my version of CGDOOM is published on this Git repository
, with the G3A file in the CGDOOM-minisdk/CGDOOM subfolder.
The bug with loading side definitions was tracked down to memcpy() not working in the Flash loading procedure (libfxcg uses the memcpy syscall, which I assume is either bugged or not designed as a fully-generic memcpy in the first place). I'm becoming paranoid due to not trusting standard functions!
Anyway I fixed that by using another version of memcpy, and CGDOOM has worked on every tested calculator since, which is 6 thanks to your test. Hurray!
I then used the opportunity to implement so improvements and optimizations. The loading was already faster due to higher clock speeds on the fx-CG 50 (5.2 seconds for the shareware doom.wad), I added some heuristics and a binary index of the sectors where fragments are most likely to be located (~90% hit rate) and brought it down to 1.4s. (There's also some assembler black magic, which is less significant but I was inspired to write some. xD)
I also noticed that loads in-game were being made from uncached ROM addresses. While this is the proper choice for fragment search, actually copying data benefits greatly from the cache. I set it up to use P1 addresses during the game and this improved the game speed by about 35%.
As minor improvements, I also updated the icon style and rewrote input handling to use a direct KEYSC driver so as to support simultaneous key presses. I'm surprised that there aren't many (in my version of libfxcg, there aren't any
) syscalls to do that directly.
Finally, I extended DOOM's internal allocator to support multiple pools of memory, so that I could supply it with both the system stack and
every bit of user stack which is not used by the data/bss sections. This has allowed me to work on loading larger WADs like the Ultimate Doom one which Critor has recommended to me. (Critor is the one who worked on the Nspire CX port from which CGDOOM is derived, and the CX supports quite a lot of WADs).
Here are some bugs I noticed while playing:
- Some areas have corrupted / strange textures (for example: the secret area that leads to the megaarmor and the pillars in E1M1)
- The game runs too fast when overclocking the calculator with Ptune2 to 213 MHz
I don't know about the secret area (I'm both new to DOOM and bad at it!) but the pillars did have a texture problem in the Doom Ultimate WAD. If you use the shareware WAD linked on Plančte Casio it should be fine. Then again this one has glitched textures in E1M2 anyway, so surely there's a bug left.
I'm not sure the game is rate-limited at all since the fx-CG 20 couldn't reach nominal speed, I'll look into it.
Here is some stuff I would add:
- Difficulty setting (Ultraviolence is too hard and I don't want to cheat the whole time)
- Run key
- FPS Counter
Ah so here's why I only finished Hangar once, it's locked on Ultraviolence... I figured 1% health boost was small. xD
Critor actually requested the difficulty screen too, this should be feasible. FPS counter same deal. The run key I don't know about, would you mind detailing a little bit?