2020-01-15 03:23:00 +00:00
|
|
|
//
|
|
|
|
// BD500.hpp
|
|
|
|
// Clock Signal
|
|
|
|
//
|
|
|
|
// Created by Thomas Harte on 14/01/2020.
|
|
|
|
// Copyright © 2020 Thomas Harte. All rights reserved.
|
|
|
|
//
|
|
|
|
|
2024-01-17 04:34:46 +00:00
|
|
|
#pragma once
|
2020-01-15 03:23:00 +00:00
|
|
|
|
|
|
|
#include "../../Components/1770/1770.hpp"
|
|
|
|
#include "../../Activity/Observer.hpp"
|
|
|
|
#include "DiskController.hpp"
|
|
|
|
|
|
|
|
#include <array>
|
|
|
|
#include <memory>
|
|
|
|
|
|
|
|
namespace Oric {
|
|
|
|
|
2020-07-30 01:06:41 +00:00
|
|
|
/*!
|
|
|
|
Emulates a Byte Drive 500, at least to some extent. Very little is known about this interface,
|
|
|
|
and I'm in possession of only a single disk image. So much of the below is community guesswork;
|
|
|
|
see the thread at https://forum.defence-force.org/viewtopic.php?f=25&t=2055
|
|
|
|
*/
|
2020-01-15 04:15:27 +00:00
|
|
|
class BD500: public DiskController {
|
|
|
|
public:
|
|
|
|
BD500();
|
|
|
|
|
|
|
|
void write(int address, uint8_t value);
|
|
|
|
uint8_t read(int address);
|
|
|
|
|
2020-01-15 04:45:36 +00:00
|
|
|
void run_for(const Cycles cycles);
|
|
|
|
|
2020-01-16 04:39:15 +00:00
|
|
|
void set_activity_observer(Activity::Observer *observer);
|
|
|
|
|
2020-01-15 04:15:27 +00:00
|
|
|
private:
|
|
|
|
void set_head_load_request(bool head_load) final;
|
2020-01-15 04:45:36 +00:00
|
|
|
bool is_loading_head_ = false;
|
2020-01-16 04:39:15 +00:00
|
|
|
Activity::Observer *observer_ = nullptr;
|
2020-01-16 04:15:39 +00:00
|
|
|
|
|
|
|
void access(int address);
|
2020-01-16 04:39:15 +00:00
|
|
|
void set_head_loaded(bool loaded);
|
2020-07-30 01:06:41 +00:00
|
|
|
|
|
|
|
bool enable_overlay_ram_ = false;
|
|
|
|
bool disable_basic_rom_ = false;
|
|
|
|
void select_paged_item() {
|
|
|
|
PagedItem item = PagedItem::RAM;
|
|
|
|
if(!enable_overlay_ram_) {
|
|
|
|
item = disable_basic_rom_ ? PagedItem::DiskROM : PagedItem::BASIC;
|
|
|
|
}
|
|
|
|
set_paged_item(item);
|
|
|
|
}
|
2020-01-15 04:15:27 +00:00
|
|
|
};
|
|
|
|
|
2024-01-17 04:34:46 +00:00
|
|
|
}
|