mirror of
https://github.com/TomHarte/CLK.git
synced 2025-11-24 13:17:41 +00:00
Merge pull request #1630 from TomHarte/DNFS
Add DFS 0.9 to ROM catalogue; restrict CRTC pointer size.
This commit is contained in:
@@ -76,7 +76,7 @@ public:
|
|||||||
CRTC6845(BusHandlerT &bus_handler) noexcept :
|
CRTC6845(BusHandlerT &bus_handler) noexcept :
|
||||||
bus_handler_(bus_handler), status_(0) {}
|
bus_handler_(bus_handler), status_(0) {}
|
||||||
|
|
||||||
void select_register(uint8_t r) {
|
void select_register(const uint8_t r) {
|
||||||
selected_register_ = r;
|
selected_register_ = r;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -101,11 +101,11 @@ public:
|
|||||||
// Per the BBC Wiki, attempting to read such a register results in 0.
|
// Per the BBC Wiki, attempting to read such a register results in 0.
|
||||||
if(selected_register_ < 12 || selected_register_ > 17) return 0x00;
|
if(selected_register_ < 12 || selected_register_ > 17) return 0x00;
|
||||||
|
|
||||||
return registers_[selected_register_];
|
return registers_[selected_register_.get()];
|
||||||
}
|
}
|
||||||
|
|
||||||
void set_register(const uint8_t value) {
|
void set_register(const uint8_t value) {
|
||||||
switch(selected_register_) {
|
switch(selected_register_.get()) {
|
||||||
case 0: layout_.horizontal.total = value; break;
|
case 0: layout_.horizontal.total = value; break;
|
||||||
case 1: layout_.horizontal.displayed = value; break;
|
case 1: layout_.horizontal.displayed = value; break;
|
||||||
case 2: layout_.horizontal.start_sync = value; break;
|
case 2: layout_.horizontal.start_sync = value; break;
|
||||||
@@ -168,9 +168,9 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
if(selected_register_ < 16) {
|
if(selected_register_ < 16) {
|
||||||
registers_[selected_register_] = value & masks[selected_register_];
|
registers_[selected_register_.get()] = value & masks[selected_register_.get()];
|
||||||
}
|
}
|
||||||
if(selected_register_ == 31 && personality == Personality::UM6845R) {
|
if(selected_register_.get() == 31 && personality == Personality::UM6845R) {
|
||||||
dummy_register_ = value;
|
dummy_register_ = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -492,9 +492,6 @@ private:
|
|||||||
/// Provide interlaced sync and scan even/odd lines depending on field.
|
/// Provide interlaced sync and scan even/odd lines depending on field.
|
||||||
SyncAndVideo,
|
SyncAndVideo,
|
||||||
};
|
};
|
||||||
enum class BlinkMode {
|
|
||||||
// TODO.
|
|
||||||
};
|
|
||||||
|
|
||||||
// Comments on the right provide the corresponding signal name in hoglet's VHDL implementation.
|
// Comments on the right provide the corresponding signal name in hoglet's VHDL implementation.
|
||||||
struct {
|
struct {
|
||||||
@@ -527,7 +524,7 @@ private:
|
|||||||
|
|
||||||
uint8_t registers_[18]{};
|
uint8_t registers_[18]{};
|
||||||
uint8_t dummy_register_ = 0;
|
uint8_t dummy_register_ = 0;
|
||||||
int selected_register_ = 0;
|
Numeric::SizedInt<5> selected_register_ = 0;
|
||||||
|
|
||||||
CharacterAddress character_counter_; // h_counter
|
CharacterAddress character_counter_; // h_counter
|
||||||
Numeric::SizedInt<3> character_reset_history_; // sol
|
Numeric::SizedInt<3> character_reset_history_; // sol
|
||||||
|
|||||||
@@ -766,7 +766,7 @@ public:
|
|||||||
|
|
||||||
auto request = Request(Name::AcornBASICII) && Request(Name::BBCMicroMOS12);
|
auto request = Request(Name::AcornBASICII) && Request(Name::BBCMicroMOS12);
|
||||||
if(target.has_1770dfs || tube_processor != TubeProcessor::None) {
|
if(target.has_1770dfs || tube_processor != TubeProcessor::None) {
|
||||||
request = request && Request(Name::BBCMicroDFS226);
|
request = request && Request(Name::BBCMicro1770DFS226);
|
||||||
}
|
}
|
||||||
if(target.has_adfs) {
|
if(target.has_adfs) {
|
||||||
request = request && Request(Name::BBCMicroADFS130);
|
request = request && Request(Name::BBCMicroADFS130);
|
||||||
@@ -794,13 +794,13 @@ public:
|
|||||||
install_sideways(fs_slot--, roms.find(name)->second, false);
|
install_sideways(fs_slot--, roms.find(name)->second, false);
|
||||||
};
|
};
|
||||||
if(target.has_1770dfs) {
|
if(target.has_1770dfs) {
|
||||||
add_sideways(Name::BBCMicroDFS226);
|
add_sideways(Name::BBCMicro1770DFS226);
|
||||||
}
|
}
|
||||||
if(target.has_adfs) {
|
if(target.has_adfs) {
|
||||||
add_sideways(Name::BBCMicroADFS130);
|
add_sideways(Name::BBCMicroADFS130);
|
||||||
}
|
}
|
||||||
if(!target.has_1770dfs && tube_processor != TubeProcessor::None) {
|
if(!target.has_1770dfs && tube_processor != TubeProcessor::None) {
|
||||||
add_sideways(Name::BBCMicroDFS226);
|
add_sideways(Name::BBCMicro1770DFS226);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Throw the tube ROM to its target.
|
// Throw the tube ROM to its target.
|
||||||
@@ -1195,8 +1195,12 @@ private:
|
|||||||
rom_write_masks_[slot] = is_writeable;
|
rom_write_masks_[slot] = is_writeable;
|
||||||
rom_inserted_[slot] = true;
|
rom_inserted_[slot] = true;
|
||||||
|
|
||||||
assert(source.size() == roms_[slot].size());
|
assert(roms_[slot].size() % source.size() == 0);
|
||||||
std::copy(source.begin(), source.end(), roms_[slot].begin());
|
auto begin = roms_[slot].begin();
|
||||||
|
while(begin != roms_[slot].end()) {
|
||||||
|
std::copy(source.begin(), source.end(), begin);
|
||||||
|
std::advance(begin, source.size());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// MARK: - Components.
|
// MARK: - Components.
|
||||||
|
|||||||
@@ -430,7 +430,15 @@ const std::vector<Description> &Description::all_roms() {
|
|||||||
0x3c14fc70u
|
0x3c14fc70u
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
BBCMicroDFS226,
|
BBCMicro8271DFS09,
|
||||||
|
"BBCMicro",
|
||||||
|
"the Acorn 8271 DFS 0.9 ROM",
|
||||||
|
"dfs09.rom",
|
||||||
|
8_kb,
|
||||||
|
0x3ce609cfu
|
||||||
|
},
|
||||||
|
{
|
||||||
|
BBCMicro1770DFS226,
|
||||||
"BBCMicro",
|
"BBCMicro",
|
||||||
"the Acorn 1770 DFS 2.26 ROM",
|
"the Acorn 1770 DFS 2.26 ROM",
|
||||||
"dfs-2.26.rom",
|
"dfs-2.26.rom",
|
||||||
|
|||||||
@@ -82,7 +82,8 @@ enum Name {
|
|||||||
|
|
||||||
// BBC Micro.
|
// BBC Micro.
|
||||||
BBCMicroMOS12,
|
BBCMicroMOS12,
|
||||||
BBCMicroDFS226,
|
BBCMicro8271DFS09,
|
||||||
|
BBCMicro1770DFS226,
|
||||||
BBCMicroADFS130,
|
BBCMicroADFS130,
|
||||||
BBCMicroAdvancedDiscToolkit140,
|
BBCMicroAdvancedDiscToolkit140,
|
||||||
BBCMicro6502Tube110,
|
BBCMicro6502Tube110,
|
||||||
|
|||||||
Reference in New Issue
Block a user