Reading of 6502/65816 CPU Registers by a PC-based Debugger
Modern microcontrollers and microprocessors have built-in facilities for external debuggers to read/write registers, set breakpoints and generally fully control the CPU. This is one of the main usecases of the standard JTAG interface. The 6502 and 65816 CPUs were created more than a decade before the first version of JTAG was even defined. They contain no support for external debuggers whatsoever.
To overcome the lack of debugger support, the system bus controller “NORA” in the X65 computer (link to GIT repository; photo below) implements the necessary functions for a debugger running on a host PC (with Linux or Windows) and connected over the USB-C port. With this support in NORA a debugger can control the 6502/65816 CPU at the instruction level.
Single-Board version of X65, now on Hackaday
In the last 2 months I have re-done my X65 double-decker computer into a Single Board Computer (SBC).
The single-board version fixes some of the electrical problems I had on the first version and it has way better signal integrity thanks to the 4-layer PCB. Other than that, the feature-set is basically identical.
-
added the mono speaker with volume control.
-
added (Olimex) UEXT connector - 2x5 pins connected to the NORA FPGA.
Differences between the 65C02 and 65C816 Processors in 8-bit Mode
In X65 the assembled CPU is either the 8-bit W65C02S or 16-bit W65C816S. The W65C816S is (partially) compatible with W65C02S. This page summarizes the differences from the low-level hardware point of view and in the case that the 65C816 is running in the 8-bit Emulation Mode.
These two photos shows the processors assembled on X65 main board:
Processor Pinout Comparison
Both processors are available in the same QFP-44 package, so they could be assembled alternatively on the same PCB.
AURA FPGA: The replacement of YM2151
This document discusses the FM sound synthesis in the Commander X16 and in my x65 computer.
Sound in Commander X16
Sound in Commander X16 is generated by two sources that are mixed together:
1) by the Programmable Sound Generator (PSG) in VERA FPGA, and
- by the MIDI FM-synthesis chip YM2151.
The following picture is a block diagram of the sound subsystem in C’X16:

The PSG in VERA FPGA is a stereo sound generator loosely based on SID. It supports 16 channels (voices) and PCM playback. There is no ADSR or filters. This must be provided by software. The PSG is an integral part of VERA FPGA user logic that also generates the VGA video output. MIDI-like sound synthesis is provided by YM2151. Yamaha called it an FM operator Type-M (OPM). This is how the chip looked like:
SNES Controller Mess
SNES Controllers typically look like this:
SNES controller is a cheap and easy way how to add a joystick interface to a DIY project. One controller can be cheaply had from aliexpress or similar for around 2 USD.
The controller has just 12 digital (on/off) buttons organized in various patterns, as you see in the photo: D-pad, ABXY buttons, two shoulder buttons, start and select. There are no analog interfaces, no LEDs etc.
Milestone: X16 ROM BASIC runs the first program!
My Open-X65 project achieved a milestone: the unmodified X16 ROM can be loaded and runs! I manually typed in a BASIC maze program, which draws some ASCI graphics:
Open-X65 GIT Repository
The Open-X65 GIT repository is now public:
Note: this is not a release! The project is very much a work-in-progress. You have been warned ;-)
OpenX65 part-way assembled
Since the first post a lot of happened:
-
Motherboard PCB (bottom) has arrived, it is now part-way assembled with components and working quite well. First test-SW (a few instructions in a loop) is running OK.
-
I designed the second PCB (top) with video (VERA), audio (AURA - FM synth) and ethernet port. This was also manufactured, part-way assembled and now I have the first VGA video output.
My new 65C02-based retro-computer: OpenX65
I am starting a new hobby project called X65: I intend to create an open-source computer based on the “vintage” 6502 processor, which is still in production as the W65C02. The original 6502 was used in many home personal computers of the ’80s: Commodore, Atari, Apple II and so on. My computer will be called OpenX65.
Features as planned:
-
use W65C02 and (optionally) W65C816 (the 16-bit version) CPU
-
software compatibility with the Commander X16: a modern retro computer, developped by the 8-bit Guy
Initial release of mywayback
Mywayback is a complete rewrite of my previous timeback archival tool. It is now available on the github: https://github.com/jsyk/mywayback
Main features:
- Python 3.x in Windows (with NTFS-only) and Linux. Requires the package sortedcontainers.
- Automatic deduplication of source files using SHA256
- Hashes of the files are stored in a hash-cache under the target directory, and reused on next run
- Each run produces a new snapshot view of the backed up data with the current date and time.









