Skip to content

Commit

Permalink
sinclair/beta_m.cpp: allow to use turbo clock for wd179x (#12531)
Browse files Browse the repository at this point in the history
  • Loading branch information
holub authored Jul 4, 2024
1 parent bcb1756 commit 5985cbf
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/mame/sinclair/beta_m.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,14 @@ void beta_disk_device::data_w(uint8_t data)
}
}

void beta_disk_device::turbo_w(int state)
{
if (m_betadisk_active == 1)
{
m_wd179x->set_clock_scale(1 << (state & 1));
}
}

void beta_disk_device::fdc_hld_w(int state)
{
m_wd179x->set_force_ready(state); // HLD connected to RDY pin
Expand Down Expand Up @@ -206,6 +214,7 @@ void beta_disk_device::floppy_formats(format_registration &fr)
static void beta_disk_floppies(device_slot_interface &device)
{
device.option_add("525qd", FLOPPY_525_QD);
device.option_add("35hd", FLOPPY_35_HD);
}


Expand Down
1 change: 1 addition & 0 deletions src/mame/sinclair/beta_m.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ class beta_disk_device : public device_t
void track_w(uint8_t data);
void sector_w(uint8_t data);
void data_w(uint8_t data);
void turbo_w(int state);

int is_active();
void enable();
Expand Down
2 changes: 2 additions & 0 deletions src/mame/sinclair/sprinter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -686,6 +686,8 @@ void sprinter_state::dcp_w(offs_t offset, u8 data)
m_beta->param_w(data);
break;
case 0x16:
case 0x17:
m_beta->turbo_w(dcpp & 1);
if (data & 2)
m_beta->disable();
else
Expand Down

0 comments on commit 5985cbf

Please sign in to comment.