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-08-01 04:13:29 +00:00
|
|
|
#include "../firmware/basic/config.h"
|
2011-07-19 08:09:03 +00:00
|
|
|
#include "../firmware/lcd/display.h"
|
|
|
|
|
|
|
|
#include <unistd.h>
|
|
|
|
|
|
|
|
void simlcdDisplayUpdate() {
|
|
|
|
write(1,"\033[H",3);
|
2011-08-01 02:23:50 +00:00
|
|
|
const char* symbolOff=GLOBAL(lcdinvert)?"_":"@";
|
|
|
|
const char* symbolOn=GLOBAL(lcdinvert)?"#":".";
|
|
|
|
|
2011-07-19 08:09:03 +00:00
|
|
|
for(int y=0; y<RESY; ++y) {
|
|
|
|
for(int x=0; x<RESX; ++x) {
|
2011-08-01 14:51:14 +00:00
|
|
|
write(1,(lcdGetPixel((GLOBAL(lcdmirror) /* LCD_MIRRORX */ )?(RESX-x-1):x,(0 /* & LCD_MIRRORY */)?(RESY-y-1):y)?symbolOn:symbolOff),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();
|
|
|
|
}
|