Overscan

Por Metalion

Paragon (1155)

Imagen del Metalion

05-06-2020, 21:00

OK, so from what I gathered, to make an overscan in MSX2, you :
. put the screen in 212 lines
. put an HBLANK interruption at line 204
. switch to 192 lines
and that removes the border ...

But how and when do you switch back for the next frame ?

Login sesión o register para postear comentarios

Por Grauw

Ascended (9181)

Imagen del Grauw

05-06-2020, 23:11

You switch to 192 lines anywhere from line 192 up to but not including line 212. You switch back on or after line 212.

In my game engine I switch to 192 lines on line 210 and I switch back on line 212. Switching on line 211 and back on 212 also works, not sure why I opted for the former.

Por Metalion

Paragon (1155)

Imagen del Metalion

06-06-2020, 00:07

OK, thanks.

And is there a way to control and "close" the overscan at any given line ?
Let's say, for example,that you only want an overscan of 16 pixels from 212 to 228.

Maybe by blanking the screen manually by bit 6 in R#1 ?

And how does overscan affect VBLANK interruption ?

Por Grauw

Ascended (9181)

Imagen del Grauw

06-06-2020, 00:17

You can blank, yes, however it won’t un-blank automatically on line 0. The overscan completely bypasses the automatic vertical blanking, so there is no vertical blank interrupt. Note that there is still a forced blanking during vertical sync, so at 60 Hz exactly 243 lines are visible (openMSX and LCD displays via OSSC cut off 3 lines and show 240).

At 60 Hz you can’t set line interrupts on lines 244-261. At 50 Hz you can’t set line interrupts on lines 256-312. If you want to un-blank beyond those lines, you could set an interrupt at the last possible line and then poll HR until you reach the desired line.

In my game I’ve made the choice to use all 243 lines at 60 Hz, and to not support 50 Hz since the game is for MSX2+ (all Japanese 60 Hz computers), which saves me the hassle of having to blank manually.

Por Metalion

Paragon (1155)

Imagen del Metalion

06-06-2020, 00:28

Thanks for the explanation, Grauw.
So overscan means you loose VBLANK interrupt ?
And do not execute BIOS ISR ?

Although I guess you can replace it with an HBLANK interrupt at your last line...

Por Grauw

Ascended (9181)

Imagen del Grauw

06-06-2020, 00:33

Indeed.