Fast Pixel Access Macros / utility macros
EXT_PIXOFFSET(x,y)
calculates the byte offset of a pixel within a 240x128 pixels large video plane (used internally by EXT_PIXADDR).
EXT_PIXADDR(plane,x,y)
calculates the byte address of a pixel within a 240x128 pixels large video plane.
EXT_PIXMASK(x)
calculates the byte mask corresponding to a x coordinate within a 240x128 pixels large video plane.
EXT_PIXNBIT(x)
calculates the bit number corresponding to a x coordinate within a 240x128 pixels large video plane.
EXT_PIXUP(address)
subtracts 30 bytes (the width of 1 line in bytes) from given pixel byte address.
EXT_PIXDOWN(address)
adds 30 bytes (the width of 1 line in bytes) to given pixel byte address.
EXT_PIXLEFT_AM(address,mask)
modifies given pixel byte address and pixel mask to target the left neighbour pixel
of the active one.
EXT_PIXRIGHT_AM(address,mask)
modifies given pixel byte address and pixel mask to target the right neighbour pixel
of the active one.
EXT_PIXLEFT_AN(address,n), EXT_PIXRIGHT_AN(address,n)
Bit number versions of EXT_PIXLEFT/RIGHT_AM.
EXT_SETPIX_AM(address,mask)
sets a pixel using the given byte address and the given mask value.
EXT_CLRPIX_AM(address,mask)
clears a pixel using the given byte address and the given mask value.
EXT_XORPIX_AM(address,mask)
inverts a pixel using the given byte address and the given mask value.
EXT_GETPIX_AM(address,mask)
gets a pixel using the given byte address and the given mask value
(NOTE: if the return value is 0 the pixel is not set, otherwise it is set).
EXT_SETPIX_AN(a,offset,n)
sets a pixel using the given plane address, pixel offset from the beginning of plane, pixel
number (used internally by EXT_SETPIX).
EXT_CLRPIX_AN(a,offset,n)
clears a pixel using the given plane address, pixel offset from the beginning of plane, pixel
number (used internally by EXT_CLRPIX).
EXT_XORPIX_AN(a,offset,n)
inverts a pixel using the given plane address, pixel offset from the beginning of plane, pixel
number (used internally by EXT_XORPIX).
EXT_GETPIX_AN(a,offset,n)
gets a pixel using the given plane address, pixel offset from the beginning of plane, pixel
number (used internally by EXT_GETPIX)
(NOTE: if the return value is 0 the pixel is not set, otherwise it is set).
EXT_SETPIX(plane,x,y)
sets a pixel at position (x,y) within a 240x128 pixels large video plane.
EXT_CLRPIX(plane,x,y)
clears a pixel at position (x,y) within a 240x128 pixels large video plane.
EXT_XORPIX(plane,x,y)
inverts a pixel at position (x,y) within a 240x128 pixels large video plane.
EXT_GETPIX(plane,x,y)
gets a pixel at position (x,y) within a 240x128 pixels large video plane
(NOTE: if the return value is 0 the pixel is not set, otherwise it is set).
EXT_SHORTABS(a)
returns the absolute value of given short a.
EXT_LONGABS(a)
returns the absolute value of given long a.
EXT_XCHG(a,b)
exchanges the content of values a and b using the ASM exg
instruction.
EXT_LONGSWAP(val)
returns the word swapped value (upper and lower word swapped) of the given long using the
ASM swap
instruction.
DEREFSMALL(p,i)
dereferences i-th element of pointer p (optimized version of p[i]).