mirror of
https://github.com/holub/mame
synced 2025-10-04 16:34:53 +03:00
hp9122: add layout (nw)
This commit is contained in:
parent
8dfe57c729
commit
8ac744ebcf
@ -999,6 +999,14 @@ if (BUSES["IEEE488"]~=null) then
|
||||
MAME_DIR .. "src/devices/bus/ieee488/remote488.cpp",
|
||||
MAME_DIR .. "src/devices/bus/ieee488/remote488.h",
|
||||
}
|
||||
|
||||
dependency {
|
||||
{ MAME_DIR .. "src/devices/bus/ieee488/hp9122c.cpp", GEN_DIR .. "emu/layout/hp9122c.lh" },
|
||||
}
|
||||
|
||||
custombuildtask {
|
||||
layoutbuildtask("emu/layout", "hp9122c"),
|
||||
}
|
||||
end
|
||||
|
||||
|
||||
|
@ -13,6 +13,7 @@
|
||||
#include "cpu/m6809/m6809.h"
|
||||
#include "machine/i8291a.h"
|
||||
#include "machine/wd_fdc.h"
|
||||
#include "hp9122c.lh"
|
||||
|
||||
DEFINE_DEVICE_TYPE(HP9122C, hp9122c_device, "hp9122c", "HP9122C Dual High density disk drive")
|
||||
|
||||
@ -25,6 +26,7 @@ hp9122c_device::hp9122c_device(const machine_config &mconfig, const char *tag, d
|
||||
m_floppy{*this, "floppy%u", 0},
|
||||
m_hpib_addr{*this , "ADDRESS"},
|
||||
m_testmode{*this, "TESTMODE"},
|
||||
m_leds{*this, "led%d", 0U},
|
||||
m_intsel{3},
|
||||
m_fdc_irq{false},
|
||||
m_i8291a_irq{false},
|
||||
@ -72,6 +74,9 @@ ioport_constructor hp9122c_device::device_input_ports() const
|
||||
|
||||
void hp9122c_device::device_start()
|
||||
{
|
||||
|
||||
m_leds.resolve();
|
||||
|
||||
for (auto &floppy : m_floppy)
|
||||
floppy->get_device()->setup_index_pulse_cb(floppy_image_device::index_pulse_cb(&hp9122c_device::index_pulse_cb, this));
|
||||
|
||||
@ -292,19 +297,26 @@ WRITE8_MEMBER(hp9122c_device::cmd_w)
|
||||
|
||||
m_ds0 = !(data & REG_CNTL_DS0) && floppy0;
|
||||
m_ds1 = !(data & REG_CNTL_DS1) && floppy1;
|
||||
m_leds[2] = (data & 0x40) ? true : false;
|
||||
|
||||
if (m_ds0) {
|
||||
floppy0->mon_w(0);
|
||||
floppy0->ss_w(!(data & REG_CNTL_HEADSEL));
|
||||
m_fdc->set_floppy(floppy0);
|
||||
m_motor_timer->reset();
|
||||
} else if (m_ds1) {
|
||||
floppy1->mon_w(0);
|
||||
floppy1->ss_w(!(data & REG_CNTL_HEADSEL));
|
||||
m_fdc->set_floppy(floppy1);
|
||||
m_motor_timer->reset();
|
||||
if (m_ds0) {
|
||||
floppy0->mon_w(0);
|
||||
floppy0->ss_w(!(data & REG_CNTL_HEADSEL));
|
||||
m_fdc->set_floppy(floppy0);
|
||||
m_motor_timer->reset();
|
||||
m_leds[0] = true;
|
||||
m_leds[1] = false;
|
||||
} else if (m_ds1) {
|
||||
floppy1->mon_w(0);
|
||||
floppy1->ss_w(!(data & REG_CNTL_HEADSEL));
|
||||
m_fdc->set_floppy(floppy1);
|
||||
m_motor_timer->reset();
|
||||
m_leds[0] = false;
|
||||
m_leds[1] = true;
|
||||
} else {
|
||||
m_motor_timer->adjust(attotime::from_msec(2000));
|
||||
m_leds[0] = false;
|
||||
m_leds[1] = false;
|
||||
}
|
||||
|
||||
if (data & REG_CNTL_CLOCK_SEL)
|
||||
@ -393,4 +405,5 @@ MACHINE_CONFIG_START(hp9122c_device::device_add_mconfig)
|
||||
MCFG_FLOPPY_DRIVE_ADD("floppy1" , hp9122c_floppies , "35hd" , hp9122c_floppy_formats)
|
||||
MCFG_FLOPPY_DRIVE_SOUND(true)
|
||||
MCFG_SLOT_FIXED(true)
|
||||
config.set_default_layout(layout_hp9122c);
|
||||
MACHINE_CONFIG_END
|
||||
|
@ -127,6 +127,8 @@ private:
|
||||
required_ioport m_hpib_addr;
|
||||
required_ioport m_testmode;
|
||||
|
||||
output_finder<3> m_leds;
|
||||
|
||||
void index_pulse_cb(floppy_image_device *floppy, int state);
|
||||
int m_intsel;
|
||||
void update_intsel(void);
|
||||
|
33
src/emu/layout/hp9122c.lay
Normal file
33
src/emu/layout/hp9122c.lay
Normal file
@ -0,0 +1,33 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
license:CC0
|
||||
copyright-holders:Sven Schnelle
|
||||
Hewlett-Packard HP 9122C floppy drive Layout
|
||||
-->
|
||||
<mamelayout version="2">
|
||||
<element name="background"><rect><color red="0.30" green="0.30" blue="0.30"/></rect></element>
|
||||
<element name="ledr" defstate="0">
|
||||
<disk state="1"><color red="1.0" green="0.0" blue="0.0"/></disk>
|
||||
<disk state="0"><color red="0.2" green="0.2" blue="0.2"/></disk>
|
||||
</element>
|
||||
|
||||
<element name="led0_s"> <text string="0"> <color red="1.0" green="1.0" blue="1.0" /></text></element>
|
||||
<element name="led1_s"> <text string="1"> <color red="1.0" green="1.0" blue="1.0" /></text></element>
|
||||
<element name="led2_s"> <text string="E"> <color red="1.0" green="1.0" blue="1.0" /></text></element>
|
||||
|
||||
<group name="panel">
|
||||
<bezel element="background"><bounds x="0" y="0" width="~scr0width~" height="64"/></bezel>
|
||||
<repeat count="3">
|
||||
<param name="left" start="20" increment="20" />
|
||||
<param name="right" start="36" increment="20" />
|
||||
<param name="num" start="0" increment="1" />
|
||||
<bezel name="led~num~_s" element="led~num~_s"><bounds left="~left~" right="~right~" top="8" bottom="24"/></bezel>
|
||||
<bezel name="led~num~" element="ledr"><bounds left="~left~" right="~right~" top="32" bottom="48"/></bezel>
|
||||
</repeat>
|
||||
</group>
|
||||
|
||||
<view name="HP9122C">
|
||||
<screen index="0"><bounds x="0" y="0" width="~scr0width~" height="~scr0height~"/></screen>
|
||||
<group ref="panel"><bounds x="0" y="~scr0height~" width="~scr0width~" height="64"/></group>
|
||||
</view>
|
||||
</mamelayout>
|
Loading…
Reference in New Issue
Block a user