2011-07-19 08:09:03 +00:00
|
|
|
#include "simulator.h"
|
2011-07-28 00:20:00 +00:00
|
|
|
#include "../firmware/basic/basic.h"
|
2011-07-19 08:09:03 +00:00
|
|
|
#include "../firmware/lcd/display.h"
|
|
|
|
|
|
|
|
#include <unistd.h>
|
|
|
|
|
|
|
|
void simlcdDisplayUpdate() {
|
|
|
|
write(1,"\033[H",3);
|
|
|
|
for(int y=0; y<RESY; ++y) {
|
|
|
|
for(int x=0; x<RESX; ++x) {
|
2011-07-28 00:20:00 +00:00
|
|
|
if(globalconfig.lcdstate & LCD_INVERTED) {
|
|
|
|
write(1,(lcdGetPixel((globalconfig.lcdstate & LCD_MIRRORX)?(RESX-x-1):x,(globalconfig.lcdstate & LCD_MIRRORY)?(RESY-y-1):y)?"#":"_"),1);
|
2011-07-19 08:09:03 +00:00
|
|
|
} else {
|
2011-07-28 00:20:00 +00:00
|
|
|
write(1,(lcdGetPixel((globalconfig.lcdstate & LCD_MIRRORX)?(RESX-x-1):x,(globalconfig.lcdstate & LCD_MIRRORY)?(RESY-y-1):y)?".":"@"),1);
|
2011-07-19 08:09:03 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
write(1,("\n"),1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
int simButtonPressed(int button) {
|
|
|
|
return 1; // TODO
|
|
|
|
}
|
|
|
|
|
|
|
|
void simSetLEDHook(int led) {
|
|
|
|
// TODO
|
|
|
|
}
|
|
|
|
|
|
|
|
int main(void) {
|
|
|
|
simulator_main();
|
|
|
|
}
|