Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 5 rem dinobasic64 - v1.0 - a clone of the chrome dinosaur game
- 7 rem (c)2026 by kimono (f.nardella)
- 10 i1=12800:i2=12991:v=53248:jo=56320:po=2040:m=1784:s=54272
- 15 forz=stos+24:pokez,0:next:rem clear sid reg
- 20 cl=0:xt=22:pokev+32,1:pokev+33,1
- 25 o1$="{sh @}{cm y*2}L":o2$="{sh @}{cm y*6}L":tr$="{cm p}"
- 30 lv=5:gosub240
- 35 pokes+24,15:rem sid vol
- 40 rem sprite data load
- 45 fori=i1toi2:readq:pokei,q:next
- 50 s(0)=200:s(1)=201:s(2)=202
- 55 pokev+39,0:rem sprite 0 col
- 60 pokev,44:rem x pos
- 65 y=188:pokev+1,y:rem y pos
- 70 fort=1to50:co=peek(v+31):next:rem clear collision reg
- 75 pokev+21,1:rem sprite 0 visible
- 80 rem main loop
- 85 k=k+1and1:pokepo,s(k):rem sprite 0 - 1
- 90 gosub210:rem shakes the ground
- 95 rem Port 2 fire joy or keyb (control-shift-c=)
- 100 j=peek(jo):if(jand16)=0orpeek(653)thengosub140
- 105 rem ground collision check
- 110 co=peek(v+31):ifco=0thencf=0:goto85
- 115 ifcf=1goto85:rem collision already accounted
- 120 gosub305:rem handle collision
- 125 iflv=0goto345
- 130 goto85
- 135 rem jumping routine + sfx
- 140 pokepo,s(2)
- 145 pokes+6,240:pokes+5,0:pokes+3,8:pokes+4,65:rem adsr
- 150 forx=0to10
- 155 t=x-5:y=30*t*t/25+158
- 160 pokev+1,y
- 165 pokes+1,x*8:rem changes freq during jump
- 170 gosub210:rem moves the ground as it jumps
- 175 ifpeek(v+31)=0goto190
- 180 ifcf=0thengosub305
- 185 iflv=0goto345
- 190 next
- 195 pokes+4,16:pokes+1,0:rem gate off (jump)
- 200 return
- 205 rem routine to update ground + sfx score
- 210 p=peek(m)
- 215 ifp=76thenifsf=0thensc=sc+1:print"{home}score:"sc;:goto225
- 220 goto250
- 225 ifsc>0and(sc/10)=int(sc/10)thencl=1-cl:xt=21:gosub235
- 230 goto250
- 235 pokev+32,1-cl:pokev+33,1-cl:pokev+39,cl:rem inverts colors
- 240 ifcl=0thenprint"{black}{clear}";
- 245 ifcl=1thenprint"{white}{clear}";
- 246 print"{home}score:"sc;spc(xt)"lives:"lv;:gosub470:return
- 250 xx$=tr$:iflen(b$)>0goto275
- 255 ifd<10thend=d+1:goto280
- 260 r=int(rnd(1)*10)
- 265 ifr=7thenb$=o1$:d=0
- 270 ifr=8thenb$=o2$:d=0
- 275 iflen(b$)>0thenxx$=left$(b$,1):b$=mid$(b$,2)
- 280 print"{home}{down*19}{right}{delete}";
- 285 print"{home}{down*19}{right*39}";xx$;
- 290 p=peek(m):ifp=111thenifcf=0thensf=0
- 295 return
- 300 rem collision routine + sfx
- 305 cf=1:sf=1:lv=lv-1:print"{home}"spc(31)"lives:"lv;
- 310 pokes+5,31:pokes+6,245:pokes+4,33
- 315 f=1770:a=66
- 320 fori=0to12:h=h+1and1:pokev+21,h
- 325 hi=int(f/256):lo=f-(hi*256):pokes+1,hi:pokes,lo
- 330 a=a+90:f=f-a:iff<980thenf=980
- 335 next:pokev+21,1:pokes+4,32:return
- 340 rem game over routine + sfx
- 345 print"{home}{down*10}"spc(15)"game over!":fori=0to100:next
- 350 pokes+5,2:pokes+6,132:rem adsr
- 355 pokes+4,33:pokes+1,11:pokes,169:forw=1to400:next:pokes+4,32
- 360 pokes+4,33:pokes+1,11:pokes,2:forw=1to400:next:pokes+4,32
- 365 pokes+4,33:pokes+1,10:pokes,100:forw=1to400:next:pokes+4,32
- 370 pokes+4,33:pokes+1,9:pokes,207:forw=1to400:next:pokes+4,32
- 375 pokes+4,33:pokes+1,9:pokes,65:forw=1to800:next:pokes+4,32
- 380 print:printspc(9)"press a key to restart";
- 385 geta$:ifa$=""goto385
- 390 run
- 395 rem data sprite0
- 400 data 0,0,255,0,0,191,0,0,255,0,0,255,0,0,240,0
- 405 data 0,252,2,0,224,2,1,224,3,7,248,3,159,232,3,255
- 410 data 224,3,255,224,1,255,192,1,255,192,0,255,128,0,127,0
- 415 data 0,25,0,0,1,0,0,1,0,0,1,128,0,0,0,11
- 420 rem data sprite1
- 425 data 0,0,255,0,0,191,0,0,255,0,0,255,0,0,240,0
- 430 data 0,252,2,0,224,2,1,224,3,7,248,3,159,232,3,255
- 435 data 224,3,255,224,1,255,192,1,255,192,0,255,128,0,127,0
- 440 data 0,17,128,0,16,0,0,16,0,0,24,0,0,0,0,11
- 445 rem data sprite2
- 450 data 0,0,255,0,0,223,0,0,255,0,0,255,0,0,240,0
- 455 data 4,254,0,15,192,64,3,208,48,7,240,31,255,192,15,255
- 460 data 192,7,255,192,3,255,128,1,255,32,0,127,224,0,24,0
- 465 data 0,120,0,0,64,0,0,0,0,0,0,0,0,0,0,11
- 470 print"{168*40}";
- 475 print:print" {172}{reverse on}{183}{reverse off}{187} ";
- 480 print" {reverse on}{180} {170}{reverse off} ";
- 485 print" {188}{reverse on}{175}{reverse off}{190} ";
- 490 print" {164}{185}{reverse on}{184}{163}{reverse off}{162} ";
- 495 print" {183*7} {164}{185}{reverse on}{184}{163}{reverse off}{162} ";
- 500 print" {183*7} ";:return
Advertisement