-
Notifications
You must be signed in to change notification settings - Fork 0
Changelog
Rudolf Stepan edited this page Jun 20, 2026
·
2 revisions
All notable changes to this project will be documented in this file.
- The
fpga/tree (RTL, simulation, board flows, 6502 firmware) now lives in its own repository, rudolfstepan/6502-sbc-fpga, with its full 85-commit history preserved (exported viagit subtree split). - It is re-linked here as a git submodule at the original
fpga/path, so the directory layout is unchanged. Clone with--recurse-submodules, or rungit submodule update --initafter a plain clone. - The FPGA build still reuses parent ROMs and kernel sources via
../roms/and../../tools/kernel/, so it builds when checked out inside this repo. Removed the now-obsoletefpga/*rules from the top-level.gitignore(they live in the submodule's own.gitignore).
- Fixed the
key[0]pin: the dock's S0 reset button is FPGA pinT10, notT5. The originalT5(and an interimT2attempt) were not the physical button, so no reset button worked at all. Confirmed against Sipeed's own examples —Cam2HDMIand the HDMIdk_videoexample both map reset toT10. - KEY0/S0 is now a debounced, clock-synchronised dual-action reset (in the 54 MHz
clk_sysdomain):-
short press → CPU-only soft reset. The 6502 restarts via its reset vector
while
boot_done, the shadow ROM, and SRAM are preserved — restarts a UART-uploaded program without re-running the SD boot loader. - long press (>1 s) → full board reset (re-runs the SD ROM loader).
-
short press → CPU-only soft reset. The 6502 restarts via its reset vector
while
- Added a
soft_resetinput tosbc_t65_boot_monitor_top;cpu_reset_base_nnow also gates onnot soft_reset, holding only the CPU in reset. - Decoupled the HDMI PLL reset from the button (
reset_n => '1') soclk_syskeeps running during a soft reset and the picture stays up during a full reset. - KEY1/S1 (
T3) is unchanged: enters the UART monitor and holds the CPU.
- Rewrote
read_keyintools/chess/chess.sto read the FPGA PS/2 keyboard register file ($8820STATUS bit 0 = key ready,$8823ASCII) instead of the C-emulator's VIA6522 Port A ($8801/$880D, CA1). The move parser is unchanged — the PS/2 core already returns lowercase letters, digits, Enter ($0D), and Backspace ($08). - Removed the now-unused VIA keyboard init from the reset routine; rebuilt
roms/chess.rom.
- Rewrote
examples/siddemo.basfor the FPGA 4-voice sound chip, which has no note queue: eachPOKE CONTROL,1retriggers the voice immediately. The old demo poked a 36-note theme into one voice with no delays, so only the last note sounded. The new version plays notes sequentially with per-note duration and software-delay pacing (the provensoundtest.baspattern), demonstrating the four ADSR presets, a 3-voice chord, and the Korobeiniki theme.
- Reworked the HDMI/SBC clock tree around one 270 MHz PLL root:
/2generates the 135 MHz TMDS serializer clock,/5generates the 54 MHz SBC clock, and a second/5from the TMDS branch restores the serializer's required 27 MHz pixel clock. - Doubled the T65's maximum effective bus rate from 13.5 MHz to 27 MHz while retaining its proven two-phase synchronous-memory bus protocol.
- Added a registered 54 MHz renderer output stage and a falling-edge handoff into the HDMI path, keeping RGB, sync, and data-enable aligned across the related 54/27 MHz clock boundary.
- Updated all clock-derived parameters: VIC and boot VGA pixel enables, sound phase/envelope timing, PT8211 BCK, UART baud generators, SD low/high-speed SPI, PS/2 timeouts, cursor blink, and boot diagnostics.
- Added T65-only multicycle timing constraints. Final Gowin place-and-route reports zero setup and hold violations at 54 MHz (54.4 MHz post-route Fmax).
- Corrected
key[1]from the incompatibleLVCMOS15declaration toLVCMOS33, matching the bank voltage and removing theCT1136P&R failure.
- Added PETSCII block/line glyph coverage for the C/SDL VIC font at
$60-$7F, matching the FPGA character ROM and making$7Fa full block. - Kept kernel
CHROUTtext-safe by converting lowercase ASCII to uppercase before VRAM writes; raw PETSCII graphics are produced by writing$60-$7Fdirectly to text VRAM. - Reworked
examples/petscii_gfx.basinto a pure$8000VRAMPOKEdemo with short upload-friendly BASIC lines and noPRINT,CHR$,READ,DATA, or string functions. - Fixed active FPGA boot cores so CPU writes to text VRAM are no longer lost when
they overlap VIC bus stealing. A one-byte pending write buffer defers the write
until the first non-steal clock and holds
RDYlow through the commit cycle.
- Fixed a SCROLL infinite-loop bug that caused all three observed symptoms (VGA stop updating after ~18 rows, UART missing linefeed, FOR loop printing corrupted values). Root cause:
roms/kernel.romwas a stale pre-built binary predating the SCROLL and STRPTR fixes intools/kernel/kernel.s. -
SCROLLnow saves and restores A/X/Y. The old code exited with X=COLS=40; CHROUT then stored 40 into CURSOR_X, so every subsequent character immediately re-triggered a scroll. - Moved kernel
STRPTR_LOfrom $EE→$EB andSTRPTR_HIfrom $EF→$EE to avoid the collision with EhBASIC'sDecssbuffer ($EF–$F4), written on everyPRINTof a number. - Rebuilt
roms/kernel.romfrom source. - Added
kernelmake target tofpga/asm/Makefile;fpga-ehbasicandupload-ehbasicnow depend on$(KERNEL_ROM)so the kernel is auto-rebuilt whenkernel.schanges. - Updated
fpga/docs/EHBASIC_SYNTAX_ERROR_ANALYSIS.mdwith final root-cause analysis (Section 12).
- Extended the CONTROL register (offset +5 in each voice block): bits [6:4] now select the waveform played when bit 0 triggers the note. Encoding: 0 = sine (default, fully backward-compatible), 1 = square, 2 = sawtooth, 3 = triangle, 4 = noise (xorshift32 LFSR).
- Added
PI_F/INV_PIconstants and aswitchinaudio_callback()for branchless per-sample waveform generation. Noise uses a per-voice LFSR seeded at first trigger. - Updated
soundchip.hto document the new CONTROL register layout.
- Rewrote
tools/soundtest/soundtest.sas a standalone ~60-second looping song in pure 6502 machine code:- Section A (~29 s): 28-chord ambient progression (Am / F / C / G), four voices with distinct waveforms — Voice 0 triangle lead, Voice 1 sine pad (slow 160 ms attack for wash), Voice 2 triangle inner harmony, Voice 3 sawtooth bass.
- SID-style arpeggio (~5 s × 3 passes): square-wave arpeggios over Am / C / G / F, 12 notes per chord at 100 ms intervals.
- Bridge section B (~17 s): 16-chord progression in Dm / Bb / Am space with Gm and E7 colour chords.
- Refactored loop engine into a shared
ambient_play_enginesubroutine (tail-called from section drivers) to avoid code duplication. - Added
play_ambient_bridgedriver proc for the bridge data table. - Fixed
intro_sweepinfinite-loop bug:delay_25ms_unitsclobbers X (it counts down from 25 internally); the sweep loop used X as its iteration counter, causing it to run forever after the first delay call. Fixed by introducing a dedicated zero-page variablesweep_cnt($05) and replacingDEX / BNEwithDEC sweep_cnt / BNE.
-
make soundtest-romnow runstools/stage_runtime.shafter assembling the ROM, sobin/roms/soundtest.romis always kept in sync without requiring a full emulator relink.
- Added and documented integration of Klaus Dormann's 6502 functional test in the default
make checkpipeline. - Updated README and
docs/ARCHITECTURE.mdto cover the 4-voice sound chip, per-voice waveform selection, full register map for all four voices, the soundtest ROM, and the updatedbin/bundle layout.
- Refreshed project documentation for current architecture and runtime behavior.
- Updated memory-map docs to include fixed VIC register/bitmap regions and SOUND device registers.
- Added explicit chess workflow coverage (
chess.ini, standalone ROM flow) in documentation. - Cleaned obsolete or inconsistent statements across README and docs.
- Initial public release of the 6502 SBC emulator.
- Added a cycle-aware MOS 6502 core with all 151 official opcodes.
- Added configurable SRAM and top-aligned ROM mapping.
- Added MOS 6522 VIA and MOS 6551 ACIA peripheral emulation.
- Added stdio and TCP UART backends.
- Added an interactive monitor/debugger with registers, disassembly, memory dump, stepping, and breakpoints.
- Added ROM helper scripts for hello-world and echo-monitor binaries.
- Added GitHub CI workflow, issue templates, contribution guidelines, security policy, and MIT licensing.
Generated from 6502-sbc-emulator Markdown documentation. FPGA hardware track: 6502-sbc-fpga (FPGA Wiki).