View Single Post
Old 12 February 2021, 15:38   #4
CFou!
Moderator
 
CFou!'s Avatar
 
Join Date: Sep 2004
Location: France
Age: 51
Posts: 4,277
Quote:
Originally Posted by BarryB View Post
What about the v1 version with bad tracks on 72.1 and 73.1 on Disk 1, are they genuinely bad or not used?
no, just some sectors not formated because there was no data.

The last RAWDIC imager load only present sectors for this track.
See source code of imager here:
http://www.whdload.de/games/BodyBlows.lha

;======================================================================
; read track with missing sectors
_RN_PDos_11sect
moveq #7,d4 ;d4 = Sector to read by track
moveq #0,d7 ;d7 = Sector complete counter
move.l a0,a5 ;a5 = MFM data
move.l a1,a2 ;a2 = Destination
bra _NextSector
; read normal tracks
_RN_PDos
moveq #12,d4 ;d4 = Sector to read by track
moveq #0,d7 ;d7 = Sector complete counter
move.l a0,a5 ;a5 = MFM data
move.l a1,a2 ;a2 = Destination
_NextSector
cmpi.w #$4891,(a5) ;Check for word $4891 on each
bne _NoSector ;sector boundary

lea 2(a5),a0
move.l (a0)+,d0
move.l (a0)+,d1
and.l #$55555555,d0
and.l #$55555555,d1
add.l d0,d0
or.l d1,d0

move.l d6,d1 ;Disk key
bset #31,d1
eor.l d1,d0
move.l d0,d3 ;Checksum
swap d0
lsr.w #8,d0

lea $a(a5),a0
bsr _GetChecksum
cmp.w d0,d3
bne _ChecksumError
move.l a2,a1
bsr _DecodeData
lea $200(a2),a2

adda.w #$40a,a5
move.w (a5)+,d0
moveq #0,d1
moveq #7,d2
_Unwind
roxl.w #2,d0
roxl.b #1,d1
dbf d2,_Unwind

add.w d1,d1
adda.l d1,a5
addq.w #1,d7 ;Check if we have decoded
; cmpi.w #12,d7 ;all 12 sectors
cmp.w d4,d7 ;all 12 sectors
bne _NextSector
_OK
moveq #IERR_OK,d0
rts

Last edited by CFou!; 13 February 2021 at 04:32.
CFou! is offline  
 
Page generated in 0.05034 seconds with 11 queries