mirror of
https://github.com/TomHarte/CLK.git
synced 2024-07-11 04:28:58 +00:00
Merge pull request #430 from TomHarte/PravetzPaging
Corrects Pravetz 8DOS startup.
This commit is contained in:
commit
6bb9b7be04
@ -399,7 +399,7 @@ template <Analyser::Static::Oric::Target::DiskInterface disk_interface> class Co
|
|||||||
else {
|
else {
|
||||||
switch(address) {
|
switch(address) {
|
||||||
case 0x380: case 0x381: case 0x382: case 0x383:
|
case 0x380: case 0x381: case 0x382: case 0x383:
|
||||||
ram_top_ = (address&1) ? 0xffff : 0xbfff;
|
ram_top_ = (address&1) ? basic_invisible_ram_top_ : basic_visible_ram_top_;
|
||||||
pravetz_rom_base_pointer_ = (address&2) ? 0x100 : 0x000;
|
pravetz_rom_base_pointer_ = (address&2) ? 0x100 : 0x000;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -496,11 +496,11 @@ template <Analyser::Static::Oric::Target::DiskInterface disk_interface> class Co
|
|||||||
void microdisc_did_change_paging_flags(class Microdisc *microdisc) override final {
|
void microdisc_did_change_paging_flags(class Microdisc *microdisc) override final {
|
||||||
int flags = microdisc->get_paging_flags();
|
int flags = microdisc->get_paging_flags();
|
||||||
if(!(flags&Microdisc::PagingFlags::BASICDisable)) {
|
if(!(flags&Microdisc::PagingFlags::BASICDisable)) {
|
||||||
ram_top_ = 0xbfff;
|
ram_top_ = basic_invisible_ram_top_;
|
||||||
paged_rom_ = rom_.data();
|
paged_rom_ = rom_.data();
|
||||||
} else {
|
} else {
|
||||||
if(flags&Microdisc::PagingFlags::MicrodscDisable) {
|
if(flags&Microdisc::PagingFlags::MicrodscDisable) {
|
||||||
ram_top_ = 0xffff;
|
ram_top_ = basic_visible_ram_top_;
|
||||||
} else {
|
} else {
|
||||||
ram_top_ = 0xdfff;
|
ram_top_ = 0xdfff;
|
||||||
paged_rom_ = microdisc_rom_.data();
|
paged_rom_ = microdisc_rom_.data();
|
||||||
@ -552,6 +552,9 @@ template <Analyser::Static::Oric::Target::DiskInterface disk_interface> class Co
|
|||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
const uint16_t basic_invisible_ram_top_ = 0xffff;
|
||||||
|
const uint16_t basic_visible_ram_top_ = 0xbfff;
|
||||||
|
|
||||||
CPU::MOS6502::Processor<ConcreteMachine, false> m6502_;
|
CPU::MOS6502::Processor<ConcreteMachine, false> m6502_;
|
||||||
|
|
||||||
// RAM and ROM
|
// RAM and ROM
|
||||||
@ -598,7 +601,7 @@ template <Analyser::Static::Oric::Target::DiskInterface disk_interface> class Co
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Overlay RAM
|
// Overlay RAM
|
||||||
uint16_t ram_top_ = 0xbfff;
|
uint16_t ram_top_ = basic_visible_ram_top_;
|
||||||
uint8_t *paged_rom_ = nullptr;
|
uint8_t *paged_rom_ = nullptr;
|
||||||
|
|
||||||
// Helper to discern current IRQ state
|
// Helper to discern current IRQ state
|
||||||
|
@ -56,7 +56,7 @@ std::shared_ptr<Track> AppleDSK::get_track_at_position(Track::Address address) {
|
|||||||
std::size_t sector_number_ = 0;
|
std::size_t sector_number_ = 0;
|
||||||
for(uint8_t c = 0; c < 16; ++c) {
|
for(uint8_t c = 0; c < 16; ++c) {
|
||||||
segment += Encodings::AppleGCR::six_and_two_sync(10);
|
segment += Encodings::AppleGCR::six_and_two_sync(10);
|
||||||
segment += Encodings::AppleGCR::header(0, track, c);
|
segment += Encodings::AppleGCR::header(254, track, c);
|
||||||
segment += Encodings::AppleGCR::six_and_two_sync(10);
|
segment += Encodings::AppleGCR::six_and_two_sync(10);
|
||||||
segment += Encodings::AppleGCR::six_and_two_data(&track_data[sector_number_ * 256]);
|
segment += Encodings::AppleGCR::six_and_two_data(&track_data[sector_number_ * 256]);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user