Pass map file to emulator.

This commit is contained in:
Lawrence Kesteloot 2018-08-02 16:06:52 -07:00
parent 9175c4c234
commit 794a9bb121
2 changed files with 5 additions and 6 deletions

View File

@ -15,7 +15,7 @@ $(ROM): a.out
(dd count=5 bs=4096 if=/dev/zero 2> /dev/null; cat a.out) > $(ROM)
run: $(ROM)
$(APPLE2E) $(ROM)
$(APPLE2E) -map main.map $(ROM)
a.out: main.o interrupt.o vectors.o exporter.o platform.o apple2rom.cfg $(LIB)
$(CC65)/ld65 -C apple2rom.cfg -m main.map --dbgfile main.dbg interrupt.o vectors.o exporter.o platform.o main.o $(LIB)

9
main.c
View File

@ -560,14 +560,13 @@ static void process_input_buffer() {
// Return from function.
add_return();
// Dump compiled buffer to the terminal.
{
int i;
volatile uint8_t *debug_port = (uint8_t *) 0xBFFF;
print("Compiled size: ");
print_int(g_compiled_length);
print_newline();
volatile uint8_t *debug_port = (uint8_t *) 0xBFFE;
debug_port[0] = g_compiled_length;
for (i = 0; i < g_compiled_length; i++) {
*debug_port = g_compiled[i];
debug_port[1] = g_compiled[i];
}
}