Skip to content

X86

These paths are relative to units/X86/ in the TRSE tree. Reference a unit with @use "<path>" (no .tru extension).

Units

Each section lists procedure and function declarations parsed from the .tru source. Notes come from the block comment immediately above each declaration (/** … */ or /* … */). Line comments (//) are not shown.

gfx/cga16

Kind Name Signature Notes
procedure Init procedure Init();
procedure CopyScreen procedure CopyScreen(src, dst: global ^byte; size:global integer);
procedure PutSprite procedure PutSprite(src, dst, backbuf : global ^byte, dx,dy,wx,wy : global integer);

gfx/fonts

Kind Name Signature Notes
procedure Init procedure Init(data:global pointer of byte; font_size_x, font_size_y, font_columns,shift: global integer);
procedure PrintChar procedure PrintChar(c : global integer; dst: global pointer of byte);
procedure PrintString procedure PrintString(tp:global pointer; x,y : global integer; dst2: global pointer);

gfx/gfx

Kind Name Signature Notes
procedure _putpixel_line_cga procedure _putpixel_line_cga() inline;
procedure _putpixel_line_vga procedure _putpixel_line_vga() inline;
procedure PutPixelVGA procedure PutPixelVGA (addr: global pointer, x1,y : global integer; color : global integer);

gfx/lib3dx86

Kind Name Signature Notes
procedure Allocate procedure Allocate(i,v,n: global integer); Allocates memory for a 3D object. i: object number v: number of vertices n: number of faces
procedure Torus procedure Torus(ii,f1,f2,r1,r2, renderType : global integer); Generate a 3D torus. ii : object number f1 : number of vertices in lesser rings f2 : number of vertices in greater ring r1 : scaling of lesser rings r2 : with of great ring renderType: renderType_lines (polygons not supported yet)
procedure ProjectSimple procedure ProjectSimple(i,cx,cy,cz: global integer); Projects the rotated vertices of an object from 3D to the screen. Simple divide-by-z method. i: object cz,cy : position on screen cz : z-translation
procedure RenderPoints procedure RenderPoints(i: global integer;p1:global pointer);

gfx/poly_cga

Kind Name Signature Notes
procedure Init procedure Init();
procedure Pre procedure Pre() inline;
procedure Draw procedure Draw(_ah, _al, _bh, _bl, _dh, _dl, _ch : byte) inline;
procedure hline procedure hline() inline;
procedure Poly procedure Poly(x1,y1,x2,y2,x3,y3:integer; val : global byte);

gfx/poly_cga16

Kind Name Signature Notes
procedure hline procedure hline();
procedure CopyToScreen procedure CopyToScreen(p:global ^byte);
procedure Poly procedure Poly(x1,y1,x2,y2,x3,y3:signed integer; val : global byte);

gfx/tiles

Kind Name Signature Notes
procedure SetTileLoc procedure SetTileLoc(tile: global ^byte);
procedure WriteToScreen procedure WriteToScreen(xx:integer,yy,val,wx,wy : byte);

music/adlibplayer

Kind Name Signature Notes
procedure Initialize procedure Initialize(song:pointer); Initializes the adlib song located at parameter #1 (pointer)
procedure Play procedure Play() inline; Updates the adlib tune. Should be called once per raster update, so include this in an IRQ. See "tut3.ras" in the VGA examples. // Simple music player interrupt RasterIRQ(); begin StartIRQ(); AdlibPlayer::Play(); CloseIRQ(); end;
procedure Stop procedure Stop(); Stops any adlib sound

music/beeplay

Kind Name Signature Notes
procedure Beep procedure Beep( bi : integer );
procedure Stop procedure Stop( );
procedure Initialize procedure Initialize( zp : global pointer );
procedure Play procedure Play();
procedure Update procedure Update();

music/monplay

Kind Name Signature Notes
procedure Stop procedure Stop();
procedure Init procedure Init(song:pointer,size:integer);

system/file

No procedure / function declarations found (unit may use only @include, variables, or declarations this parser skips).

system/memory

Kind Name Signature Notes
procedure Poke8 procedure Poke8(_bx:integer; _di:integer;_ah:byte) inline;
procedure SetTimer procedure SetTimer(ticks : integer);
procedure Init procedure Init();
function GetBlockMem function GetBlockMem(blocks: global integer):long;
function GetMem function GetMem(blocks: global integer):long;
procedure Release procedure Release(rp: pointer);
procedure Quit procedure Quit() inline;
procedure CopyData16 procedure CopyData16(source,dest:global pointer of integer;i1:global integer);
procedure Swap procedure Swap(dex1,dex2 : integer) inline;

system/screen

Kind Name Signature Notes
procedure SetBGColor procedure SetBGColor(_bx: byte); Input Status Register
procedure InitVGABuffers procedure InitVGABuffers(noBuffers:global integer);
procedure InitCGABuffers procedure InitCGABuffers(noBuffers:global integer);
procedure ReleaseCGABuffers procedure ReleaseCGABuffers();
procedure InitVGABuffersNo21 procedure InitVGABuffersNo21(noBuffers:global integer);
procedure SetColor procedure SetColor(color,red,green,blue:global byte);
procedure SetPalette procedure SetPalette(tp:global pointer);
procedure CopyVGABuffer32bit procedure CopyVGABuffer32bit(source,dest:global pointer of integer);
procedure ClearBuffer32bit procedure ClearBuffer32bit(dest:global pointer of integer;_ax:integer);
procedure CopyVGABuffer16bit procedure CopyVGABuffer16bit(source,dest:global pointer of integer);
procedure SetMode procedure SetMode(i : global integer); Sets the graphics mode. 13 is VGA 320x200.
procedure PrintChar procedure PrintChar(ch : byte);
procedure Print procedure Print(zp:global pointer);
procedure NewLine procedure NewLine();
procedure PrintAx procedure PrintAx();
procedure PrintInt procedure PrintInt(i:global integer);
procedure write_crtc procedure write_crtc(port:global integer; reg, val:global byte);
procedure DrawBoxCGA procedure DrawBoxCGA(zp:global pointer, x,y,w,h,i : global integer);

system/tables

No procedure / function declarations found (unit may use only @include, variables, or declarations this parser skips).

text/txt

Kind Name Signature Notes
procedure put_ch procedure put_ch(CH:global byte); Put a character at current cursor position
procedure DefineScreen procedure DefineScreen(); Helper to set up screen pointers etc
procedure esc procedure esc(); Escape sequence
procedure cursor_home procedure cursor_home(); Place the cursor at 0,0 top left of screen
procedure move_to procedure move_to(_text_x: byte, _text_y: byte); Place the cursor at X, Y screen position
procedure wait_vsync procedure wait_vsync(); Wait for vertical blank (not yet implemented)
procedure text_colour procedure text_colour(_chosen_text_colour: byte); Set the text colour (not available on all platforms)
function get_key function get_key():byte; Get a character input from the keyboard
function get_scancode function get_scancode():byte; Get a character input from the keyboard
procedure wait_key procedure wait_key(); Wait for a key press
procedure clear_buffer procedure clear_buffer(); Clear the keyboard buffer
procedure get_cursor_position procedure get_cursor_position(); Get current cursor position to o_cx,o_cy
procedure put_char_at procedure put_char_at(_atx,_aty,_atchar:byte); Put a character at a X, Y screen coordinate
procedure print_string procedure print_string(the_str: pointer, out_CRLF: byte); Output a string at the current cursor location. Set Carriage Return on/off
function get_char_at function get_char_at(_col,_row:byte):byte; Return the character at chosen screen position
procedure beep procedure beep();
procedure print_dec procedure print_dec(_in_n:byte, _add_cr:byte); Output a string representation of a decimal number at current cursor position Set if you want carriage return true/false
function str_to_dec function str_to_dec(_in_str:pointer):byte; Convert string to decimal number
function get_dec function get_dec():integer; Get numeric input from keyboard
procedure get_page procedure get_page(); Get screen page
procedure cursor_off procedure cursor_off(); Hide flashing cursor
procedure cursor_on procedure cursor_on(); Show flashing cursor
function str_compare function str_compare(str1:pointer,str2:pointer):byte; Compare two strings for equality
procedure put_dec_at procedure put_dec_at(_natx,_naty,_nat:byte); Output a string representation of a decimal number at chosen position
function str_len function str_len(in_str: global pointer):byte;
procedure print_space procedure print_space(max_digits: global integer);
procedure print_string_centered procedure print_string_centered(in_str: global pointer, CRLF: global byte, _sc_w: byte); Output a string at the current cursor location but centered. Set Carriage Return on/off Set the screen width Set reverse on/off
procedure crlf procedure crlf();
function get_string function get_string():byte;
function str_to_dec function str_to_dec(_in_str:pointer):byte;
function get_dec function get_dec():integer;
procedure cls procedure cls(); Clear screen and initialise pointers Required for move_to etc