OSDN Git Service

[VM][FMTOWNS][CDROM] Available to boot YUMIMI MIX (!!)
[csp-qt/common_source_project-fm7.git] / source / readme_by_artane.txt
1 ** Qt porting for Common Source Code Project **
2                                          August 01, 2021
3               K.Ohta <whatisthis.sowhat _at_ gmail.com>
4
5 * If you can't read Japanese, read readme.qt.txt .
6
7 0. 概要
8    このパッケージは、Common Source Code Project (以下、CSP)
9    をQt5に移植したものです。
10    バイナリはGNU/Linux(64bit)用とMinGW (32bit Windows)用を
11    用意しています。
12    
13    ソースコード:
14    
15      https://github.com/Artanejp/common_source_project-fm7/releases/tag/SNAPSHOT_20210801
16
17    追加情報:
18    
19      各機種バイナリーは、osdn.net もしくはミラーサイトより入手可能です。
20     
21     https://osdn.net/projects/csp-qt/  
22    
23      https://osdn.net/projects/csp-qt/releases/ をチェックしてください。
24
25     Win32: 
26
27     GNU/Linux(amd64) : 
28
29 【おねがい】
30       doc/以下の文書で日本語しかなかったものを英語に翻訳していますが、機械翻訳を使ってるのであやしいです。
31      
32        英語の上手い方、校正などお願いします m(_ _)m
33
34 1. 背景
35
36    CSPは、非常に優れた構造のエミュレータです(しかし、些か重くてコンパイラ
37    がいい最適化をしないと重めですが)。
38    しかし、このコードはM$ Visual C++依存の部分が非常に多いです。
39    そこで、GNU/Linuxでこれを動かすためにQtに色々と移植していきましょう。
40    と言う感じで作業をはじめました。
41
42 2. 最低限必要なもの(Qt版)
43
44    a. Qt5 ツールキット。Qt 5.5以降を推奨します。
45    
46    b. OpenGL, 多分、最低OpenGL 2.1は必要です。(注:ひょっとしたら、OpenGLES2以降ならば動くように変えるかも知れない)
47    
48    c. gcc / g++ (5.0以降?)もしくは llvm clang / clang++ (3.5以降?)
49       コンパイラツールチェーン。
50       
51    d. SDL2 (SDL 1.xではないので注意)
52    
53    e. CMake 2.8以降。
54    
55    f. ffmpegから、libavとlibswが必要です。 http://ffmpeg.org/ より。
56    
57    g. ffmpegは、Windowsに関してはバンドルしてありますので、動かない時はインストールしてみてください。
58       
59    h. Qt5.5(Ubuntu 16.04LTS向け)もしくはQt5.10(Win32とDebian GNU/Linux sid向け)でビルドしてあります。
60    
61    i. 表示基盤のデフォルトが、OpenGL ES2.0になりました。コマンドラインオプション --opengl で変更が可能です(--helpで参照)
62
63    j. Windows のビルドを、Docker環境上のLLVM CLANG (9) にしました。例外処理に関して、MinGW-w64のgccは非常に遅い方法を取ってるためです(Borlandが悪いのですが)。
64      詳細は、 https://github.com/Artanejp/llvm-mingw と https://hub.docker.com/r/artanejp/llvm-mingw64-ubuntu-cosmic を参照して下さい。
65    
66    * Windows もしくは GNU/Linux のcross tool chain (要Wine)で、MinGW (gcc6) と Qt 5.10 でのビルドができることを確認しました。
67
68    * TIPS:
69    
70      * Windows等で動かした時に、画面の書き替えが表示されない場合は、環境変数 QT_OPENGL を software にしてみてください。(例えば、
71        WindowsをVirtualBoxのゲストで使ってる場合など)
72        
73      * Windows版バイナリには、ソフトウェアレンダリングのopengl32.dllが添付されてますが、最近のパソコンの専用GPUドライバなら、
74        もっと程度のいいOpenGLが入ってるはずです。
75        添付版opengl32.dllを適当な名前に変更して動くかどうか試してみて下さい。
76      
77 3. ビルドの方法
78
79    ソースコードを解凍するか、git clone / pull した後で:
80    
81    $ cd {srctop}/source/build-cmake/{Machine name}/
82    $ mkdir build
83    $ cd build
84    
85    To configure:
86    
87    $ cmake ..
88    
89    or
90    
91    $ ccmake ..
92
93    To build:
94    
95    $ make
96
97    To install:
98    
99    $ sudo make install
100
101 4. Qt固有の話
102
103    * 設定ファイル(scancode.cfg と foo.ini)は、"~/.config/CommonSourceCodeProject/emufoo/" (Windowsの場合は".\CommonSourceCodeProject\emudfoo\" ) におかれます(移動しました)。
104
105    * BIOSや効果音WAVやセーブステートは、、"~/CommonSourceCodeProject/emufoo/" (Windowsの場合は".\CommonSourceCodeProject\emudfoo\" ) におかれます(移動しました)。
106    
107    * 全ての記録物(スクリーンショットや動画や録音WAV)は、*当面の間* "~/CommonSourceCodeProject/emufoo/" (Windowsの場合は".\CommonSourceCodeProject\emudfoo\" ) におかれます。
108
109    * ToolTipsを付けました。(2017-01-24)
110       
111    * 日本語に翻訳しました。(2017-01-24)
112    
113    
114    * キーコード変換テーブルファイルが、$HOME/.config/CommonSourceCodeProject/emu{Machine Name}/scancode.cfg に書き込まれます。
115    
116      書式は、カンマで区切られた16進データです(10進ではないので注意) .
117      
118      1カラム目はM$ ヴァーチャルキーコード。
119      
120      2カラム目はQtネィティブのスキャンキーコードです。
121      
122    * UI部分の共通コンポーネント (src/qt/gui) を共有ライブラリlibCSPgui.soにまとめました。
123    
124    * インストール用のBASHスクリプトを用意しました。src/tool/installer_unix.shです。
125    
126    * ROMと同じところに、特定のWAVファイル(VMによって異なる)を入れると、FDDのシーク音やテープのボタン音・リレー音を鳴らすことが出来ます。
127    
128    * ローマ字カタカナ変換支援機構が一部の機種に実装されてます。romaji_kana.ja.txt をお読みください。
129     
130 5. 移植状況
131    
132    a.現在、Debian GNU/Linux "sid"と、Ubuntu Linux 16.04LTS "Xenial"
133      の AMD64版でしかテストしていません。
134     が、多分他のGNU/Linux OSやBSD系のOS (Mac含む) でもビルドすれば
135     動くでしょう。
136      Windows もしくは GNU/Linux(要Wineとbinfmt-support)上でのMinGWと
137      Qt community edition でのビルドが通るようになりました。
138       
139    b. 今は、Qtの開発側が「Qt4おわりね」とアナウンスしたので、Qt4ではなく
140       Qt5を使っています。
141       添付してあるバイナリは、Qt 5.5でビルドしました(が、Qt 5.1以降なら動くはずです)。
142
143    c. Linux用ビルドでは、GCCをリンク時最適化(LTO)モードで使っています。
144    d. MZ-2500のソケット機能を実装してみていますが、マトモにテストできてません(;´Д`)
145    
146 6. Upstream repositry:
147       https://github.com/Artanejp/common_source_project-fm7
148       
149       https://osdn.net/projects/csp-qt/scm/git/common_source_project-fm7
150
151 7. Project Page:
152       https://osdn.jp/projects/csp-qt/
153
154 8. Upstream (Takeda Toshiyaさんのオリジナル) 
155       http://takeda-toshiya.my.coocan.jp/
156
157
158 Special thanks to:
159   Ryu Takegamiさん     : eFM-8/7/77/AV/40/EX のデバッグに協力していただいています。
160   はせりんさん         : eFM-8/7/77/AV/40/EX のデバッグに協力していただいています。
161   Ootake 開発者の皆さん: ePCENGINEの改善のヒントをソースコードから勉強させていただいてます。
162   Soji Yamakawaさん    : eFM-Townsの開発で「津軽」を参考にさせていただいたり、
163                          アドバイスを頂いたりしています。
164 Changes:
165
166 * 前の変更点をお読みになる場合には、ChangeLogと000_gitlog.txtをお読み下さい。
167
168 * SNAPSHOT August 01, 2021
169   * Upstream 2021-05-02.
170   * [BUILD/CMAKE] Add *Very Experimental* C++20 build settings.
171   * [OSD/EMU][MOUSE/JOYSTICK] Should LOCK/UNLOCK per referring buffers of joystick/mouse.
172     Note: This is MAJOR API CHANGE around mouse and joystick.
173   * [CONFIG/FMTOWNS] Add config.machine_features[32] to use machine configuration (w/o DIP SWITCH).Still not be bulidable.
174     Note: See vm/fmtowns/joystick.cpp, FMTOWNS::JOYSTICK::update_config().
175   * [FMTOWNS/KEYBOARD] SPECIAL_RESET: Available to boot with special key code (i.e. "CD" "DEBUG").
176   * [FMTOWNS/CDROM] Re-implement parsing CCD image file.Still ugly.
177   * [FMTOWNS/VRAM] Add __LIKELY_IF() and __UNLIKELY_IF() to assist compiler's optimization.
178     See [read|write]_memory_mapped_io32() and read_memory_mapped_io16() at FMTOWNS::TOWNS_VRAM class.
179   * [VM/I386_NP21] Add hints of branch-prediction whether accessing memory (and some of interrupts) is legal.
180     This reduces HOST CPU USAGE especially high-VM-clocks.
181   * [FMTOWNS/VRAM] More faster vram accessing.
182   * [FMTOWNS/MEMORY/VRAM] Add features around CACHE for after i486.Still be dummy.
183   * [FMTOWNS/CRTC] Use more SIMDs to be faster rendering.
184   * [FMTOWNS/KEYBOARD] Implement AUTO REPEAT.
185   * [FMTOWNS/TIMER] Clear OV and INTR when enabling interval timer.
186   * [FMTOWNS/VRAM] More faster VRAM access for packed pixel mode.
187   * [FMTOWNS/CDROM] Even reply without REQ_STATUS bit (0x20) with PAUSE/RESUME CDDA (85h/87h).
188   * [FMTOWNS/CDROM] Falldown intr even stat_reply_intr (04C2:bit6) == 0 on MCU interrupt.
189   * [FMTOWNS/CDROM] Reply error when reading beyond track on READ_SECTOR.
190   * [FMTOWNS/CDROM] Fix around booting from some version(s?) of TOWNS OS.
191          i.e)AYAYO 4.
192   * [FMTOWNS/CRTC/TIMER/MEMORY] Improve around I/O.
193   * [FMTOWNS/DMAC] Remove some variables.Update state save version.
194   * [FMTOWNS/SCSI] Add a PORT: 0C34h.
195   * [FMTOWNS/MEMORY] Revert to use primitive_[read|write]. Fix CDROM's some issues (i.e. Crashing Ayayo4).
196   * [FMTOWNS/MEMORY] Add dma read/write functions with wait.
197   * [FMTOWNS/ICCARD] Improve logic around open/close.
198   * [FMTOWNS/JOYSTICK] Fix confused mouse mask.
199   * [FMTOWNS] Split MOUSE and JOYPADs to separate class.
200   * [FMTOWNS/FLOPPY] Add support for 1.44MB 2HD (2HC).
201   * [I286/I86/V30] Separate namespace CPUTYPE ENUMS.
202   * [I286/I86] Fix weird bitmask default value.
203   * [VM/UPD71071] Add read_io16(), write_io16() and ACK feature.
204   * [PC9801/EGC] Fix FTBFS with C++20 ; "error: ISO C++17 does not allow 'register' storage class specifier".
205   * [BUILD/CMake] Add samplescripts supports GCC-11 initially.
206   * [BUILD/CMake] Prepare to support LLVM12, but now unable to build Win32 version with llvm12 due to _aligned_alloc() and _aligned_free().
207   * [Build/Win32] LLVM12/MinGW-w64/Cross : Add libc++abi and others to toolchain.
208   * [Build/Win32] Update revision of ffmpeg to 4.4.
209   * [JOY_THREAD/SDL2/GAMECONTROLLER] Fix sample initial value.
210   * Built with ab2601af3b0de22bd806ce5312ebf06823a16405 (or later).
211
212 -- August 01, 2021 22:34:13 +0900 K.Ohta <whatisthis.sowhat@gmail.com>
213
214 本家の変更:
215 * 前の変更点をお読みになる場合には、history.txtをお読み下さい。
216
217 5/2/2021
218
219 [VM/DATAREC] fix mixing sound track
220 [VM/HD46505] support smooth vertical scroll
221 [VM/MC6843] fix seek command
222 [VM/MC6844] fix data chain register to consider 2/4 channel select bit
223 [VM/MC6844] fix to transfer 64K when byte count register is zero
224 [VM/Z80CTC] fix to apply written time constant just after reset bit is cleared
225
226 [BX1] fix memory map around ram
227 [BX1] support cartridge rom images
228 [BX1/DISPLAY] add missing font patterns
229 [BX1/FLOPPY] support i/o ports around fdc
230 [BX1/KEYBOARD] support PROG.SELECT switch
231 [BX1/PRINTER] support AUTO PRINT switch
232 [MZ1500/JOTSTICK] support joystick (thanks Mr.Koucha-Youkan)
233 [PC6001] remove some codes from iP6 Plus
234 [X1TURBO/DISPLAY] support smooth vertical scroll
235
236
237 2/7/2021
238
239 [WINMAIN] improve WM_KEYDOW/WM_KEYUP events for VK_PROCESSKEY case
240 [WIN32/CONSLE] improve routine to change console size
241
242 [VM/DISK] fix density flag when loading solid image with fm sectors
243 [VM/MC6843] fix track zero flag in STRA
244 [VM/MC6843] fix seek error flag in STRB
245 [VM/MC6843] fix seek command
246
247 [BX1/DISPLAY] improve for drawing digitron display
248 [BX1/KEYBOARD] improve I/O ports for detecting key pressed/released
249 [BX1/PRINTER] add ugly patch for printer process
250
251 1/24/2021
252
253 [VM/I8279] support 8279 (based on MAME)
254
255 [MP85] support MITEC MP-85
256
257
258 1/17/2021
259
260 [VM/UPD765A] improve for the case tc is asserted while reading/writing sector
261
262 [PC8801/PC88] improve to render screen with port params at end of disp timing
263 [X1TURBO/FLOPPY] fix to change type of all drives (thanks Mr.Sato)
264
265
266 1/3/2021
267
268 [WINMAIN] improve for pressing shift key and numpad key
269
270 [MZ80K] fix roman/kana conversion
271 [MZ80K/KEYBOARD] improve for pressing right shift key and numpad key
272
273
274 12/31/2020
275
276 [PC8801/PC88] improve crtc to refer reverse setting in start display command
277
278
279 12/21/2020
280
281 [VM/SCSI_CDROM] fix start frame of CD-DA playing when track number is specified
282
283 [PCENGINE/PCE] fix issue that ADPCM is mistakenly looped
284
285
286 12/19/2020
287
288 [VM/SCSI_CDROM] fix pre-gap of first track when it is audio track
289
290
291 12/18/2020
292
293 [VM/SCSI_CDROM] improve routine to get start/end frame of CD-DA playing
294
295 [PC8801/PC88] support 8inch DMA-type floppy drives for PC-8001mkII/SR
296 [PC9801/DISPLAY] improve EGC (thanks Mr.Ryuji Okamoto)
297
298
299 12/16/2020
300
301 [PC8801/DISKIO] improve to read/write files in initial current directory
302 [PC8801/PC88] support force ready/drq mask register for DMA-type FDD
303 [PC8801/PC88] fix PC-8001mkIISR hiragana font when PCG-8100 is enabled
304
305
306 12/15/2020
307
308 [PC8801/DISKIO] support M88 DiskDrv (thanks Mr.CISC and Mr.apaslothy)
309 [PC8801/PC88] support PC-8001mkIISR hiragana font
310 [PC8801/PC88] support to disable 5inch/8inch-FDD interfaces
311 [PC8801/PC88] support to disable updating scan line setting automatically
312 [PC8801/PC88] fix mouse data when position is not latched
313
314
315 12/14/2020
316
317 [PC8801/PC88] support 8inch DMA-type floppy drives
318
319
320 12/13/2020
321
322 [VM/MC6843] support MC6843 (based on MAME)
323 [[VM/SCSI_CDROM] fix to reset logical block size in Test Unit Ready command
324
325 [BX1] support CANON BX-1 (not work)
326 [MZ1500/QUICKDISK] improve for BSD record (thanks Mr.Motochan1500)
327 [PC8801/PC88] fix hireso graphic screen when scan line is disabled
328
329
330 12/12/2020
331
332 [PC8801/PC88] fix to clear attibutes at starting new frame
333 [PC8801/PC88] fix to read status of 2nd OPNA
334
335
336 12/11/2020
337
338 [PC8801/PC88] fix to run dma from memory to crtc when (rd,wr)=(0,0)
339 [PC8801/PC88] fix to run dma from scsi to memory only when count > 0
340
341
342 12/8/2020
343
344 [COMMON] fix build error on VC++2019 (thanks Mr.Sato)
345
346 [VM/Z80CTC] fix not to clear in-service at software reset (thanks Mr.Sato)
347 [VM/Z80DMA] fix stall cycles at BUSACK in byte mode (thanks Mr.Sato)
348
349 [X1TURBOZ/DISPLAY] fix zpalette in 64 colors, 2 screens mode (thanks Mr.Sato)
350
351
352 12/6/2020-2
353
354 [MZ1500] fix inp(0xe8) to detect voice board is missing (thanks Mr.kitahei88)
355 [X1TURBOZ/DISPLAY] fix to update zpalette at vline=0 (thanks Mr.Sato)
356
357
358 12/6/2020
359
360 [OSD/WIN32] import Unity plug-in code (thanks Mr.Marukun)
361
362 [VM/I386_NP21] update to Neko Project 21/W ver0.86 rev79 beta4
363 [VM/UPD765A] fix transfer size to 128 << min(N, 7) (thanks Mr.Kugimoto)
364
365 [MZ1500/QUICKDISK] improve for QDF format (thanks Mr.kitahei88)
366 [MZ1500/QUICKDISK] improve for BSD record (thanks Mr.Yuushi)
367 [PC9801/MEMORY] fix switching BIOS ROM/RAM
368 [X1/CZ8RB] support CZ-8RB (thanks Mr.Meister)
369
370 -----
371
372 お楽しみあれ!
373 -- Ohta.