I ask a little help for manage in BASIC lift for my game WASHMAN

By gasparrini

Champion (333)

gasparrini さんの画像

17-01-2020, 22:04

Hello To all you Guy of MSX World,

I ask the your help for fix my source videogame for MSX1 of WASHMAN, that is not not yet finish.....
The problem are the manage of the two lift, these right and there lift, that still has a BUG every one.

However, before tester well this videogame from BASIC MSX.
Therefore please, if somebody help me, I will be very happy.

LOADER GAME:

10 REM LOADER WASHMAN
20 REM
30 CLEAR1000,&HBFFF
40 BLOAD"WASHMAN.BIN",R
50 BLOAD"WASHMAN2.BIN"
60 CLEAR1000,&HE200
70 RUN"WASHMAN.BAS"

Source BASIC main WASHMAN:

10 REM ============
20 REM = WASH MAN =
30 REM ============
40 REM (c) DreamQuick Studio
50 REM 2017 ver.0.62
60 '--------------------
70 DEFUSR=&H90:REM RESET AUDIO
80 DEFUSR3=&HE200:REM FULL WALL
90 REM
100 FORI=0TO31:PUTSPRITEI,,0,63:NEXTI
110 SCREEN,,0:REM OFF CURSORE
120 DEFINTA-Z
130 CLEAR2000,&HDFFF
140 REM INIT VARIABILI 
150 SC=490:HI=3780:LV=1:LI=5:BO=500
160 V1=0:V2=0:ID=0:ST=1:RD=1
161 REM init music!
162 DIM M$(4)
163 PLAY"S0M4000L16O4","S0O2L16","v15s0m4000o4l4"
164 M$(1)="CR16CR16FER16D"
165 M$(2)="DR16DR16GFR16E"
166 M$(3)="CCEFAFGE"
167 M$(4)="DDFGBGAF"
170 GOTO270
180 REM PRINT TABLE SCORE
190 LOCATE1,0:PRINT"SCORE":LOCATE10,0:PRINT"hi-score"
200 LOCATE0,1:PRINTSC*100:LOCATE9,1:PRINTHI*100
210 LOCATE20,0:PRINT"STAGE";ST
220 LF=LI:IFLF>11THENLF=11
230 FORA=1TOLF:LOCATE20,1:PRINTSTRING$(LF,126);:NEXTA
240 LOCATE28,0:PRINTUSING"m=##";V1
250 LOCATE28,1:PRINTUSING"p=##";V2
260 RETURN
270 IFRD=1THEN300ELSEIFRD=2THEN900
280 IFRD=1THEN320ELSEIFRD=2THENGOTO920
290 REM STAGE ROOM 1
300 X=120:Y=136
310 XA=8:YA=118:XB=208:YB=118
320 CLS:LOCATE0,2:PRINTSTRING$(32,128);
330 FORI=3TO22:PRINTCHR$(128)+SPACE$(30)+CHR$(128);:NEXTI
340 LOCATE1,3:PRINTCHR$(139)+CHR$(140)
350 IFYA=22THEN390ELSEGOTO360
360 IFYA=54THENFORI=4TO7:LOCATE1,I:PRINTCHR$(141)+CHR$(142):NEXTI
370 IFYA=86THENFORI=4TO11:LOCATE1,I:PRINTCHR$(141)+CHR$(142):NEXTI
380 IFYA=118THENFORI=4TO15:LOCATE1,I:PRINTCHR$(141)+CHR$(142):NEXTI
390 PUTSPRITE2,(XA,YA),5,16*4
400 PUTSPRITE3,(XA,YA+16),12,18*4
410 LOCATE0,19:FORI=1TO16:PRINTCHR$(129)+CHR$(130);:NEXTI
420 LOCATE0,20:FORI=1TO16:PRINTCHR$(130)+CHR$(129);:NEXTI
430 LOCATE29,19:PRINTCHR$(32)+CHR$(32):LOCATE29,20:PRINTCHR$(32)+CHR$(32)
440 FORI=1TO32:VPOKE6879+I,128:NEXTI
450 LOCATE3,3:FORI=1TO14:PRINTCHR$(129)+CHR$(130);:NEXTI
460 LOCATE3,4:FORI=1TO14:PRINTCHR$(130)+CHR$(129);:NEXTI
470 LOCATE26,7:PRINTCHR$(139)+CHR$(140)
480 IFYB=22THEN520ELSEGOTO490
490 IFYB=54THEN520ELSEGOTO500
500 IFYB=86THENFORI=8TO11:LOCATE26,I:PRINTCHR$(141)+CHR$(142):NEXTI
510 IFYB=118THENFORI=8TO15:LOCATE26,I:PRINTCHR$(141)+CHR$(142):NEXTI
520 PUTSPRITE4,(XB,YB),5,16*4
530 PUTSPRITE5,(XB,YB+16),12,18*4
540 PUTSPRITE6,(214,168),14,17*4
550 LOCATE3,7:PRINTSTRING$(23,128)
560 LOCATE3,11:PRINTSTRING$(23,128)
570 LOCATE3,15:PRINTSTRING$(23,128)
580 FORI=7TO18:LOCATE28,I:PRINTCHR$(128):NEXTI
590 REM WASH MACHINE 1
600 LOCATE6,17:PRINTCHR$(131)+CHR$(133):LOCATE6,18:PRINTCHR$(132)+CHR$(134)
610 REM WASH MACHINE 2
620 LOCATE21,17:PRINTCHR$(135)+CHR$(137):LOCATE21,18:PRINTCHR$(136)+CHR$(138)
630 REM
640 REM DATA PUT DOOR
650 RESTORE690:FORI=1TO8:READB,C
660 LOCATEB,C:PRINTCHR$(143)+CHR$(144)
670 LOCATEB,C+1:PRINTCHR$(145)+CHR$(147)
680 LOCATEB,C+2:PRINTCHR$(146)+CHR$(148):NEXTI
690 DATA 6,12,10,12,15,12,20,12
700 DATA 4,8,8,8,12,8,16,8,19
710 LOCATE8,5:PRINTCHR$(149)+CHR$(151):LOCATE8,6:PRINTCHR$(150)+CHR$(152)
720 LOCATE6,5:PRINTCHR$(175)+CHR$(176):LOCATE6,6:PRINTCHR$(177)+CHR$(178)
730 LOCATE12,5:PRINTCHR$(175)+CHR$(176):LOCATE12,6:PRINTCHR$(177)+CHR$(178)
740 LOCATE18,5:PRINTCHR$(175)+CHR$(176):LOCATE18,6:PRINTCHR$(177)+CHR$(178)
750 LOCATE24,5:PRINTCHR$(175)+CHR$(176):LOCATE24,6:PRINTCHR$(177)+CHR$(178)
760 LOCATE3,21:PRINTCHR$(175)+CHR$(176):LOCATE3,22:PRINTCHR$(177)+CHR$(178)
770 LOCATE9,21:PRINTCHR$(175)+CHR$(176):LOCATE9,22:PRINTCHR$(177)+CHR$(178)
780 LOCATE15,21:PRINTCHR$(175)+CHR$(176):LOCATE15,22:PRINTCHR$(177)+CHR$(178)
790 LOCATE21,21:PRINTCHR$(175)+CHR$(176):LOCATE21,22:PRINTCHR$(177)+CHR$(178)
800 LOCATE27,21:PRINTCHR$(175)+CHR$(176):LOCATE27,22:PRINTCHR$(177)+CHR$(178)
810 REM PUT PAVIMENTO LIFTS
820 IFYA=86THENLOCATE1,15:PRINTCHR$(128)+CHR$(128)
830 IFYA=54THENLOCATE1,11:PRINTCHR$(128)+CHR$(128)
840 IFYA=22THENLOCATE1,7:PRINTCHR$(128)+CHR$(128)
850 IFYB=86THENLOCATE26,15:PRINTCHR$(128)+CHR$(128)
860 IFYB=54THENLOCATE26,11:PRINTCHR$(128)+CHR$(128)
870 GOSUB190:GOTO1640
880 '----------------------------
890 REM STAGE ROOM 2
900 X=144:Y=40
910 XA=48:YA=22:XB=176:YB=54
920 CLS:LOCATE0,2:PRINTSTRING$(32,128);
930 FORI=3TO22:PRINTCHR$(128)+SPACE$(30)+CHR$(128);:NEXTI
940 LOCATE6,3:PRINTCHR$(139)+CHR$(140)
950 IFYA=22THEN990ELSEGOTO960
960 IFYA=54THENFORI=4TO7:LOCATE6,I:PRINTCHR$(141)+CHR$(142):NEXTI
970 IFYA=86THENFORI=4TO11:LOCATE6,I:PRINTCHR$(141)+CHR$(142):NEXTI
980 IFYA=118THENFORI=4TO15:LOCATE6,I:PRINTCHR$(141)+CHR$(142):NEXTI
990 PUTSPRITE2,(XA,YA),5,16*4
1000 PUTSPRITE3,(XA,YA+16),12,18*4
1010 LOCATE1,3:PRINTCHR$(139)+CHR$(140)
1020 FORI=4TO13:LOCATE1,I:PRINTCHR$(141)+CHR$(142):NEXTI
1030 LOCATE3,3:PRINTCHR$(130)+CHR$(129)+CHR$(130)
1040 LOCATE0,19:FORI=1TO16:PRINTCHR$(129)+CHR$(130);:NEXTI
1050 LOCATE0,20:FORI=1TO16:PRINTCHR$(130)+CHR$(129);:NEXTI
1060 LOCATE29,19:PRINTCHR$(32)+CHR$(32):LOCATE29,20:PRINTCHR$(32)+CHR$(32)
1070 FORI=1TO32:VPOKE6879+I,128:NEXTI
1080 LOCATE8,3:FORI=1TO12:PRINTCHR$(129)+CHR$(130);:NEXTI
1090 LOCATE8,4:FORI=1TO12:PRINTCHR$(130)+CHR$(129);:NEXTI
1100 LOCATE22,7:PRINTCHR$(139)+CHR$(140)
1110 IFYB=22THEN1150ELSEGOTO1120
1120 IFYB=54THEN1150ELSEGOTO1130
1130 IFYB=86THENFORI=8TO11:LOCATE22,I:PRINTCHR$(141)+CHR$(142):NEXTI
1140 IFYB=118THENFORI=8TO15:LOCATE22,I:PRINTCHR$(141)+CHR$(142):NEXTI
1150 PUTSPRITE4,(XB,YB),5,16*4
1160 PUTSPRITE5,(XB,YB+16),12,18*4
1170 PUTSPRITE6,(214,168),14,17*4
1180 LOCATE3,7:PRINTCHR$(128)+CHR$(128)+CHR$(128):LOCATE8,7:PRINTSTRING$(14,128):LOCATE24,7:PRINTSTRING$(4,128)
1190 LOCATE3,11:PRINTCHR$(128)+CHR$(128)+CHR$(128):LOCATE8,11:PRINTSTRING$(14,128):LOCATE24,11:PRINTSTRING$(4,128)
1200 LOCATE3,15:PRINTCHR$(128)+CHR$(128)+CHR$(128):LOCATE8,15:PRINTSTRING$(14,128):LOCATE24,15:PRINTSTRING$(4,128)
1210 FORI=7TO18:LOCATE28,I:PRINTCHR$(128):NEXTI
1220 REM WASH MACHINE 1
1230 RESTORE1250:FORI=1TO3:READB,C,D,E
1240 LOCATE3,17:PRINTCHR$(131)+CHR$(133):LOCATE3,18:PRINTCHR$(132)+CHR$(134)
1250 DATA 3,17,3,18,9,17,9,18,25,17,25,18
1260 REM WASH MACHINE 2
1270 LOCATE25,17:PRINTCHR$(135)+CHR$(137):LOCATE25,18:PRINTCHR$(136)+CHR$(138)
1280 REM
1290 REM DATA PUT DOOR
1300 RESTORE1340:FORI=1TO6:READB,C
1310 LOCATEB,C:PRINTCHR$(143)+CHR$(144)
1320 LOCATEB,C+1:PRINTCHR$(145)+CHR$(147)
1330 LOCATEB,C+2:PRINTCHR$(146)+CHR$(148):NEXTI
1340 DATA 10,12,15,12,25,12
1350 DATA 10,8,14,8,25,8
1360 LOCATE18,11:PRINTCHR$(139)+CHR$(140)
1370 FORI=12TO16:LOCATE18,I:PRINTCHR$(141)+CHR$(142):NEXTI
1380 LOCATE3,5:PRINTCHR$(175)+CHR$(176):LOCATE3,6:PRINTCHR$(177)+CHR$(178):LOCATE5,4:PRINTCHR$(129)
1390 LOCATE3,4:PRINTCHR$(129)+CHR$(130)
1400 LOCATE13,5:PRINTCHR$(175)+CHR$(176):LOCATE13,6:PRINTCHR$(177)+CHR$(178)
1410 LOCATE19,5:PRINTCHR$(175)+CHR$(176):LOCATE19,6:PRINTCHR$(177)+CHR$(178)
1420 LOCATE25,5:PRINTCHR$(175)+CHR$(176):LOCATE25,6:PRINTCHR$(177)+CHR$(178)
1430 LOCATE3,21:PRINTCHR$(175)+CHR$(176):LOCATE3,22:PRINTCHR$(177)+CHR$(178)
1440 LOCATE9,21:PRINTCHR$(175)+CHR$(176):LOCATE9,22:PRINTCHR$(177)+CHR$(178)
1450 LOCATE15,21:PRINTCHR$(175)+CHR$(176):LOCATE15,22:PRINTCHR$(177)+CHR$(178)
1460 LOCATE21,21:PRINTCHR$(175)+CHR$(176):LOCATE21,22:PRINTCHR$(177)+CHR$(178)
1470 LOCATE27,21:PRINTCHR$(175)+CHR$(176):LOCATE27,22:PRINTCHR$(177)+CHR$(178)
1480 REM PRINT TABLE SCORE
1490 LOCATE1,0:PRINT"SCORE":LOCATE10,0:PRINT"hi-score"
1500 LOCATE0,1:PRINTSC*100:LOCATE9,1:PRINTHI*100
1510 LOCATE20,0:PRINT"STAGE";LV
1520 LF=LI:IFLF>11THENLF=11
1530 LOCATE21+LF,1:PRINTCHR$(32)
1540 LOCATE28,0:PRINTUSING"m=##";V1
1550 LOCATE28,1:PRINTUSING"p=##";V2
1560 REM PUT PAVIMENTO LIFTS
1570 IFYA=86THENLOCATE6,15:PRINTCHR$(128)+CHR$(128)
1580 IFYA=54THENLOCATE6,11:PRINTCHR$(128)+CHR$(128)
1590 IFYA=22THENLOCATE6,7:PRINTCHR$(128)+CHR$(128)
1600 IFYB=86THENLOCATE22,15:PRINTCHR$(128)+CHR$(128)
1610 IFYB=54THENLOCATE22,11:PRINTCHR$(128)+CHR$(128)
1620 GOSUB190
1630 REM MAIN GAME!
1640 SP=4
1650 PUTSPRITE0,(X,Y),5,0*4:PUTSPRITE1,(X,Y),13,1*4:GOSUB4670
1660 STRIG(0)ON:STRIG(1)ON
1670 ON STRIG GOSUB4510,4510
1680 'ON INTERVAL=150 GOSUB 4670:INTERVALON
1690 ON STICK(0)ORSTICK(1)GOSUB1870,1870,1910,1910,1930,1930,1940,1940
1700 PUTSPRITE0,(X,Y),5,((SP)*4+Z*4):PUTSPRITE1,(X,Y),13,((SP+1)*4+Z*4):X1=X:Y1=Y
1710 IFSTICK(0)ORSTICK(1)>0THENZ=Z+2ANDZ<1
1720 IFSTICK(0)ORSTICK(1)=0THENINTERVALON
1730 IFS=1ANDX=XAANDY=YA+18THENGOSUB3240
1740 IFS=1ANDX=XBANDY=YB+18THENGOSUB3720
1750 V=6144+INT(Y+16)/8*32+INT(X)/8
1760 IFVPEEK(V)=128ORVPEEK(V)=129ORVPEEK(V)=130ORVPEEK(V)=139ORVPEEK(V)=140THEN1690ELSEGOTO1810
1770 IFSC>HITHENHI=SC:LOCATE9,1:PRINTHI*100
1780 IFSC=>BOTHENBO=BO+500:GOSUB4800
1790 GOTO1690
1800 REM GRAVITA' PAVIMENTO
1810 IFSP=0THENSP=26
1820 IFSP=4THENSP=28
1830 IFSP=26THENV=6144+INT(Y+16)/8*32+INT(X)/8ELSEV=6144+INT(Y+16)/8*32+INT(X+12)/8
1840 IFVPEEK(V)=128ORVPEEK(V)=129ORVPEEK(V)=130ORVPEEK(V)=139ORVPEEK(V)=140THENIFYD>2THEN1970ELSEGOTO1690
1850 Y=Y+8:SOUND0,Y:SOUND8,15:YD=YD+1:PUTSPRITE0,(X,Y),5,((SP)*4+Z*4):PUTSPRITE1,(X,Y),13,((SP+1)*4+Z*4)
1860 GOTO1810
1870 W=6144+(Y)/8*32+(X)/8
1880 IFVPEEK(W)=145THENSP=12:PUTSPRITE0,(X,Y),5,((SP)*4):PUTSPRITE1,(X,Y),13,((SP+1)*4):GOSUB4180:FORI=0TO31:PUTSPRITEI,,0,0*4:NEXTI:GOTO2140
1890 SP=0
1900 S=1:RETURN
1910 S=0:SP=0:X=X+4:IFX>232ANDY=40THENX=X1:Y=Y1:RETURN
1920 IFX>208ANDY<>40THENX=X1:Y=Y1:RETURNELSERETURN
1930 S=0:RETURN
1940 S=0:SP=4:X=X-4:IFX<8THENX=X1:Y=Y1:RETURNELSERETURN
1950 '---------------------------
1960 REM MORTE 1UP
1970 INTERVALOFF:YD=0
1980 SOUND7,56:SOUND12,25:SOUND11,0:SOUND10,0
1990 SOUND0,50:SOUND1,6:SOUND8,16
2000 SOUND2,50:SOUND3,7:SOUND9,16
2010 SOUND4,50:SOUND5,5:SOUND10,16
2020 FORI=0TO2:SOUND13,0:FORJ=0TO150:NEXTJ:NEXTI
2030 SOUND0,200:SOUND1,7:SOUND2,200:SOUND3,8:SOUND4,200:SOUND5,6
2040 SOUND12,35:SOUND13,0
2050 FORK=0TO400:NEXTK:A=USR(0)
2060 SP=30:FORI=1TO3
2070 PUTSPRITE0,(X,Y),5,((SP)*4+Z*4):PUTSPRITE1,(X,Y),13,((SP+1)*4+Z*4):SP=SP+2:FORK=0TO800:NEXT:NEXT
2080 SP=0:FORK=0TO600:NEXTK
2090 LI=LI-1:LF=LI:IFLF=<0THENEND:REM GAME OVER
2100 LOCATE21,1:PRINTSTRING$(LF,32);
2110 IFRD=1THENX=120:Y=136:GOTO1700
2120 IFRD=2THENX=48:Y=22:GOTO1700
2130 REM BUILD BIG ROOM
2140 CLS:A=USR3(0):PY=Y
2150 LOCATE0,2:FORI=1TO16:PRINTCHR$(154)+CHR$(155);:NEXTI
2160 LOCATE0,3:FORI=1TO16:PRINTCHR$(155)+CHR$(154);:NEXTI
2170 FORI=1TO16:LOCATE,22:PRINTCHR$(154)+CHR$(155);:NEXTI
2180 FORI=1TO15:LOCATE,23:PRINTCHR$(155)+CHR$(154);:NEXTI
2190 VPOKE6910,155:VPOKE6911,154
2200 FORI=4TO20STEP2:LOCATE0,I:PRINTCHR$(154)+CHR$(155):PRINTCHR$(155)+CHR$(154):NEXTI
2210 FORI=4TO20STEP2:LOCATE30,I:PRINTCHR$(154)+CHR$(155):LOCATE30,I+1:PRINTCHR$(155)+CHR$(154);:NEXTI
2220 REM PRINT TABLE SCORE
2230 LOCATE1,0:PRINT"SCORE":LOCATE10,0:PRINT"hi-score"
2240 LOCATE0,1:PRINTSC*100:LOCATE9,1:PRINTHI*100
2250 LOCATE20,0:PRINT"STAGE";LV
2260 LF=LI:IFLF>11THENLF=11
2270 FORA=1TOLF:LOCATE20,1:PRINTSTRING$(LF,126);:NEXTA
2280 LOCATE28,0:PRINTUSING"m=##";V1
2290 LOCATE28,1:PRINTUSING"p=##";V2
2300 '---------------------------
2310 ON LV GOTO 2330,2560,2790
2320 REM BUILD SCENE-1
2330 FORI=4TO10:LOCATE4,I:PRINTCHR$(128):NEXTI
2340 FORI=5TO14:LOCATEI,10:PRINTCHR$(128):NEXTI
2350 FORI=4TO22:LOCATEI,14:PRINTCHR$(128):NEXTI
2360 FORI=4TO10:LOCATE20,I:PRINTCHR$(128):NEXTI
2370 FORI=4TO6:LOCATE14,I:PRINTCHR$(128):NEXTI
2380 FORI=21TO26:LOCATEI,10:PRINTCHR$(128):NEXTI
2390 FORI=15TO18:LOCATE22,I:PRINTCHR$(128):NEXTI
2400 FORI=17TO21:LOCATE11,I:PRINTCHR$(128):NEXTI
2410 FORI=2TO6:LOCATEI,18:PRINTCHR$(128):NEXTI
2420 FORI=26TO29:LOCATEI,18:PRINTCHR$(128):NEXTI
2430 '
2440 REM PUT DOOR & OBJECTS
2450 LOCATE5,6:PRINTCHR$(167)+CHR$(169):LOCATE5,7:PRINTCHR$(168)+CHR$(170)
2460 LOCATE28,19:PRINTCHR$(161)+CHR$(162):LOCATE28,20:PRINTCHR$(163)+CHR$(165):LOCATE28,21:PRINTCHR$(164)+CHR$(166)
2470 LOCATE22,4:PRINTCHR$(171)+CHR$(173):LOCATE22,5:PRINTCHR$(172)+CHR$(174)
2480 LOCATE2,20:PRINTCHR$(171)+CHR$(173):LOCATE2,21:PRINTCHR$(172)+CHR$(174)
2490 LOCATE28,14:PRINTCHR$(167)+CHR$(169):LOCATE28,15:PRINTCHR$(168)+CHR$(170)
2500 LOCATE20,15:PRINTCHR$(167)+CHR$(169):LOCATE20,16:PRINTCHR$(168)+CHR$(170)
2510 LOCATE15,4:PRINTCHR$(167)+CHR$(169):LOCATE15,5:PRINTCHR$(168)+CHR$(170)
2520 LOCATE12,20:PRINTCHR$(171)+CHR$(173):LOCATE12,21:PRINTCHR$(172)+CHR$(174)
2530 GOTO3010
2540 '-------------------------
2550 REM BUILD SCENE-2
2560 FORI=2TO10:LOCATEI,6:PRINTCHR$(128):NEXTI
2570 FORI=4TO12:LOCATE14,I:PRINTCHR$(128):NEXTI
2580 FORI=14TO22:LOCATEI,12:PRINTCHR$(128):NEXTI
2590 FORI=4TO13:LOCATEI,10:PRINTCHR$(128):NEXTI
2600 FORI=4TO16:LOCATEI,17:PRINTCHR$(128):NEXTI
2610 FORI=11TO14:LOCATE8,I:PRINTCHR$(128):NEXTI
2620 FORI=13TO17:LOCATE20,I:PRINTCHR$(128):NEXTI
2630 FORI=21TO26:LOCATEI,17:PRINTCHR$(128):NEXTI
2640 FORI=18TO21:LOCATE10,I:PRINTCHR$(128):NEXTI
2650 FORI=7TO11:LOCATE22,I:PRINTCHR$(128):NEXTI
2660 FORI=25TO29:LOCATEI,10:PRINTCHR$(128):NEXTI
2670 FORI=4TO7:LOCATE25,I:PRINTCHR$(128):NEXTI
2680 REM PUT DOOR & OBJECTS
2690 LOCATE28,4:PRINTCHR$(161)+CHR$(162):LOCATE28,5:PRINTCHR$(163)+CHR$(165):LOCATE28,6:PRINTCHR$(164)+CHR$(166)
2700 LOCATE9,12:PRINTCHR$(167)+CHR$(169):LOCATE9,13:PRINTCHR$(168)+CHR$(170)
2710 LOCATE6,12:PRINTCHR$(171)+CHR$(173):LOCATE6,13:PRINTCHR$(172)+CHR$(174)
2720 LOCATE8,18:PRINTCHR$(171)+CHR$(173):LOCATE8,19:PRINTCHR$(172)+CHR$(174)
2730 LOCATE11,20:PRINTCHR$(167)+CHR$(169):LOCATE11,21:PRINTCHR$(168)+CHR$(170)
2740 LOCATE21,13:PRINTCHR$(167)+CHR$(169):LOCATE21,14:PRINTCHR$(168)+CHR$(170)
2750 LOCATE15,10:PRINTCHR$(171)+CHR$(173):LOCATE15,11:PRINTCHR$(172)+CHR$(174)
2760 GOTO3010
2770 '--------------------------
2780 REM BUILD SCENE-3
2790 FORI=2TO8:LOCATEI,6:PRINTCHR$(128):NEXTI
2800 FORI=4TO12:LOCATE21,I:PRINTCHR$(128):NEXTI
2810 FORI=11TO18:LOCATEI,6:PRINTCHR$(128):NEXTI
2820 FORI=7TO12:LOCATE11,I:PRINTCHR$(128):NEXTI
2830 FORI=5TO11:LOCATEI,12:PRINTCHR$(128):NEXTI
2840 FORI=5TO21:LOCATEI,16:PRINTCHR$(128):NEXTI
2850 FORI=7TO11:LOCATE15,I:PRINTCHR$(128):NEXTI
2860 FORI=22TO26:LOCATEI,12:PRINTCHR$(128):NEXTI
2870 FORI=6TO18:LOCATE26,I:PRINTCHR$(128):NEXTI
2880 FORI=19TO21:LOCATE10,I:PRINTCHR$(128):NEXTI
2890 FORI=17TO19:LOCATE16,I:PRINTCHR$(128):NEXTI
2900 REM PUT DOOR & OBJECTS
2910 LOCATE22,9:PRINTCHR$(161)+CHR$(162):LOCATE22,10:PRINTCHR$(163)+CHR$(165):LOCATE22,11:PRINTCHR$(164)+CHR$(166)
2920 LOCATE16,10:PRINTCHR$(167)+CHR$(169):LOCATE16,11:PRINTCHR$(168)+CHR$(170)
2930 LOCATE12,7:PRINTCHR$(171)+CHR$(173):LOCATE12,8:PRINTCHR$(172)+CHR$(174)
2940 LOCATE8,20:PRINTCHR$(171)+CHR$(173):LOCATE8,21:PRINTCHR$(172)+CHR$(174)
2950 LOCATE17,17:PRINTCHR$(167)+CHR$(169):LOCATE17,18:PRINTCHR$(168)+CHR$(170)
2960 LOCATE24,13:PRINTCHR$(171)+CHR$(173):LOCATE24,14:PRINTCHR$(172)+CHR$(174)
2970 LOCATE2,7:PRINTCHR$(167)+CHR$(169):LOCATE2,8:PRINTCHR$(168)+CHR$(170)
2980 GOTO3010
2990 '---------------------------
3000 REM ROUTINE MOVE 1UP ROOM
3010 X=16:Y=32:SP=8
3020 PUTSPRITE0,(X,Y),5,0*4:PUTSPRITE1,(X,Y),13,1*4
3030 ON INTERVAL=110 GOSUB 4760:INTERVALON
3040 ONSTICK(0)ORSTICK(1)GOSUB3100,3100,3110,3110,3120,3120,3130,3130
3050 IFSTICK(0)ORSTICK(1)>0THENZ=Z+2ANDZ<1
3060 PUTSPRITE0,(X,Y),5,((SP)*4+Z*4):PUTSPRITE1,(X,Y),13,((SP+1)*4+Z*4)
3070 X1=X:Y1=Y
3080 IFSC=>BOTHENBO=BO+500:GOSUB4800
3090 GOTO3040
3100 SP=12:Y=Y-4:GOSUB3150:IFY<32THENY=Y1:RETURNELSERETURN
3110 SP=0:X=X+4:GOSUB3150:IFX>224THENX=X1:RETURNELSERETURN
3120 SP=8:Y=Y+4:GOSUB3150:IFY>160THENY=Y1:RETURNELSERETURN
3130 SP=4:X=X-4:GOSUB3150:IFX<16THENX=X1:RETURNELSERETURN
3140 '
3150 W=6144+INT(INT((Y)/8)*32+(X)/8)
3160 IFVPEEK(W)=128ORVPEEK(W+1)=128ORVPEEK(W+32)=128ORVPEEK(W+33)=128THENX=X1:Y=Y1
3170 IFVPEEK(W)=163ORVPEEK(W+1)=163ORVPEEK(W+32)=163ORVPEEK(W+33)=163THENINTERVALOFF:PUTSPRITE0,,0,63*4:PUTSPRITE1,,0,63*4:Y=PY:X=188:LV=LV+1:GOSUB4890:FORI=0TO500:NEXTI:GOTO280
3180 IFVPEEK(W)=167ORVPEEK(W+1)=167ORVPEEK(W+32)=167ORVPEEK(W+33)=167THENVPOKEW,156:VPOKEW+1,156:VPOKEW+32,156:VPOKEW+33,156:SC=SC+2:LOCATE0,1:PRINTSC*100:V1=V1+1:LOCATE28,0:PRINTUSING"m=##";V1:GOSUB4860
3190 IFVPEEK(W)=171ORVPEEK(W+1)=171ORVPEEK(W+32)=171ORVPEEK(W+33)=171THENVPOKEW,156:VPOKEW+1,156:VPOKEW+32,156:VPOKEW+33,156:SC=SC+1:LOCATE0,1:PRINTSC*100:V2=V2+1:LOCATE28,1:PRINTUSING"p=##";V2:GOSUB4860
3200 RETURN
3210 '----------------------------
3220 REM TAKE LIFT LEFT 1UP
3230 REM OPEN/CLOSE DOOR LIFT
3240 S=0
3250 IFYA=118THENYY=INT(YA/8):YY=YY+3ELSEYY=INT(YA/8):YY=YY+3
3260 XX=INT(XA/8):VPOKE(6144)+YY*32+XX,157:VPOKE(6144)+YY*32+1+XX,159
3270 VPOKE(6144)+YY*32+32+XX,158:VPOKE(6144)+YY*32+33+XX,160
3280 PLAY"","","F#F#A#A#"
3290 FORI=18TO25:PUTSPRITE3,(XA,YA+16),12,I*4:FORK=0TO100:NEXTK:NEXTI
3300 Y=Y-2:PUTSPRITE0,(X,Y),5,((SP)*4+Z):PUTSPRITE1,(X,Y),13,((SP+1)*4+Z):FORK=0TO300:NEXTK:PUTSPRITE0,,0,63*4:PUTSPRITE1,,0,63*4:Y=Y+2
3310 PLAY"","","F#F#B#B#"
3320 FORI=25TO18STEP-1:PUTSPRITE3,(XA,YA+16),12,I*4:FORK=0TO100:NEXTK:NEXTI
3330 IFYA=118THEN3350ELSELOCATEXX,YY+2:PRINTCHR$(32)+CHR$(32)
3340 IFYA=>22THENLOCATEXX,YY+2:PRINTCHR$(32)+CHR$(32)
3350 XX=INT(XA/8):VPOKE(6144)+YY*32+XX,32:VPOKE(6144)+YY*32+1+XX,32
3360 VPOKE(6144)+YY*32+32+XX,32:VPOKE(6144)+YY*32+33+XX,32
3370 REM MOVE LIFT SALITA
3380 IFYA=22THENL=1:GOTO3480
3390 IFL=1THEN3480
3400 FORI=YATOYA-32STEP-1
3410 PUTSPRITE2,(XA,I),5,16*4:PUTSPRITE3,(XA,I+16),12,18*4
3420 CA=CA+1:IFCA=>8THENCA=0:LOCATEXX,YY-1:PRINTCHR$(32)+CHR$(32):YY=YY-1
3430 NEXTI:LOCATEXX,YY-1:PRINTCHR$(32)+CHR$(32)
3440 Y=Y-30:YA=YA-32
3450 LOCATEXX,YY+2:PRINTCHR$(128)+CHR$(128)
3460 GOTO3560
3470 REM MOVE LIFT DISCESA
3480 IFYA=118THENL=0:GOTO3380
3490 FORI=YATOYA+32
3500 PUTSPRITE2,(XA,I),5,16*4:PUTSPRITE3,(XA,I+16),12,18*4
3510 CA=CA+1:IFCA=>8THENCA=0:LOCATEXX,YY-1:PRINTCHR$(141)+CHR$(142):YY=YY+1:REM LOCATEXX,YY-1:PRINTCHR$(141)+CHR$(142)
3520 NEXTI
3530 Y=Y+34:YA=YA+32
3540 IFYA=118THEN3560ELSELOCATEXX,YY+2:PRINTCHR$(128)+CHR$(128)
3550 REM INTERNO LIFT
3560 YY=INT(YA/8):YY=YY+3
3570 XX=INT(XA/8):VPOKE(6144)+YY*32+XX,157:VPOKE(6144)+YY*32+1+XX,159
3580 VPOKE(6144)+YY*32+32+XX,158:VPOKE(6144)+YY*32+33+XX,160
3590 REM OPEN/CLOSE DOOR LIFT
3600 PLAY"","","F#F#A#A#"
3610 FORI=18TO25:PUTSPRITE3,(XA,YA+16),12,I*4:FORK=0TO100:NEXTK:NEXTI
3620 Y=Y-2:PUTSPRITE0,(X,Y),5,((SP)*4+Z):PUTSPRITE1,(X,Y),13,((SP+1)*4+Z):FORK=0TO300:NEXTK
3630 PLAY"","","F#F#B#B#"
3640 FORI=25TO18STEP-1:PUTSPRITE3,(XA,YA+16),12,I*4:FORK=0TO100:NEXTK:NEXTI
3650 REM REMOVE INTERNO LIFT
3660 VPOKE(6144)+YY*32+XX,32:VPOKE(6144)+YY*32+1+XX,32
3670 VPOKE(6144)+YY*32+32+XX,32:VPOKE(6144)+YY*32+33+XX,32
3680 RETURN
3690 REM TAKE LIFT RIGHT 1UP
3700 REM SALITA LIFT LEFT
3710 REM OPEN/CLOSE DOOR LIFT
3720 S=0
3730 IFYB=118THENYZ=INT(YB/8):YZ=YZ+3ELSEYZ=INT(YB/8):YZ=YZ+3
3740 XZ=INT(XB/8):VPOKE(6144)+YZ*32+XZ,157:VPOKE(6144)+YZ*32+1+XZ,159
3750 VPOKE(6144)+YZ*32+32+XZ,158:VPOKE(6144)+YZ*32+33+XZ,160
3760 PLAY"","","F#F#A#A#"
3770 FORI=18TO25:PUTSPRITE5,(XB,YB+16),12,I*4:FORK=0TO100:NEXTK:NEXTI
3780 Y=Y-2:PUTSPRITE0,(X,Y),5,((SP)*4+Z):PUTSPRITE1,(X,Y),13,((SP+1)*4+Z):FORK=0TO300:NEXTK:PUTSPRITE0,,0,63*4:PUTSPRITE1,,0,63*4:Y=Y+2
3790 PLAY"","","F#F#B#B#"
3800 IFYB=118THEN3820ELSELOCATEXZ,YZ+2:PRINTCHR$(32)+CHR$(32)
3810 IFYB=>22THENLOCATEXZ,YZ+2:PRINTCHR$(32)+CHR$(32)
3820 FORI=25TO18STEP-1:PUTSPRITE5,(XB,YB+16),12,I*4:FORK=0TO100:NEXTK:NEXTI
3830 XZ=INT(XB/8):VPOKE(6144)+YZ*32+XZ,32:VPOKE(6144)+YZ*32+1+XZ,32
3840 VPOKE(6144)+YZ*32+32+XZ,32:VPOKE(6144)+YZ*32+33+XZ,32
3850 REM MOVE LIFT SALITA
3860 IFYB=54THENJ=1:GOTO3960
3870 IFJ=1THEN3960
3880 FORI=YBTOYB-32STEP-1
3890 PUTSPRITE4,(XB,I),5,16*4:PUTSPRITE5,(XB,I+16),12,18*4
3900 CA=CA+1:IFCA=>8THENCA=0:LOCATEXZ,YZ:PRINTCHR$(32)+CHR$(32):YZ=YZ-1
3910 NEXTI:IFYB=54THENGOTO3920ELSELOCATEXZ,YZ:PRINTCHR$(32)+CHR$(32):LOCATEXZ,YZ:PRINTCHR$(32)+CHR$(32)
3920 Y=Y-30:YB=YB-32
3930 LOCATEXZ,YZ+2:PRINTCHR$(128)+CHR$(128)
3940 GOTO4040
3950 REM MOVE LIFT DISCESA
3960 IFYB=118THENJ=0:GOTO3860
3970 FORI=YBTOYB+32
3980 PUTSPRITE4,(XB,I),5,16*4:PUTSPRITE5,(XB,I+16),12,18*4
3990 CA=CA+1:IFCA=>8THENCA=0:LOCATEXZ,YZ:PRINTCHR$(141)+CHR$(142):YZ=YZ+1:LOCATEXZ,YZ-2:PRINTCHR$(141)+CHR$(142)
4000 NEXTI:LOCATEXZ,YZ+1:PRINTCHR$(141)+CHR$(142)
4010 Y=Y+34:YB=YB+32
4020 IFYB=118THEN4040ELSELOCATEXZ,YZ+2:PRINTCHR$(128)+CHR$(128)
4030 REM INTERNO LIFT
4040 YZ=INT(YB/8):YZ=YZ+3
4050 XZ=INT(XB/8):VPOKE(6144)+YZ*32+XZ,157:VPOKE(6144)+YZ*32+1+XZ,159
4060 VPOKE(6144)+YZ*32+32+XZ,158:VPOKE(6144)+YZ*32+33+XZ,160
4070 REM OPEN/CLOSE DOOR LIFT
4080 PLAY"","","F#F#A#A#"
4090 FORI=18TO25:PUTSPRITE5,(XB,YB+16),12,I*4:FORK=0TO100:NEXTK:NEXTI
4100 Y=Y-2:PUTSPRITE0,(X,Y),5,((SP)*4+Z):PUTSPRITE1,(X,Y),13,((SP+1)*4+Z):FORK=0TO300:NEXTK
4110 PLAY"","","F#F#B#B#"
4120 FORI=25TO18STEP-1:PUTSPRITE5,(XB,YB+16),12,I*4:FORK=0TO100:NEXTK:NEXTI
4130 REM REMOVE INTERNO LIFT
4140 VPOKE(6144)+YZ*32+XZ,32:VPOKE(6144)+YZ*32+1+XZ,32
4150 VPOKE(6144)+YZ*32+32+XZ,32:VPOKE(6144)+YZ*32+33+XZ,32
4160 RETURN
4170 REM BUSSA TO DOOR
4180 INTERVALOFF:DEFUSR=&H90:A=USR(0):SOUND0,200:SOUND1,10:SOUND13,10:SOUND7,164:SOUND11,200:SOUND12,1:SOUND8,16:FORT=1TO800:NEXTT:DEFUSR=&H90:A=USR(0)
4190 DR=INT(RND(9)*3+1)
4200 IFDR=3THEN4270ELSEGOTO4210
4210 TX=INT(X/8):TY=INT(Y/8):TX=TX+2:TY=TY-1 
4220 VPOKE6144+TY*32+TX,179:VPOKE6144+TY*32+TX+32,180
4230 PLAY"","","V15T100S1M15000L8O2EEO1DD"
4240 FORI=0TO500:NEXTI
4245 PLAY"S0M4000L16O4","S0O2L16","v15s0m4000o4l4"
4250 VPOKE6144+TY*32+TX,32:VPOKE6144+TY*32+TX+32,32
4260 RETURN1680
4270 IFLV>3THENRETURN1690
4280 SOUND1,2:FOR I=255 TO 50 STEP -8:SOUND8,13:SOUND0,I:NEXT:FOR O=10 TO 0 STEP -8:FOR I=50 TO 0 STEP -9:SOUND0,I:NEXT:SOUND8,O:NEXT:SOUND0,0:SOUND1,0
4290 REM animaz. door
4300 DX=INT(X/8):DY=INT(Y/8)
4310 D1=181:D2=183:D3=182:D4=184
4320 FORI=0TO300:NEXTI
4330 VPOKE6144+DY*32+DX,D1+H*4:VPOKE6144+DY*32+DX+1,D2+H*4:VPOKE6144+32+DY*32+DX,D3+H*4:VPOKE6144+32+DY*32+DX+1,D4+H*4
4340 FORI=0TO300:NEXTI
4350 IFH=>0THENPUTSPRITE0,,0,63:PUTSPRITE1,,0,63
4360 H=H+1:IFH=3THEN4380
4370 GOTO4330
4380 VPOKE6144+DY*32+DX,D1+H*4:VPOKE6144+DY*32+DX+1,D2+H*4:VPOKE6144+32+DY*32+DX,D3+H*4:VPOKE6144+32+DY*32+DX+1,D4+H*4
4390 FORI=0TO300:NEXTI
4400 H=H-1:IFH=0THEN4420
4410 GOTO4380
4420 VPOKE6144+DY*32+DX,145:VPOKE6144+DY*32+DX+1,147:VPOKE6144+32+DY*32+DX,146:VPOKE6144+32+DY*32+DX+1,148
4430 FORI=0TO300:NEXTI
4440 REM
4450 REM MOTIVETTO MUSICALE RND
4460 FORI=0TO50
4470 PLAY"V15L64N"+STR$(INT(35*RND(-TIME)+1))
4480 NEXTI
4490 RETURN
4500 REM LAVA INDUMENTI
4510 REM NELLE LAVATRICI
4520 IFRD=1ANDX=48ANDY=136ANDV2>0THENINTERVALOFF:FORI=0TO300:NEXTI:GOTO4560
4530 IFRD=1ANDX=168ANDY=136ANDV1>0THENINTERVALOFF:FORI=0TO300:NEXTI:GOTO4590
4540 IFRD=2ANDX=24ANDY=136ANDV2>0THENINTERVALOFF:FORI=0TO300:NEXTI:GOTO4560
4550 IFRD=2ANDX=200ANDY=136ANDV1>0THENINTERVALOFF:FORI=0TO300:NEXTI:GOTO4590ELSERETURN
4560 V2=V2-1:LOCATE28,1:PRINTUSING"p=##";V2:ID=ID+1:PLAY"V15T200S3M4096L4O4A":FORI=0TO200:NEXTI
4570 IFID=>19THEN4640
4580 IFV2=0THENINTERVALON:RETURNELSEGOTO4560
4590 V1=V1-1:LOCATE28,0:PRINTUSING"m=##";V1:ID=ID+1:PLAY"V15T200S3M4096L4O4A":FORI=0TO200:NEXTI
4600 IFID=>19THEN4640
4610 IFV1=0THENINTERVALON:RETURNELSEGOTO4590
4620 REM COMPLETE STAGE!
4630 REM
4640 CLS:RD=RD+1:GOTO270
4650 END
4660 ' MOTIVETTO MUSICALE
4670 REM M=M+1ANDM<2:ON M GOTO 4680,4690
4680 PLAYM$(1),M$(3)
4690 PLAYM$(2),M$(4):RETURN
4710 REM COMPLETE STAGE!
4720 CLS
4730 IFRD=1THENRD=2:GOTO320ELSEIFRD=2THENRD=1:GOTO920
4740 PLAY"V10T100S2m4096L8O3BO4AO3BO2A#A#A#":RETURN
4750 ' MUSIC BIG ROOM
4760 M=M+1ANDM<2:ON M GOTO 4770,4780
4770 PLAY"V10T100S2M8000L8O3EO4E+O3CO4C+":RETURN
4780 PLAY"V10T100S2M8000L8O3CO4C+O3EO4E+":RETURN
4790 ' MUSIC BONUS EXTRA 1UP
4800 INTERVALOFF:DEFUSR=&H90:A=USR(0)
4810 PLAY"V13t220s1m4689l8O4EEEG+V13ES1BBBO5EV13O4BO4EV10O4BO4EV7O4BO4EEEG+V5O4O5EEEG+","s1m4589l16O4EEEG+V13ES1BBBO5EV13O4BO4EV10O4BO4EV7O4BO4EEEG+V5O4O5EEEG+","s1m4589l16O4EEEG+V13ES1BBBO5EV13O4BO4EV10O4BO4EV7O4BO4EEEG+V5O4O5EEEG+"
4820 LI=LI+1:LF=LI:IFLF>11THENLF=11
4830 LOCATE19+LF,1:PRINTCHR$(126)
4840 INTERVALON:RETURN
4850 REM SFX SOUND!
4860 INTERVALOFF
4870 SOUND 7,63: SOUND 0,141: SOUND 1,14: SOUND 2,20: SOUND 3,7: SOUND 4,163: SOUND 5,3: SOUND 8,16: SOUND 9,16: SOUND 10,16: SOUND 11,56: SOUND 12,94: SOUND 13,0: SOUND 7,56
4880 FORI=0TO800:NEXTI:INTERVALON:DEFUSR=&H90:A=USR(0):RETURN
4890 INTERVALOFF:FORI=0TO300:NEXTI
4900 SOUND 0,170:SOUND 1,15:SOUND 2,190:SOUND 3,15:SOUND 4,200:SOUND 5,15:SOUND 8,16:SOUND 9,16:SOUND 10,16:SOUND 11,250:SOUND 12,250:SOUND 13,9:SOUND 7,&B00111000
4910 FORI=0TO800:NEXTI
4920 DEFUSR=&H90:A=USR(0)
4930 RETURN
4940 FORI=200TO40STEP-60:SOUND8,15:SOUND0,I*RND(0):NEXT:SOUND8,0:RETURN
6000 PLAY"S0M4000L16O4","S0O2L16"
6010 M1$="CR16CR16FER16D"
6020 M2$="DR16DR16GFR16E"
6030 M3$="CCEFAFGE"
6040 M4$="DDFGBGAF"
6050 PLAY M1$,M3$
6060 PLAY M2$,M4$
6070 GOTO6050

first file binary for define sprites and chars

; **********************************************************
 ;  Progetto videogioco WASH MAN (C) DreamQuick Studio 2016
 ; *********************************************************
 ;  WASH MAN v0.58 by AGsoftware 2016
 ;  MODE2IN1.BIN v1.0 by DanySoft
 ; *********************************************************
 ;  Definizione caratteri multicolore e sprites
 ; *********************************************************
 ;  Con modalità BITMAP SCREEN2 in SCREEN1 multicolors
 ; *********************************************************



 .org $C000 - 7

 .db $fe
 .dw startProgram,endProgram,startProgram

startProgram:    

LDIRVM .equ $005c ; routine del BIOS usata per riempire la VRAM
CHGMOD .equ $005f ; routine del BIOS usata per inizializzare lo schermo 
;(V9938)

CHRTBL1 .equ $0100 ; indirizzi tabelle delle forme +32*8
CHRTBL2 .equ $0900
CHRTBL3 .equ $1100

CLRTBL1 .equ $2100 ; indirizzi tabelle del colore +32*8
CLRTBL2 .equ $2900
CLRTBL3 .equ $3100

QTYFONT .equ $0300 ; 96*8 = 96 font

SPRTBL .equ $3800 ; indirizzi tabelle definizione sprites
SPRCLR .equ $1B00 ; indirizzi tabelle colore per sprites scr1



 ; Inizializza i registri del VDP.
writeVDP:

 di
 push af
 push bc
 push de
 push hl



 call $cc ; key off
 

 ;ld a,15 ; colore primo piano(scritte)
 ;ld ($f3e9),a ; indirizzo primo piano(scritte)
 ;ld a,1 ; colore sfondo
 ;ld ($f3ea),a ; indirizzo sfondo


 ld ix,$F3E9
 ld (ix+0),15	; colore primo piano
 ld (ix+1),1	; colore sfondo schermo
 ld (ix+2),1	; colore bordo dello schermo
 call $62		; chiama alla bios rom

;M1 M2 M3 M4 M5  Screen format
;1  0  0  0  0   Text                            (BASIC SCREEN 0)
;0  0  0  0  0   Half text                       (BASIC SCREEN 1)
;0  0  1  0  0   Hi resolution                   (BASIC SCREEN 2)
;0  1  0  0  0   Multicolour                     (BASIC SCREEN 3)
;0  0  0  1  0   Scrn2 with 8 Sprites/Line       (BASIC SCREEN 4)
;0  0  1  1  0   256*212, 16  colours/pixel      (BASIC SCREEN 5)
;0  0  0  0  1   512*212, 4   colours/pixel      (BASIC SCREEN 6)
;0  0  1  0  1   512*212, 16  colours/pixel      (BASIC SCREEN 7)
;0  0  1  1  1   256*212, 256 colours/pixel      (BASIC SCREEN 8)
;1  0  0  1  0   80 column text screen           (BASIC SCREEN0, WIDTH 80)

;Register 0:
;Mode register 0
;bit  Name  Expl.
;0    D     External video input (0=input disable, 1=enable)
;1    M3    Mode M3
;2    M4    Mode M4 (Not on MSX 1)
;3    M5    Mode M5 (Not on MSX 1)
;4    IE1   Horizontal Retrace Interrupt Enable
;5    IE0   Vertical Retrace Interrupt Enable
;6    DG    DiGitize mode
;7    0     Always 0

;Register 1:
;Mode register 1
;bit  Name  Expl.
;0    MAG   Sprite zoom          (0=x1, 1=x2)
;1    SZ    Sprite size          (0=8x8, 1=16x16)
;2    0     Always 0 on MSX 1
;3    M2    Mode M2
;4    M1    Mode M1
;5    IE2   Interrupt control (50Hz (PAL),
;           60 Hz (NTSC) and Light pen/mouse on
;           MVDP colour bus)             (0=Disable, 1=Enable)
;6    BLK   Screen output control        (0=Disable, 1=Enable)
;7    416   VRAM size control            (0=4K, 1=16K)



 ld a,1
 call CHGMOD  ; SCREEN1   
 
 LD HL,$F3B0 ; INDIRIZZO PER WIDTH (numero delle colonne da basic) 
 LD A,32     ; valore per 32 colonne full screen1
 LD (HL),A

;  ld a,1	;screen 1
;  call CHGMOD

 ; VDP(0)=4
 ld a,2
 out ($99),a
 ld a, 0
 or 128
 out ($99),a

 ; SCREEN,2 = VDP(1)=98 = SPRITE16X16
 ld a,98 ;224 ?
 out ($99),a
 ld a,1
 or 128	
 out ($99),a

 ; VDP(4)=3
 ld a,3
 out ($99),a
 ld a,4+128
 out ($99),a

 ; VDP(3)=255
 ld a,255
 out ($99),a
 ld a,3+128
 out ($99),a

 ; VDP(5)=63 for screen 4
 ; VDP(5)=54 for screen 1,2 !!!

 ld a,54
 out ($99),a
 ld a,5
 or 128
 out ($99),a

 ; Imposta la forma dei font
 ld hl,FONT_TBL
 ld de,CHRTBL1
 ld bc,QTYFONT
 call LDIRVM
 ld hl,FONT_TBL
 ld de,CHRTBL2
 ld bc,QTYFONT
 call LDIRVM
 ld hl,FONT_TBL
 ld de,CHRTBL3
 ld bc,QTYFONT
 call LDIRVM

 ; Imposta la tabella colore dei font
 ld hl,COLOR_TBL
 ld de,CLRTBL1
 ld bc,QTYFONT
 call LDIRVM
 ld hl,COLOR_TBL
 ld de,CLRTBL2
 ld bc,QTYFONT
 call LDIRVM
 ld hl,COLOR_TBL
 ld de,CLRTBL3
 ld bc,QTYFONT
 call LDIRVM

; Alloca la forma: 1UP carattere vite in tabella ASCII
 ld hl,LIVES_1UP
 ld de,CHRTBL1+(126*8)-$100
 ld bc,8
 call LDIRVM
 ld hl,LIVES_1UP
 ld de,CHRTBL2+(126*8)-$100
 ld bc,8
 call LDIRVM
 ld hl,LIVES_1UP
 ld de,CHRTBL3+(126*8)-$100
 ld bc,8
 call LDIRVM

; Alloca il colore: 1UP carattere vite in tabella ASCII
 ld hl,LIVES_1UP_COLOR
 ld de,CLRTBL1+(126*8)-$100
 ld bc,8
 call LDIRVM
 ld hl,LIVES_1UP_COLOR
 ld de,CLRTBL2+(126*8)-$100
 ld bc,8 
 call LDIRVM
 ld hl,LIVES_1UP_COLOR
 ld de,CLRTBL3+(126*8)-$100
 ld bc,8
 call LDIRVM

; Alloca la forma: WALL BASIC in tabella ASCII
 ld hl,WALLBASIC
 ld de,CHRTBL1+(128*8)-$100
 ld bc,8
 call LDIRVM
 ld hl,WALLBASIC
 ld de,CHRTBL2+(128*8)-$100
 ld bc,8
 call LDIRVM
 ld hl,WALLBASIC
 ld de,CHRTBL3+(128*8)-$100
 ld bc,8
 call LDIRVM

; Alloca il colore: WALL BASIC in tabella ASCII
 ld hl,WALLBASIC_COLOR
 ld de,CLRTBL1+(128*8)-$100
 ld bc,8
 call LDIRVM
 ld hl,WALLBASIC_COLOR
 ld de,CLRTBL2+(128*8)-$100
 ld bc,8 
 call LDIRVM
 ld hl,WALLBASIC_COLOR
 ld de,CLRTBL3+(128*8)-$100
 ld bc,8
 call LDIRVM

; Alloca la forma di: BRICKS MATTONI in tabella ASCII
 ld hl,BRICKS
 ld de,CHRTBL1+(129*8)-$100
 ld bc,2*8
 call LDIRVM
 ld hl,BRICKS
 ld de,CHRTBL2+(129*8)-$100
 ld bc,2*8
 call LDIRVM
 ld hl,BRICKS
 ld de,CHRTBL3+(129*8)-$100
 ld bc,2*8
 call LDIRVM

; Alloca il colore di: BRICKS MATTONI in tabella ASCII
 ld hl,BRICKS_COLOR
 ld de,CLRTBL1+(129*8)-$100
 ld bc,2*8
 call LDIRVM
 ld hl,BRICKS_COLOR
 ld de,CLRTBL2+(129*8)-$100
 ld bc,2*8
 call LDIRVM
 ld hl,BRICKS_COLOR
 ld de,CLRTBL3+(129*8)-$100
 ld bc,2*8
 call LDIRVM   

; Alloca la forma: WASH MACHINE 1 e 2 lavatrice 1 in tabella ASCII
 ld hl,WASHMACHINES
 ld de,CHRTBL1+(131*8)-$100
 ld bc,8*8
 call LDIRVM
 ld hl,WASHMACHINES
 ld de,CHRTBL2+(131*8)-$100
 ld bc,8*8
 call LDIRVM
 ld hl,WASHMACHINES
 ld de,CHRTBL3+(131*8)-$100
 ld bc,8*8
 call LDIRVM

; Alloca il colore: WASH MACHINE 1 e 2 lavatrice 2 in tabella ASCII
 ld hl,WASHMACHINES_COLOR
 ld de,CLRTBL1+(131*8)-$100
 ld bc,8*8
 call LDIRVM
 ld hl,WASHMACHINES_COLOR
 ld de,CLRTBL2+(131*8)-$100
 ld bc,8*8
 call LDIRVM
 ld hl,WASHMACHINES_COLOR
 ld de,CLRTBL3+(131*8)-$100
 ld bc,8*8
 call LDIRVM
     
;Alloca la forma di: ENGINE LIFT (motore ascensore) in tabella ASCII
 ld hl,ENGINELIFT
 ld de,CHRTBL1+(139*8)-$100
 ld bc,2*8
 call LDIRVM
 ld hl,ENGINELIFT
 ld de,CHRTBL2+(139*8)-$100
 ld bc,2*8
 call LDIRVM
 ld hl,ENGINELIFT
 ld de,CHRTBL3+(139*8)-$100
 ld bc,2*8
 call LDIRVM

;Alloca il colore di: ENGINE LIFT (motore ascensore) in tabella ASCII
 ld hl,ENGINELIFT_COLOR
 ld de,CLRTBL1+(139*8)-$100
 ld bc,2*8
 call LDIRVM
 ld hl,ENGINELIFT_COLOR
 ld de,CLRTBL2+(139*8)-$100
 ld bc,2*8
 call LDIRVM
 ld hl,ENGINELIFT_COLOR
 ld de,CLRTBL3+(139*8)-$100
 ld bc,2*8
 call LDIRVM          
  
; Alloca la forma di: CORDE LIFT ascensore in tabella ASCII
 ld hl,CORDELIFT
 ld de,CHRTBL1+(141*8)-$100
 ld bc,2*8
 call LDIRVM
 ld hl,CORDELIFT
 ld de,CHRTBL2+(141*8)-$100
 ld bc,2*8
 call LDIRVM
 ld hl,CORDELIFT
 ld de,CHRTBL3+(141*8)-$100
 ld bc,2*8
 call LDIRVM

; Alloca il colore di: CORDE LIFT ascensore in tabella ASCII
 ld hl,CORDELIFT_COLOR
 ld de,CLRTBL1+(141*8)-$100
 ld bc,2*8
 call LDIRVM
 ld hl,CORDELIFT_COLOR
 ld de,CLRTBL2+(141*8)-$100
 ld bc,2*8
 call LDIRVM
 ld hl,CORDELIFT_COLOR
 ld de,CLRTBL3+(141*8)-$100
 ld bc,2*8
 call LDIRVM          
 
; Alloca la forma di: DOOR ROOM TOP (porta TOP scritta ROOM) in tabella ASCII
 ld hl,DOORROOMTOP
 ld de,CHRTBL1+(143*8)-$100
 ld bc,2*8
 call LDIRVM
 ld hl,DOORROOMTOP
 ld de,CHRTBL2+(143*8)-$100
 ld bc,2*8
 call LDIRVM
 ld hl,DOORROOMTOP
 ld de,CHRTBL3+(143*8)-$100
 ld bc,2*8
 call LDIRVM

; Alloca il colore di: DOOR ROOM TOP (porta TOP scritta ROOM) in tabella ASCII
 ld hl,DOORROOMTOP_COLOR
 ld de,CLRTBL1+(143*8)-$100
 ld bc,2*8
 call LDIRVM
 ld hl,DOORROOMTOP_COLOR
 ld de,CLRTBL2+(143*8)-$100
 ld bc,2*8
 call LDIRVM
 ld hl,DOORROOMTOP_COLOR
 ld de,CLRTBL3+(143*8)-$100
 ld bc,2*8
 call LDIRVM   
 
; Alloca la forma di: DOOR ROOM (porta stanza base) in tabella ASCII
 ld hl,DOORROOM
 ld de,CHRTBL1+(145*8)-$100
 ld bc,4*8
 call LDIRVM
 ld hl,DOORROOM
 ld de,CHRTBL2+(145*8)-$100
 ld bc,4*8
 call LDIRVM
 ld hl,DOORROOM
 ld de,CHRTBL3+(145*8)-$100
 ld bc,4*8
 call LDIRVM

; Alloca il colore di: DOOR ROOM (porta stanza base) in tabella ASCII
 ld hl,DOORROOM_COLOR
 ld de,CLRTBL1+(145*8)-$100
 ld bc,4*8
 call LDIRVM
 ld hl,DOORROOM_COLOR
 ld de,CLRTBL2+(145*8)-$100
 ld bc,4*8
 call LDIRVM
 ld hl,DOORROOM_COLOR
 ld de,CLRTBL3+(145*8)-$100
 ld bc,4*8
 call LDIRVM   
 
;Alloca la forma di: UMBRELLA (ombrello) in tabella ASCII
 ld hl,UMBRELLA
 ld de,CHRTBL1+(149*8)-$100
 ld bc,4*8
 call LDIRVM
 ld hl,UMBRELLA
 ld de,CHRTBL2+(149*8)-$100
 ld bc,4*8
 call LDIRVM
 ld hl,UMBRELLA
 ld de,CHRTBL3+(149*8)-$100
 ld bc,4*8
 call LDIRVM

;Alloca il colore di: UMBRELLA (ombrello) in tabella ASCII
 ld hl,UMBRELLA_COLOR
 ld de,CLRTBL1+(149*8)-$100
 ld bc,4*8
 call LDIRVM
 ld hl,UMBRELLA_COLOR
 ld de,CLRTBL2+(149*8)-$100
 ld bc,4*8
 call LDIRVM
 ld hl,UMBRELLA_COLOR
 ld de,CLRTBL3+(149*8)-$100
 ld bc,4*8
 call LDIRVM   
 
;Alloca la forma di: MATTONE GREZZO (contorno per grande stanza) in tabella ASCII
 ld hl,MATTONEGREZZO
 ld de,CHRTBL1+(154*8)-$100
 ld bc,2*8
 call LDIRVM
 ld hl,MATTONEGREZZO
 ld de,CHRTBL2+(154*8)-$100
 ld bc,2*8
 call LDIRVM
 ld hl,MATTONEGREZZO
 ld de,CHRTBL3+(154*8)-$100
 ld bc,2*8
 call LDIRVM

;Alloca il colore di: MATTONE GREZZO (contorno per grande stanza) in tabella ASCII
 ld hl,MATTONEGREZZO_COLOR
 ld de,CLRTBL1+(154*8)-$100
 ld bc,2*8
 call LDIRVM
 ld hl,MATTONEGREZZO_COLOR
 ld de,CLRTBL2+(154*8)-$100
 ld bc,2*8
 call LDIRVM
 ld hl,MATTONEGREZZO_COLOR
 ld de,CLRTBL3+(154*8)-$100
 ld bc,2*8
 call LDIRVM   

; Alloca la forma di: WALL BACKGROUND (mattone di base per sfondo) in tabella ASCII
 ld hl,WALLBACKGROUND
 ld de,CHRTBL1+(156*8)-$100
 ld bc,8
 call LDIRVM
 ld hl,WALLBACKGROUND
 ld de,CHRTBL2+(156*8)-$100
 ld bc,8
 call LDIRVM
 ld hl,WALLBACKGROUND
 ld de,CHRTBL3+(156*8)-$100
 ld bc,8
 call LDIRVM

; Alloca il colore di: WALL BACKGROUND (mattone di base per sfondo) in tabella ASCII
 ld hl,WALLBACKGROUND_COLOR
 ld de,CLRTBL1+(156*8)-$100
 ld bc,8
 call LDIRVM
 ld hl,WALLBACKGROUND_COLOR
 ld de,CLRTBL2+(156*8)-$100
 ld bc,8
 call LDIRVM
 ld hl,WALLBACKGROUND_COLOR
 ld de,CLRTBL3+(156*8)-$100
 ld bc,8
 call LDIRVM         

; Alloca la forma di: INTERNO LIFT ASCENSORE in tabella ASCII
 ld hl,INTERNOLIFT
 ld de,CHRTBL1+(157*8)-$100
 ld bc,4*8
 call LDIRVM
 ld hl,INTERNOLIFT
 ld de,CHRTBL2+(157*8)-$100
 ld bc,4*8
 call LDIRVM
 ld hl,INTERNOLIFT
 ld de,CHRTBL3+(157*8)-$100
 ld bc,4*8
 call LDIRVM

; Alloca il colore di: INTERNO LIFT ASCENSORE colore GIALLO in tabella ASCII
 ld hl,INTERNOLIFT_COLOR
 ld de,CLRTBL1+(157*8)-$100
 ld bc,4*8
 call LDIRVM
 ld hl,INTERNOLIFT_COLOR
 ld de,CLRTBL2+(157*8)-$100
 ld bc,4*8
 call LDIRVM
 ld hl,INTERNOLIFT_COLOR
 ld de,CLRTBL3+(157*8)-$100
 ld bc,4*8
 call LDIRVM  
 

; Alloca la forma di: DOOR BIG ROOM TOP STANZA INTERNA in tabella ASCII
 ld hl,DOORBIGROOMTOP
 ld de,CHRTBL1+(161*8)-$100
 ld bc,2*8
 call LDIRVM
 ld hl,DOORBIGROOMTOP
 ld de,CHRTBL2+(161*8)-$100
 ld bc,2*8
 call LDIRVM
 ld hl,DOORBIGROOMTOP
 ld de,CHRTBL3+(161*8)-$100
 ld bc,2*8
 call LDIRVM

; Alloca il colore di: DOOR BIG ROOM TOP STANZA INTERNA 
; colore GIALLO in tabella ASCII
 ld hl,DOORBIGROOMTOP_COLOR
 ld de,CLRTBL1+(161*8)-$100
 ld bc,2*8
 call LDIRVM
 ld hl,DOORBIGROOMTOP_COLOR
 ld de,CLRTBL2+(161*8)-$100
 ld bc,2*8
 call LDIRVM
 ld hl,DOORBIGROOMTOP_COLOR
 ld de,CLRTBL3+(161*8)-$100
 ld bc,2*8
 call LDIRVM   

; Alloca la forma di: DOOR EXIT BIG ROOM STANZA INTERNA in tabella ASCII
 ld hl,DOORBIGROOM
 ld de,CHRTBL1+(163*8)-$100
 ld bc,4*8
 call LDIRVM
 ld hl,DOORBIGROOM
 ld de,CHRTBL2+(163*8)-$100
 ld bc,4*8
 call LDIRVM
 ld hl,DOORBIGROOM
 ld de,CHRTBL3+(163*8)-$100
 ld bc,4*8
 call LDIRVM

; Alloca il colore di: DOOR EXIT BIG ROOM STANZA INTERNA 
; colore GIALLO MULTICOLORE in tabella ASCII
 ld hl,DOORBIGROOM_COLOR
 ld de,CLRTBL1+(163*8)-$100
 ld bc,4*8
 call LDIRVM
 ld hl,DOORBIGROOM_COLOR
 ld de,CLRTBL2+(163*8)-$100
 ld bc,4*8
 call LDIRVM
 ld hl,DOORBIGROOM_COLOR
 ld de,CLRTBL3+(163*8)-$100
 ld bc,4*8
 call LDIRVM   
 
; Alloca la forma di: MAGLIETTA VESTITO in tabella ASCII
 ld hl,MAGLIETTA
 ld de,CHRTBL1+(167*8)-$100
 ld bc,4*8
 call LDIRVM
 ld hl,MAGLIETTA
 ld de,CHRTBL2+(167*8)-$100
 ld bc,4*8
 call LDIRVM
 ld hl,MAGLIETTA
 ld de,CHRTBL3+(167*8)-$100
 ld bc,4*8
 call LDIRVM

; Alloca il colore di: MAGLIETTA VESTITO 
; colore ROSSO CHIARO MULTICOLORE in tabella ASCII
 ld hl,MAGLIETTA_COLOR
 ld de,CLRTBL1+(167*8)-$100                                                         
 ld bc,4*8
 call LDIRVM
 ld hl,MAGLIETTA_COLOR
 ld de,CLRTBL2+(167*8)-$100
 ld bc,4*8
 call LDIRVM
 ld hl,MAGLIETTA_COLOR
 ld de,CLRTBL3+(167*8)-$100
 ld bc,4*8
 call LDIRVM   

; Alloca la forma di: PANTALONI VESTITO in tabella ASCII
 ld hl,PANTALONI
 ld de,CHRTBL1+(171*8)-$100
 ld bc,4*8
 call LDIRVM
 ld hl,PANTALONI
 ld de,CHRTBL2+(171*8)-$100
 ld bc,4*8
 call LDIRVM
 ld hl,PANTALONI
 ld de,CHRTBL3+(171*8)-$100
 ld bc,4*8
 call LDIRVM

; Alloca il colore di: PANTALONI VESTITO 
; colore AZZURRO MULTICOLORE in tabella ASCII
 ld hl,PANTALONI_COLOR
 ld de,CLRTBL1+(171*8)-$100
 ld bc,4*8
 call LDIRVM
 ld hl,PANTALONI_COLOR
 ld de,CLRTBL2+(171*8)-$100
 ld bc,4*8
 call LDIRVM
 ld hl,PANTALONI_COLOR
 ld de,CLRTBL3+(171*8)-$100
 ld bc,4*8
 call LDIRVM   
 
; Alloca la forma di: COLONNA in tabella ASCII 
; per 4 caratteri
 ld hl,COLONNA
 ld de,CHRTBL1+(175*8)-$100
 ld bc,4*8
 call LDIRVM
 ld hl,COLONNA
 ld de,CHRTBL2+(175*8)-$100
 ld bc,4*8
 call LDIRVM
 ld hl,COLONNA
 ld de,CHRTBL3+(175*8)-$100
 ld bc,4*8
 call LDIRVM

; Alloca il colore di: COLONNA colore grigio in tabella ASCII 
; per 4 caratteri
 ld hl,COLONNA_COLOR
 ld de,CLRTBL1+(175*8)-$100
 ld bc,4*8
 call LDIRVM
 ld hl,COLONNA_COLOR
 ld de,CLRTBL2+(175*8)-$100
 ld bc,4*8
 call LDIRVM
 ld hl,COLONNA_COLOR
 ld de,CLRTBL3+(175*8)-$100
 ld bc,4*8
 call LDIRVM    
 
; Alloca la forma di: MINI MOUSE PORTA in tabella ASCII 
; per 2 caratteri
 ld hl,MINIMOUSE
 ld de,CHRTBL1+(179*8)-$100
 ld bc,2*8
 call LDIRVM
 ld hl,MINIMOUSE
 ld de,CHRTBL2+(179*8)-$100
 ld bc,2*8
 call LDIRVM
 ld hl,MINIMOUSE
 ld de,CHRTBL3+(179*8)-$100
 ld bc,2*8
 call LDIRVM

; Alloca il colore di: MINI MOUSE PORTA colore grigio in tabella ASCII 
; per 2 caratteri
 ld hl,MINIMOUSE_COLOR
 ld de,CLRTBL1+(179*8)-$100
 ld bc,2*8
 call LDIRVM
 ld hl,MINIMOUSE_COLOR
 ld de,CLRTBL2+(179*8)-$100
 ld bc,2*8
 call LDIRVM
 ld hl,MINIMOUSE_COLOR
 ld de,CLRTBL3+(179*8)-$100
 ld bc,2*8
 call LDIRVM    
       
; Alloca la forma di: ANIMAZIONE PORTA in tabella ASCII 
; per 16 caratteri
 ld hl,ANIMAZIONE_PORTA
 ld de,CHRTBL1+(181*8)-$100
 ld bc,16*8
 call LDIRVM
 ld hl,ANIMAZIONE_PORTA
 ld de,CHRTBL2+(181*8)-$100
 ld bc,16*8
 call LDIRVM
 ld hl,ANIMAZIONE_PORTA
 ld de,CHRTBL3+(181*8)-$100
 ld bc,16*8
 call LDIRVM

; Alloca il colore di: ANIMAZIONE PORTA colore VERDE N.2 in tabella ASCII 
; per 16 caratteri
 ld hl,ANIMAZIONE_PORTA_COLOR
 ld de,CLRTBL1+(181*8)-$100
 ld bc,16*8
 call LDIRVM
 ld hl,ANIMAZIONE_PORTA_COLOR
 ld de,CLRTBL2+(181*8)-$100
 ld bc,16*8
 call LDIRVM
 ld hl,ANIMAZIONE_PORTA_COLOR
 ld de,CLRTBL3+(181*8)-$100
 ld bc,16*8
 call LDIRVM    
 
 
 
; Alloca la forma degli sprite
 ld hl,SPRDEF
 ld de,SPRTBL
 ld bc,32*36
 call LDIRVM 

;
 ld a,$6A
 ld hl,$27F8	;255x8 redraw giallo "COLORE CURSORE"
 ld bc,8
 call $56
 
 ld a,$6a
 ld hl,$2FF8
 ld bc,8
 call $56
 
 ld a,$6a
 ld hl,$37F8
 ld bc,8
 call $56
;
 pop hl
 pop de
 pop bc
 pop af
 ei
 ret ; torna al basic


FONT_TBL:
 ; Forma font 1o Set
 .db 000h,000h,000h,000h,000h,000h,000h,000h,018h,03Ch,03Ch,03Ch,018h,000h,018h,000h
 .db 06Ch,06Ch,048h,000h,000h,000h,000h,000h,06Ch,0FEh,06Ch,06Ch,06Ch,0FEh,06Ch,000h
 .db 018h,03Eh,058h,03Ch,01Ah,07Ch,018h,000h,000h,0C6h,0CCh,018h,030h,066h,0C6h,000h
 .db 070h,0C8h,0C8h,070h,09Ah,08Ch,076h,000h,018h,018h,010h,000h,000h,000h,000h,000h

 .db 00Ch,018h,030h,030h,030h,018h,00Ch,000h,030h,018h,00Ch,00Ch,00Ch,018h,030h,000h
 .db 000h,018h,05Ah,03Ch,03Ch,05Ah,018h,000h,000h,018h,018h,07Eh,018h,018h,000h,000h
 .db 000h,000h,000h,000h,018h,018h,008h,010h,000h,000h,000h,07Ch,000h,000h,000h,000h
 .db 000h,000h,000h,000h,000h,018h,018h,000h,000h,006h,00Ch,018h,030h,060h,0C0h,000h

 .db 038h,04Ch,0C6h,0C6h,0C6h,064h,038h,000h,018h,038h,018h,018h,018h,018h,07Eh,000h
 .db 07Ch,0C6h,00Eh,03Ch,078h,0E0h,0FEh,000h,07Eh,00Ch,018h,03Ch,006h,0C6h,07Ch,000h
 .db 01Ch,03Ch,06Ch,0CCh,0FEh,00Ch,00Ch,000h,0FCh,0C0h,0FCh,006h,006h,0C6h,07Ch,000h
 .db 03Ch,060h,0C0h,0FCh,0C6h,0C6h,07Ch,000h,0FEh,0C6h,00Ch,018h,030h,030h,030h,000h

 .db 07Ch,0C6h,0C6h,07Ch,0C6h,0C6h,07Ch,000h,07Ch,0C6h,0C6h,07Eh,006h,00Ch,078h,000h
 .db 000h,018h,018h,000h,018h,018h,000h,000h,000h,018h,018h,000h,018h,018h,008h,010h
 .db 00Ch,018h,030h,060h,030h,018h,00Ch,000h,000h,000h,07Ch,000h,07Ch,000h,000h,000h
 .db 060h,030h,018h,00Ch,018h,030h,060h,000h,07Ch,0C6h,006h,01Ch,030h,000h,030h,000h

 .db 03Ch,042h,099h,0A1h,0A1h,099h,042h,03Ch,038h,06Ch,0C6h,0C6h,0FEh,0C6h,0C6h,000h
 .db 0FCh,0C6h,0C6h,0FCh,0C6h,0C6h,0FCh,000h,03Ch,066h,0C0h,0C0h,0C0h,066h,03Ch,000h
 .db 0F8h,0CCh,0C6h,0C6h,0C6h,0CCh,0F8h,000h,0FEh,0C0h,0C0h,0F8h,0C0h,0C0h,0FEh,000h
 .db 0FEh,0C0h,0C0h,0F8h,0C0h,0C0h,0C0h,000h,03Eh,060h,0C0h,0CEh,0C6h,066h,03Eh,000h

 .db 0C6h,0C6h,0C6h,0FEh,0C6h,0C6h,0C6h,000h,07Eh,018h,018h,018h,018h,018h,07Eh,000h
 .db 006h,006h,006h,006h,006h,0C6h,07Ch,000h,0C6h,0CCh,0D8h,0F0h,0F8h,0DCh,0CEh,000h
 .db 0C0h,0C0h,0C0h,0C0h,0C0h,0C0h,0FEh,000h,0C6h,0EEh,0FEh,0FEh,0D6h,0C6h,0C6h,000h
 .db 0C6h,0E6h,0F6h,0FEh,0DEh,0CEh,0C6h,000h,07Ch,0C6h,0C6h,0C6h,0C6h,0C6h,07Ch,000h

 .db 0FCh,0C6h,0C6h,0C6h,0FCh,0C0h,0C0h,000h,07Ch,0C6h,0C6h,0C6h,0DEh,0CCh,076h,000h
 .db 0FCh,0C6h,0C6h,0CEh,0F8h,0DCh,0CEh,000h,078h,0CCh,0C0h,07Ch,006h,0C6h,07Ch,000h
 .db 07Eh,018h,018h,018h,018h,018h,018h,000h,0C6h,0C6h,0C6h,0C6h,0C6h,0C6h,07Ch,000h
 .db 0C6h,0C6h,0C6h,0EEh,07Ch,038h,010h,000h,0C6h,0C6h,0D6h,0FEh,0FEh,06Ch,044h,000h

 .db 0C6h,0EEh,07Ch,038h,07Ch,0EEh,0C6h,000h,066h,066h,066h,03Ch,018h,018h,018h,000h
 .db 0FEh,00Eh,01Ch,038h,070h,0E0h,0FEh,000h,0F8h,0C0h,0C0h,0C0h,0C0h,0C0h,0F8h,000h
 .db 000h,080h,040h,020h,010h,008h,000h,000h,0F8h,018h,018h,018h,018h,018h,0F8h,000h
 .db 000h,000h,020h,050h,088h,000h,000h,000h,000h,000h,000h,000h,000h,000h,000h,0F8h

 ; Forma font 2o Set
 .db 03ch,042h,099h,0a1h,0a1h,099h,042h,03ch,038h,06ch,0c6h,0c6h,0feh,0c6h,0c6h,000h
 .db 0fch,0c6h,0c6h,0fch,0c6h,0c6h,0fch,000h,03ch,066h,0c0h,0c0h,0c0h,066h,03ch,000h
 .db 0f8h,0cch,0c6h,0c6h,0c6h,0cch,0f8h,000h,0feh,0c0h,0c0h,0f8h,0c0h,0c0h,0feh,000h
 .db 0feh,0c0h,0c0h,0f8h,0c0h,0c0h,0c0h,000h,03eh,060h,0c0h,0ceh,0c6h,066h,03eh,000h

 .db 0c6h,0c6h,0c6h,0feh,0c6h,0c6h,0c6h,000h,07eh,018h,018h,018h,018h,018h,07eh,000h
 .db 006h,006h,006h,006h,006h,0c6h,07ch,000h,0c6h,0cch,0d8h,0f0h,0f8h,0dch,0ceh,000h
 .db 0c0h,0c0h,0c0h,0c0h,0c0h,0c0h,0feh,000h,0c6h,0eeh,0feh,0feh,0d6h,0c6h,0c6h,000h
 .db 0c6h,0e6h,0f6h,0feh,0deh,0ceh,0c6h,000h,07ch,0c6h,0c6h,0c6h,0c6h,0c6h,07ch,000h
                                                                           
 .db 0fch,0c6h,0c6h,0c6h,0fch,0c0h,0c0h,000h,07ch,0c6h,0c6h,0c6h,0deh,0cch,076h,000h
 .db 0fch,0c6h,0c6h,0ceh,0f8h,0dch,0ceh,000h,078h,0cch,0c0h,07ch,006h,0c6h,07ch,000h
 .db 07eh,018h,018h,018h,018h,018h,018h,000h,0c6h,0c6h,0c6h,0c6h,0c6h,0c6h,07ch,000h
 .db 0c6h,0c6h,0c6h,0eeh,07ch,038h,010h,000h,0c6h,0c6h,0d6h,0feh,0feh,06ch,044h,000h
                                                                           
 .db 0c6h,0eeh,07ch,038h,07ch,0eeh,0c6h,000h,066h,066h,066h,03ch,018h,018h,018h,000h
 .db 0feh,00eh,01ch,038h,070h,0e0h,0feh,000h,0f8h,0c0h,0c0h,0c0h,0c0h,0c0h,0f8h,000h
 .db 000h,080h,040h,020h,010h,008h,000h,000h,0f8h,018h,018h,018h,018h,018h,0f8h,000h
 .db 000h,000h,020h,050h,088h,000h,000h,000h,000h,000h,000h,000h,000h,000h,000h,0f8h
                                                                           
COLOR_TBL:

 ; Colore font 1o Set (sfumatura blu)
 .db 040h,050h,070h,070h,0f0h,0f0h,0f0h,0f0h,040h,050h,070h,070h,0f0h,0f0h,0f0h,0f0h
 .db 040h,050h,070h,070h,0f0h,0f0h,0f0h,0f0h,040h,050h,070h,070h,0f0h,0f0h,0f0h,0f0h
 .db 040h,050h,070h,070h,0f0h,0f0h,0f0h,0f0h,040h,050h,070h,070h,0f0h,0f0h,0f0h,0f0h
 .db 040h,050h,070h,070h,0f0h,0f0h,0f0h,0f0h,040h,050h,070h,070h,0f0h,0f0h,0f0h,0f0h

 .db 040h,050h,070h,070h,0f0h,0f0h,0f0h,0f0h,040h,050h,070h,070h,0f0h,0f0h,0f0h,0f0h
 .db 040h,050h,070h,070h,0f0h,0f0h,0f0h,0f0h,040h,050h,070h,070h,0f0h,0f0h,0f0h,0f0h
 .db 040h,050h,070h,070h,0f0h,0f0h,0f0h,0f0h,040h,050h,070h,070h,0f0h,0f0h,0f0h,0f0h
 .db 040h,050h,070h,070h,0f0h,0f0h,0f0h,0f0h,040h,050h,070h,070h,0f0h,0f0h,0f0h,0f0h

 .db 040h,050h,070h,070h,0f0h,0f0h,0f0h,0f0h,040h,050h,070h,070h,0f0h,0f0h,0f0h,0f0h
 .db 040h,050h,070h,070h,0f0h,0f0h,0f0h,0f0h,040h,050h,070h,070h,0f0h,0f0h,0f0h,0f0h
 .db 040h,050h,070h,070h,0f0h,0f0h,0f0h,0f0h,040h,050h,070h,070h,0f0h,0f0h,0f0h,0f0h
 .db 040h,050h,070h,070h,0f0h,0f0h,0f0h,0f0h,040h,050h,070h,070h,0f0h,0f0h,0f0h,0f0h

 .db 040h,050h,070h,070h,0f0h,0f0h,0f0h,0f0h,040h,050h,070h,070h,0f0h,0f0h,0f0h,0f0h
 .db 040h,050h,070h,070h,0f0h,0f0h,0f0h,0f0h,040h,050h,070h,070h,0f0h,0f0h,0f0h,0f0h
 .db 040h,050h,070h,070h,0f0h,0f0h,0f0h,0f0h,040h,050h,070h,070h,0f0h,0f0h,0f0h,0f0h
 .db 040h,050h,070h,070h,0f0h,0f0h,0f0h,0f0h,040h,050h,070h,070h,0f0h,0f0h,0f0h,0f0h

 .db 040h,050h,070h,070h,0f0h,0f0h,0f0h,0f0h,040h,050h,070h,070h,0f0h,0f0h,0f0h,0f0h
 .db 040h,050h,070h,070h,0f0h,0f0h,0f0h,0f0h,040h,050h,070h,070h,0f0h,0f0h,0f0h,0f0h
 .db 040h,050h,070h,070h,0f0h,0f0h,0f0h,0f0h,040h,050h,070h,070h,0f0h,0f0h,0f0h,0f0h
 .db 040h,050h,070h,070h,0f0h,0f0h,0f0h,0f0h,040h,050h,070h,070h,0f0h,0f0h,0f0h,0f0h

 .db 040h,050h,070h,070h,0f0h,0f0h,0f0h,0f0h,040h,050h,070h,070h,0f0h,0f0h,0f0h,0f0h
 .db 040h,050h,070h,070h,0f0h,0f0h,0f0h,0f0h,040h,050h,070h,070h,0f0h,0f0h,0f0h,0f0h
 .db 040h,050h,070h,070h,0f0h,0f0h,0f0h,0f0h,040h,050h,070h,070h,0f0h,0f0h,0f0h,0f0h
 .db 040h,050h,070h,070h,0f0h,0f0h,0f0h,0f0h,040h,050h,070h,070h,0f0h,0f0h,0f0h,0f0h

 .db 040h,050h,070h,070h,0f0h,0f0h,0f0h,0f0h,040h,050h,070h,070h,0f0h,0f0h,0f0h,0f0h
 .db 040h,050h,070h,070h,0f0h,0f0h,0f0h,0f0h,040h,050h,070h,070h,0f0h,0f0h,0f0h,0f0h
 .db 040h,050h,070h,070h,0f0h,0f0h,0f0h,0f0h,040h,050h,070h,070h,0f0h,0f0h,0f0h,0f0h
 .db 040h,050h,070h,070h,0f0h,0f0h,0f0h,0f0h,040h,050h,070h,070h,0f0h,0f0h,0f0h,0f0h

 .db 040h,050h,070h,070h,0f0h,0f0h,0f0h,0f0h,040h,050h,070h,070h,0f0h,0f0h,0f0h,0f0h
 .db 040h,050h,070h,070h,0f0h,0f0h,0f0h,0f0h,040h,050h,070h,070h,0f0h,0f0h,0f0h,0f0h
 .db 040h,050h,070h,070h,0f0h,0f0h,0f0h,0f0h,040h,050h,070h,070h,0f0h,0f0h,0f0h,0f0h
 .db 040h,050h,070h,070h,0f0h,0f0h,0f0h,0f0h,040h,050h,070h,070h,0f0h,0f0h,0f0h,0f0h

 ; Colore font 2o Set (sfumatura rossa)
 .db 060h,080h,090h,090h,0f0h,0f0h,0f0h,0f0h,060h,080h,090h,090h,0f0h,0f0h,0f0h,0f0h
 .db 060h,080h,090h,090h,0f0h,0f0h,0f0h,0f0h,060h,080h,090h,090h,0f0h,0f0h,0f0h,0f0h
 .db 060h,080h,090h,090h,0f0h,0f0h,0f0h,0f0h,060h,080h,090h,090h,0f0h,0f0h,0f0h,0f0h
 .db 060h,080h,090h,090h,0f0h,0f0h,0f0h,0f0h,060h,080h,090h,090h,0f0h,0f0h,0f0h,0f0h

 .db 060h,080h,090h,090h,0f0h,0f0h,0f0h,0f0h,060h,080h,090h,090h,0f0h,0f0h,0f0h,0f0h
 .db 060h,080h,090h,090h,0f0h,0f0h,0f0h,0f0h,060h,080h,090h,090h,0f0h,0f0h,0f0h,0f0h
 .db 060h,080h,090h,090h,0f0h,0f0h,0f0h,0f0h,060h,080h,090h,090h,0f0h,0f0h,0f0h,0f0h
 .db 060h,080h,090h,090h,0f0h,0f0h,0f0h,0f0h,060h,080h,090h,090h,0f0h,0f0h,0f0h,0f0h

 .db 060h,080h,090h,090h,0f0h,0f0h,0f0h,0f0h,060h,080h,090h,090h,0f0h,0f0h,0f0h,0f0h
 .db 060h,080h,090h,090h,0f0h,0f0h,0f0h,0f0h,060h,080h,090h,090h,0f0h,0f0h,0f0h,0f0h
 .db 060h,080h,090h,090h,0f0h,0f0h,0f0h,0f0h,060h,080h,090h,090h,0f0h,0f0h,0f0h,0f0h
 .db 060h,080h,090h,090h,0f0h,0f0h,0f0h,0f0h,060h,080h,090h,090h,0f0h,0f0h,0f0h,0f0h

 .db 060h,080h,090h,090h,0f0h,0f0h,0f0h,0f0h,060h,080h,090h,090h,0f0h,0f0h,0f0h,0f0h
 .db 060h,080h,090h,090h,0f0h,0f0h,0f0h,0f0h,060h,080h,090h,090h,0f0h,0f0h,0f0h,0f0h
 .db 060h,080h,090h,090h,0f0h,0f0h,0f0h,0f0h,060h,080h,090h,090h,0f0h,0f0h,0f0h,0f0h
 .db 060h,080h,090h,090h,0f0h,0f0h,0f0h,0f0h,060h,080h,090h,090h,0f0h,0f0h,0f0h,0f0h

; Altri oggetti allocabili in tabella ASCII

LIVES_1UP:
  .DB 112,252,250,232,252,252,120,112
LIVES_1UP_COLOR:  ; pink multicolor 
  .DB  80,80,80,208,208,208,208,80
WALLBASIC:
  .DB 0,251,251,251,0,127,127,127
WALLBASIC_COLOR:  ; green multicolor
  .DB 206,206,62,62,206,206,62,62

; BRICKS (MATTONI)
BRICKS:
  .DB $15,$00,$55,$0A,$55,$2A,$15,$00
  .DB $54,$AA,$54,$AA,$5E,$AE,$FC,$00
BRICKS_COLOR:
  .DB 96,96,96,96,96,96,96,96
  .DB 96,96,96,96,96,96,96,96
; WASH MACHINES
WASHMACHINES:
; WASH MACHINE 1
  .DB $3F,$55,$AA,$FF,$8D,$FD,$8D,$FF
  .DB $E0,$DF,$BF,$BF,$BF,$DF,$E0,$FF
  .DB $FF,$55,$AB,$FD,$5B,$7D,$5B,$FD
  .DB $7B,$BD,$DB,$DD,$DB,$BD,$7A,$FC
; WASH MACHINE 2
  .DB $3F,$55,$AA,$FF,$8D,$FD,$8D,$FF
  .DB $E0,$CA,$94,$A8,$80,$C0,$E0,$FF
  .DB $FF,$55,$AB,$FD,$5B,$7D,$5B,$FD
  .DB $7B,$3D,$1B,$1D,$1B,$3D,$7A,$FC 
WASHMACHINES_COLOR:
; WASHMACHINE 1
  .DB 95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95
  .DB 95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95
; WASHMACHINE 2 
  .DB 159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159
  .DB 159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159
; ENGINE LIFT (motore ascensore)
ENGINELIFT:
  .DB $00,$3F,$62,$7E,$62,$7E,$3F,$08
  .DB $00,$F8,$BC,$A4,$A4,$BC,$F8,$10
ENGINELIFT_COLOR:
  .DB 64,64,64,64,64,64,64,64
  .DB 64,64,64,64,64,64,64,64
; Corde LIFT ascensore 
CORDELIFT:
  .DB $08,$08,$08,$08,$08,$08,$08,$08
  .DB $10,$10,$10,$10,$10,$10,$10,$10
; colore Corde LIFT ascensore
CORDELIFT_COLOR:
  .DB 64,64,64,64,64,64,64,64
  .DB 64,64,64,64,64,64,64,64
; DOOR ROOM TOP (Porta stanza TOP scritta ROOM)
DOORROOMTOP:
  .DB $1F,$30,$7B,$FF,$18,$6A,$1A,$68
  .DB $F8,$0C,$DE,$FF,$8A,$A8,$AA,$8A
; DOOR ROOM TOP COLOR
DOORROOMTOP_COLOR:
   .DB 207,207,207,207,207,207,207,207
   .DB 207,207,207,207,207,207,207,207
; DOOR ROOM (porta stanza)
DOORROOM:
  .DB $FF,$00,$FF,$FF,$00,$FF,$FF,$01
  .DB $FF,$FF,$01,$FF,$FF,$00,$FF,$FF
  .DB $FF,$00,$FF,$FF,$00,$FF,$FF,$F8
  .DB $1F,$4F,$08,$FF,$FF,$00,$FF,$FF
; DOOR ROOM COLOR
DOORROOM_COLOR:
  .DB 43,43,43,43,43,43,43,43
  .DB 43,43,43,43,43,43,43,43
  .DB 43,43,43,43,43,43,43,43
  .DB 43,43,43,43,43,43,43,43
; UMBRELLA (ombrello)
UMBRELLA:
  .DB 0,1,7,11,21,43,127,255,147,1,1,1,1,1,1,0
  .DB 0,128,224,208,168,212,254,255,145,0,0,0,0,0,32,192
; UMBRELLA COLOR (ombrello colore giallo)
UMBRELLA_COLOR:
  .DB 160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160  
  .DB 160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160  
; MATTONE GREZZO
MATTONEGREZZO:
  .DB $FF,$89,$FE,$DF,$FB,$EF,$DF,$00
  .DB $FE,$EE,$D2,$FE,$FE,$BE,$16,$00
; MATTONE GREZZO COLORE
MATTONEGREZZO_COLOR:
  .DB 96,96,96,96,96,96,96,96
  .DB 96,96,96,96,96,96,96,96  
; Sfondo muro di base per stanza
WALLBACKGROUND:
  .DB $FF,$04,$04,$04,$FF,$80,$80,$80
; Sfondo muro di base per stanza
WALLBACKGROUND_COLOR:  
  .DB 224,224,224,224,224,224,224,224
; INTERNO LIFT ASCENSORE
INTERNOLIFT:
  .DB $DF,$DF,$DF,$DF,$DF,$DF,$DF,$DF
  .DB $DF,$DF,$DF,$DF,$C0,$BF,$7F,$FF
  .DB $FB,$FB,$FB,$FB,$FB,$FB,$FB,$FB
  .DB $FB,$FB,$FB,$FB,$03,$FD,$FE,$FF
; INTERNO LIFT ASCENSORE COLORE GIALLO Codice 10
INTERNOLIFT_COLOR:  
  .DB 175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175
  .DB 175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175
; porta top(parte alta) grande stanza interna colore giallo
DOORBIGROOMTOP:
  .DB 1,3,15,63,127,127,255,255
  .DB 128,192,240,252,254,254,255,255
DOORBIGROOMTOP_COLOR:
  .DB 160,160,160,160,160,160,160,160
  .DB 160,160,160,160,160,160,160,160
; porta EXIT grande stanza interna colore giallo multicolore
DOORBIGROOM:      
  .DB 255,128,233,137,198,134,137,233,128,206,170,202,170,174,128,255
  .DB 255,1,93,73,73,73,73,73,1,235,175,171,171,235,1,255
DOORBIGROOM_COLOR:
  .DB 175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175
  .DB 175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175
; maglietta vestito colore rosso chiaro multicolore
MAGLIETTA:
  .DB 0,0,0,28,62,111,207,15,15,15,15,15,0,0,0,0
  .DB 0,0,0,56,124,246,243,240,240,240,240,240,0,0,0,0
MAGLIETTA_COLOR:
  .DB 0,0,0,144,144,144,144,96,144,96,144,144,0,0,0,0
  .DB 0,0,0,144,144,144,144,96,144,96,144,144,0,0,0,0     
PANTALONI:
  .DB 0,0,0,0,0,0,7,7,7,7,14,12,28,56,0,0
  .DB 0,0,0,0,0,0,224,224,224,224,112,48,56,28,0,0
PANTALONI_COLOR:
  .DB 0,0,0,0,0,0,80,96,80,80,80,80,96,80,0,0
  .DB 0,0,0,0,0,0,80,96,80,80,80,80,96,80,0,0
COLONNA:
; --- Slot 0
; color 6
  .DB $01,$02,$01,$02,$01,$02,$03,$03
  .DB $40,$C0,$40,$C0,$C0,$C0,$C0,$C0
;
; --- Slot 2
; color 6
  .DB $03,$03,$03,$03,$03,$07,$0F,$0F
  .DB $C0,$C0,$C0,$C0,$C0,$E0,$F0,$F0
COLONNA_COLOR:
  .DB 96,96,96,96,96,96,96,96,96,96,96,96,96,96,96,96
  .DB 96,96,96,96,96,96,96,96,96,96,96,96,96,96,96,96
MINIMOUSE:
; topo che appare sulle parte del palazzo
; appare in verticale
; color 14
  .DB $0E,$DF,$FF,$FF,$FE,$C8,$FC,$BC
  .DB $FC,$C8,$FE,$FF,$FF,$DF,$0E,$00
MINIMOUSE_COLOR:
  .DB 224,224,224,224,224,224,224,224
  .DB 224,224,224,224,224,224,224,224
ANIMAZIONE_PORTA:
; animazione porte del palazzo
;
; --- FRAME 1
  .DB 63,63,63,63,63,63,63,63,63,31,31,31,15,7,3,0
  .DB 255,255,255,255,255,255,255,255,143,167,135,255,255,255,255,255
; -- FRAME 2
  .DB 15,15,15,15,15,15,7,7,7,3,3,3,1,0,0,0
  .DB 255,255,255,255,255,255,255,255,143,167,135,255,255,255,127,63
; -- FRAME 3
  .DB 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  .DB 255,255,255,255,255,255,255,255,143,167,135,255,127,63,31,15
; -- FRAME 4
  .DB 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  .DB 15,15,15,15,15,15,15,15,15,15,15,15,15,7,3,1


ANIMAZIONE_PORTA_COLOR:
; PATTERN CHAR COLOR
  .DB 32,176,32,32,176,32,32,176,32,32,176,32,32,176,32,32
  .DB 32,176,32,32,176,32,32,176,43,43,43,32,32,176,32,32

  .DB 32,176,32,32,176,32,32,176,32,32,176,32,32,176,32,32
  .DB 32,176,32,32,176,32,32,176,43,43,43,32,32,176,32,32

  .DB 32,176,32,32,176,32,32,176,32,32,176,32,32,176,32,32
  .DB 32,176,32,32,176,32,32,176,43,43,43,32,32,176,32,32

  .DB 32,176,32,32,176,32,32,176,32,32,176,32,32,176,32,32
  .DB 32,176,32,32,176,32,32,176,32,176,32,32,32,176,32,32
   
SPRDEF:
;--- Slot 0 DX-1 1UP
;--- color 5
  .DB $1E,$1F,$0F,$1F,$3F,$7E,$00,$00
  .DB $0F,$1F,$1F,$33,$33,$00,$00,$00
  .DB $00,$F0,$F8,$CC,$A0,$00,$00,$00
  .DB $80,$E0,$F0,$F8,$F8,$00,$00,$00
;--- color 13
  .DB $00,$00,$00,$00,$00,$01,$1F,$2F
  .DB $40,$80,$80,$0C,$0C,$07,$07,$07
  .DB $00,$00,$00,$00,$40,$A0,$E0,$C0
  .DB $40,$00,$00,$00,$00,$80,$80,$C0
; --- Slot 1 DX-2 1UP
; --- color 5
  .DB $07,$07,$03,$07,$0F,$1F,$00,$00
  .DB $0F,$3F,$3F,$0F,$0F,$00,$00,$00
  .DB $80,$FC,$FE,$F3,$E8,$80,$00,$00
  .DB $E0,$F8,$F8,$F8,$FC,$00,$00,$00
;--- color 13
  .DB $00,$00,$00,$00,$00,$00,$1F,$67
  .DB $80,$00,$40,$60,$00,$1F,$3C,$18
  .DB $00,$00,$00,$00,$10,$68,$F8,$F8
  .DB $10,$00,$06,$06,$00,$F0,$38,$00
;--- Slot 2 SX-1 1UP
;--- color 5
  .DB $00,$0F,$1F,$33,$05,$00,$00,$00
  .DB $01,$07,$0F,$1F,$1F,$00,$00,$00
  .DB $78,$F8,$F0,$F8,$FC,$7E,$00,$00
  .DB $F0,$F8,$F8,$CC,$CC,$00,$00,$00
;--- color 13
  .DB $00,$00,$00,$00,$02,$05,$07,$03
  .DB $02,$00,$00,$00,$00,$01,$01,$03
  .DB $00,$00,$00,$00,$00,$80,$F8,$F4
  .DB $02,$01,$01,$30,$30,$E0,$E0,$E0
; --- Slot 3 SX-2 1UP
; --- color 5
  .DB $01,$3F,$7F,$CF,$17,$01,$00,$00
  .DB $07,$1F,$1F,$1F,$3F,$00,$00,$00
  .DB $E0,$E0,$C0,$E0,$F0,$F8,$00,$00
  .DB $F0,$FC,$FC,$F0,$F0,$00,$00,$00
; --- color 13
  .DB $00,$00,$00,$00,$08,$16,$1F,$1F
  .DB $08,$00,$60,$60,$00,$0F,$1C,$00
  .DB $00,$00,$00,$00,$00,$00,$F8,$E6
  .DB $01,$00,$02,$06,$00,$F8,$3C,$18
; --- Slot 0 DOWN-1 1UP
; ---- color 5
  .DB $00,$01,$07,$0F,$0F,$18,$00,$00
  .DB $38,$7F,$4F,$0F,$1F,$00,$00,$00
  .DB $78,$FE,$FE,$FF,$FF,$13,$01,$00
  .DB $1C,$FE,$F7,$FB,$18,$00,$00,$00
; --- color 13
  .DB $00,$00,$00,$00,$00,$07,$1D,$0F
  .DB $07,$00,$30,$30,$00,$0E,$0E,$1E
  .DB $00,$00,$00,$00,$00,$E0,$B0,$F0
  .DB $E0,$00,$00,$00,$E3,$F0,$00,$00
; --- Slot 1 DOWN-2 1UP
; --- color 5
  .DB $00,$01,$07,$0F,$0F,$18,$00,$00
  .DB $38,$7F,$EF,$DF,$18,$00,$00,$00
  .DB $78,$FE,$FE,$FF,$FF,$13,$01,$00
  .DB $1C,$FE,$F2,$F0,$F8,$00,$00,$00
; --- color 13
  .DB $00,$00,$00,$00,$00,$07,$1D,$0F
  .DB $07,$00,$00,$00,$C7,$0F,$00,$00
  .DB $00,$00,$00,$00,$00,$E0,$B0,$F0
  .DB $E0,$00,$0C,$0C,$00,$70,$70,$78
; --- Slot 2 UP-1  1UP
; --- color 5
  .DB $00,$01,$03,$07,$0F,$07,$00,$1E
  .DB $3F,$7E,$6E,$5F,$1F,$00,$00,$00
  .DB $78,$FE,$FE,$FF,$F3,$E1,$00,$3C
  .DB $7E,$77,$FB,$88,$80,$00,$00,$00
; --- color 13
  .DB $00,$00,$00,$00,$00,$08,$0F,$01
  .DB $00,$01,$01,$00,$00,$07,$07,$0F
  .DB $00,$00,$00,$00,$00,$10,$F0,$C0
  .DB $80,$80,$00,$73,$78,$00,$00,$00
; --- Slot 3 UP-2  1UP
; --- color 5
  .DB $00,$01,$03,$07,$0F,$07,$00,$3E
  .DB $7F,$FE,$DE,$1F,$11,$00,$00,$00
  .DB $78,$FE,$FE,$FF,$F3,$E1,$00,$38
  .DB $7C,$7E,$F6,$FA,$F8,$00,$00,$00
; --- color 13
  .DB $00,$00,$00,$00,$00,$08,$0F,$01
  .DB $00,$01,$01,$C0,$0E,$1E,$00,$00
  .DB $00,$00,$00,$00,$00,$10,$F0,$C0
  .DB $80,$80,$00,$00,$00,$E0,$E0,$F0
;
; --------------------------------------
; --- Slot 0 LIFT TOP
  .DB $00,$00,$00,$00,$00,$00,$00,$00
  .DB $FF,$DA,$DA,$DA,$DA,$CA,$FF,$00
  .DB $00,$00,$00,$00,$00,$00,$00,$00
  .DB $FF,$23,$F7,$77,$F7,$F7,$FF,$00
; --- Slot 0 FURGONE
  .DB $00,$00,$00,$00,$00,$07,$09,$11
  .DB $21,$7F,$FF,$FF,$F3,$6D,$1E,$0C
  .DB $00,$00,$FF,$FF,$FF,$FF,$FF,$FF
  .DB $FF,$FF,$FF,$FF,$F3,$ED,$1E,$0C
; --- Slot 2 LIFT
; ----
  .DB $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
  .DB $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
  .DB $7F,$7F,$7F,$7F,$7F,$7F,$7F,$7F
  .DB $7F,$7F,$7F,$7F,$7F,$7F,$7F,$7F

; ------------------------------------------------
;  **  DATA SPRITES ANIMATE LIFT  **
; --- FRAME 1 DOOR LIFT
; ---- color 10
  .DB $FE,$FE,$FE,$FE,$FE,$FE,$FE,$FE
  .DB $FE,$FE,$FE,$FE,$FE,$FE,$FE,$FE
  .DB $7F,$7F,$7F,$7F,$7F,$7F,$7F,$7F
  .DB $7F,$7F,$7F,$7F,$7F,$7F,$7F,$7F
;3680 ' --- FRAME 2 DOOR LIFT
;3690 ' color 10
  .DB $FC,$FC,$FC,$FC,4FC,$FC,$FC,$FC
  .DB $FC,$FC,$FC,$FC,$FC,$FC,$FC,$FC
  .DB $3F,$3F,$3F,$3F,$3F,$3F,$3F,$3F
  .DB $3F,$3F,$3F,$3F,$3F,$3F,$3F,$3F
;3750 ' --- FRAME 3 DOOR LIFT
;3760 ' color 10
  .DB $F8,$F8,$F8,$F8,$F8,$F8,$F8,$F8
  .DB $F8,$F8,$F8,$F8,$F8,$F8,$F8,$F8
  .DB $1F,$1F,$1F,$1F,$1F,$1F,$1F,$1F
  .DB $1F,$1F,$1F,$1F,$1F,$1F,$1F,$1F
;3820 ' --- FRAME 4 DOOR LIFT
;3830 ' color 10
  .DB $F0,$F0,$F0,$F0,$F0,$F0,$F0,$F0
  .DB $F0,$F0,$F0,$F0,$F0,$F0,$F0,$F0
  .DB $0F,$0F,$0F,$0F,$0F,$0F,$0F,$0F
  .DB $0F,$0F,$0F,$0F,$0F,$0F,$0F,$0F
;3880 ' --- FRAME 5 DOOR LIFT
;3890 ' color 10
  .DB $E0,$E0,$E0,$E0,$E0,$E0,$E0,$E0
  .DB $E0,$E0,$E0,$E0,$E0,$E0,$E0,$E0
  .DB $07,$07,$07,$07,$07,$07,$07,$07
  .DB $07,$07,$07,$07,$07,$07,$07,$07
;3950 ' --- FRAME 6 DOOR LIFT
;3960 ' color 10
  .DB $C0,$C0,$C0,$C0,$C0,$C0,$C0,$C0
  .DB $C0,$C0,$C0,$C0,$C0,$C0,$C0,$C0
  .DB $03,$03,$03,$03,$03,$03,$03,$03
  .DB $03,$03,$03,$03,$03,$03,$03,$03
;4020 ' --- FRAME 7 DOOR LIFT
;4030 ' color 10
  .DB $80,$80,$80,$80,$80,$80,$80,$80
  .DB $80,$80,$80,$80,$80,$80,$80,$80
  .DB $01,$01,$01,$01,$01,$01,$01,$01
  .DB $01,$01,$01,$01,$01,$01,$01,$01  
  
; --- CADUTA 1UP DX
; color 5
  .DB $0F,$0F,$07,$0F,$1F,$3F,$00,$00
  .DB $03,$07,$0F,$0F,$07,$00,$00,$00
  .DB $01,$FA,$FC,$F0,$E0,$80,$00,$00
  .DB $E0,$F8,$FC,$FC,$F8,$00,$00,$00
; color 13
  .DB $00,$00,$00,$00,$80,$80,$8F,$77
  .DB $00,$18,$10,$00,$00,$01,$01,$01
  .DB $00,$00,$00,$00,$10,$68,$F8,$F0
  .DB $16,$06,$00,$00,$00,$E0,$E0,$F0    
  
; --- CADUTA 1UP SX
; color 5
  .DB $80,$5F,$3F,$0F,$07,$01,$00,$00
  .DB $07,$1F,$3F,$3F,$1F,$00,$00,$00
  .DB $F0,$F0,$E0,$F0,$F8,$FC,$00,$00
  .DB $C0,$E0,$F0,$F0,$E0,$00,$00,$00
; color 13
  .DB $00,$00,$00,$00,$08,$16,$1F,$0F
  .DB $68,$60,$00,$00,$00,$07,$07,$0F
  .DB $00,$00,$00,$00,$01,$01,$F1,$EE
  .DB $00,$18,$08,$00,$00,$80,$80,$80
;
; --- MORTE 1UP FRAME-1
; color 5
  .DB $0F,$0F,$07,$0F,$1F,$3F,$00,$00
  .DB $03,$07,$0C,$0C,$00,$00,$00,$00
  .DB $00,$F8,$FC,$F2,$E0,$80,$00,$00
  .DB $E0,$F8,$FC,$FC,$00,$00,$00,$00
; color 13
  .DB $00,$00,$00,$00,$00,$00,$0F,$17
  .DB $20,$20,$13,$03,$00,$07,$07,$06
  .DB $00,$00,$00,$00,$10,$68,$F8,$F0
  .DB $10,$00,$00,$00,$F0,$F0,$F0,$60
;
; --- MORTE 1UP FRAME-2
; color 5
  .DB $00,$00,$00,$10,$30,$60,$68,$70
  .DB $71,$79,$F9,$F9,$F9,$D8,$18,$08
  .DB $00,$00,$00,$00,$00,$00,$60,$E0
  .DB $E0,$E0,$E0,$E0,$E0,$E0,$70,$30
; color 13
  .DB $00,$00,$00,$00,$00,$00,$06,$0B
  .DB $0E,$06,$06,$06,$06,$04,$02,$01
  .DB $00,$00,$00,$02,$66,$66,$0E,$1C
  .DB $19,$13,$1F,$1F,$1F,$1E,$00,$80
;
; --- MORTE 1UP FRAME-3
; color 5
  .DB $00,$00,$00,$00,$00,$00,$10,$30
  .DB $60,$68,$70,$71,$79,$F9,$F9,$F9
  .DB $00,$00,$00,$00,$00,$00,$00,$00
  .DB $00,$40,$C0,$E0,$E0,$E0,$E0,$E0
; color 13
  .DB $00,$00,$00,$00,$00,$00,$00,$00
  .DB $00,$06,$0B,$0E,$06,$06,$06,$06
  .DB $00,$00,$00,$00,$00,$00,$00,$00
  .DB $00,$30,$31,$03,$07,$1F,$1F,$1F


endProgram:

 .end

second file binary short

	.org $E200 - 7

	.db $fe
	.dw startProgram,endProgram,startProgram



startProgram:

;LDIRVM    .equ $005C ; routine del BIOS usata per riempire la VRAM
;PRINTCHAR .equ $1880 ; indirizzo video caratteri VPOKE6272,CHAR

 LD H,1   ; X 
 LD L,5  ; Y
 CALL $C6 ; CALL LOCATE X,Y ROUTINE 1
 LD BC,576 

LOOP:
 ld A,156 ; WALL BACKGROUND
 CALL $A2
 LD A,B  
 DEC BC
 OR C
 JR NZ,LOOP
 RET

endProgram:

.end
ログイン/登録して投稿

By Sandy Brand

Champion (309)

Sandy Brand さんの画像

18-01-2020, 00:11

Without describing what the problem actually is this is not easy to understand.

Just looking quickly at the code:

First .BIN file:

You use BIOS function CHGMOD to modify the screen, which is fine. But afterwards you also write to VDP registers directly. This might be a problem because then the BIOS doesn't know that these VDP registers have been modified and internally it might still be operating with old VDP register data. It would probably be safer to use WRTVDP ($47) for this.

Second .BIN file:

I am not sure what the input registers are supposed to be for Bios routine $C6 (POSIT)

From Wiki: Main-ROM_BIOS: H = X-coordinate of the cursor, L for the Y-coordinate

But map.grauw.nl specifies them the other way around: H - Y coordinate of cursor, L - X coordinate of cursor

Maybe try swapping them and see if it makes a difference?

Also, according to the Wiki: CLEAR strings area,upper address: 'upper address' is the highest memory location that may be used by MSX-BASIC. Now I am beginning to doubt myself, but as it is described there this seems to be 'inclusive', so if you set it to CLEAR1000,&HE200, the first byte at $E200 of your program might still get modified somehow?

By Sandy Brand

Champion (309)

Sandy Brand さんの画像

18-01-2020, 00:18

Actually, if you want to change the location of some of the VDP sprite and pattern tables in screen 1 like you are doing in the code now, then maybe it would be better to use BIOS call INIT32 ($6F). Because then you can specify to the BIOS where the tables should be located and all internal functions (such as POSIT) that compute VRAM addresses into these tables will then use the correct locations:

006Fh (INIT32)

Function:	Initialises the screen to GRAPHIC1 mode (32x24). In thisRoutine, the palette is not initialised.
Entry:	T32NAM (F3BDh) = Address of pattern name table
T32COL (F3BFh) = Address of colors table
T32CGP (F3C1h) = Address of pattern generator table
T32ATR (F3C3h) = Address of sprite attribute table
T32PAT (F3C5h) = Address of sprite generator table
FORCLR (0F3E9h) = Text color
BAKCLR (0F3EAh) = Background color
BDRCLR (0F3EBh) = Border color
Output:	None
Modify:	All Registers
Note:	The palette is not initialized by this routine. If you want to initialize the palette, call the routine INIPLT (00141h) in Sub-ROM just after this one.

By gasparrini

Champion (333)

gasparrini さんの画像

18-01-2020, 09:53

I am sorry if I explained myself wrong, now I try to explain myself better in detail of the two BUGS on the main listing of the game in BASIC, for the rest of the two listings in ASSEMBLER in my opinion they are fine as they are.

The first BUG of the left lift when the 1UP sprite takes the elevator, and goes up from the ground floor to the top floor, and then goes down, it seems that everything is fine, if the 1UP sprite tries to take the l again 'left lift the lift no longer works and at that point the BUG is very well known, which unfortunately I can't understand to correct it BASIC.

The same malfunction and similar BUG, ​​can be seen in a similar way on the right lift, for the rest of the game it works well, but I would say that the game is not yet finished its entire development.

I hope now that I've been explicit and clear enough of the detail to correct the BASIC source of this WASHMAN video game.

The BASIC lines which runs all the left elevator are located
from: 3220 to 3680

Instead the BASIC lines that runs all the right elevator are located
from: 3690 to 4160

By gasparrini

Champion (333)

gasparrini さんの画像

20-01-2020, 18:25

Hello,

Somebody could help me for this problem at the BUGS of two
elevator for WASHMAN game!

By thegeps

Paragon (1249)

thegeps さんの画像

20-01-2020, 20:42

try this:
3250 IFYA=118THENYY=INT(YA/8):YY=YY+3ELSEYY=INT(YA/8):YY=YY-3
then this:
3380 IFYA=22THENL=1
3390 IFL=1THEN3480
this:
3480 IFYA=118THENL=0
3485 IFL=0THEN3380
and this:
3730 IFYB=118THENYZ=INT(YB/8):YZ=YZ+3ELSEYZ=INT(YB/8):YZ=YZ-3

It isn't tested. Let me know if it works now. Eventually contact me by mail through my account here. So you can send me a file with the game to test (I'm italian so you'll can explain me better BUT not here. Here you have to explain yourself in english bacause all the knowledges may be of some help for somebody out there)