mirror of
https://github.com/TomHarte/CLK.git
synced 2024-07-30 23:29:08 +00:00
MSX: introduces a tape motor LED, and limits the fast-tape hack to the BIOS.
This commit is contained in:
parent
3862a93ff9
commit
ef085e3f93
@ -415,7 +415,7 @@ class ConcreteMachine:
|
|||||||
switch(cycle.operation) {
|
switch(cycle.operation) {
|
||||||
case CPU::Z80::PartialMachineCycle::ReadOpcode:
|
case CPU::Z80::PartialMachineCycle::ReadOpcode:
|
||||||
if(use_fast_tape_) {
|
if(use_fast_tape_) {
|
||||||
if(address == 0x1a63) {
|
if(address == 0x1a63 && read_pointers_[0x1a63 >> 13] == &memory_slots_[0].source[0x1a63 >> 13]) {
|
||||||
// TAPION
|
// TAPION
|
||||||
|
|
||||||
// Enable the tape motor.
|
// Enable the tape motor.
|
||||||
@ -442,7 +442,7 @@ class ConcreteMachine:
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(address == 0x1abc) {
|
if(address == 0x1abc && read_pointers_[0x1a63 >> 13] == &memory_slots_[0].source[0x1a63 >> 13]) {
|
||||||
// TAPIN
|
// TAPIN
|
||||||
|
|
||||||
// Grab the current values of LOWLIM and WINWID.
|
// Grab the current values of LOWLIM and WINWID.
|
||||||
@ -675,6 +675,7 @@ class ConcreteMachine:
|
|||||||
if(disk_rom) {
|
if(disk_rom) {
|
||||||
disk_rom->set_activity_observer(observer);
|
disk_rom->set_activity_observer(observer);
|
||||||
}
|
}
|
||||||
|
i8255_port_handler_.set_activity_observer(observer);
|
||||||
}
|
}
|
||||||
|
|
||||||
// MARK: - Joysticks
|
// MARK: - Joysticks
|
||||||
@ -705,6 +706,7 @@ class ConcreteMachine:
|
|||||||
|
|
||||||
// b4: cassette motor relay
|
// b4: cassette motor relay
|
||||||
tape_player_.set_motor_control(!(value & 0x10));
|
tape_player_.set_motor_control(!(value & 0x10));
|
||||||
|
activity_observer_->set_led_status("Tape motor", !(value & 0x10));
|
||||||
|
|
||||||
// b7: keyboard click
|
// b7: keyboard click
|
||||||
bool new_audio_level = !!(value & 0x80);
|
bool new_audio_level = !!(value & 0x80);
|
||||||
@ -727,10 +729,19 @@ class ConcreteMachine:
|
|||||||
return 0xff;
|
return 0xff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void set_activity_observer(Activity::Observer *observer) {
|
||||||
|
activity_observer_ = observer;
|
||||||
|
if(activity_observer_) {
|
||||||
|
activity_observer_->register_led("Tape motor");
|
||||||
|
activity_observer_->set_led_status("Tape motor", tape_player_.get_motor_control());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ConcreteMachine &machine_;
|
ConcreteMachine &machine_;
|
||||||
Audio::Toggle &audio_toggle_;
|
Audio::Toggle &audio_toggle_;
|
||||||
Storage::Tape::BinaryTapePlayer &tape_player_;
|
Storage::Tape::BinaryTapePlayer &tape_player_;
|
||||||
|
Activity::Observer *activity_observer_ = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
CPU::Z80::Processor<ConcreteMachine, false, false> z80_;
|
CPU::Z80::Processor<ConcreteMachine, false, false> z80_;
|
||||||
|
Loading…
Reference in New Issue
Block a user