65C02 computer from first principles.

In this forum you can write about anything that does not fit in other forums.
This includes generic Oric talkings and things that are totaly unrelated but want to share with people here :)
Post Reply
User avatar
mikeb
Flying Officer
Posts: 172
Joined: Wed Sep 05, 2018 8:03 pm
Location: West Midlands, UK
Contact:

65C02 computer from first principles.

Post by mikeb » Thu Feb 20, 2020 5:45 pm

Just thought I'd share this link on here -- although it is not Oric related, this guy is putting together a 65C02 based "My First Computer" on breadboard, and I found it really interesting.

He really is doing a good job of explaining as he goes along, including some things which become a teaching moment later (although typically that is lost on some of the YouTube commenters) :)

Also, he's monitoring what the 6502 is getting up to using an Arduino as a low-speed logic analyzer.

Code: Select all

https://www.youtube.com/playlist?list=PLowKtXNTBypFbtuVMUVXNR0z1mu7dp7eH

User avatar
Dbug
Site Admin
Posts: 3211
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Re: 65C02 computer from first principles.

Post by Dbug » Thu Feb 20, 2020 6:07 pm

I did watch this video a couple months ago, it was quite cool, specially when I knew in advance why this and that happened :)

User avatar
mikeb
Flying Officer
Posts: 172
Joined: Wed Sep 05, 2018 8:03 pm
Location: West Midlands, UK
Contact:

Re: 65C02 computer from first principles.

Post by mikeb » Fri Feb 21, 2020 5:46 pm

Dbug wrote:
Thu Feb 20, 2020 6:07 pm
I did watch this video a couple months ago, it was quite cool, specially when I knew in advance why this and that happened :)
There's 6 videos in the playlist (recent additions) with more to come, so you may need a refresh :)

But even knowing the 6502 quite well, it is interesting seeing this through. For example, the observed behaviour of a JSR is just odd, and not what I expected at all -- he didn't explicitly mention pipelining or anything like that, but the 6502 is definitely overlapping things :-

e.g.

Code: Select all

$1000: 20 00 40: JSR $4000
I'd expect :-

Code: Select all

Read $1000: $20 -- It's a JSR
Read $1001: $00 -- LSB of new address
Read $1002: $40 -- MSB of new address
Write $01XX: OLD PCL to stack
Write $01XX: OLD PCH to stack
Read $4000: JSR has happened
But the 6502 gets in early with writing PC to stack, while half way through getting the new address. That's something I didn't know happened, it may be because of limited places to store the PC (other than the PC!) -- having loaded a new address LSB, if it doesn't empty the PC(L) right now, it won't be able to load the MSB, because it's still holding the LSB in the one 8-bit temporary register ...

Actual is more like :-

Code: Select all

Read $1000: $20 -- It's a JSR
Read $1001: $00 -- LSB of new address
Write $01XX: OLD PCL to stack
Read $1002: $40 -- MSB of new address
Write $01XX: OLD PCH to stack
Read $4000: JSR has happened

User avatar
Chema
Game master
Posts: 2571
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Re: 65C02 computer from first principles.

Post by Chema » Fri Feb 21, 2020 7:48 pm

I am checking the R6500 book, and it corroborates what you've just said, Mike. It contains the specification about how the processor executes instructions in different addressing modes, including jsr.

15823108483438299748332923539097.jpg
15823108483438299748332923539097.jpg (2.73 MiB) Viewed 926 times

User avatar
Badger
Pilot Officer
Posts: 66
Joined: Sat Sep 22, 2018 10:04 am
Location: Wigan, England

Re: 65C02 computer from first principles.

Post by Badger » Fri Feb 21, 2020 10:34 pm

This is what my breadboard 65c02 computer is based on.

A most excellent instructor and his tutorials on breadboard computers are excelent, his simple processor with 2 registers and an alu is a great set of videos to watch to understand the internal workings.

Also his breadboard video card is amazing - Part 1 below.
https://www.youtube.com/watch?v=l7rce6IQDWs

This set of video is what gave me the impetus to build my breaboard computer and then work out I could adapt what I had learned to try to develop an I2C interface for the oric to give it Wifi capability. (This is still progressing but having technical difficulties whis I will post in the I2C thread soon).

Well worth building these as they can give you a spark to create something :)

Regards

Ian
flag_uk Amateurs built the Ark, Professionals built the Titanic.

User avatar
mikeb
Flying Officer
Posts: 172
Joined: Wed Sep 05, 2018 8:03 pm
Location: West Midlands, UK
Contact:

Re: 65C02 computer from first principles.

Post by mikeb » Sat Feb 22, 2020 6:35 pm

Badger wrote:
Fri Feb 21, 2020 10:34 pm
Well worth building these as they can give you a spark to create something :)
You'll definitely get some kind of spark, as he tends to modify circuits with the power on.

@Chema thanks for that -- that's even better than my memory of it :)

User avatar
zxMarce
Private
Posts: 3
Joined: Mon Mar 02, 2020 3:46 pm
Location: Buenos Aires, Argentina

Re: 65C02 computer from first principles.

Post by zxMarce » Thu Mar 12, 2020 1:56 am

This guy, Ben Eater, is a pro at teaching to use your brain, and has videos of some unique things.

His "Hello World from scratch" 7-video series is now complete, but you can also browse his site, where you can follow him while he creates a Frankenstein-type processor/computer with just plain old TTL chips spanning several breadboards. It is a Frankenstein, in my humble opinion, because it mixes up the processor with RAM (can you believe it is a Turing-complete processor/machine with 15 bytes of RAM?)

I guess these particular two video series (the computer-on breadboard spans forty-something videos, you've been warned) can help those that sometimes are afraid of "not knowing enough" by giving'em the slight push someone needs to embark in some project/repair. And Ben explains things really well.

Not only the videos: If you feel like it, he sells kits for both tutorials (6502 and computer-out-of-TTL).

Another example, not related to Mr. Eater, is The Gigatron, another discrete-TTL computer without processor. But I feel it kind of cheats because for some things it uses a microcontroller in some port (was it a serial port?).

And for the really extreme... Just take a look at this series: Nothing less than almost 30-video series of people restoring an old, trashed Apollo Guidance Computer (AGC). We're talking not only of a processor-less computer, but one made exclusively of three input NOR gates, two gates per 10-pin flatpack chip that must be reliable enough to guide a rocket! This means no shift registers, no latches, no counters, no "complex logic", as every building block is made up of NOR gates.
By the way, AGC's ROM and RAM was made up of thousands of really small ferrite rings with copper wires interwoven; and RAM was volatile: The machine had to WRITE back a value after READING it, otherwise it would be lost. Not dynamic RAM, but "suicidal" RAM.

Ok, I better shut up; my age starts to show :lol:

Regards,
zxMarce.

Post Reply