Patch a single byte on ROM

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
Patch a single byte on ROM
by on (#226450)
I'm thinking about how to patch a single byte on a ROM.
The idea is to use diodes on the Address bus to set the address to be patched.
Them make a latch active wich have the data to be patched.
Probably I should disable the ROM when the address is matched.
Code:
Address Bus
A1 --->|--+
A2 ---|<--+
       .  |
       .  |Data Bus D0 ............D7
       .  |         |_|_|_|_|_|_|_|
AN --->|--+--/\/\---|CE   LATCH   |
                    ---------------
                    | | | | | | | |
   Patched Data     D0 ...........D7
                    | |...........| 
                   GND...........Vcc

I know this probably is a stupid idea, but I'm asking if this can work.
If not, what is the propper way to doing it?
Maybe I should use a multi input/cascated AND or NAND gates, but the diodes are easier for me to get.
Also, what value should I use for the resistor? (if it's not a completelly bad idea)
Thanks in advance.
Re: Patch a single byte on ROM
by on (#226452)
Game genie.
Re: Patch a single byte on ROM
by on (#226454)
Fisher wrote:
Code:
Address Bus
A1 --->|--+
A2 ---|<--+
That can't work. If A1 is high, it'll pull the common node high. If A2 is low, it'll pull the common node low. What happens when both are true?

If you start with diode-resistor logic like this, you have to break it into two halves: all of the ones that must be high (making an enormous AND gate: +CE1) and all of the ones that must be low (an enormous OR gate, -CE2), and only then combine those two to detect when to add the patch.

You could use diode logic for the output stage too, if you want. Once you have combined +CE1 and -CE2 you can use them to generate +OE and -OE: when +OE is high diodes from it can pull parts of the data bus high, and when -OE is low it can pull parts of the data bus low.

Otherwise, you're looking at a combination of simple logic like 74'138s, 74'133s, 74'4078; or obsolete digital address comparators like 74'518s, 74'460...
Re: Patch a single byte on ROM
by on (#226455)
I know you can make AND and OR gates with diodes, but I don't know enough to say how to make it work as shown, though.

Check out Game Genie patent US5112051A, it has some pretty nice schematics.
https://patents.google.com/patent/US5112051A/en
Re: Patch a single byte on ROM
by on (#226466)
Thanks!
I tought the address decoding logic almost certainly was flawed, now I know why. :-)

A Game Genie would be nice, a memory exchange too, but I want to try to find something automatic and easier to revert than a full ROM swap, if needed.

I'll study the schematics and see if I can hink of some simple circuit to do that. :wink: