summaryrefslogtreecommitdiff
path: root/apps/plugins/zxbox/spkey.c
diff options
context:
space:
mode:
authorAnton Romanov <theli@rockbox.org>2006-09-25 09:44:10 +0000
committerAnton Romanov <theli@rockbox.org>2006-09-25 09:44:10 +0000
commitec2a5cce1a4e3609535a9ae902a80933fbb0f341 (patch)
treebd2874b573d5b29ba695e1f13c7ee5d908a473e6 /apps/plugins/zxbox/spkey.c
parent52f4c4c82bb038f3704007016a5df1639c6af443 (diff)
yet more code cleanup, quick snapshot feature,sound should no longer crash,light optimizations
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11041 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/zxbox/spkey.c')
-rw-r--r--apps/plugins/zxbox/spkey.c249
1 files changed, 0 insertions, 249 deletions
diff --git a/apps/plugins/zxbox/spkey.c b/apps/plugins/zxbox/spkey.c
index 28a390ae2e..a001c8c7fd 100644
--- a/apps/plugins/zxbox/spkey.c
+++ b/apps/plugins/zxbox/spkey.c
@@ -732,252 +732,3 @@ void spkb_refresh(void)
z80_inports[KEMP_PORT] = pv;
}
-
-
-
-#if 0
-static void print_help(int lev)
-{
- lev=lev;
-#if 0
-switch(lev) {
- case 0:
- printf(" = ZX Spectrum Emulation (C) Szeredi Miklos 1996-98 = \n"
- " ----------------------------------------------------------\n"
- " Left Shift Spectrum - CAPS SHIFT \n"
- " Right Shift Spectrum - SYMBOL SHIFT \n"
- " Alt \"True\" Shift \n"
- " Ctrl Commands \n"
- " ----------------------------------------------------------\n"
- " Ctrl-c F10 Quit \n"
- " Ctrl-h F1 More help \n"
- " Ctrl-t F2 Save snapshot \n"
- " Ctrl-l F3 Load snapshot \n"
- " Ctrl-p F4 Play tape \n"
- " Ctrl-q F5 Reset \n"
- " Ctrl-o F6 Pause/unpause tape \n"
- " Ctrl-s F7 Stop tape \n"
- " Ctrl-f Fast \n"
- " Ctrl-n Normal speed \n"
- " Ctrl-b Pause/Unpause emulator \n"
- " Ctrl-m Toggle sound \n"
- " Ctrl-y Toggle quick loading of tapes \n"
- " Ctrl-\\ F9 Refresh screen / reset keyboard \n"
- " ==========================================================\n");
- break;
-
- case 1:
- printf(" = ZX Spectrum Emulation (C) Szeredi Miklos 1996-98 = \n"
- " ----------------------------------------------------------\n"
- " More help: \n"
- " ----------------------------------------------------------\n"
- " Ctrl-h F1 Normal help \n"
- " Ctrl-k Display (undisplay) keyboard \n"
- " Ctrl-w Ctrl-F2 Save temporary snapshot \n"
- " Ctrl-e Ctrl-F3 Load temporary snapshot \n"
- " Ctrl-r Save to tapefile \n"
- " Ctrl-, Reduce screen size (X only) \n"
- " Ctrl-. Increase screen size (X only) \n"
- " Ctrl-. Toggle private color-map (X only) \n"
- " Ctrl-= Decrease frame frequency \n"
- " Ctrl-- Increase frame frequency \n"
- " Ctrl-] Increase sound buffer size \n"
- " Ctrl-[ Decrease sound buffer size \n"
- " ==========================================================\n");
- break;
-
- case 2:
- printf(
-" --------------------------------------------------------------------- \n"
-"|BLUE |RED |MAGENT|GREEN |CYAN |YELLOW|WHITE | | |BLACK | \n"
-"| 1 ! | 2 @ | 3 # | 4 $ | 5 %% | 6 & | 7 ' | 8 ( | 9 ) | 0 _ | \n"
-"|EDIT |CAPS |TRU VD|INV VD| <- | v | ^ | -> |GRAPH |DELETE| \n"
-"|DEF FN|FN |LINE |OPEN# |CLOSE#|MOVE |ERASE |POINT |CAT |FORMAT| \n"
-" ------------------------------------------------------------------------ \n"
-" |SIN |COS |TAN |INT |RND |STR$ |CHR$ |CODE |PEEK |TAB | \n"
-" | Q <= | W <> | E >= | R < | T > | Y AND| U OR | I AT | O ; | P \" | \n"
-" |PLOT |DRAW |REM |RUN |RAND |RETURN|IF |INPUT |POKE |PRINT | \n"
-" |ASN |ACS |ATN |VERIFY|MERGE | [ | ] |IN |OUT |(C) | \n"
-" ------------------------------------------------------------------------ \n"
-" |READ |RESTOR|DATA |SGN |ABS |SQR |VAL |LEN |USR | |\n"
-" |A STOP| S NOT|D STEP| F TO |G THEN| H ^ | J - | K + | L = | |\n"
-" |NEW |SAVE |DIM |FOR |GO TO |GO SUB|LOAD |LIST |LET |ENTER|\n"
-" | ~ | | | \\ | { | } |CIRCLE|VAL$ |SCRN$ |ATTR | |\n"
-" -------------------------------------------------------------------------- \n"
-" | |LN |EXP |LPRINT|LLIST |BIN |INKEY$| PI | | | \n"
-" | CAPS | Z : | X GBP| C ? | V / | B * | N , | M . |SYMBOL| BREAK | \n"
-" | SHIFT |COPY |CLEAR |CONT |CLS |BORDER|NEXT |PAUSE |SHIFT | SPACE | \n"
-" | |BEEP |INK |PAPER |FLASH |BRIGHT|OVER |INVERS| | | \n"
-" ----------------------------------------------------------------------- \n"
- );
- break;
-
- }
-/* if(need_switch_mode) {
- printf(" Press ENTER to continue! \n");
- while(getchar() != '\n');
- }*/
-#endif
-}
-#endif
-#ifdef DEBUG_Z80
-extern int deb_steps;
-#endif
-
-#define CF(x) ((x) + 12)
-
-int spkey_keyfuncs(void)
-{
- static int help_mode = 0;
- int lch;
- int new_help_mode;
-
- lch = spkb_last.keysym;
-
- if(!(spkb_last.modif & funcshift) &&
- (lch < SK_F1 || lch > SK_F12 ||
- (spkb_last.modif & SKMod1Mask))) return 0;
-
- if(lch >= 'A' && lch <= 'Z') lch += 32;
- if((spkb_last.modif & funcshift) && lch >= SK_F1 && lch <= SK_F12)
- lch = CF(lch);
-
- new_help_mode = 0;
-
- switch(lch) {
- case 'c':
-/* case SK_F10:
- exit(0);*/
- case 'p':
- case SK_F4:
- spkey_textmode();
- start_play();
- spkey_screenmode();
- break;
- case 'r':
- spkey_textmode();
- start_rec();
- spkey_screenmode();
- break;
- case 'o':
- case SK_F6:
- pause_play();
- break;
- case 's':
- case SK_F7:
- stop_play();
- break;
- case 'f':
- sp_nosync = 1;
- sp_paused = 0;
- autoclose_sound();
- break;
- case 'n':
- sp_nosync = 0;
- sp_paused = 0;
- break;
- case 'b':
- sp_paused = !sp_paused;
- if(sp_paused) clear_keystates();
- /*sprintf(msgbuf, "%s emulator", sp_paused ? "Paused" : "Unpaused");
- put_msg(msgbuf);*/
-/* rb->splash (HZ*2, true,sp_paused ? "Paused" : "Unpaused");*/
- break;
- case 'q':
- case SK_F5:
- z80_reset();
- break;
- case 't':
- case SK_F2:
- spkey_textmode();
- save_snapshot();
- spkey_screenmode();
- break;
- case 'l':
- case SK_F3:
- spkey_textmode();
- load_snapshot();
- spkey_screenmode();
- break;
-#ifdef DEBUG_Z80
- case 'v':
- deb_steps = 0;
- break;
-#endif
- case '=':
- if(showframe < 10) showframe++;
-/* sprintf(msgbuf, "showframe: %i", showframe);
- put_msg(msgbuf);*/
- break;
- case '-':
- if(showframe > 1) showframe--;
-/* sprintf(msgbuf, "showframe: %i", showframe);
- put_msg(msgbuf);*/
- break;
- case ']':
- if(bufframes < 25) bufframes++;
-/* sprintf(msgbuf, "msgbuf, bufframes: %i", bufframes);
- put_msg(msgbuf);*/
- setbufsize();
- break;
- case '[':
- if(bufframes > 1) bufframes--;
-/* sprintf(msgbuf, "bufframes: %i", bufframes);
- put_msg(msgbuf);*/
- setbufsize();
- break;
- case 'm':
- sound_on = !sound_on;
-/* sprintf(msgbuf, "sound %s", sound_on ? "on" : "off");
- put_msg(msgbuf);*/
- break;
- case 'h':
- case SK_F1:
-/* case SK_Help:
- spkey_textmode();
- print_help(help_mode);
- spkey_screenmode();
- new_help_mode = 1 - help_mode;
- break;*/
-/* case 'k':
- spkey_textmode();
- if(!display_keyboard()) print_help(2);
- spkey_screenmode();
- break;*/
- case '\\':
- case SK_F9:
- spscr_refresh_colors();
-/* sp_init_screen_mark(); already donde in prev fn. */
- clear_keystates();
- break;
- case '.':
- resize_spect_scr(scrmul+1);
- break;
- case ',':
- resize_spect_scr(scrmul-1);
- break;
- case 'y':
- sp_quick_load = !sp_quick_load;
-/* sprintf(msgbuf, "Quick load %s", sp_quick_load ? "on" : "off");
- put_msg(msgbuf);*/
- break;
- case 'w':
- case CF(SK_F2):
- save_quick_snapshot();
- break;
- case 'e':
- case CF(SK_F3):
- load_quick_snapshot();
- break;
- case 'j':
- privatemap = !privatemap;
-/* sprintf(msgbuf, "Private colormap %s", privatemap ? "on" : "off");
- put_msg(msgbuf);*/
- spscr_refresh_colors();
- break;
- }
-
- help_mode = new_help_mode;
-
- return 1;
-}