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

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

unix.superglobalmegacorp.com

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