____ ____ _______________________ _____ j8888b j8888b .@88888888888888888888888b j88887 j888888b j888888b @8888888888888888888888888b j88887 j88888888b j88888888b @888( v8888b j88887 j88887v8888bj88887v8888b `@88888888888888@. v8888v88887 j88887 v888888887 v8888b "888888888888888@. j8888Y8888b j88887 v8888887 v8888b_____________)88888@ j88887 v8888b j88887 v88887 v8888888888888888888888@' j88887 v8888b j88887 v887 v8888888888888888888@' j88887 v8888b ~~~~~~ ~~~~ ~~~~~~~~~~~~~~~~~~~ ~~~~~~ ~~~~~~ E M U L A T O R for MS-DOS version 0.99b1 (c) Copyright 1994 CJS TABEL OF CONTENTS ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ A LITTLE WORD FROM THE AUTHORS . . . . . . . . . . . . . . . . . 1 LICENSE AGREEMENT . . . . . . . . . . . . . . . . . . . . . . . . 2 FILES IN THE PACKAGE: FILES.DOC . . . . . . . . . . . . . . . . . 3 WHY/HOW-TO REGISTER . . . . . . . . . . . . . . . . . . . . . . . 4 MSX-1 Emulator Registration Form . . . . . . . . . . . . . . . 5 MSX-1 EMULATOR SUPPORT AND DISTRIBUTION . . . . . . . . . . . . . 6 WHERE TO GET MSX SOFTWARE AND INFORMATION . . . . . . . . . . . . 6 QUICK REFERENCE SHEET . . . . . . . . . . . . . . . . . . . . . . 8 REQUIREMENTS, INSTALLATION AND STARTING THE EMULATOR . . . . . . 9 System requirements . . . . . . . . . . . . . . . . . . . . . . 9 Installation . . . . . . . . . . . . . . . . . . . . . . . . . 9 Installation program . . . . . . . . . . . . . . . . . . . . . 9 Starting the emulator . . . . . . . . . . . . . . . . . . . . . 9 Command line switches . . . . . . . . . . . . . . . . . . . . . 10 Notes on Expanded Memory Managers . . . . . . . . . . . . . . . 10 Using EMM386.EXE . . . . . . . . . . . . . . . . . . . . . . 11 Using QEMM . . . . . . . . . . . . . . . . . . . . . . . . . 11 Note on SHARE/FCBS= . . . . . . . . . . . . . . . . . . . . . . 11 THE CTRL-BREAK MENU . . . . . . . . . . . . . . . . . . . . . . . 12 THE (MSX) KEYBOARD . . . . . . . . . . . . . . . . . . . . . . . 13 Mapping of MSX keys to the PC keyboard . . . . . . . . . . . . 13 Additional key functions . . . . . . . . . . . . . . . . . . . 13 DISK EMULATION . . . . . . . . . . . . . . . . . . . . . . . . . 14 High and low level disk I/O . . . . . . . . . . . . . . . . . . 14 MSX booting sequence & CTRL/SHIFT while booting . . . . . . . . 14 Booting MSX-DOS from harddisk . . . . . . . . . . . . . . . . . 15 Drive mappings: DRIVES.TBL . . . . . . . . . . . . . . . . . . 15 SUPPORTED MSX FLOPPY DISK TYPES . . . . . . . . . . . . . . . . . 16 MSX EMULATOR SPECIFIC BASIC COMMANDS . . . . . . . . . . . . . . 17 MSX EMULATOR SPECIFIC MSX-DOS COMMANDS . . . . . . . . . . . . . 17 MSX EMULATOR SPECIFIC SYSTEM CALLS . . . . . . . . . . . . . . . 18 MegaROM/SCC . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 The /E command line switch . . . . . . . . . . . . . . . . . . 19 Converting MegaROMs to files . . . . . . . . . . . . . . . . . 19 Loading other ROM (files) . . . . . . . . . . . . . . . . . . . 20 NOTES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 SOME IMPORTANT MSX-BASIC COMMANDS . . . . . . . . . . . . . . . . 22 UTILITIES IN THE MSX EMULATOR PACKAGE . . . . . . . . . . . . . . 23 MSXDUMP . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 SS2DS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 MSXBOOT . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 GETROM.BAS . . . . . . . . . . . . . . . . . . . . . . . . . . 23 SPLITROM.EXE . . . . . . . . . . . . . . . . . . . . . . . . . 23 GETTINGS PROGRAMS TO WORK . . . . . . . . . . . . . . . . . . . . 24 HOW THE HEX DOES IT WORK, EMULATING A (MSX) COMPUTER ? . . . . . 25 MSX-1 FEATURES . . . . . . . . . . . . . . . . . . . . . . . . . 26 ADDITIONAL MSX EMULATOR FEATURES . . . . . . . . . . . . . . . . 27 SLOT (MEMORY) LAYOUT . . . . . . . . . . . . . . . . . . . . . . 28 THE MSX ANIMATION . . . . . . . . . . . . . . . . . . . . . . . . 29 MSX-BASIC REFERENCE . . . . . . . . . . . . . . . . . . . . . . . 30 The 'editor' . . . . . . . . . . . . . . . . . . . . . . . . . 30 NB: To be completed in the next release Constants and variables . . . . . . . . . . . . . . . . . . . . . 31 Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 Arithmic . . . . . . . . . . . . . . . . . . . . . . . . . . 31 Relational . . . . . . . . . . . . . . . . . . . . . . . . . 31 Logical . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . 31 MSX-BASIC Statements . . . . . . . . . . . . . . . . . . . . . 31 TROUBLE SHOOTING GUIDE/QUESTIONS & ANSWERS . . . . . . . . . . . 35 A LITTLE WORD FROM THE AUTHORS ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Here we are again with the same, but completely rewritten, product: the MSX-1 emulator. Many of you have asked us how we're doing on the development of the MSX-2 emulator. Well: this MSX-1 emulator is an extract of the MSX-2 emulator we're building. We're still busy because we want to do it right this time. The MSX-1 emulator we distributed before (latest version 0.3beta) was such a mess and contained that many bugs that we decided to start all over again. Why go to all this trouble ? Read on... The MSX-1 emulator was merely a fun project at first but at the time we released version 0.3beta we where already flooded with phone calls and (electronic- and snail)mail. We decided to develop a MSX-2 emulator but this time it had to be done properly. So we dumped all old code in an archive (it has educational value: how NOT to program a complete project in assembler by 3 persons) and started from scratch again. This time all code is ours and it has been tested over and over again. The Z80A emulator for example is nearly perfect (NOTHING is ever perfect): all unofficial instructions and flags that we could think of have been implemented. We verified it all with a real Z80A. This has taken us weeks (full days work) and it's only a part of the emulator (an important part though) ! The same can be said for the sound, video, memory, disk, etc. emulation. The emulator is COMPLETELY written in assembler and we've already created about one megabyte of assembler sources. It's fairly modular and that's very handy because we three work on the project simultaniously. We decided to release a version 0.99b1 of the MSX-1 emulator to satisfy at least a big part of the 'audience'. The product you now have really works (maybe that's what M*cr*s*ft said at the release of MS-DOS 2.0 too, but nevertheless :-). Furthermore you can all more-or- less see at what stage we are in developing the new emulator. There's lots more of course in the MSX-2 emulator and we've done most of it already. We don't expect to get rich by making the emulator shareware. We merely wanted something in response for the tremendious amount of time (and some money) we've invested in this product. We like to thank Adri Mathlener for the very good looking animation he created for us (look for MSXANI.EXE and run it !). There are so many people that have contributed with info, bug reports, suggestions, cheers, nice letters and messages, etc. etc. that we can't name them all. But we do want to thank you all (you know who you are) for everything so far. As you read we probably are working on the MSX-2 emulator and we hope to finish it as soon as possible. Please understand that we've other projects to finish at the same time too (not to speak that we have some social life left and we intend to keep the bare remains of it :-) Grtx from Groningen (emulator city), The Netherlands: Albert Siersema Ronald Gorter Peter Kelders 1 LICENSE AGREEMENT ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ þ "MSX-1 emulator" and "The MSX-1 emulator package" refer to all the files in the official MSX-1 emulator ShareWare distribution archive. See FILES.DOC for a detailed description of the files in the package þ The COMPLETE MSX-1 emulator package (as listed in FILES.DOC) is copyrighted 1994 by the CJS and may be distributed under the ShareWare concept provided no fee is charged and the package is unmodified þ The MSX-1 emulator may only be used in accordance with the terms set out in this license agreement þ CJS is in no way responsible for any damage directly or indirectly caused by the (use of the) MSX-1 emulator package. þ The MSX-1 emulator package is distributed under the ShareWare concept which means that you are only entitled to use the unregistered shareware version for a trial period of 7 days. After this period you MUST register the MSX-1 emulator. For details about registering see HOW TO REGISTER. Remember that you will violate federal laws if you won't follow up this term and that the support for the MSX-1 emulator will only exist if you register ! þ Registrations are valid for the current and any future versions of the MSX-1 emulator subject to any special licensing conditions attached to future versions. þ CJS is not obligated to provide future versions of or support for the MSX-1 emulator þ Reverse-engineering and/or modifying of the MSX-1 emulator is strictly prohibited þ It is strictly prohibited to include the MSX-1 emulator in or as part of a software library which is distributed for money without prior written permission of the CJS þ All brands and product names named in this documentation are trademarks or registered trademarks of there respective holders þ The MSX-1 emulator may not be used in any unlawfull manner 2 FILES IN THE PACKAGE: FILES.DOC ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ You should at least have following files. If not stop now and get a complete copy of the MSX emulator (read below for addresses). FILES.DOC This file README.1ST IMPORTANT: READ THIS ! README.NL Dutch README, Dutch people should read this ! MSX1EMUL.DOC Documentation for the MSX-1 emulator REGISTER.FRM Registration form: print it and fill it out WHATS.NEW What's new ? MSX1.EXE MSX-1 emulator executable MENU.PAK Digitized background image for the CTRL-BREAK menu DRIVES.TBL Drive mappings file (check it out before starting the emulator) GETROM.BAS MSX BASIC program to fetch ROMs from a MSX machine SS2DS.COM Fix single sided (360Kb) 3.5" disks to read/write in MS-DOS MSXDUMP.COM Dump raw images of MSX disks MSXBOOT.COM Fix boot sector of MSX disks SPLITROM.EXE Split ROM files into 8Kb parts 3 WHY/HOW-TO REGISTER ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ The MSX-1 emulator is ShareWare. As can be read in the LICENSE AGREEMENT you have to register the emulator if you're using it beyond the 7 days trial period. We won't get rich by you registering, but it helps us repay the investments in MSX and other hardware we've done to create the MSX emulator. The MSX-1 emulator cost us about two years work to really complete and we're still working on the MSX-2 emulator. Consider (besided the other reasons) your registration as a token of appreciation for our work and encouragement for us to work on the MSX2 emulator. And there's more: when you register your MSX-1 emulator NOW you will get the Registered version of the MSX-2 emulator for FFFFF RRRR EEEEE EEEEE F R R E E FFF RRRR EEE EEE F R R E E F R R EEEEE EEEEE In short this is what you get when you register: þ FREE update of future MSX-1 emulator v1.0 þ FREE update of future MSX-2 emulator þ (laser)printed and bound manual The updates will be sent to you on disk. SHAREWARE version: This version is for systems run from a non-commercial site: a private residence at which no commercial activities are conducted. Fees are DFL50 (Dutch guilders) or $30 (U.S. dollars) or equivalent for every seperate MSX-1 emulator that is used (see LICENSE AGREEMENT) COMMERCIAL version: When the MSX-1 emulator is run at a commercial, federal or educational site you must register the MSX-1 emulator as COMMERCIAL. Fees are DFL75 (Dutch guilders) or $40 (U.S. dollars) or equivalent for every seperate MSX-1 emulator that is used (see LICENSE AGREEMENT) þ Cheques and money orders should be made payable to: Ronald Gorter Kleine Bergstraat 31 9717 NA Groningen The Netherlands þ Please include either a InterNet or FidoNet E-Mail address or a stamped, self-addressed envelope so that receipt of your payment can be acknowledged. þ Use the registration form on the next page (or use REGISTER.FRM) and fill it out correctly. Send the form and the registration fee to: Postbank giro number 7216165 Ronald Gorter Kleine Bergstraat 31 9717 NA Groningen The Netherlands 4 ---=== MSX-1 Emulator Registration Form ===--- Name _______________________________________________________ Company Name _______________________________________________* (Name and Company Name have a maximum length of 50 characters: Name max. 50 chars and Company Name max 50 chars) Voice telephone number(s) __________________________________ Postal Address : ____________________________________________________________ ____________________________________________________________ ____________________________________________________________ E-Mail (InterNet/FidoNet) Address(es): ------------------------------------------------------------ Registration fee enclosed _______, for ______ copies Disk format: [ ] 3.5" 1.44Mb [ ] 3.5" 720Kb [ ] 5.25" 1.2Mb [ ] 5.25" 360Kb * if you're an indivual (not a company) leave this field blank 5 MSX-1 EMULATOR SUPPORT AND DISTRIBUTION ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ The latest shareware version of the MSX-1 emulator is always available on our main support BBS (see below) and we will try to distribute new versions as wide as possible. Main support BBS: Filosoft/PROGRAMMERS BBS The Netherlands (Europe) Sysop: Albert Siersema (+31)50-412288 upto 14400bps (V42) (+31)50-426071 upto 2400bps (also V.23: 1200/75) Dutch readers: 050-412288 or 050-426071 FidoNet : 2:282/517 InterNet: prgbbs.idn.nl FidoNet: Albert Siersema at 2:282/517 InterNet: appie@prgbbs.idn.nl Our address is: Ronald Gorter Kleine Bergstraat 31 9717 NA Groningen The Netherlands See also "WHERE TO GET MSX SOFTWARE AND INFORMATION" below. WHERE TO GET MSX SOFTWARE AND INFORMATION ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ This list is still very small. We intend to expand it with more information but we need your help on that. So if you have a BBS that supports MSX, InterNet addresses, Computerclub addresses, etc.: let us know. Bulletin Board Systems (BBS): þ HCC MSXgg BBS (sysop: Ben Doedens) +31-5978-18132 (for Dutch readers: 05978-18132) FidoNet : 2:500/102 MSXnet : 80:81/0 þ RoefSoft (sysop: Ruud Doek) +31-4760-76914 (for Dutch readers: 04760-76914) FidoNet : 2:284/132 MSXnet : 80:80/0 þ MSX BBS (sysop: Wiebe Weikamp). Online: 21:00-09:00 C.E.T. +31-8340-33729 (for Dutch readers: 03840-33729) þ BBS Waterland (sysop: Joop Stokvis) +31-2990-40202 (for Dutch readers: 02990-40202) FidoNet : 2:280/802 þ Miami Beach BBS (sysop: Robert Bleumer) +31-80-732083 (for Dutch readers: 080-732083) FidoNet : 2:283/606 6 þ UMF #1 (sysop: Roald Andersen) +31-2502-47879 (for Dutch readers: 02502-47879) InterNet address of sysop: v942245@si.hhs.nl þ Sunrise BBS (sysop: Haiko de Boer) +31-5126-3458 (for Dutch readers: 05126-3458) InterNet: þ nic.funet.fi Anonymous FTP. See directory /pub/msx FTP to nic.funet.fi Login as ftp or anonymous Supply your e-mail address as password þ MSX mailing list mail to msx-request@stack.urc.tue.nl with help as the subject þ MSX mailing list WWW (World Wide Web) page hhtp://www.stack.urc.tue.nl/~wiebe þ alt.comp.msx UseNet newsgroup FidoNet: þ MSX.028 Dutch FidoNet echomail area Clubs: þ MSX Club Drechtsteden Slangenburg 138 3328 DR Dordrecht The Netherlands Tel. 078-146378 þ MSX & PC Computer Club Nijmegen Meetings every third (3) saturday of the month in: "Wijkgebouw VillaNova" 3e van Hezewijkstraat 2 Nijmegen The Netherlands þ CGG west brabant (C. Hopstaken) Pijnboomstraat 10 4731 AT Oudenbosch The Netherlands Tel: 01652-12446 Meetings in: Restaurant "de Beuk" Beukenlaan 2 Oudenbosch The Netherlands Tel: 01652-14609 þ Stichting Sunrise Magazine & latest MSX soft- and hardware Stichting Sunrise P.O. Box 178 1530 AD Wormer The Netherlands InterNet E-Mail: sboer@econ.vu.nl 7 QUICK REFERENCE SHEET ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Although we STRONGLY recommend that you read the rest of the documentation here's a quick list of usefull things. Installation ÄÄÄÄÄÄÄÄÄÄÄÄ Get MSX ROMs with GETROM.BAS. ROMs used in previous versions of the emulator can be used again. MSX-2 ROMs can also be used. Be sure that you have installed a EMS manager like EMM386.EXE or QEMM. We advice you to read "Notes on Expanded Memory Managers" below. Commandline switches ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ þ /? Show help screen þ /D Default to low level disk I/O þ /Rx Installed memory mapper memory x=1..6: 1=128,2=256,3=512, etc þ /V Verbose: show debug information þ /Mp Set mouse at MSX joystick port p (1 or 2), or p=0 for disable þ /B Boot MSX-DOS from harddisk (default drive) þ /T MSX-emulator on top-speed þ /E Load MegaROM. See the "MegaROM/SCC" section for details þ /L Enable low speed 'LED' MSX/Special keys ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ þ Function keys like MSX keyboard: Non shifted F1-F5 MSX keys Shifted F1 to F5 F6-F10 MSX keys þ GRAY PageDown MSX SELECT key þ BREAK/CTRL-BREAK MSX STOP/CTRL-STOP keys þ GRAY End MSX GRAPH key þ GRAY PageUp MSX CODE key þ CTRL-ALT-DEL Reboots the MSX þ CTRL-ALT-INS The same but reloads ROMs, cleans MSX RAM þ F12 Exit to MS-DOS þ CTRL-BREAK Invokes the menu (see "CTRL-BREAK MENU") 8 REQUIREMENTS, INSTALLATION AND STARTING THE EMULATOR ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ System requirements ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ The MSX-1 emulator needs at least: þ 80386 CPU (or 80486 or Pentium) þ MS-DOS 2.0 or higher þ Installed Expanded Memory Manager like EMM386.EXE or QEMM or real EMS wih at least 384Kb free EMS memory þ VGA compatible display adapter þ 1 diskdrive or harddisk The MSX-1 emulator has support for: þ AdLib or compatible soundcards (including SoundBlaster) þ Mouse via mouse driver We recommend at least a 40Mhz 80386-DX to get the MSX-1 video at the same speed as a real MSX. Installation ÄÄÄÄÄÄÄÄÄÄÄÄ The MSX-1 emulator needs the ROMs (Read Only Memory) of the original MSX to work. The Basic I/O System (BIOS), MSX-BASIC and disk system are in those ROMs. Because these ROMs are (c) Copyrighted and we (still) have no license for the distribution of the ROM we can't distribute the ROM files with the MSX-1 emulator package (rumour is however that some BBS's do distribute the ROM files, even those in the list above). NB: If you already have the ROM files for older versions of the MSX-1 emulator there's no need to get new ROM files. We however wrote a MSX-BASIC program that you can use to 'extract' the ROM files from a MSX-1 machine. For the BIOS and MSX-BASIC you can now also use MSX-2 ROMs. To get the ROM files simply run GETROM.BAS on your MSX and copy the files in the same directory where MSX1.EXE resides. Check out DRIVES.TBL (see "DISK EMULATION"). Be sure to have all the files of the archive and the ROM files in the same directory. Installation program ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ There will be a installation program in the next release that allows you to edit your own keyboard layouts, drive mappings and emulator defaults. Starting the emulator ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Type MSX1 [+Return] (The [+Return] indicates pressing Return/Enter after typing MSX) to start the emulator. 9 If the emulator complains that not all ROMs could be loaded don't panic: þ It won't work if MSXBIOS.ROM and/or MSXBASIC.ROM are absent þ When using MSX-2 ROMs MSX2SUB must be present. When using MSX-1 ROMs MSX2SUB.ROM is not necessary. þ MSXDISK.ROM isn't necessary but the emulator will be quite useless without it (no disk support). Command line switches ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ The exact format for starting the MSX-1 emulator is: MSX1 [/[?|D|Rx|V|Mp|B|T|E|L]] Where þ /? Show help screen þ /D Default to low level disk I/O See "DISK EMULATION" for more details þ /Rx Installed memory mapper memory x=1..6: 1=128,2=256,3=512, etc Allows you to specify the size of the memory mapper (installed RAM in your emulated MSX). x can be: 1 128 Kb 2 256 Kb 3 512 Kb 4 1024 Kb (1 Mb) 5 2048 Kb (2 Mb) 6 4096 Kb (4 Mb) If you have less free EMS then the specified size requested the emulator will adjust the memory mapper size down to the size that does fit in the free EMS memory. Default: 256 Kb. þ /V Verbose: show debug information þ /Mp Set mouse at MSX joystick port p (1 or 2), or p=0 for disable þ /B Boot MSX-DOS from harddisk (default drive) See "DISK EMULATION" for more details þ /T MSX-emulator on top-speed Normally the MSX emulator starts at 100% MSX speed. Using /T you can start the emulator in (T)op-speed mode. þ /E Load MegaROM. See the "MegaROM/SCC" section for details þ /L Enables the low speed 'LED'. This LED is in the upper right corner of the screen and is lit when the emulator is probably slower then a normal MSX Notes on Expanded Memory Managers ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ To be sure that the MSX-1 emulator works use EMM386.EXE (supplied with MS-DOS) or QEMM (from Quarterdeck). We've tested these on a variety of systems and they work. 10 Using EMM386.EXE ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Insert this at the top of your CONFIG.SYS: device=\dos\himem.sys device=\dos\EMM386.EXE 4096 FRAME=E000 dos=high \dos is the MS-DOS system directory where HIMEM.SYS and EMM386.EXE are. If MS-DOS isn't installed in this directory on your system change it. the 4096 parameter of EMM386.EXE is the amount of EMS memory in kilobytes to install. Set it as high as possible. Using QEMM ÄÄÄÄÄÄÄÄÄÄ Insert this at the top of your CONFIG.SYS: device=\qemm\qemm386.sys dos=high \qemm is the directory where you've installed QEMM. If QEMM isn't installed in this directory on your system change it. NB: _NEVER_ install HIMEM.SYS and QEMM together and _ALWAYS_ put the DOS=HIGH after device=\qemm\qemm386.sys Note on SHARE/FCBS= ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ If you're using SHARE check out your CONFIG.SYS file for the FCBS= statements. FCBS has the following syntax: FCBS=x,y If the x parameter in your CONFIG.SYS is less then 4 make it at least four or delete the FCBS= statement. Failure to do so will cause the emulator to act strange in high level disk I/O mode. 11 THE CTRL-BREAK MENU ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Pressing CTRL-BREAK in the emulator will invoke a menu. This menu allows you to change some emulator settings. The screen shows a digitized image on the background and buttons on the foreground. The yellow (highlighted) options are the active choices. Pressing one of the red letters in a button toggles an option. In the next release there will be more options. At the moment they are: þ P Topspeed or 100% MSX speed (default: depends on the /T switch) þ S Sound ON/OFF (default: ON) þ L LDIR fast/slow (default: SLOW) LDIR is a Z80A block move command. The slow mode checks if a LDIR overwrites ROM or memory mapped I/O while the fast implementation doesn't. Most programs won't LDIR to ROM and/or memory mapped I/O so you can speed up the emulation somewhat by setting this to fast. þ D Disk mode: low level/high level (default: depends on /D switch) See "DISK EMULATION" þ M Sound mode (default: autodetect). The AdLib compatible soundcards don't have enough resources to emulate all possible sound devices at once or completely. Using the speaker is even worse. This option let's you toggle between the following modes (using the speaker leaves only AutoDetect): þ SCC+PSG PSG without noise and Konami SCC chip on 1 FM chip þ PSG PSG with noise on 1 FM chip þ Auto Detect Emulate as much as possible: If 2 FM chips detected PSG with noise and SCC PSG without noise if 1 FM chip detected PSG without noise and the loudest channel audiable when no FM chips detected (speaker) þ MSX Audio MSX-AUDIO (Philips Music Module) on 1 FM-CHIP. No PSG and/or SCC þ Q Quit Exits to MS-DOS (like F12) þ C Continue Back to the emulator þ R Reset Resets the MSX (like CTRL-ALT-DEL) 12 THE (MSX) KEYBOARD ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ NB: At the moment the emulator only supports a international or USA keyboard mapping. We will include a custom keyboard layout edit facility in the next release Mapping of MSX keys to the PC keyboard ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ The MSX keyboard is pretty much the same as the conventional PC keyboard. There are however some keys that had to be mapped: þ The 10 function keys are grouped in 5 keys. 'unshifted' they give F1-F5. Pressing SHIFT together with a function key (F1 to F5) they give F6-F10 þ SELECT Has no function in MSX-BASIC but is used by some programs. In the emulator SELECT can be found 'under' the GRAY PageDown key (the block of six grey keys including PageUp, PageDown, Home, etc) þ GRAPH Pressing this key together with another key gives one of the special MSX graphical characters like a smiling face or a line character. In the emulator GRAPH can be found 'under' the GRAY End key (the block of six grey keys including PageUp, PageDown, Home, etc) þ CODE Pressing this key together with another gives one of the 'foreign' characters like a french '‚'. In the emulator CODE can be found 'under' the GRAY PageUp key (the block of six grey keys including PageUp, PageDown, Home, etc) þ STOP/CTRL-STOP These keys act like BREAK and CTRL-BREAK. For programming reasons we've put them in the emulator under the SCROLL LOCK key. Pressing SCROLL LOCK is like pressing STOP. When you e.g. LIST a BASIC program the output stops until you press STOP (SCROLL LOCK) again. Pressing CTRL and STOP (SCROLL LOCK) together results in e.g. ending (BREAKing) of a BASIC program Additional key functions ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ þ CTRL-ALT-DEL Reboots the MSX þ CTRL-ALT-INS Reboots the MSX but first reloads ROM files and cleans memory mapper RAM (removing 41/42 ROM signatures). Use this if a program keeps coming back after CTRL-ALT- DEL. þ F12 Immediatly exits back to MS-DOS þ CTRL-BREAK Invokes the menu (see "CTRL-BREAK MENU") NOTE: On some keyboards you can't press two keys at the same time. This is particully irritating in games where you have to use the cursor keys. If this seems to be true for your keyboard try either the cursor keys on the numeric keypad or the gray ones. 13 DISK EMULATION ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ The disk emulation in the MSX emulator is a very complex piece of code. But you as the user won't notice that (we hope :-). We do however have to bother you with some details. High and low level disk I/O ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ There are two modes of disk operation: high level and low level. High level disk I/O offers support for EVERY disk related device MS-DOS supports (through interrupt 021h) including hard disks, high density floppy drives, CD-ROM drives, network drives, SCSI drives, etc. The second mode, the low-level disk I/O, simply provides the MSX disk system with routines for reading and writing sectors, formatting a disk, etc. Since the MSX disk system (MSX-DOS 1.0) has no support for hard drives, etc. you won't be able to use them in low level mode. The reason for having a low level mode is that there's at least 1 disk format (see "SUPPORTED MSX FLOPPY DISK TYPES") that MS-DOS doesn't support: 3.5" single sided (360Kb) disks. To be able to boot those disk or to read/write them you must use low level disk I/O. There could be some applications too acting not as they should in high level disk I/O mode. The emulator defaults to high level disk I/O when it starts but you can change that by using the /D command line switch or the _LOW and _HIGH MSX BASIC commands. Note that directory names can't be used in MSX-DISKBASIC. Instead use the extra _CD/_MD/_RD MSX emulator BASIC commands. MSX booting sequence & CTRL/SHIFT while booting ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ When the MSX boots it first reads sector 0 of drive A: (does not have to be drive A: of your PC machine !). If it succeeds it loads it and executes the bootstrap code there. If it fails it jumps to MSX-BASIC which tries to load AUTOEXEC.BAS. If this fails too MSX-BASIC will enter edit mode in which you can enter MSX-BASIC commands and/or programs. Before the diskROM tries to read sector 0 it scans the keyboard for the SHIFT and CTRL keys. If not it sounds a BEEP and executes the above mentioned boot sequence. If SHIFT is pressed the MSX will not activate the disk system and go to MSX "cassette" BASIC. If CTRL is pressed it disables the phantom drive if there is one. This frees up some memory. A phantom drive is a second drive to be used for e.g. copying files from one disk to another on systems with only 1 drive. MS-DOS creates one too if you only have one drive. When referencing the second drive (B:) you'll get messages like: Insert disk for drive B: and press any key when ready When you only map 1 MSX drive (see "Drive mappings: DRIVES.TBL" for more details about drive mappings) the MSX disk system will create a second one. Pressing CTRL until after the BEEP is heard will disable the phantom drive. If you have mapped more then one MSX drive there's no phantom drive and CTRL will do nothing. N.B.: When booting from a floppy disk mak sure the disk has a MSX boot 14 sector. MS-DOS formatted disks will cause the MSX to crash when it tries to execute the bootstrap code (which is 80x86 code instead of Z80 code). Booting MSX-DOS from harddisk ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ When reading sector 0 (the boot sector) of drive A: fails and you supplied the /B command line switch the emulator will return a built- in boot sector. If you also have MSXDOS.SYS and COMMAND.COM in the MSX emulator directory the emulator will boot these. This allows you to boot MSX-DOS from your harddisk. This however only works if the drive on which MSX1.EXE, MSXDOS.SYS and COMMAND.COM reside is mapped to a MSX drive. Drive mappings: DRIVES.TBL ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ The MSX emulator allows you to map any MS-DOS supported drive to a MSX drive. You can't map one MS-DOS drive to two MSX drives or two different MS-DOS drives to one MSX drive, but you can map e.g. your MS-DOS drive B: to MSX drive A: and MS-DOS drive C: to MSX drive B:. If you only map one MSX drive the MSX disk system will create a phantom drive B: (see "MSX booting sequence..."). The drive mappings are in DRIVES.TBL (a plain ASCII file) and the format is very simple: = E.g. A=B ;MSX drive A: is PC drive B: (floppy drive) B=C ;MSX drive B: is PC drive C: (hard disk) NB: The next release will include a program to edit the drive mappings without having to fiddle with DRIVES.TBL yourself 15 SUPPORTED MSX FLOPPY DISK TYPES ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ The MSX emulator supports all known MSX type floppy disks. Only those also supported by MS-DOS can be used in high level disk I/O mode. The following table illustrates the disk types supported. It shows the choice as displayed when formatting a floppy disk (e.g. CALL FORMAT), the ID code, if it can be used in high/level disk I/O and it's size and usage on the MSX. Legenda for format choices: SS = Single Sided (1 head) DS = Double Sided (2 heads) xS = x sectors per track yyT = yy tracks per side Format choice ³ ID ³ MS-DOS ³ Used as MSX floppy format ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÅÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ 1-SS,9S,80T ³ F8 ³ NO ³ 360Kb 3.5" 2-DS,9S,80T ³ F9 ³ YES ³ 720Kb 3.5" 3-SS,8S,80T ³ FA ³ NO ³ 320Kb 5.25" 4-DS,8S,80T ³ FB ³ NO ³ 640Kb 3.5" (5.25" ?!) 5-SS,9S,40T ³ FC ³ YES ³ 180Kb 5.25" 6-DS,9S,40T ³ FD ³ YES ³ 360Kb 5.25" 7-SS,8S,40T ³ FE ³ YES ³ 160Kb 5.25" 8-DS,8S,40T ³ FF ³ YES ³ 320Kb 5.25" NB: Although the size (3.5"/5.25") of the floppy disks used is mentioned in the table you're not forced to use the same floppy disks. You can e.g. format a 1.2Mb (high density) 5.25" disk with format 2: 720Kb 3.5", or a 3.5" disk with format 8. 16 MSX EMULATOR SPECIFIC BASIC COMMANDS ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ The MSX emulator has some extra BASIC commands that can be used by typing CALL (or the underscore: _) and the command. If commands have a parameter then using variables is allowed too. E.g. A$="\MSX\GAMES" _CHDIR(A$) þ _LOW Set low level disk I/O mode (see "DISK EMULATION") þ _HIGH Set high level disk I/O mode (see "DISK EMULATION") þ _DRIVE("d:") or _CHDRV("d:") Changes the default drive to d: Example: _DRIVE("B:") þ _CD("directory") or _CHDIR("directory") Changes the current directory to "directory" Examples: _CD("\MSX\GAMES") _CD("..") þ _MD("directory") or _MKDIR("directory") Creates a subdirectory "directory" Example: _MD("\GAMES") þ _RD("directory") or _RMDIR("directory") Removes a subdirectory "directory" Example: _RD("\GAMES") Note that directory names can't be used in MSX-DISKBASIC. E.g. LOAD "\MSX\APPS\MYPROG.BAS" is _NOT_ allowed. Instead use the extra _CD/_MD/_RD MSX emulator BASIC commands. We're studying on MSX-DOS 2.x support but so far we haven't gotten any (usefull) results yet. The _CD, _MD and _RD commands can only be used in high level disk I/O mode. MSX EMULATOR SPECIFIC MSX-DOS COMMANDS ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Besides the directory related MSX BASIC commands we've implemented a trick to be able to change, create and remove directories in MSX-DOS (even in MSX-DOS 1). There are three extra MSX-DOS 'commands' available: þ CD Changes the current directory to Examples: CD \MSX\PROGS CD .. þ MD Creates a subdirectory Example: MD PROGS 17 þ RD Removes a subdirectory Example: RD PROGS NB: These commands can only be used in high level disk I/O mode. It works like this: when you type a command in MSX-DOS it'll search for it by using a system call "FINDFIRST". We let it do it's job and if it returns with an error we check if the command was CD, MD or RD. If so we execute that command. But the FINDFIRST still returns an error (otherwise MSX-DOS thinks there really is e.g. a CD.???). That's why the commands all return with a 'Bad command or filename' even if the command was completed successfully. MSX EMULATOR SPECIFIC SYSTEM CALLS ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Concluding the directory related enhancements is a set of system calls that you can use as a programmer. These calls are only valid in the MSX emulator, they don't work on real MSX machines. There are four (extra) system calls available: þ CD : change directory þ MD : create directory þ RD : remove directory þ PWD : get current directory They can be accessed using the BDOS call 011h (11 HEX): FINDFIRST: þ Set the drive field in the FCB to 0FFh þ Set the filename to one of the commands. Pad out to 8 characters with spaces þ Fill the first two bytes of the extension with an address (for CD, MD and RD it's the address of the ASCIIZ or 0-terminated directory string, for PWD it's a 64 byte buffer for the current directory). Example for CD (MD and RD are alike): Example for PWD: LD C,#11 LD C,#11 LD DE,FCB LD DE,FCB CALL #F37D CALL #F37D RET RET FCB DB #HFF FCB DB #HFF DM "CD " DM "PWD " DW BUF DW BUF DS 28 DS 28 BUF DM "\MSX\PROGS" BUF DS 64 NB: þ A BDOS entry is located at address 5 in MSX-DOS otherwise at F37D þ These commands can only be used in high level disk I/O mode 18 MegaROM/SCC ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ NB: The Konami SCC soundchip (normally only found in Konami MegaROMs) is also emulated when MegaROM emulation is _NOT_ active. We included the megaROM emulation because we have some Konami MegaROMs (like Nemesis 2 & 3, Salamander, etc) that we would like to use even if possibly our MSX machines die. These MegaROMs are cartridges that can be put in the MSX cartridge slot. Since the emulator has no hardware it emulates the megaROMs by loading them into the PC's memory and emulating the hardware in the cartridge. This hardware consists of a memory mapper and optional a soundchip (SCC). The MegaROM memory mapper maps the 8Kb ROM pages in the cartridge (totalling mostly 128 or 256Kb) to MSX pages 1 and 2 (address range 04000h-0BFFF = 4 8Kb pages = 32Kb). The /E command line switch ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ By saving all those 8b pages to seperate files they can be loaded in the MSX emulator with the /E command line switch, like this: MSX /E Where is a 8 character filename optionally preceeded by a path. E.g.: MSX /Ec:\mega\salamand When executed like this the emulator will check for SALAMAND.0?? files in the C:\MEGA\ directory. The extension (.0??) consist of the part number in hex (hexadecimal) starting at 000. If a megaROM has 256Kb it has 32 8Kb pages and there should be 32 files starting at .000 and ending at .01F. The technique used for emulation MegaROMs is quite slow. On faster machines (e.g. 486 DX-40) it'll probably work fine. Converting MegaROMs to files ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Getting the files involves the following steps: þ Turn on your computer without the cartridge inserted þ When in BASIC insert the cartridge in slot 1 We've done it many times and it never fails. You only have to be sure that the cartridge goes straight into the slot and that you're doing it fast. NB: Inserting a cartridge while the MSX computer is on isn't completely without risks and we can't take any responsibility for any damage. 19 þ Type: POKE &HF676,1 POKE &HF677,&HC0 POKE &HC000,0 NEW OUT &HA8,(INP(&HA8) AND &B11001111) OR &B00010000 If you can't put the cartridge in slot 1 for some reason change the OR value: OR &B00000000 (like now) is slot 0 (kinda stupid: no OR needed :-) OR &B00010000 (like now) is slot 1 OR &B00100000 (like now) is slot 2 OR &B00110000 (like now) is slot 3 þ Check out the size of the megaROM. If it's 128Kb you've got 16 parts. If it's 256 Kb you've got 32 parts, etc. The NR variable on line 10 (see below) has to be adjusted to this value. It has to be the number of pages minus 1 (in the listing below there would be 16 pages: a 128Kb megaROM). Type: 10 NR=15 20 FOR I=0 TO NR 30 POKE &H9000,I 40 BSAVE "MEGAROM."+RIGHT$("000"+HEX$(I),3),&H8000,&H9FFF 50 NEXT RUN You can of course choose your own filename. In the listing above it's MEGAROM, but you can make it anything you like as long as it doesn't exceed the 8 characters and there's . at the end of it. To load the MegaROM saved with the above listing you could type: MSX /Emegarom Be sure there's no other file with the same name in the directory. There can only be the .0?? files with the name . E.g. when you have saved the ROM to the files MEGAROM.0?? be sure there's no MEGAROM.BAS, MEGAROM.LDR or something like that. Loading other ROM (files) ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ The /E switch can also be used to load a arbitrary 16Kb or 32Kb ROM. As long as the ROM is split up into 8Kb parts and a 7 bytes header (contents not important) is preceeding the file data you can load the ROM with the /E switch. The SPLITROM.EXE program let's you split up files in 8Kb parts. If you've got e.g. a ROM saved to a 16Kb file (about 16384 bytes in size) use SPLITROM.EXE to chop it up into 2 8Kb files. Be sure the original file doesn't exist when you use the /E switch or otherwise the emulator thinks there are 3 parts instead of 2. The same can be done with 32Kb ROMs. If you've got e.g. 2 16Kb files chop them up into 4 8Kb files, make sure there numbered from 000 to 003 (where part 000 is the first 8Kb of the first 16Kb file and 002 is the first 8Kb of the second 16Kb file). 20 NOTES ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ This section is dedicated to some notes that don't belong to one of the other sections but can be of concern when you use the MSX emulator. þ High level disk I/O and device names Using e.g. CON, AUX, LPT, etc in high level disk I/O mode will probably have strange effects. It's extremly difficult (impossible?) to get this to work properly so we didn't. Example: COPY "file" TO "CON" will probably mess up the screen for a while in high level disk I/O mode. þ Crashes when booting: the boot sector Disks formatted in MS-DOS have a different boot sector then MSX disks. The file system is compatible, but the bootstrap code in a MS-DOS formatted boot sector is 80x86 code while the MSX has Z80 code there. When you try to boot a MS-DOS formatted disk in the emulator the MSX will probably crash. Use MSXBOOT.COM or _FORMAT to fix the problem. þ Formatting/Using 1.44Mb disks at 720Kb You need to cover the second hole in the disk (opposite to the write protect tab). Use e.g. 5.25" write protect stickers. þ CP/M from RVS Daten Technik for VG8235 This CP/M operating system is not written very open minded. It assumes you have a VG8235 or compatible memory layout. You also can't have more then 128Kb memory mapper RAM installed. If you want to run it use the /D and /R1 command line switches 21 SOME IMPORTANT MSX-BASIC COMMANDS ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ þ FILES ["filename"] Shows a listing of files on the current disk. Using FILES without parameter will list ALL files. Using the parameter, e.g. FILES "*.BAS" lists only specified files. Acts like DIR in MS-DOS. Common used file extensions are: .BAS (or no extension) BASIC programs. Use RUN or LOAD .LDR (mostly BASIC) loader of a program. Use RUN or LOAD .BIN BINary file: executable Z80 code. Use BLOAD .BL BLoadable file. See .BIN .ML Machine Language. See .BIN .COM MSX-DOS program. Can probably only be executed in MSX-DOS .BAT MSX-DOS batch program. Can only be executed in MSX-DOS þ POKE -1,170 Most MSX-2 machines have another layout then most MSX-1 machines. The same is true for the MSX emulator. Some MSX-1 machines however except a typical MSX-1 layout. If a program crashes try this before loading it. þ RUN ["file"] Only RUN will execute the current BASIC program in memory. Using the file parameter will execute a MSX-BASIC program on disk (or cassette :-). Example: RUN "LOADER.BAS" þ BLOAD "file"[,R] Load a binary file. When the optional ,R parameter is used the code will be executed right after loading it. Example: RUN "CODE.BIN",R þ LOAD "file" Load but do not run a BASIC program with filename file Example: LOAD "PROGRAM.BAS" þ KILL "file" Erases file(s) from disk Example: KILL "*.BAS" þ CALL FORMAT or _FORMAT Formats a disk. Follow instructions on the screen. þ CALL SYSTEM or _SYSTEM Boots from A:. Can be used to load MSX-DOS. Tip: type POKE &HF346,1 before entering CALL SYSTEM if you haven't already booted from a disk. See also the "MSX EMULATOR SPECIFIC BASIC COMMANDS" section. 22 UTILITIES IN THE MSX EMULATOR PACKAGE ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Besided the emulator itself we wrote some utilities that we've included in the MSX emulator package. þ MSXDUMP Can be used to copy entire disks to a file and vice versa. Supports all MSX floppy disk types. When you have a disk with a non MSX (MS-DOS) file system like e.g. a CP/M bootdisk or a game that boots itself from disk you can read it into a file on your harddisk (and write it back to another disk later). The commandline format is: MSXDUMP can be either A: or B: is 1 to 8 for one of the MSX disk types or 0 for write is the filename to write to/read from If you leave out a parameter or all parameters the program will ask you for it. Try e.g. typing only MSXDUMP. þ SS2DS Normally you can't read the 3.5" single sided (360 Kb) disk format that MSX supports in MS-DOS. This is due to the fact that the media indentification byte (media ID) is F8 which is a media ID for hard disks in MS-DOS. This program fixes that so you can read and/or write this disk format. If you want to use the disk in a MSX machine (also in the emulator) as a single sided disk after using SS2DS simply run SS2DS again on the disk. The commandline format is very simple: SS2DS E.g.: SS2DS B: þ MSXBOOT Writes a MSX boot sector to a disk. If you try to boot a MS-DOS formatted disk in the emulator the MSX will crash. Commandline syntax: MSXBOOT can be A: or B: is 1 to 8 for all the MSX disk types. þ GETROM.BAS Fetches the needed ROMs from a MSX and dumps them to a file. Run it on a MSX machine and read the messages displayed. þ SPLITROM.EXE See the "MegaROM/SCC" section 23 GETTINGS PROGRAMS TO WORK ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ If you've problems with MSX programs to get them working and you've read the complete manual read this section. þ Read this manual COMPLETELY þ Read the "TROUBLE SHOOTING GUIDE" þ Read the "NOTES" þ Read "SOME IMPORTANT BASIC COMMANDS" þ Try POKE -1,170 before loading the program þ Leave out all the drives in DRIVES.TBL except the drive you've got the program on. Then press CTRL while the MSX boots until a beep is heard þ Check out the BASIC loader of a program (if any) by loading it (e.g. LOAD "file" command) and typing LIST (use ScrollLock to pause the listing). Look for a POKE -1 or POKE &HFFFF statement. If this is anything else then 170 or &HAA change it into 170 and run the BASIC loader again þ If the program is a bootable disk or the program is on a diskette try _LOW or the /D command line switch before loading the program þ Try other ROMs. If you are running with MSX-1 ROMs try MSX-2 ROMs and vice versa þ Try the /R1 commandline switch (install only 128Kb memory mapper) 24 HOW THE HEX DOES IT WORK, EMULATING A (MSX) COMPUTER ? ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ To explain the programming of an computer emulator you can better rephrase the question in "how does a computer work ?". A computer mainly consists of three parts: þ Central Processing Unit (CPU) þ Memory þ I/O (video, sound, diskdrives, etc.) Emulating a computer consists of emulating those three parts. This can be done in two ways. The first one is to program an interpreter for the CPU's language: machine language. The second way is fairly complicated. Instead of interpreting each instruction you can also take a program and convert it straight away to the machine language of the host machine running the emulator. This is very tricky since you have to analyze what's machine code and what's data. We've choosen to interpret the CPU's machine language. This is done by doing the same thing that every CPU does: reading an instruction that has to be executed and execute it. Executing an instruction in a emulator means that every instruction of the CPU to emulate will be emulated by several machine instructions of the host computer. By using a high performance algorithm and writing the emulator completely in 80386 machine language we've manages to squeeze the maximum of performance out of the Z80A machine language interpreter. The next step is emulating the computer's hardware. Because the emulator interprets every instruction you know when memory references and Input/Output (I/O) occurs. Memory references must be split up in reads and writes. Writes to a Read Only Memory (ROM) area must not alter the emulated memory regions that are in fact in the Random Access Memory (RAM) of the host computer. All I/O is trapped to and hardware connected to the I/O ports must be emulated. Programming a computer emulator is building a computer, although in software instead of hardware. The MSX-1 emulator emulates the following hardware: þ Z80A micro processor (CPU) at 3.57Mhz or "top-speed" þ Upto 4 MegaBytes of memory controlled by a "memory mapper" þ Intel 8255 Programmable Periphal Interface (PPI) þ Texas Instruments 9928A Video Display Processor (VDP) þ General Instruments AY-2-8910 Programmable Sound Generator (PSG) þ MSX-AUDIO/Philips music module þ Konami SCC sound chip þ Disk interface þ MSX printer interface þ Clock IC RP-5C01 þ Mouse 25 MSX-1 FEATURES ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ For those of you who are not familiar with MSX-1 computers here are it's features: þ Micro Processor (Central Processing Unit or CPU) 8 bit Z80A from Zilog. Address range: 64Kb þ 64Kb user RAM (in the emulator upto 4 megabytes) Normally the MSX-1 has only 64Kb user RAM. We've added a (MSX-2ish) feature called the memory mapper. The memory mapper of an MSX can hold upto 4 megabytes of RAM consisting of 16Kb pages. See also the description of the command line switches. þ Video Texas Instruments 9928A Video Display Processor (VDP). Has it's own 16Kb VRAM (Video RAM). Text modes: 40x24 1 foreground and background color out of 16 32x24 per 8 characters seperate foreground and background colors (out of 16) plus sprites Graphic modes: 256x192 per 8 pixels 1 foreground and background color out of 16 and sprites 64*48 per 'pixel' (block :-) 1 foreground and background color out of 16 and sprites þ Sound General Instruments AY-2-8910 Programmable Sound Generator (PSG). Supports 3 independant channels that can either play sound or noise. þ Cassette interface Programs and data can be saved and loaded to and from a normal audio cassette. þ Diskdrive(s) Optional for all MSX computers (also MSX-2, although most of them have one). We can emulate all kinds of MSX diskdrives and via some tricky programming we have built in support for all the hardware MSDOS can talk to. þ Printer I/O Parallel printer þ Joystick/mouse ports Two ports for joystick, mouse, touchpad, tablets, trackballs, lightpens, etc. þ Cartridge slots Two slots for cartridges containing ROM programs, hardware or both. We can't of course emulate this one :-). Via these cartridge slots additional hardware can be connected to the MSX like modems, RS-232 interfaces, sample/sound hardware, video digitizers, etc. There are also many games in ROM that can be put in one of the two cartridges. Even BASIC programs can run from a cartridge. þ 48Kb ROM Consisting of 16Kb BIOS (Basic I/O System), 16Kb MSX-BASIC and the optional 16Kb DISKBASIC/MSXDOS ROM. Here's our problem at the moment: the ROM's are still copyrighted by someone (we now don't really know by whom, Microsoft, ASCII, Panasonic ?!) and we don't have a license (yet) to distribute them. So you have to get the ROMs yourself. See the chapter on installation 26 ADDITIONAL MSX EMULATOR FEATURES ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Besides the previous mentioned features the emulator has: þ Upto 4 megabytes of RAM in a memory mapper (see "MSX-1 FEATURES") þ Harddrive/MSDOS devices support All the devices MSDOS can talk to via INT 021h like hard drives, high density disks, SCSI drives, CD-ROM drives, network drives, etc. can be accessed via the high level disk I/O mode of the emulator þ Extra (DOS 2.x-ish) CALL BASIC commands for changing current drive and directory, making and removing directories and switching between high and low level disk I/O modes. þ Loading and emulating MegaROMs in 'slot 1'. þ Konami SCC music chip There's more... but this section will be completed later 27 SLOT (MEMORY) LAYOUT ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ The Z80 has a 64Kb address range. The MSX architecture uses 'slots' to map ROM and RAM into the Z80 address range. The MSX emulator has the following slot (memory) layout: slot 0 slot 1 slot 2 slot 3 0000 ÚÄÄÄÄÄÄÄÄÄÄ¿ ÚÄÄÄÄÄÄÄÄÄÄ¿ ÚÄÄÄÄÄÄÄÄÄÄ¿ ÚÄÄÄÄÄÄÄÄÄÄ¿ ³ BIOS ³ ³ ³ ³ ³ ³ ³ 4000 ÃÄÄÄÄÄÄÄÄÄÄ´ ÃÄÄÄÄÄÄÄÄÄÄ´ ÃÄÄÄÄÄÄÄÄÄÄ´ ÃÄÄÄÄÄÄÄÄÄÄ´ ³ BIOS ³ ³ ³ ³ ³ ³ EXPANDED ³ 8000 ÃÄÄÄÄÄÄÄÄÄÄ´ ÃÄÄÄÄÄÄÄÄÄÄ´ ÃÄÄÄÄÄÄÄÄÄÄ´ ÃÄÄÄÄÄÄÄÄÄÄ´ ³ BASIC ³ ³ ³ ³ ³ ³ SLOT ³ C000 ÃÄÄÄÄÄÄÄÄÄÄ´ ÃÄÄÄÄÄÄÄÄÄÄ´ ÃÄÄÄÄÄÄÄÄÄÄ´ ÃÄÄÄÄÄÄÄÄÄÄ´ ³ BASIC ³ ³ ³ ³ ³ ³ ³ ÀÄÄÄÄÄÄÄÄÄÄÙ ÀÄÄÄÄÄÄÄÄÄÄÙ ÀÄÄÄÄÄÄÄÄÄÄÙ ÀÄÄÄÄÄÄÄÄÄÄÙ / \ / \ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ/ \ÄÄÄÄÄÄ¿ ³ ³ ³ slot 3-0 slot 3-1 slot 3-2 slot 3-3 ³ ³0000 ÚÄÄÄÄÄÄÄÄÄÄ¿ ÚÄÄÄÄÄÄÄÄÄÄ¿ ÚÄÄÄÄÄÄÄÄÄÄ¿ ÚÄÄÄÄÄÄÄÄÄÄ¿ ³ ³ ³ SUBROM ³ ³ ³ ³ RAM ³ ³ ³ ³ ³4000 ÃÄÄÄÄÄÄÄÄÄÄ´ ÃÄÄÄÄÄÄÄÄÄÄ´ ÃÄÄÄÄÄÄÄÄÄÄ´ ÃÄÄÄÄÄÄÄÄÄÄ´ ³ ³ ³ ³ ³ ³ ³ VIA ³ ³ DISKROM ³ ³ ³8000 ÃÄÄÄÄÄÄÄÄÄÄ´ ÃÄÄÄÄÄÄÄÄÄÄ´ ÃÄÄÄÄÄÄÄÄÄÄ´ ÃÄÄÄÄÄÄÄÄÄÄ´ ³ ³ ³ ³ ³ ³ ³ MEMORY ³ ³ ³ ³ ³C000 ÃÄÄÄÄÄÄÄÄÄÄ´ ÃÄÄÄÄÄÄÄÄÄÄ´ ÃÄÄÄÄÄÄÄÄÄÄ´ ÃÄÄÄÄÄÄÄÄÄÄ´ ³ ³ ³ ³ ³ ³ ³ MAPPER ³ ³ ³ ³ ³ ÀÄÄÄÄÄÄÄÄÄÄÙ ÀÄÄÄÄÄÄÄÄÄÄÙ ÀÄÄÄÄÄÄÄÄÄÄÙ ÀÄÄÄÄÄÄÄÄÄÄÙ ³ ³ ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ NOTES: þ This is the slot layout of Philips MSX-2 machines þ The RAM in slot 3-2 is controlled via a memory mapper. The size of the memory mapper is configurable via the /R commandline switch. þ 0000-3FFF = MSX page 0 4000-7FFF = MSX page 1 8000-BFFF = MSX page 2 C000-FFFF = MSX page 3 þ Slot 1 and 2 are cartridge slots on a real MSX with this slot layout. We use them for Konami SCC and MegaROM emulation 28 THE MSX ANIMATION ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ We've also available a very nice animation created by Adri Mathlener. It's possible that you received it together with the emulator. Check for the file MSXANI.EXE. If you haven't got it yet contact us for how to receive it. 29 MSX-BASIC REFERENCE ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ If the MSX can't find any ROMs or disks to boot it'll end up in the MSX-BASIC interpreter. The MSX-BASIC interpreter has a sort of full screen editor, that is: it's limited to the screen you see. BASIC commands can be entered right away: PRINT "Hello world" or a program can be built using the (in)famous line numbers: 10 PRINT "Hello world" 20 GOTO 10 The 'editor' ÄÄÄÄÄÄÄÄÄÄÄÄ You can move the cursor using the cursor keys. There are some additional control keys. They all consist of a combination of the CONTROL (CTRL) key and one of the keys listed in the table below. If you press CTRL, hold it and press one of these keys (and release both keys) one of the related functions will be performed. Key Meaning ÄÄÄ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ A Graphic character header B Move cursor to beginning of previous word C Break while MSX-BASIC was waiting for input D - E Truncate: erase line F Move cursor to beginning of next word G Sounds a beep H (BACKSPACE) cursor one position back and erase character I (TAB) Move cursor to next tab stop J Move cursor to next line K (HOME) Move cursor to home position L (CLS) Clear the screen M (RETURN) Enter programline N Move cursor to end of line O - P - Q - R (INSERT) Toggle insert/overwrite mode S - T - U - V - W - X (SELECT) Y - Z - [ (ESC) \ (CURSOR RIGHT) Move cursor one position to the right ] (CURSOR LEFT) Move cursor one position to the left ^ (CURSOR UP) Move cursor one line up - (CURSOR DOWN) Move cursor one line down The DELETE key erases the character under the cursor (and moves the rest of the line one position to the left). 30 NB: To be completed in the next release Constants and variables ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Operators ÄÄÄÄÄÄÄÄÄ Arithmic ÄÄÄÄÄÄÄÄ Relational ÄÄÄÄÄÄÄÄÄÄ Logical ÄÄÄÄÄÄÄ Functions (like SQR() and DEF FN) ÄÄÄÄÄÄÄÄÄ MSX-BASIC Statements ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ AUTO AND ABS ATN ASC ATTR$ BASE BSAVE BLOAD BEEP BIN$ CALL CLOSE COPY CONT CLEAR CLOAD CSAVE CSRLIN CINT CSNG CDBL CVI CVS CVD COS CHR$ CIRCLE COLOR CLS CMD DELETE DATA DIM DEFSTR DEFINT DEFSNG DEFDBL DSKO$ DEF DSKI$ DSKF 31 DRAW ELSE END ERASE ERROR ERL ERR EXP EOF EQV FOR FIELD FILES FN FRE FIX FPOS GOTO GO TO GOSUB GET HEX$ INPUT IF INSTR INT INP IMP INKEY$ IPL KILL KEY LPRINT LLIST LPOS LET LOCATE LINE LOAD LSET LIST LFILES LOG LOC LEN LEFT$ LOF MOTOR MERGE MOD MKI$ MKS$ MKD$ MID$ MAX NEXT NAME NEW 32 NOT OPEN OUT ON OR OCT$ OFF PRINT PUT POKE POS PEEK PSET PRESET POINT PAINT PDL PAD PLAY RETURN READ RUN RESTORE REM RESUME RSET RIGHT$ RND RENUM SCREEN SPRITE STOP SWAP SET SAVE SPC( STEP SGN SQR SIN STR$ STRING$ SPACE$ SOUND STICK STRIG THEN TRON TROFF TAB( TO TIME TAN USING USR VAL VARPTR VDP 33 VPOKE VPEEK WIDTH WAIT XOR 34 TROUBLE SHOOTING GUIDE/QUESTIONS & ANSWERS ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ þ I used /B but the emulator doesn't boot MSXDOS þ Be sure you have MSXDOS.SYS and COMMAND.COM in the same directory as the MSX emulator executable (MSX1.EXE). þ Also check if the drive on which these files are located is mapped to a MSX drive (check DRIVES.TBL). þ The MSX crashed when it starts after checking MSX drive A: þ Check if the drive contains a MS-DOS formatted disk. You can't boot MS-DOS formatted disks because the bootstrap code is different. Don't boot from the disk or use MSXBOOT.COM. þ Check if the disk in MSX drive A: is a 3.5" single sided (360Kb) formatted disk. If you didn't start the emulator with the /D parameter press F12 and try that. þ I try to load a program but it crashes the MSX There are MANY possible reasons, but try the following before giving up or starting to yell at us :-) þ Type POKE -1,170 prior to loading the program. þ Try to reduce the number of MSX drives (DRIVES.TBL). þ If you've only one MSX drive mapped try resetting the MSX and pressing CTRL until the beep. þ I have a CP/M boot disk but it crash the MSX See "NOTES" þ I have ROMs but the emulator seem to crash on them DiskROMs from Turbo-R machines tend to crash the emulator. We haven't been able to supply a solution. ROMs from Spectra Video machines probably won't work. We've had lots of reports on that and suspect that these ROMs won't work at all. þ I have ROM files for the previous MSX emulator versions, can I use them ? Yes. rename them: REN MSX1ROMA.BIN MSXBIOS.ROM REN MSX1ROMB.BIN MSXBASIC.ROM þ I'm getting 'Overseek errors' from PMEXT Check out your CoNFIG.SYS file for the FCBS= statement. See "REQUIREMENTS, INSTALLATION AND STARTING THE EMULATOR" for more details. 35