Programming a flash rom via the cart edge connector
Forum rules
- For making cartridges of your Super NES games, see Reproduction.
-
Markfrizb
- Posts: 631
- Joined: Sun Dec 02, 2012 8:17 am
- Location: East Texas
Programming a flash rom via the cart edge connector
Hey group,
I'm wanting to program a tsop flash rom through the cart edge connector. The MAD1 /OE is high and causing programming problems as is. If I lift pin 4 of the mad1, it programs fine. Is there a way to have my programmer assert the mad1 so the OE line is asserted correctly for writing or reading?
The flash rom I'm using is the typical 29F032B on the pcb 36 pin adapter.
Thanks!
Edit: I suppose disabling the SRAM would be prudent for this also.
I'm wanting to program a tsop flash rom through the cart edge connector. The MAD1 /OE is high and causing programming problems as is. If I lift pin 4 of the mad1, it programs fine. Is there a way to have my programmer assert the mad1 so the OE line is asserted correctly for writing or reading?
The flash rom I'm using is the typical 29F032B on the pcb 36 pin adapter.
Thanks!
Edit: I suppose disabling the SRAM would be prudent for this also.
-
RedScorpion
- Posts: 40
- Joined: Mon Mar 15, 2010 4:15 pm
Re: Programming a flash rom via the cart edge connector
Hi,
if i understand you right, you try this?!
https://dl.dropboxusercontent.com/u/197 ... C10248.JPG
Cardrige connectore and soldered tsop adapter on pcb?!
Thanks
red
if i understand you right, you try this?!
https://dl.dropboxusercontent.com/u/197 ... C10248.JPG
Cardrige connectore and soldered tsop adapter on pcb?!
Thanks
red
-
Markfrizb
- Posts: 631
- Joined: Sun Dec 02, 2012 8:17 am
- Location: East Texas
Re: Programming a flash rom via the cart edge connector
Right, i plan to make something similar. But what do you need to do to get the mad1 to not interfere with programming? Mad1 controls the OE line to the flash rom.
-
RedScorpion
- Posts: 40
- Joined: Mon Mar 15, 2010 4:15 pm
Re: Programming a flash rom via the cart edge connector
Hi,
you can solve this problem via bypass:
https://dl.dropboxusercontent.com/u/197 ... apter1.jpg
Its the same for hirom and lorom. You have to change the soldering for hirom and lorom on card adapter.
https://dl.dropboxusercontent.com/u/197 ... apter2.jpg
thanks
red
you can solve this problem via bypass:
https://dl.dropboxusercontent.com/u/197 ... apter1.jpg
Its the same for hirom and lorom. You have to change the soldering for hirom and lorom on card adapter.
https://dl.dropboxusercontent.com/u/197 ... apter2.jpg
thanks
red
-
Markfrizb
- Posts: 631
- Joined: Sun Dec 02, 2012 8:17 am
- Location: East Texas
Re: Programming a flash rom via the cart edge connector
Thank you. But I am not wanting to modify the cart. I have a lot of blank Tsop adapters and I'd like to be able to go ahead and solder them in the cart. Put the case on and when I need it, just pop it in and program it through my EPROM programmer. Think of it as a 1 game flash cart. Don't have to open up the case or do any jumpering. I want to be able to insert cart on the connector and be able to read or program the flash rom through the edge connector. I think there is a way to do it. I have my /WE connected to edge 48 (mask rom pin 35). This pin is not used on lo rom games and not used on hi rom games except extended hi rom games (which wouldn't apply in this case.)
So I have connectivity through the edge connector on all pins except /OE (which the Mad1 controls).
So thank you again.
So I have connectivity through the edge connector on all pins except /OE (which the Mad1 controls).
So thank you again.
-
nocash
- Posts: 1494
- Joined: Fri Feb 24, 2012 12:09 pm
Re: Programming a flash rom via the cart edge connector
MAD1 doesn't connect to /RD and /WR at all, so there is no way how could output signals like /OE or /WE.
Unless you have swapped /OE and /CS (which wouldn't matter for ROM/reads, but it would be fatal for FLASH/writes).
Unless you have swapped /OE and /CS (which wouldn't matter for ROM/reads, but it would be fatal for FLASH/writes).
-
Markfrizb
- Posts: 631
- Joined: Sun Dec 02, 2012 8:17 am
- Location: East Texas
Re: Programming a flash rom via the cart edge connector
Pin4 of MAD1 goes to mask rom pin 33 (/OE), right?
/OE has to go high and low depending on what the game program needs to do.
So why can't I make the mad1 do the same thing from the cart edge?
Again, if I pull the mad1 pin4 leg from the circuit, it'll program (/OE is floating).
So what must I do?
I assume the process for hi rom and lo rom carts will be slightly different.
Edit: just to clarify, the OE line has to go high to program. Low to read.
/OE has to go high and low depending on what the game program needs to do.
So why can't I make the mad1 do the same thing from the cart edge?
Again, if I pull the mad1 pin4 leg from the circuit, it'll program (/OE is floating).
So what must I do?
I assume the process for hi rom and lo rom carts will be slightly different.
Edit: just to clarify, the OE line has to go high to program. Low to read.
-
Markfrizb
- Posts: 631
- Joined: Sun Dec 02, 2012 8:17 am
- Location: East Texas
Re: Programming a flash rom via the cart edge connector
Nevermind. Figured it out.
Edit: Cancel that! :/. I had it working perfectly -- programming and reading but it was a fluke/glitch. Can't get it to work now.
So do I need to toggle A19 and A20?
It's just a decoder so what do I need to do to get it to decode! Even for just a read the rom! The OE line is definitely the issue. Earlier, when I *Thought* I had it working, I thought the SRAM was the problem and when I held reset low (should disable the SRAM), that's when it worked briefly.
The snes can read the rom so why can't I?
Edit: Cancel that! :/. I had it working perfectly -- programming and reading but it was a fluke/glitch. Can't get it to work now.
So do I need to toggle A19 and A20?
It's just a decoder so what do I need to do to get it to decode! Even for just a read the rom! The OE line is definitely the issue. Earlier, when I *Thought* I had it working, I thought the SRAM was the problem and when I held reset low (should disable the SRAM), that's when it worked briefly.
The snes can read the rom so why can't I?
-
sanni
- Posts: 44
- Joined: Sat Jul 20, 2013 2:21 pm
Re: Programming a flash rom via the cart edge connector
If you look at this link, it displays all the possible "configurations" of the mad chip:
- http://www.dbwbp.com/index.php/13-elect ... ruth-table
- http://problemkaputt.de/fullsnes.htm#sn ... tsmadchips
Maybe it can help you find the right combination.
However ...
According to the 29F032 datasheet you need it like this for programming:
CE LOW
OE HIGH
WE LOW
RST HIGH
And like this for reading:
CE LOW
OE LOW
WE HIGH
RST HIGH
And on your standard hirom board like 1J3M-20, WE is connected to 5V all the time. So you can't pull it low and therefore can't write to the flashrom.
So you need to disconnect WE on the TSOP to SNES adapter board and attach it directly to the programmer to flash it.
- http://www.dbwbp.com/index.php/13-elect ... ruth-table
- http://problemkaputt.de/fullsnes.htm#sn ... tsmadchips
Maybe it can help you find the right combination.
However ...
According to the 29F032 datasheet you need it like this for programming:
CE LOW
OE HIGH
WE LOW
RST HIGH
And like this for reading:
CE LOW
OE LOW
WE HIGH
RST HIGH
And on your standard hirom board like 1J3M-20, WE is connected to 5V all the time. So you can't pull it low and therefore can't write to the flashrom.
So you need to disconnect WE on the TSOP to SNES adapter board and attach it directly to the programmer to flash it.
-
Overload
- Posts: 47
- Joined: Mon May 30, 2011 4:38 pm
- Location: Australia
Re: Programming a flash rom via the cart edge connector
rom_enable = A15 | A22;
-
tepples
- Posts: 22993
- Joined: Sun Sep 19, 2004 11:12 pm
- Location: NE Indiana, USA (NTSC)
Re: Programming a flash rom via the cart edge connector
Wouldn't that enable the ROM even while the CPU is accessing internal RAM at $7E0000-$7FFFFF, causing a bus conflict? I thought that was why the cart edge included a /ROMSEL signal.
-
qwertymodo
- Posts: 775
- Joined: Mon Jul 02, 2012 7:46 am
Re: Programming a flash rom via the cart edge connector
Make your own TSOP adapter and switch /CE and /OE. For some reason, Nintendo chose to feed what should have been the ROM /CE signal into the /OE pin, and vice versa (or sometimes just grounded /CE and then connected the ROM /CE to the chip's /OE pin). It works fine for MaskROMs because they truly are read-only, but it makes it really annoying to do what you want to do. I ran into the same headache trying to do the same thing with a Cx4 cart.
-
Markfrizb
- Posts: 631
- Joined: Sun Dec 02, 2012 8:17 am
- Location: East Texas
Re: Programming a flash rom via the cart edge connector
Thanks for all the replies! I am still trying to wrap my head around how the mad1 works and why.
I'll try some of the suggestions soon. Swapping the OE and CE is a pretty good idea! Wish I had thought of this a few years ago. I had a large batch of tsop adapters made back then when I truly didn't know what I was doing. Back then, I *thought* pin 35 of the mask rom wasn't used so I used it as my pathway for my programmer to access the /WE pin (/WE is also pulled high via a pull up resistor). But, it seems it's also a good thing in that it still provides a pathway through the cart edge connector for what I want to do. Anyways.... I'll have to work with what I got. Worst case scenario, I'll just have to disconnect the OE (pin 33) from my adapter to reprogram. But it's nice to know that I won't have to unsolder the whole rom/adapter to reprogram in-circuit.
I really was hoping to mount the adapters (as they are) and close up the shell, program/reprogram as needed. I'll keep trying to see if there is a way using the Mad1 inputs. Mad1 pin 4 has to be able to go high...
I'll try some of the suggestions soon. Swapping the OE and CE is a pretty good idea! Wish I had thought of this a few years ago. I had a large batch of tsop adapters made back then when I truly didn't know what I was doing. Back then, I *thought* pin 35 of the mask rom wasn't used so I used it as my pathway for my programmer to access the /WE pin (/WE is also pulled high via a pull up resistor). But, it seems it's also a good thing in that it still provides a pathway through the cart edge connector for what I want to do. Anyways.... I'll have to work with what I got. Worst case scenario, I'll just have to disconnect the OE (pin 33) from my adapter to reprogram. But it's nice to know that I won't have to unsolder the whole rom/adapter to reprogram in-circuit.
I really was hoping to mount the adapters (as they are) and close up the shell, program/reprogram as needed. I'll keep trying to see if there is a way using the Mad1 inputs. Mad1 pin 4 has to be able to go high...
-
qwertymodo
- Posts: 775
- Joined: Mon Jul 02, 2012 7:46 am
Re: Programming a flash rom via the cart edge connector
I'm not 100% sure on what I said about swapping /OE and /CE, I just remember that being an issue on the Cx4. If you wanted to confirm that was the issue, the fastest way to do it would be to hook up a logic analyzer to the /OE and /CE signals on the ROM and try reading and writing to the cart edge in the ROM address space. During a read, /CE (the real /CE signal, regardless of which pin it's connected to) should go low and stay low while /OE (again, the real /OE) should toggle for each read. Then, when you try to write, /CE should go low and /OE should go high. If I'm right, you'll see the signals swapped, and it's that second part, where /OE going high is actually driving /CE high instead, that makes writing impossible. Also, you'll probably have to connect the ROM /WE pin to pin 54 on the cart edge, since there is no /WE signal going to the ROM normally.