mirror of
https://github.com/holub/mame
synced 2025-06-07 05:13:46 +03:00
munchmo: small cleanup
This commit is contained in:
parent
8365d4133b
commit
4812459c09
@ -155,11 +155,6 @@ private:
|
|||||||
void wwjgtin_main_map(address_map &map) ATTR_COLD;
|
void wwjgtin_main_map(address_map &map) ATTR_COLD;
|
||||||
};
|
};
|
||||||
|
|
||||||
void lasso_state::machine_start()
|
|
||||||
{
|
|
||||||
save_item(NAME(m_vidctrl));
|
|
||||||
save_item(NAME(m_gfxbank));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*************************************
|
/*************************************
|
||||||
@ -924,10 +919,16 @@ GFXDECODE_END
|
|||||||
|
|
||||||
/*************************************
|
/*************************************
|
||||||
*
|
*
|
||||||
* Machine configs
|
* Machine driver
|
||||||
*
|
*
|
||||||
*************************************/
|
*************************************/
|
||||||
|
|
||||||
|
void lasso_state::machine_start()
|
||||||
|
{
|
||||||
|
save_item(NAME(m_vidctrl));
|
||||||
|
save_item(NAME(m_gfxbank));
|
||||||
|
}
|
||||||
|
|
||||||
void lasso_state::base(machine_config &config)
|
void lasso_state::base(machine_config &config)
|
||||||
{
|
{
|
||||||
// basic machine hardware
|
// basic machine hardware
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
// license:BSD-3-Clause
|
// license:BSD-3-Clause
|
||||||
// copyright-holders:Phil Stroffolino
|
// copyright-holders:Phil Stroffolino
|
||||||
/***************************************************************************
|
/*******************************************************************************
|
||||||
|
|
||||||
Munch Mobile
|
Munch Mobile
|
||||||
(C) 1983 SNK
|
(C) 1983 SNK
|
||||||
|
|
||||||
@ -23,7 +24,7 @@ Stephh's notes (based on the game Z80 code and some tests) :
|
|||||||
|
|
||||||
- DIPs are now verified from Munch Mobile manual and playtesting.
|
- DIPs are now verified from Munch Mobile manual and playtesting.
|
||||||
|
|
||||||
***************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
#include "emu.h"
|
#include "emu.h"
|
||||||
|
|
||||||
@ -119,6 +120,12 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/*************************************
|
||||||
|
*
|
||||||
|
* Video hardware
|
||||||
|
*
|
||||||
|
*************************************/
|
||||||
|
|
||||||
void munchmo_state::palette(palette_device &palette) const
|
void munchmo_state::palette(palette_device &palette) const
|
||||||
{
|
{
|
||||||
u8 const *const color_prom = memregion("proms")->base();
|
u8 const *const color_prom = memregion("proms")->base();
|
||||||
@ -196,8 +203,7 @@ void munchmo_state::draw_status(bitmap_ind16 &bitmap, const rectangle &cliprect)
|
|||||||
|
|
||||||
void munchmo_state::draw_background(bitmap_ind16 &bitmap, const rectangle &cliprect)
|
void munchmo_state::draw_background(bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||||
{
|
{
|
||||||
// ROM B1.2C contains 256 tilemaps defining 4x4 configurations of the tiles in ROM B2.2B
|
// ROM B1.2C contains 256 tilemaps defining 4x4 configurations of the tiles in ROM B2.2B
|
||||||
|
|
||||||
gfx_element *const gfx = m_gfxdecode->gfx(1);
|
gfx_element *const gfx = m_gfxdecode->gfx(1);
|
||||||
|
|
||||||
for (int offs = 0; offs < 0x100; offs++)
|
for (int offs = 0; offs < 0x100; offs++)
|
||||||
@ -234,6 +240,7 @@ void munchmo_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect
|
|||||||
gfx_element *const gfx = m_gfxdecode->gfx(2 + bank);
|
gfx_element *const gfx = m_gfxdecode->gfx(2 + bank);
|
||||||
int const color_base = m_palette_bank * 4 + 3;
|
int const color_base = m_palette_bank * 4 + 3;
|
||||||
int const firstsprite = m_vreg[0] & 0x3f;
|
int const firstsprite = m_vreg[0] & 0x3f;
|
||||||
|
|
||||||
for (int i = firstsprite; i < firstsprite + 0x40; i++)
|
for (int i = firstsprite; i < firstsprite + 0x40; i++)
|
||||||
{
|
{
|
||||||
for (int j = 0; j < 8; j++)
|
for (int j = 0; j < 8; j++)
|
||||||
@ -244,10 +251,12 @@ void munchmo_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect
|
|||||||
int sx = m_sprite_xpos[offs]; // XXXXXXX?
|
int sx = m_sprite_xpos[offs]; // XXXXXXX?
|
||||||
int sy = (offs >> 6) << 5; // Y YY------
|
int sy = (offs >> 6) << 5; // Y YY------
|
||||||
sy += (attributes >> 2) & 0x1f;
|
sy += (attributes >> 2) & 0x1f;
|
||||||
|
|
||||||
if (attributes & 0x80)
|
if (attributes & 0x80)
|
||||||
{
|
{
|
||||||
sx = (sx >> 1) | (tile_number & 0x80);
|
sx = (sx >> 1) | (tile_number & 0x80);
|
||||||
sx = 2 * ((- 32 - scroll - sx) & 0xff) + xadjust;
|
sx = 2 * ((-32 - scroll - sx) & 0xff) + xadjust;
|
||||||
|
|
||||||
gfx->transpen(bitmap, cliprect,
|
gfx->transpen(bitmap, cliprect,
|
||||||
0x7f - (tile_number & 0x7f),
|
0x7f - (tile_number & 0x7f),
|
||||||
color_base - (attributes & 0x03),
|
color_base - (attributes & 0x03),
|
||||||
@ -310,10 +319,12 @@ void munchmo_state::sound_nmi_ack_w(u8 data)
|
|||||||
template <u8 Which>
|
template <u8 Which>
|
||||||
u8 munchmo_state::ayreset_r()
|
u8 munchmo_state::ayreset_r()
|
||||||
{
|
{
|
||||||
|
if (!machine().side_effects_disabled())
|
||||||
m_ay8910[Which]->reset_w();
|
m_ay8910[Which]->reset_w();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*************************************
|
/*************************************
|
||||||
*
|
*
|
||||||
* Address maps
|
* Address maps
|
||||||
@ -417,7 +428,6 @@ static INPUT_PORTS_START( mnchmobl )
|
|||||||
PORT_DIPSETTING( 0x0c, DEF_STR( 1C_7C ) )
|
PORT_DIPSETTING( 0x0c, DEF_STR( 1C_7C ) )
|
||||||
PORT_DIPSETTING( 0x0e, DEF_STR( 1C_8C ) )
|
PORT_DIPSETTING( 0x0e, DEF_STR( 1C_8C ) )
|
||||||
|
|
||||||
|
|
||||||
PORT_DIPNAME( 0xe0, 0x00, "1st Bonus" ) PORT_DIPLOCATION("SW1:6,7,8")
|
PORT_DIPNAME( 0xe0, 0x00, "1st Bonus" ) PORT_DIPLOCATION("SW1:6,7,8")
|
||||||
PORT_DIPSETTING( 0x00, "10000" )
|
PORT_DIPSETTING( 0x00, "10000" )
|
||||||
PORT_DIPSETTING( 0x20, "20000" )
|
PORT_DIPSETTING( 0x20, "20000" )
|
||||||
@ -453,6 +463,7 @@ static INPUT_PORTS_START( mnchmobl )
|
|||||||
PORT_DIPSETTING( 0x80, DEF_STR( Yes ) )
|
PORT_DIPSETTING( 0x80, DEF_STR( Yes ) )
|
||||||
INPUT_PORTS_END
|
INPUT_PORTS_END
|
||||||
|
|
||||||
|
|
||||||
/*************************************
|
/*************************************
|
||||||
*
|
*
|
||||||
* Graphics definitions
|
* Graphics definitions
|
||||||
@ -494,7 +505,7 @@ static const gfx_layout sprite_layout1 =
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8,
|
0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8,
|
||||||
8*8, 9*8,10*8,11*8,12*8,13*8,14*8,15*8,
|
8*8, 9*8, 10*8,11*8,12*8,13*8,14*8,15*8,
|
||||||
16*8,17*8,18*8,19*8,20*8,21*8,22*8,23*8,
|
16*8,17*8,18*8,19*8,20*8,21*8,22*8,23*8,
|
||||||
24*8,25*8,26*8,27*8,28*8,29*8,30*8,31*8
|
24*8,25*8,26*8,27*8,28*8,29*8,30*8,31*8
|
||||||
},
|
},
|
||||||
@ -514,7 +525,7 @@ static const gfx_layout sprite_layout2 =
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8,
|
0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8,
|
||||||
8*8, 9*8,10*8,11*8,12*8,13*8,14*8,15*8,
|
8*8, 9*8, 10*8,11*8,12*8,13*8,14*8,15*8,
|
||||||
16*8,17*8,18*8,19*8,20*8,21*8,22*8,23*8,
|
16*8,17*8,18*8,19*8,20*8,21*8,22*8,23*8,
|
||||||
24*8,25*8,26*8,27*8,28*8,29*8,30*8,31*8
|
24*8,25*8,26*8,27*8,28*8,29*8,30*8,31*8
|
||||||
},
|
},
|
||||||
@ -528,6 +539,7 @@ static GFXDECODE_START( gfx_mnchmobl )
|
|||||||
GFXDECODE_ENTRY( "monochrome_sprites", 0, sprite_layout2, 128, 16 ) // colors 128-255
|
GFXDECODE_ENTRY( "monochrome_sprites", 0, sprite_layout2, 128, 16 ) // colors 128-255
|
||||||
GFXDECODE_END
|
GFXDECODE_END
|
||||||
|
|
||||||
|
|
||||||
/*************************************
|
/*************************************
|
||||||
*
|
*
|
||||||
* Machine driver
|
* Machine driver
|
||||||
|
@ -795,7 +795,7 @@ GFXDECODE_END
|
|||||||
|
|
||||||
INTERRUPT_GEN_MEMBER(snk6502_state::satansat_interrupt)
|
INTERRUPT_GEN_MEMBER(snk6502_state::satansat_interrupt)
|
||||||
{
|
{
|
||||||
if(m_irq_mask)
|
if (m_irq_mask)
|
||||||
device.execute().set_input_line(M6502_IRQ_LINE, HOLD_LINE); /* one IRQ per frame */
|
device.execute().set_input_line(M6502_IRQ_LINE, HOLD_LINE); /* one IRQ per frame */
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1048,9 +1048,6 @@ ROM_START( zarzon )
|
|||||||
ROM_LOAD( "zarz134.54", 0x0800, 0x0800, CRC(580934d2) SHA1(c1c7eba56bca2a0ea6a68c0245b071a3308f92bd) )
|
ROM_LOAD( "zarz134.54", 0x0800, 0x0800, CRC(580934d2) SHA1(c1c7eba56bca2a0ea6a68c0245b071a3308f92bd) )
|
||||||
ROM_END
|
ROM_END
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ROM_START( satansatind )
|
ROM_START( satansatind )
|
||||||
ROM_REGION( 0x10000, "maincpu", 0 )
|
ROM_REGION( 0x10000, "maincpu", 0 )
|
||||||
ROM_LOAD( "ss01.rom", 0x4000, 0x0800, CRC(7f16f8fe) SHA1(7ba2a3c31f7463eda0f300a27008a3fed9c84d9d) )
|
ROM_LOAD( "ss01.rom", 0x4000, 0x0800, CRC(7f16f8fe) SHA1(7ba2a3c31f7463eda0f300a27008a3fed9c84d9d) )
|
||||||
|
@ -2,8 +2,6 @@
|
|||||||
// copyright-holders:Nicola Salmoria, Dan Boris
|
// copyright-holders:Nicola Salmoria, Dan Boris
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
|
|
||||||
snk6502.c
|
|
||||||
|
|
||||||
Functions to emulate the video hardware of the machine.
|
Functions to emulate the video hardware of the machine.
|
||||||
|
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
Loading…
Reference in New Issue
Block a user