mirror of
https://github.com/holub/mame
synced 2025-07-02 00:29:37 +03:00
dynduke: correct oki rom mapping
This commit is contained in:
parent
2b248a8dd2
commit
47ee46ab8f
@ -873,7 +873,7 @@ ROM_END
|
|||||||
|
|
||||||
// Based on sectrzona set, with obviously patched MCU program to make it work on a standard 6802.
|
// Based on sectrzona set, with obviously patched MCU program to make it work on a standard 6802.
|
||||||
ROM_START( sectrzont )
|
ROM_START( sectrzont )
|
||||||
ROM_REGION( 0x8000, "maincpu", 0 )
|
ROM_REGION( 0x7800, "maincpu", 0 )
|
||||||
ROM_LOAD( "czt_1.bin", 0x0000, 0x1000, CRC(f0a45cb4) SHA1(ab3b8d78e25cdbb2fd6a6c0718ae13767364994d) )
|
ROM_LOAD( "czt_1.bin", 0x0000, 0x1000, CRC(f0a45cb4) SHA1(ab3b8d78e25cdbb2fd6a6c0718ae13767364994d) )
|
||||||
ROM_LOAD( "czt_2.bin", 0x1000, 0x1000, CRC(fea68ddb) SHA1(b9ed0cad9a2ded04bcc7042d975b77be63313070) )
|
ROM_LOAD( "czt_2.bin", 0x1000, 0x1000, CRC(fea68ddb) SHA1(b9ed0cad9a2ded04bcc7042d975b77be63313070) )
|
||||||
ROM_LOAD( "czt_3.bin", 0x2000, 0x1000, CRC(baad4294) SHA1(e7fc3ccc940de6df8d786c986b602127c9db9ebb) )
|
ROM_LOAD( "czt_3.bin", 0x2000, 0x1000, CRC(baad4294) SHA1(e7fc3ccc940de6df8d786c986b602127c9db9ebb) )
|
||||||
|
@ -9,9 +9,6 @@
|
|||||||
|
|
||||||
To access test mode, reset with both start buttons held.
|
To access test mode, reset with both start buttons held.
|
||||||
|
|
||||||
Coin inputs are handled by the sound CPU, so they don't work with sound
|
|
||||||
disabled. Just put the game in Free Play mode.
|
|
||||||
|
|
||||||
The background layer is 5bpp and I'm not 100% sure the colours are
|
The background layer is 5bpp and I'm not 100% sure the colours are
|
||||||
correct on it, although the layer is 5bpp the palette data is 4bpp.
|
correct on it, although the layer is 5bpp the palette data is 4bpp.
|
||||||
My current implementation looks pretty good though I've never seen
|
My current implementation looks pretty good though I've never seen
|
||||||
@ -61,11 +58,6 @@
|
|||||||
FACTORY SETTINGS OFF OFF OFF OFF OFF OFF OFF OFF
|
FACTORY SETTINGS OFF OFF OFF OFF OFF OFF OFF OFF
|
||||||
--------------------------------------------------------------------
|
--------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
2008-07
|
|
||||||
Dip locations and factory settings verified with dip listing
|
|
||||||
Also, implemented conditional port for Coin Mode (SW1:1)
|
|
||||||
|
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
#include "emu.h"
|
#include "emu.h"
|
||||||
@ -106,6 +98,8 @@ public:
|
|||||||
void dynduke(machine_config &config);
|
void dynduke(machine_config &config);
|
||||||
void dbldyn(machine_config &config);
|
void dbldyn(machine_config &config);
|
||||||
|
|
||||||
|
void init_dynduke();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void video_start() override ATTR_COLD;
|
virtual void video_start() override ATTR_COLD;
|
||||||
|
|
||||||
@ -325,6 +319,7 @@ void dynduke_state::draw_background(screen_device &screen, bitmap_ind16 &bitmap,
|
|||||||
{
|
{
|
||||||
// The transparency / palette handling on the background layer is very strange
|
// The transparency / palette handling on the background layer is very strange
|
||||||
bitmap_ind16 &bm = m_bg_layer->pixmap();
|
bitmap_ind16 &bm = m_bg_layer->pixmap();
|
||||||
|
|
||||||
// if we're disabled, don't draw
|
// if we're disabled, don't draw
|
||||||
if (!m_back_enable)
|
if (!m_back_enable)
|
||||||
{
|
{
|
||||||
@ -381,6 +376,7 @@ void dynduke_state::draw_background(screen_device &screen, bitmap_ind16 &bitmap,
|
|||||||
uint32_t dynduke_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
uint32_t dynduke_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||||
{
|
{
|
||||||
screen.priority().fill(0, cliprect);
|
screen.priority().fill(0, cliprect);
|
||||||
|
|
||||||
// Setup the tilemaps
|
// Setup the tilemaps
|
||||||
m_fg_layer->set_scrolly(0, ((m_scroll_ram[0x11] & 0x30) << 4) + ((m_scroll_ram[0x12] & 0x7f) << 1) + ((m_scroll_ram[0x12] & 0x80) >> 7));
|
m_fg_layer->set_scrolly(0, ((m_scroll_ram[0x11] & 0x30) << 4) + ((m_scroll_ram[0x12] & 0x7f) << 1) + ((m_scroll_ram[0x12] & 0x80) >> 7));
|
||||||
m_fg_layer->set_scrollx(0, ((m_scroll_ram[0x19] & 0x30) << 4) + ((m_scroll_ram[0x1a] & 0x7f) << 1) + ((m_scroll_ram[0x1a] & 0x80) >> 7));
|
m_fg_layer->set_scrollx(0, ((m_scroll_ram[0x19] & 0x30) << 4) + ((m_scroll_ram[0x1a] & 0x7f) << 1) + ((m_scroll_ram[0x1a] & 0x80) >> 7));
|
||||||
@ -471,6 +467,7 @@ void dynduke_state::sei80bu_encrypted_full_map(address_map &map)
|
|||||||
map(0x8000, 0xffff).bankr("seibu_bank1");
|
map(0x8000, 0xffff).bankr("seibu_bank1");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Input Ports
|
// Input Ports
|
||||||
|
|
||||||
static INPUT_PORTS_START( dynduke )
|
static INPUT_PORTS_START( dynduke )
|
||||||
@ -543,6 +540,7 @@ static INPUT_PORTS_START( dynduke )
|
|||||||
PORT_DIPSETTING( 0x8000, DEF_STR( On ) )
|
PORT_DIPSETTING( 0x8000, DEF_STR( On ) )
|
||||||
INPUT_PORTS_END
|
INPUT_PORTS_END
|
||||||
|
|
||||||
|
|
||||||
// Graphics Layouts
|
// Graphics Layouts
|
||||||
|
|
||||||
static const gfx_layout charlayout =
|
static const gfx_layout charlayout =
|
||||||
@ -611,6 +609,7 @@ static const gfx_layout fg_layout =
|
|||||||
512
|
512
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// Graphics Decode Information
|
// Graphics Decode Information
|
||||||
|
|
||||||
static GFXDECODE_START( gfx_dynduke )
|
static GFXDECODE_START( gfx_dynduke )
|
||||||
@ -620,6 +619,7 @@ static GFXDECODE_START( gfx_dynduke )
|
|||||||
GFXDECODE_ENTRY( "sprites", 0, spritelayout, 0x300, 32 )
|
GFXDECODE_ENTRY( "sprites", 0, spritelayout, 0x300, 32 )
|
||||||
GFXDECODE_END
|
GFXDECODE_END
|
||||||
|
|
||||||
|
|
||||||
// Interrupt Generator
|
// Interrupt Generator
|
||||||
|
|
||||||
void dynduke_state::vblank_irq(int state)
|
void dynduke_state::vblank_irq(int state)
|
||||||
@ -631,6 +631,7 @@ void dynduke_state::vblank_irq(int state)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Machine Driver
|
// Machine Driver
|
||||||
|
|
||||||
void dynduke_state::dynduke(machine_config &config)
|
void dynduke_state::dynduke(machine_config &config)
|
||||||
@ -692,6 +693,7 @@ void dynduke_state::dbldyn(machine_config &config)
|
|||||||
m_maincpu->set_addrmap(AS_PROGRAM, &dynduke_state::masterj_map);
|
m_maincpu->set_addrmap(AS_PROGRAM, &dynduke_state::masterj_map);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// ROMs
|
// ROMs
|
||||||
|
|
||||||
ROM_START( dynduke )
|
ROM_START( dynduke )
|
||||||
@ -1058,15 +1060,28 @@ ROM_START( dbldynu )
|
|||||||
ROM_LOAD( "61-d.u3", 0x0100, 0x0200, CRC(4c6527d8) SHA1(d775a0c79adbf381b56977daa702d2de2736d862) ) // N82S147AN
|
ROM_LOAD( "61-d.u3", 0x0100, 0x0200, CRC(4c6527d8) SHA1(d775a0c79adbf381b56977daa702d2de2736d862) ) // N82S147AN
|
||||||
ROM_END
|
ROM_END
|
||||||
|
|
||||||
|
|
||||||
|
void dynduke_state::init_dynduke()
|
||||||
|
{
|
||||||
|
uint8_t *rom = memregion("oki")->base();
|
||||||
|
const uint32_t len = memregion("oki")->bytes();
|
||||||
|
|
||||||
|
// descramble adpcm rom address lines a bit
|
||||||
|
std::vector<uint8_t> buf(len);
|
||||||
|
memcpy(&buf[0], rom, len);
|
||||||
|
for (int i = 0; i < len; i++)
|
||||||
|
rom[i] = buf[(i & 0xfff) | bitswap<4>(i,13,14,15,12) << 12];
|
||||||
|
}
|
||||||
|
|
||||||
} // anonymous namespace
|
} // anonymous namespace
|
||||||
|
|
||||||
|
|
||||||
// Game Drivers
|
// Game Drivers
|
||||||
|
|
||||||
GAME( 1989, dynduke, 0, dynduke, dynduke, dynduke_state, empty_init, ROT0, "Seibu Kaihatsu", "Dynamite Duke (Europe, 03SEP89)", MACHINE_SUPPORTS_SAVE )
|
GAME( 1989, dynduke, 0, dynduke, dynduke, dynduke_state, init_dynduke, ROT0, "Seibu Kaihatsu", "Dynamite Duke (Europe, 03SEP89)", MACHINE_SUPPORTS_SAVE )
|
||||||
GAME( 1989, dyndukea, dynduke, dynduke, dynduke, dynduke_state, empty_init, ROT0, "Seibu Kaihatsu", "Dynamite Duke (Europe, 25JUL89)", MACHINE_SUPPORTS_SAVE )
|
GAME( 1989, dyndukea, dynduke, dynduke, dynduke, dynduke_state, init_dynduke, ROT0, "Seibu Kaihatsu", "Dynamite Duke (Europe, 25JUL89)", MACHINE_SUPPORTS_SAVE )
|
||||||
GAME( 1989, dyndukej, dynduke, dynduke, dynduke, dynduke_state, empty_init, ROT0, "Seibu Kaihatsu", "Dynamite Duke (Japan, 03SEP89)", MACHINE_SUPPORTS_SAVE )
|
GAME( 1989, dyndukej, dynduke, dynduke, dynduke, dynduke_state, init_dynduke, ROT0, "Seibu Kaihatsu", "Dynamite Duke (Japan, 03SEP89)", MACHINE_SUPPORTS_SAVE )
|
||||||
GAME( 1989, dyndukeja, dynduke, dynduke, dynduke, dynduke_state, empty_init, ROT0, "Seibu Kaihatsu", "Dynamite Duke (Japan, 25JUL89)", MACHINE_SUPPORTS_SAVE )
|
GAME( 1989, dyndukeja, dynduke, dynduke, dynduke, dynduke_state, init_dynduke, ROT0, "Seibu Kaihatsu", "Dynamite Duke (Japan, 25JUL89)", MACHINE_SUPPORTS_SAVE )
|
||||||
GAME( 1989, dyndukeu, dynduke, dynduke, dynduke, dynduke_state, empty_init, ROT0, "Seibu Kaihatsu (Fabtek license)", "Dynamite Duke (US, 25JUL89)", MACHINE_SUPPORTS_SAVE )
|
GAME( 1989, dyndukeu, dynduke, dynduke, dynduke, dynduke_state, init_dynduke, ROT0, "Seibu Kaihatsu (Fabtek license)", "Dynamite Duke (US, 25JUL89)", MACHINE_SUPPORTS_SAVE )
|
||||||
GAME( 1989, dbldynj, 0, dbldyn, dynduke, dynduke_state, empty_init, ROT0, "Seibu Kaihatsu", "The Double Dynamites (Japan, 13NOV89)", MACHINE_SUPPORTS_SAVE )
|
GAME( 1989, dbldynj, 0, dbldyn, dynduke, dynduke_state, init_dynduke, ROT0, "Seibu Kaihatsu", "The Double Dynamites (Japan, 13NOV89)", MACHINE_SUPPORTS_SAVE )
|
||||||
GAME( 1989, dbldynu, dbldynj, dynduke, dynduke, dynduke_state, empty_init, ROT0, "Seibu Kaihatsu (Fabtek license)", "The Double Dynamites (US, 13NOV89)", MACHINE_SUPPORTS_SAVE )
|
GAME( 1989, dbldynu, dbldynj, dynduke, dynduke, dynduke_state, init_dynduke, ROT0, "Seibu Kaihatsu (Fabtek license)", "The Double Dynamites (US, 13NOV89)", MACHINE_SUPPORTS_SAVE )
|
||||||
|
Loading…
Reference in New Issue
Block a user