8-Bit Software Online Conversion
Rom to Disc Utility - Listing
10REM"
20REM" ROMSAVE v 2.00
30REM"
40REM" By Alex Savvides
50REM" Saves all ROMS in machine
60REM" For 8-Bit Public Domain
70REM"
80:
90DIMcode 50,buf 50
100DIMN$(15)
110*TV255
120MODE7
130FORK=1TO2
140PRINTTAB(0,K);" ";CHR$157;CHR$141"
Rom Saver Version 1"
150NEXT
160PRINT'SPC(7);" Written by Alex Savv
ides"'
170PRINT" ";CHR$157" ROM DESCRIPTION
LENGTH SAVED AS"
180PRINTTAB(0,24);" ";CHR$157;" An
8-Bit Public Domain Utility";
190VDU23;8202;0;0;0;
200VDU28,0,22,39,8
210PRINT" Use which drive (0-3) ? ":RE
PEAT:drive$=GET$:UNTILVAL(drive$)<4
220CLS
230OSCLI("DRIVE "+drive$)
240PRINT" Finding ROMS, please wait ..
."
250PROCread`roms
260CLS
270FORkk=0TO15
280R$=STR$(kk)
290R%=EVAL("&"+R$)
300DISP$=N$(kk)
310PROC`remove`spaces
320fl$="R."+LEFT$(N$(kk),7)
330IFN$(kk)="EMPTY"THENGOTO530
340O$=LEFT$(DISP$,25)
350S%=&4000
360D%=&3000
370FORPASS=0TO2STEP2
380P%=code
390[OPT PASS
400.r LDY#R%:JSR&FFB9:LDY#0:STA(&70),Y
:INC&F6:INC&70:BNE r
410INC&F7:INC&71:INC&72
420LDA#&40:CMP&72:BNEr
430RTS
440]NEXTPASS
450?&F6=0:?&F7=&80
460?&70=0:?&71=&30
470?&72=0
480CALLcode
490IF!&3009=!&5009THENlen=&2000ELSElen
=&4000
500$buf="SAVE "+fl$+" 3000+"+STR$÷len+
" 8000 8000":X%=bufMOD256:Y%=bufDIV256:C
ALL&FFF7
510PRINT;" ";R$;SPC(3-LEN(R$));" ";L
EFT$(DISP$,13);
520REPEAT:PRINT" ";:UNTILPOS=22:PRINT;
÷len;" ";fl$
530NEXT
540CLS
550*.
560END
570:
580DEFPROCread`roms
590@%=2
600FORY%=0TO15
610Q%=&8009
620A$=""
630REPEAT
640?&F6=Q%MOD&100
650?&F7=Q%DIV&100
660T%=USR&FFB9AND&FF
670IFT%<32ORT%>126THEN700
680A$=A$+CHR$(T%)
690Q%=Q%+1
700UNTILT%<32ORT%>126
710IFLENA$<2THENA$="EMPTY"
720N$(Y%)=A$
730NEXT
740ENDPROC
750:
760DEFPROC`remove`spaces
770L$=""
780CHANGE$=N$(kk)
790FORT=1TOLEN(N$(kk))
800IFMID$(CHANGE$,T,1)=" "THENGOTO820
810L$=L$+MID$(CHANGE$,T,1)
820NEXT
830N$(kk)=L$
840ENDPROC