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

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

unix.superglobalmegacorp.com

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