OK, the full-basic CBM multi-platform "suite" for Disk copying is quite ready, I will call it Disk Copier
I've tested it on Emulation with 1541-1541-II-1571 and 1581 drives by using Vic-20 (any memory configuration, unexpanded too), C16-Plus/4, C64 and C128.
It uses just the Basic memory area so no strange memory areas/expansions are required for any of the supported systems, except if you want to use SJLOAD of course.
SJLOAD speedup works for C128 and Vic-20 only, The C16 hasn't an SJLOAD port while the SJLOAD C64's version does not speedup OPEN so it hasn't any effect to Disk Copier.
SJLOAD has some problems with CBM drives if used on NTSC machines.
This is the current basic code, maybe is the final version btw if you have any suggestion please inform me.
Code: Select all
1 poke320,173:poke321,252:poke322,255:poke323,141:poke324,71:poke325,01:poke326,96
2 sys320:ma=peek(327):ifma=34orma=226orma=246then5:rem vic20, c64, c16
3 ifma=61thensa=61*256:goto11:rem c128
4 print"supported{space}systems:":print"c64,{space}c128,{space}vic20,{space}c16-plus/4":end
5 poke56,peek(56)-3:clr:sa=(peek(56)+1)*256
10 :
11 restore:print"{clear}{space*5}disk{space}copier"
12 print"{down*2}select{space}task:{down}"
13 fori=1to9:readt$(i):printi;"-{space}";t$(i):nexti
14 print"{down}{space}0{space}-{space}exit{down*3}"
15 input"{up*2}task{space}";ta:ifta>9orta<0then11
16 ifta=0andma<>61thenpoke56,peek(56)+3:clr:print"{clear}":end
17 ifta=0thenprint"{clear}":end
18 :
19 print"{clear}{space*5}disk{space}copier"
20 print"{down}task:"ta"-{space}"t$(ta)"{down*3}"
21 input"{up*2}source{space}drive{space}?{space}8{left*3}";sd:print"{down*2}"
22 input"{up*2}target{space}drive{space}?{space}9{left*3}";dd
23 ifsd=ddthen19
25 ifta<4then29
26 ex$=right$(t$(ta),3):ifta<7then28
27 ex$=left$(t$(ta),3)
28 print"{down}file{space}?{space}image."ex$"{left*11}";:inputim$
29 input"{down*3}confirm{space}(y/n){space}?{space}y{left*3}";a$
30 ifa$<>"y"then11
40 ti$="{0*6}"
100 gosub 500
101 ifta=1orta=4orta=7then110:rem 1541
102 gosub105:ifta=2orta=5orta=8then110:rem 1571
103 gosub105:goto110:rem 1581
105 read mt,ms:if mt<>0then105
106 return
110 tr=1:se=0
116 rem switch the 1571 in double side mode
117 ifta=2orta=5thenopen15,sd,15,"u0>m1":close15
118 ifta=2orta=8thenopen15,dd,15,"u0>m1":close15
120 print"{up}copying{.*3}{space*11}{down*2}"
129 ifta>6thenopen1,sd,5,im$+",p,r":goto135
130 open1,sd,5,"#"
134 ifta>3andta<7thenopen2,dd,5,im$+",p,w":goto140
135 open2,dd,5,"#"
140 open3,sd,15
145 open4,dd,15
147 ifta>3andta<7thenprint#4,"s:"+im$:fori=1to3000:nexti
150 read mt,ms
160 if mt=0 then 300
170 for tr=tr to mt
175 print"{up}track{space}";tr;"{left}{space},{space*3}{left*3}";:b$="{left*4}"
180 for se=0 to ms-1
190 a$=str$(se):a$=a$+left$(b$,len(a$)):printa$;
199 ifta>6then210
200 print#3,"u1:5{space}0{space}"+str$(tr)+str$(se)
209 ifta>3andta<7then220
210 print#4,"b-p:5{space}0"
219 ifta>6then230
220 print#3,"b-p:5{space}0"
230 sys sa
239 ifta>3andta<7then250
240 print#4,"u2:5{space}0{space}"+str$(tr)+str$(se)
250 next se:print
255 next tr
260 goto 150
300 close4:close2:close1:close3
305 print"{down*2}time:{space}"left$(ti$,2)":"mid$(ti$,3,2)":"right$(ti$,2)
310 print"{down*3}done,{space}press{space}any{space}key";
490 geta$:ifa$=""then490
495 goto11
499 :
500 for i=0to47
510 :read a
520 :pokesa+i,a
530 :next
540 pokesa+14,sa/256+1:pokesa+30,sa/256+1
550 return
599 :
600 data "1541->1541","1571->1571","1581->1581","1541->d64","1571->d71"
610 data "1581->d81","d64->1541","d71->1571","d81->1581"
699 :
700 data162, 1, 32,198,255,160, 0,162, 1, 32,207,255
710 data153, 0, 15,200,208,245, 32,204,255,162, 2, 32
720 data201,255,160, 0,185, 0, 15,162, 2, 32,210,255
730 data200,208,245, 32,204,255, 96, 0, 0, 0, 0, 0
799 :rem 1541
800 data 17,21,24,19,30,18,35,17,0,0
809 :rem 1571
810 data 17,21,24,19,30,18,35,17
811 data 52,21,59,19,65,18,70,17,0,0
819 :rem 1581
820 data 80,40,0,0
999 :