10REM ** THIS PROGRAMME USES MAIN MEMORY. SAVE IMPORTANT DATA BEFORE CONTINUING" 20REM Function key saver 30REM (C) Raf Giaccio, 2003 40REM to upload to UTILSROM. 50: 60MODE128 70PROC_info 80PROC_info2 90PROC_choose 100CLS 110PRINT"Finished now. Made any changes?" 120PRINT"Please *SRSAVE UTILSROM04 8000 BFFF 6 Q now to make any alterations" 130PRINT"that you have made permanent." 135PRINT"**WARNING** USING THE 'Q' PARAMETER WILL OVERWRITE PROGRAMME" 136PRINT"DO YOU WANT TO SAVE THIS PROGRAMME FIRST ?" 140END 150: 160DEF PROC_info 170PRINTTAB(20,20)"UTILSROM 04 MASTER 128 FUNCTION KEY PROGRAMMER" 180PRINT 190PRINTTAB(14)"PLEASE ENSURE THAT UTILSROM 04 IS *SRLOADed into ROM bank 6." 200YK=INKEY(500) 210CLS 220PRINTTAB(10,1)"This programme uses main memory. Save any important data" 230PRINTTAB(10,2)"that you may have stored in memory before proceeding." 240PRINTTAB(10,10)"This programme is used to re-programme 9 of your function" 250PRINTTAB(10,11)"keys, typically with your favourite definitions, that you" 260PRINTTAB(10,12)"may need to modify from time to time. Use this programme" 270PRINTTAB(10,13)"as a reference and save it as a future reminder of how to" 280PRINTTAB(10,14)"do this. Please keep in mind that you are writing to a" 290PRINTTAB(10,15)"ROM image. You will need to *SRSAVE UTILSROM04 to save" 300PRINTTAB(10,16)"the changes that you make. UTILSROM 04 in effect re-issues" 310PRINTTAB(10,17)"automatically its *KEYS command on resets. Currently, the" 320PRINTTAB(10,18)"available addresses are (using RAM bank 6) - &BC17" 330PRINTTAB(10,19)" &BC3C" 340PRINTTAB(10,20)" &BC62" 350PRINTTAB(10,21)" &BC93" 360PRINTTAB(10,22)" &BCBA" 370PRINTTAB(10,23)" &BCE7" 380PRINTTAB(10,24)" &BD10" 390PRINTTAB(10,25)" &BD3D" 400PRINTTAB(10,26)" &BD69" 410PRINT 420PRINTTAB(10)"This will give you some idea of how long each of these nine" 430PRINTTAB(10)"strings is currently permitted to be, but watch out for up-" 440PRINTTAB(10)"dates coming soon allowing longer strings." 450PRINTTAB(54)"PRESS A KEY TO CONTINUE"; 460T=GET:ENDPROC 470DEFPROC_info2 480CLS 490PRINTTAB(14,8)"Look at the listing. Notice how the key strings are" 500PRINTTAB(14,9)"listed. You only need to alter these as required, no" 510PRINTTAB(14,10)"matter what key numbers you desire (Max. 9 keys)." 520PRINT 530PRINTTAB(14)"Below is a general description of the required format." 540PRINT 550PRINT 560PRINTTAB(14)".Fkeyx EQUS KEYx normal string |M PLUS ':EQUB&0D:.Ex'" 570PRINT 580PRINTTAB(14)"where 'x' is the Fkey SEQUENCE STRING NUMBER USED HERE." 590PRINTTAB(14)"Can you guess what I have not included above :-" 600PRINTTAB(14)"immediately before 'EQUS' and at the end of 'normal string'" 610PRINTTAB(14)"after '|M'?" 620PRINTTAB(14)"YES! QUOTATION MARKS!!" 630PRINT 640PRINT 650PRINTTAB(14)"Also, the final key has to end ':EQUB&0D:EQUB&00:E8'" 660PRINTTAB(14)"This is important as the programme needs 'EQUB&00' to end." 670PRINT 680PRINTTAB(14)"Have a look at the listing, save it then have a go." 690PRINTTAB(14)"Do a HARD RESET after running your key altering programme" 700PRINTTAB(14)"as UTILSROM 04 needs to recognise the alterations and set the" 710PRINTTAB(14)"Function keys up afresh. And that's it." 720PRINTTAB(54,30)"PRESS A KEY TO CONTINUE"; 730TT=GET 740ENDPROC 750\ 760DEFPROC_choose 770CLS 780PRINTTAB(10,20)"TYPE 'Y' TO PROCEED TO WRITE OR ANOTHER KEY TO END" 790T$=GET$ 800IF T$="Y" OR T$="y" THEN PROC_write:ENDPROC 810ENDPROC 820DEFPROC_write 830FOR D%=0 TO 2 STEP 2 840P%=&3000 850[OPTD% 860LDX #write0 MOD 256:LDY #write0 DIV 256:JSR &FFF7 870LDX #write1 MOD 256:LDY #write1 DIV 256:JSR &FFF7 880LDX #write2 MOD 256:LDY #write2 DIV 256:JSR &FFF7 890LDX #write3 MOD 256:LDY #write3 DIV 256:JSR &FFF7 900LDX #write4 MOD 256:LDY #write4 DIV 256:JSR &FFF7 910LDX #write5 MOD 256:LDY #write5 DIV 256:JSR &FFF7 920LDX #write6 MOD 256:LDY #write6 DIV 256:JSR &FFF7 930LDX #write7 MOD 256:LDY #write7 DIV 256:JSR &FFF7 940LDX #write8 MOD 256:LDY #write8 DIV 256:JSR &FFF7 950RTS 960.write0 EQUS"SRWRITE "+STR$~Fkey0+" "+STR$~E0+" BC17 6":EQUB13 970.write1 EQUS"SRWRITE "+STR$~Fkey1+" "+STR$~E1+" BC3C 6":EQUB&0D 980.write2 EQUS"SRWRITE "+STR$~Fkey2+" "+STR$~E2+" BC62 6":EQUB&0D 990.write3 EQUS"SRWRITE "+STR$~Fkey3+" "+STR$~E3+" BC93 6":EQUB&0D 1000.write4 EQUS"SRWRITE "+STR$~Fkey4+" "+STR$~E4+" BCBA 6":EQUB&0D 1010.write5 EQUS"SRWRITE "+STR$~Fkey5+" "+STR$~E5+" BCE7 6":EQUB&0D 1020.write6 EQUS"SRWRITE "+STR$~Fkey6+" "+STR$~E6+" BD10 6":EQUB&0D 1030.write7 EQUS"SRWRITE "+STR$~Fkey7+" "+STR$~E7+" BD3D 6":EQUB&0D 1040.write8 EQUS"SRWRITE "+STR$~Fkey8+" "+STR$~E8+" BD69 6":EQUB&0D 1050\ 1060.Fkey0 EQUS"KEY0VDU23 1 0 0 0 0 0 0 0 0|MRUN|M":EQUB&0D:.E0 1070.Fkey1 EQUS"KEY1VDU23 1 0 0 0 0 0 0 0 0|MLIST|M":EQUB&0D:.E1 1080.Fkey2 EQUS"KEY2VDU15|MREN.|ML.|M":EQUB&0D:.E2 1090.Fkey3 EQUS"KEY3VDU23 1 0 0 0 0 0 0 0 0|M*ROMS|M":EQUB&0D:.E3 1100.Fkey4 EQUS"KEY4VDU14|ML.|M":EQUB&0D:.E4 1110.Fkey5 EQUS"KEY5*STATUS|M":EQUB&0D:.E5 1120.Fkey6 EQUS"KEY7*SHOW ":EQUB&0D:.E6 1130.Fkey7 EQUS"KEY9*NUMBERS|M":EQUB&0D:.E7 1140.Fkey8 EQUS"KEY10OLD|M*SQUAT|M*DIR|M":EQUB&0D:EQUB&00:.E8 1150]:NEXT 1160CALL &3000 1170ENDPROC 1180REMSA."PATCHKEYSC"