Dragon OS9 with drivewire support

A place to discuss everything Dragon related that doesn't fall into the other categories.
fridgemagnet
Posts: 89
Joined: Mon Nov 24, 2014 8:33 pm

Re: Dragon OS9 with drivewire support

Post by fridgemagnet »

..ignore that last para, I'm confusing my V2FLO to FLO2V programs....
pser1
Posts: 1668
Joined: Sun Mar 25, 2012 7:32 pm
Location: Barcelona (SPAIN)

Re: Dragon OS9 with drivewire support

Post by pser1 »

Hi Jon,
it's fun to examine files searching for these bits and bobs.
All of the disks 180k have $0002D0 as number of sectors and have offset $10 = 2 wich should mean Double density, but it is Single density, for sure!
Disks type 360k have $0005A0 as number of sectors and have offset $10 = 3 wich should mean Double Density and Double Sided, but only one of them is true:
The disk is double density and single side so 360K or it is single density double sided = 360K
Finally the disks of 720k have $000B40 as number of sectors and have offset $10 = 3 which is the same than the previous one
The difference is that offset $17 has value 2 instead of value 1 as it has for the other two types of disks
This last offset means number of sectors per cluster.
I have verified that offset +3 has the number of sectors per track, this value is always $12 (18) for the three types of disk
So maybe it could be worked out this way:
By default TotalTracks=40*(offset +3) . . . . . . . . . . . . . 40*18 = 720 tracks
Doubled if offset $10 = 3 (or its BIT0 equals 1) . . . . . . . . = 1440
Doubled again if offset $17 has value 2 . . . . . . . . . . . . . = 2880 I think that this one should only be tested if the previous one was 1
Well, this is only an idea out of these data bunch.
Any advice will be very welcome

regards
pere
User avatar
tormod
Posts: 416
Joined: Sat Apr 27, 2013 12:06 pm
Location: Switzerland
Contact:

Re: Dragon OS9 with drivewire support

Post by tormod »

pser1 wrote:So, No problem with a Dragon64 with or without drives (disk or DW4), but
I cannot start NitrOS-9 in XRoar if the Dragon hasn't the HDB-DOS installed, don't know why this happens.
XRoar only activates the Becker port if the option -cart-becker is specified (or enabled implicitly by some configurations, like when loading a "hdbdw3bck" ROM image).
User avatar
tormod
Posts: 416
Joined: Sat Apr 27, 2013 12:06 pm
Location: Switzerland
Contact:

Re: Dragon OS9 with drivewire support

Post by tormod »

fridgemagnet wrote:Next question then is can you access the Dragon's "real" floppy drives from that image? From what I can see, the D0, D1, D2 descriptors appear to be associated with rb1773 (CoCo controller maybe?) and not ddisk (well that's what the old OS9 driver for the WD2797 used to be called) and attempting to access them just yields an error 216, the drives don't even spin up.
I think Ken's images are based on the "coco2" port and include drivers for the rb1773-based Tandy controllers and DriveWire. There are also NitrOS-9 images for Dragon containing the "ddisk" WD2797 drivers. They haven't got much testing lately though, but please try them out: http://www.nitros9.org/latest/
fridgemagnet
Posts: 89
Joined: Mon Nov 24, 2014 8:33 pm

Re: Dragon OS9 with drivewire support

Post by fridgemagnet »

Hi Pere,
All of the disks 180k have $0002D0 as number of sectors and have offset $10 = 2 wich should mean Double density, but it is Single density, for sure!
All standard DragonDOS disks (as far as I'm aware) are double density, I think DeltaDOS was single density - in essence I think what this means is you have 18 sectors per track per side. There are then 4 types to consider - a standard double density, 40T/SS disk ($10=2).
Disks type 360k have $0005A0 as number of sectors and have offset $10 = 3 wich should mean Double Density and Double Sided, but only one of them is true:
Here's the variability = a 360K DragonDOS compatible (ie. double density) would be either 40T/DS ($10=3) or 80T/SS ($10=2).
Finally the disks of 720k have $000B40 as number of sectors and have offset $10 = 3 which is the same than the previous one
and that's the final one = 80T/DS.

So assuming you are using the disk operation processor at [$C004] to read the sectors (this is the one where you need to specify track/sector info) then I think all you need to do is change whether you count from 1-18 sectors or 1-36 something like:

sector_count= (DD.FMT & 1)==1 ? 36 : 18 ;
t=0;
s=1;
for(n=0 ; n < DD.TOT ; n++ )
{
read_sector (t,s) ;
s++;
if ( s == sector_count )
{
s=1 ;
t++ ;
}
}

you get my drift.. :)
pser1
Posts: 1668
Joined: Sun Mar 25, 2012 7:32 pm
Location: Barcelona (SPAIN)

Re: Dragon OS9 with drivewire support

Post by pser1 »

Hi Tormod,

this is the bat file I use to start XRoar without drives but wth Drivewire.
=====================================================================
cd..
copy ..\XRoar\ROMs\d64rom1-dwload-becker-dragondos.rom d64_1.rom
copy ..\XRoar\ROMs\d64rom2V31.rom d64_2.rom
xroar -machine dragon64 -machine-cpu 6309 -extbas d64_1.rom -altbas d64_2.rom -cart-becker -force-crc-match -joy-left 0,0:1:0 -kbd-translate -lp-file ..\..\XRoar\sortida.txt
del *.rom
=====================================================================
If I don't press SHIFT, then it starts AUTOLOAD.DWL, so it works fine but when I send this command:
DLOAD"APP/DOS"
Just shows "NITROS9 BOOT" and hangs Xoar

cheers
pere
Last edited by pser1 on Mon Mar 23, 2015 12:28 am, edited 2 times in total.
fridgemagnet
Posts: 89
Joined: Mon Nov 24, 2014 8:33 pm

Re: Dragon OS9 with drivewire support

Post by fridgemagnet »

tormod wrote:
fridgemagnet wrote:Next question then is can you access the Dragon's "real" floppy drives from that image? From what I can see, the D0, D1, D2 descriptors appear to be associated with rb1773 (CoCo controller maybe?) and not ddisk (well that's what the old OS9 driver for the WD2797 used to be called) and attempting to access them just yields an error 216, the drives don't even spin up.
I think Ken's images are based on the "coco2" port and include drivers for the rb1773-based Tandy controllers and DriveWire. There are also NitrOS-9 images for Dragon containing the "ddisk" WD2797 drivers. They haven't got much testing lately though, but please try them out: http://www.nitros9.org/latest/
I would need to try and refresh my OS9 skills to remember how to "unload" the Tandy controller & it's descriptors, then load in the ddisk ones. I also remember that the ddisk controller does some fairly nasty things with the interrupts and I think may even tie in (in a perverse fashion) with the kbvdio driver so it could all fall apart... I'll have a play when I get time.
User avatar
tormod
Posts: 416
Joined: Sat Apr 27, 2013 12:06 pm
Location: Switzerland
Contact:

Re: Dragon OS9 with drivewire support

Post by tormod »

You can build a new boot track, including the drivers you want, from inside NitrOS-9 using the "cobbler" command. There are alternative tools around, but I don't know if they are easier to use. A really easy to use tool or wizard for this is dearly missing from NitrOS-9. An alternative is manipulating the bootfiles/makefile in the source code, and cross-build a new disk image.

EDIT: I think I meant "os9gen" and not "cobbler", although they do similar things.
fridgemagnet
Posts: 89
Joined: Mon Nov 24, 2014 8:33 pm

Re: Dragon OS9 with drivewire support

Post by fridgemagnet »

tormod wrote:You can build a new boot track, including the drivers you want, from inside NitrOS-9 using the "cobbler" command. There are alternative tools around, but I don't know if they are easier to use. A really easy to use tool or wizard for this is dearly missing from NitrOS-9. An alternative is manipulating the bootfiles/makefile in the source code, and cross-build a new disk image.

EDIT: I think I meant "os9gen" and not "cobbler", although they do similar things.
Yes, that rings several bells, I've built a few up from scratch in the past so it's more just memory recall stuff.
fridgemagnet
Posts: 89
Joined: Mon Nov 24, 2014 8:33 pm

Re: Dragon OS9 with drivewire support

Post by fridgemagnet »

Hi Pere,

On the subject of OS9 disk formats etc. I've attached a small program I wrote years ago which may be of some help. It was designed to copy a file from an OS9 disk to DragonDOS, you basically had to boot into OS9, do a "dir -e" command to retrieve the starting LSN of the file then under DOS do something like:

EXEC 3072,<OS9-LSN>,<DOS-Filename>

As a result it has to do a similar set of computations to your FLO2V program in translating the LSN. It also uses the [$C026] Read-Abs-Sector call to do the transfer, which having taken a cursory glance at your code also utilises so maybe something there you can reuse.

Rgs,

Jon.
Attachments
os9copy.zip
(1.01 KiB) Downloaded 137 times
Post Reply