Defined constants for default filenames
git-svn-id: svn+ssh://svn.phoenixbox.net/svn/apple1/trunk@85 64f78de7-aa59-e511-a0e8-0002a5492df0
This commit is contained in:
parent
b53a5ce62f
commit
b47c29ec48
|
@ -28,6 +28,10 @@
|
||||||
#define RESET_VECTOR 0xFF00
|
#define RESET_VECTOR 0xFF00
|
||||||
#define DEBUGGER_MESSAGE " [ Hit ` for debugger ] "
|
#define DEBUGGER_MESSAGE " [ Hit ` for debugger ] "
|
||||||
|
|
||||||
|
#define DEFAULT_FILENAME_ROM "apple1.rom"
|
||||||
|
#define DEFAULT_FILENAME_BASIC "apple1basic.bin"
|
||||||
|
#define DEFAULT_FILENAME_DEBUG "apple1.dbg"
|
||||||
|
|
||||||
static v6502_cpu *cpu;
|
static v6502_cpu *cpu;
|
||||||
static a1pia *pia;
|
static a1pia *pia;
|
||||||
static int consoleMessageSeen;
|
static int consoleMessageSeen;
|
||||||
|
@ -100,22 +104,22 @@ int main(int argc, const char * argv[])
|
||||||
|
|
||||||
// Load Woz Monitor
|
// Load Woz Monitor
|
||||||
printf("Loading ROM...\n");
|
printf("Loading ROM...\n");
|
||||||
if (!v6502_loadFileAtAddress(cpu->memory, "apple1.rom", RESET_VECTOR)) {
|
if (!v6502_loadFileAtAddress(cpu->memory, DEFAULT_FILENAME_ROM, RESET_VECTOR)) {
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
//v6502_map(cpu->memory, start, ROM_SIZE, romMirrorCallback, NULL, NULL);
|
//v6502_map(cpu->memory, start, ROM_SIZE, romMirrorCallback, NULL, NULL);
|
||||||
|
|
||||||
// Load integer BASIC
|
// Load integer BASIC
|
||||||
FILE *file = fopen("apple1basic.bin", "r");
|
FILE *file = fopen(DEFAULT_FILENAME_BASIC, "r");
|
||||||
if (file) {
|
if (file) {
|
||||||
fclose(file);
|
fclose(file);
|
||||||
printf("Loading BASIC...\n");
|
printf("Loading BASIC...\n");
|
||||||
v6502_loadFileAtAddress(cpu->memory, "apple1basic.bin", BASIC_LOAD_ADDRESS);
|
v6502_loadFileAtAddress(cpu->memory, DEFAULT_FILENAME_BASIC, BASIC_LOAD_ADDRESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Load debugger script
|
// Load debugger script
|
||||||
int verbose = 0;
|
int verbose = 0;
|
||||||
file = fopen("apple1.dbg", "r");
|
file = fopen(DEFAULT_FILENAME_DEBUG, "r");
|
||||||
if (file) {
|
if (file) {
|
||||||
printf("Executing debugger script...\n");
|
printf("Executing debugger script...\n");
|
||||||
v6502_runDebuggerScript(cpu, file, breakpoint_list, table, run, &verbose);
|
v6502_runDebuggerScript(cpu, file, breakpoint_list, table, run, &verbose);
|
||||||
|
|
Loading…
Reference in New Issue