Index
$#! · 0-9 · A · B · C · D · E · F · G · H · I · J · K · L · M · N · O · P · Q · R · S · T · U · V · W · X · Y · Z
H
 haltModeOn, Memory
 HBlank, PPU
I
 Idle
 Initialize
 InsertCartridge, GBA
 Interrupt, CPU
 ioMemAccessed, Memory
 ioram, Memory
 iwram, Memory
L
 lastAccessZone, Memory
 LoadBios, GBA
M
 main
 main.cpp
 MainWindow
 mBGOrder, PPU
 mConsumedCycles, dma_data
 mCPSR, CPU
 mCpu
 mCurrentPixel, PPU
 mem_ptrs, Memory
 memory
 Memory
 MemoryMasks, ASICRegisters
 mGPRegisters, CPU
 mHCOUNT, PPU
 mMemory
 mPrefetch, CPU
 mSPSR, CPU
O
 oam, Memory
 oamMemory, OAMSprites
 OAMSprite
 OAMSprites
 OAMTransformGroup
 OverflowTimer, timer_data
P
 PA, OAMTransformGroup
 pack_rgb, PPU
 Palette
 palettes
 Palettes
 Parse, Breakpoint
 PB, OAMTransformGroup
 PC, OAMTransformGroup
 PD, OAMTransformGroup
 ppu, GBA
 PPU
 PPU_renderers, PPU
 ppuAccessingMemory, Memory
 pram
 prevVcount, Memory
R
 Read16, Memory
 Read32, Memory
 Read8, Memory
 reg_data
 render_bg_textmode, PPU
 render_bg_textmode_tile4, PPU
 render_bg_textmode_tile8, PPU
 render_mode0, PPU
 render_mode1, PPU
 render_mode2, PPU
 render_mode3, PPU
 render_mode4, PPU
 render_mode5, PPU
 render_objsprites, PPU
 render_sprite, PPU
 render_sprite_fixed, PPU
 render_sprite_rotscale, PPU
 Resize, DebuggerInterface
bool haltModeOn
Turned on if the GBA is in halt-mode (waiting for interrupt).
inline void HBlank()
Generates a HBlank interrupt if the environment allows that.
inline bool Idle()
This is the main function of DMAChannels.
inline void Idle(int cyclesCount)
Performs idle operations on timers.
void Initialize()
Set the cpu to a starting state
void Initialize()
Initializes ncurses and the windows fields in the interface.
int Initialize(int screenMultiplier = 1)
Initializes a window and opengl with its vbs and shaders
bool InsertCartridge(char *fileName)
Fills the ROM memory reading data from a file.
inline void Interrupt(int code)
Writes to the IF Register the interrupt code.
bool ioMemAccessed
Turned on if the previous operation accessed IOMemory.
int8_t ioram[0x808 ]
IORegisters memory.
int8_t iwram[0x8000 ]
The internal working ram.
int lastAccessZone
ID of the last memory zone that has been accessed.
bool LoadBios(char *filename)
Loads the bios into its memory space (0x00000000-0x02000000) reading data from a file.
int main(int argc,
char **argv)
Entry Point of the application
class MainWindow
Represents an openGL window that displays the GBA video output.
MainWindow(PPU *p,
Memory *m)
int mBGOrder[4]
Obsolete.
int mConsumedCycles
How many cycles did the transfer consume? 
reg_data mCPSR
The Current Program Status Register
CPU* mCpu
We need it to generate interrupts (if enabled)
CPU* mCpu
A pointer to the cpu for interrupts.
CPU* mCpu
Pointer to cpu.
int mCurrentPixel
Obsolete.
int8_t* mem_ptrs[16]
Pointers to memory areas where the index is the most significant byte of an address.
Memory* memory
A pointer to the memory of the GBA.
Memory memory
Another core of the device.
struct Memory
Represents the entire address space of the GBA.
Memory()
Builds memory.
extern uint32_t MemoryMasks[16]
Memory masks for all the address space “zones”.
reg_data mGPRegisters[29]
The general purpose registers.
int mHCOUNT
Keeps track of Horizontal Count (which x is currently theoretically drawn).
Memory* mMemory
Pointer to the GBA Memory Structure.
Memory* mMemory
The most important field.
Memory* mMemory
A pointer to the memory to read LCD registers, vram, oam and pram.
Memory* mMemory
Pointer to the memory object of the associated GBA.
uint32_t mPrefetch
The pipeline instruction prefetch of the CPU.
reg_data mSPSR[4]
The Saved Program Status Registers of all the modes that support it.
int8_t oam [0x400 ]
Sprites Memory.
int8_t* oamMemory
Pointer to oam memory.
struct OAMSprite
Represents a Sprite in OAM memory.
class OAMSprites
Builds and handles all OAMSprites and OAMTransformGroups contained in OAM memory.
OAMSprites(Memory *mem)
Builds our oamsprites object.
struct OAMTransformGroup
OAM (Object Attribute Memory) contains both sprite attributes and transformation groups.
inline void OverflowTimer(int index)
Performs overflow operation on timer (generates irq if enabled, restarts with reload value, increments successive if countup is enabled).
uint16_t* PA
Pointer to the PA register (you might know it as dx ...
inline uint16_t pack_rgb(int r,
int g,
int b)
Packs 3 channels into a 16 bit RGBA_5_5_5_1 format integer.
struct Palette
Represent a palette entry (the name “Palette” is not proper here).
Palettes(Memory *mem)
Builds the Palettes object.
Palettes palettes
Palettes (It is actually plural, since it represent a set of Palette).
Palettes* palettes
A reinterpretation of pram to make things understandable.
class Palettes
Represents the full set of palettes.
bool Parse(char *str)
Parses a condition string.
uint16_t* PB
Pointer to the PB register (you might know it as dmx ...
uint16_t* PC
Pointer to the PC register (you might know it as dy ...
uint16_t* PD
Pointer to the PD register (you might know it as dmy ...
PPU ppu
Another core of the device.
class PPU
This class represents the Picture Processing Unit of the GBA Functions in here are mostly inline utilities to make code inside renderers understandable.
PPU(Memory *mem,
CPU *cpu,
Palettes *pal,
OAMSprites *spr)
Builds a PPU.
extern void (*PPU_renderers[6])(PPU*,unsigned char*)
Pointers to the render functions.
bool ppuAccessingMemory
True when the ppu is accessing memory.
int8_t pram [0x400 ]
The Palette Ram.
Palette* pram
Reinterpret Cast of the pram of the GBA.
uint32_t prevVcount
The previous VCount register is stored here.
inline uint16_t Read16(uint32_t addr)
Reads 16 bit at the given emulated address.
inline uint32_t Read32(uint32_t addr)
Reads 32 bit at the given emulated address.
inline uint8_t Read8(uint32_t addr)
Reads 8 bit at the given emulated address.
union reg_data
Represent a register.
inline void render_bg_textmode(PPU *ppu,
uint16_t bgcnt,
uint16_t bghofs,
uint16_t bgvofs,
uint16_t *outBuffer)
Renders a background in text mode.
inline void render_bg_textmode_tile4(PPU *ppu,
uint16_t bgcnt,
uint16_t bghofs,
uint16_t bgvofs,
uint16_t *outBuffer)
Renders a background with 16/16 palettes/color mode.
inline void render_bg_textmode_tile8(PPU *ppu,
uint16_t bgcnt,
uint16_t bghofs,
uint16_t bgvofs,
uint16_t *outBuffer)
Renders a background with 256/1 colors/palette mode.
void render_mode0(PPU *ppu,
unsigned char *outBuffer)
Renders a background with rendering mode 0.
void render_mode1(PPU *ppu,
unsigned char *outBuffer)
UNIMPLEMENTED.
void render_mode2(PPU *ppu,
unsigned char *outBuffer)
UNIMPLEMENTED.
void render_mode3(PPU *ppu,
unsigned char *outBuffer)
UNIMPLEMENTED.
void render_mode4(PPU *ppu,
unsigned char *outBuffer)
Renders a background with rendering mode 4.
void render_mode5(PPU *ppu,
unsigned char *outBuffer)
UNIMPLEMENTED.
inline void render_objsprites(PPU *ppu,
void *tilesMem)
Renders all the sprites of the ppu into its sprites buffer PPU.buffer_obj.
inline void render_sprite(PPU *ppu,
OAMSprite *sprite,
void *tilesMem)
Renders a sprite (into sprites buffer).
inline void render_sprite_fixed(PPU *ppu,
OAMSprite *sprite,
void *tilesMem)
Renders a sprite (into sprites buffer) that has rotation/scale disabled.
inline void render_sprite_rotscale(PPU *ppu,
OAMSprite *sprite,
void *tilesMem)
Renders a sprite (into sprites buffer) that has rotation/scale enabled.
void Resize()
Resizes windows to fill the available area.
Close