[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Questions on launching Prodos Program from GS/OS



Oliver Schmidt <ol.sc@web.de> wrote:

> Hi Andy,
> 
> >> 1. Is it correct to assume that there will always be a 64k /RAM device
> >> and that it will be empty?
> >
> >It can be disconnected.  P8 tech note #8, "Dealing with /RAM", refers you
> >to section 5.2.2 of the ProDOS 8 technical reference manual:
> >http://linux.cis.monroeccc.edu/~paulrsm/6502/PDOS8TRM.HTM#5.2.2
> 
> Maybe my question wasn't precise enough. In fact my question is: Is it
> correct to assume that there is always a 64k /RAM device at the point
> of time when GS/OS booted into ProDOS 8?

Possibly, but why make the assumption at all? Why should launching P8
from GS/OS be any different from a direct boot into P8 as far as your
application is concerned? Or your application being launched after other
P8 applications (which might have left something in /RAM)? What about a
IIe with third-party multi-bank auxiliary memory card?

Any code dealing with auxiliary memory should be checking for /RAM and
dealing with it as required. It shouldn't assume it will be there, nor
that it might be empty. If it is disconnected already, then you can't
assume it is safe to reconnect it or use auxiliary memory for your own
purposes, except for the regions documented in the P8 reference. There
might be some extended drivers or third party software using the
reserved areas.

If /RAM is present then you can disconnect it and use most of auxiliary
memory; you should then reconnect /RAM when your application quits.

If someone was to come up with an enhanced version of ProDOS-8 now, it
would be logical to follow Apple's established conventions and use the
"reserved" areas of auxiliary memory to extend the operating system. In
this case, /RAM must be disconnected permanently, and applications
should follow the documented procedures to avoid stepping on what might
be operating system code.

On a standard unpatched IIgs system, the first launch of a ProDOS-8
application from GS/OS should always have /RAM present and it should be
empty. If it is disconnected while P8 is running and then there is a
quit (back to GS/OS) and a subsequent relaunch of P8, is it possible
that /RAM might still be disconnected? I haven't looked into the innards
of the GS/OS-to-P8 connection to know this, but I expect /RAM will cease
to exist and will then be reconstructed (empty) when P8 is relaunched.

See ProDOS-8 technical note 26 (Polite Use of Auxiliary Memory).

> >> 2. My understanding is, that there is some means of associating files
> >> with programs in GS/OS even for ProDOS 8 programs. I assume that GS/OS
> >> uses the "ProDOS 8 startup file protocol" (used i.e. by BASIC.SYSTEM
> >> for .BAS files) to tell the ProDOS 8 program about the file to launch.
> >> 
> >> Does this association work based on file names or do I have to provide
> >> some magic to allow GS/OS to assiciate my files with my program.
> >> Currently my files are BIN files with start address 0000 using a *.PRG
> >> naming scheme.
> >
> >See page 49 of the GS/OS reference.
> 
> I don't have access to the GS/OS reference.

Page 49 is talking about prefixes and what goes at $280. When a P8
application is launched from GS/OS, the prefix might be many different
things, and $280 should contain the pathname to the SYS file, but it
might be either an full or partial pathname.

The GS/OS Reference doesn't appear to explain whether GS/OS supports the
ProDOS-8 SYS file convention for opening a startup document (by patching
it in to an identifiable data structure just after $2000) but I'm pretty
sure it can launch Applesoft BASIC files via BASIC.SYSTEM, so it should
work with other applications as well, given a suitable icon file which
identifies the file type and auxiliary type as belonging to your
application.

> >Associating a data file with a program can be done with a IIgs icon editor.
> 
> I don't have access to a running GS/OS installation. Could you please
> elaborate on this? Especially on my question above. Has associating of
> data files something to do with file types, file name schemes or is it
> a file-by-file approach - as I understand from your remark above?

File names are not used for document association with applications.

The file type and auxiliary type are used to identify which application
should be used to open a particular document. Icon files (located in the
Icons directory in the root directory of any volume) are the method used
to specify this information, and also associate an icon with the
document and the application. You would need a IIgs and the appropriate
application to create these, but you could try creating one by hand as
the file format is documented in the Apple II File Type note for file
type $CA (FTN.CA.XXXX). You should also read FTN.About for general
guidlines on file types and auxiliary types, though I doubt Apple is
assigning them any more.

There are also the File Type Descriptor files (type $42) which are used
by Finder to describe file types in human readable form. These are also
documented in a file type note (FTN.42.XXXX).

It might be easiest to get hold of a IIgs from somewhere.

-- 
David Empson
dempson@actrix.gen.nz