diff --git a/Makefile.host b/Makefile.host index 53c020c..0dfd38d 100644 --- a/Makefile.host +++ b/Makefile.host @@ -50,6 +50,10 @@ src/machdep: rm -f $@ cd src && ln -s md-i386-gcc machdep +src/target.h: + rm -f $@ + cd src && ln -s targets/t-unix.h target.h + %.h: %.h.wii cp $< $@ @@ -83,7 +87,7 @@ CFLAGS := $(COMMON_FLAGS) $(INCLUDES) $(DEFINES) LDFLAGS := $(COMMON_FLAGS) -L$(LIB_DIR) -lz -lSDL_ttf -lSDL -lfreetype -lm # How to link an ELF. -uae-host.elf: src/machdep src/sysconfig.h $(OBJS) +uae-host.elf: src/machdep src/target.h src/sysconfig.h $(OBJS) @echo Linking $@ @-mkdir -p $(dir $@) g++ -o $@ $(OBJS) $(LDFLAGS) diff --git a/Makefile.wii b/Makefile.wii index 541a3f2..8b945ec 100644 --- a/Makefile.wii +++ b/Makefile.wii @@ -55,6 +55,10 @@ src/machdep: rm -f $@ cd src && ln -s md-ppc-gcc machdep +src/target.h: + rm -f $@ + cd src && ln -s targets/t-wii.h target.h + %.h: %.h.wii cp $< $@ @@ -88,7 +92,7 @@ CFLAGS := $(COMMON_FLAGS) $(INCLUDES) $(DEFINES) LDFLAGS := $(COMMON_FLAGS) -L$(LIB_DIR) -L$(DEVKITPRO)/libogc/lib/wii -lz -lSDL_ttf -lSDL -lfreetype -lfat -lwiiuse -lbte -logc -lm # How to link an ELF. -uae.elf: src/machdep src/sysconfig.h $(OBJS) +uae.elf: src/machdep src/target.h src/sysconfig.h $(OBJS) @echo Linking $@ @-mkdir -p $(dir $@) powerpc-gekko-g++ -o $@ $(OBJS) $(LDFLAGS) diff --git a/src/main.c b/src/main.c index e499880..3894715 100644 --- a/src/main.c +++ b/src/main.c @@ -48,6 +48,10 @@ #include "SDL.h" #endif +#if defined(GEKKO) +# include +#endif + #ifdef WIN32 //FIXME: This shouldn't be necessary #include "windows.h" @@ -948,6 +952,9 @@ int init_sdl (void) #ifndef NO_MAIN_IN_MAIN_C int main (int argc, char **argv) { +#if defined(GEKKO) + fatInitDefault(); +#endif init_sdl (); gui_init (argc, argv); real_main (argc, argv); diff --git a/src/targets/t-wii.h b/src/targets/t-wii.h new file mode 100644 index 0000000..0e5fe8a --- /dev/null +++ b/src/targets/t-wii.h @@ -0,0 +1,22 @@ + /* + * UAE - The Un*x Amiga Emulator + * + * Target specific stuff, *nix version + * + * Copyright 1997 Bernd Schmidt + */ + +#define TARGET_NAME "wii" + +#define TARGET_ROM_PATH "/apps/uae/roms" +#define TARGET_FLOPPY_PATH "/apps/uae/floppies" +#define TARGET_HARDFILE_PATH "/apps/uae/harddisks" +#define TARGET_SAVESTATE_PATH "/apps/uae/saves" + +#ifndef OPTIONSFILENAME +# define OPTIONSFILENAME "/apps/uae/uaerc" +#endif +#undef OPTIONS_IN_HOME + +#define DEFPRTNAME "lpr" +#define DEFSERNAME "/dev/ttyS1"