The following warnings occurred:
Warning [2] Undefined array key 0 - Line: 1677 - File: showthread.php PHP 8.2.31 (Linux)
File Line Function
/inc/class_error.php 157 errorHandler->error
/showthread.php 1677 errorHandler->error_callback
/showthread.php 916 buildtree




Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ULAplus support
#2
oops, i forgot to add a 'ulaplusgetpalette()' function - this is really important to get the palette values back - the example below illustrates the usage of it

library/ulaplus.bas
Code:
dim tmpv as uinteger dim fdbkv as ubyte function ulapluscheck(): tmpv=in(65339):pause 1:fdbkv=0 out 48955,0:out 65339,0:pause 1 if in(65339)<>tmpv then:fdbkv=1:out 48955,0:out 65339,tmpv:pause 1:end if return fdbkv end function sub ulapluspalette(clv as ubyte, vlv as ubyte): out 48955,(clv band 63):out 65339,vlv:pause 1 end sub function ulaplusgetpalette(clv as ubyte) out 48955,(clv band 63) return in(65339) pause 1 end function sub ulaplusswitch(flgv as ubyte): out 48955,64:out 65339,(flgv band 1):pause 1 end sub

ulaplus_example.bas
Code:
#include "library/ulaplus.bas" ulaplusswitch(1):cls a$="ULAplus is not present" if ulapluscheck()<>0 then:a$="ULAplus is present":end if print at 0,0;a$ for fl=0 to 1:flash fl for hb=0 to 1:bright hb for ik=0 to 7 ink ik:inverse 1:print " "; next for pa=0 to 7 paper pa:inverse 0:print " "; next next:next for i=0 to 63 'ulapluspalette(i,int(rnd*255)) ulapluspalette(i,i) next print ink 0:paper 7:bright 1 for i=0 to 63 print ulaplusgetpalette(i);","; next i pause 0
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)