diff --git a/sw/Makefile b/sw/Makefile index 011f486..b2a834e 100644 --- a/sw/Makefile +++ b/sw/Makefile @@ -1,5 +1,5 @@ CC=cl65 -CFLAGS=-t none +CFLAGS=-t none -I. LDFLAGS=-C link.ld NAME=bootrom @@ -11,7 +11,9 @@ SRCS=$(wildcard *.S) $(wildcard *.c) OBJS+=$(patsubst %.S,%.o,$(filter %S,$(SRCS))) OBJS+=$(patsubst %.c,%.o,$(filter %c,$(SRCS))) -all: $(BIN) +all: $(HEX) + +$(HEX): $(BIN) objcopy --input-target=binary --output-target=ihex $(BIN) $(HEX) diff --git a/sw/io.h b/sw/io.h new file mode 100644 index 0000000..c46ae2c --- /dev/null +++ b/sw/io.h @@ -0,0 +1,6 @@ +#ifndef _IO_H +#define IO_H + +#define IO_REMAP *(unsigned char*)0x7f00 + +#endif diff --git a/sw/main.c b/sw/main.c index 499dad1..0125093 100644 --- a/sw/main.c +++ b/sw/main.c @@ -1,4 +1,5 @@ +#include int main() { - return 1; + IO_REMAP = 1; }