|
|
1.1.1.2 root 1: <!--
2: nono
3: Copyright (C) 2020 nono project
4: Licensed under nono-license.txt
5: -->
1.1 root 6: <html><?php
7: $nono_ver = "";
8:
9: if ($_SERVER['argc'] > 1)
10: get_version($_SERVER['argv'][1]);
11:
12: function get_version($filename)
13: {
14: global $nono_ver;
15:
16: $fp = fopen($filename, "r");
17: if ($fp !== false) {
18: while (($buf = fgets($fp)) !== false) {
19: if (preg_match("/NONO_MAJOR_VER\s+\((\d+)\)/", $buf, $m)) {
20: $nono_major = $m[1];
21: }
22: if (preg_match("/NONO_MINOR_VER\s+\((\d+)\)/", $buf, $m)) {
23: $nono_minor = $m[1];
24: }
25: if (preg_match("/NONO_PATCH_VER\s+\((\d+)\)/", $buf, $m)) {
26: $nono_patch = $m[1];
27: }
28: if (preg_match("/NONO_DATE\s+\"([^\"]+)\"/", $buf, $m)) {
29: $nono_date = $m[1];
30: }
31: }
32: fclose($fp);
33:
34: $nono_ver = "${nono_major}.${nono_minor}.${nono_patch} (${nono_date})";
35: }
36: }
37: ?>
1.1.1.2 root 38: <?php require_once "common.php"; ?>
1.1 root 39: <body>
40: <h3>nono <?=$nono_ver?></h3>
41:
42: nono は NetBSD とかで動作する OMRON LUNA-I とかのエミュレータです。
1.1.1.4 root 43: <q>nono is OMRON LUNA-I emulator runs on NetBSD and etc.</q>
1.1.1.7 ! root 44: <p>
! 45: <div class="main">
! 46: <span style="margin-left: -1em; ">Index:</span><Br>
! 47: <a href="#build">ビルド方法 <q>How to build</q></a><br>
! 48: <a href="#commandline">コマンドラインオプション <q>Command Line Option</q></a><br>
! 49: <a href="#configuration">設定 <q>Configuration</q></a><br>
! 50: <a href="#aboutvm">VM について <q>About VM</q></a><br>
! 51: <a href="#tryit">実行してみる <q>Try it</q></a><br>
! 52: <a href="#network">ネットワーク設定 <q>Setup network</q></a><br>
! 53: <a href="#changes">変更履歴 <q>Changes</q></a><br>
! 54: <a href="#license">連絡先、ライセンス等 <q>Contact, License, etc</q></a><br>
! 55: </div>
1.1 root 56: <hr>
1.1.1.4 root 57:
58: <h4>はじめに <q>Introduction</q></h4>
59: <div class="main">
60: nono は NetBSD とかで動作する OMRON LUNA-I とかのエミュレータです。
1.1.1.6 root 61: LUNA88K は実験的サポートです。
1.1.1.4 root 62: <q>
63: nono is OMRON LUNA-I emulator runs on NetBSD and etc.
1.1.1.6 root 64: LUNA88K is still experimental support.
1.1.1.4 root 65: </q>
66: </div>
67:
1.1.1.7 ! root 68:
! 69: <a name="build"></a>
1.1 root 70: <h4>ビルド方法 <q>How to build</q></h4>
71: <div class="main">
1.1.1.5 root 72: ビルドには以下が必要です。
1.1.1.6 root 73: NetBSD(pkgsrc) なら wxWidgets は pkgsrc/x11/wxGTK30 です
1.1.1.7 ! root 74: (OPTIONS:gtk3 で動作確認しています)。
1.1.1.5 root 75: <q>The followings are required for build.
76: If you use NetBSD(pkgsrc),
1.1.1.7 ! root 77: wxWidgets is pkgsrc/x11/wxGTK30 (OPTIONS:gtk3 is tested).</q>
1.1.1.5 root 78:
1.1 root 79: <ul>
1.1.1.2 root 80: <li>make (BSD make, not GNU make)
1.1.1.4 root 81: <li>C/C++ compiler which supports -std=c++14.
82: <br>
83: (For gcc, 7.4 works but 5.5 doesn't work, at least.
84: For clang, 7.0 and 8.0 works at least.)
1.1.1.2 root 85: <li>wxWidgets >= 3.0
86: <li>gettext
1.1 root 87: </ul>
1.1.1.2 root 88:
1.1.1.5 root 89: <p>
90: (NetBSD 以外でのビルドはサポートしていませんが)
91: Ubuntu 18.04 ではたぶん以下のパッケージが必要です。
92: <q>You may need the following packages on Ubuntu 18.04
93: (though we won't support non-NetBSD platform).</q>
94: </p>
1.1.1.7 ! root 95: <ul>
! 96: <li>
1.1.1.5 root 97: bmake
98: build-essential
99: gettext
100: libbsd-dev
101: libedit-dev
102: libkqueue-dev
103: libwxgtk3.0-dev
104: zlib1g-dev
1.1.1.7 ! root 105: </ul>
1.1.1.5 root 106:
1.1.1.2 root 107: <p>
108: アーカイブを展開したら以下のようにビルドします。
109: configure には環境変数 CC、CXX でコンパイラを指定することが出来ます。
110: また wx-config が標準的な名前で提供されていないために見付けられない場合には
111: 環境変数 WX_CONFIG にパスを指定することが出来ます。
112: <q>Extract the archive and build as following.
113: You can specify C/C++ compiler using environment variable CC and CXX
114: if configure cannot find standard name suitable compiler.
115: Also, you can specify wx-config path using environment variable WX_CONFIG
116: if configure cannot find wx-config.</q>
1.1 root 117: <blockquote class="cons"><pre>
118: % ./configure
119: % make depend
120: % make
1.1.1.2 root 121: % su
122: # make install
1.1 root 123: </pre></blockquote>
1.1.1.2 root 124:
125: <p>
126: 2つの実行ファイルがインストールされます。
127: <tt>nono</tt> が GUI 版実行ファイル、
128: <tt>nono-cli</tt> がコマンドライン版です。
129: <q>Two executables will be installed.
1.1.1.7 ! root 130: <tt>nono</tt> is the GUI executable and <tt>nono-cli</tt> is
! 131: the command line executable.</q>
1.1 root 132:
133: </div>
134:
135:
1.1.1.7 ! root 136: <a name="commandline"></a>
1.1 root 137: <h4>コマンドラインオプション <q>Command Line Option</q></h4>
138: <div class="main">
139: <dl>
140: <?php
141: function item($name, $desc)
142: {
143: if (!is_array($name)) {
144: $name = array($name);
145: }
146: foreach ($name as $n) {
147: print "<dt class=dt-indent><tt>{$n}</tt></dt>\n";
148: }
149: print "<dd>{$desc}</p></dd>\n";
150: }
151: function option_item($name, $desc)
152: {
153: item($name, $desc);
154: }
155:
156: option_item("-A <i>file</i>", <<<_EOM_
157: ホストの <tt><i>file</i></tt> をロードして実行します。
1.1.1.4 root 158: <tt><i>file</i></tt> が相対パスの場合カレントディレクトリからのパスになります。
1.1 root 159: ファイルが gzip 圧縮されていれば自動的に展開します。
160: (展開後の) ファイル形式は a.out (OMAGIC) か ELF で、
161: 実際にはブートローダとカーネル程度しか想定していません。
1.1.1.2 root 162: 設定ファイルの <tt>prom-image</tt> とともに指定されると
1.1 root 163: <tt>-A</tt> のほうが優先します。
1.1.1.2 root 164: <q>Loads and executes host's <tt><i>file</i></tt>.
1.1.1.4 root 165: If <tt><i>file</i></tt> is relative path,
166: it is path from the current directory.
1.1.1.2 root 167: If the file is gzip'd, it is automatically extracted.
168: The supported file format (after extracting) is a.out (OMAGIC) or ELF.
169: Actually, it only assumes bootloaders or kernels.
170: If this option is specified at the same time as
171: <tt>prom-image</tt> in configuration file,
172: this option preceeds.
173: </q>
1.1 root 174: _EOM_
175: );
176:
1.1.1.6 root 177: option_item("-c <i>vmpath</i>", <<<_EOM_
178: VM ディレクトリ/設定ファイルを指定します。
179: <i>vmpath</i> がディレクトリならそのディレクトリの中の nono.cfg
180: を設定ファイルとします。
181: <i>vmpath</i> がファイルならそれを設定ファイルとします。
182: そしていずれの場合も
183: 設定ファイルがあるディレクトリを VM ディレクトリとします。
184: -c オプションを省略すると <i>vmpath</i> をカレントディレクトリとします。
185: <q>Specifies the VM directory/configuration file.
186: If <i>vmpath</i> is a directory,
187: make nono.cfg in that directory a configuration file.
188: Or if <i>vmpath</i> is a file,
189: make the specified file a configuration file.
190: And in both cases,
191: make the directory where that file is located a VM directory.
192: If <tt>-c</tt> option is omitted,
193: <i>vmpath</i> is considered as the current directory.
194: </q>
1.1 root 195: _EOM_
196: );
197:
198: option_item("-f", <<<_EOM_
199: 高速モードで起動します。
200: GUI なら起動後にもメニューから変更できますが、その初期値を変えるだけです。
1.1.1.2 root 201: <q>Boot as the fast mode.
202: You can change this mode on GUI menu after boot,
203: and the option only changes its initial state.
204: </q>
1.1 root 205: _EOM_
206: );
207:
208: option_item("--fontsize <i>height</i>", <<<_EOM_
209: GUI 版のみ。
210: 全サブウインドウの起動時のフォントサイズを指定します。
1.1.1.2 root 211: <tt><i>height</i></tt> には 12, 16
1.1 root 212: のいずれかを指定します。デフォルトは <tt>12</tt> です。
1.1.1.3 root 213: 起動後にメニューから変更できます。
1.1.1.2 root 214: <q>
215: GUI Only.
216: Specifies the initial fontsize on all sub windows.
217: <tt><i>height</i></tt> is one of 12 or 16.
1.1.1.3 root 218: The default value is <tt>12</tt>.
219: You can change this value on GUI menu after boot.
1.1.1.2 root 220: </q>
1.1 root 221: _EOM_
222: );
223:
224: option_item(array("-s <i>scale</i>",
225: "--scale <i>scale</i>"), <<<_EOM_
226: GUI 版のみ。
227: メインウィンドウの起動時のスケールを実数で指定します。
228: 起動後にもメニューからプリセットされた倍率には変更可能ですが、
229: 任意倍率は起動時のみ指定可能です
230: <span class=strike>(そのうちなんとかしたい)</span>。
231: デフォルトは 1.0 です。
1.1.1.2 root 232: <q>
233: GUI Only.
234: Specifies the initial main window scale in real number.
235: You can change this scale on GUI menu after boot,
236: but unlike this option, there are only a few preset choices
237: <span class=strike>(Should be improved in someday)</span>.
238: The default value is 1.0</q>
1.1 root 239: _EOM_
240: );
241:
242: option_item("--show-config", <<<_EOM_
243: 設定ファイルと <tt>-V</tt> オプションを読み込んだ結果を表示します。
1.1.1.2 root 244: <q>Shows the result of reading configuration file and
245: parsing <tt>-V</tt> options.</q>
1.1 root 246: _EOM_
247: );
248:
249: option_item("-v", <<<_EOM_
250: バージョンを表示します。
1.1.1.2 root 251: <q>Shows the version.</q>
1.1 root 252: _EOM_
253: );
254:
255: option_item("-V <i>name</i>=<i>value</i>", <<<_EOM_
1.1.1.3 root 256: 設定ファイルで指定した <tt><i>name</i>=<i>configvalue</i></tt> の代わりに
1.1.1.2 root 257: このオプションの <tt><i>name</i>=<i>value</i></tt> を適用します。
1.1.1.3 root 258: <q>Use this <i>name</i>=<i>value</i>
259: instead of <i>name</i>=<i>configvalue</i> specified in configuration file.
1.1.1.2 root 260: </q>
1.1 root 261: _EOM_
262: );
263: ?>
264: </dl>
265:
1.1.1.2 root 266: 以下開発用。<q>For developers:</q>
1.1 root 267: <dl>
268: <?php
269: // 項目間を空けない
270: function option_dev($name, $desc)
271: {
272: print "<dt class=dt-indent><tt>{$name}</tt></dt>\n";
273: print "<dd>{$desc}</dd>\n";
274: }
275:
1.1.1.3 root 276: option_dev("-b <i>hexaddr</i>[,<i>skipcount</i>]", <<<_EOM_
1.1 root 277: デバッガのブレークポイントを 16進数で指定します。
278: _EOM_
279: );
280:
281: option_dev("-C", <<<_EOM_
282: ログをコンソールにも出力します。
283: 通常はログウィンドウにだけ出力されます。
284: _EOM_
285: );
286:
287: option_dev("-d", <<<_EOM_
288: 起動時にデバッガプロンプトで停止します。
289: _EOM_
290: );
291:
292: option_dev("-D", <<<_EOM_
293: コンソールをデバッガとして使用します。
294: -d を指定しなくても起動時にプロンプトで停止します
295: <span class=strike>(そのうちなんとかしたい)</span>。
296: _EOM_
297: );
298:
299: option_dev("-L <i>name1</i>=<i>level1</i>[,<i>name2</i>=<i>level2</i>,...]",
300: <<<_EOM_
301: ログレベルを指定します。
302: カンマで区切って複数指定することも出来ます。
303: <tt>-Lhelp</tt> で name の一覧を表示します。
304: _EOM_
305: );
306:
307: option_dev("-M <i>name</i>[,<i>name2</i>,...]", <<<_EOM_
308: 起動時に表示するモニタウィンドウを指定します。
309: カンマで区切って複数指定することも出来ます。
1.1.1.3 root 310: <tt>-Mhelp</tt> で name の一覧を表示します。
1.1 root 311: _EOM_
312: );
313:
314:
315: ?>
316: </dl>
317: </div>
318:
1.1.1.7 ! root 319:
! 320: <a name="configuration"></a>
1.1 root 321: <h4>設定 <q>Configuration</q></h4>
322: <div class="main">
1.1.1.6 root 323: VM の設定ファイルはその VM ディレクトリ内の nono.cfg
324: (または -c で指定したファイル) です。
1.1 root 325: 書式は <tt>key = value</tt> 形式で1行1項目ずつです。
326: <tt>key</tt> と <tt>value</tt> の前後の空白は取り除かれます。
327: また空行と "<tt>#</tt>" で始まる行は無視します。
328: 知らないキーの行も無視します。
1.1.1.6 root 329: <q>VM configuration file is nono.cfg
330: (or the file specified by -c option) in the VM directory.
1.1.1.2 root 331: Its syntax is <tt>key = value</tt> format, one per line.
332: White spaces before and after <tt>key</tt> and <tt>value</tt> are ignored.
333: And, blank lines, lines beginning with "<tt>#</tt>", and
334: lines with unrecognized key are also ignored.
335: </q>
1.1 root 336: <p>
337: 設定項目は次の通りです。
1.1.1.2 root 338: <q>The configuration items are:</q>
1.1 root 339: <dl>
340: <?php
341: function config_item($name, $desc)
342: {
343: item($name, $desc);
344: }
345:
346: config_item("vmtype = <i>string</i>", <<<_EOM_
1.1.1.4 root 347: VM 種別を以下のいずれかから指定します。
348: 省略不可です。
349: <q>Specifies the VM type from the following.
350: This field is mandatory.
351: </q>
352: <table cellspacing=0 cellpadding=0>
353: <tr><td> <td><tt>luna</tt> <td>… LUNA-I
354: <tr><td><td><tt>luna88k</tt> <td>… LUNA88K (experimental)
355: </table>
1.1 root 356: _EOM_
357: );
358:
359: config_item("debugger-port = <i>integer</i>", <<<_EOM_
360: デバッガの TCP 待ち受けポート番号を指定します。
361: 0 なら待ち受けを行いません。
1.1.1.4 root 362: デフォルトは 0 です。
363: <q>Specifies the TCP port number that debugger listens.
364: If 0, it will not listen.
365: The default is 0.</q>
1.1 root 366: _EOM_
367: );
368:
369: config_item("ethernet-hostdriver = <i>string</i>", <<<_EOM_
370: イーサネットデバイスのホスト側ドライバを指定します。
371: <tt>none</tt>、<tt>tap</tt>、<tt>bpf</tt> が指定できます。
372: <tt>none</tt> ならホスト側とは一切通信を行いません。
373: <tt>tap</tt> か <tt>bpf</tt> かはホスト OS によってビルド時に決定します。
1.1.1.6 root 374: NetBSD、OpenBSD、FreeBSD、Linux なら <tt>tap</tt> です。
375: <q>Specifies the host driver of ethernet device.
376: <tt>none</tt>, <tt>tap</tt> and <tt>bpf</tt> can be specified.
377: If <tt>none</tt>, it doesn't make any communication with the host.
378: <tt>tap</tt> or <tt>bpf</tt> is determined at build time for the host OS.
379: If the host is NetBSD, OpenBSD, FreeBSD, or Linux, it's <tt>tap</tt>.</q>
380: _EOM_
381: );
382:
383: config_item("ethernet-hostdevice = <i>string</i>", <<<_EOM_
384: イーサネットデバイスのホスト側のデバイス名を指定します。
385: <tt>ethernet-hostdriver</tt> が <tt>tap</tt> の場合ここには
386: tap デバイスを(フルパスで)指定します。
387: <q>Specifies the host device name of ethernet device.
388: If <tt>ethernet-hostdriver</tt> is <tt>tap</tt>,
389: this field specifies the full path to the tap device.</q>
390: <p>
391: デフォルトは <tt>auto</tt> で、この場合の動作はホスト OS ごとに異なります。
392: Linux なら "<tt>/dev/net/tun</tt>" を指定したのと同じです。
393: OpenBSD なら <tt>/dev/tap0</tt> から <tt>/dev/tap9</tt> まで
394: 順番にオープンできるまで試します。
395: NetBSD (と FreeBSD) ならまず <tt>/dev/tap</tt> でクローニングを試み、
396: それが失敗すれば <tt>/dev/tap0</tt> から <tt>/dev/tap9</tt> までを
397: 順番にオープンできるまで試します。
398: <q>The default is <tt>auto</tt>.
399: The behavior in this case depends on the host OS.
400: On Linux, it's the same as <tt>/dev/net/tun</tt>.
401: On OpenBSD, it will try from <tt>/dev/tap0</tt> to <tt>/dev/tap9</tt>
402: until successful.
403: On NetBSD (and FreeBSD), it will try cloning by <tt>/dev/tap</tt> first.
404: If that fails, then try from <tt>/dev/tap0</tt> to <tt>/dev/tap9</tt>
405: until successful.
406: </q>
1.1 root 407: _EOM_
408: );
409:
410: config_item("ethernet-macaddr = <i>string</i>", <<<_EOM_
411: イーサネットデバイスの仮想マシン側の MAC アドレスを指定します。
412: <tt><i>XX</i>:<i>XX</i>:<i>XX</i>:<i>XX</i>:<i>XX</i>:<i>XX</i></tt>
413: 形式で指定します。
414: <tt>auto</tt> なら自動的に決定します。
415: デフォルトは <tt>auto</tt> です。
416: _EOM_
417: );
418:
419: config_item("luna-dipsw1 = <i>string</i>", <<<_EOM_
420: 本体前面 DIPSW#1-1..#1-8 の内容を指定します。
421: "<tt>0</tt>" を DOWN、"<tt>1</tt>" を UP として、
422: これを8つ並べた形式で、前から順に #1..#8 に対応します。
1.1.1.4 root 423: <q>Specifies status of the front panel DIPSW#1-1..#1-8 using 8 digit.
1.1.1.2 root 424: "<tt>0</tt>" means DOWN and "<tt>1</tt>" means UP.
425: The first character corresponds to #1 and
1.1.1.3 root 426: the eighth character corresponds to #8.</q>
427: <p>
428: LUNA-I でのデフォルトは <tt>11110111</tt> です。
429: 各スイッチの内容は以下のリンクを参照してください。
430: <q>On LUNA-I, the default value is <tt>11110111</tt>.
1.1.1.4 root 431: See the following link about DIPSW.</q><br>
1.1.1.3 root 432: → <a href="https://wiki.netbsd.org/ports/luna68k/luna68k_info/"
433: >NetBSD/luna68k: Information</a>
1.1 root 434: <br>
1.1.1.4 root 435: LUNA88K でのデフォルトは <tt>11111111</tt> です。
436: 各スイッチの内容は以下のリンクを参照してください。
437: <q>On LUNA88K, the default value is <tt>11111111</tt>.
438: See the following link about DIPSW.</q><br>
439: → <a href="http://man.openbsd.org/boot_luna88k.8"
440: >OpenBSD manual pages: boot_luna88k(8)</a>
1.1 root 441: _EOM_
442: );
443:
444: config_item("luna-dipsw2 = <i>string</i>", <<<_EOM_
445: 本体前面 DIPSW#2-1..#2-8 の内容を指定します。
446: 書式は <tt>luna-dipsw1</tt> と同じです。
447: デフォルトは <tt>11111111</tt> です。
1.1.1.2 root 448: <q>Specifies status of the front panel DIPSW#2-1..#2-8.
449: The same syntax as <tt>luna-dipsw1</tt> is used.
450: The default value is <tt>11111111</tt>.</q>
1.1.1.3 root 451: <p>
1.1.1.4 root 452: NetBSD/luna68k のブートローダは、
453: DIPSW#2 が "<tt>11111111</tt>" なら自動的にカーネルをロードして実行し、
454: どれかでも "<tt>0</tt>" にするとプロンプトで停止するようです。
1.1 root 455: <span class=strike>(本当は #8 だけで制御するつもりだったんじゃないかという気がします)</span>
1.1.1.4 root 456: <q>NetBSD/luna68k bootloader will automatically load and execute the kernel,
457: if the DIPSW#2 is "<tt>11111111</tt>".
1.1.1.2 root 458: Otherwise, the bootloader will enter interactive mode.
459: <span class=strike>(I doubt that they actually wanted to switch with only #8)
460: </span>
461: </q>
1.1 root 462: _EOM_
463: );
464:
1.1.1.3 root 465: config_item("monitor-rate = <i>integer</i>", <<<_EOM_
466: テキスト系モニタウィンドウの更新頻度を Hz 単位で指定します。
467: 1 から 60 までの間で指定でき、デフォルトは 20Hz です。
468: 起動後にメニューからプリセットされた頻度には変更可能です。
469: <q>Specifies refresh rate of all text monitor windows in Hz.
470: It ranges from 1 to 60. The default is 20Hz.
471: You can change this value on GUI menu after boot,
472: but unlike this configuration value, there are only a few preset choices.
473: </q>
474: _EOM_
475: );
476:
1.1 root 477: config_item("mpu-clock = <i>value</i>", <<<_EOM_
478: MPU のクロック数を MHz 単位で指定します。
1.1.1.5 root 479: デフォルトは LUNA-I なら 20MHz、LUNA88K なら 25MHz です。
480: <q>Specifies the MPU clock in MHz.
481: The default value is 20MHz on LUNA-I, or 25MHz on LUNA88K.</q>
1.1 root 482: _EOM_
483: );
484:
485: /* luna には不要
486: config_item("mpu-has-fpu", ""); */
487:
1.1.1.2 root 488: config_item("prom-image = <i>path</i>", <<<_EOM_
1.1.1.4 root 489: LUNA-I/LUNA88K の外部 ROM イメージファイルのパスを指定します。
1.1.1.2 root 490: <i>path</i> がファイル名のみなら VM ディレクトリとその親ディレクトリからこのファイル名を検索します。
491: <i>path</i> が相対パスなら VM ディレクトリからの相対パスになります (現在のディレクトリからではありません)。
492: 空にすると内蔵 ROM を使用します。
493: デフォルトは空です。
1.1.1.4 root 494: <q>Specifies the LUNA-I/LUNA88K's external ROM image file path.
1.1.1.2 root 495: If the <i>path</i> does not have any path delimiters,
496: the VM directory and then its parent directory will be searched.
497: If the <i>path</i> is a relative path,
498: it will be path from the VM directory, not from the current
499: directory.
500: If the <i>path</i> is empty, internal emulated ROM will be used.
501: The default value is empty.</q>
1.1 root 502: <p>
1.1.1.2 root 503: 実機を持っていない場合はこの値を空に (= デフォルトのままに) しておくと、
1.1.1.4 root 504: nono 内蔵のなんちゃって下位互換 ROM で起動します(現状 LUNA-I のみ)。
1.1.1.2 root 505: <q>If you does not have the real LUNA machines,
506: you can boot with nono's internal downward compatible emulated ROM
1.1.1.4 root 507: if you set this field empty (or leave it as the default).
508: For now, it's only for LUNA-I.
509: </q>
1.1 root 510: <p>
1.1.1.4 root 511: LUNA-I 実機を持っている場合は
512: ROM ファイルを指定することで実機 ROM で起動できます。
1.1.1.2 root 513: ROM ファイルは実機の 0x41000000-0x4101ffff (128KB) を保存したものです。
1.1.1.3 root 514: 今のところ ROM は V4.22 (Thu Jul 27 11:45:42 1989) のみサポートしています。
515: それ以外については何も分かりません。
1.1.1.4 root 516: <q>If you have the real LUNA-I machine,
1.1.1.2 root 517: you can boot with the real ROM spcifying the ROM file path.
1.1.1.4 root 518: The ROM file is extracted from 0x41000000-0x4101ffff (128KB) of
519: the real LUNA-I machine.
1.1.1.3 root 520: For now, only V4.22 (Thu Jul 27 11:45:42 1989) is supported.
521: I have no idea about other ROMs.
522: </q>
1.1.1.4 root 523: <p>
524: LUNA88K 実機の場合は 0x41000000-0x4103ffff (256KB) を保存したものです。
525: ただし現状サポートしていません。
526: <q>
527: For LUNA88K,
528: the ROM file is extracted from 0x41000000-0x4103ffff (256KB).
529: However, it's not supported yet.
530: </q>
1.1.1.2 root 531: _EOM_
532: );
533:
1.1.1.3 root 534: config_item("ram-size = <i>integer</i>", <<<_EOM_
1.1.1.2 root 535: 搭載する RAM サイズを MB 単位で指定します。
1.1.1.6 root 536: LUNA-I のデフォルトは 16MB です。
537: 16MB 未満は 4MB 単位で、
538: 16MB 以上は 255MB まで 1MB 単位で指定できます
539: (ちなみに NetBSD/luna68k の起動には最低でも 8MB 必要です)。
540: LUNA88K のデフォルトは 64MB です。
541: 64MB 未満は 16MB 単位で、
542: 64MB 以上は暫定で 255MB まで 1MB 単位で指定できます。
1.1.1.5 root 543: <q>Specifies the RAM size in MB.
1.1.1.6 root 544: On LUNA-I, the default is 16MB.
545: If the size is less than 16MB, you can specify in 4MB unit.
546: If larger, you can specify up to 255MB in 1MB unit.
547: By the way, NetBSD/luna68k needs at least 8MB to boot.
548: On LUNA88K, the default is 64MB.
549: If the size is less than 64MB, you can specify in 16MB unit.
550: If larger, you can specify up to tentative 255MB in 1MB unit.
551: </q>
1.1 root 552: _EOM_
553: );
554:
1.1.1.7 ! root 555: config_item("show-statuspanel = <i>integer</i>", <<<_EOM_
! 556: ステータスパネルを表示するかどうかを指定します。
! 557: 0 なら非表示、1 なら表示です。
! 558: 起動後はメニューから変更可能です。
! 559: <q>Specifies whether to display the status panel or not.
! 560: If 0, it is hidden; if 1, it is shown.
! 561: You can change it on GUI menu after boot.
! 562: </q>
! 563: _EOM_
! 564: );
! 565:
1.1 root 566: config_item("spc0-id<i>N</i>-image = <i>devtype</i>,<i>path</i>", <<<_EOM_
567: SCSI デバイスを指定します。<i>N</i> には 0 から 7 が入ります。
568: ID 7 は本体が使用しますので指定しないでください。
569: 値はデバイス種別 <i>devtype</i> とイメージパス <i>path</i>
570: を "<tt>,</tt>"(カンマ) で区切って並べた形式で、
571: 今の所デバイス種別 <i>devtype</i> には "<tt>hd</tt>"(ハードディスク) のみ指定可能です。
572: ディスクイメージパスが相対パスなら VM ディレクトリからの相対パスになります。
1.1.1.2 root 573: <q>
574: Specifies SCSI device. <i>N</i> is 0 to 7.
575: But don't specify ID 7 because the host uses it.
576: The value is in a form of device type <i>devtype</i> and
577: the image path <i>path</i> separated by "<tt>,</tt>"(comma).
578: For now, only "<tt>hd</tt>" (hard disk) can be specified for <i>devtype</i>.
579: If the <i>path</i> is relative path, it is from the VM directory.
580: </q>
581:
1.1 root 582: <p>
583: 例えば、nono.cfg と同じディレクトリに置いたディスクイメージ luna.img
584: を使う場合、
1.1.1.6 root 585: LUNA では通常 ID 6 をプライマリ HDD に割り当てるのでこんな感じになります。
1.1.1.2 root 586: <q>For example, if you use disk image luna.img placed in the same
587: directory as nono.cfg,
1.1.1.6 root 588: since LUNA usually assigns ID 6 to the primary HDD,
1.1.1.2 root 589: write as following:</q>
1.1 root 590: <blockquote><pre>
591: spc0-id6-image = hd,luna.img
592: </pre></blockquote>
593: _EOM_
594: );
595:
1.1.1.4 root 596: config_item("spc0-id<i>N</i>-seektime = <i>integer</i>", <<<_EOM_
597: 指定の SCSI HDD の平均シークタイムを msec 単位で指定します。
598: 現在のデフォルトは <tt>0</tt> です (S・S・D!! S・S・D!!)。
599: 16 程度を指定すると幾分往時に思いを馳せることが出来るかもしれませんが、
600: 今の所あまり安定していません。
601: <q>Specifies the average seek time of specified SCSI HDD in msec.
602: Currently, the default value is <tt>0</tt>
603: (This may be something like SSD :-).
604: If you specify about 16 or so, you can feel nostalgic,
605: but this feature is still unstable.
606: </q>
607: _EOM_
608: );
609:
1.1 root 610: config_item("spc0-id<i>N</i>-writeprotect = <i>integer</i>", <<<_EOM_
611: 指定の SCSI デバイスへの書き込みを無視するかどうか指定します。
612: <tt>0</tt> なら通常動作(書き込みを行う)です。
613: <tt>1</tt> なら書き込みコマンドは成功したように振る舞いますが実際には
614: ディスクイメージに一切書き戻しません。
615: fsck を気にせずカーネルのデバッグとかを行いたい場合にはどうぞ。
616: 何が起きるか意味が分からない人は指定しないでください。
617: デフォルトは <tt>0</tt> です。
1.1.1.2 root 618: <q>Specifies whether nono ignores writing to SCSI devices.
619: <tt>0</tt> means normal operation (writes to the devices).
1.1.1.6 root 620: If <tt>1</tt> is specified,
1.1.1.2 root 621: nono will not actually write back to the disk image
622: even though the write command is succeeded.
623: nono's SCSI devices acts as
624: write command is successfully done but it never writes back
625: to the actual disk image.
626: This is useful for kernel debugging because it does not require fsck
627: after the kernel hangs.
628: But don't use this flag if you don't understand this paragraph.
629: The default value is <tt>0</tt>.
630: </q>
1.1 root 631: _EOM_
632: );
633:
634:
635: ?>
636: </dl>
637: </div>
638:
639:
1.1.1.7 ! root 640: <a name="aboutvm"></a>
! 641: <h4>VM について <q>About VM</q></h4>
! 642: <h5>ステータスパネル <q>Status Panel</q></h5>
! 643: <div class="main">
! 644: ステータスパネル中央にあるパフォーマンスメータのアイコンは
! 645: 高速モードの状態を表示しています。
! 646: ダブルクリックすると高速/等速モードの指定を切り替えることができます。
! 647: <q>The performance meter's icon at the center of the status panel
! 648: shows the VM speed status.
! 649: You can switch full speed / syncronized mode by double-clicking on this icon.
! 650: </q>
! 651: <table>
! 652: <tr><td valign=top>
! 653: <image src="image/sp-ffmark0.png" style="padding:0.5ex; background-color:white">
! 654: <td valign=top>…
! 655: <td valign=top>
! 656: マークなしの場合、ユーザが等速モードを指定していて、等速モードで実行中です。
! 657: <q>When no icons are displayed,
! 658: the user has specified syncronized mode and
! 659: the VM is running in synchronized mode.</q>
! 660: <tr><td valign=top>
! 661: <image src="image/sp-ffmark1.png" style="padding:0.5ex; background-color:white">
! 662: <td valign=top>…
! 663: <td valign=top>
! 664: 三角2つの場合、ユーザが高速モードを指定していて、等速モードで実行中です。
! 665: キー入力中(後述)または VM がアイドル状態(m68k の STOP 命令)などで起きます。
! 666: <q>When an icon (two triangles) is displayed,
! 667: the user has specified full speed mode and
! 668: the VM is running in synchronized mode.
! 669: This will happen during keystrokes or when the VM is idle
! 670: (STOP instruction on m68k).
! 671: </q>
! 672: <tr><td valign=top>
! 673: <image src="image/sp-ffmark2.png" style="padding:0.5ex; background-color:white">
! 674: <td valign=top>…
! 675: <td valign=top>
! 676: 三角3つの場合、ユーザが高速モードを指定していて、高速モードで実行中です。
! 677: <q>When an icon (three triangles) is displayed,
! 678: the user has specified full speed mode and
! 679: the VM is running in full speed mode.
! 680: </table>
! 681: </div>
! 682:
! 683: <h5>キー入力 <q>Key input</q></h5>
! 684: <div class="main">
! 685: LUNA では、キーボードがハードウェア側でキーリピートを行わず、
! 686: ソフトウェア(OS など)がキーリピートの処理を行います。
! 687: そのため、キーリピートを実装していない LUNA の PROM や
! 688: NetBSD/luna68k のブートローダではキーリピートは起きず、
! 689: キーリピートを実装している NetBSD/luna68k カーネルではキーリピートが起こせます。
! 690: ソフトウェアでキーリピートを起こす間隔を測定しているということは、
! 691: VM が高速動作するとキーリピートもそれに合わせて発生することになり、
! 692: これをホスト側から防ぐ手段はありません。
! 693: そこで nono ではキー入力が発生している間
! 694: (キーが一つでも押されてからキーが全て離されるまでの間)、
! 695: 高速モードが指示されていても VM を一時的に等速モードに落として実行します。
! 696: 上記のアイコンがそれを区別しているのはこのためです。
! 697: そのため、何らかの理由でキーが入りっぱなしになった場合
! 698: (ALT + TAB やアクセラレータキーでメニューを開くと起きがちです)
! 699: 高速モードが抑制されたままということが起きえます。
! 700: その場合はソフトウェアキーボードからキー入力を解除するなどしてください。
! 701: <q>
! 702: On LUNA,
! 703: key repeat is done by software(OS), not by the keyboard hardware.
! 704: For this reason,
! 705: key repeat doesn't occur on LUNA's PROM or NetBSD/luna68k's bootloader
! 706: that don't implement it, and
! 707: key repeat occurs on NetBSD/luna68k kernel that implements it.
! 708: Since the timing of key repeat is measured by software,
! 709: if the VM is running faster than the real,
! 710: the key repeat will occur faster, too.
! 711: The host application doesn't have the way to avoid it.
! 712: Therefore, nono will temporarily suppress the full speed mode
! 713: while any keys are pressed.
! 714: That is why the above-mentioned icon distinguishes them.
! 715: For this reason,
! 716: if keys continue to be pressed for some reason,
! 717: the VM also continues to run syncronized mode.
! 718: In this case, you can resolve it by using the software keyboard window.
! 719: </q>
! 720: </div>
! 721:
! 722:
! 723: <a name="tryit"></a>
1.1 root 724: <h4>実行してみる <q>Try it</q></h4>
725: <div class="main">
1.1.1.2 root 726: つついさんが NetBSD/luna68k 9.0 の liveimage を用意してくださっています
727: (いつもありがとうございます)。
728: <q>Tsutsui-san has provided NetBSD/luna68k 9.0 liveimage for this
729: (Thanks as always).</q>
730: <br>
731: <ol>
732: <li>どこかに nono 用のディレクトリを用意し(例えば ~/nono/)、
1.1 root 733: その中に VM ディレクトリを用意します (例えば ~/nono/luna/)。
1.1.1.3 root 734: <q>Create a directory somewhere for nono (for example ~/nono/),
1.1.1.7 ! root 735: and create subdirectories for individual VMs in it (for example ~/nono/luna/).</q>
1.1 root 736:
1.1.1.3 root 737: <li>以下のリンクからイメージファイルをダウンロードして展開し、
1.1.1.2 root 738: VM ディレクトリ ~/nono/luna/ に置きます。
1.1.1.3 root 739: <q>Download imagefile from the following link,
1.1.1.7 ! root 740: extract it and place it in the VM directory, ~/nono/luna/.</q>
1.1.1.3 root 741: <blockquote>
742: <a href="http://teokurebsd.org/netbsd/liveimage/20200518-luna68k/"
743: >http://teokurebsd.org/netbsd/liveimage/20200518-luna68k/</a>
744: </blockquote>
1.1.1.2 root 745:
746: <li>同じく VM ディレクトリに設定ファイル nono.cfg を以下の内容で用意します。
1.1.1.7 ! root 747: <q>Create a configuration file nono.cfg in the VM directory, ~/nono/luna/,
1.1.1.2 root 748: with following contents:</q>
749: <blockquote class="file"><pre>
750: vmtype = luna
751: spc0-id6-image = hd,liveimage-luna68k-raw-20200518.img
752: </pre></blockquote>
753: <li><tt>nono -c ~/nono/luna</tt> で起動します
754: (VM ディレクトリに自動的に NVRAM.DAT が作られます)。
755: <q>Run as <tt>nono -c ~/nono/luna</tt>.
1.1.1.4 root 756: (NVRAM.DAT will be created automatically in the VM directory)</q>
1.1.1.2 root 757: <li>Emulated ROM Monitor が起動するので、
758: 初回は以下のように入力すると NetBSD が起動します。
759: <q>The emulated ROM Monitor will be executed.
760: Then, only for the first time,
761: entering the following can boot NetBSD.</q>
762: <blockquote class="file"><pre>
763: k
764: [Enter]
765: [Enter]
766: d
767: boot
768: g
769: x
770: </pre></blockquote>
771: この内容は NVRAM.DAT に記録されているので次回以降は直接 NetBSD が起動します。
1.1.1.7 ! root 772: <q>The information you have just entered is recorded in the NVRAM,
1.1.1.2 root 773: so next time it boots NetBSD automatically.</q>
774: </ol>
775: <p>
776: <a href="https://twitter.com/tsutsuii/status/1262429647364427783"
777: >元ツイートはこちら<q>Original tweet</q></a>。
1.1 root 778: </div>
779:
780:
1.1.1.7 ! root 781: <a name="network"></a>
1.1 root 782: <h4>ネットワーク設定 <q>Setup network</q></h4>
783: <div class=main>
1.1.1.2 root 784: 設定ファイル nono.cfg に以下の行を追加します。
785: <q>Add the following line to configuration file, nono.cfg.</q>
1.1 root 786: <blockquote class="file"><pre>
787: ethernet-hostdriver = tap
788: </pre></blockquote>
1.1.1.2 root 789: 次に VM ディレクトリかその親ディレクトリに nono-ifup、nono-ifdown
790: というスクリプトを用意します。
1.1 root 791: nono は tap(4) をオープンし、
792: そのデバイス名を引数にこれらのスクリプトを呼びます。
1.1.1.2 root 793: <q>Then, prepare two scripts named nono-ifup and nono-ifdown
794: in the VM directory or its parent directory.
795: nono will open tap(4) and
796: invoke these scripts with the name of the device as an argument.</q>
1.1 root 797: <p>
1.1.1.5 root 798: 例えば、NetBSD ホストで、ホストの wm0 セグメントに nono のゲスト OS を接続する場合、
799: <q>For example, if you want to connect guest OS to host's wm0 segment
800: on NetBSD,</q>
801: <ol>
802: <li>デフォルトでは /dev/tap は一般ユーザからアクセスできないので、
803: chmod で適当にパーミッションを与えます。
804: 番号の付いていないほうの /dev/tap だけでいいです。
805: <q>By default, /dev/tap is only accessible to privileged user.
806: You need to chmod /dev/tap (without unit number) appropriately.</q>
807: sysinst 等で OS をアップグレードするとパーミッションが 600
808: に戻るのがハマりポイントです。
809:
810: <li>bridge(4) インタフェースを作成し、
811: ホストの外側のインタフェースをブリッジに追加しておきます。
812: <q>Create a bridge(4) interface, and
813: add your physical interface to the bridge.</q>
1.1 root 814: <blockquote class="cons"><pre>
1.1.1.5 root 815: # ifconfig bridge0 create
1.1 root 816: # brconfig bridge0 add wm0
817: </pre></blockquote>
1.1.1.5 root 818: 常用するなら設定ファイルに書いておきましょう。
819: <q>If you want to use this all the time,
820: you can put configuration file into /etc.</q>
821: <blockquote>
822: /etc/ifconfig.bridge0
823: <pre class=file>
824: create
825: up
826: !/sbin/brconfig $int add wm0
827: </pre>
828: <pre class=cons>
829: # /etc/rc.d/network restart
830: </pre>
831: </blockquote>
832:
833: <li>
834: 一般ユーザに戻って、
835: VM ディレクトリかその親ディレクトリに
836: 次のような 2つのスクリプトを用意します。
837: sudo の設定は別途行ってください。
838: <q>Return to non-privileged user, and
839: create following two scripts in the VM directory or its parent directory.
840: In addition, you need to set up sudo separately.</q>
1.1 root 841: <blockquote>
842: nono-ifup
843: <pre class=file>
844: #!/bin/sh
1.1.1.5 root 845: sudo /sbin/ifconfig $1 up
846: sudo /sbin/brconfig bridge0 add $1
1.1 root 847: </pre></blockquote>
848:
849: <blockquote>
1.1.1.5 root 850: nono-ifdown
1.1 root 851: <pre class=file>
852: #!/bin/sh
1.1.1.5 root 853: sudo /sbin/brconfig bridge0 delete $1
854: sudo /sbin/ifconfig $1 down
855: </pre></blockquote>
856:
857: <blockquote class="cons"><pre>
858: % chmod +x nono-ifup nono-ifdown
1.1 root 859: </pre></blockquote>
860:
1.1.1.5 root 861: <li>nono を起動し、
862: メニューの「モニタ > ホスト > ホストネットワーク」を開いて
863: NetDriver が None 以外 (この場合 BSD tap) になっていれば動いてるはずです。
864: <q>Run nono,
865: and open "Monitor > Host > Host Network" window from menu.
866: It's OK if you can see "NetDriver: BSD tap" (in this case).</q>
867:
868: </ol>
869:
1.1 root 870: </div>
871:
872:
1.1.1.7 ! root 873: <a name="changes"></a>
1.1.1.2 root 874: <h4>変更履歴 <q>Changes</q></h4>
875: <div class="main">
876: See <a href="changes.html">changes.html</a>.
877: </div>
878:
879:
1.1.1.7 ! root 880: <a name="license"></a>
1.1.1.2 root 881: <h4>ライセンス <q>License</q></h4>
882: <div class="main">
883: See <a href="nono-license.txt">nono-license.txt</a>.
884: </div>
885:
886:
1.1.1.4 root 887: <h4>連絡先 <q>Contact us</q></h4>
888: <div class="main">
889: バグ報告などは以下にお願いします。日本語でおk。
890: <q>If you find any problems, please let me know.
891: You may write in English.</q><br>
892: <a href="https://github.com/isaki68k/nono-issue/issues"
893: >https://github.com/isaki68k/nono-issue/issues</a>
894: </div>
895:
896:
1.1.1.2 root 897: <h4>パッチの提供について <q>About contributes</q></h4>
898: <div class="main">
899: パッチを提供してくださる場合は以下に同意したものとします。
900: <q>If you provide a patch to nono, you must agree to the following conditions:
901: </q>
902: <ul>
903: <li>成果物が nono のライセンスに従って運用あるいは配布されること。
904: <q>All your work are operated or distributed under the nono license.</q>
905: <li>ライセンスが将来変わる可能性があること。
906: <q>The license may be changed in the future.</q>
907: <li>著作部分に関して著作者人格権を行使しないこと。
908: <q>Do not exercise your author's rights.</q>
909: </ul>
910: <ul>
911: </div>
912:
913:
914: <h4>Acknowledgements</h4>
915: <div class="main">
916: nono は以下の広告条項を含むソースコードを利用しています。
917: <q>nono uses source code with the following advertising clause.</q>
918: <blockquote>
919: This product includes software developed by Gordon Ross<br>
920: This product includes software developed by the University of California, Lawrence Berkeley Laboratory.<br>
921: </blockquote>
922: </div>
923:
1.1 root 924:
925: <hr>
1.1.1.2 root 926: nono project
1.1 root 927: </body>
928: </html>
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.