Hi All,
New to the forums, and new to the idea of designing a 6502 type computer from the ground up. I do however have a background in electronic and computer engineering, so what I'm struggling with is finding software to help me design/test the system logic for a 6502 based homebrew computer. Does any one have any recomendations of what I can use before taking the next step of building it in hardware/breadboard?
Thankyou for any suggestions you might have.
6502(ish) computer design software
Re: 6502(ish) computer design software
Welcome!
Some people will draw out truth tables and hand-simulate, perhaps drawing out waveforms. Some will use a spreadsheet to help.
But if you want a software tool, you probably are looking for a logic simulator. One example is logisim, which works with schematics (as opposed to textual descriptions)
http://www.cburch.com/logisim/
Some people will learn how to describe their hardware in HDL, either in Verilog or in VHDL, and will then use a simulator such as icarus or ghdl, or perhaps one which comes with tools from Xilinx or Altera.
Hope this helps!
Some people will draw out truth tables and hand-simulate, perhaps drawing out waveforms. Some will use a spreadsheet to help.
But if you want a software tool, you probably are looking for a logic simulator. One example is logisim, which works with schematics (as opposed to textual descriptions)
http://www.cburch.com/logisim/
Some people will learn how to describe their hardware in HDL, either in Verilog or in VHDL, and will then use a simulator such as icarus or ghdl, or perhaps one which comes with tools from Xilinx or Altera.
Hope this helps!
Re: 6502(ish) computer design software
If I might make so bold, the original Logisim is no longer supported and hasn't been for years - which doesn't mean it's useless, but I find the later extensions to it, in particular Logisim-Evolution (https://github.com/logisim-evolution/logisim-evolution). It's remarkably similar to the original but is still actively maintained and has a number of useful improvements.
Either though are sufficient that one can build a computer from scratch - even implementing your own TTL equivalent parts to prove that it can be built in the real world. I have a TTL simulation of an 8080 processor which cheerfully executes Tiny Basic - albeit very very slowly.
It's a very good tool for proving that your logic ideas work though it doesn't include anything like the 6502 core directly. It can be difficult to identify race conditions driving clocks unexpectedly; in general, if something doesn't work in Logisim Evolution it won't work in the real world. (As a rule, never directly generate clock signals from combinational logic).
Neil
Either though are sufficient that one can build a computer from scratch - even implementing your own TTL equivalent parts to prove that it can be built in the real world. I have a TTL simulation of an 8080 processor which cheerfully executes Tiny Basic - albeit very very slowly.
It's a very good tool for proving that your logic ideas work though it doesn't include anything like the 6502 core directly. It can be difficult to identify race conditions driving clocks unexpectedly; in general, if something doesn't work in Logisim Evolution it won't work in the real world. (As a rule, never directly generate clock signals from combinational logic).
Neil
Re: 6502(ish) computer design software
Thanks for the info!
Re: 6502(ish) computer design software
One caveat: the TTL implementations provided by default in Logisim Evolution are missing some (to me) obvious parts (e.g. 138, 374, 541) and I have a vague memory of finding one part which didn't behave as the datasheet suggested it should (and I can't recall which!).
I haven't been able to find a reference to create new parts or edit existing ones, so I often need to use gate-level simulations of TTL parts.
Attached is a simulation for a simple VGA output extension for a computer based on Grant Searle's minimal system - it's currently untested as I haven't built it yet, but the PCB is pretty.
Neil
I haven't been able to find a reference to create new parts or edit existing ones, so I often need to use gate-level simulations of TTL parts.
Attached is a simulation for a simple VGA output extension for a computer based on Grant Searle's minimal system - it's currently untested as I haven't built it yet, but the PCB is pretty.
Neil
Re: 6502(ish) computer design software
I've used Logisim Evolution pretty extensively to simulate a computer using a W65C816 and 74 series ICs. And met with mixed results.
Logisim is amazing as a logic gate simulator and also one of the most intuitive editors I've used in terms of just being able to draw up a circuit. Logisim Evolution takes Logisim (actually Logisim Holy Cross) and adds a lot of missing features, performance and general quality of life improvements. But. Also includes some very verilog related restrictions and introduces some pretty bad bugs*.
I'd recommend Logisim Evolution to start with but it becomes fragile with large circuits. And as barnacle has said it is also missing a lot of the common 74 series ICs.
I've coded up a bunch of them myself (including the 138, 374, 541) And they are all publicly available with an unfortunate caveat. To simulate the W65C816 I had to make a change to the Logisim Evolution source. That pull request was accepted into 3.7.1 but was then overwritten by someone else's bad merge and lost. And here is where things get tricky, and why don't recommend Logisim for large projects. It's fundamentally not built for it. Digital is another option, is more mature in terms of developing (test cases) and is faster. But I could not work out how to write plug-ins for it and could not simulate a 6502 or 65816 in it.
If you want to go the Logisim route PM me and I'll walk you through how to get Logisim Evolution going with the changes I've made. Or, a thought just occurred to me, I may be able to host the executable here.
Going a but off topic, what I ultimately am looking for is something like Logisim that understands voltage levels, propagation delays, has actual working bi-directional ports and can export to KiCad. Of course no such program exists but... it would be great if it did and be pretty much the perfect tool for 6502 development.
* some of which I've fixed.
Logisim is amazing as a logic gate simulator and also one of the most intuitive editors I've used in terms of just being able to draw up a circuit. Logisim Evolution takes Logisim (actually Logisim Holy Cross) and adds a lot of missing features, performance and general quality of life improvements. But. Also includes some very verilog related restrictions and introduces some pretty bad bugs*.
I'd recommend Logisim Evolution to start with but it becomes fragile with large circuits. And as barnacle has said it is also missing a lot of the common 74 series ICs.
I've coded up a bunch of them myself (including the 138, 374, 541) And they are all publicly available with an unfortunate caveat. To simulate the W65C816 I had to make a change to the Logisim Evolution source. That pull request was accepted into 3.7.1 but was then overwritten by someone else's bad merge and lost. And here is where things get tricky, and why don't recommend Logisim for large projects. It's fundamentally not built for it. Digital is another option, is more mature in terms of developing (test cases) and is faster. But I could not work out how to write plug-ins for it and could not simulate a 6502 or 65816 in it.
If you want to go the Logisim route PM me and I'll walk you through how to get Logisim Evolution going with the changes I've made. Or, a thought just occurred to me, I may be able to host the executable here.
Going a but off topic, what I ultimately am looking for is something like Logisim that understands voltage levels, propagation delays, has actual working bi-directional ports and can export to KiCad. Of course no such program exists but... it would be great if it did and be pretty much the perfect tool for 6502 development.
* some of which I've fixed.
Re: 6502(ish) computer design software
AndrewP wrote:
Going a bit off topic, what I ultimately am looking for is something like Logisim that understands voltage levels, propagation delays, has actual working bi-directional ports and can export to KiCad. Of course no such program exists but... it would be great if it did and be pretty much the perfect tool for 6502 development.
Neil
Re: 6502(ish) computer design software
There is Digital which is Logisim-like from what I've heard. I've used Digital but not Logisim myself so I'm not in the position to compare and contrast.
https://github.com/hneemann/Digital
Greg
https://github.com/hneemann/Digital
Greg
Re: 6502(ish) computer design software
A quick look at the documentation suggests it has a much better TTL parts list.
Re: 6502(ish) computer design software
Digital is kinda the spiritual successor to Logisim. The big problem is I could not work out how to implement custom Java components in it (although I think Agumander has been able to) and for that reason I couldn't simulate a running 65816 (or 6502) as I could in Logisim.
akohlbecker has managed to implement custom ICs in Digital using it's digital file format (the suggested way of doing custom ICs). I think Proxy also uses Digital.
Back when I was evaluating Digital a few years ago the documentation was really scant which made using it outside of the obvious kinda difficult. I don't know if that's improved since.
I found them both way overkill for what I want (a logic simulator) and a mission to setup.
And with all of that said...
don't hold your breath, butI'm working on simulator specifically for building a computer around the 65816 that does understand propagation delays, voltage levels, 74 series ICs, has a similar interface to Logisim and is simpler (and thus faster) than a proper Spice simulator. (and has enough detail that it can export a complete KiCad schematic*)
There's still a lot of work ahead before I can really post about it in its own thread but I'm hoping it will be tool that can simulate most of the designs I've seen on this forum.
* I had a long rant sometime ago about the mistakes I made transcribing circuits from Logisim to Kicad which is why automating that export is so important to me.
akohlbecker has managed to implement custom ICs in Digital using it's digital file format (the suggested way of doing custom ICs). I think Proxy also uses Digital.
Back when I was evaluating Digital a few years ago the documentation was really scant which made using it outside of the obvious kinda difficult. I don't know if that's improved since.
barnacle wrote:
Now that would be nice. Analog's ltspice ... simulator available in KiCad
And with all of that said...
don't hold your breath, butI'm working on simulator specifically for building a computer around the 65816 that does understand propagation delays, voltage levels, 74 series ICs, has a similar interface to Logisim and is simpler (and thus faster) than a proper Spice simulator. (and has enough detail that it can export a complete KiCad schematic*)
There's still a lot of work ahead before I can really post about it in its own thread but I'm hoping it will be tool that can simulate most of the designs I've seen on this forum.
* I had a long rant sometime ago about the mistakes I made transcribing circuits from Logisim to Kicad which is why automating that export is so important to me.