Tag Archives: 6502

Ben Eater Clock Module on steroids

My previous build of the clock module is as Ben designed. Wellll . Not really, I added some components to change the clock range.

Okay, Ben’s design is awesome. Not because of its technical design. No, you will learn to use the NE555 chip in three ways!
Variable freq, debounce with delay and a flip-flop like switch
I added another function to it. While making my version.
I added a 555 power-on reset pulse part.

I used a perm board (which is shorter than a regular breadboard)
And I moved some components over and added some LEDs/pin headers.
While doing so, I only used 3/4 of the board.

So I added a power-on reset part with a manual push-button. (Partly like the C64 power-on)
I also added the 1Mhz crystal.

Rest of the boards will use JST connectors for the bus-connections.

I am working on big motor controllers and 3D print modelling for clients.

Multiple computer systems in a carrying case.

Test picture of a multiprocessor computer setup.
Using buttons on the right, I want the possibility to change between systems and keyboard settings.
Also, multiple software/OS slots for SDCards will be on the right.

Mockup using a laptop display (eeepc) a bought display controller and a pi2 with Faux86

The lid containing the keyboard has a handle!

After laser cutting a nice front, it could become a nice road warrior hacking station.

I’m going to replace the wireless keyboard, probably with a touch display and a programmable layout for keyboards.
Something like below

Some layouts:

I’ll probably buy this one from waveshare

Info about Faux86

  • 8086/8088, V20, 80186 and limited 286 instruction set.
  • Configurable CPU speeds from 5Mhz up to 100Mhz.
  • Custom Hardware BIOS’s supported.
  • Supports bootable disk images in .img and .raw file format.
  • CGA / EGA / VGA Colour Video emulation, with most modes supported.
  • PC Speaker, Adlib, Soundblaster and Disney SoundSource.
  • UART Com Ports.
  • Standard PC XT Keyboard.
  • Serial Port 2-Button mouse.

LCD matrix idea’s

In previous post I was talking about an esp32 with display for demo’s.
But my friend Erik mentioned a cheap LCD matrix from Ali.

What about creating something cool with that!

My Maze project would look amazing on this!
I can draw walls now!

Or I could make a cool audio visualiser, like the posted WLED version

Ehh .. not posted (well I can’t post everything)

What about a game of life display?
Using a web interface for inputting the start situation of the cells

Conway’s Game of Life is a cellular automaton. It consists of a grid of cells, each of which can be alive or dead. The state of each cell evolves based on simple rules: any live cell with fewer than two live neighbours dies (underpopulation), any live cell with two or three live neighbours survives, and any live cell with more than three live neighbours dies (overpopulation). Additionally, any dead cell with exactly three live neighbours becomes alive (reproduction). This simple set of rules can lead to complex patterns and behaviours.

But back to the demo …

What about a 6502 with 64×64 pixel display!

What would be needed?

  • 6502, with rom and ram
  • Some IO chip, don’t know which one yet
  • The 64×64 pixel matrix
  • A sound solution (simple chip tune player)
  • 3D printed enclosure

Using some libraries and a framework setup, maybe there is a way to make a cool and cheap demo machine

Do you have any suggestions ideas?
Comment or email me!

Adding a VGA terminal to my 6502

Using a LilyGo TTGO ESP32 VGA32, I’m connecting my breadboard 6502 to a serial vga terminal with its own keyboard.

Due to a lot of moving around, new places, new homes I dumped a lot of terminal hardware.
Also are those old terminals too big and use too much power.

I’m going to use this DIY screen.
https://www.henriaanstoot.nl/2021/03/24/broken-or-slow-laptop-screen-still-works/

Using the Libraries from Fabrizio Di Vittorio, named FabGL, you can transform this device into a dumb terminal, game device, VIC-20, a 8086 pc and more.
There are even some projects to turn this into a C64.

But the main thing I want to do: A simple terminal.
(I probably revisit the other options again at a later stage)

My Wozmon bios has bare minimum support for serial communication, so i have to do some bitbanging.
(6502 is using a 6551 ACIA)

Sound from the ESP32 VGA board.

  • Chipset: TTGO Micro32 (ESP32 240Mhz dual core processor)
  • Flash memory: 4MB
  • SRAM: 520KB
  • Built-in Bluetooth
  • Built-in Wi-Fi
  • Supply voltage: 3.3V DC or 5V DC
  • GPIO voltage: 3.3V*
  • USB to serial converter: CP2102 or CH9102F (drivers)
  • VGA connection
  • PS/2: keyboard connection
  • PS/2: mouse connection
  • Built-in Li-ion/Li-Po battery charging circuit: TP4054 chip can charge up to 500mA

Soldering a 6502 PCB

A while ago I started a soldering a 6502 bare SBC.

Note pin 1 is not connected, VPB (vector pull is not supported on this PCB. But i’m planning to design a new one anyway.)

I got it running now.

It has an EPROM with Wozmon and Basic for now.
I have to redo the address decoder, but I like the simple serial interface by Geoffrey. (I hate the PIC18F15Q41, made by Microchip, but still the best minimal option .. for now)

Probably the last time i’ve used a pic was in 1998

Machine code Monitor in ROM on real BBC Acorn Hardware

My BBC Acorn model B is working again. The original monitor is still dead.

Time to play with some machine code and ROMs.

My machine has a NFS rom installed. (NetFS)

Econet was Acorn Computers’s low-cost local area network system, intended for use by schools and small businesses. It was widely used in those areas, and was supported by a large number of different computer and server systems produced both by Acorn and by other companies.

I found a ROM online called Gremlin. It is a 16K rom file. But at the moment I only got some 28C64 (8k) or 28C256 (32k) eeproms.

32k it is. But de beeb having address line A14 floating high, I need to flash the upper 16k of the 32k ROM.

So I made the 16K rom into a 32K using cat

cp Gremlin\ v1.21\ \(1983\)\(Computer\ Concepts\).rom 16k.rom
cat Gremlin\ v1.21\ \(1983\)\(Computer\ Concepts\).rom >> 16k.rom

minipro -w 16k.rom -p AT28C256

I got the rom from this page:
https://acorn.huininga.nl/pub/unsorted/roms/Gremlin%20v1.21%20(1983)(Computer%20Concepts).rom

Below booting straight into the monitor program.

Manual:

6502 and Wozmon

Ben posted a youtube about Wozmon running on his 6502.

In 1976, Steve Wozniac wrote what’s commonly known simply as Wozmon.

Wozmon is a machine-code monitor program written by Wozniak for the Apple 1. In Only 256 bytes ! Being pure 6502 code easily adaptable.
A monitor program allows you to view/edit and run machine code using simple commands.

I’ve got a different setup as Ben’s computer.
But changing the necessary, and it will run on my 6502.

I’m not using rs232 voltage levels (-7 till -25 and +7 till +25 volts).
I’m using a usb serial uart standard 5v leveling stick …

For address decoder see other post

Simplified schematic of my UART/ACIA

Compiling the Wosmon gave me an error, DEC is not a valid opcode for a bare 6502 .. but we have a 65c02.
Solution: Add -c02 extra opcodes

error 1 in line 187 of "wozmon.s": illegal operand types
>                DEC                    ; Decrement A.

# fix .. add -c02
vasm6502_oldstyle -c02 -Fbin -dotdir wozmon.s

Below Apple I Manual with the sourcecode for Wozmon

Converting png images to composite pixels (6502)

Using searle’s design, i can draw pixels using composite video out.

Converting b/w png to hex include files, for usage in vasm I did the following.

#Python script to convert black levels to pixels
from PIL import Image
i = Image.open("fash.png")

pixels = i.load() # this is not a list, nor is it list()'able
width, height = i.size

all_pixels = []
for x in range(width):
    for y in range(height):
        cpixel = pixels[x, y]
        if cpixel[1] == 255:
            s = '\t.db 0x05,' + hex(int(x)) + ',' + hex(int(y))
            print (s)

Running and output example

python3 image.py > out

head out
	.db 0x05,0x1,0x16
	.db 0x05,0x1,0x18
	.db 0x05,0x1,0x19
	.db 0x05,0x2,0x7
	.db 0x05,0x2,0x8
	.db 0x05,0x2,0xc
	.db 0x05,0x2,0xd
	.db 0x05,0x2,0x17
	.db 0x05,0x3,0x5

Control codes and vasm include

01 (01) - Cursor home (Standard ASCII)
04 (04) - Cursor solid
05 (05) - Set graphics pixel (next two bytes = x,y) 
0C (12) - Clear screen (Standard ASCII)
0D (13) - Carriage return (Standard ASCII)
0E (14) - Set column 0 to 79 (2nd byte is the column number) or 0 to 39 for a 40 char line
0F (16) - Set row 0 to 24 (2nd byte is the row number)
1B (27) - ESC - reserved for ANSI sequences

vasm include part:

message: 
	.db 0x01,0x0c   ; home and clear
	.db 0x1b,0x2d   ; disable ansi translation
	include "out"   ; include hex "png"
	.db 0x00        ; end with 0 (part of message print routine)