Tim Thomson wrote: > On Wed, 16 Feb 2000 01:35:53 +1300, David Empson > wrote: > > Tim Thomson wrote: > > > > > Wonder how they knew what/where to patch, cause the prodos source is > > > no where around, is it? > > > > Not as such, but Quality Software released "Beneath Apple ProDOS" with > > supplements which included comments to go along with a disassembly of > > ProDOS-8 up to version 1.3 or thereabouts. It would be easy to adapt > > this to later versions. > > Hmm, I've got Beneath Apple ProDOS, but no supplements :( They are probably still available from Byte Works. There were two published. One covers ProDOS 1.0 through 1.1.1, and the other covers 1.2 and 1.3. (I have the second one.) > > The internals of the ProDOS-8 kernel have never been documented, but the > > main entry points are all through the $BF00 global page, which is almost > > completely documented. If patches involve replacing some major function > > of ProDOS (e.g. the 5.25" driver or the clock driver) then it is easy > > enough to find the relevant area in the kernel (and the corresponding > > part of the SYS file) to patch the code out. > > Hmm, well, networking code wasn't in there much in v1.9 was it? No version of ProDOS has built-in networking code. > Is the original 1.9 around somewhere? It is included with IIgs System 5.0.4, if I remember right. > > The recommended technique for this sort of task would be to operate > > similarly to the Apple II Workstation Card (AppleTalk card for the IIe). > > It patches itself into the ProDOS kernel's main entry point at $BF00, > > giving it first crack at all calls. Anything destined for the network > > is handled by firmware on the card, while anything for the local system > > gets passed on to the real kernel entry point. > > When does it patch it? It is actually more a case of ProDOS patching itself. During startup, ProDOS looks for a file in the root directory called ATINIT (before it looks for the first .SYSTEM file). If ATINIT is found, it is loaded and executed. There are several variations of the code in the ATINIT file. The file structure for all variations is as follows: - Code at the beginning - Data at the end, including the user name and chosen network printer. The variations I'm aware of are: - A version of ATINIT which works with an Apple II Workstation Card, to patch the card into the ProDOS kernel. - A version of ATINIT for use on an Apple IIgs which allows access to a network printer, but not to a file server. - The GS/OS version of ATINIT, which contains no code (other than an RTS instruction) and lives in */System/System.Setup. GS/OS uses a completely different method of setting up AppleTalk support, and patches the ProDOS-8 kernel itself when transferring control to ProDOS-8. > Can you boot off the workstation card? Yes, if you have an AppleShare 2.0.x or 3.0.x server with Apple II boot support installed and configured correctly. This uses a completely different boot procedure from a local disk, which includes downloading the ProDOS kernel directly from the server. The kernel would be patched to hook through the workstation card as part of this. > The card has an 8k EPROm (2764), and I'm guessing a 8k SRAM? (6264). Yes, that is a standard 8K static RAM. > Uses a Z8530, as does the PC card. I'm guessing the Z8530 puts the data > out to the SRAM, where the apple picks it up? Possibly, but it would need a processor and/or DMA support circuitry to do that. > Did you get my email the other day about your book? Yep - I just haven't got around to answering lots of recent E-Mail. -- David Empson dempson@actrix.gen.nz Snail mail: P O Box 27-103, Wellington, New Zealand