Define paths for Wii (and do FatInitDefault). Untested

This commit is contained in:
simon.kagstrom 2009-05-10 10:09:16 +00:00
parent 8e8b3695e3
commit 9483dbfb63
4 changed files with 39 additions and 2 deletions

View File

@ -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)

View File

@ -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)

View File

@ -48,6 +48,10 @@
#include "SDL.h"
#endif
#if defined(GEKKO)
# include <fat.h>
#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);

22
src/targets/t-wii.h Normal file
View File

@ -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"