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

Re: Help with IIGS Slot Register $C02D



OK,

It turned out to be fairly simple. Thank heaven for the IIGS monitor step
routine, though.

The IIGS maintains two bytes in $E1 that mirror (normally) the user's
Control Panel settings (from Battery RAM) for the two internal serial ports.

On a ROM3, the Control Panel selections for Slots 1 and 2 can be Printer,
Modem, AppleTalk or Your Card. The ROM1, I think, is a bit more limited in
its selections, but I don't have one powered up to say for sure.

Anyway, for Slot 1, the location is $E102C0, and for Slot 2, the location is
$E102CC. The 11 bytes following these two addresses contain all the other
serial port settings (e.g. Baud/Handshake/etc...).

The internal serial port firmware reads these locations during its
initialization routines in order to set the appropriate serial parameters.

Here's how those two bytes decode on a ROM3

$00 = Printer
$01 = Modem
$02 = AppleTalk
$03 = Your Card

So, if the IIGS is initially set to 'Your Card' and booted, $E102C0/$E102CC
will have an $03.

Then, even if you fiddle with the $C02D slot register to change from the
external card to the internal port, the initialization routine will fail
because it does not expect an $03, but rather a $00 or $01. (I'm not sure
how it handles the AppleTalk/$02).

The solution is to store a $00 or $01 in $E102C0 (Slot 1) or $E102CC (Slot
2) before setting or clearing the bits in $C02D that control the
internal/external setting.

Since I'm primarily an AppleWorks nut, I'll make up and post a nifty
switching macro to implement and document all this stuff.

It will be well commented so you non-AppleWorks guys can easily move it to
BASIC or assembly should you need this type of thing.

Thanks, Antoine, for your earlier feedback and suggestions. I appreciate it.


 

Hugh Hood


P.S. - As a side note, I noticed that for 19,200 Baud (the supposed firmware
max) the byte stored is only an $0E. I'll see if storing an $0F there will
up the BPS to 38,400 for use with the _firmware_.






in article C9155BE2.14212%hughhood@earthlink.net, Hugh Hood at
hughhood@earthlink.net wrote on 11/26/10 12:43 PM:

> Well...
> 
> 
> It seems that even GS/OS 6.0.1 never got around to implementing the ability
> actually to switch internal/external slots with DYN_SLOT_ARBITER (as
> described in GS Tech Note #69).
> 
> So, that would appear to be a dead end.
> 
> A step/trace of the internal serial port firmware reveals different coding
> depending upon whether the default setting is set to 'Printer' vs. whether
> the default is 'Your Card' and later changed to 'Printer' with a poke to
> $C02D. I _think_ the difference involves the routines that read the default
> control panel settings (Baud/Handshaking/etc) for the serial port firmware.
> 
> I'll try to get to the bottom of this and post a solution.
> 
> 
> 
> Hugh Hood
>