6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sun Nov 24, 2024 5:57 am

All times are UTC




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Testing a (selfmade)6502
PostPosted: Tue May 04, 2010 8:42 pm 
Offline
User avatar

Joined: Fri Dec 12, 2003 7:22 am
Posts: 259
Location: Heerlen, NL
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!

_________________
Code:
    ___
   / __|__
  / /  |_/     Groetjes, Ruud
  \ \__|_\
   \___|       URL: www.baltissen.org



Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat May 08, 2010 3:08 am 
Offline

Joined: Mon Mar 02, 2009 7:27 pm
Posts: 3258
Location: NC, USA
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...

_________________
65Org16:https://github.com/ElEctric-EyE/verilog-6502


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu May 13, 2010 12:54 pm 
Offline
User avatar

Joined: Fri Dec 12, 2003 7:22 am
Posts: 259
Location: Heerlen, NL
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.

_________________
Code:
    ___
   / __|__
  / /  |_/     Groetjes, Ruud
  \ \__|_\
   \___|       URL: www.baltissen.org



Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed May 19, 2010 7:24 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
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


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu May 20, 2010 11:09 am 
Offline
User avatar

Joined: Fri Dec 12, 2003 7:22 am
Posts: 259
Location: Heerlen, NL
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....

_________________
Code:
    ___
   / __|__
  / /  |_/     Groetjes, Ruud
  \ \__|_\
   \___|       URL: www.baltissen.org



Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Jun 11, 2010 3:15 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
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.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 11 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: