#include "library/smsrnd.bas"
#include "library/smsdelay.bas"
#include "library/vg5000putcharbiosvarsyspw.bas"
#include "library/vg5000setetgvarsyspw.bas"
#include "library/charmapvg5000v01.bas"

goto pics01end:
pics01:
asm
incbin "library_pictures/ubuntustudio-brushes.png_.bin"
incbin "library_pictures/ubuntustudio-lense.png_.bin"
incbin "library_pictures/ubuntustudio-mixer.png_.bin"
end asm
pics01end:

asm
di
end asm

dim eee as uinteger at $7010
dim seed as uinteger at $7012
dim ee0 as uinteger at $7014
dim ee1 as uinteger at $7016
dim ee2 as uinteger at $7018
dim ee3 as uinteger at $701A
dim eex as uinteger at $701C
dim eey as uinteger at $701E

dim tw0 as uinteger at $4838
dim tw1 as uinteger at $483A
dim tw2 as uinteger at $483C
dim tw3 as uinteger at $483E
dim tb0 as ubyte at $4838
dim tb1 as ubyte at $4839
dim tb3 as ubyte at $483A
dim tb2 as ubyte at $483B
dim tb4 as ubyte at $483C
dim tb5 as ubyte at $483D
dim tb6 as ubyte at $483E
dim tb7 as ubyte at $483F

seed=40

poke $47FD,0
poke $47FB,1
asm
  ei
  halt
  halt
  halt
  halt
  di
  end asm

for ee0=0 to 95
tw0=32+ee0:tw1=@charmap01+ee0*10:vg5000setetgvarsyspw()
tw0=128+32+ee0:tw1=@charmap01+ee0*10:vg5000setetgvarsyspw()
next

poke $47FD,0:poke $47FB,1
asm
  ei
  halt
  halt
  halt
  halt
  di
  end asm

do

for ee3=0 to 2

for eey=0 to 0
  for eex=0 to 39
    ee0=255
    ee1=peek(@pics01+eey*40+eex+ee3*1000)
    tb0=0+eex:tb1=6+eey:tb2=ee0:tb3=ee1:vg5000putcharbiosvarsyspw()    '- vg5000putcharbios(3+eex,11+eey,seed,%11100111)
    next:next

for eey=0 to 25
  for eex=0 to 39
    ee0=255
    ee1=peek(@pics01+eey*40+eex+ee3*1000)
    tb0=0+eex:tb1=7+eey:tb2=ee0:tb3=ee1:vg5000putcharbiosvarsyspw()    '- vg5000putcharbios(3+eex,11+eey,seed,%11100111)
    next:next

for eey=1 to 10
  smsdelay(10000)
  next

next

loop

do:loop

