MSX Basic programs with colorful tiles.

Pagina 1/2
| 2

Door Vampier

Prophet (2397)

afbeelding van Vampier

10-12-2010, 07:24

10 SCREEN1:WIDTH32:KEYOFF
20 DEFINT I
30 RESTORE 40
40 DATA CD,72,00,21,F,04,22,E9,F3,AF,32,EB
50 DATA F3,CD,62,00,CD,41,0,3E,01,32,B0,FC
60 DATA 32,AF,FC,21,0,0,CD,77,C0,CD,62,C0
70 DATA 21,0,8,CD,77,C0,CD,62,C0,21,00,10
80 DATA CD,77,C0,CD,62,C0,AF,CD,C3,0,CD,69
90 DATA 00,CD,44,00,3E,F0,01,00,8,21,00,20
100 DATA CD,56,00,3E,F0,01,00,8,21,00,28,CD
110 DATA 56,00,3E,F0,01,00,08,21,00,30,CD,56
120 DATA 00,C9,2A,20,F9,01,98,00,16,8,7E,5F
130 DATA F,B3,ED,79,23,10,F7,15,20,F4,C9,AF
140 DATA CB,04,17,CB,04,17,CB,3C,CB,3C,D3,99
150 DATA 3E,8E,D3,99,7D,D3,99,7C,F6,40,D3,99
160 DATA C9,#
170 FOR I=&HC000 TO &HC090:READA$:POKEI,VAL("&H"+A$):NEXTI
180 DEFUSR=&HC000:U=USR(0)
190 'a
200 DATA &B00011000,&hb0
210 DATA &B00111000,&ha0
220 DATA &B00001100,&h60
230 DATA &B00110010,&h90
240 DATA &B01110111,&hb0
250 DATA &B11111111,&hb0
260 DATA &B11111111,&hb0
270 DATA &B01111110,&ha0
280 'b
290 DATA &B00000000,&h90
300 DATA &B00000000,&h90
310 DATA &B00000000,&h90
320 DATA &B00000000,&h90
330 DATA &B01011011,&h6a
340 DATA &B10101001,&h9b
350 DATA &B10100100,&h8b
360 DATA &B00011011,&h9a
370 '
380 RESTORE 190
390 FORI=0TO15:READA,B:VPOKE776+I,A:VPOKE776+8192+I,B:NEXTI
400 print "ab"

Now never ask again if this is possible! (Thanks to Max Iwamoto and BifiMSX)

btw graphics (C) 1986 Konami (Goonies)

Aangemeld of registreer om reacties te plaatsen

Van Lord_Zett

Paladin (807)

afbeelding van Lord_Zett

10-12-2010, 07:51

plaatje voorbeeld?

tempo?

Van Huey

Prophet (2687)

afbeelding van Huey

10-12-2010, 10:11

plaatje voorbeeld?

tempo?

Just copy/paste above text into Meisei an type RUN Wink

Van ray2day

Paladin (688)

afbeelding van ray2day

10-12-2010, 10:23

Very nice tutorial for (beginning) MSX-BASIC coders, Vampier... thanks!

Santa

Van Lord_Zett

Paladin (807)

afbeelding van Lord_Zett

10-12-2010, 13:21

Very nice tutorial for (beginning) MSX-BASIC coders, Vampier... thanks!

Santa

a idea how it works?

Van NYYRIKKI

Enlighted (5939)

afbeelding van NYYRIKKI

10-12-2010, 14:54

You cheat, that is not SCREEN 1 Wink

BTW you have bug in your code, the graphics work only in 8 first lines... to fix it:
390 FORI=0TO15:READA,B:FORK=0TO2:VPOKE776+I+2048*K,A:VPOKE776+8192+I+2048*K,B:NEXTK,I

Van JohnHassink

Ambassador (5605)

afbeelding van JohnHassink

10-12-2010, 18:13

Great stuff, thanks!

BTW, I always thought you should do a command like BASE(7)=9 or something like that, but apparently you don't have to.

Van Vampier

Prophet (2397)

afbeelding van Vampier

10-12-2010, 21:14

You cheat, that is not SCREEN 1 Wink

BTW you have bug in your code, the graphics work only in 8 first lines... to fix it:
390 FORI=0TO15:READA,B:FORK=0TO2:VPOKE776+I+2048*K,A:VPOKE776+8192+I+2048*K,B:NEXTK,I

correct Smile I was going to write another piece of code to do a VRAM copy of those areas to others (VRAM clone)

Van wolf_

Ambassador_ (9972)

afbeelding van wolf_

10-12-2010, 21:52

DS: base() contains addresses.. so, you don't have to use base() if you know these addresses yourself.

Van giuseve

Paladin (753)

afbeelding van giuseve

14-05-2014, 00:15

@vampier
Nice list.
If i understood in data lines there are bit mapping and the color.
I see only a and b are mapped. How can i map all others chars and numbers in multicolor?
Isn't it possibile in screen 0?
What is the corrispodence between msx1 colors and the &hxx i see in data lines?
Can i use an hex value instead of &byyyyyyyy?
If yes, how to translate the yyyyyyyy in hex value?

Regards

Van anonymous

incognito ergo sum (116)

afbeelding van anonymous

14-05-2014, 16:01

You can convert binary to hexadecimal with:

HEX$(binary value)

but remember that the result is a string.

Pagina 1/2
| 2