mirror of
https://github.com/TomHarte/CLK.git
synced 2025-01-26 15:32:04 +00:00
Devolve memory location and font ROM decision.
This commit is contained in:
parent
dd04909d58
commit
fd8afb6668
@ -11,6 +11,7 @@
|
||||
|
||||
#include "../../Components/6845/CRTC6845.hpp"
|
||||
#include "../../Outputs/CRT/CRT.hpp"
|
||||
#include "../../Machines/Utility/ROMCatalogue.hpp"
|
||||
|
||||
namespace PCCompatible {
|
||||
|
||||
@ -18,6 +19,9 @@ class MDA {
|
||||
public:
|
||||
MDA() : crtc_(Motorola::CRTC::Personality::HD6845S, outputter_) {}
|
||||
|
||||
static constexpr uint32_t BaseAddress = 0xb'0000;
|
||||
static constexpr auto FontROM = ROM::Name::PCCompatibleMDAFont;
|
||||
|
||||
void set_source(const uint8_t *ram, std::vector<uint8_t> font) {
|
||||
outputter_.ram = ram;
|
||||
outputter_.font = font;
|
||||
|
@ -55,7 +55,7 @@ template <> struct Adaptor<VideoAdaptor::MDA> {
|
||||
using type = MDA;
|
||||
};
|
||||
template <> struct Adaptor<VideoAdaptor::CGA> {
|
||||
using type = MDA;
|
||||
using type = MDA; // TODO: CGA.
|
||||
};
|
||||
|
||||
class FloppyController {
|
||||
@ -892,7 +892,7 @@ class ConcreteMachine:
|
||||
|
||||
// Fetch the BIOS. [8088 only, for now]
|
||||
const auto bios = ROM::Name::PCCompatibleGLaBIOS;
|
||||
const auto font = ROM::Name::PCCompatibleMDAFont; // ... or CGA.
|
||||
const auto font = Video::FontROM;
|
||||
|
||||
ROM::Request request = ROM::Request(bios) && ROM::Request(font);
|
||||
auto roms = rom_fetcher(request);
|
||||
@ -905,7 +905,7 @@ class ConcreteMachine:
|
||||
|
||||
// Give the video card something to read from.
|
||||
const auto &font_contents = roms.find(font)->second;
|
||||
video_.set_source(context.memory.at(0xb'0000), font_contents); // TODO: get RAM base address from the card.
|
||||
video_.set_source(context.memory.at(Video::BaseAddress), font_contents);
|
||||
|
||||
// ... and insert media.
|
||||
insert_media(target.media);
|
||||
|
Loading…
x
Reference in New Issue
Block a user