[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Apple ][ using PC floppy



On Dec 28, 8:06 am, vladitx <vlad...@nucleusys.com> wrote:
> One feature I put is converting Apple's half-tracks to real tracks, so
> the PC diskette can hold up-to 80 tracks. Anyone to know a quick patch
> of DOS / ProDOS to use them? It will result in 280KB (70 tracks) or
> 320KB (80 tracks) capacity if there isn't any internal OS limitation.

If you look at Beneath Apple ProDOS the patch to change from 35 to 40
tracks is a single byte. The code in question looks something like
this:

; on entry A=LSB of block number
    LDX $D356 ; get MSB of block #
   BEQ OK ; 00nn is always OK
   DEX
   BNE BAD ; 0200 and higher is never OK
   CMP #$18
   BCC OK ; less than 0118 is OK
BAD
   SEC ; indicate error
   RTS
OK
   CLC ; indicate sucess
   RTS

It is easy to patch this to allow 40 tracks as 40 * 8 is $0140 in hex
so all that changes is the CMP #$18 => CMP #$40.

Changing the CMP #$18 to CMP #$FF would increase the block count to
$01FF (511 blocks) or just under 64 tracks.Replacing the CMP #$18 with
NOP, CLC would allow the use of a full 64 tracks.

80 tracks is $0280 blocks so the short cut using DEX no longer works
and the routine needs to become slightly longer (there is fortunately
some unused space following this routine). You either need to use a
proper 16 bit comparison or a different clever piece of code. I will
have a think about this. Also, this change would affect any real 5.25"
Disk II drives you might have on the system.

Finally, as the Disk II driver does not implement a FORMAT routine,
you will need to either modify an existing ProDOS disk formatter or
write your own to format these larger disks.