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. X68030 のグラフィック画面
4.7. NEWS エミュレーション
4.6. virt-m68k エミュレーション
4.8. 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.9. シリアルコンソールの端末エミュレーション
4.10. usermode ネットワーク
4.11. X68030 の Nereid エミュレーション
4.12. 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.8. Windrv
4.13. Windrv
4.9. ステータスパネル Status Panel
4.14. ステータスパネル Status Panel
-
-
- キー押下中(後述)あるいはキーボードブザー発声中
-
When any keys are pressed (see below), +
- LUNA でキー押下中(後述)あるいはキーボードブザー発声中 +
When any keys are pressed on LUNA (see below), or the keyboard buzzer is sounding.
- STOP instruction on m68k.
- pseudo STOP state on m88k. @@ -1781,7 +2025,7 @@ or the keyboard buzzer is sounding.
-4.10. DIPSW 設定ウィンドウ
+4.15. DIPSW 設定ウィンドウ
DIPSW 設定ウィンドウでの変更はアプリケーション起動中のみ有効です。 またここでの設定は即 VM に反映されますが、 LUNA の場合 DIPSW の状態を @@ -1792,7 +2036,7 @@ PIO(8255) がラッチするのが概ね-4.11. メモリダンプモニタ
Memory Dump Monitor
+4.16. メモリダンプモニタ
Memory Dump Monitor
メモリダンプモニタの出力形式を、バイト、ワード、ロングワード (m88k ではそれぞれバイト、ハーフワード、ワードと表現します) から選択できます。 @@ -1828,14 +2072,14 @@ The only last 8 bytes are not editable s- SRAM (X68030 Only) … 編集するとただちにファイルも更新します。
The backend file is also updated immediately when edited.
-- TVRAM とテキストパレット (X68030 Only)
Text VRAM and text palette
+- TVRAM、GVRAM とパレット (X68030 Only)
Text VRAM, Graphic VRAM and palette
-4.12. デバイスマップモニタ
Device Map Monitor
+4.17. デバイスマップモニタ
Device Map Monitor
m68k/m88k バスに接続されているデバイスを表示します。 32ビットアドレスのうち上位 8 ビット、256個分を表示しています。 1枠が 16MB になります。 @@ -1849,7 +2093,7 @@ NEWS のデバイスマップは内部-4.13. キー入力モード
Key input mode
+4.18. キー入力モード
Key input mode
LUNA も X68030 もキーボードは通常日本語キーボードです (LUNA には英語キーボードも存在するようですが…)。 そのため、ホストが日本語キーボードの場合とそうでない場合のために @@ -1935,7 +2179,7 @@ even though it should not work as a corr-4.14. キャラクタ入力モードのキーコード対応表
Keycode table in the character mode
+4.19. キャラクタ入力モードのキーコード対応表
Keycode table in the character mode
キャラクタ入力モードでの、ホストから入力した文字と VM に送信されるキーの対応は次の通りです。 ファンクションキーとカーソルキーは文字ではありませんが @@ -2050,7 +2294,7 @@ only be typed from the software keyboard-4.15. JP キーボードモードのキーコード対応表
Keycode table in the JP keyboard mode
+4.20. JP キーボードモードのキーコード対応表
Keycode table in the JP keyboard mode
JP キーボードモードでの、ホストキーと VM に送信されるキーの対応は次の通りです。 ここに記載のないキーはソフトウェアキーボードからのみ入力出来ます。The following table shows the correspondence between @@ -2120,7 +2364,7 @@ the software keyboard window.
-4.16. キーリピート
Key Repeat
+4.21. キーリピート
Key Repeat
LUNA では、キーボードがハードウェア側でキーリピートを行わず、 ソフトウェア(OS など)がキーリピートの処理を行います。 そのため、キーリピートを実装していない LUNA の PROM や @@ -2129,7 +2373,7 @@ NetBSD/luna68k のブートローダで キーリピートを起こす間隔をゲストのソフトウェアが測定しているということは、 VM が高速動作するとキーリピートもそれに合わせて発生することになり、 これをホスト側から防ぐ手段はありません。 -そこで nono ではキー入力が発生している間 +そこで nono ではLUNA でキー入力が発生している間 (キーが一つでも押されてからキーが全て離されるまでの間)、 高速モードが指示されていても VM を一時的に等速モードに落として実行します。 上記のアイコンがそれを区別しているのはこのためです。 @@ -2148,7 +2392,7 @@ if the VM is running faster than the rea the key repeat will occur faster, too. The host application doesn't have the way to avoid it. Therefore, nono will temporarily suppress the full speed mode -while any keys are pressed. +while any keys are pressed on LUNA. That is why the above-mentioned icon distinguishes them. If keys continue to be pressed for some reasons, the VM also continues to run syncronized mode. @@ -2189,16 +2433,11 @@ extract it and place it in the VM direct- 以下の内容の設定ファイル nono.cfg を VM ディレクトリ ~/nono/luna/ に作成します。 -ここでは説明を簡単にするためネットワークなしにしていますが、 -ネットワーク設定は必要に応じて行ってください。
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
- nono -c ~/nono/luna で起動します @@ -2224,7 +2463,7 @@ x⏎
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.5.0 Emulated ROM Monitor for LUNA-I ** NVRAM Initialized. @@ -2270,11 +2509,11 @@ and nono will terminate when the VM is p
5.2. OpenBSD/luna88k を実行してみる
Try OpenBSD/luna88k
-あおやまさんが OpenBSD/luna88k 7.6 の liveimage を用意されています。 +あおやまさんが OpenBSD/luna88k 7.7 の liveimage を用意されています。Aoyama-san has provided a liveimage of OpenBSD/luna88k 7.6.
ここではこれを起動してみます。Let's try it.
@@ -2285,10 +2524,10 @@ and nono will terminate when the VM is p and create subdirectories for individual VMs in it (for example ~/nono/luna88k/). -- 以下のリンクから liveimage-luna88k-raw-20241013.img.gz +
- 以下のリンクから liveimage-luna88k-raw-20250518.img.gz をダウンロードして展開し、 VM ディレクトリ ~/nono/luna88k/ に置きます。 -
Download liveimage-luna88k-raw-20241013.img.gz from the following link, +
Download liveimage-luna88k-raw-20250518.img.gz from the following link, extract it and place it in the VM directory, ~/nono/luna88k/.
以下の内容の設定ファイル 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 = none
- nono -c ~/nono/luna88k で起動します @@ -2327,7 +2561,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.5.0 Emulated ROM Monitor for LUNA-88K ** NVRAM Initialized. @@ -2355,9 +2589,9 @@ and nono will terminate when the VM is p
5.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,47 +2601,39 @@ 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 を実行します。 -これで VM ディレクトリに初期状態の SRAM.DAT が作られます。 -
Only the first time, run as nono -c ~/nono/x68k --create-sram. -This will create an initial SRAM.DAT in the VM directory.
- -- nono -c ~/nono/x68k で起動すると、 -HDD から NetBSD/x68k が起動します。 -次回以降はこれだけで直接 NetBSD が起動します。 -
Again, run as nono -c ~/nono/x68k. -NetBSD/x68k will be booted from HDD. -Next time, it will boot NetBSD automatically.
+- nono -c ~/nono/x68k で起動します +(VM ディレクトリに自動的に SRAM.DAT が作られます)。 +
Run as nono -c ~/nono/x68k +(SRAM.DAT will be created automatically in the VM directory). -
- 初回起動後数時間はめちゃくちゃ重たいですが、 +
- 初回の NetBSD/x68k 起動後数時間はめちゃくちゃ重たいですが、 これはバックグラウンドで makemandb が動くためで nono のせいではありません(>_<)。 -
At the first boot, you will feel it's too heavy for several hours. +
At the first NetBSD/x68k boot, +you will feel it's too heavy for several hours. This is because the infamous makemandb(8) runs heavily in the background for a looooong time. It's very sad to me that the accident which is far from the ideal @@ -2429,16 +2655,28 @@ and nono will terminate when the VM is p
@@ -2496,16 +2736,15 @@ After a while again, the familiar instal5.4. NetBSD/virt68k をインストールしてみる
Try installing NetBSD/virt68k
-ここでは NetBSD/virt68k をクリーンインストールする手順だけ紹介します。 +ここでは NetBSD/virt68k をインストールする手順を紹介します。Here I will introduce how to install NetBSD/virt68k.
-
+
- どこかに 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 を含む 11.0 は執筆時点ではまだリリースされていませんが、
+公式サイトにリリースブランチのデイリービルドがあります。
+以下のリンクから netbsd-GENERIC.gz (カーネル) と
+inst-ramdisk.fs (インストーライメージ) をダウンロードします。
+
+https://nycdn.netbsd.org/pub/NetBSD-daily/netbsd-11/latest/virt68k/binary/kernel/netbsd-GENERIC.gz
+
+https://nycdn.netbsd.org/pub/NetBSD-daily/netbsd-11/latest/virt68k/installation/ramdisks/inst-ramdisk.fs + - 空のディスクイメージを用意します。
1GB でもインストール自体は出来ますが、もう少し大きいほうが安心です。
Prepare an empty disk image file. @@ -2450,45 +2688,47 @@ 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
- 以下の内容の設定ファイル nono.cfg を VM ディレクトリ ~/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. :(
- - - 以下のコマンドラインで起動します。
-
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 \ - --initrd <path>/release/virt68k/installation/ramdisks/inst-ramdisk.fs +nono -c ~/nono/virt68k --initrd 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 +2850,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 +2824,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) - LUNA でキー押下中(後述)あるいはキーボードブザー発声中 +