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
Radastan Mode
#6
This is a fast sample, including a basic implemented plot routine. I'm sure is not the most optimized code, but I hope it's clarifiying:

Code:
SUB RadastanMode(active as UByte) '1=activate, 0=deactivate OUT 64571,64 OUT 64827, 3 * active END SUB SUB RadastanPalette(color, rgb as UByte) ' color=0-15, rgb = binary GGGRRRBB OUT 48955, 64: OUT 65339, 1 OUT 48955, color: OUT 65339, rgb END SUB SUB RadastanPlot(x,y,color as UByte) Dim Addr as UInteger Dim byteValue, mask as UByte LET Addr = 16384 + ((y*128 + x) >>1) LET byteValue = PEEK Addr LET color = color bAND 00001111b IF (x bAND 1) THEN LET mask = 11110000b ELSE LET mask = 00001111b LET color = color << 4 END IF POKE Addr, (byteValue bAND mask) bOR color END SUB CLS RadastanMode(1) RadastanPalette(0,11111111b) RadastanPalette(1,00011111b) for x=1 to 50: RadastanPlot(x,x,1): next x PAUSE 0 RadastanMode(0) CLS
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)