Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Paged mode tweaks/enhancements #39

Open
stevesims opened this issue Sep 6, 2023 · 1 comment
Open

Paged mode tweaks/enhancements #39

stevesims opened this issue Sep 6, 2023 · 1 comment

Comments

@stevesims
Copy link
Contributor

stevesims commented Sep 6, 2023

Paged mode on the Agon VDP isn't as nice as paged mode on an Acorn machine.

The paged mode on the Agon is currently very simplistic. It just relies on a counter that, when a certain number of cursorDown calls has been made and the text cursor is active, will pause and wait for the shift key. The count is essentially the number of text rows visible on the screen.

The approach taken means that just pressing "return" a sufficient number of times will cause the lock to engage. At this point the user has to either press shift or escape to break the lock. This behaviour is not very user friendly.

Paged mode on Acorn machines was more sophisticated.

When starting from an empty screen, running a simple program to just print row after row, paging kicks in when the final row of the screen has been printed. If enabled, the text cursor is shown flashing at the last printed character.

Pressing Shift then allows the next "page" to be shown, however that will not be a complete screen full. On a screen that shows 32 rows of text 25 new rows will get printed before the paging kicks in again.

When starting such a simple program from a non-empty screen, output will proceed either until the end of the screen has been reached, or until 25 rows have been printed (i.e. it will output between 25 and 32 rows).

The advantage of this approach can be seen when listing a BASIC program. After scrolling you still get to see a few lines that had been at the bottom of the screen, allowing you to better understand the code as you get more context. On an Agon you lose all context as none of the previously shown text is visible any more.

There is also some additional subtle control on Acorn machines over printing and scrolling via the use of ctrl and shift keys. Holding down ctrl introduces a small delay when printing a new row (maybe a couple of VSYNCs?). Pressing shift at the same time as ctrl pauses the scrolling. Release shift and scrolling continues. After pressing ctrl+shift, the row count gets reset, so the paged system will proceed to output another 25 rows. Hold shift whilst paging mode is enabled and scrolling continues until shift is released, whereupon scrolling will stop straight away.

Finally, on an Acorn machine the paging continually resets, so it's never possible to press "return" and have the system be waiting for a shift keypress to unlock the paging.

@stevesims
Copy link
Contributor Author

some of this behaviour should be fairly easy to implement.

the modifying behaviour around the use of ctrl+shift keys should not be hard - it would just rely on reading the keyboard state inside the cursorDown routine

working out how many rows to show before locking is slightly harder, but should also probably not be too difficult to work out.

ensuring that paging continually resets so that the system will never trigger just by the user pressing the "return" (or any other) key is harder. there is likely a way to do this via a timer that will reset the paged row count.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant