Patch a single byte on ROM

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

Moderator: Moderators

Post Reply
User avatar
Fisher
Posts: 1249
Joined: Sat Jul 04, 2015 9:58 am
Location: -29.794229 -55.795374

Patch a single byte on ROM

Post by Fisher »

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: Select all

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.
User avatar
dougeff
Posts: 3078
Joined: Fri May 08, 2015 7:17 pm

Re: Patch a single byte on ROM

Post by dougeff »

Game genie.
nesdoug.com -- blog/tutorial on programming for the NES
lidnariq
Posts: 11429
Joined: Sun Apr 13, 2008 11:12 am

Re: Patch a single byte on ROM

Post by lidnariq »

Fisher wrote:

Code: Select all

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...
User avatar
Memblers
Site Admin
Posts: 4044
Joined: Mon Sep 20, 2004 6:04 am
Location: Indianapolis
Contact:

Re: Patch a single byte on ROM

Post by Memblers »

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
User avatar
Fisher
Posts: 1249
Joined: Sat Jul 04, 2015 9:58 am
Location: -29.794229 -55.795374

Re: Patch a single byte on ROM

Post by Fisher »

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:
Post Reply