I'm looking for SLOT.BAS

Page 2/2
1 |

By Randam

Paladin (771)

Randam's picture

29-03-2015, 17:08

It means: unused or not used. Now it only needs to be changed and it's an English version of the tool. But I see in the listing there is more Japanese.

By Randam

Paladin (771)

Randam's picture

29-03-2015, 18:21

I translated the comments in the file as well for a complete English version if someone is interested.

By gdx

Paragon (1689)

gdx's picture

30-03-2015, 13:21

I translated too:

1000 DEFINT A-Z
1010 DIM SL$(4,4,4),D(256),PA(4)
1020 PA(0)=0:PA(1)=&H4000:PA(2)=&H8000:PA(3)=&HC000
1030 FOR I=0 TO 75:READ D$:POKE&HC000+I,VAL("&H"+D$):NEXT
1040 DEFUSR0=&HC000:DEFUSR1=&HC003:DEFUSR2=&HC006:DEFUSR3=&HC009
1050 DEFUSR4=&HC00C
1060 DATA C3,0F,C0,C3,16,C0,C3,2D
1070 DATA C0,C3,3B,C0,C3,42,C0,23
1080 DATA 23,7E,32,49,C0,C9,23,23
1090 DATA E5,7E,23,66,6F,22,4A,C0
1100 DATA 3A,49,C0,CD,0C,00,FB,E1
1110 DATA 77,23,36,00,C9,23,23,5E
1120 DATA 3A,49,C0,2A,4A,C0,CD,14
1130 DATA 00,FB,C9,23,23,CD,38,01
1140 DATA 77,C9,23,23,7E,CD,3B,01
1150 DATA C9,00,00,00
1160 :
1170 SCREEN 5:COLOR 15,1,0:CLS:OPEN"grp:"AS#1
1180 GOSUB2610
1190 :
1200 'Cartridge Header search
1210 FOR P=1 TO 2
1220 FOR I=0 TO 3:IF PEEK(&HFCC1+I)>=128 THEN1280
1230 Z=USR0(I)
1240 IF USR1(PA(P)+0)><&H41 THEN1340
1250 IF USR1(PA(P)+1)><&H42 THEN1340
1260 SLOT=I:N$="???":GOSUB2760
1270 GOTO1340
1280 FOR J=0 TO 3
1290 Z=USR0(128+I+J*4)
1300 IF USR1(PA(P)+0)><&H41 THEN1330
1310 IF USR1(PA(P)+1)><&H42 THEN1330
1320 SLOT=128+I+J*4:N$="???":GOSUB2760
1330 NEXT
1340 NEXT
1350 NEXT
1360 :
1370 'MAIN-ROM search
1380 SLOT=PEEK(&HFCC1):P=0:N$="MAIN":GOSUB2760
1390 SLOT=PEEK(&HFCC1):P=1:N$="MAIN":GOSUB2760
1400 'SUB-ROM search
1410 SLOT=PEEK(&HFAF8):P=0:N$="SUB":GOSUB2760
1420 :
1430 'RAM (page3) search
1440 S=(USR3(0) AND &HC0)/&H40
1450 IF PEEK(&HFCC1+S)>=128 THEN SLOT=128+S+(PEEK(&HFCC5+S) AND &HC0)/&H40*4 ELSE SLOT=S
1460 P=3:N$="RAM":GOSUB2760
1470 'RAM (page2) location search
1480 S=(USR3(0) AND &H30)/&H10
1490 IF PEEK(&HFCC1+S)>=128 THEN SLOT=128+S+(PEEK(&HFCC5+S) AND &H30)/&H10*4 ELSE SLOT=S
1500 P=2:N$="RAM":GOSUB2760
1510 'RAM (page0, 1) search
1520 FOR P=0 TO 1
1530 FOR I=0 TO 3:IF PEEK(&HFCC1+I)>=128 THEN1610
1540 Z=USR0(I)
1550 D0=USR1(&H4010):Z=USR2(D0 XOR 255):D1=USR1(&H4010):Z=USR2(D0)
1560 IF D1><(D0 XOR 255) THEN1690
1570 D0=USR1(&H4020):Z=USR2(D0 XOR 255):D1=USR1(&H4020):Z=USR2(D0)
1580 IF D1><(D0 XOR 255) THEN1690
1590 SLOT=I:N$="RAM":GOSUB2760
1600 GOTO1690
1610 FOR J=0 TO 3
1620 Z=USR0(128+I+J*4)
1630 D0=USR1(&H4010):Z=USR2(D0 XOR 255):D1=USR1(&H4010):Z=USR2(D0)
1640 IF D1><(D0 XOR 255) THEN1680
1650 D0=USR1(&H4020):Z=USR2(D0 XOR 255):D1=USR1(&H4020):Z=USR2(D0)
1660 IF D1><(D0 XOR 255) THEN1680
1670 SLOT=128+I+J*4:N$="RAM":GOSUB2760
1680 NEXT
1690 NEXT
1700 NEXT
1710 '
1720 'FM sound
1730 FOR I=0 TO 3:IF PEEK(&HFCC1+I)>=128 THEN1810
1740 Z=USR0(I)
1750 IF USR1(&H401C)><&H4F THEN1890
1760 IF USR1(&H401D)><&H50 THEN1890
1770 IF USR1(&H401E)><&H4C THEN1890
1780 IF USR1(&H401F)><&H4C THEN1890
1790 SLOT=I:P=1:N$="FM":GOSUB2760
1800 GOTO1890
1810 FOR J=0 TO 3
1820 Z=USR0(128+I+J*4)
1830 IF USR1(&H401C)><&H4F THEN1880
1840 IF USR1(&H401D)><&H50 THEN1880
1850 IF USR1(&H401E)><&H4C THEN1880
1860 IF USR1(&H401F)><&H4C THEN1880
1870 SLOT=128+I+J*4:P=1:N$="FM":GOSUB2760
1880 NEXT
1890 NEXT
1900 '
1910 'Kanji driver search
1920 FOR I=0 TO 3:IF PEEK(&HFCC1+I)>=128 THEN2030
1930 Z=USR0(I)
1940 IF USR1(&H4020)><&H54 THEN2030
1950 IF USR1(&H4021)><&H41 THEN2030
1960 IF USR1(&H4022)><&H4E THEN2030
1970 IF USR1(&H4023)><&H4B THEN2030
1980 IF USR1(&H4024)><&H41 THEN2030
1990 IF USR1(&H4025)><&H4E THEN2030
2000 SLOT=I:P=1:N$="KANJI":GOSUB2760
2010 SLOT=I:P=2:N$="KANJI":GOSUB2760
2020 GOTO2140
2030 FOR J=0 TO 3
2040 Z=USR0(128+I+J*4)
2050 IF USR1(&H4020)><&H54 THEN2130
2060 IF USR1(&H4021)><&H41 THEN2130
2070 IF USR1(&H4022)><&H4E THEN2130
2080 IF USR1(&H4023)><&H4B THEN2130
2090 IF USR1(&H4024)><&H41 THEN2130
2100 IF USR1(&H4025)><&H4E THEN2130
2110 SLOT=128+I+J*4:P=1:N$="KANJI":GOSUB2760
2120 SLOT=128+I+J*4:P=2:N$="KANJI":GOSUB2760
2130 NEXT
2140 NEXT
2150 '
2160 ' DOS kernel search
2170 FOR I=0 TO 3:IF PEEK(&HFCC1+I)>=128 THEN2250
2180 SLOT=I:P=1:GOSUB2820:IF N$><"???" THEN2330
2190 Z=USR0(I)
2200 F=0:FOR A=0 TO 511
2210 IF (USR1(&H4000+A)=&H4D)AND(USR1(&H4001+A)=&H53)AND(USR1(&H4002+A)=&H58)AND(USR1(&H4003+A)=&H2D)AND(USR1(&H4004+A)=&H44)AND(USR1(&H4005+A)=&H4F)AND(USR1(&H4006+A)=&H53) THEN F=1:A=511
2220 NEXT
2230 IF F=1 THEN SLOT=I:P=1:N$="DOS":GOSUB2760
2240 GOTO2330
2250 FOR J=0 TO 3
2260 SLOT=128+I+J*4:P=1:GOSUB2820:IF N$><"???" THEN2320
2270 Z=USR0(128+I+J*4)
2280 F=0:FOR A=0 TO 511
2290 IF (USR1(&H4000+A)=&H4D)AND(USR1(&H4001+A)=&H53)AND(USR1(&H4002+A)=&H58)AND(USR1(&H4003+A)=&H2D)AND(USR1(&H4004+A)=&H44)AND(USR1(&H4005+A)=&H4F)AND(USR1(&H4006+A)=&H53) THEN F=1:A=511
2300 NEXT
2310 IF F=1 THEN SLOT=128+I+J*4:P=1:N$="DOS":GOSUB2760
2320 NEXT
2330 NEXT
2340 '
2350 'Unused slot search (Can't search in page 3)
2360 FOR P=0 TO 2
2370 FOR I=0 TO 3:IF PEEK(&HFCC1+I)>=128 THEN2470
2380 SLOT=I:GOSUB2820:IF N$>"" THEN2570
2390 Z=USR0(I)
2400 FOR A=0 TO 255:D(A)=0:NEXT
2410 FOR A=0 TO 255:D0=USR1(PA(P)+A*64):D(D0)=D(D0)+1:NEXT
2420 FOR A=0 TO 255
2430 IF (D(A)>200) THEN SLOT=I:N$="Empty":GOSUB2760:A=300
2440 NEXT
2450 IF A=256 THEN SLOT=I:N$="???":GOSUB2760
2460 GOTO2570
2470 FOR J=0 TO 3
2480 Z=USR0(128+I+J*4)
2490 SLOT=128+I+J*4:GOSUB2820:IF N$>"" THEN2560
2500 FOR A=0 TO 255:D(A)=0:NEXT
2510 FOR A=0 TO 255:D0=USR1(PA(P)+A*64):D(D0)=D(D0)+1:NEXT
2520 FOR A=0 TO 255
2530 IF (D(A)>200) THEN SLOT=128+I+J*4:N$="Empty":GOSUB2760:A=300
2540 NEXT
2550 IF A=256 THEN SLOT=128+I+J*4:N$="???":GOSUB2760
2560 NEXT
2570 NEXT
2580 NEXT
2590 '
2591 BEEP
2600 GOTO2600
2610 FOR I=0 TO 3
2620 PRESET(I*45+75,0):COLOR 15:PRINT#1,"Page";HEX$(I)
2630 PRESET(5,I*50+11):PRINT#1,"SLOT ";HEX$(I)
2640 LINE(70,I*50+10)-(250,I*50+46),15,B
2650 LINE(115,I*50+10)-(115,I*50+46),15
2660 LINE(160,I*50+10)-(160,I*50+46),15
2670 LINE(205,I*50+10)-(205,I*50+46),15
2680 IF (PEEK(&HFCC1+I) AND 128)=0 THEN2740
2690 PRESET(5,I*50+11):PRINT#1,"SLOT ";HEX$(I);"-0"
2700 FOR J=1 TO 3
2710 PRESET(5,I*50+11+J*9):PRINT#1,"SLOT ";HEX$(I);"-";HEX$(J)
2720 LINE(70,I*50+10+J*9)-(250,I*50+10+J*9),15
2730 NEXT
2740 NEXT
2750 RETURN
2760 S=SLOT AND 3:SS=0:IF SLOT>=128 THEN SS=(SLOT AND 12)/4
2770 PAINT (P*45+71,S*50+SS*9+11),1,15
2780 PAINT (P*45+71,S*50+SS*9+11),14,15
2790 PRESET(P*45+72,S*50+SS*9+11):COLOR 4,14:PRINT#1,N$
2800 SL$(S,SS,P)=N$
2810 RETURN
2820 S=SLOT AND 3:SS=0:IF SLOT>=128 THEN SS=(SLOT AND 12)/4
2830 N$=SL$(S,SS,P):RETURN

The search for the RAM not seem totally reliable.

By Giangiacomo Zaffini 2

Rookie (29)

Giangiacomo Zaffini 2's picture

18-11-2017, 14:52

I re-post a link for above mentioned version I found of MSAMPLE.BAS for the case someone want it.
MSAMPLE.BAS download link

By Pippo

Champion (285)

Pippo's picture

18-11-2017, 18:12

Many thanks again, GianGiacomo.
Thanks a lot to Gdx and the others too.

By eimaster

Expert (123)

eimaster's picture

23-11-2017, 02:56

giangiacomo.zaffini wrote:

If someone still want this tool, I made a copy available for everybody at the link below

MSAMPLE.BAS is the application named SLOT.BAS above

Dead link! File does not exist anymore! Where can I download it?!

By kuro

Resident (34)

kuro's picture

23-11-2017, 06:06

TINY-yarou has released an extended version
http://www.tiny-yarou.com/slotchecker.html

By gdx

Paragon (1689)

gdx's picture

23-11-2017, 09:12

You can also copy and paste the listing above to a text editor and save it as plain text with the name "SLOT.BAS".

Page 2/2
1 |
My MSX profile