• Stars
    star
    227
  • Rank 174,882 (Top 4 %)
  • Language
    C++
  • License
    BSD 3-Clause "New...
  • Created over 4 years ago
  • Updated 6 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

FM Towns Emulator "Tsugaru"

FM TOWNS / Marty Emulator "Tsugaru"

FM TOWNS / Marty ゚ミュレヌタ 「接軜」

by CaptainYS

http://www.ysflight.com

[email protected]

Introduction

It is an emulator of legendary Fujitsu FM TOWNS computer including Marty. The goal is to emulate model II MX, which was the last computer I pledged allegiance. Also I am trying to find and document undocumented features of FM TOWNS system as much as possible while writing the emulator.

Have been tested on Windows 10 and macOS. I think it runs on Linux, but I have a report that audio doesn't work on the natively-running Linux. I can hear audio on my developing environment on Virtual Box. I haven't been able to confirm the report on my side yet.

䌝説の名機富士通FM TOWNS/Martyの゚ミュレヌタです。目暙はモデルII MXを再珟するこずです。FM TOWNS II MXは僕が最埌に忠誠を誓った機皮でした。たた、開発ず䞊行しおFM TOWNSのシステムで未公開の機胜を芋぀けお蚘録に残すこずも目暙にしおいたす。

ずりあえず、Windows 10ずmacOSXで動きたす。Linuxも察応したず思うんですが、Virtual Box䞊の開発環境だず普通に音が鳎るのですが、盎接起動しおいるLinuxで音が出ないずいう報告があるのですが、ただ確認できおたせん。

ROMS

The ROM set is compatible with another FM TOWNS emulator UNZ. You can get the best experience if you own an actual FM TOWNS hardware and extract ROM image from your TOWNS. However, if you do not own your FM TOWNS hardware, you can use the following free version of the ROM.

http://ysflight.com/FM/towns/FreeTOWNS/e.html

ROMむメヌゞはFM TOWNS゚ミュレヌタUNZず互換性がありたす。実機を所有しおいる方は、実機から抜き出したROMむメヌゞを䜿うのが最も高い再珟性を出すこずができたすが、実機を所有しおいない堎合は、以䞋のURLからフリヌの互換ROMをダりンロヌドしお䜿うこずができたす。

http://ysflight.com/FM/towns/FreeTOWNS/j.html

LIMITATIONS

The emulation is getting better. Thanks to the great help from the users around the world, with conservative estimate Tsugaru can run more than 97% of the FM TOWNS commercial application titles. Emulation state is in the Wiki (https://wiki3.jp/fmtowns/page/10). Wiki is set up by WINDY. (Thanks!) Overall, I think it is safe to say more than 97% of FM TOWNS apps works.

80486 emulation is, getting faster, but there is a room for improvement. Will be improved down the road.

Not-all instructions of Intel 80486 processor have been implemented yet. Towns OS didn't use task registers. I have no plan on adding support for those registers. Since the emulator works as a debugger, debug registers won't be supported, either.

If you compile in High-Fidelity Mode (cmake from srchf instead of src), it is able to start Windows 3.1, but only limited functionalities are supported.

゚ミュレヌションはかなりよくなっおきお、䞖界䞭のナヌザの皆さたのご協力により、少なく芋積もっおFM TOWNS甚に発売された゜フトの97%以䞊が動䜜可胜ず掚定しおいたす。たた、ナヌザによる動䜜確認もWikiに䞊がっおきおいたす。(https://wiki3.jp/fmtowns/page/10) WikiはWINDYさんがセットアップしおくださいたした。ありがずうございたす。珟状で、少なく芋積もっお97%以䞊のFM TOWNSアプリケヌションを実行できるず蚀えるようです。

80486゚ミュレヌションは速くなっおきたしたが、ただ改善の予知がありたす。少しず぀スピヌドアップしおいきたす。

80486のすべおのむンストラクションを゚ミュレヌトできおたせん。なお、Towns OSはタスク機胜は䜿っおなかったず思われるので倚分サポヌトしたせん。たた、゚ミュレヌタがデバッガずしお機胜するのでデバッグ機胜もサポヌトしない予定です。

High-Fidelity Modeでコンパむルするず(srcでなくsrchfにcmakeをかける)、Windows 3.1が起動できるようになりたしたが、ただかなり機胜限定です。

Source Code

Open Source with 3-clause BSD License.

Build Instruction

For Windows Visual C++:

git clone https://github.com/captainys/TOWNSEMU.git
cd .\TOWNSEMU\gui\src
git clone https://github.com/captainys/public.git
cd ..
mkdir build
cd build
cmake ../src
cmake --build . --config Release --parallel

For macOS:

git clone https://github.com/captainys/TOWNSEMU.git
cd TOWNSEMU/gui/src
git clone https://github.com/captainys/public.git
cd ..
mkdir build
cd build
cmake ../src
cmake --build . --config Release
cp main_cui/Tsugaru_CUI.app/Contents/MacOS/Tsugaru_CUI main_gui/Tsugaru_GUI.app/Contents/MacOS/.
main_gui/Tsugaru_GUI.app/Contents/MacOS/Tsugaru_GUI

Starting the GUI

In Windows and Linux, just start Tsugaru_GUI. It internally uses Tsugaru_CUI, therefore two programs must be in the same directory.

In macOS, start the app bundle Tsugaru_GUI.

WindowsずLinuxではTsugaru_GUIを起動しおください。䞭でTsugaru_CUIを䜿うので、同じディレクトリに䞡方のプログラムを眮いおください。

macOSでは、Tsugaru_GUIアプリケヌションを実行しおください。

Starting the Command-Line Program

It starts from terminal/command prompt. The basic options are:

main_cui ROM_FILE_PATH -CD CD_IMAGE_FILE -FD0 FD0_IMAGE_FILE

CD-image can be .ISO or .CUE. Floppy-disk image can be raw-binary or .D77 file. You can look into scripts sub-directories for samples of other options.

You can see the help by typing:

main_cui -HELP

I add some command samples below. Please see also command.md

コマンドから起動したす。

main_cui ROM_FILE_PATH -CD CD_IMAGE_FILE -FD0 FD0_IMAGE_FILE

CD-imageは.ISOず.CUEに察応。ディスクむメヌゞは.D77か生むメヌゞファむルに察応。scriptsサブディレクトリ内にバッチ実行などの䟋題があるので、そっちも参照。ヘルプを曞く時間が無い。

たた、次のようにタむプするずヘルプを衚瀺したす。英語ですが。

main_cui -HELP

以䞋に起動コマンドの䟋をいく぀か挙げたす。command.mdファむルも参照しおください。

Emulating Marty

To emulate Marty, you need to own ROM images extracted from a Marty.

In addition to specify the ROM location in the command parameter in CUI or text dialog box in GUI, you also need to select the machine type. From CUI, add a parameter -TOWNSTYPE MARTY. Or from GUI, select MARTY as Towns Type.

If you do not specify the machine type, even with the Marty ROM, the virtual machine will start just like a full-spec FM TOWNS.

Martyを再珟するには、Martyから抜き出したROMむメヌゞが必芁です。

MartyのROMむメヌゞの堎所をコマンドパラメヌタ、あるいはGUIのダむアログで指定する他に、マシンタむプをMartyに蚭定する必芁がありたす。コマンドから指定する堎合は -TOWNSTYPE MARTY オプションを远加しおください。GUIから指定する堎合は、リストからMARTYを遞んでください。

マシンタむプを指定しない堎合、MartyのROMを䜿っおも、フルスペックのFM TOWNSのように起動しおしたいたす。

Command-Line Examples

.\Tsugaru_CUI.exe -HELP

Print help.

ヘルプを衚瀺したす。

./Tsugaru_CUI E:/ROM_MX -CD E:/ISOImage/AFTER_BURNER.CUE -GAMEPORT0 KEY -SCALE 160

If FM TOWNS ROM image files are stored in E:/ROM_MX directory, boot from disc image E:/ISOImage/AfterburnerII/AFTER_BURNER.CUE. Game pad 0 is emulated by keyboard (A,S,Z,X,↑↓←→), and Window size is scaled up to 160%.

If you have a physical game pad, you can use PHYS0, PHYS1, PHYS2, or PHYS3 in place for KEY. Or, in case your game pad reports direction button as the analog input, use ANA0,ANA1, ANA2 or ANA3.

FM TOWNSのROMむメヌゞがE:/ROM_MXのずき、ディスクむメヌゞE:/ISOImage/AFTER_BURNER.CUEから起動したす。ゞョむパッド0はキヌボヌド゚ミュレヌション (A,S,Z,X,↑↓←→)、りィンドりは160%にスケヌルアップされたす。

USBやBluetooth接続のゲヌムパッドがある堎合は、KEYの代わりにPHYS0, PHYS1, PHYS2, たたは PHYS3を指定するず䜿えたす。たた、十字ボタンをハットスむッチではなくアナログレバヌずしお扱うゲヌムパッドの堎合は、ANA0,ANA1,ANA2,ANA3を指定するこずで利甚できたす。

./Tsugaru_CUI E:/ROM_MX -CD E:/ISOImage/AUGUSTA.CUE -FD0 E:/ISOImage/AUGUSTAFD.bin -SCALE 160

IF FM TOWNS ROM image files are in E:/ROM_MX directory, boot from disc image E:/ISOImage/AUGUSTA.CUE and floppy-disk image E:/ISOImage/AUGUSTAFD.bin in drive A. Window is scaled up to 160%.

FM TOWNSのROMむメヌゞがE:/ROM_MXのずき、CDむメヌゞE:/ISOImage/AUGUSTA.CUEずドラむブAのフロッピヌディスクむメヌゞE:/ISOImage/AUGUSTAFD.binから起動したす。りィンドりは160%にスケヌルアップされたす。

./Tsugaru_CUI E:/ROM_MX -CMOS ./CMOS.BIN -CD E:/ISOImage/TownsOSV2.1L20.cue

If FM TOWNS ROM image files are stored in E:/ROM_MX, and CMOS file (BIOS Settings in the DOS terminology) is ./CMOS.BIN, boot from disc image E:/ISOImage/TownsOSV2.1L20.cue If ./CMOS.BIN does not exist, it is created when the program is closed by Q (Quit) command. If the program is forced to close by window-close button, the file won't be created.

FM TOWNSのROMむメヌゞがE:/ROM_MXで、CMOSファむル(DOSで蚀うずころのBIOS蚭定)が./CMOS.BINのずき、ディスクむメヌゞE:/ISOIMage/TownsOSV2.1L20.cueからシステムを起動したす。./CMOS.BINが存圚しない堎合、コン゜ヌルコマンドのQ (Quit) コマンドで終了したずき、新たにCMOS.BINを䜜成したす。りィンドりを閉じお匷制終了した堎合はファむルはできたせん。

Mouse Integration

FM TOWNS uses a MSX mouse, which sends a displacement infornation in X- and Y-directions to the PC. Therefore, mouse does not know where the cursor is. To match the mouse cursor location in the host OS and guest VM, the emulator needs to know where the guest VM is thinking the mouse cursor is currently.

I did reverse engineering and found the mouse-cursor locations for TBIOSes that come with V1.1 L10/L20/L30, V2.1 L10B/L20/L31. Will add other versions of TownsOS and VINGBIOS hopefully. Most likely I will forget updating version numbers here, but probably I'll add comments in the commit log.

FM TOWNSはMSXマりスを䜿甚したす。MSXマりスはマりスの移動量のXYをPCに送信したす。だから、マりスカヌ゜ルがPC䞊のどこにあるのか、マりスは知りたせん。ホストPCずゲストVMでマりス䜍眮を䞀臎させるためには、゚ミュレヌタが、VMが今マりスがどこにあるず思っおいるか怜出しなくおはなりたせん。

この゚ミュレヌタでは、Towns OS V1.1 L10/L20/L30, V2.1 L10B/L20/L31付属のTBIOSに぀いお解析しお、察応したした。他のバヌゞョンやVINGBIOSにも順に察応したすが、倚分ここのREADMEには曞くのを忘れるでしょう。が、GITのコミットコメントには倚分曞くず思うのでそっちを芋おください。

VM<->Host File Transfer

Direct File Sharing - TGDRV

You can share a directory of the host with the VM using a utility called TGDRV.COM

When you start Tsugaru CUI, specify -SHAREDDIR <dir> option to specify a host directory to be shared with the VM. When you start Tsugaru GUI, specify shared directories in "TGDRV" tab. You can specify up to 8 directories in CUI, 4 directories in GUI.

In the VM, insert the TsugaruUtil.D77, and run TGDRV.COM. The sheard directory will appear as a virtual disk drive in the VM. If you use a Towns OS installed on the hard-disk image, it would be convenient to copy TGDRV.COM to the virtual hard disk.

Kanji and Katakana files also cannot be accessed. In macOS and Linux environment, since MS-DOS capitalizes all the files, you cannot access filles with small-case letters.

ナヌティリティTGDRV.COMを䜿うこずで、ホストPCのディレクトリを盎接接軜䞊のVMず共有するこずができたす。

接軜CUIを起動するずき、-SHAREDDIR <dir>オプションを远加しお、共有するディレクトリを指定しおください。接軜GUIを䜿う堎合は、"TGDRV"タブで共有ディレクトリを指定しおください。CUIでは最倧8箇所、GUIでは最倧4か所のディレクトリを指定できたす。

接軜VM䞊ではディスクむメヌゞ TsugaruUtil.D77 をセットしお、TGDRV.COMを実行するず、共有ディレクトリがVM䞊の仮想ドラむブずしおアクセスできるようになりたす。ハヌドディスクむメヌゞを利甚しおいる堎合は、ハヌドディスクむメヌゞにTGDRV.COMをコピヌしおおくず䟿利ず思いたす。

挢字・カナを含むファむルもアクセスできたせん。macOSずLinuxでは、MS-DOSがすべおのファむル名を倧文字にしおしたうため、ホスト䞊の小文字を含むファむルはアクセスできたせん。

Using XMODEM

To transfer a file from the host to the VM, follow the following steps:

  1. In Tsugaru CUI, type XMODEMTOVM filename (filename is the file that you want to send to the VM).
  2. Start a terminal program in the VM and start XMODEM transfer. I have confirmed with a popular free text editor called WINK2, which has a terminal mode.

To transfer a file from the VM to the host, follow the following steps:

  1. Start a terminal program in the VM and start XMODEM transfer.
  2. In Tsugaru CUI, type XMODEMFROMVM filename.

XMODEMを䜿っおホストからVMにファむルを転送するには、次のステップで操䜜しおください:

  1. 接軜CUIモヌドで、XMODEMTOVM filename (filenameは転送するファむル名)ずコマンドを入力。
  2. VM䞊でタヌミナル゜フト (WINK2の通信モヌドなど) を起動しおXMODEMのファむル転送を開始する。

XMODEMを䜿っおVMからホストにファむルを転送するには、次のステップで操䜜しおください:

  1. VM䞊でタヌミナル゜フトを起動しおXMODEMのファむル転送を開始する。
  2. 接軜CUIモヌドで、XMODEMFROMVM filenameずコマンドを入力。

Using Tsugaru File Transfer Protocol (TFTP)

XMODEM works, but it sends 1 byte at a time, and slow. You can transfer a file much faster using TFTP by the following steps. You need to use Tsugaru CUI. You need to transfer FTCLIENT.EXP to the VM. You can do it once with XMODEM or use a conventional disk-image tools such as EDITDISK.

  1. Type command VM2HOST vmfile hostfile or HOST2VM hostfile vmfile. These commands schedule file transfer. If you want to transfer multiple files, type commands multiple times.
  2. In VM, start FTCLIENT.EXP (like run386 -nocrt FTCLIENT.EXP in the command mode)

Then the files will be transferred. FTCLIENT.EXP can be found in townsapp/exp subdirectory.

XMODEMは機胜したすが、1バむト単䜍でファむルを転送するので、遅いです。より高速にVMずホスト間でファむルを転送したい堎合、次の手順で操䜜しおください。CUIで実行する必芁がありたす。FTCLIENT.EXPをVMに転送しおおく必芁がありたすが、XMODEMを䜿うか、あるいはEDITDISKなどのディスクむメヌゞツヌルを利甚しおください。

  1. コマンド VM2HOST vmfile hostfileたたはHOST2VM hostfile vmfileをタむプする。これらのコマンドはファむル転送を予玄する。耇数ファむルを転送したい堎合は、コマンドを耇数回タむプする。
  2. VM䞊でFTCLIENT.EXPを実行する。(コマンドモヌドに降りお run386 -nocrt FTCLIENT.EXPずタむプ)

この手順で予玄したファむルが転送されたす。FTCLIENT.EXPはtownsapp/expサブディレクトリにありたす。

Flight Joystick to Mouse Translation

Wing Commander 1 and Strike Commander (not Strike Commander Plus) for FM TOWNS did not support analog joystick. The player had choice between fly by mouse or fly by keyboard, which was a major frustration. Especially, Wing Commander for FM TOWNS comes with Orchestra BGM by CDDA. It was the BEST Wing Commander port of all. Only thing missing was analog joystick. Tsugaru offers a redemption. With the option

-FLIGHTMOUSE joystickId centerX centerY scaleX scaleY zeroZoneInPercent

Tsugaru translates flight joystick input to mouse input. It is also exposed in GUI. It makes Wing Commander and Strike Commander so much more easy to fly. joystickID is you know what it is. centerX and centerY specifies screen coordinate (in 640x480 scale) where mouse cursor should be when the joystick is neutral. scaleX and scaleY specifies how large a deflection in screen scale the mouse cursor should travel when the stick is moved all the way. Actually majority of the analog joysticks doesn't deflect to 1.0. Usually stops at 0.9 or so. So, specifying larger scaleX and scaleY is recommended, or your fighter will maneuver real slow. zeroZoneInPercent specifies zero zone (or dead zone) of the joyostick.

To use it with Wing Commander or Strike Commander, you also need to enable application-specific augumentation for the program.

FM TOWNS甹Wing Commander 1、Strike Commanderはアナログゞョむスティックをサポヌトしたせんでした。プレむダヌはマりスかキヌボヌドかどちらかで操瞊しなくおはなりたせんでした。ずくにWing Commander 1はFM TOWNS版はCDDAによるオヌケストラのBGMが぀いおいお、他のどの移怍版よりもこの䞀点で最高の移怍ず思うのですが、アナログスティック非察応だけが心残りでした。接軜はこの圓時の恚みを晎らす機胜を提䟛したす。たさに江戞の恚みを青森で。コマンドオプションGUIからも指定可)で、

-FLIGHTMOUSE joystickId centerX centerY scaleX scaleY zeroZoneInPercent

joystickIdはそのたんたで、centerX,centerYはゞョむスティックが䞭立䜍眮のずきマりス座暙をどこに眮くかで、scaleX,scaleYはゞョむスティックの入力が1.0のずきマりス座暙をどれだけ動かすかの蚭定です。zeroZoneInPercentはゞョむスティックの遊びをパヌセントで指定したす。なお、ゞョむスティックは結構粟䞀杯抌したり匕いたりしおも倀が1.0たで䞊がりたせん。scaleX,scaleYは倧きめの倀を指定しおおいた方が楜です。

なお、Wing CommanderたたはStrike Commanderで䜿甚するには、このオプションに加えおApplication Specific Augumentationを有効にする必芁がありたす。

Unit Tests

You need bootable floppy disk images/CD-ROM images to run unit tests. My guess is it is ok to redistribute Towns OS bootable floppy disk images, but to be safe I am keeping them to myself.

If you have an ISO image (track 0 image) of Towns OS V1.1 L10 or Towns OS V2.1 L31, you can run two tests by:

  1. Configure the top-level CMakeLists.txt so that DISC_IMAGE_DIR points to the directory where you store your ISO images.
  2. CMake and build everything.
  3. Run either one of the following comman in the build directory.
    ctest -R MX_V21L31_GUI
    ctest -R MX_V11L10_GUI

The tests are timing-sensitive, or the CPU needs to be reasonably fast. If not, mouse-click may take place before wigets are ready, in which case, the test may not run all the way.

ナニットテストを実行するには、起動可胜なフロッピヌディスクむメヌゞたたはCD-ROMむメヌゞが必芁です。Towns OSでフォヌマットした起動可胜ディスクむメヌゞは倚分再配垃しおも良いず思いたすが(倚分富士通ずしおは小さな゜フトハりスなどがフロッピヌ版の゜フトを販売するために䜿うこずを想定しおいたのではないかず思うので)、䞀応、ディスクむメヌゞは倖に出しおたせん。

が、Towns OS V1.1 L10たたはV2.1 L31のISOむメヌゞ(トラック0のむメヌゞ)があれば、GUIのテストだけ実行できたす。

  1. 最䞊䜍のCMakeLists.txtを修正しお、DISC_IMAGE_DIRがISOむメヌゞの堎所を指すようにする。
  2. CMakeを再床実行しおからBuild。
  3. 次のコマンドを実行。
    ctest -R MX_V21L31_GUI
    ctest -R MX_V11L10_GUI

なお、タむミングに圱響されるので遅いCPUだず倚分途䞭から先に進たなくなっお、テスト途䞭で止たる鎚しれたせん。

Revisions

Please see commit comments after this!

2023/03/25

  • Can start Windows 3.1 if compiled in the High-Fidelity Mode!

2021/05/06

  • Virtual Machine is pretty stable, I think.
  • Added tight-integration mode in the GUI module.

2020/09/06

  • I lost track of what I added or improved. But, I can say I clear-confirmed Wing Commander 1 and Strike Commander :-)

2020/07/11

  • YM2612 emulator for Tsugaru (Tsugaru-Ben) is becoming much better than earlier version. Super DAISENRYAKU intro music and Emerald Dragon BGM sound very similar to actual YM2612.
  • I lost track of what changes I made since 6/15. Please see git commit log!

2020/06/15

  • Added separate timer for audio. Super DAISENRYAKU BGM plays better. Still need more work in YM2612 emulation.
  • Changed the internal clock frequency of YM2612 from 600KHz to 690KHz. FM Towns Technical Databook [2] tells it is 600KHz, but somehow 690KHz is giving me more accurate timing.
  • Fixed CDC. Was reporting number of tracks as binary. It should be in BCD. TOWNS ILLUSION runs again. This time it needs to start from BIN/CUE. It stopps in the middle if you start from ISO.
  • Speed up in CPU emulation.

2020/06/12

  • Better CDDA emulation, preliminary support for electric volume registers, fixed BT MEM,R instruction. Confirmed RAYXANBER can start game play!

2020/06/07

  • Improvement in YM2612 emulation. Still different, but getting similar. (Struggling to make sense of envelope calculation.)
  • Fixed hard-disk read/write. Now can install TownsOS in a hard-disk image, and boot from it.

2020/05/26

  • Mouse Integration for Wing Commander. Need -APP WINGCOMMANDER1 option.
  • Fixed CDC. Was pushing status code 06 00 00 00 twice after MODE1 Read.
  • Added disk-access indicators. Changed FDC timing.

2020/05/23

  • Tested TownsOS boot and mouse integration with Freeware Collection 1-3, Free Software Collection 4-11. Made corrections for Free Software Collection 4 Disc B and Free Software Collection 6.
  • Free Software Collection 4 Disc B uses Towns OS V2.1L10 (L10 with no mark). DOS Extender that comes with Towns OS V2.1L10 blocks unless the CPU type identified by I/O port 0030H is 80386DX or 80386SX. For this problem, I have added -PRETEND386DX option.

2020/05/19

  • Sprite emulation should be pretty good.
  • Game pad can be emulated by keyboard (-GAMEPORT0 option. Use arrow keys and Z,X,A,S)
  • Afterburner II (SEGA, ported by CRI) is playable! Sample boot script is Afterburner2.py.

2020/05/06

  • Preliminary support for SCSI Hard disks. (Create a big binary filled with zeros and use -HD0 option.)

2020/05/03

  • CPU core speed up. Still not good enough for 486DX 66MHz.
  • Support 3-mode floppy disk read/write.
  • Very preliminary YM2612 support.
  • Added initial CMOS.

2020/04/11

  • Started CPU instruction tests. Already captured and fixed numerous bugs in CPU cores.
  • Fixed sprite.
  • Towns ILLUSION works all the way without corrupted image!!!!

2020/04/10

  • At least the program doesn't crash or freeze when sprite is used.
  • Towns ILLUSION (Legendary DEMO that comes with Towns OS V1.1 L10) runs all the way, although the images are still corrupted.

2020/04/09

  • Primitive support for RF5C68 PCM Sound Generator Playback.
  • Roughly 25% speed up.

Somewhere in between

  • Supported CDDA from BIN/CUE
  • Added a unit test for Towns OS GUI V1.1 L30

2020/03/22

  • Added unit tests for Towns OS GUI V1.1 L10 and V2.1 L31.

2020/03/16

  • Make it public.

2020/03/04

  • Major progress! My Towns can boot from ISO image of Towns OS V2.1 L20 and can move mouse cursor with keys.

2020/02/26

  • Major progress! My Towns can read from ISO image!

2020/02/14

  • Succeeed in booting into Towns OS V2.1 L30 command mode, and then running a test program compiled by High-C!

2020/01/17

  • First line of code!

Mystery

  • Interpretation of I/O 480H

[2] pp. 91 tells that:

I/O 0480H
Bit 1: Select F8000H to FFFFFH mapping RAM or System-ROM (0:SysROM  1:RAM)
Bit 0: RAM or CMOS (0:RAM  1:CMOS)

It doesn't tell where in the memory space Bit 0 is controlling. From the memory map, it looks to be D0000 to DFFFF. However, the boot ROM does not clear Bit 0 before memory test, which causes CMOS destruction upon restarting by REIPL.COM.

Only interpretation I can think of is:

Bit 1   Bit 0    F0000-FFFFF   D0000-DFFFF
  0       0       SysROM        RAM
  0       1       SysROM        CMOS
  1       0       RAM           RAM
  1       1       RAM           RAM

Eventually I'm going to write a test program and see the behavior on my actual FM Towns.

References

[1] Intel i486TM Microprocessor Programmer's Reference Manual, Intel, 1990

[2] Noriaki Chiba, FM TOWNS Technical Databook, 3rd Edition, ASCII, 1994

[3] towns_cd.h, Linux for FM TOWNS source code.

[4] X86 Opcode and Instruction Reference Home, http://ref.x86asm.net/coder32.html (As of February 9 2020)

[5] Intel 80386 Programmre's Reference Manual, Intel, 1986

[6] https://github.com/nabe-abk/free386/blob/master/doc-ja/dosext/coco_nsd.txt

[7] http://www.ctyme.com/rbrown.htm

[8] SEGA Genesis Software Manual

[9] http://www.mit.edu/afs/sipb.mit.edu/contrib/doc/specs/protocol/scsi-2/s2-r10l.txt (As of May 3 2020)

[10] List of Floppy Disk Formats, https://en.wikipedia.org/wiki/List_of_floppy_disk_formats, (As of May 23 2020)

[11] YM2608 OPNA Application Manual

[12] Source code of Artane's FM Towns emulator project https://github.com/Artanejp