|
|
| version 1.20, 2003/12/04 17:09:39 | version 1.26, 2004/01/25 05:41:29 |
|---|---|
| Line 28 | Line 28 |
| #include "s98.h" | #include "s98.h" |
| #include "diskdrv.h" | #include "diskdrv.h" |
| #include "fddfile.h" | #include "fddfile.h" |
| #include "statsave.h" | |
| #define USE_RESUME | #define USE_RESUME |
| NP2OSCFG np2oscfg = {100, 100, 0, 2, 0, 0, 0, 0, 0, 0}; | NP2OSCFG np2oscfg = {100, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0}; |
| WindowPtr hWndMain; | WindowPtr hWndMain; |
| BOOL np2running; | BOOL np2running; |
| Line 110 static void MenuBarInit(void) { | Line 109 static void MenuBarInit(void) { |
| if (hmenu) { | if (hmenu) { |
| AppendResMenu(hmenu, 'DRVR'); | AppendResMenu(hmenu, 'DRVR'); |
| } | } |
| #if 0 // defined(SUPPORT_SCSI) | |
| hmenu = GetMenuHandle(IDM_HARDDISK); | |
| if (hmenu) { | |
| AppendMenu(hmenu, "\pSCSI #0"); | |
| AppendMenu(hmenu, "\pSCSI #1"); | |
| AppendMenu(hmenu, "\pSCSI #2"); | |
| AppendMenu(hmenu, "\pSCSI #3"); | |
| } | |
| #endif | |
| InsertMenu(GetMenu(IDM_SASI1), -1); | InsertMenu(GetMenu(IDM_SASI1), -1); |
| InsertMenu(GetMenu(IDM_SASI2), -1); | InsertMenu(GetMenu(IDM_SASI2), -1); |
| InsertMenu(GetMenu(IDM_KEYBOARD), -1); | InsertMenu(GetMenu(IDM_KEYBOARD), -1); |
| Line 119 static void MenuBarInit(void) { | Line 127 static void MenuBarInit(void) { |
| #if TARGET_API_MAC_CARBON | #if TARGET_API_MAC_CARBON |
| hmenu = GetMenuHandle(IDM_FDD2); | hmenu = GetMenuHandle(IDM_FDD2); |
| SetItemCmd(hmenu, LoWord(IDM_FDD2OPEN), 'D'); | SetItemCmd(hmenu, LoWord(IDM_FDD2OPEN), 'D'); |
| SetMenuItemModifiers(hmenu, LoWord(IDM_FDD2OPEN), kMenuOptionModifier); | SetMenuItemModifiers(hmenu, LoWord(IDM_FDD2OPEN), kMenuShiftModifier); |
| SetItemCmd(hmenu, LoWord(IDM_FDD2EJECT), 'E'); | SetItemCmd(hmenu, LoWord(IDM_FDD2EJECT), 'E'); |
| SetMenuItemModifiers(hmenu, LoWord(IDM_FDD2EJECT), kMenuOptionModifier); | SetMenuItemModifiers(hmenu, LoWord(IDM_FDD2EJECT), kMenuShiftModifier); |
| hmenu = GetMenuHandle(IDM_SASI2); | hmenu = GetMenuHandle(IDM_SASI2); |
| SetItemCmd(hmenu, LoWord(IDM_FDD2OPEN), 'O'); | SetItemCmd(hmenu, LoWord(IDM_SASI2OPEN), 'O'); |
| SetMenuItemModifiers(hmenu, LoWord(IDM_SASI2OPEN), kMenuOptionModifier); | SetMenuItemModifiers(hmenu, LoWord(IDM_SASI2OPEN), kMenuShiftModifier); |
| #else | #else |
| EnableItem(GetMenuHandle(IDM_DEVICE), LoWord(IDM_MOUSE)); | EnableItem(GetMenuHandle(IDM_DEVICE), LoWord(IDM_MOUSE)); |
| EnableItem(GetMenuHandle(IDM_KEYBOARD), LoWord(IDM_F12MOUSE)); | EnableItem(GetMenuHandle(IDM_KEYBOARD), LoWord(IDM_F12MOUSE)); |
| Line 426 static void HandleMenuChoice(long wParam | Line 434 static void HandleMenuChoice(long wParam |
| update |= SYS_UPDATECFG; | update |= SYS_UPDATECFG; |
| break; | break; |
| case IDM_JASTSND: | |
| menu_setjastsnd(np2oscfg.jastsnd ^ 1); | |
| update |= SYS_UPDATEOSCFG; | |
| break; | |
| case IDM_SEEKSND: | case IDM_SEEKSND: |
| menu_setmotorflg(np2cfg.MOTOR ^ 1); | menu_setmotorflg(np2cfg.MOTOR ^ 1); |
| update |= SYS_UPDATECFG; | update |= SYS_UPDATECFG; |
| Line 578 static void eventproc(EventRecord *event | Line 591 static void eventproc(EventRecord *event |
| } | } |
| #endif | #endif |
| if (event->modifiers & cmdKey) { | if (event->modifiers & cmdKey) { |
| #if !TARGET_API_MAC_CARBON | |
| if (mackbd_keydown(keycode, TRUE)) { | |
| break; | |
| } | |
| #endif | |
| soundmng_stop(); | soundmng_stop(); |
| mousemng_disable(MOUSEPROC_MACUI); | mousemng_disable(MOUSEPROC_MACUI); |
| #if TARGET_API_MAC_CARBON | |
| HandleMenuChoice(MenuEvent(event)); | |
| #else | |
| HandleMenuChoice(MenuKey(event->message & charCodeMask)); | HandleMenuChoice(MenuKey(event->message & charCodeMask)); |
| #endif | |
| mousemng_enable(MOUSEPROC_MACUI); | mousemng_enable(MOUSEPROC_MACUI); |
| soundmng_play(); | soundmng_play(); |
| } | } |
| Line 713 int main(int argc, char *argv[]) { | Line 735 int main(int argc, char *argv[]) { |
| menu_setf12key(np2oscfg.F12KEY); | menu_setf12key(np2oscfg.F12KEY); |
| menu_setbeepvol(np2cfg.BEEP_VOL); | menu_setbeepvol(np2cfg.BEEP_VOL); |
| menu_setsound(np2cfg.SOUND_SW); | menu_setsound(np2cfg.SOUND_SW); |
| menu_setjastsnd(np2oscfg.jastsnd); | |
| menu_setmotorflg(np2cfg.MOTOR); | menu_setmotorflg(np2cfg.MOTOR); |
| menu_setextmem(np2cfg.EXTMEM); | menu_setextmem(np2cfg.EXTMEM); |
| menu_setdispclk(np2oscfg.DISPCLK); | menu_setdispclk(np2oscfg.DISPCLK); |