VOID VsetScreen?( log, phys, mode, modecode )
VOIDP log, phys;
WORD mode, modecode;
Opcode
5 (0x05)
Availability
VsetScreen() is available on systems that have a
_VDO cookie with a value of
0x00030000 or greater. This is the case as of
TOS 4.00. On other systems,
Setscreen() is available and should be used instead — which by the way is the same as using
Vsetscreen() with
mode values other than the
SCR_MODECODE (
3) value.
Parameters
log is the new address at which the
LogicalScreen buffer will start.
phys is the new address at which the
PhysicalScreen buffer will start.
If either
log or
phys is
NULL, the
XBIOS will allocate a new block of memory large enough for the current screen and reset the parameter accordingly. Be warned that only one buffer is allocated at once. In other words, if both
log and
phys are
NULL, then only one video buffer is allocated and both
PhysicalScreen and
LogicalScreen addresses will be set to the new allocated buffer.
mode defines the screen mode to switch to (same as
Getrez()).
Setting
mode to
SCR_MODECODE (
3) will cause
modecode to be used to set the graphic mode (see
VsetMode()? for valid values for this parameter), otherwise
modecode is ignored.
If any of these three parameters is set to
SCR_NOCHANGE (
-1) then that value will be left unchanged.
Binding
move.w modecode,-(sp)
move.w mode,-(sp)
pea phys
pea log
move.w #$05,-(sp)
trap #14
lea 14(sp),sp
Caveats
Changing screen modes with this call does not reinitialize the
AES.
Under genuine
TOS system, the
VDI and
VT52? emulator are, however, correctly reinitialized, but under
NVDI? it looks like the
VDI is not. This leads to the necessity under
NVDI? to hide the mouse (see
v_rmcur()?) before switching to a new video mode, and show it again (see
v_dspcur()?) after switching back to the former mode.
The
AES should not be used after changing screen mode with this call until the former mode is restored.
Comments
TOS 1.00 to 1.04 required that their
PhysicalScreen buffer be on a 256 byte boundary. The
Falcon030? Videl chip (
_VDO cookie of
0x00030000) requires a
LONG boundary. All other Atari computers only require a
WORD boundary.
When switching to a new video mode with the screen reallocation feature, care should be taken that enough free memory is available for the system to allocate the new video buffer.
This call is actually a revised binding of
Setscreen() developed to allow access to the newly available
modecode parameter.
See Also