mirror of
https://github.com/holub/mame
synced 2025-06-27 06:39:03 +03:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
48a36e5241
@ -38,8 +38,8 @@
|
||||
<publisher>Texas Instruments</publisher>
|
||||
<part name="cart" interface="lantutor">
|
||||
<dataarea name="rom" size="0x10000">
|
||||
<!-- <rom name="cd2315.vsm" size="0x4000" crc="" sha1="" offset="0x0000" /> -->
|
||||
<!-- <rom name="cd2316.vsm" size="0x4000" crc="" sha1="" offset="0x4000" /> -->
|
||||
<!-- <rom name="cd2315.vsm" size="0x4000" crc="" sha1="" offset="0x0000" /> -->
|
||||
<!-- <rom name="cd2316.vsm" size="0x4000" crc="" sha1="" offset="0x4000" /> -->
|
||||
<rom name="cd2317.vsm" size="0x4000" crc="53231c0b" sha1="472117c3d0e28437fa8faa054f98088e06efc2a1" offset="0x8000" />
|
||||
<rom name="cd2318.vsm" size="0x4000" crc="6c0727bc" sha1="132e39755b122f2cbec6f3e767f5d256a9c1e7ae" offset="0xc000" />
|
||||
</dataarea>
|
||||
|
@ -2,7 +2,7 @@
|
||||
<!DOCTYPE softwarelist SYSTEM "softwarelist.dtd">
|
||||
<softwarelist name="pasogo" description="Koei PasoGo cartridges">
|
||||
|
||||
<!--
|
||||
<!--
|
||||
Koei PasoGo (パソ碁) undumped games
|
||||
|
||||
Taikyoku-kun I ~ 対局くん I [KS-1001]
|
||||
|
2
makefile
2
makefile
@ -931,7 +931,7 @@ $(EMULATOR): $(EMUINFOOBJ) $(DRIVLISTOBJ) $(DRVLIBS) $(LIBOSD) $(LIBBUS) $(LIBOP
|
||||
$(CC) $(CDEFS) $(CFLAGS) -c $(SRC)/version.c -o $(VERSIONOBJ)
|
||||
@echo Linking $@...
|
||||
ifeq ($(TARGETOS),emscripten)
|
||||
# Emscripten's linker seems to be stricter about the ordering of .a files
|
||||
# Emscripten's linker seems to be stricter about the ordering of .a files
|
||||
$(LD) $(LDFLAGS) $(LDFLAGSEMULATOR) $(VERSIONOBJ) -Wl,--start-group $^ -Wl,--end-group $(LIBS) -o $@
|
||||
else
|
||||
$(LD) $(LDFLAGS) $(LDFLAGSEMULATOR) $(VERSIONOBJ) $^ $(LIBS) -o $@
|
||||
|
@ -217,4 +217,3 @@ WRITE_LINE_MEMBER( device_a8sio_card_interface::motor_w )
|
||||
SLOT_INTERFACE_START(a8sio_cards)
|
||||
SLOT_INTERFACE("cassette", A8SIO_CASSETTE)
|
||||
SLOT_INTERFACE_END
|
||||
|
||||
|
@ -115,4 +115,3 @@ void a8sio_cassette_device::device_timer(emu_timer &timer, device_timer_id id, i
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4,15 +4,15 @@
|
||||
|
||||
Copyright MESS Team.
|
||||
Visit http://mamedev.org for licensing and usage restrictions.
|
||||
|
||||
|
||||
TODO: current implementation is a HACK, due to limitations of the
|
||||
|
||||
|
||||
TODO: current implementation is a HACK, due to limitations of the
|
||||
slot system!
|
||||
A real Four Score would be connected to both the controller ports of
|
||||
the NES, but current core cannot emulate something like this until
|
||||
devices can live their own life and being connected to other devices
|
||||
at request.
|
||||
In current implementation the device has to be mounted separately in
|
||||
In current implementation the device has to be mounted separately in
|
||||
the two ports and each enables 2 inputs (this is more or less as hacky
|
||||
as the non-slot previous one, where the 4 ports were always available
|
||||
to the emulated system, but it's not a great consolation :( )
|
||||
@ -22,7 +22,7 @@
|
||||
since we could at best have two switches to disable the second player
|
||||
inputs.
|
||||
|
||||
Note: Two Pads are hardcoded in inputs below, instead of acting as
|
||||
Note: Two Pads are hardcoded in inputs below, instead of acting as
|
||||
passthrough for 2 standard joypad devices, in order to show in the
|
||||
internal UI that they belong to P1+P3 and P2+P4, otherwise they would
|
||||
be listed as P1+P2 and P3+P4 respectively. This *HAS* to be changed
|
||||
@ -171,10 +171,10 @@ void nes_4score_p1p3_device::write(UINT8 data)
|
||||
{
|
||||
if (data & 0x01)
|
||||
return;
|
||||
|
||||
|
||||
// P3 & P4 inputs in NES Four Score are read serially with P1 & P2
|
||||
m_latch = m_joypad1->read();
|
||||
m_latch |= (m_joypad3->read() << 8); // pad 3
|
||||
m_latch |= (m_joypad3->read() << 8); // pad 3
|
||||
m_latch |= (0x08 << 16); // signature
|
||||
}
|
||||
|
||||
@ -182,9 +182,9 @@ void nes_4score_p2p4_device::write(UINT8 data)
|
||||
{
|
||||
if (data & 0x01)
|
||||
return;
|
||||
|
||||
|
||||
// P3 & P4 inputs in NES Four Score are read serially with P1 & P2
|
||||
m_latch = m_joypad2->read();
|
||||
m_latch |= (m_joypad4->read() << 8); // pad 4
|
||||
m_latch |= (m_joypad4->read() << 8); // pad 4
|
||||
m_latch |= (0x04 << 16); // signature
|
||||
}
|
||||
|
@ -47,12 +47,12 @@ class nes_4score_p1p3_device : public nes_4score_device
|
||||
public:
|
||||
// construction/destruction
|
||||
nes_4score_p1p3_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
||||
|
||||
virtual ioport_constructor device_input_ports() const;
|
||||
|
||||
|
||||
protected:
|
||||
virtual void write(UINT8 data);
|
||||
|
||||
|
||||
private:
|
||||
required_ioport m_joypad1;
|
||||
required_ioport m_joypad3;
|
||||
@ -67,10 +67,10 @@ public:
|
||||
nes_4score_p2p4_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
||||
virtual ioport_constructor device_input_ports() const;
|
||||
|
||||
|
||||
protected:
|
||||
virtual void write(UINT8 data);
|
||||
|
||||
|
||||
private:
|
||||
required_ioport m_joypad2;
|
||||
required_ioport m_joypad4;
|
||||
|
@ -105,9 +105,9 @@ UINT8 nes_vaus_device::read_bit34()
|
||||
UINT8 nes_vausfc_device::read_exp(offs_t offset)
|
||||
{
|
||||
UINT8 ret = 0;
|
||||
if (offset == 0) //$4016
|
||||
if (offset == 0) //$4016
|
||||
ret = m_button->read() << 1;
|
||||
else //$4017
|
||||
else //$4017
|
||||
{
|
||||
ret = (m_latch & 0x80) >> 6;
|
||||
m_latch <<= 1;
|
||||
|
@ -56,7 +56,7 @@ class nes_vausfc_device : public nes_vaus_device
|
||||
public:
|
||||
// construction/destruction
|
||||
nes_vausfc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
||||
|
||||
protected:
|
||||
virtual UINT8 read_bit34() { return 0; }
|
||||
virtual UINT8 read_exp(offs_t offset);
|
||||
|
@ -5,7 +5,7 @@
|
||||
TODO: this should be actually emulated as a standalone system with
|
||||
a few 7segments LEDs, once we get a dump of its BIOS
|
||||
At the moment we only emulated the connection with a Famicom
|
||||
|
||||
|
||||
Copyright MESS Team.
|
||||
Visit http://mamedev.org for licensing and usage restrictions.
|
||||
|
||||
@ -57,26 +57,26 @@ void nes_bcbattle_device::device_timer(emu_timer &timer, device_timer_id id, int
|
||||
if (m_reader->get_byte_length() == 13)
|
||||
{
|
||||
for (int i = 0; i < 13; i++)
|
||||
m_current_barcode[i] = m_reader->read_code() + '0';
|
||||
m_current_barcode[i] = m_reader->read_code() + '0';
|
||||
}
|
||||
else if (m_reader->get_byte_length() == 8)
|
||||
{
|
||||
for (int i = 0; i < 5; i++)
|
||||
m_current_barcode[i] = 0x20;
|
||||
m_current_barcode[i] = 0x20;
|
||||
for (int i = 5; i < 13; i++)
|
||||
m_current_barcode[i] = m_reader->read_code() + '0';
|
||||
m_current_barcode[i] = m_reader->read_code() + '0';
|
||||
}
|
||||
// read one more, to reset the internal byte counter
|
||||
m_reader->read_code();
|
||||
|
||||
// the string "SUNSOFT" is accepted as well by Barcode World
|
||||
m_current_barcode[13] = 'E';
|
||||
m_current_barcode[14] = 'P';
|
||||
m_current_barcode[15] = 'O';
|
||||
m_current_barcode[16] = 'C';
|
||||
m_current_barcode[17] = 'H';
|
||||
m_current_barcode[18] = 0x0d;
|
||||
m_current_barcode[19] = 0x0a;
|
||||
m_current_barcode[13] = 'E';
|
||||
m_current_barcode[14] = 'P';
|
||||
m_current_barcode[15] = 'O';
|
||||
m_current_barcode[16] = 'C';
|
||||
m_current_barcode[17] = 'H';
|
||||
m_current_barcode[18] = 0x0d;
|
||||
m_current_barcode[19] = 0x0a;
|
||||
m_pending_code = 1;
|
||||
}
|
||||
m_new_code = m_reader->get_pending_code();
|
||||
@ -110,7 +110,7 @@ void nes_bcbattle_device::device_start()
|
||||
// and sending the proper serial bits, instead of our read_current_bit() function!
|
||||
battler_timer = timer_alloc(TIMER_BATTLER);
|
||||
battler_timer->adjust(attotime::zero, 0, machine().device<cpu_device>("maincpu")->cycles_to_attotime(1000));
|
||||
|
||||
|
||||
save_item(NAME(m_current_barcode));
|
||||
save_item(NAME(m_new_code));
|
||||
save_item(NAME(m_pending_code));
|
||||
@ -184,7 +184,7 @@ int nes_bcbattle_device::read_current_bit()
|
||||
UINT8 nes_bcbattle_device::read_exp(offs_t offset)
|
||||
{
|
||||
UINT8 ret = 0;
|
||||
if (offset == 1) //$4017
|
||||
if (offset == 1) //$4017
|
||||
{
|
||||
ret |= read_current_bit() << 2;
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
/**********************************************************************
|
||||
|
||||
Nintendo Family Computer & Entertainment System controller ports
|
||||
Nintendo Family Computer & Entertainment System controller ports
|
||||
and Family Computer expansion port emulation
|
||||
|
||||
Here we emulate in fact 3 different kind of ports, which are
|
||||
@ -9,15 +9,15 @@
|
||||
corresponding address ($4016 for port1, $4017 for port2)
|
||||
- FC controller ports: these are only hooked to bit 0 of the
|
||||
corresponding address (so that e.g. a NES Zapper could not
|
||||
be connected to a later FC AV model, because its inputs
|
||||
be connected to a later FC AV model, because its inputs
|
||||
would not be detected)
|
||||
- FC expansion port: this is hooked to bits 0-4 of both addresses
|
||||
To make things a little bit more complex, old FC models have the
|
||||
controller hardwired to the unit, and the P2 controllers are
|
||||
directly hooked also to one of the expansion port lines (namely,
|
||||
directly hooked also to one of the expansion port lines (namely,
|
||||
microphone inputs from P2 go to $4016 bit 2)
|
||||
|
||||
Even if the controller port and the expansion port are
|
||||
Even if the controller port and the expansion port are
|
||||
physically different (the FC expansion is a 15pin port, while
|
||||
the controller ports are 7pin), we emulate them as variants of a
|
||||
common device, exposing the following handlers:
|
||||
@ -25,15 +25,15 @@
|
||||
inputs from controllers
|
||||
- read_bit34: for bit3,4 reading, expected to be at the correct
|
||||
offset (but we don't currently check for read_bit34 & 0xf8==0)
|
||||
- read_exp: for reads going through the expansion, with a offset
|
||||
- read_exp: for reads going through the expansion, with a offset
|
||||
parameter to decide whether we are reading from $4016 and $4017
|
||||
- write: to acknowledge writes to $4016
|
||||
|
||||
The driver emulation will take care to only call the correct
|
||||
handlers they have hooks for: Basic usage is that the expansion
|
||||
port calls read_exp, FC ctrl ports call read_bit0, and NES ctrl
|
||||
ports call both read_bit0 and read_bit34. However, to cope with
|
||||
the original FC microphone, we will have the second controller
|
||||
The driver emulation will take care to only call the correct
|
||||
handlers they have hooks for: Basic usage is that the expansion
|
||||
port calls read_exp, FC ctrl ports call read_bit0, and NES ctrl
|
||||
ports call both read_bit0 and read_bit34. However, to cope with
|
||||
the original FC microphone, we will have the second controller
|
||||
port calling read_exp too.
|
||||
|
||||
Copyright MESS Team.
|
||||
@ -168,7 +168,7 @@ SLOT_INTERFACE_START( nes_control_port1_devices )
|
||||
SLOT_INTERFACE("joypad", NES_JOYPAD)
|
||||
SLOT_INTERFACE("zapper", NES_ZAPPER)
|
||||
SLOT_INTERFACE("4score_p1p3", NES_4SCORE_P1P3)
|
||||
// SLOT_INTERFACE("miracle_piano", NES_MIRACLE)
|
||||
// SLOT_INTERFACE("miracle_piano", NES_MIRACLE)
|
||||
SLOT_INTERFACE_END
|
||||
|
||||
SLOT_INTERFACE_START( nes_control_port2_devices )
|
||||
|
@ -1,6 +1,6 @@
|
||||
/**********************************************************************
|
||||
|
||||
Nintendo Family Computer & Entertainment System controller port
|
||||
Nintendo Family Computer & Entertainment System controller port
|
||||
emulation
|
||||
|
||||
Copyright MESS Team.
|
||||
@ -32,12 +32,12 @@ public:
|
||||
// construction/destruction
|
||||
device_nes_control_port_interface(const machine_config &mconfig, device_t &device);
|
||||
virtual ~device_nes_control_port_interface();
|
||||
|
||||
|
||||
virtual UINT8 read_bit0() { return 0; };
|
||||
virtual UINT8 read_bit34() { return 0; };
|
||||
virtual UINT8 read_exp(offs_t offset) { return 0; };
|
||||
virtual void write(UINT8 data) { };
|
||||
|
||||
|
||||
protected:
|
||||
nes_control_port_device *m_port;
|
||||
};
|
||||
|
@ -18,27 +18,27 @@ const device_type NES_FCKEYBOARD = &device_creator<nes_fckeybrd_device>;
|
||||
|
||||
static INPUT_PORTS_START( fc_keyboard )
|
||||
PORT_START("FCKEY.0")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F8) PORT_CHAR(UCHAR_MAMEKEY(F8))
|
||||
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13)
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F8) PORT_CHAR(UCHAR_MAMEKEY(F8))
|
||||
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13)
|
||||
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR('[')
|
||||
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR(']')
|
||||
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Kana")
|
||||
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_RSHIFT)
|
||||
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR(']')
|
||||
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Kana")
|
||||
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_RSHIFT)
|
||||
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_BACKSLASH2) PORT_CHAR('\\')
|
||||
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Stop") PORT_CODE(KEYCODE_BACKSPACE)
|
||||
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Stop") PORT_CODE(KEYCODE_BACKSPACE)
|
||||
|
||||
PORT_START("FCKEY.1")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F7) PORT_CHAR(UCHAR_MAMEKEY(F7))
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F7) PORT_CHAR(UCHAR_MAMEKEY(F7))
|
||||
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('@')
|
||||
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_COLON) PORT_CHAR(':')
|
||||
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR(';')
|
||||
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CHAR('_')
|
||||
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CHAR('/')
|
||||
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-')
|
||||
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_COLON) PORT_CHAR(':')
|
||||
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR(';')
|
||||
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CHAR('_')
|
||||
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CHAR('/')
|
||||
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-')
|
||||
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('^')
|
||||
|
||||
PORT_START("FCKEY.2")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F6) PORT_CHAR(UCHAR_MAMEKEY(F6))
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F6) PORT_CHAR(UCHAR_MAMEKEY(F6))
|
||||
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_O) PORT_CHAR('O')
|
||||
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_L) PORT_CHAR('L')
|
||||
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_K) PORT_CHAR('K')
|
||||
@ -48,7 +48,7 @@ static INPUT_PORTS_START( fc_keyboard )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_0) PORT_CHAR('0')
|
||||
|
||||
PORT_START("FCKEY.3")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F5) PORT_CHAR(UCHAR_MAMEKEY(F5))
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F5) PORT_CHAR(UCHAR_MAMEKEY(F5))
|
||||
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_I) PORT_CHAR('I')
|
||||
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_U) PORT_CHAR('U')
|
||||
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_J) PORT_CHAR('J')
|
||||
@ -58,7 +58,7 @@ static INPUT_PORTS_START( fc_keyboard )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_8) PORT_CHAR('8')
|
||||
|
||||
PORT_START("FCKEY.4")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F4) PORT_CHAR(UCHAR_MAMEKEY(F4))
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F4) PORT_CHAR(UCHAR_MAMEKEY(F4))
|
||||
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Y) PORT_CHAR('Y')
|
||||
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_G) PORT_CHAR('G')
|
||||
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_H) PORT_CHAR('H')
|
||||
@ -68,7 +68,7 @@ static INPUT_PORTS_START( fc_keyboard )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6) PORT_CHAR('6')
|
||||
|
||||
PORT_START("FCKEY.5")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F3) PORT_CHAR(UCHAR_MAMEKEY(F3))
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F3) PORT_CHAR(UCHAR_MAMEKEY(F3))
|
||||
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_T) PORT_CHAR('T')
|
||||
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_R) PORT_CHAR('R')
|
||||
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_D) PORT_CHAR('D')
|
||||
@ -78,7 +78,7 @@ static INPUT_PORTS_START( fc_keyboard )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_4) PORT_CHAR('4')
|
||||
|
||||
PORT_START("FCKEY.6")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F2) PORT_CHAR(UCHAR_MAMEKEY(F2))
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F2) PORT_CHAR(UCHAR_MAMEKEY(F2))
|
||||
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_W) PORT_CHAR('W')
|
||||
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_S) PORT_CHAR('S')
|
||||
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_A) PORT_CHAR('A')
|
||||
@ -88,24 +88,24 @@ static INPUT_PORTS_START( fc_keyboard )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_3) PORT_CHAR('3')
|
||||
|
||||
PORT_START("FCKEY.7")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F1) PORT_CHAR(UCHAR_MAMEKEY(F1))
|
||||
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_TAB) PORT_CHAR(UCHAR_MAMEKEY(ESC))
|
||||
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Q) PORT_CHAR('Q')
|
||||
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_LCONTROL) PORT_CHAR(UCHAR_SHIFT_2)
|
||||
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_LSHIFT) PORT_CHAR(UCHAR_SHIFT_1)
|
||||
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Grph") PORT_CODE(KEYCODE_LALT)
|
||||
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_1) PORT_CHAR('1')
|
||||
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_2) PORT_CHAR('2')
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F1) PORT_CHAR(UCHAR_MAMEKEY(F1))
|
||||
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_TAB) PORT_CHAR(UCHAR_MAMEKEY(ESC))
|
||||
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Q) PORT_CHAR('Q')
|
||||
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_LCONTROL) PORT_CHAR(UCHAR_SHIFT_2)
|
||||
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_LSHIFT) PORT_CHAR(UCHAR_SHIFT_1)
|
||||
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Grph") PORT_CODE(KEYCODE_LALT)
|
||||
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_1) PORT_CHAR('1')
|
||||
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_2) PORT_CHAR('2')
|
||||
|
||||
PORT_START("FCKEY.8")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Clr")
|
||||
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_UP) PORT_CHAR(UCHAR_MAMEKEY(UP))
|
||||
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(UCHAR_MAMEKEY(RIGHT))
|
||||
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_LEFT) PORT_CHAR(UCHAR_MAMEKEY(LEFT))
|
||||
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_DOWN) PORT_CHAR(UCHAR_MAMEKEY(DOWN))
|
||||
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ')
|
||||
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Del") PORT_CODE(KEYCODE_DEL)
|
||||
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Ins") PORT_CODE(KEYCODE_INSERT)
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Clr")
|
||||
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_UP) PORT_CHAR(UCHAR_MAMEKEY(UP))
|
||||
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(UCHAR_MAMEKEY(RIGHT))
|
||||
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_LEFT) PORT_CHAR(UCHAR_MAMEKEY(LEFT))
|
||||
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_DOWN) PORT_CHAR(UCHAR_MAMEKEY(DOWN))
|
||||
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ')
|
||||
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Del") PORT_CODE(KEYCODE_DEL)
|
||||
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Ins") PORT_CODE(KEYCODE_INSERT)
|
||||
INPUT_PORTS_END
|
||||
|
||||
|
||||
@ -183,7 +183,7 @@ void nes_fckeybrd_device::device_reset()
|
||||
UINT8 nes_fckeybrd_device::read_exp(offs_t offset)
|
||||
{
|
||||
UINT8 ret = 0;
|
||||
if (offset == 0) //$4016
|
||||
if (offset == 0) //$4016
|
||||
{
|
||||
// FC Keyboard: tape input
|
||||
if ((m_cassette->get_state() & CASSETTE_MASK_UISTATE) == CASSETTE_PLAY)
|
||||
@ -195,7 +195,7 @@ UINT8 nes_fckeybrd_device::read_exp(offs_t offset)
|
||||
ret |= 0x02;
|
||||
}
|
||||
}
|
||||
else //$4017
|
||||
else //$4017
|
||||
{
|
||||
// FC Keyboard: rows of the keyboard matrix are read 4-bits at time and returned as bit1->bit4
|
||||
if (m_fck_scan < 9)
|
||||
@ -216,16 +216,16 @@ void nes_fckeybrd_device::write(UINT8 data)
|
||||
// tape output (not fully tested)
|
||||
if ((m_cassette->get_state() & CASSETTE_MASK_UISTATE) == CASSETTE_RECORD)
|
||||
m_cassette->output(((data & 0x07) == 0x07) ? +1.0 : -1.0);
|
||||
|
||||
|
||||
if (BIT(data, 2)) // keyboard active
|
||||
{
|
||||
UINT8 out = BIT(data, 1); // scan
|
||||
|
||||
|
||||
if (m_fck_mode && !out && ++m_fck_scan > 9)
|
||||
m_fck_scan = 0;
|
||||
|
||||
|
||||
m_fck_mode = out; // access lower or upper 4 bits
|
||||
|
||||
|
||||
if (BIT(data, 0)) // reset
|
||||
m_fck_scan = 0;
|
||||
}
|
||||
|
@ -119,7 +119,7 @@ void nes_ftrainer_device::device_reset()
|
||||
UINT8 nes_ftrainer_device::read_exp(offs_t offset)
|
||||
{
|
||||
UINT8 ret = 0;
|
||||
if (offset == 1) //$4017
|
||||
if (offset == 1) //$4017
|
||||
{
|
||||
if (!BIT(m_row_scan, 0))
|
||||
{
|
||||
|
@ -1,8 +1,8 @@
|
||||
/**********************************************************************
|
||||
|
||||
Nintendo Family Computer Hori Twin (and 4P?) adapters
|
||||
|
||||
Emulation of the 4Players adapter is quite pointless: if 2P mode
|
||||
|
||||
Emulation of the 4Players adapter is quite pointless: if 2P mode
|
||||
(default mode) it behaves like a Hori Twin adapter, in 4P mode
|
||||
it has P1 and P2 inputs overwriting the inputs coming from the
|
||||
main controllers (possibly creating a bit of confusion, since
|
||||
@ -117,9 +117,9 @@ nes_hori4p_device::nes_hori4p_device(const machine_config &mconfig, const char *
|
||||
UINT8 nes_horitwin_device::read_exp(offs_t offset)
|
||||
{
|
||||
UINT8 ret = 0;
|
||||
if (offset == 0) //$4016
|
||||
if (offset == 0) //$4016
|
||||
ret |= (m_port1->read_bit0() << 1);
|
||||
else //$4017
|
||||
else //$4017
|
||||
ret |= (m_port2->read_bit0() << 1);
|
||||
return ret;
|
||||
}
|
||||
@ -127,21 +127,21 @@ UINT8 nes_horitwin_device::read_exp(offs_t offset)
|
||||
UINT8 nes_hori4p_device::read_exp(offs_t offset)
|
||||
{
|
||||
UINT8 ret = 0;
|
||||
if (m_cfg->read() == 0) // 2P
|
||||
if (m_cfg->read() == 0) // 2P
|
||||
{
|
||||
if (offset == 0) //$4016
|
||||
if (offset == 0) //$4016
|
||||
ret |= (m_port1->read_bit0() << 1);
|
||||
else //$4017
|
||||
else //$4017
|
||||
ret |= (m_port2->read_bit0() << 1);
|
||||
}
|
||||
else // 4P
|
||||
else // 4P
|
||||
{
|
||||
if (offset == 0) //$4016
|
||||
if (offset == 0) //$4016
|
||||
{
|
||||
ret |= (m_port1->read_bit0() << 0);
|
||||
ret |= (m_port3->read_bit0() << 1);
|
||||
}
|
||||
else //$4017
|
||||
else //$4017
|
||||
{
|
||||
ret |= (m_port2->read_bit0() << 0);
|
||||
ret |= (m_port4->read_bit0() << 1);
|
||||
|
@ -51,17 +51,17 @@ class nes_hori4p_device : public device_t,
|
||||
public:
|
||||
// construction/destruction
|
||||
nes_hori4p_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
||||
|
||||
virtual ioport_constructor device_input_ports() const;
|
||||
virtual machine_config_constructor device_mconfig_additions() const;
|
||||
|
||||
protected:
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_start() {}
|
||||
|
||||
|
||||
virtual UINT8 read_exp(offs_t offset);
|
||||
virtual void write(UINT8 data);
|
||||
|
||||
|
||||
private:
|
||||
required_device<nes_control_port_device> m_port1;
|
||||
required_device<nes_control_port_device> m_port2;
|
||||
|
@ -3,16 +3,16 @@
|
||||
Nintendo Family Computer & Entertainment System Joypads
|
||||
|
||||
The original Famicom had two hardwired controller, with the second
|
||||
controller slightly different from the first one: it featured no
|
||||
controller slightly different from the first one: it featured no
|
||||
Start nor Select buttons, but had a built-in microphone (with
|
||||
very limited capabilities, since it basically only detected two
|
||||
states: something blowing into it / nothing blowing into it) for
|
||||
some games to react to users "talking" into it
|
||||
|
||||
Crazy Climber Pads are not really a kind of separate controllers,
|
||||
but just a couple of small sticks to be put on top of d-pads of
|
||||
the regular controllers. Users should then control the game by
|
||||
using both controllers, turned 90 degrees, as a couple of dual
|
||||
|
||||
Crazy Climber Pads are not really a kind of separate controllers,
|
||||
but just a couple of small sticks to be put on top of d-pads of
|
||||
the regular controllers. Users should then control the game by
|
||||
using both controllers, turned 90 degrees, as a couple of dual
|
||||
sticks like in the arcade control panel. However, we emulate them
|
||||
separately so to map the controls to a friendlier default.
|
||||
|
||||
@ -20,9 +20,9 @@
|
||||
by Hori, but possibly licensed by Nintendo, since it use the official
|
||||
logo and brand) which fits into the expansion port and allows to
|
||||
daisy chain a second controller to the first one, to play 4players
|
||||
game (an image of such connection is shown e.g. in Nekketsu Koukou
|
||||
game (an image of such connection is shown e.g. in Nekketsu Koukou
|
||||
Dodgeball Bu manual)
|
||||
|
||||
|
||||
Copyright MESS Team.
|
||||
Visit http://mamedev.org for licensing and usage restrictions.
|
||||
|
||||
@ -45,8 +45,8 @@ static INPUT_PORTS_START( nes_joypad )
|
||||
PORT_START("JOYPAD")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("A")
|
||||
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("B")
|
||||
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SELECT )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START )
|
||||
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SELECT )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY
|
||||
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY
|
||||
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY
|
||||
@ -58,7 +58,7 @@ static INPUT_PORTS_START( nes_fcpad_p2 )
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("A")
|
||||
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("B")
|
||||
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SELECT ) PORT_NAME("Microphone")
|
||||
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY
|
||||
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY
|
||||
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY
|
||||
@ -69,8 +69,8 @@ static INPUT_PORTS_START( nes_ccpad_left )
|
||||
PORT_START("JOYPAD")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SELECT )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START )
|
||||
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SELECT )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_RIGHT ) PORT_8WAY
|
||||
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_LEFT ) PORT_8WAY
|
||||
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_UP ) PORT_8WAY
|
||||
@ -81,8 +81,8 @@ static INPUT_PORTS_START( nes_ccpad_right )
|
||||
PORT_START("JOYPAD")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_RIGHT ) PORT_8WAY
|
||||
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_LEFT ) PORT_8WAY
|
||||
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_UP ) PORT_8WAY
|
||||
@ -103,14 +103,14 @@ static INPUT_PORTS_START( nes_arcstick )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("B")
|
||||
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SELECT )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_CONDITION("CONFIG", 0x01, EQUALS, 0x01)
|
||||
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_CONDITION("CONFIG", 0x01, EQUALS, 0x01)
|
||||
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_CONDITION("CONFIG", 0x01, EQUALS, 0x01)
|
||||
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_CONDITION("CONFIG", 0x01, EQUALS, 0x01)
|
||||
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY PORT_CONDITION("CONFIG", 0x01, EQUALS, 0x00)
|
||||
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_CONDITION("CONFIG", 0x01, EQUALS, 0x00)
|
||||
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_CONDITION("CONFIG", 0x01, EQUALS, 0x00)
|
||||
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_CONDITION("CONFIG", 0x01, EQUALS, 0x00)
|
||||
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_CONDITION("CONFIG", 0x01, EQUALS, 0x01)
|
||||
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_CONDITION("CONFIG", 0x01, EQUALS, 0x01)
|
||||
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_CONDITION("CONFIG", 0x01, EQUALS, 0x01)
|
||||
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_CONDITION("CONFIG", 0x01, EQUALS, 0x01)
|
||||
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY PORT_CONDITION("CONFIG", 0x01, EQUALS, 0x00)
|
||||
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_CONDITION("CONFIG", 0x01, EQUALS, 0x00)
|
||||
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_CONDITION("CONFIG", 0x01, EQUALS, 0x00)
|
||||
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_CONDITION("CONFIG", 0x01, EQUALS, 0x00)
|
||||
INPUT_PORTS_END
|
||||
|
||||
//-------------------------------------------------
|
||||
@ -245,7 +245,7 @@ UINT8 nes_joypad_device::read_bit0()
|
||||
UINT8 nes_fcpad2_device::read_exp(offs_t offset)
|
||||
{
|
||||
UINT8 ret = 0;
|
||||
if (!offset) // microphone input
|
||||
if (!offset) // microphone input
|
||||
ret |= m_joypad->read() & 0x04;
|
||||
|
||||
return ret;
|
||||
@ -260,9 +260,9 @@ UINT8 nes_fcpad2_device::read_exp(offs_t offset)
|
||||
UINT8 nes_arcstick_device::read_exp(offs_t offset)
|
||||
{
|
||||
UINT8 ret = 0;
|
||||
if (offset == 0) //$4016
|
||||
if (offset == 0) //$4016
|
||||
{
|
||||
if ((m_cfg->read() & 2) == 0) // we are P1 input
|
||||
if ((m_cfg->read() & 2) == 0) // we are P1 input
|
||||
{
|
||||
ret |= (m_latch & 1) << 1;
|
||||
m_latch >>= 1;
|
||||
@ -270,9 +270,9 @@ UINT8 nes_arcstick_device::read_exp(offs_t offset)
|
||||
else
|
||||
ret |= m_daisychain->read_exp(0);
|
||||
}
|
||||
else //$4017
|
||||
else //$4017
|
||||
{
|
||||
if ((m_cfg->read() & 2) == 2) // we are P2 input
|
||||
if ((m_cfg->read() & 2) == 2) // we are P2 input
|
||||
{
|
||||
ret |= (m_latch & 1) << 1;
|
||||
m_latch >>= 1;
|
||||
@ -280,7 +280,7 @@ UINT8 nes_arcstick_device::read_exp(offs_t offset)
|
||||
else
|
||||
ret |= m_daisychain->read_exp(1);
|
||||
}
|
||||
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -292,7 +292,7 @@ void nes_joypad_device::write(UINT8 data)
|
||||
{
|
||||
if (data & 0x01)
|
||||
return;
|
||||
|
||||
|
||||
m_latch = m_joypad->read();
|
||||
}
|
||||
|
||||
@ -311,7 +311,6 @@ void nes_arcstick_device::write(UINT8 data)
|
||||
|
||||
if (data & 0x01)
|
||||
return;
|
||||
|
||||
|
||||
m_latch = m_joypad->read();
|
||||
}
|
||||
|
||||
|
@ -51,9 +51,9 @@ class nes_fcpad2_device : public nes_joypad_device
|
||||
public:
|
||||
// construction/destruction
|
||||
nes_fcpad2_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
||||
|
||||
virtual ioport_constructor device_input_ports() const;
|
||||
|
||||
|
||||
protected:
|
||||
virtual UINT8 read_exp(offs_t offset);
|
||||
virtual void write(UINT8 data);
|
||||
@ -66,7 +66,7 @@ class nes_ccpadl_device : public nes_joypad_device
|
||||
public:
|
||||
// construction/destruction
|
||||
nes_ccpadl_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
||||
|
||||
virtual ioport_constructor device_input_ports() const;
|
||||
};
|
||||
|
||||
@ -77,7 +77,7 @@ class nes_ccpadr_device : public nes_joypad_device
|
||||
public:
|
||||
// construction/destruction
|
||||
nes_ccpadr_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
||||
|
||||
virtual ioport_constructor device_input_ports() const;
|
||||
};
|
||||
|
||||
@ -88,7 +88,7 @@ class nes_arcstick_device : public nes_joypad_device
|
||||
public:
|
||||
// construction/destruction
|
||||
nes_arcstick_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
||||
|
||||
virtual ioport_constructor device_input_ports() const;
|
||||
virtual machine_config_constructor device_mconfig_additions() const;
|
||||
|
||||
@ -96,7 +96,7 @@ protected:
|
||||
virtual UINT8 read_bit0() { return 0; }
|
||||
virtual UINT8 read_exp(offs_t offset);
|
||||
virtual void write(UINT8 data);
|
||||
|
||||
|
||||
required_device<nes_control_port_device> m_daisychain;
|
||||
required_ioport m_cfg;
|
||||
};
|
||||
|
@ -81,7 +81,7 @@ void nes_konamihs_device::device_reset()
|
||||
UINT8 nes_konamihs_device::read_exp(offs_t offset)
|
||||
{
|
||||
UINT8 ret = 0;
|
||||
if (offset == 1) //$4017
|
||||
if (offset == 1) //$4017
|
||||
{
|
||||
ret |= m_latch_p1 << 1;
|
||||
ret |= m_latch_p2 << 3;
|
||||
|
@ -1,9 +1,8 @@
|
||||
/**********************************************************************
|
||||
|
||||
Nintendo Entertainment System - Miracle Piano Keyboard
|
||||
|
||||
TODO: basically everything, this is just a skeleton with no
|
||||
real MIDI handling at the moment.
|
||||
|
||||
TODO: MIDI input, output is now working.
|
||||
|
||||
Copyright MESS Team.
|
||||
Visit http://mamedev.org for licensing and usage restrictions.
|
||||
@ -44,6 +43,10 @@ void nes_miracle_device::device_timer(emu_timer &timer, device_timer_id id, int
|
||||
{
|
||||
m_strobe_clock++;
|
||||
}
|
||||
else
|
||||
{
|
||||
device_serial_interface::device_timer(timer, id, param, ptr);
|
||||
}
|
||||
}
|
||||
|
||||
//**************************************************************************
|
||||
@ -157,7 +160,7 @@ void nes_miracle_device::write(UINT8 data)
|
||||
m_strobe_on = 1;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (m_strobe_on)
|
||||
{
|
||||
// was timer running?
|
||||
@ -204,7 +207,6 @@ void nes_miracle_device::rcv_complete() // Rx completed receiving byte
|
||||
|
||||
void nes_miracle_device::tra_complete() // Tx completed sending byte
|
||||
{
|
||||
// printf("Tx complete\n");
|
||||
// is there more waiting to send?
|
||||
if (m_xmit_read != m_xmit_write)
|
||||
{
|
||||
@ -222,14 +224,14 @@ void nes_miracle_device::tra_complete() // Tx completed sending byte
|
||||
|
||||
void nes_miracle_device::tra_callback() // Tx send bit
|
||||
{
|
||||
UINT8 bit = transmit_register_get_data_bit();
|
||||
|
||||
// send this to midi out
|
||||
m_midiout->write_txd(transmit_register_get_data_bit());
|
||||
m_midiout->write_txd(bit);
|
||||
}
|
||||
|
||||
void nes_miracle_device::xmit_char(UINT8 data)
|
||||
{
|
||||
// printf("xmit %02x\n", data);
|
||||
|
||||
// if tx is busy it'll pick this up automatically when it completes
|
||||
// if not, send now!
|
||||
if (!m_tx_busy)
|
||||
|
@ -28,7 +28,7 @@ class nes_miracle_device : public device_t,
|
||||
public device_nes_control_port_interface
|
||||
{
|
||||
public:
|
||||
static const int XMIT_RING_SIZE = 16;
|
||||
static const int XMIT_RING_SIZE = 64;
|
||||
|
||||
// construction/destruction
|
||||
nes_miracle_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
@ -18,36 +18,36 @@ const device_type NES_MJPANEL = &device_creator<nes_mjpanel_device>;
|
||||
|
||||
static INPUT_PORTS_START( nes_mjpanel )
|
||||
PORT_START("MJPANEL.0")
|
||||
PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
|
||||
PORT_START("MJPANEL.1")
|
||||
PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_MAHJONG_N )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_MAHJONG_M )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_MAHJONG_L )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_MAHJONG_K )
|
||||
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_MAHJONG_J )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_MAHJONG_I )
|
||||
PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_MAHJONG_N )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_MAHJONG_M )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_MAHJONG_L )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_MAHJONG_K )
|
||||
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_MAHJONG_J )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_MAHJONG_I )
|
||||
|
||||
PORT_START("MJPANEL.2")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_MAHJONG_H )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_MAHJONG_G )
|
||||
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_MAHJONG_F )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_MAHJONG_E )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_MAHJONG_D )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_MAHJONG_C )
|
||||
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_MAHJONG_B )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_MAHJONG_A )
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_MAHJONG_H )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_MAHJONG_G )
|
||||
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_MAHJONG_F )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_MAHJONG_E )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_MAHJONG_D )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_MAHJONG_C )
|
||||
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_MAHJONG_B )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_MAHJONG_A )
|
||||
|
||||
PORT_START("MJPANEL.3")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_MAHJONG_RON )
|
||||
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_MAHJONG_REACH )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_MAHJONG_CHI )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_MAHJONG_PON )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_MAHJONG_KAN )
|
||||
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SELECT ) PORT_NAME("Mahjong Select")
|
||||
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_START ) PORT_NAME("Mahjong Start")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_MAHJONG_RON )
|
||||
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_MAHJONG_REACH )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_MAHJONG_CHI )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_MAHJONG_PON )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_MAHJONG_KAN )
|
||||
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SELECT ) PORT_NAME("Mahjong Select")
|
||||
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_START ) PORT_NAME("Mahjong Start")
|
||||
INPUT_PORTS_END
|
||||
|
||||
|
||||
@ -124,7 +124,7 @@ void nes_mjpanel_device::write(UINT8 data)
|
||||
{
|
||||
if (data & 0x01)
|
||||
return;
|
||||
|
||||
|
||||
if (data & 0xf8)
|
||||
logerror("Error: Mahjong panel read with mux data %02x\n", (data & 0xfe));
|
||||
else
|
||||
|
@ -20,8 +20,8 @@ static INPUT_PORTS_START( nes_pachinko )
|
||||
PORT_START("JOYPAD")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("A")
|
||||
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("B")
|
||||
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SELECT )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START )
|
||||
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SELECT )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY
|
||||
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY
|
||||
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY
|
||||
@ -85,7 +85,7 @@ UINT8 nes_pachinko_device::read_exp(offs_t offset)
|
||||
{
|
||||
UINT8 ret = 0;
|
||||
// this controller behaves like a standard P3 joypad, with longer stream of inputs
|
||||
if (offset == 0) //$4016
|
||||
if (offset == 0) //$4016
|
||||
{
|
||||
ret |= (m_latch & 1) << 1;
|
||||
m_latch >>= 1;
|
||||
@ -101,7 +101,7 @@ void nes_pachinko_device::write(UINT8 data)
|
||||
{
|
||||
if (data & 0x01)
|
||||
return;
|
||||
|
||||
|
||||
m_latch = m_joypad->read();
|
||||
m_latch |= ((m_trigger->read() ^ 0xff) & 0xff) << 8;
|
||||
m_latch |= 0xff0000;
|
||||
|
@ -81,7 +81,7 @@ void nes_partytap_device::device_reset()
|
||||
UINT8 nes_partytap_device::read_exp(offs_t offset)
|
||||
{
|
||||
UINT8 ret = 0;
|
||||
if (offset == 1) //$4017
|
||||
if (offset == 1) //$4017
|
||||
{
|
||||
ret |= m_latch & 0x1c;
|
||||
m_latch >>= 3;
|
||||
|
@ -130,7 +130,7 @@ void nes_powerpad_device::write(UINT8 data)
|
||||
{
|
||||
if (data & 0x01)
|
||||
return;
|
||||
|
||||
|
||||
m_latch[0] = m_ipt1->read();
|
||||
m_latch[1] = m_ipt2->read() | 0xf0;
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ static INPUT_PORTS_START( fc_suborkey )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_G) PORT_CHAR('G')
|
||||
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F) PORT_CHAR('F')
|
||||
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_C) PORT_CHAR('C')
|
||||
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F2) PORT_CHAR(UCHAR_MAMEKEY(F2))
|
||||
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F2) PORT_CHAR(UCHAR_MAMEKEY(F2))
|
||||
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_E) PORT_CHAR('E')
|
||||
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_5) PORT_CHAR('5')
|
||||
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_V) PORT_CHAR('V')
|
||||
@ -32,57 +32,57 @@ static INPUT_PORTS_START( fc_suborkey )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_D) PORT_CHAR('D')
|
||||
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_S) PORT_CHAR('S')
|
||||
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_END) PORT_CHAR(UCHAR_MAMEKEY(END))
|
||||
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F1) PORT_CHAR(UCHAR_MAMEKEY(F1))
|
||||
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F1) PORT_CHAR(UCHAR_MAMEKEY(F1))
|
||||
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_W) PORT_CHAR('W')
|
||||
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_3) PORT_CHAR('3')
|
||||
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_X) PORT_CHAR('X')
|
||||
|
||||
PORT_START("SUBOR.2")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_INSERT) PORT_CHAR(UCHAR_MAMEKEY(INSERT))
|
||||
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(8)
|
||||
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("NEXT")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_INSERT) PORT_CHAR(UCHAR_MAMEKEY(INSERT))
|
||||
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(8)
|
||||
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("NEXT")
|
||||
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(UCHAR_MAMEKEY(RIGHT))
|
||||
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F8) PORT_CHAR(UCHAR_MAMEKEY(F8))
|
||||
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("PRIOR")
|
||||
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F8) PORT_CHAR(UCHAR_MAMEKEY(F8))
|
||||
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("PRIOR")
|
||||
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_DEL) PORT_CHAR(UCHAR_MAMEKEY(DEL))
|
||||
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_HOME) PORT_CHAR(UCHAR_MAMEKEY(HOME))
|
||||
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_HOME) PORT_CHAR(UCHAR_MAMEKEY(HOME))
|
||||
|
||||
PORT_START("SUBOR.3")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_9) PORT_CHAR('9')
|
||||
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_I) PORT_CHAR('I')
|
||||
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_L) PORT_CHAR('L')
|
||||
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',')
|
||||
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F5) PORT_CHAR(UCHAR_MAMEKEY(F5))
|
||||
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',')
|
||||
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F5) PORT_CHAR(UCHAR_MAMEKEY(F5))
|
||||
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_O) PORT_CHAR('O')
|
||||
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_0) PORT_CHAR('0')
|
||||
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.')
|
||||
|
||||
PORT_START("SUBOR.4")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR(']')
|
||||
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13)
|
||||
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_UP) PORT_CHAR(UCHAR_MAMEKEY(UP))
|
||||
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_LEFT) PORT_CHAR(UCHAR_MAMEKEY(LEFT))
|
||||
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F7) PORT_CHAR(UCHAR_MAMEKEY(F7))
|
||||
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('[')
|
||||
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR('\\')
|
||||
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_DOWN) PORT_CHAR(UCHAR_MAMEKEY(DOWN))
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR(']')
|
||||
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13)
|
||||
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_UP) PORT_CHAR(UCHAR_MAMEKEY(UP))
|
||||
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_LEFT) PORT_CHAR(UCHAR_MAMEKEY(LEFT))
|
||||
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F7) PORT_CHAR(UCHAR_MAMEKEY(F7))
|
||||
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('[')
|
||||
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR('\\')
|
||||
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_DOWN) PORT_CHAR(UCHAR_MAMEKEY(DOWN))
|
||||
|
||||
PORT_START("SUBOR.5")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Q) PORT_CHAR('Q')
|
||||
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_CAPSLOCK) PORT_CHAR(UCHAR_MAMEKEY(CAPSLOCK))
|
||||
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_CAPSLOCK) PORT_CHAR(UCHAR_MAMEKEY(CAPSLOCK))
|
||||
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Z) PORT_CHAR('Z')
|
||||
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_TAB) PORT_CHAR('\t')
|
||||
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_ESC) PORT_CHAR(UCHAR_MAMEKEY(ESC))
|
||||
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_ESC) PORT_CHAR(UCHAR_MAMEKEY(ESC))
|
||||
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_A) PORT_CHAR('A')
|
||||
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_1) PORT_CHAR('1')
|
||||
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_LCONTROL) PORT_CHAR(UCHAR_SHIFT_2)
|
||||
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_LCONTROL) PORT_CHAR(UCHAR_SHIFT_2)
|
||||
|
||||
PORT_START("SUBOR.6")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_7) PORT_CHAR('7')
|
||||
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Y) PORT_CHAR('Y')
|
||||
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_K) PORT_CHAR('K')
|
||||
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_M) PORT_CHAR('M')
|
||||
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F4) PORT_CHAR(UCHAR_MAMEKEY(F4))
|
||||
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F4) PORT_CHAR(UCHAR_MAMEKEY(F4))
|
||||
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_U) PORT_CHAR('U')
|
||||
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_8) PORT_CHAR('8')
|
||||
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_J) PORT_CHAR('J')
|
||||
@ -92,17 +92,17 @@ static INPUT_PORTS_START( fc_suborkey )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_COLON) PORT_CHAR(':')
|
||||
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR('\'')
|
||||
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/')
|
||||
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F6) PORT_CHAR(UCHAR_MAMEKEY(F6))
|
||||
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F6) PORT_CHAR(UCHAR_MAMEKEY(F6))
|
||||
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_P) PORT_CHAR('P')
|
||||
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('=')
|
||||
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_LSHIFT) PORT_CHAR(UCHAR_SHIFT_1)
|
||||
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_LSHIFT) PORT_CHAR(UCHAR_SHIFT_1)
|
||||
|
||||
PORT_START("SUBOR.8")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_T) PORT_CHAR('T')
|
||||
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_H) PORT_CHAR('H')
|
||||
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_N) PORT_CHAR('N')
|
||||
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ')
|
||||
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F3) PORT_CHAR(UCHAR_MAMEKEY(F3))
|
||||
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F3) PORT_CHAR(UCHAR_MAMEKEY(F3))
|
||||
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_R) PORT_CHAR('R')
|
||||
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6) PORT_CHAR('6')
|
||||
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_B) PORT_CHAR('B')
|
||||
@ -111,11 +111,11 @@ static INPUT_PORTS_START( fc_suborkey )
|
||||
PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
|
||||
PORT_START("SUBOR.10")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("LMENU")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("LMENU")
|
||||
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_4_PAD) PORT_CHAR(UCHAR_MAMEKEY(4_PAD))
|
||||
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_7_PAD) PORT_CHAR(UCHAR_MAMEKEY(7_PAD))
|
||||
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F11) PORT_CHAR(UCHAR_MAMEKEY(F11))
|
||||
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F12) PORT_CHAR(UCHAR_MAMEKEY(F12))
|
||||
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F11) PORT_CHAR(UCHAR_MAMEKEY(F11))
|
||||
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F12) PORT_CHAR(UCHAR_MAMEKEY(F12))
|
||||
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_1_PAD) PORT_CHAR(UCHAR_MAMEKEY(1_PAD))
|
||||
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_2_PAD) PORT_CHAR(UCHAR_MAMEKEY(2_PAD))
|
||||
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_8_PAD) PORT_CHAR(UCHAR_MAMEKEY(8_PAD))
|
||||
@ -124,20 +124,20 @@ static INPUT_PORTS_START( fc_suborkey )
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_MINUS_PAD)PORT_CHAR(UCHAR_MAMEKEY(MINUS_PAD))
|
||||
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_PLUS_PAD) PORT_CHAR(UCHAR_MAMEKEY(PLUS_PAD))
|
||||
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_ASTERISK) PORT_CHAR(UCHAR_MAMEKEY(ASTERISK))
|
||||
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_9_PAD) PORT_CHAR(UCHAR_MAMEKEY(9_PAD))
|
||||
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F10) PORT_CHAR(UCHAR_MAMEKEY(F10))
|
||||
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_5_PAD) PORT_CHAR(UCHAR_MAMEKEY(5_PAD))
|
||||
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_9_PAD) PORT_CHAR(UCHAR_MAMEKEY(9_PAD))
|
||||
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F10) PORT_CHAR(UCHAR_MAMEKEY(F10))
|
||||
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_5_PAD) PORT_CHAR(UCHAR_MAMEKEY(5_PAD))
|
||||
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SLASH_PAD)PORT_CHAR(UCHAR_MAMEKEY(SLASH_PAD))
|
||||
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_NUMLOCK) PORT_CHAR(UCHAR_MAMEKEY(NUMLOCK))
|
||||
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_NUMLOCK) PORT_CHAR(UCHAR_MAMEKEY(NUMLOCK))
|
||||
|
||||
PORT_START("SUBOR.12")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_TILDE) PORT_CHAR('`')
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_TILDE) PORT_CHAR('`')
|
||||
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6_PAD) PORT_CHAR(UCHAR_MAMEKEY(6_PAD))
|
||||
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("PAUSE")
|
||||
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("SPACE2")
|
||||
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F9) PORT_CHAR(UCHAR_MAMEKEY(F9))
|
||||
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("PAUSE")
|
||||
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("SPACE2")
|
||||
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F9) PORT_CHAR(UCHAR_MAMEKEY(F9))
|
||||
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_3_PAD) PORT_CHAR(UCHAR_MAMEKEY(3_PAD))
|
||||
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Keypad .") PORT_CODE(KEYCODE_DEL_PAD)
|
||||
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Keypad .") PORT_CODE(KEYCODE_DEL_PAD)
|
||||
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_0_PAD) PORT_CHAR(UCHAR_MAMEKEY(0_PAD))
|
||||
INPUT_PORTS_END
|
||||
|
||||
@ -198,7 +198,7 @@ void nes_suborkey_device::device_reset()
|
||||
UINT8 nes_suborkey_device::read_exp(offs_t offset)
|
||||
{
|
||||
UINT8 ret = 0;
|
||||
if (offset == 1) //$4017
|
||||
if (offset == 1) //$4017
|
||||
{
|
||||
// Subor Keyboard: rows of the keyboard matrix are read 4-bits at time and returned as bit1->bit4
|
||||
if (m_fck_scan < 13)
|
||||
@ -206,7 +206,7 @@ UINT8 nes_suborkey_device::read_exp(offs_t offset)
|
||||
else
|
||||
ret |= 0x1e;
|
||||
}
|
||||
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -218,12 +218,12 @@ void nes_suborkey_device::write(UINT8 data)
|
||||
{
|
||||
if (BIT(data, 2)) // keyboard active
|
||||
{
|
||||
UINT8 out = BIT(data, 1); // scan
|
||||
UINT8 out = BIT(data, 1); // scan
|
||||
if (m_fck_mode && !out && ++m_fck_scan > 12)
|
||||
m_fck_scan = 0;
|
||||
|
||||
|
||||
m_fck_mode = out; // access lower or upper 4 bits
|
||||
|
||||
|
||||
if (BIT(data, 0)) // reset
|
||||
m_fck_scan = 0;
|
||||
}
|
||||
|
@ -80,7 +80,7 @@ void nes_zapper_device::device_reset()
|
||||
UINT8 nes_zapper_device::read_bit34()
|
||||
{
|
||||
UINT8 ret = m_trigger->read();
|
||||
if (!m_port->m_brightpixel_cb.isnull() &&
|
||||
if (!m_port->m_brightpixel_cb.isnull() &&
|
||||
m_port->m_brightpixel_cb(m_lightx->read(), m_lighty->read()))
|
||||
ret &= ~0x08; // sprite hit
|
||||
else
|
||||
@ -91,7 +91,7 @@ UINT8 nes_zapper_device::read_bit34()
|
||||
UINT8 nes_zapper_device::read_exp(offs_t offset)
|
||||
{
|
||||
UINT8 ret = 0;
|
||||
if (offset == 1) // $4017
|
||||
if (offset == 1) // $4017
|
||||
ret |= nes_zapper_device::read_bit34();
|
||||
return ret;
|
||||
}
|
||||
|
@ -20,10 +20,10 @@ const device_type SMS_JOYPAD = &device_creator<sms_joypad_device>;
|
||||
|
||||
static INPUT_PORTS_START( sms_joypad )
|
||||
PORT_START("JOYPAD")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) // Vcc
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) // TL
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) // TH
|
||||
|
@ -37,7 +37,7 @@ void dpc_device::device_start()
|
||||
save_item(NAME(m_df[i].music_mode), i);
|
||||
save_item(NAME(m_df[i].osc_clk), i);
|
||||
}
|
||||
|
||||
|
||||
save_item(NAME(m_movamt));
|
||||
save_item(NAME(m_latch_62));
|
||||
save_item(NAME(m_latch_64));
|
||||
|
@ -36,27 +36,27 @@
|
||||
class media_identifier
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
media_identifier(cli_options &options);
|
||||
// construction/destruction
|
||||
media_identifier(cli_options &options);
|
||||
|
||||
// getters
|
||||
int total() const { return m_total; }
|
||||
int matches() const { return m_matches; }
|
||||
int nonroms() const { return m_nonroms; }
|
||||
// getters
|
||||
int total() const { return m_total; }
|
||||
int matches() const { return m_matches; }
|
||||
int nonroms() const { return m_nonroms; }
|
||||
|
||||
// operations
|
||||
void reset() { m_total = m_matches = m_nonroms = 0; }
|
||||
void identify(const char *name);
|
||||
void identify_file(const char *name);
|
||||
void identify_data(const char *name, const UINT8 *data, int length);
|
||||
int find_by_hash(const hash_collection &hashes, int length);
|
||||
// operations
|
||||
void reset() { m_total = m_matches = m_nonroms = 0; }
|
||||
void identify(const char *name);
|
||||
void identify_file(const char *name);
|
||||
void identify_data(const char *name, const UINT8 *data, int length);
|
||||
int find_by_hash(const hash_collection &hashes, int length);
|
||||
|
||||
private:
|
||||
// internal state
|
||||
driver_enumerator m_drivlist;
|
||||
int m_total;
|
||||
int m_matches;
|
||||
int m_nonroms;
|
||||
// internal state
|
||||
driver_enumerator m_drivlist;
|
||||
int m_total;
|
||||
int m_matches;
|
||||
int m_nonroms;
|
||||
};
|
||||
|
||||
|
||||
@ -1619,8 +1619,8 @@ void cli_frontend::execute_commands(const char *exename)
|
||||
}
|
||||
|
||||
if (!m_osd.execute_command(m_options.command()))
|
||||
// if we get here, we don't know what has been requested
|
||||
throw emu_fatalerror(MAMERR_INVALID_CONFIG, "Unknown command '%s' specified", m_options.command());
|
||||
// if we get here, we don't know what has been requested
|
||||
throw emu_fatalerror(MAMERR_INVALID_CONFIG, "Unknown command '%s' specified", m_options.command());
|
||||
}
|
||||
|
||||
|
||||
|
@ -60,6 +60,5 @@ const options_entry cli_options::s_option_entries[] =
|
||||
cli_options::cli_options()
|
||||
: emu_options()
|
||||
{
|
||||
add_entries(cli_options::s_option_entries);
|
||||
add_entries(cli_options::s_option_entries);
|
||||
}
|
||||
|
||||
|
@ -51,7 +51,7 @@ ADDRESS_MAP_END
|
||||
arcompact_device::arcompact_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
: cpu_device(mconfig, ARCA5, "ARCtangent-A5", tag, owner, clock, "arca5", __FILE__)
|
||||
, m_program_config("program", ENDIANNESS_LITTLE, 32, 32, 0) // some docs describe these as 'middle endian'?!
|
||||
, m_io_config( "io", ENDIANNESS_LITTLE, 32, AUX_SPACE_ADDRESS_WIDTH, 0, ADDRESS_MAP_NAME( arcompact_auxreg_map ) )
|
||||
, m_io_config( "io", ENDIANNESS_LITTLE, 32, AUX_SPACE_ADDRESS_WIDTH, 0, ADDRESS_MAP_NAME( arcompact_auxreg_map ) )
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -60,17 +60,17 @@ class arcompact_device : public cpu_device
|
||||
public:
|
||||
// construction/destruction
|
||||
arcompact_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
||||
|
||||
DECLARE_READ32_MEMBER( arcompact_auxreg002_LPSTART_r);
|
||||
DECLARE_WRITE32_MEMBER(arcompact_auxreg002_LPSTART_w);
|
||||
DECLARE_READ32_MEMBER( arcompact_auxreg003_LPEND_r);
|
||||
DECLARE_WRITE32_MEMBER(arcompact_auxreg003_LPEND_w);
|
||||
|
||||
|
||||
DECLARE_READ32_MEMBER( arcompact_auxreg00a_STATUS32_r);
|
||||
DECLARE_READ32_MEMBER( arcompact_auxreg025_INTVECTORBASE_r);
|
||||
DECLARE_WRITE32_MEMBER( arcompact_auxreg025_INTVECTORBASE_w);
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_start();
|
||||
@ -184,17 +184,17 @@ protected:
|
||||
ARCOMPACT_RETTYPE arcompact_handle04_1c(OPS_32);
|
||||
ARCOMPACT_RETTYPE arcompact_handle04_1d(OPS_32);
|
||||
// ARCOMPACT_RETTYPE arcompact_handle04_20(OPS_32);
|
||||
// ARCOMPACT_RETTYPE arcompact_handle04_21(OPS_32);
|
||||
// ARCOMPACT_RETTYPE arcompact_handle04_21(OPS_32);
|
||||
ARCOMPACT_RETTYPE arcompact_handle04_22(OPS_32);
|
||||
ARCOMPACT_RETTYPE arcompact_handle04_23(OPS_32);
|
||||
ARCOMPACT_RETTYPE arcompact_handle04_28(OPS_32);
|
||||
ARCOMPACT_RETTYPE arcompact_handle04_29(OPS_32);
|
||||
// ARCOMPACT_RETTYPE arcompact_handle04_2a(OPS_32);
|
||||
// ARCOMPACT_RETTYPE arcompact_handle04_2a(OPS_32);
|
||||
// ARCOMPACT_RETTYPE arcompact_handle04_2b(OPS_32);
|
||||
ARCOMPACT_RETTYPE arcompact_handle04_2f_00(OPS_32);
|
||||
ARCOMPACT_RETTYPE arcompact_handle04_2f_01(OPS_32);
|
||||
// ARCOMPACT_RETTYPE arcompact_handle04_2f_02(OPS_32);
|
||||
// ARCOMPACT_RETTYPE arcompact_handle04_2f_03(OPS_32);
|
||||
// ARCOMPACT_RETTYPE arcompact_handle04_2f_03(OPS_32);
|
||||
ARCOMPACT_RETTYPE arcompact_handle04_2f_04(OPS_32);
|
||||
ARCOMPACT_RETTYPE arcompact_handle04_2f_05(OPS_32);
|
||||
ARCOMPACT_RETTYPE arcompact_handle04_2f_06(OPS_32);
|
||||
@ -770,7 +770,7 @@ protected:
|
||||
ARCOMPACT_RETTYPE arcompact_handle19_0x_helper(OPS_16, const char* optext, int shift, int format);
|
||||
ARCOMPACT_RETTYPE arcompact_handle1e_0x_helper(OPS_16, const char* optext);
|
||||
ARCOMPACT_RETTYPE arcompact_handle1e_03_0x_helper(OPS_16, const char* optext);
|
||||
|
||||
|
||||
|
||||
UINT32 handle_jump_to_addr(int delay, int link, UINT32 address, UINT32 next_addr);
|
||||
UINT32 handle_jump_to_register(int delay, int link, UINT32 reg, UINT32 next_addr, int flag);
|
||||
|
@ -2142,7 +2142,7 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_21_p11_m0(OPS_32) // Jcc.
|
||||
size = 8;
|
||||
}
|
||||
|
||||
// c = limm;
|
||||
// c = limm;
|
||||
|
||||
}
|
||||
else
|
||||
@ -2151,7 +2151,7 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_21_p11_m0(OPS_32) // Jcc.
|
||||
// Jcc [c] 0010 0RRR 1110 0000 0RRR CCCC CC0Q QQQQ
|
||||
// no conditional links to ILINK1, ILINK2?
|
||||
|
||||
// c = m_regs[creg];
|
||||
// c = m_regs[creg];
|
||||
}
|
||||
|
||||
if (!check_condition(condition))
|
||||
|
@ -114,8 +114,14 @@ void h8_device::device_start()
|
||||
save_item(NAME(EXR));
|
||||
save_item(NAME(CCR));
|
||||
save_item(NAME(TMP1));
|
||||
save_item(NAME(TMP2));
|
||||
save_item(NAME(inst_state));
|
||||
save_item(NAME(inst_substate));
|
||||
save_item(NAME(irq_vector));
|
||||
save_item(NAME(taken_irq_vector));
|
||||
save_item(NAME(irq_level));
|
||||
save_item(NAME(taken_irq_level));
|
||||
save_item(NAME(irq_nmi));
|
||||
|
||||
m_icountptr = &icount;
|
||||
|
||||
|
@ -98,7 +98,7 @@ enum
|
||||
#define ALWAYS64 0x400
|
||||
#define SPECIAL64 0x800
|
||||
#define SPECIAL64_ENT(x) (SPECIAL64 | ((x) << 24))
|
||||
#define GROUP_MOD 0x1000
|
||||
#define GROUP_MOD 0x1000
|
||||
|
||||
struct I386_OPCODE {
|
||||
const char *mnemonic;
|
||||
@ -1953,7 +1953,7 @@ static const GROUP_OP group_op_table[] =
|
||||
{ "group0F0D", group0F0D_table },
|
||||
{ "group0F12", group0F12_table },
|
||||
{ "group0F16", group0F16_table },
|
||||
{ "group0F18", group0F18_table },
|
||||
{ "group0F18", group0F18_table },
|
||||
{ "group0F71", group0F71_table },
|
||||
{ "group0F72", group0F72_table },
|
||||
{ "group0F73", group0F73_table },
|
||||
|
@ -75,8 +75,8 @@ void m4510_device::device_reset()
|
||||
nomap = true;
|
||||
|
||||
// Wild guess, this setting makes the cpu start executing some code in the c65 driver
|
||||
map_offset[1] = 0x30000;
|
||||
map_enable = 0x80;
|
||||
//map_offset[1] = 0x2e000;
|
||||
//map_enable = 0x80;
|
||||
m65ce02_device::device_reset();
|
||||
}
|
||||
|
||||
@ -86,7 +86,7 @@ bool m4510_device::memory_translate(address_spacenum spacenum, int intention, of
|
||||
{
|
||||
address = map(address);
|
||||
}
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -579,7 +579,7 @@ offs_t m6502_device::disassemble_generic(char *buffer, offs_t pc, const UINT8 *o
|
||||
break;
|
||||
|
||||
case DASM_rw2:
|
||||
sprintf(buffer, " $%04x", (pc & 0xf0000) | UINT16(pc + 3 + INT16((opram[2] << 8) | opram[1])));
|
||||
sprintf(buffer, " $%04x", (pc & 0xf0000) | UINT16(pc + 2 + INT16((opram[2] << 8) | opram[1])));
|
||||
flags |= 3;
|
||||
break;
|
||||
|
||||
|
@ -220,8 +220,8 @@ protected:
|
||||
|
||||
// inline helpers
|
||||
static inline bool page_changing(UINT16 base, int delta) { return ((base + delta) ^ base) & 0xff00; }
|
||||
static inline UINT16 set_l(UINT16 base, UINT8 val) { return (base & 0xff00) | val; }
|
||||
static inline UINT16 set_h(UINT16 base, UINT8 val) { return (base & 0x00ff) | (val << 8); }
|
||||
static inline UINT16 set_l(UINT16 base, UINT16 val) { return (base & 0xff00) | val; }
|
||||
static inline UINT16 set_h(UINT16 base, UINT16 val) { return (base & 0x00ff) | (val << 8); }
|
||||
|
||||
inline void dec_SP() { SP = set_l(SP, SP-1); }
|
||||
inline void inc_SP() { SP = set_l(SP, SP+1); }
|
||||
|
@ -9,4 +9,13 @@ map_imp
|
||||
map_offset[0] = (A<<8) | ((X & 0xf) << 16);
|
||||
map_offset[1] = (Y<<8) | ((Z & 0xf) << 16);
|
||||
map_enable = ((X & 0xf0) >> 4) | (Z & 0xf0);
|
||||
logerror("MAP execute\n");
|
||||
logerror("0x0000 - 0x1fff = %08x\n",map_enable & 1 ? map_offset[0]+0x0000 : 0x0000);
|
||||
logerror("0x2000 - 0x3fff = %08x\n",map_enable & 2 ? map_offset[0]+0x2000 : 0x2000);
|
||||
logerror("0x4000 - 0x5fff = %08x\n",map_enable & 4 ? map_offset[0]+0x4000 : 0x4000);
|
||||
logerror("0x6000 - 0x7fff = %08x\n",map_enable & 8 ? map_offset[0]+0x6000 : 0x6000);
|
||||
logerror("0x8000 - 0x9fff = %08x\n",map_enable & 16 ? map_offset[1]+0x8000 : 0x8000);
|
||||
logerror("0xa000 - 0xbfff = %08x\n",map_enable & 32 ? map_offset[1]+0xa000 : 0xa000);
|
||||
logerror("0xc000 - 0xdfff = %08x\n",map_enable & 64 ? map_offset[1]+0xc000 : 0xc000);
|
||||
logerror("0xe000 - 0xffff = %08x\n",map_enable & 128 ? map_offset[1]+0xe000 : 0xe000);
|
||||
prefetch();
|
||||
|
@ -245,7 +245,7 @@ bcc_rw2
|
||||
TMP = read_pc();
|
||||
TMP = set_h(TMP, read_pc());
|
||||
if(!(P & F_C))
|
||||
PC += TMP;
|
||||
PC += TMP-1;
|
||||
prefetch();
|
||||
|
||||
bcs_ce_rel
|
||||
@ -258,7 +258,7 @@ bcs_rw2
|
||||
TMP = read_pc();
|
||||
TMP = set_h(TMP, read_pc());
|
||||
if(P & F_C)
|
||||
PC += TMP;
|
||||
PC += TMP-1;
|
||||
prefetch();
|
||||
|
||||
beq_ce_rel
|
||||
@ -271,7 +271,7 @@ beq_rw2
|
||||
TMP = read_pc();
|
||||
TMP = set_h(TMP, read_pc());
|
||||
if(P & F_Z)
|
||||
PC += TMP;
|
||||
PC += TMP-1;
|
||||
prefetch();
|
||||
|
||||
bit_ce_abx
|
||||
@ -307,7 +307,7 @@ bmi_rw2
|
||||
TMP = read_pc();
|
||||
TMP = set_h(TMP, read_pc());
|
||||
if(P & F_N)
|
||||
PC += TMP;
|
||||
PC += TMP-1;
|
||||
prefetch();
|
||||
|
||||
bne_ce_rel
|
||||
@ -320,7 +320,7 @@ bne_rw2
|
||||
TMP = read_pc();
|
||||
TMP = set_h(TMP, read_pc());
|
||||
if(!(P & F_Z))
|
||||
PC += TMP;
|
||||
PC += TMP-1;
|
||||
prefetch();
|
||||
|
||||
bpl_ce_rel
|
||||
@ -333,7 +333,7 @@ bpl_rw2
|
||||
TMP = read_pc();
|
||||
TMP = set_h(TMP, read_pc());
|
||||
if(!(P & F_N))
|
||||
PC += TMP;
|
||||
PC += TMP-1;
|
||||
prefetch();
|
||||
|
||||
bra_ce_rel
|
||||
@ -344,7 +344,7 @@ bra_ce_rel
|
||||
bra_rw2
|
||||
TMP = read_pc();
|
||||
TMP = set_h(TMP, read_pc());
|
||||
PC += TMP;
|
||||
PC += TMP - 1;
|
||||
prefetch();
|
||||
|
||||
brk_ce_imp
|
||||
@ -379,7 +379,7 @@ bsr_rw2
|
||||
write(SP, PC);
|
||||
dec_SP_ce();
|
||||
TMP = set_h(TMP, read_pc());
|
||||
PC += TMP;
|
||||
PC += TMP-1;
|
||||
prefetch();
|
||||
|
||||
bvc_ce_rel
|
||||
@ -392,7 +392,7 @@ bvc_rw2
|
||||
TMP = read_pc();
|
||||
TMP = set_h(TMP, read_pc());
|
||||
if(!(P & F_V))
|
||||
PC += TMP;
|
||||
PC += TMP-1;
|
||||
prefetch();
|
||||
|
||||
bvs_ce_rel
|
||||
@ -405,7 +405,7 @@ bvs_rw2
|
||||
TMP = read_pc();
|
||||
TMP = set_h(TMP, read_pc());
|
||||
if(P & F_V)
|
||||
PC += TMP;
|
||||
PC += TMP-1;
|
||||
prefetch();
|
||||
|
||||
clc_ce_imp
|
||||
@ -419,6 +419,7 @@ cld_ce_imp
|
||||
cle_imp
|
||||
read_pc_noinc();
|
||||
P &= ~F_E;
|
||||
logerror("CLE\n");
|
||||
prefetch();
|
||||
|
||||
cli_ce_imp
|
||||
|
@ -272,7 +272,7 @@ M68KMAKE_OPCODE_HANDLER_HEADER
|
||||
extern void m68040_fpu_op0(m68000_base_device *m68k);
|
||||
extern void m68040_fpu_op1(m68000_base_device *m68k);
|
||||
extern void m68881_mmu_ops(m68000_base_device *m68k);
|
||||
extern void m68881_ftrap(m68000_base_device *m68k);
|
||||
extern void m68881_ftrap(m68000_base_device *m68k);
|
||||
|
||||
/* ======================================================================== */
|
||||
/* ========================= INSTRUCTION HANDLERS ========================= */
|
||||
|
@ -699,7 +699,7 @@ static void m68k_cause_bus_error(m68000_base_device *m68k)
|
||||
{
|
||||
/* only the 68010 throws this unique type-1000 frame */
|
||||
m68ki_stack_frame_1000(m68k, REG_PPC(m68k), sr, EXCEPTION_BUS_ERROR);
|
||||
}
|
||||
}
|
||||
else if (m68k->mmu_tmp_buserror_address == REG_PPC(m68k))
|
||||
{
|
||||
m68ki_stack_frame_1010(m68k, sr, EXCEPTION_BUS_ERROR, REG_PPC(m68k), m68k->mmu_tmp_buserror_address);
|
||||
|
@ -2177,11 +2177,11 @@ void m68881_ftrap(m68000_base_device *m68k)
|
||||
// trap here
|
||||
m68ki_exception_trap(m68k, EXCEPTION_TRAPV);
|
||||
}
|
||||
else // fall through, requires eating the operand
|
||||
else // fall through, requires eating the operand
|
||||
{
|
||||
switch (m68k->ir & 0x7)
|
||||
{
|
||||
case 2: // word operand
|
||||
case 2: // word operand
|
||||
OPER_I_16(m68k);
|
||||
break;
|
||||
|
||||
@ -2189,9 +2189,8 @@ void m68881_ftrap(m68000_base_device *m68k)
|
||||
OPER_I_32(m68k);
|
||||
break;
|
||||
|
||||
case 4: // no operand
|
||||
case 4: // no operand
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1037,7 +1037,7 @@ void tms1400_cpu_device::op_call()
|
||||
|
||||
m_ps = m_ps << 4 | m_pa;
|
||||
m_pa = m_pb;
|
||||
|
||||
|
||||
m_cs = m_cs << 2 | m_ca;
|
||||
m_ca = m_cb;
|
||||
}
|
||||
@ -1057,10 +1057,10 @@ void tms1400_cpu_device::op_retn()
|
||||
|
||||
m_pc = m_sr & m_pc_mask;
|
||||
m_sr >>= m_pc_bits;
|
||||
|
||||
|
||||
m_pa = m_pb = m_ps & 0xf;
|
||||
m_ps >>= 4;
|
||||
|
||||
|
||||
m_ca = m_cb = m_cs & 3;
|
||||
m_cs >>= 2;
|
||||
}
|
||||
|
@ -114,12 +114,12 @@ bool finder_base::report_missing(bool found, const char *objname, bool required)
|
||||
|
||||
void finder_base::printf_warning(const char *format, ...)
|
||||
{
|
||||
va_list argptr;
|
||||
char buffer[1024];
|
||||
va_list argptr;
|
||||
char buffer[1024];
|
||||
|
||||
/* do the output */
|
||||
va_start(argptr, format);
|
||||
vsnprintf(buffer, 1024, format, argptr);
|
||||
osd_printf_warning("%s", buffer);
|
||||
va_end(argptr);
|
||||
/* do the output */
|
||||
va_start(argptr, format);
|
||||
vsnprintf(buffer, 1024, format, argptr);
|
||||
osd_printf_warning("%s", buffer);
|
||||
va_end(argptr);
|
||||
}
|
||||
|
@ -57,7 +57,7 @@ protected:
|
||||
void *find_memshare(UINT8 width, size_t &bytes, bool required);
|
||||
bool report_missing(bool found, const char *objname, bool required);
|
||||
|
||||
void printf_warning(const char *format, ...) ATTR_PRINTF(2,3);
|
||||
void printf_warning(const char *format, ...) ATTR_PRINTF(2,3);
|
||||
|
||||
// internal state
|
||||
finder_base *m_next;
|
||||
|
@ -89,7 +89,7 @@ device_state_entry::device_state_entry(int index, const char *symbol, void *data
|
||||
|
||||
device_state_entry::device_state_entry(int index, device_state_interface *dev)
|
||||
: m_device_state(dev),
|
||||
m_next(NULL),
|
||||
m_next(NULL),
|
||||
m_index(index),
|
||||
m_dataptr(NULL),
|
||||
m_datamask(0),
|
||||
|
@ -57,6 +57,7 @@ enum
|
||||
XTAL_2_5MHz = 2500000, /* Janken Man units */
|
||||
XTAL_3MHz = 3000000, /* Probably only used to drive 68705 or similar MCUs on 80's Taito PCBs */
|
||||
XTAL_3_12MHz = 3120000, /* SP0250 clock on Gottlieb games */
|
||||
XTAL_3_5MHz = 3500000, /* Reported by Commodore 65 document, true xtal unchecked on PCB */
|
||||
XTAL_3_52128MHz = 3521280, /* RCA COSMAC VIP */
|
||||
XTAL_3_579545MHz = 3579545, /* NTSC color subcarrier, extremely common, used on 100's of PCBs (Keytronic custom part #48-300-010 is equivalent) */
|
||||
XTAL_3_6864MHz = 3686400, /* CPS3 */
|
||||
|
@ -17,61 +17,61 @@
|
||||
emu_fatalerror::emu_fatalerror(const char *format, ...)
|
||||
: code(0)
|
||||
{
|
||||
if (format == NULL)
|
||||
{
|
||||
text[0] = '\0';
|
||||
}
|
||||
else
|
||||
{
|
||||
va_list ap;
|
||||
va_start(ap, format);
|
||||
vsprintf(text, format, ap);
|
||||
va_end(ap);
|
||||
}
|
||||
osd_break_into_debugger(text);
|
||||
if (format == NULL)
|
||||
{
|
||||
text[0] = '\0';
|
||||
}
|
||||
else
|
||||
{
|
||||
va_list ap;
|
||||
va_start(ap, format);
|
||||
vsprintf(text, format, ap);
|
||||
va_end(ap);
|
||||
}
|
||||
osd_break_into_debugger(text);
|
||||
}
|
||||
|
||||
emu_fatalerror::emu_fatalerror(const char *format, va_list ap)
|
||||
: code(0)
|
||||
{
|
||||
if (format == NULL)
|
||||
{
|
||||
text[0] = '\0';
|
||||
}
|
||||
else
|
||||
{
|
||||
vsprintf(text, format, ap);
|
||||
}
|
||||
osd_break_into_debugger(text);
|
||||
if (format == NULL)
|
||||
{
|
||||
text[0] = '\0';
|
||||
}
|
||||
else
|
||||
{
|
||||
vsprintf(text, format, ap);
|
||||
}
|
||||
osd_break_into_debugger(text);
|
||||
}
|
||||
|
||||
emu_fatalerror::emu_fatalerror(int _exitcode, const char *format, ...)
|
||||
: code(_exitcode)
|
||||
{
|
||||
if (format == NULL)
|
||||
{
|
||||
text[0] = '\0';
|
||||
}
|
||||
else
|
||||
{
|
||||
va_list ap;
|
||||
va_start(ap, format);
|
||||
vsprintf(text, format, ap);
|
||||
va_end(ap);
|
||||
}
|
||||
if (format == NULL)
|
||||
{
|
||||
text[0] = '\0';
|
||||
}
|
||||
else
|
||||
{
|
||||
va_list ap;
|
||||
va_start(ap, format);
|
||||
vsprintf(text, format, ap);
|
||||
va_end(ap);
|
||||
}
|
||||
}
|
||||
|
||||
emu_fatalerror::emu_fatalerror(int _exitcode, const char *format, va_list ap)
|
||||
: code(_exitcode)
|
||||
{
|
||||
if (format == NULL)
|
||||
{
|
||||
text[0] = '\0';
|
||||
}
|
||||
else
|
||||
{
|
||||
vsprintf(text, format, ap);
|
||||
}
|
||||
if (format == NULL)
|
||||
{
|
||||
text[0] = '\0';
|
||||
}
|
||||
else
|
||||
{
|
||||
vsprintf(text, format, ap);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -89,18 +89,18 @@ void report_bad_device_cast(const device_t *dev, const std::type_info &src_type,
|
||||
|
||||
void fatalerror(const char *format, ...)
|
||||
{
|
||||
va_list ap;
|
||||
va_start(ap, format);
|
||||
emu_fatalerror error(format, ap);
|
||||
va_end(ap);
|
||||
throw error;
|
||||
va_list ap;
|
||||
va_start(ap, format);
|
||||
emu_fatalerror error(format, ap);
|
||||
va_end(ap);
|
||||
throw error;
|
||||
}
|
||||
|
||||
void fatalerror_exitcode(running_machine &machine, int exitcode, const char *format, ...)
|
||||
{
|
||||
va_list ap;
|
||||
va_start(ap, format);
|
||||
emu_fatalerror error(exitcode, format, ap);
|
||||
va_end(ap);
|
||||
throw error;
|
||||
va_list ap;
|
||||
va_start(ap, format);
|
||||
emu_fatalerror error(exitcode, format, ap);
|
||||
va_end(ap);
|
||||
throw error;
|
||||
}
|
||||
|
@ -150,10 +150,10 @@ const options_entry emu_options::s_option_entries[] =
|
||||
|
||||
// debugging options
|
||||
{ NULL, NULL, OPTION_HEADER, "CORE DEBUGGING OPTIONS" },
|
||||
{ OPTION_VERBOSE ";v", "0", OPTION_BOOLEAN, "display additional diagnostic information" },
|
||||
{ OPTION_LOG, "0", OPTION_BOOLEAN, "generate an error.log file" },
|
||||
{ OPTION_OSLOG, "0", OPTION_BOOLEAN, "output error.log data to the system debugger" },
|
||||
{ OPTION_DEBUG ";d", "0", OPTION_BOOLEAN, "enable/disable debugger" },
|
||||
{ OPTION_VERBOSE ";v", "0", OPTION_BOOLEAN, "display additional diagnostic information" },
|
||||
{ OPTION_LOG, "0", OPTION_BOOLEAN, "generate an error.log file" },
|
||||
{ OPTION_OSLOG, "0", OPTION_BOOLEAN, "output error.log data to the system debugger" },
|
||||
{ OPTION_DEBUG ";d", "0", OPTION_BOOLEAN, "enable/disable debugger" },
|
||||
{ OPTION_UPDATEINPAUSE, "0", OPTION_BOOLEAN, "keep calling video updates while in pause" },
|
||||
{ OPTION_DEBUGSCRIPT, NULL, OPTION_STRING, "script for debugger" },
|
||||
|
||||
|
@ -318,11 +318,11 @@ public:
|
||||
bool joystick_contradictory() const { return bool_value(OPTION_JOYSTICK_CONTRADICTORY); }
|
||||
int coin_impulse() const { return int_value(OPTION_COIN_IMPULSE); }
|
||||
|
||||
// core debugging options
|
||||
bool log() const { return bool_value(OPTION_LOG); }
|
||||
bool debug() const { return bool_value(OPTION_DEBUG); }
|
||||
bool verbose() const { return bool_value(OPTION_VERBOSE); }
|
||||
bool oslog() const { return bool_value(OPTION_OSLOG); }
|
||||
// core debugging options
|
||||
bool log() const { return bool_value(OPTION_LOG); }
|
||||
bool debug() const { return bool_value(OPTION_DEBUG); }
|
||||
bool verbose() const { return bool_value(OPTION_VERBOSE); }
|
||||
bool oslog() const { return bool_value(OPTION_OSLOG); }
|
||||
const char *debug_script() const { return value(OPTION_DEBUGSCRIPT); }
|
||||
bool update_in_pause() const { return bool_value(OPTION_UPDATEINPAUSE); }
|
||||
|
||||
|
@ -714,8 +714,8 @@ int lua_engine::lua_screen::l_draw_text(lua_State *L)
|
||||
render_container &rc = sc->container();
|
||||
ui_manager &ui = sc->machine().ui();
|
||||
ui.draw_text_full(&rc, msg, x, y , (1.0f - x),
|
||||
JUSTIFY_LEFT, WRAP_WORD, DRAW_NORMAL, UI_TEXT_COLOR,
|
||||
UI_TEXT_BG_COLOR, NULL, NULL);
|
||||
JUSTIFY_LEFT, WRAP_WORD, DRAW_NORMAL, UI_TEXT_COLOR,
|
||||
UI_TEXT_BG_COLOR, NULL, NULL);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -108,7 +108,7 @@ static char giant_string_buffer[65536] = { 0 };
|
||||
|
||||
osd_interface &running_machine::osd() const
|
||||
{
|
||||
return m_manager.osd();
|
||||
return m_manager.osd();
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
@ -142,7 +142,7 @@ running_machine::running_machine(const machine_config &_config, machine_manager
|
||||
m_save(*this),
|
||||
m_memory(*this),
|
||||
m_ioport(*this),
|
||||
m_parameters(*this),
|
||||
m_parameters(*this),
|
||||
m_scheduler(*this)
|
||||
{
|
||||
memset(&m_base_time, 0, sizeof(m_base_time));
|
||||
|
@ -253,7 +253,7 @@ intelfsh_device::intelfsh_device(const machine_config &mconfig, device_type type
|
||||
m_size = 0x400000;
|
||||
m_maker_id = MFG_INTEL;
|
||||
m_device_id = 0x14;
|
||||
// m_sector_is_4k = true; 128kb?
|
||||
// m_sector_is_4k = true; 128kb?
|
||||
map = ADDRESS_MAP_NAME( memory_map16_32Mb );
|
||||
break;
|
||||
case FLASH_SST_39VF020:
|
||||
|
@ -48,17 +48,13 @@ void jvs_host::commit_raw()
|
||||
// - have the message length without the two header bytes but with the checksum byte in the second byte
|
||||
// - have at least one command byte
|
||||
if(send_size < 3 || send_buffer[0] == 0x00 || send_buffer[1] != send_size-1) {
|
||||
logerror("JVS checksum error\n");
|
||||
} /*
|
||||
Naomi suchie3 have bad working controls with this
|
||||
|
||||
// "This message is crap" doesn't exist so call it checksum error
|
||||
recv_buffer[0] = 0x00;
|
||||
recv_buffer[1] = 0x02;
|
||||
recv_buffer[2] = 0x03;
|
||||
recv_size = 3;
|
||||
|
||||
} else */ {
|
||||
logerror("JVS checksum error\n");
|
||||
// "This message is crap" doesn't exist so call it checksum error
|
||||
recv_buffer[0] = 0x00;
|
||||
recv_buffer[1] = 0x02;
|
||||
recv_buffer[2] = 0x03;
|
||||
recv_size = 3;
|
||||
} else {
|
||||
if(first_device) {
|
||||
first_device->message(send_buffer[0], send_buffer+2, send_size-2, recv_buffer+2, recv_size);
|
||||
recv_is_encoded = false;
|
||||
@ -120,10 +116,13 @@ void jvs_host::encode(UINT8 *buffer, UINT32 &size)
|
||||
if(!size)
|
||||
return;
|
||||
UINT32 add = 1;
|
||||
UINT8 sum = 0;
|
||||
for(UINT32 i=0; i<size; i++)
|
||||
sum += buffer[i];
|
||||
buffer[size++] = sum;
|
||||
for(UINT32 i=0; i<size; i++)
|
||||
if(buffer[i] == 0xd0 || buffer[i] == 0xe0)
|
||||
add++;
|
||||
UINT32 nsize = size+add;
|
||||
for(UINT32 i=size; i; i--) {
|
||||
UINT8 t = buffer[i-1];
|
||||
if(t == 0xd0 || t == 0xe0) {
|
||||
@ -134,11 +133,7 @@ void jvs_host::encode(UINT8 *buffer, UINT32 &size)
|
||||
buffer[i+add-1] = t;
|
||||
}
|
||||
buffer[0] = 0xe0;
|
||||
UINT8 sum = 0;
|
||||
for(UINT32 i=1; i<nsize; i++)
|
||||
sum += buffer[i];
|
||||
buffer[nsize++] = sum;
|
||||
size = nsize;
|
||||
size += add;
|
||||
}
|
||||
|
||||
void jvs_host::decode(UINT8 *buffer, UINT32 &size)
|
||||
@ -146,7 +141,7 @@ void jvs_host::decode(UINT8 *buffer, UINT32 &size)
|
||||
if(!size)
|
||||
return;
|
||||
UINT32 pos = 0;
|
||||
for(UINT32 i=0; i<size-1; i++) {
|
||||
for(UINT32 i=0; i<size; i++) {
|
||||
UINT8 t = buffer[i];
|
||||
if(!i && t == 0xe0)
|
||||
continue;
|
||||
@ -156,5 +151,5 @@ void jvs_host::decode(UINT8 *buffer, UINT32 &size)
|
||||
}
|
||||
buffer[pos++] = t;
|
||||
}
|
||||
size = pos;
|
||||
size = pos ? pos - 1 : 0;
|
||||
}
|
||||
|
@ -440,12 +440,12 @@ ATTR_COLD void netlist_mame_device_t::save_state()
|
||||
if (td != NULL) save_pointer(td, s->m_name, s->m_count);
|
||||
}
|
||||
break;
|
||||
case DT_FLOAT:
|
||||
{
|
||||
float *td = s->resolved<float>();
|
||||
if (td != NULL) save_pointer(td, s->m_name, s->m_count);
|
||||
}
|
||||
break;
|
||||
case DT_FLOAT:
|
||||
{
|
||||
float *td = s->resolved<float>();
|
||||
if (td != NULL) save_pointer(td, s->m_name, s->m_count);
|
||||
}
|
||||
break;
|
||||
case DT_INT64:
|
||||
save_pointer((INT64 *) s->m_ptr, s->m_name, s->m_count);
|
||||
break;
|
||||
|
@ -94,7 +94,7 @@ machine_manager* machine_manager::m_manager = NULL;
|
||||
|
||||
osd_interface &machine_manager::osd() const
|
||||
{
|
||||
return m_osd;
|
||||
return m_osd;
|
||||
}
|
||||
|
||||
|
||||
|
@ -14,7 +14,7 @@ class netlist_matrix_solver_direct_t: public netlist_matrix_solver_t
|
||||
public:
|
||||
|
||||
netlist_matrix_solver_direct_t(const netlist_solver_parameters_t ¶ms, int size);
|
||||
netlist_matrix_solver_direct_t(const eSolverType type, const netlist_solver_parameters_t ¶ms, int size);
|
||||
netlist_matrix_solver_direct_t(const eSolverType type, const netlist_solver_parameters_t ¶ms, int size);
|
||||
|
||||
virtual ~netlist_matrix_solver_direct_t();
|
||||
|
||||
@ -69,13 +69,13 @@ netlist_matrix_solver_direct_t<m_N, _storage_N>::~netlist_matrix_solver_direct_t
|
||||
{
|
||||
//delete[] m_A[k];
|
||||
}
|
||||
for (int k = 0; k < N(); k++)
|
||||
{
|
||||
nl_free(m_terms[k]);
|
||||
nl_free(m_row_ops[k]);
|
||||
}
|
||||
nl_free(m_row_ops[N()]);
|
||||
//delete[] m_last_RHS;
|
||||
for (int k = 0; k < N(); k++)
|
||||
{
|
||||
nl_free(m_terms[k]);
|
||||
nl_free(m_row_ops[k]);
|
||||
}
|
||||
nl_free(m_row_ops[N()]);
|
||||
//delete[] m_last_RHS;
|
||||
//delete[] m_RHS;
|
||||
nl_free_array(m_terms);
|
||||
nl_free_array(m_rails_temp);
|
||||
@ -193,17 +193,17 @@ ATTR_COLD void netlist_matrix_solver_direct_t<m_N, _storage_N>::vsetup(netlist_a
|
||||
* Sorting as a general matrix pre-conditioning is mentioned in
|
||||
* literature but I have found no articles about Gauss Seidel.
|
||||
*
|
||||
* For Gaussian Elimination however increasing order is better suited.
|
||||
* FIXME: Even better would be to sort on elements right of the matrix diagonal.
|
||||
*
|
||||
* For Gaussian Elimination however increasing order is better suited.
|
||||
* FIXME: Even better would be to sort on elements right of the matrix diagonal.
|
||||
*
|
||||
*/
|
||||
|
||||
int sort_order = (type() == GAUSS_SEIDEL ? 1 : -1);
|
||||
int sort_order = (type() == GAUSS_SEIDEL ? 1 : -1);
|
||||
|
||||
for (int k = 0; k < N() / 2; k++)
|
||||
for (int i = 0; i < N() - 1; i++)
|
||||
{
|
||||
if ((m_terms[i]->m_railstart - m_terms[i+1]->m_railstart) * sort_order < 0)
|
||||
if ((m_terms[i]->m_railstart - m_terms[i+1]->m_railstart) * sort_order < 0)
|
||||
{
|
||||
std::swap(m_terms[i],m_terms[i+1]);
|
||||
m_nets.swap(i, i+1);
|
||||
@ -475,15 +475,15 @@ netlist_matrix_solver_direct_t<m_N, _storage_N>::netlist_matrix_solver_direct_t(
|
||||
, m_dim(size)
|
||||
, m_lp_fact(0)
|
||||
{
|
||||
m_terms = nl_alloc_array(terms_t *, N());
|
||||
m_rails_temp = nl_alloc_array(terms_t, N());
|
||||
m_terms = nl_alloc_array(terms_t *, N());
|
||||
m_rails_temp = nl_alloc_array(terms_t, N());
|
||||
|
||||
for (int k = 0; k < N(); k++)
|
||||
{
|
||||
m_terms[k] = nl_alloc(terms_t);
|
||||
m_row_ops[k] = vector_ops_t::create_ops(k);
|
||||
}
|
||||
m_row_ops[N()] = vector_ops_t::create_ops(N());
|
||||
for (int k = 0; k < N(); k++)
|
||||
{
|
||||
m_terms[k] = nl_alloc(terms_t);
|
||||
m_row_ops[k] = vector_ops_t::create_ops(k);
|
||||
}
|
||||
m_row_ops[N()] = vector_ops_t::create_ops(N());
|
||||
}
|
||||
|
||||
|
||||
|
@ -17,16 +17,16 @@ class ATTR_ALIGNED(64) netlist_matrix_solver_gauss_seidel_t: public netlist_matr
|
||||
public:
|
||||
|
||||
netlist_matrix_solver_gauss_seidel_t(const netlist_solver_parameters_t ¶ms, int size)
|
||||
: netlist_matrix_solver_direct_t<m_N, _storage_N>(netlist_matrix_solver_t::GAUSS_SEIDEL, params, size)
|
||||
: netlist_matrix_solver_direct_t<m_N, _storage_N>(netlist_matrix_solver_t::GAUSS_SEIDEL, params, size)
|
||||
, m_lp_fact(0)
|
||||
, m_gs_fail(0)
|
||||
, m_gs_total(0)
|
||||
{
|
||||
const char *p = osd_getenv("NETLIST_STATS");
|
||||
if (p != NULL)
|
||||
m_log_stats = (bool) atoi(p);
|
||||
else
|
||||
m_log_stats = false;
|
||||
const char *p = osd_getenv("NETLIST_STATS");
|
||||
if (p != NULL)
|
||||
m_log_stats = (bool) atoi(p);
|
||||
else
|
||||
m_log_stats = false;
|
||||
}
|
||||
|
||||
virtual ~netlist_matrix_solver_gauss_seidel_t() {}
|
||||
@ -52,21 +52,21 @@ private:
|
||||
template <int m_N, int _storage_N>
|
||||
void netlist_matrix_solver_gauss_seidel_t<m_N, _storage_N>::log_stats()
|
||||
{
|
||||
if (this->m_stat_calculations != 0 && m_log_stats)
|
||||
{
|
||||
printf("==============================================\n");
|
||||
printf("Solver %s\n", this->name().cstr());
|
||||
printf(" ==> %d nets\n", this->N()); //, (*(*groups[i].first())->m_core_terms.first())->name().cstr());
|
||||
printf(" has %s elements\n", this->is_dynamic() ? "dynamic" : "no dynamic");
|
||||
printf(" has %s elements\n", this->is_timestep() ? "timestep" : "no timestep");
|
||||
printf(" %6.3f average newton raphson loops\n", (double) this->m_stat_newton_raphson / (double) this->m_stat_vsolver_calls);
|
||||
printf(" %10d invocations (%6d Hz) %10d gs fails (%6.2f%%) %6.3f average\n",
|
||||
this->m_stat_calculations,
|
||||
this->m_stat_calculations * 10 / (int) (this->netlist().time().as_double() * 10.0),
|
||||
this->m_gs_fail,
|
||||
100.0 * (double) this->m_gs_fail / (double) this->m_stat_calculations,
|
||||
(double) this->m_gs_total / (double) this->m_stat_calculations);
|
||||
}
|
||||
if (this->m_stat_calculations != 0 && m_log_stats)
|
||||
{
|
||||
printf("==============================================\n");
|
||||
printf("Solver %s\n", this->name().cstr());
|
||||
printf(" ==> %d nets\n", this->N()); //, (*(*groups[i].first())->m_core_terms.first())->name().cstr());
|
||||
printf(" has %s elements\n", this->is_dynamic() ? "dynamic" : "no dynamic");
|
||||
printf(" has %s elements\n", this->is_timestep() ? "timestep" : "no timestep");
|
||||
printf(" %6.3f average newton raphson loops\n", (double) this->m_stat_newton_raphson / (double) this->m_stat_vsolver_calls);
|
||||
printf(" %10d invocations (%6d Hz) %10d gs fails (%6.2f%%) %6.3f average\n",
|
||||
this->m_stat_calculations,
|
||||
this->m_stat_calculations * 10 / (int) (this->netlist().time().as_double() * 10.0),
|
||||
this->m_gs_fail,
|
||||
100.0 * (double) this->m_gs_fail / (double) this->m_stat_calculations,
|
||||
(double) this->m_gs_total / (double) this->m_stat_calculations);
|
||||
}
|
||||
}
|
||||
|
||||
template <int m_N, int _storage_N>
|
||||
@ -299,7 +299,7 @@ ATTR_HOT inline int netlist_matrix_solver_gauss_seidel_t<m_N, _storage_N>::vsolv
|
||||
//if (fabs(gabs_t - fabs(gtot_t)) > 1e-20)
|
||||
// printf("%d %e abs: %f tot: %f\n",k, gabs_t / gtot_t -1.0, gabs_t, gtot_t);
|
||||
|
||||
gabs_t *= 0.95; // avoid rounding issues
|
||||
gabs_t *= 0.95; // avoid rounding issues
|
||||
if (!USE_GABS || gabs_t <= gtot_t)
|
||||
{
|
||||
w[k] = ws / gtot_t;
|
||||
@ -343,7 +343,7 @@ ATTR_HOT inline int netlist_matrix_solver_gauss_seidel_t<m_N, _storage_N>::vsolv
|
||||
this->m_nets[k]->m_cur_Analog = new_V[k];
|
||||
|
||||
this->m_gs_total += resched_cnt;
|
||||
this->m_stat_calculations++;
|
||||
this->m_stat_calculations++;
|
||||
|
||||
if (resched)
|
||||
{
|
||||
|
@ -31,7 +31,7 @@ NETLIST_START(opamp_lm3900)
|
||||
NET_C(R1.2, R2.2, G1.ON)
|
||||
VCVS(G1)
|
||||
PARAM(G1.G, 10000000)
|
||||
//PARAM(G1.RI, 1)
|
||||
//PARAM(G1.RI, 1)
|
||||
PARAM(G1.RO, RES_K(8))
|
||||
|
||||
NETLIST_END()
|
||||
|
@ -99,11 +99,11 @@ ATTR_COLD void terms_t::set_pointers()
|
||||
|
||||
ATTR_COLD netlist_matrix_solver_t::netlist_matrix_solver_t(const eSolverType type, const netlist_solver_parameters_t ¶ms)
|
||||
: m_stat_calculations(0),
|
||||
m_stat_newton_raphson(0),
|
||||
m_stat_vsolver_calls(0),
|
||||
m_params(params),
|
||||
m_cur_ts(0),
|
||||
m_type(type)
|
||||
m_stat_newton_raphson(0),
|
||||
m_stat_vsolver_calls(0),
|
||||
m_params(params),
|
||||
m_cur_ts(0),
|
||||
m_type(type)
|
||||
{
|
||||
}
|
||||
|
||||
@ -257,7 +257,7 @@ ATTR_HOT void netlist_matrix_solver_t::step(const netlist_time delta)
|
||||
template<class C >
|
||||
void netlist_matrix_solver_t::solve_base(C *p)
|
||||
{
|
||||
m_stat_vsolver_calls++;
|
||||
m_stat_vsolver_calls++;
|
||||
if (is_dynamic())
|
||||
{
|
||||
int this_resched;
|
||||
@ -270,7 +270,7 @@ void netlist_matrix_solver_t::solve_base(C *p)
|
||||
newton_loops++;
|
||||
} while (this_resched > 1 && newton_loops < m_params.m_nr_loops);
|
||||
|
||||
m_stat_newton_raphson += newton_loops;
|
||||
m_stat_newton_raphson += newton_loops;
|
||||
// reschedule ....
|
||||
if (this_resched > 1 && !m_Q_sync.net().is_queued())
|
||||
{
|
||||
@ -438,7 +438,7 @@ netlist_matrix_solver_t * NETLIB_NAME(solver)::create_solver(int size, const int
|
||||
return nl_alloc(netlist_matrix_solver_direct2_t, m_params);
|
||||
else
|
||||
{
|
||||
typedef netlist_matrix_solver_gauss_seidel_t<m_N,_storage_N> solver_N;
|
||||
typedef netlist_matrix_solver_gauss_seidel_t<m_N,_storage_N> solver_N;
|
||||
if (size >= gs_threshold)
|
||||
return nl_alloc(solver_N, m_params, size);
|
||||
else
|
||||
|
@ -197,8 +197,8 @@ public:
|
||||
|
||||
enum eSolverType
|
||||
{
|
||||
GAUSSIAN_ELIMINATION,
|
||||
GAUSS_SEIDEL
|
||||
GAUSSIAN_ELIMINATION,
|
||||
GAUSS_SEIDEL
|
||||
};
|
||||
|
||||
ATTR_COLD netlist_matrix_solver_t(const eSolverType type, const netlist_solver_parameters_t ¶ms);
|
||||
@ -243,9 +243,9 @@ protected:
|
||||
plinearlist_t<netlist_analog_net_t *> m_nets;
|
||||
plinearlist_t<netlist_analog_output_t *> m_inps;
|
||||
|
||||
int m_stat_calculations;
|
||||
int m_stat_newton_raphson;
|
||||
int m_stat_vsolver_calls;
|
||||
int m_stat_calculations;
|
||||
int m_stat_newton_raphson;
|
||||
int m_stat_vsolver_calls;
|
||||
|
||||
const netlist_solver_parameters_t &m_params;
|
||||
|
||||
@ -264,7 +264,7 @@ private:
|
||||
|
||||
ATTR_HOT void update_inputs();
|
||||
|
||||
const eSolverType m_type;
|
||||
const eSolverType m_type;
|
||||
};
|
||||
|
||||
|
||||
|
@ -78,7 +78,7 @@ void nl_initialize_factory(netlist_factory_t &factory)
|
||||
ENTRY(VCCS, VCCS, "-")
|
||||
ENTRY(CCCS, CCCS, "-")
|
||||
ENTRY(dummy_input, DUMMY_INPUT, "-")
|
||||
ENTRY(frontier, FRONTIER, "+I,Q")
|
||||
ENTRY(frontier, FRONTIER, "+I,Q")
|
||||
ENTRY(QBJT_EB, QBJT_EB, "model")
|
||||
ENTRY(QBJT_switch, QBJT_SW, "model")
|
||||
ENTRY(ttl_input, TTL_INPUT, "IN")
|
||||
@ -148,4 +148,3 @@ void nl_initialize_factory(netlist_factory_t &factory)
|
||||
ENTRY(SN74LS629_dip, SN74LS629_DIP, "1.CAP1,2.CAP2")
|
||||
ENTRY(NE555_dip, NE555_DIP, "-")
|
||||
}
|
||||
|
||||
|
@ -43,7 +43,7 @@ NETLIB_START(4020_sub)
|
||||
register_output("Q5", m_Q[4]);
|
||||
register_output("Q6", m_Q[5]);
|
||||
register_output("Q7", m_Q[6]);
|
||||
register_output("Q8", m_Q[7]);
|
||||
register_output("Q8", m_Q[7]);
|
||||
register_output("Q9", m_Q[8]);
|
||||
register_output("Q10", m_Q[9]);
|
||||
register_output("Q11", m_Q[10]);
|
||||
|
@ -21,11 +21,11 @@ class nld_vdd_vss : public netlist_device_t
|
||||
|
||||
protected:
|
||||
ATTR_HOT void update() {};
|
||||
ATTR_HOT void start()
|
||||
{
|
||||
register_input("VDD,", m_vdd);
|
||||
register_input("VSS,", m_vss);
|
||||
};
|
||||
ATTR_HOT void start()
|
||||
{
|
||||
register_input("VDD,", m_vdd);
|
||||
register_input("VSS,", m_vss);
|
||||
};
|
||||
ATTR_HOT void reset() {};
|
||||
|
||||
public:
|
||||
|
@ -40,10 +40,9 @@
|
||||
NET_REGISTER_DEV(dummy_input, _name)
|
||||
|
||||
#define FRONTIER(_name, _IN, _OUT) \
|
||||
NET_REGISTER_DEV(frontier, _name) \
|
||||
NET_C(_IN, _name.I) \
|
||||
NET_C(_OUT, _name.Q) \
|
||||
|
||||
NET_REGISTER_DEV(frontier, _name) \
|
||||
NET_C(_IN, _name.I) \
|
||||
NET_C(_OUT, _name.Q)
|
||||
// -----------------------------------------------------------------------------
|
||||
// mainclock
|
||||
// -----------------------------------------------------------------------------
|
||||
@ -159,31 +158,31 @@ private:
|
||||
class NETLIB_NAME(frontier) : public netlist_device_t
|
||||
{
|
||||
public:
|
||||
ATTR_COLD NETLIB_NAME(frontier)()
|
||||
: netlist_device_t(DUMMY) { }
|
||||
ATTR_COLD NETLIB_NAME(frontier)()
|
||||
: netlist_device_t(DUMMY) { }
|
||||
|
||||
ATTR_COLD virtual ~NETLIB_NAME(frontier)() {}
|
||||
ATTR_COLD virtual ~NETLIB_NAME(frontier)() {}
|
||||
|
||||
protected:
|
||||
|
||||
ATTR_COLD void start()
|
||||
{
|
||||
register_input("I", m_I);
|
||||
register_output("Q", m_Q);
|
||||
}
|
||||
ATTR_COLD void start()
|
||||
{
|
||||
register_input("I", m_I);
|
||||
register_output("Q", m_Q);
|
||||
}
|
||||
|
||||
ATTR_COLD void reset()
|
||||
{
|
||||
}
|
||||
ATTR_COLD void reset()
|
||||
{
|
||||
}
|
||||
|
||||
ATTR_HOT ATTR_ALIGN void update()
|
||||
{
|
||||
OUTANALOG(m_Q, INPANALOG(m_I));
|
||||
}
|
||||
ATTR_HOT ATTR_ALIGN void update()
|
||||
{
|
||||
OUTANALOG(m_Q, INPANALOG(m_I));
|
||||
}
|
||||
|
||||
private:
|
||||
netlist_analog_input_t m_I;
|
||||
netlist_analog_output_t m_Q;
|
||||
netlist_analog_input_t m_I;
|
||||
netlist_analog_output_t m_Q;
|
||||
|
||||
};
|
||||
|
||||
|
@ -1001,4 +1001,3 @@ NETLIB_UPDATE(mainclock)
|
||||
net.toggle_new_Q();
|
||||
net.set_time(netlist().time() + m_inc);
|
||||
}
|
||||
|
||||
|
@ -337,7 +337,7 @@ public:
|
||||
CAPACITOR, // Capacitor
|
||||
DIODE, // Diode
|
||||
DUMMY, // DUMMY device without function
|
||||
FRONTIER, // Net frontier
|
||||
FRONTIER, // Net frontier
|
||||
BJT_EB, // BJT(Ebers-Moll)
|
||||
BJT_SWITCH, // BJT(Switch)
|
||||
VCVS, // Voltage controlled voltage source
|
||||
@ -1268,13 +1268,13 @@ ATTR_HOT inline netlist_logic_net_t & RESTRICT netlist_net_t::as_logic()
|
||||
|
||||
ATTR_HOT inline const netlist_logic_net_t & RESTRICT netlist_net_t::as_logic() const
|
||||
{
|
||||
nl_assert(family() == LOGIC);
|
||||
nl_assert(family() == LOGIC);
|
||||
return static_cast<const netlist_logic_net_t &>(*this);
|
||||
}
|
||||
|
||||
ATTR_HOT inline netlist_analog_net_t & RESTRICT netlist_net_t::as_analog()
|
||||
{
|
||||
nl_assert(family() == ANALOG);
|
||||
nl_assert(family() == ANALOG);
|
||||
return static_cast<netlist_analog_net_t &>(*this);
|
||||
}
|
||||
|
||||
|
@ -121,21 +121,21 @@
|
||||
class nl_fatalerror : public std::exception
|
||||
{
|
||||
public:
|
||||
nl_fatalerror(const char *format, ...) ATTR_PRINTF(2,3)
|
||||
{
|
||||
char text[1024];
|
||||
va_list ap;
|
||||
va_start(ap, format);
|
||||
vsprintf(text, format, ap);
|
||||
va_end(ap);
|
||||
osd_printf_error("%s\n", text);
|
||||
}
|
||||
nl_fatalerror(const char *format, va_list ap)
|
||||
{
|
||||
char text[1024];
|
||||
vsprintf(text, format, ap);
|
||||
osd_printf_error("%s\n", text);
|
||||
}
|
||||
nl_fatalerror(const char *format, ...) ATTR_PRINTF(2,3)
|
||||
{
|
||||
char text[1024];
|
||||
va_list ap;
|
||||
va_start(ap, format);
|
||||
vsprintf(text, format, ap);
|
||||
va_end(ap);
|
||||
osd_printf_error("%s\n", text);
|
||||
}
|
||||
nl_fatalerror(const char *format, va_list ap)
|
||||
{
|
||||
char text[1024];
|
||||
vsprintf(text, format, ap);
|
||||
osd_printf_error("%s\n", text);
|
||||
}
|
||||
};
|
||||
|
||||
//============================================================
|
||||
|
@ -56,18 +56,18 @@
|
||||
|
||||
ATTR_COLD const nl_util::pstring_list net_device_t_base_factory::term_param_list()
|
||||
{
|
||||
if (m_def_param.startsWith("+"))
|
||||
return nl_util::split(m_def_param.substr(1), ",");
|
||||
else
|
||||
return nl_util::pstring_list();
|
||||
if (m_def_param.startsWith("+"))
|
||||
return nl_util::split(m_def_param.substr(1), ",");
|
||||
else
|
||||
return nl_util::pstring_list();
|
||||
}
|
||||
|
||||
ATTR_COLD const nl_util::pstring_list net_device_t_base_factory::def_params()
|
||||
{
|
||||
if (m_def_param.startsWith("+") || m_def_param.equals("-"))
|
||||
return nl_util::pstring_list();
|
||||
else
|
||||
return nl_util::split(m_def_param, ",");
|
||||
if (m_def_param.startsWith("+") || m_def_param.equals("-"))
|
||||
return nl_util::pstring_list();
|
||||
else
|
||||
return nl_util::split(m_def_param, ",");
|
||||
}
|
||||
|
||||
|
||||
|
@ -97,10 +97,10 @@ netlist_device_t *netlist_setup_t::register_dev(netlist_device_t *dev, const pst
|
||||
|
||||
netlist_device_t *netlist_setup_t::register_dev(const pstring &classname, const pstring &name)
|
||||
{
|
||||
netlist_device_t *dev = factory().new_device_by_classname(classname);
|
||||
if (dev == NULL)
|
||||
netlist().error("Class %s not found!\n", classname.cstr());
|
||||
return register_dev(dev, name);
|
||||
netlist_device_t *dev = factory().new_device_by_classname(classname);
|
||||
if (dev == NULL)
|
||||
netlist().error("Class %s not found!\n", classname.cstr());
|
||||
return register_dev(dev, name);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
@ -697,7 +697,7 @@ void netlist_setup_t::resolve_inputs()
|
||||
|
||||
void netlist_setup_t::start_devices()
|
||||
{
|
||||
//FIXME: we need a nl_getenv
|
||||
//FIXME: we need a nl_getenv
|
||||
if (getenv("NL_LOGS"))
|
||||
{
|
||||
NL_VERBOSE_OUT(("Creating dynamic logs ...\n"));
|
||||
|
@ -146,13 +146,13 @@ public:
|
||||
void namespace_push(const pstring &aname);
|
||||
void namespace_pop();
|
||||
|
||||
netlist_factory_t &factory() { return *m_factory; }
|
||||
const netlist_factory_t &factory() const { return *m_factory; }
|
||||
netlist_factory_t &factory() { return *m_factory; }
|
||||
const netlist_factory_t &factory() const { return *m_factory; }
|
||||
|
||||
/* not ideal, but needed for save_state */
|
||||
tagmap_terminal_t m_terminals;
|
||||
/* not ideal, but needed for save_state */
|
||||
tagmap_terminal_t m_terminals;
|
||||
|
||||
void print_stats() const;
|
||||
void print_stats() const;
|
||||
|
||||
protected:
|
||||
|
||||
|
@ -60,7 +60,7 @@ public:
|
||||
ATTR_COLD ~plinearlist_t()
|
||||
{
|
||||
if (m_list != NULL)
|
||||
nl_free_array(m_list);
|
||||
nl_free_array(m_list);
|
||||
m_list = NULL;
|
||||
}
|
||||
|
||||
@ -183,7 +183,7 @@ private:
|
||||
else
|
||||
{
|
||||
if (m_list != NULL)
|
||||
nl_free_array(m_list);
|
||||
nl_free_array(m_list);
|
||||
m_list = NULL;
|
||||
m_count = 0;
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ ATTR_COLD void pstate_manager_t::save_state_ptr(const pstring &stname, const pst
|
||||
"DT_INT8",
|
||||
"DT_INT",
|
||||
"DT_BOOLEAN",
|
||||
"DT_FLOAT"
|
||||
"DT_FLOAT"
|
||||
};
|
||||
|
||||
NL_VERBOSE_OUT(("SAVE: <%s> %s(%d) %p\n", fullname.cstr(), ts[dt].cstr(), size, ptr));
|
||||
@ -64,8 +64,8 @@ ATTR_COLD void pstate_manager_t::post_load()
|
||||
|
||||
template<> ATTR_COLD void pstate_manager_t::save_item(pstate_callback_t &state, const void *owner, const pstring &stname)
|
||||
{
|
||||
//save_state_ptr(stname, DT_CUSTOM, 0, 1, &state);
|
||||
pstate_entry_t *p = nl_alloc(pstate_entry_t, stname, owner, &state);
|
||||
m_save.add(p);
|
||||
state.register_state(*this, stname);
|
||||
//save_state_ptr(stname, DT_CUSTOM, 0, 1, &state);
|
||||
pstate_entry_t *p = nl_alloc(pstate_entry_t, stname, owner, &state);
|
||||
m_save.add(p);
|
||||
state.register_state(*this, stname);
|
||||
}
|
||||
|
@ -24,4 +24,3 @@ void parameters_manager::add(astring tag, astring value)
|
||||
{
|
||||
m_parameters.add(tag, value);
|
||||
}
|
||||
|
||||
|
288
src/emu/render.c
288
src/emu/render.c
@ -207,62 +207,62 @@ inline item_layer get_layer_and_blendmode(const layout_view &view, int index, in
|
||||
|
||||
render_texinfo &render_texinfo::operator=(const render_texinfo &src)
|
||||
{
|
||||
free_palette();
|
||||
base = src.base;
|
||||
rowpixels = src.rowpixels;
|
||||
width = src.width;
|
||||
height = src.height;
|
||||
seqid = src.seqid;
|
||||
osddata = src.osddata;
|
||||
m_palette = src.m_palette;
|
||||
if (m_palette != NULL)
|
||||
{
|
||||
m_palette->ref_count++;
|
||||
}
|
||||
return *this;
|
||||
free_palette();
|
||||
base = src.base;
|
||||
rowpixels = src.rowpixels;
|
||||
width = src.width;
|
||||
height = src.height;
|
||||
seqid = src.seqid;
|
||||
osddata = src.osddata;
|
||||
m_palette = src.m_palette;
|
||||
if (m_palette != NULL)
|
||||
{
|
||||
m_palette->ref_count++;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
render_texinfo::render_texinfo(const render_texinfo &src)
|
||||
{
|
||||
base = src.base;
|
||||
rowpixels = src.rowpixels;
|
||||
width = src.width;
|
||||
height = src.height;
|
||||
seqid = src.seqid;
|
||||
osddata = src.osddata;
|
||||
m_palette = src.m_palette;
|
||||
if (m_palette != NULL)
|
||||
{
|
||||
m_palette->ref_count++;
|
||||
}
|
||||
base = src.base;
|
||||
rowpixels = src.rowpixels;
|
||||
width = src.width;
|
||||
height = src.height;
|
||||
seqid = src.seqid;
|
||||
osddata = src.osddata;
|
||||
m_palette = src.m_palette;
|
||||
if (m_palette != NULL)
|
||||
{
|
||||
m_palette->ref_count++;
|
||||
}
|
||||
}
|
||||
|
||||
void render_texinfo::set_palette(const dynamic_array<rgb_t> *source)
|
||||
{
|
||||
free_palette();
|
||||
if (source != NULL)
|
||||
{
|
||||
m_palette = global_alloc(render_palette_copy);
|
||||
m_palette->palette.copyfrom(*source);
|
||||
m_palette->ref_count = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_palette = NULL;
|
||||
}
|
||||
free_palette();
|
||||
if (source != NULL)
|
||||
{
|
||||
m_palette = global_alloc(render_palette_copy);
|
||||
m_palette->palette.copyfrom(*source);
|
||||
m_palette->ref_count = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_palette = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void render_texinfo::free_palette()
|
||||
{
|
||||
if (m_palette != NULL)
|
||||
{
|
||||
m_palette->ref_count--;
|
||||
if (m_palette->ref_count == 0)
|
||||
{
|
||||
global_free(m_palette);
|
||||
}
|
||||
}
|
||||
m_palette = NULL;
|
||||
if (m_palette != NULL)
|
||||
{
|
||||
m_palette->ref_count--;
|
||||
if (m_palette->ref_count == 0)
|
||||
{
|
||||
global_free(m_palette);
|
||||
}
|
||||
}
|
||||
m_palette = NULL;
|
||||
}
|
||||
|
||||
|
||||
@ -277,31 +277,31 @@ void render_texinfo::free_palette()
|
||||
|
||||
void render_primitive::reset()
|
||||
{
|
||||
// public state
|
||||
type = INVALID;
|
||||
bounds.x0 = 0;
|
||||
bounds.y0 = 0;
|
||||
bounds.x1 = 0;
|
||||
bounds.y1 = 0;
|
||||
color.a = 0;
|
||||
color.r = 0;
|
||||
color.g = 0;
|
||||
color.b = 0;
|
||||
flags = 0;
|
||||
width = 0.0f;
|
||||
texture.set_palette(NULL);
|
||||
texture = render_texinfo();
|
||||
texcoords.bl.u = 0.0f;
|
||||
texcoords.bl.v = 0.0f;
|
||||
texcoords.br.u = 0.0f;
|
||||
texcoords.br.v = 0.0f;
|
||||
texcoords.tl.u = 0.0f;
|
||||
texcoords.tl.v = 0.0f;
|
||||
texcoords.tr.u = 0.0f;
|
||||
texcoords.tr.v = 0.0f;
|
||||
// public state
|
||||
type = INVALID;
|
||||
bounds.x0 = 0;
|
||||
bounds.y0 = 0;
|
||||
bounds.x1 = 0;
|
||||
bounds.y1 = 0;
|
||||
color.a = 0;
|
||||
color.r = 0;
|
||||
color.g = 0;
|
||||
color.b = 0;
|
||||
flags = 0;
|
||||
width = 0.0f;
|
||||
texture.set_palette(NULL);
|
||||
texture = render_texinfo();
|
||||
texcoords.bl.u = 0.0f;
|
||||
texcoords.bl.v = 0.0f;
|
||||
texcoords.br.u = 0.0f;
|
||||
texcoords.br.v = 0.0f;
|
||||
texcoords.tl.u = 0.0f;
|
||||
texcoords.tl.v = 0.0f;
|
||||
texcoords.tr.u = 0.0f;
|
||||
texcoords.tr.v = 0.0f;
|
||||
|
||||
// do not clear m_next!
|
||||
// memset(&type, 0, FPTR(&texcoords + 1) - FPTR(&type));
|
||||
// do not clear m_next!
|
||||
// memset(&type, 0, FPTR(&texcoords + 1) - FPTR(&type));
|
||||
}
|
||||
|
||||
|
||||
@ -556,63 +556,63 @@ void render_texture::get_scaled(UINT32 dwidth, UINT32 dheight, render_texinfo &t
|
||||
texinfo.width = swidth;
|
||||
texinfo.height = sheight;
|
||||
// will be set later
|
||||
texinfo.set_palette(NULL);
|
||||
texinfo.set_palette(NULL);
|
||||
texinfo.seqid = ++m_curseq;
|
||||
}
|
||||
else
|
||||
{
|
||||
// make sure we can recover the original argb32 bitmap
|
||||
bitmap_argb32 dummy;
|
||||
bitmap_argb32 &srcbitmap = (m_bitmap != NULL) ? downcast<bitmap_argb32 &>(*m_bitmap) : dummy;
|
||||
// make sure we can recover the original argb32 bitmap
|
||||
bitmap_argb32 dummy;
|
||||
bitmap_argb32 &srcbitmap = (m_bitmap != NULL) ? downcast<bitmap_argb32 &>(*m_bitmap) : dummy;
|
||||
|
||||
// is it a size we already have?
|
||||
scaled_texture *scaled = NULL;
|
||||
int scalenum;
|
||||
for (scalenum = 0; scalenum < ARRAY_LENGTH(m_scaled); scalenum++)
|
||||
{
|
||||
scaled = &m_scaled[scalenum];
|
||||
// is it a size we already have?
|
||||
scaled_texture *scaled = NULL;
|
||||
int scalenum;
|
||||
for (scalenum = 0; scalenum < ARRAY_LENGTH(m_scaled); scalenum++)
|
||||
{
|
||||
scaled = &m_scaled[scalenum];
|
||||
|
||||
// we need a non-NULL bitmap with matching dest size
|
||||
if (scaled->bitmap != NULL && dwidth == scaled->bitmap->width() && dheight == scaled->bitmap->height())
|
||||
break;
|
||||
}
|
||||
// we need a non-NULL bitmap with matching dest size
|
||||
if (scaled->bitmap != NULL && dwidth == scaled->bitmap->width() && dheight == scaled->bitmap->height())
|
||||
break;
|
||||
}
|
||||
|
||||
// did we get one?
|
||||
if (scalenum == ARRAY_LENGTH(m_scaled))
|
||||
{
|
||||
int lowest = -1;
|
||||
// did we get one?
|
||||
if (scalenum == ARRAY_LENGTH(m_scaled))
|
||||
{
|
||||
int lowest = -1;
|
||||
|
||||
// didn't find one -- take the entry with the lowest seqnum
|
||||
for (scalenum = 0; scalenum < ARRAY_LENGTH(m_scaled); scalenum++)
|
||||
if ((lowest == -1 || m_scaled[scalenum].seqid < m_scaled[lowest].seqid) && !primlist.has_reference(m_scaled[scalenum].bitmap))
|
||||
lowest = scalenum;
|
||||
assert_always(lowest != -1, "Too many live texture instances!");
|
||||
// didn't find one -- take the entry with the lowest seqnum
|
||||
for (scalenum = 0; scalenum < ARRAY_LENGTH(m_scaled); scalenum++)
|
||||
if ((lowest == -1 || m_scaled[scalenum].seqid < m_scaled[lowest].seqid) && !primlist.has_reference(m_scaled[scalenum].bitmap))
|
||||
lowest = scalenum;
|
||||
assert_always(lowest != -1, "Too many live texture instances!");
|
||||
|
||||
// throw out any existing entries
|
||||
scaled = &m_scaled[lowest];
|
||||
if (scaled->bitmap != NULL)
|
||||
{
|
||||
m_manager->invalidate_all(scaled->bitmap);
|
||||
global_free(scaled->bitmap);
|
||||
}
|
||||
// throw out any existing entries
|
||||
scaled = &m_scaled[lowest];
|
||||
if (scaled->bitmap != NULL)
|
||||
{
|
||||
m_manager->invalidate_all(scaled->bitmap);
|
||||
global_free(scaled->bitmap);
|
||||
}
|
||||
|
||||
// allocate a new bitmap
|
||||
scaled->bitmap = global_alloc(bitmap_argb32(dwidth, dheight));
|
||||
scaled->seqid = ++m_curseq;
|
||||
// allocate a new bitmap
|
||||
scaled->bitmap = global_alloc(bitmap_argb32(dwidth, dheight));
|
||||
scaled->seqid = ++m_curseq;
|
||||
|
||||
// let the scaler do the work
|
||||
(*m_scaler)(*scaled->bitmap, srcbitmap, m_sbounds, m_param);
|
||||
}
|
||||
// let the scaler do the work
|
||||
(*m_scaler)(*scaled->bitmap, srcbitmap, m_sbounds, m_param);
|
||||
}
|
||||
|
||||
// finally fill out the new info
|
||||
primlist.add_reference(scaled->bitmap);
|
||||
texinfo.base = &scaled->bitmap->pix32(0);
|
||||
texinfo.rowpixels = scaled->bitmap->rowpixels();
|
||||
texinfo.width = dwidth;
|
||||
texinfo.height = dheight;
|
||||
// will be set later
|
||||
texinfo.set_palette(NULL);
|
||||
texinfo.seqid = scaled->seqid;
|
||||
// finally fill out the new info
|
||||
primlist.add_reference(scaled->bitmap);
|
||||
texinfo.base = &scaled->bitmap->pix32(0);
|
||||
texinfo.rowpixels = scaled->bitmap->rowpixels();
|
||||
texinfo.width = dwidth;
|
||||
texinfo.height = dheight;
|
||||
// will be set later
|
||||
texinfo.set_palette(NULL);
|
||||
texinfo.seqid = scaled->seqid;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1817,26 +1817,26 @@ void render_target::add_container_primitives(render_primitive_list &list, const
|
||||
height = MIN(height, m_maxtexheight);
|
||||
|
||||
curitem->texture()->get_scaled(width, height, prim->texture, list);
|
||||
// set the palette
|
||||
// set the palette
|
||||
#if 1
|
||||
const dynamic_array<rgb_t> *adjusted_pal = curitem->texture()->get_adjusted_palette(container);
|
||||
prim->texture.set_palette(adjusted_pal);
|
||||
prim->texture.set_palette(adjusted_pal);
|
||||
#else
|
||||
prim->texture.palette = curitem->texture()->get_adjusted_palette(container);
|
||||
prim->texture.palette = curitem->texture()->get_adjusted_palette(container);
|
||||
#endif
|
||||
|
||||
// determine UV coordinates and apply clipping
|
||||
prim->texcoords = oriented_texcoords[finalorient];
|
||||
clipped = render_clip_quad(&prim->bounds, &cliprect, &prim->texcoords);
|
||||
// determine UV coordinates and apply clipping
|
||||
prim->texcoords = oriented_texcoords[finalorient];
|
||||
clipped = render_clip_quad(&prim->bounds, &cliprect, &prim->texcoords);
|
||||
|
||||
// apply the final orientation from the quad flags and then build up the final flags
|
||||
prim->flags = (curitem->flags() & ~(PRIMFLAG_TEXORIENT_MASK | PRIMFLAG_BLENDMODE_MASK | PRIMFLAG_TEXFORMAT_MASK)) |
|
||||
PRIMFLAG_TEXORIENT(finalorient) |
|
||||
PRIMFLAG_TEXFORMAT(curitem->texture()->format());
|
||||
if (blendmode != -1)
|
||||
prim->flags |= PRIMFLAG_BLENDMODE(blendmode);
|
||||
else
|
||||
prim->flags |= PRIMFLAG_BLENDMODE(PRIMFLAG_GET_BLENDMODE(curitem->flags()));
|
||||
// apply the final orientation from the quad flags and then build up the final flags
|
||||
prim->flags = (curitem->flags() & ~(PRIMFLAG_TEXORIENT_MASK | PRIMFLAG_BLENDMODE_MASK | PRIMFLAG_TEXFORMAT_MASK)) |
|
||||
PRIMFLAG_TEXORIENT(finalorient) |
|
||||
PRIMFLAG_TEXFORMAT(curitem->texture()->format());
|
||||
if (blendmode != -1)
|
||||
prim->flags |= PRIMFLAG_BLENDMODE(blendmode);
|
||||
else
|
||||
prim->flags |= PRIMFLAG_BLENDMODE(PRIMFLAG_GET_BLENDMODE(curitem->flags()));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1876,15 +1876,15 @@ void render_target::add_container_primitives(render_primitive_list &list, const
|
||||
(container_xform.orientation & ORIENTATION_SWAP_XY) ? width : height, prim->texture, list);
|
||||
|
||||
// determine UV coordinates
|
||||
prim->texcoords = oriented_texcoords[container_xform.orientation];
|
||||
prim->texcoords = oriented_texcoords[container_xform.orientation];
|
||||
|
||||
// set the flags and add it to the list
|
||||
prim->flags = PRIMFLAG_TEXORIENT(container_xform.orientation) |
|
||||
PRIMFLAG_BLENDMODE(BLENDMODE_RGB_MULTIPLY) |
|
||||
PRIMFLAG_TEXFORMAT(container.overlay()->format()) |
|
||||
PRIMFLAG_TEXSHADE(1);
|
||||
// set the flags and add it to the list
|
||||
prim->flags = PRIMFLAG_TEXORIENT(container_xform.orientation) |
|
||||
PRIMFLAG_BLENDMODE(BLENDMODE_RGB_MULTIPLY) |
|
||||
PRIMFLAG_TEXFORMAT(container.overlay()->format()) |
|
||||
PRIMFLAG_TEXSHADE(1);
|
||||
|
||||
list.append_or_return(*prim, false);
|
||||
list.append_or_return(*prim, false);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1925,17 +1925,17 @@ void render_target::add_element_primitives(render_primitive_list &list, const ob
|
||||
|
||||
texture->get_scaled(width, height, prim->texture, list);
|
||||
|
||||
// compute the clip rect
|
||||
render_bounds cliprect;
|
||||
cliprect.x0 = render_round_nearest(xform.xoffs);
|
||||
cliprect.y0 = render_round_nearest(xform.yoffs);
|
||||
cliprect.x1 = render_round_nearest(xform.xoffs + xform.xscale);
|
||||
cliprect.y1 = render_round_nearest(xform.yoffs + xform.yscale);
|
||||
sect_render_bounds(&cliprect, &m_bounds);
|
||||
// compute the clip rect
|
||||
render_bounds cliprect;
|
||||
cliprect.x0 = render_round_nearest(xform.xoffs);
|
||||
cliprect.y0 = render_round_nearest(xform.yoffs);
|
||||
cliprect.x1 = render_round_nearest(xform.xoffs + xform.xscale);
|
||||
cliprect.y1 = render_round_nearest(xform.yoffs + xform.yscale);
|
||||
sect_render_bounds(&cliprect, &m_bounds);
|
||||
|
||||
// determine UV coordinates and apply clipping
|
||||
prim->texcoords = oriented_texcoords[xform.orientation];
|
||||
bool clipped = render_clip_quad(&prim->bounds, &cliprect, &prim->texcoords);
|
||||
// determine UV coordinates and apply clipping
|
||||
prim->texcoords = oriented_texcoords[xform.orientation];
|
||||
bool clipped = render_clip_quad(&prim->bounds, &cliprect, &prim->texcoords);
|
||||
|
||||
// add to the list or free if we're clipped out
|
||||
list.append_or_return(*prim, clipped);
|
||||
|
@ -213,26 +213,26 @@ struct render_quad_texuv
|
||||
|
||||
struct render_palette_copy
|
||||
{
|
||||
int ref_count;
|
||||
dynamic_array<rgb_t> palette;
|
||||
int ref_count;
|
||||
dynamic_array<rgb_t> palette;
|
||||
};
|
||||
|
||||
class render_texinfo
|
||||
{
|
||||
public:
|
||||
render_texinfo()
|
||||
: base(NULL), rowpixels(0), width(0), height(0),
|
||||
seqid(0), osddata(0), m_palette(NULL)
|
||||
{}
|
||||
render_texinfo()
|
||||
: base(NULL), rowpixels(0), width(0), height(0),
|
||||
seqid(0), osddata(0), m_palette(NULL)
|
||||
{}
|
||||
|
||||
render_texinfo(const render_texinfo &src);
|
||||
render_texinfo(const render_texinfo &src);
|
||||
|
||||
~render_texinfo()
|
||||
{
|
||||
free_palette();
|
||||
}
|
||||
~render_texinfo()
|
||||
{
|
||||
free_palette();
|
||||
}
|
||||
|
||||
render_texinfo &operator=(const render_texinfo &src);
|
||||
render_texinfo &operator=(const render_texinfo &src);
|
||||
|
||||
void * base; // base of the data
|
||||
UINT32 rowpixels; // pixels per row
|
||||
@ -241,14 +241,14 @@ public:
|
||||
UINT32 seqid; // sequence ID
|
||||
UINT64 osddata; // aux data to pass to osd
|
||||
|
||||
const rgb_t * palette() const { return ((m_palette == NULL) ? NULL : &m_palette->palette[0]); }
|
||||
const rgb_t * palette() const { return ((m_palette == NULL) ? NULL : &m_palette->palette[0]); }
|
||||
|
||||
void set_palette(const dynamic_array<rgb_t> *source);
|
||||
void set_palette(const dynamic_array<rgb_t> *source);
|
||||
|
||||
private:
|
||||
void free_palette();
|
||||
void free_palette();
|
||||
|
||||
render_palette_copy *m_palette; // palette for PALETTE16 textures, LUTs for RGB15/RGB32
|
||||
render_palette_copy *m_palette; // palette for PALETTE16 textures, LUTs for RGB15/RGB32
|
||||
};
|
||||
|
||||
|
||||
|
@ -92,14 +92,14 @@ render_font::render_font(render_manager &manager, const char *filename)
|
||||
m_osdfont = manager.machine().osd().font_alloc();
|
||||
if (m_osdfont != NULL)
|
||||
{
|
||||
if (m_osdfont->open(manager.machine().options().font_path(), filename, m_height))
|
||||
{
|
||||
m_scale = 1.0f / (float)m_height;
|
||||
m_format = FF_OSD;
|
||||
return;
|
||||
}
|
||||
global_free(m_osdfont);
|
||||
m_osdfont = NULL;
|
||||
if (m_osdfont->open(manager.machine().options().font_path(), filename, m_height))
|
||||
{
|
||||
m_scale = 1.0f / (float)m_height;
|
||||
m_format = FF_OSD;
|
||||
return;
|
||||
}
|
||||
global_free(m_osdfont);
|
||||
m_osdfont = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
@ -136,8 +136,8 @@ render_font::~render_font()
|
||||
// release the OSD font
|
||||
if (m_osdfont != NULL)
|
||||
{
|
||||
m_osdfont->close();
|
||||
global_free(m_osdfont);
|
||||
m_osdfont->close();
|
||||
global_free(m_osdfont);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -246,7 +246,7 @@ void qs1000_device::device_start()
|
||||
|
||||
save_item(NAME(m_serial_data_in));
|
||||
save_item(NAME(m_wave_regs));
|
||||
|
||||
|
||||
for (int i = 0; i < QS1000_CHANNELS; i++)
|
||||
{
|
||||
save_item(NAME(m_channels[i].m_acc), i);
|
||||
|
@ -597,7 +597,7 @@ void *tia_sound_init(device_t *device, int clock, int sample_rate, int gain)
|
||||
chip->P5[chan] = 0;
|
||||
chip->P9[chan] = 0;
|
||||
}
|
||||
|
||||
|
||||
tia_save_state(device, chip);
|
||||
|
||||
return chip;
|
||||
|
@ -20,9 +20,9 @@
|
||||
|
||||
|
||||
/**************************************************
|
||||
|
||||
|
||||
BARCODE READER MENU
|
||||
|
||||
|
||||
**************************************************/
|
||||
|
||||
|
||||
@ -51,7 +51,7 @@ ui_menu_barcode_reader::~ui_menu_barcode_reader()
|
||||
void ui_menu_barcode_reader::populate()
|
||||
{
|
||||
if (current_device())
|
||||
{
|
||||
{
|
||||
astring buffer;
|
||||
const char *new_barcode;
|
||||
|
||||
@ -68,13 +68,13 @@ void ui_menu_barcode_reader::populate()
|
||||
{
|
||||
new_barcode = m_barcode_buffer;
|
||||
}
|
||||
|
||||
|
||||
item_append("New Barcode:", new_barcode, 0, ITEMREF_NEW_BARCODE);
|
||||
|
||||
|
||||
// finish up the menu
|
||||
item_append(MENU_SEPARATOR_ITEM, NULL, 0, NULL);
|
||||
item_append("Enter Code", NULL, 0, ITEMREF_ENTER_BARCODE);
|
||||
|
||||
|
||||
customtop = machine().ui().get_line_height() + 3.0f * UI_BOX_TB_BORDER;
|
||||
}
|
||||
}
|
||||
@ -103,7 +103,7 @@ void ui_menu_barcode_reader::handle()
|
||||
if (event->itemref == ITEMREF_SELECT_READER)
|
||||
previous();
|
||||
break;
|
||||
|
||||
|
||||
case IPT_UI_RIGHT:
|
||||
if (event->itemref == ITEMREF_SELECT_READER)
|
||||
next();
|
||||
|
@ -9,9 +9,9 @@
|
||||
printers)
|
||||
The base class contains calls to get the total number of devices of
|
||||
the same kind connected to the driver, and shortcuts to switch current
|
||||
device to next one or previous one attached. This allows, for instance,
|
||||
users to pass from a device to another one by simply pressing left/right
|
||||
and the menu is rebuilt accordingly, without the need of a preliminary
|
||||
device to next one or previous one attached. This allows, for instance,
|
||||
users to pass from a device to another one by simply pressing left/right
|
||||
and the menu is rebuilt accordingly, without the need of a preliminary
|
||||
submenu listing available devices of the same kind.
|
||||
|
||||
Copyright Nicola Salmoria and the MAME Team.
|
||||
|
@ -66,7 +66,7 @@ void ui_menu_device_config::populate()
|
||||
|
||||
// get cpu specific clock that takes internal multiplier/dividers into account
|
||||
int clock = exec->device().clock();
|
||||
|
||||
|
||||
// count how many identical CPUs we have
|
||||
int count = 1;
|
||||
const char *name = exec->device().name();
|
||||
@ -77,14 +77,14 @@ void ui_menu_device_config::populate()
|
||||
if (exectags.add(scan->device().tag(), 1, FALSE) != TMERR_DUPLICATE)
|
||||
count++;
|
||||
}
|
||||
|
||||
|
||||
// if more than one, prepend a #x in front of the CPU name
|
||||
if (count > 1)
|
||||
string.catprintf(" %d" UTF8_MULTIPLY, count);
|
||||
else
|
||||
string.cat(" ");
|
||||
string.cat(name);
|
||||
|
||||
|
||||
// display clock in kHz or MHz
|
||||
if (clock >= 1000000)
|
||||
string.catprintf(" %d.%06d" UTF8_NBSP "MHz\n", clock / 1000000, clock % 1000000);
|
||||
@ -92,7 +92,7 @@ void ui_menu_device_config::populate()
|
||||
string.catprintf(" %d.%03d" UTF8_NBSP "kHz\n", clock / 1000, clock % 1000);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// display screen information
|
||||
screen_device_iterator scriter(*dev);
|
||||
if (scriter.count() > 0)
|
||||
@ -101,21 +101,21 @@ void ui_menu_device_config::populate()
|
||||
for (screen_device *screen = scriter.first(); screen != NULL; screen = scriter.next())
|
||||
{
|
||||
string.catprintf(" Screen '%s': ", screen->tag());
|
||||
|
||||
|
||||
if (screen->screen_type() == SCREEN_TYPE_VECTOR)
|
||||
string.cat("Vector\n");
|
||||
else
|
||||
{
|
||||
const rectangle &visarea = screen->visible_area();
|
||||
|
||||
|
||||
string.catprintf("%d " UTF8_MULTIPLY " %d (%s) %f" UTF8_NBSP "Hz\n",
|
||||
visarea.width(), visarea.height(),
|
||||
(machine().system().flags & ORIENTATION_SWAP_XY) ? "V" : "H",
|
||||
ATTOSECONDS_TO_HZ(screen->frame_period().attoseconds));
|
||||
visarea.width(), visarea.height(),
|
||||
(machine().system().flags & ORIENTATION_SWAP_XY) ? "V" : "H",
|
||||
ATTOSECONDS_TO_HZ(screen->frame_period().attoseconds));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// loop over all sound chips
|
||||
sound_interface_iterator snditer(*dev);
|
||||
if (snditer.count() > 0)
|
||||
@ -126,7 +126,7 @@ void ui_menu_device_config::populate()
|
||||
{
|
||||
if (soundtags.add(sound->device().tag(), 1, FALSE) == TMERR_DUPLICATE)
|
||||
continue;
|
||||
|
||||
|
||||
// count how many identical sound chips we have
|
||||
int count = 1;
|
||||
sound_interface_iterator sndinneriter(*dev);
|
||||
@ -142,7 +142,7 @@ void ui_menu_device_config::populate()
|
||||
else
|
||||
string.cat(" ");
|
||||
string.cat(sound->device().name());
|
||||
|
||||
|
||||
// display clock in kHz or MHz
|
||||
int clock = sound->device().clock();
|
||||
if (clock >= 1000000)
|
||||
@ -156,7 +156,7 @@ void ui_menu_device_config::populate()
|
||||
|
||||
// scan for BIOS settings
|
||||
int bios = 0;
|
||||
if (dev->rom_region())
|
||||
if (dev->rom_region())
|
||||
{
|
||||
astring bios_str;
|
||||
// first loop through roms in search of default bios (shortname)
|
||||
@ -174,11 +174,11 @@ void ui_menu_device_config::populate()
|
||||
bios_str.cpy(ROM_GETHASHDATA(rom));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (bios)
|
||||
string.catprintf("* BIOS settings:\n %d options [default: %s]\n", bios, bios_str.cstr());
|
||||
}
|
||||
|
||||
|
||||
int input = 0, input_mj = 0, input_hana = 0, input_gamble = 0, input_analog = 0, input_adjust = 0;
|
||||
int input_keypad = 0, input_keyboard = 0, dips = 0, confs = 0;
|
||||
astring errors, dips_opt, confs_opt;
|
||||
@ -265,7 +265,7 @@ void ui_menu_device_config::populate()
|
||||
for (const device_image_interface *imagedev = imgiter.first(); imagedev != NULL; imagedev = imgiter.next())
|
||||
string.catprintf(" %s [tag: %s]\n", imagedev->image_type_name(), imagedev->device().tag());
|
||||
}
|
||||
|
||||
|
||||
slot_interface_iterator slotiter(*dev);
|
||||
if (slotiter.count() > 0)
|
||||
{
|
||||
@ -275,7 +275,7 @@ void ui_menu_device_config::populate()
|
||||
}
|
||||
|
||||
if ((execiter.count() + scriter.count() + snditer.count() + imgiter.count() + slotiter.count() + bios + dips + confs
|
||||
+ input + input_mj + input_hana + input_gamble + input_analog + input_adjust + input_keypad + input_keyboard) == 0)
|
||||
+ input + input_mj + input_hana + input_gamble + input_analog + input_adjust + input_keypad + input_keyboard) == 0)
|
||||
string.cat("[None]\n");
|
||||
|
||||
const_cast<machine_config &>(machine().config()).device_remove(&machine().config().root_device(), m_option->name());
|
||||
|
@ -1,9 +1,9 @@
|
||||
/***************************************************************************
|
||||
|
||||
ui/devopt.h
|
||||
|
||||
|
||||
Internal menu for the device configuration.
|
||||
|
||||
|
||||
Copyright Nicola Salmoria and the MAME Team.
|
||||
Visit http://mamedev.org for licensing and usage restrictions.
|
||||
|
||||
|
@ -64,12 +64,12 @@ void ui_menu_file_manager::fill_image_line(device_image_interface *img, astring
|
||||
{
|
||||
// get the image type/id
|
||||
instance.printf("%s (%s)", img->instance_name(), img->brief_instance_name());
|
||||
|
||||
|
||||
// get the base name
|
||||
if (img->basename() != NULL)
|
||||
{
|
||||
filename.cpy(img->basename());
|
||||
|
||||
|
||||
// if the image has been loaded through softlist, also show the loaded part
|
||||
if (img->part_entry() != NULL)
|
||||
{
|
||||
@ -107,7 +107,7 @@ void ui_menu_file_manager::populate()
|
||||
item_append(m_warnings, NULL, MENU_FLAG_DISABLE, NULL);
|
||||
item_append("", NULL, MENU_FLAG_DISABLE, NULL);
|
||||
}
|
||||
|
||||
|
||||
// cycle through all devices for this system
|
||||
device_iterator iter(machine().root_device());
|
||||
tagmap_t<UINT8> devtags;
|
||||
@ -120,7 +120,7 @@ void ui_menu_file_manager::populate()
|
||||
// check whether it owns an image interface
|
||||
image_interface_iterator subiter(*dev);
|
||||
if (subiter.count() > 0)
|
||||
{
|
||||
{
|
||||
// if so, cycle through all its image interfaces
|
||||
image_interface_iterator subiter(*dev);
|
||||
for (device_image_interface *scan = subiter.first(); scan != NULL; scan = subiter.next())
|
||||
@ -172,7 +172,7 @@ void ui_menu_file_manager::handle()
|
||||
if (selected_device != NULL)
|
||||
{
|
||||
ui_menu::stack_push(selected_device->get_selection_menu(machine(), container));
|
||||
|
||||
|
||||
// reset the existing menu
|
||||
reset(UI_MENU_RESET_REMEMBER_POSITION);
|
||||
}
|
||||
@ -182,19 +182,19 @@ void ui_menu_file_manager::handle()
|
||||
|
||||
// force file manager menu
|
||||
void ui_menu_file_manager::force_file_manager(running_machine &machine, render_container *container, const char *warnings)
|
||||
{
|
||||
{
|
||||
// reset the menu stack
|
||||
ui_menu::stack_reset(machine);
|
||||
|
||||
|
||||
// add the quit entry followed by the game select entry
|
||||
ui_menu *quit = auto_alloc_clear(machine, ui_menu_quit_game(machine, container));
|
||||
quit->set_special_main_menu(true);
|
||||
ui_menu::stack_push(quit);
|
||||
ui_menu::stack_push(auto_alloc_clear(machine, ui_menu_file_manager(machine, container, warnings)));
|
||||
|
||||
|
||||
// force the menus on
|
||||
machine.ui().show_menu();
|
||||
|
||||
|
||||
// make sure MAME is paused
|
||||
machine.pause();
|
||||
}
|
||||
|
@ -328,7 +328,7 @@ void ui_menu_control_device_image::handle()
|
||||
state = create_ok ? CREATE_FILE : START_FILE;
|
||||
handle();
|
||||
break;
|
||||
|
||||
|
||||
case DO_CREATE: {
|
||||
astring path;
|
||||
zippath_combine(path, current_directory, current_file);
|
||||
|
@ -27,8 +27,8 @@ public:
|
||||
|
||||
protected:
|
||||
enum {
|
||||
START_FILE, START_OTHER_PART, START_SOFTLIST,
|
||||
SELECT_PARTLIST, SELECT_ONE_PART, SELECT_OTHER_PART,
|
||||
START_FILE, START_OTHER_PART, START_SOFTLIST,
|
||||
SELECT_PARTLIST, SELECT_ONE_PART, SELECT_OTHER_PART,
|
||||
SELECT_FILE, CREATE_FILE, CREATE_CONFIRM, CHECK_CREATE, DO_CREATE, SELECT_SOFTLIST,
|
||||
LAST_ID
|
||||
};
|
||||
|
@ -89,21 +89,21 @@ void ui_menu_image_info::image_info(device_image_interface *image)
|
||||
|
||||
// display long filename
|
||||
item_append(image->longname(), "", MENU_FLAG_DISABLE, NULL);
|
||||
|
||||
|
||||
// display manufacturer and year
|
||||
string.catprintf("%s, %s", image->manufacturer(), image->year());
|
||||
item_append(string, "", MENU_FLAG_DISABLE, NULL);
|
||||
|
||||
// display supported information, if available
|
||||
switch (image->supported())
|
||||
switch (image->supported())
|
||||
{
|
||||
case SOFTWARE_SUPPORTED_NO:
|
||||
case SOFTWARE_SUPPORTED_NO:
|
||||
item_append("Not supported", "", MENU_FLAG_DISABLE, NULL);
|
||||
break;
|
||||
case SOFTWARE_SUPPORTED_PARTIAL:
|
||||
case SOFTWARE_SUPPORTED_PARTIAL:
|
||||
item_append("Partially supported", "", MENU_FLAG_DISABLE, NULL);
|
||||
break;
|
||||
default:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -487,7 +487,7 @@ void ui_menu_settings::handle()
|
||||
if (menu_event != NULL && menu_event->itemref != NULL)
|
||||
{
|
||||
// reset
|
||||
if ((FPTR)menu_event->itemref == 1)
|
||||
if ((FPTR)menu_event->itemref == 1)
|
||||
{
|
||||
if (menu_event->iptkey == IPT_UI_SELECT)
|
||||
machine().schedule_hard_reset();
|
||||
@ -498,7 +498,7 @@ void ui_menu_settings::handle()
|
||||
ioport_field *field = (ioport_field *)menu_event->itemref;
|
||||
ioport_field::user_settings settings;
|
||||
int changed = false;
|
||||
|
||||
|
||||
switch (menu_event->iptkey)
|
||||
{
|
||||
/* if selected, reset to default value */
|
||||
@ -508,20 +508,20 @@ void ui_menu_settings::handle()
|
||||
field->set_user_settings(settings);
|
||||
changed = true;
|
||||
break;
|
||||
|
||||
|
||||
/* left goes to previous setting */
|
||||
case IPT_UI_LEFT:
|
||||
field->select_previous_setting();
|
||||
changed = true;
|
||||
break;
|
||||
|
||||
|
||||
/* right goes to next setting */
|
||||
case IPT_UI_RIGHT:
|
||||
field->select_next_setting();
|
||||
changed = true;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
/* if anything changed, rebuild the menu, trying to stay on the same field */
|
||||
if (changed)
|
||||
reset(UI_MENU_RESET_REMEMBER_REF);
|
||||
@ -628,7 +628,7 @@ void ui_menu_settings::populate()
|
||||
}
|
||||
if (type == IPT_DIPSWITCH)
|
||||
custombottom = dipcount ? dipcount * (DIP_SWITCH_HEIGHT + DIP_SWITCH_SPACING) + DIP_SWITCH_SPACING : 0;
|
||||
|
||||
|
||||
item_append(MENU_SEPARATOR_ITEM, NULL, 0, NULL);
|
||||
item_append("Reset", NULL, 0, (void *)1);
|
||||
}
|
||||
@ -661,18 +661,18 @@ void ui_menu_settings_dip_switches::custom_render(void *selectedref, float top,
|
||||
{
|
||||
const ioport_diplocation *diploc;
|
||||
UINT32 selectedmask = 0;
|
||||
|
||||
|
||||
// determine the mask of selected bits
|
||||
if ((FPTR)selectedref != 1)
|
||||
{
|
||||
ioport_field *field = (ioport_field *)selectedref;
|
||||
|
||||
|
||||
if (field != NULL && field->first_diplocation() != NULL)
|
||||
for (diploc = field->first_diplocation(); diploc != NULL; diploc = diploc->next())
|
||||
if (strcmp(dip->name, diploc->name()) == 0)
|
||||
selectedmask |= 1 << (diploc->number() - 1);
|
||||
}
|
||||
|
||||
|
||||
// draw one switch
|
||||
custom_render_one(x1, y1, x2, y1 + DIP_SWITCH_HEIGHT, dip, selectedmask);
|
||||
y1 += (float)(DIP_SWITCH_SPACING + DIP_SWITCH_HEIGHT);
|
||||
@ -884,7 +884,7 @@ void ui_menu_analog::populate()
|
||||
}
|
||||
|
||||
name.cpy(field->name());
|
||||
|
||||
|
||||
/* allocate a data item for tracking what this menu item refers to */
|
||||
data = (analog_item_data *)m_pool_alloc(sizeof(*data));
|
||||
data->field = field;
|
||||
|
@ -242,18 +242,18 @@ void ui_menu_sliders::custom_render(void *selectedref, float top, float bottom,
|
||||
UINT32 ui_menu_sliders::ui_handler(running_machine &machine, render_container *container, UINT32 state)
|
||||
{
|
||||
UINT32 result;
|
||||
|
||||
|
||||
/* if this is the first call, push the sliders menu */
|
||||
if (state)
|
||||
ui_menu::stack_push(auto_alloc_clear(machine, ui_menu_sliders(machine, container, true)));
|
||||
|
||||
|
||||
/* handle standard menus */
|
||||
result = ui_menu::ui_handler(machine, container, state);
|
||||
|
||||
|
||||
/* if we are cancelled, pop the sliders menu */
|
||||
if (result == UI_HANDLER_CANCEL)
|
||||
ui_menu::stack_pop(machine);
|
||||
|
||||
|
||||
ui_menu_sliders *uim = dynamic_cast<ui_menu_sliders *>(menu_stack);
|
||||
return uim && uim->menuless_mode ? 0 : UI_HANDLER_CANCEL;
|
||||
}
|
||||
|
@ -1,9 +1,9 @@
|
||||
/***************************************************************************
|
||||
|
||||
ui/slotopt.h
|
||||
|
||||
|
||||
Internal menu for the slot options.
|
||||
|
||||
|
||||
Copyright Nicola Salmoria and the MAME Team.
|
||||
Visit http://mamedev.org for licensing and usage restrictions.
|
||||
|
||||
|
@ -56,7 +56,7 @@ ui_menu_tape_control::~ui_menu_tape_control()
|
||||
void ui_menu_tape_control::populate()
|
||||
{
|
||||
if (current_device())
|
||||
{
|
||||
{
|
||||
// name of tape
|
||||
item_append(current_display_name(), current_device()->exists() ? current_device()->filename() : "No Tape Image loaded", current_display_flags(), TAPECMD_SELECT);
|
||||
|
||||
@ -67,7 +67,7 @@ void ui_menu_tape_control::populate()
|
||||
double t0 = current_device()->get_position();
|
||||
double t1 = current_device()->get_length();
|
||||
UINT32 tapeflags = 0;
|
||||
|
||||
|
||||
// state
|
||||
if (t1 > 0)
|
||||
{
|
||||
@ -76,32 +76,32 @@ void ui_menu_tape_control::populate()
|
||||
if (t0 < t1)
|
||||
tapeflags |= MENU_FLAG_RIGHT_ARROW;
|
||||
}
|
||||
|
||||
|
||||
get_time_string(timepos, current_device(), NULL, NULL);
|
||||
state = current_device()->get_state();
|
||||
item_append(
|
||||
(state & CASSETTE_MASK_UISTATE) == CASSETTE_STOPPED
|
||||
? "stopped"
|
||||
: ((state & CASSETTE_MASK_UISTATE) == CASSETTE_PLAY
|
||||
? ((state & CASSETTE_MASK_MOTOR) == CASSETTE_MOTOR_ENABLED ? "playing" : "(playing)")
|
||||
: ((state & CASSETTE_MASK_MOTOR) == CASSETTE_MOTOR_ENABLED ? "recording" : "(recording)")
|
||||
),
|
||||
? ((state & CASSETTE_MASK_MOTOR) == CASSETTE_MOTOR_ENABLED ? "playing" : "(playing)")
|
||||
: ((state & CASSETTE_MASK_MOTOR) == CASSETTE_MOTOR_ENABLED ? "recording" : "(recording)")
|
||||
),
|
||||
timepos,
|
||||
tapeflags,
|
||||
TAPECMD_SLIDER);
|
||||
|
||||
|
||||
// pause or stop
|
||||
item_append("Pause/Stop", NULL, 0, TAPECMD_STOP);
|
||||
|
||||
|
||||
// play
|
||||
item_append("Play", NULL, 0, TAPECMD_PLAY);
|
||||
|
||||
|
||||
// record
|
||||
item_append("Record", NULL, 0, TAPECMD_RECORD);
|
||||
|
||||
|
||||
// rewind
|
||||
item_append("Rewind", NULL, 0, TAPECMD_REWIND);
|
||||
|
||||
|
||||
// fast forward
|
||||
item_append("Fast Forward", NULL, 0, TAPECMD_FAST_FORWARD);
|
||||
}
|
||||
|
@ -2001,7 +2001,7 @@ WRITE8_MEMBER( h63484_device::data_w )
|
||||
void h63484_device::device_start()
|
||||
{
|
||||
m_display_cb.bind_relative_to(*owner());
|
||||
|
||||
|
||||
register_save_state();
|
||||
}
|
||||
|
||||
|
@ -107,7 +107,7 @@ private:
|
||||
void video_registers_w(int offset);
|
||||
int translate_command(UINT16 data);
|
||||
void draw_graphics_line(bitmap_ind16 &bitmap, const rectangle &cliprect, int vs, int y, int layer_n, bool active, bool ins_window);
|
||||
|
||||
|
||||
void register_save_state();
|
||||
|
||||
h63484_display_delegate m_display_cb;
|
||||
|
@ -100,12 +100,12 @@ public:
|
||||
void resize_keep_and_clear_new(int count, UINT8 data = 0) { int oldcount = m_count; resize_keep(count); if (oldcount < m_count) clear_internal(oldcount, m_count - oldcount, data); }
|
||||
|
||||
// batch operations
|
||||
void copyfrom(const dynamic_array<_ElementType> &source)
|
||||
{
|
||||
resize(source.count());
|
||||
for (int i=0; i < source.count(); i++)
|
||||
m_array[i] = source[i];
|
||||
}
|
||||
void copyfrom(const dynamic_array<_ElementType> &source)
|
||||
{
|
||||
resize(source.count());
|
||||
for (int i=0; i < source.count(); i++)
|
||||
m_array[i] = source[i];
|
||||
}
|
||||
|
||||
private:
|
||||
// internal helpers
|
||||
|
@ -171,7 +171,7 @@ public:
|
||||
// entry list getters
|
||||
const rgb_t *entry_list_raw() const { return m_entry_color; }
|
||||
const dynamic_array<rgb_t> *entry_list_adjusted_darray() const { return &m_adjusted_color; }
|
||||
const rgb_t *entry_list_adjusted() const { return m_adjusted_color; }
|
||||
const rgb_t *entry_list_adjusted() const { return m_adjusted_color; }
|
||||
const rgb_t *entry_list_adjusted_rgb15() const { return m_adjusted_rgb15; }
|
||||
|
||||
// group adjustments
|
||||
|
@ -46,47 +46,47 @@
|
||||
/* ---------------------------------------------------------------------- */
|
||||
static NETLIST_START(nl_mario_snd0)
|
||||
|
||||
RES(R17, RES_K(27)) /* 20 according to parts list */
|
||||
/* 27 verified, 30K in schematics */
|
||||
CAP(C14, CAP_U(4.7)) /* verified */
|
||||
RES(R17, RES_K(27)) /* 20 according to parts list */
|
||||
/* 27 verified, 30K in schematics */
|
||||
CAP(C14, CAP_U(4.7)) /* verified */
|
||||
|
||||
TTL_74123(2H_A)
|
||||
NET_C(2H_A.VCC, V5)
|
||||
NET_C(2H_A.GND, GND)
|
||||
NET_C(SOUND0.Q, 2H_A.B)
|
||||
NET_C(GND, 2H_A.A)
|
||||
NET_C(2H_A.CLRQ, ttlhigh) /* NOT IN SCHEMATICS */
|
||||
DIODE(D1, "1N4148") /* FIXME: try to identify */
|
||||
TTL_7404_INVERT(1H_A, 2H_A.QQ)
|
||||
NET_C(R17.1, V5)
|
||||
NET_C(R17.2, D1.A, C14.1)
|
||||
NET_C(D1.K, 2H_A.RC)
|
||||
NET_C(C14.2, 2H_A.C)
|
||||
TTL_74123(2H_A)
|
||||
NET_C(2H_A.VCC, V5)
|
||||
NET_C(2H_A.GND, GND)
|
||||
NET_C(SOUND0.Q, 2H_A.B)
|
||||
NET_C(GND, 2H_A.A)
|
||||
NET_C(2H_A.CLRQ, ttlhigh) /* NOT IN SCHEMATICS */
|
||||
DIODE(D1, "1N4148") /* FIXME: try to identify */
|
||||
TTL_7404_INVERT(1H_A, 2H_A.QQ)
|
||||
NET_C(R17.1, V5)
|
||||
NET_C(R17.2, D1.A, C14.1)
|
||||
NET_C(D1.K, 2H_A.RC)
|
||||
NET_C(C14.2, 2H_A.C)
|
||||
|
||||
RES(R6, RES_K(4.7)) /* verified */
|
||||
CAP(C3, CAP_U(10)) /* verified */
|
||||
RES(R6, RES_K(4.7)) /* verified */
|
||||
CAP(C3, CAP_U(10)) /* verified */
|
||||
|
||||
NET_C(1H_A.Q, R6.1)
|
||||
NET_C(R6.2, C3.1, 1J_A.FC)
|
||||
NET_C(R6.2, 2J_A.FC)
|
||||
NET_C(C3.2, GND)
|
||||
NET_C(1H_A.Q, R6.1)
|
||||
NET_C(R6.2, C3.1, 1J_A.FC)
|
||||
NET_C(R6.2, 2J_A.FC)
|
||||
NET_C(C3.2, GND)
|
||||
|
||||
//#define MR_C6 CAP_N(3.9) /* verified */
|
||||
//#define MR_C6 CAP_N(3.9) /* verified */
|
||||
|
||||
SN74LS629(1J_A, CAP_N(3.9))
|
||||
NET_C(1J_A.RNG, V5)
|
||||
NET_C(1J_A.ENQ, ttllow)
|
||||
NET_C(GND, 1J_A.GND)
|
||||
SN74LS629(1J_A, CAP_N(3.9))
|
||||
NET_C(1J_A.RNG, V5)
|
||||
NET_C(1J_A.ENQ, ttllow)
|
||||
NET_C(GND, 1J_A.GND)
|
||||
|
||||
//#define MR_C17 CAP_N(22) /* verified */
|
||||
//#define MR_C17 CAP_N(22) /* verified */
|
||||
|
||||
SN74LS629(2J_A, CAP_N(22))
|
||||
NET_C(2J_A.RNG, V5)
|
||||
NET_C(2J_A.ENQ, ttllow)
|
||||
NET_C(GND, 2J_A.GND)
|
||||
SN74LS629(2J_A, CAP_N(22))
|
||||
NET_C(2J_A.RNG, V5)
|
||||
NET_C(2J_A.ENQ, ttllow)
|
||||
NET_C(GND, 2J_A.GND)
|
||||
|
||||
TTL_7486_XOR(1K_A, 1J_A.Y, 2J_A.Y)
|
||||
TTL_7408_AND(2K_A, 2H_A.Q, 1K_A)
|
||||
TTL_7486_XOR(1K_A, 1J_A.Y, 2J_A.Y)
|
||||
TTL_7408_AND(2K_A, 2H_A.Q, 1K_A)
|
||||
NETLIST_END()
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
@ -96,49 +96,49 @@ NETLIST_END()
|
||||
// FIXME: Diodes are 1S953
|
||||
static NETLIST_START(nl_mario_snd7)
|
||||
|
||||
RES(R61, RES_K(47))
|
||||
CAP(C41, CAP_U(4.7)) /* verified */
|
||||
RES(R61, RES_K(47))
|
||||
CAP(C41, CAP_U(4.7)) /* verified */
|
||||
|
||||
TTL_74123(4L_A)
|
||||
NET_C(4L_A.VCC, V5)
|
||||
NET_C(4L_A.GND, GND)
|
||||
NET_C(SOUND7.Q, 4L_A.B)
|
||||
NET_C(GND, 4L_A.A)
|
||||
NET_C(4L_A.CLRQ, ttlhigh) /* NOT IN SCHEMATICS */
|
||||
DIODE(D10, "1N4148") /* FIXME: try to identify */
|
||||
TTL_7404_INVERT(4J_A, 4L_A.Q)
|
||||
NET_C(R61.1, V5)
|
||||
NET_C(R61.2, D10.A, C41.1)
|
||||
NET_C(D10.K, 4L_A.RC)
|
||||
NET_C(C41.2, 4L_A.C)
|
||||
TTL_74123(4L_A)
|
||||
NET_C(4L_A.VCC, V5)
|
||||
NET_C(4L_A.GND, GND)
|
||||
NET_C(SOUND7.Q, 4L_A.B)
|
||||
NET_C(GND, 4L_A.A)
|
||||
NET_C(4L_A.CLRQ, ttlhigh) /* NOT IN SCHEMATICS */
|
||||
DIODE(D10, "1N4148") /* FIXME: try to identify */
|
||||
TTL_7404_INVERT(4J_A, 4L_A.Q)
|
||||
NET_C(R61.1, V5)
|
||||
NET_C(R61.2, D10.A, C41.1)
|
||||
NET_C(D10.K, 4L_A.RC)
|
||||
NET_C(C41.2, 4L_A.C)
|
||||
|
||||
RES(R65, RES_K(10))
|
||||
CAP(C44, CAP_U(3.3)) /* verified */
|
||||
RES(R65, RES_K(10))
|
||||
CAP(C44, CAP_U(3.3)) /* verified */
|
||||
|
||||
SN74LS629(4K_A, CAP_U(0.022))
|
||||
NET_C(4K_A.RNG, V5)
|
||||
NET_C(4K_A.ENQ, ttllow)
|
||||
NET_C(GND, 4K_A.GND)
|
||||
NET_C(R65.1, 4J_A.Q)
|
||||
NET_C(R65.2, 4K_A.FC, C44.1)
|
||||
NET_C(C44.2, GND)
|
||||
SN74LS629(4K_A, CAP_U(0.022))
|
||||
NET_C(4K_A.RNG, V5)
|
||||
NET_C(4K_A.ENQ, ttllow)
|
||||
NET_C(GND, 4K_A.GND)
|
||||
NET_C(R65.1, 4J_A.Q)
|
||||
NET_C(R65.2, 4K_A.FC, C44.1)
|
||||
NET_C(C44.2, GND)
|
||||
|
||||
CD_4020(3H, 4K_B.Y, ttllow, V5, GND)
|
||||
TTL_7404_INVERT(4J_B, 3H.Q12)
|
||||
CD_4020(3H, 4K_B.Y, ttllow, V5, GND)
|
||||
TTL_7404_INVERT(4J_B, 3H.Q12)
|
||||
|
||||
RES(R64, RES_K(20))
|
||||
CAP(C43, CAP_U(3.3)) /* verified */
|
||||
RES(R64, RES_K(20))
|
||||
CAP(C43, CAP_U(3.3)) /* verified */
|
||||
|
||||
SN74LS629(4K_B, CAP_U(0.0047))
|
||||
NET_C(4K_B.RNG, V5)
|
||||
NET_C(4K_B.ENQ, ttllow)
|
||||
NET_C(GND, 4K_B.GND)
|
||||
NET_C(R64.1, 4J_B.Q)
|
||||
NET_C(R64.2, 4K_B.FC, C43.1)
|
||||
NET_C(C43.2, GND)
|
||||
SN74LS629(4K_B, CAP_U(0.0047))
|
||||
NET_C(4K_B.RNG, V5)
|
||||
NET_C(4K_B.ENQ, ttllow)
|
||||
NET_C(GND, 4K_B.GND)
|
||||
NET_C(R64.1, 4J_B.Q)
|
||||
NET_C(R64.2, 4K_B.FC, C43.1)
|
||||
NET_C(C43.2, GND)
|
||||
|
||||
TTL_7486_XOR(1K_C, 3H.Q4, 4K_A.Y)
|
||||
TTL_7408_AND(2K_C, 4L_A.Q, 1K_C)
|
||||
TTL_7486_XOR(1K_C, 3H.Q4, 4K_A.Y)
|
||||
TTL_7408_AND(2K_C, 4L_A.Q, 1K_C)
|
||||
|
||||
NETLIST_END()
|
||||
|
||||
@ -146,140 +146,140 @@ NETLIST_END()
|
||||
/* DAC sound */
|
||||
/* ---------------------------------------------------------------------- */
|
||||
static NETLIST_START(nl_mario_dac)
|
||||
RES(R34, RES_M(2))
|
||||
RES(R35, RES_M(1))
|
||||
RES(R36, RES_M(1.8))
|
||||
LM3900(3M_1)
|
||||
NET_C(3M_1.VM, GND)
|
||||
NET_C(3M_1.VP, V5)
|
||||
RES(R34, RES_M(2))
|
||||
RES(R35, RES_M(1))
|
||||
RES(R36, RES_M(1.8))
|
||||
LM3900(3M_1)
|
||||
NET_C(3M_1.VM, GND)
|
||||
NET_C(3M_1.VP, V5)
|
||||
|
||||
NET_C(DAC.VOUT, R34.1)
|
||||
NET_C(3M_1.MINUS, R34.2, R35.2)
|
||||
NET_C(3M_1.OUT, R35.1)
|
||||
NET_C(3M_1.PLUS, R36.1)
|
||||
NET_C(R36.2, GND)
|
||||
NET_C(DAC.VOUT, R34.1)
|
||||
NET_C(3M_1.MINUS, R34.2, R35.2)
|
||||
NET_C(3M_1.OUT, R35.1)
|
||||
NET_C(3M_1.PLUS, R36.1)
|
||||
NET_C(R36.2, GND)
|
||||
|
||||
RES(R21, RES_M(1.8))
|
||||
RES(R23, RES_K(10))
|
||||
RES(R25, RES_K(10))
|
||||
RES(R37, RES_K(750))
|
||||
RES(R38, RES_K(360))
|
||||
RES(R39, RES_K(750))
|
||||
RES(R21, RES_M(1.8))
|
||||
RES(R23, RES_K(10))
|
||||
RES(R25, RES_K(10))
|
||||
RES(R37, RES_K(750))
|
||||
RES(R38, RES_K(360))
|
||||
RES(R39, RES_K(750))
|
||||
|
||||
CAP(C18, CAP_P(100))
|
||||
CAP(C19, CAP_U(10))
|
||||
CAP(C20, CAP_U(1))
|
||||
CAP(C30, CAP_P(100))
|
||||
CAP(C18, CAP_P(100))
|
||||
CAP(C19, CAP_U(10))
|
||||
CAP(C20, CAP_U(1))
|
||||
CAP(C30, CAP_P(100))
|
||||
|
||||
LM3900(3M_2)
|
||||
NET_C(3M_2.VM, GND)
|
||||
NET_C(3M_2.VP, V5)
|
||||
LM3900(3M_2)
|
||||
NET_C(3M_2.VM, GND)
|
||||
NET_C(3M_2.VP, V5)
|
||||
|
||||
NET_C(R35.1, C20.1)
|
||||
NET_C(C20.2, R37.1)
|
||||
NET_C(R37.2, R38.2, C18.1, R39.2)
|
||||
NET_C(R35.1, C20.1)
|
||||
NET_C(C20.2, R37.1)
|
||||
NET_C(R37.2, R38.2, C18.1, R39.2)
|
||||
|
||||
NET_C(C18.2, GND)
|
||||
NET_C(R38.1, C30.2, 3M_2.MINUS)
|
||||
NET_C(3M_2.OUT, R39.1, C30.1)
|
||||
NET_C(C18.2, GND)
|
||||
NET_C(R38.1, C30.2, 3M_2.MINUS)
|
||||
NET_C(3M_2.OUT, R39.1, C30.1)
|
||||
|
||||
NET_C(R21.1, 3M_2.PLUS)
|
||||
NET_C(R21.2, C19.1, R25.2, R23.1)
|
||||
NET_C(C19.2, R23.2, GND)
|
||||
NET_C(R25.1, V5)
|
||||
NET_C(R21.1, 3M_2.PLUS)
|
||||
NET_C(R21.2, C19.1, R25.2, R23.1)
|
||||
NET_C(C19.2, R23.2, GND)
|
||||
NET_C(R25.1, V5)
|
||||
NETLIST_END()
|
||||
|
||||
static NETLIST_START(nl_mario)
|
||||
|
||||
/* Standard stuff */
|
||||
/* Standard stuff */
|
||||
|
||||
SOLVER(Solver, 48000)
|
||||
PARAM(Solver.ACCURACY, 1e-8)
|
||||
PARAM(Solver.SOR_FACTOR, 1.0)
|
||||
PARAM(Solver.GS_THRESHOLD, 5)
|
||||
PARAM(Solver.GS_LOOPS, 4)
|
||||
//PARAM(Solver.LTE, 5e-2) // Default is not enough for paddle control
|
||||
PARAM(Solver.DYNAMIC_TS, 0)
|
||||
ANALOG_INPUT(V5, 5)
|
||||
SOLVER(Solver, 48000)
|
||||
PARAM(Solver.ACCURACY, 1e-8)
|
||||
PARAM(Solver.SOR_FACTOR, 1.0)
|
||||
PARAM(Solver.GS_THRESHOLD, 5)
|
||||
PARAM(Solver.GS_LOOPS, 4)
|
||||
//PARAM(Solver.LTE, 5e-2) // Default is not enough for paddle control
|
||||
PARAM(Solver.DYNAMIC_TS, 0)
|
||||
ANALOG_INPUT(V5, 5)
|
||||
|
||||
TTL_INPUT(SOUND0, 1)
|
||||
INCLUDE(nl_mario_snd0)
|
||||
TTL_INPUT(SOUND0, 1)
|
||||
INCLUDE(nl_mario_snd0)
|
||||
|
||||
TTL_INPUT(SOUND7, 1)
|
||||
INCLUDE(nl_mario_snd7)
|
||||
TTL_INPUT(SOUND7, 1)
|
||||
INCLUDE(nl_mario_snd7)
|
||||
|
||||
R2R_DAC(DAC, 3.4, 10000.0, 8)
|
||||
NET_C(DAC.VGND, GND)
|
||||
R2R_DAC(DAC, 3.4, 10000.0, 8)
|
||||
NET_C(DAC.VGND, GND)
|
||||
|
||||
INCLUDE(nl_mario_dac)
|
||||
INCLUDE(nl_mario_dac)
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
/* mixing */
|
||||
/* ---------------------------------------------------------------------- */
|
||||
/* ---------------------------------------------------------------------- */
|
||||
/* mixing */
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
RES(R20, RES_K(22)) /* verified */
|
||||
RES(R19, RES_K(22)) /* verified */
|
||||
RES(R40, RES_K(22)) /* verified */
|
||||
RES(R41, RES_K(100)) /* verified */
|
||||
CAP(C31, CAP_U(0.022)) /* */
|
||||
RES(R20, RES_K(22)) /* verified */
|
||||
RES(R19, RES_K(22)) /* verified */
|
||||
RES(R40, RES_K(22)) /* verified */
|
||||
RES(R41, RES_K(100)) /* verified */
|
||||
CAP(C31, CAP_U(0.022)) /* */
|
||||
|
||||
NET_C(2K_A.Q, R20.1)
|
||||
NET_C(GND, R19.1) //FIXME
|
||||
NET_C(2K_C.Q, R41.1)
|
||||
NET_C(2K_A.Q, R20.1)
|
||||
NET_C(GND, R19.1) //FIXME
|
||||
NET_C(2K_C.Q, R41.1)
|
||||
|
||||
#if 1
|
||||
RES(DUM, RES_K(22))
|
||||
NET_C(R39.1, DUM.1)
|
||||
NET_C(DUM.2, GND)
|
||||
FRONTIER(front1, R39.1, R40.1)
|
||||
RES(DUM, RES_K(22))
|
||||
NET_C(R39.1, DUM.1)
|
||||
NET_C(DUM.2, GND)
|
||||
FRONTIER(front1, R39.1, R40.1)
|
||||
#else
|
||||
NET_C(R39.1, R40.1)
|
||||
NET_C(R39.1, R40.1)
|
||||
#endif
|
||||
|
||||
NET_C(R20.2, R19.2, R40.2, R41.2, C31.1)
|
||||
NET_C(C31.2, GND)
|
||||
NET_C(R20.2, R19.2, R40.2, R41.2, C31.1)
|
||||
NET_C(C31.2, GND)
|
||||
|
||||
CAP(C32, CAP_U(1)) /* verified */
|
||||
RES(R42, RES_K(43)) /* verified */
|
||||
RES(R43, RES_K(100)) /* verified */
|
||||
CAP(C32, CAP_U(1)) /* verified */
|
||||
RES(R42, RES_K(43)) /* verified */
|
||||
RES(R43, RES_K(100)) /* verified */
|
||||
|
||||
NET_C(C31.1, C32.1)
|
||||
NET_C(C32.2, R42.1, R43.2, Q10.B)
|
||||
//NET_C(C32.2, R42.1, R43.2)
|
||||
NET_C(R43.1, V5)
|
||||
NET_C(R42.2, GND)
|
||||
NET_C(C31.1, C32.1)
|
||||
NET_C(C32.2, R42.1, R43.2, Q10.B)
|
||||
//NET_C(C32.2, R42.1, R43.2)
|
||||
NET_C(R43.1, V5)
|
||||
NET_C(R42.2, GND)
|
||||
#if 1
|
||||
RES(R63, RES_K(1)) /* */
|
||||
RES(R62, 150) /* */
|
||||
RES(R63, RES_K(1)) /* */
|
||||
RES(R62, 150) /* */
|
||||
|
||||
QBJT_EB(Q10, "2SC1815")
|
||||
QBJT_EB(Q10, "2SC1815")
|
||||
|
||||
NET_C(R62.2, GND)
|
||||
NET_C(R62.1, Q10.E)
|
||||
NET_C(R62.2, GND)
|
||||
NET_C(R62.1, Q10.E)
|
||||
|
||||
NET_C(R63.1, V5)
|
||||
NET_C(R63.2, Q10.C)
|
||||
NET_C(R63.1, V5)
|
||||
NET_C(R63.2, Q10.C)
|
||||
|
||||
CAP(C42, CAP_U(0.1))
|
||||
CAP(C47, CAP_U(4.7))
|
||||
RES(VR1, RES_K(10))
|
||||
CAP(C42, CAP_U(0.1))
|
||||
CAP(C47, CAP_U(4.7))
|
||||
RES(VR1, RES_K(10))
|
||||
|
||||
NET_C(C42.1, C47.1, R62.1)
|
||||
NET_C(C42.2, GND)
|
||||
NET_C(C47.2, VR1.1)
|
||||
NET_C(VR1.2, GND)
|
||||
NET_C(C42.1, C47.1, R62.1)
|
||||
NET_C(C42.2, GND)
|
||||
NET_C(C47.2, VR1.1)
|
||||
NET_C(VR1.2, GND)
|
||||
#endif
|
||||
/* ---------------------------------------------------------------------- */
|
||||
/* Output */
|
||||
/* ---------------------------------------------------------------------- */
|
||||
/* ---------------------------------------------------------------------- */
|
||||
/* Output */
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
RES(ROUT, 1000000)
|
||||
RES(ROUT, 1000000)
|
||||
|
||||
//NET_C(Q10.C, ROUT.1)
|
||||
//NET_C(R43.2, ROUT.1)
|
||||
NET_C(VR1.1, ROUT.1)
|
||||
//NET_C(Q10.C, ROUT.1)
|
||||
//NET_C(R43.2, ROUT.1)
|
||||
NET_C(VR1.1, ROUT.1)
|
||||
|
||||
NET_C(GND, ROUT.2)
|
||||
NET_C(GND, ROUT.2)
|
||||
|
||||
NETLIST_END()
|
||||
|
||||
@ -790,7 +790,7 @@ WRITE8_MEMBER(mario_state::mario_sh1_w)
|
||||
#if OLD_SOUND
|
||||
m_discrete->write(space, DS_SOUND0_INP, 0);
|
||||
#else
|
||||
m_audio_snd0->write(data);
|
||||
m_audio_snd0->write(data);
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -835,7 +835,7 @@ WRITE8_MEMBER(mario_state::mario_sh3_w)
|
||||
#if OLD_SOUND
|
||||
machine().device<discrete_device>("discrete")->write(space, DS_SOUND7_INP, data & 1);
|
||||
#else
|
||||
m_audio_snd7->write((data & 1) ^ 1);
|
||||
m_audio_snd7->write((data & 1) ^ 1);
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
@ -891,16 +891,16 @@ MACHINE_CONFIG_FRAGMENT( mario_audio )
|
||||
MCFG_DISCRETE_INTF(mario)
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1)
|
||||
#else
|
||||
MCFG_SOUND_ADD("snd_nl", NETLIST_SOUND, 48000)
|
||||
MCFG_NETLIST_SETUP(nl_mario)
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
|
||||
MCFG_SOUND_ADD("snd_nl", NETLIST_SOUND, 48000)
|
||||
MCFG_NETLIST_SETUP(nl_mario)
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
|
||||
|
||||
MCFG_NETLIST_LOGIC_INPUT("snd_nl", "snd0", "SOUND0.IN", 0, 1)
|
||||
MCFG_NETLIST_LOGIC_INPUT("snd_nl", "snd7", "SOUND7.IN", 0, 1)
|
||||
MCFG_NETLIST_LOGIC_INPUT("snd_nl", "dac", "DAC.VAL", 0, 255)
|
||||
MCFG_NETLIST_LOGIC_INPUT("snd_nl", "snd0", "SOUND0.IN", 0, 1)
|
||||
MCFG_NETLIST_LOGIC_INPUT("snd_nl", "snd7", "SOUND7.IN", 0, 1)
|
||||
MCFG_NETLIST_LOGIC_INPUT("snd_nl", "dac", "DAC.VAL", 0, 255)
|
||||
|
||||
MCFG_NETLIST_STREAM_OUTPUT("snd_nl", 0, "ROUT.1")
|
||||
MCFG_NETLIST_ANALOG_MULT_OFFSET(150000.0, 0.0)
|
||||
MCFG_NETLIST_STREAM_OUTPUT("snd_nl", 0, "ROUT.1")
|
||||
MCFG_NETLIST_ANALOG_MULT_OFFSET(150000.0, 0.0)
|
||||
#endif
|
||||
|
||||
MACHINE_CONFIG_END
|
||||
|
@ -229,21 +229,11 @@ WRITE8_MEMBER( seibu_sound_device::rst18_ack_w )
|
||||
update_irq_lines(RST18_CLEAR);
|
||||
}
|
||||
|
||||
void seibu_sound_device::ym3812_irqhandler(int linestate)
|
||||
{
|
||||
update_irq_lines(linestate ? RST10_ASSERT : RST10_CLEAR);
|
||||
}
|
||||
|
||||
WRITE_LINE_MEMBER( seibu_sound_device::ym2151_irqhandler )
|
||||
WRITE_LINE_MEMBER( seibu_sound_device::fm_irqhandler )
|
||||
{
|
||||
update_irq_lines(state ? RST10_ASSERT : RST10_CLEAR);
|
||||
}
|
||||
|
||||
void seibu_sound_device::ym2203_irqhandler(int linestate)
|
||||
{
|
||||
update_irq_lines(linestate ? RST10_ASSERT : RST10_CLEAR);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER( seibu_sound_device::bank_w )
|
||||
{
|
||||
space.machine().root_device().membank("bank1")->set_entry(data & 1);
|
||||
|
@ -45,17 +45,13 @@ public:
|
||||
|
||||
DECLARE_READ16_MEMBER( main_word_r );
|
||||
DECLARE_WRITE16_MEMBER( main_word_w );
|
||||
|
||||
DECLARE_WRITE16_MEMBER( main_mustb_w );
|
||||
|
||||
DECLARE_WRITE8_MEMBER( irq_clear_w );
|
||||
DECLARE_WRITE8_MEMBER( rst10_ack_w );
|
||||
DECLARE_WRITE8_MEMBER( rst18_ack_w );
|
||||
DECLARE_WRITE8_MEMBER( bank_w );
|
||||
DECLARE_WRITE8_MEMBER( coin_w );
|
||||
void ym3812_irqhandler(int linestate);
|
||||
WRITE_LINE_MEMBER(ym2151_irqhandler);
|
||||
void ym2203_irqhandler(int linestate);
|
||||
WRITE_LINE_MEMBER( fm_irqhandler );
|
||||
DECLARE_READ8_MEMBER( soundlatch_r );
|
||||
DECLARE_READ8_MEMBER( main_data_pending_r );
|
||||
DECLARE_WRITE8_MEMBER( main_data_w );
|
||||
@ -193,8 +189,8 @@ extern const device_type SEIBU_ADPCM;
|
||||
#define SEIBU_SOUND_SYSTEM_YM3812_INTERFACE(freq1,freq2) \
|
||||
MCFG_SPEAKER_STANDARD_MONO("mono") \
|
||||
\
|
||||
MCFG_SOUND_ADD("ymsnd", YM3812, freq1) \
|
||||
MCFG_YM3812_IRQ_HANDLER(DEVWRITELINE("seibu_sound", seibu_sound_device, ym3812_irqhandler)) \
|
||||
MCFG_SOUND_ADD("ymsnd", YM3812, freq1) \
|
||||
MCFG_YM3812_IRQ_HANDLER(DEVWRITELINE("seibu_sound", seibu_sound_device, fm_irqhandler)) \
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) \
|
||||
\
|
||||
MCFG_OKIM6295_ADD("oki", freq2, OKIM6295_PIN7_LOW) \
|
||||
@ -203,8 +199,8 @@ extern const device_type SEIBU_ADPCM;
|
||||
#define SEIBU_SOUND_SYSTEM_YM3812_RAIDEN_INTERFACE(freq1,freq2) \
|
||||
MCFG_SPEAKER_STANDARD_MONO("mono") \
|
||||
\
|
||||
MCFG_SOUND_ADD("ymsnd", YM3812, freq1) \
|
||||
MCFG_YM3812_IRQ_HANDLER(DEVWRITELINE("seibu_sound", seibu_sound_device, ym3812_irqhandler)) \
|
||||
MCFG_SOUND_ADD("ymsnd", YM3812, freq1) \
|
||||
MCFG_YM3812_IRQ_HANDLER(DEVWRITELINE("seibu_sound", seibu_sound_device, fm_irqhandler)) \
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) \
|
||||
\
|
||||
MCFG_OKIM6295_ADD("oki", freq2, OKIM6295_PIN7_HIGH) \
|
||||
@ -213,8 +209,8 @@ extern const device_type SEIBU_ADPCM;
|
||||
#define SEIBU_SOUND_SYSTEM_YM2151_INTERFACE(freq1,freq2) \
|
||||
MCFG_SPEAKER_STANDARD_MONO("mono") \
|
||||
\
|
||||
MCFG_YM2151_ADD("ymsnd", freq1) \
|
||||
MCFG_YM2151_IRQ_HANDLER(DEVWRITELINE("seibu_sound", seibu_sound_device, ym2151_irqhandler)) \
|
||||
MCFG_YM2151_ADD("ymsnd", freq1) \
|
||||
MCFG_YM2151_IRQ_HANDLER(DEVWRITELINE("seibu_sound", seibu_sound_device, fm_irqhandler)) \
|
||||
MCFG_SOUND_ROUTE(0, "mono", 0.50) \
|
||||
MCFG_SOUND_ROUTE(1, "mono", 0.50) \
|
||||
\
|
||||
@ -224,16 +220,16 @@ extern const device_type SEIBU_ADPCM;
|
||||
#define SEIBU_AIRRAID_SOUND_SYSTEM_YM2151_INTERFACE(freq1) \
|
||||
MCFG_SPEAKER_STANDARD_MONO("mono") \
|
||||
\
|
||||
MCFG_YM2151_ADD("ymsnd", freq1) \
|
||||
MCFG_YM2151_IRQ_HANDLER(DEVWRITELINE("seibu_sound", seibu_sound_device, ym2151_irqhandler)) \
|
||||
MCFG_YM2151_ADD("ymsnd", freq1) \
|
||||
MCFG_YM2151_IRQ_HANDLER(DEVWRITELINE("seibu_sound", seibu_sound_device, fm_irqhandler)) \
|
||||
MCFG_SOUND_ROUTE(0, "mono", 0.50) \
|
||||
MCFG_SOUND_ROUTE(1, "mono", 0.50)
|
||||
|
||||
#define SEIBU_SOUND_SYSTEM_YM2151_RAIDEN2_INTERFACE(freq1,freq2,regiona, regionb) \
|
||||
#define SEIBU_SOUND_SYSTEM_YM2151_RAIDEN2_INTERFACE(freq1, freq2, regiona, regionb) \
|
||||
MCFG_SPEAKER_STANDARD_MONO("mono") \
|
||||
\
|
||||
MCFG_YM2151_ADD("ymsnd", freq1) \
|
||||
MCFG_YM2151_IRQ_HANDLER(DEVWRITELINE("seibu_sound", seibu_sound_device, ym2151_irqhandler)) \
|
||||
MCFG_YM2151_ADD("ymsnd", freq1) \
|
||||
MCFG_YM2151_IRQ_HANDLER(DEVWRITELINE("seibu_sound", seibu_sound_device, fm_irqhandler)) \
|
||||
MCFG_SOUND_ROUTE(0, "mono", 0.50) \
|
||||
MCFG_SOUND_ROUTE(1, "mono", 0.50) \
|
||||
\
|
||||
@ -247,7 +243,7 @@ extern const device_type SEIBU_ADPCM;
|
||||
MCFG_SPEAKER_STANDARD_MONO("mono") \
|
||||
\
|
||||
MCFG_SOUND_ADD("ym1", YM2203, freq) \
|
||||
MCFG_YM2203_IRQ_HANDLER(DEVWRITELINE("seibu_sound", seibu_sound_device, ym2203_irqhandler)) \
|
||||
MCFG_YM2203_IRQ_HANDLER(DEVWRITELINE("seibu_sound", seibu_sound_device, fm_irqhandler)) \
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.15) \
|
||||
\
|
||||
MCFG_SOUND_ADD("ym2", YM2203, freq) \
|
||||
@ -255,11 +251,11 @@ extern const device_type SEIBU_ADPCM;
|
||||
|
||||
#define SEIBU_SOUND_SYSTEM_ADPCM_INTERFACE \
|
||||
MCFG_SOUND_ADD("adpcm1", SEIBU_ADPCM, 8000) \
|
||||
MCFG_SEIBU_ADPCM_ROMREGION("adpcm1") \
|
||||
MCFG_SEIBU_ADPCM_ROMREGION("adpcm1") \
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40) \
|
||||
\
|
||||
MCFG_SOUND_ADD("adpcm2", SEIBU_ADPCM, 8000) \
|
||||
MCFG_SEIBU_ADPCM_ROMREGION("adpcm2") \
|
||||
MCFG_SEIBU_ADPCM_ROMREGION("adpcm2") \
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40)
|
||||
|
||||
/**************************************************************************/
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user