Add more tme esp32 files

This commit is contained in:
Jeroen Domburg 2017-03-23 20:47:28 +08:00
parent 7cb34b257d
commit ad9071bee0
4 changed files with 74 additions and 0 deletions

26
components/tme/Makefile Normal file
View File

@ -0,0 +1,26 @@
#Makefile for a native (SDL) tme build
TARGET:=tme
MUSASHI_GEN_SRC:=musashi/m68kopac.c musashi/m68kopdm.c musashi/m68kopnz.c
MUSASHI_OP_PREGEN_SRC:=musashi/m68kops_pre.c
OBJ:=$(MUSASHI_GEN_SRC:%.x=%.o) $(MUSASHI_OP_PREGEN_SRC:%.x=%.o) musashi/m68kcpu.o sdl/main.o emu.o sdl/disp.o iwm.o via.o rtc.o ncr.o sdl/hd.o
#musashi/m68kdasm.o
CFLAGS=-Wall -I. -I./musashi -Og -ggdb `sdl2-config --cflags`
LDFLAGS=`sdl2-config --libs`
$(TARGET): $(OBJ)
$(CC) -o $(@) $(CFLAGS) $(LDFLAGS) $^
$(MUSASHI_GEN_SRC): musashi/m68kmake
cd musashi; ../$(^)
$(MUSASHI_OP_PREGEN_SRC): $(MUSASHI_GEN_SRC)
$(CC) -o musashi/m68kops musashi/m68kops.c
./musashi/m68kops > $(MUSASHI_OP_PREGEN_SRC)
musashi/m68kmake: musashi/m68kmake.c
$(CC) -o $@ $^
clean:
rm -f $(MUSASHI_GEN_SRC) musashi/m68kmake
rm -f $(OBJ) $(TARGET)

View File

@ -0,0 +1,26 @@
#
# Component Makefile
#
COMPONENT_ADD_INCLUDEDIRS := . ./musashi
COMPONENT_SRCDIRS := . musashi
MUSASHI_GEN_SRC := musashi/m68kops_pre.c musashi/m68kopac.c musashi/m68kopdm.c musashi/m68kopnz.c
MUSASHI_GEN_OBJ := $(MUSASHI_GEN_SRC:%.c=%.o)
COMPONENT_OBJS := $(MUSASHI_GEN_OBJ) musashi/m68kcpu.o emu.o iwm.o via.o rtc.o ncr.o
CFLAGS += -Wno-error=implicit-function-declaration
#Some deeper Make magic to generate the file that generates bits and pieces of the
#68K emu, and run that to get the C files we need.
#We generate the things in the src dir, which is less optimal, but eh, it works.
COMPONENT_EXTRA_CLEAN := $(addprefix $(COMPONENT_PATH)/musashi/,$(MUSASHI_GEN_SRC) m68kmake)
#Using wildcard magic here because otherwise Make will invoke this multiple times.
#$(COMPONENT_PATH)/musashi/
musashi/m68kop%.c: $(COMPONENT_PATH)/musashi/m68kmake
cd $(COMPONENT_PATH)/musashi/; ./m68kmake; $(HOSTCC) -o m68kops_gen m68kops_gen.c; ./m68kops_gen > m68kops_pre.c
$(COMPONENT_PATH)/musashi/m68kmake: $(COMPONENT_PATH)/musashi/m68kmake.c
$(HOSTCC) -o $@ $^

2
components/tme/romhack/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
recalcchs
*.o

View File

@ -0,0 +1,20 @@
#define TME_ROMSIZE (128*1024)
#define TME_MAC128K
#ifndef TME_MAC128K
#define TME_RAMSIZE (1024*1024)
#define TME_SCREENBUF (TME_RAMSIZE-0x5900)
#define TME_SCREENBUF_ALT (TME_RAMSIZE-0xD900)
#else
#define TME_RAMSIZE (128*1024)
#define TME_SCREENBUF 0x1A700
#define TME_SCREENBUF_ALT 0x12700
#endif