CPU socket plugin tester

Mitchell Gant

Active member
vacBacker
Feedback
2 (100%)
Credits
888CR
I've started a new thread rather than hijack RaveN 's here:

http://www.ukvac.com/forum/raspberry-pi-arcade-project_topic333310_post789507.html?KW=#789507

Today I've made some good progress with my tester board project. I made a proper PCB a few weeks ago and have been writing some better code to do tests on a target game board.

This time I'm plugged into a working Atari Space Duel PCB rather than the faulty bootleg Asteroids I was using before.

I've been having trouble with getting reliable read/writes to the target game board though, finally solved today by simply increasing the 5V to actually be 5V rather than the 4.85V it has been. I was running from a fixed 5V supply, but it only manages 4.85V on the game itself across the farthest chips.

I have written some vector instruction tests for the Space Duel to test the vector generator. Some simple tests like HALT and the jumps and jumps to subroutine worked fine, but the actual draw vector instruction would not trigger a VCTR state and no vectors were drawn. After increasing the voltage a little it now does properly draw.

If I put back the real 6502A into the board it works fine, even at the lower 4.85V, so this tells me (I think) that my tester is too tight on some read/write timing somewhere.

So now it will do some vector tests, continuous RAM tests and ROM checksums for both 16 bit add checksums and also Adler CRC32 checksums the same as ROMIdent uses.

Below are some photos of it hooked up to my scope, but unfortunately it's a new fangled digital one so awful when it's in XY mode compared to a real analogue scope.

The photos show the tester in 6502 emulation mode, running the original Space Duel ROMs while the game is in test mode, you can make out the screen test patterns though they are not blanked like they would be on a real vector monitor.

In this mode my tester board is emulating a 6502, the Space Duel ROMs and the 1K of RAM at address 0x0000, so I could remove those chips from the game and it would still run.

Space_Duel_dsPIC20130817_202941.jpg
Space_Duel_dsPIC20130817_203029.jpg
Space_Duel_dsPIC20130817_203044.jpg
Space_Duel_dsPIC20130817_203111.jpg
Space_Duel_dsPIC20130817_203203.jpg
Space_Duel_dsPIC20130817_203240.jpg

Mitchell Gant2013-08-18 08:56:31
 

Mitchell Gant

Active member
vacBacker
Feedback
2 (100%)
Credits
888CR
Today I've hooked up an almost real vector monitor to see what the vector output looks like. Not great as I'm running the monitor from a rather low DC voltage and as you can see there are wires *everywhere* no doubt picking up lots of crosstalk noise. The deflection transistors are also experimental where I've used cheaper TIP35C and TIP36C instead of the normal 2N3792 and 2N3716. The black heatsinks they're on are not really large enough either, they were just some I found in a box to prove they could work.

But it proves my tester is working as it should much better than the digital 'scope image, and amazingly doesn't seem to be too slow when it's emulating a 6502.

I've also got the tester board reading the game board clock and 5V Vcc supply so it can check those before running. Tester can't run if there's no game CPU clock input.

I suppose I should tidy up the software files next, and believe me, it's a lot worse than my test bench is with wiring!
smiley9.gif


Space_Duel_dsPIC20130818_151326.jpg
Space_Duel_dsPIC20130818_151402.jpg
Space_Duel_dsPIC20130818_151422.jpg
Space_Duel_dsPIC20130818_160930.jpg
 

Zabanitu

User
Credits
330CR
nice one,
hope to see some release of your project one day.
is it hardcoded to mimic a 6502 or do you have complete control of the full 40 pins ?
 

Alpha1

Do the Shake and 'VAC
Staff member
vacBacker
Feedback
95 (99%)
Credits
5,653CR
Dude, you are too cool for school. Loving it!!

RetroClinic (Mark) posted on the old ukvac mailing lists once his own home made pokey chip. It was bloody huge and most impressive!

This reminds me of that awesomeness.

Mind. Blown.
 

Mitchell Gant

Active member
vacBacker
Feedback
2 (100%)
Credits
888CR
Zabanitu said:
nice one,
hope to see some release of your project one day.
is it hardcoded to mimic a 6502 or do you have complete control of the full 40 pins ?

It's fairly hardcoded to a 6502, doesn't support the RDY, SYNC or SO pins at all, nor PHI1 clock output.

Really it's just two 74HCT573 latches for the 6502 address bus multiplexed with 8 lower bits for the 6502 data bus as the dsPIC has 5V tolerant pins, which is why I thought I'd have go at it. I mulled over using an FPGA, but I don't know enough about them, along with the lack of 5V tolerance which would make it difficult for me to do. Using the dsPIC is very familiar for me, so it's an evolution from other work I've done over the past few years.

I was sneaky with the photo though so it doesn't clearly show the 6809E pinout connector next to the 6502 one ...
smiley9.gif
Untested as yet though.

The intention is to make a plugin tester for Atari boards that I have, not a real full 6502 emulator, it just happens to be able to do that too!

Getting the 6502 emulation part working was a spinoff from this 6809 / POKEY emulation that I did last year, just to see if it could be done on a 40MHz dsPIC33: http://youtu.be/5WLjPLXP474

I started with a 6800 emulation on a dsPIC board and DAC to do a Defender sound board, which it did easily. Then I made it do the 6502 and 4 POKEYs to run Firefox sound board emulation (not shown on the Youtube videos)

This tester board does also have a 12 bit DAC and a crude audio output buffer that is partially in place on the photo. But I think it will seriously struggle to run 6502 Space Duel code and emulate and output 22KHz audio. We'll see...
 

Alpha1

Do the Shake and 'VAC
Staff member
vacBacker
Feedback
95 (99%)
Credits
5,653CR
I have a CAT box you are welcome to borrow dude if this helps you with PCB fixing? It's fully working and I have the Z80 pod for it also. It's on 110V like all of them were, so you would need a stepdown.
 

RaveN

Active member
vacBacker
Feedback
1 (100%)
Credits
1,325CR
Awesome stuff Mitchell!! Glad you started a new thread, as my original attempt is laughable compared to the progress you have made.
 

guddler

Busting vectors like it's 1982!
vacBacker
Feedback
10 (100%)
Credits
4,058CR
Sorry, I've been reading but not commenting as I was crazy busy with work over the weekend and have been over to Germany earlier this week for meetings. Getting back to normal now
smiley1.gif


I'm beginning to wonder if we should pool resources on this stuff or something? But then I think they're all very different solutions so it wouldn't be easy. Need to get my head back into mine a bit!
 

Mitchell Gant

Active member
vacBacker
Feedback
2 (100%)
Credits
888CR
Made a little visible progress today by plugging it into Jodo's Firefox board CPU socket today, and just about managed to run 6809 emulation enough to run the Firefox test routine, albeit very slowly. (Don't worry Jodo, that's not a real ROM 2 error, it's my tester lying
smiley2.gif
)

Mostly I've been tidying up the software this week so it's in a better state now, but still lots to do.

Oli's mention of a CAT box made me wonder if the signature analyser on that would have been a good idea to try to implement? Has anyone here ever used a CAT box or other SA to usefully fix an Atari PCB? It would need extra hardware to add on, it's not something I thought about when I started this, but RaveN was hinting at this with the logic probe on his RPi tester, which is a good idea I think.

Guddler, I'd like to work more on the game specific test functions like I'd mentioned before with the targeted vector generator sequences, and extend them to other games and hardware, such as Star Wars or Tempest mathbox. Such test routines could work on any type of CPU tester I guess, if it has control of the address space. Something like RaveN's RPi had enough space to store many such functions where my board does not (will have to re-flash the code in the tester to suit different games).

Anyone got a Tempest PCB for sale?
smiley1.gif


Won't get anything done tomorrow on it though, away at a gig.

dsPICAtari_FF_20130824_161148.jpg


dsPICAtari_FF_20130824_161223.jpg
dsPICAtari_FF_20130824_161319.jpg


dsPICAtari_FF_20130824_161330.jpg
 

guddler

Busting vectors like it's 1982!
vacBacker
Feedback
10 (100%)
Credits
4,058CR
I have a spare Tempest PCB I could loan out, I'd prefer to keep it as a spare for my cab though rather than flogging it really. It worked fine last time I used it. I'd need to dig it out of the loft and test it.

I've used signature analysis before to fix boards. It's actually quite handy and easy once you get it setup. That can be a pain in the arse sometimes.

Let me know if you're after the Tempest PCB and I'll get onto it next week.
 

Mitchell Gant

Active member
vacBacker
Feedback
2 (100%)
Credits
888CR
I've very slowly been developing this a little more.

I've been trying to fix a pair of very poorly bootleg Asteroids PCB's that I got from PMan and Alpha1 some time ago.

AstDlxEmu1130_152202.jpg


There were lots of faults on both PCBs, bad sockets, missing parts, broken tracks and multiple IC faults.

So a good way to develop test functions for Asteroids.

I got myself a cheap analogue 'scope act as a vector monitor, although unblanked so all the vectors are shown as well as the centre dot so damaging to precious real monitors.

Simple vector generator tests from simple "HALT" execution to more specific tests.

Like Draw vector from screen centre in X direction, with multiple scale sizes

AstDlxEmu1201_210300.jpg


And Y direction

AstDlxEmu1201_210316.jpg


Or draw diagonal vector

AstDlxEmu1201_210231.jpg


Or a draw box subroutine called after various scale size loads to test chips at locations M7 latch, M6 adder, E7 decoder and counters B7 to D7.

AstDlxEmu1201_210214.jpg


Or I can do 6502 emulation and run the game from the tester dsPIC CPU that also uses it's internal RAM and flash memory to store the Asteroids ROMs.

AstDlxEmu4.jpg


I found it helps massively if I get the correct version Asteroids ROM data though, as mixing some ROMs from version 1 and some from version 2 doesn't work well...
smiley18.gif


It ran the Asteroids test mode fine, as that's all in the top ROM, but exiting test mode crashed it. Obviously I thought it was my 6502 emulation code, or a still faulty PCB. But when I repaired both PCBs well enough to pass all the tests and generate the same images on the scope, I knew it had to be a software thing. Spent days scratching my head over that one. Doh!

Today I looked at one of the PCBs and saw it has an empty footprint next to the vector ROM...

Hmm, wonder if I could use that to add extra vector ROM space. Yes I can! And it's already decoded and wired the same as Asteroids Deluxe address space. So add a socket and burn two Asteroids Deluxe ROMs (well 2816 EEPROMs for ease of erasing).

AstDlxEmu1201_205725.jpg


So now all I have to do is put an image of the Deluxe ROMs into the CPU tester and slightly alter the memory decoding...

And Asteroids Deluxe is sort of running.

AstDlxEmu1201_205735.jpg


Not sure why it reports RAM Bank Error, it is emulated!

Runs the game though, minus high score memory and POKEY sound effects that Deluxe has. I believe the control inputs are swapped around too, but as I don't have it wired to any sort of control panel I wouldn't know! So I can't *actually* play it.

AstDlxEmu1201_205804.jpg


There's a short shaky vid of it running here:

http://youtu.be/CU61TkVN-mE

I notice that in demo mode all the asteroids are traveling in the same diagonal path bottom left to top right. Does the game code use the POKEY as a random number generator? As that's not emulated or on the actual PCB, it suggests it could.

Has anyone ever had an Asteroids Deluxe with a faulty POKEY that has done this in demo mode?
 

guddler

Busting vectors like it's 1982!
vacBacker
Feedback
10 (100%)
Credits
4,058CR
Awesome!

And yeah, Pokey is used for pseudo random number generation in a lot a games. AD and Centipede spring to mind.
 

Mitchell Gant

Active member
vacBacker
Feedback
2 (100%)
Credits
888CR
The stressful Spiraltor test...

A bunch of draw vector instructions of increasing lengths going right, down, left up, etc

Refresh rate was about 11Hz, so very flickery on a 'scope. Looks awesome!
smiley16.gif


Cameraphone shutter has tried it's best.

AstDlxEmu1201_223149.jpg


A video of it shows better:

http://youtu.be/_3CMNzp4rNE
 

Jodo

Boy is this a machine!
Staff member
vacBacker
Feedback
15 (100%)
Credits
607CR
Impressive stuff Neil! I don't pretend to understand it but I'm looking forward to seeing it first hand next time I'm over
smiley32.gif
 

Mitchell Gant

Active member
vacBacker
Feedback
2 (100%)
Credits
888CR
Last week I picked up an untested Battlezone PCB, though on getting it I was sad to see it was only the main AVG board and missing the Aux board that handles joystick inputs, sound and most importantly the 3D vector graphics maths processors.

This didn't stop me plugging in my crude CPU tester and detecting a bad RAM fairly quickly, and verifying the ROMs.

Plugging the 6502 back in and forcing test mode with th jumper wire brought up the test mode screen, proving the vector generator worked when I hooked it into my oscilloscope.

So now I need to buy find and buy a Battlezone Aux board in working or non working condition to repair. Or do I???

After writing the code for the Battlezone memory map for the CPU tester to check the ROMs, and having a working 6502 emulation in there too I thought I'd see if I could also emulate the Aux board.

I found the MAME source code for the mathbox emulation and optimised it for the dsPIC on my CPU tester.

After a lot of hours swearing at it and kicking myself for silly coding mistakes I've got ... something. Though far from perfect and lot more debugging to do.

Jodo calls my pro-test rigs "ghetto", but I can't understand why he says this. Looks perfectly OK to me.
smiley8.gif


20140123_223350.jpg


Attract screen with a tank, so maths processing must be almost working! It certainly won't show this with just the 6502 plugged in (obviously!).

20140123_223418.jpg


Doesn't pan left/right, nor does it move on to the high score list like real Battlezone should. It also will lock up if I enter game test mode, though it seemed to work on Saturday, so I've broken something in the software. I've added Z blanking to the scope, but that's not correct either as there are still lots of unblanked vectors shown, maybe there's a deeper problem with the crude emulation.

20140123_223538.jpg
 

Jodo

Boy is this a machine!
Staff member
vacBacker
Feedback
15 (100%)
Credits
607CR
Nice work Neil - looking forward to seeing that and your progress next time I'm over. I'd love a Battlezone mini in my collection.
 

guddler

Busting vectors like it's 1982!
vacBacker
Feedback
10 (100%)
Credits
4,058CR
Nice! Whats in your board again? You seem to be doing an awful lot in there for a pic. I always thought they were little things and yet here you are emulating CPUs, storing ROMs and now emulating mathboxes!!

I badly need to get my head back into BZ. I've got a number of them to fix and a cabaret just waiting for a board
smiley6.gif
 
Top