What is the ABN6502 r2?
The ABN6502 is my 6502 single-board computer. It drives a VGA monitor straight from video RAM through a character ROM and takes a PS/2 keyboard. The r2 firmware is a 32 KiB ROM with a memory monitor on F1.
This emulator runs that real firmware in a browser, so you can try the machine without the board.
Memory map and hardware
$0000–$5FFF: RAM. The stock firmware expects the board's video-memory jumper to put video RAM at$0800.$6000–$600F: 6522 VIA. The registers the stock ROM uses, plus Timer 1 and its IRQ.$7000: VGA control.$8000–$FFFF: the 32 KiB ROM.
- CPU: the same MIT-licensed NMOS 6502 core as my 65uino emulator, at 2 MHz by default.
- Video: the 64×32 character grid in video RAM is drawn through the real 2 KiB character ROM into a 512×256 monochrome-green image. The ROM's text window is narrower than the full grid.
- Keyboard: browser key events become PS/2 set-2 scan codes, inserted at the ROM's scan-code buffer. The original firmware does the character translation.
- RF transceiver: not emulated, matching a board without the RF module fitted.
Things to try
- Type. Click the VGA screen and type. The stock ROM greets you with a WarGames line and has a reply ready.
- F1 memory monitor. Press F1. The first page starts at
$0000and is all zeroes, because reset clears RAM. Press Page Down once to start at$00D8and see the live zero-page variables. Up/Down move 8 bytes, Page Up/Down move a screen, and Esc exits. - F4 BASIC. Press F4 for the bundled Microsoft/OSI BASIC, accept its defaults with Enter twice, or use the new BASIC programs drawer to start it and send an editable example listing at a paced rate.
- Fullscreen. The Fullscreen button uses the browser Fullscreen API where it works, with an in-page fallback for iOS Safari. Because browsers keep Escape for leaving fullscreen, there's an on-screen Esc to ROM button.
- On a phone. Tap the VGA screen to open the phone keyboard. The key drawer has F1–F12, arrows, Page Up/Down, Home, Enter, Backspace and Esc, and arrow and Page keys repeat while held. In portrait fullscreen the ROM's text area is zoomed; Show full VGA shows the whole frame.
- Under the hood. Reset, pause and single-step, and watch the program counter and cycle count.
- Your own ROM. Load a 32 KiB ROM image from your computer. It's read with the browser File API and never uploaded. Reload the page to get the bundled ROM back.
Accuracy and limits
- The keyboard is a high-level bridge. It handles ordinary typing and the ROM's shortcut keys, but the electrical PS/2 and 6522 shift-register timing is not modeled. It is not a cycle-exact PS/2 interface.
- The VIA model covers the registers the stock boot ROM uses, not every 6522 mode.
- The RF module is not emulated.
ROM provenance
The bundled main and character ROMs come from my local abn6502 build dated 2026-01-04 (SHA-256 bea5a8b7a49b486e957e258ca880146261d9389c228c9cea8cbe650b55a73720 and bf9b4069145162fce4604ac26cc730c93471d193bec13b0f2512b85c101e152b). The source is AndersBNielsen/abn6502 at revision 362d3be71346befc8ffa2cc800983913bc3cbf5f, but that build set WIDTH and WIDTH2 to 46 in defines_abn6502.s instead of the committed 40. So the main ROM isn't claimed to be byte-for-byte reproducible from the committed source without that change.
Run it yourself
Download the source ZIP from the page footer and serve the site/ folder with any static HTTP server, for example:
python3 -m http.server 8066 --directory site
Then open http://localhost:8066/. npm test checks a real-ROM boot and the keyboard path.
Licensing
- Emulator code (JavaScript, HTML, CSS, build scripts and tests): MIT.
- The bundled ABN6502 main ROM, character ROM and board photo come from my ABN6502 project and keep its CC BY-NC 4.0 license.
Links
- Both 6502 emulators: https://www.imania.dk/6502-emulators/?language=en
- Practical guide to both: https://www.imania.dk/6502-browser-emulators-guide?language=en
- Live emulator: https://www.imania.dk/abn6502-emulator/
- Emulator source ZIP: https://www.imania.dk/abn6502-emulator/abn6502-emulator-source.zip
- ABN6502 hardware and firmware: https://github.com/AndersBNielsen/abn6502
- The board at iMania: https://www.imania.dk/index.php?cPath=204
- The 65uino emulator, which shares the CPU core: https://www.imania.dk/65uino-emulator/
Anders Nielsen