News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: Need a mapper hack  (Read 841 times)

Pennywise

  • Hero Member
  • *****
  • Posts: 2198
  • I'm curious
    • View Profile
    • Yojimbo's Translations
Need a mapper hack
« on: August 01, 2018, 11:20:46 pm »
So, I finally finished translating Jajamaru Ninpo Chou and it turns out the ROM expansion used exceeded the mapper specs. This game went through a round of testing and I thought it finished, now I discover this. I've had the ROM tested on a flashcart and it doesn't work on hardware. So, the translation is locked to FCEUX and a handful of other emulators and I'm need of a mapper hack. There was a prototype for Taro's Quest that changed the mapper to MMC1, so a mapper hack might not be that difficult, but I am thoroughly sick of this game and don't want to look at it anymore. Is there anyone capable of doing a mapper hack for me?

Psyklax

  • Hero Member
  • *****
  • Posts: 729
    • View Profile
    • Psyklax Translations
Re: Need a mapper hack
« Reply #1 on: August 02, 2018, 05:55:34 am »
Your use of passive voice suggests it wasn't you that messed this up. :D

Here's the specs for the VRC1 used in this game:
https://wiki.nesdev.com/w/index.php/INES_Mapper_075
and the much more common MMC1 used in the prototype:
https://wiki.nesdev.com/w/index.php/INES_Mapper_001

One thing to notice is that the VRC1 has a maximum PRG size of 128KB, so maybe that's what went wrong. The MMC1 can go up to half a meg. The CHR works the same in both. A key difference is the granularity of the banks: although VRC1 can only do 128KB in total, the banks are 8KB rather than 16KB, so the game may use them differently than an MMC1 game. Then again, as you said the prototype used MMC1, perhaps it didn't take advantage of the granularity and therefore a switch would be easy.

The big problem is how the two mappers switch banks. The VRC1 works like most other mappers: just write the number of the bank you want to the address you want to put it, and bam, done. The MMC1 works quite differently, as the NESdev page shows. However, having that prototype will be very useful, as someone can compare the original with the prototype and see how the internal processes differ. I could have a look to see how it works, but I can't promise anything. :)

Anyone else with experience of the MMC1 might want to chime in here. On second thoughts, using the UNROM mapper instead might be a better choice, since it seems to work quite similarly to the VRC1, but has double the PRG capacity:
https://wiki.nesdev.com/w/index.php/INES_Mapper_002
If the bank switching works the same, it could be a very simple swap. But the problem in any mapper hack is how to tell the game to switch banks: like, how does the game know that THIS bit of dialogue is in a particular bank? That can be a challenge.

EDIT: the GoodNES set includes a mapper hack: Jajamaru Ninpou Chou (J) [hM04].nes. It changes the mapper to MMC3. Perhaps adapting the translation to that would be easiest?

EDIT2: Crikey, Taro's Quest is remarkably different to the original. Maybe it won't be so helpful to compare...
« Last Edit: August 02, 2018, 06:01:47 am by Psyklax »

Pennywise

  • Hero Member
  • *****
  • Posts: 2198
  • I'm curious
    • View Profile
    • Yojimbo's Translations
Re: Need a mapper hack
« Reply #2 on: August 02, 2018, 09:14:15 am »
Well, this is what happens when you have a project that's several years old. This might've been discussed at one point in the project's history, but it's been so long I forgot all about it.

There's over 10,000 differences between the Japanese ROM and that mapper hack. I'm also not so sure about porting over all our ASM modifications to that ROM especially since I didn't do most of the hacking. There's quite a bit of ASM to digest as well.

I have actually done a mapper hack before and it was really easy. I was hacking a GxROM game IIRC, and it turned out that there was a pirate mapper that was basically the same, but with an extra PRG bit.

Edit: I sent krikzz, the guy who designed the Everdrive N8, an email asking if he could add support for the translation. Why go through all the trouble of doing a mapper hack if there's chance it could be played on hardware?
« Last Edit: August 02, 2018, 10:34:22 am by Pennywise »

Psyklax

  • Hero Member
  • *****
  • Posts: 729
    • View Profile
    • Psyklax Translations
Re: Need a mapper hack
« Reply #3 on: August 02, 2018, 02:12:24 pm »
There's over 10,000 differences between the Japanese ROM and that mapper hack.

Not true. The differences are:

- a different header to reflect the new mapper
- a $200 byte section that goes into PRG-RAM which provides the back switching routines for the new mapper
- every instruction which switches the bank is replaced by a JSR to the aforementioned PRG-RAM bank switching routines

That's it. The reason you saw 10,000 changes in a simple file compare is likely because of the inserted PRG-RAM section at the beginning which offset the rest of it, but as far as the NES is concerned, it doesn't care.

So, actually, using the mapper hack would be trivial, and would definitely work on the Everdrive. Only problem is how to arrange the script to benefit from the bank switching.

Pennywise

  • Hero Member
  • *****
  • Posts: 2198
  • I'm curious
    • View Profile
    • Yojimbo's Translations
Re: Need a mapper hack
« Reply #4 on: August 02, 2018, 03:17:56 pm »
Oh, that's a trainer and iirc it's basically cheating and doesn't work on hardware. Hell, it's not really a true mapper hack. More like it's an obsolete legacy so the game could be played on old copiers.
« Last Edit: August 02, 2018, 03:27:26 pm by Pennywise »

snarfblam

  • Submission Reviewer
  • Hero Member
  • *****
  • Posts: 586
  • CANT HACK METROID
    • View Profile
    • snarfblam
Re: Need a mapper hack
« Reply #5 on: August 02, 2018, 05:57:09 pm »
Of course, you could just hijack the RESET and copy the trainer to PRG RAM yourself.

Pennywise

  • Hero Member
  • *****
  • Posts: 2198
  • I'm curious
    • View Profile
    • Yojimbo's Translations
Re: Need a mapper hack
« Reply #6 on: August 02, 2018, 07:54:31 pm »
Yeah, I'm not gonna do any of that. I'll just release the patch as-is.