mirror of https://github.com/jscrane/r65emu.git
return status from tape start
This commit is contained in:
parent
0d307290ae
commit
14d3ad3e69
|
@ -12,10 +12,14 @@
|
||||||
|
|
||||||
static File file, dir;
|
static File file, dir;
|
||||||
|
|
||||||
void sdtape::start(const char *programs)
|
bool sdtape::start(const char *programs)
|
||||||
{
|
{
|
||||||
dir = DISK.open(programs);
|
dir = DISK.open(programs);
|
||||||
|
if (!dir)
|
||||||
|
return false;
|
||||||
|
|
||||||
_pos = _len = 0;
|
_pos = _len = 0;
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void sdtape::stop()
|
void sdtape::stop()
|
||||||
|
|
6
sdtape.h
6
sdtape.h
|
@ -6,16 +6,14 @@ public:
|
||||||
const char *advance();
|
const char *advance();
|
||||||
const char *rewind();
|
const char *rewind();
|
||||||
|
|
||||||
void start(const char *);
|
bool start(const char *);
|
||||||
void stop();
|
void stop();
|
||||||
|
|
||||||
sdtape(): _pos(0), _len(0) {}
|
|
||||||
|
|
||||||
uint8_t read() { return _buf[_pos++]; }
|
uint8_t read() { return _buf[_pos++]; }
|
||||||
bool more();
|
bool more();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
unsigned int _pos, _len;
|
unsigned _pos, _len;
|
||||||
uint8_t _buf[128];
|
uint8_t _buf[128];
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue