💦 CREATE AND FUCK YOUR OWN AI CUMSLUT 🔥 TRY NOW ♥
Create AI Cumsluts 💦
August 30, 2019

First video from a new series on the 6502 processor

Hi everyone,

Here’s a preview of the first video in a new series I’m working on to build a basic computer with the venerable 6502 processor. This and the next video use as a motivation the classic “hello world” program that every programming tutorial seems to start with. Of course when you have to build all the hardware, this becomes a much more interesting exercise. :)

That basic “hello world” task will be covered in the first two videos of the series (with the video I’m sharing today being the first). After that I have plans to expand the computer enough so I can talk about address decoding, stack, I/O, and interrupts. Knowing how these things tend to go, the videos might not break down exactly into these five, but this is the material I plan to cover:

  1. Hook up the 6502 processor so it runs a hard-wired do-nothing program.

  2. Add ROM to store a real program (hello world) and an LCD display for output.

  3. Add RAM, discuss what a stack is and how it’s implemented.

  4. Add some buttons for input (so now there’s I/O) and discuss interrupts.

  5. Walk through writing a simple program, probably a simple game of some sort

As always, I’d love any feedback on this video or the overall plan.

Normally, I’d release this video to the public in the next day or so. But for this series, I’m also working on creating kits that you can buy with all the parts you need to follow along with the videos. That adds some additional logistical challenges on my end. In particular I need to be confident in the final design and don’t have any issues with parts availability. Once I release a video, I can’t change anything, so I want to be cautious.

Consequently, I likely won’t release this video publicly for another ~two weeks. But since it’s mostly done and I’ve moved on to working on the next video, I figured I’d share it with you early. The only downside is that now you’ll have a longer gap to wait for part 2...

Thanks again for your support,

-Ben

“Hello, world” from scratch on a 6502 (YouTube)

Comments (34)

P
Peter Stevens · April 22, 2021

Finally started putting together my 6502 kit. Lots of fun. One thing I did to make life easier was make custom cables for connecting to the Arduino. Basically take single pre-made Dupont cables and group them into larger blocks by replacing individual plastic collars for multi-pin collars. No need for crimping, just a fine tip pair of tweezers and lots of patience.

M
Michael McDonnell · December 18, 2020

When you are done with this series, can you modify your design to use the 65c816 with the 24 bit addressing lines? I am thinking of creating an address register with say 74ls173's and have it load on the inverse of the clock. I have attempted it but without luck. It would be nice to have access to16mb of memory.

A
Adam Lininger · October 28, 2019

Just became a patron to say thanks for your breadboard computer series. I'll be gradually buying the kits and building one of my own. Really looking forward to Part 2 of this series.

S
Sonny Yeo · October 18, 2019

Hmm it has been awhile since 1st video

Y
Yann Le Brech · September 22, 2019

For Part 2, what about this idea: instead of using a standard EEPROM kind of chip to store the program's code, why not "simulating" this chip using an Arduino? This may make updating firmware much faster and easier, and it may be useful for debugging too. Oh, and one more fun thing by doing that, there could be the possibility of returning different values for reading the same address, by adding some fuzzing logic to the Arduino. :) I guess this couldn't be possible for a full-speed running processor because the Arduino may not be fast enough, but because you're running it at much lower speeds, maybe that's an option.

B
Brian Wanda · October 21, 2019

it is a neat idea, you should do it! maybe use the Arduino for the clock. I am running my 1Mhz crystal through two 12 bit counters for speed control.

R
Rob Bruno · September 20, 2019

Hey, if anyone is interested I laid out a PCB of the breadboard clock in KiCad. I can make the files available if anyone wants them. It is organized "true to" the breadboard style. I know it could be much smaller or optimized with SMD parts but I thought it would be cool to honor Ben's layout. Let me know, thanks.

R
Rafael Silva · September 26, 2019

Hi Rob, that would be great! I would suggest a place like github to upload the files and share the link here. Thank you!

E
Erlend Framstad · September 18, 2019

A question from a guy who is not very good at computers, but learns a lot from videos like this: What I don't understand is how you can access a 16-bit address with an 8-bit data line.. If the CPU tries to load a number at address 3000 into the A-register, the data line needs to contain the number 101110111000, which is too big for the 8-bit bus... Or does this processor just work very different from the breadbord computer?

P
Peter Stevens · September 10, 2019

Yeah, I agree a 6502 kit would be awesome; and way to avoid the tax man at the border would be great too! lol (I'm in Canada) .. I'd much rather support Ben on Patreon than hand it over to the tax man.

R
Rob Bruno · September 9, 2019

Great content, thank for sharing your knowledge. I would absolutely buy a kit of this project.

G
Gabriel Egan · September 4, 2019

Excellent video, yet again! I'd definitely be interested in buying a kit of parts to follow along -- in fact I'd consider buying a couple of kits and making it a project for my students to follow along with me too. I got started machine code programming the 6502 in the Acorn System One machine that my school got in 1980. The technique was to write the program in assembler and then hand-assemble it using a table of instructions and addressing modes. If I recall correctly, the only big differences of the 6502 from the 8080 that I've since learnt to program (using the amazing Altair Clone computer) are i) the 6502 uses the whole of page zero (0x0000 to 0x00FF) as if it were a set of registers whereas the 8080 has just 7 internal registers, and ii) the 6502 allows branch instructions with relative jumps (so the operand is added to the Program Counter to determine the destination). I look forward to relearning all about this processor via this set of videos. Worth every penny of my Patreon subscription!

M
Michael · September 1, 2019

Thank you Ben for pursuing this, I always wanted to know better the inner workings of some of the most popular CPUs. Would love to see at some point in the future a contrast of the 6502 to the early IBM CPUs 8088 (or its predecessor 8008). As always, kudos!

M
Michael Burke · August 31, 2019

Can you mention the history of the 6502 a little more? MOS basically used the more expensive MC6802 as the base. Was it a superset of the 6802 or subset? The 6802 was in response to the Intel 8080. Also, is it important to point out this is a little-endian processor? One last thing to tie into your SAP1 project -- is this close to being the SAP2 described in the Malvino book?

n
naorunaoru · August 31, 2019

That's an eye opener for sure. I never understood fetch-decode-execute that clearly, thank you so much for this. Looking forward to the next video!

C
Chris Zuhars · August 31, 2019

Absolutely so right up my alley, it’s scary! Thank you! I’m seriously looking forward to this series. I’m building my own Apple /// clone from schematics using mostly original TTL chips, then looking to reduce the chip count in the future with FPGAs doing the more mundane glue logic stuff. Your previous videos have been fundamental in this pursuit. Building your own 6502 or other 8-bit processor based computer is an absolute joy. Thank you again!!

D
Daniel J Schless · August 31, 2019

Looking forward to the series ... Takes me back to my misspent youth, learning to code assembler on my C64.

D
Don Rude · August 31, 2019

I like this video and I think it does a good job starting off the series on 6502. Like other people here I started with your channel on the bread-board computer. I think it would be a nice nod to the other series to mention up front how this 6502 is roughly like a stand-in (and more advanced) than your bread-board computer. In terms of the over all educational content it makes a nice leap with everything else you have from transistors, to gates, to custom CPU, to packaged CPU. Just my idea, its up to you of course.

W
William · August 31, 2019

funny thing is I was watching a video from javidx9 recently implementing a 6502 in software for his NES emulator. I might want to follow along with this series, perhaps even with a PCB instead of breadboards, like what I did with the discrete logic CPU

u
ucmRich · August 31, 2019

I always wanted to have a computer with the 6502 cpu. I love the idea of making one, especially with sound chips if you have time after building your 6502 computer 0:-) I also really think this is something a great many people are going to be very interested in. Side-Bar: I have learned a great deal about computer hardware watching your videos. You teach extremely well for brains like mine, many thanks ^_^

R
Robin Karpeta · August 31, 2019

This sounds great Ben. My first foray into computers was in 1980, programming an Apple II Plus in machine code. About which I knew nothing!! So this is nostalgic for me, as well as being very interesting.

G
GRISOLIA · August 31, 2019

Thank you very much Ben, a very nice idea that will be treated as usual with a lot of pedagogy. I can not wait to follow the serie...

V
Vaida Narušė · August 31, 2019

I completed watching the breadboard computer series, and it seems completed with some basic programs. This is a great new step in complexity and I am very excited to see what you are able to teach us next!!!

K
Koreo · August 31, 2019

Thank-you Ben, I quite enjoyed the mix of hardware and software. The progressive improvement in both hardware and software demonstration in the video are easy to understand and follow. I probably learned as much about coding and the Arduino as I did about the CPU.

C
Cult of Rig · August 31, 2019

I can't fully express how much I dig the choice of topic. Thank you, Ben! Incidentally, you're releasing these as JD is doing a mini series on emulating the 6502 https://www.youtube.com/watch?v=8XmxKPJDGU0

M
Michael Burke · August 31, 2019

That's a great video, also!

S
Sonny Yeo · August 31, 2019

Great stuff. Thanks Ben :)

M
Matthew Gregoire · August 31, 2019

I'm so incredibly excited! Working through your 8-bit computer videos reminded me why I love computer science. I'm really glad you put so much time and thought into making things like this for other people to learn.

S
Scott Plude · August 30, 2019

I just love hearing you have made a new video!

P
Peter Stevens · August 30, 2019

Sweet. I have a C64 that I robbed the chips from, time to have some fun. Might be a bit harder if it is not fully static but whatever fun is fun. All this from scratch stuff is worthy of a book or course.

C
Chris Norris · August 30, 2019

That was really interesting. Going to learn a lot I think.

P
Peter Martin · August 30, 2019

What about explaining how a simple BASIC interpreter is coded?

M
Matt Alexander · August 30, 2019

This is going to be awesome! I'm so excited for this next series!

B
Brad Stone · August 30, 2019

Many thanks for this new series! I was just thinking about 6502, so I am glad that you are making these videos.