次に/c/home/android-project/jni/フォルダ配下に、オリジナルのソースファイルを解凍します。
http://www.117.ne.jp/~show/pc8801/quasi88-0.6.3.zip
/c/home/android-project/jni/src/Android.mkを書いてビルドしてみます。
LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE := main LOCAL_CFLAGS := -D_IS01 -DUSE_SOUND=1 -DUSE_FMGEN=1 SDL_PATH := ../SDL LOCAL_C_INCLUDES := $(LOCAL_PATH)/$(SDL_PATH)/include $(LOCAL_PATH) \ $(LOCAL_PATH)/snddrv/src/sound $(LOCAL_PATH)/snddrv/quasi88 $(LOCAL_PATH)/snddrv/src $(LOCAL_PATH)/FUNIX $(LOCAL_PATH)/SDL $(LOCAL_PATH)/fmgen # Add your application source files here... LOCAL_SRC_FILES := $(SDL_PATH)/src/main/android/SDL_android_main.cpp \ fmgen/2203fmgen.cpp \ screen-snapshot.c \ snddrv/src/sound/2203intf.c \ fmgen/2608fmgen.cpp \ snddrv/src/sound/2608intf.c \ snddrv/src/sound/ay8910.c \ basic.c \ snddrv/quasi88/beep.c \ snddrv/quasi88/beepintf.c \ crtcdmac.c \ emu.c \ SDL/event.c \ fdc.c \ FUNIX/file-op.c \ snddrv/src/sound/filter.c \ snddrv/src/sound/fm.c \ fmgen/fmgen.cpp \ fmgen/fmtimer.cpp \ SDL/getconf.c \ SDL/graph.c \ image.c \ intr.c \ keyboard.c \ SDL/main.c \ snddrv/quasi88/mame-quasi88.c \ memory.c \ menu-screen.c \ menu.c \ snddrv/src/sound/mixer.c \ monitor.c \ fmgen/opna.cpp \ pause.c \ pc88main.c \ pc88sub.c \ pio.c \ fmgen/psg.cpp \ q8tk-glib.c \ q8tk.c \ quasi88.c \ romaji.c \ screen-16bpp.c \ screen-32bpp.c \ screen-8bpp.c \ screen.c \ snddrv/quasi88-SDL/sdl.c \ snapshot.c \ snddrv/quasi88-SDL/snddrv-SDL.c \ snddrv/src/sndintrf.c \ soundbd.c \ status.c \ snddrv/src/sound/streams.c \ suspend.c \ SDL/wait.c \ snddrv/src/sound/ymdeltat.c \ z80-debug.c \ z80.c LOCAL_SHARED_LIBRARIES := SDL LOCAL_LDLIBS := -lGLESv1_CM -llog include $(BUILD_SHARED_LIBRARY)
SDL_byteorder.hがないようです。
$ cd /c/android-ndk-r8b/ $ ./ndk-build -C /c/home/android-project/jni/ c:/home/android-project/jni/src/SDL/config.h:10:27: fatal error: SDL_byteorder.h : No such file or directory
/c/home/android-project/jni/src/SDL/SDL_byteorder.hを作成します。
#ifdef _IS01 #define ROM_DIR "/sdcard/QUASI88/ROM" #define DISK_DIR "/sdcard/QUASI88/DISK" #define TAPE_DIR "/sdcard/QUASI88/TAPE" #define SDLK_LAST 323 #define SDLK_WORLD_0 160 #define SDLK_WORLD_1 161 #define SDLK_WORLD_2 162 #define SDLK_WORLD_3 163 #define SDLK_WORLD_4 164 #define SDLK_WORLD_5 165 #define SDLK_WORLD_6 166 #define SDLK_WORLD_7 167 #define SDLK_WORLD_8 168 #define SDLK_WORLD_9 169 #define SDLK_WORLD_10 170 #define SDLK_WORLD_11 171 #define SDLK_WORLD_12 172 #define SDLK_WORLD_13 173 #define SDLK_WORLD_14 174 #define SDLK_WORLD_15 175 #define SDLK_WORLD_16 176 #define SDLK_WORLD_17 177 #define SDLK_WORLD_18 178 #define SDLK_WORLD_19 179 #define SDLK_WORLD_20 180 #define SDLK_WORLD_21 181 #define SDLK_WORLD_22 182 #define SDLK_WORLD_23 183 #define SDLK_WORLD_24 184 #define SDLK_WORLD_25 185 #define SDLK_WORLD_26 186 #define SDLK_WORLD_27 187 #define SDLK_WORLD_28 188 #define SDLK_WORLD_29 189 #define SDLK_WORLD_30 190 #define SDLK_WORLD_31 191 #define SDLK_WORLD_32 192 #define SDLK_WORLD_33 193 #define SDLK_WORLD_34 194 #define SDLK_WORLD_35 195 #define SDLK_WORLD_36 196 #define SDLK_WORLD_37 197 #define SDLK_WORLD_38 198 #define SDLK_WORLD_39 199 #define SDLK_WORLD_40 200 #define SDLK_WORLD_41 201 #define SDLK_WORLD_42 202 #define SDLK_WORLD_43 203 #define SDLK_WORLD_44 204 #define SDLK_WORLD_45 205 #define SDLK_WORLD_46 206 #define SDLK_WORLD_47 207 #define SDLK_WORLD_48 208 #define SDLK_WORLD_49 209 #define SDLK_WORLD_50 210 #define SDLK_WORLD_51 211 #define SDLK_WORLD_52 212 #define SDLK_WORLD_53 213 #define SDLK_WORLD_54 214 #define SDLK_WORLD_55 215 #define SDLK_WORLD_56 216 #define SDLK_WORLD_57 217 #define SDLK_WORLD_58 218 #define SDLK_WORLD_59 219 #define SDLK_WORLD_60 220 #define SDLK_WORLD_61 221 #define SDLK_WORLD_62 222 #define SDLK_WORLD_63 223 #define SDLK_WORLD_64 224 #define SDLK_WORLD_65 225 #define SDLK_WORLD_66 226 #define SDLK_WORLD_67 227 #define SDLK_WORLD_68 228 #define SDLK_WORLD_69 229 #define SDLK_WORLD_70 230 #define SDLK_WORLD_71 231 #define SDLK_WORLD_72 232 #define SDLK_WORLD_73 233 #define SDLK_WORLD_74 234 #define SDLK_WORLD_75 235 #define SDLK_WORLD_76 236 #define SDLK_WORLD_77 237 #define SDLK_WORLD_78 238 #define SDLK_WORLD_79 239 #define SDLK_WORLD_80 240 #define SDLK_WORLD_81 241 #define SDLK_WORLD_82 242 #define SDLK_WORLD_83 243 #define SDLK_WORLD_84 244 #define SDLK_WORLD_85 245 #define SDLK_WORLD_86 246 #define SDLK_WORLD_87 247 #define SDLK_WORLD_88 248 #define SDLK_WORLD_89 249 #define SDLK_WORLD_90 250 #define SDLK_WORLD_91 251 #define SDLK_WORLD_92 252 #define SDLK_WORLD_93 253 #define SDLK_WORLD_94 254 #define SDLK_WORLD_95 255 #endif
またmemory.hの名前がかぶっているので、以下のヘッダからはコメントアウトします。
In file included from c:/android-ndk-r8b/platforms/android-4/arch-arm/usr/includ e/stdlib.h:43:0,
event.cでもエラーになりますので修正します。
#ifdef _IS01 while( SDL_PeepEvents(&E, 1, SDL_GETEVENT, SDL_KEYDOWN, SDL_VIDEOEXPOSE)) { #else SDL_PumpEvents(); /* イベントを汲み上げる */ while( SDL_PeepEvents(&E, 1, SDL_GETEVENT, SDL_EVENTMASK(SDL_KEYDOWN) | SDL_EVENTMASK(SDL_KEYUP) | SDL_EVENTMASK(SDL_MOUSEMOTION) | SDL_EVENTMASK(SDL_MOUSEBUTTONDOWN)| SDL_EVENTMASK(SDL_MOUSEBUTTONUP) | SDL_EVENTMASK(SDL_JOYAXISMOTION) | SDL_EVENTMASK(SDL_JOYBUTTONDOWN) | SDL_EVENTMASK(SDL_JOYBUTTONUP) | SDL_EVENTMASK(SDL_VIDEOEXPOSE) | SDL_EVENTMASK(SDL_ACTIVEEVENT) | SDL_EVENTMASK(SDL_QUIT)) ) { #endif