davidgiven / fluxengine

PSOC5 floppy disk imaging interface
MIT License
354 stars 68 forks source link

IMG files of TRS-80 disks either fail to convert using dsktrans or cannot be read by emulators once converted #287

Open scotia70 opened 3 years ago

scotia70 commented 3 years ago

Hi,

I've read about 50 SS/DD TRS-80 floppies with FluxEngine with the ibm decoder. They were originally formatted with NEWDOS/80 (compatible with LDOS I believe).

I read them with:

./fluxengine read ibm -s drive:1 -o d1.img --cylinders=0-79x2 --copy-flux-to=d1.flux --decoder.write_csv_to=d1.csv

Converted to DSK (and JV3) with:

dsktrans -itype raw -otype dsk d1.img d1.dsk ; done
dsktrans -itype raw -otype jv3 d1.img d1.jv3 ; done

Some disks converted without errors, while some threw errors.

None of the converted disks were readable with either sdltrs (on MacOS) or TRS32 (on Windows). The emulator either refused to mount them or NEWDOS/80 would return a directory read error.

However, I have read these floppies successfully before recently with getdisk (DOS) and readdisk (DOS) and they created working DSK images.

ldkraemer commented 3 years ago

For dsktrans, you can see the types of images that are supported with this command: [code]dsktrans -types[/code]

Disk image types supported:

gotek : Gotek 1440k disc image collection gotek72 : Gotek 720k disc image collection remote : Remote LibDsk instance rcpmfs : Reverse CP/MFS driver floppy : Linux floppy driver dsk : CPCEMU .DSK driver edsk : Extended .DSK driver apridisk : APRIDISK file driver copyqm : CopyQM file driver tele : TeleDisk file driver ldbs : LibDsk block store ldbst : LDBS (text form) sap : SAP file driver qrst : Quick Release Sector Transfer imd : IMD file driver ydsk : YAZE YDSK driver raw : Raw file driver (alternate sides) rawoo : Raw file driver (out and out) rawob : Raw file driver (out and back) myz80 : MYZ80 hard drive driver simh : SIMH disc image driver nanowasp : NanoWasp image file driver logical : Raw file logical sector order jv3 : JV3 file driver dc42 : Disk Copy 4.2 cfi : CFI file driver

From this list the three that match the .IMG (Sector Dump) are raw, rawob (raw out back), rawoo (raw out out). These types equate to the 22DISK definitions for CP/M as listed in some old documentation.

;alt SIDES specifies that first one side then the other is written/read before the cylinder number is advanced. ; ;outback CYLINDERS specifies that all tracks on the first side are recorded then all tracks on second side. ; Tracks on side 0 are written from 0 up and side 1 down to 0. ; ;outout EAGLE same as CYLINDERS except both sides start at zero or outermost track. ; ; COLUMBIA same as CYLINDERS except tracks are sequential from side 0 to side 1 ie. 0 - 79 for a 40 track disk. ; ; EVEN-ODD means side 0 contains even-numbered tracks and side 1 contains odd-numbered tracks. ; ;

For the various formats that dsktrans supports use this command: [code] dsktrans -formats[/code]

Disk formats supported:

pcw180 : PCW / IBM 180k cpcsys : CPC System cpcdata : CPC Data pcw720 : PCW / IBM 720k pcw1440 : PcW16 / IBM 1440k ibm160 : IBM 160k (CP/M-86 / DOSPLUS) ibm320 : IBM 320k (CP/M-86 / DOSPLUS) ibm360 : IBM 360k (CP/M-86 / DOSPLUS) ibm720 : IBM 720k (144FEAT) ibm1200 : IBM 1.2M (144FEAT) ibm1440 : IBM 1.4M (144FEAT) acorn160 : Acorn 160k acorn320 : Acorn 320k acorn640 : Acorn 640k acorn800 : Acorn 800k acorn1600 : Acorn 1600k pcw800 : PCW 800k pcw200 : PCW 200k bbc100 : BBC 100k bbc200 : BBC 200k mbee400 : Microbee 400k mgt800 : MGT 800k trdos640 : TR-DOS 640k ampro200 : Ampro 40 track single-sided ampro400d : Ampro 40 track double-sided ampro400s : Ampro 80 track single-sided ampro800 : Ampro 80 track double-sided pcw1200 : PcW16 / IBM 1200k mac400 : Macintosh GCR 400k mac800 : Macintosh GCR 800k myz80 : MYZ80 8Mb pcpm320 : IBM 320k (CP/M-86 / DOSPLUS) yaze4m : yaze4m image yaze2m : yaze2m image yaze1m : yaze1m image yaze512 : yaze512 image yaze256 : yaze256 image jr01 : JR01 Junior 80 - DSDD 48 tpi 5.25" - 512 x 9 hea1 : HEA1 Heath H89, Magnolia CP/M - SSDD 48 tpi 5.25" - 512 x 9 lbb_40dsdd : LBB 5.25" DS DD 40T (5.25" DS DD 40x9 s/t) lbb_77dshd : LBB 5.25" DS HD 77T (5.25" DS HD 77T 17x512 s/t) act3 : ACT3 Action Computer Ent. Alloy 66 - SSHD 8" - 512 x 16 dav1 : DAV1 Davidge - DSDD 96 tpi 5.25" - 1024 x 5 comc : COMC Compupro (Viasyn) - DSSD 8" - 128 x 26 bee4 : BEE4 Microbee Systems - DSDD 3.5" - 512 x 10 meg2 : MEG2 Megatel Quark 100 - DSDD 96 tpi 5.25" - 128 x 30 portapak : PortaPak 5.25" 80T (5.25" DS DD 80T 10x512 s/t) amsd : AMSD Amstrad PCW 9256, 9512 Disckit - DSDD 3.5" - 512 x 9 mdsad350 : Northstar Micro-Disk System MDS-A-D 350 - SSDD 48 tpi 5.25" - 512 x 10 mdsad175 : Northstar Micro-Disk System MDS-A-D 175 - SSDD 48 tpi 5.25" - 512 x 10 mdsad87 : Northstar Micro-Disk System MDS-A1 - SSSD 48 tpi 5.25" - 256 x 10 xer6 : XER6 Xerox 16/8 - DSDD 8" - 256 x 26 xer5 : XER5 Xerox 16/8 - SSDD 8" - 256 x 26 ibm2 : IBM2 IBM PC, CP/M-86 - DSDD 48 tpi 5.25" - 512 x 8 sag1 : SAG1 Sage IV - DSDD 48 tpi 5.25" - 512 x 8 xerf : XERF Xerox 16/8 Special - DSDD 48 tpi 5.25" - 512 x 8 tek1 : TEK1 Tektronix 4170 - DSDD 48 tpi 5.25" - 512 x 8 see2 : SEE2 Seequa Chameleon - DSDD 48 tpi 5.25" - 512 x 8 oli1 : OLI1 Olivetti ETV300 - SSDD 48 tpi 5.25" - 256 x 18 ibx2 : IBX2 IBEX 7301 - DSDD 8" - 256 x 26 adv4 : ADV4 Advanced Digital Super 8 - DSDD 8" - 1024 x 8 exi2 : EXI2 Exidy Sorcerer - SSDD 8" - 256 x 16 exi1 : EXI1 Exidy Sorcerer - SSDD 48 tpi 5.25" - 256 x 16 jad1 : JAD1 Jade - SSDD 8" - 128 x 48 als2 : ALS2 Alspa - DSDD 8" - 1024 x 8 als1 : ALS1 Alspa - SSDD 8" - 1024 x 8 tos3 : TOS3 Toshiba T-250 - DSHD 8" - 256 x 26 tos1 : rc72 : PICCOLO RC702 -- DSDD 8" - 512 x 15 rc03 : RC03 RC-700 Piccolo RCTELST - DSDD 48 tpi 5.25" - 512 x 9 rc02 : RC-750 Piccolo - DSHD 96 TPI 5.25" - 1024 x 8 rc01 : RC01 RC-702 Piccolo - DSDD 48 tpi 5.25" - 512 x 9 sup5 : SUP5 Superbrain - SSDD 48 tpi 5.25" - 128 x 30 sup4 : SUP4 Superbrain II - DSDD 96 tpi 5.25" - 512 x 10 sup3 : SUP3 Superbrain QD - DSDD 48 tpi 5.25" - 512 x 10 sup2 : SUP2 Superbrain 40 track - SSDD 48 tpi 5.25" - 512 x 10 sup1 : SUP1 Superbrain JR - SSDD 48 tpi 5.25" - 512 x 10 pie1 : PIE1 Pied Piper - DSDD 96 tpi 5.25" - 512 x 10 bon3 : BON3 Bondwell 2 - SSDD 3.5" - 256 x 18 bw14 : BON2 Bondwell 14 - DSDD 48 tpi 5.25" - 256 x 18 bw12 : BON1 Bondwell 12 - SSDD 48 tpi 5.25" - 256 x 10 xer2 : XER2 Xerox 820 - SSSD 48 tpi 5.25" - 128 x 18 com9x : COM9X Compupro (Viasyn) 8/16 - DSDD 8" - 1024 x 8 com8x : COM8X Compupro (Viasyn) 8/16 - SSDD 8" - 1024 x 8 eag2 : EAG2 Eagle III, IV, V - DSDD 96 tpi 5.25" - 1024 x 5 eag1 : EAG1 Eagle I, II - SSDD 96 tpi 5.25" -1024 x 5 trs6 : TRS6 TRS-80, Pickles & Trout CP/M - SSDD 8" - 512 x 16 trs5 : TRS5 TRS-80, Lifeboat CP/M (1024 bytes/sector) - SSDD 8" - 1024 x 8 trs4 : TRS4 TRS-80 Lifeboat CP/M (256 bytes/sector) - SSDD 8" - 256 x 26 necc : NECC NEC APC CP/M-86 - DSHD 8" - 256 x 26 adv5 : ADV5 Advanced Digital TurboDOS 312K - DSDD 48 tpi 5.25" - 1024 x 4 ims3 : IMS3 IMS 5000 TurboDOS - SSDD 8" - 1024 x 8 zen8 : ZEN8 Zenith Z-100 - DSDD 48 tpi 5.25" - 512 x 8 exo1 : EXO1 EXO - SSDD 8" - 512 x 16 lob5 : LOB5 Lobo CP/M 2.2 - SSHD 8" - 256 x 30 mai1 : MAI1 MAI Basic Four - DSDD 96 tpi 5.25" - 256 x 16 san4 : SAN4 Sanyo MBC-3000 - DSDD 8" - 256 x 26 san3 : SAN3 Sanyo MBC-2000 - SSDD 96 tpi 5.25" - 256 x 16 san2 : SAN2 Sanyo MBC-1250 - DSDD 96 tpi 5.25" - 256 x 16 san1 : SAN1 Sanyo MBC-1000, MBC-1150 - DSDD 48 tpi 5.25" - 256 x 16 mm2 : MM2 Micromint SB180 Native 2 - DSDD 96 tpi 5.25" - 1024 x 5 mm1 : MM1 Micromint SB180 Native 1 - DSDD 48 tpi 5.25" - 512 x 10 mor8 : MOR8 Morrow 5/11/34 - SSDD 48 tpi 5.25" - 1024 x 5 mor7 : MOR7 Morrow MD3...CP/M Plus - DSDD 48 tpi 5.25" - 1024 x 5 mor6 : MOR6 Morrow TurboDOS - DSDD 48 tpi 5.25" - 1024 x 4 mor5 : MOR5 Morrow 8 (1024 bytes/sector) - DSDD 8" - 1024 x 8 mor4 : MOR4 Morrow 8 (1024 bytes/sector) - SSDD 8" - 1024 x 8 mor3 : MOR3 Morrow 8 (512 bytes/sector) - SSDD 8" - 512 x 15 mor2 : MOR2 Morrow MD3, 5, 11, 16, 34 - DSDD 48 tpi 5.25" - 1024 x 5 mor1 : MOR1 Morrow MD2 - SSDD 48 tpi 5.25" - 1024 x 5 meg1 : MEG1 Megatel Quark 100 - SSDD 48 tpi 5.25" - 512 x 10 bon3 : BON3 Bondwell 2 - SSDD 3.5" - 256 x 18 bon2 : BON2 Bondwell 14 - DSDD 48 tpi 5.25" - 256 x 18 osb8 : OSB8 Osborne Vixen - DSDD 48 tpi 5.25" - 1024 x 5 osb3 : OSB3 Osborne Executive - SSDD 48 tpi 5.25" - 1024 x 5 osb2 : OSB2 Osborne 1 - SSDD 48 tpi 5.25" - 1024 x 5 osb1 : OSB1 Osborne 1 - SSSD 48 tpi 5.25" - 256 x 10 phi2 : PHI2 Philips PC-2012 - DSDD 96 tpi 5.25" - 256 x 16 phi1 : PHI1 Philips PC-2010 - SSDD 48 tpi 5.25" - 256 x 16 pmc2 : PMC2 PMC Micromate - DSQD 96 tpi 5.25" - 1024 x 5 pmc1 : PMC1 PMC Micromate - DSDD 48 tpi 5.25" - 1024 x 5 eps2 : EPS2 Epson QX-10 - DSDD 48 tpi 5.25" - 256 x 16 eps1 : EPS1 Epson QX-10 - DSDD 48 tpi 5.25" - 512 x 10 spe2 : SPE2 Spectravideo SV-328 - DSDD 48 tpi 5.25" - 256 x 17 spe1 : SPE1 Spectravideo 318/328 - SSDD 48 tpi 5.25" - 256 x 17 son1 : SON1 Sony SMC-70 - SSDD 3.5" - 256 x 16 sag2 : SAG2 Sage IV - DSDD 96 tpi 5.25" - 512 x 8 sag1 : SAG1 Sage IV - DSDD 48 tpi 5.25" - 512 x 8 tel4 : TEL4 TeleVideo 8nn/TPC-1 CP/M - DSDD 48 tpi 5.25" - 256 x 18 vis1 : VIS1 Visual 1050 - SSDD 96 tpi 5.25" - 512 x 10 alt5 : ALT5 Altos Series 5 - DSDD 96 tpi 5.25" - 512 x 9 col5 : COL5 Coleco ADAM, 360K - DSDD 48 tpi 5.25" - 512 x 9 col1 : COL1 Coleco ADAM, 40 track - SSDD 48 tpi 5.25" - 512 x 8 dec3 : DEC3 DEC VT-180 - SSDD 48 tpi 5.25" - 512 x 9 alt3 : ALT3 Altos - SSDD 8" - 512 x 15 alt1 : ALT1 Altos - SSSD 8" - 128 x 26 big4 : BIG4 Big Board SWP 1024 bytes/sector - SSDD 8" - 1024 x 9 big3 : BIG3 Big Board 1024 bytes/sector - SSDD 8" - 1024 x 9 big2 : BIG2 Big Board (512 bytes/sector) - DSDD 8" - 512 x 15 big1 : BIG1 Big Board (512 bytes/sector) - SSDD 8" - 512 x 15 big0 : BIG0 Big Board (128 bytes/sector) - SSSD 8" - 128 x 26 acn1 : ACN1 Acorn CP/M on Acorn Z80 second processor. - 256 x 10 sie2 : Siemens PG-675 DSDD 48 tpi 5.25" - 512 x 9 sin4 : Sinclair Spectrum ZX Lexor CP/M - DSDD 48 tpi 5.25" sin3 : Sinclair Spectrum ZX - SSDD 48 tpi 5.25" sin2 : Sinclair ZX Spectrum+3 CP/M 3.0 - SSDD 3.5" elwro : Elwro Computer CP/M 3.0 - DSDD 3.5" sin1 : Sinclair ZX Spectrum+3 DOS - DSDD 3.5" zqq : Zorba qq - DSDD 48 tpi 5.25" zor2 : ZOR2 Zorba - DSDD 96 tpi 5.25" - 512 x 10 zor1 : ZOR1 Zorba - DSDD 48 tpi 5.25" - 512 x 10 trsf : TRSF TRS-80 II/12/16 Aton CP/M - DSHD 8" - 1024 x 8 trse : TRSE TRS-80 II/12/16 Aton CP/M - SSHD 8" - 1024 x 8 a1 : A1 Generic CP/M - SSSD 8" - 128 x 26 trsw : TRS-80 Model 4,4P Montezuma System 400K - SSDD 96 tpi 3.5" trsv : TRS-80 Model 4,4P Montezuma Super Data 880K - DSDD 96 tpi 5.25" trsu : TRS-80 Model 4,4P Montezuma Super Data 440K - SSDD 96 tpi 5.25" trst : TRS-80 Model 4,4P Montezuma Super Data 440K - DSDD 48 tpi 5.25" trss : TRS-80 Model 4,4P Montezuma Super Data 220K - SSDD 48 tpi 5.25" trsr : TRS-80 Model 4,4P Montezuma Extend System 790K - DSDD 96 tpi 5.25" trsq : TRS-80 Model 4,4P Montezuma Extend System 390K - SSDD 96 tpi 5.25" trsp : TRS-80 Model 4,4P Montezuma Extend System 390K - SSDD 48 tpi 5.25" trso : TRS-80 Model 4,4P Montezuma Extend System 190K - SSDD 48 tpi 5.25" trsn : TRS-80 Model 4,4P Montezuma Data 800K - DSDD 96 tpi 5.25" trsm : TRS-80 Model 4,4P Montezuma System 710K - DSDD 96 tpi 5.25" trsl : TRS-80 Model 4,4P Montezuma Data 400K - SSDD 96 tpi 5.25" trsk : TRS-80 Model 4,4P Montezuma System 350K - SSDD 96 tpi 5.25" trsj : TRS-80 Model 4,4P Montezuma Data 400K - DSDD 48 tpi 5.25" trsi : TRS-80 Model 4,4P Montezuma System 350K - DSDD 48 tpi 5.25" trsh : TRS-80 Model 4,4P Montezuma Data 200K - SSDD 48 tpi 5.25" trsg : TRS-80 Model 4,4P Montezuma System 170K - SSDD 48 tpi 5.25" ampro800 : Ampro800 - DSDD 96 tpi 3.5" amp6 : Ampro - DSDD 96 tpi 3.5" amp5 : Ampro - SSDD 96 tpi 3.5" amp4 : Ampro - DSDD 96 tpi 5.25" amp3 : Ampro - SSDD 96 tpi 5.25" amp2 : Ampro - DSDD 48 tpi 5.25" amp1 : Ampro - SSDD 48 tpi 5.25" kay3 : KAY3 Kaypro 2X/4/10 (Alternate) - DSDD 48 tpi 5.25" - 512 x 10 kay2 : KAY2 Kaypro 2X/4/10 - DSDD 48 tpi 5.25" - 512 x 10 kpiv : Kaypro 2X/4/10 - DSDD 48 tpi 5.25" kpii : KAY1 Kaypro II/2 - SSDD 48 tpi 5.25" - 512 x 10 kay1 : KAY1 Kaypro II/2 - SSDD 48 tpi 5.25" - 512 x 10 ibm3740 : IBM3740 SS SD 77T 8" 26x128 b/s

LDOS & NEWDOS are not in this list of CP/M floppy formats. Plus the .DSK type isn't the same as you are wanting. But, since it is an actual Sector Dump you should be able to write the actual sectors back to a floppy by using the proper image type and writing back directly to the attached PC's floppy.

[code]dsktrans -itype raw -oside 0 -otype floppy /dev/fd0[/code]

If you have Linux, dd should write the *.IMG (Sector Dump = RAW) back to the floppy, assuming floppy's are still supported on your Linux Distro. [code]dd if=/path/to/image/myrawimage.img of=/dev/fd0 conv=notrunc;sync[/code]

Give that a try, and see if those floppy's boot correctly.

Larry

davidgiven commented 3 years ago

I think what's likely is that when doing the conversion, dsktrans isn't setting the sector ID bytes to the non-standard TRS-80 values. This will result in the TRS-80 from thinking the disks are bad. I'm not sure of a good way to work around this.

ldkraemer commented 3 years ago

David, You know a lot more about all this than I do, but I have used dsktrans lots and the .DSK type is "CPCEMU .DSK driver" versus what he is really wanting. The JV3 should have worked, but it didn't appear to.

It will be interesting to see if dd or dsktrans can write the RAW image direct to floppy.

Larry

On Wed, Jun 30, 2021 at 8:30 AM David Given @.***> wrote:

I think what's likely is that when doing the conversion, dsktrans isn't setting the sector ID bytes to the non-standard TRS-80 values. This will result in the TRS-80 from thinking the disks are bad. I'm not sure of a good way to work around this.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/davidgiven/fluxengine/issues/287#issuecomment-871406131, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIWRMAVIJXG75XZG5OT3QHTTVML6BANCNFSM47RODNKA .