From c73efc8d09aff6cb62b3773c068a78d23e9be461 Mon Sep 17 00:00:00 2001 From: Stephen Crane Date: Wed, 13 Feb 2019 07:47:59 +0000 Subject: [PATCH] sdtape -> filer --- apple1.ino | 10 +++++----- io.cpp | 11 ++++++----- io.h | 2 +- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/apple1.ino b/apple1.ino index 76452af..48aa0c2 100644 --- a/apple1.ino +++ b/apple1.ino @@ -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); diff --git a/io.cpp b/io.cpp index f229527..fa2e124 100644 --- a/io.cpp +++ b/io.cpp @@ -2,7 +2,8 @@ #include #include #include -#include +#include +#include #include #include @@ -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; } diff --git a/io.h b/io.h index dda30fa..3effc4f 100644 --- a/io.h +++ b/io.h @@ -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);