[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: IIgs ROM 00 Should Support GS/OS 5.0.4
- Subject: Re: IIgs ROM 00 Should Support GS/OS 5.0.4
- From: dempson@actrix.gen.nz (David Empson)
- Date: Wed, 10 Jul 2002 00:59:48 +1200
- Newsgroups: comp.sys.apple2
- Organization: TelstraClear
- References: <yW2W8.324449$_j6.15564125@bin3.nnrp.aus1.giganews.com>
- User-agent: MacSOUP/2.4.6
- Xref: archiver1.google.com comp.sys.apple2:21120
Bryan Parkoff <BParkoff@satx.rr.com> wrote:
> IIgs ROM 00 Should Support GS/OS 5.0.4.
>
> It does not make sense that IIgs ROM 00 can only run P16/Finder version
> 3.x while ROM 01/03 run GS/OS version 5.x. I understand that both ROM 00
> and ROM 01/03 use the same 65816 microprocessor.
What does that have to do with it? By that argument, you might think
that Nintendo 16-bit games would work on an Apple IIgs.
The last version of the IIgs system software which supports ROM 00 is
System 3.2 (ProDOS-16 1.6). System 4.0 (GS/OS 2.0) only supports ROM 1
(though it will also work on a ROM 3).
There are two major components of the IIgs system software:
1. The toolbox. This is the set of libraries which provide support for
the graphical user interface and a variety of utilities (such as text
handling, integer and floating point maths, etc.)
2. The operating system, which is either ProDOS-16 (System 1.0 through
3.2) or GS/OS (System 4.0 and later).
The toolbox is divided into toolsets, and each toolset has several
functions which can be called. An example of a toolset is the "Memory
Manager" (responsible for allocation, arranging and freeing memory), and
one function provided by the Memory Manager is NewHandle (which
allocates a block of memory).
In a ROM 00 or ROM 01 IIgs, the first 13 toolsets are located in ROM,
and the rest must be loaded from disk. A ROM 3 IIgs has several more
toolsets in ROM, but still needs to load some from disk.
The toolbox and operating system are reasonably independent, except in a
few areas, e.g. the toolbox depends on the operating system for loading
disk-based toolsets, and there are some toolsets like Standard File
(open and save dialog boxes) which are completely dependent on the
operating system.
Each version of the IIgs system software makes changes to both the
toolsets and the operating system. Since some of the toolsets are
located in ROM, the only way those toolsets can be changed is through a
patch mechanism, which works by loading code into RAM which gets called
instead of the code in the ROM (or which does some setup and then calls
the original code in the ROM). In most cases, individual functions in
the ROM-based toolset are patched, but in some cases the entire
ROM-based toolset is replaced with one loaded from disk (e.g. when
running System 6.0 or 6.0.1 on a ROM 3 IIgs, a few of the big toolsets
like the Window Manager are loaded from disk rather than being patched).
These patches are located in four files in the */System/System.Setup/
folder: TOOL.SETUP, TS1, TS2 and TS3.
TOOL.SETUP contains patches for all supported ROM versions (depending on
the system version, this will be ROM 0 only, ROMs 0 and 1, ROM 1 only,
or ROMs 1 and 3). The TS1 and TS2 files contain patches which are
specific to ROM 00 and ROM 01 respectively. The TS3 files contains
patches which are specific to ROM 3. (You can save a little disk space
by deleting whichever of TS2 and TS3 is not required on your specific
IIgs, assuming you are never going to use that boot disk on a IIgs with
another ROM version).
The toolsets in ROM for a ROM 00 IIgs are roughly the equivalent of IIgs
System 1.0. The toolsets in ROM for a ROM 01 IIgs are roughly the
equivalent of IIgs System 2.0. If you boot System 2.0 on a ROM 00 IIgs,
it will install patches for the ROM-based toolsets to bring their
functionality into line with the ROM-based toolsets in ROM 01. System
2.0 doesn't need to load very many patches on ROM 01.
By the time you get up to System 3.2, there are quite a lot of patches
needed for both ROM 00 and ROM 01, but more are needed for ROM 00, and
even the functions which are patched on both ROMs may need different
patches.
In System 4.0, Apple decided that it was time to give up on supporting
ROM version 00. The upgrade to ROM version 01 had been available for at
least a year, and it was free of charge. Removing support for ROM
version 00 saved them a lot of development and testing effort, not to
mention saving the disk space required to implement patches which were
specific to ROM 00.
The ROM 3 IIgs came out shortly after that. Its ROM-based toolsets are
roughly the equivalent of System 5.0, so if you boot System 5.0 on a ROM
3, it doesn't need to load very many patches. As more features and bug
fixes were added in later system versions, an increasing number of
patches were required.
System 4.0 and later does not include any code to install toolbox ROM
patches for ROM version 0. Assuming you managed to hack in the patches
from System 3.2, it still wouldn't work properly, because you would be
missing all the code changes in System 4.0 (and particularly System 5.0,
in which some ROM-based toolsets were almost completely rewritten), and
you would probably end up with something that claimed to be System 4.0
(or whatever) but was missing several features (or crashed when trying
to use those features).
You also cannot "hack" the ROM 01 toolbox patches to work on ROM 00,
because they would need different code to work around problems in the
older ROM version (or to add missing functionality).
There could also be other parts of GS/OS and the disk-based toolsets in
System 4.0 and later which are relying on bug fixes in the non-toolbox
parts of the ROM for ROM version 01. For example, System 5.0's
AppleTalk support code is almost certainly not compatible with ROM 00,
which had seriously buggy AppleTalk firmware.
> I believe that both banks $FE-FF has its own GS/OS routines rather than
> native machine language.
GS/OS is written in 65816 assembly language. It doesn't use interpreted
code. In addition, the ROM does not contain any parts of GS/OS (except
for the rudimentary Slot Arbiter, which is in ROM for the ROM 3 IIgs).
GS/OS didn't even exist when ROM 01 was released, so how could part of
it be in ROM?
> It is why GS/OS v5.x always access to the bank $FE-FF routines before it
> is loaded into memory.
There is no GS/OS version 5.x or 6.x. You mean IIgs System 5.x or 6.x.
(In System 5.x, GS/OS is version 3.y, and in System 6.x, GS/OS is
version 4.y; x and y aren't necessarily the same. You can see precisely
which version of GS/OS is being loaded by pressing the space bar early
in the startup sequence.)
In a ROM 00 or 01 IIgs, bank $FE contains the first 13 toolsets of the
toolbox, and bank $FF is the rest of the firmware, including the Control
Panel, CGA support, interrupt handling, AppleTalk, Monitor, Applesoft
BASIC, SmartPort, Serial Port handling, 80-column firmware, mouse
firmware, etc.
In a ROM 3 IIgs, the additional banks ($FC and $FD) contain yet more
toolbox code, and possibly some extensions to the other firmware.
> It may be possible to let GS/OS v5.x and v6.x to be running on IIgs ROM
> 00 without loading bank $FE-FF routines. I can modify GS/OSs v6.x to read
> all the routines from floppy disks into memory without needing to read from
> bank $FE-FF. It will work. What do you think?
Some parts of the firmware are always executed from ROM, so you cannot
replace them. In theory, you could replace the other parts with the
matching code from ROM 01, but executing from RAM instead of ROM. The
problem is that the parts which are still running from ROM will have
bugs which you cannot easily work around, and in order to understand
them you will probably need a complete disassembly of ROM 00 and ROM 01,
and several parts of the IIgs System Software.
Good luck trying to decipher two lots of 128 KB of machine code, and
that is just the ROMs.
This seems like rather a lot of effort just to support running current
system software on an obsolete ROM version. It would be a lot easier to
get a copy of ROM 01 and install it into a jury-rigged socket in your
ROM 00 IIgs.
One immediate problem I can see is that the "get firmware revision"
function runs entirely in ROM. Any application which checks the ROM
version will always see a ROM 00 IIgs as a ROM 00, no matter how much
replacement code you put in RAM. If the application refuses to run on a
ROM 00, then you would have to patch the application in order to get it
to work on your jury-rigged system.
> You may notice that IIgs ROM 01 loads ROM 03's both bank $FC-$FD into
> memory from floppy disks.
As I mentioned above, these banks mainly contain extra toolsets, which
are loaded from disk on a ROM 1 using the TOOLnnn files (TOOL014 and
higher).
The toolbox has special mechanisms for supporting disk-based patches and
replacement toolsets. The same situation does NOT apply to the rest of
the firmware.
--
David Empson
dempson@actrix.gen.nz