diff --git a/apple1/main.c b/apple1/main.c index c1e9ca0..193a460 100644 --- a/apple1/main.c +++ b/apple1/main.c @@ -101,23 +101,23 @@ int main(int argc, const char * argv[]) printf("Loading ROM...\n"); v6502_loadFileAtAddress(cpu->memory, "apple1.rom", RESET_VECTOR); //v6502_map(cpu->memory, start, ROM_SIZE, romMirrorCallback, NULL, NULL); - + + // Load integer BASIC + FILE *file = fopen("apple1basic.bin", "r"); + if (file) { + fclose(file); + printf("Loading BASIC...\n"); + v6502_loadFileAtAddress(cpu->memory, "apple1basic.bin", BASIC_LOAD_ADDRESS); + } + // Load debugger script int verbose = 0; - FILE *file = fopen("apple1.dbg", "r"); + file = fopen("apple1.dbg", "r"); if (file) { - printf("Loading debugger script...\n"); + printf("Executing debugger script...\n"); v6502_runDebuggerScript(cpu, file, breakpoint_list, table, run, &verbose); fclose(file); } - - // Load integer BASIC - file = fopen("apple1basic.bin", "r"); - if (file) { - fclose(file); - printf("Loading BASIC tape at 0x%4x...\n", BASIC_LOAD_ADDRESS); - v6502_loadFileAtAddress(cpu->memory, "apple1basic.bin", BASIC_LOAD_ADDRESS); - } // Attach PIA printf("Initializing PIA...\n");