This commit is contained in:
tudnai 2022-11-16 11:17:11 -08:00
parent d056f4534a
commit fae9066ebc
8 changed files with 33 additions and 9 deletions

View File

@ -2025,7 +2025,7 @@
MACOSX_DEPLOYMENT_TARGET = 10.12;
MARKETING_VERSION = 0.85;
OTHER_CFLAGS = (
"-D_NO_DISASSEMBLER",
"-DDISASSEMBLER",
"-D_NO_INTERRUPT_CHECK_PER_STEP",
"-D_NO_CLK_ABSOLUTE_PRECISE",
);

View File

@ -513,6 +513,14 @@
</PersistentString>
</PersistentStrings>
</ContextState>
<ContextState
contextName = "_fetch16:mmio.c">
<PersistentStrings>
<PersistentString
value = "m6502.PC">
</PersistentString>
</PersistentStrings>
</ContextState>
<ContextState
contextName = "m6502_step:6502.c">
<PersistentStrings>
@ -602,15 +610,18 @@
<ContextState
contextName = "ioRead:mmio.c">
<PersistentStrings>
<PersistentString
value = "m6502.clkfrm">
</PersistentString>
<PersistentString
value = "(int)IOframe">
</PersistentString>
<PersistentString
value = "lastIO">
</PersistentString>
<PersistentString
value = "MEMcfg.int_Cx_ROM">
</PersistentString>
<PersistentString
value = "m6502.clkfrm">
</PersistentString>
</PersistentStrings>
</ContextState>
<ContextState
@ -1252,6 +1263,14 @@
</PersistentString>
</PersistentStrings>
</ContextState>
<ContextState
contextName = "memread16_low:mmio.c">
<PersistentStrings>
<PersistentString
value = "* (uint16_t*) ( Apple2_64K_MEM + addr )">
</PersistentString>
</PersistentStrings>
</ContextState>
<ContextState
contextName = "addr_abs:mmio.c">
<PersistentStrings>

View File

@ -467,7 +467,7 @@ N V - B D I Z C
disass_addr_pc = m6502.PC
}
// }
var need_disass = disass_addr_pc <= disass_addr || disass_addr_pc > disass_addr + disass_addr_max
var need_disass = disass_addr_pc <= disass_addr || UInt(disass_addr_pc) > UInt(disass_addr) + UInt(disass_addr_max)
scroll_line_number = getLine(forAddr: disass_addr_pc)
highlighted_line_number = getLine(forAddr: m6502.PC)

View File

@ -1274,6 +1274,10 @@ class ViewController: NSViewController {
debugger.showWindow(self)
}
}
spkr_play_disk_motor_time = 0
spkr_stopAll()
}

View File

@ -599,7 +599,7 @@ void rom_loadFile( const char * bundlePath, const char * filename ) {
void openLog() {
#ifdef DISASSEMBLER_LOG
#ifdef DISASSEMBLER
outdev = fopen("/Users/trudnai/Library/Containers/com.trudnai.steveii/Data/disassembly_new.log", "w+");
#endif
// for DEBUG ONLY!!! -- use stdout if could not create log file

View File

@ -189,7 +189,7 @@ int m6502_dbg_bp_get_not_empty() {
void m6502_dbg_bp_compact() {
int i = m6502_dbg_bp_get_not_empty();
memcpy(breakpoints, breakpoints + i, bp_last_idx * sizeof(uint16_t));
memset(breakpoints + bp_last_idx, 0, (DEBUG_MAX_BREAKPOINTS - bp_last_idx) * sizeof(uint16_t));
memset(breakpoints + bp_last_idx - i + 1, 0, (DEBUG_MAX_BREAKPOINTS - bp_last_idx + i - 1) * sizeof(uint16_t));
bp_last_idx = m6502_dbg_bp_get_last(bp_last_idx);
}
@ -214,6 +214,7 @@ int m6502_dbg_bp_add(uint16_t addr) {
if (bp_last_idx < DEBUG_MAX_BREAKPOINTS - 1) {
breakpoints[++bp_last_idx] = addr;
m6502_dbg_bp_sort(breakpoints, 0, bp_last_idx);
m6502_dbg_bp_compact();
return bp_last_idx;
}
// no empty slots

View File

@ -316,7 +316,7 @@ uint8_t woz_read() {
if ( woz_tmap && woz_trks ) {
int track = woz_tmap->phase[disk.phase.count];
if (outdev) fprintf(outdev, "track: %d (%d)\n", track, disk.phase.count);
dbgPrintf2("track: %d (%d)\n", track, disk.phase.count);
if ( track >= 40 ) {
dbgPrintf("TRCK TOO HIGH!\n");
return rand();

View File

@ -37,7 +37,7 @@
#endif
#ifdef DEBUG
#ifdef DISASSEMBLER
//#define dbgPrintf(format, ...) if(outdev) fprintf(outdev, format, ## __VA_ARGS__)
#define dbgPrintf(format, ...)
#define dbgPrintf2(format, ...) if(outdev) fprintf(outdev, format, ## __VA_ARGS__)