dosemu とは、 Linux 上で動作する DOSエミュレータです。 ここでは、Windows 95 (= MS-DOS 7) を用いて、 Linux コンソール上で dosemu を日本語化する方法について説明します。 X Window System上での xdos 日本語化については、こちらを参照してください。
この日本語化した dosemu (以後``日本語 dosemu''と呼ぶことにします)上で、私は VZ(エディタ), FILMTN(ファイル管理ツール), MJL(グラフィックローダ) 等を動かし、 MSIME で漢字変換しています(^^;
日本語化は、Linux 2.0.36 上の dosemu-0.99.13 を対象として説明します。
なお dosemu から見て、ドライブ名と各ファイルシステムは、 次のように設定するように仮定して説明します。
C: dosemu filesystem (/var/lib/dosemu/hdimage) D: Windows 95 filesystem /dev/hda1 (\windows に Windows 95 install) E: Linux filesystem /dev/hda2 (/)
(参考までに、しょうちゃんの /etc/dosemu.confを見てみる)
以下に``日本語dosemu''の設定方法を説明します。
% tar zxvf /tmp/dosemu-0.99.13.tgz % cd dosemu-0.99.13 % make You choose not to run ./default-configure, doing it now ./default-configure . ./base-configure --enable-force-slang --enable-monoton-timing --enable-new-intcode --enable-aspi creating cache ./config.cache checking host system type... i586-unknown-linux ... ... ... creating ./config.status creating Makefile.conf creating src/include/config.h Configure finished. Do 'make' to compile Dosemu. Now resuming make make[1]: Entering directory `/home4/naka/dosemu-0.99.13' make[2]: Entering directory `/home4/naka/dosemu-0.99.13/src' Starting DOSEMU VERSION.99 compile... -> IMPORTANT! - Please read 'QuickStart' file before compiling DOSEMU! - Location and format of DOSEMU files have changed since 0.50pl1! -> REQUIREMENTS for DOSEMU: - gcc 2.7.2 - libc 5.4.7 - Linux >= 2.0.28, 2.1.x >= 2.1.15 - 16 megabytes total memory+swap - Full feature dosemu, compiled with vm86plus ====> Press Enter to continue, or hit Ctrl-C to abort <==== make[3]: Entering directory `/home4/naka/dosemu-0.99.13/src/tools' gcc -O2 tools86.c -o tools86 make[3]: Leaving directory `/home4/naka/dosemu-0.99.13/src/tools' make[3]: Entering directory `/home4/naka/dosemu-0.99.13/src/commands' gcc -E -D__AS86__ --traditional -I../include exitemu.S > exitemu.s ... ... ... -Wl,-b,a.out-i386-linux base/bios/bios.o env/video/vesabios.o \ -Wl,-b,elf32-i386 \ -Wl,-rpath,/usr/X11R6/lib -L/usr/X11R6/lib -lXext -lX11 -larch_linux_slang-elf -lm -lc ---------------------------------DONE compiling------------------------------- Now you must install DOSEMU. Make sure you are root and: make install make[2]: Leaving directory `/home4/naka/dosemu-0.99.13/src' make[1]: Leaving directory `/home4/naka/dosemu-0.99.13' % su Password: bash# bash# make install
% su bash# cp ./etc/dosemu.users.easy /etc/dosemu.users bash# ./first_test
Allocation completed: top at 0x12c8:0x0400 CONFIG.SYS not found KERNEL: Boot drive = C DOS-C compatibility 3.31 (C) Copyright 1995, 1996, 1997, 1998 Pasquale J. Villani All Rights Reserved DOS-C version 1.0 Beta 2 [FreeDOS Release] (Build 1937). DOS-C is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. For technical information and description of the DOS-C operating system consult "FreeDOS Kernel" by Pat Villani, published by Miller Freeman Publishing, Lawrence KS, USA (ISBN 0-87930-436-7). Running dosemu-0.99.13.0 compatibility, DosC patch 1 Process 0 starting: command.com "Welcome to dosemu 0.98!" C:\>dosemu が立ちあがることを確認したら、 c:\exitemu で終了します。
... mail::12:mail news::13:news uucp::14:uucp man::15:man dosemu::20:root,naka users::100:games nogroup::-2:
DEVICE=BILING.SYS DEVICE=JFONT.SYS /MSG=OFF DEVICE=JDISP.SYS /HS=LC rem DEVICE=JKEYB.SYS rem DEVICE=HIMEM.SYS
bash# vi /etc/dosemu.conf
$_video = "vga" # one of: plainvga, vga, ega, mda, mga, cga $_console = (1) # use 'console' video $_graphics = (1) # use the cards BIOS to set graphics $_vmemsize = (2048) # size of regen buffer $_chipset = "trident" # one of: plainvga, trident, et4000, diamond, avanceLinux コンソール上で[ALT]+[半角/全角]による漢字キーを有効にするため、 raw keyboard に設定します。 コメントに「たぶん危険」と書いてあるので気になるが^^;
$_rawkeyboard = (1) # bypass normal keyboard input, maybe dangerousLinux コンソール上で日本語 106キー配列を使う場合、 auto でもいいのですが、jp106 と指定した方が調子が良いように思えます。
$_layout = "jp106" # one of: finnish(-latin1), de(-latin1), be, it, us # uk, dk(-latin1), keyb-no, no-latin1, dvorak, po # sg(-latin1), fr(-latin1), sf(-latin1), es(-latin1) # sw, hu(-latin2), hu-cwi, keyb-user # hr-cp852, hr-latin2, cz-qwerty, cz-qwertz. # Or 'auto' (which tries to generate the table from # the current Linux console settings)xdos 上で "\" キーを X Window System 上で入力できるように、 「dosemu のキーテーブルを経由して変換しない」に設定。
$_X_keycode = (off) # on == translate keybord via dosemu keytables # or 'off' or 'auto'
(参考までに、しょうちゃんの /etc/dosemu.confを見てみる)
% su bash# ./set-hdimage checking you partitions, wait... ...done ** There seem not to be any bootable DOS partitions Do you want to continue any way using a bootable floppy as input? If yes then enter the device (e.g. /dev/fd0) else type ENTER /dev/fd0 Please insert a bootable DOS floppy for /dev/fd0 and type ENTER A normal MSDOS system has command.com as shell. If you have a different one, please enter the name, else just type ENTER We now try to generate a bootable hdimage into /var/lib/dosemu/hdimage.first and are calling ./dexe/mkdexe for this. You will be prompted to edit the configuration files (config.sys, autoexec.bat e.t.c). Enter the name of your favorite editor, if you type just ENTER, the editor given via the EDITOR enviroment variable will be used. Starting ... System type is MSDOS. sysfiles: io.sys, msdos.sys, command.com 1+0 records in 1+0 records out Copying io.sys Copying msdos.sys ... ... ... Copying xmode.exe ... done bash# ls -l /var/lib/dosemu/hdimage.first -rwxrwxr-x 1 root dosemu 1253376 Aug 22 16:34 /var/lib/dosemu/hdimage.first* bash# cp -p /var/lib/dosemu/hdimage.first /var/lib/dosemu/hdimage
% su bash# dos -Aこれでフロッピベースによる``日本語dosemu''が Linux コンソール上で 動くと思います。 なお、dosemu の終了は c:\exitemu もしくは、c: でドライブC に移ってから exitemu を入力します。
A:> sys c:※ hdimage を作る時に転送済のはずですが念のため
rem this sets up the redirector to look at the Linux root directory. rem this is probably not a good idea once you have dosemu installed device=c:\emufs.sys / device=c:\ems.sys FILES=30 STACKS=9,256 DOS=HIGH,UMB devicehigh=d:\windows\setver.exe devicehigh=d:\windows\biling.sys devicehigh=d:\windows\jfont.sys /MSG=OFF devicehigh=d:\windows\jdisp.sys /HS=LC REM devicehigh=d:\windows\jkeyb.sys /106 d:\windows\jkeybrd.sys devicehigh=d:\windows\ansi.sys devicehigh=d:\windows\kkcfunc.sys REM MS IME用の設定です. devicehigh=d:\windows\command\msimek.sys /A1 devicehigh=d:\windows\command\msime.sys /D*d:\windows\command\msimer.dic /Dd:\windows\command\msime.dic /C1 /N /A1 /UFc:\dos.old\msime.cfg
@echo off echo "Welcome to dosemu 0.98!" PROMPT $p$g PATH d:\windows\command;d:\uty;c:\ set temp=d:\tmp set path=%PATH%;d:\air set air=d:\air set tmp=d:\windows\dos set tz=jst-9 LH d:\windows\nlsfunc.exe d:\windows\country.sys JP
このような設定を行なって dosemu を dos コマンドで起動すると、 おなじみの Windows 95 起動画面が表示されます。 その後``日本語dosemu''のプロンプトを見ることができるでしょう。 なお、この Windows 95 起動画面を表示しないようにするには、 起動ドライブにある msdos.sys で Logo=0 を設定します。
[Options] Logo=0 BootGUI=0 ;FORMAT
それから、exitemu で dosemu を終了したとき、 画面が消えてしまうマシン(winbook pro 100C)もあるようです。 そのような時には、us コマンドで英語モードにしてから exitemu コマンドで終了すると良いようです。
上記の設定(jfont.sys,jdisp.sys)で、 X11 上においても日本語dosemu (xdos) が一応動きますが、 非常に遅く動作も少し変なので、あまり実用的ではありません。 遅い原因は、日本語フォントを``X11 でエミュレーションされた VGA ウィンドウ''上に ちまちま と描画しているためですが、 まだ VGA 16色モードのエミュレーションが良くないようです。
そこで日本語フォント展開を X11 自体で行なうように変更して、 dosemu 0.99.13 をX環境上で日本語化するパッチ があります、0.99.13 でトライしたい方は試してみてください。 これを使えば xdos を実用的な速度で日本語化できます。