Alchemy
Loading...
Searching...
No Matches

system.h File Reference

The system's routines and globals: interrupts, BIOS sound bias, random numbers and sleep. More...

Go to the source code of this file.

Data Structures

struct  S

Functions

void System_WaitForFrameInterrupt (void)
void Bios_SoundBiasOff (void)
void Bios_SoundBiasOn (void)
s32 CountRemainingErasedFlashBytes (u8 *ptr)
 Returns how many bytes remain when the first non-erased byte is found.
s32 RunFlashEraseVerifier (u8 *, u8 *)
void StartFlashTimer (u8 index)
 Starts the selected operation timeout, saving the interrupt-enable state.
void _call_via_r2 (s32 arg0, s32 arg1, s32 target)
void IwramHalt (void)
void SoundDriver_EnterMixer (void)

Variables

u32 gRandomState
u16 gSleepActive
struct FlashSetupInfo gFlash_ChipAtmel
const struct FlashSetupInfo gFlash_ChipUnknown
u32 gFlash_Handler1
u32 gEraseFlashSector
u16 * gFlash_Handler4
const struct FlashType * gFlash
u16 gFlashSavedIme
u8 gFlashTimeoutFlag
u8 gFlashTimerNum
u8 gNumberTextDecimalEnd []
u8 gNumberTextHexEnd []
u8 gLink_TimeLabelString []
void * Resource_DirectoryTable []
u8 Resource_PatchThumbBranchCodeSize []
u8 gResourceSlot_ConversionTables [][256]
const u16 gUi_WindowPalette []
u8 IwramSoundPresetCode []
u32 gFlash_Handler0
struct AnimationEntry * gAnimationObjects []
u16 * gDebugTextCursor
u8 gDebugTextEnabled
u16 gFlashNumRemainingBytes
u8 gSaveBuffer []
s16 gSaveSlot
u8 IwramCodeRecords []
u8 LoadedRuntime_Size []
const u16 gMath_ArcTanTable []
const u8 gObject_ShadowTiles []
const u8 Render_BuildOamListKernel []
const u8 Resource_ExecuteTransfer []
const u8 Resource_PatchThumbBranch []
const u8 gRom_LanguageCode
u8 gRom_UnknownBytes []
const u32 BattleFx_Max4Reverse []
const u32 BattleFx_Max4Forward []
const u32 BattleFx_MaxReverse []
const u32 BattleFx_MaxForward []
const u32 BattleFx_ColorReverse []
const u32 BattleFx_ColorForward []
const u32 BattleFx_AdditiveReverse []
const u32 BattleFx_AdditiveForward []
const u32 BattleFx_Mask []
const u32 BattleFx_Transparent8Reverse []
const u32 BattleFx_Transparent8Forward []
const u32 BattleFx_TransparentReverse []
const u32 BattleFx_TransparentForward []
const u32 BattleFx_CopyReverse []
const u32 BattleFx_CopyForward []
const u8 gSystem_BasicColorPalette []
u8 Tile_CopyStrided []
u8 Tile_CopyStridedCodeSize []
u8 TransferCommandExecutor_Size []

Detailed Description

The system's routines and globals: interrupts, BIOS sound bias, random numbers and sleep.

Definition in file system.h.

Function Documentation

◆ System_WaitForFrameInterrupt()

void System_WaitForFrameInterrupt ( void )

◆ Bios_SoundBiasOff()

void Bios_SoundBiasOff ( void )

Referenced by Bios_SoundBiasOff(), and WaitFrames().

◆ Bios_SoundBiasOn()

void Bios_SoundBiasOn ( void )

Referenced by Bios_SoundBiasOn(), and WaitFrames().

◆ CountRemainingErasedFlashBytes()

s32 CountRemainingErasedFlashBytes ( u8 * ptr)

Returns how many bytes remain when the first non-erased byte is found.

Definition at line 180 of file sst.c.

Referenced by Bios_SoundBiasOn(), CountRemainingErasedFlashBytes(), and ProgramFlashSectorWithEraseRetry().

◆ RunFlashEraseVerifier()

s32 RunFlashEraseVerifier ( u8 * ,
u8 *  )

◆ StartFlashTimer()

void StartFlashTimer ( u8 index)

Starts the selected operation timeout, saving the interrupt-enable state.

Definition at line 119 of file flash.c.

Referenced by RunFlashEraseVerifier(), StartFlashTimer(), and WaitForFlashWrite().

◆ _call_via_r2()

void _call_via_r2 ( s32 arg0,
s32 arg1,
s32 target )

Referenced by _call_via_r2().

◆ IwramHalt()

void IwramHalt ( void )

Referenced by IwramHalt(), and System_Initialize().

◆ SoundDriver_EnterMixer()

void SoundDriver_EnterMixer ( void )

Variable Documentation

◆ gRandomState

u32 gRandomState
extern

Referenced by Bios_SoundBiasOn().

◆ gSleepActive

u16 gSleepActive
extern

◆ gFlash_ChipAtmel

struct FlashSetupInfo gFlash_ChipAtmel
extern

◆ gFlash_ChipUnknown

const struct FlashSetupInfo gFlash_ChipUnknown
extern

◆ gFlash_Handler1

u32 gFlash_Handler1
extern

◆ gEraseFlashSector

u32 gEraseFlashSector
extern

◆ gFlash_Handler4

u16* gFlash_Handler4
extern

◆ gFlash

const struct FlashType* gFlash
extern

◆ gFlashSavedIme

u16 gFlashSavedIme
extern

◆ gFlashTimeoutFlag

u8 gFlashTimeoutFlag
extern

◆ gFlashTimerNum

u8 gFlashTimerNum
extern

◆ gNumberTextDecimalEnd

u8 gNumberTextDecimalEnd[]
extern

◆ gNumberTextHexEnd

u8 gNumberTextHexEnd[]
extern

◆ gLink_TimeLabelString

u8 gLink_TimeLabelString[]
extern

◆ Resource_DirectoryTable

void* Resource_DirectoryTable[]
extern

◆ Resource_PatchThumbBranchCodeSize

u8 Resource_PatchThumbBranchCodeSize[]
extern

◆ gResourceSlot_ConversionTables

u8 gResourceSlot_ConversionTables[][256]
extern

◆ gUi_WindowPalette

const u16 gUi_WindowPalette[]
extern

◆ IwramSoundPresetCode

u8 IwramSoundPresetCode[]
extern

◆ gFlash_Handler0

u32 gFlash_Handler0
extern

◆ gAnimationObjects

struct AnimationEntry* gAnimationObjects[]
extern

◆ gDebugTextCursor

u16* gDebugTextCursor
extern

◆ gDebugTextEnabled

u8 gDebugTextEnabled
extern

◆ gFlashNumRemainingBytes

u16 gFlashNumRemainingBytes
extern

◆ gSaveBuffer

◆ gSaveSlot

◆ IwramCodeRecords

u8 IwramCodeRecords[]
extern

◆ LoadedRuntime_Size

u8 LoadedRuntime_Size[]
extern

Referenced by Render_BuildOamList().

◆ gMath_ArcTanTable

const u16 gMath_ArcTanTable[]
extern

◆ gObject_ShadowTiles

const u8 gObject_ShadowTiles[]
extern

Referenced by ObjectSystem_Configure().

◆ Render_BuildOamListKernel

const u8 Render_BuildOamListKernel[]
extern

Referenced by Render_BuildOamList().

◆ Resource_ExecuteTransfer

const u8 Resource_ExecuteTransfer[]
extern

◆ Resource_PatchThumbBranch

const u8 Resource_PatchThumbBranch[]
extern

Referenced by Resource_LoadCode().

◆ gRom_LanguageCode

const u8 gRom_LanguageCode
extern

◆ gRom_UnknownBytes

u8 gRom_UnknownBytes[]
extern

◆ BattleFx_Max4Reverse

const u32 BattleFx_Max4Reverse[]
extern

◆ BattleFx_Max4Forward

const u32 BattleFx_Max4Forward[]
extern

◆ BattleFx_MaxReverse

const u32 BattleFx_MaxReverse[]
extern

◆ BattleFx_MaxForward

const u32 BattleFx_MaxForward[]
extern

◆ BattleFx_ColorReverse

const u32 BattleFx_ColorReverse[]
extern

◆ BattleFx_ColorForward

const u32 BattleFx_ColorForward[]
extern

◆ BattleFx_AdditiveReverse

const u32 BattleFx_AdditiveReverse[]
extern

◆ BattleFx_AdditiveForward

const u32 BattleFx_AdditiveForward[]
extern

◆ BattleFx_Mask

const u32 BattleFx_Mask[]
extern

◆ BattleFx_Transparent8Reverse

const u32 BattleFx_Transparent8Reverse[]
extern

◆ BattleFx_Transparent8Forward

const u32 BattleFx_Transparent8Forward[]
extern

◆ BattleFx_TransparentReverse

const u32 BattleFx_TransparentReverse[]
extern

◆ BattleFx_TransparentForward

const u32 BattleFx_TransparentForward[]
extern

◆ BattleFx_CopyReverse

const u32 BattleFx_CopyReverse[]
extern

◆ BattleFx_CopyForward

const u32 BattleFx_CopyForward[]
extern

◆ gSystem_BasicColorPalette

const u8 gSystem_BasicColorPalette[]
extern

◆ Tile_CopyStrided

u8 Tile_CopyStrided[]
extern

Referenced by ObjectSystem_Configure().

◆ Tile_CopyStridedCodeSize

u8 Tile_CopyStridedCodeSize[]
extern

Referenced by ObjectSystem_Configure().

◆ TransferCommandExecutor_Size

u8 TransferCommandExecutor_Size[]
extern