Skip to content

pix68k v0.2.3

Choose a tag to compare

@github-actions github-actions released this 23 Nov 06:31
· 4 commits to main since this release
Immutable release. Only release title and notes can be modified.

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=on in pix68k.cfg and 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 is off.
  • While the FUK is in use, the fd0= and fd1= 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, and del. The Pi 400 uses the same kernel as the Pi 4 but has not been tested.
  • tools/pico_fukemu contains 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 off in vol_opm, vol_adpcm, vol_mercury, vol_ymf288, vol_midi, vol_cd and vol_master in 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_adpcm and pix68k_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-32 etc., and CD while 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=hdmi0 in cmdline.txt to go back to HDMI0 (hdmi1 is also accepted; the default is auto). 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. ADDQ and SUBQ are now implemented in separate functions, but this has not been tested with Apple clang 15, so CMake now stops with Apple clang 15.0.x and asks for Xcode 16 or later (-DPIX68K_ALLOW_APPLE_CLANG_15=ON turns this into a warning).

Package

  • The Raspberry Pi 3 / 4 / 5 kernels (kernel8.img, kernel8-rpi4.img, kernel_2712.img) are now built with Arm GNU Toolchain 15.2.Rel1 (aarch64-none-elf-gcc) instead of Ubuntu's aarch64-linux-gnu-gcc (GCC 15.2.0). The Pi 2 kernel (kernel7.img) was already built with Arm GNU Toolchain 15.2.Rel1 (arm-none-eabi-gcc). This matches the compiler used for testing on real hardware and in CI.

Documentation

  • The README and other documents now list the Raspberry Pi 2 as a supported model.

ソースの場所は 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.