4.3. MPU (68040)
+ +命令の実行サイクルについてはある程度似せているつもりですが、 +そもそも 68040 はパイプライン方式なので 68000 時代のようにサイクル数を +正確にエミュレーションすることはおそらく不可能です。 +
+68040 は X68030 と virt-m68k でのみ選択可能です。 +NEWS に 68040 搭載モデルはなさそうなのと、 +LUNA では 68040 搭載モデルは LUNA-I ではなく LUNA-II になるからです。 +
4.4. LUNA の ROM エミュレーション
4.4. X68030 の ROM (ROM30) エミュレーション
4.5. X68030 の ROM (ROM30) エミュレーション
4.5. NEWS エミュレーション
4.6. NEWS エミュレーション
4.6. virt-m68k エミュレーション
4.7. virt-m68k エミュレーション
Supports QEMU "virt" virtual hardware's compatible machine and it can run NetBSD/virt68k. You need to specify the kernel by -X option (or exec-file in configuration). If you want to install, you also need to specify the ramdisk image by ---initrd option (or exec-initrd in configuration). -And also, you may need to configure serial console -by hostcom-driver in configuration.+--initrd option (or exec-initrd in configuration).
4.7. X68030 の Nereid エミュレーション
4.8. シリアルコンソールの端末エミュレーション
4.9. X68030 の Nereid エミュレーション
4.8. Windrv
4.10. usermode ネットワーク
4.11. NetBSD/x68k での時間同期Time Synchronization on NetBSD/x68k
+ゲストの NetBSD/x68k を起動し、 +/etc/sysctl.conf に以下の1行を追加します。 ++clock-sync = real +
+さらに /etc/rc.conf に ++kern.timecounter.hardware=clockinterrupt +
+などと設定します (NTP サーバはお好みで)。 +sysctl の設定によって、ゲスト OS の時計は「この設定が有効になった時点から」 +実時間間隔を刻めますが、 +電源オンからここまでにずれた分が解決できるわけではありませんので、 +必然的に時計を合わせる必要もあるためです。 +これで再起動すると次回からはフルスピードでも実時間を刻めます。 +(再起動せずに有効にしたい場合はこの設定の後 root ユーザで ++ntpdate=YES +ntpdate_hosts=ntp.nict.jp +
+を実行してください) + ++/etc/rc.d/sysctl start +/etc/rc.d/ntpdate start +
4.12. Windrv
4.9. ステータスパネル Status Panel
4.13. ステータスパネル Status Panel
4.10. DIPSW 設定ウィンドウ
4.14. DIPSW 設定ウィンドウ
4.11. メモリダンプモニタ Memory Dump Monitor
4.15. メモリダンプモニタ Memory Dump Monitor
4.12. デバイスマップモニタ Device Map Monitor
4.16. デバイスマップモニタ Device Map Monitor
4.13. キー入力モード Key input mode
4.17. キー入力モード Key input mode
4.14. キャラクタ入力モードのキーコード対応表 Keycode table in the character mode
4.18. キャラクタ入力モードのキーコード対応表 Keycode table in the character mode
4.15. JP キーボードモードのキーコード対応表 Keycode table in the JP keyboard mode
4.19. JP キーボードモードのキーコード対応表 Keycode table in the JP keyboard mode
The following table shows the correspondence between @@ -2120,7 +2298,7 @@ the software keyboard window.
4.16. キーリピート Key Repeat
4.20. キーリピート Key Repeat
Create a configuration file nono.cfg in the VM directory, ~/nono/luna/, -with following contents. -By the way, to simplify the explanation, we assume there is no network here. -However, please configure the network if necessary.+with following contents.
vmtype = luna spc0-id6-image = hd,liveimage-luna68k-with-packages-20210910.img -hostnet-driver = none
You will see a screen like this. The bold text indicates the characters you need to enter.
-NONO 1.0.0 Emulated ROM Monitor for LUNA-I +NONO 1.3.0 Emulated ROM Monitor for LUNA-I ** NVRAM Initialized. @@ -2297,16 +2470,11 @@ extract it and place it in the VM direct以下の内容の設定ファイル nono.cfg を VM ディレクトリ ~/nono/luna88k/ に作成します。 -ここでは説明を簡単にするためネットワークなしにしていますが、 -ネットワーク設定は必要に応じて行ってください。 Create a configuration file nono.cfg in the VM directory, ~/nono/luna88k/, -with following contents. -By the way, to simplify the explanation, we assume there is no network here. -However, please configure the network if necessary.+with following contents.vmtype = luna88k spc0-id6-image = hd,liveimage-luna88k-raw-20241013.img -hostnet-driver = nonenono -c ~/nono/luna88k で起動します @@ -2327,7 +2495,7 @@ b⏎ You will see a screen like this. The bold text indicates the characters you need to enter.-NONO 1.0.0 Emulated ROM Monitor for LUNA-88K +NONO 1.3.0 Emulated ROM Monitor for LUNA-88K ** NVRAM Initialized. @@ -2355,9 +2523,9 @@ and nono will terminate when the VM is p5.3. NetBSD/x68k を実行してみる
Try NetBSD/x68k-つついさんが NetBSD/x68k 10.0_BETA の liveimage を用意されています。 +つついさんが NetBSD/x68k 10.1 の liveimage を用意されています。 ここではこれを起動してみます。 -Tsutsui-san has provided a liveimage of NetBSD/x68k 10.0_BETA. +and create subdirectories for individual VMs in it (for example ~/nono/x68k/). -Tsutsui-san has provided a liveimage of NetBSD/x68k 10.1. Let's try it.
@@ -2367,29 +2535,27 @@ Let's try it.
以下のリンクから -plain-install か with-packages のお好みのほうをダウンロードして展開し、 -VM ディレクトリ ~/nono/x68k/ に置きます。 - Download your favorite one of plain-install or with-packages -from the following link, -extract it and place it in the VM directory, ~/nono/x68k/.+以下のサイトから +「パッケージインストール設定済み版」か +「インストーラでインストールしたところまでの未設定版」の +お好みのほうをダウンロードします。 +迷ったら「パッケージインストール設定済み版」がよいでしょう。 +ダウンロードできたら展開して、VM ディレクトリ ~/nono/x68k/ に置きます。 + Download your favorite one of with-packages or plain-install +from the following site. +Extract it and place it in the VM directory, ~/nono/x68k/.-http://teokurebsd.org/netbsd/liveimage/20230111-x68k/ +http://www.ceres.dti.ne.jp/tsutsui/netbsd/liveimage/x68k.html以下の内容の設定ファイル nono.cfg を VM ディレクトリ ~/nono/x68k/ に作成します。 -ここでは説明を簡単にするためネットワークなしにしていますが、 -ネットワーク設定は必要に応じて行ってください。 Create a configuration file nono.cfg in the VM directory, ~/nono/x68k/, -with following contents. -By the way, to simplify the explanation, we assume there is no network here. -However, please configure the network if necessary.+with following contents.vmtype = x68030 -spc0-id0-image = hd,liveimage-x68k-with-packages-20230111.hds -hostnet0-driver = none +spc0-id0-image = hd,liveimage-x68k-with-packages-20250106.hds初回のみ nono -c ~/nono/x68k --create-sram を実行します。 @@ -2430,15 +2596,30 @@ and nono will terminate when the VM is p @@ -2496,16 +2680,15 @@ After a while again, the familiar instal5.4. NetBSD/virt68k をインストールしてみる
Try installing NetBSD/virt68kここでは NetBSD/virt68k をクリーンインストールする手順だけ紹介します。 -Here I will introduce how to install NetBSD/virt68k.+Here I will introduce how to install NetBSD/virt68k cleanly.
+
- どこかに nono 用のディレクトリを用意し(例えば ~/nono/)、 その中に VM ディレクトリを用意します (例えば ~/nono/virt68k/)。
Create a directory somewhere for nono (for example ~/nono/), and create subdirectories for individual VMs in it (for example ~/nono/virt68k/).+- NetBSD/virt68k のインストールセットはまだ用意されてないようなので、 +NetBSD のソースコードから build.sh でビルドします。 +
There doesn't seem to be the official NetBSD/virt68k set available yet. +You have to build it manually from the source code using build.sh. :(+ +- インストーラを起動するカーネルとその後運用するカーネルは同じものなので +VM ディレクトリ内に持ってきておくとよいです。 +
The kernel used for installation and the kernel used for operation +are the same. +So it would be good idea to bring it into the VM directory at this point.+++cp <path>/release/virt68k/binary/kernel/netbsd-GENERIC.gz ~/nono/virt68k/ +- 空のディスクイメージを用意します。 1GB でもインストール自体は出来ますが、もう少し大きいほうが安心です。
Prepare an empty disk image file. @@ -2450,45 +2631,48 @@ dd if=/dev/zero of=virt68k.img bs=1m cou- 以下の内容の設定ファイル nono.cfg を VM ディレクトリ ~/nono/virt68k に作成します。 -ネットワークは別途設定してください。
Create a configuration file nono.cfg in the VM directory, ~/nono/virt68k/, -with following contents. -You may also need network configuration.+with following contents.-vmtype = virt-m68k +exec-file = netbsd-GENERIC.gz +exec-bootparam = root=ld0 virtio-block0-image = virt68k.img -hostcom-driver = stdio -hostnet-driver = auto +fast-mode = 1- NetBSD/virt68k のインストールセットはまだ用意されてないようなので、 -NetBSD のソースコードから build.sh でビルドします。 -
There doesn't seem to be the official NetBSD/virt68k set available yet. -You have to build it manually from the source code. :(- -- 以下のコマンドラインで起動します。 -
Run as the following:+- インストーラ RAM ディスクを指定してインストーラを起動します。 +設定ファイルでルートデバイスを ld0 に指定していますが、 +RAM ディスク指定のほうが優先されるようです。 +
Run the installer by specifying installer RAM disk. +By the way, configuration file specifies root device as ld0, +but RAM disk specified by the command line will take precedence.--nono -c ~/nono/virt68k -f \ - -X <path>/release/virt68k/binary/kernel/netbsd-GENERIC.gz \ +nono -c ~/nono/virt68k \ --initrd <path>/release/virt68k/installation/ramdisks/inst-ramdisk.fs- しばらくすると root パーティションなどを聞かれるので Enter を 4回押します。 -またしばらくすると見慣れたインストーラが起動してきます。 -
After a while, you will be asked about the root partition, etc., -so hit Enter key four times. -After a while again, the familiar installer will start.+- しばらくすると見慣れたインストーラが起動してきます。 +インストールが終わったらトップメニューから e:Utility menu > +g:Halt the system +を選択してください。ゲストの電源がオフになり nono も終了します。 +
After a while, the familiar installer will start. +Once the installation has finished, +choose e:Utility menu > g:Halt the system. +Then the guest will shut down, and nono also will terminate.+ +- インストールしたディスクから起動するには、 +--initrd オプションを外して実行します。 +カーネルは引き続きホストファイルシステム上にあるもの +(ここでは ~/nono/virt68k/netbsd-GENERIC.gz) を使います。 +
To boot from the installed disk, +run without --initrd option. +It still uses the kernel on the host filesystem, +just like the installer does.+-[ 1.0000030] root device (default md0a): ⏎ -[ 1.0200030] dump device (default md0b): ⏎ -[ 1.0300030] file system (default ffs): ⏎ -[ 1.0400030] root on md0a dumps on md0b -[ 1.0600030] kern.module.path=/stand/virt68k/10.99.10/modules -[ 1.1200030] init path (default /sbin/init): ⏎ -[ 1.1400030] init: trying /sbin/init - : +nono -c ~/nono/virt68k-6. ホストネットワーク設定例
Example of host network setup-wm0 を持つ NetBSD ホストに tap(4) デバイスを用いて -nono のゲスト OS を接続する場合の設定例です。 +6. ホストネットワーク設定例
+Example of host network setup++ @@ -2610,11 +2794,13 @@ wxWidgets (3.0/3.2) のバグと思わ This may be due to wxWidgets (3.0/3.2) bug. (2021/12/30, Updated 2024/07/03) -6.1. tap
+NetBSD の tap(4) デバイスを用いて、 +ホストの wm0 と nono のゲスト OS を接続する場合の設定例です。
- -設定ファイル nono.cfg に以下の行を追加します -(と言いつつ NetBSD では書かなくてもデフォルトでこの動作になりますが) -
Add the following line to configuration file, nono.cfg. -(Although you don't need to write it since these are default behavior -on NetBSD)+設定ファイル nono.cfg に以下の行を追加します。 +Add the following line to configuration file, nono.cfg.hostnet-driver = tap hostnet-tap-devpath = auto @@ -2585,6 +2768,7 @@ It's OK if you can see "HostNet Driver:nono ではありませんが、wxWidgets 3.2 (wxGTK3) は -NetBSD/sparc でウィンドウ内がほぼ描画されないようです。 -wxWidgets 3.0 (wxGTK2) であれば動作します。 - On wxWidgets 3.2 (wxGTK3), it seems that the inside of the window -is hardly drawn at NetBSD/sparc. wxWidgets 3.0 (wxGTK2) can.+nono ではありませんが、wxWidgets 3.2 (with GTK3) は +NetBSD/sparc (などマイナーアーキテクチャ?) +でウィンドウ内がほぼ描画されないようです。 +wxWidgets 3.0 (with GTK2) であれば動作します。 + On wxWidgets 3.2 (with GTK3), it seems that the inside of the window +is hardly drawn at NetBSD/sparc (and such minor architectures?). +wxWidgets 3.0 (with GTK2) can.(2024/07/03)