Annotation of nono/doc/index.php, revision 1.1.1.8

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: 
1.1.1.8 ! root       42: nono は NetBSD とかで動作する OMRON LUNA-I や LUNA88K とかのエミュレータです。
        !            43: <q>nono is OMRON LUNA-I and LUNA88K emulator runs on NetBSD and etc.</q>
        !            44: 
        !            45: <hr>
        !            46: 
        !            47: <h4>Index of this page:</h4>
1.1.1.7   root       48: <div class="main">
1.1.1.8 ! root       49: <a href="#migrate">ver 0.1.x から ver 0.2.0 への移行方法 <q>How to migrate from ver 0.1.x to ver 0.2.0</q></a><br>
1.1.1.7   root       50: <a href="#build">ビルド方法 <q>How to build</q></a><br>
                     51: <a href="#commandline">コマンドラインオプション <q>Command Line Option</q></a><br>
                     52: <a href="#configuration">設定 <q>Configuration</q></a><br>
                     53: <a href="#aboutvm">VM について <q>About VM</q></a><br>
                     54: <a href="#tryit">実行してみる <q>Try it</q></a><br>
1.1.1.8 ! root       55: <a href="#network">ネットワーク設定例 <q>Example of network setup</q></a><br>
1.1.1.7   root       56: <a href="#changes">変更履歴 <q>Changes</q></a><br>
                     57: <a href="#license">連絡先、ライセンス等 <q>Contact, License, etc</q></a><br>
                     58: </div>
1.1.1.4   root       59: 
1.1.1.8 ! root       60: <a name="migrate"></a>
        !            61: <h4>ver 0.1.x から ver 0.2.0 への移行方法 <q>How to migrate from ver 0.1.x to ver 0.2.0</q></h4>
1.1.1.4   root       62: <div class="main">
1.1.1.8 ! root       63: ver 0.1.x と ver 0.2.0 には2つの非互換があり、そのままでは以前と同じ動作はしません。
        !            64: <q>There are two incompatibilities between ver 0.1.x and ver 0.2.0,
        !            65: so it will not work the same as before.</q>
1.1.1.4   root       66: 
1.1.1.8 ! root       67: <dl>
        !            68: <dt>1. 設定ファイルのネットワーク関連項目の変更
        !            69: <q>Configuration changes about network</q>
        !            70: <dd>ver 0.1.x の以下の2つの設定項目は廃止になりました。
        !            71: <q>These two items in 0.1.x have been removed.</q>
        !            72: <br>
        !            73: <blockquote style="background-color: var(--light-pink);"><pre>
        !            74: ethernet-hostdriver     = (default: none)
        !            75: ethernet-hostdevice     = (default: auto)
        !            76: </pre></blockquote>
        !            77: 代わりに次の5つが追加されています。
        !            78: 設定方法は<a href="#configuration">このドキュメントの設定の章</a>を参照してください。
        !            79: ホストドライバは以前はデフォルトでオフでしたがデフォルトでオン(auto)に変更になっています。
        !            80: <q>Instead, the following five items have been added.
        !            81: See <a href="#configuration">Configuration section in this document</a>
        !            82: to setup.
        !            83: The host driver used to be disabled by default before,
        !            84: but now it is enabled(auto) by default.</q>
        !            85: <blockquote style="background-color: white;"><pre>
        !            86: hostnet-driver          = (default: auto)
        !            87: hostnet-afpacket-ifname = (default: auto)
        !            88: hostnet-bpf-ifname      = (defualt: auto)
        !            89: hostnet-tap-devpath     = (default: auto)
        !            90: hostnet-fallback        = (default: 0)
        !            91: </pre></blockquote>
        !            92: </dd>
        !            93: 
        !            94: <dt>2. LUNA88K の NVRAM サポートについて <q>About NVRAM in LUNA88K</q>
        !            95: <dd>
        !            96: LUNA88K では本来 PROM が NVRAM の情報を元に起動先を決定しますが、
        !            97: nono ver 0.1.x は NVRAM を (ファイルを作るだけで) 一切サポートしておらず、
        !            98: OpenBSD/luna88k を起動するために起動先ファイル名を boot と決め打ちしていました。
        !            99: ver 0.2.0 で NVRAM をサポートしたため、
        !           100: 内蔵互換 ROM で起動するとまず NVRAM がチェックサム不正のため初期化されます。
        !           101: 更に初期化された NVRAM の起動ファイル名は vmunix であるため、
        !           102: そのままでは OpenBSD/luna88k を起動できません。
        !           103: Emulated ROM Monitor が起動したら以下のように入力してください。
        !           104: <q>On LUNA88K, originally PROM determines the boot target by referring NVRAM.
        !           105: Since nono ver 0.1.x didn't support NVRAM (though it created NVRAM.DAT file),
        !           106: it used hard-coded boot filename "boot" in order to boot OpenBSD/luna88k.
        !           107: nono ver 0.2.0 supports NVRAM, so at first it initializes the NVRAM
        !           108: due to checksum mismatch.
        !           109: In addition, the boot filename in the initialized NVRAM is "vmunix",
        !           110: so it cannot boot OpenBSD/luna88k.
        !           111: To boot it, enter as following on Emulated ROM Monitor.</q>
        !           112: <blockquote><pre>
        !           113: nvram boot_filename boot[Enter]
        !           114: y
        !           115: b[Enter]
        !           116: </pre></blockquote>
        !           117: この内容は NVRAM.DAT に記録されるので次回以降は直接 OpenBSD が起動します。
        !           118: <q>The information you have just entered is recorded in the NVRAM,
        !           119: so next time it boots OpenBSD automatically.</q>
        !           120: </div>
1.1.1.7   root      121: 
                    122: <a name="build"></a>
1.1       root      123: <h4>ビルド方法 <q>How to build</q></h4>
                    124: <div class="main">
1.1.1.5   root      125: ビルドには以下が必要です。
1.1.1.6   root      126: NetBSD(pkgsrc) なら wxWidgets は pkgsrc/x11/wxGTK30 です
1.1.1.7   root      127: (OPTIONS:gtk3 で動作確認しています)。
1.1.1.5   root      128: <q>The followings are required for build.
                    129: If you use NetBSD(pkgsrc),
1.1.1.7   root      130: wxWidgets is pkgsrc/x11/wxGTK30 (OPTIONS:gtk3 is tested).</q>
1.1.1.5   root      131: 
1.1       root      132: <ul>
1.1.1.2   root      133: <li>make (BSD make, not GNU make)
1.1.1.4   root      134: <li>C/C++ compiler which supports -std=c++14.
                    135: <br>
                    136: (For gcc, 7.4 works but 5.5 doesn't work, at least.
                    137: For clang, 7.0 and 8.0 works at least.)
1.1.1.2   root      138: <li>wxWidgets &gt;= 3.0
                    139: <li>gettext
1.1       root      140: </ul>
1.1.1.2   root      141: 
1.1.1.5   root      142: <p>
                    143: (NetBSD 以外でのビルドはサポートしていませんが)
                    144: Ubuntu 18.04 ではたぶん以下のパッケージが必要です。
                    145: <q>You may need the following packages on Ubuntu 18.04
                    146: (though we won't support non-NetBSD platform).</q>
                    147: </p>
1.1.1.7   root      148: <ul>
                    149: <li>
1.1.1.5   root      150: bmake
                    151: build-essential
                    152: gettext
                    153: libbsd-dev
                    154: libedit-dev
                    155: libkqueue-dev
                    156: libwxgtk3.0-dev
                    157: zlib1g-dev
1.1.1.7   root      158: </ul>
1.1.1.5   root      159: 
1.1.1.2   root      160: <p>
1.1.1.8 ! root      161: nono のソースアーカイブを展開したら以下のようにビルドします。
1.1.1.2   root      162: configure には環境変数 CC、CXX でコンパイラを指定することが出来ます。
                    163: また wx-config が標準的な名前で提供されていないために見付けられない場合には
                    164: 環境変数 WX_CONFIG にパスを指定することが出来ます。
1.1.1.8 ! root      165: <q>Extract the nono's source archive and build as following.
1.1.1.2   root      166: You can specify C/C++ compiler using environment variable CC and CXX
                    167: if configure cannot find standard name suitable compiler.
                    168: Also, you can specify wx-config path using environment variable WX_CONFIG
                    169: if configure cannot find wx-config.</q>
1.1       root      170: <blockquote class="cons"><pre>
                    171: % ./configure
                    172: % make depend
                    173: % make
1.1.1.2   root      174: % su
                    175: # make install
1.1       root      176: </pre></blockquote>
1.1.1.2   root      177: 
                    178: <p>
                    179: 2つの実行ファイルがインストールされます。
                    180: <tt>nono</tt> が GUI 版実行ファイル、
                    181: <tt>nono-cli</tt> がコマンドライン版です。
                    182: <q>Two executables will be installed.
1.1.1.7   root      183: <tt>nono</tt> is the GUI executable and <tt>nono-cli</tt> is
                    184: the command line executable.</q>
1.1       root      185: 
                    186: </div>
                    187: 
                    188: 
1.1.1.7   root      189: <a name="commandline"></a>
1.1       root      190: <h4>コマンドラインオプション <q>Command Line Option</q></h4>
                    191: <div class="main">
                    192: <dl>
                    193: <?php
                    194: function item($name, $desc)
                    195: {
                    196:        if (!is_array($name)) {
                    197:                $name = array($name);
                    198:        }
                    199:        foreach ($name as $n) {
                    200:                print "<dt class=dt-indent><tt>{$n}</tt></dt>\n";
                    201:        }
                    202:        print "<dd>{$desc}</p></dd>\n";
                    203: }
                    204: function option_item($name, $desc)
                    205: {
                    206:        item($name, $desc);
                    207: }
                    208: 
                    209: option_item("-A <i>file</i>", <<<_EOM_
                    210: ホストの <tt><i>file</i></tt> をロードして実行します。
1.1.1.4   root      211: <tt><i>file</i></tt> が相対パスの場合カレントディレクトリからのパスになります。
1.1       root      212: ファイルが gzip 圧縮されていれば自動的に展開します。
                    213: (展開後の) ファイル形式は a.out (OMAGIC) か ELF で、
                    214: 実際にはブートローダとカーネル程度しか想定していません。
1.1.1.2   root      215: 設定ファイルの <tt>prom-image</tt> とともに指定されると
1.1       root      216: <tt>-A</tt> のほうが優先します。
1.1.1.2   root      217: <q>Loads and executes host's <tt><i>file</i></tt>.
1.1.1.4   root      218: If <tt><i>file</i></tt> is relative path,
                    219: it is path from the current directory.
1.1.1.2   root      220: If the file is gzip'd, it is automatically extracted.
                    221: The supported file format (after extracting) is a.out (OMAGIC) or ELF.
                    222: Actually, it only assumes bootloaders or kernels.
                    223: If this option is specified at the same time as
                    224: <tt>prom-image</tt> in configuration file,
                    225: this option preceeds.
                    226: </q>
1.1       root      227: _EOM_
                    228: );
                    229: 
1.1.1.6   root      230: option_item("-c <i>vmpath</i>", <<<_EOM_
                    231: VM ディレクトリ/設定ファイルを指定します。
                    232: <i>vmpath</i> がディレクトリならそのディレクトリの中の nono.cfg
                    233: を設定ファイルとします。
                    234: <i>vmpath</i> がファイルならそれを設定ファイルとします。
                    235: そしていずれの場合も
                    236: 設定ファイルがあるディレクトリを VM ディレクトリとします。
                    237: -c オプションを省略すると <i>vmpath</i> をカレントディレクトリとします。
                    238: <q>Specifies the VM directory/configuration file.
                    239: If <i>vmpath</i> is a directory,
                    240: make nono.cfg in that directory a configuration file.
                    241: Or if <i>vmpath</i> is a file,
                    242: make the specified file a configuration file.
                    243: And in both cases,
                    244: make the directory where that file is located a VM directory.
                    245: If <tt>-c</tt> option is omitted,
                    246: <i>vmpath</i> is considered as the current directory.
                    247: </q>
1.1       root      248: _EOM_
                    249: );
                    250: 
                    251: option_item("-f", <<<_EOM_
                    252: 高速モードで起動します。
                    253: GUI なら起動後にもメニューから変更できますが、その初期値を変えるだけです。
1.1.1.2   root      254: <q>Boot as the fast mode.
                    255: You can change this mode on GUI menu after boot,
                    256: and the option only changes its initial state.
                    257: </q>
1.1       root      258: _EOM_
                    259: );
                    260: 
                    261: option_item("--fontsize <i>height</i>", <<<_EOM_
                    262: GUI 版のみ。
                    263: 全サブウインドウの起動時のフォントサイズを指定します。
1.1.1.2   root      264: <tt><i>height</i></tt> には 12, 16
1.1       root      265: のいずれかを指定します。デフォルトは <tt>12</tt> です。
1.1.1.3   root      266: 起動後にメニューから変更できます。
1.1.1.2   root      267: <q>
                    268: GUI Only.
                    269: Specifies the initial fontsize on all sub windows.
                    270: <tt><i>height</i></tt> is one of 12 or 16.
1.1.1.3   root      271: The default value is <tt>12</tt>.
                    272: You can change this value on GUI menu after boot.
1.1.1.2   root      273: </q>
1.1       root      274: _EOM_
                    275: );
                    276: 
                    277: option_item(array("-s <i>scale</i>",
                    278:        "--scale <i>scale</i>"), <<<_EOM_
                    279: GUI 版のみ。
                    280: メインウィンドウの起動時のスケールを実数で指定します。
                    281: 起動後にもメニューからプリセットされた倍率には変更可能ですが、
                    282: 任意倍率は起動時のみ指定可能です
                    283: <span class=strike>(そのうちなんとかしたい)</span>。
                    284: デフォルトは 1.0 です。
1.1.1.2   root      285: <q>
                    286: GUI Only.
                    287: Specifies the initial main window scale in real number.
                    288: You can change this scale on GUI menu after boot,
                    289: but unlike this option, there are only a few preset choices
                    290: <span class=strike>(Should be improved in someday)</span>.
                    291: The default value is 1.0</q>
1.1       root      292: _EOM_
                    293: );
                    294: 
                    295: option_item("--show-config", <<<_EOM_
                    296: 設定ファイルと <tt>-V</tt> オプションを読み込んだ結果を表示します。
1.1.1.2   root      297: <q>Shows the result of reading configuration file and
                    298: parsing <tt>-V</tt> options.</q>
1.1       root      299: _EOM_
                    300: );
                    301: 
                    302: option_item("-v", <<<_EOM_
                    303: バージョンを表示します。
1.1.1.2   root      304: <q>Shows the version.</q>
1.1       root      305: _EOM_
                    306: );
                    307: 
                    308: option_item("-V <i>name</i>=<i>value</i>", <<<_EOM_
1.1.1.3   root      309: 設定ファイルで指定した <tt><i>name</i>=<i>configvalue</i></tt> の代わりに
1.1.1.2   root      310: このオプションの <tt><i>name</i>=<i>value</i></tt> を適用します。
1.1.1.3   root      311: <q>Use this <i>name</i>=<i>value</i>
                    312: instead of <i>name</i>=<i>configvalue</i> specified in configuration file.
1.1.1.2   root      313: </q>
1.1       root      314: _EOM_
                    315: );
                    316: ?>
                    317: </dl>
                    318: 
1.1.1.2   root      319: 以下開発用。<q>For developers:</q>
1.1       root      320: <dl>
                    321: <?php
                    322: // 項目間を空けない
                    323: function option_dev($name, $desc)
                    324: {
                    325:        print "<dt class=dt-indent><tt>{$name}</tt></dt>\n";
                    326:        print "<dd>{$desc}</dd>\n";
                    327: }
                    328: 
1.1.1.3   root      329: option_dev("-b <i>hexaddr</i>[,<i>skipcount</i>]", <<<_EOM_
1.1       root      330: デバッガのブレークポイントを 16進数で指定します。
                    331: _EOM_
                    332: );
                    333: 
                    334: option_dev("-C", <<<_EOM_
                    335: ログをコンソールにも出力します。
                    336: 通常はログウィンドウにだけ出力されます。
                    337: _EOM_
                    338: );
                    339: 
                    340: option_dev("-d", <<<_EOM_
                    341: 起動時にデバッガプロンプトで停止します。
                    342: _EOM_
                    343: );
                    344: 
                    345: option_dev("-D", <<<_EOM_
                    346: コンソールをデバッガとして使用します。
                    347: -d を指定しなくても起動時にプロンプトで停止します
                    348: <span class=strike>(そのうちなんとかしたい)</span>。
                    349: _EOM_
                    350: );
                    351: 
                    352: option_dev("-L <i>name1</i>=<i>level1</i>[,<i>name2</i>=<i>level2</i>,...]",
                    353: <<<_EOM_
                    354: ログレベルを指定します。
                    355: カンマで区切って複数指定することも出来ます。
                    356: <tt>-Lhelp</tt> で name の一覧を表示します。
                    357: _EOM_
                    358: );
                    359: 
                    360: option_dev("-M <i>name</i>[,<i>name2</i>,...]", <<<_EOM_
                    361: 起動時に表示するモニタウィンドウを指定します。
                    362: カンマで区切って複数指定することも出来ます。
1.1.1.3   root      363: <tt>-Mhelp</tt> で name の一覧を表示します。
1.1       root      364: _EOM_
                    365: );
                    366: 
                    367: 
                    368: ?>
                    369: </dl>
                    370: </div>
                    371: 
1.1.1.7   root      372: 
                    373: <a name="configuration"></a>
1.1       root      374: <h4>設定 <q>Configuration</q></h4>
                    375: <div class="main">
1.1.1.6   root      376: VM の設定ファイルはその VM ディレクトリ内の nono.cfg
                    377: (または -c で指定したファイル) です。
1.1       root      378: 書式は <tt>key = value</tt> 形式で1行1項目ずつです。
                    379: <tt>key</tt> と <tt>value</tt> の前後の空白は取り除かれます。
                    380: また空行と "<tt>#</tt>" で始まる行は無視します。
                    381: 知らないキーの行も無視します。
1.1.1.6   root      382: <q>VM configuration file is nono.cfg
                    383: (or the file specified by -c option) in the VM directory.
1.1.1.2   root      384: Its syntax is <tt>key = value</tt> format, one per line.
                    385: White spaces before and after <tt>key</tt> and <tt>value</tt> are ignored.
                    386: And, blank lines, lines beginning with "<tt>#</tt>", and
                    387: lines with unrecognized key are also ignored.
                    388: </q>
1.1       root      389: <p>
                    390: 設定項目は次の通りです。
1.1.1.2   root      391: <q>The configuration items are:</q>
1.1       root      392: <dl>
                    393: <?php
                    394: function config_item($name, $desc)
                    395: {
                    396:        item($name, $desc);
                    397: }
                    398: 
                    399: config_item("vmtype = <i>string</i>", <<<_EOM_
1.1.1.4   root      400: VM 種別を以下のいずれかから指定します。
                    401: 省略不可です。
                    402: <q>Specifies the VM type from the following.
                    403: This field is mandatory.
                    404: </q>
                    405: <table cellspacing=0 cellpadding=0>
                    406: <tr><td>&nbsp;<td><tt>luna</tt>        <td>… LUNA-I
1.1.1.8 ! root      407: <tr><td><td><tt>luna88k</tt>   <td>… LUNA88K
1.1.1.4   root      408: </table>
1.1       root      409: _EOM_
                    410: );
                    411: 
1.1.1.8 ! root      412: config_item("clock-sync = <i>value</i>", <<<_EOM_
        !           413: 仮想マシン内の時刻の同期方法を指定します。
        !           414: <tt>real</tt> なら実時間に同期、<tt>virtual</tt> なら仮想時間に同期します。
        !           415: デフォルトは <tt>real</tt> です。
        !           416: この機能は実験中のため将来予告なく仕様が変更になる可能性があります。
        !           417: <q>Specify how to synchronize the time in virtual machine.
        !           418: If <tt>real</tt>, synchronize with the real time;
        !           419: if <tt>virtual</tt>, synchronize with the virtual time.
        !           420: The default is <tt>real</tt>.
        !           421: This feature is under experimentation and may be changed in the future
        !           422: without notice.
        !           423: </q>
        !           424: _EOM_
        !           425: );
        !           426: 
1.1       root      427: config_item("debugger-port = <i>integer</i>", <<<_EOM_
                    428: デバッガの TCP 待ち受けポート番号を指定します。
                    429: 0 なら待ち受けを行いません。
1.1.1.4   root      430: デフォルトは 0 です。
                    431: <q>Specifies the TCP port number that debugger listens.
                    432: If 0, it will not listen.
                    433: The default is 0.</q>
1.1       root      434: _EOM_
                    435: );
                    436: 
1.1.1.8 ! root      437: config_item("ethernet-macaddr = <i>string</i>", <<<_EOM_
        !           438: イーサネットデバイスの仮想マシン側の MAC アドレスを指定します。
        !           439: <tt><i>XX</i>:<i>XX</i>:<i>XX</i>:<i>XX</i>:<i>XX</i>:<i>XX</i></tt>
        !           440: 形式で指定します。
        !           441: <tt>auto</tt> なら自動的に決定します。
        !           442: デフォルトは <tt>auto</tt> です。
        !           443: _EOM_
        !           444: );
        !           445: 
        !           446: config_item("hostnet-driver = <i>string</i>", <<<_EOM_
1.1       root      447: イーサネットデバイスのホスト側ドライバを指定します。
1.1.1.8 ! root      448: <tt>afpacket</tt>、<tt>bpf</tt>、<tt>tap</tt> のうち
        !           449: ホスト OS がサポートしているものと <tt>auto</tt>、<tt>none</tt> が選択可能です。
        !           450: <tt>afpacket</tt> は Linux の AF_PACKET ソケットを使用します。
        !           451: <tt>bpf</tt> は bpf(4) デバイスを使用します。
        !           452: <tt>tap</tt> は tap(4) インタフェースを使用します。
1.1       root      453: <tt>none</tt> ならホスト側とは一切通信を行いません。
1.1.1.8 ! root      454: <tt>auto</tt> ならホスト OS がサポートしているもののうち
        !           455: <tt>tap</tt> → <tt>afpacket</tt> → <tt>bpf</tt> を順に試します。
        !           456: デフォルトは <tt>auto</tt> です。
1.1.1.6   root      457: <q>Specifies the host driver of ethernet device.
1.1.1.8 ! root      458: <tt>afpacket</tt>, <tt>bpf</tt>, and <tt>tap</tt> can be specified
        !           459: only if the host OS supports them.
        !           460: <tt>auto</tt> and <tt>none</tt> can always be specified.
        !           461: <tt>afpacket</tt> uses Linux's AF_PACKET socket,
        !           462: <tt>bpf</tt> uses bpf(4) device,
        !           463: and <tt>tap</tt> uses tap(4) interface.
        !           464: <tt>none</tt> doesn't make any communication with the host.
        !           465: If <tt>auto</tt> is specified,
        !           466: it tries <tt>tap</tt>, <tt>afpacket</tt>, and <tt>bpf</tt> in that order
        !           467: (if the host OS supports them).
        !           468: The default is <tt>auto</tt>.</q>
1.1.1.6   root      469: _EOM_
                    470: );
                    471: 
1.1.1.8 ! root      472: config_item("hostdriver-afpacket-ifname = <i>ifname</i>", <<<_EOM_
        !           473: ホストドライバが afpacket の時にバインドするインタフェースを1つ指定します。
        !           474: <i>ifname</i> が <tt>auto</tt>
        !           475: なら使用可能なインタフェースを1つ自動的に選択します。
        !           476: デフォルトは <tt>auto</tt> です。
        !           477: なお、このホストドライバではローカルホストとの通信は出来ません。
        !           478: <q>Specify an interface name to bind to, when the host driver is afpacket.
        !           479: If <tt>auto</tt> is specified as <i>ifname</i>,
        !           480: it selects an usable interface automatically.
        !           481: The default is <tt>auto</tt>.
        !           482: Note that this host driver cannot communicate with the localhost.</q>
        !           483: _EOM_
        !           484: );
        !           485: 
        !           486: config_item("hostdriver-bpf-ifname = <i>ifname</i>", <<<_EOM_
        !           487: ホストドライバが bpf の時にバインドするインタフェースを1つ指定します。
        !           488: <i>ifname</i> が <tt>auto</tt>
        !           489: なら使用可能なインタフェースを1つ自動的に選択します。
        !           490: デフォルトは <tt>auto</tt> です。
        !           491: なお、このホストドライバではローカルホストとの通信は出来ません。
        !           492: <q>Specify an interface name to bind to, when the host driver is bpf.
        !           493: If <tt>auto</tt> is specified as <i>ifname</i>,
        !           494: it selects an usable interface automatically.
        !           495: The default is <tt>auto</tt>.
        !           496: Note that this host driver cannot communicate with the localhost.</q>
        !           497: _EOM_
        !           498: );
        !           499: 
        !           500: config_item("hostdriver-tap-devpath = <i>path</i>", <<<_EOM_
        !           501: ホストドライバが tap の時に使用するデバイスを1つフルパスで指定します。
        !           502: デフォルトは <tt>auto</tt> で、この場合は自動的にデバイスを選択します。
        !           503: この時の探し方はホスト OS によって異なります。
        !           504: Linux なら <tt>/dev/net/tun</tt> を指定したのと同じです。
1.1.1.6   root      505: OpenBSD なら <tt>/dev/tap0</tt> から <tt>/dev/tap9</tt> まで
                    506: 順番にオープンできるまで試します。
                    507: NetBSD (と FreeBSD) ならまず <tt>/dev/tap</tt> でクローニングを試み、
                    508: それが失敗すれば <tt>/dev/tap0</tt> から <tt>/dev/tap9</tt> までを
                    509: 順番にオープンできるまで試します。
1.1.1.8 ! root      510: いずれの場合も VM ディレクトリかその親ディレクトリに
        !           511: <tt>nono-ifup</tt>, <tt>nono-ifdown</tt> という名前のシェルスクリプトが必要です。
        !           512: 何もすることがない場合でも正常終了する空のシェルスクリプトを用意してください。
        !           513: <q>
        !           514: Specify a device pathname, when the host driver is tap.
        !           515: The default is <tt>auto</tt>.
1.1.1.6   root      516: The behavior in this case depends on the host OS.
                    517: On Linux, it's the same as <tt>/dev/net/tun</tt>.
                    518: On OpenBSD, it will try from <tt>/dev/tap0</tt> to <tt>/dev/tap9</tt>
                    519: until successful.
                    520: On NetBSD (and FreeBSD), it will try cloning by <tt>/dev/tap</tt> first.
                    521: If that fails, then try from <tt>/dev/tap0</tt> to <tt>/dev/tap9</tt>
                    522: until successful.
1.1.1.8 ! root      523: In all cases, you need to prepare two shell script files which names are
        !           524: <tt>nono-ifup</tt> and <tt>nono-ifdown</tt> in the VM directory or
        !           525: its parent directory.
        !           526: Even if you don't have anything to do in these scripts,
        !           527: you need to prepare empty scripts that will terminate successfully.
1.1.1.6   root      528: </q>
1.1       root      529: _EOM_
                    530: );
                    531: 
1.1.1.8 ! root      532: config_item("hostnet-fallback = <i>integer</i>", <<<_EOM_
        !           533: <tt>hostnet-driver</tt> で指定したドライバが使用可能でなかった時、
        !           534: 0 ならプロセスを終了します。
        !           535: 1 なら none を選択して実行を継続します。
        !           536: デフォルトは 0 です。
        !           537: <q>Specify the behavior when the driver which is selected by
        !           538: <tt>hostnet-driver</tt> is unusable;
        !           539: terminate the process if 0,
        !           540: or continue to run using the <tt>none</tt> driver if 1.
        !           541: The default is 0.</q>
1.1       root      542: _EOM_
                    543: );
                    544: 
                    545: config_item("luna-dipsw1 = <i>string</i>", <<<_EOM_
                    546: 本体前面 DIPSW#1-1..#1-8 の内容を指定します。
                    547: "<tt>0</tt>" を DOWN、"<tt>1</tt>" を UP として、
                    548: これを8つ並べた形式で、前から順に #1..#8 に対応します。
1.1.1.4   root      549: <q>Specifies status of the front panel DIPSW#1-1..#1-8 using 8 digit.
1.1.1.2   root      550: "<tt>0</tt>" means DOWN and "<tt>1</tt>" means UP.
                    551: The first character corresponds to #1 and
1.1.1.3   root      552: the eighth character corresponds to #8.</q>
                    553: <p>
                    554: LUNA-I でのデフォルトは <tt>11110111</tt> です。
                    555: 各スイッチの内容は以下のリンクを参照してください。
                    556: <q>On LUNA-I, the default value is <tt>11110111</tt>.
1.1.1.4   root      557: See the following link about DIPSW.</q><br>
1.1.1.3   root      558: → <a href="https://wiki.netbsd.org/ports/luna68k/luna68k_info/"
                    559: >NetBSD/luna68k: Information</a>
1.1       root      560: <br>
1.1.1.4   root      561: LUNA88K でのデフォルトは <tt>11111111</tt> です。
                    562: 各スイッチの内容は以下のリンクを参照してください。
                    563: <q>On LUNA88K, the default value is <tt>11111111</tt>.
                    564: See the following link about DIPSW.</q><br>
                    565: → <a href="http://man.openbsd.org/boot_luna88k.8"
                    566: >OpenBSD manual pages: boot_luna88k(8)</a>
1.1       root      567: _EOM_
                    568: );
                    569: 
                    570: config_item("luna-dipsw2 = <i>string</i>", <<<_EOM_
                    571: 本体前面 DIPSW#2-1..#2-8 の内容を指定します。
                    572: 書式は <tt>luna-dipsw1</tt> と同じです。
                    573: デフォルトは <tt>11111111</tt> です。
1.1.1.2   root      574: <q>Specifies status of the front panel DIPSW#2-1..#2-8.
                    575: The same syntax as <tt>luna-dipsw1</tt> is used.
                    576: The default value is <tt>11111111</tt>.</q>
1.1.1.3   root      577: <p>
1.1.1.4   root      578: NetBSD/luna68k のブートローダは、
                    579: DIPSW#2 が "<tt>11111111</tt>" なら自動的にカーネルをロードして実行し、
                    580: どれかでも "<tt>0</tt>" にするとプロンプトで停止するようです。
1.1       root      581: <span class=strike>(本当は #8 だけで制御するつもりだったんじゃないかという気がします)</span>
1.1.1.4   root      582: <q>NetBSD/luna68k bootloader will automatically load and execute the kernel,
                    583: if the DIPSW#2 is "<tt>11111111</tt>".
1.1.1.2   root      584: Otherwise, the bootloader will enter interactive mode.
                    585: <span class=strike>(I doubt that they actually wanted to switch with only #8)
                    586: </span>
                    587: </q>
1.1       root      588: _EOM_
                    589: );
                    590: 
1.1.1.3   root      591: config_item("monitor-rate = <i>integer</i>", <<<_EOM_
                    592: テキスト系モニタウィンドウの更新頻度を Hz 単位で指定します。
                    593: 1 から 60 までの間で指定でき、デフォルトは 20Hz です。
                    594: 起動後にメニューからプリセットされた頻度には変更可能です。
                    595: <q>Specifies refresh rate of all text monitor windows in Hz.
                    596: It ranges from 1 to 60.  The default is 20Hz.
                    597: You can change this value on GUI menu after boot,
                    598: but unlike this configuration value, there are only a few preset choices.
                    599: </q>
                    600: _EOM_
                    601: );
                    602: 
1.1       root      603: config_item("mpu-clock = <i>value</i>", <<<_EOM_
                    604: MPU のクロック数を MHz 単位で指定します。
1.1.1.5   root      605: デフォルトは LUNA-I なら 20MHz、LUNA88K なら 25MHz です。
                    606: <q>Specifies the MPU clock in MHz.
                    607: The default value is 20MHz on LUNA-I, or 25MHz on LUNA88K.</q>
1.1       root      608: _EOM_
                    609: );
                    610: 
                    611: /* luna には不要
                    612:   config_item("mpu-has-fpu", ""); */
                    613: 
1.1.1.8 ! root      614: config_item("mpu-pseudo-stop = <i>integer</i>", <<<_EOM_
        !           615: m88100 にて疑似 STOP 状態を有効にするかどうかを指定します。
        !           616: 0 なら無効(実機と同じ動作)、1 なら有効で、デフォルトは 1 です。
        !           617: m88100 には、m68k の STOP 命令 (割り込みが上がるまで何もせず待つ)
        !           618: に相当する命令がなく、
        !           619: 大抵ビジーウェイトループで割り込みが上がるのを待つことになります。
        !           620: これは実機では (消費電力を減らす手段がないという些細な問題以外には)
        !           621: 何のデメリットもないのですが、
        !           622: エミュレータで特に高速動作させている時には割り込みが上がるまで
        !           623: (例えば人間がキーを入力するまで) ホスト CPU パワーを使い潰してビジーウェイトループを実行し続けることになり、ホスト CPU があっつあつになります。
        !           624: それを防ぐための機能です。
        !           625: 特徴的な命令列を検出して実現しているので、すべての状況で動作するわけではありません。
        !           626: _EOM_
        !           627: );
        !           628: 
1.1.1.2   root      629: config_item("prom-image = <i>path</i>", <<<_EOM_
1.1.1.4   root      630: LUNA-I/LUNA88K の外部 ROM イメージファイルのパスを指定します。
1.1.1.2   root      631: <i>path</i> がファイル名のみなら VM ディレクトリとその親ディレクトリからこのファイル名を検索します。
                    632: <i>path</i> が相対パスなら VM ディレクトリからの相対パスになります (現在のディレクトリからではありません)。
                    633: 空にすると内蔵 ROM を使用します。
                    634: デフォルトは空です。
1.1.1.4   root      635: <q>Specifies the LUNA-I/LUNA88K's external ROM image file path.
1.1.1.2   root      636: If the <i>path</i> does not have any path delimiters,
                    637: the VM directory and then its parent directory will be searched.
                    638: If the <i>path</i> is a relative path,
                    639: it will be path from the VM directory, not from the current
                    640: directory.
                    641: If the <i>path</i> is empty, internal emulated ROM will be used.
                    642: The default value is empty.</q>
1.1       root      643: <p>
1.1.1.2   root      644: 実機を持っていない場合はこの値を空に (= デフォルトのままに) しておくと、
1.1.1.8 ! root      645: nono 内蔵のなんちゃって下位互換 ROM で起動します。
1.1.1.2   root      646: <q>If you does not have the real LUNA machines,
                    647: you can boot with nono's internal downward compatible emulated ROM
1.1.1.4   root      648: if you set this field empty (or leave it as the default).
                    649: </q>
1.1       root      650: <p>
1.1.1.4   root      651: LUNA-I 実機を持っている場合は
                    652: ROM ファイルを指定することで実機 ROM で起動できます。
1.1.1.2   root      653: ROM ファイルは実機の 0x41000000-0x4101ffff (128KB) を保存したものです。
1.1.1.3   root      654: 今のところ ROM は V4.22 (Thu Jul 27 11:45:42 1989) のみサポートしています。
                    655: それ以外については何も分かりません。
1.1.1.4   root      656: <q>If you have the real LUNA-I machine,
1.1.1.2   root      657: you can boot with the real ROM spcifying the ROM file path.
1.1.1.4   root      658: The ROM file is extracted from 0x41000000-0x4101ffff (128KB) of
                    659: the real LUNA-I machine.
1.1.1.3   root      660: For now, only V4.22 (Thu Jul 27 11:45:42 1989) is supported.
                    661: I have no idea about other ROMs.
                    662: </q>
1.1.1.4   root      663: <p>
                    664: LUNA88K 実機の場合は 0x41000000-0x4103ffff (256KB) を保存したものです。
1.1.1.8 ! root      665: 今のところ ROM は version 1.20 のみサポートしています。
1.1.1.4   root      666: <q>
                    667: For LUNA88K,
                    668: the ROM file is extracted from 0x41000000-0x4103ffff (256KB).
1.1.1.8 ! root      669: For now, only version 1.20 is supported.
1.1.1.4   root      670: </q>
1.1.1.2   root      671: _EOM_
                    672: );
                    673: 
1.1.1.3   root      674: config_item("ram-size = <i>integer</i>", <<<_EOM_
1.1.1.2   root      675: 搭載する RAM サイズを MB 単位で指定します。
1.1.1.6   root      676: LUNA-I のデフォルトは 16MB です。
                    677: 16MB 未満は 4MB 単位で、
                    678: 16MB 以上は 255MB まで 1MB 単位で指定できます
                    679: (ちなみに NetBSD/luna68k の起動には最低でも 8MB 必要です)。
                    680: LUNA88K のデフォルトは 64MB です。
                    681: 64MB 未満は 16MB 単位で、
                    682: 64MB 以上は暫定で 255MB まで 1MB 単位で指定できます。
1.1.1.5   root      683: <q>Specifies the RAM size in MB.
1.1.1.6   root      684: On LUNA-I, the default is 16MB.
                    685: If the size is less than 16MB, you can specify in 4MB unit.
                    686: If larger, you can specify up to 255MB in 1MB unit.
                    687: By the way, NetBSD/luna68k needs at least 8MB to boot.
                    688: On LUNA88K, the default is 64MB.
                    689: If the size is less than 64MB, you can specify in 16MB unit.
                    690: If larger, you can specify up to tentative 255MB in 1MB unit.
                    691: </q>
1.1       root      692: _EOM_
                    693: );
                    694: 
1.1.1.7   root      695: config_item("show-statuspanel = <i>integer</i>", <<<_EOM_
                    696: ステータスパネルを表示するかどうかを指定します。
                    697: 0 なら非表示、1 なら表示です。
                    698: 起動後はメニューから変更可能です。
                    699: <q>Specifies whether to display the status panel or not.
                    700: If 0, it is hidden; if 1, it is shown.
                    701: You can change it on GUI menu after boot.
                    702: </q>
                    703: _EOM_
                    704: );
                    705: 
1.1       root      706: config_item("spc0-id<i>N</i>-image = <i>devtype</i>,<i>path</i>", <<<_EOM_
                    707: SCSI デバイスを指定します。<i>N</i> には 0 から 7 が入ります。
                    708: ID 7 は本体が使用しますので指定しないでください。
                    709: 値はデバイス種別 <i>devtype</i> とイメージパス <i>path</i>
                    710: を "<tt>,</tt>"(カンマ) で区切って並べた形式で、
                    711: 今の所デバイス種別 <i>devtype</i> には "<tt>hd</tt>"(ハードディスク) のみ指定可能です。
                    712: ディスクイメージパスが相対パスなら VM ディレクトリからの相対パスになります。
1.1.1.2   root      713: <q>
                    714: Specifies SCSI device.  <i>N</i> is 0 to 7.
                    715: But don't specify ID 7 because the host uses it.
                    716: The value is in a form of device type <i>devtype</i> and
                    717: the image path <i>path</i> separated by "<tt>,</tt>"(comma).
                    718: For now, only "<tt>hd</tt>" (hard disk) can be specified for <i>devtype</i>.
                    719: If the <i>path</i> is relative path, it is from the VM directory.
                    720: </q>
                    721: 
1.1       root      722: <p>
                    723: 例えば、nono.cfg と同じディレクトリに置いたディスクイメージ luna.img
                    724: を使う場合、
1.1.1.6   root      725: LUNA では通常 ID 6 をプライマリ HDD に割り当てるのでこんな感じになります。
1.1.1.2   root      726: <q>For example, if you use disk image luna.img placed in the same
                    727: directory as nono.cfg,
1.1.1.6   root      728: since LUNA usually assigns ID 6 to the primary HDD,
1.1.1.2   root      729: write as following:</q>
1.1       root      730: <blockquote><pre>
                    731: spc0-id6-image = hd,luna.img
                    732: </pre></blockquote>
                    733: _EOM_
                    734: );
                    735: 
1.1.1.4   root      736: config_item("spc0-id<i>N</i>-seektime = <i>integer</i>", <<<_EOM_
                    737: 指定の SCSI HDD の平均シークタイムを msec 単位で指定します。
                    738: 現在のデフォルトは <tt>0</tt> です (S・S・D!! S・S・D!!)。
                    739: 16 程度を指定すると幾分往時に思いを馳せることが出来るかもしれませんが、
                    740: 今の所あまり安定していません。
                    741: <q>Specifies the average seek time of specified SCSI HDD in msec.
                    742: Currently, the default value is <tt>0</tt>
                    743: (This may be something like SSD :-).
                    744: If you specify about 16 or so, you can feel nostalgic,
                    745: but this feature is still unstable.
                    746: </q>
                    747: _EOM_
                    748: );
                    749: 
1.1       root      750: config_item("spc0-id<i>N</i>-writeprotect = <i>integer</i>", <<<_EOM_
                    751: 指定の SCSI デバイスへの書き込みを無視するかどうか指定します。
                    752: <tt>0</tt> なら通常動作(書き込みを行う)です。
                    753: <tt>1</tt> なら書き込みコマンドは成功したように振る舞いますが実際には
                    754: ディスクイメージに一切書き戻しません。
                    755: fsck を気にせずカーネルのデバッグとかを行いたい場合にはどうぞ。
                    756: 何が起きるか意味が分からない人は指定しないでください。
                    757: デフォルトは <tt>0</tt> です。
1.1.1.2   root      758: <q>Specifies whether nono ignores writing to SCSI devices.
                    759: <tt>0</tt> means normal operation (writes to the devices).
1.1.1.6   root      760: If <tt>1</tt> is specified,
1.1.1.2   root      761: nono will not actually write back to the disk image
                    762: even though the write command is succeeded.
                    763: nono's SCSI devices acts as
                    764: write command is successfully done but it never writes back
                    765: to the actual disk image.
                    766: This is useful for kernel debugging because it does not require fsck
                    767: after the kernel hangs.
                    768: But don't use this flag if you don't understand this paragraph.
                    769: The default value is <tt>0</tt>.
                    770: </q>
1.1       root      771: _EOM_
                    772: );
                    773: ?>
                    774: </dl>
                    775: </div>
                    776: 
                    777: 
1.1.1.7   root      778: <a name="aboutvm"></a>
                    779: <h4>VM について <q>About VM</q></h4>
                    780: <h5>ステータスパネル <q>Status Panel</q></h5>
                    781: <div class="main">
                    782: ステータスパネル中央にあるパフォーマンスメータのアイコンは
                    783: 高速モードの状態を表示しています。
                    784: ダブルクリックすると高速/等速モードの指定を切り替えることができます。
                    785: <q>The performance meter's icon at the center of the status panel
                    786: shows the VM speed status.
                    787: You can switch full speed / syncronized mode by double-clicking on this icon.
                    788: </q>
                    789: <table>
                    790: <tr><td valign=top>
                    791: <image src="image/sp-ffmark0.png" style="padding:0.5ex; background-color:white">
                    792: <td valign=top>…
                    793: <td valign=top>
                    794: マークなしの場合、ユーザが等速モードを指定していて、等速モードで実行中です。
                    795: <q>When no icons are displayed,
                    796: the user has specified syncronized mode and
                    797: the VM is running in synchronized mode.</q>
                    798: <tr><td valign=top>
                    799: <image src="image/sp-ffmark1.png" style="padding:0.5ex; background-color:white">
                    800: <td valign=top>…
                    801: <td valign=top>
                    802: 三角2つの場合、ユーザが高速モードを指定していて、等速モードで実行中です。
                    803: キー入力中(後述)または VM がアイドル状態(m68k の STOP 命令)などで起きます。
1.1.1.8 ! root      804: 高速モード中はパーセントではなく何倍速で動作しているかを表します。
1.1.1.7   root      805: <q>When an icon (two triangles) is displayed,
                    806: the user has specified full speed mode and
                    807: the VM is running in synchronized mode.
1.1.1.8 ! root      808: This will happen during keystrokes (see below) or when the VM is idle
1.1.1.7   root      809: (STOP instruction on m68k).
                    810: </q>
                    811: <tr><td valign=top>
                    812: <image src="image/sp-ffmark2.png" style="padding:0.5ex; background-color:white">
                    813: <td valign=top>…
                    814: <td valign=top>
                    815: 三角3つの場合、ユーザが高速モードを指定していて、高速モードで実行中です。
                    816: <q>When an icon (three triangles) is displayed,
                    817: the user has specified full speed mode and
                    818: the VM is running in full speed mode.
                    819: </table>
                    820: </div>
                    821: 
                    822: <h5>キー入力 <q>Key input</q></h5>
                    823: <div class="main">
                    824: LUNA では、キーボードがハードウェア側でキーリピートを行わず、
                    825: ソフトウェア(OS など)がキーリピートの処理を行います。
                    826: そのため、キーリピートを実装していない LUNA の PROM や
                    827: NetBSD/luna68k のブートローダではキーリピートは起きず、
                    828: キーリピートを実装している NetBSD/luna68k カーネルではキーリピートが起こせます。
1.1.1.8 ! root      829: キーリピートを起こす間隔をゲストのソフトウェアが測定しているということは、
1.1.1.7   root      830: VM が高速動作するとキーリピートもそれに合わせて発生することになり、
                    831: これをホスト側から防ぐ手段はありません。
                    832: そこで nono ではキー入力が発生している間
                    833: (キーが一つでも押されてからキーが全て離されるまでの間)、
                    834: 高速モードが指示されていても VM を一時的に等速モードに落として実行します。
                    835: 上記のアイコンがそれを区別しているのはこのためです。
                    836: そのため、何らかの理由でキーが入りっぱなしになった場合
                    837: (ALT + TAB やアクセラレータキーでメニューを開くと起きがちです)
                    838: 高速モードが抑制されたままということが起きえます。
                    839: その場合はソフトウェアキーボードからキー入力を解除するなどしてください。
                    840: <q>
                    841: On LUNA,
                    842: key repeat is done by software(OS), not by the keyboard hardware.
                    843: For this reason,
                    844: key repeat doesn't occur on LUNA's PROM or NetBSD/luna68k's bootloader
                    845: that don't implement it, and
                    846: key repeat occurs on NetBSD/luna68k kernel that implements it.
1.1.1.8 ! root      847: Since the timing of key repeat is measured by the guest software,
1.1.1.7   root      848: if the VM is running faster than the real,
                    849: the key repeat will occur faster, too.
                    850: The host application doesn't have the way to avoid it.
                    851: Therefore, nono will temporarily suppress the full speed mode
                    852: while any keys are pressed.
                    853: That is why the above-mentioned icon distinguishes them.
1.1.1.8 ! root      854: If keys continue to be pressed for some reasons,
1.1.1.7   root      855: the VM also continues to run syncronized mode.
                    856: In this case, you can resolve it by using the software keyboard window.
                    857: </q>
                    858: </div>
                    859: 
                    860: 
                    861: <a name="tryit"></a>
1.1       root      862: <h4>実行してみる <q>Try it</q></h4>
1.1.1.8 ! root      863: <h5>NetBSD/luna68k を実行してみる <q>Try NetBSD/luna68k</q></h5>
1.1       root      864: <div class="main">
1.1.1.8 ! root      865: つついさんが NetBSD/luna68k 9.2 の liveimage を用意されています。
        !           866: <q>Tsutsui-san has provided a liveimage of NetBSD/luna68k 9.2.</q>
        !           867: <dl>
        !           868: <dd><a href="https://twitter.com/tsutsuii/status/1262429647364427783"
        !           869: >https://twitter.com/tsutsuii/status/1262429647364427783</a><br>
        !           870: <dd><a href="https://twitter.com/tsutsuii/status/1405206240913805313"
        !           871: >https://twitter.com/tsutsuii/status/1405206240913805313</a><br>
        !           872: </dl>
        !           873: ここではこれを起動してみます。<q>Let's try it.</q>
1.1.1.2   root      874: <br>
                    875: <ol>
                    876: <li>どこかに nono 用のディレクトリを用意し(例えば ~/nono/)、
1.1       root      877: その中に VM ディレクトリを用意します (例えば ~/nono/luna/)。
1.1.1.3   root      878: <q>Create a directory somewhere for nono (for example ~/nono/),
1.1.1.8 ! root      879: and create subdirectories for individual VMs in it
        !           880: (for example ~/nono/luna/).</q>
1.1       root      881: 
1.1.1.3   root      882: <li>以下のリンクからイメージファイルをダウンロードして展開し、
1.1.1.2   root      883: VM ディレクトリ ~/nono/luna/ に置きます。
1.1.1.3   root      884: <q>Download imagefile from the following link,
1.1.1.7   root      885: extract it and place it in the VM directory, ~/nono/luna/.</q>
1.1.1.3   root      886: <blockquote>
1.1.1.8 ! root      887: <a href="http://teokurebsd.org/netbsd/liveimage/20210614-luna68k/"
        !           888: >http://teokurebsd.org/netbsd/liveimage/20210614-luna68k/</a>
1.1.1.3   root      889: </blockquote>
1.1.1.2   root      890: 
1.1.1.8 ! root      891: <li>以下の内容の設定ファイル nono.cfg を VM ディレクトリ ~/nono/luna/
        !           892: に作成します。
        !           893: ここでは説明を簡単にするためネットワークなしにしていますが、
        !           894: ネットワーク設定は必要に応じて行ってください。
1.1.1.7   root      895: <q>Create a configuration file nono.cfg in the VM directory, ~/nono/luna/,
1.1.1.8 ! root      896: with following contents.
        !           897: By the way, to simplify the explanation, we assume there is no network here.
        !           898: However, please configure the network if necessary.</q>
1.1.1.2   root      899: <blockquote class="file"><pre>
                    900: vmtype = luna
1.1.1.8 ! root      901: spc0-id6-image = hd,liveimage-luna68k-raw-20210614.img
        !           902: hostnet-driver = none
1.1.1.2   root      903: </pre></blockquote>
1.1.1.8 ! root      904: 
1.1.1.2   root      905: <li><tt>nono -c ~/nono/luna</tt> で起動します
                    906: (VM ディレクトリに自動的に NVRAM.DAT が作られます)。
                    907: <q>Run as <tt>nono -c ~/nono/luna</tt>.
1.1.1.4   root      908: (NVRAM.DAT will be created automatically in the VM directory)</q>
1.1.1.2   root      909: <li>Emulated ROM Monitor が起動するので、
                    910: 初回は以下のように入力すると NetBSD が起動します。
                    911: <q>The emulated ROM Monitor will be executed.
                    912: Then, only for the first time,
                    913: entering the following can boot NetBSD.</q>
1.1.1.8 ! root      914: <blockquote><pre>
        !           915: k&#x23ce;
        !           916: &#x23ce;
        !           917: &#x23ce;
        !           918: d&#x23ce;
        !           919: boot&#x23ce;
        !           920: g&#x23ce;
        !           921: x&#x23ce;
        !           922: </pre></blockquote>
        !           923: 画面はこんな感じのはずです (太字が入力部分)。
        !           924: <q>You will see a screen like this.  The bold text indicates
        !           925: the characters you need to enter.</q>
1.1.1.2   root      926: <blockquote class="file"><pre>
1.1.1.8 ! root      927: NONO 0.2.0 Emulated ROM Monitor for LUNA-I
        !           928: 
        !           929: ** NVRAM Initialized.
        !           930: 
        !           931: &gt;<b>k&#x23ce;</b>
        !           932: controller: dk  ?<b>&#x23ce;</b>
        !           933: drive unit: 0  ?<b>&#x23ce;</b>
        !           934: partition : c  ?<b>d&#x23ce;</b>
        !           935: filename  : vmunix  ?<b>boot&#x23ce;</b>
        !           936: &gt;<b>g&#x23ce;</b>
        !           937: Loaded.  Entry point = $00700000
        !           938: &gt;<b>x&#x23ce;</b>
1.1.1.2   root      939: </pre></blockquote>
                    940: この内容は NVRAM.DAT に記録されているので次回以降は直接 NetBSD が起動します。
1.1.1.7   root      941: <q>The information you have just entered is recorded in the NVRAM,
1.1.1.2   root      942: so next time it boots NetBSD automatically.</q>
1.1.1.8 ! root      943: <li>初回起動時、
        !           944: Updating fontconfig cache はあほみたいに時間がかかりますが、
        !           945: nono がハングアップしてるわけではありません(>_<)。
        !           946: また初回ログイン時めちゃくちゃ重たいですが、
        !           947: これはバックグラウンドで makemandb が動くためで
        !           948: nono のせいではありません(>_<)。
        !           949: <q>At the first boot, you will see the console stops after printing
        !           950: "Updating fontconfig cache".
        !           951: This is because the infamous fontconfig takes very looooong time.
        !           952: nono would not have hang-up.
        !           953: In addition, after the first login, you will feel it's too heavy.
        !           954: This is because the infamous makemandb(8) runs heavily in the background
        !           955: for a looooong time.
        !           956: It's very sad to me that these two accidents which are far from the ideal
        !           957: are the first experiences of a newcomer.
        !           958: </q>
        !           959: 
        !           960: <li>終了する時は root
        !           961: ユーザで &ldquo;<tt>shutdown -p now</tt>&rdquo; を実行してください。
        !           962: LUNA はソフトウェアから電源オフでき、
        !           963: VM の電源オフで nono も終了します。
        !           964: <q>To quit, type &ldquo;<tt>shutdown -p now</tt>&rdquo; as the root user.
        !           965: LUNA can be powered off by software,
        !           966: and nono will terminate when the VM is powered off.</q>
        !           967: </ol>
        !           968: </div>
        !           969: 
        !           970: <h5>OpenBSD/luna88k を実行してみる <q>Try OpenBSD/luna88k</q></h5>
        !           971: <div class="main">
        !           972: あおやまさんが OpenBSD/luna88k 6.9 の liveimage を用意されています。
        !           973: <q>Aoyama-san has provided a liveimage of OpenBSD/luna88k 6.9.</q>
        !           974: <dl>
        !           975: <dd><a href="https://twitter.com/ao_kenji/status/1404784588015112192"
        !           976: >https://twitter.com/ao_kenji/status/1404784588015112192</a>
        !           977: </dl>
        !           978: ここではこれを起動してみます。<q>Let's try it.</q>
        !           979: <br>
        !           980: <ol>
        !           981: <li>どこかに nono 用のディレクトリを用意し(例えば ~/nono/)、
        !           982: その中に VM ディレクトリを用意します (例えば ~/nono/luna88k/)。
        !           983: <q>Create a directory somewhere for nono (for example ~/nono/),
        !           984: and create subdirectories for individual VMs in it
        !           985: (for example ~/nono/luna88k/).</q>
        !           986: 
        !           987: <li>以下のリンクから liveimage-luna88k-raw-YYYYMMDD.img.gz
        !           988: をダウンロードして展開し、
        !           989: VM ディレクトリ ~/nono/luna88k/ に置きます。
        !           990: <q>Download liveimage-luna88k-raw-YYYYMMDD.img.gz from the following link,
        !           991: extract it and place it in the VM directory, ~/nono/luna88k/.</q>
        !           992: <blockquote>
        !           993: <a href="http://www.nk-home.net/~aoyama/liveimage/"
        !           994: >http://www.nk-home.net/~aoyama/liveimage/</a>
        !           995: </blockquote>
        !           996: 
        !           997: <li>以下の内容の設定ファイル nono.cfg を VM ディレクトリ ~/nono/luna88k/
        !           998: に作成します。
        !           999: ここでは説明を簡単にするためネットワークなしにしていますが、
        !          1000: ネットワーク設定は必要に応じて行ってください。
        !          1001: <q>Create a configuration file nono.cfg in the VM directory, ~/nono/luna88k/,
        !          1002: with following contents.
        !          1003: By the way, to simplify the explanation, we assume there is no network here.
        !          1004: However, please configure the network if necessary.</q>
        !          1005: <blockquote class="file"><pre>
        !          1006: vmtype = luna88k
        !          1007: spc0-id6-image = hd,liveimage-luna88k-raw-20210614.img
        !          1008: hostnet-driver = none
        !          1009: </pre></blockquote>
        !          1010: 
        !          1011: <li><tt>nono -c ~/nono/luna88k</tt> で起動します
        !          1012: (VM ディレクトリに自動的に NVRAM.DAT が作られます)。
        !          1013: <q>Run as <tt>nono -c ~/nono/luna88k</tt>.
        !          1014: (NVRAM.DAT will be created automatically in the VM directory)</q>
        !          1015: <li>Emulated ROM Monitor が起動するので、
        !          1016: 初回は以下のように入力すると OpenBSD が起動します。
        !          1017: <q>The emulated ROM Monitor will be executed.
        !          1018: Then, only for the first time,
        !          1019: entering the following can boot OpenBSD.</q>
        !          1020: <blockquote><pre>
        !          1021: nvram boot_filename boot&#x23ce;
        !          1022: y
        !          1023: b&#x23ce;
        !          1024: </pre></blockquote>
        !          1025: 画面はこんな感じのはずです (太字が入力部分)。
        !          1026: <q>You will see a screen like this.  The bold text indicates
        !          1027: the characters you need to enter.</q>
        !          1028: <blockquote class="file"><pre>
        !          1029: NONO 0.2.0 Emulated ROM Monitor for LUNA88K
        !          1030: 
        !          1031: ** NVRAM Initialized.
        !          1032: 
        !          1033: N&gt;<b>nvram boot_filename boot&#x23ce;</b>
        !          1034: Update boot_filename : "vmunix" -&gt; "boot" (Y/[N]):<b>y</b>
        !          1035: Updated
        !          1036: N&gt;<b>b&#x23ce;</b>
        !          1037: </pre></blockquote>
        !          1038: この内容は NVRAM.DAT に記録されているので次回以降は直接 OpenBSD が起動します。
        !          1039: <q>The information you have just entered is recorded in the NVRAM,
        !          1040: so next time it boots OpenBSD automatically.</q>
        !          1041: 
        !          1042: <li>終了する時は root
        !          1043: ユーザで &ldquo;<tt>shutdown -p now</tt>&rdquo; を実行してください。
        !          1044: LUNA88K はソフトウェアから電源オフでき、
        !          1045: VM の電源オフで nono も終了します。
        !          1046: <q>To quit, type &ldquo;<tt>shutdown -p now</tt>&rdquo; as the root user.
        !          1047: LUNA88K can be powered off by software,
        !          1048: and nono will terminate when the VM is powered off.</q>
1.1.1.2   root     1049: </ol>
1.1       root     1050: </div>
                   1051: 
                   1052: 
1.1.1.8 ! root     1053: 
1.1.1.7   root     1054: <a name="network"></a>
1.1.1.8 ! root     1055: <h4>ネットワーク設定例 <q>Example of network setup</q></h4>
1.1       root     1056: <div class=main>
1.1.1.8 ! root     1057: wm0 を持つ NetBSD ホストに tap(4) デバイスを用いて
        !          1058: nono のゲスト OS を接続する場合の設定例です。
        !          1059: <ol>
        !          1060: <li>
        !          1061: 設定ファイル nono.cfg に以下の行を追加します
        !          1062: (と言いつつ NetBSD では書かなくてもデフォルトでこの動作になりますが)
        !          1063: <q>Add the following line to configuration file, nono.cfg.
        !          1064: (Although you don't need to write it since these are default behavior
        !          1065: on NetBSD)</q>
1.1       root     1066: <blockquote class="file"><pre>
1.1.1.8 ! root     1067: hostnet-driver = tap
        !          1068: hostnet-tap-devpath = auto
1.1       root     1069: </pre></blockquote>
1.1.1.8 ! root     1070: 
1.1.1.5   root     1071: <li>デフォルトでは /dev/tap は一般ユーザからアクセスできないので、
                   1072: chmod で適当にパーミッションを与えます。
                   1073: 番号の付いていないほうの /dev/tap だけでいいです。
                   1074: sysinst 等で OS をアップグレードするとパーミッションが 600
                   1075: に戻るのがハマりポイントです。
1.1.1.8 ! root     1076: <q>By default, /dev/tap is only accessible to privileged user.
        !          1077: You need to chmod /dev/tap (without unit number) appropriately.
        !          1078: Note that upgrading using sysinst always reset the permission to 600.
        !          1079: </q>
1.1.1.5   root     1080: 
                   1081: <li>bridge(4) インタフェースを作成し、
1.1.1.8 ! root     1082: ホストの外部(物理)インタフェースをブリッジに追加しておきます。
1.1.1.5   root     1083: <q>Create a bridge(4) interface, and
                   1084: add your physical interface to the bridge.</q>
1.1       root     1085: <blockquote class="cons"><pre>
1.1.1.5   root     1086: # ifconfig bridge0 create
1.1       root     1087: # brconfig bridge0 add wm0
                   1088: </pre></blockquote>
1.1.1.8 ! root     1089: 常用するなら /etc の設定ファイルに書いておきましょう。
        !          1090: <q>If you use it regularly,
1.1.1.5   root     1091: you can put configuration file into /etc.</q>
                   1092: <blockquote>
                   1093: /etc/ifconfig.bridge0
                   1094: <pre class=file>
                   1095: create
                   1096: up
                   1097: !/sbin/brconfig $int add wm0
                   1098: </pre>
                   1099: <pre class=cons>
                   1100: # /etc/rc.d/network restart
                   1101: </pre>
                   1102: </blockquote>
                   1103: 
                   1104: <li>
                   1105: 一般ユーザに戻って、
                   1106: VM ディレクトリかその親ディレクトリに
                   1107: 次のような 2つのスクリプトを用意します。
1.1.1.8 ! root     1108: nono は tap(4) をオープンし、
        !          1109: そのデバイス名を引数にこれらのスクリプトを呼びます。
1.1.1.5   root     1110: sudo の設定は別途行ってください。
                   1111: <q>Return to non-privileged user, and
                   1112: create following two scripts in the VM directory or its parent directory.
1.1.1.8 ! root     1113: nono will open tap(4) and
        !          1114: invoke these scripts with the name of the device as an argument.
1.1.1.5   root     1115: In addition, you need to set up sudo separately.</q>
1.1       root     1116: <blockquote>
                   1117: nono-ifup
                   1118: <pre class=file>
                   1119: #!/bin/sh
1.1.1.5   root     1120: sudo /sbin/ifconfig $1 up
                   1121: sudo /sbin/brconfig bridge0 add $1
1.1       root     1122: </pre></blockquote>
                   1123: 
                   1124: <blockquote>
1.1.1.5   root     1125: nono-ifdown
1.1       root     1126: <pre class=file>
                   1127: #!/bin/sh
1.1.1.5   root     1128: sudo /sbin/brconfig bridge0 delete $1
                   1129: sudo /sbin/ifconfig $1 down
                   1130: </pre></blockquote>
                   1131: 
                   1132: <blockquote class="cons"><pre>
                   1133: % chmod +x nono-ifup nono-ifdown
1.1       root     1134: </pre></blockquote>
                   1135: 
1.1.1.5   root     1136: <li>nono を起動し、
                   1137: メニューの「モニタ &gt; ホスト &gt; ホストネットワーク」を開いて
1.1.1.8 ! root     1138: HostNet Driver: tap になっていれば動いてるはずです。
1.1.1.5   root     1139: <q>Run nono,
                   1140: and open "Monitor &gt; Host &gt; Host Network" window from menu.
1.1.1.8 ! root     1141: It's OK if you can see "HostNet Driver: tap".</q>
1.1.1.5   root     1142: 
                   1143: </ol>
                   1144: 
1.1       root     1145: </div>
                   1146: 
                   1147: 
1.1.1.7   root     1148: <a name="changes"></a>
1.1.1.2   root     1149: <h4>変更履歴 <q>Changes</q></h4>
                   1150: <div class="main">
                   1151: See <a href="changes.html">changes.html</a>.
                   1152: </div>
                   1153: 
                   1154: 
1.1.1.7   root     1155: <a name="license"></a>
1.1.1.2   root     1156: <h4>ライセンス <q>License</q></h4>
                   1157: <div class="main">
                   1158: See <a href="nono-license.txt">nono-license.txt</a>.
                   1159: </div>
                   1160: 
                   1161: 
1.1.1.4   root     1162: <h4>連絡先 <q>Contact us</q></h4>
                   1163: <div class="main">
                   1164: バグ報告などは以下にお願いします。日本語でおk。
                   1165: <q>If you find any problems, please let me know.
                   1166: You may write in English.</q><br>
                   1167: <a href="https://github.com/isaki68k/nono-issue/issues"
                   1168: >https://github.com/isaki68k/nono-issue/issues</a>
                   1169: </div>
                   1170: 
                   1171: 
1.1.1.2   root     1172: <h4>パッチの提供について <q>About contributes</q></h4>
                   1173: <div class="main">
                   1174: パッチを提供してくださる場合は以下に同意したものとします。
                   1175: <q>If you provide a patch to nono, you must agree to the following conditions:
                   1176: </q>
                   1177: <ul>
                   1178: <li>成果物が nono のライセンスに従って運用あるいは配布されること。
                   1179: <q>All your work are operated or distributed under the nono license.</q>
                   1180: <li>ライセンスが将来変わる可能性があること。
                   1181: <q>The license may be changed in the future.</q>
                   1182: <li>著作部分に関して著作者人格権を行使しないこと。
                   1183: <q>Do not exercise your author's rights.</q>
                   1184: </ul>
                   1185: <ul>
                   1186: </div>
                   1187: 
                   1188: 
                   1189: <h4>Acknowledgements</h4>
                   1190: <div class="main">
                   1191: nono は以下の広告条項を含むソースコードを利用しています。
                   1192: <q>nono uses source code with the following advertising clause.</q>
                   1193: <blockquote>
                   1194: This product includes software developed by Gordon Ross<br>
                   1195: This product includes software developed by the University of California, Lawrence Berkeley Laboratory.<br>
                   1196: </blockquote>
                   1197: </div>
                   1198: 
1.1       root     1199: 
                   1200: <hr>
1.1.1.2   root     1201: nono project
1.1       root     1202: </body>
                   1203: </html>

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.