commit 5c36fab4f37ac9e382a808571b83b8ab8a6c5d7e Author: Zack Buhman Date: Sun Jan 19 23:26:25 2025 -0600 initial diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6a10363 --- /dev/null +++ b/.gitignore @@ -0,0 +1,21 @@ +*.pyc +__pycache__ +.~* +*.BIN +*.bin +*.elf +*.d +*.iso +*.cdi +*.o +*.out +*.gch +scramble +cdi4dc +tools/ttf_outline +tools/ttf_bitmap +tools/ftdi_transfer +k_means_vq +*.blend1 +*.scramble +*.FCStd1 \ No newline at end of file diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..41284a8 --- /dev/null +++ b/Makefile @@ -0,0 +1,22 @@ +all: $(patsubst %.cpp,%.elf,$(wildcard example/*.cpp)) + +OPT = -Og + +MAKEFILE_PATH := $(patsubst %/,%,$(dir $(abspath $(firstword $(MAKEFILE_LIST))))) +LIB ?= $(MAKEFILE_PATH)/dreamcast +CFLAGS += -I$(MAKEFILE_PATH)/dreamcast +CFLAGS += -I$(MAKEFILE_PATH)/ +CFLAGS += -Wno-error=strict-aliasing -fno-strict-aliasing +CARCH = -m4-single -ml + +include dreamcast/base.mk +include dreamcast/common.mk +include dreamcast/headers.mk +include dreamcast/ip.mk + +MAIN_OBJ = \ + main.o \ + $(LIB)/sh7091/serial.o + +main.elf: LDSCRIPT = $(LIB)/main.lds +main.elf: $(START_OBJ) $(MAIN_OBJ) diff --git a/dreamcast b/dreamcast new file mode 120000 index 0000000..c64555a --- /dev/null +++ b/dreamcast @@ -0,0 +1 @@ +../dreamcast \ No newline at end of file diff --git a/main.cpp b/main.cpp new file mode 100644 index 0000000..1a542f4 --- /dev/null +++ b/main.cpp @@ -0,0 +1,10 @@ +#include "sh7091/serial.hpp" + +void main() +{ + serial::init(0); + + serial::string("hello\n"); + + while (1); +}