From 794a9bb1210e8fa4df40f7763663ae2ede55222d Mon Sep 17 00:00:00 2001 From: Lawrence Kesteloot Date: Thu, 2 Aug 2018 16:06:52 -0700 Subject: [PATCH] Pass map file to emulator. --- Makefile | 2 +- main.c | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 6e96e0a..f268c84 100644 --- a/Makefile +++ b/Makefile @@ -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) diff --git a/main.c b/main.c index 6a44822..632e445 100644 --- a/main.c +++ b/main.c @@ -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]; } }