nesdev.com
https://forums.nesdev.com/

Game Genie - when it compares memory value for replacement?
https://forums.nesdev.com/viewtopic.php?f=9&t=16459
Page 1 of 1

Author:  krzysiobal [ Wed Sep 06, 2017 3:25 pm ]
Post subject:  Game Genie - when it compares memory value for replacement?

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?)

Author:  lidnariq [ Wed Sep 06, 2017 3:57 pm ]
Post subject:  Re: Game Genie - when it compares memory value for replaceme

The functionality of the NES Game Genie is described by expired US patent 5112051 ... it looks like the data comparison is an asynchronous process.

Author:  Myask [ Fri Sep 08, 2017 12:00 pm ]
Post subject:  Re: Game Genie - when it compares memory value for replaceme

[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.?

Author:  krzysiobal [ Fri Sep 08, 2017 12:15 pm ]
Post subject:  Re: Game Genie - when it compares memory value for replaceme

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.

Author:  thefox [ Fri Sep 08, 2017 12:34 pm ]
Post subject:  Re: Game Genie - when it compares memory value for replaceme

3. You should be able to detect most mappers by probing the registers and checking what happens.

Author:  Memblers [ Fri Sep 08, 2017 7:42 pm ]
Post subject:  Re: Game Genie - when it compares memory value for replaceme

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.

Author:  B00daW [ Sat Sep 16, 2017 1:38 pm ]
Post subject:  Re: Game Genie - when it compares memory value for replaceme

Do you pronounce it "KshissioGenie" ?

Author:  Bregalad [ Sat Sep 16, 2017 3:23 pm ]
Post subject:  Re: Game Genie - when it compares memory value for replaceme

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.

Author:  tepples [ Sat Sep 16, 2017 3:41 pm ]
Post subject:  Re: Game Genie - when it compares memory value for replaceme

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).

Author:  Bregalad [ Mon Sep 18, 2017 3:53 am ]
Post subject:  Re: Game Genie - when it compares memory value for replaceme

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 ?

Author:  rainwarrior [ Mon Sep 18, 2017 12:57 pm ]
Post subject:  Re: Game Genie - when it compares memory value for replaceme

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?

Author:  Fisher [ Mon Sep 18, 2017 6:58 pm ]
Post subject:  Re: Game Genie - when it compares memory value for replaceme

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.

Author:  lidnariq [ Mon Sep 18, 2017 7:21 pm ]
Post subject:  Re: Game Genie - when it compares memory value for replaceme

They're all the same etymology.
https://en.wiktionary.org/wiki/genius#Etymology
https://en.wiktionary.org/wiki/jinn#Etymology

Author:  Bregalad [ Mon Sep 18, 2017 11:16 pm ]
Post subject:  Re: Game Genie - when it compares memory value for replaceme

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.

Page 1 of 1 All times are UTC - 7 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/