AgonConsole8 / agon-vdp

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

MODE 7 only able to scroll screen up #192

Closed stevesims closed 4 months ago

stevesims commented 5 months ago

VDP 2.7.0 added full cursor behaviour support, which includes allowing the horizontal and vertical axes to be reversed and/or swapped.

The teletext mode (mode 7) unfortunately does not properly understand this new cursor behaviour.

Testing seems to show that teletext mode appears work correctly when the horizontal axis is reversed. (I say "seems to" as I am currently unsure whether the underlying text buffer is genuinely "correct" when the horizontal axis has been reversed.) Unfortunately other cursor behaviour options can result in changes that mean the screen should scroll in different directions, and those are not supported by the teletext mode.

We therefore need to add support to the teletext mode to support scrolling in the other directions, as per the currently set cursor behaviour.

The scroll function in the teletext instance should accept a direction argument, as per the scrollRegion function, and in a similar manner to scrollRegion for direction values 4-7 it should work out the direction the screen is being scrolled and scroll accordingly

stevesims commented 4 months ago

released in 2.8.0