summaryrefslogtreecommitdiff
path: root/arm9/source/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'arm9/source/main.c')
-rw-r--r--arm9/source/main.c48
1 files changed, 18 insertions, 30 deletions
diff --git a/arm9/source/main.c b/arm9/source/main.c
index b32174a..235098b 100644
--- a/arm9/source/main.c
+++ b/arm9/source/main.c
@@ -211,21 +211,19 @@ static void Splash(void)
*/
static void MapJoypad(void)
{
-#if 0
SoftKeyEvent ev;
SoftKey pad = NUM_SOFT_KEYS;
int done = FALSE;
- char text[256];
SK_DisplayKeyboard();
+ SK_SetDisplayBrightness(TRUE);
- ZX SpectrumSuspendDisplay();
-
- ZX SpectrumDisplayString("press the joypad button you want\n"
- "to define and then the ZX Spectrum key\n"
- "you want to use.\n\n"
- "press on the config banner to\n"
- "finish.");
+ TM_Cls();
+ TM_Put(0,0,"Press the joypad button you want\n"
+ "to define and then the key\n"
+ "you want to use.\n\n"
+ "press on the config banner to\n"
+ "finish.");
while(!done)
{
@@ -244,17 +242,15 @@ static void MapJoypad(void)
{
pad = ev.key;
- /* Now, just how dumb was making % the inverse on/off...
- */
- sprintf(text,"defining\n %%%s%%",SK_KeyName(pad));
- ZX SpectrumDisplayString(text);
+ TM_Cls();
+ TM_printf(0,0,"Defining:\n %s",SK_KeyName(pad));
}
if (ev.key<=SK_SPACE && pad!=NUM_SOFT_KEYS)
{
- sprintf(text,"mapped\n %%%s%%\nto\n %%%s%%",
+ TM_Cls();
+ TM_printf(0,0,"Mapped:\n %s\nto:\n %s",
SK_KeyName(pad),SK_KeyName(ev.key));
- ZX SpectrumDisplayString(text);
SK_DefinePad(pad,ev.key);
@@ -266,8 +262,8 @@ static void MapJoypad(void)
swiWaitForVBlank();
}
- ZX SpectrumResumeDisplay();
-#endif
+ TM_Cls();
+ SK_SetDisplayBrightness(FALSE);
}
@@ -279,22 +275,14 @@ int main(int argc, char *argv[])
powerON(POWER_ALL_2D);
- /* Set up main screen for ZX Spectrum.
+ /* Set up main screen for the Spectrum.
*/
- videoSetMode(MODE_3_2D | DISPLAY_BG0_ACTIVE | DISPLAY_BG3_ACTIVE);
+ videoSetMode(MODE_3_2D | DISPLAY_BG3_ACTIVE);
vramSetBankA(VRAM_A_MAIN_BG_0x06000000);
vramSetBankB(VRAM_B_MAIN_BG_0x06020000);
- BG0_CR = BG_COLOR_256 | BG_32x32 | BG_MAP_BASE(0) |
- BG_TILE_BASE(1) | BG_PRIORITY(0);
- BG0_X0 = 0;
- BG0_Y0 = 0;
-
- BG_PALETTE[0] = RGB15(31,31,31);
- BG_PALETTE[1] = RGB15(0,0,0);
-
- BG3_CR = BG_BMP16_256x256 | BG_BMP_BASE(2) | BG_PRIORITY(1);
+ BG3_CR = BG_BMP8_256x256 | BG_BMP_BASE(0);
BG3_XDX = 0x100;
BG3_XDY = 0;
BG3_YDX = 0;
@@ -358,7 +346,7 @@ int main(int argc, char *argv[])
GUI_Alert(TRUE,"Failed to initialise\nthe Z80 CPU emulation!");
}
- SPECInit((uint16*)BG_BMP_RAM(2), z80);
+ SPECInit(BG_PALETTE, (uint16*)BG_BMP_RAM(0), z80);
Splash();
@@ -374,7 +362,7 @@ int main(int argc, char *argv[])
{
SoftKeyEvent ev;
- /* Z80Exec(z80); */
+ Z80Exec(z80);
while(SK_GetEvent(&ev))
{