1
0
mirror of https://github.com/jscrane/r65emu.git synced 2024-11-16 21:10:58 +00:00

return status from tape start

This commit is contained in:
Stephen Crane 2018-09-06 14:21:17 +01:00
parent 0d307290ae
commit 14d3ad3e69
2 changed files with 7 additions and 5 deletions

View File

@ -12,10 +12,14 @@
static File file, dir;
void sdtape::start(const char *programs)
bool sdtape::start(const char *programs)
{
dir = DISK.open(programs);
if (!dir)
return false;
_pos = _len = 0;
return true;
}
void sdtape::stop()

View File

@ -6,16 +6,14 @@ public:
const char *advance();
const char *rewind();
void start(const char *);
bool start(const char *);
void stop();
sdtape(): _pos(0), _len(0) {}
uint8_t read() { return _buf[_pos++]; }
bool more();
private:
unsigned int _pos, _len;
unsigned _pos, _len;
uint8_t _buf[128];
};
#endif