The runtime debugging library is accessed via a special opcode sequence which is very unlikely to occur in normal code, and will run on hardware with no side-effects.
There are a number of different functions.
0x00: Write to the console
0x01: Beep
0x02: Pause CPU
0x03: Associate profile ID
0x04: Entering profile ID
0x05: Exiting profile ID
0x08: Open file
0x09: Close file
0x0A: Seek in file
0x0B: Write to file (not currently supported)
0x0C: Read from file
0x0D: Blinkenlights
Enters low power mode until a specified interrupt occurs.
Enters low power mode until VBlank occurs.
struct { int32 cx; // 20.8 x center of rotation on the texture int32 cy; // 20.8 y center of rotation on the texture int16 screen_cx; // center of rotation on the display int16 screen_cy; // center of rotation on the display int16 scale_x; // 8.8 x scale factor int16 scale_y; // 8.8 y scale factor uint16 theta; // rotation value (0-255) } *PBgAffineParams, TBgAffineParams; struct { int16 hdx; // 8.8 horizontal textel per horizontal pixel delta int16 vdx; // 8.8 vertical textel per horizontal pixel delta int16 hdy; // 8.8 horizontal textel per vertical pixel delta int16 vdy; // 8.8 vertical textel per vertical pixel delta int32 x; // 20.8 x initial texture position int32 y; // 20.8 y initial texture position } *PBgAffineResults, TBgAffineResults;
Input: r0 = source address r1 = dest address
Input: r0 = source address r1 = dest address
The window is 4096 bytes, the minimum entry length is 3 bytes and the maximum entry length is 18 bytes.
SoundBiasChange (swi #0x19)
SoundDriverInit (swi #0x1A)
SoundDriverMode (swi #0x1B)
SoundDriverMain (swi #0x1C)
SoundDriverVSync (swi #0x1D)
SoundChannelClear (swi #0x1E)
MIDIKey2Freq (swi #0x1F)
MusicPlayerOpen (swi #0x20)
MusicPlayerStart (swi #0x21)
MusicPlayerStop (swi #0x22)
MusicPlayerContinue (swi #0x23)
MusicPlayerFadeOut (swi #0x24)
MultiBoot (swi #0x25)
SoundDriverVSyncOff (swi #0x28)
SoundDriverVSyncOn (swi #0x29)
VBADPrint (swi #0xFF) Warning: Will not work on hardware.