What Mapper Did Gradius II Repro Use?

A place that you can discuss reproduction of classic titles or "licensed-for-reproduction" homebrew for personal use.

Moderators: B00daW, Moderators

Forum rules
1. NO BLATANT PIRACY. This includes reproducing homebrew less than 10 years old, with the exception of free software.
2. No advertising your reproductions, with the exception of free software.
3. Be nice. See RFC 1855 if you aren't sure what this means.
User avatar
MottZilla
Posts: 2837
Joined: Wed Dec 06, 2006 8:18 pm

Post by MottZilla »

Do you have any notes on what you did you could make public incase anyone else wants to try to take it further?

And I realize now that MMC5 isn't a bad idea as there are other games, I didn't realize they had US releases. Maybe stepping it up to MMC5 wouldn't be a bad idea if you wanted to make a repro. FME-7 would make sense if you aimed or the powerpak. I didn't even realize the PowerPAK supported it till now.
User avatar
Bregalad
Posts: 8055
Joined: Fri Nov 12, 2004 2:49 pm
Location: Divonne-les-bains, France

Post by Bregalad »

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: Select all

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
aupton
Posts: 36
Joined: Tue Aug 06, 2013 12:07 pm

Re: What Mapper Did Gradius II Repro Use?

Post by aupton »

I know this is an old thread, but the URL''s mentioned in this post are now 404'd, has anyone ever attempted to pickup on this topic ?
DutchC64
Posts: 10
Joined: Thu Dec 08, 2011 2:28 pm

Re: What Mapper Did Gradius II Repro Use?

Post by DutchC64 »

sorry for bumping this old thread, but does anybody still have those IPS patches?
the links in the thread are all dead
aupton
Posts: 36
Joined: Tue Aug 06, 2013 12:07 pm

Re: What Mapper Did Gradius II Repro Use?

Post by aupton »

DutchC64 wrote:sorry for bumping this old thread, but does anybody still have those IPS patches?
the links in the thread are all dead

I never received a response to my last inquiry. I still haven't located the patches either.
User avatar
Fisher
Posts: 1249
Joined: Sat Jul 04, 2015 9:58 am
Location: -29.794229 -55.795374

Re: What Mapper Did Gradius II Repro Use?

Post by Fisher »

I don't think Bregalad will ever share this again.
The problem is that there were some people selling his ROMs conversions for high profit.
He just didn't like this at all and now he just don't endorse repros.

Maybe MottZilla has a copy of it?

I have a Gradius2 ROM converted do MMC3, it's not Bregalad's version, and it's very badly done.
I can generate an IPS and post here later, if needed.
User avatar
Bregalad
Posts: 8055
Joined: Fri Nov 12, 2004 2:49 pm
Location: Divonne-les-bains, France

Re: What Mapper Did Gradius II Repro Use?

Post by Bregalad »

Fisher wrote:I don't think Bregalad will ever share this again.
The problem is that there were some people selling his ROMs conversions for high profit.
He just didn't like this at all and now he just don't endorse repros.
Exactly, thank you for summing up my thoughts :)

Back then when this was a thing (in 2008) the repro market was still low/not really a thing. But this is only half of why I don't share it any longer, the other reason is that :
and it's very badly done.
My version was also "very badly done". Some sprites were still messed up (from the wrong bank), the status bar jumped vertically like crazy because some 8x16 sprites came from the BG pattern table, cleating additional clocks to the MMC3's IRQ counter. This is a limitation of the MMC3 and without a major rewrite of the game it can't be worked around, since the game was designed to use more than 256 sprite tiles simultaneously. Also the game crashed randomly on heavy CPU usage, and despite having spent time trying to resolve the problem I didn't.

So, in summary, the project of convert Gradius II to MMC3 was a failure and was doomed to fail because the MMC3 is not adapted to Gradius II without significant changes in the game. Also mapper hacking is not very interesting exept for reproduction, which I am not in favor of anymore, because of the problem it can be sold for high profit.
Post Reply