home *** CD-ROM | disk | FTP | other *** search
- floppy = 0
-
- s: move.l $4.w,a6
- jsr -132(a6)
-
- move.l #$200,d0
- moveq #2,d1
- jsr -198(a6)
- move.l d0,a4
- beq fini
-
- suba.l a1,a1
- jsr -294(a6)
- lea portadr(pc),a1
- move.l d0,16(a1)
- jsr -354(a6)
- lea iorequest(pc),a1
- lea portname(pc),a0
- moveq #floppy,d0
- moveq #0,d1
- jsr -444(a6)
- tst.l d0
- bne error
-
- move.w #2,$1c(a1)
- moveq #0,d0
- bsr get_sector
-
- move.l 8(a4),d0
- bsr get_sector
-
- moveq #-1,d0
- cmp.l 78*4(a4),d0
- bne.s ende
- move.l 79*4(a4),d0
- lea map_sector(pc),a0
- move.l d0,(a0)
- bsr get_sector
-
- lea tracklist(pc),a5
- diskloop2:
- move.w (a5)+,d6
- beq.s diskout
- mulu #11,d6
- moveq #10,d7
- diskloop1:
- move.w d6,d1
- subi.w #1759,d1
- neg.w d1
- lsr.w #5,d1
- lsl.w #2,d1
- move.w d6,d0
- andi.w #$001f,d0
- addq.w #1,d0
- moveq #1,d2
- ror.l d0,d2
- not.l d2
- and.l d2,4(a4,d1.w)
- addq.w #1,d6
- dbf d7,diskloop1
- bra.s diskloop2
-
- diskout:
- lea 4(a4),a0
- moveq #0,d1
- moveq #$7f-1,d0
- checkloop1:
- add.l (a0)+,d1
- dbf d0,checkloop1
- neg.l d1
- move.l d1,(a4)
-
- move.w #3,$1c(a1)
- move.l map_sector(pc),d0
- bsr.s get_sector
-
- ende: move.w #9,$1c(a1)
- clr.l $24(a1)
- jsr -456(a6)
-
- lea iorequest(pc),a1
- jsr -450(a6)
- error: lea portadr(pc),a1
- jsr -360(a6)
- move.l #$200,d0
- move.l a4,a1
- jsr -210(a6)
- fini: jmp -138(a6)
-
- get_sector: ;d0.l=sector (e.g. 880)
- lea iorequest(pc),a1
- move.l #$200,$24(a1)
- move.l a4,$28(a1)
- moveq #9,d1
- lsl.l d1,d0
- move.l d0,$2c(a1)
- jsr -456(a6)
- cmpi.l #$200,$20(a1)
- bne.s get1
- rts
- get1: addq.l #4,a7
- bra.s ende
-
- map_sector:
- dc.l 0
- portadr:dc.l 0,0
- dc.b 4,0
- dc.l portname
- dc.b 0,31
- dc.l 0
- dc.l 0,0,0,0
- dc.b 0,0
- portname:
- dc.b 'trackdisk.device',0
- even
- iorequest:
- dc.l 0,0
- dc.b 5,0
- dc.l 0
- dc.l portadr
- dc.w 48
- dc.l 0,0
-
- dc.w 0,0
- dc.l 0,0,0,0
-
- tracklist:
- dc.w 32,33,39,40,43,48,54,55,59,64,0
-