Changes
Sorted routines by mode
== Fast plotting routine for MODE 1 0 ==
'''Input:''' DE = ''X (0..319159)'', HL = ''Y (0..199)''
<pre>
ADD HL, HL ;of the raster line
LD C, %10001000 10101010 ;Bitmask for MODE 1 AND %00000011 ;A = X MOD 4 JR ZNC, NSHIFT ;-> = 0, no shiftSHIFT SRL LD C , %01010101 ;move other bitmask to for right pixel DEC A ;loop counter JR NZ,SHIFT ;-position
NSHIFT ADD HL, DE ;+ HL = Screenaddress LD A, (CMASK) ;get color mask
XOR (HL) ;XOR screenbyte
AND C ;AND bitmask
== Fast plotting routine for MODE 0 1 ==
'''Input:''' DE = ''X (0..159319)'', HL = ''Y (0..199)''
<pre>
ADD HL, HL ;of the raster line
LD A, E ;Lowbyte X to A SRL D ;calculate X\24, because RR E ;2 4 pixel per byte SRL E ADD HL, Carry is X MOD 2DE ;+ HL = Screenaddress
LD C, %10101010 10001000 ;Bitmask for MODE 1 AND %00000011 ;A = X MOD 4 JR NCZ, NSHIFT ;-> = 0, no shiftSHIFT LD SRL C, %01010101 ;other move bitmask for right to pixel DEC A ;loop counter JR NZ,SHIFT ;-position
NSHIFT ADD HL, DE ;+ HL = Screenaddress LD A, (CMASK) ;get color mask
XOR (HL) ;XOR screenbyte
AND C ;AND bitmask