6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sun Nov 10, 2024 9:39 pm

All times are UTC




Post new topic Reply to topic  [ 30 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: 6502 in Logisim
PostPosted: Sun Dec 05, 2021 10:55 am 
Offline
User avatar

Joined: Fri Jun 22, 2012 7:39 am
Posts: 201
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 :)


Attachments:
alu_logisim.png
alu_logisim.png [ 55.18 KiB | Viewed 12605 times ]
6502_logisim_big.png
6502_logisim_big.png [ 94.22 KiB | Viewed 12605 times ]

_________________
6502 addict
Top
 Profile  
Reply with quote  
 Post subject: Re: 6502 in Logisim
PostPosted: Sun Dec 05, 2021 11:08 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10977
Location: England
Bravo!


Top
 Profile  
Reply with quote  
 Post subject: Re: 6502 in Logisim
PostPosted: Sun Jan 23, 2022 5:42 pm 
Offline
User avatar

Joined: Fri Jun 22, 2012 7:39 am
Posts: 201
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.


Attachments:
6502_logisim_bogus_board.jpg
6502_logisim_bogus_board.jpg [ 162.24 KiB | Viewed 12376 times ]

_________________
6502 addict
Top
 Profile  
Reply with quote  
 Post subject: Re: 6502 in Logisim
PostPosted: Mon Jan 24, 2022 12:39 pm 
Offline
User avatar

Joined: Fri Jun 22, 2012 7:39 am
Posts: 201
All problems have been eliminated. The 6502 now works in Logisim as well.

_________________
6502 addict


Top
 Profile  
Reply with quote  
 Post subject: Re: 6502 in Logisim
PostPosted: Mon Jan 24, 2022 1:56 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10977
Location: England
Hurrah! Anything interesting about the difficulty with JSR?


Top
 Profile  
Reply with quote  
 Post subject: Re: 6502 in Logisim
PostPosted: Tue Jan 25, 2022 11:45 am 
Offline
User avatar

Joined: Fri Jun 22, 2012 7:39 am
Posts: 201
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.

_________________
6502 addict


Top
 Profile  
Reply with quote  
 Post subject: Re: 6502 in Logisim
PostPosted: Sun Apr 03, 2022 3:12 pm 
Offline

Joined: Tue Mar 15, 2022 6:33 am
Posts: 11
@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?


Top
 Profile  
Reply with quote  
 Post subject: Re: 6502 in Logisim
PostPosted: Tue Apr 05, 2022 11:05 am 
Offline
User avatar

Joined: Fri Jun 22, 2012 7:39 am
Posts: 201
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 :)

_________________
6502 addict


Top
 Profile  
Reply with quote  
 Post subject: Re: 6502 in Logisim
PostPosted: Wed Apr 06, 2022 7:15 am 
Offline

Joined: Tue Mar 15, 2022 6:33 am
Posts: 11
@org, thank you very much. I'll show you their work when they're finished (a few months from now).


Top
 Profile  
Reply with quote  
 Post subject: Re: 6502 in Logisim
PostPosted: Wed Apr 06, 2022 7:47 am 
Offline
User avatar

Joined: Fri Jun 22, 2012 7:39 am
Posts: 201
joelnoche wrote:
@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 :)

_________________
6502 addict


Top
 Profile  
Reply with quote  
 Post subject: Re: 6502 in Logisim
PostPosted: Sun May 08, 2022 6:55 am 
Offline

Joined: Tue Mar 15, 2022 6:33 am
Posts: 11
@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?


Top
 Profile  
Reply with quote  
 Post subject: Re: 6502 in Logisim
PostPosted: Fri May 13, 2022 5:57 pm 
Offline
User avatar

Joined: Fri Jun 22, 2012 7:39 am
Posts: 201
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.


Attachments:
6502_circ.jpg
6502_circ.jpg [ 256.05 KiB | Viewed 11284 times ]

_________________
6502 addict
Top
 Profile  
Reply with quote  
 Post subject: Re: 6502 in Logisim
PostPosted: Sat May 14, 2022 1:24 pm 
Offline

Joined: Tue Mar 15, 2022 6:33 am
Posts: 11
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.


Attachments:
File comment: This seems to be an older version of the circuit.
image.png
image.png [ 81.07 KiB | Viewed 11222 times ]
Top
 Profile  
Reply with quote  
 Post subject: Re: 6502 in Logisim
PostPosted: Wed May 18, 2022 10:03 am 
Offline
User avatar

Joined: Fri Jun 22, 2012 7:39 am
Posts: 201
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.

_________________
6502 addict


Top
 Profile  
Reply with quote  
 Post subject: Re: 6502 in Logisim
PostPosted: Wed May 18, 2022 10:04 am 
Offline
User avatar

Joined: Fri Jun 22, 2012 7:39 am
Posts: 201
See more about very first half-cycle here: https://github.com/emu-russia/breaks/bl ... ops/brk.md

_________________
6502 addict


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 30 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 4 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: