The screen held the printed text with bit 7 set, so the converter reported question marks and the literal search missed it; masking $80 makes the print check read the VIC-II screen directly, and the driver suite passes through the regression harness. Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>main
| @@ -104,9 +104,10 @@ are diagnostics, and never overwrite an earlier output. | |||||
| - The literal still pointed at the compiler's `gen_text`; the driver now moves | - The literal still pointed at the compiler's `gen_text`; the driver now moves | ||||
| it into `DATA` and relocates the emitted address. The PRG then printed the | it into `DATA` and relocates the emitted address. The PRG then printed the | ||||
| string (screenshot `hello-run.png`). | string (screenshot `hello-run.png`). | ||||
| - Screen-RAM readback through the monitor did not match the visible VIC-II | |||||
| screen, so the automated print check asserts the PRINT call, the DATA bytes | |||||
| and the program's return instead of parsing screen memory. | |||||
| - Screen-RAM readback did contain the text, but with bit 7 set (`$88` for H, | |||||
| `$A0` for space), so the first converter reported `?` and the literal search | |||||
| missed it. The check now masks `$80` before decoding and matches | |||||
| `HELLO FROM NOVA128` on the real VIC-II screen. | |||||
| ## Completion | ## Completion | ||||
| @@ -121,10 +122,12 @@ are diagnostics, and never overwrite an earlier output. | |||||
| EXPECTED, no BAD.PRG, COUNTER.PRG unchanged`; `collision: OUTPUT EXISTS and | EXPECTED, no BAD.PRG, COUNTER.PRG unchanged`; `collision: OUTPUT EXISTS and | ||||
| COUNTER.PRG unchanged`; `injection: prepare-disk.ps1 wrote build/n128c.prg | COUNTER.PRG unchanged`; `injection: prepare-disk.ps1 wrote build/n128c.prg | ||||
| byte-identically as n128c`; `run: generated COUNTER.PRG reported MB_ST_PASS in | byte-identically as n128c`; `run: generated COUNTER.PRG reported MB_ST_PASS in | ||||
| x128`; `print: HELLO.PRG carries PRINT+DATA, calls the runtime, and returns`, | |||||
| with `hello-run.png` showing `HELLO FROM NOVA128` on the VIC-II screen. | |||||
| `tests/regression/harness.tests.ps1` still passes; `driver` remains listed in | |||||
| `tests/regression/suites.ps1`. | |||||
| x128`; `print: HELLO.PRG carries PRINT+DATA, calls the runtime, and shows | |||||
| 'HELLO FROM NOVA128' on screen` (the text is read back from `$0400`, not | |||||
| inferred from the screenshot), with `hello-run.png` as the visual record. | |||||
| `tests/regression/harness.tests.ps1` still passes, and the suite through the | |||||
| harness reports `driver pass 118.3s`, `1 passed, 0 failed`; `driver` remains | |||||
| listed in `tests/regression/suites.ps1`. | |||||
| - Remaining risks: text `print` needs the generated-program print runtime; the | - Remaining risks: text `print` needs the generated-program print runtime; the | ||||
| code buffer stays at 255 bytes, so larger programs fail with a diagnostic | code buffer stays at 255 bytes, so larger programs fail with a diagnostic | ||||
| rather than a partial file; the summary check reads screen RAM through a | rather than a partial file; the summary check reads screen RAM through a | ||||
| @@ -77,7 +77,9 @@ function Get-ScreenText { | |||||
| $ram = Read-Nova128Memory $Session 0x0400 1000 | $ram = Read-Nova128Memory $Session 0x0400 1000 | ||||
| $rows = for ($r = 0; $r -lt 25; $r++) { | $rows = for ($r = 0; $r -lt 25; $r++) { | ||||
| $chars = for ($c = 0; $c -lt 40; $c++) { | $chars = for ($c = 0; $c -lt 40; $c++) { | ||||
| $code = $ram[$r * 40 + $c] | |||||
| # The C128 40-column display stores the printed bytes with bit 7 | |||||
| # set ($88 for H, $A0 for space), so mask it before decoding. | |||||
| $code = $ram[$r * 40 + $c] -band 0x7F | |||||
| if ($code -le 0x1F) { [char]($code + 0x40) } elseif ($code -le 0x3F) { [char]$code } else { '?' } | if ($code -le 0x1F) { [char]($code + 0x40) } elseif ($code -le 0x3F) { [char]$code } else { '?' } | ||||
| } | } | ||||
| -join $chars | -join $chars | ||||
| @@ -260,10 +262,12 @@ $helloSession = Start-Nova128X128 -Autostart $helloPrgPath -Port ($Port + 2) ` | |||||
| -Screenshot (Join-Path $root "hello-run.png") | -Screenshot (Join-Path $root "hello-run.png") | ||||
| try { | try { | ||||
| $helloMb = Wait-Nova128Mailbox $helloSession -TimeoutSeconds 60 | $helloMb = Wait-Nova128Mailbox $helloSession -TimeoutSeconds 60 | ||||
| $helloText = Get-ScreenText $helloSession | |||||
| } finally { | } finally { | ||||
| Stop-Nova128X128 $helloSession | Stop-Nova128X128 $helloSession | ||||
| } | } | ||||
| if ($helloMb[3] -ne 0xA5) { $failures += "HELLO.PRG did not return from its body" } | if ($helloMb[3] -ne 0xA5) { $failures += "HELLO.PRG did not return from its body" } | ||||
| if ($helloText -notmatch "HELLO FROM NOVA128") { $failures += "HELLO.PRG did not print its string" } | |||||
| if ($failures) { throw ("n128c verification failed:`n " + ($failures -join "`n ")) } | if ($failures) { throw ("n128c verification failed:`n " + ($failures -join "`n ")) } | ||||
| Write-Host ("summary: SOURCE COUNTER.N8 / OUTPUT COUNTER.PRG / 0 ERRORS") | Write-Host ("summary: SOURCE COUNTER.N8 / OUTPUT COUNTER.PRG / 0 ERRORS") | ||||
| @@ -273,4 +277,4 @@ Write-Host ("failure: BAD.ERR {0}, no BAD.PRG, COUNTER.PRG unchanged" -f $errTex | |||||
| Write-Host "injection: prepare-disk.ps1 wrote build/n128c.prg byte-identically as n128c" | Write-Host "injection: prepare-disk.ps1 wrote build/n128c.prg byte-identically as n128c" | ||||
| Write-Host "collision: OUTPUT EXISTS and COUNTER.PRG unchanged" | Write-Host "collision: OUTPUT EXISTS and COUNTER.PRG unchanged" | ||||
| Write-Host "run: generated COUNTER.PRG reported MB_ST_PASS in x128" | Write-Host "run: generated COUNTER.PRG reported MB_ST_PASS in x128" | ||||
| Write-Host "print: HELLO.PRG carries PRINT+DATA, calls the runtime, and returns (screenshot hello-run.png)" | |||||
| Write-Host "print: HELLO.PRG carries PRINT+DATA, calls the runtime, and shows 'HELLO FROM NOVA128' on screen" | |||||
Powered by TurnKey Linux.