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
SPECTRA Advanced Graphics
#7
This is the Function to calculate Attribute Address in Dual line mode.
Code:
function CalcAdrDualOffset(x as ubyte,y as ubyte) dim y1 as uinteger y1=(y&96)+((y&28)>>2)+((y&3)<<3) return $6000+x+(y1<<5) end function
In Dual Byte Colour mode it will return ink colour. For Paper you must add 4096.

With this:
Code:
sub FillMem(mem as Uinteger,size as Uinteger,byt as Ubyte) asm ld h,(ix+5) ld l,(ix+4) ld d,h ld e,l inc de ld b,(ix+7) ld c,(ix+6) dec bc ld a,(ix+9) ld (hl),a ldir end asm end sub
You can now make something like cooper bars:
Code:
FillMem(4096+CalcAdrDualOffset(0,13),32,RGBto64Col(1,0,1)) FillMem(4096+CalcAdrDualOffset(0,14),32,RGBto64Col(2,0,2)) FillMem(4096+CalcAdrDualOffset(0,15),32,RGBto64Col(3,0,3)) FillMem(4096+CalcAdrDualOffset(0,16),32,RGBto64Col(2,0,2)) FillMem(4096+CalcAdrDualOffset(0,17),32,RGBto64Col(1,0,1))

And these are the core routines...
------------------------------------------------------------
http://lcd-one.da.ru redirector is dead
Visit my http://members.inode.at/838331/index.html home page!
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)