Close
0%
0%

6502 standalone computer

A minimal 6502 computer that can be programed machine language without PCs

Similar projects worth following
I have developed a minimal 6502 computer that can be programed machine language without PCs. The concept is the following three.
(1) Minimize the number of peripheral standard logic ICs to simplify the circuit.
(2) Manually single instruction execution is possible and the execution address is displayed at that time.
(3) To make the housing strong enough so that anyone other than me can easily operate it.
This computer is based on the PERSEUS-3 described in a project 'PERSEUS-3 6802 homebrew computer'.

1. Address area and switches

The operation panel has been simplified to realize the first concept, and the toggle switches for address setting are 10 bits. So, the memory space is only 1 kbytes. I thought that I could still execute a simple machine language program. Zero page is $ 000 - $ 0FF, stack area is $ 100 - $ 1FF, vector area is converted $FFFA - $FFFF to $3FA - $3FF and the rest are free areas.

2. Address LEDs

The LEDs for address display are also 10 bits, and the status of the address bus is always displayed. In the case of single step operation, the execution address of the instruction is displayed in sequence. Without this function, it is difficult to debug because you cannot see the runaway instruction in single step operation.

3. Data switches and LEDs

The data setting switches are 8 bits. The LEDs on the data bus display the data value of the memory for which the address is set when the CPU is stopped. If you operate the write switch at this time, the status of the data setting switch is written to the memory. When the RUN/HALT switch is set to the RUN side, the CPU goes  from a halt state to normal continuous execution.

4. Circuit

The external interface has an 8-bit parallel write port and a read port. The power supply is a four 1.2 V NiMH AA rechargeable batteries or an external 5 V power supply. The LSIs mounted on the board are R6502A for CPU and HM6116LP-3 for SRAM. Thirteen standard CMOS logic ICs configure a clock generator, 8-bit parallel port, address decoding, and Direct Memory Access(DMA) bus control as shown in the schematic to realize the second concept.

5. Circuit operation

The CPU halt state is performed by setting the ready(RDY) signal to low state with the switch S21. And the single instruction operation is performed by setting the RDY signal to high state until the SYNC signal becomes high state by pushing the switch S22. In the halt state, the CPU IC1 continues to output the execution address to the address bus, so the address LEDs D2-D11 display the execution address. The address bus of the memory IC2 is disconnected from CPU by the 3state buffer IC4 and the Address switches S2-S11 are enabled. When write switch S1 is operated, data switches S12-S19 are connected to the memory IC2 though 3state buffer IC7, and write enable signal is applied to the memory. 

    The RDY signal is set to high state during the CPU reset by the resistor R54. Otherwise, in my case the R6502A had not result in complete correct address progression in subsequent single-step operations. I have confirmed in my testing of four PERSEUS-7s and multiple individual CPU chips that there is a probability that. In this computer it is assumed a user operation that the CPU is in the halt state at power-on and that the program is executed in a single step without ever entering the RUN state. Therefore, I thought that it was important to take countermeasures against this problem. It seems that this control is not necessary for the R65C02. With this circuit, The R6502A and the R65C02 have the same number of dummy steps until the first program instruction is executed in a single step operation after CPU reset.

6. Making 

18 cm x 12 cm x 5 cm aluminum die-cast housing was used to realize the third concept.  It was processed with a hand drill and files. Wiring on the universal board was done by wire wrapping. The switches and LEDs are mounted on the panel of the housing and connected to the main board with two 26p flat cables. First, I made one prototype. Then I made 3 more of the same ones by hand. The making time per unit is about 60 hours. So, including the operation test, it took a total of 4 months.

7. Results

I was able to make a small portable stand-alone 6502 machine language computer. Memory writing with DMA and single instruction operation worked fine. If it was a machine language program of several tens of bytes, I...

Read more »

schematic_1.jpg

Circuit diagram

JPEG Image - 1.14 MB - 07/20/2024 at 01:43

Preview

IMG_0156.JPG

Parallel interface I/O box

JPEG Image - 1.70 MB - 02/20/2021 at 03:00

Preview

IMG_0107.JPG

Side view of the interior

JPEG Image - 1.73 MB - 02/20/2021 at 02:57

Preview

IMG_0105.JPG

Photo of the inside

JPEG Image - 2.75 MB - 02/20/2021 at 02:54

Preview

Source_code_KNIGHT_RIDER-1_1.pdf

Source code of a sample program of LEDs control

Adobe Portable Document Format - 19.08 kB - 11/28/2020 at 12:24

Preview

View all 8 files

  • 1 × R6502AP Microprocessors, Microcontrollers, DSPs / Microprocessors (MPUs)
  • 1 × HM6116LP-3 Memory ICs / Static RAM (SRAM)
  • 2 × 74HC374 Electronic Components / Misc. Electronic Components
  • 1 × 74LS374 Electronic Components / Misc. Electronic Components
  • 4 × 74HC244 Electronic Components / Misc. Electronic Components

View all 11 components

  • 6502 standalone computer log

    Mitsuru Yamada07/20/2024 at 05:24 0 comments

    1. The article was first posted on Nov. 14, 2020

    2. Revised on July 20, 2024

         Added detail description of the countermeasure to the possibility of a reset sequence failure when power is turned on and CPU is reset with CPU stopped in Chapter 5, Circuit operation.

View project log

Enjoy this project?

Share

Discussions

vanhetgoor wrote 09/27/2024 at 08:25 point

I think is it beautifully made. It looks very sharp.

  Are you sure? yes | no

Mitsuru Yamada wrote 10/01/2024 at 01:14 point

Thank you for your comment! It has been four years since I built this computer myself, and the chassis still has a bare metallic sheen. These devices are rarely available on the market, but I think it is a good computer for studying the very basic principle of the CPU.

  Are you sure? yes | no

Edgar Kogler wrote 08/12/2023 at 11:07 point

I really like such projects,

Since I teach Computer Science at a Highschool in Austria (pupils aged 15-18 years) (http://www.gymnasium-am-Augarten.at) I plan to build it myself as an example how computers are programmed at the lowest, electronic level to give an impression what a compiler really does ;-)

Edgar

  Are you sure? yes | no

Mitsuru Yamada wrote 08/12/2023 at 13:17 point

Thank you for your comment. The hardware and software of the latest computers are already highly developed, and I believe that even if people use them for training and learning, it will be difficult for them to get a real feel for the very basic operations. I made this computer so that it can be used for practical training of such basic movements. 

  Are you sure? yes | no

Mitsuru Yamada wrote 11/26/2020 at 12:23 point

I've added  photos the inside of the peripheral keypad unit to #6502 Computer runs calculator 

  Are you sure? yes | no

Alvaro Barcellos wrote 11/25/2020 at 22:26 point

try load forth into it.

  Are you sure? yes | no

Ken Yap wrote 11/22/2020 at 04:52 point

Hmm, where have I seen those aluminium project boxes before? 😉

Sure makes the project look serious and rugged. I used to have Letraset transfer sheets for lettering but it looks like you laser printed on plastic sheet or something like that then cut out the words to stick on the panel. 👍

  Are you sure? yes | no

Mitsuru Yamada wrote 11/22/2020 at 11:43 point

Thanks for your comment! I used to use aluminum die-cast cases from Hammond's products in Canada, but now I use Takachi's in Japan.  This material has no burrs and is easy to process by hand. I always put my electronic work in a housing like this for practical use.

The words on the surface of the panel are created with transparent tape on the stationery label writer(TEPRA, KING CO., LTD.) The labels are attached with practical strength.

  Are you sure? yes | no

Mitsuru Yamada wrote 11/22/2020 at 01:02 point

I have published source code of sample programs for this computer

  Are you sure? yes | no

TheStumbler wrote 11/20/2020 at 23:29 point

this is a cool project, Mitsuru. It reminds me of an old mini-computer I was assigned to use at my part time job when I was in college (Data General Nova 2). But being an 8-bit computer the switch panel is much less intimidating.

Even though front panel switches are awkward to use, as a student I found them invaluable to really understanding the insides of a computer, op codes and machine language / assembly programming.

-Chris 

  Are you sure? yes | no

Mitsuru Yamada wrote 11/22/2020 at 12:05 point

Thanks. I recently learned about the Data General Nova 2 minicomputer on the intenet, and my 6802 computer shown on YouTube is similar to its panel design. No matter how advanced the technology is, I think a computer with binary input and output will be interesting.

  Are you sure? yes | no

[deleted]

[this comment has been deleted]

Mitsuru Yamada wrote 11/18/2020 at 22:29 point

Thanks for watching my post. I've made another home brew computer that digitalizes the frequency dial of an old tube shortwave radio and controls the motor drive of an astronomical telescope.

  Are you sure? yes | no

Mitsuru Yamada wrote 11/18/2020 at 00:08 point

Aluminum die-cast is easy to process without burrs.

  Are you sure? yes | no

rich.quackenbush wrote 11/17/2020 at 16:12 point

Very cool build! I dig the case / switches you chose.

  Are you sure? yes | no

Mitsuru Yamada wrote 11/22/2020 at 12:16 point

Thank you for your comment. Sorry, the above my sentence 'Aluminum die-cast is easy to process without burrs.' was my reply to you. I filled out the form in the wrong place. This type of switch is exactly the same as it was 40 years ago.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates