Repository navigation
Releases
pix68k v0.2.6
この版でできるようになったこと
SD カードを抜かずに、Pi だけで次の版に更新できる
設定メニューの「Check for update」で新しい版を調べ、「Update」でダウンロードして入れ替える (SD カードから起動しているとき)。PC は要らない。Pi 3A+ / 3B+、Zero 2 W、Pi 4、Pi 400、Pi 5 は、新しい版で 1 回起動してみてから切り替えるので、新しい版が起動しなくても、電源を入れ直せば前の版で起動する (電源の入れ直しまで実機で確かめたのは Pi 5)。Pi 2 と Pi 3B はすぐ切り替えるので、新しい版が起動しなければ PC で config.txt の kernel= を戻す。この版を入れたあと、次の版への更新から使える (settings-menu.md の Update)。
Wi-Fi でつながる (試作)
Pi 3、Zero 2 W、Pi 4、Pi 400、Pi 5 で、LAN ケーブルなしにネットワークの機能 (HTTP の API、更新など) が使える。設定メニューの Wi-Fi のページで、近くの Wi-Fi ネットワーク (SSID) を選んでパスワードを入力すればつながる。pix68k.cfg に wifi=on、net=on、net_token=<自分で決めた文字列> を書き、Wi-Fi のファームウェアを SD カードの /pix68k/wifi/ に置く (ファームウェアは zip に入っていない。入手先と名前は config-reference.md の wifi)。
pix68k.local という名前でアクセスできる
net=on なら、IP アドレスを調べなくても http://pix68k.local/ や pix68kcli --host pix68k.local status でアクセスできる (mDNS。network-api.md の「mDNS」)。名前は net_name= で変えられる。
設定メニューでフォルダを開いてイメージを選べる
FD、HD、CD-ROM、SCSI のイメージの一覧で、/pix68k/ の下のフォルダに入って選べる。ゲームごとにフォルダを分けて置ける。カーソルを動かすたびにメニューがちらつくのも直した。
060turbo の 100MHz と、スプライトのメモリの増設
- 060turbo で
clock=100(100MHz) を選べる。実機にはない速さ。最高速モードの上限も 3200% から 6400% に上げた (060turbo.md)。 sprite_ram=64kで、スプライトのメモリを増設する改造をした本体として動かせる。改造に対応したソフトなら、スプライトのパターンを 256 個から 512 個まで使える。ふつうのソフトは既定の32kのままで使う (video.md の「スプライトのメモリの増設」)。
そのほか
- Zero 2 W で HDMI から音が出ないことがあったのを、zip の
config.txtで直した。 - Pi Zero / Zero W 用のカーネルをソースからビルドできるようにした (試験中。zip には入れていない。baremetal.md)。
この版への更新のしかた
- v0.2.5 には Pi だけでの更新がないので、今回は PC を使い、zip から手で入れる。SD カードから起動した Pi 2、3B / 3B+、4、400、5 は、有線 LAN でつないでいれば
pix68kcli update --no-trybootでも更新できるはず (v0.2.5 からは試していない。net_token=が要る。起動しなければ PC でconfig.txtのkernel=を戻す。pix68kcli の README)。 - Zero 2 W は、
config.txtも zip のものに替える (自分で書き足した行は、新しいほうにも書く)。前の版のconfig.txtのままだと、HDMI の音が出ないことがあり、次の版への更新もできない。ほかの機種は前のconfig.txtのままでよい。 - Wi-Fi を使うなら、ファームウェアを自分で SD カードに置く (上の「Wi-Fi でつながる」)。
- この版で保存したステートは、前の版では読めない。
既知の問題
- Pi 4 / Pi 400 / Pi 5 で EEPROM のブートローダが古いと、Pi だけでの更新が毎回「did not start」で終わり、新しい版にならない。EEPROM を更新するか、
cmdline.txtにpix68k_update_tryboot=0を書く (この場合、新しい版が起動しなければ、PC でconfig.txtのkernel=を戻す)。 - Wi-Fi を実機で確かめたのは Zero 2 W、Pi 3A+、Pi 400、Pi 5 で、つないだのは WPA2-PSK のネットワークだけ。
- Pi 400 にはまだ正式には対応していない。
What's new in v0.2.6 (English)
(The linked documents are in Japanese.)
Update to the next version from the Pi itself, without removing the SD card
"Check for update" in the settings menu looks for a new version, and "Update" downloads and installs it (when booted from the SD card). No PC is needed. On the Pi 3A+ / 3B+, Zero 2 W, Pi 4, Pi 400 and Pi 5, the new version is tried once before switching, so if it does not start, turning the power off and on boots the previous version (recovery by power cycling has been tested on the Pi 5). The Pi 2 and Pi 3B switch at once, so if the new version does not start, change kernel= in config.txt back on a PC. This becomes available once v0.2.6 is installed, starting with the next update (settings-menu.md, Update).
Wi-Fi (prototype)
On the Pi 3, Zero 2 W, Pi 4, Pi 400 and Pi 5, the network features (HTTP API, updates and so on) work without a LAN cable. On the Wi-Fi page of the settings menu, pick a nearby Wi-Fi network (SSID) and enter its password. Write wifi=on, net=on and net_token=<a string of your choice> in pix68k.cfg, and put the Wi-Fi firmware in /pix68k/wifi/ on the SD card (the firmware is not in the zip; where to get it and the file names are under wifi in config-reference.md).
Access it by the name pix68k.local
With net=on, http://pix68k.local/ and pix68kcli --host pix68k.local status work without looking up the IP address (mDNS; network-api.md, "mDNS"). The name can be changed with net_name=.
Open folders when choosing images in the settings menu
You can browse folders under /pix68k/ when choosing FD, HD, CD-ROM and SCSI images, so images can be organized in a folder per game. The menu no longer flickers when the cursor moves.
100MHz 060turbo and sprite memory expansion
- The 060turbo can run at
clock=100(100MHz), a speed real hardware does not have. The max speed mode limit was raised from 3200% to 6400% (060turbo.md). - With
sprite_ram=64k, pix68k emulates a machine with the sprite memory expansion mod. Software written for the mod can use 512 sprite patterns instead of 256. For other software, keep the default32k(video.md, "スプライトのメモリの増設").
Other changes
- The
config.txtin the zip fixes an issue where the Zero 2 W sometimes had no HDMI audio. - A kernel for the Pi Zero / Zero W can be built from source (experimental, not in the zip; baremetal.md).
How to install this version
- v0.2.5 cannot update itself, so install this version by hand from the zip, using a PC. A Pi 2, 3B / 3B+, 4, 400 or 5 booted from the SD card and connected over Ethernet should also be updatable with
pix68kcli update --no-tryboot(not tested from v0.2.5;net_token=is required; if it does not boot, changekernel=inconfig.txtback on a PC; pix68kcli README). - On the Zero 2 W, also replace
config.txtwith the one in the zip (add any lines you wrote yourself to the new one). With the oldconfig.txt, HDMI may have no sound and updating to the next version will not work. Other models can keep their oldconfig.txt. - To use Wi-Fi, put the firmware on the SD card yourself (see "Wi-Fi" above).
- States saved with this version cannot be loaded with earlier versions.
Known issues
- On the Pi 4 / Pi 400 / Pi 5, if the EEPROM bootloader is old, updating from the Pi always ends in "did not start" and the new version is never used. Update the EEPROM, or write
pix68k_update_tryboot=0incmdline.txt(then, if the new version does not start, changekernel=inconfig.txtback on a PC). - Wi-Fi has been tested on the Zero 2 W, Pi 3A+, Pi 400 and Pi 5, and only with WPA2-PSK networks.
- The Pi 400 is not officially supported yet.
ソースの場所は zip の中の SOURCE.txt と、このタグのソースを参照。Circle は submodule (external/circle) なので、GitHub が自動で付けるソースの zip と tar.gz には入らない。Circle は https://github.com/rsta2/circle の、SOURCE.txt に書いたコミットを使う。添付のファイルの SHA-256 は SHA256SUMS にある。
See SOURCE.txt in the zip and the source at this tag. Circle is a submodule (external/circle), so it is not included in the source zip and tar.gz that GitHub generates; use the commit of https://github.com/rsta2/circle written in SOURCE.txt. SHA-256 checksums of the attached files are in SHA256SUMS.
pix68k v0.2.5
v0.2.4 からの変更
直したこと
- VGMDRV など、ユーザモードのまま
$EC0000〜$ECFFFF(拡張ボードなどの番地) を読み書きするソフトが、バスエラーで止まるのを直した (expansion.md)。この範囲にあるまーきゅりーゆにっと (mercury=on) などのボードを、ユーザモードからも使える。
画面の明るさ
- ソフトがシステムポート (
$E8E001) で変える明るさ (コントラスト) を、画面に反映する。x68k-xvi さんの提案と PR をもとにした (video.md)。通常の 14 では、これまでと同じ色になる。14 と 15 の差、途中の明るさ、0 で真っ黒になるかが、X68000 の実機と同じかは確かめていない。 - Human68k の終了後は、画面が黒いままになる (リセットすると戻る)。
- この版で保存したステートは、v0.2.4 までの版では読めない。v0.2.4 のステートは、この版で読める。
ふろっぴU君 (FUK、ベータ)
- 異常終了したコマンド (一部を除く) と、つなぎ直した理由をログに出す。フォーマットの間のコマンドと結果も、先頭の 4 件と最後の 32 件を出す (ベアメタル版は
/log。fuk.md)。原因を調べるためのもので、読み書きの動作は変えていないが、この変更のあと、実物の FUK での動作と、書き込みは確かめていない。
そのほか
- テスト画面 (X68000 を起動していないとき。ベアメタル版の全機種) で、押しているキーも修飾キーも前のレポートと同じなら、キーの行 (
key: mod=...) をログに出さない。 - CPU の試験データを取ってくるスクリプト (
tools/fetch_sst.sh) が、GitHub の API を使わないようにした (ソースからビルドする人向け)。
更新のしかた
- v0.2.4 のカーネルからは
pix68kcli update --no-trybootで更新できるはずだが、updateそのものは実機で試していない (Pi 400 で、同じ順に要求を送るスクリプトと--rollbackを確かめただけ)。心配なら zip から手で入れる。起動しなければ、SD カードをパソコンに入れてconfig.txtのkernel=を戻す (pix68kcli の README)。
既知の問題
- 日本語キーボードの Pi 400 で英語版と判定され、半角/全角キーを押すと
¥が出ることがある。pix68k.cfgにkeyboard=pi400jpと書いて起動し直すと、半角/全角キーが全角として働く (日本語版の Pi 400 と v0.2.4 で確かめた)。本体のほかのキーの動作は、どちらの設定でも同じ。外付けのキーボードにも Pi 400 の本体と同じキーの置き換えをするようになる (keyboard.md)。 - v0.2.4 の既知の問題のうち、Pi 400 に正式には対応していないことと、ミキサーのキーは、この版でも同じ (v0.2.4 の説明)。
Changes since v0.2.4 (English)
Fixed
- Programs that read and write
$EC0000-$ECFFFF(the addresses of expansion boards and the like) in user mode, such as VGMDRV, no longer stop with a bus error (expansion.md; the linked documents are in Japanese). Boards in this range, such as the Mercury Unit (mercury=on), can also be used from user mode.
Screen brightness
- The brightness (contrast) that software sets through the system port (
$E8E001) is now applied to the screen. This is based on a proposal and a PR by x68k-xvi (video.md). At the usual value of 14, the colors are the same as before. Whether the difference between 14 and 15, the levels in between, and full black at 0 match a real X68000 has not been checked. - After Human68k shuts down, the screen stays black (a reset brings it back).
- States saved with this version cannot be loaded with v0.2.4 or earlier. States from v0.2.4 can be loaded with this version.
Floppy-U-kun (FUK, beta)
- The log now shows commands that ended abnormally (with some exceptions) and why pix68k reconnected to the FUK. It also shows the first 4 and last 32 commands and results of a format (
/logon the bare-metal build; fuk.md). This is for finding causes; it does not change how reading and writing work, but since this change, operation with a real FUK and writing (with any device) have not been tested.
Others
- On the test screen (shown when the X68000 is not running; all bare-metal models), a key line (
key: mod=...) is no longer logged when the pressed keys and modifiers are the same as in the previous report. - The script that fetches the CPU test data (
tools/fetch_sst.sh) no longer uses the GitHub API (for those who build from source).
How to update
- From the v0.2.4 kernel,
pix68kcli update --no-trybootshould work, butupdateitself has not been tried on real hardware (only a script that sends the same requests in the same order, and--rollback, on a Pi 400). If in doubt, install by hand from the zip. If it does not boot, put the SD card in a PC and changekernel=inconfig.txtback (pix68kcli README).
Known issues
- A Pi 400 with a Japanese keyboard may be detected as the English version, and the Hankaku/Zenkaku key may type
¥. Withkeyboard=pi400jpinpix68k.cfgand a restart, the key works as Zenkaku (tested on a Japanese Pi 400 with v0.2.4). The other built-in keys behave the same with either layout setting. The key mapping of the Pi 400 then also applies to external keyboards (keyboard.md). - Of the known issues of v0.2.4, the lack of official Pi 400 support and the mixer key also apply to this version (v0.2.4 notes).
ソースの場所は zip の中の SOURCE.txt と、このタグのソースを参照。Circle は submodule (external/circle) なので、GitHub が自動で付けるソースの zip と tar.gz には入らない。Circle は https://github.com/rsta2/circle の、SOURCE.txt に書いたコミットを使う。添付のファイルの SHA-256 は SHA256SUMS にある。
See SOURCE.txt in the zip and the source at this tag. Circle is a submodule (external/circle), so it is not included in the source zip and tar.gz that GitHub generates; use the commit of https://github.com/rsta2/circle written in SOURCE.txt. SHA-256 checksums of the attached files are in SHA256SUMS.
pix68k v0.2.4
v0.2.3 からの変更
画面 (既定の見え方が変わる)
video_scaleの既定を、integer(整数倍) からaspect(4:3 で高さいっぱい) にした (ベアメタル版。Pi 2 はintegerのまま)。前の見え方に戻すには、pix68k.cfgにvideo_scale=integerと書く。- 配布の
config.txtでは、どの機種にもdisable_overscan=1を書いた。カーネルだけを入れ替えるときは、config.txtの最初の節 ([pi3]など) より前に、この 1 行を自分で足す (baremetal.md)。disable_overscan=1 - Pi 3 で
video_filter=だけを書いていると、前より処理が重くなる。遅れるときもvideo_scale=integerにする。
音を鳴らしたまま変えるミキサー
- X68000 と音を止めずに音量を変えられる。Shift + 設定メニューのキー (Pi 400 は Shift + ラズベリー + M、ホスト版は Shift + F12 でも) で開く。ベアメタル版はブラウザ (
/mixer.html) からも使える (settings-menu.md)。 - 変わったこと: Shift を押しながらの設定メニューのキーは、設定メニューではなくミキサーを開く。
ゲームパッドのボタンの並び
- 設定メニューの Gamepad setup で、ボタンを順に押して並びを決め、
pads.txtに保存できる (ベアメタル版)。並びの分からないゲームパッドは、キーボードがなくても、ボタンの長押しで始められる (時間の条件は settings-menu.md)。 - Home も Select も割り当てないと、そのゲームパッドでは設定メニューを開けなくなる。
ふろっぴU君 (ベータ)
- ふろっぴU君 (FUK) につないだ FDD の 2HD のディスクを、XDF のイメージに読み出せる。ベアメタル版 (Pi 4、Pi 400、Pi 5) は
pix68kcli fuk-read --drive 0 disk.xdf、ホスト版は--fuk on --fuk-read 0 disk.xdf(fuk.md)。 - 注意: ふろっぴU君の実物では、まだ確かめていない。書き込み禁止にしたディスクで試してほしい。
カーネルの更新 (試験中)
pix68kcli update --checkで配布している版と比べ、update --no-trybootでカーネルだけを更新し、update --rollbackか Pi の画面の Roll back で前の版に戻す。--no-trybootは必須 (pix68kcli の README)。- v0.2.3 からの更新には使えない。この版は zip から手で入れ、次の版から使う。新しい版が起動しなければ、SD カードをパソコンに入れて
config.txtのkernel=を戻すことになる。 config.txtを書いている最中に電源が切れると、config.txtが壊れることがある。
そのほか
- SRAM の起動装置が SRAM のときと、フロッピーディスクのイメージのブートセクタが書き換えられたときに、画面とログで知らせる。
FORMATなどでも出る。やめるにはboot_warn=off(disks-and-scsi.md)。 - MIDI の音源を用意できない理由を画面に出す (
MT-32 (no ROM)など)。
既知の問題
- Pi 400 にはまだ正式には対応していない。日本語キーボードの Pi 400 で、英語配列と判定されることがある (
keyboard=pi400jpと書けば日本語配列になる)。 - Scroll Lock、Application、Menu のどのキーもないキーボード (Pi 400 を除く) では、ベアメタル版のミキサーを画面に開けない。
pix68k.cfgにkeyboard=pi400us(日本語配列はpi400jp) と書いて起動し直すと、Shift + 左 Windows (Command) + M で開ける。ほかのキーの動きも変わる (keyboard.md)。
確かめたこと、確かめていないこと
確かめたこと (開発中の版):
- 画面: Pi 3B+、Pi 4、Pi 5 の
aspectで、フレームの遅れは 0 だった (Pi 3B+ は変わった行だけを写す場合)。 - ミキサー: Pi 3B+ と Pi 5 で、開いても遅れと音の途切れは増えなかった。Pi 400 (英語キーボード) で開いた。Web は Pi 3B+ とパソコンのブラウザ。
- ゲームパッド: Pi 5 と HORIPAD S で、設定、保存、再起動後の保持。
- FUK: Pi 4 と、FUK の動作を再現する Pico 2 W で、ドライブ 0 と 1 のイメージが全バイト一致し、書き込みは 0 回だった。
- 更新: Pi 400 (英語キーボード、SD カードから起動) で、
updateと同じ順の要求を送るスクリプトで更新し、--rollback、設定メニュー、起動メニューで前の版に戻した。
確かめていないこと:
- 画面: Pi 3B と Pi 400 での速さ、テレビ。
- ミキサー: ベアメタル版の実物のゲームパッドとマウス、ホスト版の実際の操作、スマートフォン、Pi 2 / 4 / 400 での負荷。
- ゲームパッド: 長押しで始めること、ほかのゲームパッド、Pi 5 以外。
- FUK: 実物、Pi 400 と Pi 5 での読み出し。
- 更新: 配布の版を相手にした
update、Pi 400 以外。書き換えの警告と MIDI の表示: 実機。
Changes since v0.2.3 (English)
Display (the default appearance changes)
- The default
video_scaleis nowaspect(4:3, full height) instead ofinteger(integer scaling) on the bare-metal build (the Pi 2 stays atinteger). To go back to the old appearance, writevideo_scale=integerinpix68k.cfg. - The
config.txtin the package now hasdisable_overscan=1for every model. If you replace only the kernel, add this line to yourconfig.txtbefore the first section (such as[pi3]) (baremetal.md; the linked documents are in Japanese).disable_overscan=1 - On a Pi 3 with only
video_filter=written, processing is heavier than before. If frames are late, usevideo_scale=integeras well.
Mixer that works while the sound plays
- Changes the volume without stopping the X68000 or the sound. Shift + the settings menu key opens it (Shift + Raspberry + M on the Pi 400; also Shift + F12 on the host build). The bare-metal build also has a browser page,
/mixer.html(settings-menu.md). - Changed: the settings menu key with Shift now opens the mixer instead of the settings menu.
Gamepad button layout
- Gamepad setup in the settings menu sets the layout by pressing the buttons in order and saves it to
pads.txt(bare-metal build). For a gamepad with an unknown layout, you can also start it without a keyboard by holding a button (for the timing, see settings-menu.md). - If neither Home nor Select is assigned, that gamepad cannot open the settings menu.
Floppy-U-kun (beta)
- A 2HD disk in an FDD connected to a Floppy-U-kun (FUK) can be read into an XDF image:
pix68kcli fuk-read --drive 0 disk.xdfon the bare-metal build (Pi 4, Pi 400, Pi 5),--fuk on --fuk-read 0 disk.xdfon the host build (fuk.md). - Caution: this has not been tested with a real Floppy-U-kun. Please try it with a write-protected disk.
Kernel update (experimental)
pix68kcli update --checkcompares with the released version,update --no-trybootupdates only the kernel, andupdate --rollbackor Roll back on the Pi's screen goes back to the previous version.--no-trybootis required (pix68kcli README).- It cannot update from v0.2.3. Install this version by hand from the zip, and use
updatefrom the next version. If the new version does not boot, you must put the SD card in a PC and changekernel=inconfig.txtback. - If the power fails while
config.txtis being written, the file may be damaged.
Others
- A message on the screen and in the log tells when the SRAM boot device is SRAM and when the boot sector of a floppy disk image is rewritten. It also appears for
FORMATand the like. Writeboot_warn=offto turn it off (disks-and-scsi.md). - The screen shows why a MIDI sound source is not available (
MT-32 (no ROM)etc.).
Known issues
- The Pi 400 is not officially supported yet. On a Pi 400 with a Japanese keyboard, the keyboard may be detected as the English layout (write
keyboard=pi400jpto use the Japanese layout). - With a keyboard that has none of the Scroll Lock, Application and Menu keys (except on the Pi 400), the on-screen mixer of the bare-metal build cannot be opened. With
keyboard=pi400usinpix68k.cfg(pi400jpfor a Japanese layout) and a restart, Shift + Left Windows (Command) + M opens it. Other keys also behave differently (keyboard.md).
Tested and not tested
Tested (on development versions):
- Display: no late frames with
aspecton a Pi 3B+, Pi 4 and Pi 5 (the Pi 3B+ copying only changed lines). - Mixer: no increase in late frames or audio dropouts with it open on a Pi 3B+ and a Pi 5. It opened on a Pi 400 (English keyboard). The web page on a Pi 3B+ with a PC browser.
- Gamepad: setup, saving and keeping the layout after a restart, on a Pi 5 with a HORIPAD S.
- FUK: on a Pi 4 with a Pico 2 W that reproduces the FUK's behavior, the images of drives 0 and 1 matched in every byte with 0 writes.
- Update: on a Pi 400 (English keyboard, booted from an SD card), updating with a script that sends the same requests in the same order as
update, and going back with--rollback, the settings menu and the boot menu.
Not tested:
- Display: speed on the Pi 3B and Pi 400, TVs.
- Mixer: a real gamepad and mouse on the bare-metal build, real operation of the host build, smartphones, the load on the Pi 2 / 4 / 400.
- Gamepad: starting by holding a button, other gamepads, models other than the Pi 5.
- FUK: a real one, and reading on the Pi 400 and Pi 5.
- Update:
updatewith released versions, models other than the Pi 400. The boot warnings and the MIDI messages: on real hardware.
ソースの場所は zip の中の SOURCE.txt と、このタグのソースを参照。Circle は submodule (external/circle) なので、GitHub が自動で付けるソースの zip と tar.gz には入らない。Circle は https://github.com/rsta2/circle の、SOURCE.txt に書いたコミットを使う。添付のファイルの SHA-256 は SHA256SUMS にある。
See SOURCE.txt in the zip and the source at this tag. Circle is a submodule (external/circle), so it is not included in the source zip and tar.gz that GitHub generates; use the commit of https://github.com/rsta2/circle written in SOURCE.txt. SHA-256 checksums of the attached files are in SHA256SUMS.
pix68k v0.2.3
v0.2.2 からの変更
ふろっぴU君 (ベータ)
- ふろっぴU君 (以下 FUK。X68000 の FDC と FDD を USB でエミュレータにつなぐ装置) を、内蔵の FDC のエミュレーションの代わりに使えるようにした。ベータ。ベアメタル版は
pix68k.cfgにfuk=onと書き、FUK を USB につないでから起動する (Pi 4、Pi 400、Pi 5。Pi 2 と Pi 3 では使えない)。ホスト版は--fuk on(Linux) か、--fuk /dev/cu.usbmodem101,/dev/cu.usbmodem103のようにシリアルポートを 2 本書く (macOS など)。既定はoff。 - FUK を使っている間は、
fd0=、fd1=のイメージは X68000 から見えない。ステートの保存と読み込みもできない。起動のときに FUK が見つからなければ、内蔵の FDC のまま起動する。 - FUK から届いた Read のデータを、届いた時刻の間隔を保ったまま DMAC (DMA コントローラ) に渡す。装置の挙動に忠実にした。渡し始めの遅れは
fuk_lead=(マイクロ秒) で決まった値にもできる (既定の 0 は自動で決める)。 - 注意: 確かめたのは、FUK の動作を再現する Pico 2 W のファーム (この節の最後の項目) で、ふろっぴU君の実物ではまだ確かめていない。書き込みの途中でリセットしたときなどに実物の動きが違うと、ディスクを壊すおそれがある。書き込みは、複製したディスクで試してほしい。詳しくは
docs/fuk.mdの「実物のふろっぴU君で確かめていないこと」と「既知の制限」。 - 確かめた組み合わせ: ベアメタル版の Pi 5 (68000 16MHz、68060 75MHz) と Pi 4 Model B (68000 16MHz、68030)、ホスト版の Linux (Pi 5)。Human68k 3.02 の起動、
copyでの書き込み、del。Pi 400 は Pi 4 と同じカーネルだが、実機では試していない。 tools/pico_fukemuに、Raspberry Pi Pico 2 W を FUK に見せるファームを入れた。フラッシュに置いた 2HD のイメージ 2 枚を FD0 と FD1 として読み書きする。USB の見え方と手順は FUK と同じなので、pix68k は FUK と同じ処理で使う。Wi-Fi につなぐと、状態の問い合わせ、設定とディスクイメージの書き込み、ファームの書き換えを LAN 越しにできる。主に試験用。
音量
- 音源ごとの音量と全体の音量を変えられるようにした。設定ファイルの
vol_opm、vol_adpcm、vol_mercury、vol_ymf288、vol_midi、vol_cd、vol_masterに、-40〜12 (dB) かoffを書く。既定は 0。ホスト版は--vol opm=-6のようにも書ける。上げると、足した音が 16 ビットを超えて歪むことがある。 - 設定メニューに Sound mixer のページを足した。音源ごとの音量を ←→ で 1 dB ずつ変えられ、すぐに反映する (残すには Save settings)。各行に、メニューを開く前の 10 秒ほどのその音源の最大の大きさを % で出す。
- まーきゅりーゆにっとの YMF288 を混ぜる比を 1/2 から 1/3 にした。YMF288 の音は v0.2.2 より 3.5 dB 小さくなる。前の大きさに近づけるなら
vol_ymf288=4と書く (+0.5 dB。1 dB 刻みなので同じにはならない)。 - libretro のコアに、音量のコアのオプション
pix68k_vol_opm、pix68k_vol_adpcm、pix68k_vol_masterを足した (-40〜+12 dB と off。既定は 0 dB)。OPM と ADPCM の音量はステートの中身を変えるので、netplay では相手と OPM と ADPCM の音量を揃える。
画面
- ベアメタル版の右上の数字を余白に縦に並べるとき、つないでいる音源も出すようにした (
OPM ADPCM、MERC PCM+OPN3、MIDI:MT-32など、CD-ROM 装置に媒体を入れているときのCD)。直近 1 秒ほどに鳴っていない音源は灰色で出す (MIDI の行き先が UART のときは、鳴ったかが分からないので白のまま)。ホスト版はウィンドウのタイトルに出す。 - Pi 400 で、モニタをつないでいない HDMI の口に画面を出し、モニタがファームウェアのレインボー画面のままになることがあったのを直した (ベアメタル版の Pi 4、Pi 400、Pi 5)。起動のときに、モニタのつながった (EDID が読める) HDMI の口を選ぶ。両方にあれば HDMI0、どちらにもなければ今までと同じ口。起動のときにモニタの電源が切れていると、つながっていないとみなすことがある。HDMI0 に EDID を返さない機器 (キャプチャ、分配器など)、HDMI1 に EDID を返す機器があると HDMI1 に出る。
cmdline.txtにpix68k_display=hdmi0と書けば HDMI0 に戻せる (hdmi1も書ける。既定はauto)。口を選ぶところを実機で確かめたのは Pi 400 だけ。Pi 4 は、画面が 1 つの構成で今までどおり映ることだけを確かめた。Pi 5 では、この直しを実機で確かめていない。 - TS-6BGA (
pix68k_ts6bga) の画面は、ディスプレイ番号 1 に固定していたのを、X68000 の画面に選ばなかった側の HDMI の口に出すようにした。X68000 の画面が HDMI1 に出る構成では、TS-6BGA は HDMI0 に出る。
ネットワーク
- Pi 400 の Ethernet で、送ったフレームの多くが失われ、DHCP が通らないことがあったのを直した (ベアメタル版)。1000Mbps の送信クロックを MAC と PHY のどちらでも遅らせていなかったので、MAC で遅らせるようにした。Pi 4 も同じ設定になる。ネットワーク起動した Pi 400 (日本語キーボード) と Pi 4 (c03111) で、DHCP が通り、1000 バイトの ping が 200 回中 200 回返ることを確かめた。SD カードから起動した Pi 400 (英語キーボード、c03130) でも DHCP が通り、1000 バイトの ping が 200 回中 200 回返ることを確かめた。100Mbps のリンクと Pi 4 のほかのリビジョンは確かめていない。
SCSI
- 68000 の機種に外付けの SCSI ボード (
scsi_ex=on) をつなぎ、FORMAT.X で初期化したハードディスクから ROM 起動すると、画面が真っ黒のまま止まるのを直した。装置のない SCSI ID を調べるときの、SPC の SSTS レジスタの INIT ビットの値が違っていた。68000 に内蔵 SCSI の ROM をつないで $FC0000 から ROM 起動しても、同じところで止まっていたとのこと。x68k-xvi さんの報告と修正による。起動できるようになったことは、x68k-xvi さんが外付けのボードで確かめた。開発側には外付けボードの ROM がなく、単体テストと X68030 からの起動だけを確かめた。
ホスト版のビルド
- macOS の Xcode 15 (Apple clang 15.0.x) でビルドすると、68030 と 68060 の試験が落ちるという報告があった (Intel Mac)。ADDQ が SUBQ として動いていた。ADDQ と SUBQ の実装を別の関数に分けたが、Apple clang 15 で直るかは確かめていない。そのため Apple clang 15.0.x では CMake が止まり、Xcode 16 以降を使うように出す (
-DPIX68K_ALLOW_APPLE_CLANG_15=ONを付けると警告だけにする)。
配布物
- Raspberry Pi 3 / 4 / 5 のカーネル (
kernel8.img、kernel8-rpi4.img、kernel_2712.img) を作るコンパイラを、Ubuntu のパッケージの aarch64-linux-gnu-gcc (GCC 15.2.0) から、Arm GNU Toolchain 15.2.Rel1 (aarch64-none-elf-gcc) に替えた。Pi 2 のカーネル (kernel7.img) は前から Arm GNU Toolchain 15.2.Rel1 (arm-none-eabi-gcc)。実機での試験と CI で使っているコンパイラにそろえるため。
文書
- README などの対応機種に Raspberry Pi 2 を書き足した。
Changes since v0.2.2 (English)
Floppy-U-kun (beta)
- Floppy-U-kun ("FUK" below; a device that connects a real X68000 FDC and FDD to an emulator over USB) can now be used instead of the built-in FDC emulation. Beta. On the bare-metal build, write
fuk=oninpix68k.cfgand connect the FUK over USB before booting (Pi 4, Pi 400, Pi 5; not available on Pi 2 and Pi 3). On the host build, use--fuk on(Linux) or name the two serial ports, e.g.--fuk /dev/cu.usbmodem101,/dev/cu.usbmodem103(macOS etc.). The default isoff. - While the FUK is in use, the
fd0=andfd1=images are not visible to the X68000, and states cannot be saved or loaded. If no FUK is found at boot, the built-in FDC is used. - Read data from the FUK is passed to the DMAC (DMA controller) with the same timing between bytes as it arrived. This follows the device's behavior more faithfully. The start delay can be fixed with
fuk_lead=(microseconds; the default 0 chooses it automatically). - Caution: this was tested with Pico 2 W firmware that reproduces the FUK's behavior (last item in this section), not yet with a real Floppy-U-kun. If the real device behaves differently, for example on a reset during a write, a disk may be damaged. Please test writes with a copy of your disk. See "実物のふろっぴU君で確かめていないこと" (what has not been tested with a real Floppy-U-kun) and "既知の制限" (known limitations) in
docs/fuk.md(in Japanese). - Tested: bare-metal build on a Pi 5 (68000 16MHz, 68060 75MHz) and a Pi 4 Model B (68000 16MHz, 68030), host build on Linux (Pi 5). Booting Human68k 3.02, writing with
copy, anddel. The Pi 400 uses the same kernel as the Pi 4 but has not been tested. tools/pico_fukemucontains firmware that makes a Raspberry Pi Pico 2 W appear as a FUK. It reads and writes two 2HD images in flash as FD0 and FD1. It looks the same on USB and uses the same protocol, so pix68k uses it the same way as a FUK. Over Wi-Fi, its status can be queried, and its settings, disk images and firmware can be updated over the LAN. Mainly for testing.
Volume
- The volume of each sound source and the master volume can now be changed. Write -40 to 12 (dB) or
offinvol_opm,vol_adpcm,vol_mercury,vol_ymf288,vol_midi,vol_cdandvol_masterin the config file. The default is 0. The host build also accepts--vol opm=-6. Raising the volume can make the mixed sound exceed 16 bits and distort. - The settings menu has a new Sound mixer page. Each source's volume changes in 1 dB steps with Left / Right and takes effect immediately (use Save settings to keep it). Each row shows the source's peak level in % over about 10 seconds before the menu was opened.
- Mercury-Unit's YMF288 chips are now mixed at 1/3 instead of 1/2, so they are 3.5 dB quieter than in v0.2.2. To get close to the old level, write
vol_ymf288=4(+0.5 dB; the 1 dB steps cannot match it exactly). - The libretro core has new core options for volume:
pix68k_vol_opm,pix68k_vol_adpcmandpix68k_vol_master(-40 to +12 dB and off; default 0 dB). The OPM and ADPCM volumes change the state contents, so for netplay, use the same OPM and ADPCM volumes as the other player.
Display
- When the top-right numbers on the bare-metal build are stacked vertically in the margin, they now also show the attached sound sources (
OPM ADPCM,MERC PCM+OPN3,MIDI:MT-32etc., andCDwhile a disc is in the CD-ROM drive). A source that has not played in about the last second is shown in grey (with MIDI output to the UART, it stays white because whether it played is unknown). The host build shows them in the window title. - Fixed the Pi 400 sometimes sending the screen to an HDMI port with no monitor, leaving the monitor on the firmware's rainbow screen (bare-metal build on Pi 4, Pi 400 and Pi 5). At boot, the HDMI port with a monitor (one whose EDID can be read) is chosen. If both have one, HDMI0 is used; if neither does, the same port as before. A monitor that is powered off at boot may be treated as not connected. If the device on HDMI0 returns no EDID (a capture device, splitter, etc.) and the one on HDMI1 does, the screen goes to HDMI1. Write
pix68k_display=hdmi0incmdline.txtto go back to HDMI0 (hdmi1is also accepted; the default isauto). Choosing the port was tested on real hardware only on a Pi 400. On a Pi 4, only a one-display setup was tested, where the screen appears as before. This fix has not been tested on a real Pi 5. - The TS-6BGA (
pix68k_ts6bga) screen was fixed to display number 1; it now goes to the HDMI port not chosen for the X68000 screen. If the X68000 screen is on HDMI1, the TS-6BGA is on HDMI0.
Network
- Fixed the Pi 400's Ethernet losing many of the frames it sent, so that DHCP could fail (bare-metal build). Neither the MAC nor the PHY delayed the 1000Mbps transmit clock; the MAC now delays it. The Pi 4 uses the same setting. On a network-booted Pi 400 (Japanese keyboard) and on a Pi 4 (c03111), DHCP succeeded and 200 of 200 1000-byte pings were answered. On a Pi 400 (English keyboard, c03130) booted from an SD card, DHCP also succeeded and 200 of 200 1000-byte pings were answered. 100Mbps links and other Pi 4 revisions have not been tested.
SCSI
- Fixed a 68000 machine with an external SCSI board (
scsi_ex=on) stopping at a black screen when booting from ROM from a hard disk initialized with FORMAT.X. The INIT bit of the SPC's SSTS register had the wrong value while probing SCSI IDs with no device. According to the report, a 68000 machine with the internal SCSI ROM booted from $FC0000 stopped at the same point. Reported and fixed by x68k-xvi, who confirmed booting with the external board. We do not have the external board's ROM, and checked only the unit tests and booting an X68030.
Building the host version
- A report showed that building with Xcode 15 (Apple clang 15.0.x) on macOS made the 68030 and 68060 tests fail (on an Intel Mac): ADDQ ran as SUBQ. ...
pix68k v0.2.2
v0.2.1 からの変更
実物のフロッピーディスク
- USB のフロッピーディスクドライブ (USB-FDD) に入れた実物の FD (X68000 の 2HD) から起動できるようにした。ベアメタル版は
pix68k.cfgにfd0 = usb-fdd:と書き、電源を入れる前に FD を入れておく。USB-FDD が 2 台あればfd0 = usb-fdd:0、fd1 = usb-fdd:1のように番号で分ける (usb-fdd:3まで。番号は、ディスクが入っていて読めたドライブに読めた順に付く)。ホスト版は Linux だけで、-0 /dev/sdaのようにブロックデバイスを渡す。 - 起動のときにディスクの全体 (1,261,568 バイト) をメモリに読み、書き込み禁止のイメージとして入れる。読む間 (Pi 5 で約 50 秒) は起動が止まる。設定メニューの Restart でも読み直す。実物の FD には書かない。起動のあとの FD の入れ替えはできない。読めるのは X68000 の 2HD だけで、コピープロテクトのあるディスク、2DD、1.44MB は読めない。確かめたドライブは Y-E DATA の USB-FDU (057b:0000) で、実機は Pi 5 だけ (Pi 3 / Pi 4 はビルドだけ)。詳しくは
docs/disks-and-scsi.mdの「実物のフロッピーディスクを USB-FDD から読む」。 - USB-FDD から読んだディスクを XDF のイメージに書き出せるようにした (ベアメタル版)。設定メニューの「Save FD0 image」/「Save FD1 image」で、
/pix68k/FD-<CRC-32>.XDFに書く (例:FD-602F7858.XDF)。同じ名前のファイルがあれば上書きしない。HTTP のGET /fd0.xdf、GET /fd1.xdfでも取れる (net_token=があればトークンが要る)。
Raspberry Pi 2
- ベアメタル版が Raspberry Pi 2 Model B (Rev 1.1、BCM2836) で動くようにした。32 ビットのカーネル
kernel7.imgで、機種は X68000 (68000、10MHz / 16MHz) だけ。X68030、060turbo、数値演算プロセッサボードは使えない。zip にkernel7.imgと、config.txtの[pi2]の節を入れた。 - Pi 2 は、HDMI が 1920x1080 ならフレームバッファを 960x540 にし、2 倍の拡大を GPU に任せる。1920x1080 に実寸で書くと、16MHz でフレームが遅れることがあるため。
cmdline.txtにpix68k_gpu_scale=1と書けば実寸で書く。モニタの枠の絵 (video_filter=のcz-600de/cz-600db) は、既定では出ない。 - 実機では、グラディウス II のデモ (68000 16MHz) が遅れたフレーム 0 で動いた。ほかのゲームと MIDI の音源は確かめていない。詳しくは
docs/baremetal.mdの「Raspberry Pi 2」。 - 全機種: HTTP の
PUT /files/pix68k/<名前>は、/pix68kがなければ作ってから書く。LAN から起動して SD カードに/pix68kがないときも、ROM やpix68k.cfgを HTTP で置ける。
画面
osd_bars=onで、画面の右下に各コア (C0〜C3) とメモリ (MEM) の使用率を縦の棒で出す (ベアメタル版。既定はoff。設定メニューの OSD bars でも切り替えられ、Save settings で保存する)。C0 は USB、SD カード、ネットワーク、C1 は X68000、C2 は画面の合成、C3 は音の合成と MIDI の音源。色は 70% まで緑、90% まで黄、その上は赤。右上の数字を出していないとき (osd=off、メニューを開いている間など) は出さない。- 右の余白が 96 ドット以上 128 ドット未満のとき (960x540 のフレームバッファに 768x512 の画面を出すときなど) は、右上の数字と負荷のバーを 11 文字幅に詰めて、X68000 の画面に重ならないようにした。IP アドレスが 11 文字を超えるときは 2 行に分ける。
音
- まーきゅりーゆにっと (
mercury=on) に、ボードに載っている FM 音源の YMF288 (OPN3-L) 2 個を足した。FM 12 音、SSG 6 音、リズム 12 音と、タイマーの割り込み (レベル 4) を使える。mndrv の演奏を確かめた。リズムの音はチップの中の ROM のデータで同梱できないので、WAV 6 個 (2608_BD.WAV、2608_SD.WAV、2608_TOP.WAV、2608_HH.WAV、2608_TOM.WAV、2608_RIM.WAV) を/pix68kに置く (mercury_rhythm=DIRで変えられる。ホスト版は ROM のディレクトリか--mercury-rhythm DIR)。なければリズムだけ鳴らない。リズムは本物の音の WAV では確かめておらず、音量は推測で決めた。詳しくはdocs/expansion.md。 - OPM、ADPCM、まーきゅりーゆにっとの音 (62.5kHz) を出力の周波数 (48kHz など) に直すところを、線形補間から窓をかけた sinc の多相フィルタに替えた。24kHz より上の成分が聞こえる範囲に折り返して濁っていたのが減る (28kHz の音の折り返しが -10dB から -57dB)。音はフィルタの分 0.24ms 遅れる。
- まーきゅりーゆにっとの PCM を 62.5kHz に直すところも、前の値を保つだけだったのを多相フィルタに替えた (48kHz の PCM に 5kHz の音を入れたときの、元の音と関係のない成分が -18dB から -62dB)。PCM の周波数の 0.43 倍より上の音は、写し (イメージ) が落ちきらない。
- Pi の HDMI の音が、16ms ごとに飛び続けることがあったのを直した。ログを UART に書く間に割り込みが止まり、DMA の送り終わりの割り込みを取りこぼすと、送っている最中のバッファに次の音を書き続けていた。ログを短く分けて書き、割り込みのたびに DMA が今どのバッファを送っているかを見て合わせ直す。Pi 3 / Pi 4 の PWM と I2S にも同じ直しを入れた (I2S は鳴らしていない。Pi 5 の PWM / I2S は別の処理で、入っていない)。10 秒ごとの
sound:の行の最後に、合わせ直した回数 (DMA resync(s)) を出す。UART のログは、ほかのコアのログが行の途中に混ざることがある (ネットワークの/logと画面のログは変わらない)。 - 音の大きさのログに、
sound sources:の行を足した。音源ごとの最大、MIDI を足す前の音だけで 16 ビットの範囲を超えたフレームの数、MIDI の音源が上限に届いたフレームの数、バッファが満杯で捨てたフレームの数を出す。音が割れるという報告を調べるためのもの。読み方はdocs/midi.md。
ゲームパッド
- HORI の PC エンジン用のパッド (PCEngine PAD、VID:PID 0f0d:0138) を、ボタンの並べ直しの表に足した。I がトリガ A、II がトリガ B。RUN と SELECT の同時押しでリセット、SELECT を押しながら十字キーの上で設定メニュー (Home ボタンはない)。
- 起動したあとに挿したゲームパッド (HORIPAD S など) が認識されないことがあったのを直した。挿してから 300ms 待って探し、読めなければ 1 秒おきに探し直す (3 回まで)。Pi 5 で HORIPAD S を挿し直すと、USB のコントローラへの命令が時間切れになり、全体が止まることがあったのも直した。この直しを確かめたのは Pi 5 の USB ポートだけで、ハブの先 (Pi 3 / Pi 4、外付けのハブ) では試していない。
ステート
- まーきゅりーゆにっとの YMF288 と、音のフィルタの状態がステートに入るようになった (版 21)。v0.2.1 までのステートは読める。v0.2.2 で保存したステートは、v0.2.1 では読めない。
試験機の道具
tools/pico_kbd(試験機の Pico を USB キーボードに見せるファーム) に、ゲームパッドと USB の抜き差しを真似る機能を足した。試験用で、利用者は使わない。
既知の問題
- Pi 2: USB のゲームパッド (HORIPAD S) を挿したまま起動すると、USB の走査が止まり、OSD とネットワークが出ないことがある。抜いて起動し、OSD が出てから挿せば使える (Pi 2 で、起動したあとに挿した HORIPAD S で遊べた)。PC エンジン用のパッドは、挿したまま起動しても止まらなかった。
- Pi 2: USB キーボードから続けて速く打つと、文字が抜けることがある。
- Pi 2: 既定のフレームバッファは 960x540 なので、それより大きい画面モード (1024x1024 など) は、はみ出す分が切れる (真ん中を出す)。
cmdline.txtにpix68k_gpu_scale=1と書けば切れない (16MHz でフレームが遅れることがある)。 - Pi 2: マウスと、Pi 2 Model B の Rev 1.2 (BCM2837) は確かめていない。
- Pi 2: Pi 2 で保存したステートを 64 ビット版で読むこと、その逆は確かめていない。
Changes since v0.2.1 (English)
Real floppy disks
- The emulator can now boot from a real floppy disk (X68000 2HD) in a USB floppy disk drive (USB-FDD). On the bare-metal build, write
fd0 = usb-fdd:inpix68k.cfgand insert the disk before powering on. With two drives, assign them by number, e.g.fd0 = usb-fdd:0andfd1 = usb-fdd:1(up tousb-fdd:3; numbers go to drives that have a readable disk, in the order they are read). The host build supports this on Linux only: pass the block device, e.g.-0 /dev/sda. - The whole disk (1,261,568 bytes) is read into memory at boot and inserted as a write-protected image. Booting stops while it is read (about 50 seconds on a Pi 5). Restart in the settings menu reads it again. Nothing is written to the real disk. Swapping disks after boot is not supported. Only X68000 2HD disks can be read; copy-protected disks, 2DD and 1.44MB disks cannot. Tested with a Y-E DATA USB-FDU (057b:0000) on a Pi 5 only (Pi 3 / Pi 4 were only built). See
docs/disks-and-scsi.md(in Japanese). - A disk read from a USB-FDD can be saved as an XDF image (bare-metal build). "Save FD0 image" / "Save FD1 image" in the settings menu writes
/pix68k/FD-<CRC-32>.XDF(e.g.FD-602F7858.XDF). An existing file with the same name is never overwritten. HTTPGET /fd0.xdfandGET /fd1.xdfalso return the image (a token is required whennet_token=is set).
Raspberry Pi 2
- The bare-metal build now runs on the Raspberry Pi 2 Model B (Rev 1.1, BCM2836). It is a 32-bit kernel,
kernel7.img, with the X68000 (68000, 10MHz / 16MHz) only; X68030, 060turbo and the FPU board are not available. The zip includeskernel7.imgand a[pi2]section inconfig.txt. - On the Pi 2, with 1920x1080 HDMI, the frame buffer is 960x540 and the GPU scales it 2x, because when drawing 1920x1080 directly, frames can be late at 16MHz. Add
pix68k_gpu_scale=1tocmdline.txtto draw at full size. The monitor bezel (cz-600de/cz-600dbinvideo_filter=) is not shown by default. - On real hardware, the Gradius II demo (68000 16MHz) ran with no late frames. Other games and the MIDI synths have not been tested. See "Raspberry Pi 2" in
docs/baremetal.md. - All models: HTTP
PUT /files/pix68k/<name>creates/pix68kif it does not exist. ROMs andpix68k.cfgcan be uploaded over HTTP even when a network-booted Pi has no/pix68kon its SD card.
Display
osd_bars=onshows vertical bars for the load of each core (C0-C3) and memory (MEM) at the bottom right of the screen (bare-metal build; defaultoff; also toggled with OSD bars in the settings menu and saved with Save settings). C0 is USB, SD card and network, C1 the X68000, C2 screen composition, C3 sound synthesis and MIDI synths. Bars are green up to 70%, yellow up to 90%, red above. They are hidden when the top-right numbers are (osd=off, while the menu is open, etc.).- When the right margin is at least 96 but less than 128 dots (e.g. a 768x512 screen in a 960x540 frame buffer), the top-right numbers and the load bars are narrowed to 11 characters so they do not cover the X68000 screen. An IP address longer than 11 characters is split over two lines.
Sound
- Mercury-Unit (
mercury=on) now has the two YMF288 (OPN3-L) FM chips on the board: 12 FM, 6 SSG and 12 rhythm channels, and timer interrupts (level 4). Playback with mndrv was tested. The rhythm sounds are ROM data inside the chip and cannot be included; place six WAV files (2608_BD.WAV,2608_SD.WAV,2608_TOP.WAV,2608_HH.WAV,2608_TOM.WAV,2608_RIM.WAV) in/pix68k(change withmercury_rhythm=DIR; host build: the ROM directory or--mercury-rhythm DIR). Without them only the rhythm is silent. The rhythm has not been tested with real sound data, and its volume is a guess. Seedocs/expansion.md. - Conversion of OPM, ADPCM and Mercury-Unit sound (62.5kHz) to the output rate (48kHz etc.) now uses a windowed-sinc polyphase filter instead of linear interpolation. Less of the content above 24kHz folds back into the audible range (a 28kHz tone's alias drops from -10dB to -57dB). The filter delays sound by 0.24ms.
- Mercury-Unit PCM is also converted to 62.5kHz with a polyphase filter instead of holding the previous sample (unrelated components for a 5kHz tone in 48kHz PCM drop from -18dB to -62dB). For tones above 0.43 times the PCM rate, the images are not fully removed.
- Fixed HDMI sound on the Pi sometimes skipping every 16ms. Writing the log to the UART disabled interrupts; when a DMA completion interrupt was missed, the next sound kept being written into the buffer being sent. The log is now written in short pieces, and on each interrupt the driver checks which buffer the DMA is sending and resynchronizes. The same fix is in PWM and I2S on Pi 3 / Pi 4 (I2S not tested; Pi 5 PWM / I2S use a different driver and are not covered). The 10-second
sound:log line ends with the number of resyncs (DMA resync(s)). On the UART, log lines from other cores may now be mixed into the middle of a line (the network/logand the on-screen log are unchanged). - The sound level log has a new
sound sources:line: the peak of each source, frames where the sound before adding MIDI exceeded 16 bits, frames where a MIDI synth reached full scale, and frames dropped because the buffer was full. This is for investigating reports of distorted sound. Seedocs/midi.md.
Gamepads
- Added the HORI PC Engine pad (PCEngine PAD, VID:PID 0f0d:0138) to the button remapping table. I is trigger A, II is trigger B. RUN and SELECT together reset; Up ...
pix68k v0.2.1
v0.2.0 からの変更
日本語の名前
- 設定メニューのディスクのイメージの一覧で、日本語のファイル名を CGROM (X68000 の文字のフォントの ROM) の字で出す。CGROM.DAT がなければ、全角の字は四角、半角カタカナは
?になる。一覧に出るのは、名前が拡張子を含めて 95 バイトまでのもの (UTF-8 の全角は 1 字 3 バイトなので、全角だけの名前なら、.XDFのような 4 バイトの拡張子を除いて 30 字まで)。日本語の名前は英数字の名前のあとに並べる。 - ベアメタル版は SD カードのファイル名を UTF-8 で扱う。長い名前のない 8.3 の名前は Shift_JIS として読む。
pix68k.cfgのfd0=などに日本語の名前を書くときは、pix68k.cfgを UTF-8 で書く。 - v0.2.0 までのベアメタル版で、HTTP の
PUT /filesから日本語の名前で置いたファイルは、化けた名前で SD カードに書かれている。この版では名前が化けて見えるので、消してから置き直す。 - 起動の組み合わせのメニューで、
pix68k-<名前>.cfgの 1 行目に書いた題を、UTF-8 でも Shift_JIS でも読む。1 行目が正しい UTF-8 なら UTF-8、そうでなければ Shift_JIS として読む (UTF-8 の BOM があれば UTF-8)。半角カタカナだけの題で、バイトの並びがたまたま正しい UTF-8 にもなるもの (ツー= 0xC2 0xB0 など) は化ける。全角の字を混ぜるか、UTF-8 で書けば正しく出る。
ゲームパッド
- Start と Select を同時に押すと、X68000 をリセットする (設定メニューの Reset と同じ)。押し続けてもリセットは 1 回だけで、両方を離すまで次のリセットはしない。Switch Pro コントローラは + と -。ホスト版 (SDL2) は Start と Back。
- Home か、Select を押しながら十字キーの上で、設定メニューを開く / 閉じる。メニューの中では、十字キーとスティックで選び、A / X で決め、B / Y で戻る / 閉じる。Select と上は、Select を先に押す。ホスト版は Guide か、Back を押しながら上。
- HORI の HORIPAD S (VID:PID 0f0d:00c1) に対応した。Circle (ベアメタル版の USB の処理に使っているライブラリ) がボタンの配置を知らないゲームパッドでも、pix68k の表に VID:PID があれば、ボタンを並べ直して同じように扱う。今の表にあるのは HORIPAD S だけ。
- リセットと設定メニューのボタンは、ベアメタル版では Circle が配置を知っているゲームパッドか、上の表にあるゲームパッドで使える。
pad_log=onをpix68k.cfgに書くと、ゲームパッドのボタンとハット (十字キー) の生の値を、変わるたびにログに出す。表にないゲームパッドのボタンの並びを調べるためのもの。ログを USB の割り込みの中で書くので、調べ終えたらoffに戻す。ゲームパッドをつないだときのログにも、VID:PID を出すようにした (例:gamepad attached (upad1, 0f0d:00c1, joystick 1, layout HORIPAD S))。
画面
- スプライトどうしの重なり順を直した。これまでは優先度 (スプライトのスクロールレジスタの第 4 ワードの下位 2 ビット) ごとに重ねていたので、優先度 3 で番号の大きいスプライトが、優先度 2 で番号の小さいスプライトの手前に出ていた。今は、優先度によらず番号の小さいスプライトを手前にし、優先度は BG の前に出すか後ろに出すかだけに使う。グラディウス II のサウンドモードの画面で、ボタンの枠がラベルの最後の字を隠していたのが直った。公開リポジトリの PR #2 で x68k-xvi さんが直してくれたものを取り込んだ。ありがとうございます。
- Raspberry Pi 4 / 5 のベアメタル版で、TS-6BGA (X68000 用のグラフィックボード) 互換のフレームバッファを 2 つめの HDMI に出せるようにした。
cmdline.txtにpix68k_ts6bga=1(VRAM を$EE0000に置く) かpix68k_ts6bga=2($EF0000) を足し、両方の HDMI にディスプレイをつないで起動する。X68000 では、GORRY 氏の TGA_005B に入っているTS6BGAG.Xを組み込んで使う (リリースの zip には入れていない)。HTTP のGET /ts6bga.ppmとGET /screen2.ppmで、TS-6BGA の VRAM と 2 つめの HDMI の画面を取れる。詳しくはdocs/ts6bga.md。
音
- MIDI の音源を鳴らしたとき、音の大きさをログに出す (
sound level: peak ... before MIDI, MIDI peak ... (of 32767), ... frame(s) clipped after the mix)。MIDI の音源を足す前の最大、MIDI の音源の最大、足して 16 ビットの範囲を超えたので上限と下限で止めたフレームの数を出す。MT-32 で音が割れるという報告を調べるためのもの (原因はまだ分かっていない)。
RetroArch のコア (開発中)
- RetroArch (libretro) のコア
pix68k_libretroをソースからビルドできるようにした。68000、メモリ 2MB (12MB も選べる)、16MHz (10MHz も選べる)、FPU ボードなし。XDF / DIM / D88 の FD (複数枚は.m3u) と SASI の HDF から起動する。ステートの保存と復元もできる。RetroPie 用のモジュール (retropie/) と、PS Vita 用のビルド (libretro/vita/) もある。コアはリリースの zip には入っていない。ビルドの手順は README の「RetroArch / libretro」にある。
Changes since v0.2.0 (English)
Japanese file names
- The disk image list in the settings menu now shows Japanese file names with glyphs from CGROM (the X68000 character font ROM). Without CGROM.DAT, full-width characters are shown as boxes and half-width katakana as
?. Names up to 95 bytes including the extension are listed (a full-width character is 3 bytes in UTF-8, so a name of only full-width characters can have up to 30 characters plus a 4-byte extension such as.XDF). Japanese names are listed after alphanumeric names. - The bare-metal build handles SD card file names as UTF-8; old 8.3 names without a long name are read as Shift_JIS. To use Japanese names in
pix68k.cfg(e.g.fd0=), writepix68k.cfgin UTF-8. - Files uploaded with Japanese names through HTTP
PUT /filesby the bare-metal build of v0.2.0 or earlier were written to the SD card with garbled names and look garbled in this version. Delete them and upload again. - The boot profile menu reads the title on the first line of
pix68k-<name>.cfgas UTF-8 or Shift_JIS: UTF-8 if the line is valid UTF-8 (or starts with a UTF-8 BOM), otherwise Shift_JIS. A title of only half-width katakana whose bytes happen to be valid UTF-8 (e.g.ツー= 0xC2 0xB0) is garbled; add a full-width character or write it in UTF-8.
Gamepads
- Pressing Start and Select together resets the X68000 (same as Reset in the settings menu). Holding them resets only once; both must be released before the next reset. On a Switch Pro Controller use + and -. In the host (SDL2) build, Start and Back.
- Home, or Up while holding Select, opens and closes the settings menu. In the menu, use the D-pad or sticks to move, A / X to select, B / Y to go back or close. Press Select before Up. In the host build, Guide, or Up while holding Back.
- Added support for the HORI HORIPAD S (VID:PID 0f0d:00c1). Gamepads whose button layout Circle (the library the bare-metal build uses for USB) does not know are remapped when their VID:PID is in pix68k's table. The table currently has only the HORIPAD S.
- On the bare-metal build, the reset and menu buttons work with gamepads whose layout Circle knows or that are in the table above.
pad_log=oninpix68k.cfglogs the raw button and hat values of gamepads whenever they change, to find the button order of gamepads not in the table. The log is written in the USB interrupt, so set it back tooffwhen done. The log line when a gamepad is connected now also shows its VID:PID (e.g.gamepad attached (upad1, 0f0d:00c1, joystick 1, layout HORIPAD S)).
Display
- Fixed the order of overlapping sprites. Sprites used to be layered by priority (the low 2 bits of the fourth word of the sprite scroll register), so a higher-numbered sprite with priority 3 appeared in front of a lower-numbered sprite with priority 2. Now the lower-numbered sprite is always in front, and priority only decides whether the sprite is in front of or behind the BG. This fixes the button frames hiding the last character of the labels on the Gradius II sound mode screen. The fix comes from PR #2 by x68k-xvi in the public repository. Thank you.
- On the Raspberry Pi 4 / 5 bare-metal build, a frame buffer compatible with the TS-6BGA (a graphics board for the X68000) can be shown on the second HDMI output. Add
pix68k_ts6bga=1(VRAM at$EE0000) orpix68k_ts6bga=2($EF0000) tocmdline.txtand boot with displays connected to both HDMI ports. On the X68000, loadTS6BGAG.Xfrom GORRY's TGA_005B (not included in the zip). HTTPGET /ts6bga.ppmandGET /screen2.ppmreturn the TS-6BGA VRAM and the second HDMI screen. Seedocs/ts6bga.md.
Sound
- When a MIDI synth plays, the log shows sound levels (
sound level: peak ... before MIDI, MIDI peak ... (of 32767), ... frame(s) clipped after the mix): the peak before adding the MIDI synth, the MIDI synth's peak, and the number of frames clipped at the 16-bit limits. This is for investigating reports of distorted MT-32 sound (the cause is not found yet).
RetroArch core (in development)
- A RetroArch (libretro) core,
pix68k_libretro, can be built from source: 68000, 2MB of memory (12MB selectable), 16MHz (10MHz selectable), no FPU board. It boots from XDF / DIM / D88 floppy images (several disks with.m3u) and SASI HDF images, and supports save states. There is also a RetroPie module (retropie/) and a PS Vita build (libretro/vita/). The core is not in the zip; see "RetroArch / libretro" in the README for build steps.
ソースの場所は zip の中の SOURCE.txt と、このタグのソースを参照。Circle は submodule (external/circle) なので、GitHub が自動で付けるソースの zip と tar.gz には入らない。Circle は https://github.com/rsta2/circle の、SOURCE.txt に書いたコミットを使う。添付のファイルの SHA-256 は SHA256SUMS にある。
See SOURCE.txt in the zip and the source at this tag. Circle is a submodule (external/circle), so it is not included in the source zip and tar.gz that GitHub generates; use the commit of https://github.com/rsta2/circle written in SOURCE.txt. SHA-256 checksums of the attached files are in SHA256SUMS.
pix68k v0.2.0
v0.1.0 からの変更
画面
- 画面の効果と拡大の設定を
video_filter=とvideo_scale=の 2 つにまとめた。pix68k.cfgか、設定メニューの Display のページ (Scale、Scanlines、Curve、Mask、Bezel) で選ぶ。ホスト版 (SDL2) にも同じ設定がある (枠は除く)。video_filter=は掛ける効果を,で区切って並べる (例:video_filter = scanline,curve,mask)。noneか空なら効果なし (既定)。scanline: スキャンライン (縦 2 倍以上に拡大したとき)curve: 画面をたる型にゆがめ、四隅を暗くするmask: アパーチャーグリルの縦じまを付け、横に少しにじませるcz-600de/cz-600db: 画面のまわりにブラウン管のモニタの枠の絵 (グレー / 黒) を出し、X68000 の画面を枠のガラスの部分 (1160x870、4:3) に写す。どちらか 1 つを選ぶ (例:video_filter = scanline,curve,cz-600db)。scanline、curve、maskはガラスの中の絵に掛かる。枠を使う間は、video_scale=の値 (offも) によらず、ガラスの部分いっぱいに写す。ベアメタル版だけで、フレームバッファが 1920x1080 で、X68000 の画面がガラスの部分に入るときに出る (ほかの解像度、768x1024 のようにガラスより大きい画面、絵のファイルがないときは、枠なしでvideo_scale=のとおりに出し、ログに理由を出す)。枠の絵 (pix68k/bezel-cz-600de.bin、pix68k/bezel-cz-600db.bin) は zip に入っている。絵はスクリプト (tools/bezel_cz600d.py) で描いたもので、メーカーのロゴや製品名の文字はない
video_scale=は X68000 の画面の拡大のしかた。off: 拡大しないinteger: 整数倍 (ベアメタル版の既定)aspect: 横を X68000 のモニタと同じ 4:3 にして、表示の高さいっぱいに拡大する (1920x1080 なら 1440x1080。ホスト版の既定)full: 表示全体に引き伸ばす
- 2 つは自由に組み合わせられる。ただし Raspberry Pi 3 では、
curveは選べない。fullとmaskの組み合わせも選べない (1 フレームの時間に収まらないため。pix68k.cfgに書いてあれば外して、ログに出す)。 - ホスト版の既定の出し方が変わった。これまではウィンドウに入る最大の 3:2 に引き伸ばしていたが、既定の
aspectではウィンドウに入る最大の 4:3 にする。ウィンドウいっぱいに出すならvideo_scale=fullにする。 - ベアメタル版は、v0.1.0 の
scale=とscanline=を、v0.1.0 と同じ見た目になるように読み替え、ログに警告を出す (scale=auto→video_scale=integer、scale=off→video_scale=off、scanline=on→video_filterにscanline)。設定メニューで保存すると、新しいvideo_scale=とvideo_filter=で書く。ホスト版は、v0.1.0 のホスト版と同じくscale=とscanline=を読まない (警告も、保存での書き直しもしない)。
- 画面の右上の数字 (
osd=) に、ネットワークの IP アドレスを出す。net=onでアドレスが決まっているときだけ出す。IP アドレスがいつも見えるように、ベアメタル版は余白が足りなければosd=onでも X68000 の画面に重ねる (これまで重ねるのはosd=fpsのときだけだった)。 - 左上のメッセージ (
POST /message、ホスト版の--message) を 1 行半角 10 桁で折り返す。4 行に入りきらなければ最後を「…」にする。
起動
- 起動の組み合わせ:
/pix68k/pix68k-<名前>.cfgを置くと、起動時に HDMI に一覧が出て、カーソルキーかゲームパッドで選べる。何も押さなければprofile_wait=秒 (既定 5) で前回のものを使う。ファイルの 1 行目を#で始めると、その残りを一覧に出す名前にする。 POST /reboot?profile=<名前>で、pix68k.cfgを書き換えずに、その組み合わせで再起動する。autotype=(組み合わせのファイルにも書ける) で、X68000 が動き出してautotype_wait=秒 (既定 10) たったらキーを打たせられる。
pix68kcli
- HTTP で操作するためのコマンド
pix68kcliを足した (tools/pix68kcli、Go)。curl で token のヘッダを毎回書く代わりに使う。状態、ログ (-fで追いかける)、画面の PNG での保存、再起動 (組み合わせを選べる)、キーの入力、メッセージ、SD カードのファイルの読み書きができる。宛先と token は設定ファイルに書く。使い方はtools/pix68kcli/README.mdにある。 - このリリースに 7 種類のバイナリを付けた。
| OS | ファイル |
|---|---|
| macOS (Apple シリコン / Intel) | pix68kcli-darwin-arm64 / pix68kcli-darwin-amd64 |
| Linux (arm64 / Raspberry Pi OS 32 ビット / x86-64) | pix68kcli-linux-arm64 / pix68kcli-linux-armv7 / pix68kcli-linux-amd64 |
| Windows (x86-64 / arm64) | pix68kcli-windows-amd64.exe / pix68kcli-windows-arm64.exe |
macOS と Linux (arm64、x86-64) では、Homebrew で brew install j3tm0t0/tap/pix68kcli として入れられる。この場合は、下の quarantine と実行の許可の手当ては要らない。
バイナリを直接落とした場合: 署名していないので、macOS では xattr -d com.apple.quarantine <ファイル> が要る。macOS と Linux では chmod +x <ファイル> も要る。
macOS では、どちらの入れ方でも、ターミナルのアプリに「ローカルネットワーク」の許可が要る (システム設定 > プライバシーとセキュリティ > ローカルネットワーク)。
060turbo と X68030
- 68060 の命令を実行するループを短くした。Pi 5 で 060turbo を 75MHz にした設定で、OutRun (X68000 への移植版 CBX68) のデモの重い場面で、エミュレータが 1 フレームの処理に使う時間が 2〜3% 減った。68060 のサイクル数の数え方と、命令の実行結果は変わらない。
- X68030 と 060turbo で、スプライトの読み書きの時間を I/O と同じ 1.6 マイクロ秒の区切りにそろえるのを、既定ではやめた。そろえると OutRun でスプライトが崩れていた。前の動きに戻すには
bus_sync_sprite=onを書く。
音
- エミュレータが実時間に間に合わない間は、音を途切れさせずに、最大 25% 遅く鳴らす。OPM、ADPCM などは遅くなった分だけ低く鳴る (25% で約 5 半音)。MIDI の音源 (MT-32、SF2、SC-55) は音の高さが変わらず、演奏が遅くなるだけなので、OPM と MIDI を一緒に鳴らす曲では、その間だけ音の高さがずれる。エミュレータの速さが実時間の 75% を下回ると、これまでどおり途切れる。
DMA
- DMAC のオートリクエストの最大速度の転送は、CCR に書いて転送を始めたときに、その場で最後まで転送するようにした。実機ではこの転送の間 CPU が止まるが、これまでは転送を後回しにしていたので、その間に CPU が次の転送のレジスタを書き換えると、別のデータが送られていた。これで、グラディウス II (FD 版) のタイトルのロゴと、プレイ中のスプライトのパターンが別のものになるのが直った。X68030 の内蔵 SCSI の DMA の転送も、始めたところで終わるようになる。
Changes since v0.1.0 (English)
Display
- Display effects and scaling are now two settings,
video_filter=andvideo_scale=, set inpix68k.cfgor on the Display page of the settings menu (Scale, Scanlines, Curve, Mask, Bezel). The host (SDL2) build has the same settings (except the bezel).video_filter=lists the effects to apply, separated by,(e.g.video_filter = scanline,curve,mask);noneor empty means no effect (default).scanline: scanlines (when scaled 2x or more vertically).curve: barrel distortion and darkened corners.mask: aperture grille stripes and slight horizontal blur.cz-600de/cz-600db: draw a CRT monitor bezel (gray / black) around the screen and show the X68000 screen in its glass area (1160x870, 4:3); pick one (e.g.video_filter = scanline,curve,cz-600db).scanline,curveandmaskapply to the picture inside the glass. While the bezel is used, the screen fills the glass area regardless ofvideo_scale=(includingoff). Bare-metal build only, with a 1920x1080 frame buffer and an X68000 screen that fits in the glass (otherwise, e.g. for other resolutions, screens larger than the glass such as 768x1024, or a missing image file, the screen is shown without the bezel asvideo_scale=says, and the log says why). The bezel images (pix68k/bezel-cz-600de.bin,pix68k/bezel-cz-600db.bin) are in the zip; they are drawn by a script (tools/bezel_cz600d.py) and contain no manufacturer logos or product names.video_scale=sets how the X68000 screen is scaled:off(no scaling),integer(integer multiples, default on bare metal),aspect(4:3 like the X68000 monitor, full display height; 1440x1080 on 1920x1080; default in the host build),full(stretch to the whole display).- The two can be combined freely, except that on Raspberry Pi 3
curve, andfulltogether withmask, are not available (they do not fit in the frame time; if set inpix68k.cfgthey are dropped with a log message). - The host build's default output changed: it used to stretch to the largest 3:2 area in the window; the default
aspectnow uses the largest 4:3 area. Usevideo_scale=fullto fill the window. - The bare-metal build still reads the v0.1.0 settings
scale=andscanline=and maps them to look the same as in v0.1.0, with a warning in the log (scale=auto→video_scale=integer,scale=off→video_scale=off,scanline=on→scanlineinvideo_filter). Saving from the settings menu writes the new two settings. The host build, like the v0.1.0 host build, does not readscale=andscanline=(no warning, and saving does not rewrite them).
- The on-screen numbers at the top right (
osd=) now include the network IP address whennet=onand an address is assigned. To keep the address visible, the bare-metal build now overlays them on the X68000 screen even withosd=onwhen there is not enough margin (previously only withosd=fps). - The top-left message (
POST /message,--messagein the host build) now wraps at 10 half-width columns per line, and ends with "…" when it does not fit in 4 lines.
Boot profiles
- Put
/pix68k/pix68k-<name>.cfgfiles on the SD card to get a boot menu on HDMI. Choose with the cursor keys or a gamepad; afterprofile_wait=seconds (default 5) without input, the previous choice is used. A first line starting with#gives the name shown in the menu. POST /reboot?profile=<name>reboots with that profile without changingpix68k.cfg.autotype=(also usable in a profile) types keysautotype_wait=seconds (default 10) after the X68000 starts.
pix68kcli
- New command-line tool
pix68kcli(tools/pix68kcli, Go) for the HTTP API, instead of writing the token header for curl every time. It shows the status, follows the log (-f), saves the screen as PNG, reboots (optionally with a profile), types keys, shows messages, and reads and writes files on the SD card. Targets and tokens go in a config file; seetools/pix68kcli/README.md. - Seven binaries are attached: macOS (arm64, amd64), Linux (arm64, armv7 for 32-bit Raspberry Pi OS, amd64) and Windows (amd64, arm64). On macOS and Linux (arm64, x86-64) you can install it with Homebrew:
brew install j3tm0t0/tap/pix68kcli(no quarantine or permission steps needed). If you download a binary directly: it is not signed, so on macOS runxattr -d com.apple.quarantine <file>, and on macOS and Linux runchmod +x <file>. On macOS, with either method, allow your terminal app under System Settings > Privacy & Security > Local Network.
060turbo and X68030
- Shorter 68060 instruction loop. On a Pi 5 with 060turbo set to 75MHz, the emulator's time per frame in heavy scenes of the OutRun demo (CBX68, an X68000 port) dropped by 2-3%. 68060 cycle counting and results are unchanged.
- On X68030 and 060turbo, sprite accesses are no longer aligned to the 1.6 µs I/O slots by default (this broke sprites in OutRun). Use
bus_sync_sprite=onfor the old behavior.
Sound
- While the emulator cannot keep up with real time, sound now plays up to 25% slower instead of dropping out. OPM, ADPCM and similar sources play lower by the same amount (about 5 semitones at 25%); MIDI synths (MT-32, SF2, SC-55) keep their pitch and only play slower, so songs that use OPM and MIDI together go out of tune during that time. Below 75% of real time it still drops out as before.
DMA
- DMAC auto-request transfers at maximum rate now complete within the write to CCR that starts them. On real hardware the CPU is stopped during such a transfer; previously the transfer was deferred, so if the CPU rewrote the registers for the next transfer in the meantime, the wrong data was sent. This fixes the title logo and the sprite patterns during play in Gradius II (floppy version). DMA transfers of the X68030 built-in SCSI also complete at the start write now.
ソースの場所は zip の中の SOURCE.txt と、このタグのソース...
pix68k v0.1.0
ソースの場所は zip の中の SOURCE.txt と、このタグのソースを参照。Circle は submodule (external/circle) なので、GitHub が自動で付けるソースの zip と tar.gz には入らない。Circle は https://github.com/rsta2/circle の、SOURCE.txt に書いたコミットを使う。