Page 1 of 1

Unpack a DSK file in windows

PostPosted: Jul Thu 10, 2014 11:27 am
by aserlanger
Sorry if this has been answered before - Is there a way to unpack files from a .DSK image in windows?
TIA

Re: Unpack a DSK file in windows

PostPosted: Jul Fri 11, 2014 1:16 pm
by garryj
aserlanger wrote:Sorry if this has been answered before - Is there a way to unpack files from a .DSK image in windows?
TIA

Not that I know of. The original Altair 88-DCDD disk controller that is emulated pre-dated CP/M and used a physical sector size of 137 bytes instead of the 128 byte (and multiples thereof) sectors that CP/M used. A Windows utility to read the .DSK images is on my todo list, but since the "T" utilities provide an indirect way to do this already, it's never been much of a priority.

Re: Unpack a DSK file in windows

PostPosted: Jul Fri 11, 2014 7:53 pm
by aserlanger
OK thx

Re: Unpack a DSK file in windows

PostPosted: Jul Wed 16, 2014 3:57 am
by Frotz661
Have you tried cpmtools?

Re: Unpack a DSK file in windows

PostPosted: Jul Wed 16, 2014 7:28 am
by aserlanger
Will take a look at it thx

Re: Unpack a DSK file in windows

PostPosted: Jul Wed 16, 2014 12:29 pm
by garryj
I've tried it, but there doesn't appear to be a diskdefs parameter that tells it the 128 byte CP/M sector is at a 3 byte offset within the 137 byte physical sector of the 88-DCDD disk system. The source is available, but I've never had the time to see what it might take to tweak it to work with the 8800micro. For anyone interested in taking this on, this is the 88-DCDD sector layout:

Code: Select all
; Format of 88-DCDD disk sector
trknum:
   db   0      ;Always 80h OR'd with track#
bootend:         ;End address for system cold boot area
   dw   0      ;(only used on protected system tracks)
csecbuf:
   ds   csecsiz      ;128 byte CP/M record block
stopbyte:
   db   0ffh      ;Always 0ffh
chksum:
   db   0      ;Sum of bytes 3-130 with no carry in 8 bits
unused:
   db   0, 0, 0, 0   ;Currently unused

Re: Unpack a DSK file in windows

PostPosted: Nov Sat 01, 2014 1:22 pm
by wd5gnr
Garry, this post inspired me to write a converter to go from DSK to CPM format so you can read using cpmtools. See https://github.com/wd5gnr/diskcvt

I'll try to update it soon so it could go back the other way but out of time for now.

If anyone uses this, let me know it is working for you as it is "lightly tested"

Re: Unpack a DSK file in windows

PostPosted: Nov Sat 01, 2014 7:50 pm
by garryj
wd5gnr wrote:Garry, this post inspired me to write a converter to go from DSK to CPM format so you can read using cpmtools. See https://github.com/wd5gnr/diskcvt

I'll try to update it soon so it could go back the other way but out of time for now.

If anyone uses this, let me know it is working for you as it is "lightly tested"

I'll try to take a gander at it, Al. It's great to see new software showing up for the Briel products :D

For the past couple of months I've also been puttering about building a fairly comprehensive Windows-based CP/M disk image utility. It's a C# GUI (.Net Framework 4.5) that will allow you to copy files to/from a disk image and the local file system, and directly between disk images via drag/drop. For example, you'll be able to drag files from a disk image for Peter Schorn's AltairZ80 and drop them on an 8800micro DSK image, and vice versa. It's diskdef driven ala cpmtools, so it should work for many of the CP/M image formats that are floating about.

But the time I've been able to dedicate to it has been inconsistent, so it's still a ways out -- but getting closer. Can't have too many tools :wink:

Re: Unpack a DSK file in windows

PostPosted: Nov Sat 01, 2014 9:43 pm
by elchucko
I read all posts to this forum and enjoy what I can glean from the comments. Unfortunately for me I'm can't write code and don't understand many of the technical (software) stuff. I visit every so often and watch for firmware updates and hardware add-ons. ;)

Re: Unpack a DSK file in windows

PostPosted: Nov Sat 01, 2014 9:44 pm
by wd5gnr
Sounds good Garry -- I've had good luck running C# CLR stuff on Linux using Mono so if you want some testing on that let me know.

I have the other direction done sort of, but not sure what to do with the boot address on track 0 (the two bytes after the 80). On an example DSK most, but not all, sectors on track 0 have 0E 00 (intel order, so 00 0E) there but a few sectors have 00 and I'm not sure why.

I'll push what I have up on git hub sometime later today or tomorrow.

Re: Unpack a DSK file in windows

PostPosted: Nov Sat 01, 2014 10:28 pm
by garryj
Sounds good Garry -- I've had good luck running C# CLR stuff on Linux using Mono so if you want some testing on that let me know.

Will do. Although I'm comfortable with Linux, I do spend most of my development time in the Windows environment. I'm aware of Mono, but that's about it. I see in their FAQ that the Mono API is "somewhere between .net 2.0 and 4.0". When I'm at a decent checkpoint, I'll get the Mono migration analyzer and see what it has to say.

Re: Unpack a DSK file in windows

PostPosted: Nov Sat 01, 2014 10:37 pm
by wd5gnr
My GP3EZ software started life as a Windows C# app and I ported it for Mono. Most of the work was either GUI size adjustments or things like enumerating the serial port.

Another item on my list -- you know I like talking to the box over the serial port (and I did the Altair-RFP project) but I am thinking about setting up something so the bootloader runs code from the connected PC using a muxed serial line. That will take a rewritten BIOS but not very difficult, I think. I think APE has a similar setup. Figure I'd pipe the console to a telnet port, grab PRT and PUN to a file, etc.

Don't know when/if I'll get to it, though.

Re: Unpack a DSK file in windows

PostPosted: Nov Sun 02, 2014 7:35 am
by wd5gnr
elchucko wrote:I read all posts to this forum and enjoy what I can glean from the comments. Unfortunately for me I'm can't write code and don't understand many of the technical (software) stuff. I visit every so often and watch for firmware updates and hardware add-ons. ;)

These are fun little machines aren't they?

Re: Unpack a DSK file in windows

PostPosted: Nov Sun 02, 2014 1:24 pm
by elchucko
Yes they are! ;)