How to patch ProDOS

  • Follow


I have written a nice little smartport-compatible driver that lets me
access disk images on my PC via super serial card.

It works fine as long as no other program stomps on it's memory.
Unfortunately, most programs stomp on it. To prevent this, I'd like
to install the driver as a patch of the RAM image of ProDOS at
startup.

Does anyone have any recommendations on where it can go? I've considered
putting it where the clock driver is, but I kind of like having timestamps
on my files. I've considered replacing the /RAM driver, but I might not
be able to condense the code sufficently for that (it's about 400 bytes
right now, I'd guess).

Any other ideas?


0
Reply Sheldon 1/30/2004 9:43:53 PM

There is supposed ot be a place for drivers for ProDOS.  But since I've 
never programmed under ProDOS, let alone a driver for same, I have never 
saut out the specifications.  Perhaps someone else here could give you 
the information you are looking for.

Thankx,
Ed

Sheldon Simms wrote:
> I have written a nice little smartport-compatible driver that lets me
> access disk images on my PC via super serial card.
....

> Does anyone have any recommendations on where it can go?

0
Reply Ed 1/31/2004 12:33:50 AM


Sheldon Simms wrote:

>I have written a nice little smartport-compatible driver that lets me
>access disk images on my PC via super serial card.
>
>It works fine as long as no other program stomps on it's memory.
>Unfortunately, most programs stomp on it. To prevent this, I'd like
>to install the driver as a patch of the RAM image of ProDOS at
>startup.
>
>Does anyone have any recommendations on where it can go? I've considered
>putting it where the clock driver is, but I kind of like having timestamps
>on my files. I've considered replacing the /RAM driver, but I might not
>be able to condense the code sufficently for that (it's about 400 bytes
>right now, I'd guess).

That's quite a bit bigger than the clock driver in any case.

How about just allocating 4 "pages" of memory under the file buffers
and marking it "used" in the bitmap?

Well-behaved ProDOS programs leave allocated space alone,
though I'm sure that some of them think they own the machine...

I'd be interested in your driver--it sounds quite useful.

-michael

Check out amazing quality sound for 8-bit Apples on my
Home page:  http://members.aol.com/MJMahon/
0
Reply mjmahon 1/31/2004 1:26:22 AM

"Michael J. Mahon" <mjmahon@aol.com> wrote in message
news:20040130202622.17204.00001176@mb-m03.aol.com...
: Sheldon Simms wrote:
:
: >I have written a nice little smartport-compatible driver that
lets me
: >access disk images on my PC via super serial card.
: >
: >It works fine as long as no other program stomps on it's
memory.
: >Unfortunately, most programs stomp on it. To prevent this, I'd
like
: >to install the driver as a patch of the RAM image of ProDOS at
: >startup.
: >
: >Does anyone have any recommendations on where it can go? I've
considered
: >putting it where the clock driver is, but I kind of like
having timestamps
: >on my files. I've considered replacing the /RAM driver, but I
might not
: >be able to condense the code sufficently for that (it's about
400 bytes
: >right now, I'd guess).
:
: That's quite a bit bigger than the clock driver in any case.
:
: How about just allocating 4 "pages" of memory under the file
buffers
: and marking it "used" in the bitmap?
:
: Well-behaved ProDOS programs leave allocated space alone,
: though I'm sure that some of them think they own the machine...
:
: I'd be interested in your driver--it sounds quite useful.

And if it'll work with the //c, that will be
a nice feature for them. I am going to be learning
to program smartport drivers also, and would like
to see the source code. May I get a copy once you
get it allocated to the file buffers?

Thanks,

Bill @ GarberStreet Enterprizez };-)
Web Site - http://garberstreet.netfirms.com
Email - willy4SPAM6pa@comXcast.net
Remove - SPAM and X to contact me



---
This email ain't infected, dude!

Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.566 / Virus Database: 357 - Release Date: 1/22/04

0
Reply Bill 1/31/2004 1:44:04 AM

On Sat, 31 Jan 2004 01:26:22 +0000, Michael J. Mahon wrote:

> Sheldon Simms wrote:
> 
>>I have written a nice little smartport-compatible driver that lets me
>>access disk images on my PC via super serial card.
>>
>>It works fine as long as no other program stomps on it's memory.
>>Unfortunately, most programs stomp on it. To prevent this, I'd like
>>to install the driver as a patch of the RAM image of ProDOS at
>>startup.
>>
>>Does anyone have any recommendations on where it can go? I've considered
>>putting it where the clock driver is, but I kind of like having timestamps
>>on my files. I've considered replacing the /RAM driver, but I might not
>>be able to condense the code sufficently for that (it's about 400 bytes
>>right now, I'd guess).
> 
> That's quite a bit bigger than the clock driver in any case.
>
> How about just allocating 4 "pages" of memory under the file buffers
> and marking it "used" in the bitmap?

I was hoping there might be an even more transparent solution, but
I will try this and do some testing to see which programs leave it
alone. For my purposes it's probably sufficient if Merlin doesn't
mess with it.

> Well-behaved ProDOS programs leave allocated space alone,
> though I'm sure that some of them think they own the machine...
> 
> I'd be interested in your driver--it sounds quite useful.

I'll make sure it's available after it's "finished" - which means
basically after I turn it into a prodos system program that loads
itself properly and exits. Hopefully that won't take too long.

BTW, it requires a PC-side server, of course. Other people will have
to write Windows and/or Mac versions if they wish. I use Linux.


0
Reply Sheldon 1/31/2004 4:58:47 PM

On Fri, 30 Jan 2004 20:44:04 -0500, Bill Garber wrote:

> 
> "Michael J. Mahon" <mjmahon@aol.com> wrote in message
> news:20040130202622.17204.00001176@mb-m03.aol.com...
> : Sheldon Simms wrote:
> :
> : >I have written a nice little smartport-compatible driver that
> : >lets me access disk images on my PC via super serial card.
> : >
> And if it'll work with the //c, that will be
> a nice feature for them. I am going to be learning
> to program smartport drivers also, and would like
> to see the source code. May I get a copy once you
> get it allocated to the file buffers?

It should work fine on any Apple II with a super serial card
compatible serial port. Yes, I'll release it all with source
code.

0
Reply Sheldon 1/31/2004 5:00:34 PM

Sheldon Simms <sheldonsimms@yahoo.com> writes:

>On Sat, 31 Jan 2004 01:26:22 +0000, Michael J. Mahon wrote:

>> Sheldon Simms wrote:
>> 
>>>I have written a nice little smartport-compatible driver that lets me
>>>access disk images on my PC via super serial card.
>>>
>>>It works fine as long as no other program stomps on it's memory.
>>>Unfortunately, most programs stomp on it. To prevent this, I'd like
>>>to install the driver as a patch of the RAM image of ProDOS at
>>>startup.
>>>
>>>Does anyone have any recommendations on where it can go? I've considered
>>>putting it where the clock driver is, but I kind of like having timestamps
>>>on my files. I've considered replacing the /RAM driver, but I might not
>>>be able to condense the code sufficently for that (it's about 400 bytes
>>>right now, I'd guess).

If you remove /RAM then you have 60+ kilobytes of Aux RAM to locate your
driver in.

>> That's quite a bit bigger than the clock driver in any case.

Yes - it is only 125 bytes.

>> How about just allocating 4 "pages" of memory under the file buffers
>> and marking it "used" in the bitmap?

That might work for BASIC.SYSTEM but it is not a general solution.
What happens after you exit BASIC.SYSTEM and start another System
program?

ProDOS uses RAM in $BF00..FFFF. A System program is allowed to use
any memory in the range $0400..BEFF so if you put your driver anywhere
in that space it is likely to get stomped on.

The 2nd 4KB $Dxxx language card bank had space left in it at one point
(the quit code used $D100..D3FF) but it was used at one point by Apple
for the $42 Appleshare command (see "New MLI command" v4n8 page 64 and
"New MLI command verboten" v4n10 page 80 in Open-Apple). I have not
looked at P8 v2.0.3 source to see how much space if any is left there -
I suspect that might be where Apple put the Smartport code that allows
P8 v2 to support more than 2 volumes on smartport cards.

Someone with an original IIc did write a driver for the UniDisk 3.5
drives because he was unable to get his ROM upgraded to the 2nd version
and I suspect (but cannot lay my hands on the info at present) that he
may have used that space as well.
-- 
David Wilson  School of IT & CS, Uni of Wollongong, Australia
0
Reply David 2/1/2004 6:23:39 AM

Sheldon Simms <sheldonsimms@yahoo.com> wrote:

>
>I have written a nice little smartport-compatible driver that lets me
>access disk images on my PC via super serial card.
>
>It works fine as long as no other program stomps on it's memory.
>Unfortunately, most programs stomp on it. To prevent this, I'd like
>to install the driver as a patch of the RAM image of ProDOS at
>startup.
>
>Does anyone have any recommendations on where it can go? I've considered
>putting it where the clock driver is, but I kind of like having timestamps
>on my files. I've considered replacing the /RAM driver, but I might not
>be able to condense the code sufficently for that (it's about 400 bytes
>right now, I'd guess).
>
>Any other ideas?

There is a block of RAM in Main LC Bank 1 from $D200-$DFFF (or there
abouts) reserved for the MLI $42 command.  In ProDOS 8 version 1.4(?)
it wasn't used and I used that space for my SmartPort driver for quite
some time.

This command isn't in my ProDOS manual but when I wrote about this to
Open-Apple there was some discussion that it was for future Apple-Talk
use(?).  (I don't have the reference right here.)

--
------------------------------------------------
         http://www3.sympatico.ca/dmitton
  SPAM Reduction: Remove "x." from my domain.
------------------------------------------------
0
Reply Doug 2/1/2004 3:08:40 PM

Doug Mitton <doug_mitton@hotmail.x.com> wrote:

>Sheldon Simms <sheldonsimms@yahoo.com> wrote:
>
>>I have written a nice little smartport-compatible driver that lets me
>>access disk images on my PC via super serial card.
>>
>>It works fine as long as no other program stomps on it's memory.
>>Unfortunately, most programs stomp on it. To prevent this, I'd like
>>to install the driver as a patch of the RAM image of ProDOS at
>>startup.
>>
>>Does anyone have any recommendations on where it can go? I've considered
>>putting it where the clock driver is, but I kind of like having timestamps
>>on my files. I've considered replacing the /RAM driver, but I might not
>>be able to condense the code sufficently for that (it's about 400 bytes
>>right now, I'd guess).
>>
>>Any other ideas?
>
>There is a block of RAM in Main LC Bank 1 from $D200-$DFFF (or there
>abouts) reserved for the MLI $42 command.  In ProDOS 8 version 1.4(?)
>it wasn't used and I used that space for my SmartPort driver for quite
>some time.
>
>This command isn't in my ProDOS manual but when I wrote about this to
>Open-Apple there was some discussion that it was for future Apple-Talk
>use(?).  (I don't have the reference right here.)

I tried SHKing up my source code and notes and placed them on my web
page in case anyone is interested.

http://www3.sympatico.ca/dmitton/UNIDISK35.SHK

I also have my(?) ProDOS8 V1.4 source there as well, I used this to
come up with the patch in the first place.

http://www3.sympatico.ca/dmitton/Prodos8v14_V1_src.dsk.gz

--
------------------------------------------------
         http://www3.sympatico.ca/dmitton
  SPAM Reduction: Remove "x." from my domain.
------------------------------------------------
0
Reply Doug 2/1/2004 5:08:38 PM

In article <pan.2004.01.30.21.43.49.490021@yahoo.com>,
Sheldon Simms  <sheldonsimms@yahoo.com> wrote:
>
>I have written a nice little smartport-compatible driver that lets me
>access disk images on my PC via super serial card.
>
>It works fine as long as no other program stomps on it's memory.
>Unfortunately, most programs stomp on it. To prevent this, I'd like
>to install the driver as a patch of the RAM image of ProDOS at
>startup.
>
>Does anyone have any recommendations on where it can go? I've considered
>putting it where the clock driver is, but I kind of like having timestamps
>on my files. I've considered replacing the /RAM driver, but I might not
>be able to condense the code sufficently for that (it's about 400 bytes
>right now, I'd guess).
>

I faced a similar problems years ago (ProDOS 1.0.x) when I wanted to use a
SSD (Synetix RAM card, aka Flashcard) as my Ramdisk.  So of course, I
wanted to replace the /RAM driver, but my driver code was probably too
long.  ProDOS really isn't written for drivers to hang around for all
..system files.  I did not need my /Ram to be bootable.

So:  I put actual driver code in block 0, saving block 1 for 'swap space',
and blocks 2-576 for /ram.  In place of Prodos /RAM driver I put a simple
'memory swapper'.  When pdos called for a block of /ram, the new /ram
driver wrote the pdos driver code for DiskII into /ram block 1, copied the
/ram block 0 code over diskII code and jmped to the (new) diskII driver
code (up to 512 bytes) to get block for pdos.  On exit it copied the /ram
block 1 (diskII) code back into pdos memory.  Slightly inefficient as 512
x 3 bytes were read/written for every block access, but it was all fast
RAM access.  Since /ram and diskII access never occurred simultaneously,
there was no conflicts, no screen holes needed preserving, no extra pdos
memory was needed, interrupts still worked flawlessly, and it works with
every .system file.  It has worked flawlessly with every pdos version
since because it uses the global page to find the diskII driver code
location (I think it is in the 2nd 4K bank of the LC area as some bank
switching has to occur.)  Dave Lyons only critism (very valid) is that it
may not handle a RESET if it occurs during a /ram access.  But it is very
difficult to do a reset during the /ram access since it occurs very fast.
However, don't press reset during a /ram access to be safe. ;-)  I've
never put an appletalk card into that IIe since all 7 slots are filled +
1Meg AUX slot mem card (and it runs 24/7 for about 20 years now), but it
should work with appletalk.  All the drivers etc are loaded by a simple
bin file at system startup which gives you the option to format the SSD
/ram or keep what is there (ie, it survives system restarts but not power
off/on cycles).

This is an option if you can sacrifice the pdos /RAM driver, works with
all current pdos versions on //e.  Can probably work on a GS under p8 but
I haven't tried.

Good luck.

  --Steve

-- 

 --Steve  (apple2pd@ground.ecn.uiowa.edu)


0
Reply apple2pd 2/3/2004 6:53:24 PM

Sheldon--

Did you ever get around to posting this code somewhere? I got an itch
to do the same thing (basically to transfer 800k ProDOS or Macintosh
floppies from a IIgs to a G4 Powerbook), and would appreciate a chance
to use pre-existing code.

One feature I was planning to include would be to borrow ADT's CRC
protection and run-length encoding algorithms.

One major question I have, which I guess is related to your
"stomping" issue, is whether the System Utilities can be loaded to do
bulk copying from physical disks to the RAM device driver, without
destroying the driver. I suppose with a IIgs there might be some way
while using ProDOS 8 to hide it up out of the 128k space, and use the
$0300 space for hooks out to the main code (I know practically nothing
about IIgs programming). The final solution would be to burn it into a
peripheral card ROM.

0
Reply josephoswaldgg 11/17/2004 11:36:24 PM

10 Replies
232 Views

(page loaded in 0.139 seconds)

Similiar Articles:













7/26/2012 9:42:11 PM


Reply: