Added function key functions
This commit is contained in:
parent
308fe5ba50
commit
c5bca1ef5b
47
src/events.c
47
src/events.c
@ -5,6 +5,9 @@
|
||||
|
||||
extern float displayScale;
|
||||
extern int clocksteps;
|
||||
extern uint8_t halt;
|
||||
extern uint8_t showDebug;
|
||||
extern uint8_t showHelp;
|
||||
|
||||
extern void resetSystem();
|
||||
extern void irq6502();
|
||||
@ -29,30 +32,54 @@ void pollEvents(sfRenderWindow *window){
|
||||
break;
|
||||
case sfEvtKeyPressed:
|
||||
switch (event.key.code){
|
||||
case sfKeyEscape:
|
||||
case sfKeyF1: /* Close Window or show help*/
|
||||
sfRenderWindow_close(window);
|
||||
break;
|
||||
case sfKeyF2:
|
||||
|
||||
case sfKeyF2: /* Show Key Help */
|
||||
showHelp = !showHelp;
|
||||
break;
|
||||
|
||||
case sfKeyF3: /* Show Debug Menu */
|
||||
showDebug = !showDebug;
|
||||
break;
|
||||
|
||||
case sfKeyF4: /* CPU Halt */
|
||||
halt = !halt;
|
||||
break;
|
||||
|
||||
case sfKeyF5: /* CPU Reset */
|
||||
resetSystem();
|
||||
break;
|
||||
|
||||
case sfKeyF6: /* Scale -- */
|
||||
if (displayscale > 1) displayscale--;
|
||||
updateRenderStates();
|
||||
break;
|
||||
case sfKeyF3:
|
||||
|
||||
case sfKeyF7: /* Scale ++ */
|
||||
displayscale++;
|
||||
updateRenderStates();
|
||||
break;
|
||||
case sfKeyF5:
|
||||
resetSystem();
|
||||
break;
|
||||
case sfKeyF8:
|
||||
|
||||
case sfKeyF8: /* CPU Singlestep */
|
||||
for (int i = 0; i < clocksteps; i++) step6502();
|
||||
break;
|
||||
case sfKeyF12:
|
||||
irq6502();
|
||||
|
||||
case sfKeyF9: /* CPU Save Snapshot */
|
||||
break;
|
||||
case sfKeyF11:
|
||||
|
||||
case sfKeyF10: /* CPU Load recent or given snapshot */
|
||||
break;
|
||||
|
||||
case sfKeyF11: /* CPU NMI */
|
||||
nmi6502();
|
||||
break;
|
||||
|
||||
case sfKeyF12: /* CPU IRQ */
|
||||
irq6502();
|
||||
break;
|
||||
|
||||
default:
|
||||
currentKey = event.key.code;
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user