A MESS driver for exelvision EXL100

This driver was started by R.Nabet and reworked by Wilbert Pol following dump of 7041 chip by torlus.

This page is about my own experimentations around this driver. 

The modified files are here (applies to SVN version of date 26/02/2010 so a post 0.136 version)

src/mess/drivers/exelv.c

src/emu/cpu/tms7000/tms70op.c

scr/emu/cpu/tms7000.c

src/emu/sound/tms5220.c

Roms:

30/05/2014 : some work done on the driver. Since 5220 was improved patch is not usefull anymore, now exl100 can display its logo (mostly with the same modifications than in 2010…)

01/03/2010 : communication between 7020 and 7041 begins to work, but the tms7000 emulation core needs modifications to handle correctly IOCNT register.

25/02/2010 : the driver stops very early in booting process. 7041 does not send correct bytes (do not need to swap even if schematics tends to go this way). After correction, Tms5220 now accepts too fast speech frames and does not issue correct flags at correct times. So 7041 is stuck after the first set of frames. => need to patch 7041 rom to go a bit further (see rom images).

Revive GEMDOS for lisa

Gemdos was known as atari ST operating system (to be precise, TOS is GEM + atari port of GEMDOS). This OS was primarily developped on Lisa and VME10 platform.

Caldera did buy parts of Digital research Inc and released old sources to public.

This hack aims to run gemdos and gem on lisa hardware.

One interesting archive is oemkit.zip

It’s a kind of patch over gemdos build environment.

The interesting file is bootflop.bat: REM THIS BATCH FILE CREATES A BOOTABLE 3.5 DISKETTE
REM IT IS ASSUMED THAT YOU HAVE ALREADY FORMATTED THE DISKETTE WITH FORMAT.PRG
REM IF YOU WISH TO ABORT, ENTER APPLE C KEYS
REM IF YOU WISH TO CONTINUE, ENTER THE ENTER KEY PAUSE
COPY C:GEMDOSFI.SYS A:GEMDOSFI.SYS
COPY C:COMMAND.PRG A:COMMAND.PRG
PUTBOOT A: SFBOOT.ABS
REM TO EJECT THE DISKETTE, SIMULTANEOUSLY ENTER APPLE key & numeric pad ENTER KEY
REM THIS OPERATION IS COMPLETED

We clearly see here that a boot floppy is made of 3 “files” 

  • GEMDOSFI.SYS is the OS in a single file.
  • COMMAND.PRG is a textmode command interpreter in a GEMDOS executable format, this binary run as is on atari ST hardware
  • SFBOOT.ABS is the boot sector

The creation of boot disc is the following procedure:

  • format a GEMDOS disc
  • copy OS file (GEMDOSFI.SYS)
  • copy command interpreter command.prg
  • install boot sector
  • link OS file to bootsector (a bootloader cannot read a filesystem, so some kind of sector table must be written in the bootsector itself or in the next sectors)
  • make the bootsector bootable (ie a special TAG value for apple lisa).

The inline command PUTBOOT (inlined in command.prg) shouldl do the last 3 steps of this procedure…

Find PUTBOOT code…

We find in source new_cmd.c

else if (xncmps(8,s,"PUTBOOT"))  
{          
if (*nonStdIn) dspCL (&argv[0]);
ucase (p);
drv = *p - 'A';  
fd = xopen(argv[2], 0);
xread(fd,540L,buf); 
xclose(fd);   
super();      
rwabs(1,&buf[28],1,0,drv);  
user();     
dspMsg(5);
}          





So PUTBOOT is just a raw write of 512 bytes at offset 28 of the file in argument.

That is confirmed in the binary dump of the resulting disc image.

Disc geometry

We need to find disk geometry for lisa gemdos discs

Here we are in file main.c of oemkit.zip

We find definitions for Sony drive and 2 profiles (5Mb only).

/* drive C is profile, A and B are 5 1/4 twiggys */

/* … the way God intended disks to be */

BPB bpbx[] = {  {  512, 2, 1024,  5,  3,  4, 12,  390, 0 },

{  512, 2, 1024,  5,  3,  4, 12,  390, 0 },

  {  512, 2, 1024, 32, 12, 13, 57, 4000, 2 } , /* fixed */

  {  512, 2, 1024, 32, 12, 13, 57, 4000, 2 } } ; /* fixed */

/*

 *                      recsiz       rootrecs    datrec#    flags(16-bit fat)

 *                          clsiz       fatrecs      numclust (fixed disk)

 *                              clsizb       fatrec#        

 * Atari ROM Disk

 * BPB bpbx[1] = {  512, 2, 1024,  2,  1,  1,  4,  254,   0 } ;

 * IBM 5 1/4 DSDD

 * BPB bpbx[1] = {  512, 2, 1024,  7,  2,  3, 12,  350,   0 } ;

 * Lisa profile for GEMDOS demo  old:     12  13  57  4000    0

 * BPB bpbx[1] = {  512, 2, 1024, 32, 20, 21, 74, 5000,   1 } ;

 * Lisa twiggys

 * BPB bpbx[1] = {  512, 2, 1024, 15,  3,  4, 22,  840,   0 } ;

 * Lisa sony drive (SS)

 * BPB bpbx[1] = {  512, 2, 1024,  5,  3,  4, 12,  390,   0 } ;

 * Compaq hard disk C:

 * BPB bpbx[1] = {  512, 8, 4096, 32,  7,  8, 47, 2119,   0 } ;

 * 8 inch SSSD       *7,*13 on some disks 

 * BPB bpbx[1] = {  128, 4,  512, 17,  6, 10, 16,  492,   0 } ;

 * 8 inch DSDD

 * BPB bpbx[1] = { 1024, 1, 1024, 6,   2,  3,  5, 1221,   0 } ;

 */

Build a boot disk

For now, an emulator will be used. Disc must be a disc copy 4.2 image.

booting (bootsector)… 

GEMDOS filesystem is FAT12 with minor variations.

We derive a build image tool from different sources (tool will be published soon 🙂 ). Sources are from:

  • IDLE : my lisa emulator
  • ray’s lisaFS tool (an early version)
  • a FAT12 module
  • GEMDOS for lisa itself (traduction tables block -> track/head)

Result is a disccopy 4.2 image with a lisa FAT : that you may download here 🙂 (update : now running (update 2018 : now with GEM))

Now the result (in “intergalactic” exclusivity 😉 )

You may now start gemdos in emulators (both IDLE and lisaem). Tested on real hardware (2018)

Now the tool itself

This tool uses a non free FAT12 implementation that is part of miniC by Dave Dunfield (www.dunfield.com). Since this hack is open source and non commercial, I suppose it does not hurt the conditions of use…

Download the tool and files

Warning:

Source (ie FAT12 component) is strictly x86 and will not compile elsewhere (maps C structure with short little endian integers…). (source is not up to date, will be on github someday…)

To modify the disc files:

in main.c

  write_fs(“GEMDOSFI.SYS”,”GEMDOSFI.SYS”); // this one must be the first in disc since the bootloader (the bootloader does not read the FAT but a does a raw read of first N allocatable sectors)

  write_fs(“COMMAND.PRG”,”COMMAND.PRG”);  

  write_fs(“GEMVDI.PRG”,”GEMVDI.PRG”);  

  write_fs(“GEM.PRG”,”GEM.PRG”);  

  write_fs(“GEM.RSC”,”GEM.RSC”);  

  write_fs(“ASSIGN.SYS”,”ASSIGN.SYS”);  

  write_fs(“LISA25.SYS”,”LISA25.SYS”);  

  write_fs(“META.SYS”,”META.SYS”);  

  write_fs(“IBMHSS10.FNT”,”IBMHSS10.FNT”);  

Exelvision exl100 emulator

When I was young, I considered this machine a bit strange, and I did not like it much… now I know why…

Anyway, emulating this beast is an interesting exercise, Texas instrument documents are precise… Also, missing information makes you practice reverse engineering.

But, this machine is very low powered, and the awfull keyboard does not help…

This emulator derives partialy from MESS unfinished driver by R.Nabet

CPU emulator module for TMS7xxx was written by T.Linder (for TI CC40 emulation).

wizord

This emulator is unfinished… but is now somewhat useable…

Latest version R0.8

For older versions and news… Just learn French 😛

Source code

Project is hosted on sourceforge.

Most of online exelvision related items are on Fabrice’s site : www.exelvision.fr

The most advanced exelvision emulator for now is Daniel’s DCexel 

Apple Lisa emulator

I dreamed about this machine as I was a child in the early eigthies. A french periodic named “micro systeme” made some very interesting posts about lisa and smalltalk. It became a computer I wanted to had to my little collection. I saw some on ebay, much too expansive for me…I tried emulation but mess driver was buggy, and Ray’s emulator (lisaem) was not published yet, and seemed a bit abandonned.

So I started to code…

IDLE is incomplete draft of a lisa emulator…
The keystone was the 68k emulation core. I first used the Castaway (Atari ST emulator for dreamcast (derived from FAST)), I replaced this core with the more common Musashi core (also used in MAME and MESS).
Some weeks later, Macworks booted successfully.
Some weeks later… Ray finaly made public lisaem.
Month later, IDLE booted lisa OS, then the 2 UNIXes made for lisa (XENIX and UNIPLUS).

IDLE needs some work to be complete, the 68k core is not yet perfect (’cause bus error are not perfectly emulated in special cases).

I also need to write back corrections made in the Musashi core in MAME and MESS.

The project is not hosted here but on sourceforge:  The IDLEproject on sourceforge

Lisa is not a (totaly) dead computer, you may find some activity on the lisalist (google groups) and lowendmac

feed your lisa with weird stuff

X Profile tool

Xprofile is a great profile or widget replacement device for lisa and apple ///. Xprofile may use a compact Flash card to store 2 volumes (odd and even).

This tool was coded to ease CF backups and to use the IDLE emulator to install system and then transfer the system to real hardware.

(See original page from Sigma seven).

More on the profile…

The normal profile uses an unusual sector size of 532 byte (instead of 512). The Xprofile can define 3 different mapping to achieve the 532 byte size. You may use 2×512 byte or a more compact strategy (16*512+20*16bytes per 16 sectors), this is referred as the STAR type in Xprofile documentations.

The Xprofile also write a very little FAT12 partition on the beginning of the CF to avoid accidental formatting when CF are read on a modern computer.

How to use the tool…

Under windows, you may use this great tool (diskimage) to make the raw image:

choose physical drive :

_ write to file : for a CF to emulator transfer.

_ Import from file : when restoring an image (fe with a modified partition).

For now the tool cannot write a whole Xprofile image, so your CF needs to be already formatted by the Xprofile device. Keep this file as a refence (keep a copy).

What the tool can do:

_ take a raw profile image from the IDLE emulator and insert it in a CF image.

_ extract a raw profile image from a CF image and run it in the IDLE emulator.

nbsp;

Limitations:

_ 5Mb profile only

_ STAR types 04 and 06 only

Use cases…

the tool parameters are (in classic cryptic UNIXish syntax):

xprofile_tool [extract04|replace04|extract06|replace06] [odd|even] [image] [idle_image]

first parameter is command and STAR type

extract04 to extract à 04 STAR type raw image from a CF raw image (to use with emulator).

replace04 to replace in a CF raw image (already formated with 5Mb STAR Type 04) with an emulator raw image (fe my uniplus image).

So, to extract the system you use on your Xprofile:

_ check if you use odd or even partition (you may have 2 different partition on a CF or an HDD).

_ check your STAR model (the Xprofile displays it).

_ extract raw whole image with diskimage to whole.raw

_ type xprofile_tool extract04 odd whole.raw profile.raw 

_ then copy the profile.raw in IDLE emulator directory

_ start IDLE and play with your system

to install on X profile a system image from IDLE:

_ format on your Xprofile odd or even partition with STAR model 4 or 6, a 5Mb partition

_ extract raw whole image with diskimage to whole.raw

_ type xprofile_tool replace04 odd whole.raw profile.raw (for a 4 STAR type and odd partition).

_ copy the new whole.raw image to your CF

_ reinstall the CF in your Xprofile

_ boot your lisa 🙂