Image Map Image Map
Results 1 to 9 of 9

Thread: CP/M 2.2 for Exidy FDS (Floppy Disk Subsystem for the Sorcerer)

  1. #1
    Join Date
    May 2018
    Location
    Melbourne, Australia
    Posts
    189

    Default CP/M 2.2 for Exidy FDS (Floppy Disk Subsystem for the Sorcerer)

    I'm looking for some help to develop a cpmtools+libdisk definition to allow the extraction of files from an image of a CP/M 2.2 master disk for the Exidy FDS (Floppy Disk Subsystem). I don't believe CP/M (2.2) for this controller has previously been preserved.

    http://www.michaelborthwick.com.au/t...even10.dsk.zip

    It looks to be pretty close to an original disk - I can't see any obvious third-party files when I do a directory of the disk when mounted in the MAME emulation of the Sorcerer. See below:

    steven10.jpg

    This image was created using the MSPP's floppyio hardware (a USB to Shughart bridge using a WD2793). No errors were reported during the read.

    A slightly customised 34 way cable (thanks to Chuck for the reminder) was used as the Micropolis drives have a slightly different pinout.

    Exidy's own documentation in the CBIOS User Guide notes that the skewing pattern on the FDS is different than the 1:1 skewing on the Display Disk Subsystem (DDS) - a nice trap for young players.

    See page 255 here for a table - I'm very unsure about how to represent the skew table in cpmtools (and the interleave).

    http://www.michaelborthwick.com.au/t...User_Guide.pdf

    With the help of an Exidy FDS owner I have verified that the contents of the two boot PROMs in an FDS are same as those in the DDS (Display Disk Subsystem) dumped by Al and on bitsavers. Not sure about the SAD4E address decoding PROM at this stage but that is not material to pulling files from the disk image. The part numbers for the controller as indicated on the PCB copper layer indicate it is the same part number as the controller in Al's DDS.

    Exidy documentation says the discs are physically 16 sectors by 256 bytes but logically 32 by 128 bytes. This is also what is reported by the floppyio during the read process.

    Additional information about the format is available in Andrew Marland's article in the November 1984 issue of Sorcerer Computer Users Australia (SCUA) newsletter. The third entry down (soft-sector).

    Screen shot 2020-01-13 at 7.16.50 AM.png

    I have also provided below an excerpt from the diskdef for the Exidy 100TPI SS 77 track format from the version of CP/M supplied with the Australian-developed Dreamdisk controller for the Sorcerer (and Microbee). This product could support over 100 CP/M formats - I don't know exactly what the fields mean but an expert might find it useful.

    A MAME-emulated Dreamdisk-controller-equipped Sorcerer can mount this Exidy FDS .dsk on the B: drive once properly configured and can access the files.

    Code:
    ;======================================
    
    	newpage
    	db	0
    	db	'Exidy FDS          1D5'
    	db	dd5,b256,0b
    	db	55h,0,1
    
    	dw	32
    	db	4
    	db	0fh
    	db	0
    	dw	75
    	dw	127
    	db	11000000b,0
    	dw	32
    	dw	2
    ;--------------------------------------
    My starting definition looks like this:

    Code:
    diskdef exidyfds
      seclen 256
      cylinders 77
      sectrk 16
      heads 1    
      blocksize 2048
      maxdir 128
      skew 3
      skewstart 16
      boottrk 2
      os 2.2    
    end
    which gives a valid directory listing using

    Code:
    cpmls -f exidyfds -T dsk steven10.dsk
    but the files themselves are a bit scrambled when extracted using:

    Code:
    cpmcp -f exidyfds  -T dsk steven10.dsk 0:CBIOS.ASM cbios.txt
    - they have chunks of good text and bad text - maybe the sector interleaving is not being properly accommodated? I have some other disk images I could make available privately to interested parties if this disk is not sufficient but they contain personal files so can't be made available publicly.

  2. #2

    Default

    I've had a quick look at this as it is in a similar space to my thread on the Gotek config parameters.

    Looking at the user guide one immediate thought is the skew factor actually 13 (or 14?)? As the disk rotates looking for each logical sector in turn sector 1,2 = physical 16 then sector 3,4 = physical 13 with a 16 sector disk and a skew of 3 you’d read physical sector 2. If you had a skew of 13 you'd get to physical sector 13.

    Also; change the user number in the command line "USER x" you may find some more files on the disk.

    Pete

  3. #3
    Join Date
    Mar 2013
    Location
    Chaffee, MO
    Posts
    1,313

    Default

    If you have a look at the file it's larger than the definition. 256 * 16 * 77 = 315329. That is the first clue.

    The Directory appears to start at 0x2900 = 10496 Decimal:
    Code:
    00002900   00 4D 4F 56  43 50 4D 20  20 43 4F 4D  00 00 00 58  .MOVCPM  COM...X
    00002910   02 03 04 05  06 07 00 00  00 00 00 00  00 00 00 00  ................
    00002920   E5 53 59 53  47 45 4E 20  20 43 4F 4D  00 00 00 08  .SYSGEN  COM....
    00002930   08 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  ................
    00002940   00 44 55 4D  50 20 20 20  20 41 53 4D  00 00 00 21  .DUMP    ASM...!
    00002950   09 0A 19 00  00 00 00 00  00 00 00 00  00 00 00 00  ................
    00002960   00 50 49 50  20 20 20 20  20 43 4F 4D  00 00 00 3A  .PIP     COM...:
    00002970   0B 2E 4A 4B  00 00 00 00  00 00 00 00  00 00 00 00  ..JK............
    00002980   00 58 53 55  42 20 20 20  20 43 4F 4D  00 00 00 06  .XSUB    COM....
    00002990   0C 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  ................
    000029A0   00 53 55 42  4D 49 54 20  20 43 4F 4D  00 00 00 0A  .SUBMIT  COM....
    000029B0   0D 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  ................
    000029C0   00 41 53 4D  20 20 20 20  20 43 4F 4D  00 00 00 40  .ASM     COM...@
    000029D0   11 12 13 14  00 00 00 00  00 00 00 00  00 00 00 00  ................
    But, if I scroll through the file I find lots of hex bytes similar to this scattered about:
    Code:
    00000100   54 72 61 63  6B 2D 49 6E  66 6F 0D 0A  00 00 00 00  Track-Info......
    00000110   00 00 01 02  01 10 38 E5  00 00 01 01  00 00 00 00  ......8.........
    00000120   00 00 02 01  00 00 00 00  00 00 03 01  00 00 00 00  ................
    00000130   00 00 04 01  00 00 00 00  00 00 05 01  00 00 00 00  ................
    00000140   00 00 06 01  00 00 00 00  00 00 07 01  00 00 00 00  ................
    00000150   00 00 08 01  00 00 00 00  00 00 09 01  00 00 00 00  ................
    00000160   00 00 0A 01  00 00 00 00  00 00 0B 01  00 00 00 00  ................
    00000170   00 00 0C 01  00 00 00 00  00 00 0D 01  00 00 00 00  ................
    00000180   00 00 0E 01  00 00 00 00  00 00 0F 01  00 00 00 00  ................
    00000190   00 00 10 01  00 00 00 00  00 00 00 00  00 00 00 00  ................
    These hex bytes scattered throughout the file, likely make up the difference in file sizes
    for a .RAW (Sector Dump) and this .DSK file which looks to be tracks dumped with extra
    information about each track. cpmtools and libdsk use files that are .RAW (Sector Dumps)
    without the extra scattered Track information. If you can figure out exactly how many hex
    bytes are contained in each tracks information, and remove it, you likely can access the
    files.

    I did get a good directory listing, but all extracted files contain garbage.
    Code:
    $ cpmls -f exi1 -D steven10.dsk
         Name    Bytes   Recs  Attr     update             create
    ------------ ------ ------ ---- -----------------  -----------------
    ASM     .COM     8K     64    
    BIOS    .ASM    12K     96    
    CBIOS   .ASM    10K     69    
    DDT     .COM     6K     38    
    DEBLOCK .ASM    10K     80    
    DEVCNVRT.COM     2K     10    
    DISKDEF .LIB     8K     49    
    DISKDRIV.COM     2K      4    
    DUMP    .ASM     6K     33    
    DUMP    .COM     2K      3    
    ED      .COM     8K     52    
    EXASM   .COM    12K     94    
    EXBASIC .COM    24K    188    
    EXCOPY  .COM     4K     30    
    EXLINK  .COM     6K     44    
    EXT2DSK .COM     2K     10    
    LOAD    .COM     2K     14    
    MOVCPM  .COM    12K     88    
    PIP     .COM     8K     58    
    RANTEST .BAS     2K      2    
    ROM2DSK .COM     2K     14    
    STAT    .COM     6K     41    
    SUBMIT  .COM     2K     10    
    SYSGEN  .COM     2K      8    
    XSUB    .COM     2K      6    
       25 Files occupying    160K,     136K Free.
    larry@debian:~/IMDs/exidy-sorcerer/exidyfds
    If you have the actual Floppy, can you use a DOS Computer and get an Image (.IMD) with Dave Dunfield's
    Imagedisk. Or get an Image with Chuck(G)'s Teledisk? With a copy created by those utilities, I'm sure
    we can extract all the files.

    Other than that we will need to find out exactly how many bytes need to be cut from each track to get a
    good .RAW image.


    Larry
    Last edited by ldkraemer; January 13th, 2020 at 05:20 AM. Reason: typo's

  4. #4
    Join Date
    Jun 2014
    Location
    Sydney, Australia
    Posts
    13

    Default

    Hi All,
    Quote Originally Posted by ldkraemer View Post
    If you have a look at the file it's larger than the definition. 256 * 16 * 77 = 315329. That is the first clue.
    256 * 16 * 77 = 315392. Typo

    The images are in LIBDSK DSK (CPC-EMU) format, hence the track info overhead.

    I had a look at one of the images.
    Data is probably not readable using the usual tools due to the sector skewing parameters employed.

    Disk parameter block code is located on Track#1 physical sector #15, Bytes $2F - $8D

    Skew table is below. Further translation from 128 byte sectors => 256 byte sectors also takes place.

    RAM:B76E 0B SKEW_TABLE: db 11 ; 1 Physical 128 byte sector#
    RAM:B76F 0C db 12 ; 2
    RAM:B770 15 db 21 ; 3
    RAM:B771 16 db 22 ; 4
    RAM:B772 1F db 31 ; 5
    RAM:B773 20 db 32 ; 6
    RAM:B774 09 db 9
    RAM:B775 0A db 10
    RAM:B776 13 db 19
    RAM:B777 14 db 20
    RAM:B778 1D db 29
    RAM:B779 1E db 30
    RAM:B77A 07 db 7 ;
    RAM:B77B 08 db 8
    RAM:B77C 11 db 17 ;
    RAM:B77D 12 db 18
    RAM:B77E 1B db 27 ;
    RAM:B77F 1C db 28
    RAM:B780 05 db 5 ;
    RAM:B781 06 db 6
    RAM:B782 0F db 15 ;
    RAM:B783 10 db 16
    RAM:B784 19 db 25 ;
    RAM:B785 1A db 26
    RAM:B786 03 db 3 ;
    RAM:B787 04 db 4
    RAM:B788 0D db 13 ;
    RAM:B789 0E db 14
    RAM:B78A 17 db 23 ;
    RAM:B78B 18 db 24 ; 30
    RAM:B78C 01 db 1 ; 31
    RAM:B78D 02 db 2 ; 32



    Should be possible to re-arrange the sectors in the image, and zap the skew table so that the images
    can be written back to bootable physical disks.

    Cheers,
    Red

  5. #5
    Join Date
    Jun 2014
    Location
    Sydney, Australia
    Posts
    13

    Default

    Hi All,

    After converting the image steven10.dsk from CPC-EMU back to RAW format, I had success with the following diskdef:

    diskdef exidyfds
    seclen 128
    tracks 77
    sectrk 32
    heads 1
    blocksize 2048
    maxdir 128
    skewtab 10,11,20,21,30,31,8,9,18,19,28,29,6,7,16,17,26,27, 4,5,14,15,24,25,2,3,12,13,22,23,0,1
    boottrk 2
    os 2.2
    end

    Was able to extract files ok.

    Cheers,
    Red

  6. #6
    Join Date
    Mar 2013
    Location
    Chaffee, MO
    Posts
    1,313

    Default

    Red,
    AMAZING WORK! I was trying to do the same, and had trouble converting from .DSK to .RAW because I was
    trying to use a definition.

    I'm wondering about the "rantest.bas" file as it might be corrupt, or saved as a TOKENIZED BASIC Program.
    On the TRS-80's a basic file saved as ,A would make them pure ASCII. Not sure about the Exidy.

    Anyway here is what I have.
    Code:
    $cd IMDs/exidy-sorcerer/exidyfds/
    $dsktrans -otype raw steven10.dsk steven10.raw
    cpmtools diskdef added to the cpmtools file diskdefs:
    diskdef exidyfds
    seclen 128
    tracks 77
    sectrk 32
    heads 1
    blocksize 2048
    maxdir 128
    skewtab 10,11,20,21,30,31,8,9,18,19,28,29,6,7,16,17,26,27, 4,5,14,15,24,25,2,3,12,13,22,23,0,1
    boottrk 2
    os 2.2
    end


    libdsk diskdef added to the .libdskrc definition file:
    # libdsk diskdef
    [exidyfds]
    description = exidyfds Exidy - SSDD 8" - 128 x 32
    cylinders = 77
    heads = 1
    secsize = 128
    sectors = 32
    secbase = 0
    datarate = DD

    Code:
    $ cpmls -f exidyfds -D steven10.raw
          Name    Bytes   Recs  Attr     update             create
    ------------ ------ ------ ---- -----------------  -----------------
    ASM     .COM     8K     64    
    BIOS    .ASM    12K     96    
    CBIOS   .ASM    10K     69    
    DDT     .COM     6K     38    
    DEBLOCK .ASM    10K     80    
    DEVCNVRT.COM     2K     10    
    DISKDEF .LIB     8K     49    
    DISKDRIV.COM     2K      4    
    DUMP    .ASM     6K     33    
    DUMP    .COM     2K      3    
    ED      .COM     8K     52    
    EXASM   .COM    12K     94    
    EXBASIC .COM    24K    188    
    EXCOPY  .COM     4K     30    
    EXLINK  .COM     6K     44    
    EXT2DSK .COM     2K     10    
    LOAD    .COM     2K     14    
    MOVCPM  .COM    12K     88    
    PIP     .COM     8K     58    
    RANTEST .BAS     2K      2    
    ROM2DSK .COM     2K     14    
    STAT    .COM     6K     41    
    SUBMIT  .COM     2K     10    
    SYSGEN  .COM     2K      8    
    XSUB    .COM     2K      6    
       25 Files occupying    160K,     136K Free.
    larry@debian:~/IMDs/exidy-sorcerer/exidyfds
    Code:
    $ cpmcp -f exidyfds steven10.raw 0:*.* /home/larry/IMDs/exidy-sorcerer/exidyfds/files
    Code:
    $ ls -alt
     12288 Jan 13 14:54 bios.asm
      8832 Jan 13 14:54 cbios.asm
     10240 Jan 13 14:54 deblock.asm
      1280 Jan 13 14:54 devcnvrt.com
      6272 Jan 13 14:54 diskdef.lib
       512 Jan 13 14:54 diskdriv.com
       384 Jan 13 14:54 dump.com
      6656 Jan 13 14:54 ed.com
     12032 Jan 13 14:54 exasm.com
     24064 Jan 13 14:54 exbasic.com
      3840 Jan 13 14:54 excopy.com
      5632 Jan 13 14:54 exlink.com
      1280 Jan 13 14:54 ext2dsk.com
       256 Jan 13 14:54 rantest.bas
      1792 Jan 13 14:54 rom2dsk.com
      1024 Jan 13 14:54 sysgen.com
      8192 Jan 13 14:54 asm.com
      4864 Jan 13 14:54 ddt.com
      4224 Jan 13 14:54 dump.asm
      1792 Jan 13 14:54 load.com
     11264 Jan 13 14:54 movcpm.com
      7424 Jan 13 14:54 pip.com
      5248 Jan 13 14:54 stat.com
      1280 Jan 13 14:54 submit.com
       768 Jan 13 14:54 xsub.com
    larry@debian:~/IMDs/exidy-sorcerer/exidyfds/files
    deblock.asm:
    Code:
    ;*****************************************************
    ;*                                                   *
    ;*      Sector Deblocking Algorithms for CP/M 2.0    *
    ;*                                                   *
    ;*****************************************************
    ;
    ;	utility macro to compute sector mask
    smask	macro	hblk
    ;;	compute log2(hblk), return @x as result
    ;;	(2 ** @x = hblk on return)
    @y	set	hblk
    @x	set	0
    ;;	count right shifts of @y until = 1
    	rept	8
    	if	@y = 1
    	exitm
    	endif
    ;;	@y is not 1, shift right one position
    @y	set	@y shr 1
    @x	set	@x + 1
    	endm
    	endm
    ;
    ;*****************************************************
    ;*                                                   *
    ;*         CP/M to host disk constants               *
    ;*                                                   *
    ;*****************************************************
    blksiz	equ	2048		;CP/M allocation size
    hstsiz	equ	512		;host disk sector size
    hstspt	equ	20		;host disk sectors/trk
    hstblk	equ	hstsiz/128	;CP/M sects/host buff
    cpmspt	equ	hstblk * hstspt	;CP/M sectors/track
    secmsk	equ	hstblk-1	;sector mask
    	smask	hstblk		;compute sector mask
    secshf	equ	@x		;log2(hstblk)
    ;
    ;*****************************************************
    ;*                                                   *
    ;*        BDOS constants on entry to write           *
    ;*                                                   *
    ;*****************************************************
    wrall	equ	0		;write to allocated
    wrdir	equ	1		;write to directory
    wrual	equ	2		;write to unallocated
    ;
    ;*****************************************************
    ;*                                                   *
    ;*	The BDOS entry points given below show the   *
    ;*      code which is relevant to deblocking only.   *
    ;*                                                   *
    ;*****************************************************
    ;
    ;	DISKDEF macro, or hand coded tables go here
    dpbase	equ	$		;disk param block base
    ;
    boot:
    wboot:
    	;enter here on system boot to initialize
    	xra	a		;0 to accumulator
    	sta	hstact		;host buffer inactive
    	sta	unacnt		;clear unalloc count
    	ret
    ;
    home:
    	;home the selected disk
    home:
    	lda	hstwrt	;check for pending write
    	ora	a
    	jnz	homed
    	sta	hstact	;clear host active flag
    homed:
    	ret
    ;
    seldsk:
    	;select disk
    	mov	a,c		;selected disk number
    	sta	sekdsk		;seek disk number
    	mov	l,a		;disk number to HL
    	mvi	h,0
    	rept	4		;multiply by 16
    	dad	h
    	endm
    	lxi	d,dpbase	;base of parm block
    	dad	d		;hl=.dpb(curdsk)
    	ret
    ;
    settrk:
    	;set track given by registers BC
    	mov	h,b
    	mov	l,c
    	shld	sektrk		;track to seek
    	ret
    ;
    setsec:
    	;set sector given by register c 
    	mov	a,c
    	sta	seksec		;sector to seek
    	ret
    ;
    setdma:
    	;set dma address given by BC
    	mov	h,b
    	mov	l,c
    	shld	dmaadr
    	ret
    ;
    sectran:
    	;translate sector number BC
    	mov	h,b
    	mov	l,c
    	ret
    ;
    ;*****************************************************
    ;*                                                   *
    ;*	The READ entry point takes the place of      *
    ;*	the previous BIOS defintion for READ.        *
    ;*                                                   *
    ;*****************************************************
    read:
    	;read the selected CP/M sector
    	xra	a
    	sta	unacnt
    	mvi	a,1
    	sta	readop		;read operation
    	sta	rsflag		;must read data
    	mvi	a,wrual
    	sta	wrtype		;treat as unalloc
    	jmp	rwoper		;to perform the read
    ;
    ;*****************************************************
    ;*                                                   *
    ;*	The WRITE entry point takes the place of     *
    ;*	the previous BIOS defintion for WRITE.       *
    ;*                                                   *
    ;*****************************************************
    write:
    	;write the selected CP/M sector
    	xra	a		;0 to accumulator
    	sta	readop		;not a read operation
    	mov	a,c		;write type in c
    	sta	wrtype
    	cpi	wrual		;write unallocated?
    	jnz	chkuna		;check for unalloc
    ;
    ;	write to unallocated, set parameters
    	mvi	a,blksiz/128	;next unalloc recs
    	sta	unacnt
    	lda	sekdsk		;disk to seek
    	sta	unadsk		;unadsk = sekdsk
    	lhld	sektrk
    	shld	unatrk		;unatrk = sectrk
    	lda	seksec
    	sta	unasec		;unasec = seksec
    ;
    chkuna:
    	;check for write to unallocated sector
    	lda	unacnt		;any unalloc remain?
    	ora	a
    	jz	alloc		;skip if not
    ;
    ;	more unallocated records remain
    	dcr	a		;unacnt = unacnt-1
    	sta	unacnt
    	lda	sekdsk		;same disk?
    	lxi	h,unadsk
    	cmp	m		;sekdsk = unadsk?
    	jnz	alloc		;skip if not
    ;
    ;	disks are the same
    	lxi	h,unatrk
    	call	sektrkcmp	;sektrk = unatrk?
    	jnz	alloc		;skip if not
    ;
    ;	tracks are the same
    	lda	seksec		;same sector?
    	lxi	h,unasec
    	cmp	m		;seksec = unasec?
    	jnz	alloc		;skip if not
    ;
    ;	match, move to next sector for future ref
    	inr	m		;unasec = unasec+1
    	mov	a,m		;end of track?
    	cpi	cpmspt		;count CP/M sectors
    	jc	noovf		;skip if no overflow
    ;
    ;	overflow to next track
    	mvi	m,0		;unasec = 0
    	lhld	unatrk
    	inx	h
    	shld	unatrk		;unatrk = unatrk+1
    ;
    noovf:
    	;match found, mark as unnecessary read
    	xra	a		;0 to accumulator
    	sta	rsflag		;rsflag = 0
    	jmp	rwoper		;to perform the write
    ;
    alloc:
    	;not an unallocated record, requires pre-read
    	xra	a		;0 to accum
    	sta	unacnt		;unacnt = 0
    	inr	a		;1 to accum
    	sta	rsflag		;rsflag = 1
    ;
    ;*****************************************************
    ;*                                                   *
    ;*	Common code for READ and WRITE follows       *
    ;*                                                   *
    ;*****************************************************
    rwoper:
    	;enter here to perform the read/write
    	xra	a		;zero to accum
    	sta	erflag		;no errors (yet)
    	lda	seksec		;compute host sector
    	rept	secshf
    	ora	a		;carry = 0
    	rar			;shift right
    	endm
    	sta	sekhst		;host sector to seek
    ;
    ;	active host sector?
    	lxi	h,hstact	;host active flag
    	mov	a,m
    	mvi	m,1		;always becomes 1
    	ora	a		;was it already?
    	jz	filhst		;fill host if not
    ;
    ;	host buffer active, same as seek buffer?
    	lda	sekdsk
    	lxi	h,hstdsk	;same disk?
    	cmp	m		;sekdsk = hstdsk?
    	jnz	nomatch
    ;
    ;	same disk, same track?
    	lxi	h,hsttrk
    	call	sektrkcmp	;sektrk = hsttrk?
    	jnz	nomatch
    ;
    ;	same disk, same track, same buffer?
    	lda	sekhst
    	lxi	h,hstsec	;sekhst = hstsec?
    	cmp	m
    	jz	match		;skip if match
    ;
    nomatch:
    	;proper disk, but not correct sector
    	lda	hstwrt		;host written?
    	ora	a
    	cnz	writehst	;clear host buff
    ;
    filhst:
    	;may have to fill the host buffer
    	lda	sekdsk
    	sta	hstdsk
    	lhld	sektrk
    	shld	hsttrk
    	lda	sekhst
    	sta	hstsec
    	lda	rsflag		;need to read?
    	ora	a
    	cnz	readhst		;yes, if 1
    	xra	a		;0 to accum
    	sta	hstwrt		;no pending write
    ;
    match:
    	;copy data to or from buffer
    	lda	seksec		;mask buffer number
    	ani	secmsk		;least signif bits
    	mov	l,a		;ready to shift
    	mvi	h,0		;double count
    	rept	7		;shift left 7
    	dad	h
    	endm
    ;	hl has relative host buffer address
    	lxi	d,hstbuf
    	dad	d		;hl = host address
    	xchg			;now in DE
    	lhld	dmaadr		;get/put CP/M data
    	mvi	c,128		;length of move
    	lda	readop		;which way?
    	ora	a
    	jnz	rwmove		;skip if read
    ;
    ;	write operation, mark and switch direction
    	mvi	a,1
    	sta	hstwrt		;hstwrt = 1
    	xchg			;source/dest swap
    ;
    rwmove:
    	;C initially 128, DE is source, HL is dest
    	ldax	d		;source character
    	inx	d
    	mov	m,a		;to dest
    	inx	h
    	dcr	c		;loop 128 times
    	jnz	rwmove
    ;
    ;	data has been moved to/from host buffer
    	lda	wrtype		;write type
    	cpi	wrdir		;to directory?
    	lda	erflag		;in case of errors
    	rnz			;no further processing
    ;
    ;	clear host buffer for directory write
    	ora	a		;errors?
    	rnz			;skip if so
    	xra	a		;0 to accum
    	sta	hstwrt		;buffer written
    	call	writehst
    	lda	erflag
    	ret
    ;
    ;*****************************************************
    ;*                                                   *
    ;*	Utility subroutine for 16-bit compare        *
    ;*                                                   *
    ;*****************************************************
    sektrkcmp:
    	;HL = .unatrk or .hsttrk, compare with sektrk
    	xchg
    	lxi	h,sektrk
    	ldax	d		;low byte compare
    	cmp	m		;same?
    	rnz			;return if not
    ;	low bytes equal, test high 1s
    	inx	d
    	inx	h
    	ldax	d
    	cmp	m	;sets flags
    	ret
    ;
    ;*****************************************************
    ;*                                                   *
    ;*	WRITEHST performs the physical write to      *
    ;*	the host disk, READHST reads the physical    *
    ;*	disk.					     *
    ;*                                                   *
    ;*****************************************************
    writehst:
    	;hstdsk = host disk #, hsttrk = host track #,
    	;hstsec = host sect #. write "hstsiz" bytes
    	;from hstbuf and return error flag in erflag.
    	;return erflag non-zero if error
    	ret
    ;
    readhst:
    	;hstdsk = host disk #, hsttrk = host track #,
    	;hstsec = host sect #. read "hstsiz" bytes
    	;into hstbuf and return error flag in erflag.
    	ret
    ;
    ;*****************************************************
    ;*                                                   *
    ;*	Unitialized RAM data areas		     *
    ;*                                                   *
    ;*****************************************************
    ;
    sekdsk:	ds	1		;seek disk number
    sektrk:	ds	2		;seek track number
    seksec:	ds	1		;seek sector number
    ;
    hstdsk:	ds	1		;host disk number
    hsttrk:	ds	2		;host track number
    hstsec:	ds	1		;host sector number
    ;
    sekhst:	ds	1		;seek shr secshf
    hstact:	ds	1		;host active flag
    hstwrt:	ds	1		;host written flag
    ;
    unacnt:	ds	1		;unalloc rec cnt
    unadsk:	ds	1		;last unalloc disk
    unatrk:	ds	2		;last unalloc track
    unasec:	ds	1		;last unalloc sector
    ;
    erflag:	ds	1		;error reporting
    rsflag:	ds	1		;read sector flag
    readop:	ds	1		;1 if read operation
    wrtype:	ds	1		;write operation type
    dmaadr:	ds	2		;last dma address
    hstbuf:	ds	hstsiz		;host buffer
    ;
    ;*****************************************************
    ;*                                                   *
    ;*	The ENDEF macro invocation goes here	     *
    ;*                                                   *
    ;*****************************************************
    	end
    The other *.ASM files are also correct.


    Another Exidy Definition I have is:

    # EXI1 Exidy Sorcerer - SSDD 48 tpi 5.25" - 256 x 16
    diskdef exi1
    seclen 256
    tracks 40
    sectrk 16
    blocksize 2048
    maxdir 64
    skew 5
    offset 8448
    boottrk 0
    os 2.2
    end

    # libdsk data below
    [exi1]
    description = EXI1 Exidy Sorcerer - SSDD 48 tpi 5.25" - 256 x 16
    cylinders = 40
    heads = 1
    secsize = 256
    sectors = 16
    secbase = 1
    datarate = DD


    Thanks.

    Larry
    Last edited by ldkraemer; January 13th, 2020 at 01:19 PM. Reason: added another definition.

  7. #7
    Join Date
    Mar 2013
    Location
    Chaffee, MO
    Posts
    1,313

    Default

    The CBIOS.ASM File has this interesting information:
    Code:
    ;
    ;	fixed data tables for four-drive standard
    ;	IBM-compatible 8" disks
    ;	disk parameter header for disk 00
    dpbase:	dw	trans,0000H
    	dw	0000H,0000H
    	dw	dirbf,dpblk
    	dw	chk00,all00
    ;	disk parameter header for disk 01
    	dw	trans,0000H
    	dw	0000H,0000H
    	dw	dirbf,dpblk
    	dw	chk01,all01
    ;	disk parameter header for disk 02
    	dw	trans,0000H
    	dw	0000H,0000H
    	dw	dirbf,dpblk
    	dw	chk02,all02
    ;	disk parameter header for disk 03
    	dw	trans,0000H
    	dw	0000H,0000H
    	dw	dirbf,dpblk
    	dw	chk03,all03
    ;
    ;	sector translate vector
    trans:	db	1,7,13,19	;sectors 1,2,3,4
    	db	25,5,11,17	;sectors 5,6,7,8
    	db	23,3,9,15	;sectors 9,10,11,12
    	db	21,2,8,14	;sectors 13,14,15,16
    	db	20,26,6,12	;sectors 17,18,19,20
    	db	18,24,4,10	;sectors 21,22,23,24
    	db	16,22		;sectors 25,26
    ;
    dpblk:	;disk parameter block, common to all disks
    	dw	26		;sectors per track
    	db	3		;block shift factor
    	db	7		;block mask
    	db	0		;null mask
    	dw	242		;disk size-1
    	dw	63		;directory max
    	db	192		;alloc 0
    	db	0		;alloc 1
    	dw	16		;check size
    	dw	2		;track offset
    ;
    ;	end of fixed tables
    ;
    Larry

  8. #8
    Join Date
    May 2018
    Location
    Melbourne, Australia
    Posts
    189

    Default

    Quote Originally Posted by RedskullDC View Post
    Hi All,

    After converting the image steven10.dsk from CPC-EMU back to RAW format, I had success with the following diskdef:
    How did you do the conversion to RAW?

  9. #9
    Join Date
    Mar 2013
    Location
    Chaffee, MO
    Posts
    1,313

    Default

    I have my cpmtools built with libdsk. libdsk has a command named "dsktrans".
    From the command line (Terminal in Linux) I did the following:

    $dsktrans -otype raw steven10.dsk steven10.raw

    That created the .RAW image (Sector Dump).

    REF: http://forums.debian.net/viewtopic.php?f=16&t=112244

    Scroll down to the section LIBDSK - SUPPORTS

    Thanks.

    Larry

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •