Page 1 of 3
6502 in Logisim
Posted: Sun Dec 05, 2021 10:55 am
by org
Hi, we have completed the 6502 circuit design in Logisim.
https://github.com/emu-russia/breaks/tr ... 02_logisim
There are two options there: for classic Logisim 2.7.1 (6502.circ) and for Logisim Evolution 3.7.2 (6502_Evo.circ).
The schematics kind of works and all main processor parts are implemented, but it obviously still needs to be debugged.
Probably, it will be interesting for someone and we will finish it together

Re: 6502 in Logisim
Posted: Sun Dec 05, 2021 11:08 am
by BigEd
Bravo!
Re: 6502 in Logisim
Posted: Sun Jan 23, 2022 5:42 pm
by org
We are making some progress.
The 6502 in Logisim successfully passes the BRK sequence and executes the first few instructions. Some kind of problem with the JSR. We are working on it.
https://github.com/emu-russia/breaks/tr ... 02_logisim
Next to it is visual6502.hex in Logisim format, which can be loaded into RAM.
Also there is a script bin2hex.py, which converts binary files into Logisim format.
Re: 6502 in Logisim
Posted: Mon Jan 24, 2022 12:39 pm
by org
All problems have been eliminated. The 6502 now works in Logisim as well.
Re: 6502 in Logisim
Posted: Mon Jan 24, 2022 1:56 pm
by BigEd
Hurrah! Anything interesting about the difficulty with JSR?
Re: 6502 in Logisim
Posted: Tue Jan 25, 2022 11:45 am
by org
Nothing new

Again there were problems with the bi-directional transistors used for SB/DB and SB/ADH commands. I had to do a little hack for the logisim, which does not support bidirectional connections, to account for the "dirty" buses.
Re: 6502 in Logisim
Posted: Sun Apr 03, 2022 3:12 pm
by joelnoche
@org, I am a college teacher at a Philippine university and I would like to assign as an undergraduate student project the task of converting your Logisim design into a Digital design. (The Digital software is the one at
https://github.com/hneemann/Digital.) It will be made very clear in the documentation and presentation that the Logisim design was made by you. Is this all right with you?
Re: 6502 in Logisim
Posted: Tue Apr 05, 2022 11:05 am
by org
No problem, but it's better to mention the `Breaks` project on GitHub (
https://github.com/emu-russia/breaks) rather than me, since it's a team effort

Re: 6502 in Logisim
Posted: Wed Apr 06, 2022 7:15 am
by joelnoche
@org, thank you very much. I'll show you their work when they're finished (a few months from now).
Re: 6502 in Logisim
Posted: Wed Apr 06, 2022 7:47 am
by org
@org, thank you very much. I'll show you their work when they're finished (a few months from now).
Good luck to your students! I'm very curious what they will do

Re: 6502 in Logisim
Posted: Sun May 08, 2022 6:55 am
by joelnoche
@org, my students downloaded the Logisim circuit currently available at github, and they're getting errors when they run the Logisim circuit. The 6502 circuit has wires that are "red" and in error (SB OUT, DB OUT, etc.). Has this been fixed?
Re: 6502 in Logisim
Posted: Fri May 13, 2022 5:57 pm
by org
Yes, the 6502.circ works well.
Maybe they downloaded the "Evo" version (for Logisim Evolution), which may still contain bugs since it hasn't been updated in a while.
Re: 6502 in Logisim
Posted: Sat May 14, 2022 1:24 pm
by joelnoche
If I'm not mistaken, the file named 6502.circ currently at
https://github.com/emu-russia/breaks/tr ... 02_logisim, when opened in Logisim, looks like below.
Re: 6502 in Logisim
Posted: Wed May 18, 2022 10:03 am
by org
I get it. You are looking at the state after the very first half cycle (PHI1), during which 6502's behavior is Undefined.
This is due to the fact that the command latches for the lower part are only updated during PHI2, so on the first half-cycle of PHI1 the lower part "goes crazy", as almost all latches issue down all commands at once.
It is enough to perform one more half-cycle and the processor stabilizes.
Re: 6502 in Logisim
Posted: Wed May 18, 2022 10:04 am
by org