EverDrive Forum

General => EverDrive GB => Topic started by: bestpig on February 22, 2021, 12:03 AM

Title: GameShark To GameGenie v0.1
Post by: bestpig 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://i.ibb.co/RB6cRtV/gs2gg.png)

https://www.bestpig.fr/gs2gg/ (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 (https://docs.google.com/presentation/d/18QJiQPnl_ZkKEYDkzRUdiGhdQLkWB-7muLSxDUh1q0E/edit?usp=sharing)

BestPig
Title: Re: GameShark To GameGenie v0.1
Post by: Richardragon87 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.
Title: Re: GameShark To GameGenie v0.1
Post by: bestpig 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.
Title: Re: GameShark To GameGenie v0.1
Post by: Richardragon87 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.
Title: Re: GameShark To GameGenie v0.1
Post by: bestpig 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.
Title: Re: GameShark To GameGenie v0.1
Post by: Richardragon87 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.
Title: Re: GameShark To GameGenie v0.1
Post by: Titney 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.
Title: Re: GameShark To GameGenie v0.1
Post by: bestpig 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.
Title: Re: GameShark To GameGenie v0.1
Post by: Titney 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.
Title: Re: GameShark To GameGenie v0.1
Post by: bestpig 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.
Title: Re: GameShark To GameGenie v0.1
Post by: Titney 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.)
Title: Re: GameShark To GameGenie v0.1
Post by: bestpig 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.
Title: Re: GameShark To GameGenie v0.1
Post by: Titney 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.
Title: Re: GameShark To GameGenie v0.1
Post by: bestpig 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 (https://docs.google.com/presentation/d/18QJiQPnl_ZkKEYDkzRUdiGhdQLkWB-7muLSxDUh1q0E/edit?usp=sharing)
Title: Re: GameShark To GameGenie v0.1
Post by: James Cree 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.  :)
Title: Re: GameShark To GameGenie v0.1
Post by: uniplast21 on April 07, 2021, 03:43 AM
What about codes that start with a "9"? I'm trying to use your converter to convert these cheats for Pokemon Pinball:

91FFA4D4
91FFA3D4
91FFA2D4
91FFA1D4

They're GS codes that give you infinite "ball saver", but your converter keeps saying that they're not GS codes.
Title: Re: GameShark To GameGenie v0.1
Post by: bestpig on April 10, 2021, 11:14 AM
I didn't know that was possible :O.

After some research it seems that those patches need a memory bank change.
I will try to implements it.
Title: Re: GameShark To GameGenie v0.1
Post by: bestpig on April 10, 2021, 12:46 PM
It should be working now but code starting with 9 generate a lot of GameGenie codes and will not be usable on EverDrive.
But if you download the patched ROM it should work on the EverDrive.

I only test with the "Pok├ęball Modifier" code, but it's a code that starts with 9.
Title: Re: GameShark To GameGenie v0.1
Post by: uniplast21 on April 11, 2021, 03:15 AM
Wow you're right, that is a lot of codes. Unfortunately, my Everdrive GB X7 can't implement that many at a time. However, I can still use it with a patched rom, which works perfectly!. I've been wanting this particular code for a while, and now I have it thanks to you! The only problem I now face is the fact that the "ball saver" has to expire in order for you to end the game. This code prevents that. I did find a workaround, though. I just need to save the game, rename the save file to match the file name of an unpatched copy, and then load and play the game that way without any cheats.

Anyways, thank you so much for this utility! You've done an excellent job with it  ;D
Title: Re: GameShark To GameGenie v0.1
Post by: OliverDavis on April 17, 2021, 10:15 AM
Wow this is great and very convenient!Thank you.