• Please review our updated Terms and Rules here

TRS-80 Model II emulator in MESS now working with caveats.

lowen

Veteran Member
Joined
Jan 16, 2014
Messages
1,603
Location
Western North Carolina, USA
A couple of years ago, it was reported in these forums that the MESS emulator successfully booted TRSDOS, CP/M, and LS-DOS. As of MESS version 0.148 that ability broke. The current distribution is MESS 0.154, and Model II LS-DOS will not boot on it.

As of MESS SVN 32354, the MESS TRS-80 Model II emulator will now successfully boot an image of LS-DOS 6.3.1A. Once booted, there are a couple of things you have to do:

1.) Set the drives for delay ( SYSTEM (DELAY=ON) or DO MOD12/JCL). It seems the thinline drives are being emulated, not the full height motor-is-always-on Shugarts.

2.) Watch the keyboard mappings; a SHIFT-; does not give you a COLON, but a PLUS. Single forward quote (') is the COLON.

Building MESS from current SVN isn't too hard. Follow the instructions at http://www.mess.org/subversion and either check out SVN rev 32354 or just grab trunk. You'll need a full SDL build environment, and on Windows the MESS devs have instructions. I use CentOS 6 Linux, and I had already built SDLTRS from source, so everything needed for SDL was already in place. And, of course, you will need the Model II ROM package; this can be found at http://archive.org/download/MESS-0.151.BIOS.ROMs/MESS-0.151.BIOS.ROMs.zip/MESS%200.151%20ROMs%2Ftrs80m2.zip. Note that the parent URL for this link is for a much larger collection of BIOS ROMS.

To get reasonable performance, and if you have more than one processor or core, create a mess.ini (the -createconfig option on the MESS command line) and edit it, changing the 'multithreading' option under OSD PERFORMANCE OPTIONS to '1' from 0. To get it in a window, set the 'window' option under OSD VIDEO OPTIONS to 1.

MESS uses ImageDisk format images (.IMD). You can use Dave Dunfield's DMK2IMD that is distributed with ImageDisk to do the conversion. Be sure to do the conversion from the 'new' post-2012 DMK's available at Tim Mann's site, or register with and log in to vintagecomputer.net to get a native .IMD of LS-DOS 6.3.1 from there.

I want to especially thank billdeg for his verification that the IMD being used made valid and bootable physical media on a real Model II.

As part of this process I've learned a great deal about the boot process for the Model II, since I had to find what was preventing the boot. I have extracted, disassembled, and analyzed the bootstrap track (not just a single sector) of Model II LS-DOS, and have single-stepped through it a dozen times at this point (I'm far from the only one to have done this, though). The MESS debugger, which does hard breakpointing of the emulated CPU, was extremely valuable, as were the Misosys PRO-DUCE, PRO-CESS, and PRO-MRAS tools. And the ability for xtrs and sdltrs to mount and read Model II-formatted 8 inch disks from Model 4 LS-DOS was absolutely essential.

The bug boiled down to the LS-DOS use of the deleted-data address mark (DDAM) for the directory cylinder. The FD1791 emulation in the emu/machine/wd_fdc.c driver was not properly handling DDAMs, but was throwing a record-not-found error. The author of wd_fdc.c was very responsive and very helpful (and quite appreciative of the diagnosis) and after a couple of fixes things worked.

There is one other ROM that is lacking, and that is a dump of the keyboard controller. If anyone has a Model II keyboard with broken keys or whatnot, it might be usable for dumping the microcontroller.
 
Last edited:
Update: MESS 0.155 is out, with the fix mentioned above.

Note that while LS-DOS will boot ok, if it doesn't 'double boot' your keyboard will not work. I haven't found rhyme or reason as to when or what triggers this, but, according to a message I received from Frank Durda, LS-DOS 6.x has some issues on the Model II hardware anyway, and this might be a genuine bug in LS-DOS and not in the emulation.

Do note that, to get 90%+ emulation speed, my Core 2 Duo (T9300@2.5GHz) laptop with 4GB of RAM uses 60-70% CPU on both cores, so be ready for it to be power hungry. But then again the Model II is a fairly complex system to emulate.
 
Back
Top