Megalextoria
Retro computing and gaming, sci-fi books, tv and movies and other geeky stuff.

Home » Digital Archaeology » Computer Arcana » Apple » Apple II » More info on Apple /// drivers?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
More info on Apple /// drivers? [message #303412] Tue, 27 October 2015 10:16 Go to next message
Aaron Daughtry is currently offline  Aaron Daughtry
Messages: 226
Registered: July 2013
Karma: 0
Senior Member
Hello,

I am looking for more detail on writing Apple /// drivers. I have the
1982 version of the Device Drivers Writer's Guide and it's answering
most questions for me, but not everything.

I'd like to know, for instance, more about the bytes in-between
sub-drivers (e.g. between .FMTD2 and .FMTD3). I'd also like to know if
Apple ever published a larger list of manufacturers and types and
sub-types.

Cheers,

Mike...
Re: More info on Apple /// drivers? [message #303421 is a reply to message #303412] Tue, 27 October 2015 11:00 Go to previous messageGo to next message
David Schmidt is currently offline  David Schmidt
Messages: 993
Registered: October 2012
Karma: 0
Senior Member
On 10/27/2015 10:16 AM, ultramagnus_tcv wrote:
> Hello,
>
> I am looking for more detail on writing Apple /// drivers. I have the
> 1982 version of the Device Drivers Writer's Guide and it's answering
> most questions for me, but not everything.

The only other place where documentation is common is in device driver
source code itself - you can see a bunch of them here:
http://apple3.org/iiisourcecode.html

> I'd like to know, for instance, more about the bytes in-between
> sub-drivers (e.g. between .FMTD2 and .FMTD3). I'd also like to know if
> Apple ever published a larger list of manufacturers and types and
> sub-types.

I've written a few myself, and can probably help. But I'm not sure what
you're asking for in this case. If you mean the DIB - that data
structure is pretty well defined. If you mean the padding bytes after
the device name - they're spaces. Example:

;------------------------------------
;
; Device identification Block (DIB) - VSDRIVE
;
;------------------------------------

DIB_0 .WORD DIB_1 ; Link pointer
.WORD Entry ; Entry pointer
.BYTE 008 ; Name length byte
.ASCII ".VSDRIVE "; Device name
.BYTE 080 ; Active, no page alignment
.BYTE 000 ; Slot number
.BYTE 000 ; Unit number
.BYTE 0E1 ; Type
.BYTE 010 ; Subtype
.BYTE 000 ; Filler
DIB0_Blks .WORD 0000 ; # Blocks in device
.WORD DriverMfgr ; Manufacturer
.WORD DriverVersion ; Driver version
.WORD 0000 ; DCB length followed by DCB

(followups set to comp.sys.apple2.programmer)
Re: More info on Apple /// drivers? [message #303429 is a reply to message #303421] Tue, 27 October 2015 13:38 Go to previous message
Aaron Daughtry is currently offline  Aaron Daughtry
Messages: 226
Registered: July 2013
Karma: 0
Senior Member
On 2015-10-27 15:00:09 +0000, David Schmidt said:

> On 10/27/2015 10:16 AM, ultramagnus_tcv wrote:
>> Hello,
>>
>> I am looking for more detail on writing Apple /// drivers. I have the
>> 1982 version of the Device Drivers Writer's Guide and it's answering
>> most questions for me, but not everything.
>
> The only other place where documentation is common is in device driver
> source code itself - you can see a bunch of them here:
> http://apple3.org/iiisourcecode.html

Thank you much.

>> I'd like to know, for instance, more about the bytes in-between
>> sub-drivers (e.g. between .FMTD2 and .FMTD3). I'd also like to know if
>> Apple ever published a larger list of manufacturers and types and
>> sub-types.
>
> I've written a few myself, and can probably help. But I'm not sure
> what you're asking for in this case. If you mean the DIB - that data
> structure is pretty well defined. If you mean the padding bytes after
> the device name - they're spaces. Example:

Yes, I think the book I have sets out the DIB well, however, it doesn't
seem to address bytes in between subdrivers... I'm new to programming
so it could be in front of my face.

.... and so it is.... somewhat.

These are the bytes between your .CFFA3000 names:
20 20 20 20 80 01 00 F1 10 00 00 00 53 44 00 10 00 00 44 00 32 01
20 20 20 20 80 01 01 F1 10 00 00 00 53 44 00 10 00 00 66 00 32 01
20 20 20 20 80 01 02 F1 10 00 00 00 53 44 00 10 00 00 88 00 32 01

Looks to me one change is the Unit field is incremented by x01. In the
example I have, we reach up to 07. IOW: .D1 - .D7

Although I don't know what the 44, 66, and 88 refer to. Probably part
of the DIB I've not looked at yet.

But since you're already here.... I am trying to understand the Entry
field. My book states:

"The Entry field (bytes $2 and $3) points to driver's entry address.
The entry point is defined by the device driver's writer and the value
is relocated during system boot to reflect the driver's location in
memory after startup. The pointer is used by the SOS device manager
when it calls the device driver."

Is the value one you chose when writing your device driver? Does it
matter what the value is when the driver is at rest, so to speak, or
only when loaded into memory?

Mostly as a programming exercise, a friend and I are writing a Python
script that can be fed an imaged Apple /// disk, pull out the
SOS.DRIVER file, parse through it for drivers and their associated
DIBs, then log the output to a CSV.

Cheers,

Mike Whalen
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Turtle IIe
Next Topic: Apple II keyboard encoder header connector
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Mar 29 07:51:07 EDT 2024

Total time taken to generate the page: 0.07681 seconds