src/osd/sdl/debugosx.m
| r15075 | r15076 | |
| 827 | 827 | { |
| 828 | 828 | NSInteger tag; |
| 829 | 829 | for (tag = 1; tag <= 8; tag <<= 1) { |
| 830 | | NSString *title = [NSString stringWithFormat:@"%d-byte Chunks", tag]; |
| 830 | NSString *title = [NSString stringWithFormat:@"%ld-byte Chunks", tag]; |
| 831 | 831 | NSMenuItem *chunkItem = [menu insertItemWithTitle:title |
| 832 | 832 | action:@selector(showChunkSize:) |
| 833 | | keyEquivalent:[NSString stringWithFormat:@"%d", tag] |
| 833 | keyEquivalent:[NSString stringWithFormat:@"%ld", tag] |
| 834 | 834 | atIndex:index++]; |
| 835 | 835 | [chunkItem setTarget:self]; |
| 836 | 836 | [chunkItem setTag:tag]; |
| r15075 | r15076 | |
| 900 | 900 | |
| 901 | 901 | item = [contextMenu addItemWithTitle:@"Toggle Breakpoint" |
| 902 | 902 | action:@selector(debugToggleBreakpoint:) |
| 903 | | keyEquivalent:[NSString stringWithFormat:@"%C", NSF9FunctionKey]]; |
| 903 | keyEquivalent:[NSString stringWithFormat:@"%C", (short)NSF9FunctionKey]]; |
| 904 | 904 | [item setKeyEquivalentModifierMask:0]; |
| 905 | 905 | [item setTarget:self]; |
| 906 | 906 | |
| 907 | 907 | item = [contextMenu addItemWithTitle:@"Disable Breakpoint" |
| 908 | 908 | action:@selector(debugToggleBreakpointEnable:) |
| 909 | | keyEquivalent:[NSString stringWithFormat:@"%C", NSF9FunctionKey]]; |
| 909 | keyEquivalent:[NSString stringWithFormat:@"%C", (short)NSF9FunctionKey]]; |
| 910 | 910 | [item setKeyEquivalentModifierMask:NSShiftKeyMask]; |
| 911 | 911 | [item setTarget:self]; |
| 912 | 912 | |
| r15075 | r15076 | |
| 914 | 914 | |
| 915 | 915 | item = [contextMenu addItemWithTitle:@"Run to Cursor" |
| 916 | 916 | action:@selector(debugRunToCursor:) |
| 917 | | keyEquivalent:[NSString stringWithFormat:@"%C", NSF4FunctionKey]]; |
| 917 | keyEquivalent:[NSString stringWithFormat:@"%C", (short)NSF4FunctionKey]]; |
| 918 | 918 | [item setKeyEquivalentModifierMask:0]; |
| 919 | 919 | [item setTarget:self]; |
| 920 | 920 | |
| r15075 | r15076 | |
| 1163 | 1163 | { |
| 1164 | 1164 | NSMenuItem *breakItem = [menu insertItemWithTitle:@"Toggle Breakpoint at Cursor" |
| 1165 | 1165 | action:@selector(debugToggleBreakpoint:) |
| 1166 | | keyEquivalent:[NSString stringWithFormat:@"%C", NSF9FunctionKey] |
| 1166 | keyEquivalent:[NSString stringWithFormat:@"%C", (short)NSF9FunctionKey] |
| 1167 | 1167 | atIndex:index++]; |
| 1168 | 1168 | [breakItem setKeyEquivalentModifierMask:0]; |
| 1169 | 1169 | [breakItem setTarget:self]; |
| r15075 | r15076 | |
| 1171 | 1171 | { |
| 1172 | 1172 | NSMenuItem *disableItem = [menu insertItemWithTitle:@"Disable Breakpoint at Cursor" |
| 1173 | 1173 | action:@selector(debugToggleBreakpointEnable:) |
| 1174 | | keyEquivalent:[NSString stringWithFormat:@"%C", NSF9FunctionKey] |
| 1174 | keyEquivalent:[NSString stringWithFormat:@"%C", (short)NSF9FunctionKey] |
| 1175 | 1175 | atIndex:index++]; |
| 1176 | 1176 | [disableItem setKeyEquivalentModifierMask:NSShiftKeyMask]; |
| 1177 | 1177 | [disableItem setAlternate:YES]; |
| r15075 | r15076 | |
| 1183 | 1183 | if (runMenu != nil) { |
| 1184 | 1184 | runItem = [runMenu addItemWithTitle:@"to Cursor" |
| 1185 | 1185 | action:@selector(debugRunToCursor:) |
| 1186 | | keyEquivalent:[NSString stringWithFormat:@"%C", NSF4FunctionKey]]; |
| 1186 | keyEquivalent:[NSString stringWithFormat:@"%C", (short)NSF4FunctionKey]]; |
| 1187 | 1187 | } else { |
| 1188 | 1188 | runItem = [menu insertItemWithTitle:@"Run to Cursor" |
| 1189 | 1189 | action:@selector(debugRunToCursor:) |
| 1190 | | keyEquivalent:[NSString stringWithFormat:@"%C", NSF4FunctionKey] |
| 1190 | keyEquivalent:[NSString stringWithFormat:@"%C", (short)NSF4FunctionKey] |
| 1191 | 1191 | atIndex:index++]; |
| 1192 | 1192 | } |
| 1193 | 1193 | [runItem setKeyEquivalentModifierMask:0]; |
| r15075 | r15076 | |
| 1350 | 1350 | { |
| 1351 | 1351 | NSMenuItem *runParentItem = [menu addItemWithTitle:@"Run" |
| 1352 | 1352 | action:@selector(debugRun:) |
| 1353 | | keyEquivalent:[NSString stringWithFormat:@"%C", NSF5FunctionKey]]; |
| 1353 | keyEquivalent:[NSString stringWithFormat:@"%C", (short)NSF5FunctionKey]]; |
| 1354 | 1354 | NSMenu *runMenu = [[NSMenu allocWithZone:[NSMenu menuZone]] initWithTitle:@"Run"]; |
| 1355 | 1355 | [runParentItem setSubmenu:runMenu]; |
| 1356 | 1356 | [runMenu release]; |
| 1357 | 1357 | [runParentItem setKeyEquivalentModifierMask:0]; |
| 1358 | 1358 | [[runMenu addItemWithTitle:@"and Hide Debugger" |
| 1359 | 1359 | action:@selector(debugRunAndHide:) |
| 1360 | | keyEquivalent:[NSString stringWithFormat:@"%C", NSF12FunctionKey]] |
| 1360 | keyEquivalent:[NSString stringWithFormat:@"%C", (short)NSF12FunctionKey]] |
| 1361 | 1361 | setKeyEquivalentModifierMask:0]; |
| 1362 | 1362 | [[runMenu addItemWithTitle:@"to Next CPU" |
| 1363 | 1363 | action:@selector(debugRunToNextCPU:) |
| 1364 | | keyEquivalent:[NSString stringWithFormat:@"%C", NSF6FunctionKey]] |
| 1364 | keyEquivalent:[NSString stringWithFormat:@"%C", (short)NSF6FunctionKey]] |
| 1365 | 1365 | setKeyEquivalentModifierMask:0]; |
| 1366 | 1366 | [[runMenu addItemWithTitle:@"until Next Interrupt on Current CPU" |
| 1367 | 1367 | action:@selector(debugRunToNextInterrupt:) |
| 1368 | | keyEquivalent:[NSString stringWithFormat:@"%C", NSF7FunctionKey]] |
| 1368 | keyEquivalent:[NSString stringWithFormat:@"%C", (short)NSF7FunctionKey]] |
| 1369 | 1369 | setKeyEquivalentModifierMask:0]; |
| 1370 | 1370 | [[runMenu addItemWithTitle:@"until Next VBLANK" |
| 1371 | 1371 | action:@selector(debugRunToNextVBLANK:) |
| 1372 | | keyEquivalent:[NSString stringWithFormat:@"%C", NSF8FunctionKey]] |
| 1372 | keyEquivalent:[NSString stringWithFormat:@"%C", (short)NSF8FunctionKey]] |
| 1373 | 1373 | setKeyEquivalentModifierMask:0]; |
| 1374 | 1374 | } |
| 1375 | 1375 | { |
| r15075 | r15076 | |
| 1379 | 1379 | [stepMenu release]; |
| 1380 | 1380 | [[stepMenu addItemWithTitle:@"Into" |
| 1381 | 1381 | action:@selector(debugStepInto:) |
| 1382 | | keyEquivalent:[NSString stringWithFormat:@"%C", NSF11FunctionKey]] |
| 1382 | keyEquivalent:[NSString stringWithFormat:@"%C", (short)NSF11FunctionKey]] |
| 1383 | 1383 | setKeyEquivalentModifierMask:0]; |
| 1384 | 1384 | [[stepMenu addItemWithTitle:@"Over" |
| 1385 | 1385 | action:@selector(debugStepOver:) |
| 1386 | | keyEquivalent:[NSString stringWithFormat:@"%C", NSF10FunctionKey]] |
| 1386 | keyEquivalent:[NSString stringWithFormat:@"%C", (short)NSF10FunctionKey]] |
| 1387 | 1387 | setKeyEquivalentModifierMask:0]; |
| 1388 | 1388 | [[stepMenu addItemWithTitle:@"Out" |
| 1389 | 1389 | action:@selector(debugStepOut:) |
| 1390 | | keyEquivalent:[NSString stringWithFormat:@"%C", NSF10FunctionKey]] |
| 1390 | keyEquivalent:[NSString stringWithFormat:@"%C", (short)NSF10FunctionKey]] |
| 1391 | 1391 | setKeyEquivalentModifierMask:NSShiftKeyMask]; |
| 1392 | 1392 | } |
| 1393 | 1393 | { |
| r15075 | r15076 | |
| 1397 | 1397 | [resetMenu release]; |
| 1398 | 1398 | [[resetMenu addItemWithTitle:@"Soft" |
| 1399 | 1399 | action:@selector(debugSoftReset:) |
| 1400 | | keyEquivalent:[NSString stringWithFormat:@"%C", NSF3FunctionKey]] |
| 1400 | keyEquivalent:[NSString stringWithFormat:@"%C", (short)NSF3FunctionKey]] |
| 1401 | 1401 | setKeyEquivalentModifierMask:0]; |
| 1402 | 1402 | [[resetMenu addItemWithTitle:@"Hard" |
| 1403 | 1403 | action:@selector(debugHardReset:) |
| 1404 | | keyEquivalent:[NSString stringWithFormat:@"%C", NSF3FunctionKey]] |
| 1404 | keyEquivalent:[NSString stringWithFormat:@"%C", (short)NSF3FunctionKey]] |
| 1405 | 1405 | setKeyEquivalentModifierMask:NSShiftKeyMask]; |
| 1406 | 1406 | } |
| 1407 | 1407 | [menu addItem:[NSMenuItem separatorItem]]; |
src/emu/cpu/m68000/m68kcpu.h
| r15075 | r15076 | |
| 1580 | 1580 | /* Format 8 stack frame (68010). |
| 1581 | 1581 | * 68010 only. This is the 29 word bus/address error frame. |
| 1582 | 1582 | */ |
| 1583 | | void m68ki_stack_frame_1000(m68ki_cpu_core *m68k, UINT32 pc, UINT32 sr, UINT32 vector) |
| 1583 | INLINE void m68ki_stack_frame_1000(m68ki_cpu_core *m68k, UINT32 pc, UINT32 sr, UINT32 vector) |
| 1584 | 1584 | { |
| 1585 | 1585 | /* VERSION |
| 1586 | 1586 | * NUMBER |
| r15075 | r15076 | |
| 1634 | 1634 | * if the error happens at an instruction boundary. |
| 1635 | 1635 | * PC stacked is address of next instruction. |
| 1636 | 1636 | */ |
| 1637 | | void m68ki_stack_frame_1010(m68ki_cpu_core *m68k, UINT32 sr, UINT32 vector, UINT32 pc, UINT32 fault_address) |
| 1637 | INLINE void m68ki_stack_frame_1010(m68ki_cpu_core *m68k, UINT32 sr, UINT32 vector, UINT32 pc, UINT32 fault_address) |
| 1638 | 1638 | { |
| 1639 | 1639 | int orig_rw = m68k->mmu_tmp_buserror_rw; // this gets splatted by the following pushes, so save it now |
| 1640 | 1640 | int orig_fc = m68k->mmu_tmp_buserror_fc; |
| r15075 | r15076 | |
| 1686 | 1686 | * if the error happens during instruction execution. |
| 1687 | 1687 | * PC stacked is address of instruction in progress. |
| 1688 | 1688 | */ |
| 1689 | | void m68ki_stack_frame_1011(m68ki_cpu_core *m68k, UINT32 sr, UINT32 vector, UINT32 pc, UINT32 fault_address) |
| 1689 | INLINE void m68ki_stack_frame_1011(m68ki_cpu_core *m68k, UINT32 sr, UINT32 vector, UINT32 pc, UINT32 fault_address) |
| 1690 | 1690 | { |
| 1691 | 1691 | int orig_rw = m68k->mmu_tmp_buserror_rw; // this gets splatted by the following pushes, so save it now |
| 1692 | 1692 | int orig_fc = m68k->mmu_tmp_buserror_fc; |
| r15075 | r15076 | |
| 1760 | 1760 | * This is used by the 68040 for bus fault and mmu trap |
| 1761 | 1761 | * 30 words |
| 1762 | 1762 | */ |
| 1763 | | void m68ki_stack_frame_0111(m68ki_cpu_core *m68k, UINT32 sr, UINT32 vector, UINT32 pc, UINT32 fault_address, bool in_mmu) |
| 1763 | INLINE void m68ki_stack_frame_0111(m68ki_cpu_core *m68k, UINT32 sr, UINT32 vector, UINT32 pc, UINT32 fault_address, bool in_mmu) |
| 1764 | 1764 | { |
| 1765 | 1765 | int orig_rw = m68k->mmu_tmp_buserror_rw; // this gets splatted by the following pushes, so save it now |
| 1766 | 1766 | int orig_fc = m68k->mmu_tmp_buserror_fc; |
| r15075 | r15076 | |
| 1955 | 1955 | |
| 1956 | 1956 | |
| 1957 | 1957 | /* Service an interrupt request and start exception processing */ |
| 1958 | | void m68ki_exception_interrupt(m68ki_cpu_core *m68k, UINT32 int_level) |
| 1958 | INLINE void m68ki_exception_interrupt(m68ki_cpu_core *m68k, UINT32 int_level) |
| 1959 | 1959 | { |
| 1960 | 1960 | UINT32 vector; |
| 1961 | 1961 | UINT32 sr; |