mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-25 16:31:42 +00:00
It would appear the 1770 and 1773 actually differ in relation to the (non-sensical) ability not to spin-up for a Type 2, and whether a side compare can occur. So the WD1770 class now requires a personality to be specified. Which it singly fails to honour.
This commit is contained in:
parent
d8ecc52de8
commit
2f459690d4
@ -11,7 +11,7 @@
|
||||
|
||||
using namespace WD;
|
||||
|
||||
WD1770::WD1770() :
|
||||
WD1770::WD1770(Personality p) :
|
||||
Storage::Disk::Controller(8000000, 16, 300),
|
||||
status_(0),
|
||||
interesting_event_mask_(Event::Command),
|
||||
@ -22,7 +22,8 @@ WD1770::WD1770() :
|
||||
is_reading_data_(false),
|
||||
interrupt_request_line_(false),
|
||||
data_request_line_(false),
|
||||
delegate_(nullptr)
|
||||
delegate_(nullptr),
|
||||
personality_(p)
|
||||
{
|
||||
set_is_double_density(false);
|
||||
posit_event(Event::Command);
|
||||
|
@ -15,7 +15,11 @@ namespace WD {
|
||||
|
||||
class WD1770: public Storage::Disk::Controller {
|
||||
public:
|
||||
WD1770();
|
||||
enum Personality {
|
||||
P1770,
|
||||
P1773
|
||||
};
|
||||
WD1770(Personality p);
|
||||
|
||||
void set_is_double_density(bool is_double_density);
|
||||
void set_register(int address, uint8_t value);
|
||||
@ -48,6 +52,8 @@ class WD1770: public Storage::Disk::Controller {
|
||||
inline void set_delegate(Delegate *delegate) { delegate_ = delegate; }
|
||||
|
||||
private:
|
||||
Personality personality_;
|
||||
|
||||
uint8_t status_;
|
||||
uint8_t track_;
|
||||
uint8_t sector_;
|
||||
|
@ -10,6 +10,8 @@
|
||||
|
||||
using namespace Electron;
|
||||
|
||||
Plus3::Plus3() : WD1770(P1770) {}
|
||||
|
||||
void Plus3::set_disk(std::shared_ptr<Storage::Disk::Disk> disk, int drive)
|
||||
{
|
||||
if(!drives_[drive])
|
||||
|
@ -15,6 +15,8 @@ namespace Electron {
|
||||
|
||||
class Plus3 : public WD::WD1770 {
|
||||
public:
|
||||
Plus3();
|
||||
|
||||
void set_disk(std::shared_ptr<Storage::Disk::Disk> disk, int drive);
|
||||
void set_control_register(uint8_t control);
|
||||
|
||||
|
@ -13,7 +13,8 @@ using namespace Oric;
|
||||
Microdisc::Microdisc() :
|
||||
irq_enable_(false),
|
||||
delegate_(nullptr),
|
||||
paging_flags_(BASICDisable)
|
||||
paging_flags_(BASICDisable),
|
||||
WD1770(P1773)
|
||||
{}
|
||||
|
||||
void Microdisc::set_disk(std::shared_ptr<Storage::Disk::Disk> disk, int drive)
|
||||
|
Loading…
Reference in New Issue
Block a user