SNES PowerPak

Discussion of hardware and software development for Super NES and Super Famicom.

Moderator: Moderators

Forum rules
  • For making cartridges of your Super NES games, see Reproduction.
mic_
Posts: 922
Joined: Thu Oct 05, 2006 6:29 am

Post by mic_ » Mon Apr 26, 2010 6:03 am

A clone (which I'm guessing that the FC-16 is) might not have a CIC on the console side, and therefore might not care about whether or not a CIC is present in the cartridge.
If you want the cart to also work on an official SNES/SFC you will need a CIC(lone) for the reason that tepples gave.

Heinz2001
Posts: 16
Joined: Mon Apr 26, 2010 2:05 am

Post by Heinz2001 » Mon Apr 26, 2010 6:19 am

Ok. :-). Thats why i wrote FC16 go. Of couse you need an CIClone if you use a SNES with CIC.

Thanks for explanation. So it would be really great to have rom patching to remove region check in powerpak.

Maybe it's doable with the current GameGenie patchsystem?

User avatar
MottZilla
Posts: 2832
Joined: Wed Dec 06, 2006 8:18 pm

Post by MottZilla » Mon Apr 26, 2010 1:06 pm

With a Game Genie you can patch up to 5 bytes of ROM. This is plenty to fool a game with NTSC/PAL protection into running on the opposite video system. But if the game for some reason doesn't function properly on the opposite then you'd need more than just a few byte changes.

Heinz2001
Posts: 16
Joined: Mon Apr 26, 2010 2:05 am

Post by Heinz2001 » Tue Apr 27, 2010 1:12 am

MottZilla wrote:With a Game Genie you can patch up to 5 bytes of ROM. This is plenty to fool a game with NTSC/PAL protection into running on the opposite video system. But if the game for some reason doesn't function properly on the opposite then you'd need more than just a few byte changes.
Of couse. But using Game Genie and on-the-fly patching is far more better than a hard patch. In Snes-Powerpak i can place a Game Genie file, this should do the job.

Update: As long as i understand GG patching, I can patch "Secret of Mana PAL" to work on my FC16 Go (NTSC without cic) using this GameGenie code with Snes-Powerpak "CB83-DF92".

Correct?

User avatar
Marcel
Posts: 6
Joined: Fri Apr 16, 2010 7:07 am

Post by Marcel » Tue Apr 27, 2010 4:55 am

Hi Heinz2001,

Patching based on a generic seek and replace method is not always reliable. Indeed I've already come across games where the code pattern of the protection is not listed on the web page you gave earlier. This half broken "feature" would be hard to support for the powerpack designer imho.
The gg code is not too hard to find with a debugger. Of course a more extreme but easier solution would be to use the US version. :idea: :wink:

Now about the gg code you've found, there have been several revisions of SoM PAL, in different languages.
Could you please provide the crc of the rom you're using ?

--

Heinz2001
Posts: 16
Joined: Mon Apr 26, 2010 2:05 am

Post by Heinz2001 » Tue Apr 27, 2010 6:47 am

I used SnesTool to patch this rom and then i compared the patched one with the unpatched one. Then i used ggconvc to convert the hex adress and the byte value into GG code.

md5: 976edc10fbb8825d9d2e31117055f1f9 *Secret of Mana (G).smc
sha1: e54e6b8c41b14b1ef579ac73c16cc39dec4d9b35 *Secret of Mana (G).smc

Of couse i can use the US version, but i want to play Secret of Mana in German on my FC16 Go :-). I have several Pal Games with german language that don't work on the FC16-Go. Thants why i wanna use my powerpak to play them.

I searched the web for GG codes to patch roms for region. But i can't find one. I don't think i'm the first one who want todo this :) ?

User avatar
Marcel
Posts: 6
Joined: Fri Apr 16, 2010 7:07 am

Post by Marcel » Tue Apr 27, 2010 10:16 am

Well I don't know from where you got the rom (and I don't want to know) but the goodsnes and no-intro db all agree on the same hash for SoM German which is not the same as yours.
Anyway I'll show you how to get the gg code by yourself. This is using the german version with the following hash :
(md5)B57303407986C0D28F2D78F931EFC59C
(sha1)AB8A31BFB4CF0CE19B96893A31442FFBFD8D0BEB
  1. Open the rom in an emulator which include a debugger like bsnes.
  2. Open the debugger and put a breakpoint on 213f when read. $213f is a register where the region type is stored (PAL/NTSC). The games always read this register to detect the region.
  3. Reset the game. It should stop with the following:

    Code: Select all

    7ed45a lda $00213f   [00213f] A:0204 X:0620 Y:0610 S:02e9 D:02ee DB:7f nvMxdizC V: 70 H:  10
    This is where the game tries to read the region code. Step a bit through the code until you reach a condition:

    Code: Select all

    7ed45e and #$10               A:0263 X:0620 Y:0610 S:02e9 D:02ee DB:7f nvMxdizC V: 70 H:  10
    7ed460 cmp #$10               A:0200 X:0620 Y:0610 S:02e9 D:02ee DB:7f nvMxdiZC V: 70 H:  26
    7ed462 beq $d47f     [7ed47f] A:0200 X:0620 Y:0610 S:02e9 D:02ee DB:7f NvMxdizc V: 70 H:  42
    
    This last line is a conditional jump. If on NTSC, display the bad boy message else jump over the bad boy code and continue. Of course, this portion of code change from game to game, so you'll have to understand a little bit of assembler but this should be ok with the proper documentation.
  4. One way to always jump over the bad boy message is to change the conditionnal jump to an unconditional one. Refering to the doc, we can use the BRA instruction which translate to opcode $80 in hexadecimal (while BEQ translate to F0).
    So we want to have $80 at address $7ed462, give that to ggconvc 7ed462:80 and it returns 6D21-FA8B. (I'm using "Game Geni Code Converter by the way)
Now there is catch: while this code should work with emulator like bsnes or zsnes, it won't on the original gg hardware and by extension on the powerpak (I guess because I don't own a ppak but then it would allow PAR code as well). This is because the target of the patch is in the system RAM (begins with 7e/7f) which the gg can't access. But all is not lost, the code must have been copied from the ROM to the RAM from somewhere else.

5. Disable the breakpoint on 213f and put a breakpoint at 7ed462 on write. Reset the game:

Code: Select all

0001f0 mvn $c7,$7e            A:0001 X:b2e9 Y:d462 S:01c0 D:01c5 DB:7e NvMxdIZc V:245 H: 584
This copy byte from @c7b2e9 to @7ed462. So we want to overwrite byte @c7b2e9 with 80 => ggconvc: c7b2e9:80
=> 6D83-849A

This should do it.

Near
Founder of higan project
Posts: 1550
Joined: Mon Mar 27, 2006 5:23 pm

Post by Near » Tue Apr 27, 2010 11:37 am

Yes, the Game Genie cannot override RAM, as the system itself responds to those addresses instead of the cart bus.

The Pro Action Replay "cheats" by hooking the NMI routine and manually overwriting RAM each frame.

Unfortunately there are thousands of RAM-based codes out there, so we can't very well ignore RAM-based GG codes.

Heinz2001
Posts: 16
Joined: Mon Apr 26, 2010 2:05 am

Post by Heinz2001 » Tue Apr 27, 2010 2:42 pm

Thanks for this good Tutorial.

Anyway. I tried my GG code and it don't work. I tried the snestool patched rom (for ntsc) and it worked.

I have to get hands on the rom version you mentioned.

So GG codes patch the rom not the ram right?

User avatar
Disch
Posts: 1849
Joined: Wed Nov 10, 2004 6:47 pm

Post by Disch » Tue Apr 27, 2010 2:54 pm

Heinz2001 wrote:So GG codes patch the rom not the ram right?
byuu in the post immediately before that one wrote:Yes, the Game Genie cannot override RAM

Heinz2001
Posts: 16
Joined: Mon Apr 26, 2010 2:05 am

Post by Heinz2001 » Tue Apr 27, 2010 2:59 pm

I read this ;-), but it does not say explicitly that it overwrites the rom. And i asked, just because my calculated code don't work.

@Marcel: Ok. I found the rom version you mentioned and used your GG code. It also does not work.

Maybe i calculate the GG code wrong.

User avatar
Marcel
Posts: 6
Joined: Fri Apr 16, 2010 7:07 am

Post by Marcel » Wed Apr 28, 2010 12:11 pm

ok, snestool change byte $29 to $a9 @7b2e5 in the rom file, ie "and #$10" becomes "lda #$10" in the code listing I gave earlier.
The gg code to mimic this would be:
$c7b2e5:a9 ($c7b2e5=$7b2e5+$c00000 : hirom, no header)
=> CB83-8F9A

To calculate the right address - without using a debugger -, you need to know the map mode of the rom (lorom,hirom,...) and check the presence of an header to add 512 ($200) accordingly. Please note that while the goodtools rename this rom with an smc extension, there is actually no smc header.

I just checked those two codes (CB83-8F9A and 6D83-849A) in both bsnes and zsnes by forcing the rom to load in ntsc mode and it works ok. So if this don't work for you, I don't see why and can't help any further i'am afraid as I don't own the fc16, the gg nor the ppack :lol:

Heinz2001
Posts: 16
Joined: Mon Apr 26, 2010 2:05 am

Post by Heinz2001 » Fri Apr 30, 2010 1:42 am

Ok. I tried both codes yesterday. No code works. This is strange indeed.

I also tested both codes on bsnes and they work. Mh. Would be cool to know something about the GG implementation in Snes powerpak.

Bunnyboy?

lifeixie
Posts: 11
Joined: Sat Sep 12, 2009 1:44 am

Post by lifeixie » Fri Apr 30, 2010 7:52 am

Strange questions
The same CF card

My SFC:game perfect work
My friend's (A) : no one can the SFC and submitted to the different work as freely though they are wrong, including $51 CF CARD: they $10 CF CARD as freely though they as freely though they
I another friend (B) the SFC: the game, most occasionally work does not work, and friends (A) the same mistake
I another friend (B) the SFC JR: game perfect work


Don't have internal voltages and host?
Excuse me, where the problem??????

Eyedunno
Posts: 35
Joined: Mon Dec 21, 2009 12:59 pm

Post by Eyedunno » Fri Apr 30, 2010 3:25 pm

Heinz2001 wrote:Ok. I tried both codes yesterday. No code works. This is strange indeed.

I also tested both codes on bsnes and they work. Mh. Would be cool to know something about the GG implementation in Snes powerpak.

Bunnyboy?
I can confirm that Game Genie codes have never worked for me on the PowerPak, even when they work on emulators or with an actual Game Genie.
lifeixie wrote:My SFC:game perfect work
My friend's (A) : no one can the SFC and submitted to the different work as freely though they are wrong, including $51 CF CARD: they $10 CF CARD as freely though they as freely though they
I another friend (B) the SFC: the game, most occasionally work does not work, and friends (A) the same mistake
I another friend (B) the SFC JR: game perfect work
If you are using an automatic translation site, please know that what you have said is almost completely impossible to understand. All I gather is that some Super Famicoms work and some don't.

It might help to press select at the first screen and tell us the CPU, PPU1, and PPU2 numbers.

Post Reply