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