#119853 - MoonLight - Mon Feb 26, 2007 10:18 pm
I don't know why, but this code hangs the real console up.
Before the launch of swiDecompressLZSSVram Vram banks configured by vramSetMainBanks(VRAM_A_MAIN_BG_0x06000000, VRAM_B_MAIN_BG_0x06020000, VRAM_C_SUB_BG_0x06200000, VRAM_D_LCD).
TDecompressionStream CGmConsole::ms_decompCallbacks = { decompGetSize, NULL, decompReadByte };
uint32 CGmConsole::decompGetSize(const uint8 *source, uint16 *dest, uint32 arg)
{
return *((uint32*)source);
}
uint8 CGmConsole::decompReadByte(const uint8 *source)
{
return *source;
}
void CGmConsole::Init()
{
memset(ms_consoleText, ' ', 768);
swiDecompressLZSSVram((void*)consoleFontData, (void*)0x621F400, 0, &ms_decompCallbacks);
swiDecompressRLEVram((void*)consoleFontPalette, (void*)0x50005E0, 0, &ms_decompCallbacks);
SUB_BG3_CR = BG_PRIORITY_0 | BG_TILE_BASE(7) | BG_MOSAIC_OFF | BG_16_COLOR | BG_MAP_BASE(CONSOLE_BG_MAP_BASE) | BG_WRAP_OFF | BG_32x32;
}
Before the launch of swiDecompressLZSSVram Vram banks configured by vramSetMainBanks(VRAM_A_MAIN_BG_0x06000000, VRAM_B_MAIN_BG_0x06020000, VRAM_C_SUB_BG_0x06200000, VRAM_D_LCD).
TDecompressionStream CGmConsole::ms_decompCallbacks = { decompGetSize, NULL, decompReadByte };
uint32 CGmConsole::decompGetSize(const uint8 *source, uint16 *dest, uint32 arg)
{
return *((uint32*)source);
}
uint8 CGmConsole::decompReadByte(const uint8 *source)
{
return *source;
}
void CGmConsole::Init()
{
memset(ms_consoleText, ' ', 768);
swiDecompressLZSSVram((void*)consoleFontData, (void*)0x621F400, 0, &ms_decompCallbacks);
swiDecompressRLEVram((void*)consoleFontPalette, (void*)0x50005E0, 0, &ms_decompCallbacks);
SUB_BG3_CR = BG_PRIORITY_0 | BG_TILE_BASE(7) | BG_MOSAIC_OFF | BG_16_COLOR | BG_MAP_BASE(CONSOLE_BG_MAP_BASE) | BG_WRAP_OFF | BG_32x32;
}