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) (dd count=5 bs=4096 if=/dev/zero 2> /dev/null; cat a.out) > $(ROM)
run: $(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) 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) $(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. // Return from function.
add_return(); add_return();
// Dump compiled buffer to the terminal.
{ {
int i; int i;
volatile uint8_t *debug_port = (uint8_t *) 0xBFFF; volatile uint8_t *debug_port = (uint8_t *) 0xBFFE;
print("Compiled size: "); debug_port[0] = g_compiled_length;
print_int(g_compiled_length);
print_newline();
for (i = 0; i < g_compiled_length; i++) { for (i = 0; i < g_compiled_length; i++) {
*debug_port = g_compiled[i]; debug_port[1] = g_compiled[i];
} }
} }