diff --git a/common/array.h b/common/gambatte-array.h similarity index 100% rename from common/array.h rename to common/gambatte-array.h diff --git a/common/resample/src/blackmansinc.h b/common/resample/src/blackmansinc.h index 51c229e..2b28cfc 100644 --- a/common/resample/src/blackmansinc.h +++ b/common/resample/src/blackmansinc.h @@ -23,7 +23,7 @@ #include "subresampler.h" #include "makesinckernel.h" #include "cic4.h" -#include "array.h" +#include "gambatte-array.h" #include #include diff --git a/common/resample/src/chainresampler.h b/common/resample/src/chainresampler.h index 0ccae06..9c7a65a 100644 --- a/common/resample/src/chainresampler.h +++ b/common/resample/src/chainresampler.h @@ -24,7 +24,7 @@ #include #include #include -#include "array.h" +#include "gambatte-array.h" #include "subresampler.h" #include "../resampler.h" #include "upsampler.h" diff --git a/common/resample/src/convoluter.h b/common/resample/src/convoluter.h index 209330f..893e38b 100644 --- a/common/resample/src/convoluter.h +++ b/common/resample/src/convoluter.h @@ -21,7 +21,7 @@ #include #include -#include "array.h" +#include "gambatte-array.h" #include "rshift16_round.h" template diff --git a/common/resample/src/hammingsinc.h b/common/resample/src/hammingsinc.h index 628a94b..5d47b40 100644 --- a/common/resample/src/hammingsinc.h +++ b/common/resample/src/hammingsinc.h @@ -23,7 +23,7 @@ #include "subresampler.h" #include "makesinckernel.h" #include "cic3.h" -#include "array.h" +#include "gambatte-array.h" #include #include diff --git a/common/resample/src/kaiser50sinc.h b/common/resample/src/kaiser50sinc.h index 4a6e49b..8389686 100755 --- a/common/resample/src/kaiser50sinc.h +++ b/common/resample/src/kaiser50sinc.h @@ -24,7 +24,7 @@ #include "makesinckernel.h" #include "i0.h" #include "cic3.h" -#include "array.h" +#include "gambatte-array.h" #include #include diff --git a/common/resample/src/kaiser70sinc.h b/common/resample/src/kaiser70sinc.h index a789a9d..f839637 100755 --- a/common/resample/src/kaiser70sinc.h +++ b/common/resample/src/kaiser70sinc.h @@ -24,7 +24,7 @@ #include "makesinckernel.h" #include "i0.h" #include "cic4.h" -#include "array.h" +#include "gambatte-array.h" #include #include diff --git a/common/resample/src/makesinckernel.cpp b/common/resample/src/makesinckernel.cpp index e9a880e..c1d5d41 100755 --- a/common/resample/src/makesinckernel.cpp +++ b/common/resample/src/makesinckernel.cpp @@ -17,7 +17,7 @@ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #include "makesinckernel.h" -#include "array.h" +#include "gambatte-array.h" void makeSincKernel(short *const kernel, const unsigned phases, const unsigned phaseLen, double fc, double (*win)(const long m, const long M)) { static const double PI = 3.14159265358979323846; diff --git a/common/resample/src/rectsinc.h b/common/resample/src/rectsinc.h index 39e17fb..d666c2c 100644 --- a/common/resample/src/rectsinc.h +++ b/common/resample/src/rectsinc.h @@ -23,7 +23,7 @@ #include "subresampler.h" #include "makesinckernel.h" #include "cic2.h" -#include "array.h" +#include "gambatte-array.h" #include #include diff --git a/common/ringbuffer.h b/common/ringbuffer.h index 34f22bf..622b09c 100644 --- a/common/ringbuffer.h +++ b/common/ringbuffer.h @@ -19,7 +19,7 @@ #ifndef RINGBUFFER_H #define RINGBUFFER_H -#include "array.h" +#include "gambatte-array.h" #include #include #include diff --git a/common/videolink/rgb32conv.cpp b/common/videolink/rgb32conv.cpp index 8947cd8..d1b58de 100755 --- a/common/videolink/rgb32conv.cpp +++ b/common/videolink/rgb32conv.cpp @@ -18,7 +18,7 @@ ***************************************************************************/ #include "rgb32conv.h" #include "videolink.h" -#include "array.h" +#include "gambatte-array.h" #include "gbint.h" #include diff --git a/common/videolink/vfilters/catrom2x.h b/common/videolink/vfilters/catrom2x.h index ac0d53b..34a6694 100755 --- a/common/videolink/vfilters/catrom2x.h +++ b/common/videolink/vfilters/catrom2x.h @@ -21,7 +21,7 @@ #include "../videolink.h" #include "../vfilterinfo.h" -#include "array.h" +#include "gambatte-array.h" #include "gbint.h" class Catrom2x : public VideoLink { diff --git a/common/videolink/vfilters/catrom3x.h b/common/videolink/vfilters/catrom3x.h index 5ab0bfd..68026a4 100755 --- a/common/videolink/vfilters/catrom3x.h +++ b/common/videolink/vfilters/catrom3x.h @@ -21,7 +21,7 @@ #include "../videolink.h" #include "../vfilterinfo.h" -#include "array.h" +#include "gambatte-array.h" #include "gbint.h" class Catrom3x : public VideoLink { diff --git a/common/videolink/vfilters/kreed2xsai.h b/common/videolink/vfilters/kreed2xsai.h index 5076651..37386f6 100755 --- a/common/videolink/vfilters/kreed2xsai.h +++ b/common/videolink/vfilters/kreed2xsai.h @@ -21,7 +21,7 @@ #include "../videolink.h" #include "../vfilterinfo.h" -#include "array.h" +#include "gambatte-array.h" #include "gbint.h" class Kreed2xSaI : public VideoLink { diff --git a/common/videolink/vfilters/maxsthq2x.h b/common/videolink/vfilters/maxsthq2x.h index 73517b2..3f03985 100755 --- a/common/videolink/vfilters/maxsthq2x.h +++ b/common/videolink/vfilters/maxsthq2x.h @@ -21,7 +21,7 @@ #include "../videolink.h" #include "../vfilterinfo.h" -#include "array.h" +#include "gambatte-array.h" #include "gbint.h" class MaxStHq2x : public VideoLink { diff --git a/common/videolink/vfilters/maxsthq3x.h b/common/videolink/vfilters/maxsthq3x.h index 8f38a01..6b488d0 100755 --- a/common/videolink/vfilters/maxsthq3x.h +++ b/common/videolink/vfilters/maxsthq3x.h @@ -21,7 +21,7 @@ #include "../videolink.h" #include "../vfilterinfo.h" -#include "array.h" +#include "gambatte-array.h" #include "gbint.h" class MaxStHq3x : public VideoLink { diff --git a/gambatte_qt/src/framework/src/blitterwidgets/qglblitter.h b/gambatte_qt/src/framework/src/blitterwidgets/qglblitter.h index 1138389..1965354 100644 --- a/gambatte_qt/src/framework/src/blitterwidgets/qglblitter.h +++ b/gambatte_qt/src/framework/src/blitterwidgets/qglblitter.h @@ -22,7 +22,7 @@ #include "../blitterwidget.h" #include "../dwmcontrol.h" #include "persistcheckbox.h" -#include "array.h" +#include "gambatte-array.h" #include class QGLBlitter : public BlitterWidget { diff --git a/gambatte_qt/src/framework/src/blitterwidgets/x11blitter.h b/gambatte_qt/src/framework/src/blitterwidgets/x11blitter.h index 7fc73c2..f672dbd 100644 --- a/gambatte_qt/src/framework/src/blitterwidgets/x11blitter.h +++ b/gambatte_qt/src/framework/src/blitterwidgets/x11blitter.h @@ -21,7 +21,7 @@ #include "../blitterwidget.h" #include "persistcheckbox.h" -#include "array.h" +#include "gambatte-array.h" #include class X11Blitter : public BlitterWidget { diff --git a/libgambatte/libretro/jni/Android.mk b/libgambatte/libretro/jni/Android.mk new file mode 100644 index 0000000..eacbb30 --- /dev/null +++ b/libgambatte/libretro/jni/Android.mk @@ -0,0 +1,18 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) + +COMMON_DIR := ../../../common +INCLUDE_DIR := ../../include +RESAMPLER_DIR := $(COMMON_DIR)/resample/src +RESAMPLER_DIR_INCLUDE := $(COMMON_DIR)/resample +EMU_DIR := ../../src +LIBRETRO_DIR := ../ + +LOCAL_MODULE := libretro + +LOCAL_SRC_FILES := $(EMU_DIR)/bitmap_font.cpp $(EMU_DIR)/cpu.cpp $(EMU_DIR)/gambatte.cpp $(EMU_DIR)/initstate.cpp $(EMU_DIR)/interrupter.cpp $(EMU_DIR)/interruptrequester.cpp $(EMU_DIR)/memory.cpp $(EMU_DIR)/sound.cpp $(EMU_DIR)/state_osd_elements.cpp $(EMU_DIR)/statesaver.cpp $(EMU_DIR)/tima.cpp $(EMU_DIR)/video.cpp $(EMU_DIR)/file/file.cpp $(EMU_DIR)/mem/cartridge.cpp $(EMU_DIR)/mem/memptrs.cpp $(EMU_DIR)/mem/rtc.cpp $(EMU_DIR)/sound/channel1.cpp $(EMU_DIR)/sound/channel2.cpp $(EMU_DIR)/sound/channel3.cpp $(EMU_DIR)/sound/channel4.cpp $(EMU_DIR)/sound/duty_unit.cpp $(EMU_DIR)/sound/envelope_unit.cpp $(EMU_DIR)/sound/length_counter.cpp $(EMU_DIR)/video/ly_counter.cpp $(EMU_DIR)/video/lyc_irq.cpp $(EMU_DIR)/video/next_m0_time.cpp $(EMU_DIR)/video/ppu.cpp $(EMU_DIR)/video/sprite_mapper.cpp $(LIBRETRO_DIR)/libretro.cpp $(RESAMPLER_DIR)/chainresampler.cpp $(RESAMPLER_DIR)/i0.cpp $(RESAMPLER_DIR)/makesinckernel.cpp $(RESAMPLER_DIR)/resamplerinfo.cpp $(RESAMPLER_DIR)/u48div.cpp +LOCAL_CXXFLAGS = -DINLINE=inline -DHAVE_STDINT_H -DHAVE_INTTYPES_H -DLSB_FIRST -D__LIBRETRO__ +LOCAL_C_INCLUDES = $(EMU_DIR) $(COMMON_DIR) $(RESAMPLER_DIR) $(RESAMPLER_DIR_INCLUDE) $(LIBRETRO_DIR) $(INCLUDE_DIR) + +include $(BUILD_SHARED_LIBRARY) diff --git a/libgambatte/libretro/jni/Application.mk b/libgambatte/libretro/jni/Application.mk new file mode 100644 index 0000000..caf3b26 --- /dev/null +++ b/libgambatte/libretro/jni/Application.mk @@ -0,0 +1 @@ +APP_STL := stlport_static diff --git a/libgambatte/src/cpu.cpp b/libgambatte/src/cpu.cpp index d7f133c..26ff28e 100644 --- a/libgambatte/src/cpu.cpp +++ b/libgambatte/src/cpu.cpp @@ -17,7 +17,7 @@ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #include "cpu.h" -#include "memory.h" +#include "gambatte-memory.h" #include "savestate.h" namespace gambatte { diff --git a/libgambatte/src/cpu.h b/libgambatte/src/cpu.h index cdbafd4..dd39fd5 100644 --- a/libgambatte/src/cpu.h +++ b/libgambatte/src/cpu.h @@ -19,7 +19,7 @@ #ifndef CPU_H #define CPU_H -#include "memory.h" +#include "gambatte-memory.h" namespace gambatte { diff --git a/libgambatte/src/memory.h b/libgambatte/src/gambatte-memory.h similarity index 100% rename from libgambatte/src/memory.h rename to libgambatte/src/gambatte-memory.h diff --git a/libgambatte/src/interrupter.cpp b/libgambatte/src/interrupter.cpp index 9eac990..ebd1cc4 100644 --- a/libgambatte/src/interrupter.cpp +++ b/libgambatte/src/interrupter.cpp @@ -17,7 +17,7 @@ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #include "interrupter.h" -#include "memory.h" +#include "gambatte-memory.h" namespace gambatte { diff --git a/libgambatte/src/memory.cpp b/libgambatte/src/memory.cpp index fc2a4c2..0995da9 100644 --- a/libgambatte/src/memory.cpp +++ b/libgambatte/src/memory.cpp @@ -16,7 +16,7 @@ * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ -#include "memory.h" +#include "gambatte-memory.h" #include "video.h" #include "sound.h" #include "inputgetter.h" diff --git a/libgambatte/src/statesaver.cpp b/libgambatte/src/statesaver.cpp index 560ced6..3ef12a4 100644 --- a/libgambatte/src/statesaver.cpp +++ b/libgambatte/src/statesaver.cpp @@ -18,7 +18,7 @@ ***************************************************************************/ #include "statesaver.h" #include "savestate.h" -#include "array.h" +#include "gambatte-array.h" #include #include #include