
Build a 6502 Computer - ingve
https://eater.net/6502
======
CorpOverreach
If you haven't already, I highly suggest checking out the rest of Ben Eater's
videos.

He's an absolutely excellent teacher, and his series on building an 8-bit
computer from basic logic gates is a super interesting watch that has me on
the verge of buying a ton of breadboards and attempting it myself.

~~~
minraws
Checking out all his videos is worth it.

The earliest videos are a bit rough but still very informative.

------
raphlinus
David Murray (aka the 8-bit guy) has a plan to build the "Commander X16", a
new 6502 based computer that is philosophically similar to a VIC-20 but has
more RAM (2MB), a higher clock (probably 8 MHz) and an FPGA to do VGA video.
It might not be on the radar of people here because of some odd choices, like
using a Facebook group as the primary discussion forum.

~~~
jmccorm
His project certainly has my attention! Only two things have me concerned
right now: cost (the question of if it can reach scale) and video.

His current choice for a video co-processor "Vera" _excites and concerns me_
in equal measure. At the top-end, it outputs to VGA with a 640x480 bitmap mode
using an an active palette of 256 colors (out of 4096 colors) per pixel. It
supports 128 sprites and interrupts (used to indicate sprite collisions, an
active video line, or vsync). All that sounds great, doesn't it?

The majority of what I don't like is that the video processor is essentially
off of the main bus. The CPU only has access to video through a set of 8
registers (plus interrupt). So it has 128k of private video memory and an
additional 16k for video registers, palette, and sprites.

If I'm reading this correctly, its private video memory won't hold a full
640x480 256 color bitmap image, which would be ~300k. So it seems like you'd
have to load video memory with the second half while it is drawing the first
half (and vice-versa). I'm also wondering if an old-school technical like
page-flipping is really going to be possible here.

EDIT: Or to put it another way, because the video co-processor doesn't have
enough memory to hold the entire image all at once time, and because the video
co-processor cannot access main memory, just to hold a static photo-realistic
image on the screen you're going to have to constantly copy ~300K of pixels
from main memory into video memory... _each and every frame_. If I'm doing my
math right, that'd be more than 36 million operations per second just to pump
the data into the video co-processor? It reads to me like the co-processor
isn't doing a great job of offloading work from the CPU here.

All of these concerns _might_ be dismissed simply by saying "the CPU is much
faster than those other 8-bit platforms you're used to". Assuming that isn't
the case, I'd probably like to see the video co-processor have enough memory
to hold two full pages of bitmapped video. I'd also greatly appreciate it if
they could arrange for direct CPU access through one of their pre-existing
banked memory regions.

Still, I'm eager to see how David's project progresses.

~~~
Max-q
Using 256 color bitmap, select the 320 _200 resolution. 64k for one full
screenbuffer. The 640_ 480 is still useful for sprites and tiles, but I think
it will mostly be used for text.

8 bit computers always have a lot of limitations. And these limitations have
sparked a lot of creativity :)

~~~
jmccorm
> Using 256 color bitmap, select the 320200 resolution. 64k for one full
> screenbuffer.

Based on what I see here, you've got a good explanation:
[https://github.com/FrankBuss/x16-demo/tree/master/assembly](https://github.com/FrankBuss/x16-demo/tree/master/assembly)

Their original image was 64K. They cut it down to 34K (+ 512 bytes) and then
they included it in their binary (rather than loading from a file).

So it seems that David was correct in his explanation. They could only display
about half of a 320x2X0 image because they ran out of low memory.

But it also seems that VERA doesn't have enough video memory to hold a 640x480
8bpp _bitmapped image_ ("Mode 7"). 128K of private video memory just isn't
enough unless they start playing tricks.

> 8 bit computers always have a lot of limitations. And these limitations have
> sparked a lot of creativity :)

I really am curious to find out if they plan on adding more memory or if this
is going to be one of those quirks we'd have to really work to take advantage
of? :)

------
LIV2
Nice!

6502's are fun to play with and relatively easy to put together a system with
one.

There's still quite a community of us building new systems with the 6502 on
the 6502.org forums if anyone is looking for more info re:
programming/hardware, hints and tips etc

~~~
stevekemp
It is nice to see this kind of thing still going on. I've been doing something
similar with a Z80 recently; currently I have a Z80 hooked up to an arduino-
mega, which is faking port-based I/O and RAM read/writes.

When I started my goal was to write some simple code, hosted on the arduino,
then put together a "real" system with EPROM for ROM and proper RAM chips.

Instead I got distracted porting BASIC, FORTH, and similar things to the
working processor. I should get back to it!

I think the Z80 is simpler to get started with than the 6502, when it comes to
physical circuits, as it needs fewer components. (Having RAM refresh built-in,
for example.)

~~~
LIV2
When I started with the 6502 it took a while to get a working, stable system
due to a couple of weird circuit issues (like forgetting to qualify R/W by
PHI2) which wouldn't have been the case if I was using a Z80

Do you know if there is a forum for Z80 homebrew systems?

~~~
linker3000
[https://www.retrobrewcomputers.org/forum/index.php](https://www.retrobrewcomputers.org/forum/index.php)

[https://groups.google.com/forum/#!categories/retro-
comp](https://groups.google.com/forum/#!categories/retro-comp)

[https://groups.google.com/forum/#!forum/rc2014-z80](https://groups.google.com/forum/#!forum/rc2014-z80)

------
mcnichol
Ben Eater is simply the best!

One of the best teachers I have come across. If you are interested in hardware
internals, I would highly recommend him.

I am ecstatic this is a thing and hope it is a massive hit.

------
raverbashing
One thing I "worry"/question about these "vintage" projects is the choice of
processor.

The 6502 wasn't great. The Z80 wasn't great neither but I'be heard it might be
slightly better in some ways

I wonder what would be the best 8bit processor available (or even ditch the 8
bit stuff and go 16bit). Maybe the 8031 series? Maybe a modern one?

~~~
jonsen
[https://en.m.wikipedia.org/wiki/Motorola_6809](https://en.m.wikipedia.org/wiki/Motorola_6809)

~~~
cmrdporcupine
The Hitachi 6309 is even better.

But the problem with the 6809/6309 is that they max out at a clock rate of
3-4mhz and there's no new chips being made.

Whereas WDC & Zilog still manufacture brand new 6502 and Z80 chips, and they
clock way higher. A brand new 6502 can do 20mhz.

So probably for retro projects that want a little more oomph, you're better
off picking a 65816 clocked at 15mhz or so, than a 6809 at 4mhz. The 816 has
relocatable direct page and stack like the 6809, too.

------
bogomipz
Oh this is fantastic! I'm excited to order this. Does anyone know if this kit
will be a new Ben Eater video series or does this kit go along with an
existing set of videos?

~~~
rdc12
New series [1][2] which will be awesome to watch even without buying the kit.

[1] "This series is in progress and more videos are on the way soon!"

[2] "I expect all of the videos will be released by the end of 2019 or
sooner."

------
mmjaa
Another great way to learn 6502 computing: get a retro-computer back up and
running.

I have a suite of Oric-1/Atmos machines that are in use for precisely this
purpose. Its wonderful to return to a simpler era of tooling and methodology,
and the feeling once you get it all up and running and building new apps ..
for 30 year old computers .. is quite rewarding. Feels good to have done
something productive with what would otherwise have become landfill ..

------
sxcurry
I’m currently building Ben’s earlier 8 bit computer. His videos and kits are
great. Can’t wait to get started on the 6502.

------
ngcc_hk
E progmmer no available though. That double the shipping costs or adding 25+%
to the overall cost. Would he have that later?

~~~
mdpye
I built my own using an ardino clone and a couple of shift registers to
provide enough i/o pins. It probably cost less than £5 in parts, offset by 5
or more hours designing and fabricating the thing.

But if you're looking to build a 6502 single board computer, it's actually a
great preparatory project!

I should share the schematics and code, but I'd have to spend some time
polishing them for publication - I built it on a breadboard, so I'm not even
sure if the schematic is accurate.

------
HappyJoy
Holy crow I'm excited. These are high quality and very accessible.

------
snvzz
Fun, but not as much as with a 68000.

The 68008 and the HC models make doing this particularly easy.

~~~
kwoff
When I took an electronics class a couple decades ago, we built a 68k computer
based on
[https://en.wikipedia.org/wiki/The_Art_of_Electronics](https://en.wikipedia.org/wiki/The_Art_of_Electronics)

------
forgotmypw
>You need to enable JavaScript to view this site.

Build a 6502 computer Learn how computers work by building and programming a
computer with the classic 6502 microprocessor. This was the first truly low-
cost microprocessor that started the personal-computing revolution. Versions
of 6502 found their way into the Atari 2600, Apple II, Nintendo Entertainment
System, Commodore 64, Atari Lynx, BBC Micro and many other computers and game
consoles of the era.

In this video series, I'll build a basic 6502 computer with an LCD display and
a few buttons, explain how to program it in assembly, and write a game or two.

Videos This series is in progress and more videos are on the way soon!

27:24 “Hello, world” from scratch on a 6502 Kits If you’re interested in
following along with the videos and building your own 6502 computer, I provide
a kit that includes all of the components.

Please note: In addition to the base kit, you will need:

A 5-volt power supply An EEPROM programmer Also, if you want to follow all of
the experiments and debugging in the videos, I recommend the clock module kit
and an Arduino Mega. The clock module kit also happens to include a 5-volt
power supply.

Note: This kit is designed to go with the video series above which is not yet
complete. The videos are the only instructions for the kit. So if you buy the
kit now, you will need to wait for me to finish producing the rest of the
videos. I expect all of the videos will be released by the end of 2019 or
sooner.

Please see the fine print below, particularly for non-US customers.

Schematics Here's the schematic for the final computer—or at least as far as I
plan to go with the initial series of videos. The kit above includes all the
parts to build this (plus a few extra buttons and LEDs to give you some
options for I/O.)

Schematic of the 6502 computer Data sheets W65C02 W65C22 HD44780 74HC00 Quad
2-input NAND gate 28C256 256K Parallel EEPROM 62256 256K SRAM Parts list Here
are all the parts for the 6502 computer. This list is roughly the same as
what's included in the kit above, in case you only need individual parts or
want to source them from elsewhere.

Qty. Description Sources 3 Breadboard Jameco, Amazon 1 22 AWG Solid Tinned-
Copper Hook-Up Wire Jameco, Amazon 1 W65C02 CPU Jameco 1 W65C22S6TPG-14
Versatile Interface Adapter Jameco 1 AT28C256 EEPROM Jameco 1 AS6C62256 32k
SRAM Jameco 1 16x2 Character LCD Display - White on Blue Jameco 1 74HC00 (Quad
2-input NAND gate) Jameco 1 1Mhz Crystal Oscillator Can Jameco 8 Tact
pushbutton switch Jameco 10 Red LED Jameco 1 10kΩ potentiometer (for LCD panel
contrast) Jameco 10 220Ω resistor Jameco 10 1kΩ resistor Jameco 10 0.1µF
capacitor Jameco You’ll also want to have some way to program the EEPROM. In
the videos I use a TL866II Plus programmer.

The fine print Unless otherwise noted, most orders will ship within a week,
often much sooner.

If you have questions about an order, payment, or shipping, please contact
support@eater.net and include your order number. For technical help assembling
or troubleshooting the kits, please post a question at reddit.com/r/beneater
since it’s difficult for me to answer these individually. I do try to stay
active there.

Non-US customers: Note that all kits ship from California. I’m willing to ship
a box anywhere you want, but the buyer—that’s you—is responsible for any
applicable import duties and local taxes. Please verify with your customs and
taxing authorities before making a purchase to understand what else you may be
required to pay.

Finally, the power supply in kit 1 has a North American style plug. It will
work worldwide because it supports 100-240 volts, but if your country uses a
different type of electrical outlet, you will need to provide a plug adapter
(e.g., something like this).

------
contingencies
Holy crap the linked kits are expensive. Seems to be because certain
components are unavailable for less than ~4x the price of fully integrated
modules containing modern MCUs.

~~~
ddingus
Seriously?

A good kit, with video content and community for under $100 is a steal!

I want one like yesterday. 6502 programming is fun.

Ben is an excellent teacher.

