From c894e7b6e646da3b064cf23d4cd3971e37dbb740 Mon Sep 17 00:00:00 2001 From: Adan Scotney Date: Sun, 19 Apr 2020 10:32:19 +0100 Subject: [PATCH 1/5] Build libfat against orcus --- .gitignore | 3 + Makefile | 29 ++++++--- gp2x/Makefile | 164 ++++++++++++++++++++++++++++++++++++++++++++++++ gp2x/Makefile~ | 164 ++++++++++++++++++++++++++++++++++++++++++++++++ source/common.h | 6 ++ 5 files changed, 359 insertions(+), 7 deletions(-) create mode 100644 gp2x/Makefile create mode 100644 gp2x/Makefile~ diff --git a/.gitignore b/.gitignore index 26b8666..c71294d 100644 --- a/.gitignore +++ b/.gitignore @@ -6,7 +6,10 @@ libogc/lib libogc/wii_release nds/lib nds/release +gp2x/lib +gp2x/gp2x_release distribute gba/include libogc/include nds/include +gp2x/include \ No newline at end of file diff --git a/Makefile b/Makefile index f520760..2f75b51 100644 --- a/Makefile +++ b/Makefile @@ -16,7 +16,7 @@ default: release all: release dist -release: nds-release gba-release cube-release wii-release +release: nds-release gba-release cube-release wii-release gp2x-release ogc-release: include/libfatversion.h cube-release wii-release @@ -32,7 +32,10 @@ cube-release: include/libfatversion.h wii-release: include/libfatversion.h $(MAKE) -C libogc PLATFORM=wii BUILD=wii_release -debug: nds-debug gba-debug cube-debug wii-debug +gp2x-release: include/libfatversion.h + $(MAKE) -C gp2x PLATFORM=gp2x BUILD=gp2x_release + +debug: nds-debug gba-debug cube-debug wii-debug gp2x-debug ogc-debug: cube-debug wii-debug @@ -42,14 +45,16 @@ nds-debug: include/libfatversion.h gba-debug: include/libfatversion.h $(MAKE) -C gba BUILD=debug - cube-debug: include/libfatversion.h $(MAKE) -C libogc PLATFORM=cube BUILD=wii_debug wii-debug: include/libfatversion.h $(MAKE) -C libogc PLATFORM=wii BUILD=cube_debug -clean: nds-clean gba-clean ogc-clean +gba-debug: include/libfatversion.h + $(MAKE) -C gp2x BUILD=debug + +clean: nds-clean gba-clean ogc-clean gp2x-clean nds-clean: $(MAKE) -C nds clean @@ -60,7 +65,10 @@ gba-clean: ogc-clean: $(MAKE) -C libogc clean -dist-bin: nds-dist-bin gba-dist-bin ogc-dist-bin +gp2x-clean: + $(MAKE) -C gp2x clean + +dist-bin: nds-dist-bin gba-dist-bin ogc-dist-bin gp2x-dist-bin nds-dist-bin: include/libfatversion.h nds-release distribute/$(VERSTRING) $(MAKE) -C nds dist-bin @@ -71,12 +79,16 @@ gba-dist-bin: include/libfatversion.h gba-release distribute/$(VERSTRING) ogc-dist-bin: include/libfatversion.h ogc-release distribute/$(VERSTRING) $(MAKE) -C libogc dist-bin +gp2x-dist-bin: include/libfatversion.h gp2x-release distribute/$(VERSTRING) + $(MAKE) -C gp2x dist-bin + dist-src: distribute/$(VERSTRING) @tar --exclude=.svn --exclude=*CVS* -cvjf distribute/$(VERSTRING)/libfat-src-$(VERSTRING).tar.bz2 \ source include Makefile \ nds/Makefile \ gba/Makefile \ - libogc/Makefile + libogc/Makefile \ + gp2x/Makefile dist: dist-bin dist-src @@ -95,7 +107,7 @@ include/libfatversion.h : Makefile @echo >> $@ @echo "#endif // __LIBFATVERSION_H__" >> $@ -install: nds-install gba-install ogc-install +install: nds-install gba-install ogc-install gp2x-install nds-install: nds-release $(MAKE) -C nds install @@ -105,3 +117,6 @@ gba-install: gba-release ogc-install: cube-release wii-release $(MAKE) -C libogc install + +gp2x-install: gp2x-release + $(MAKE) -C libogc install diff --git a/gp2x/Makefile b/gp2x/Makefile new file mode 100644 index 0000000..864061b --- /dev/null +++ b/gp2x/Makefile @@ -0,0 +1,164 @@ +#--------------------------------------------------------------------------------- +.SUFFIXES: +#--------------------------------------------------------------------------------- +ifeq ($(strip $(DEVKITARM)),) +$(error "Please set DEVKITARM in your environment. export DEVKITARM=devkitARM) +endif + +include $(DEVKITARM)/gp2x_rules + + +#--------------------------------------------------------------------------------- +# BUILD is the directory where object files & intermediate files will be placed +# SOURCES is a list of directories containing source code +# INCLUDES is a list of directories containing extra header files +# DATA is a list of directories containing binary files +# LIB is where the built library will be placed +# all directories are relative to this makefile +#--------------------------------------------------------------------------------- +BUILD ?= release +SOURCES := ../source +INCLUDES := ../include +DATA := +LIB := $(TOPDIR)/gp2x/lib + +#--------------------------------------------------------------------------------- +# options for code generation +#--------------------------------------------------------------------------------- +ARCH := -mthumb -mthumb-interwork + +CFLAGS := -g -Wall -O2\ + -mcpu=arm9tdmi -mtune=arm9tdmi\ + -fomit-frame-pointer\ + -ffast-math \ + $(ARCH) + +CFLAGS += $(INCLUDE) -DGP2X +CXXFLAGS := $(CFLAGS) + +ASFLAGS := -g $(ARCH) + +ifneq ($(BUILD),debug) +export GP2XBIN := $(LIB)/libfat.a +else +export GP2XBIN := $(LIB)/libfatd.a +CFLAGS += -DFAT_DEBUG +endif + + +#--------------------------------------------------------------------------------- +# any extra libraries we wish to link with the project +#--------------------------------------------------------------------------------- +LIBS := +#-lnds9 + +#--------------------------------------------------------------------------------- +# list of directories containing libraries, this must be the top level containing +# include and lib +#--------------------------------------------------------------------------------- +LIBDIRS := $(LIBORCUS) + +#--------------------------------------------------------------------------------- +# no real need to edit anything past this point unless you need to add additional +# rules for different file extensions +#--------------------------------------------------------------------------------- +ifneq ($(BUILD),$(notdir $(CURDIR))) +#--------------------------------------------------------------------------------- + +export TOPDIR ?= $(CURDIR)/.. + +export DEPSDIR := $(CURDIR)/$(BUILD) + +export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) \ + $(foreach dir,$(DATA),$(CURDIR)/$(dir)) + +export CC := $(PREFIX)gcc +export CXX := $(PREFIX)g++ +export AR := $(PREFIX)ar +export OBJCOPY := $(PREFIX)objcopy + +CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c))) +CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp))) +SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s))) +BINFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.*))) + +#--------------------------------------------------------------------------------- +# use CXX for linking C++ projects, CC for standard C +#--------------------------------------------------------------------------------- +ifeq ($(strip $(CPPFILES)),) +#--------------------------------------------------------------------------------- + export LD := $(CC) +#--------------------------------------------------------------------------------- +else +#--------------------------------------------------------------------------------- + export LD := $(CXX) +#--------------------------------------------------------------------------------- +endif +#--------------------------------------------------------------------------------- + +export OFILES := $(addsuffix .o,$(BINFILES)) \ + $(CPPFILES:.cpp=.o) $(CFILES:.c=.o) $(SFILES:.s=.o) + +export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \ + $(foreach dir,$(LIBDIRS),-I$(dir)/include) \ + $(foreach dir,$(LIBDIRS),-I$(dir)/include) \ + -I$(CURDIR)/$(BUILD) + +export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib) + +.PHONY: $(BUILD) clean + +#--------------------------------------------------------------------------------- +$(BUILD): + @[ -d $@ ] || mkdir -p $@ + @$(MAKE) --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile + +#--------------------------------------------------------------------------------- +clean: + @echo clean ... + @rm -fr debug release $(LIB) include + +all: $(GP2XBIN) + +dist-bin: + @mkdir -p include + @cp $(TOPDIR)/include/fat.h $(TOPDIR)/include/libfatversion.h include + @tar --exclude=.svn --exclude=*CVS* -cvjf $(TOPDIR)/distribute/$(VERSTRING)/libfat-gp2x-$(VERSTRING).tar.bz2 include lib + +install: + @mkdir -p $(DESTDIR)$(DEVKITPRO)/orcus/lib + @mkdir -p $(DESTDIR)$(DEVKITPRO)/orcus/include + @cp lib/libfat.a $(DESTDIR)$(DEVKITPRO)/orcus/lib + @cp $(TOPDIR)/include/fat.h $(TOPDIR)/include/libfatversion.h $(DESTDIR)$(DEVKITPRO)/liborcus/include + +#--------------------------------------------------------------------------------- +else + +DEPENDS := $(OFILES:.o=.d) + +#--------------------------------------------------------------------------------- +# main targets +#--------------------------------------------------------------------------------- +$(GP2XBIN) : $(OFILES) $(LIB) + @rm -f "$(GP2XBIN)" + @$(AR) rcs "$(GP2XBIN)" $(OFILES) + @echo built ... $(notdir $@) + +$(LIB): + mkdir $(LIB) + +#--------------------------------------------------------------------------------- +# you need a rule like this for each extension you use as binary data +#--------------------------------------------------------------------------------- +%.bin.o : %.bin +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + + +-include $(DEPENDS) + +#--------------------------------------------------------------------------------------- +endif +#--------------------------------------------------------------------------------------- + diff --git a/gp2x/Makefile~ b/gp2x/Makefile~ new file mode 100644 index 0000000..f86d67c --- /dev/null +++ b/gp2x/Makefile~ @@ -0,0 +1,164 @@ +#--------------------------------------------------------------------------------- +.SUFFIXES: +#--------------------------------------------------------------------------------- +ifeq ($(strip $(DEVKITARM)),) +$(error "Please set DEVKITARM in your environment. export DEVKITARM=devkitARM) +endif + +include $(DEVKITARM)/gba_rules + + +#--------------------------------------------------------------------------------- +# BUILD is the directory where object files & intermediate files will be placed +# SOURCES is a list of directories containing source code +# INCLUDES is a list of directories containing extra header files +# DATA is a list of directories containing binary files +# LIB is where the built library will be placed +# all directories are relative to this makefile +#--------------------------------------------------------------------------------- +BUILD ?= release +SOURCES := ../source +INCLUDES := ../include +DATA := +LIB := $(TOPDIR)/gba/lib + +#--------------------------------------------------------------------------------- +# options for code generation +#--------------------------------------------------------------------------------- +ARCH := -mthumb -mthumb-interwork + +CFLAGS := -g -Wall -O2\ + -mcpu=arm7tdmi -mtune=arm7tdmi\ + -fomit-frame-pointer\ + -ffast-math \ + $(ARCH) + +CFLAGS += $(INCLUDE) -DGBA +CXXFLAGS := $(CFLAGS) + +ASFLAGS := -g $(ARCH) + +ifneq ($(BUILD),debug) +export GBABIN := $(LIB)/libfat.a +else +export GBABIN := $(LIB)/libfatd.a +CFLAGS += -DFAT_DEBUG +endif + + +#--------------------------------------------------------------------------------- +# any extra libraries we wish to link with the project +#--------------------------------------------------------------------------------- +LIBS := +#-lnds9 + +#--------------------------------------------------------------------------------- +# list of directories containing libraries, this must be the top level containing +# include and lib +#--------------------------------------------------------------------------------- +LIBDIRS := $(LIBGBA) + +#--------------------------------------------------------------------------------- +# no real need to edit anything past this point unless you need to add additional +# rules for different file extensions +#--------------------------------------------------------------------------------- +ifneq ($(BUILD),$(notdir $(CURDIR))) +#--------------------------------------------------------------------------------- + +export TOPDIR ?= $(CURDIR)/.. + +export DEPSDIR := $(CURDIR)/$(BUILD) + +export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) \ + $(foreach dir,$(DATA),$(CURDIR)/$(dir)) + +export CC := $(PREFIX)gcc +export CXX := $(PREFIX)g++ +export AR := $(PREFIX)ar +export OBJCOPY := $(PREFIX)objcopy + +CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c))) +CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp))) +SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s))) +BINFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.*))) + +#--------------------------------------------------------------------------------- +# use CXX for linking C++ projects, CC for standard C +#--------------------------------------------------------------------------------- +ifeq ($(strip $(CPPFILES)),) +#--------------------------------------------------------------------------------- + export LD := $(CC) +#--------------------------------------------------------------------------------- +else +#--------------------------------------------------------------------------------- + export LD := $(CXX) +#--------------------------------------------------------------------------------- +endif +#--------------------------------------------------------------------------------- + +export OFILES := $(addsuffix .o,$(BINFILES)) \ + $(CPPFILES:.cpp=.o) $(CFILES:.c=.o) $(SFILES:.s=.o) + +export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \ + $(foreach dir,$(LIBDIRS),-I$(dir)/include) \ + $(foreach dir,$(LIBDIRS),-I$(dir)/include) \ + -I$(CURDIR)/$(BUILD) + +export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib) + +.PHONY: $(BUILD) clean + +#--------------------------------------------------------------------------------- +$(BUILD): + @[ -d $@ ] || mkdir -p $@ + @$(MAKE) --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile + +#--------------------------------------------------------------------------------- +clean: + @echo clean ... + @rm -fr debug release $(LIB) include + +all: $(GBABIN) + +dist-bin: + @mkdir -p include + @cp $(TOPDIR)/include/fat.h $(TOPDIR)/include/libfatversion.h include + @tar --exclude=.svn --exclude=*CVS* -cvjf $(TOPDIR)/distribute/$(VERSTRING)/libfat-gba-$(VERSTRING).tar.bz2 include lib + +install: + @mkdir -p $(DESTDIR)$(DEVKITPRO)/libgba/lib + @mkdir -p $(DESTDIR)$(DEVKITPRO)/libgba/include + @cp lib/libfat.a $(DESTDIR)$(DEVKITPRO)/libgba/lib + @cp $(TOPDIR)/include/fat.h $(TOPDIR)/include/libfatversion.h $(DESTDIR)$(DEVKITPRO)/libgba/include + +#--------------------------------------------------------------------------------- +else + +DEPENDS := $(OFILES:.o=.d) + +#--------------------------------------------------------------------------------- +# main targets +#--------------------------------------------------------------------------------- +$(GBABIN) : $(OFILES) $(LIB) + @rm -f "$(GBABIN)" + @$(AR) rcs "$(GBABIN)" $(OFILES) + @echo built ... $(notdir $@) + +$(LIB): + mkdir $(LIB) + +#--------------------------------------------------------------------------------- +# you need a rule like this for each extension you use as binary data +#--------------------------------------------------------------------------------- +%.bin.o : %.bin +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + + +-include $(DEPENDS) + +#--------------------------------------------------------------------------------------- +endif +#--------------------------------------------------------------------------------------- + diff --git a/source/common.h b/source/common.h index c5c5632..d5a58f6 100644 --- a/source/common.h +++ b/source/common.h @@ -52,6 +52,9 @@ #elif defined(GBA) #include #include +#elif defined(GP2X) + #include + #include #endif // Platform specific options @@ -73,6 +76,9 @@ #define DEFAULT_CACHE_PAGES 2 #define DEFAULT_SECTORS_PAGE 8 #define LIMIT_SECTORS 128 +#elif defined (GP2X) + #define DEFAULT_CACHE_PAGES 16 + #define DEFAULT_SECTORS_PAGE 8 #endif #endif // _COMMON_H From d7c3ec052a8d50accdc00bf01a40f2f05efe3c3b Mon Sep 17 00:00:00 2001 From: Adan Scotney Date: Sun, 19 Apr 2020 10:32:38 +0100 Subject: [PATCH 2/5] Remove accidental commit --- gp2x/Makefile~ | 164 ------------------------------------------------- 1 file changed, 164 deletions(-) delete mode 100644 gp2x/Makefile~ diff --git a/gp2x/Makefile~ b/gp2x/Makefile~ deleted file mode 100644 index f86d67c..0000000 --- a/gp2x/Makefile~ +++ /dev/null @@ -1,164 +0,0 @@ -#--------------------------------------------------------------------------------- -.SUFFIXES: -#--------------------------------------------------------------------------------- -ifeq ($(strip $(DEVKITARM)),) -$(error "Please set DEVKITARM in your environment. export DEVKITARM=devkitARM) -endif - -include $(DEVKITARM)/gba_rules - - -#--------------------------------------------------------------------------------- -# BUILD is the directory where object files & intermediate files will be placed -# SOURCES is a list of directories containing source code -# INCLUDES is a list of directories containing extra header files -# DATA is a list of directories containing binary files -# LIB is where the built library will be placed -# all directories are relative to this makefile -#--------------------------------------------------------------------------------- -BUILD ?= release -SOURCES := ../source -INCLUDES := ../include -DATA := -LIB := $(TOPDIR)/gba/lib - -#--------------------------------------------------------------------------------- -# options for code generation -#--------------------------------------------------------------------------------- -ARCH := -mthumb -mthumb-interwork - -CFLAGS := -g -Wall -O2\ - -mcpu=arm7tdmi -mtune=arm7tdmi\ - -fomit-frame-pointer\ - -ffast-math \ - $(ARCH) - -CFLAGS += $(INCLUDE) -DGBA -CXXFLAGS := $(CFLAGS) - -ASFLAGS := -g $(ARCH) - -ifneq ($(BUILD),debug) -export GBABIN := $(LIB)/libfat.a -else -export GBABIN := $(LIB)/libfatd.a -CFLAGS += -DFAT_DEBUG -endif - - -#--------------------------------------------------------------------------------- -# any extra libraries we wish to link with the project -#--------------------------------------------------------------------------------- -LIBS := -#-lnds9 - -#--------------------------------------------------------------------------------- -# list of directories containing libraries, this must be the top level containing -# include and lib -#--------------------------------------------------------------------------------- -LIBDIRS := $(LIBGBA) - -#--------------------------------------------------------------------------------- -# no real need to edit anything past this point unless you need to add additional -# rules for different file extensions -#--------------------------------------------------------------------------------- -ifneq ($(BUILD),$(notdir $(CURDIR))) -#--------------------------------------------------------------------------------- - -export TOPDIR ?= $(CURDIR)/.. - -export DEPSDIR := $(CURDIR)/$(BUILD) - -export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) \ - $(foreach dir,$(DATA),$(CURDIR)/$(dir)) - -export CC := $(PREFIX)gcc -export CXX := $(PREFIX)g++ -export AR := $(PREFIX)ar -export OBJCOPY := $(PREFIX)objcopy - -CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c))) -CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp))) -SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s))) -BINFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.*))) - -#--------------------------------------------------------------------------------- -# use CXX for linking C++ projects, CC for standard C -#--------------------------------------------------------------------------------- -ifeq ($(strip $(CPPFILES)),) -#--------------------------------------------------------------------------------- - export LD := $(CC) -#--------------------------------------------------------------------------------- -else -#--------------------------------------------------------------------------------- - export LD := $(CXX) -#--------------------------------------------------------------------------------- -endif -#--------------------------------------------------------------------------------- - -export OFILES := $(addsuffix .o,$(BINFILES)) \ - $(CPPFILES:.cpp=.o) $(CFILES:.c=.o) $(SFILES:.s=.o) - -export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \ - $(foreach dir,$(LIBDIRS),-I$(dir)/include) \ - $(foreach dir,$(LIBDIRS),-I$(dir)/include) \ - -I$(CURDIR)/$(BUILD) - -export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib) - -.PHONY: $(BUILD) clean - -#--------------------------------------------------------------------------------- -$(BUILD): - @[ -d $@ ] || mkdir -p $@ - @$(MAKE) --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile - -#--------------------------------------------------------------------------------- -clean: - @echo clean ... - @rm -fr debug release $(LIB) include - -all: $(GBABIN) - -dist-bin: - @mkdir -p include - @cp $(TOPDIR)/include/fat.h $(TOPDIR)/include/libfatversion.h include - @tar --exclude=.svn --exclude=*CVS* -cvjf $(TOPDIR)/distribute/$(VERSTRING)/libfat-gba-$(VERSTRING).tar.bz2 include lib - -install: - @mkdir -p $(DESTDIR)$(DEVKITPRO)/libgba/lib - @mkdir -p $(DESTDIR)$(DEVKITPRO)/libgba/include - @cp lib/libfat.a $(DESTDIR)$(DEVKITPRO)/libgba/lib - @cp $(TOPDIR)/include/fat.h $(TOPDIR)/include/libfatversion.h $(DESTDIR)$(DEVKITPRO)/libgba/include - -#--------------------------------------------------------------------------------- -else - -DEPENDS := $(OFILES:.o=.d) - -#--------------------------------------------------------------------------------- -# main targets -#--------------------------------------------------------------------------------- -$(GBABIN) : $(OFILES) $(LIB) - @rm -f "$(GBABIN)" - @$(AR) rcs "$(GBABIN)" $(OFILES) - @echo built ... $(notdir $@) - -$(LIB): - mkdir $(LIB) - -#--------------------------------------------------------------------------------- -# you need a rule like this for each extension you use as binary data -#--------------------------------------------------------------------------------- -%.bin.o : %.bin -#--------------------------------------------------------------------------------- - @echo $(notdir $<) - @$(bin2o) - - --include $(DEPENDS) - -#--------------------------------------------------------------------------------------- -endif -#--------------------------------------------------------------------------------------- - From b55e7662b38c097b42f80bcc9b14aa26c8ebbffe Mon Sep 17 00:00:00 2001 From: Adan Scotney Date: Sun, 19 Apr 2020 10:43:34 +0100 Subject: [PATCH 3/5] Correct Makefiles and add gp2x interface descriptor --- Makefile | 2 +- gp2x/Makefile | 2 +- source/disc.c | 10 ++++++++++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 2f75b51..98f78db 100644 --- a/Makefile +++ b/Makefile @@ -119,4 +119,4 @@ ogc-install: cube-release wii-release $(MAKE) -C libogc install gp2x-install: gp2x-release - $(MAKE) -C libogc install + $(MAKE) -C gp2x install diff --git a/gp2x/Makefile b/gp2x/Makefile index 864061b..0be7b04 100644 --- a/gp2x/Makefile +++ b/gp2x/Makefile @@ -129,7 +129,7 @@ install: @mkdir -p $(DESTDIR)$(DEVKITPRO)/orcus/lib @mkdir -p $(DESTDIR)$(DEVKITPRO)/orcus/include @cp lib/libfat.a $(DESTDIR)$(DEVKITPRO)/orcus/lib - @cp $(TOPDIR)/include/fat.h $(TOPDIR)/include/libfatversion.h $(DESTDIR)$(DEVKITPRO)/liborcus/include + @cp $(TOPDIR)/include/fat.h $(TOPDIR)/include/libfatversion.h $(DESTDIR)$(DEVKITPRO)/orcus/include #--------------------------------------------------------------------------------- else diff --git a/source/disc.c b/source/disc.c index cf988b1..f923fd0 100755 --- a/source/disc.c +++ b/source/disc.c @@ -111,5 +111,15 @@ const INTERFACE_ID _FAT_disc_interfaces[] = { {NULL, NULL} }; +/* ====================== GP2X ====================== */ +#elif defined (GP2X) +#include + +const INTERFACE_ID _FAT_disc_interfaces[] = { + {"sd", get_io_gp2xsd}, + {NULL, NULL} + +}; + #endif From ed0f3fc0af109c3d718f4ebcc12d2a06f74964aa Mon Sep 17 00:00:00 2001 From: Adan Scotney Date: Tue, 28 Apr 2020 17:34:49 +0100 Subject: [PATCH 4/5] Adjusting orcus layout to be real library, installable in same way as other devkitpro libraries --- gp2x/Makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/gp2x/Makefile b/gp2x/Makefile index 0be7b04..2a3094c 100644 --- a/gp2x/Makefile +++ b/gp2x/Makefile @@ -116,7 +116,7 @@ $(BUILD): #--------------------------------------------------------------------------------- clean: @echo clean ... - @rm -fr debug release $(LIB) include + @rm -fr debug gp2x_release $(LIB) include all: $(GP2XBIN) @@ -126,10 +126,10 @@ dist-bin: @tar --exclude=.svn --exclude=*CVS* -cvjf $(TOPDIR)/distribute/$(VERSTRING)/libfat-gp2x-$(VERSTRING).tar.bz2 include lib install: - @mkdir -p $(DESTDIR)$(DEVKITPRO)/orcus/lib - @mkdir -p $(DESTDIR)$(DEVKITPRO)/orcus/include - @cp lib/libfat.a $(DESTDIR)$(DEVKITPRO)/orcus/lib - @cp $(TOPDIR)/include/fat.h $(TOPDIR)/include/libfatversion.h $(DESTDIR)$(DEVKITPRO)/orcus/include + @mkdir -p $(DESTDIR)$(DEVKITPRO)/liborcus/lib + @mkdir -p $(DESTDIR)$(DEVKITPRO)/liborcus/include + @cp lib/libfat.a $(DESTDIR)$(DEVKITPRO)/liborcus/lib + @cp $(TOPDIR)/include/fat.h $(TOPDIR)/include/libfatversion.h $(DESTDIR)$(DEVKITPRO)/liborcus/include #--------------------------------------------------------------------------------- else From 9c6c006fdc59c055602b66c24b1a7f462e0609a0 Mon Sep 17 00:00:00 2001 From: Adan Scotney Date: Sat, 27 Jun 2020 13:32:54 +0100 Subject: [PATCH 5/5] Fix typo --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 98f78db..2fa5f7a 100644 --- a/Makefile +++ b/Makefile @@ -51,7 +51,7 @@ cube-debug: include/libfatversion.h wii-debug: include/libfatversion.h $(MAKE) -C libogc PLATFORM=wii BUILD=cube_debug -gba-debug: include/libfatversion.h +gp2x-debug: include/libfatversion.h $(MAKE) -C gp2x BUILD=debug clean: nds-clean gba-clean ogc-clean gp2x-clean