AgonConsole8 / agon-vdp

Official Firmware for the Agon Console8: ESP32 VDP
MIT License
38 stars 17 forks source link

MODE 7 Unable to list past current page #188

Closed eightbitswide closed 5 months ago

eightbitswide commented 5 months ago

Something changed in MODE 7.

It is currently unable to list past a single page of information. Looks like scroll is broken.

stevesims commented 5 months ago

yup - Mode 7 is slightly broken

there were three problems.

firstly, the new cursor handling system uses a new "direction" parameter when scrolling, and the teletext mode didn't understand the new direction, and thus didn't respond to requests to scroll.

secondly the new way that the cursor is drawn was having a negative interaction with text rendering in the teletext mode, meaning that "delete" wouldn't work. the cursor was drawn with an XOR operation, and teletext mode wasn't changing back to a "set" operation when drawing text.

thirdly the cursor position when drawn after scrolling (when that was fixed) could be incorrect. this is essentially caused by a false assumption made in the code that detects whether to scroll or not - namely it was assuming that there would be a whole number of text rows and columns on the screen, but the teletext mode font is an odd height, so there is effectively a non-whole number of rows, visible as a slight gap under the bottom row of text.

a solution is coming 😁

stevesims commented 5 months ago

fix for MODE 7 is part of #189

this does not completely fix MODE 7, as the underlying teletext mode support only supports scrolling the screen upwards. this means that if you change the cursor behaviour so the cursor's Y axis is inverted, or that the X and Y axis are swapped, then when the cursor reaches the screen edge it will scroll incorrectly

for now, those issues remain... and may continue to remain for some time

stevesims commented 5 months ago

the primary issue with scrolling has now been fixed and released as part of the 2.7.1 release

the remaining issues around how MODE 7 doesn't properly understand the new cursor behaviour, which is essentially a separate issue, are explained as part of #192