This is the class representing the entire device.
class GBA
Builds a GameBoyAdvance.
GBA()
Cartridge emulated ROM.
int8_t* gba_rom
The size of the ROM.
uint32_t gba_rom_size
GBA emulation thread entry point
void* gbaFunc( void * args )
Gets bit 9.
inline bool GetA0B9()
Returns the in-system address associated to the emulated address.
inline void* GetAddress( uint32_t addr )
Contained in DISPCNT.
inline int GetBGMode()
Computes Evy factor for backgrounds effects (from BLDY register).
inline float GetBLDYEvy()
inline int getByID( int i )
inline int getByXY( int x, int y )
Checks how many cycles has the dma consumed.
inline int GetConsumedCycles()
Retrieves the control register of a DMAChannel.
inline uint16_t GetControl( int chan )
Gets the Control register of the timer.
inline int GetControl( int index )
Retrieves a timer’s counter.
inline uint16_t GetCount( int index )
When countup timing is enabled in a timer, when it overflows, it increases the next one value.
inline bool GetCountUpTiming( int index )
True if 8bit tiles shall be used, False if 4 bit tiles shall be used.
inline bool GetCP()
Retrieve Current Program Status Register
inline uint32_t GetCpsr()
Returns the destination address operation of the DMAChannel.
inline int GetDestAddrOperation( int chan )
Retrieves the destination address of a DMAChannel.
inline uint32_t GetDestinationAddr( int chan )
The DISPCNT register contains information about rendering (e.g.
inline uint16_t GetDISPCNT()
The DISPSTAT register contains the LYC (vertical match register) and things like HBLANK flag, VBLANK flag, ....
inline uint16_t GetDISPSTAT()
Checks if a DMA channel is enabled.
inline bool GetDMAEnabled( int chan )
Returns the DRQ Flag of the DMAChannel.
inline bool GetDRQ( int chan )
The first frame in rendering modes 3-4-5.
inline unsigned char* GetFirstFrame()
True if the sprite has to be flipped horizontally.
inline int GetFlipX()
True if the sprite has to be flipped vertically.
inline int GetFlipY()
Gets the id of a GP register depending on the current mode.
inline int GetGPRegisterID( int regid, int mode )
Returns the value contained inside a register (in the current mode).
inline uint32_t GetGPRegValue( int regid, int pcOff = 8 )
inline int getHigherNibble( int i )
Gets IORam converted to the ASICRegister structure.
inline ASICRegisters* GetIORam()
The IORam of the GBA associated to the PPU.
inline ASICRegisters* GetIORam()
Returns if DMA interrupts are enabled for a channel.
inline bool GetIRQEnabled( int chan )
Gets if interrupts for a timer overflow are enabled.
inline bool GetIRQEnabled( int index )
inline int getLowerNibble( int i )
The memory of the GBA associated to the PPU.
inline Memory* GetMemory()
0=Normal, 1=Semi-Transparent, 2=Obj-Window
inline int GetObjMode()
0=square, 1=horizontal, 2=vertical
inline int GetObjShape()
Returns the size ID.
inline int GetObjSizeID()
Unimplemented.
inline void* GetObjTilesMemory()
Converts arm opcode into assembly language.
void GetOperationName( char * buffer, int opcode, int opaddr, bool thumb = false, char * comment = nullptr )
Retrieves the color of a background palette.
inline Palette* GetPaletteBG ( int section, int id )
The ID of the palette that has to be used in Tile4 mode.
inline int GetPaletteID()
Retrieves the color of a sprite palette.
inline Palette* GetPaletteOBJ( int section, int id )
The Palettes of the GBA associated to the PPU.
inline Palettes* GetPalettes()
Retrieves the ppu associated to this Window.
inline PPU* GetPPU()
Retrieves pipeline prefetch.
inline uint32_t GetPrefetch()
Gets Prescaler selection.
inline int GetPrescalerSelection( int index )
Gets The prescaler selection index of a timer.
inline int GetPrescalerSelectionIndex( int index )
The priority relative to backgrounds.
inline int GetPriority()
Returns the repeat flag of the DMAChannel.
inline bool GetRepeat( int chan )
Returns true if rotation/scale are used.
inline bool GetRSFlag()
There are 32 transform groups for 128 sprites.
inline int GetRSGroup()
The second frame in rendering modes 3-4-5.
inline unsigned char* GetSecondFrame()
For Render modes 4-5.
inline bool GetSelectedSecondFrame()
Gets the shaders code to draw a full screen quad.
void GetShadersCode( char * vs, char * fs )
Computes the size of the emulated memory.
uint32_t GetSize()
Retrieves the source address of a DMAChannel.
inline uint32_t GetSourceAddr( int chan )
Returns the source address operation of the DMAChannel.
inline int GetSourceAddrOperation( int chan )
inline OAMSprite* GetSprite( int id )
The Sprites of the GBA associated to the PPU.
inline OAMSprites* GetSprites()
Gets the ID of the register SPSR with a particular mode.
inline int GetSpsrID( int mode )
Retrieves the value of SPSR.
inline int GetSpsrVal()
Check if the DMA Channel should start execution
inline bool GetStartCondition( int chan )
Returns the start condition of the DMAChannel.
inline int GetStartTiming( int chan )
The id of the upper-left tile.
inline int GetTileID()
Retrieves a timer’s state.
inline bool GetTimerState( int index )
Every part is located at 0x8 offset starting at 0x6.
inline uint16_t* GetTransformationGroupPart( int id )
inline OAMTransformGroup* GetTransformGroup( int id )
Returns the word size of the DMAChannel.
inline bool GetUnitSize( int chan )
True if VBlank Flag is set.
inline bool GetVBlank()
The VRAM of the GBA associated to the PPU.
inline int8_t* GetVRam()
Retrieves the transfer words count of a DMAChannel.
inline uint16_t GetWordsCount( int chan )
inline int getWSCount( int id )
The X-coordinate of the sprite.
inline int GetX()
The Y-coordinate of the sprite.
inline int GetY()