1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-12-28 22:30:30 +00:00

Merge pull request #430 from TomHarte/PravetzPaging

Corrects Pravetz 8DOS startup.
This commit is contained in:
Thomas Harte 2018-05-09 20:30:34 -04:00 committed by GitHub
commit 6bb9b7be04
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 5 deletions

View File

@ -399,7 +399,7 @@ template <Analyser::Static::Oric::Target::DiskInterface disk_interface> class Co
else {
switch(address) {
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;
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 {
int flags = microdisc->get_paging_flags();
if(!(flags&Microdisc::PagingFlags::BASICDisable)) {
ram_top_ = 0xbfff;
ram_top_ = basic_invisible_ram_top_;
paged_rom_ = rom_.data();
} else {
if(flags&Microdisc::PagingFlags::MicrodscDisable) {
ram_top_ = 0xffff;
ram_top_ = basic_visible_ram_top_;
} else {
ram_top_ = 0xdfff;
paged_rom_ = microdisc_rom_.data();
@ -552,6 +552,9 @@ template <Analyser::Static::Oric::Target::DiskInterface disk_interface> class Co
}
private:
const uint16_t basic_invisible_ram_top_ = 0xffff;
const uint16_t basic_visible_ram_top_ = 0xbfff;
CPU::MOS6502::Processor<ConcreteMachine, false> m6502_;
// RAM and ROM
@ -598,7 +601,7 @@ template <Analyser::Static::Oric::Target::DiskInterface disk_interface> class Co
}
// Overlay RAM
uint16_t ram_top_ = 0xbfff;
uint16_t ram_top_ = basic_visible_ram_top_;
uint8_t *paged_rom_ = nullptr;
// Helper to discern current IRQ state

View File

@ -56,7 +56,7 @@ std::shared_ptr<Track> AppleDSK::get_track_at_position(Track::Address address) {
std::size_t sector_number_ = 0;
for(uint8_t c = 0; c < 16; ++c) {
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_data(&track_data[sector_number_ * 256]);