Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

And another IIgs question: change BRAM without GS/OS?

15 views
Skip to first unread message

Ivan X

unread,
Jan 13, 2012, 12:00:43 AM1/13/12
to
I'd like to be able to perform what the "Network" control panel does
-- switch between booting into GS/OS or ProDOS 8 -- without needing
the Network control panel. I'm assuming it changes something in
battery RAM. I'm also assuming there's got to be some way of changing
stuff into there from assembly without needing GS/OS loaded.

If I'm right about these things, could anyone point the way as to how
I might go about it? Thanks...

David Empson

unread,
Jan 13, 2012, 3:17:03 AM1/13/12
to
Ivan X <iv...@ivanx.com> wrote:

> I'd like to be able to perform what the "Network" control panel does
> -- switch between booting into GS/OS or ProDOS 8 -- without needing
> the Network control panel. I'm assuming it changes something in
> battery RAM. I'm also assuming there's got to be some way of changing
> stuff into there from assembly without needing GS/OS loaded.

If memory serves, the Network control panel's setting for which OS to
boot gets stored in the ATINIT file, not in the parameter RAM. It should
be easy enough to confirm this by copying the file, changing the setting
and comparing ATINIT with the copy.

--
David Empson
dem...@actrix.gen.nz

A2CPM

unread,
Jan 13, 2012, 9:57:53 AM1/13/12
to
Hi!

On Jan 13, 12:00 am, Ivan wrote:
> I'd like to be able to perform what the "Network" control panel does
> -- switch between booting into GS/OS or ProDOS 8 -- without needing
> the Network control panel. I'm assuming it changes something in
> battery RAM. I'm also assuming there's got to be some way of changing
> stuff into there from assembly without needing GS/OS loaded.
<--- snip --->

I wrote some programs in Kyan Pascal that allow me to change the
drive that the IIgs boots from or switch slot 6 between 'your card'
and 'disk port' from ProDOS. The source is buried in my A3000, at the
moment.

Willi

ict@ccess

unread,
Jan 13, 2012, 11:32:04 AM1/13/12
to
Just in case you still want to play with the BRAM

BATRAMMER is a program to save and restore IIgs BatRAM settings when
you replace your GS battery.
but can also be used to compare control panel saves as well as make
changes to

http://mirrors.apple2.org.za/ftp.apple.asimov.net/images/gs/utils/BATRAMMER.SHK

A2CPM

unread,
Jan 15, 2012, 1:20:10 PM1/15/12
to
Hi!

On Jan 13, 12:00 am, Ivan wrote:
Below my signature is the Kyan Pascal source text for a program to
alter the battery RAM from ProDOS. It looks as if I intended to
change the machine language procedure to use the arguments passed to
it from Pascal but never did so.

Willi

Source:
program S6S;
{ Change battery backed RAM to use slot 6 disk port }
{ 9/6/98 }

const Your_Card = 1;
Slot_1 = 33;
Slot_2 = 34;
Slot_3 = 35;
Slot_4 = 36;
Slot_5 = 37;
Smart_Port = 0;
Slot_6 = 38;
#A
Slot_6 EQU 38
#
Disk_Port = 0;
#A
Disk_Port EQU 0
#
Slot_7 = 39;
Boot_slot = 40;

procedure WriteBParam{(s, v:integer)};
begin
#A
CLC
XCE
REP #$30
LONGI ON
PEA Disk_Port
PEA Slot_6
LDX #$0B03
DB $22,0,0,$E1 ; JSL $E10000
LONGI OFF
SEC
XCE
#
end;

begin
WriteBParam{(Slot_6, Disk_Port)};
writeln;
writeln('Next boot from slot 6 will use disk port');
writeln
end.


A2CPM

unread,
Jan 15, 2012, 2:02:00 PM1/15/12
to
Hi!

This is a much better version of the source of a program to switch
to 'Your Card'. Thanks to the debugger in AppleWin I was able to
verify that the new logic will work on my IIgs...

Willi

Improved source:
program S6U;
{ Change battery backed RAM to use card inserted in slot 6 }
{ 8/30/98 }
{ Updated Jan. 15, 2012 }

const Smart_Port = 0;
Your_Card = 1;
Slot_1 = 33;
Slot_2 = 34;
Slot_3 = 35;
Slot_4 = 36;
Slot_5 = 37;
Slot_6 = 38;
Slot_7 = 39;
Boot_slot = 40;

procedure WriteBParam(s, v: integer);
begin
#A
; Set second argument
LDY #5
LDA (_SP),y
STA pea1+1
; Set first argument
LDY #7
LDA (_SP),y
STA pea2+1
; Alter battery RAM
CLC
XCE
REP #$30
LONGI ON
pea1 PEA $0001
pea2 PEA $0026
LDX #$0B03
DB $22,0,0,$E1 ; JSL $E10000
LONGI OFF
SEC
XCE
#
end;

begin
WriteBParam(Slot_6, Your_Card);
writeln;
writeln('Next boot from slot 6 will use the card installed there');
writeln
end.

Geoff Body

unread,
Jan 16, 2012, 8:32:26 AM1/16/12
to
From disassmbley of the Network CDEV code, BRAM location $0062 holds
the OS version to boot.

possible values are

1 GS/OS
2 P8



CLC
      XCE
PHP
      REP   #$30
      LONGI ON
 PEA   $0002
 PEA   $0062
      LDX   #$0B03
      JSL   $E10000
      LONGI OFF
      PLP
      XCE


Geoff

Antoine Vignau

unread,
Jan 16, 2012, 3:40:46 PM1/16/12
to
Geoff,
Nice PHP/PLP usage, really really nice, I like what they did there!

Ivan,
Is your program IIgs specific or is it a P8 one?

Antoine

Ivan X

unread,
Jan 16, 2012, 4:18:29 PM1/16/12
to
First off, THANKS for all the responses. I was able to isolate
location $62 and its possible values by using the BATRAMMER program,
which I was unaware of.

On Jan 16, 3:40 pm, Antoine Vignau <antoine.vig...@laposte.net> wrote:

> Is your program IIgs specific or is it a P8 one?

IIgs specific, but needs to run in P8. Well, it's a little ridiculous
and I don't think it's possible to do what I wanted anyway, which is
connected to my other post about customizing START.GS.OS.

The scenario is this: I'm about to release A2SERVER, which is
basically a packaged-up-as-a-VM-appliance, ready to go, minimal-
configuration Netatalk server. Netatalk for the rest of us. Or
something.

Since I didn't want to distribute Apple's software in the VM, I
provide a script which gets the "Disk 7" image from Apple's servers
and extracts the boot blocks and puts them in the right places, and
sets up the ATINIT file just so, etc. And because P8 and Basic.System
are on that disk image and can be copied to the shared volume, you
basically have a netbootable ProDOS 8 machine set up entirely from the
Linux side, which is cool. (IIe clients never need the Workstation
disk at any point.)

I also wanted to be able to have a script download the the GS/OS disk
images and put them in the shared volume, along with image and archive
manipualtion utilities (including your own MountIt, if you don't
mind), *just in case* the IIgs user doesn't have them. Absurd, I know,
but bear with me.

I kind of got obsessed with this "no disks" scenario, and envisioned a
IIgs user with no OS being able to netboot into ProDOS 8, use an 8-bit
image-to-disk utility (DSK2FILE) to make disks, and then with the
disks install GS/OS to the shared volume. (Actually, to do that,
they'd first need to install the Network: 800K Disk script, boot from
that, mount the shared volume, and THEN run the installer selecting
the Network:Server Startup script and targetting the shared volume.)

But the catch is that: if the IIgs is set for GS/OS in the Network
control panel -- value 1 in BRAM location $62, as Geoff deduced --
then the boot blocks are going to want to run START.GS.OS no matter
what, and will generate an error $0046 (File not Found) when it
doesn't find it. So my brilliant idea was to provide a stub
START.GS.OS with code that sets BRAM to value 2 in $62, for ProDOS 8
boot.

But where I'm stuck is that while START.GS.OS (or code substituted for
it) loads at $6800, that must not be where it executes first. It will
instead break into the monitor, and if I type 6800G, then my code
executes as expected. But I can't figure out where the boot blocks are
actually jumping to after loading START.GS.OS, mostly because my GS
chops are not so hot.

I've decided it's not terribly important, because who doesn't have GS/
OS disks or can't get them? But it's still pretty interesting.
Learning a lot about the machine, certainly.

Ivan.

Geoff Body

unread,
Jan 17, 2012, 8:40:55 AM1/17/12
to
Ivan,
this should allow pressing the 8 key at inital network boot and over
ride the BRAM settings
There is a small time interval just as the 3 dots appear top left that
you should be able to press 8 and boot to ProDOS.
The section of boot code loads at $1000, I have added extra code to
the end of this block of code and patched in a JSR at $1160 to jump to
this code to check if 8 has been pressed.


"ProDOS16 Image"
all values shown are HEX values


offset 100
92

offset 360
20 7d 14

offset 67d

ad 0 c0 29 ff 00 c9 b8 0 d0 06 a9 02 00 8d 53 14 a9 10 0f 60


Geoff
0 new messages