FNX6809 GraphicsVTIOCalls

From F256 Foenix
Jump to navigationJump to search

Graphics Summary[edit | edit source]

Use the fstatus command in Level 2 to see the current status of the graphics registers.


There is a default clut memory module included called xtclut in CMDS. This has the xterm colors according to this chart

vtio Get/Set Stat Calls[edit | edit source]

SS.AScrn[edit | edit source]

Allocate a bitmap screen

Entry: R$Y = bitmap# (0-2)
       R$X = screentype (0=320x240, 1=320x200)
Exit:  B = A non-zero error code.
      CC = Carry flag clear to indicate success
       X = Starting Page# of bitmap address

SS.DScrn[edit | edit source]

Display Screen Settings

Set MCR to display text or graphics or both

Entry: R$X = Vicky_MCR Low Byte
       R$Y = Vicky_MCR High Byte
Exit:  Nothing. This just sets the register and updates driver variables

VICKY MASTER CONTROL REGISTER to enable graphics and capabilities

| 7 |   6   |    5   |   4  |    3   |   2   |   1   |   0  |
| X | GAMMA | SPRITE | TILE | BITMAP | GRAPH | OVRLY | TEXT |
|   -----   | FON_SET|FON_OV| MON_SLP| DBL_Y | DBL_X | CLK70|
$FFC0 MASTER_CTRL_REG_L, MASTER_CTRL_REG_H

********************************************************************
* vtio graphics constants (in f256.d)
********************************************************************
* Constants used in SS.DScrn to set the display screen type
FX_GAM             equ       %01000000              Gamma Correction On
FX_SPR             equ       %00100000              Sprites On
FX_TIL             equ       %00010000              Tile Maps On
FX_BM              equ       %00001000              Bitmaps On
FX_GRF             equ       %00000100              Graphics Mode On
FX_OVR             equ       %00000010              Overlay Text on Graphics
FX_TXT             equ       %00000001              Text Mode On
FT_FSET            equ       %00100000              Font Set 1 On (0=Font Set 0)
FT_FOVR            equ       %00010000              FG and BG colors displayed when overlay text 0=transparent
FT_MON             equ       %00001000              Turn off monitor sync and sleep monitor
FT_DBX             equ       %00000100              Double-wide text mode characters
FT_DBY             equ       %00000010              Double-high text mode characters
FT_CLK70           equ       %00000001              70 Hz screen (640x400 txt,320x200 grf)
FX_OMIT            equ       %11111111              Setting for SS.DScrn don't change first byte in MCR
FT_OMIT            equ       %11111111              Setting for SS.DScrn don't change second byte in MCR 

SS.PScrn[edit | edit source]

Position Screen Layers

Set layer to display a screen

Entry: R$X = layer (0-2)
       R$Y = bitmap# (0-2), tilemap (4-6)
       
Exit:  B = A non-zero error code.
      CC = Carry flag clear to indicate success

SS.FScrn[edit | edit source]

Free a bitmap screen

Entry: R$Y = bitmap# (0-2)
Exit:  B = A non-zero error code.
      CC = Carry flag clear to indicate success

SS.DfPal[edit | edit source]

Define Palette and populate a CLUT from Memory Module

Entry: R$X = CLUT # (0-3)
       R$Y = pointer to location of data in caller process
       (Caller must load data module)
Exit:  B = A non-zero error code.
      CC = Carry flag clear to indicate success