zdebel

zdebel

Joined 2 years ago

zdebel
Last active 3 hours ago
0 0 1

P65 BASIC

The P65 comes with a BASIC in ROM, in the style of Applesoft: Microsoft BASIC with floating point numbers (9 digits), strings, arrays, and a set of extra commands for the P65's graphics chip (TMS9918), the flash storage and the machine itself. It descends from mist64/msbasic with Applesoft-compatible commands added (see the notes at the top of rom/fpp65.a65).

This document describes every command and function. All examples with a result below them were run on the real ROM in the emulator, and are checked again by python tools/basic_doc.py

zdebel
Last active 1 day ago
0 0 1
1 ; ============================================================================
2 ; P65 VDP demo: waving rolling rainbow, sine-bouncing sprite text, smooth
3 ; scroller. Standalone ROM ($8100..$FFFF), assemble with tools/asm2bin.sh.
4 ;
5 ; * Graphics I mode. The rainbow is 24 solid tile groups; the colour table is
6 ; rotated every few frames (rolling) and every row of the name table starts
7 ; at a different column from a sine table (waving).
8 ; * The letters are 10 magnified 8x8 sprites on a sine wave, colours cycling.
9 ; The wave is chosen so that never more than 4 sprites share a scanline.
10 ; * The scroller redefines 32 tile patterns every frame: a 256x8 bit buffer is
zdebel
Last active 2 days ago
0 0 1
1 ; VSYNC interrupt demo.
2 ; The VDP raises its frame flag 60 times a second. With bit 5 of VDP
3 ; register 1 set it also pulls the CPU's /IRQ low until $8003 is read.
4 ; The 3 LEDs show bits 4..6 of a frame counter (about 3.75 Hz binary count).
5 ;
6 ; The IRQ line is released a little AFTER the status read (it goes through the
7 ; I2C expander), so the handler can be entered again with bit 7 clear: always
8 ; test bit 7 of the status and ignore the interrupt when it is clear.
9
10 .setcpu "65C02"
zdebel
0 0 1

Portable65

A portable 8-bit computer built around a real WDC 65C02 CPU, where a Raspberry Pi Pico (RP2040) plays “everything else”: memory, a TMS9918 video chip, keyboard and clock generator. This description is based on analysis of the code in Portable65.zip (files dated February–October 2024).

1. Idea2. Hardware3. Memory map4. Bus & PIO5. Cores6. Keyboard7. Video8. ROM & BASIC9. Tools10. Files11. Issues12. Getting back to work

1. Project idea

A real 65C02 is wired directly to the Pico’s GPIO. The Pico does not emulate the CPU. Instead it emulates everything around it, cycle by cycle, in real time:

zdebel
Last active 2 weeks ago
0 0 1

Universal DOS Game Reconstruction Playbook

A Game-Agnostic Engineering Guide to Bit-Exact (1:1) Clean-Room Reverse Engineering, Differential CPU Harnessing, and Modern Recompilation


1. Core Philosophy: Bit-Exact Clean-Room Re-engineering

Porting a legacy DOS title to modern architectures (Python, C++, Rust, WebAssembly) typically falls into one of two paradigms:

  1. Approximate Recreation ("By Eye"): Recreating physics, AI, and rules by playing the game in DOSBox or reading high-level disassembly.