mirror of
https://github.com/holub/mame
synced 2025-07-03 17:08:39 +03:00
meijinsn: correct audiocpu irq freq, add unemulated protection flag
This commit is contained in:
parent
cae6f799a4
commit
b205a9f0f2
@ -11,7 +11,7 @@ and old alpha shougi hardware (framebuffer).
|
|||||||
There's probably no upright cabinet, only cocktail table (controls in 2p mode are inverted).
|
There's probably no upright cabinet, only cocktail table (controls in 2p mode are inverted).
|
||||||
|
|
||||||
TODO:
|
TODO:
|
||||||
- not sure if protection simulation is right, there is a problem on the selection screen,
|
- protection simulation isn't right, there is a problem on the selection screen,
|
||||||
it's usually not possible to choose tsume shogi (3 difficulty levels)
|
it's usually not possible to choose tsume shogi (3 difficulty levels)
|
||||||
|
|
||||||
Buttons:
|
Buttons:
|
||||||
@ -215,7 +215,7 @@ void meijinsn_state::sound_io_map(address_map &map)
|
|||||||
map(0x00, 0x01).w("aysnd", FUNC(ay8910_device::address_data_w));
|
map(0x00, 0x01).w("aysnd", FUNC(ay8910_device::address_data_w));
|
||||||
map(0x01, 0x01).r("aysnd", FUNC(ay8910_device::data_r));
|
map(0x01, 0x01).r("aysnd", FUNC(ay8910_device::data_r));
|
||||||
map(0x02, 0x02).w("soundlatch", FUNC(generic_latch_8_device::clear_w));
|
map(0x02, 0x02).w("soundlatch", FUNC(generic_latch_8_device::clear_w));
|
||||||
map(0x04, 0x04).w("dac", FUNC(dac_8bit_r2r_device::write));
|
map(0x04, 0x04).w("dac", FUNC(dac_6bit_r2r_device::write));
|
||||||
map(0x06, 0x06).nopw();
|
map(0x06, 0x06).nopw();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -357,14 +357,14 @@ void meijinsn_state::machine_reset()
|
|||||||
void meijinsn_state::meijinsn(machine_config &config)
|
void meijinsn_state::meijinsn(machine_config &config)
|
||||||
{
|
{
|
||||||
// basic machine hardware
|
// basic machine hardware
|
||||||
M68000(config, m_maincpu, 8000000);
|
M68000(config, m_maincpu, 16_MHz_XTAL / 2);
|
||||||
m_maincpu->set_addrmap(AS_PROGRAM, &meijinsn_state::main_map);
|
m_maincpu->set_addrmap(AS_PROGRAM, &meijinsn_state::main_map);
|
||||||
TIMER(config, "scantimer").configure_scanline(FUNC(meijinsn_state::interrupt), "screen", 0, 1);
|
TIMER(config, "scantimer").configure_scanline(FUNC(meijinsn_state::interrupt), "screen", 0, 1);
|
||||||
|
|
||||||
z80_device &audiocpu(Z80(config, "audiocpu", 4000000));
|
z80_device &audiocpu(Z80(config, "audiocpu", 16_MHz_XTAL / 4));
|
||||||
audiocpu.set_addrmap(AS_PROGRAM, &meijinsn_state::sound_map);
|
audiocpu.set_addrmap(AS_PROGRAM, &meijinsn_state::sound_map);
|
||||||
audiocpu.set_addrmap(AS_IO, &meijinsn_state::sound_io_map);
|
audiocpu.set_addrmap(AS_IO, &meijinsn_state::sound_io_map);
|
||||||
audiocpu.set_periodic_int(FUNC(meijinsn_state::irq0_line_hold), attotime::from_hz(160*60));
|
audiocpu.set_periodic_int(FUNC(meijinsn_state::irq0_line_hold), attotime::from_hz(16_MHz_XTAL / 0x800));
|
||||||
|
|
||||||
GENERIC_LATCH_8(config, "soundlatch");
|
GENERIC_LATCH_8(config, "soundlatch");
|
||||||
|
|
||||||
@ -382,12 +382,12 @@ void meijinsn_state::meijinsn(machine_config &config)
|
|||||||
// sound hardware
|
// sound hardware
|
||||||
SPEAKER(config, "mono").front_center();
|
SPEAKER(config, "mono").front_center();
|
||||||
|
|
||||||
ay8910_device &aysnd(AY8910(config, "aysnd", 2000000));
|
ay8910_device &aysnd(AY8910(config, "aysnd", 16_MHz_XTAL / 8));
|
||||||
aysnd.port_a_read_callback().set("soundlatch", FUNC(generic_latch_8_device::read));
|
aysnd.port_a_read_callback().set("soundlatch", FUNC(generic_latch_8_device::read));
|
||||||
aysnd.port_b_write_callback().set_nop(); // ?
|
aysnd.port_b_write_callback().set_nop(); // ?
|
||||||
aysnd.add_route(ALL_OUTPUTS, "mono", 0.25);
|
aysnd.add_route(ALL_OUTPUTS, "mono", 0.25);
|
||||||
|
|
||||||
DAC_8BIT_R2R(config, "dac").add_route(ALL_OUTPUTS, "mono", 1.0);
|
DAC_6BIT_R2R(config, "dac").add_route(ALL_OUTPUTS, "mono", 0.5);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -448,5 +448,5 @@ ROM_END
|
|||||||
} // Anonymous namespace
|
} // Anonymous namespace
|
||||||
|
|
||||||
|
|
||||||
GAME( 1986, meijinsn, 0, meijinsn, meijinsn, meijinsn_state, empty_init, ROT0, "SNK", "Meijinsen (set 1)", MACHINE_SUPPORTS_SAVE )
|
GAME( 1986, meijinsn, 0, meijinsn, meijinsn, meijinsn_state, empty_init, ROT0, "SNK", "Meijinsen (set 1)", MACHINE_UNEMULATED_PROTECTION | MACHINE_SUPPORTS_SAVE )
|
||||||
GAME( 1986, meijinsna, meijinsn, meijinsn, meijinsn, meijinsn_state, empty_init, ROT0, "SNK", "Meijinsen (set 2)", MACHINE_SUPPORTS_SAVE )
|
GAME( 1986, meijinsna, meijinsn, meijinsn, meijinsn, meijinsn_state, empty_init, ROT0, "SNK", "Meijinsen (set 2)", MACHINE_UNEMULATED_PROTECTION | MACHINE_SUPPORTS_SAVE )
|
||||||
|
@ -2,12 +2,13 @@
|
|||||||
// copyright-holders:David Haywood, hap
|
// copyright-holders:David Haywood, hap
|
||||||
/*
|
/*
|
||||||
|
|
||||||
Chess King (棋王之王), LCD handheld presumably from Taiwan.
|
Chess King (棋王之王), LCD handheld console presumably from Taiwan.
|
||||||
Hold down u+d+l+r buttons at boot to enter a test/data clear mode of sorts.
|
Hold down u+d+l+r buttons at boot to enter a test/data clear mode of sorts.
|
||||||
|
|
||||||
TODO:
|
TODO:
|
||||||
- lots of unknown writes
|
- lots of unknown writes
|
||||||
- sound emulation is guessed
|
- sound emulation is guessed
|
||||||
|
- dump/add more cartridges? considering how unknown the handheld is, maybe only a handful were released
|
||||||
- LCD chip(s) is not emulated, maybe the I/O chip does a DMA from RAM to the LCD?
|
- LCD chip(s) is not emulated, maybe the I/O chip does a DMA from RAM to the LCD?
|
||||||
- chess game is buggy, assume that's just the way it is, aka BTANB
|
- chess game is buggy, assume that's just the way it is, aka BTANB
|
||||||
eg. sometimes it makes an illegal move, or castling doesn't erase the king from its original spot
|
eg. sometimes it makes an illegal move, or castling doesn't erase the king from its original spot
|
||||||
@ -191,9 +192,11 @@ uint8_t chessking_state::cartridge_r(offs_t offset)
|
|||||||
if (m_cart_bank == 1)
|
if (m_cart_bank == 1)
|
||||||
return m_mainrom[offset & 0x1ffff];
|
return m_mainrom[offset & 0x1ffff];
|
||||||
|
|
||||||
else if (m_cart_bank & 4)
|
// banks 4-7 go to cartridge
|
||||||
|
else if (m_cart_bank >= 4)
|
||||||
return m_cart->read_rom(offset | (m_cart_bank & 3) << 19);
|
return m_cart->read_rom(offset | (m_cart_bank & 3) << 19);
|
||||||
|
|
||||||
|
// other banks: maybe cartridge too?
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user