[Coladam] Bypass/Disable Adam SmartWriter

Rich Drushel drushel at apk.net
Mon Aug 9 05:34:03 CEST 2010

On Sun, August 8, 2010 8:46 pm, mark wrote:

[Re: Rich Drushel disassembling the SmartWriter ROM]

> I don't know him other than his presents on the list here, but I know
> he's working on dissembling the wp.rom again, he did it once before but
> didn't remark it much.

     It is a hard job to comment disassembly code ... there are no
guides to what the code is doing besides your own familiarity with
running the software, and past assembly programming/disassembly
experience.  As I noted earlier, my "r97" disk2 patch doesn't work
correctly because I did not understand the code well enough, and did
not test it enough (I never used SmartWriter for anything serious).
The comments that are in the R80 disassembly listing are limited to
the ADAMlink modem boot code, plus substitution of the official labels
for all EOS equates, as a first step towards understanding the code.

> On Sun, Aug 8, 2010 at 8:28 PM, Paul Severini <paul_severini at hotmail.com>
> wrote:

>> I need to basically modify the section called EOS_BOOT and
>> have it bypass SmartWriter and drop into a custom menu before the device
>> search occurs. It sounds simple enough, but I wanted to see if any attempts
>> had been made. I'll keep searching. Please let me know if you comes across
>> any material to support my task.

     It's doable, but tricky.  An ADAM cold boot does the following:

(1)  Begin execution at address $0000 in the SmartWriter ROM.  This has
the sequence DI / JMP $0080.

(2)  At $0080, code bank-switches the center-slot XROM to the upper 32K
address space and checks for the presence of the magic word $9966 at address
$8000.  If found, we JMP $8002 to run the XROM.  Otherwise, we bank-switch
back to RAM in the upper 32K, then load the EOS ROM (which sits at $6000,
above SmartWriter) it to its final location in RAM at $E000.  This ends with
a JMP _EOS_START, EOS's initialization routine.

(3)  _EOS_START is the routine that initializes ADAMnet and looks for
active devices and bootable media.  If nothing bootable is found, it
terminates in a JMP _WP (an EOS function call), which after insuring that
the SmartWriter ROM is switched into the lower 32K address space, does
the JMP $0100 to actually execute SmartWriter application code.

(4)  If you want something else to happen other than SmartWriter, you need
to have your own code running at $0100; however, you can't just replace
everything.  The SmartWriter ROM contains the patterns for all the ASCII
characters, and there is a reserved memory location $0102 that *MUST* contain
a pointer to the start of this pattern generator table.  Even if you replace
the SmartWriter app with completely different code, you *MUST* preserve
the following:

$0100:  JR  $0104
$0102:  DW  ASCII_GENERATORS    ; EOS reserved memory location LOC_IN_ALPHA
$0104:  ...                     ; other code begins here
                                ; probably JP MY_APP would be a good choice


; 128 characters, 8 bytes each (1=pixel set, 0=pixel clear)

        DB  xx, xx, xx, xx, xx, xx, xx, xx    ; character 0
        DB  xx, xx, xx, xx, xx, xx, xx, xx    ; character 127

        ...                     ; rest of user code here
                                ; could even (eventually) be SmartWriter,
                                ; if there is room

(5)  Basically you should preserve the existing contents of addresses $0000
to $00FF, and work your new code around the ASCII generators as indicated

     I have only ever seen one ADAM running with a totally new SmartWriter
ROM, and that was Ron Collins' Mini Winnie hard drive system which booted
a version of TDOS from ROM; it would work even if the hard drive itself
was not functioning.  Tony Morehen made it for him.  It had no SmartWriter
app at all, but obeyed (4) and (5) above.

     You are more than welcome to modify the R80 SmartWriter disassembly
source, if you can, to create a new ROM boot, with or without the SmartWriter
app.  Note that the source is set up for use with the Z80ASM+ assembler by
SLR (a CP/M-based program).  Not sure how other Z80 assemblers will like
it (especially the very convenient .PHASE and .DEPHASE directives).

     *Rich* (Dr. D.)

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