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

Reintroduces an empty second drive.

This prevents the uninitialised disk error. Which is a clue.
This commit is contained in:
Thomas Harte 2019-07-02 16:59:00 -04:00
parent 387be4a0a6
commit 191a7a9386
2 changed files with 12 additions and 4 deletions

View File

@ -8,7 +8,6 @@
#include "IWM.hpp" #include "IWM.hpp"
//#define NDEBUG
#include "../../Outputs/Log.hpp" #include "../../Outputs/Log.hpp"
using namespace Apple; using namespace Apple;
@ -157,6 +156,11 @@ uint8_t IWM::read(int address) {
sense = drives_[active_drive_] && (drives_[active_drive_]->get_head_count() == 1) ? 0 : 1; sense = drives_[active_drive_] && (drives_[active_drive_]->get_head_count() == 1) ? 0 : 1;
break; break;
case CA1|CA0:
LOG("1|0 experimental)");
sense = 0;
break;
case CA2|CA1|CA0: // "Present/HD" (per the Mac Plus ROM) case CA2|CA1|CA0: // "Present/HD" (per the Mac Plus ROM)
// (0 = ??HD??) // (0 = ??HD??)
LOG("present/HD)"); LOG("present/HD)");

View File

@ -106,7 +106,7 @@ template <Analyser::Static::Macintosh::Target::Model model> class ConcreteMachin
// Attach the drives to the IWM. // Attach the drives to the IWM.
iwm_.iwm.set_drive(0, &drives_[0]); iwm_.iwm.set_drive(0, &drives_[0]);
// iwm_.iwm.set_drive(1, &drives_[1]); iwm_.iwm.set_drive(1, &drives_[1]);
// The Mac runs at 7.8336mHz. // The Mac runs at 7.8336mHz.
set_clock_rate(double(CLOCK_RATE)); set_clock_rate(double(CLOCK_RATE));
@ -180,6 +180,7 @@ template <Analyser::Static::Macintosh::Target::Model model> class ConcreteMachin
via_.set_control_line_input(MOS::MOS6522::Port::A, MOS::MOS6522::Line::One, !video_.vsync()); via_.set_control_line_input(MOS::MOS6522::Port::A, MOS::MOS6522::Line::One, !video_.vsync());
// Update interrupt input. TODO: move this into a VIA/etc delegate callback? // Update interrupt input. TODO: move this into a VIA/etc delegate callback?
// Double TODO: does this really cascade like this?
if(scc_.get_interrupt_line()) { if(scc_.get_interrupt_line()) {
mc68000_.set_interrupt_level(2); mc68000_.set_interrupt_level(2);
} else if(via_.get_interrupt_line()) { } else if(via_.get_interrupt_line()) {
@ -327,8 +328,11 @@ template <Analyser::Static::Macintosh::Target::Model model> class ConcreteMachin
break; break;
} }
// if(!(operation & Microcycle::Read) && (word_address == (0x0000182e >> 1))) { // if(!(operation & Microcycle::Read) && (word_address == (0x00000172 >> 1))) {
// printf("Write to 0000182e: %04x from %08x\n", cycle.value->full, mc68000_.get_state().program_counter); // if(operation & Microcycle::SelectByte)
// printf("MBState: %02x\n", cycle.value->halves.low);
// else
// printf("MBState: %04x\n", cycle.value->full);
// } // }
// if( // if(
// ( // (