prng works (almost..) in simulator now, can compile all animations against simulator

This commit is contained in:
tixiv 2008-12-05 14:17:04 +00:00
commit 2e9d997003
15 changed files with 345 additions and 11 deletions

18
compat/eeprom.h Normal file
View file

@ -0,0 +1,18 @@
//EEPPROM compatibility support for simulator
#ifdef AVR
#include <avr/eeprom.h>
#else
#include <stdint.h>
void eeprom_write_byte (uint8_t *p, uint8_t value);
void eeprom_write_word (uint16_t *p, uint16_t value);
uint8_t eeprom_read_byte (const uint8_t *p);
uint16_t eeprom_read_word (const uint16_t *p);
#define eeprom_busy_wait()
#define EEMEM
#endif

3
compat/interrupt.h Normal file
View file

@ -0,0 +1,3 @@
#define sei()
#define cli()

11
compat/pgmspace.h Normal file
View file

@ -0,0 +1,11 @@
//pc compatibility of AVR-pgmspace stuff for compiling simulator
#ifdef AVR
#include <avr/pgmspace.h>
#else
#define PROGMEM
#define strcpy_P strcpy
#define memcpy_P memcpy
#define pgm_read_byte(a) ((*(uint8_t*)(a)))
#define pgm_read_word(a) ((*(uint16_t*)(a)))
#endif