2022-07-04 14:38 CEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0003968RawDIC[All Projects] Generalpublic2022-06-07 01:36
ReporterStingRay 
Assigned ToWeplProject InfoRaw Data Disk Image Creator
http://whdload.de/docs/en/rawdic.html
 
PrioritynormalSeverityblockReproducibilityalways
StatusresolvedResolutionfixed 
Product Version5.0 
Target VersionFixed in Version6.0 
Summary0003968: Defininig a tracklist with tracks in reversed order gives "No Disk in Drive" Error
DescriptionWhen defining a tracklist with tracks in descending order (f.e. 159 -> 158) rawDIC quits with "No Disk in Drive!" error (DFLG_NORESTRICTIONS is set). This of course doesn't make sense at all and should be corrected.

Workaround for now is using one entry per track (I'm using a MACRO for this) but this increases the size of the resulting executable quite a bit for obvious reasons.
Steps To ReproduceCreate a tracklist in descending order such as:

.disk1 dc.l 0 ; Pointer to next disk structure
    dc.w 1 ; Disk structure version
    dc.w DFLG_NORESTRICTIONS ; Disk flags
    dc.l .tracks ; List of tracks which contain data
    dc.l 0 ; UNUSED, ALWAYS SET TO 0!
    dc.l FL_DISKIMAGE
    dc.l 0 ; Table of certain tracks with CRC values
    dc.l 0 ; Alternative disk structure, if CRC failed
    dc.l 0 ; Called before a disk is read
    dc.l 0 ; Called after a disk has been read


.tracks TLENTRY 159,000,$1800,SYNC_STD,DecodeTrack
    TLEND


and start the imaging process. It will not work.
 
TagsNo tags attached.
MachineA4000
CPU68060
CPUSpeed50
ChipSetAGA
GFXCardPicasso IV
ChipMem2 MB
FastMem96 MB
WorkbenchOS 3.1
KickROM40 - Kick 3.1
KickSoftNone
Attached Files
  • ? file icon Guardian_ImagerSlave.s (3,955 bytes) 2022-06-07 01:36 -
    ***************************************************************************
    *             /                                                           *
    *       _____.__ _                                         .___.          *
    *      /    /_____________.  _________.__________.________ |   |________  *
    *  ___/____      /    ____|_/         |         /|        \|   ._      /  *
    *  \     \/      \    \     \    /    |    :___/¯|    \    \   |/     /   *
    *   \_____________\___/_____/___/_____|____|     |____|\_____________/    *
    *     -========================/===========|______\================-      *
    *                                                                         *
    *   .---.----(*(         GUARDIAN IMAGER SLAVE              )*)---.---.   *
    *   `-./                                                           \.-'   *
    *                                                                         *
    *                         (c)oded by StingRay                             *
    *                         --------------------                            *
    *                            September 2018                               *
    *                                                                         *
    *                                                                         *
    ***************************************************************************
    
    ***********************************
    ** History			***
    ***********************************
    
    ; 2022-06-06	- simplified for RawDIC 6.0
    ;
    ; 25-Sep-2018	- changed text to mention "Data Disk" so people
    ;		  won't be confused when installing the game :)
    ;		- tried to add saving of DOS files (disk.1) using my
    ;		  generic AmigaDOS imager code but there are problems so
    ;		  that has to wait until I update the AmigaDOS imager
    ;		  code
    
    ; 24-Sep-2018	- small fixes and checksum added
    ;		- file saving added
    
    ; 23-Sep-2018	- work started
    
    
    	INCDIR	INCLUDEs:
    	INCLUDE	RawDIC.i
    
    
    	SLAVE_HEADER
    	dc.b	6		; Slave version
    	dc.b	0		; Slave flags
    	dc.l	.disk1		; Pointer to the first disk structure
    	dc.l	.text		; Pointer to the text displayed in the imager window
    
    
    	dc.b	"$VER: "
    .text	dc.b	"Guardian Data Disk imager V2.0",10
    	dc.b	"by StingRay/[S]carab^Scoopex "
    	dc.b	"(06.06.2022)",0
    	CNOP	0,4
    
    .disk1	dc.l	0		; Pointer to next disk structure
    	dc.w	1		; Disk structure version
    	dc.w	DFLG_NORESTRICTIONS		; Disk flags
    	dc.l	tracks		; List of tracks which contain data
    	dc.l	0		; UNUSED, ALWAYS SET TO 0!
    	dc.l	FL_NOFILES
    	dc.l	0		; Table of certain tracks with CRC values
    	dc.l	0		; Alternative disk structure, if CRC failed
    	dc.l	0		; Called before a disk is read
    	dc.l	SaveFiles	; Called after a disk has been read
    
    
    tracks	TLENTRY	159,0,$1800,SYNC_STD,DecodeTrack
    	TLEND
    
    ; d0.w: track
    ; a0.l: MFM buffer
    ; a1.l: destination
    ; a5.l: rawdic
    
    DecodeTrack
    	addq.w	#2,a0
    
    	move.l	a1,a3
    
    	lea	$1808(a0),a2
    	move.l	#$55555555,d2
    	move.w	#$1800/4-1,d7
    .loop	bsr.b	.decode
    	move.l	d0,(a1)+
    	dbf	d7,.loop
    
    	addq.w	#4,a0			; skip unused data
    	addq.w	#4,a2			; =""=
    
    ; decode checksum
    	bsr.b	.decode			; -> d0.l: checksum (wanted)
    
    	moveq	#0,d1
    	move.w	#$1800/4-1,d3
    .loop2	move.l	(a3)+,d4
    	addx.l	d4,d1
    	dbf	d3,.loop2
    	moveq	#-1,d2
    	sub.l	d1,d2
    
    	cmp.l	d0,d2
    	beq.b	.ok
    	moveq	#IERR_CHECKSUM,d0
    	rts
    
    
    .ok	moveq	#IERR_OK,d0
    	rts
    
    .decode	move.l	(a0)+,d0
    	and.l	d2,d0
    	add.l	d0,d0
    	move.l	(a2)+,d1
    	and.l	d2,d1
    	or.l	d1,d0
    	rts
    
    
    ; directory is on track 159
    ; format:
    ; 00: dc.l ID (GUARD)
    ; 04: dc.w number of files
    ; 06: dc.w ?
    ; 08: dc.l ?
    ; 12: start of file entries 
    
    
    
    SaveFiles
    	move.w	#159,d0
    	jsr	rawdic_ReadTrack(a5)
    
    	move.w	4(a1),d5		; number of files
    	lea	12(a1),a4		; start of file entries
    .loop	move.w	$24(a4),d7		; track
    	moveq	#0,d6
    	move.w	$26(a4),d6		; offset
    
    	mulu.w	#$1800,d7
    	add.l	d6,d7
    	move.l	d7,d0			; offset
    	move.l	$20(a4),d1		; size
    	move.l	a4,a0			; file name
    	jsr	rawdic_SaveDiskFile(a5)
    
    	add.w	#40,a4			; next file
    
    	subq.w	#1,d5
    	bne.b	.loop
    	moveq	#IERR_OK,d0
    	rts
    
    	
    
    ? file icon Guardian_ImagerSlave.s (3,955 bytes) 2022-06-07 01:36 +

-Relationships
+Relationships

-Notes

note ~0006397

Wepl (manager)

descending order of tracks was probably never forseen
allowing this requires probably checking for other side effects
ATM I can't tell when I will find time to fix this ;)

note ~0006398

StingRay (developer)

Last edited: 2018-09-25 13:56

View 2 revisions

It's not urgent as it's easy to workaround this problem, my current solution to read the disk backwards looks like this:

ML MACRO
.T SET 159
    REPT 160
    TLENTRY .T,.T,$1800,SYNC_STD,DecodeTrack
.T SET .T-1
    ENDR
    ENDM


tracks ML
    TLEND

and works fine. :) For reference, this is needed for the game Guardian as the tracks (and hence also the file data) are stored in backwards order. :)

note ~0011374

Wepl (manager)

do you have an Guardian disk image for me for testing?

note ~0011375

StingRay (developer)

Hi Bert, the IPF images can be found on the EAB file server: https://grandis.nu/turran/FTP/TOSEC/Games/Commodore%20Amiga%20-%20Games%20-%20SPS/Guardian%20(1995)(Guildhall)(AGA)[0835].zip

note ~0011389

Wepl (manager)

Is fixed in new release.
I think it never did work before.
RawDIC release has been bumped to 6. So I recommend to use ISlave version = 6 to request the new RawDIC.
Updated Guardian imager source attached.
+Notes

-Issue History
Date Modified Username Field Change
2018-09-24 17:55 StingRay New Issue
2018-09-25 11:46 Wepl Note Added: 0006397
2018-09-25 11:46 Wepl Assigned To => Wepl
2018-09-25 11:46 Wepl Status new => assigned
2018-09-25 13:53 StingRay Note Added: 0006398
2018-09-25 13:56 StingRay Note Edited: 0006398 View Revisions
2022-05-30 23:21 Wepl Note Added: 0011374
2022-05-30 23:49 StingRay Note Added: 0011375
2022-06-07 01:33 Wepl Severity minor => block
2022-06-07 01:33 Wepl Fixed in Version => 6.0
2022-06-07 01:36 Wepl Status assigned => resolved
2022-06-07 01:36 Wepl Resolution open => fixed
2022-06-07 01:36 Wepl Note Added: 0011389
2022-06-07 01:36 Wepl File Added: Guardian_ImagerSlave.s
+Issue History