Arduino In-Circuit Tester: Build Project

Arcadenut

User
Credits
314CR
wondras said:
All the pieces are in the Atari schematics and the ER2055 datasheet, it just takes a little puzzling to fit them together. Fortnately, Atari used the same interface hardware for it in every game I've looked at. It appears to the CPU as three memory addresses:

- EAADDR (also called EAWRITE) is a base address plus a six-bit offset. Writing to it sets a latch that holds the EAROM's address lines to select which of the 64 bytes you want to read or write. It also latches the data bus, which is used for write operations.

- EACONTROL is a latch that sets the state of the EAROM's chip select, clock, and two control pins that select READ, ERASE, or WRITE mode. (An ERASE is required before you can WRITE.)

- EAREAD enables a buffer that puts the EAROM data on the CPU bus

The datasheet gives the exact steps and timings, but basically you:

[list type=decimal][*]Set the address and data by writing to EAADDR[*]Activate the EAROM in the correct mode by writing to EACONTROL. [*]For reads, use EACONTROL to send a clock pulse, then get the data by reading from EAREAD.[*]Set the chip back to idle via EACONTROL.[/list type=decimal]

Doing this remotely via serial commands might be an issue. Erase and write cycles are supposed to be 50-200 milliseconds, and I'm not sure how fussy it is about this. (I suspect Atari used the NMI timer to get such long delays without blocking the on-screen activity.) Reading should be fine, though; you can get the data anywhere from 2 microseconds to 30 seconds after the clock pulse.)

It's also worth mentioning that the EAROM is only rated for 1 million writes total, so it's good to avoid unnecessary writes.

I'll let you know when the code for it is available. You could probably just wrap the ER2055::read() and write() functions as new serial commands.

Thanks for that!

I'm sure we'll need specialized methods like this from time to time as it won't be realistic to do it remotely. I assume you already wrote the code to do the above? If not, I'll take a look at doing that.
 

wondras

Newbie
Credits
89CR
Arcadenut said:
I assume you already wrote the code to do the above? If not, I'll take a look at doing that.

Yes, and it's now sufficiently tested that I committed it to the Phillrb repo main branch:

https://github.com/Phillrb/Arduino-ICT-PVAP/blob/master/CER2055/CER2055.cpp

The problem I was seeing where one of the high score initials had the wrong value was actually just corrupted data in the EAROM on my board. After wiping it and letting it run through a couple of games, it wrote the expected value in that location.

It's looking like the most useful function is going to be the simple read test, which displays the first four bytes in the EAROM. If the EAROM itself is bad, or the -28V power supply for it isn't working, it will show all FFs. This lets you quickly distinguish between a working EAROM with default scores in it, and a non-working EAROM that the game is ignoring.

I'm going to try adding EAROM support for Asteroids Deluxe next...

wondras2019-08-24 22:06:54
 

Nes4life

Active member
vacBacker
Feedback
11 (100%)
Credits
1,113CR
smiley32.gif
 

Arcadenut

User
Credits
314CR
wondras said:
It's looking like the most useful function is going to be the simple read test, which displays the first four bytes in the EAROM. If the EAROM itself is bad, or the -28V power supply for it isn't working, it will show all FFs. This lets you quickly distinguish between a working EAROM with default scores in it, and a non-working EAROM that the game is ignoring.

I'm going to try adding EAROM support for Asteroids Deluxe next...

Awesome work!

So I assume you are testing on a bench? The datasheet says that the difference between Vss and Vgg should be -33V (+5 - -28). My bench currently doesn't have anything near that. -5V is the best I have right now, so when probing pin 14 of the ER2055, I get -22V.

Do you think this will make it un-reliable to read/write on the bench or do you think it's close enough that it should be fine for testing?
 

wondras

Newbie
Credits
89CR
Arcadenut said:
Awesome work!

So I assume you are testing on a bench? The datasheet says that the difference between Vss and Vgg should be -33V (+5 - -28). My bench currently doesn't have anything near that. -5V is the best I have right now, so when probing pin 14 of the ER2055, I get -22V.

Do you think this will make it un-reliable to read/write on the bench or do you think it's close enough that it should be fine for testing?

Thanks!

I'm using an adjustable bench power supply to send +/-22V to the PCB. This powers +/-15V voltage regulators on the Centipede PCB, which in turn power a charge pump circuit that should send about -28V to the "-30V" test point, and to pin 14 of the EAROM.

My charge pump circuit is only putting out about -20V, probably due to bad caps. Even that seems to be enough to make the EAROM work, so the -22V you're getting would probably work, too. I don't think I'd count on long-term write retention this way, though.
 

Arcadenut

User
Credits
314CR
wondras said:
Arcadenut said:
Awesome work!

So I assume you are testing on a bench? The datasheet says that the difference between Vss and Vgg should be -33V (+5 - -28). My bench currently doesn't have anything near that. -5V is the best I have right now, so when probing pin 14 of the ER2055, I get -22V.

Do you think this will make it un-reliable to read/write on the bench or do you think it's close enough that it should be fine for testing?

Thanks!

I'm using an adjustable bench power supply to send +/-22V to the PCB. This powers +/-15V voltage regulators on the Centipede PCB, which in turn power a charge pump circuit that should send about -28V to the "-30V" test point, and to pin 14 of the EAROM.

My charge pump circuit is only putting out about -20V, probably due to bad caps. Even that seems to be enough to make the EAROM work, so the -22V you're getting would probably work, too. I don't think I'd count on long-term write retention this way, though.

Will probably find out tomorrow when I play with this some more.

I also sent you a PM here, let me know if you got it.

Thanks!
 

GadgetFreak

Active member
vacBacker
Feedback
7 (100%)
Credits
942CR
You can get cheap voltage converter boards from China which take 5v and generate adjustable + & - voltages of around 100ma.
The board I have easily generates +/- 28v which I then feed into the -29v spade terminal near the earom.
 

Arcadenut

User
Credits
314CR
GadgetFreak said:
You can get cheap voltage converter boards from China which take 5v and generate adjustable + & - voltages of around 100ma.
The board I have easily generates +/- 28v which I then feed into the -29v spade terminal near the earom.

I was given a Bench supply, just haven't had the chance to integrate it into my bench setup. I've been meaning to get to upgrading my bench, so now seems like a good as time as any
smiley4.gif
 

wondras

Newbie
Credits
89CR
More code changes, available in the Phillrb github repo:

- EAROM support for Asteroids Deluxe

- Millipede support

I don't have Millipede hardware, so it is COMPLETELY UNTESTED. It's as good as I could make it using just the MAME ROM info and Atari schematics. That said, I think the odds are very good that the ROM/RAM tests are correct, and most of the inputs and outputs should be as well.

I was able to find a total of 10 Atari games that used the ER2055 EAROM. They all have exactly the same latches and buffers to interface it to the CPU, though Centipede/Millipede/Dig Dug have a couple of signals swapped. (I suspect the designers for these games thought they were backwards and "corrected" them.) The ER2055 code supports both flavors now, so it should "just work" for the remaining games if/when they are added to the ICT.

Also in EAROM news, the reason my Centipede board was only sending it -20V turned out to be a bad 555 timer IC. I killed it while hooking caps up in parallel to try to find a bad one, and after replacing it, now I've got -28V.
 

Arcadenut

User
Credits
314CR
New Version of Arcade PCB Debugger has been released!

What's New:

Version 1.1.0.2 (9/1/2019)

- Fixed issue with not all buttons being disabled on the Project Page when running a test.

- Fixed issue where you couldn't click the Stop Script button in tight loops.

- Added the ability to set the value format for Addresses, Lengths, etc... in the Settings->General. Default is Hex.

- Added the ability to set the value format for the Memory Dump values when automatically populated from the Project Page.

- Added button on the Project Resources page to allow you to open multiple at one time.

- Added the ability to run utilities from the Memory Dump page. Useful for Disassembly or Viewing data in other applications such as an Image Viewer.

- Added Command Scripts to the Device Page. Makes it easier to experiment or send commands directly to the device without writing a full C# script.

- Added the ability to drag files to the References page on the Projects. Makes it a lot easier to add references.

- You can now call Memory Dump and pass in a buffer to display so that the Memory Dump page doesn't have to do the read. Helpful for reading data that requires special processing or from code that has already read the memory.

- Now checks to see if the configured COM port is still available. If it's not and there is only one COM port available, it will automatically set it to that. This is helpful if your device changes COM ports on you.

Download here:

http://www.arcaderestoration.com/Media/Files/ArcadePcbDebugger/ArcadePcbDebuggerSetup_1_1_0_2.zip

Arcadenut2019-09-02 08:01:23
 

wondras

Newbie
Credits
89CR
I came up with (what I hope is) a decent way to integrate custom memory timings into the project code. I had to tackle quite a few new things to make this happen, so I'm making it available as an experimental 'sync6502' branch in the Phillrb repo. It contains the changes listed here:

https://github.com/Phillrb/Arduino-ICT-PVAP/compare/sync6502?expand=1

The basic idea is that it adds a C6502CpuSync subclass of C6502Cpu, to which you pass a list of memory ranges and their read and write "strategies." I've only implemented the "1.5 MHz sync-to-phi0-and-skip-a-pulse" strategy needed for Centipede video RAM access, but it should be a useful one (Battlezone mathbox, I'm looking at you), and other strategies can be added as needed.

It's possible that some of this should find its way into the CGame class and the exsting ROM/RAM region structs, but making it a CPU subclass meant that almost no changes were needed to the existing code, and anything that doesn't use this stuff won't be affected by it.

So far only Centipede and Millipede use it, adding video RAM to the main RAM tests. Centipede also gets a very simple custom test that draws a character pattern on the screen.

Curious if it works for anyone, or if there are any thoughts on how to change or improve it. Even if it doesn't end up being widely used, I'm pretty happy I managed to pull it off.
smiley23.gif


wondras2019-09-05 04:16:56
 

Bytestorm

Active member
Feedback
3 (100%)
Credits
60CR
I have a millipede with colours missing (brown)
Probably ram/Rom related. I would love to help testing as soon as I can get my hands on a pcb set for my 2560 r3 Arduino.

I have tried some online pcb services but always some "unknown" files or the drill holes are all in one corner :/..

Bytestorm2019-09-05 16:09:47
 

Lurch666

Active member
Feedback
21 (100%)
Credits
4,010CR
This is beyond my coding skills (I just know basic and forth) and don't even know if it's possible but thought I would ask.

I'm working on a boot Cabal pcb.

The game works and has some sound but the speech and explosions are missing.

now on this board it used three Z80s for the sound.

One is ticking over nicely and I'm assuming that it's running the sound FX that I can hear but the other two don't seem to be running properly.

I can detect some activity on some pins but can't trace why they are not working.

Would it be possible to adapt this in circuit tester to emulate the Z80 but output to a PC what the address and data lines are doing so I could see if any code is being run?

It might be an address problem or bad sound eeprom data but seeing the Z80 activity could give me some pointers on what's happening.

Since the Z80s are not required to actually run the game it's not going to be a problem that they are not running code properly so this would be good for diagnosing PCBs with Z80s in the sound section.
 

Arcadenut

User
Credits
314CR
Lurch666 said:
This is beyond my coding skills (I just know basic and forth) and don't even know if it's possible but thought I would ask.

I'm working on a boot Cabal pcb.

The game works and has some sound but the speech and explosions are missing.

now on this board it used three Z80s for the sound.

One is ticking over nicely and I'm assuming that it's running the sound FX that I can hear but the other two don't seem to be running properly.

I can detect some activity on some pins but can't trace why they are not working.

Would it be possible to adapt this in circuit tester to emulate the Z80 but output to a PC what the address and data lines are doing so I could see if any code is being run?

It might be an address problem or bad sound eeprom data but seeing the Z80 activity could give me some pointers on what's happening.

Since the Z80s are not required to actually run the game it's not going to be a problem that they are not running code properly so this would be good for diagnosing PCBs with Z80s in the sound section.

It doesn't really "Emulate" the CPU. It basically sets the pins in a given state based on what it's trying to do (read/write, etc...).

If you wanted to see code running, you would be better off with a Logic Analyzer.

What you could probably do is pull the Z80 and then test the RAM and ROM that is used for the sound. Beyond that your best bet is probably going to be a logic probe and the schematics.

Now I don't see why we couldn't add support for something like this:

https://www.youtube.com/watch?v=LnzuMJLZRdU

Which is closer to what you want. Don't really know if it would work with the current hardware or not, someone more Hardware oriented could answer that
smiley1.gif
 

Lurch666

Active member
Feedback
21 (100%)
Credits
4,010CR
I have a cheap logic analyser that I have never tries yet that can do 8 bits so I can hopefully use it to check the data lines but since the address lines are larger than 8 bits I'm stuck there.

I was just thinking it would be cool if it could be done.
 

Arcadenut

User
Credits
314CR
Sorry, haven't been doing much with this lately... dozens of other irons in the fire
smiley1.gif


I'll have to get back at this this weekend and see if I can incorporate Wondras's changes.

Arcadenut2019-09-30 20:52:32
 

spectroman

Newbie
Credits
18CR
Arcadenut said:
New Version of Arcade PCB Debugger has been released!

What's New:

Version 1.1.0.2 (9/1/2019).

..

Hi,

I've try to install for the first time this software, but there's an error on install. My system is Win 10.

https://paste.pics/80e138475041a62413baac662bb0378b

The files can't be copied in the directory C:users.....

May be that's because the folder name user is not user in the others languages?
 

Arcadenut

User
Credits
314CR
spectroman said:
Arcadenut said:
New Version of Arcade PCB Debugger has been released!

What's New:

Version 1.1.0.2 (9/1/2019).

..

Hi,

I've try to install for the first time this software, but there's an error on install. My system is Win 10.

https://paste.pics/80e138475041a62413baac662bb0378b

The files can't be copied in the directory C:users.....

May be that's because the folder name user is not user in the others languages?

It should be installing test scripts into your "My Documents" folder. What does the error message say after Error 2?

Arcadenut2019-10-05 06:47:09
 
Top