¿Why The 20c?

Episode

Hello, welcome to this new series about the 20C, a modular computer with a very simple architecture designed from the ground up to learn and experiment.


Let's see together how to learn more easily how a computer works in depth, how to program it in assembly language and what happens electrically inside the computer with each line of our programs. .


Learning is a pleasure

I always thought that learning is a pleasure, and one of the things that always fascinated me as a child, were computers, especially the Commodore 64. I always wanted to learn how it worked but without fail every time I read a book and I got started into the binary or hexadecimal systems or even how to address memory I found things so complicated that I stopped trying to understand it. 


When I grew up I asked myself the question: How does a computer receive an instruction to do something, How can a software program be transformed into electrical impulses that cause something physical to make a mathematical operation or write something on a screen?


Searching for this answer I found one of our modern heroes, Ben Eater, who has a YouTube channel where he explains step by step how this works, but nothing specific to the Commodore 64.

Humble begginings


I started by understanding how one part of a computer worked, its CPU or central unit where most of the processing happens. 


In order to understand this, I put together breadboard models, stripped cables, soldered, desoldered and was left with a very good model but a little hard to explain.

To Teach is to Learn


To consolidate what I had learned I did two things:

 

The first was to film each step I had done to assemble the model and then shared it on my YouTube channel (@osolabs) in episodes of about an hour in length where I compared the MOS 6502 CPU against the MOS 6510 CPU.


The second thing I did was write detailed articles explaining the theory behind what we were seeing in the video. I published both the articles and the videos here on the osolabs.tech site and on EspacioTEC blog (at the time of publication 17 articles some of up to 50 pages)


Here you can find the videos (Spanish wuth English subtitles):

6502 vs 6510 estudio detallado y comparación - YouTube 


And the articles (This series still in Spanish but translating it):


https://blog.espaciotec.com.ar/c64-a-fondo-indice/ 


The series + English Articles also at the Osolabs web site (here):


https://www.osolabs.tech/6502vs6510  



Stripping wires like a demon


I realized that every time I wanted to learn something new about the computer, try a new chip or put in a new keyboard, I had to do several things:



Start cutting and stripping cables, lots of cables, to be able to carry out the experiment, at least 40 cables, usually closer to 60 if we count the additional components we have per IC, and that's not the end but just the beginning of troubleshooting.


Troubleshooting


To check in detail that each cable connection is sound, that it makes contact with the breadboard, that while I am testing a cable has not come out from somewhere else. Many times I had spent days testing and modifying a machine language program that did not work when the problem was that an address bus cable had come out, ruining the experiment.


Other times, having everything perfect, a classic thing happened to me: reversing the +5v with the Ground connectors, or connecting 5 volts to an output-only pin!! running the risk of burning the chip. Those eternal 5 seconds of wishing that the IC was still ok and not burnt! 


When something we want to test depends on so many parts of the computer working (CPU, RAM, ROM, I/O, CLOCK), etc., the setup time for each new experiment is exponential until all parts are connected. 


For it to work all the time I had to have the model assembled and in a permanent location because if I wanted to start from scratch it would take forever to put everything back together as I keep adding new modules to carry out new experiments.


If I wanted to avoid all that mess, there are single board computers with everything and anything in them, but most have zero expansion possibilities and zero flexibility.


Clearly there had to be an easier way to learn. There had to be a better way to explain to someone else how a computer works, and a better way to build your own 8-bit computer.  

The 20c

Since I couldn't find a computer on the market that was simple, flexible and modular enough, I created one and called it The20c. It has three foundational characteristics:



I chose a very simple architecture that is based on MOS Technologies' 6502 family of processors, used in computers such as the Commodore 64, the Apple 2 and the Atari 2600. 


It is modular since it has a module for each chip that we are going to use so that it is easy to identify the function of each of them, each module being OpenSource so that anyone can manufacture and modify it while learning how it works.


It is easy to carry out experiments since each module is a square of 6x6 inches ideal for placing a breadboard (measuring 6,5 inches) next to it and using it to carry out simple experiments.


The 20c is a learning platform consisting on hardware, articles and videos created to learn about computer architecture


The articles


In the articles there we will find the theoretical framework for the architecture in general and each of its components, here we will see things such as what each pin of the ICs are used for (the pinout), what is the internal architecture of the registers they have and what functions each one performs. 


The videos


In the videos we develop the experiments for each part of the computer. For example, we can use two different CPU models, connect them to a protocol analyzer, add some LEDs or other devices and show how to read from the RAM and ROM step by step, electrically comparing what happens in the hardware simultaneously with what happens in the program we have created.


The Hardware


The hardware consists of interchangeable modules that closely reflect each part of a computer's architecture. We have modules for all parts of the architecture and for each part we have several alternatives to be able to combine and analyze different integrations.

If I want to see how a Commodore 64 works, I have specific modules that reflect its components, such as a 6510 CPU or a CIA 6526 I/O device. To test an Atari 2600, we have 6507, RIOT and TIA CPU modules.


The 20c has all the necessary modules to learn about our 6502-based architecture such as:






Having different modules allows me to make the combination that I require in my experiment, always being sure that I can connect the chip the right way respecting the expected pinout every time using the right socket.


Each module has a single function to easily explain the operation of the computer, you can clearly distinguish between the CPU, RAM, ROM, the data and address buses that connect the equipment and the input and output interfaces.


Each part of the module is clearly labeled by indicating the name of each pin and connector and having the connections between the different components of the same module clearly identified through the PCB traces.



Conections


With the 20c I can connect each component to its corresponding module knowing that each pin will be correctly plugged, always making contact and not expecting a cable to make a false contact. With the CONNECTOR you can easily connect each module through the data and address buses.


Each module has only one way to connect its internal components, clearly labeled with information on what each pin of the chip and each connection is for.



We use headers that accept dupont type jumper wires that you do not need to strip or cut ad they come ready made in different lenghts. If you do not want to use so many cables we have a special module called CONNECTOR that connect to modules address and data buses.

To experiment, size matters


Each module has a size of 6 by 6 inches so you can easily experiment with a breadboard on any size with space to spare. 


When I want to test a new chip using a breadboard with the 20c I can carry out the experiment in a controlled way knowing that all the connections to the rest of the computer are stable since all the other chips ,needed for the experiment to work, namely cpu, ram, rom, peripheral connectors (via / cia / pia), screens, keyboards and input output devices are well connected, each in its module.


The 20c can be attached horizontally on a table to clearly see its components or as a tower to take up less space.


The Accessories


With the combination of these modules we can build a complete computer that allows us to study the architecture of a computer in detail. For our experiments many times we will add some extras:



CABLES

These are of the Male/Male Dupont jumper type to connect the different parts, or you can use the CONNECTOR module so you do not have to use cables.


DC power supply

An DC power supply that gives us 5 Volts with 2.5 amperes.


BREADBOARD

To perform experiments with electronic components that are not part of the computer


ELECTRONIC COMPONENTS to Experiment with

LEDs, resistors, LCD displays, integrated circuits and others that we want to test in our experiments.


ARDUINO MEGA

In case we want to use it as a Protocol Analyzer and see what happens inside our computer


EEPROM WRITER

Which will allow us to record our programs in the EEPROM of our 20c computer.



Why Open Source


I owe much of what I learned about the 6502, the Commodore and computing in general to the Public University (hello UTN!!) and to thousands of hours of video and millions of words from people who wrote articles on their blogs, forums, The Internet Archive, and Social media groups on Facebook, Twitter and WhatsApp. All these people disinterestedly, or rather interested more than anything in disseminating knowledge, shared their hours of research with me and the world.


To add to these efforts, 20c is Open Source, with each episode while we talk about a module, its IC and the experiments we can carry, we will also talk about its circuit, how the PCB was created with diagrams included and how it is sent to manufacture. The Gerber files to create the board will be available on the OsoLabs.tech github after each episode (https://github.com/osolabstech/The20c/).



To Learn the right way


Since I started desinging and using The 20c, I am able to better express my love for computerts and it inner workings, basing everything on first principles and developing the experiments from there.


I invito you to join me in the voyage of fun learning, reading the articles, seeing the videos and building your own 20c



Visual Studies


If you prefer watching a video to reading, here we have the videos! Spanish audio with English captioning

References

Here you can find a few links to keep learning:


WEBSITE


The Osolabs.tech site with all articles and videos.


OsoLabs.tech 


VIDEOS


Here the video corresponding to this episode and the list to all the series.


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


https://www.osolabs.tech/the20c 


ARTICLES


Here you can find all articles about the 20c in English:


https://www.osolabs.tech/english/the-20c 



CODE


Here you can find all the examples of coding used in the videos:


https://github.com/osolabstech/The20c/ 



OTHER RESOURCES


And as usual the Ben Eater 6502's series which is amazing. 


Build a 6502 computer | Ben Eater 


And the series comparing the 6502 against the 6510, videos and articles.


https://www.osolabs.tech/6502vs6510 


6502 vs 6510 estudio detallado y comparación - YouTube 


C64 a Fondo – Indice