[Coco] Running RSDOS ML programs under OS9

David J Bush twixt at cstone.net
Wed Aug 11 00:41:55 EDT 2004


> ...
> > This suggests that ML programs written for RSDOS might be portable to OS9
> > without making them entirely position-independent. Just "wrap them up" in
> > some PI code which will request the memory regions the app uses when
> > running under Disk Basic. 
> That is not a good idea. There is no way to force OS-9 to place a 
> requested block of memory in any specific location. The only thing 
> certain is that the blocks will be contiguous if there is room in your 
> user space.

By "any specific location" do you mean logical memory or physical memory?
If you mean physical memory, this does not seem like a problem for the vast
majority of RSDOS software, which uses less than 64K. As long as the code
can still reside in the same logical address range, access the same logical
memory locations for data, and run the same I/O routines it expects to run,
(except for disk I/O) it should work, shouldn't it? 

For example, a relatively recent poster wished that a Pacman type game
were ported to OS9. wouldn't this be a way to do that?

 
> It is relatively easy to adapt RSDOS ml programs to the OS-9 
> environment. It is much easier to do any kind of disk I/O under OS-9.

Oh, no argument about that. Of course, the code might need to be
disassembled first. With my approach, the code would just need to be
examined for all I/O subroutine calls, which are usually JSRs with
indirect addressing. 

> >Then the wrapper code will copy the app to the
> > new location. Switch to ROM mode if necessary, so the I/O Disk Basic
> > routines would be accessible. (This assumes your OS9 CoCo would still have
> > an RSDOS ROM in it somewhere.) 
> The ROMs don't go anywhere but switching to them requires very careful 
> manipulation of the MMU and GIME registers. This kind of system hacking 
> is better done from Disk Basic with assembly programs rather than from 
> OS-9. There is little in the ROMs that is not done better in OS-9.

Yes, you're right- ROM mode is probably a bad idea. Instead, the wrapper
program could contain all the I/O subroutines, and wherever you find a
JSR with indirect addressing, change it to point to the routines in the
wrapper.

Of course, all this is predicated on the assumption that an app can tell
OS9 it wants to use specific 8K pages of logical address space. I'm talking
about ML apps here, not Disk Basic. I absolutely agree with you that
Basic09 blows Disk Basic to smithereens.

I'm also making the assumption that **the apps don't try to access the MMU.**
Of course the really cool stuff like Max-10 and CoCoMax 3 would not be so
easily ported.

And since OS-9 disks and RSDOS disk I/O do not mix well, the apps should
not try any disk access. But that still leaves a lot of stuff!

> If you intend to grab all the hardware and don't care about 
> multitasking, don't bother with OS-9. Stick to Disk Basic and write 
> assembly programs.

My question isn't really about what I want. Porting RSDOS programs to OS9
would surely be something lots of people would be interested in. There
are lots of cool games and stuff that work on the CoCo2. 

David






More information about the Coco mailing list