ddragon3.c: fix m68k byte smearing regression in wwfwfest (nw)

This commit is contained in:
Alex W. Jackson 2014-09-07 22:46:10 +00:00
parent 3cbc6f46ca
commit 2bae75a257
3 changed files with 11 additions and 17 deletions

View File

@ -277,9 +277,9 @@ WRITE16_MEMBER(wwfwfest_state::wwfwfest_paletteram_w)
/*- Priority Control -*/
WRITE16_MEMBER(wwfwfest_state::wwfwfest_1410_write)
WRITE8_MEMBER(wwfwfest_state::wwfwfest_priority_w)
{
m_pri = data & 0xff;
m_pri = data;
}
@ -362,7 +362,7 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16, wwfwfest_state )
AM_RANGE(0x10000a, 0x10000b) AM_WRITE(wwfwfest_flipscreen_w)
AM_RANGE(0x140000, 0x140003) AM_WRITE(wwfwfest_irq_ack_w)
AM_RANGE(0x14000c, 0x14000d) AM_WRITE(wwfwfest_soundwrite)
AM_RANGE(0x140010, 0x140011) AM_WRITE(wwfwfest_1410_write)
AM_RANGE(0x140010, 0x140011) AM_WRITE8(wwfwfest_priority_w, 0x00ff)
AM_RANGE(0x140020, 0x140021) AM_READ_PORT("P1")
AM_RANGE(0x140022, 0x140023) AM_READ_PORT("P2")
AM_RANGE(0x140024, 0x140025) AM_READ_PORT("P3")

View File

@ -49,7 +49,7 @@ public:
/* misc */
UINT16 m_io_reg[8];
UINT16 m_pri;
UINT8 m_pri;
/* devices */
required_device<cpu_device> m_maincpu;
@ -100,7 +100,7 @@ public:
//required_device<buffered_spriteram16_device> m_spriteram;
DECLARE_WRITE16_MEMBER(wwfwfest_1410_write);
DECLARE_WRITE8_MEMBER(wwfwfest_priority_w);
DECLARE_WRITE16_MEMBER(wwfwfest_scroll_write);
DECLARE_WRITE16_MEMBER(wwfwfest_irq_ack_w);
DECLARE_WRITE16_MEMBER(wwfwfest_flipscreen_w);

View File

@ -110,14 +110,8 @@ TILE_GET_INFO_MEMBER(wwfwfest_state::get_fg0_tile_info)
WRITE16_MEMBER(wwfwfest_state::wwfwfest_fg0_videoram_w)
{
/* Videoram is 8 bit, upper & lower byte writes end up in the same place */
if (ACCESSING_BITS_8_15 && ACCESSING_BITS_0_7) {
COMBINE_DATA(&m_fg0_videoram[offset]);
} else if (ACCESSING_BITS_8_15) {
m_fg0_videoram[offset]=(data>>8)&0xff;
} else {
/* Videoram is 8 bit, upper & lower byte writes end up in the same place due to m68k byte smearing */
m_fg0_videoram[offset]=data&0xff;
}
m_fg0_tilemap->mark_tile_dirty(offset/2);
}
@ -292,7 +286,7 @@ UINT32 ddragon3_state::screen_update_ctribe(screen_device &screen, bitmap_ind16
UINT32 wwfwfest_state::screen_update_wwfwfest(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
if (m_pri == 0x0078) {
if (m_pri == 0x78) {
m_fg_tilemap->set_scrolly(0, m_fg_scrolly );
m_fg_tilemap->set_scrollx(0, m_fg_scrollx + m_bg0_dx);
m_bg_tilemap->set_scrolly(0, m_bg_scrolly );
@ -306,19 +300,19 @@ UINT32 wwfwfest_state::screen_update_wwfwfest(screen_device &screen, bitmap_ind1
/* todo : which bits of pri are significant to the order */
if (m_pri == 0x007b) {
if (m_pri == 0x7b) {
m_fg_tilemap->draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE,0);
m_bg_tilemap->draw(screen, bitmap, cliprect, 0,0);
draw_sprites(bitmap,cliprect);
}
if (m_pri == 0x007c) {
if (m_pri == 0x7c) {
m_fg_tilemap->draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE,0);
draw_sprites(bitmap,cliprect);
m_bg_tilemap->draw(screen, bitmap, cliprect, 0,0);
}
if (m_pri == 0x0078) {
if (m_pri == 0x78) {
m_bg_tilemap->draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE,0);
m_fg_tilemap->draw(screen, bitmap, cliprect, 0,0);
draw_sprites(bitmap,cliprect);