Merge pull request #4098 from hp9k/hp9k3xx_layout

hp9k_3xx: add layout (nw)
This commit is contained in:
R. Belmont 2018-10-09 17:06:27 -04:00 committed by GitHub
commit 43a31bde96
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 91 additions and 24 deletions

View File

@ -62,6 +62,7 @@
#include "screen.h"
#include "softlist_dev.h"
#include "hp9k_3xx.lh"
#define MAINCPU_TAG "maincpu"
#define PTM6840_TAG "ptm"
@ -73,7 +74,8 @@ public:
driver_device(mconfig, type, tag),
m_maincpu(*this, MAINCPU_TAG),
m_vram16(*this, "vram16"),
m_vram(*this, "vram")
m_vram(*this, "vram"),
m_diag_led(*this, "led_diag_%u", 0U)
{ }
void hp9k370(machine_config &config);
@ -88,10 +90,13 @@ public:
private:
required_device<m68000_base_device> m_maincpu;
virtual void machine_reset() override;
virtual void driver_start() override;
optional_shared_ptr<uint16_t> m_vram16;
optional_shared_ptr<uint32_t> m_vram;
output_finder<8> m_diag_led;
uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
uint32_t hp_medres_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
@ -101,28 +106,7 @@ private:
DECLARE_READ32_MEMBER(buserror_r);
DECLARE_WRITE32_MEMBER(buserror_w);
DECLARE_WRITE32_MEMBER(led_w)
{
if (mem_mask != 0x000000ff)
{
return;
}
#if 0
printf("LED: %02x (", data&0xff);
for (int i = 7; i >= 0; i--)
{
if (data & (1 << i))
{
printf("o");
}
else
{
printf("*");
}
}
printf(")\n");
#endif
}
DECLARE_WRITE16_MEMBER(led_w);
void hp9k310_map(address_map &map);
void hp9k320_map(address_map &map);
@ -187,7 +171,7 @@ void hp9k3xx_state::hp9k3xx_common(address_map &map)
// 9000/310 - has onboard video that the graphics card used in other 3xxes conflicts with
void hp9k3xx_state::hp9k310_map(address_map &map)
{
map(0x000000, 0x01ffff).rom().region("maincpu", 0).nopw(); // writes to 1fffc are the LED
map(0x000000, 0x01ffff).rom().region("maincpu", 0).w(FUNC(hp9k3xx_state::led_w)); // writes to 1fffc are the LED
map(0x510000, 0x510003).rw(FUNC(hp9k3xx_state::buserror16_r), FUNC(hp9k3xx_state::buserror16_w)); // no "Alpha display"
map(0x538000, 0x538003).rw(FUNC(hp9k3xx_state::buserror16_r), FUNC(hp9k3xx_state::buserror16_w)); // no "Graphics"
@ -277,12 +261,33 @@ WRITE_LINE_MEMBER(hp9k3xx_state::cpu_reset)
{
}
void hp9k3xx_state::driver_start()
{
m_diag_led.resolve();
}
void hp9k3xx_state::machine_reset()
{
m_maincpu->set_reset_callback(write_line_delegate(FUNC(hp9k3xx_state::cpu_reset), this));
}
WRITE16_MEMBER(hp9k3xx_state::led_w)
{
if (!(mem_mask & 0xff))
return;
LOG("LED: %02x\n", data & 0xff);
m_diag_led[0] = BIT(data, 0);
m_diag_led[1] = BIT(data, 1);
m_diag_led[2] = BIT(data, 2);
m_diag_led[3] = BIT(data, 3);
m_diag_led[4] = BIT(data, 4);
m_diag_led[5] = BIT(data, 5);
m_diag_led[6] = BIT(data, 6);
m_diag_led[7] = BIT(data, 7);
}
void hp9k3xx_state::add_dio16_bus(machine_config &config)
{
bus::hp_dio::dio16_device &dio16(DIO16(config, "diobus", 0));
@ -356,6 +361,7 @@ MACHINE_CONFIG_START(hp9k3xx_state::hp9k300)
ptm.irq_callback().set_inputline("maincpu", M68K_IRQ_6);
MCFG_SOFTWARE_LIST_ADD("flop_list", "hp9k3xx_flop")
config.set_default_layout(layout_hp9k_3xx);
MACHINE_CONFIG_END
MACHINE_CONFIG_START(hp9k3xx_state::hp9k310)
@ -372,6 +378,7 @@ MACHINE_CONFIG_START(hp9k3xx_state::hp9k310)
DIO16_SLOT(config, "sl2", 0, "diobus", dio16_cards, "98603b", false);
DIO16_SLOT(config, "sl3", 0, "diobus", dio16_cards, "98644", false);
DIO16_SLOT(config, "sl4", 0, "diobus", dio16_cards, nullptr, false);
MACHINE_CONFIG_END
MACHINE_CONFIG_START(hp9k3xx_state::hp9k320)
@ -423,6 +430,7 @@ MACHINE_CONFIG_START(hp9k3xx_state::hp9k332)
MCFG_SCREEN_SIZE(512,390)
MCFG_SCREEN_VISIBLE_AREA(0, 512-1, 0, 390-1)
MCFG_SCREEN_REFRESH_RATE(70)
MACHINE_CONFIG_END
MACHINE_CONFIG_START(hp9k3xx_state::hp9k340)

View File

@ -0,0 +1,59 @@
<?xml version="1.0"?>
<!--
license:CC0
copyright-holders:Sven Schnelle
Hewlett-Packard 9000/3xx 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="0"><color red="1.0" green="0.0" blue="0.0"/></disk>
<disk state="1"><color red="0.2" green="0.2" blue="0.2"/></disk>
</element>
<element name="ledg" defstate="1">
<disk state="0"><color red="0.2" green="0.2" blue="0.2"/></disk>
<disk state="1"><color red="0.0" green="1.0" blue="0.0"/></disk>
</element>
<element name="led_diag_7s"> <text string="7"> <color red="1.0" green="1.0" blue="1.0" /> </text> </element>
<element name="led_diag_6s"> <text string="6"> <color red="1.0" green="1.0" blue="1.0" /> </text> </element>
<element name="led_diag_5s"> <text string="5"> <color red="1.0" green="1.0" blue="1.0" /> </text> </element>
<element name="led_diag_4s"> <text string="4"> <color red="1.0" green="1.0" blue="1.0" /> </text> </element>
<element name="led_diag_3s"> <text string="3"> <color red="1.0" green="1.0" blue="1.0" /> </text> </element>
<element name="led_diag_2s"> <text string="2"> <color red="1.0" green="1.0" blue="1.0" /> </text> </element>
<element name="led_diag_1s"> <text string="1"> <color red="1.0" green="1.0" blue="1.0" /> </text> </element>
<element name="led_diag_0s"> <text string="0"> <color red="1.0" green="1.0" blue="1.0" /> </text> </element>
<element name="led_power_s"> <text string="Power"> <color red="1.0" green="1.0" blue="1.0" /> </text> </element>
<view name="HP9000/3xx">
<bezel element="background"><bounds left="0" top="768" right="1024" bottom="832"/></bezel>
<bezel name="led_diag_7" element="ledr"><bounds left="20" top="776" right="36" bottom="792"/></bezel>
<bezel name="led_diag_7s" element="led_diag_7s"><bounds left="20" top="800" right="36" bottom="816"/></bezel>
<bezel name="led_diag_6" element="ledr"><bounds left="40" top="776" right="56" bottom="792"/></bezel>
<bezel name="led_diag_6s" element="led_diag_6s"><bounds left="40" top="800" right="56" bottom="816"/></bezel>
<bezel name="led_diag_5" element="ledr"><bounds left="60" top="776" right="76" bottom="792"/></bezel>
<bezel name="led_diag_5s" element="led_diag_5s"><bounds left="60" top="800" right="76" bottom="816"/></bezel>
<bezel name="led_diag_4" element="ledr"><bounds left="80" top="776" right="96" bottom="792"/></bezel>
<bezel name="led_diag_4s" element="led_diag_4s"><bounds left="80" top="800" right="96" bottom="816"/></bezel>
<bezel name="led_diag_3" element="ledr"><bounds left="100" top="776" right="116" bottom="792"/></bezel>
<bezel name="led_diag_3s" element="led_diag_3s"><bounds left="100" top="800" right="116" bottom="816"/></bezel>
<bezel name="led_diag_2" element="ledr"><bounds left="120" top="776" right="136" bottom="792"/></bezel>
<bezel name="led_diag_2s" element="led_diag_2s"><bounds left="120" top="800" right="136" bottom="816"/></bezel>
<bezel name="led_diag_1" element="ledr"><bounds left="140" top="776" right="156" bottom="792"/></bezel>
<bezel name="led_diag_1s" element="led_diag_1s"><bounds left="140" top="800" right="156" bottom="816"/></bezel>
<bezel name="led_diag_0" element="ledr"><bounds left="160" top="776" right="176" bottom="792"/></bezel>
<bezel name="led_diag_0s" element="led_diag_0s"><bounds left="160" top="800" right="176" bottom="816"/></bezel>
<bezel name="led_power_s" element="led_power_s"><bounds left="980" top="800" right="1016" bottom="816"/></bezel>
<bezel name="led_power" element="ledg"><bounds left="990" top="776" right="1006" bottom="792"/></bezel>
<screen index="0"><bounds x="0" y="0" width="1024" height="768"/></screen>
</view>
<view name="XGA Screen">
<screen index="0">
<bounds x="0" y="0" width="1024" height="768" />
</screen>
</view>
</mamelayout>