6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Fri Jun 28, 2024 12:05 am

All times are UTC




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Circuit Simulator?
PostPosted: Fri Nov 20, 2009 9:09 pm 
Offline

Joined: Mon Nov 16, 2009 1:33 am
Posts: 15
There seem to be plenty of simulator / emulators out there for the 6502. But all of the programs I have found mimic a complete 6502 computer.

Are there an circuit simulators that allow me to build a 6502 based computer from the chip up? Add my own encoding. decoding, i/o etc. etc. ?

If so can anyone provide a link?


Hopefully a free one?


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat Nov 21, 2009 5:45 am 
Offline

Joined: Sat Jan 04, 2003 10:03 pm
Posts: 1706
Probably the closest to that is my lib65816 package for Linux (it was once ported to Windows, but the Windows maintainer lost interest, and I can no longer guarantee that it'll compile). It concentrates solely on emulating a 65816 microprocessor, and leaves literally everything else up to you.

There are two problems with the package as it now stands:

(1) It's not productized -- you can't just "download, ./configure, make, make install" like most open source projects. It's actually pretty simple to configure and build if you're familiar with C/C++ development. However, if not, it will likely be somewhat foreign to you. Since only two other people beside myself have used it for anything non-trivial, there's really no incentive to productize it.

(2) Implementing the rest of your computer isn't as simple as "dropping in ICs." You actually have to write software that tracks cycles and "rolls forward" the machine state based on time discrepencies. This occurs for performance purposes; a genuinely cycle-by-cycle emulation of the processor and the rest of the computer would make the entire system run as slow as a SPICE simulation. This means you need to know how to implement or at least approximate your finished hardware in pure C/C++.

Let me know if you're interested, and I can provide further support.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat Nov 21, 2009 4:01 pm 
Offline

Joined: Fri Jun 27, 2003 8:12 am
Posts: 618
Location: Meadowbrook
One interesting program that may provide ideas towards something bigger is DICE: Digital Integrated Circuit Emulator. It was written original to emulate the PONG arcade game which cannot be done in regular MAME since it uses no processor.
http://adamulation.blogspot.com/

_________________
"My biggest dream in life? Building black plywood Habitrails"


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat Nov 21, 2009 4:21 pm 
Offline

Joined: Sat Jan 04, 2003 10:03 pm
Posts: 1706
HUH! Very interesting. I'll be interested in pouring over that code at some point in the future.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat Nov 21, 2009 9:02 pm 
Offline

Joined: Fri Jun 27, 2003 8:12 am
Posts: 618
Location: Meadowbrook
Source on the site, the TTL definitions knocked me. Methinks it can become an interesting tool when combined with a 6502 assembler/simulator....

_________________
"My biggest dream in life? Building black plywood Habitrails"


Top
 Profile  
Reply with quote  
 Post subject: Re: Circuit Simulator?
PostPosted: Thu Dec 17, 2009 3:47 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10836
Location: England
spinnaker wrote:
Are there an circuit simulators that allow me to build a 6502 based computer from the chip up? Add my own encoding. decoding, i/o etc. etc. ?


How would a logic simulator suit you? (In VLSI, we do huge amounts of logic simulation, and limited amounts of highly targetted circuit simulation. We also do static timing analysis, which means we need circuit simulation to characterise the logical components.) If you're mainly interested in getting the logical design right, and you have some kind of story for avoiding or fixing timing problems, then a logic simulator is the right tool.

There are several free verilog simulators: Stephen Williams' Icarus verilog is well thought of.

Arlet Ottens' site has a 6502.v and also a link to Rob Bird's.

Verilog models for 74 series are not so easy to find - but each should only be a dozen lines, if you only need the logical function.Here's a 7402


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 5 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:  
cron