マルチプラットフォーム対応させるべく、WIN32依存部分のソースコードをQt5.1に書き換えて行きます。
(2013/8/4 追記)キーボード入力をまじめに実装しました。
ところで、yaPC-6001ビルド方法ですが、以下からsource.zipをダウンロードして、以下のフォルダ構成になります。
http://homepage3.nifty.com/takeda-toshiya/common/index.html
+source ←和製MESSを解凍して、以下のファイルのみ差し替える pc6001.pro +include windows.h tchar.h +src config.cpp emu.cpp emu.h fileio.cpp qt_input.cpp qt_screen.cpp qt_sound.cpp qtmain.cpp win32_input.cpp +res pc6001.ico pc6001.rc +vm i8255.cpp mc6847.cpp mc6847.h vm.h +fmgen file.cpp +pc6001 joystick.cpp keyboard.cpp memory.cpp system.cpp d88.cpp pc6001.cpp joystick.h keyboard.h memory.h system.h d88.h pc6001.h
Qt5.1といいつつ、取り急ぎサウンドとジョイスティックは、WIN32 APIを使っています。
PC6001.pro
#------------------------------------------------- # # Project created by QtCreator 2013-08-03T00:00:00 # #------------------------------------------------- QT += core gui widgets DEFINES += _PC6001 FPS=60 MAX_SKIP_FRAMES=0 DEFINES -= UNICODE TARGET = PC6001 TEMPLATE = app win32:{ INCLUDEPATH += src LIBS += -lshlwapi -lwinmm -ldsound SOURCES += \ src/qtmain.cpp \ src/qt_input.cpp \ src/qt_screen.cpp \ src/qt_sound.cpp \ src/emu.cpp \ src/common.cpp \ src/config.cpp \ src/fileio.cpp \ src/vm/datarec.cpp \ src/vm/disk.cpp \ src/vm/event.cpp \ src/vm/i8255.cpp \ src/vm/io.cpp \ src/vm/mc6847.cpp \ src/vm/upd765a.cpp \ src/vm/ym2203.cpp \ src/vm/z80.cpp \ src/vm/fmgen/file.cpp \ src/vm/fmgen/fmgen.cpp \ src/vm/fmgen/fmtimer.cpp \ src/vm/fmgen/opna.cpp \ src/vm/fmgen/psg.cpp \ src/vm/pc6001/d88.cpp \ src/vm/pc6001/joystick.cpp \ src/vm/pc6001/keyboard.cpp \ src/vm/pc6001/memory.cpp \ src/vm/pc6001/system.cpp \ src/vm/pc6001/pc6001.cpp } else { INCLUDEPATH += src include src/SDL/include LIBS += -lGLESv1_CM SOURCES += \ src/qtmain.cpp \ src/qt_input.cpp \ src/qt_screen.cpp \ src/qt_sound.cpp \ src/emu.cpp \ src/common.cpp \ src/config.cpp \ src/fileio.cpp \ src/vm/datarec.cpp \ src/vm/disk.cpp \ src/vm/event.cpp \ src/vm/i8255.cpp \ src/vm/io.cpp \ src/vm/mc6847.cpp \ src/vm/upd765a.cpp \ src/vm/ym2203.cpp \ src/vm/z80.cpp \ src/vm/fmgen/file.cpp \ src/vm/fmgen/fmgen.cpp \ src/vm/fmgen/fmtimer.cpp \ src/vm/fmgen/opna.cpp \ src/vm/fmgen/psg.cpp \ src/vm/pc6001/d88.cpp \ src/vm/pc6001/joystick.cpp \ src/vm/pc6001/keyboard.cpp \ src/vm/pc6001/memory.cpp \ src/vm/pc6001/system.cpp \ src/vm/pc6001/pc6001.cpp \ $$files(src/SDL/src/*.c) \ $$files(src/SDL/src/audio/*.c) \ $$files(src/SDL/src/audio/android/*.c) \ $$files(src/SDL/src/audio/dummy/*.c) \ src/SDL/src/atomic/SDL_atomic.c \ src/SDL/src/atomic/SDL_spinlock.c \ $$files(src/SDL/src/core/android/*.cpp) \ $$files(src/SDL/src/cpuinfo/*.c) \ $$files(src/SDL/src/events/*.c) \ $$files(src/SDL/src/file/*.c) \ $$files(src/SDL/src/haptic/*.c) \ $$files(src/SDL/src/haptic/dummy/*.c) \ $$files(src/SDL/src/joystick/*.c) \ $$files(src/SDL/src/joystick/android/*.c) \ $$files(src/SDL/src/loadso/dlopen/*.c) \ $$files(src/SDL/src/power/*.c) \ $$files(src/SDL/src/render/*.c) \ $$files(src/SDL/src/render/software/*.c) \ $$files(src/SDL/src/render/opengl/*.c) \ $$files(src/SDL/src/render/opengles/*.c) \ $$files(src/SDL/src/stdlib/*.c) \ $$files(src/SDL/src/thread/*.c) \ $$files(src/SDL/src/thread/pthread/*.c) \ $$files(src/SDL/src/timer/*.c) \ $$files(src/SDL/src/timer/unix/*.c) \ $$files(src/SDL/src/video/*.c) \ $$files(src/SDL/src/video/android/*.c) OTHER_FILES += \ android/AndroidManifest.xml \ android/res/drawable/icon.png \ android/res/drawable/logo.png \ android/res/drawable-hdpi/icon.png \ android/res/drawable-ldpi/icon.png \ android/res/drawable-mdpi/icon.png \ android/res/layout/splash.xml \ android/res/values/libs.xml \ android/res/values/strings.xml \ android/res/values-de/strings.xml \ android/res/values-el/strings.xml \ android/res/values-es/strings.xml \ android/res/values-et/strings.xml \ android/res/values-fa/strings.xml \ android/res/values-fr/strings.xml \ android/res/values-id/strings.xml \ android/res/values-it/strings.xml \ android/res/values-ja/strings.xml \ android/res/values-ms/strings.xml \ android/res/values-nb/strings.xml \ android/res/values-nl/strings.xml \ android/res/values-pl/strings.xml \ android/res/values-pt-rBR/strings.xml \ android/res/values-ro/strings.xml \ android/res/values-rs/strings.xml \ android/res/values-ru/strings.xml \ android/res/values-zh-rCN/strings.xml \ android/res/values-zh-rTW/strings.xml \ android/src/org/kde/necessitas/ministro/IMinistro.aidl \ android/src/org/kde/necessitas/ministro/IMinistroCallback.aidl \ android/src/org/kde/necessitas/origo/QtActivity.java \ android/src/org/kde/necessitas/origo/QtApplication.java \ android/version.xml } HEADERS += \ src/emu.h \ src/common.h \ src/config.h \ src/fifo.h \ src/fileio.h \ src/vm/datarec.h \ src/vm/device.h \ src/vm/disk.h \ src/vm/event.h \ src/vm/i8255.h \ src/vm/io.h \ src/vm/mc6847.h \ src/vm/upd765a.h \ src/vm/vm.h \ src/vm/ym2203.h \ src/vm/z80.h \ src/vm/fmgen/diag.h \ src/vm/fmgen/file.h \ src/vm/fmgen/fmgen.h \ src/vm/fmgen/fmgeninl.h \ src/vm/fmgen/fmtimer.h \ src/vm/fmgen/headers.h \ src/vm/fmgen/misc.h \ src/vm/fmgen/opna.h \ src/vm/fmgen/psg.h \ src/vm/fmgen/types.h \ src/vm/pc6001/d88.h \ src/vm/pc6001/joystick.h \ src/vm/pc6001/keyboard.h \ src/vm/pc6001/memory.h \ src/vm/pc6001/system.h \ src/vm/pc6001/pc6001.h \ src/res/resource.h