Topic : TOS - das Betriebssystem
Author :
Version : tos.hyp (5. März 2013)
Subject : Programmieren/Atari
Nodes : 3001
Index Size : 93602
HCP-Version : 5
Compiled on : Atari
@charset : atarist
@lang :
@default : Titel
@help :
@options : +g -i -s +x +zz -t4
@width : 70
View Ref-File4.5.19 Setscreen, ct60 TOS Name: »set screen« - initialisiert den Bildschirm.
Xbiosnummer: 5
Deklaration: void Setscreen( void *par1, void *par2, int16_t rez,
int16_t command );
Beschreibung: Diese XBIOS-Routine entspricht der Funktion Setscreen allerdings mit einem zusätzlichen Parameter und dient
dazu, Auflösung und Bildschirmspeicheradressen zu
verändern.
Parameter Bedeutung
par1 Je nach Funktion, s.u.
par2 Je nach Funktion, s.u.
rez immer 0x564E ('VN' für Vsetscreen New)
command Kommando
Folgende Werte sind für command definiert:
CMD_GETMODE (0) Getting current mode
int32_t mode;
Setscreen(-1,&mode,0x564E,CMD_GETMODE);
CMD_SETMODE (1) Set new graphic mode
int32_t mode=0x1023 /* 800*608*16 */
Setscreen(-1,mode,0x564E,CMD_SETMODE)
This function is identical to
Vsetscreen(0,0,3,modecode);
BIOS and VDI will be initialised. Not
the AES.
CMD_GETINFO (2) Get screen info structure for mode
SCREENINFO si;
si.size = sizeof(SCREENINFO); /* Structure size has to be set */
si.devID =0x1022; /* ID of the mode or 0 for current mode */
si.scrFlags=0; /* status of the operation */
Setscreen(-1,&si,0x564E,CMD_GETINFO);
if(si.scrFlags & SCRINFO_OK)
puts("OK");
else
puts("Error");
CMD_ALLOCPAGE (3) Allocate screenpage
int32_t adr=0; /* Frame address or -1 */
Setscreen(-1,mode,0x564E,CMD_ALLOCPAGE);
if(adr)
puts("OK");
else
puts("Error");
This only allocates one page. A further
call will only return the frame address.
CMD_FREEPAGE (4) Release screenpage
Setscreen(-1,-1,0x564E,CMD_FREEPAGE)
The graphics card memory will be
released again. If the second page had
still been active the call will switch
back to the first page with Logbase and
Physbase set.
CMD_FLIPPAGE (5) Switch to screenpage
Setscreen(-1,-1,0x564E,CMD_FLIPPAGE)
Will switch to the second screenpage.
Logbase and Physbase will be set.
CMD_ALLOCMEM (6) Allocate memory on the graphics card
SCRMEMBLK blk;
blk.size=sizeof(SCRMEMBLK);
blk.blk_y=200; /* alloc a block of 200 lines*/
Setscreen(-1,&blk,0x564E,CMD_ALLOCMEM);
if(blk.blk_start)
puts("OK");
else
puts("Out of memory");
The width of the block is currently
always the width of the virtual screen.
For the hardware functions this block
will be like a screen (0,0,blk_w,blk_h),
the coordinates start in the top left
corner (0,0). It will be internally
recalculated.
CMD_FREEMEM (7) Release graphics card memory
Setscreen(-1,&blk,0x564E,CMD_FREEMEM)
blk of the block to be released.
CMD_SETADR (8) Set screen to fixed address
int32_t logbase=blk.blk_start; /* logical address or -1 */
int32_t physbase=blk.blk_start; /* physical address or -1 */
Setscreen(logbase,physbase,0x564E,CMD_SETADR);
CMD_ENUMMODES (9) Requests all available modes, since
13.01.2000
int32_t cdecl enumfunc(SCREENINFO *inf,int32_t flag)
{
printf("%s\n",inf->name);
return ENUMMODE_CONT;
}
Setscreen(-1,&enumfunc,0x564E,CMD_ENUMMODES);
The function "enumfunc" will be called
once for every available mode.
ENUMMODE_EXIT (0) will cancel
CMD_ENUMMODES. ENUMMODE_CONT (1) will
continue. The parameters are handed over
to the stack using the C standard.
CMD_TESTMODE (10) Test a graphic mode
int32_t modecode=VESA_600+HORFLAG2+VGA+COL80+BPS32; /* 800*600*16M */
Setscreen(-1,modecode,0x564E,CMD_TESTMODE);
Only the BIOS is initialised, and a
screen test arrives with colored wide
lines.
This function not exist inside the
MilanTOS.
CMD_COPYPAGE (11) Copy screenpage
Vsetscreen(-1,0,0x564E,CMD_COPYPAGE);
Copy first screenpage to second screenpage
Vsetscreen(-1,1,0x564E,CMD_COPYPAGE);
Copy second screenpage to first screenpage
This function not exist inside the
MilanTOS.
Ergebnis: Nothing (or current modecode in TOS mode)
Verfügbar: Only valid with internal TOS Radeon driver (PCI.HEX)
for the ct60 (2007-01-24).
Gruppe: Bildschirmfunktionen Querverweis: SetscreenVSetscreenSetscreen, Milan