Author Topic: GameShark To GameGenie v0.1  (Read 2589 times)

0 Members and 1 Guest are viewing this topic.

Offline bestpig

  • Newbie
  • *
  • Posts: 13
  • Karma: +1/-0
    • View Profile
GameShark To GameGenie v0.1
« on: February 22, 2021, 12:03 AM »
Hello,

I have seen a lot of people asking for GameGenie code, but they are rare compared to GameShark one and the answer is always, "you can't".
So I just made a proof of concept to convert GameShark to GameGenie codes.
It has been tested on different ROM, and converted code are compatible with the EverDrive of course.
One GameShark code is converted to a lot of GameGenie codes, so you won't be able to convert a lot of codes due to the limit of codes you can put into your EverDrive.

If you want to convert multiple code, do the conversion at the same time.
You can't convert different code separately, the cheat in memory will override, so convert them all in one time.

GameShark codes are often region free, so don't hesitate to test GameShark code from another region.

There are requirements for converting code.
 - You have to upload the ROM on the page (Everything is done on client side, so no ROM is uploaded on my server, ROM are kept in your browser)



https://www.bestpig.fr/gs2gg/

You can view the source code, the web page is not obfuscated (Yes I'm running python in the web browser :P).
I plan to release a python software on GitHub later.

I just finished the software 1 hour ago, so there are maybe bugs, let me now if you encountered one.

Presentation about my works: https://docs.google.com/presentation/d/18QJiQPnl_ZkKEYDkzRUdiGhdQLkWB-7muLSxDUh1q0E/edit?usp=sharing

BestPig
« Last Edit: March 20, 2021, 11:59 AM by bestpig »

Offline Richardragon87

  • SNESAdvance Revival Coder
  • Hero Member
  • *****
  • Posts: 650
  • Karma: +11/-0
    • View Profile
Re: GameShark To GameGenie v0.1
« Reply #1 on: February 22, 2021, 01:02 AM »
Wow this is great. I remember Action Replay and Xploder GB being able to use them on the fly too, as does GGGuy I think though it has been quite a few years since I patched some GB roms years back so I am not sure on it now.
[quote Random dating spambotJ

Quote
Post changed:

Great, the photo didn't load! Does anyone know how to fix this?
In any case, my other photos can be viewed here, I will be glad to meet you, I love flirt))

P.S Richardragon87! Don't write me again, dude! You're in ignore list!

Offline bestpig

  • Newbie
  • *
  • Posts: 13
  • Karma: +1/-0
    • View Profile
Re: GameShark To GameGenie v0.1
« Reply #2 on: February 22, 2021, 01:54 AM »
I never used GGGuy, but yes, it can probably be used to bypass the GameGenie limitation.

I can easily add an option to save a patched GB rom with all codes if people are interested by this option.

Offline Richardragon87

  • SNESAdvance Revival Coder
  • Hero Member
  • *****
  • Posts: 650
  • Karma: +11/-0
    • View Profile
Re: GameShark To GameGenie v0.1
« Reply #3 on: February 22, 2021, 02:23 AM »
I never used GGGuy, but yes, it can probably be used to bypass the GameGenie limitation.

I can easily add an option to save a patched GB rom with all codes if people are interested by this option.

Update: Xploder GB has a built in colour trainer but it only worked with Action Replay and Gameshark codes. the Gamegenie was a unique cheat device that used a much shorter string of codes while AR and GS used a longer one... I think one of the systems were hard to replicate codes which is why GGGuy was created as a lot of devices these days couldn't do Game Genie either which is why stuff like that was vital.
[quote Random dating spambotJ

Quote
Post changed:

Great, the photo didn't load! Does anyone know how to fix this?
In any case, my other photos can be viewed here, I will be glad to meet you, I love flirt))

P.S Richardragon87! Don't write me again, dude! You're in ignore list!

Offline bestpig

  • Newbie
  • *
  • Posts: 13
  • Karma: +1/-0
    • View Profile
Re: GameShark To GameGenie v0.1
« Reply #4 on: February 22, 2021, 02:40 AM »
The difference between GameShark, Action Replay (probably others) and GameGenie is that they don't act at the same level.
GameShark add a hook into a game and patch a value in RAM at each screen refresh (VBLANK interrupt)
GameGenie just patch a byte in the ROM.

So code can't be compatible, they don't act at the same level.
So what my program do, is that I patch the ROM to add the same hook as GameShark do but directly in the ROM, and after that I create a code for each byte I modify on the ROM.
So with that way, I'm able to convert code from GameShark to GameGenie.

Offline Richardragon87

  • SNESAdvance Revival Coder
  • Hero Member
  • *****
  • Posts: 650
  • Karma: +11/-0
    • View Profile
Re: GameShark To GameGenie v0.1
« Reply #5 on: February 22, 2021, 03:57 AM »
The difference between GameShark, Action Replay (probably others) and GameGenie is that they don't act at the same level.
GameShark add a hook into a game and patch a value in RAM at each screen refresh (VBLANK interrupt)
GameGenie just patch a byte in the ROM.

So code can't be compatible, they don't act at the same level.
So what my program do, is that I patch the ROM to add the same hook as GameShark do but directly in the ROM, and after that I create a code for each byte I modify on the ROM.
So with that way, I'm able to convert code from GameShark to GameGenie.

I see... oddly I remember not many I knew who owned a GG device even on the original GB it was so heavy and tedious that many opted for the more basic AR or GS as it was just a huge cartridge kind of like a HU Card on a PC engine or a Super Famicom Turbo game. The bulk of the GG looked like a huge brick that curved around the GB which made it hard to understand how it was meant to be kept in place while playing games... I myself did own a GG but it was for the Super Nintendo I remember it coming with a huge red and yellow book by Codemasters and had what resembled a clip on slot for the cartridge with a light if I remember though it was years since I had one so like before my memory is pretty foggy these days.
[quote Random dating spambotJ

Quote
Post changed:

Great, the photo didn't load! Does anyone know how to fix this?
In any case, my other photos can be viewed here, I will be glad to meet you, I love flirt))

P.S Richardragon87! Don't write me again, dude! You're in ignore list!

Offline Titney

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: GameShark To GameGenie v0.1
« Reply #6 on: February 25, 2021, 06:26 PM »
Tried this with Balloon Kid (GB) and the "Invincibility" and "Never Lose Balloons" codes found here: https://gamehacking.org/game/1561

At first they seemed to work fine, but towards the end of the first level the graphics got corrupted. I tried each code separately too, to be sure they didn't conflict.

Offline bestpig

  • Newbie
  • *
  • Posts: 13
  • Karma: +1/-0
    • View Profile
Re: GameShark To GameGenie v0.1
« Reply #7 on: February 25, 2021, 07:35 PM »
I tested with Balloon Kid and this code.

Code: [Select]
010501D1 (Invincibility P-Balloon)
Generated codes only valid for this version (CRC32 -> d4b655ec)
Code: [Select]
640-41F-C40
000-42F-D5A
F50-64F-E6A
3E0-65F-E6A
050-66F-E6A
EA0-67F-E6A
010-68F-E6A
D10-69F-E6A
F10-6AF-E6A
C30-6BF-E6A
8A0-6CF-E6A
0C0-6DF-E6A

I didn't face any problem, not tested on EverDrive, but with mGBA.
Is you EverDrive OS is up to date ?
The version v1.04 fix a bug in the cheat engine

Code: [Select]
GBC-OS-v1.04 20.06.2020
1)Fixed cheats engine bug

Did you use the exact same ROM ? (Same CRC32?)

Edit : I reproduce the bug in the EverDrive, the bug is only present when using directly the cheat engine, if I use the ROM my software create to embedded the cheat into the ROM the bug is not present.
It seems that is a bug with EverDrive and not the code I generated, I will try to investigate, maybe I can use the save state feature of the everdrive to dump the actual memory.
« Last Edit: February 25, 2021, 08:42 PM by bestpig »

Offline Titney

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: GameShark To GameGenie v0.1
« Reply #8 on: February 26, 2021, 11:59 AM »
I tested with Balloon Kid and this code.

Code: [Select]
010501D1 (Invincibility P-Balloon)
Generated codes only valid for this version (CRC32 -> d4b655ec)
Code: [Select]
640-41F-C40
000-42F-D5A
F50-64F-E6A
3E0-65F-E6A
050-66F-E6A
EA0-67F-E6A
010-68F-E6A
D10-69F-E6A
F10-6AF-E6A
C30-6BF-E6A
8A0-6CF-E6A
0C0-6DF-E6A

I didn't face any problem, not tested on EverDrive, but with mGBA.
Is you EverDrive OS is up to date ?
The version v1.04 fix a bug in the cheat engine

Code: [Select]
GBC-OS-v1.04 20.06.2020
1)Fixed cheats engine bug

Did you use the exact same ROM ? (Same CRC32?)

Edit : I reproduce the bug in the EverDrive, the bug is only present when using directly the cheat engine, if I use the ROM my software create to embedded the cheat into the ROM the bug is not present.
It seems that is a bug with EverDrive and not the code I generated, I will try to investigate, maybe I can use the save state feature of the everdrive to dump the actual memory.

Thanks for looking into it. Yes, same CRC32 (D4B655EC) tested on EDGB X7 with OS 1.04, using the EDGB cheat engine. But the codes I tried were these ones:
Code: [Select]
Invincibility 010117D1Game Genie from your site:
Code: [Select]
640-41F-C40
000-42F-D5A
F50-64F-E6A
3E0-65F-E6A
010-66F-E6A
EA0-67F-E6A
170-68F-E6A
D10-69F-E6A
F10-6AF-E6A
C30-6BF-E6A
8A0-6CF-E6A
0C0-6DF-E6A

Code: [Select]
Never Lose Balloons 010211D1Game Genie from your site:
Code: [Select]
640-41F-C40
000-42F-D5A
F50-64F-E6A
3E0-65F-E6A
020-66F-E6A
EA0-67F-E6A
110-68F-E6A
D10-69F-E6A
F10-6AF-E6A
C30-6BF-E6A
8A0-6CF-E6A
0C0-6DF-E6A
Same type of graphics corruption at the end of the level with both of these though.

Offline bestpig

  • Newbie
  • *
  • Posts: 13
  • Karma: +1/-0
    • View Profile
Re: GameShark To GameGenie v0.1
« Reply #9 on: February 27, 2021, 08:58 PM »
I modified the website, you can now download the ROM with the cheats integrated into it.
It seems it works correctly with this.

The generated code has been tested in an old EverDrive (non X series) and it works without glitch.
I suspect the handling of the in-game menu that interfere with my custom vblank hook.
I think the in-game menu hook patch the ROM without taking into account the modified ROM with cheat codes.

EDIT: I tried to hook LCDInterrupt instead of VBlankInterrupt and same problem, probably EverDrive, so maybe is overwriting my patch routine and not the interrupt itself.
« Last Edit: February 28, 2021, 03:30 PM by bestpig »

Offline Titney

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: GameShark To GameGenie v0.1
« Reply #10 on: March 01, 2021, 12:48 PM »
I modified the website, you can now download the ROM with the cheats integrated into it.
It seems it works correctly with this.
Cheers, thanks again, both codes I mentioned above seem to work fine on my X7 when patched into the rom.

By the way, would it be possible on your site to add additional Game Genie codes to the patched rom? I tried adding
Code: [Select]
Invincible Against Fire 006-04A-C4Eto the ED cheat file after the converted Game Shark code (Never Lose Balloons
 010211D1) and that seemed to work fine (until the graphic glitching hit.)

Offline bestpig

  • Newbie
  • *
  • Posts: 13
  • Karma: +1/-0
    • View Profile
Re: GameShark To GameGenie v0.1
« Reply #11 on: March 01, 2021, 01:56 PM »
Have you the glitch but if you only use?
Code: [Select]
Invincible Against Fire 006-04A-C4E
Maybe the bug is not what I though, and it is just a bug into the GameGenie cheat engine of the EverDrive.

Offline Titney

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: GameShark To GameGenie v0.1
« Reply #12 on: March 01, 2021, 08:15 PM »
Have you the glitch but if you only use?
Code: [Select]
Invincible Against Fire 006-04A-C4E
Maybe the bug is not what I though, and it is just a bug into the GameGenie cheat engine of the EverDrive.
Tried using just Invincible Against Fire 006-04A-C4E with the ED cheat engine, and it worked fine, no graphic glitching.

Offline bestpig

  • Newbie
  • *
  • Posts: 13
  • Karma: +1/-0
    • View Profile
Re: GameShark To GameGenie v0.1
« Reply #13 on: March 20, 2021, 12:02 PM »
A little presentation about my work.
Explanation of how everything is done if someone is interested.

https://docs.google.com/presentation/d/18QJiQPnl_ZkKEYDkzRUdiGhdQLkWB-7muLSxDUh1q0E/edit?usp=sharing

Offline James Cree

  • Full Member
  • ***
  • Posts: 206
  • Karma: +7/-0
    • View Profile
Re: GameShark To GameGenie v0.1
« Reply #14 on: March 22, 2021, 06:52 PM »
This is a great tool. I'll be sure to try it out.
Thanks for taking the time to make this.  :)