nanochess/IntyBASIC

How to blank the screen

Closed this issue · 6 comments

Question about intybasic
Is it possible to blank the screen and display the border color on the screen?
The stic will blank the screen if the CPU does not access a stic register during Isr.
How to use intybasic to get the same result?

Related to this, is it possible to change the background color shown by the tiles by rewriting only the color stack using the Mode command?

A really dirty way to do this:

POKE $100, PEEK($100) + 3 ' Disable display

POKE $100, PEEK($100) - 3 ' Re-enable display

Note: Double check that $100 is < $FD before attempting.

Actually, hold on... that'll crash your program with the default intybasic_epilogue, making it unsuitable.

The issue is that the _int_vector enables the display as its first step:

_int_vector:     PROC
        BEGIN
        MVO     R0,     $20     ; Activates display

My +3/-3 hack above, though, skips the BEGIN statement, which is really PSHR R5 in disguise.

Probably in the next releases it could be easily added a couple of commands to enable and disable the screen.

Anyway, I was also trying to change the color stack values with the Mode command, but the new values seem displayed incorrectly. I have to double check as I could have incurred in the restrictions on background colors in color stack mode.

There's no restriction on colors in the stack, so there has to be some sort of limitation in changing stack values with the Mode command (maybe my code is too fast).

Anyway I have a few more workarounds to test in order to avoid mode command to make the screen flash.

The MODE statement can be used for flashing background color, just be sure you don't use PRINT COLOR before the next frame. Also I've swapped the first two instructions of the video interrupt handler in intybasic_epilogue.asm to make possible the intvnut comment, not considering yet a statement for it.

After mode I was using Print before the wait.
Adding an extra wait solved the issue