[Coladam] SW roms

Rich Drushel drushel at apk.net
Fri Apr 2 01:38:10 CEST 2010

On Thu, April 1, 2010 2:49 pm, geoff at oltmansfamily.org wrote:

> I'm not sure I agree. According to the Adam Technical Manual, the MIOC can
> be set up where the Smartwriter ROM (in the low 32k address space) is
> replaced with 32k system RAM.

     Hi Geoff, there are configurations to mix/match ROM and RAM address
spaces.  But if you are running a SW ROM image from RAM, then you have
to trap all the cases where SW is trying to swap back to itself in ROM.
Writing code to use multiple address spaces is tricky, as you have to
be sure to be running code from one 32K while only swapping out the other
-- otherwise poof your code vanishes.  You can however load up sequential
banks of XRAM with the same code at the same address space, so when the
bank switches, it is still going to execute the same instruction.  RAMdisk
code has to do tricky stuff like that.

     What I am sure you can't do is have an XRAM configuration where the
low 32K is from one bank and the high 32K is simultaneously from another.
E.g., low 32K from bank 0, high 32K from bank 1.  If you have put your
SW ROM code into the low 32K to run it from there, as a shadow ROM, then
you could only use the high 32K of XRAM for other purposes.  SW from ROM
is expecting to be able to use both low and high 32K of bank 0 of XRAM
for extra workspace.  It does this by moving some code bits into the
banks to handle switching problems as described above.  SW does not know
about any XRAM other than bank 0 (as 128K and up XRAM were aftermarket
and need additional hardware to provide a separate XRAM bank-select
port -- originally part of the Orphanware parallel interface, also available
as an "addresser card").

     Thus, the easiest way to get SW to run from XRAM is to patch all
the code that does bank-switching to put the SW ROM into low 32K, with
the value to make that the low 32K of XRAM, and disable SW's own detect
of XRAM (bank 0 = 64K), to prevent it from trying to use XRAM as a
document buffer at all.

     I haven't looked over the SW code in detail for awhile, but this is
to the best of my recollection (and also experience with RAMdisk drivers,
which are elegant when they work but tricky to write).


Richard F. Drushel, Ph.D.            | "They fell:  for Heaven to them no hope
Department of Biology                |  imparts / Who hear not for the beating
Case Western Reserve University      |  of their hearts."
Cleveland, Ohio  44106-7080  U.S.A.  |         -- Edgar Allan Poe, "Al-Aaraaf"

More information about the Coladam mailing list