mirror of
https://github.com/jscrane/r65emu.git
synced 2024-12-13 03:29:57 +00:00
filer extends serialio
This commit is contained in:
parent
397f580add
commit
d2377f4dbe
1
acia.cpp
1
acia.cpp
@ -1,6 +1,7 @@
|
||||
#include <stdint.h>
|
||||
|
||||
#include "memory.h"
|
||||
#include "serialio.h"
|
||||
#include "acia.h"
|
||||
|
||||
void acia::operator=(uint8_t b) {
|
||||
|
17
acia.h
17
acia.h
@ -1,23 +1,6 @@
|
||||
#ifndef __ACIA_H__
|
||||
#define __ACIA_H__
|
||||
|
||||
enum parity {
|
||||
none,
|
||||
even,
|
||||
odd,
|
||||
};
|
||||
|
||||
class serialio {
|
||||
public:
|
||||
virtual void reset() {}
|
||||
virtual void framing(unsigned data_bits, unsigned stop_bits, parity p) {}
|
||||
|
||||
virtual void write(uint8_t) {}
|
||||
|
||||
virtual uint8_t read() =0;
|
||||
virtual bool more() { return false; }
|
||||
};
|
||||
|
||||
class acia: public Memory::Device {
|
||||
public:
|
||||
void operator= (uint8_t);
|
||||
|
@ -2,6 +2,7 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "hardware.h"
|
||||
#include "serialio.h"
|
||||
#include "filer.h"
|
||||
#include "checkpoint.h"
|
||||
|
||||
|
@ -11,6 +11,7 @@
|
||||
#include <FS.h>
|
||||
#endif
|
||||
|
||||
#include "serialio.h"
|
||||
#include "filer.h"
|
||||
|
||||
#if defined(DISK)
|
||||
|
4
filer.h
4
filer.h
@ -1,7 +1,7 @@
|
||||
#ifndef __FILER_H__
|
||||
#define __FILER_H__
|
||||
|
||||
class filer {
|
||||
class filer: public serialio {
|
||||
public:
|
||||
virtual const char *advance() =0;
|
||||
virtual const char *rewind() =0;
|
||||
@ -10,6 +10,8 @@ public:
|
||||
virtual void stop() =0;
|
||||
};
|
||||
|
||||
// split into sd_filer and fs_filer
|
||||
// implement write to new file (like checkpoint)
|
||||
class flash_filer: public filer {
|
||||
public:
|
||||
const char *advance();
|
||||
|
1
r65emu.h
1
r65emu.h
@ -9,6 +9,7 @@
|
||||
#include "ps2drv.h"
|
||||
#include "tftdisplay.h"
|
||||
#include "keyboard.h"
|
||||
#include "serialio.h"
|
||||
#include "filer.h"
|
||||
#include "timed.h"
|
||||
#include "hardware.h"
|
||||
|
19
serialio.h
Normal file
19
serialio.h
Normal file
@ -0,0 +1,19 @@
|
||||
#ifndef __SERIALIO_H__
|
||||
#define __SERIALIO_H__
|
||||
|
||||
enum parity {
|
||||
none,
|
||||
even,
|
||||
odd,
|
||||
};
|
||||
|
||||
class serialio {
|
||||
public:
|
||||
virtual void reset() {}
|
||||
virtual void framing(unsigned data_bits, unsigned stop_bits, parity p) {}
|
||||
virtual void write(uint8_t) {}
|
||||
|
||||
virtual uint8_t read() =0;
|
||||
virtual bool more() { return false; }
|
||||
};
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user