mirror of
https://github.com/holub/mame
synced 2025-04-23 00:39:36 +03:00
jazz: diagnostic led (nw)
This commit is contained in:
parent
e04e69b353
commit
a087ebaadb
@ -60,11 +60,14 @@
|
||||
|
||||
#include "debugger.h"
|
||||
|
||||
#include "jazz.lh"
|
||||
|
||||
#define VERBOSE 0
|
||||
#include "logmacro.h"
|
||||
|
||||
void jazz_state::machine_start()
|
||||
{
|
||||
m_led.resolve();
|
||||
}
|
||||
|
||||
void jazz_state::machine_reset()
|
||||
@ -124,13 +127,7 @@ void jazz_state::jazz_common_map(address_map &map)
|
||||
//map(0x8000d000, 0x8000dfff).noprw(); // dummy dma device?
|
||||
map(0x8000d600, 0x8000d607).nopw();
|
||||
|
||||
map(0x8000f000, 0x8000f007).lrw8(
|
||||
NAME([this] () { return m_led; }),
|
||||
NAME([this] (u8 data)
|
||||
{
|
||||
logerror("led 0x%02x (%s)\n", data, machine().describe_context());
|
||||
m_led = data;
|
||||
})).umask64(0xff);
|
||||
map(0x8000f000, 0x8000f007).w(FUNC(jazz_state::led_w)).umask64(0xff);
|
||||
|
||||
// lots of byte data written to 800
|
||||
//map(0x800e0000, 0x800fffff).m() // dram config
|
||||
@ -312,6 +309,35 @@ void jazz_state::jazz(machine_config &config)
|
||||
m_isp->out_spkr_cb().set(m_buzzer, FUNC(speaker_sound_device::level_w));
|
||||
|
||||
// TODO: 4 EISA slots
|
||||
|
||||
config.set_default_layout(layout_jazz);
|
||||
}
|
||||
|
||||
void jazz_state::led_w(u8 data)
|
||||
{
|
||||
// 7-segment diagnostic led
|
||||
static u8 const patterns[16] =
|
||||
{
|
||||
// test output
|
||||
0x3f, // mct-adr 0
|
||||
0x06, // network 1
|
||||
0x5b, // scsi 2
|
||||
0x4f, // floppy 3
|
||||
0x66, // isp/rtc 4
|
||||
0x6d, // keyboard 5
|
||||
0x7d, // serial 6
|
||||
0x07, // nvram 7
|
||||
0x7f, // 8?
|
||||
0x6f, // video 9
|
||||
0x77, // memory A
|
||||
0x40, // -
|
||||
0x39, // flash C
|
||||
0x00, // (blank)
|
||||
0x79, // cpu E
|
||||
0x71, // F?
|
||||
};
|
||||
|
||||
m_led = patterns[data & 0xf] | (BIT(data, 4) ? 0x80 : 0);
|
||||
}
|
||||
|
||||
void jazz_state::mmr4000be(machine_config &config)
|
||||
|
@ -66,6 +66,7 @@ public:
|
||||
, m_lpt(*this, "lpt")
|
||||
, m_isp(*this, "isp")
|
||||
, m_buzzer(*this, "buzzer")
|
||||
, m_led(*this, "led0")
|
||||
{
|
||||
}
|
||||
|
||||
@ -80,6 +81,8 @@ protected:
|
||||
// machine config
|
||||
void jazz(machine_config &config);
|
||||
|
||||
void led_w(u8 data);
|
||||
|
||||
public:
|
||||
void mmr4000be(machine_config &config);
|
||||
void mmr4000le(machine_config &config);
|
||||
@ -109,9 +112,7 @@ protected:
|
||||
required_device<i82357_device> m_isp;
|
||||
required_device<speaker_sound_device> m_buzzer;
|
||||
|
||||
private:
|
||||
// machine state
|
||||
u8 m_led;
|
||||
output_finder<> m_led;
|
||||
};
|
||||
|
||||
#endif // MAME_INCLUDES_JAZZ_H
|
||||
|
25
src/mame/layout/jazz.lay
Normal file
25
src/mame/layout/jazz.lay
Normal file
@ -0,0 +1,25 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
license:CC0
|
||||
copyright-holders:Patrick Mackinlay
|
||||
Jazz graphics display with 7-segment diagnostic LED.
|
||||
|
||||
TODO
|
||||
- network/disk/floppy activity?
|
||||
- keyboard indicators?
|
||||
-->
|
||||
<mamelayout version="2">
|
||||
<element name="led" defstate="0">
|
||||
<led7seg>
|
||||
<color red="0.0" green="1.0" blue="0.0" />
|
||||
</led7seg>
|
||||
</element>
|
||||
<view name="Graphics">
|
||||
<screen index="0">
|
||||
<bounds x="0" y="0" width="1280" height="1024" />
|
||||
</screen>
|
||||
<bezel name="led0" element="led">
|
||||
<bounds x="1240" y="1024" width="40" height="50" />
|
||||
</bezel>
|
||||
</view>
|
||||
</mamelayout>
|
Loading…
Reference in New Issue
Block a user