|
|
CT60 and related things BBS
Re: CTPCI: screen saver |
Posted by: Didier Méquignon
|
Jun,13.2011-14:59
|
ups, the end seems broken...
CMD_TEXTUREMEM (14) Put texture in memory on the graphics card
SCRTEXTUREMEMBLK blk;
blk.size=sizeof(SCRTEXTUREMEMBLK);
Vsetscreen(-1,&blk,0x564E,CMD_TEXTUREMEM);
if(blk.blk_status == BLK_OK)
puts("OK");
Copy a 65K texture from CPU local area to a 65K screen
or an ARGB texture to a 32M screen pixel format multiple
times (best results are with little source texture and
big screen for destination).
This function need a texture support inside the TOS.
This function not exist inside the MilanTOS.
CMD_GETVERSION (15)
/* if the function is not implemented, 0x0100 is the first release */
long version = 0x0100;
Vsetscreen(-1,&version,0x564E,CMD_GETVERSION);
Return the version of the video XBIOS.
This function not exist inside the MilanTOS.
CMD_LINEMEM (16) Draw line on the graphics card
SCRFILLMEMBLK blk;
blk.size=sizeof(SCRLINEMEMBLK);
blk.blk_op = BLK_COPY;
blk.blk_fbcolor = 0x112233; /* foreground fill color */
blk.blk_bgcolor = 0; /* background fill color */
blk.blk_pattern = 0xffffffff; /* solid line */
Vsetscreen(-1,&blk,0x564E,CMD_LINEMEM);
if(blk.blk_status == BLK_OK)
puts("OK");
Draw a line with colors with the GPU at (blk_x1,
blk_y1) to (blk_x2, blk_y2).
This function not exist inside the MilanTOS.
CMD_CLIPMEM (17) Set clipping rectangle on the graphic card
SCRCLIPMEMBLK blk;
blk.size=sizeof(SCRCLIPMEMBLK);
blk.blk_clip_on = 1; /* clipping flag 1:on, 0:off */
Vsetscreen(-1,&blk,0x564E,CMD_CLIPMEM);
if(blk.blk_status == BLK_OK)
puts("OK");
Enable or diable clipping rectange at (blk_x, blk_y),
size is blk_w, blk_h.
This function not exist inside the MilanTOS.
CMD_SYNCMEM (18) Wait an empty GPU fifo for sync the drawing
engine with the memory.
Vsetscreen(-1,-1,0x564E,CMD_SYNCMEM);
This function not exist inside the MilanTOS.
CMD_BLANK (19) Blank / unblank screen.
long blank = 1; /* (1) blank, (0): unblank */
Vsetscreen(-1,blank,0x564E,CMD_BLANK);
This function not exist inside the MilanTOS.
Binding:
move.w command,-(sp)
move.w rez,-(sp)
move.l par2,-(sp)
move.l par1,-(sp)
move.w #5,-(sp)
trap #14
lea 14(sp),sp
or
move.w modecode,-(sp)
move.w rez,-(sp)
move.l physaddr,-(sp)
move.l logaddr,-(sp)
move.w #5,-(sp)
trap #14
lea 14(sp),sp
Return: nothing (or current modecode in TOS mode).
Note: Only valid with internal TOS Radeon driver (DRIVERS.HEX).
/* scrFlags */
#define SCRINFO_OK 1
/* scrClut */
#define NO_CLUT 0
#define HARD_CLUT 1
#define SOFT_CLUT 2
/* scrFormat */
#define INTERLEAVE_PLANES 0
#define STANDARD_PLANES 1
#define PACKEDPIX_PLANES 2
/* bitFlags */
#define STANDARD_BITS 1
#define FALCON_BITS 2
#define INTEL_BITS 8
typedef struct screeninfo
{
long size; /* Size of structure */
long devID; /* modecode */
char name[64]; /* Friendly name of Screen */
long scrFlags; /* some Flags */
long frameadr; /* Address of framebuffer */
long scrHeight; /* visible X res */
long scrWidth; /* visible Y res */
long virtHeight; /* virtual X res */
long virtWidth; /* virtual Y res */
long scrPlanes; /* color Planes */
long scrColors; /* # of colors */
long lineWrap; /* # of Bytes to next line */
long planeWarp; /* # of Bytes to next plane */
long scrFormat; /* screen Format */
long scrClut; /* type of clut */
long redBits; /* Mask of Red Bits */
long greenBits; /* Mask of Green Bits */
long blueBits; /* Mask of Blue Bits */
long alphaBits; /* Mask of Alpha Bits */
long genlockBits; /* Mask of Genlock Bits */
long unusedBits; /* Mask of unused Bits */
long bitFlags; /* Bits organisation flags */
long maxmem; /* max. memory in this mode */
long pagemem; /* needed memory for one page */
long max_x; /* max. possible width */
long max_y; /* max. possible heigth */
} SCREENINFO;
#define BLK_ERR 0
#define BLK_OK 1
#define BLK_CLEARED 2
typedef struct _scrblk
{
long size; /* size of structure */
long blk_status; /* status bits of blk */
long blk_start; /* Start Address */
long blk_len; /* length of memblk */
long blk_x; /* x pos in total screen */
long blk_y; /* y pos in total screen */
long blk_w; /* width */
long blk_h; /* height */
long blk_wrap; /* width in bytes */
} SCRMEMBLK;
/* operations */
#define BLK_CLEAR 0
#define BLK_AND 1
#define BLK_ANDREVERSE 2
#define BLK_COPY 3
#define BLK_ANDINVERTED 4
#define BLK_NOOP 5
#define BLK_XOR 6
#define BLK_OR 7
#define BLK_XNOR 8
#define BLK_EQUIV 9
#define BLK_INVERT 10
#define BLK_ORREVERSE 11
#define BLK_COPYINVERTED 12
#define BLK_ORINVERTED 13
#define BLK_NAND 14
#define BLK_SET 15
typedef struct _scrsetblk
{
long size; /* size of structure */
long blk_status; /* status bits of blk */
long blk_op; /* mode operation */
long blk_color; /* background fill color */
long blk_x; /* x pos in total screen */
long blk_y; /* y pos in total screen */
long blk_w; /* width */
long blk_h; /* height */
long blk_unused;
} SCRFILLMEMBLK;
typedef struct _scrcopyblk
{
long size; /* size of structure */
long blk_status; /* status bits of blk */
long blk_src_x; /* x pos source in total screen */
long blk_src_y; /* y pos source in total screen */
long blk_dst_x; /* x pos dest in total screen */
long blk_dst_y; /* y pos dest in total screen */
long blk_w; /* width */
long blk_h; /* height */
long blk_op; /* mode operation */
} SCRCOPYMEMBLK;
typedef struct _scrtextureblk
{
long size; /* size of structure */
long blk_status; /* status bits of blk */
long blk_src_x; /* x pos source */
long blk_src_y; /* y pos source */
long blk_dst_x; /* x pos de[...]
|
[All messages in this thread] [Start new thread]
What's the anti-troll code? That's your personal code to be able to add comments and messages on the dhs.nu site.
Don't have a code or forgot it? Fix it here.
|
|
|