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

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

unix.superglobalmegacorp.com

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