Skip to content

C64

These paths are relative to units/C64/ 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.

animation/animation

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

demounit

Kind Name Signature Notes
procedure SetSparkleVicBank procedure SetSparkleVicBank(i : byte);
procedure LocalCloseIRQ procedure LocalCloseIRQ() inline;
procedure LocalStartIRQ procedure LocalStartIRQ() inline;
procedure StartDemoIRQ procedure StartDemoIRQ() inline;
procedure CloseDemoIRQ procedure CloseDemoIRQ() inline;
procedure EndWithinLoop procedure EndWithinLoop();
procedure Endd procedure Endd();
procedure EnddClear procedure EnddClear();
procedure TimingTest procedure TimingTest();
procedure PlayMusic procedure PlayMusic(a:pointer);
procedure EndClearInsideWhileLoop procedure EndClearInsideWhileLoop() inline;

gfx/gfx

Kind Name Signature Notes
procedure putpixel3 procedure putpixel3();
procedure putpixel4 procedure putpixel4() inline;
procedure putpixel2 procedure putpixel2();
procedure SetupPixelTables procedure SetupPixelTables();
procedure InitBitmapGraphics procedure InitBitmapGraphics(pi:global byte; bsta:global integer); Initializes bitmap graphics mode, putpixel type, pixel tables and clears the screen at bank 1 and 2.
procedure InitBitmapGraphicsNoClear procedure InitBitmapGraphicsNoClear(pi:global byte; bsta:global integer);
procedure Line procedure Line( x1, y1, x2, y2, color : global byte);
procedure Line2 procedure Line2 ( x1, y1, x2, y2, color : global byte);

input/key

Kind Name Signature Notes
procedure Read procedure Read(); Read the full 10 row keyboard matrix and populate the keyboard flags
procedure Held procedure Held( _xy: integer ); Returns true if the key is being held. Works with multiple keys held at the same time.
procedure Pressed procedure Pressed( _xy: integer ); Returns true if the key has just been pressed. Works with multiple keys pressed at the same time.
procedure GetHeld procedure GetHeld(); Gets a key being held. If multiple keys are pressed, returns the first key found.

memory/memory

Kind Name Signature Notes
procedure StartIRQExtended procedure StartIRQExtended(useKernal : global byte) inline;
procedure CloseIrqExtended procedure CloseIrqExtended() inline;
procedure StartIrqMemoryMode procedure StartIrqMemoryMode() inline;
procedure CloseIrqMemoryMode procedure CloseIrqMemoryMode() inline;

output/pbm

Kind Name Signature Notes
procedure Initialise procedure Initialise(); Initialise PBM. Clears the buffer and sets up address tables.
procedure Refresh procedure Refresh( x, y, h: global byte ); Refresh a portion of the screen from the back buffer. Call this each time you wish to refresh the screen. Note that Refresh draws from the top downwards. Param x - the column in the buffer to start drawing from, eg: 0 (can be used for simple scrolling) y - the line on the screen to start drawing from h - the number of lines to draw
procedure RefreshUnroll_36x22 procedure RefreshUnroll_36x22(); Fast unrolled screen refresh in a fixed dimension of 36 columns by 22 rows. Is faster than the other Refresh commands at expense of using a lot of memory. Leaves a border of 1 char at top, 2 at left/right, 2 at bottom for use with border graphics, status icons and scores etc.
procedure RefreshUnroll procedure RefreshUnroll(); Fast unrolled screen refresh for the whole screen. Is faster than the other Refresh commands at expense of using a lot of memory.
procedure RefreshUnrollVic_24x22 procedure RefreshUnrollVic_24x22( _y: byte ); Fast unrolled screen refresh in a fixed dimension of 24 columns by 22 rows on a Vic 20. Is faster than the other Refresh commands at expense of using a lot of memory. Vic 20 equivalent of RefreshUnroll_36x22, this takes the x starting offset in the _y register. Leaves a border of 1 char at top, 2 at bottom for use with border graphics, status icons and scores etc.
procedure DrawSprite procedure DrawSprite( x, y, w, h: global byte, _y:byte, _ax: integer ); Draw uncompressed PBM data (mode 1) with replace ink x - Block position to draw at horizontally y - Block position to draw at vertically w - Width of source object in character pairs (one char per byte) h - Height of source object in characters _y - Animation frame _ax - #address array of integers containing the addresses of PBM data in four postions - NW, NE, SW, SE
procedure DrawSpriteE procedure DrawSpriteE( x, y, w, h: global byte, _y:byte, _ax: integer ); Draw uncompressed PBM data (mode 1) with EOR ink x - Block position to draw at horizontally y - Block position to draw at vertically w - Width of source object in character pairs (one char per byte) h - Height of source object in characters _y - Animation frame _ax - #address array of integers containing the addresses of PBM data in four postions - NW, NE, SW, SE
procedure DrawSpriteO procedure DrawSpriteO( x, y, w, h: global byte, _y:byte, _ax: integer ); Draw uncompressed PBM data (mode 1) with OR ink x - Block position to draw at horizontally y - Block position to draw at vertically w - Width of source object in character pairs (one char per byte) h - Height of source object in characters _y - Animation frame _ax - #address array of integers containing the addresses of PBM data in four postions - NW, NE, SW, SE
procedure DrawSpriteME procedure DrawSpriteME( x, y, w, h: global byte, _y:byte, _ax: integer ); Draw uncompressed PBM data (mode 1) Mirrored with EOR ink x - Block position to draw at horizontally y - Block position to draw at vertically w - Width of source object in character pairs (one char per byte) h - Height of source object in characters _y - Animation frame _ax - #address array of integers containing the addresses of PBM data in four postions - NW, NE, SW, SE
procedure DrawSpriteC procedure DrawSpriteC( x, y, w, h: global byte, _y:byte, _ax: integer ); Draw compressed PBM data (mode 2) with replace ink x - Block position to draw at horizontally y - Block position to draw at vertically w - Width of source object in character pairs (two chars in one byte) h - Height of source object in characters _y - Animation frame _ax - #address array of integers containing the addresses of PBM data in four postions - NW, NE, SW, SE
procedure DrawSpriteCE procedure DrawSpriteCE( x, y, w, h: global byte, _y:byte, _ax: integer ); Draw compressed PBM data (mode 2) with EOR ink x - Block position to draw at horizontally y - Block position to draw at vertically w - Width of source object in character pairs (two chars in one byte) h - Height of source object in characters _y - Animation frame _ax - #address array of integers containing the addresses of PBM data in four postions - NW, NE, SW, SE
procedure DrawSpriteCO procedure DrawSpriteCO( x, y, w, h: global byte, _y:byte, _ax: integer ); Draw compressed PBM data (mode 2) with OR ink x - Block position to draw at horizontally y - Block position to draw at vertically w - Width of source object in character pairs (two chars in one byte) h - Height of source object in characters _y - Animation frame _ax - #address array of integers containing the addresses of PBM data in four postions - NW, NE, SW, SE
procedure DrawSprite8E procedure DrawSprite8E( x, y: global byte, _y:byte, _ax: integer ); Draw fixed 8x8 sized uncompressed PBM data (mode 1) with EOR ink. A little faster as the drawing code is unrolled (no loop) x - Block position to draw at horizontally y - Block position to draw at vertically _y - Animation frame _ax - #address array of integers containing the addresses of PBM data in four postions - NW, NE, SW, SE
procedure DrawSprite8ME procedure DrawSprite8ME( x, y: global byte, _y:byte, _ax: integer ); Draw fixed 8x8 sized uncompressed PBM data (mode 1) Mirrored with EOR ink. A little faster as the drawing code is unrolled (no loop) x - Block position to draw at horizontally y - Block position to draw at vertically _y - Animation frame _ax - #address array of integers containing the addresses of PBM data in four postions - NW, NE, SW, SE
procedure PDraw procedure PDraw( w, h: global byte, _ax: integer ); Draw PETSCII screen codes (mode 0) from the supplied address in the width and height specified directly to the screen. w - Width of source object in characters h - Height of source object in characters _ax - #address of binary data containing PETSCII characters
procedure PDrawT procedure PDrawT( w, h: global byte, _ax: integer ); Draw PETSCII screen codes (mode 0) from the supplied address in the width and height specified directly to the screen. Space characters (32) are not drawn and act as transparent w - Width of source object in characters h - Height of source object in characters _ax - #address of binary data containing PETSCII characters

screen/fadeinout

Kind Name Signature Notes
procedure InitCols procedure InitCols(src:pointer, k2: global byte);
procedure UpdateColorsIn procedure UpdateColorsIn(src1, dst, sp : global pointer);
procedure UpdateColorsIn2 procedure UpdateColorsIn2(src1, dst, sp : global pointer;k : global byte);
procedure UpdateColorsInPetscii procedure UpdateColorsInPetscii(src1, sp : global pointer);
procedure UpdateColorsOut procedure UpdateColorsOut(src1, dst, sp : global pointer);
procedure DefaultFadeOut procedure DefaultFadeOut(isrc1, idst, isp : global integer;speed,curColFade: global byte);
procedure DefaultFadeIn procedure DefaultFadeIn(isrc1, idst, isp : global integer;speed,curColFade: global byte;);
procedure DefaultFadeInPetscii procedure DefaultFadeInPetscii(isrc1, isp : global integer;speed: global byte;);

screen/screen

Kind Name Signature Notes
procedure EnableRasterLinesGreaterThan256 procedure EnableRasterLinesGreaterThan256() inline ; Toggles raster interrupts on lines above than 256
procedure DisableRasterLinesGreaterThan256 procedure DisableRasterLinesGreaterThan256() inline; Toggles raster interrupts on lines below 256
procedure PrintSingleChar procedure PrintSingleChar( i : global byte) inline; Prints a single character to the screen
procedure PrintCStringColor procedure PrintCStringColor(p1 : global pointer; x, y, c : global byte); Prints a cstring text to the screen at position [p1 + y*40 + c] with color [c]
procedure PrintStringColor procedure PrintStringColor(p1 : global pointer; x, y, c : global byte); Prints a string text to the screen at position [p1 + y*40 + c] with color [c]
procedure PrintString procedure PrintString(p1 : global pointer; x, y : global byte; p2: global ^byte); Prints a string text to the screen at position [p1 + y*40 + c] with color [c]
procedure WaitForRaster procedure WaitForRaster( i2 : global integer);
procedure Clear procedure Clear( i2 : global integer pure_number, i: global byte pure_number) inline; Clears 40*25 = 1000 bytes at position i2 with value i
procedure Clear procedure Clear( i2 : global integer pure_number, i: global byte pure_variable) inline;
procedure Clear procedure Clear( p1 : global pointer, i: global byte);
procedure WaitForVerticalBlank procedure WaitForVerticalBlank() inline; Waits for a vertical blank (when the raster is reset to the top of the screen)
procedure Scrollx procedure Scrollx(i: global byte); Scrolls i pixels horizontally (between 0-7)
procedure RasterIRQ procedure RasterIRQ(i2 : global integer, i: global byte pure) inline;
procedure HideBorders procedure HideBorders() inline; Hides column 0 and 39
procedure ShowBorders procedure ShowBorders() inline; Shows column 0 and 39
procedure CopyFull procedure CopyFull(i1, i2 : global integer pure_number) inline;
procedure CopyFull procedure CopyFull(p1, p2 : global pointer); Copies a full screen (1000 bytes) from parameter 1 to parameter 2
procedure SetMulticolorMode procedure SetMulticolorMode() inline; Sets multicolor mode
procedure SetHiresMode procedure SetHiresMode() inline; Sets hires mode
procedure SetBitmapMode procedure SetBitmapMode() inline; Sets bitmap mode
procedure SetBank procedure SetBank(i: global byte) inline; Sets vic bank 0-4 Screen::SetBank(vic_bank1);
procedure SetScreenLocation procedure SetScreenLocation(i1: global integer); Sets the location of the screen data (text mode) or color data (bitmap mode). Must be an offset of $400, ie $0, $400, $800, $c00, $1000, $1400 etc Screen::SetScreenLocation($4000);
procedure SetCharsetLocation procedure SetCharsetLocation(i1: global integer); Sets the location of the character set (text mode) or bitmap data (bitmap mode). Must be an offset of $800, ie $0, $800, $1000, $1800, $2000, $2800 etc. Bitmap data can only be stored at $0 and $2000 on each bank. Screen::SetCharsetLocation($1000); // point to ROM
procedure CopyImageColorData procedure CopyImageColorData(sp : global pointer, i: global byte); Copies image data from p1 to bank i
procedure PrintNumber procedure PrintNumber(i1 : global integer; x,y,c : global byte; cp:global ^byte);
procedure CopyCharsetFromRom procedure CopyCharsetFromRom(p1, p2 : global ^byte); Copes charset from ROM at p1 to p2 (2000 bytes)
procedure WaitNoLines procedure WaitNoLines(i : global byte pure_number) inline; Waits p1 raster lines
procedure WaitNoLines procedure WaitNoLines(i : global byte);

screen/vsp

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

system

Kind Name Signature Notes
procedure LoadFileKernal procedure LoadFileKernal(fp:global pointer;len:global byte;addr:integer); Loads a file from disk using KERNAL. Please note that this method is extremely slow. usage: LoadFileFromKernal(#filename,len(filename), address_to_load_to);

tables/luminosities

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