Sfoglia il codice sorgente

Check generated print on the real screen.

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
Daniel Covington 3 giorni fa
parent
commit
8f8cf00c1a
2 ha cambiato i file con 16 aggiunte e 9 eliminazioni
  1. +10
    -7
      newLang/planning/claims/E07-S05.md
  2. +6
    -2
      newLang/scripts/verify-driver-test.ps1

+ 10
- 7
newLang/planning/claims/E07-S05.md Vedi File

@@ -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
it into `DATA` and relocates the emitted address. The PRG then printed the
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

@@ -121,10 +122,12 @@ are diagnostics, and never overwrite an earlier output.
EXPECTED, no BAD.PRG, COUNTER.PRG unchanged`; `collision: OUTPUT EXISTS and
COUNTER.PRG unchanged`; `injection: prepare-disk.ps1 wrote build/n128c.prg
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
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


+ 6
- 2
newLang/scripts/verify-driver-test.ps1 Vedi File

@@ -77,7 +77,9 @@ function Get-ScreenText {
$ram = Read-Nova128Memory $Session 0x0400 1000
$rows = for ($r = 0; $r -lt 25; $r++) {
$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 { '?' }
}
-join $chars
@@ -260,10 +262,12 @@ $helloSession = Start-Nova128X128 -Autostart $helloPrgPath -Port ($Port + 2) `
-Screenshot (Join-Path $root "hello-run.png")
try {
$helloMb = Wait-Nova128Mailbox $helloSession -TimeoutSeconds 60
$helloText = Get-ScreenText $helloSession
} finally {
Stop-Nova128X128 $helloSession
}
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 ")) }
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 "collision: OUTPUT EXISTS and COUNTER.PRG unchanged"
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"

Loading…
Annulla
Salva

Powered by TurnKey Linux.