Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
displaying 8x8 patterns like tms9918 (msx1, sg1000, etc)
#2
with the libraries above, i think this example is not bad, for showing a better idea of that - i made similar example on msx, but this one lacks those tms9918 hardware sprites

Code:
#include "library/vpokechr.bas"
#include "library/charmap01.bas"

poke 23693,peek(@charmap01+2048+32):border 0:cls
dim p1,p2,s1,s2,vl as integer

p1=int(rnd*767):p2=int(rnd*767)
s1=int(rnd*32)+8:s2=int(rnd*32)+8

lp01:
  'vl=int(rnd*255)
  vl= (128+int(rnd*160))band 255

  vpokechr(p1,vl,@charmap01)
  p1=(p1+1)mod 768
  s1=s1-1
  if s1<1 then: p1=int(rnd*767):s1=int(rnd*32)+8:end if
  vpokechr(p2,32,@charmap01)
  p2=(p2+1)mod 768
  s2=s2-1
  if s2<1 then: p2=int(rnd*767):s2=int(rnd*32)+8:end if

  pause 1
  goto lp01

a screenshot of it:
[Image: chrdemozx.th.png]
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)