Added 8" DSSD floppy type, WD177x inverted bus, and fixed DSKCHG signal. (nw)

This commit is contained in:
Curt Coder 2012-11-29 18:55:10 +00:00
parent 3a4f79ac36
commit ab2c58ca71
4 changed files with 67 additions and 7 deletions

View File

@ -27,6 +27,7 @@ const device_type FLOPPY_525_DD = &device_creator<floppy_525_dd>;
const device_type FLOPPY_525_QD = &device_creator<floppy_525_qd>;
const device_type FLOPPY_525_HD = &device_creator<floppy_525_hd>;
const device_type FLOPPY_8_SSSD = &device_creator<floppy_8_sssd>;
const device_type FLOPPY_8_DSSD = &device_creator<floppy_8_dssd>;
const device_type FLOPPY_8_SSDD = &device_creator<floppy_8_ssdd>;
const device_type FLOPPY_8_DSDD = &device_creator<floppy_8_dsdd>;
@ -201,7 +202,7 @@ void floppy_image_device::device_start()
cyl = 0;
ss = 0;
stp = 1;
dskchg = 0;
dskchg = exists() ? 1 : 0;
index_timer = timer_alloc(0);
image_dirty = false;
}
@ -364,6 +365,7 @@ void floppy_image_device::index_resync()
if(new_idx != idx) {
idx = new_idx;
if (!cur_index_pulse_cb.isnull())
cur_index_pulse_cb(this, idx);
}
@ -1142,7 +1144,7 @@ void floppy_525_hd::handled_variants(UINT32 *variants, int &var_count) const
}
floppy_8_sssd::floppy_8_sssd(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
floppy_image_device(mconfig, FLOPPY_8_SSSD, "8\" single density floppy drive", tag, owner, clock)
floppy_image_device(mconfig, FLOPPY_8_SSSD, "8\" single density single sided floppy drive", tag, owner, clock)
{
}
@ -1165,6 +1167,31 @@ void floppy_8_sssd::handled_variants(UINT32 *variants, int &var_count) const
variants[var_count++] = floppy_image::SSSD;
}
floppy_8_dssd::floppy_8_dssd(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
floppy_image_device(mconfig, FLOPPY_8_SSSD, "8\" single density double sided floppy drive", tag, owner, clock)
{
}
floppy_8_dssd::~floppy_8_dssd()
{
}
void floppy_8_dssd::setup_characteristics()
{
form_factor = floppy_image::FF_8;
tracks = 77;
sides = 2;
motor_always_on = true;
set_rpm(360);
}
void floppy_8_dssd::handled_variants(UINT32 *variants, int &var_count) const
{
var_count = 0;
variants[var_count++] = floppy_image::SSSD;
variants[var_count++] = floppy_image::DSSD;
}
floppy_8_ssdd::floppy_8_ssdd(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
floppy_image_device(mconfig, FLOPPY_8_DSDD, "8\" double density single sided floppy drive", tag, owner, clock)
{

View File

@ -352,6 +352,17 @@ protected:
virtual void setup_characteristics();
};
class floppy_8_dssd : public floppy_image_device {
public:
floppy_8_dssd(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
virtual ~floppy_8_dssd();
virtual void handled_variants(UINT32 *variants, int &var_count) const;
virtual void device_config_complete() { m_shortname = "floppy_8_dssd"; }
virtual const char *image_interface() const { return "floppy_8"; }
protected:
virtual void setup_characteristics();
};
class floppy_8_ssdd : public floppy_image_device {
public:
floppy_8_ssdd(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
@ -410,6 +421,7 @@ extern const device_type FLOPPY_525_DD;
extern const device_type FLOPPY_525_QD;
extern const device_type FLOPPY_525_HD;
extern const device_type FLOPPY_8_SSSD;
extern const device_type FLOPPY_8_DSSD;
extern const device_type FLOPPY_8_SSDD;
extern const device_type FLOPPY_8_DSDD;

View File

@ -875,6 +875,8 @@ void wd_fdc_t::do_cmd_w()
void wd_fdc_t::cmd_w(UINT8 val)
{
if (inverted_bus) val ^= 0xff;
logerror("wd1772 cmd: %02x\n", val);
if(intrq && !(intrq_cond & I_IMM)) {
@ -929,7 +931,10 @@ UINT8 wd_fdc_t::status_r()
status &= ~S_NRDY;
}
return status;
UINT8 val = status;
if (inverted_bus) val ^= 0xff;
return val;
}
void wd_fdc_t::do_track_w()
@ -940,6 +945,8 @@ void wd_fdc_t::do_track_w()
void wd_fdc_t::track_w(UINT8 val)
{
if (inverted_bus) val ^= 0xff;
// No more than one write in flight
if(track_buffer != -1)
return;
@ -950,7 +957,10 @@ void wd_fdc_t::track_w(UINT8 val)
UINT8 wd_fdc_t::track_r()
{
return track;
UINT8 val = track;
if (inverted_bus) val ^= 0xff;
return val;
}
void wd_fdc_t::do_sector_w()
@ -961,6 +971,8 @@ void wd_fdc_t::do_sector_w()
void wd_fdc_t::sector_w(UINT8 val)
{
if (inverted_bus) val ^= 0xff;
// No more than one write in flight
if(sector_buffer != -1)
return;
@ -971,11 +983,16 @@ void wd_fdc_t::sector_w(UINT8 val)
UINT8 wd_fdc_t::sector_r()
{
return sector;
UINT8 val = sector;
if (inverted_bus) val ^= 0xff;
return val;
}
void wd_fdc_t::data_w(UINT8 val)
{
if (inverted_bus) val ^= 0xff;
data = val;
drop_drq();
}
@ -983,7 +1000,11 @@ void wd_fdc_t::data_w(UINT8 val)
UINT8 wd_fdc_t::data_r()
{
drop_drq();
return data;
UINT8 val = data;
if (inverted_bus) val ^= 0xff;
return val;
}
void wd_fdc_t::gen_w(int reg, UINT8 val)

View File

@ -26,7 +26,7 @@ public:
int per_sector_size[40]; // if sector_base_size is 0
int sector_base_id; // 0 or 1 usually, -1 if there's interleave
int per_sector_id[40]; // if sector_base_id is -1. If both per are used, then sector per_sector_id[i] has size per_sector_size[i]
int gap_1; // Usually around 544 - number of 4e between index and first IDAM sync
int gap_1; // Usually around 80 - number of 4e between index and first IDAM sync
int gap_2; // 22 for <=1.44Mb, 41 for 2.88Mb - number of 4e between sector header and data sync
int gap_3; // Usually 84 - number of 4e between sector crc and next IDAM
};