QUASI88 for IS11T その1

QUASI88がバージョンアップしている!!需要あります!

2013/3/29

   実に6年ぶりの更新となりますが、まだ需要はありますでしょうか (^_^;)

Android SDK ADT Bundleを設定してから、C\workspace\SDLActivity\jniフォルダ配下に、オリジナルのソースファイルを解凍します。

http://www.eonet.ne.jp/~showtime/quasi88/release/quasi88-0.6.4.zip

Makefileを書いてビルドしてみます。

C:\workspace\SDLActivity\jni\Application.mk

APP_PLATFORM := android-4

C:\workspace\SDLActivity\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 -DINLINE='static __inline__' -DCLIB_DECL= -DSYSDEP_DSP_SDL

SDL_PATH := ../SDL

LOCAL_C_INCLUDES := $(LOCAL_PATH)/$(SDL_PATH)/include $(LOCAL_PATH) \
$(LOCAL_PATH)/snddrv/src/unix $(LOCAL_PATH)/snddrv/src/sound $(LOCAL_PATH)/snddrv/quasi88 $(LOCAL_PATH)/snddrv/quasi88/SDL $(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 \
quasi88.c \
emu.c \
memory.c \
status.c \
getconf.c \
pc88main.c \
crtcdmac.c \
soundbd.c \
pio.c \
screen.c \
intr.c \
pc88sub.c \
fdc.c \
image.c \
monitor.c \
basic.c \
menu.c \
menu-screen.c \
q8tk.c \
q8tk-glib.c \
suspend.c \
keyboard.c \
romaji.c \
pause.c \
z80.c \
z80-debug.c \
snapshot.c \
screen-8bpp.c \
screen-16bpp.c \
screen-32bpp.c \
screen-snapshot.c \
SDL/graph.c \
SDL/wait.c \
SDL/event.c \
SDL/main.c \
FUNIX/file-op.c \
snddrv/quasi88/mame-quasi88.c \
snddrv/quasi88/beepintf.c \
snddrv/quasi88/beep.c \
snddrv/src/driver.c		\
snddrv/src/restrack.c		\
snddrv/src/sound.c		\
snddrv/src/sndintrf.c \
snddrv/src/streams.c \
snddrv/src/sound/flt_vol.c	\
snddrv/src/sound/flt_rc.c		\
snddrv/src/sound/wavwrite.c	\
snddrv/src/sound/2203intf.c \
snddrv/src/sound/2608intf.c \
snddrv/src/sound/ay8910.c \
snddrv/src/sound/fm.c \
snddrv/src/sound/ymdeltat.c \
snddrv/src/sound/samples.c \
snddrv/quasi88/2203fmgen.cpp \
snddrv/quasi88/2608fmgen.cpp \
snddrv/quasi88/SDL/audio.c \
snddrv/quasi88/SDL/sdl.c \
fmgen/fmgen.cpp \
fmgen/fmtimer.cpp \
fmgen/opna.cpp \
fmgen/psg.cpp
		  
LOCAL_SHARED_LIBRARIES := SDL

LOCAL_LDLIBS := -lGLESv1_CM -llog

include $(BUILD_SHARED_LIBRARY)

SDL_byteorder.hがないようなので作成します。

C:\workspace\SDLActivity\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