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; MACOSX_DEPLOYMENT_TARGET = 10.12;
MARKETING_VERSION = 0.85; MARKETING_VERSION = 0.85;
OTHER_CFLAGS = ( OTHER_CFLAGS = (
"-D_NO_DISASSEMBLER", "-DDISASSEMBLER",
"-D_NO_INTERRUPT_CHECK_PER_STEP", "-D_NO_INTERRUPT_CHECK_PER_STEP",
"-D_NO_CLK_ABSOLUTE_PRECISE", "-D_NO_CLK_ABSOLUTE_PRECISE",
); );

View File

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

View File

@ -467,7 +467,7 @@ N V - B D I Z C
disass_addr_pc = m6502.PC 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) scroll_line_number = getLine(forAddr: disass_addr_pc)
highlighted_line_number = getLine(forAddr: m6502.PC) highlighted_line_number = getLine(forAddr: m6502.PC)

View File

@ -1274,6 +1274,10 @@ class ViewController: NSViewController {
debugger.showWindow(self) 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() { void openLog() {
#ifdef DISASSEMBLER_LOG #ifdef DISASSEMBLER
outdev = fopen("/Users/trudnai/Library/Containers/com.trudnai.steveii/Data/disassembly_new.log", "w+"); outdev = fopen("/Users/trudnai/Library/Containers/com.trudnai.steveii/Data/disassembly_new.log", "w+");
#endif #endif
// for DEBUG ONLY!!! -- use stdout if could not create log file // 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() { void m6502_dbg_bp_compact() {
int i = m6502_dbg_bp_get_not_empty(); int i = m6502_dbg_bp_get_not_empty();
memcpy(breakpoints, breakpoints + i, bp_last_idx * sizeof(uint16_t)); 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); 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) { if (bp_last_idx < DEBUG_MAX_BREAKPOINTS - 1) {
breakpoints[++bp_last_idx] = addr; breakpoints[++bp_last_idx] = addr;
m6502_dbg_bp_sort(breakpoints, 0, bp_last_idx); m6502_dbg_bp_sort(breakpoints, 0, bp_last_idx);
m6502_dbg_bp_compact();
return bp_last_idx; return bp_last_idx;
} }
// no empty slots // no empty slots

View File

@ -316,7 +316,7 @@ uint8_t woz_read() {
if ( woz_tmap && woz_trks ) { if ( woz_tmap && woz_trks ) {
int track = woz_tmap->phase[disk.phase.count]; 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 ) { if ( track >= 40 ) {
dbgPrintf("TRCK TOO HIGH!\n"); dbgPrintf("TRCK TOO HIGH!\n");
return rand(); return rand();

View File

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