I guess hacking Gradius II to MMC5 wouldn't be too hard, maybe it would even be possible to redirect SRAM to EXRAM so that $5cxx is used instead of $6xxx, so that ELROM would run it, but since Gradius II uses 2k of SRAM (however, not all of it is used) and MMC5 have just 1k of EXRAM, I doubt this is possible, in that case EKROM (Gemfire) or any supperior MMC5 board will be needed. I doubt anyone would test it on real hard, since MMC5 is really a comfortable mapper to code for, hacking the game to it should be really easy in fact. If anyone would be ready to sacrifice a Koei game for it say it so and I'll hack the game to MMC5.
I have a few notes I guess, just one page where I noted important adresses in PRGROM :
- PRG swapping is (originally) done arround $fcdc, and $fee6.
- CHR swapping is done at $fe3b and $fb78, and CHR bank swapped are in RAM at $7f0-$7f7 (for all 8 1kb chunks respectively).
- IRQ countown value is set at $fc10
- The IRQs are enabled at $fa90
- IRQ routine is at $fb35
And about the game workings, all there is to know is that :
- The game
always have IRQs triggering at scanlines 107, 203 and 225. Whenever the game actually do something only depends of the IRQ routine, which typically change CHR banks and/or change scrolling for the status bar. During gameplay, the game usually display blank tiles (but still have rendering on) from scanline 225 to end of the frame, which is fun.
- Since Konami mapper have really different IRQ working than MMC3 I used some dirty ticks to have them work in the closest way I could do it (but I haven't had much experience with MMC3 IRQs prior to this hacking).
- The game does everything in its NMI routine, like most Konami games. The main programm spends 100% of its time to generate pseudo random numbers, which is kind of weird.
- Originally, the game take all most of its sprite from pattern table 0 and all BG from pattern table 1. It always used 8x16 sprites. I hacked the game so that both pattern tables are reversed (MMC3 IRQ counter), but there is still some sprites fecthed from the left pattern table.
- The game switched CHR banks in pseudo 8KB banks, formed by 8 values of smaller banks. In theory, the game could almost have 256 KB CHRROM and only switch the whole 8 KB chunks at once like CNROM does, exept when banks are changed during IRQs. I've already posted the location of the big 256-byte CHR table above, I haven't noted it on paper.
- The mid-screen IRQ at scanline 107 is used on the pre-title screen and sometimes during gameplay too. The IRQ at scanline 203 turn off sprites, and set another BG bank set for the status bar. Eventually the IRQ on 225 switch all black CHR banks in the BG pattern table. All those switches bypass the normal pseudo-8KB engine mentionned above.
In order to make the game work with the MMC3's 2kx2 - 1kx4 CHR sheme, I've changed the banks and their order in order from them to work in a more suitable way. I've noted this in a text file I'll paste just below. Now everyone should know everything needed to hack Gradius II. Also I'll let the IPS patch on my server for some more time in case it can be helpfull to anyone, but I won't let it forever (until someone can made a stable version of it, in that case I'll actually made a page about it like Contra).
Code:
Gradius II sprite CHR banks :
OLD NEW
40 41 42 43 40 42
40 41 44 45 40 44
40 41 47 48 40 48
40 41 47 64 40 4a
40 41 49 4a 40 64
40 41 65 4a 40 66
40 41 70 43 40 72
40 41 42 43 40 42
40 41 42 43 40 42
40 41 42 43 40 42
40 41 44 46 40 46
40 41 44 46 40 46
40 41 44 46 40 46
40 41 47 48 40 48
40 41 47 48 40 48
40 41 47 64 40 4a
40 41 49 4a 40 64
40 41 49 4a 40 64
40 41 49 4a 40 64
40 41 49 4a ....
40 41 49 4a
40 41 49 4a
40 41 66 4a 40 70
40 41 65 4a 40 66
40 41 42 43 40 42
40 41 42 43 40 42
40 41 70 43 40 72
40 41 47 64 40 4a
40 41 47 64 40 4a
40 41 65 4a 40 66
71 72 73 74 7c 7e
71 72 73 74 7c 7e
USED (19) : 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 4a, 64, 65, 66, 70, 71, 72, 73, 74
FREE (6) : 6B, 6C, 7c, 7d, 7e, 7f
GROUPS (12)
40 41 UNCHANGED AT $40, $41
42 43 UNCHANGED AT $42, $43
44 45 UNCHANGED AT $44, $45
44 46 RELOCATED AT $46, $47
47 48 RELOCATED AT $48, $49
47 64 RELOCATED AT $4a, $4b (*)
49 4a RELOCATED AT $64, $65
65 4a RELOCATED AT $66. $67 (*)
66 4a RELOCATED AT $70, $71
70 43 RELOCATED AT $72, $73
71 72 RELOCATED AT $7c, $7d
73 74 RELOCATED AT $7e, $7f
BG bank at $4b RELOCATED AT $6b
BG bank at $67 RELOCATED AT $6c