Page 1 of 1

Testing a (selfmade)6502

Posted: Tue May 04, 2010 8:42 pm
by Ruud
Hallo allemaal,

As mentioned before in the Hardware section, I needed a program to test my self built 6502. At the end I decided to write my own one:
http://www.baltissen.org/files/ttl6502.asm
Replace 'asm' with 'bin' to get the binary. The binary is meant for an 8 KB EPROM at $E000 and has a reset vector.

The source has only be tested with my TTL6502-emulator. The core of this program is identical to the one of the program that should create the ROMs for my Instruction Decoder. Here all the individual instructions set or reset an output bit of the decoder. In the emulator I emulate what the bit would do, like outputting the content of register A to the internal data bus or filling it with data put on this bus by another register, the ALU or the external data bus.

The ASM enabled me to find errors in my emulator (read: Instruction Decoder) but also the other way around.
I started with testing JMP as first as I need it for testing the branches. But I'm not that happy with the start of testing the branches.

Any ideas or comments on the ASM are welcome!

Posted: Sat May 08, 2010 3:08 am
by ElEctric_EyE
Wish I could help with the testing... But, can you make some sort of 40-pin adapter to replace a 6502 IC in a computer using an original 6502, i.e., SYM, AIM, etc...? That way you could get a general feel for if it works at all, or boots up...

This is the way I plan to go when I finally get done with my project. I will have a workable 6502 based computer, then I'll plop out the old 6502 and plop in the new spartan 3 based 6502. Eventually, many MHz faster...

Posted: Thu May 13, 2010 12:54 pm
by Ruud
ElEctric_EyE wrote:
But, can you make some sort of 40-pin adapter to replace a 6502 IC in a computer using an original 6502, i.e., SYM, AIM, etc...?
My TTL-6502 should be able to replace a real 1 MHz 6502, if that is what you mean.
To test it I'll use a PC card with four 8255's on it, providing 96 I/O lines. I use some as address lines, data lines, nmi, IRQ etc., including the clock. This enables me to test my TTL-6502 step by step.

Posted: Wed May 19, 2010 7:24 pm
by BigEd
Hi Ruud
just wanted to say thanks for publishing your test program. I've downloaded it, but not yet done anything with it! I assume it passes on a real 6502 and on your CPU too?

Cheers
Ed

Posted: Thu May 20, 2010 11:09 am
by Ruud
BigEd wrote:
I assume it passes on a real 6502 and on your CPU too?
Haven't tried it on a real 6502 yet but I'm busy to give it a go in VICE. IMHO that is realistic enough.
And my TTL-6502 hasn't been built yet. It is made out of five Eurocards and I'm working on #1. So still a lot of work to do....

Posted: Fri Jun 11, 2010 3:15 pm
by BigEd
I'd agree, VICE is a good way to test your test. Good luck! Someday I'd like to try your test on py65, and on run6502. And Michael Firth's emulator.