2017-04-29 21:06:24 +00:00
|
|
|
#include "picafb.hpp"
|
|
|
|
#include <config.h>
|
2017-05-20 20:04:22 +00:00
|
|
|
PICAfb::PICAfb() : Framebuffer(40, 15) {}
|
2017-04-29 21:06:24 +00:00
|
|
|
PICAfb::~PICAfb() {}
|
|
|
|
auto PICAfb::plotPixel(int x, int y, int col) -> void {
|
|
|
|
unsigned char *lfb = (unsigned char *)0x18300000 + 0x46500;
|
2017-05-20 20:04:22 +00:00
|
|
|
y=240-y-1;
|
|
|
|
int off = (x * 240 + y) * 3;
|
2017-04-29 21:06:24 +00:00
|
|
|
for (int i = 0; i < 3; i++) {
|
|
|
|
lfb[off++] = col;
|
|
|
|
col >>= 8;
|
|
|
|
}
|
|
|
|
}
|