There's a rise in interest in building simple 8-bit systems to teach people the fundamentals of how computers work. Which is great.

But it can be a pain to order and assemble the parts. So I started an in-browser simulator of a basic 6502-based system to make life easier
This emulates, down to individual cycles, a 6502 CPU, 16KB of ROM, 16KB of RAM, a VIA interface chip, and a simple LCD screen. It's work in progress. Right now it:
* Starts via the reset vector
* Initializes the VIA
* Writes 'Hi ' to the screen
* Increments a counter
* Loops
See: https://editor.p5js.org/diodesign/full/l1hndGSAK

Drag the slider to change the speed.

Code: https://editor.p5js.org/diodesign/sketches/l1hndGSAK

It needs tidying and finishing; LDA, STA, INC, JMP are implemented so far. If there's interest, I'll finish it

It's inspired by Ben Eater's 6502 project: https://eater.net/6502 
The memory map is:
0x0000 - 0x3FFF: 16KB RAM

0x4000: LCD data register via VIA ORB register
0x4001: LCD control register via VIA ORA register
(toggle bit 0 to read and display character at 0x4000)

0x4002: VIA DIRB register
0x4003: VIA DIRA register

0xC000 - 0xFFFF: 16KB ROM
You can follow @diodesign.
Tip: mention @twtextapp on a Twitter thread with the keyword “unroll” to get a link to it.

Latest Threads Unrolled: