The Socrates Gameboy Advance Development Engine
The SGADE is a development library for the Nintendo Gameboy
Advance. It's free for all uses and is distributed without guarantees.
For more information visit
the SGADE page.
Files | |
| file | SoDisplay.c |
| file | SoDisplay.h |
Defines | |
| #define | SO_REG_DISP_CNT |
| GBA display control register, defined in the header cause it's used in multiple files. | |
| #define | SO_REG_DISP_STAT |
| GBA display statistics register, defined in the header cause it's used in multiple files. | |
| #define | SO_REG_SCANLINE_COUNT |
| GBA scanline counter register, defined in the header cause it's used in multiple files. | |
| #define | SO_REG_DISP_MOSAIC_W |
| GBA display mosaic register, defined in the header cause it's used in multiple files. | |
| #define | SO_SCREEN_WIDTH |
| Width of the GBA screen. | |
| #define | SO_SCREEN_HALF_WIDTH |
| Half of the GBA screen width. | |
| #define | SO_SCREEN_HEIGHT |
| Height of the GBA screen. | |
| #define | SO_SCREEN_HALF_HEIGHT |
| Half of the GBA screen height. | |
| #define | SO_RED |
| Pure red;. | |
| #define | SO_GREEN |
| Pure green;. | |
| #define | SO_BLUE |
| Pure blue;. | |
| #define | SO_WHITE |
| Pure white;. | |
| #define | SO_BLACK |
| Pure black;. | |
| #define | SO_YELLOW |
| Pure yellow;. | |
| #define | SO_CYAN |
| Pure cyan;. | |
| #define | SO_MAGENTA |
| Pure magenta (purple);. | |
| #define | SO_PURPLE |
| Pure purple (magenta);. | |
| #define | SO_RGB(r, g, b) |
| Converts three 5 bit values for RGB into one 16 bit RGB value. | |
| #define | SO_RGB_GET_R(c) |
| Extracts the 5 bit R value out of a 15 bit RGB value. | |
| #define | SO_RGB_GET_G(c) |
| Extracts the 5 bit G value out of a 15 bit RGB value. | |
| #define | SO_RGB_GET_B(c) |
| Extracts the 5 bit B value out of a 15 bit RGB value. | |
| #define | SO_SCREEN_HALF_WIDTH_MULTIPLY(y) |
| Multiplies the given number by the half width (120) of the GBA screen;. | |
Functions | |
| void | SoDisplayInitialize (void) |
| Initializes the display. | |
| void | SoDisplayEnable (u32 a_Enable) |
| Enables or disables the display. | |
| void | SoDisplaySetMode (u32 a_Mode) |
| Sets the current video display mode (0..6). | |
| u32 | SoDisplayGetMode (void) |
| Gets the current video display mode. | |
| u32 | SoDisplayGetVCounter (void) |
| Returns the current scanline count. | |
| bool | SoDisplayIsInVBlank (void) |
| Tests whether we are in VBlank or not. | |
| bool | SoDisplayIsInHBlank (void) |
| Tests whether we are in HBlank or not. | |
| void | SoDisplayWaitForVBlankStart (void) |
| Waits until we are at the start of VBlank. | |
| void | SoDisplayWaitForVBlankEnd (void) |
| Waits until we VBlank has ended. | |
Variables | |
| u16 | SO_REG_DISP_MOSAIC_RW |
| GBA display mosaic register backup, so we can both read and write;. | |
Singleton
This module contains and defines everything related to the display of the GBA. Very specific stuff gets it's own module like SoMode4Renderer and SoMode4PolygonRasterizer but this module contains the most general stuff.
|
|
GBA display mosaic register, defined in the header cause it's used in multiple files.
|
|
|
Enables or disables the display.
|
|
|
Gets the current video display mode. This routine retrieves the current video display mode. |
|
|
Returns the current scanline count.
|
|
|
Initializes the display.
Resets the display registers. |
|
|
Tests whether we are in HBlank or not.
|
|
|
Tests whether we are in VBlank or not.
|
|
|
Sets the current video display mode (0..6).
|
|
|
Waits until we VBlank has ended.
Routine just halts the CPU (except for interrupts) until the display finishes VBlank.
|
|
|
Waits until we are at the start of VBlank.
Routine just halts the CPU (except for interrupts) until the display reaches the start of VBlank.
|
|
|
GBA display mosaic register backup, so we can both read and write;.
|