Hi Rob,
Smartport deals with devices, not slots/drives.
Is your mapping done once ProDOS 8 is loaded?
Antoine
translate between the two.Hi Rob,Right. But even the Smartport would need to use the softswitches to access a slot card. Which should mean there has to be a mapping of some kind to know which slot a device is in. I have come across an instance where it would be a benefit to be able to
Smartport deals with devices, not slots/drives.
Is your mapping done once ProDOS 8 is loaded?
Antoine
As far as I know the mapping has nothing to do with Prodos 8. If you follow the routine at $C70D (entry to the Smartport), it ends in COP 82. This co-processor routine must have a routine to map a slot to a device number.
to translate between the two.Hi Rob,Right. But even the Smartport would need to use the softswitches to access a slot card. Which should mean there has to be a mapping of some kind to know which slot a device is in. I have come across an instance where it would be a benefit to be able
Smartport deals with devices, not slots/drives.
Is your mapping done once ProDOS 8 is loaded?
Antoine
As far as I know the mapping has nothing to do with Prodos 8. If you follow the routine at $C70D (entry to the Smartport), it ends in COP 82. This co-processor routine must have a routine to map a slot to a device number.I should add that the SmartPort device number does not match Prodos device table at $BF30.
able to translate between the two.Hi Rob,Right. But even the Smartport would need to use the softswitches to access a slot card. Which should mean there has to be a mapping of some kind to know which slot a device is in. I have come across an instance where it would be a benefit to be
Smartport deals with devices, not slots/drives.
Is your mapping done once ProDOS 8 is loaded?
Antoine
to the SmartPort device number. This mapping is not exposed externally, and the location in memory changes from version to version of ProDOS. When you make an MLI call with a unit number ProDOS will consult the table to figure out what device number toProDOS-8 2.0.x (and unofficial 2.4 and FX) construct an internal mapping from ProDOS unit number (the things listed in DEVLST at $BF30, which encode the mapped slot/drive, which is exposed via BASIC.SYSTEM but also needed for the DEVADR table at $BF10)As far as I know the mapping has nothing to do with Prodos 8. If you follow the routine at $C70D (entry to the Smartport), it ends in COP 82. This co-processor routine must have a routine to map a slot to a device number.I should add that the SmartPort device number does not match Prodos device table at $BF30.
ProDOS 1.2...1.9 mirror a 3rd and 4th device in S5 to S2,D1/2 only, and leave DEVADR entries pointing at $C5xx. There's no need for a table, just hardcoded logic.
That's the only Slot/Drive to SmartPort device number mapping I'm aware of, but I'm still a n00b. Apologies if this is off topic.
That's the only Slot/Drive to SmartPort device number mapping I'm aware o= >f, but I'm still a n00b. Apologies if this is off topic.
That is incorrect. Prodos does not know anything about SmartPort and vice = >versa. When you do a status call with SmartPort, there is no interaction w= >ith Prodos and there are no calls made by Prodos to the SmartPort. The cal= >l to the SmartPort uses the same logic as Prodos, but they are not connecte= >d.
The only device numbers that are used in the Smartport are for slots 5 and = >7 (device numbers being 50 and 70). But these device numbers are for findi= >ng the built-in SmartPort whereas the device number for Prodos are for the = >external slots. Eventually though, the SmartPort has to access the externa= >l slots where the SCSI/SD/CFFA card is with the hard drive connected. Ther= >efore a device number assigned by the SmartPort needs to be mapped to a slo= >t where a compatible SmartPort device is found. You can have a SCSI card i= >n slot 7 and slot 2, skipping slots 4, 5 and 6, but the SmartPort assigns d= >evice number of 1 and 2 for those two used slots. Therefore a table has to=
be saved somewhere in memory to match a device number with the slot so the= correct softswitches can be accessed for that device.
I am trying to locate that table in memory.
Devices which support Smartport need to support a ProDOS entry point as well, where the ProDOS entry point is $Cx0A and Smartport is at $Cx0D.
The table you are interested in is handled by ProDOS 8 in the System Global Page at $BF10-$BF2F. It contains the ProDOS entry points for each device, indexed for slot 1...7 and Drive 1...2 (so 14 total devices supported).
For a IIgs, slot 5 goes to $C50A. Slot 6 (for a Disk II) goes to $D000.
When $D000 is called, code there interprets the ProDOS values in ZP and effectively calls RWTS and reads the block indicated.
And for KEGS with 7 devices in slot 7, slot 7 drives 1 and 2 point to
$C70A, but the remapped devices are in other slots and go to $FD08.
The ProDOS driver at $FD08 converts the ProDOS call (cmd at $42, unit at $43, buffer at $44,45 and block at $46,$47) into a Smartport compatible format and jumps to the address it pulls from $FD6E,X and $FD7D,X where
X = Unit >> 4. So ProDOS will make Smartport calls, and this is how it handles more than 2 devices per slot. This is internal to ProDOS 8.
The addresses I gave are for ProDOS 2.0.3 which is what I run usually.
The thing is, Prodos is not being called to get SmartPort information. I am using the SmartPort Commander from OpenApple January 1987 which calls $C70D directly. We can skip slot 5 for now.are the emulators accessing the table in Prodos? They shouldn't be.
The routine is just
JSR $C70D
DFB 00 ; command
DW Parm_List
RTS
PARM_LIST DFB 3 ; # of parms
DFB 0 ; unit #
DW CTRL_LIST
DFB 0 ; sub command
CTRL_LIST DFB 00
As a memory dump, it is just:
300: 20 0D C7 00 07 03 60 03 00 0C 03 00 00
If this is called directly, it will return the number of devices for slot #7 at $030C. Is it maybe just an emulator thing? This routine works in Sweet16, GSPort and Kegs, although the number of devices returned is different for each emulator. But still,
Devices which support Smartport need to support a ProDOS entry point as
well, where the ProDOS entry point is $Cx0A and Smartport is at $Cx0D.
The table you are interested in is handled by ProDOS 8 in the System Global >> Page at $BF10-$BF2F. It contains the ProDOS entry points for each device,
indexed for slot 1...7 and Drive 1...2 (so 14 total devices supported).
For a IIgs, slot 5 goes to $C50A. Slot 6 (for a Disk II) goes to $D000.
When $D000 is called, code there interprets the ProDOS values in ZP and
effectively calls RWTS and reads the block indicated.
And for KEGS with 7 devices in slot 7, slot 7 drives 1 and 2 point to
$C70A, but the remapped devices are in other slots and go to $FD08.
The ProDOS driver at $FD08 converts the ProDOS call (cmd at $42, unit at
$43, buffer at $44,45 and block at $46,$47) into a Smartport compatible
format and jumps to the address it pulls from $FD6E,X and $FD7D,X where
X = Unit >> 4. So ProDOS will make Smartport calls, and this is how it
handles more than 2 devices per slot. This is internal to ProDOS 8.
The addresses I gave are for ProDOS 2.0.3 which is what I run usually.
Thanks for replying Kent.
The thing is, Prodos is not being called to get SmartPort information.
I am using the SmartPort Commander from OpenApple January 1987 which
calls $C70D directly. We can skip slot 5 for now.
The routine is just
JSR $C70D
DFB 00 ; command
DW Parm_List
RTS
PARM_LIST DFB 3 ; # of parms
DFB 0 ; unit #
DW CTRL_LIST
DFB 0 ; sub command
CTRL_LIST DFB 00
As a memory dump, it is just:
300: 20 0D C7 00 07 03 60 03 00 0C 03 00 00
If this is called directly, it will return the number of devices for
slot #7 at $030C. Is it maybe just an emulator thing? This routine
works in Sweet16, GSPort and Kegs, although the number of devices
returned is different for each emulator. But still, are the emulators >accessing the table in Prodos? They shouldn't be.
It's confusing if you post multiple messages.
Calling $C70D is the Smartport firmware entry point for a device in slot
7 which supports Smartport calls. If you put a RamFAST SCSI in slot 7,
then that entry point will work and it will lost all the mountable
volumes on that SCSI card.
Let's back up. What card do you have in slot 7?
Emulators simply support this type of entry point to provide disk images
in an easy way that ProDOS fully understands. Unless you have a
particular interest in emulators and how they work, you can ignore emulators.
You keep mentioning COP $82, but that's something only you are seeing,
so you'll have to be more specific. COP $82 has nothing to do with
Smartport in general, nothing to do with the KEGS emulator in specific,
and I suspect it isn't really there.
I've explained how ProDOS 2.0.1 and later automatically remap
devices--if a slot 7 smartport-compatible device has 7 volumes, ProDOS 2.0.01 will remap devices 3-7 to appear to be in other slots, since it
knows which slots are really empty. But on ProDOS versions before that, devices like RamFAST would peek into the $BF10-$BF2F ProDOS device table
and insert their extra volumes as other slots, say slot 4 or slot 1.
This was a bad idea since multiple cards had no good way to prevent from stomping all over each other, so most cards which could do this had a
way to disable it (and you should disable it, and use ProDOS 2.0.1 and later, ProDOS 2.0.3 was the last official release).
No. I am more trying to understand the software from the Open Apple magazine that accesses the SmartPort and displays each volumes information.that follow the JSR $C70D.
You keep mentioning COP $82, but that's something only you are seeing,
so you'll have to be more specific. COP $82 has nothing to do with Smartport in general, nothing to do with the KEGS emulator in specific, and I suspect it isn't really there.
I am using emulators, but the ROM's (01 and 03) should have been ripped from a real IIGS. If you follow the code starting at $C70D in Kegs, just before the RTS
there is a COP 81. This shows up in all the emulators. I may have misinterpreted what was being pulled off the stack and pushed back on to know where the RTS actually > returns to. But my understanding is that the return address is after the 3 bytes
The table you are interested in is handled by ProDOS 8 in the System Global >Page at $BF10-$BF2F.
The table you are interested in is handled by ProDOS 8 in the System Global >Page at $BF10-$BF2F.My understanding is that for the SmartPort implementation built into
the IIgs, there's another indirection through a table at $E1/0FC0.
I've explained how ProDOS 2.0.1 and later automatically remap
devices--if a slot 7 smartport-compatible device has 7 volumes, ProDOS
2.0.01 will remap devices 3-7 to appear to be in other slots, since it
knows which slots are really empty. But on ProDOS versions before that,
devices like RamFAST would peek into the $BF10-$BF2F ProDOS device table
and insert their extra volumes as other slots, say slot 4 or slot 1.
This was a bad idea since multiple cards had no good way to prevent from
stomping all over each other, so most cards which could do this had a
way to disable it (and you should disable it, and use ProDOS 2.0.1 and
later, ProDOS 2.0.3 was the last official release).
Right. I understand how Prodos works. I am trying to link how the
software from the Open Apple magazine ties into Prodos.
The software uses this calculation to find the SmartPort entry.
AD=49152+7*256 ; $C700
SM=AD+peek(AD+255)+3 ; $C7FF
SM then has a value of $C70D.
At this point, the software is the same for both real IIGS and
emulators. I am unable though to confirm what is at $C7FF on a real
IIGS. I am assuming it is the value $0A, then when 3 is added to it, it >becomes $0D as well. This should mean that the SmartPort entry point on
a real IIGS is at $C70D, correct?
But is $C70D only available when a SCSI/SD/CFFA card is installed? I
always thought the SmartPort was built into ROM on the IIGS. This might
be where my confusion is.
But still. it nags me that the OpenApple software makes no reference to >calling Prodos in any way. If needed, I can post the software.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 297 |
Nodes: | 16 (2 / 14) |
Uptime: | 32:10:56 |
Calls: | 6,669 |
Calls today: | 1 |
Files: | 12,216 |
Messages: | 5,338,219 |