Story: E01-S04
Status: observed in VICE x128 3.10; not a final compiler memory map
The Commodore 128 Programmer's Reference Guide documents:
$00D7 (MODE) bit 7: $00 selects the active 40-column editor and $80
selects the active 80-column editor.$FF5F (SWAPPER): switches the C128 editor's 40/80-column local state.$D030 bit 0: set selects 2 MHz and disables VIC video; clear selects 1 MHz
and permits VIC video.$D030 bit 1 is a chip-test facility and must remain clear.Sources:
-40col and -80col.src/platform/display-clock.s follows the policy approved by D112:
CHROUT ($FFD2).$D030 bit 0, perform KERNAL output at 2 MHz, and
then restore 1 MHz before returning to BASIC.The probe does not call SWAPPER because the compiler must not override the user's selected display. SWAPPER remains the documented mechanism if a future, separately approved feature explicitly changes displays.
The verification script boots x128 independently with -40col and -80col.
| Mode | MODE captured | Result | Fast observed | Final $D030 bit 0 |
Trace |
|---|---|---|---|---|---|
| 40-column | $00 |
$44 |
$00 |
$00 |
$1C2E then $1C8C; never $1C49 |
| 80-column | $80 |
$85 |
$01 |
$00 |
$1C3D, $1C49, then $1C8C |
VICE reads $FC from $D030 after fallback because unconnected upper bits
read high; the meaningful speed bit 0 and test bit 1 are both clear. The probe's
final_clock field stores the masked speed bit and is $00 in both modes.
Result bit meanings are probe-local: bit 7 is the 80-column path, bit 6 is the 40-column path, bit 2 proves ordinary semantic RAM markers survived, and bit 0 proves the 2 MHz control bit read back set.
The 40-column screenshot contains:
NOVA128 40 COL KERNAL OK
1MHZ FALLBACK OK
The 80-column screenshot contains:
NOVA128 80 COL KERNAL OK
2MHZ KERNAL IO OK
RESTORED 1MHZ
The probe never reads or writes VDC address/data registers $D600/$D601.
Machine-readable state lives in normal CPU RAM at $1D0F–$1D14; the build
script rejects executable source references to $D600/$D601. In 80-column
mode, only the C128 KERNAL/editor owns display transfer to VDC-local RAM.
This establishes the architectural rule: VDC RAM is display-only and never a home for compiler symbols, semantic tables, stacks, or intermediate data.
From newLang/:
./scripts/build-display-clock.ps1
./scripts/verify-display-clock.ps1
Generated screenshots, remote-monitor trace transcripts, PRG, map, and labels
remain under ignored build/.
Powered by TurnKey Linux.