Jump to content
cheesestraws

GEMDOS on the Lisa can be built again!

Recommended Posts

The original First Word, which is probably a fairer test as it is about the same age as this version of GEM, works basically fine:

 

61555333663__F3E33023-93A9-4A3B-AA40-55BE61557F14.thumb.JPG.ac2ee9de2a1f2cbf3621c8310281c93a.JPG

 

The fonts are a bit funky, and I suspect that might be what scuppering the Plus version, it's when it tried to redraw the text area that it segfaulted.  But as a proof of concept, this is indeed a piece of Atari desktop software running on the Lisa.

 

Anyone want a boot disc image? :-)

Share this post


Link to post
Share on other sites
11 hours ago, cheesestraws said:

Anyone want a boot disc image? :-) 

To quote Zoidberg, "I'll take 8!"

Share this post


Link to post
Share on other sites
11 hours ago, stepleton said:

*waves arms* I'll take one!

 

8 hours ago, sunder said:

To quote Zoidberg, "I'll take 8!"

 

Here's a couple of disc images which will let you run off floppy or install on a hard disc.  These are 400K DiskCopy 4.2 images.  You should be able to boot from gemdos11-boot.dc, and it should give you a prompt that looks something like

 

Command v. 0.38 8/16/85 LTG
{a} _

You can run GEM from the floppy.  To run it, just use the 'gemvdi' command.  This will load the VDI and display a message; it will then load the desktop.  Very slowly.  If you double-click on the 'A' drive at the bottom left of the desktop, you should be able to fiddle with the files on the floppy through there.  HELLO.APP is a simple hello world GEM application that ought to load and work.

 

You can install it onto a hard disc in the following way.  It's a bit manual at the moment, apologies, and has a lot of limitations.  It will probably only work on a 2/10 with an internal hard disc; it might work on a 2/5 with a hard disc hung off the internal port as well.  I haven't tried it.  And it will only see 5 meg of that hard disc no matter how big it is.  I am using an X/Profile with a 5meg STAR, personally.

 

First of all, create a filesystem on the hard disc.  This is very rude and does not ask for permission first, and obviously it WILL wipe out anything else on the disc (this utility is just the filesystem-creating half of the old FORMAT command).

 

mkfs c

 

Then "install" the OS:

 

copy gemdoshi.sys c:
copy command.prg c:
putboot c: hboot.abs

It is important that gemdoshi.sys is the first file on the disc, because it's a 1-stage bootloader that can't read the filesystem, it just loads the first thing it sees.  You should now be able to reboot and the machine will come up into GEMDOS.  At this point, copy the rest of the contents of the floppy disc (possibly omitting GEMDOSFI.SYS which is the floppy version of the OS executable and both the ABS files which are the bootloader) to the hard disc:

 

a:
copy gemvdi.prg c:
copy gem.* c:
copy meta.sys c:
copy *.fnt c:
copy desk*.* c:
copy hello.app c:
c:

at this point, you should be able to eject the floppy (Cmd-NumPadEnter, for some reason) and run 'gemvdi' to get to the desktop.

 

The second disc image contains some applications which are either useless or don't work, but prove (or don't) the concept.  I'd suggest sticking them in a GEMAPPS directory to make it easier to delete them later:

 

c:
cd \
md GEMAPPS
cd GEMAPPS
copy a:*.* c:
cd \

then, again, run GEMVDI to get to the desktop.

  • 1ST_WORD is a word processor that very nearly works.  Text redraw is funky, expecially when you select things, but at least it doesn't crash on startup.
  • DOODLE is a DR demo application which is... exactly what it says on the tin.
  • RCS is the Resource Construction Kit, the GEM rough equivalent of ResEdit.
  • ST-GUIDE crashes immediately :-(

Hope this is enough to play with for the moment.  I'm going to take a break for this for a day or so now and then work out what to do next with it.

Share this post


Link to post
Share on other sites

So it boots off an X/Profile on a 2/5. HELLO.APP works, but 1ST_WORD.APP causes a complete system hang when trying to create a new document. Make sure to have a floppy disk inserted if you try to access the drive, otherwise it will crash the system with Lisa Error 47.

 

Also: don't forget to copy ASSIGN.SYS and LISA25.SYS to the hard drive when doing your file copies.

 

9059a078-8694-4069-99e2-7f1420c6d602.jpg

Edited by blusnowkitty

Share this post


Link to post
Share on other sites
8 hours ago, blusnowkitty said:

So it boots off an X/Profile on a 2/5.

Great!  I'm pretty sure the port was originally designed for the 2/5 (hence the "25" in "LISA25.SYS").

 

8 hours ago, blusnowkitty said:

Make sure to have a floppy disk inserted if you try to access the drive, otherwise it will crash the system with Lisa Error 47. 

This is one of the reasons I get a strong feeling that this wasn't ever really finished; it was a demo platform, rather than a serious port.  Error handling is nonexistent (if you get an abort/retry/ignore prompt and press 'r' for retry, it actually restarts the machine, at least here).  I have found so many ways to crash this so far :-)

 

 

Share this post


Link to post
Share on other sites

Here's a question:  is there an approved method of detecting what hard discs are attached to the Lisa, or at least a method that is known to work?  If worst comes to worst I will have a look at the boot ROM source, but it slightly scares me.

Share this post


Link to post
Share on other sites
8 hours ago, cheesestraws said:

Here's a question:  is there an approved method of detecting what hard discs are attached to the Lisa, or at least a method that is known to work?  If worst comes to worst I will have a look at the boot ROM source, but it slightly scares me.

I don't know of any, but in general, check each slot for a dual parallel port card, if installed check each card for the OCD bit - Open Cable Detect, if the cable is connected, there might be a drive there.

If there is a drive there, you can try to probe reading of block 0x00ffffff - this will give you the name and size of the drive, and whether it is a ProFile like or a Widget like drive, but don't depend on the text name, look at the protocol version. Take a look at the Widget ERS for this. If you don't want to deal with the crazy multi-block read/write commands, stick to ProFile-y commands only - the Widgety drives are backwards compatible with this protocol, though it's slightly slower.

 

Note that SunRem and Corvus made compatible drives that may have different sizes, but that -1 block will give you the size of the drive. Please don't do what Lisa Office System and Xenix did - they hard coded the expected drive size inside the driver :facepalm: - as a result, if you attach a 30MB or 40MB SunRem MFM drive you could only use the first 10MB.

 

The ROM routine for the ProFile only contains a read block routine only for ProFile style disks, but you can pass the address of the VIA and thus test both the motherboard parallel port for an attached hard drive - whether Widget or ProFile (or X/ProFile), and any/all of the 6 possible attached external drives.

 

You'll need to hook the bus error vector to prevent crashes as accesses to non-existant ports won't properly signal DTACK and so will generate a bus error. You can setup the ISV (Interrupt Service Routine) ahead of time to write a flag saying that port isn't there before you call the ROM profile read routine and maybe maintain an array of info about what's connected where and what size it is.

 

From what I recall, if you have 2 port serial card, the 2K ROM onboard does a quick check of the port, and then if clicked for boot, would set the right variables to the address of the port and pass them to the Boot ROM ProFile routine to read the block and boot that way, I don't think they contain actual ProFile read routines.

Share this post


Link to post
Share on other sites
17 hours ago, sunder said:

Please don't do what Lisa Office System and Xenix did - they hard coded the expected drive size inside the driver :facepalm: - as a result, if you attach a 30MB or 40MB SunRem MFM drive you could only use the first 10MB. 

Yeah, GEMDOS already does this.  It's one of the things I was planning to fix.  It also hardcodes the hard disc to use FAT12 which is perhaps also not ideal.

 

I was slightly afraid this was going to be the answer.  Oh well, time to learn! :-)

Share this post


Link to post
Share on other sites
12 hours ago, cheesestraws said:

Yeah, GEMDOS already does this.  It's one of the things I was planning to fix.  It also hardcodes the hard disc to use FAT12 which is perhaps also not ideal.

 

I was slightly afraid this was going to be the answer.  Oh well, time to learn! :-)

Might be interesting to replace that FAT12 with something that supports more than 8.3, not just larger volumes - but yeah, that's going to be insanely hard and you'll have to change a lot of the underlying CP/M code, etc. as well as the GEMDOS side and certainly the apps too. FAT32 is likely going to be an insane effort because it's a hack where a file takes up as many 8.3 file entries on top of the original as it would take to store the name.

 

Oh well.  But yeah, you'll likely want to create a for-loop that passes VIA addresses one by one for each of the 7 possible locations, trap on segfaults, and if you successfully read block 0xffffff and get proper block sizes from the drive instead of an error, you can make use of that drive. This probably can happen during the boot loader if you can grow it by a bit, or possibly as part of the BIOS when it is initialized.

Share this post


Link to post
Share on other sites
8 hours ago, sunder said:

FAT32 is likely going to be an insane effort because it's a hack where a file takes up as many 8.3 file entries on top of the original as it would take to store the name. 

Yup.  But now that I'm using a newer GEMDOS than the initial demo, there is FAT16 support, allegedly, controlled by a flag on the BPB of the drive.  So I might try setting that flag and seeing if it works.  That will at least get me to a reasonable volume size, certainly more than reasonable by '80s GEM standards...

 

8 hours ago, sunder said:

This probably can happen during the boot loader if you can grow it by a bit, or possibly as part of the BIOS when it is initialized. 

It's probably going to be easier to do it in the BIOS—I already have @stepleton's lisa_profile_io library (stylistically massacred to assemble with the ancient assembler, but programmatically intact) linked into the BIOS, so it would make sense to use that as a basis for this, too.  I think squeezing anything else into the bootloader would mean sacrificing the fish, and I like the fish.

 

8 hours ago, stepleton said:

For your reference: 

This was going to be my first stop, definitely

Share this post


Link to post
Share on other sites
21 hours ago, cheesestraws said:

@blusnowkitty Do you still have the GEMDOS installation available?  If so, could I send you a small GEMDOS program to run (in a disc image, of course) and you send me back the results?

I've got the initial disk images you posted over here and it's no trouble to get it reinstalled :)

Share this post


Link to post
Share on other sites
20 hours ago, blusnowkitty said:

I've got the initial disk images you posted over here and it's no trouble to get it reinstalled :)

Thanks!  There's a LISAINFO.PRG file on this disc image: when you get a mo, if you wouldn't mind running it when GEMDOS is booted from the HD and send me the results, I'd be very appreciative!

 

 

gemdos-lisainfo.dc

Share this post


Link to post
Share on other sites
15 hours ago, cheesestraws said:

Thanks!  There's a LISAINFO.PRG file on this disc image: when you get a mo, if you wouldn't mind running it when GEMDOS is booted from the HD and send me the results, I'd be very appreciative!

 

 

gemdos-lisainfo.dc

Model ID: 1 -- Lisa 2: Sony, old I/O board
Boot device: 2
Top of memory: 0x00180000

 

Share this post


Link to post
Share on other sites
9 hours ago, gingerbeardman said:

Very cool - and quite surreal - to see Atari 1st Word on Lisa.

The first time that worked, I laughed considerably.  It's very weird.  I'd like to get a more modern AES running so I can run more Atari stuff, but I'm not sure how feasible that is.  I have a couple of fixes to make to the base GEMDOS and then I'll see how I feel. 

Share this post


Link to post
Share on other sites

I know that somewhere I had documentation for the format of profile block 0xFFFFFF, the identification block, but I can't find it now.  Does anyone remember where this is?

Share this post


Link to post
Share on other sites

Beware that it's a little bit different between ProFile and Widget hard drives. ProFile describes the bad blocks and spares on $FFFFFF (the layout is described on Dr. Patrick Schaefer's IDEfile page, if anyone else is curious), while the Widget drive puts the spare table on $FFFFFE. (The Widget ERS document has the identify block format on PDF page 88 and the spare table format on PDF page 111.)

Share this post


Link to post
Share on other sites

Mostly I was looking for the capacity, so I can actually make the OS use the whole drive (at the moment it just uses a random made-up hardcoded number).  Let's see if I can get this to work without breaking the ability to boot on machines that don't have a hard drive...

Share this post


Link to post
Share on other sites

Just so people know, I haven't forgotten this!  Just been having issues with concentration and executive function of late.

 

There's now only one GEMDOS.SYS file for both hard drive and floppy usage, I'm about halfway through using all of RAM, and I think I know how to use the whole hard disc rather than only a hardcoded chunk of it.  How long it will take to turn that into actual code remains to be seen...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×