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?
Circuit Simulator?
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.
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.
-
Nightmaretony
- In Memoriam
- Posts: 618
- Joined: 27 Jun 2003
- Location: Meadowbrook
- Contact:
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/
http://adamulation.blogspot.com/
"My biggest dream in life? Building black plywood Habitrails"
-
Nightmaretony
- In Memoriam
- Posts: 618
- Joined: 27 Jun 2003
- Location: Meadowbrook
- Contact:
Re: Circuit Simulator?
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. ?
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