From 5a3f86829f3c3bb2f0b9d7b99087feb09698bff5 Mon Sep 17 00:00:00 2001 From: Fabio Priuli Date: Sun, 27 Jun 2010 12:13:52 +0000 Subject: [PATCH] added a PPU function eventually needed by MMC5 NES boards. no whatsnew. --- src/mame/video/ppu2c0x.c | 7 +++++++ src/mame/video/ppu2c0x.h | 1 + 2 files changed, 8 insertions(+) diff --git a/src/mame/video/ppu2c0x.c b/src/mame/video/ppu2c0x.c index 0c5f36963e5..a705341b9a8 100644 --- a/src/mame/video/ppu2c0x.c +++ b/src/mame/video/ppu2c0x.c @@ -1237,6 +1237,13 @@ int ppu2c0x_get_current_scanline( running_device *device ) return ppu2c0x->scanline; } +// MMC5 has to be able to check this +int ppu2c0x_is_sprite_8x16( running_device *device ) +{ + ppu2c0x_state *ppu2c0x = get_token(device); + return BIT(ppu2c0x->regs[0], 5); +} + void ppu2c0x_set_scanline_callback( running_device *device, ppu2c0x_scanline_cb cb ) { ppu2c0x_state *ppu2c0x = get_token(device); diff --git a/src/mame/video/ppu2c0x.h b/src/mame/video/ppu2c0x.h index b7bedf3ec3c..6c73a7d4b99 100644 --- a/src/mame/video/ppu2c0x.h +++ b/src/mame/video/ppu2c0x.h @@ -113,6 +113,7 @@ void ppu2c0x_render( running_device *device, bitmap_t *bitmap, int flipx, int fl int ppu2c0x_get_pixel( running_device *device, int x, int y ) ATTR_NONNULL(1); int ppu2c0x_get_colorbase( running_device *device ) ATTR_NONNULL(1); int ppu2c0x_get_current_scanline( running_device *device ) ATTR_NONNULL(1); +int ppu2c0x_is_sprite_8x16( running_device *device ) ATTR_NONNULL(1); void ppu2c0x_set_scanline_callback( running_device *device, ppu2c0x_scanline_cb cb ) ATTR_NONNULL(1); void ppu2c0x_set_hblank_callback( running_device *device, ppu2c0x_scanline_cb cb ) ATTR_NONNULL(1); void ppu2c0x_set_vidaccess_callback( running_device *device, ppu2c0x_vidaccess_cb cb ) ATTR_NONNULL(1);