Ken Seggler who writes DuinoMite firmware just posted Video for successfuly implementation of Gameduino shield support in DM BASIC

Here is the YOUTUBE video

and here is the code which implements it:

10 DATA 31,47,32,48,33,49,34,48,35,50,36,51,37,52,38,53

20 DATA 39,54,40,55,41,56,42,57,43,58,44,59,45,60,46,61

30 DIM sintab(4096)

40 FOR xx=4096 TO 0 STEP -1

50 sintab(xx)=SIN(xx/25.0)*25+30

60 NEXT

70 RANDOMIZE TIMER:x=0:y=0:ch=0

80 FOR x=0 TO 4096

90 GDWRITEB x,INT(RND()*31)

100 NEXT

110 FOR f=0 TO 15

120 READ a

130 GDWRITEB 1169+f,a

140 READ a

150 GDWRITEB 1233+f,a

160 NEXT

170 k=0:r=1:fire =0:update=5:x=192:dir=0

180 f=1

190 SETTICK 50,510

200 GDSPRITEC 0,400,400,55,0,0,0

210 xx=416

220 ‘yy = SIN(xx/25.0)*25+30

230 ‘

240 IF done=1 THEN xx=416 ELSE xx=xx-1

250 IF xx > 0 THEN GDSPRITEC 10,xx-16,sintab(xx),26,0,0,0

260 IF xx <384 AND xx+16 >0 THEN GDSPRITEC 11,xx,sintab(xx+16),43,0,0,0

270 IF xx < 384 AND xx+32 > 0 THEN GDSPRITEC 12,xx+16,sintab(xx+32),31,0,0,0

280 IF xx < 384 AND xx+48 > 0 THEN GDSPRITEC 13,xx+32,sintab(xx+48),36,0,0,0

290 IF xx < 384 AND xx+64 > 0 THEN GDSPRITEC 14,xx+48,sintab(xx+64),37,0,0,0

300 IF xx < 384 AND xx+80 > 0 THEN GDSPRITEC 15,xx+64,sintab(xx+80),35,0,0,0

310 IF xx < 384 AND xx+96 > 0 THEN GDSPRITEC 16,xx+80,sintab(xx+96),31,0,0,0

320 IF xx < 384 AND xx+112 > 0 THEN GDSPRITEC 17,xx+96,sintab(xx+112),42,0,0,0

330 IF xx < 384 AND xx+128 > 0 THEN GDSPRITEC 18,xx+112,sintab(xx+128),27,0,0,0

340 ‘IF xx < 384 AND xx+144 > 0 THEN GDSPRITEC 19,xx+128,sintab(xx+144),40,0,0,0

341 IF xx > 0 THEN GDSPRITEC 20,xx-16,284,29,0,0,0

342 IF xx <384 AND xx+16 >0 THEN GDSPRITEC 21,xx,284,23,0,0,0

343 IF xx < 384 AND xx+32 > 0 THEN GDSPRITEC 22,xx+16,284,35,0,0,0

344 IF xx < 384 AND xx+48 > 0 THEN GDSPRITEC 23,xx+32,284,27,0,0,0

345 IF xx < 384 AND xx+64 > 0 THEN GDSPRITEC 24,xx+48,284,26,0,0,0

346 IF xx < 384 AND xx+80 > 0 THEN GDSPRITEC 25,xx+64,284,43,0,0,0

347 IF xx < 384 AND xx+96 > 0 THEN GDSPRITEC 26,xx+80,284,31,0,0,0

348 IF xx < 384 AND xx+112 > 0 THEN GDSPRITEC 27,xx+96,284,36,0,0,0

349 IF xx < 384 AND xx+128 > 0 THEN GDSPRITEC 28,xx+112,284,37,0,0,0

350 ‘IF xx < 384 AND xx+144 > 0 THEN GDSPRITEC 29,xx+128,284,40,0,0,0

351 IF xx+176 = 0 THEN done=1 ELSE done = 0

352 PAUSE 5

360 a$=INKEY$

370 IF a$=”” THEN a$=CHR$(dir)

380 IF ASC(a$)=&h82 THEN x=x-1:dir=&h82

390 IF ASC(a$)=&h83 THEN x=x+1:dir=&h83

400 IF x > 384 THEN x=384

410 IF x < 0 THEN x=0

420 IF fire=1 THEN GOTO 440

430 IF a$=” ” THEN fire=1:xf=x:yf=265-16

440 GDSPRITEC 1,x,265,50,0,0,0

450 y=y-1

460 GDWRITEW &h2806,y

470 GOSUB 490

480 GOTO 220

490 IF GDREADB(&h2803) <> 1 GOTO 490

500 RETURN

510 ‘

520 update=update-1

530 IF update = 0 THEN update = 10 ELSE GOTO 660

540 n=128

550 FOR xz=30 TO 275 STEP 25

560 xs=xz+25

570 IF f=1 THEN GDSPRITEC n,xs+k,70,52,0,0,0:GDSPRITEC n+10,xs+k,90,54,0,0,0

580 IF f=0 THEN GDSPRITEC n,xs+k,70,51,0,0,0:GDSPRITEC n+10,xs+k,90,53,0,0,0

590 n=n+1

600 NEXT

610 IF r=1 THEN k=k+3

620 IF r=0 THEN k=k-3

630 IF k=60 THEN r=0

640 IF k=0 THEN r =1

650 IF f=1 THEN f=0 ELSE f=1

660 IF yf<0 THEN fire=0:GDSPRITEC 0,400,400,55,0,0,0:GOTO 690

670 GOSUB 490

680 IF fire=1 THEN GDSPRITEC 0,xf,yf-15,55,0,0,0:yf=yf-5

690 IRETURN

We work on new MOD-VGA board which will be based on Gameduino shield but with additional 512KB of RAM which will be available either as video RAM and allow resolution of 800×600 pixels either as memory for DuinoMite code.

The module will be available for sale in mid February!

## Recent Comments