Game Genie - when it compares memory value for replacement?

Discuss hardware-related topics, such as development cartridges, CopyNES, PowerPak, EPROMs, or whatever.

Moderator: Moderators

User avatar
krzysiobal
Posts: 1037
Joined: Sun Jun 12, 2011 12:06 pm
Location: Poland
Contact:

Game Genie - when it compares memory value for replacement?

Post by krzysiobal »

I am in a way of building KrzysioGenie - an utility cartridge which will offer features of Game Genie (modyfying ROM value - for example in order to cheat) and Action Replay (save/load game state into micro SD card).
Image Image Image Image Image

When I first read about the idea how Gallob's Game Genie works, it looked amazingly simple & briliant to me.
I rev-ed its PCB: Image
Those resistor between gallob's data bus and cpu data bus are quite weird to me, but maybe gallob's data bus is not tristate and that's the reason.

However, the process of replacing memory value WHEN DATA COMPARISION IS TURNED ON is unclear to me. What is unclear is when Game Genie's chip detect that there is right moment to read CPU's data & address bus and if they match, turn off cartridge's PRG-ROM and put his own value on data bus?

*1. It can't do that on falling edge of ROMSEL because cartridge's PRG-ROM has not placed data on the bus yet
*2. It can't do that on rising edge of ROMSEL because even if it put his own value on data bus and disabled cartridge's PRG-ROM memory, it would take tens of ns for the memory to turn off, but CPU fetches data almost immediatelly after falling edge of M2 (and rising of ROMSEL) so it would fetch garbage,
*3. it can't do that asynchronously when ROMSEL is low because there data bus is unstable and it could detect transient state on data bus as a final data and start process of replacing it,
*4. it also can't do that after some fixed amount of time after falling edge of ROMSEL because there is no external timer components (R/C) nor faster crystal oscillator, but maybe they are inside gallob's chip?

Or maybe it does 2) and the aim of the resistor is to minimize current flow upon bus conflict (when memory hasn't fully turn off yet but game genie put its values on?)
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: Game Genie - when it compares memory value for replaceme

Post by lidnariq »

The functionality of the NES Game Genie is described by expired US patent 5112051 ... it looks like the data comparison is an asynchronous process.
User avatar
Myask
Posts: 965
Joined: Sat Jul 12, 2014 3:04 pm

Re: Game Genie - when it compares memory value for replaceme

Post by Myask »

[quote="krzysiobal]I am in a way of building KrzysioGenie - an utility cartridge which will offer features of Game Genie (modyfying ROM value - for example in order to cheat) and Action Replay (save/load game state into micro SD card).[/quote]
How do you intend to register the mapper, for knowing what to watch for to save and restore bankregs, etc.?
User avatar
krzysiobal
Posts: 1037
Joined: Sun Jun 12, 2011 12:06 pm
Location: Poland
Contact:

Re: Game Genie - when it compares memory value for replaceme

Post by krzysiobal »

1. GameGenie can calculate crc of $e000-$ffff which is almost always tied to some known bank at powerup of every mapper and then check into hardcoded database what mapper is that,
or
2. if crc does not match any known game, user can chose mapper from list.
User avatar
thefox
Posts: 3134
Joined: Mon Jan 03, 2005 10:36 am
Location: 🇫🇮
Contact:

Re: Game Genie - when it compares memory value for replaceme

Post by thefox »

3. You should be able to detect most mappers by probing the registers and checking what happens.
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi
User avatar
Memblers
Site Admin
Posts: 4044
Joined: Mon Sep 20, 2004 6:04 am
Location: Indianapolis
Contact:

Re: Game Genie - when it compares memory value for replaceme

Post by Memblers »

I don't have any good answer to the question, but I wanted to say this project looks awesome. Game Genie is one of my favorite hardware devices of any kind, so it's really cool to see a more modernized one coming to the Famicom. I'm working on a similar type of device, but I took the path of having 2 fully separate data buses on the logic, so it flows through it.

You've probably also thought of Pro Action Replay codes, too (Game Action Replay is the savestate one). But if not, the PAR I think it just takes over the NMI vector, then you can run your own code to force a variable to be whatever value.

I also was thinking the $E000-$FFFF CRC should work well enough, but there's a good amount of games that do start with a random 32kB bank (including a certain revision of MMC1). So the most compatible way would be to either:
A) detect the mapper first, then set it to the last bank, and then CRC.
or
B) have a CRC match for every possible startup bank, if you don't mind growing the comparison list.
User avatar
B00daW
Posts: 586
Joined: Thu Jan 03, 2008 1:48 pm

Re: Game Genie - when it compares memory value for replaceme

Post by B00daW »

Do you pronounce it "KshissioGenie" ?
User avatar
Bregalad
Posts: 8056
Joined: Fri Nov 12, 2004 2:49 pm
Location: Divonne-les-bains, France

Re: Game Genie - when it compares memory value for replaceme

Post by Bregalad »

B00daW wrote:Do you pronounce it "KshissioGenie" ?
Polish rz is normally pronounced "j", but becomes "sh" after voiceless consonants.
Polish Y is between i and e, but I find it to be closer to e.
So it's pronunced ksheshio-genie.

I still wonder wether the "g" is supposed to be plosive (german/polish style) as in "game" or affricate (english/french style) as in "giant". Since "genie" is a valud word in all those languages pronounced differently we can't know for sure.
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Game Genie - when it compares memory value for replaceme

Post by tepples »

Anyone who has watched Disney's Aladdin with English audio would know "genie" keeps the affricate pronunication of Arabic "djinn". Thus it's the "soft" G as in ゲームジニー (geemu-jinii).
User avatar
Bregalad
Posts: 8056
Joined: Fri Nov 12, 2004 2:49 pm
Location: Divonne-les-bains, France

Re: Game Genie - when it compares memory value for replaceme

Post by Bregalad »

tepples wrote:Anyone who has watched Disney's Aladdin with English audio would know "genie" keeps the affricate pronunication of Arabic "djinn".
Does this means that Djins from the game series Golden Sun on GBA are actually Genies ?
User avatar
rainwarrior
Posts: 8732
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Game Genie - when it compares memory value for replaceme

Post by rainwarrior »

Bregalad wrote:Does this means that Djins from the game series Golden Sun on GBA are actually Genies ?
"djinn" and "genie" should normally be synonyms, I believe.

Even though the Golden Sun ones don't look like the stereotypical genie, they seem to have the "elemental spirit" idea that djinn are usually associated with in RPG/Fantasy?
User avatar
Fisher
Posts: 1249
Joined: Sat Jul 04, 2015 9:58 am
Location: -29.794229 -55.795374

Re: Game Genie - when it compares memory value for replaceme

Post by Fisher »

Interesting...
For me, genie, djin and genius were synonymous.
Maybe it's because my mother language. :roll:
Now with a little research, seems that genie is the good guy, djin is the bad guy and genius is the smart guy.
It may be a wrong assumption, at least the genie vs djin part.
User avatar
Bregalad
Posts: 8056
Joined: Fri Nov 12, 2004 2:49 pm
Location: Divonne-les-bains, France

Re: Game Genie - when it compares memory value for replaceme

Post by Bregalad »

Fisher wrote:Interesting...
For me, genie, djin and genius were synonymous.
Maybe it's because my mother language. :roll:
Now with a little research, seems that genie is the good guy, djin is the bad guy and genius is the smart guy.
It may be a wrong assumption, at least the genie vs djin part.
Genius is just the english equivalent of Gernie in the other languages. Djin seems to be the arabic equivalent.
zombie343
Posts: 8
Joined: Wed Feb 04, 2015 12:16 am

Re: Game Genie - when it compares memory value for replacement?

Post by zombie343 »

Apologies for the necro post, but this is just too good to pass up. Is this available? Did develop just stop or was Kryz able to get passed this hurdle?
Post Reply