1
0
mirror of https://github.com/jscrane/r65emu.git synced 2024-12-21 12:29:51 +00:00
This commit is contained in:
Stephen Crane 2014-11-15 23:24:47 +00:00
parent b7a9efe914
commit a3111fa8a0
2 changed files with 5 additions and 4 deletions

View File

@ -6,6 +6,7 @@ static File file, dir;
void sdtape::start(const char *programs)
{
dir = SD.open(programs);
_pos = _len = 0;
}
void sdtape::stop()

View File

@ -20,18 +20,18 @@ spiram::operator byte()
void spiram::checkpoint(Stream &s)
{
char buf[Memory::page_size];
byte buf[Memory::page_size];
for (int i = 0; i < pages(); i++) {
spiRam.read_stream(i * 256, buf, sizeof(buf));
s.write((byte *)buf, sizeof(buf));
s.write(buf, sizeof(buf));
}
}
void spiram::restore(Stream &s)
{
char buf[Memory::page_size];
byte buf[Memory::page_size];
for (int i = 0; i < pages(); i++) {
s.readBytes(buf, sizeof(buf));
s.readBytes((char *)buf, sizeof(buf));
spiRam.write_stream(i * 256, buf, sizeof(buf));
}
}