mirror of
https://github.com/holub/mame
synced 2025-04-22 16:31:49 +03:00
-igs/igs027a.cpp: Added 5-bit output port.
-igs/igs_m027.cpp: Started looking at sound banking. * Hooked up sound banking for jking02, fruitpar and oceanpar. * Corrected sound samples region tag for l * Added preliminary sound banking for lhdmg and lhzb3.
This commit is contained in:
parent
b970e12f04
commit
403bb21221
@ -21,6 +21,7 @@ igs027a_cpu_device::igs027a_cpu_device(machine_config const &mconfig, char const
|
||||
ARCHFLAG_T,
|
||||
ENDIANNESS_LITTLE,
|
||||
address_map_constructor(FUNC(igs027a_cpu_device::onboard_peripherals), this)),
|
||||
m_out_port_cb(*this),
|
||||
m_irq_timers{ nullptr, nullptr },
|
||||
m_irq_enable(0xff),
|
||||
m_irq_pending(0xff)
|
||||
@ -66,6 +67,8 @@ void igs027a_cpu_device::onboard_peripherals(address_map &map)
|
||||
{
|
||||
map(0x0000'0000, 0x0000'3fff).rom().region(DEVICE_SELF, 0);
|
||||
|
||||
map(0x4000'0018, 0x4000'001b).umask32(0x0000'00ff).w(FUNC(igs027a_cpu_device::out_port_w));
|
||||
|
||||
map(0x7000'0100, 0x7000'0103).umask32(0x0000'00ff).w(FUNC(igs027a_cpu_device::timer_rate_w<0>));
|
||||
map(0x7000'0104, 0x7000'0107).umask32(0x0000'00ff).w(FUNC(igs027a_cpu_device::timer_rate_w<1>));
|
||||
map(0x7000'0200, 0x7000'0203).umask32(0x0000'00ff).rw(FUNC(igs027a_cpu_device::irq_pending_r), FUNC(igs027a_cpu_device::irq_enable_w));
|
||||
@ -74,6 +77,12 @@ void igs027a_cpu_device::onboard_peripherals(address_map &map)
|
||||
}
|
||||
|
||||
|
||||
void igs027a_cpu_device::out_port_w(u8 data)
|
||||
{
|
||||
// 5-bit output port
|
||||
m_out_port_cb(0, data & 0x1f, 0x1f);
|
||||
}
|
||||
|
||||
template <unsigned N>
|
||||
void igs027a_cpu_device::timer_rate_w(u8 data)
|
||||
{
|
||||
|
@ -14,6 +14,8 @@ public:
|
||||
igs027a_cpu_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock);
|
||||
virtual ~igs027a_cpu_device();
|
||||
|
||||
auto out_port() { return m_out_port_cb.bind(); }
|
||||
|
||||
void trigger_irq(unsigned num);
|
||||
|
||||
protected:
|
||||
@ -23,6 +25,7 @@ protected:
|
||||
private:
|
||||
void onboard_peripherals(address_map &map) ATTR_COLD;
|
||||
|
||||
void out_port_w(u8 data);
|
||||
template <unsigned N> void timer_rate_w(u8 data);
|
||||
u8 irq_pending_r();
|
||||
void irq_enable_w(u8 data);
|
||||
@ -31,6 +34,8 @@ private:
|
||||
|
||||
template <unsigned N> TIMER_CALLBACK_MEMBER(timer_irq);
|
||||
|
||||
devcb_write8 m_out_port_cb;
|
||||
|
||||
emu_timer *m_irq_timers[2];
|
||||
|
||||
u8 m_irq_enable;
|
||||
|
@ -201,7 +201,6 @@ void igs_m027_state::igs_mahjong_map(address_map &map)
|
||||
map(0x38009000, 0x38009003).rw(m_ppi, FUNC(i8255_device::read), FUNC(i8255_device::write));
|
||||
|
||||
map(0x40000008, 0x4000000b).w(FUNC(igs_m027_state::unk2_w));
|
||||
map(0x40000018, 0x4000001b).umask32(0x000000ff).w(FUNC(igs_m027_state::io_select_w<1>));
|
||||
|
||||
map(0x50000000, 0x500003ff).umask32(0x000000ff).w(FUNC(igs_m027_state::xor_table_w)); // uploads XOR table to external ROM here
|
||||
}
|
||||
@ -1449,6 +1448,7 @@ void igs_m027_state::m027(machine_config &config)
|
||||
{
|
||||
IGS027A(config, m_maincpu, 22'000'000); // Jungle King 2002 has a 22Mhz Xtal, what about the others?
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &igs_m027_state::igs_mahjong_map);
|
||||
m_maincpu->out_port().set(FUNC(igs_m027_state::io_select_w<1>));
|
||||
|
||||
// NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
|
||||
|
||||
@ -1505,6 +1505,7 @@ void igs_m027_state::qlgs_xor(machine_config &config)
|
||||
m027_xor(config);
|
||||
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &igs_m027_state::jking02_xor_map);
|
||||
m_maincpu->out_port().append(m_oki, FUNC(okim6295_device::set_rom_bank)).rshift(3);
|
||||
|
||||
m_ppi->out_pc_callback().set(FUNC(igs_m027_state::io_select_w<0>));
|
||||
|
||||
@ -1521,6 +1522,7 @@ void igs_m027_state::lhdmg_xor(machine_config &config)
|
||||
m_ppi->in_pa_callback().set_ioport("TEST");
|
||||
m_ppi->out_pb_callback().set(FUNC(igs_m027_state::io_select_w<0>));
|
||||
m_ppi->out_pc_callback().set(FUNC(igs_m027_state::mahjong_output_w));
|
||||
m_ppi->out_pc_callback().append(m_oki, FUNC(okim6295_device::set_rom_bank)).bit(7); // FIXME: not right - issues with gameplay sound, especially on last chance screen
|
||||
|
||||
m_igs017_igs031->in_pa_callback().set_ioport("DSW1");
|
||||
m_igs017_igs031->in_pb_callback().set_ioport("DSW2");
|
||||
@ -1597,6 +1599,7 @@ void igs_m027_state::oceanpar_xor(machine_config &config)
|
||||
m027_xor(config);
|
||||
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &igs_m027_state::jking02_xor_map);
|
||||
m_maincpu->out_port().append(m_oki, FUNC(okim6295_device::set_rom_bank)).rshift(3);
|
||||
|
||||
m_ppi->out_pa_callback().set(m_ticket, FUNC(ticket_dispenser_device::motor_w)).bit(7);
|
||||
m_ppi->out_pb_callback().set(FUNC(igs_m027_state::oceanpar_output_w));
|
||||
@ -2001,7 +2004,7 @@ ROM_START( lhzb3 )
|
||||
ROM_REGION( 0x400000, "igs017_igs031:sprites", 0 )
|
||||
ROM_LOAD( "m2401.u18", 0x000000, 0x400000, CRC(81428f18) SHA1(9fb19c8a79cc3443642f4b044e04735df2cb45be) )
|
||||
|
||||
ROM_REGION( 0x200000, "unknown", 0 )
|
||||
ROM_REGION( 0x200000, "oki", 0 )
|
||||
ROM_LOAD( "s2402.u14", 0x00000, 0x100000, CRC(56083fe2) SHA1(62afd651809bf5e639bfda6e5579dbf4b903b664) )
|
||||
ROM_END
|
||||
|
||||
|
@ -187,7 +187,6 @@ void igs_m027xa_state::main_map(address_map &map)
|
||||
map(0x3800c000, 0x3800c003).w(FUNC(igs_m027xa_state::oki_bank_w));
|
||||
map(0x4000000c, 0x4000000f).r(FUNC(igs_m027xa_state::gpio_r));
|
||||
map(0x40000014, 0x40000017).w(FUNC(igs_m027xa_state::igs_40000014_w));
|
||||
map(0x40000018, 0x4000001b).umask32(0x000000ff).w(FUNC(igs_m027xa_state::io_select_w<1>));
|
||||
|
||||
map(0x50000000, 0x500003ff).umask32(0x000000ff).w(FUNC(igs_m027xa_state::xor_table_w));
|
||||
|
||||
@ -481,6 +480,7 @@ void igs_m027xa_state::igs_mahjong_xa(machine_config &config)
|
||||
{
|
||||
IGS027A(config, m_maincpu, 22'000'000); // Crazy Bugs has a 22MHz crystal, what about the others?
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &igs_m027xa_state::main_map);
|
||||
m_maincpu->out_port().set(FUNC(igs_m027xa_state::io_select_w<1>));
|
||||
|
||||
// NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user