BIOS Functions


Functions

void ATTR_NOINLINE ATTR_NOINSTRUMENT hel_SwiCpuFastCopy (void *pDst, const void *pSrc, u32 LengthInWords)
 Copy a block of memory.
void ATTR_NOINLINE ATTR_NOINSTRUMENT hel_SwiHalt (void)
 Switch CPU into low-power mode.
void hel_SwiLZ77UnCompVram (void *pDst, const void *pSrc)
 Expand LZ77-compressed data.
void hel_SwiLZ77UnCompWram (void *pDst, const void *pSrc)
 Expand LZ77-compressed data.
void hel_SwiRLUnCompVram (void *pDst, const void *pSrc)
 Expand Run-Length-Encoded data.
void hel_SwiRLUnCompWram (void *pDst, const void *pSrc)
 Expand Run-Length-Encoded data.
void ATTR_NOINLINE ATTR_NOINSTRUMENT hel_SwiSoftReset (u32 ReturnAddr)
 Reset device.
void hel_SwiUnComp (void *pDst, const void *pSrc, u32 CompressionType)
 Expand compressed data.
void ATTR_NOINLINE ATTR_NOINSTRUMENT hel_SwiVBlankIntrWait (void)
 Wait for Vertical Blank interrupt.

Detailed Description

Description ...

The BIOS Functions Module can be used to execute functions from the GBA's BIOS. Several functions expect halfword or word-aligned memory addresses to work properly.

The debug library contains a memory address-checking-mechanism which will display an error when an incoming parameter contains an invalid memory address. Invalid in sense of wrong alignment.


Function Documentation

void ATTR_NOINLINE ATTR_NOINSTRUMENT hel_SwiCpuFastCopy ( void *  pDst,
const void *  pSrc,
u32  LengthInWords 
)

Copy a block of memory.

Parameters:
[in] pDst Pointer to copy destination (must be word aligned).
[in] pSrc Pointer to block to copy (must be word aligned).
[in] LengthInWords Length in 32bit words of block to copy. This value must be multiple of 8, which means you can only copy blocks of memory which are multiple 32bytes.
    // copy 256 bytes from pSrc to pDest
    hel_SwiCpuFastCopy(pDst, pSrc, 256/sizeof(u32));

void ATTR_NOINLINE ATTR_NOINSTRUMENT hel_SwiHalt ( void   ) 

Switch CPU into low-power mode.

hel_SwiHalt switch the CPU into low-power mode. The Halt mode is terminated when any interrupt becomes executed.

void hel_SwiLZ77UnCompVram ( void *  pDst,
const void *  pSrc 
)

Expand LZ77-compressed data.

Parameters:
[in] pDst Destination address, must be halfword aligned!
[in] pSrc Source address, must be word aligned and data size must be multiple 4.

void hel_SwiLZ77UnCompWram ( void *  pDst,
const void *  pSrc 
)

Expand LZ77-compressed data.

Parameters:
[in] pDst Destination address.
[in] pSrc Source address, must be word aligned and data size must be multiple 4.

void hel_SwiRLUnCompVram ( void *  pDst,
const void *  pSrc 
)

Expand Run-Length-Encoded data.

Parameters:
[in] pDst Destination address, must be halfword aligned!
[in] pSrc Source address, must be word aligned and data size must be multiple 4.

void hel_SwiRLUnCompWram ( void *  pDst,
const void *  pSrc 
)

Expand Run-Length-Encoded data.

Parameters:
[in] pDst Destination address.
[in] pSrc Source address, must be word aligned and data size must be multiple 4.

void ATTR_NOINLINE ATTR_NOINSTRUMENT hel_SwiSoftReset ( u32  ReturnAddr  ) 

Reset device.

hel_SwiSoftReset clears the CPU internal RAM area from 3007E00h-3007FFFh, initializes system, supervisor, and irq stack pointers, and sets R0-R12 to zero, and enters system mode.

Parameters:
[in] ReturnAddr Return address selection (0 for 0x8000000, 1-255 for 0x2000000)
Note:
Description copied from GBATek.

void hel_SwiUnComp ( void *  pDst,
const void *  pSrc,
u32  CompressionType 
)

Expand compressed data.

Parameters:
[in] pDst Destination address
[in] pSrc Source address
[in] CompressionType Compression-type of source data. This can be one of the following predefines values:
  • COMPRESSION_TYPE_LZ77VRAM
  • COMPRESSION_TYPE_LZ77WRAM
  • COMPRESSION_TYPE_RLEVRAM
  • COMPRESSION_TYPE_RLEWRAM
Note:
The destination and source addresses have to be aligned. Please see corresponding decompress function such as hel_SwiLZ77UnCompVram, hel_SwiLZ77UnCompWram, hel_SwiRLUnCompVram, hel_SwiRLUnCompWram

void ATTR_NOINLINE ATTR_NOINSTRUMENT hel_SwiVBlankIntrWait ( void   ) 

Wait for Vertical Blank interrupt.

The hel_SwiVBlankIntrWait function calls SWI 5, which continues to wait in Halt status until a new Vertical Blank interrupt occurs.

Note:
The VBL Interrupt-Handler must call hel_IntrAcknowledge.


Generated on Sat Aug 12 13:54:10 2006 for HEL 2 Library by  doxygen 1.4.7