Simple simulation code
Builds a native program on MacOS that runs the NuEVI firmware compiled for x86_64. Only input is arrow keys for menu buttons for now. Only output is console and display. Copied some more library files into the simulation folder, and renamed the modified *.cpp files from the libraries to *_sim.cpp.
This commit is contained in:
parent
c9123b746f
commit
266b3334cb
30 changed files with 8532 additions and 0 deletions
30
simulation/src/simeeprom.cpp
Normal file
30
simulation/src/simeeprom.cpp
Normal file
|
@ -0,0 +1,30 @@
|
|||
|
||||
#include <stdint.h>
|
||||
#include "EEPROM.h"
|
||||
|
||||
// TODO: Fake eeprom a bit better, maybe even save to file.
|
||||
|
||||
static char someFakeEEPROM_memory[4096];
|
||||
|
||||
|
||||
uint8_t EEPROMClass::read( int idx )
|
||||
{
|
||||
return someFakeEEPROM_memory[idx];
|
||||
}
|
||||
|
||||
|
||||
void EEPROMClass::write( int idx, uint8_t val )
|
||||
{
|
||||
someFakeEEPROM_memory[idx] = val;
|
||||
}
|
||||
|
||||
void EEPROMClass::update( int idx, uint8_t val )
|
||||
{
|
||||
someFakeEEPROM_memory[idx] = val;
|
||||
}
|
||||
uint16_t EEPROMClass::length()
|
||||
{
|
||||
return sizeof(someFakeEEPROM_memory);
|
||||
}
|
||||
|
||||
// TODO: Add missing functioality..
|
Loading…
Add table
Add a link
Reference in a new issue