sdtape -> filer

This commit is contained in:
Stephen Crane 2019-02-13 07:47:59 +00:00
parent 4f4955b2fb
commit c73efc8d09
3 changed files with 12 additions and 11 deletions

View File

@ -29,7 +29,7 @@ void reset() {
io.reset();
if (sd)
io.tape.start(PROGRAMS);
io.files.start(PROGRAMS);
else
io.status("No SD Card");
}
@ -67,22 +67,22 @@ void loop() {
reset();
break;
case PS2_F2:
filename = io.tape.advance();
filename = io.files.advance();
io.status(filename);
break;
case PS2_F3:
filename = io.tape.rewind();
filename = io.files.rewind();
io.status(filename);
break;
case PS2_F4:
io.load();
break;
case PS2_F6:
io.status(checkpoint(io.tape, PROGRAMS));
io.status(io.files.checkpoint());
break;
case PS2_F7:
if (filename)
restore(io.tape, PROGRAMS, filename);
io.files.restore(filename);
break;
default:
io.up(key);

11
io.cpp
View File

@ -2,7 +2,8 @@
#include <stdint.h>
#include <memory.h>
#include <tftdisplay.h>
#include <sdtape.h>
#include <serialio.h>
#include <filer.h>
#include <keyboard.h>
#include <timed.h>
@ -31,9 +32,9 @@ void io::reset() {
}
void io::load() {
if (tape.more()) {
if (files.more()) {
_loading = true;
enter(tape.read());
enter(files.read());
}
}
@ -150,8 +151,8 @@ uint8_t io::read_porta_cr() {
return b;
if (_loading) {
if (tape.more())
enter(tape.read());
if (files.more())
enter(files.read());
else
_loading = false;
}

2
io.h
View File

@ -15,7 +15,7 @@ public:
virtual uint8_t read_porta_cr();
void load();
sdtape tape;
flash_filer files;
private:
void display(uint8_t);
void draw(char, int, int);