From a50b3820e29af6d12b86c55afb8be1aee9091558 Mon Sep 17 00:00:00 2001 From: Ian C Date: Mon, 9 Oct 2006 00:32:14 +0000 Subject: Working version with a few games included --- arm9/source/main.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'arm9/source/main.c') diff --git a/arm9/source/main.c b/arm9/source/main.c index 43c8993..78d40c1 100644 --- a/arm9/source/main.c +++ b/arm9/source/main.c @@ -29,6 +29,7 @@ #include "keyboard.h" #include "z80.h" #include "zx81.h" +#include "tapes.h" #include "splashimg_bin.h" #include "rom_font_bin.h" @@ -38,8 +39,9 @@ static const char *main_menu[]= { "Reset ZX81", - "Sticky Keys On", - "Sticky Keys Off", + "Select Tape", + "Sticky Shift On", + "Sticky Shift Off", "Define Joystick", "Cancel", NULL @@ -48,6 +50,7 @@ static const char *main_menu[]= typedef enum { MenuReset, + MenuSelectTape, MenuStickyOn, MenuStickyOff, MenuDefineJoystick @@ -89,13 +92,16 @@ static void Splash(void) loadPCX(splashimg_bin,&img); image8to16(&img); - dmaCopy(img.data8,BG_GFX_SUB,SCREEN_WIDTH*SCREEN_HEIGHT*2); + + FB_Blit(&img,0,0); for(f=0;text[f];f++) { FB_Centre(text[f],40+f*8,FB_RGB(31,31,31),-1); } + ZX81DisplayString("10 print '%the zx81 is ace%'\n20 goto 10"); + while(!(keysDown() & KEY_A)) { swiWaitForVBlank(); @@ -147,8 +153,6 @@ int main(int argc, char *argv[]) FB_Init(BG_GFX_SUB); - Splash(); - z80 = Z80Init(ZX81ReadMem, ZX81WriteMem, ZX81ReadPort, @@ -162,6 +166,8 @@ int main(int argc, char *argv[]) ZX81Init((uint16*)SCREEN_BASE_BLOCK(0), z80); + Splash(); + SK_DisplayKeyboard(BG_GFX_SUB); SK_SetSticky(SK_SHIFT,1); @@ -186,6 +192,10 @@ int main(int argc, char *argv[]) ZX81Reset(z80); break; + case MenuSelectTape: + SelectTape(); + break; + case MenuStickyOn: SK_SetSticky(SK_SHIFT,1); break; -- cgit v1.2.3