Sega Master System / Mark III / Game Gear|
SG-1000 / SC-3000 / SF-7000 / OMV
Home - Forums - Games - Scans - Maps - Cheats
Music - Videos - Development - Translations - Homebrew
AT29C256 EPROM won't run on SMSPosted: Fri Aug 26, 2011 3:05 pm
To test out the wiring adapter I've made for prototyping, I decided to first try just with a 32K EPROM - basically the same thing as this here except in my case I am not using a PCB for the IC directly, I have run wires to a breadboard, where the EPROM sits.
I programmed the AT29C256 with my Willem 5.0, with apparently no errors.
However when I hook it up to my SMS it does nothing. By that I mean the SMS just loads Alex Kidd straight from the internal ROM.
I have re-checked all my wiring for errors and good connection, and found no problems.
I also have a couple of capacitors across 5v and GND, just as the cartridge has. However I did not have an 0.022uF ceramic so used 2x 0.01uF instead, but I doubt that is a problem.
The only thing I managed to do was that I found that if I disconnected the /CE pin then the SMS just displays a blank black screen and does not boot.
Currently I am wondering if it could be:
a) EPROM AT29C256 is incompatible with SMS somehow (The blog site mentioned he used 27C256)
b) I burned the file wrongly somehow, or it is incorrect. I used first a downloaded ROM dump of "Trans-Bot" and when that did not work, a copy of "Hang On"
Can anyone help with this?
||Posted: Sun Aug 28, 2011 4:41 am|
Took my Hang-On cartridge, removed the ROM and put it in the breadboard.
It actually did something: displayed "Software error"
It still worked in the Sega PCB, so I took a guess and placed one of the 0.1uF ceramics right across the pins of the ROM. (previously they were on the sides of the board)
Hang-On (Sega ROM) booted fine!
The AT29C256 Hang-On copy however still doesn't work in the breadboard, even with the moved capacitor.
Any suggestions on how to fix the issue or at least determine what the issue actually is?
EDIT: Maybe there is some incompatibility or issue with the AT29C256. I managed to get it working ONCE in the Sega PCB. I power cycled 3 times to test and each time it came up just fine. However after swapping boards around etc it hasn't worked since.
The AT29C256 still reads and writes fine on my Willem, so I don't know what's going on there.
As far as I know other people have used Flash EPROMs in their custom cartridges etc without issue.
||Posted: Sun Aug 28, 2011 3:19 pm|
A couple of things:
The 0.1uF capacitor goes between the +5V and ground pins of the AT29C256 and should be as close to the chip as possible. I'd put another one on the breadboard itself diagonally across the chip. The old one on the PCB won't cause any problems, you can leave it in place.
You need to use the shortest wires you can manage to connect the chip to the PCB. Most console-to-breadboard issues come from using 10 inch long wires or something like that.
It wasn't clear to me entirely, but I would make sure you are using these connections:
AT29C256 CE# - From cartridge slot SLOT-CE#
AT29C256 OE# - From cartridge slot RD#
AT29C256 WE# - From cartridge slot WR#, but for initial troubleshooting I'd just tie it high.
||Posted: Sun Aug 28, 2011 10:48 pm|
When I got the Sega ROM working on the breadboard, I did have the capacitor directly across the power pins, diagonally. Without it (in that position) I would get 'Software Error' message.
But, I'm not using my Hang-On cartridge as an adapter to connect to the breadboard. I made my own PCB and ran some solid core ethernet cable to the breadboard.
(Yes the cables should probably be shorter)
Currently I am using the pinout as done here
Connections are thus:
AT29C256 CE# - From cartridge slot SLOT-CE#
AT29C256 OE# - From cartridge slot M0-7#
AT29C256 WE# - From cartridge slot WR#
He's got the 27C256B but the pinout is the same as AT29C256 except for pin 1 which is /WE on mine and Vpp on his.
What confuses me most is that the AT29C256 doesn't work in my Sega PCB, even though on his website plugging the 27C256B into the PCB apparently works just fine.
(I'm not actually sure any more if the AT29C256 ever worked in the Sega PCB, I was swapping the chips around so much I may have confused them, and what I thought was the AT29C256 working was actually the Sega ROM. I don't know. But I think we can safely say it is not working at the moment.)
EDIT: Just tried swapping M0-7# with RD# - In that configuration the console hangs at the SEGA logo.
Stupid question, but do I need a resistor for pulling /WR high or just connect directly?
||Posted: Tue Nov 15, 2011 10:28 pm|
This is interesting. After waiting 6 weeks to get my hands on an EPROM eraser from eBay, I tried the thing out again with an NM27C256.
Result: The older EPROM boots perfectly in the official Hang-On cartridge but generated "Software Error" on my ridiculous adapter.
So the results are:
Original SEGA Mask ROM = Works in Official Board, Works in breadboard (with decoupling capacitor)
Copied NM27C256 UV EPROM = Works in Official Board, Error on breadboard (even with decoupling capacitor)
Copied AT29C256 Flash EEPROM = Doesn't work at all on Official Board or breadboard. (even with decoupling capacitor)
Could it be an age difference? The AT29C256 is too new? Access timings are wrong? perhaps the AT29C256s are just faulty (they were 2nd hand - but then so were the NM27C256s)
Has anyone used a newer Flash EEPROM successfully?
||Posted: Wed Nov 23, 2011 8:58 am|
Hi. I took a look at the datasheet for the AT29C256 and it appears to be pin compatible apart from pin 1 (/WR).
No resistor required. Just run a line from the +5v connection (pin 28) on the cartridge to pin 1 (/WR) on the breadboard / flash chip. You should always keep that high. If it drops low then the output from the chip may be disabled totally. That *could* be the reason that the Flash chip doesn't work when attached directly to your PCB - take a look at your PCB and see what is wired up to that pin 1. If it isn't attached to anything, then the value may float causing problems. And if it is attached to GND then the chip will be locked with /WE low which will probably kill the chip output.
I have tried Flash chips with the Sega SC-3000 Multicart. They were AMD29F040B 4MBit Flash chips, but the underlying principle is the same, and the voltage levels and performance of the system as a whole should be quite similar to the master system. Most of my work has been done with 27C801 EPROMs though. But in general they all seem to mix and match quite nicely with the Z80.
I doubt that memory timing is an issue. The Z80 will work quite happily with 150ns memory parts, and it looks like the AT29C256 is 70ns. And if you can write a binary file to them, read it back, then do a file compare and the result is identical then it is probably working fine. Note - my programmer recently blew up. I initially thought it was the chips, but I tracked it back to the programmer by doing just that - reading back a known good EPROM and comparing it to the original binary file.
From reading your previous posts I assume that you have put a socket on the cartridge, then run some wires out to a breadboard, correct? That definitely works in general - take a look at the attached picture from when I was developing my SC-3000 Multicart. Is this something like what you have done?
The cart I used was a Basic IIIB SC-3000 cart with 4 DRAM chips on it plus 3 support ICs. So if you can get something as complex as that to work with the breadboard, then a simpler donor cart should be a breeze :)
From memory here are some of the things I ran into / rules I followed when working with the breadboard:
1. My cheap eBay breadboards were faulty. They are supposed to have a common rail running along the top and the bottom. But the connections were inconsistent on at least one of them. If you are getting weird results on the breadboard, then check the point to point connections with a multimeter and by poking a couple of exposed wires into the breadboard holes to make sure the breadboard works like it is supposed to.
2. Be prepared to stick a 0.1uF (100nF) ceramic decoupling capacitor between the +5v and GND pins on every IC on the breadboard, but especially the ROM / Flash chip. It is possible you can remove them later if the circuit performs reliably without them, but stick them in there automatically each time you add an IC.
3. If you are sticking lots of support ICs on the breadboard, then think about running extra +5v and GND lines from the PCB. I seemed to have trouble when daisy chaining too many things off a single GND or +5v line.
4. I tried to keep the wires as short as possible, and I tried to use wires of even length where possible, especially for the main feeds from the cart socket to the breadboard
5. Some chip types may be a bit more sensitive to noise than others. For instance I seem to recall that an AMD27C040 (4MBit EPROM) I used at one stage didn't work as reliably as the ST27C801 (8MBit EPROM from ST Micro) on my original breadboard testing with the Mk I DIP switch based multicart.
6. When in doubt, test and retest your connections from the PCB to the breadboard with a multimeter / continuity tester (ie. something that goes beep when there is a good connection). Then think carefully about your circuit design and whether you have the wires where they are supposed to be. Then recheck your connections with the multimeter again.
7. Check the contents of your Flash Chip / EPROM by reading it back and doing a binary file compare to the original image you wrote to the chip.
I hope you find some of that useful.
Can you stick up any photos of your setup? There may be something obvious we can spot from looking at it.
Good luck :)
||Posted: Wed Nov 23, 2011 9:30 am|
Arrgh! I wrote a lovely reply and the forum trashed it :( Oh well, here goes again!
Thanks for your informative post!
I initially used a setup on breadboard similar to the one you posted but much simpler - just the EEPROM and decoupling capacitors.
However, since it gave me issues and as someone else pointed out the lines were probably far too long I gave up on it mostly.
So instead, I took an official cartridge and desoldered the ROM, and added a socket.
Basically the same as what was done by this person on this blog. (the forum has issues with the link if posted as-is)
In that PCB, the NMC27C256 works great but the AT29C256s totally fail - not even a "software error" message.
According to the blog, /WR pin on the EEPROM is connected to the console's /WR line with that PCB layout, so I think it should be OK (if they both mean the same thing!)
I could try tying the pin high of course, and seeing what happens though.
My programmer verifies all writes and as far as I recall nothing wrong happened. But if the EEPROM was faulty perhaps the problem only showed up after a time. I will try verifying them again and see if there is a difference now.
I don't think the programmer is faulty, it's fairly new and has had no problems with anything else.
||Posted: Wed Nov 23, 2011 8:18 pm|
I took a look at the photos and yes, that appears to be correct. I assume you are using *exactly* the same board?
Ideally you still want that /WR pin tied high as you can never write to the Flash chip, so forcing it high removes one possible source of error. I *assume* that /WR drops low whenever the SMS does a memory write, so that will probably trigger periodically. And when it does the behaviour of the Flash chip may be unpredictable as it is designed to look for a certain sequence of commands at the other pins when /WR is low. But I wouldn't have thought that would stop the chip from working though as on my local testing Flash chips (different make / manufacturer) still output data ok when /WR is high.
If you want to tie that /WR pin 1 high, then all you need to do is to cut the trace on the PCB with a craft knife near where it meets the pin on the underside of the PCB then solder a wire from pin 28 / +5v to pin 1. You can fix / reverse it later.
Agreed. Just run a couple of read / write tests with a binary compare of the resulting read against the original file on different chips and if they check out then assume the programmer is good. But it pays to eliminate that as a possibility. My Top853 Programmer was only a few months old when it malfunctioned.
You could try to create your own troubleshooting 'Hello World' program using the WLA-DX assembler. If you make it real simple then that eliminates possible issues with the code in the ROM image you are using doing something odd. Maxim has an excellent tutorial at http://www.smspower.org/maxim/HowToProgram/Lesson1
You could also be extra paranoid and wire yet another 0.1uF / 100nF ceramic capacitor across between pin 28 +5v and pin 14 GND in case the one on the PCB isn't working properly.
If it is just one chip you are having trouble with, then check the pins on the chip are nice and clean and are making good contact with the socket. You may want to use a multimeter in continuity mode to touch one end on the pin on the chip when seated in the socket and the other end on the PCB edge contact that pin is supposed to be attached to. That should eliminate mechanical connection problems. Just make sure to ground yourself before you start touching the pins.
... and that just about exhausts my ideas, sorry :)
In any case, you have a working technique with the EPROMs now, so decide whether you want to keep troubleshooting the AT29C256, or just use the EPROMs. Unless you're genuinely interested in solving the problem, I'd admit defeat and use the EPROMs ;)
||Posted: Wed Nov 30, 2011 8:32 am|
Not the same game (World Grand Prix) - mine is Hang On - but from the photos the boards are identical.
I'll check all those things you mentioned and try tying the EEPROM /WR pin directly to +5v
If all that doesn't work, then I'll probably give up and assume the EEPROMs are faulty somehow.
Would be nice if the EEPROMs did work though - they erase faster ;)
||Posted: Sun May 27, 2012 9:50 am|
Since the /WR pin on the EEPROM has a different function to the /WR pin on the cartridge connector, I believe this modification is necessary. I wonder whether it was also sufficient to fix Agent24's problem?
Note that to go along with the blog post mentioned originally, there is now an update suggesting that the pin be tied to +5v even when using a traditional EPROM.
||Posted: Sun May 27, 2012 11:46 pm|
If I remember, I tried pretty much everything and just couldn't get those EEPROMs to work. The older UV-Erase NM27C256s are just fine though.
But thanks for reminding me about this! I'll try to buy a brand new Flash EEPROM next time I order parts, and see what happens. I don't trust the ones I have since the others work.
||Posted: Mon May 28, 2012 7:59 am|
|!WR has to be tied to 5V in all cases, unless you plan to write to the cart in the console itself.|
||Posted: Wed Jun 20, 2012 7:47 am|
Yes, this ended up being the problem, it seems. I must have forgotten to try it for some reason. Oh dear.
With Pin 1 of the AT29C256s attached to Vcc, there is no issue, works just as well as the old UV ones.
But that's odd, since the UV ones worked even when their Vpp pin was connected to !WR line and not Vcc.
||Posted: Wed Jun 20, 2012 8:40 am|
|Vpp won't have any effect unless its at about 11.5V :P|
||Posted: Wed Jun 20, 2012 11:28 am|
Well, for programming, of course not.
But in the datasheet for the ones I used at least, it says Vpp must be at 5v when reading from the EPROM.