mirror of
https://github.com/holub/mame
synced 2025-06-02 02:49:44 +03:00
Merge pull request #2932 from DavidHaywood/101217
* pgm2: fix end of sprite list handling (nw) * pgm2: dynamic resolution change (nw) * pgm2: fix bug in yzoom code causing hang (nw)
This commit is contained in:
commit
3fbce8e55b
@ -356,6 +356,7 @@ static ADDRESS_MAP_START( pgm2_map, AS_PROGRAM, 32, pgm2_state )
|
||||
|
||||
AM_RANGE(0x30120000, 0x30120003) AM_RAM AM_SHARE("bgscroll") // scroll
|
||||
AM_RANGE(0x30120008, 0x3012000b) AM_RAM AM_SHARE("fgscroll")
|
||||
AM_RANGE(0x3012000c, 0x3012000f) AM_RAM AM_SHARE("vidmode")
|
||||
AM_RANGE(0x30120030, 0x30120033) AM_WRITE16(share_bank_w, 0xffff0000)
|
||||
AM_RANGE(0x30120038, 0x3012003b) AM_WRITE(sprite_encryption_w)
|
||||
// there are other 0x301200xx regs
|
||||
@ -570,10 +571,16 @@ static MACHINE_CONFIG_START( pgm2 )
|
||||
MCFG_PGM2_MEMCARD_ADD("memcard_p2")
|
||||
MCFG_PGM2_MEMCARD_ADD("memcard_p3")
|
||||
MCFG_PGM2_MEMCARD_ADD("memcard_p4")
|
||||
|
||||
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
// not strictly needed as the video code supports changing on the fly, but makes recording easier etc.
|
||||
static MACHINE_CONFIG_DERIVED( pgm2_lores, pgm2 )
|
||||
MCFG_SCREEN_MODIFY("screen")
|
||||
// note, +8 to y position too, could be a sprite reg to move sprites intead
|
||||
MCFG_SCREEN_VISIBLE_AREA(0, 320-1, 0+8, 224+8-1)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
/* using macros for the video / sound roms because the locations never change between sets, and
|
||||
we're going to have a LOT of clones to cover all the internal rom regions and external rom revision
|
||||
combinations, so it keeps things readable */
|
||||
@ -1119,7 +1126,7 @@ GAME( 2011, kov3_102, kov3, pgm2, pgm2, pgm2_state, kov3_102, ROT0,
|
||||
GAME( 2011, kov3_100, kov3, pgm2, pgm2, pgm2_state, kov3_100, ROT0, "IGS", "Knights of Valour 3 (V100, China)", MACHINE_NOT_WORKING )
|
||||
|
||||
// King of Fighters '98: Ultimate Match Hero
|
||||
GAME( 2009, kof98umh, 0, pgm2, pgm2, pgm2_state, kof98umh, ROT0, "IGS / SNK Playmore / NewChannel", "The King of Fighters '98: Ultimate Match HERO (China, V100, 09-08-23)", MACHINE_NOT_WORKING )
|
||||
GAME( 2009, kof98umh, 0, pgm2_lores, pgm2, pgm2_state, kof98umh, ROT0, "IGS / SNK Playmore / NewChannel", "The King of Fighters '98: Ultimate Match HERO (China, V100, 09-08-23)", MACHINE_NOT_WORKING )
|
||||
|
||||
// Jigsaw World Arena
|
||||
|
||||
|
@ -33,6 +33,7 @@ public:
|
||||
m_sp_videoram(*this, "sp_videoram"),
|
||||
m_bgscroll(*this, "bgscroll"),
|
||||
m_fgscroll(*this, "fgscroll"),
|
||||
m_vidmode(*this, "vidmode"),
|
||||
m_gfxdecode2(*this, "gfxdecode2"),
|
||||
m_gfxdecode3(*this, "gfxdecode3"),
|
||||
m_arm_aic(*this, "arm_aic"),
|
||||
@ -133,6 +134,7 @@ private:
|
||||
required_shared_ptr<uint32_t> m_sp_videoram;
|
||||
required_shared_ptr<uint32_t> m_bgscroll;
|
||||
required_shared_ptr<uint32_t> m_fgscroll;
|
||||
required_shared_ptr<uint32_t> m_vidmode;
|
||||
required_device<gfxdecode_device> m_gfxdecode2;
|
||||
required_device<gfxdecode_device> m_gfxdecode3;
|
||||
required_device<arm_aic_device> m_arm_aic;
|
||||
|
@ -216,12 +216,15 @@ void pgm2_state::draw_sprites(screen_device &screen, const rectangle &cliprect,
|
||||
draw_sprite_line(cliprect, mask_offset, palette_offset, x, realy, flipx, reverse, sizex, pal, 1, zoomx_bits, growx);
|
||||
realy++;
|
||||
|
||||
if (zoomy_bit)
|
||||
if (zoomy_bit) // draw it again
|
||||
{
|
||||
palette_offset = pre_palette_offset;
|
||||
mask_offset = pre_mask_offset;
|
||||
draw_sprite_line(cliprect, mask_offset, palette_offset, x, realy, flipx, reverse, sizex, pal, 1, zoomx_bits, growx);
|
||||
realy++;
|
||||
}
|
||||
else ydraw++;
|
||||
|
||||
ydraw++;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -258,6 +261,15 @@ void pgm2_state::copy_sprites_from_bitmap(screen_device &screen, bitmap_rgb32 &b
|
||||
|
||||
uint32_t pgm2_state::screen_update_pgm2(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
|
||||
int mode = m_vidmode[0] & 0x00010000; // other bits not used?
|
||||
|
||||
if (mode)
|
||||
m_screen->set_visible_area(0, 448 - 1, 0, 224 - 1);
|
||||
else // note, +8 to y position too, could be a sprite reg to move sprites intead
|
||||
m_screen->set_visible_area(0, 320 - 1, 8, 224 + 8 - 1);
|
||||
|
||||
|
||||
m_fg_tilemap->set_scrollx(0, m_fgscroll[0] & 0xffff);
|
||||
m_fg_tilemap->set_scrolly(0, m_fgscroll[0] >> 16);
|
||||
m_bg_tilemap->set_scrolly(0, (m_bgscroll[0x0/4] & 0xffff0000)>>16 );
|
||||
|
Loading…
Reference in New Issue
Block a user