Read about your work on the news and wandered in here (and saw the other thread about the graphics stuff).
Really want to find time to replay this classic game from ways back then, but I did sample up to Dungeon 1 and the changes are well. Amazing! Checked the vanilla game and that is a far difference.
I do have some experience with asm but not much time. Even less so now with the crummy virus. :grumble:
But I do have a few observations coding wise.
1. Graphics decompression runs through here
808766 phd A:0010 X:c9e0 Y:e000 S:1feb D:1e00 DB:7e NvmxdIzc V: 91 H:1034 F:27
808767 pha A:0010 X:c9e0 Y:e000 S:1fe9 D:1e00 DB:7e NvmxdIzc V: 91 H:1064 F:27
808768 tdc A:0010 X:c9e0 Y:e000 S:1fe7 D:1e00 DB:7e NvmxdIzc V: 91 H:1094 F:27
808769 sec A:1e00 X:c9e0 Y:e000 S:1fe7 D:1e00 DB:7e nvmxdIzc V: 91 H:1108 F:27
80876a sbc #$0008 A:1e00 X:c9e0 Y:e000 S:1fe7 D:1e00 DB:7e nvmxdIzC V: 91 H:1152 F:27
80876d tcd A:1df8 X:c9e0 Y:e000 S:1fe7 D:1e00 DB:7e nvmxdIzC V: 91 H:1176 F:27
80876e pla A:1df8 X:c9e0 Y:e000 S:1fe7 D:1df8 DB:7e nvmxdIzC V: 91 H:1190 F:27
80876f php A:0010 X:c9e0 Y:e000 S:1fe9 D:1df8 DB:7e nvmxdIzC V: 91 H:1226 F:27
808770 sep #$20 A:0010 X:c9e0 Y:e000 S:1fe8 D:1df8 DB:7e nvmxdIzC V: 91 H:1248 F:27
808772 sta $02 [001dfa] A:0010 X:c9e0 Y:e000 S:1fe8 D:1df8 DB:7e nvMxdIzC V: 91 H:1270 F:27
808774 stx $00 [001df8] A:0010 X:c9e0 Y:e000 S:1fe8 D:1df8 DB:7e nvMxdIzC V: 91 H:1300 F:27
808776 sty $05 [001dfd] A:0010 X:c9e0 Y:e000 S:1fe8 D:1df8 DB:7e nvMxdIzC V: 91 H:1338 F:27
808778 tyx A:0010 X:c9e0 Y:e000 S:1fe8 D:1df8 DB:7e nvMxdIzC V: 92 H: 12 F:27
Tip 1: 00-02 = 24-bit rom pointer. It's using SlowROM banks! That could be a modest gain.
Tip 2: I've read the decruncher math. It's ugly. The fastrom replacement code to speed it up is.. hard to understand also! :lol:
To summarize, something like this from what I'm reading:
rom to ram:
00-1f = 8-bit copy
20-3f = 8-bit rle
40-5f = 16-bit rle
60-7f = 8-bit rle+1
ram to ram:
80-9f = 8-bit copy forward
a0-bf = 8-bit reverse flip
c0-df = 8-bit copy reverse
e0-ff = 16-bit run lengths
Writing a cruncher program would seem less fun to do.
edit: And then I read the comments. A genius already did the master work. That's a lot of HAL games covered!https://github.com/devinacker/exhal/blob/master/compress.c
Tip 3: I was watching the vram in dungeon walking mode. It runs slow because it decompresses the dungeon tiles every frame. It'd be much faster if you expanded LoROM to 2MB and threw the raw tiles in there. Maybe battle monster sprites too.
I also have to wonder if the decrunch routine could be sped up further. Not all paths have been reworked to use dma helpers.
Well good fortune to you and your project!
(The new script is great so far. Would it help to expand the ROM and put in a "re-translation" of some type? For full unleashed creativity of what could have been? You definitely have the Midas touch for this game)