From WikiPrizm
Revision as of 14:18, 15 May 2014 by Tari (talk | contribs) (Less-strange wording on inlining advice.)
Jump to navigationJump to search


Plots a point at (x,y) on the screen with a specified color

Source code

void plot(unsigned x,unsigned y,unsigned short color){
	unsigned short*s=(unsigned short*)0xA8000000;


x - Specifies the x coordinate of the pixel in range of [0,383]
y - Specifies the y coordinate of the pixel in range of [0,215]
color - Specifies what color the plotted pixel will be. It is in RGB 565 format.


Given the minimal nature of this function, call overhead can easily be a non-trivial factor in obtaining reasonable performance. Marking it as static inline and declaring it in a single header file may be appropriate to help ensure this function is inlined.


Function written by ProgrammerNerd