diff options
author | David Haywood <mamehaze@users.noreply.github.com> | 2014-10-14 17:40:53 +0000 |
---|---|---|
committer | David Haywood <mamehaze@users.noreply.github.com> | 2014-10-14 17:40:53 +0000 |
commit | 6948f80c4fbd710875cc06f4c8937ec0858e0128 (patch) | |
tree | 3382b56de2b9c5977f347eb5ce05d9d66a79291b | |
parent | c2a5a49e28734204da567cae84442f23743d574e (diff) |
improve (nw)
-rw-r--r-- | src/mame/drivers/mario.c | 9 | ||||
-rw-r--r-- | src/mame/includes/mario.h | 2 | ||||
-rw-r--r-- | src/mame/video/mario.c | 15 |
3 files changed, 19 insertions, 7 deletions
diff --git a/src/mame/drivers/mario.c b/src/mame/drivers/mario.c index e7d17100786..6aa38955364 100644 --- a/src/mame/drivers/mario.c +++ b/src/mame/drivers/mario.c @@ -177,10 +177,13 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( mariobl_map, AS_PROGRAM, 8, mario_state) AM_RANGE(0x0000, 0x5fff) AM_ROM AM_RANGE(0x6000, 0x6fff) AM_RAM - AM_RANGE(0x7000, 0x73ff) AM_RAM AM_SHARE("spriteram") /* physical sprite ram */ + AM_RANGE(0x7000, 0x71ff) AM_RAM AM_SHARE("spriteram") /* physical sprite ram */ + AM_RANGE(0x7200, 0x73ff) AM_RAM // attrram? AM_RANGE(0x7400, 0x77ff) AM_RAM_WRITE(mario_videoram_w) AM_SHARE("videoram") //AM_RANGE(0xa000, 0xa000) AM_READ_PORT("IN1") + AM_RANGE(0xa000, 0xa000) AM_READNOP /* watchdog? */ AM_RANGE(0xa100, 0xa100) AM_READ_PORT("DSW") /* DSW */ + AM_RANGE(0xa206, 0xa206) AM_WRITE(mario_gfxbank_w) AM_RANGE(0xe000, 0xffff) AM_ROM ADDRESS_MAP_END @@ -501,10 +504,14 @@ static MACHINE_CONFIG_START( mariobl, mario_state ) MCFG_SOUND_ADD("ay1", AY8910, XTAL_18_432MHz/6/2) /* XTAL confirmed, divisor guessed */ MCFG_AY8910_PORT_A_READ_CB(IOPORT("SYSTEM")) +// MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(mario_state, ay1_outputb_w)) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.33) MCFG_SOUND_ADD("ay2", AY8910, XTAL_18_432MHz/6/2) /* XTAL confirmed, divisor guessed */ MCFG_AY8910_PORT_A_READ_CB(IOPORT("INPUTS")) +// MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(mario_state, ay2_outputb_w)) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.33) MACHINE_CONFIG_END diff --git a/src/mame/includes/mario.h b/src/mame/includes/mario.h index d32c95237ee..2ecb48bc081 100644 --- a/src/mame/includes/mario.h +++ b/src/mame/includes/mario.h @@ -102,7 +102,7 @@ public: DECLARE_WRITE8_MEMBER(mario_sh2_w); DECLARE_READ8_MEMBER(memory_read_byte); DECLARE_WRITE8_MEMBER(memory_write_byte); - void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, int yaddr, int xaddr); + void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, int yaddr, int xaddr, int dx, int dy); required_device<cpu_device> m_maincpu; optional_device<cpu_device> m_audiocpu; required_device<gfxdecode_device> m_gfxdecode; diff --git a/src/mame/video/mario.c b/src/mame/video/mario.c index d8d2a85bc38..494e6e0f933 100644 --- a/src/mame/video/mario.c +++ b/src/mame/video/mario.c @@ -147,7 +147,7 @@ void mario_state::video_start() * confirmed on mametests.org as being present on real PCB as well. */ -void mario_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, int yaddr, int xaddr) +void mario_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, int yaddr, int xaddr, int dx, int dy) { /* TODO: draw_sprites should adopt the scanline logic from dkong.c * The schematics have the same logic for sprite buffering. @@ -177,7 +177,7 @@ void mario_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, m_spriteram[offs + 2], (m_spriteram[offs + 1] & 0x0f) + 16 * m_palette_bank + 32 * m_monitor, !(m_spriteram[offs + 1] & 0x80),!(m_spriteram[offs + 1] & 0x40), - x, y,0); + x+dx, y+dy,0); } else { @@ -187,7 +187,7 @@ void mario_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, m_spriteram[offs + 2], (m_spriteram[offs + 1] & 0x0f) + 16 * m_palette_bank + 32 * m_monitor, (m_spriteram[offs + 1] & 0x80),(m_spriteram[offs + 1] & 0x40), - x, y,0); + x+dx, y+dy,0); } } } @@ -214,13 +214,18 @@ UINT32 mario_state::screen_update_common(screen_device &screen, bitmap_ind16 &bi UINT32 mario_state::screen_update_mario(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { screen_update_common(screen, bitmap, cliprect); - draw_sprites(bitmap, cliprect, 0, 3); + draw_sprites(bitmap, cliprect, 0, 3, 0, 0); return 0; } UINT32 mario_state::screen_update_mariobl(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { + // not sure + m_palette_bank = m_gfx_bank; // might be the 'attr' ram + machine().tilemap().mark_all_dirty(); + + screen_update_common(screen, bitmap, cliprect); - draw_sprites(bitmap, cliprect, 3, 0); + draw_sprites(bitmap, cliprect, 3, 0, 8, -8); return 0; } |