[Coco] OS-9 RBF - accessing past what LSN0 says?
Robert Gault
robert.gault at att.net
Wed Jan 28 22:31:34 EST 2015
Allen Huffman wrote:
> I have a 128MB EZ135 disk that I used with RGB-DOS/OS-9. I put 255 RGB-DOS drives on it at the end, and used the rest of the space for OS-9 (about 50MB).
>
> The OS-9 section has an LSN0 that says 0313FE (201,726) sectors, and beyond that is the RGB-DOS portion.
>
> If I use dEd, or BASIC09, and try to get past sector 201,726, it won’t let me. In years past, I have gotten around this by modifying LSN0 to something larger, and then I can. That’s what I resorted to doing tonight.
>
> How do utilities like RSDOS and PCDOS work when you put in a disk without an LSN0? I expect the driver itself does not care (if it’s like OSK/OS-9000).
>
> Thanks for any shedding of light you might be able to do…
>
> — Allen
>
It is not that difficult but best left to an OS-9 driver designed to access the
RGBDOS (now HDBDOS) portion. Here is an example of my vemudsk driver which acts
exactly like emudsk but adds the offset of $5A000 to all LSNs and then adds $264
for each additional RGBDOS drive.
I use PD.STP in the descriptor to indicate the RGBDOS drive number.
getsect pshs d,x 4 bytes
lda PD.DRV,y get drive number requested
cmpa #2
bhs driverr only two drives allowed, return error
sta >drive tell hardware
* new code to get RGB Disk Basic drive#. RG
ldb PD.STP,y get step value now vdrive#
clra
tfr d,x regx now is vdrive#
* put VLSN on stack
ldd vofset+1,pcr $A000
pshs d 2 bytes
ldb vofset,pcr $05
pshs b 1 byte stack now has 7 bytes see structure above
* Virtual drives are 35-track so LSN <=$276
cmpx #0 which Vdrive is regX?
beq gs2 if drive0 branch and use size of vhd
gs1 ldd tlo,s get lo word of os-9 size
addd #630 sectors on a 35t disk
std tlo,s save new value
ldb thi,s get hi byte of os-9 size
adcb #0 add in any carry from first addition
stb thi,s save new value
leax -1,x next vdrive
bne gs1 continue until correct drive# reached
gs2 ldd tlo,s add in LSN on Vdrive to total offset
addd rx,s add lo word of lsn
tfr d,x
ldb thi,s get hi offset byte
adcb rb,s add lsn hi byte
lda ra,s recover command
* end of new code. rg
stb >lsn
stx >lsn+1
You can do the same thing with a SCSI system.
Robert
More information about the Coco
mailing list