diff options
author | Ian C <ianc@noddybox.co.uk> | 2006-10-09 00:32:14 +0000 |
---|---|---|
committer | Ian C <ianc@noddybox.co.uk> | 2006-10-09 00:32:14 +0000 |
commit | a50b3820e29af6d12b86c55afb8be1aee9091558 (patch) | |
tree | a3e74e4706488db0701bc992b1eb75e29d52e7a1 /source/main.c | |
parent | 09a74c822519bae9d20f79b8e7808f19c5094e7f (diff) |
Working version with a few games included
Diffstat (limited to 'source/main.c')
-rw-r--r-- | source/main.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/source/main.c b/source/main.c index 43c8993..78d40c1 100644 --- a/source/main.c +++ b/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; |