[][src]Module gba::bios

This module contains wrappers for all GBA BIOS function calls.

A GBA BIOS call has significantly more overhead than a normal function call, so think carefully before using them too much.

The actual content of each function here is generally a single inline asm instruction to invoke the correct BIOS function (swi x, with x being whatever value is necessary for that function). Some functions also perform necessary checks to save you from yourself, such as not dividing by zero.

Structs

RegisterRAMResetFlags

Flags for use with register_ram_reset.

Functions

atan

(swi 0x09) Gives the arctangent of theta.

atan2

(swi 0x0A) Gives the atan2 of y over x.

cpu_fast_set

(swi 0x0C) "CpuFastSet", copies memory in 32 byte chunks.

cpu_set16

(swi 0x0B) "CpuSet", u16 memory copy.

cpu_set32

(swi 0x0B) "CpuSet", u32 memory copy/fill.

div

As div_rem, keeping only the div output.

div_rem

(swi 0x06) Software Division and Remainder.

get_bios_checksum

(swi 0x0C) "GetBiosChecksum" (Undocumented)

halt

(swi 0x02) Halts the CPU until an interrupt occurs.

interrupt_wait

(swi 0x04) "IntrWait", similar to halt but with more options.

register_ram_reset

(swi 0x01) RegisterRamReset.

rem

As div_rem, keeping only the rem output.

soft_reset

(swi 0x00) SoftReset the device.

sound_bias

(swi 0x19) "SoundBias", adjusts the volume level to a new level.

sound_channel_clear

(swi 0x1E) "SoundChannelClear", clears the direct sound channels and stops the sound.

sound_driver_main

(swi 0x1C) "SoundDriverMain", main of the sound driver

sound_driver_mode

(swi 0x1B) "SoundDriverMode", sets the sound driver operation mode.

sound_driver_vsync

(swi 0x1D) "SoundDriverVSync", resets the sound DMA.

sound_driver_vsync_off

(swi 0x28) "SoundDriverVSyncOff", disables sound

sound_driver_vsync_on

(swi 0x29) "SoundDriverVSyncOn", enables sound that was stopped by sound_driver_vsync_off.

sqrt

(swi 0x08) Integer square root.

stop

(swi 0x03) Stops the CPU as well as most other components.

vblank_interrupt_wait

(swi 0x05) "VBlankIntrWait", VBlank Interrupt Wait.