No description
  • C 95.3%
  • Makefile 4.7%
Find a file
2025-05-02 13:03:26 -04:00
inc program react 2025-05-02 12:36:29 -04:00
src program mastermind 2025-05-02 13:03:26 -04:00
.gitignore iniital commit 2025-05-01 12:09:05 -04:00
compile_commands.json main menu + program hello + program uptime + program stubs 2025-05-02 09:22:06 -04:00
link.ld iniital commit 2025-05-01 12:09:05 -04:00
Makefile main menu + program hello + program uptime + program stubs 2025-05-02 09:22:06 -04:00
README.md button input 2025-05-01 20:47:24 -04:00

beater

Code for my Ben Eater 6502 computer


There are a few differences from my computer and the BE6502 (hence the need for a custom target):

  • I do not have the UART chip on my computer.
  • The VIA to character LCD mappings are a little different, which you can see in src/lcd.c.
  • I don't use whatever EEPROM Ben Eater does, I instead have the SST39SF010A. If you want to use make deploy to flash your EEPROM, change the make file appropriately.
  • I have four buttons attached to the VIA chip on pins PA4-PA7, and those buttons are the basis for user input (see src/button.c).

Building

The code is written in C instead of 6502 assembly, meaning you'll need a C compiler. The one I'm using is llvm-mos. It seems to output pretty good stuff, and it also has the whole familiar suite of C tooling since it can output ELF files.

  1. Download and extract the llvm-mos SDK. Put (or symlink) the SDK to a folder called llvm-mos at the root of the project.
  2. make will output a rom image to out/rom.img and an elf file to out/rom.img.elf.
    • make objdump will output a disassembly of the rom elf file, if you're interested in that for whatever reason.
  3. Use minipro or your choice of software to flash the rom to your eeprom.
    • Optionally, you can use make deploy, which will run minipro for you.
  4. Profit.