diff options
35 files changed, 2685 insertions, 2046 deletions
diff --git a/.gitattributes b/.gitattributes index 82f1824aa09..11c586a7101 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1533,6 +1533,8 @@ src/emu/sound/zsg2.c svneol=native#text/plain src/emu/sound/zsg2.h svneol=native#text/plain src/emu/speaker.c svneol=native#text/plain src/emu/speaker.h svneol=native#text/plain +src/emu/sprite.c svneol=native#text/plain +src/emu/sprite.h svneol=native#text/plain src/emu/tilemap.c svneol=native#text/plain src/emu/tilemap.h svneol=native#text/plain src/emu/timer.c svneol=native#text/plain @@ -5224,6 +5226,7 @@ src/mame/video/scn2674.h svneol=native#text/plain src/mame/video/scotrsht.c svneol=native#text/plain src/mame/video/sderby.c svneol=native#text/plain src/mame/video/sega16sp.c svneol=native#text/plain +src/mame/video/sega16sp.h svneol=native#text/plain src/mame/video/segag80r.c svneol=native#text/plain src/mame/video/segag80v.c svneol=native#text/plain src/mame/video/segahang.c svneol=native#text/plain diff --git a/src/emu/emu.mak b/src/emu/emu.mak index 1ce507cd309..87af2b45e70 100644 --- a/src/emu/emu.mak +++ b/src/emu/emu.mak @@ -99,6 +99,7 @@ EMUOBJS = \ $(EMUOBJ)/softlist.o \ $(EMUOBJ)/sound.o \ $(EMUOBJ)/speaker.o \ + $(EMUOBJ)/sprite.o \ $(EMUOBJ)/tilemap.o \ $(EMUOBJ)/timer.o \ $(EMUOBJ)/ui.o \ diff --git a/src/emu/sprite.c b/src/emu/sprite.c new file mode 100644 index 00000000000..e7cda794096 --- /dev/null +++ b/src/emu/sprite.c @@ -0,0 +1,186 @@ +/*************************************************************************** + + General sprite handling helpers + +**************************************************************************** + + Copyright Aaron Giles + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + * Neither the name 'MAME' nor the names of its contributors may be + used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND ANY EXPRESS OR + IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +***************************************************************************/ + +#include "emu.h" +#include "sprite.h" + + +//------------------------------------------------- +// sparse_dirty_bitmap -- constructor +//------------------------------------------------- + +sparse_dirty_bitmap::sparse_dirty_bitmap(int granularity) + : m_width(0), + m_height(0), + m_granularity(granularity), + m_rect_list_bounds(0, -1, 0, -1) +{ +} + +sparse_dirty_bitmap::sparse_dirty_bitmap(int width, int height, int granularity) + : m_width(0), + m_height(0), + m_granularity(granularity), + m_rect_list_bounds(0, -1, 0, -1) +{ + // resize to the specified width/height + resize(width, height); +} + + +//------------------------------------------------- +// dirty -- dirty a region +//------------------------------------------------- + +void sparse_dirty_bitmap::dirty(INT32 left, INT32 right, INT32 top, INT32 bottom) +{ + // compute a rectangle in dirty space, and fill it with 1 + rectangle rect(left >> m_granularity, right >> m_granularity, top >> m_granularity, bottom >> m_granularity); + m_bitmap.fill(1, rect); + + // invalidate existing rect list + invalidate_rect_list(); +} + + +//------------------------------------------------- +// clean a region -- dirty a region +//------------------------------------------------- + +void sparse_dirty_bitmap::clean(INT32 left, INT32 right, INT32 top, INT32 bottom) +{ + // if right or bottom intersect the edge of the bitmap, round up + int round = (1 << m_granularity) - 1; + if (right >= m_width - 1) + right = m_width + round; + if (bottom >= m_height - 1) + bottom = m_height + round; + + // compute a rectangle in dirty space, and fill it with 0 + rectangle rect((left + round) >> m_granularity, (right - round) >> m_granularity, (top + round) >> m_granularity, (bottom - round) >> m_granularity); + m_bitmap.fill(0, rect); + + // invalidate existing rect list + invalidate_rect_list(); +} + + +//------------------------------------------------- +// resize -- resize the bitmap +//------------------------------------------------- + +void sparse_dirty_bitmap::resize(int width, int height) +{ + // set new size + m_width = width; + m_height = height; + + // resize the bitmap + int round = (1 << m_granularity) - 1; + m_bitmap.resize((width + round) >> m_granularity, (height + round) >> m_granularity); + + // reset everything + dirty_all(); +} + + +//------------------------------------------------- +// first_dirty_rect -- return the first dirty +// rectangle in the list +//------------------------------------------------- + +sparse_dirty_rect *sparse_dirty_bitmap::first_dirty_rect(const rectangle &cliprect) +{ + // if what we have is valid, just return it again + if (m_rect_list_bounds == cliprect) + return m_rect_list.first(); + + // reclaim the dirty list and start over + m_rect_allocator.reclaim_all(m_rect_list); + + // compute dirty space rectangle coordinates + int sx = cliprect.min_x >> m_granularity; + int ex = cliprect.max_x >> m_granularity; + int sy = cliprect.min_y >> m_granularity; + int ey = cliprect.max_y >> m_granularity; + int tilesize = 1 << m_granularity; + + // loop over all grid rows that intersect our cliprect + for (int y = sy; y <= ey; y++) + { + UINT8 *dirtybase = &m_bitmap.pix(y); + sparse_dirty_rect *currect = NULL; + + // loop over all grid columns that intersect our cliprect + for (int x = sx; x <= ex; x++) + { + // if this tile is not dirty, end our current run and continue + if (!*dirtybase++) + { + if (currect != NULL) + *currect &= cliprect; + currect = NULL; + continue; + } + + // if we can't add to an existing rect, create a new one + if (currect == NULL) + { + // allocate a new rect and add it to the list + currect = &m_rect_list.append(*m_rect_allocator.alloc()); + + // make a rect describing this grid square + currect->min_x = x << m_granularity; + currect->max_x = currect->min_x + tilesize - 1; + currect->min_y = y << m_granularity; + currect->max_y = currect->min_y + tilesize - 1; + } + + // if we can add to the previous rect, just expand its width + else + currect->max_x += tilesize; + } + + // clip the last rect to the cliprect + if (currect != NULL) + *currect &= cliprect; + } + + // mark the list as valid + m_rect_list_bounds = cliprect; + return m_rect_list.first(); +} diff --git a/src/emu/sprite.h b/src/emu/sprite.h new file mode 100644 index 00000000000..496fff8779a --- /dev/null +++ b/src/emu/sprite.h @@ -0,0 +1,244 @@ +/*************************************************************************** + + General sprite handling helpers + +**************************************************************************** + + Copyright Aaron Giles + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + * Neither the name 'MAME' nor the names of its contributors may be + used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND ANY EXPRESS OR + IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +***************************************************************************/ + +#pragma once + +#ifndef __EMU_H__ +#error Dont include this file directly; include emu.h instead. +#endif + +#ifndef __SPRITE_H__ +#define __SPRITE_H__ + + +// ======================> sparse_dirty_rect + +// class representing a single dirty region +class sparse_dirty_rect : public rectangle +{ + friend class simple_list<sparse_dirty_rect>; + +public: + // getters + const sparse_dirty_rect *next() const { return m_next; } + +private: + // internal state + sparse_dirty_rect * m_next; +}; + + +// ======================> sparse_dirty_bitmap + +class sparse_dirty_bitmap +{ +public: + // construction/destruction + sparse_dirty_bitmap(int granularity = 3); + sparse_dirty_bitmap(int width, int height, int granularity = 3); + + // dirtying operations - partially interecting tiles are dirtied + void dirty(const rectangle &rect) { dirty(rect.left(), rect.right(), rect.top(), rect.bottom()); } + void dirty(INT32 left, INT32 right, INT32 top, INT32 bottom); + void dirty_all() { dirty(0, m_width - 1, 0, m_height - 1); } + + // cleaning operations - partially intersecting tiles are NOT cleaned + void clean(const rectangle &rect) { clean(rect.left(), rect.right(), rect.top(), rect.bottom()); } + void clean(INT32 left, INT32 right, INT32 top, INT32 bottom); + void clean_all() { clean(0, m_width - 1, 0, m_height - 1); } + + // convert to rect list + sparse_dirty_rect *first_dirty_rect() { rectangle fullrect(0, m_width - 1, 0, m_height - 1); return first_dirty_rect(fullrect); } + sparse_dirty_rect *first_dirty_rect(const rectangle &cliprect); + + // dynamic resizing + void resize(int width, int height); + +private: + // invalidate cached rect list + void invalidate_rect_list() { m_rect_list_bounds.set(0, -1, 0, -1); } + + // internal state + int m_width; + int m_height; + int m_granularity; + bitmap_ind8 m_bitmap; + rectangle m_rect_list_bounds; + fixed_allocator<sparse_dirty_rect> m_rect_allocator; + simple_list<sparse_dirty_rect> m_rect_list; +}; + + +// ======================> sprite_device + +template<typename _SpriteRAMType, class _BitmapType> +class sprite_device : public device_t +{ + // constants + static const int BITMAP_SLOP = 16; + +protected: + // construction/destruction - only for subclasses + sprite_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, int dirty_granularity = 3) + : device_t(mconfig, type, name, tag, owner, 0), + m_xorigin(0), + m_yorigin(0), + m_spriteram(NULL), + m_spriteram_bytes(0), + m_dirty(dirty_granularity) + { + force_clear(); + } + +public: + // getters + INT32 xorigin() const { return m_xorigin; } + INT32 yorigin() const { return m_yorigin; } + _BitmapType &bitmap() { return m_bitmap; } + sparse_dirty_rect *first_dirty_rect() { return m_dirty.first_dirty_rect(); } + sparse_dirty_rect *first_dirty_rect(const rectangle &cliprect) { return m_dirty.first_dirty_rect(cliprect); } + _SpriteRAMType *spriteram() const { return m_spriteram; } + UINT32 spriteram_bytes() const { return m_spriteram_bytes; } + UINT32 spriteram_elements() const { return m_spriteram_bytes / sizeof(_SpriteRAMType); } + _SpriteRAMType *buffer() { return &m_buffer[0]; } + + // static configuration + static void static_set_xorigin(device_t &device, int origin) { downcast<sprite_device &>(device).m_xorigin = origin; } + static void static_set_yorigin(device_t &device, int origin) { downcast<sprite_device &>(device).m_yorigin = origin; } + static void static_set_origin(device_t &device, int xorigin, int yorigin) { static_set_xorigin(device, xorigin); static_set_yorigin(device, yorigin); } + + // configuration + void set_origin(INT32 xorigin = 0, INT32 yorigin = 0) { m_xorigin = xorigin; m_yorigin = yorigin; } + + // buffering + void copy_to_buffer() { memcpy(m_buffer, m_spriteram, m_spriteram_bytes); } + + // clearing + void clear() { clear(m_bitmap.cliprect()); } + void clear(const rectangle &cliprect) + { + for (const sparse_dirty_rect *rect = m_dirty.first_dirty_rect(cliprect); rect != NULL; rect = rect->next()) + m_bitmap.fill(~0, *rect); + m_dirty.clean(cliprect); + } + + // force clear (don't use dirty rects) + void force_clear() + { + m_bitmap.fill(~0); + m_dirty.clean_all(); + } + + // drawing + void draw_async(const rectangle &cliprect, bool clearit = true) + { + // if the cliprect exceeds our current bitmap dimensions, expand + if (cliprect.right() >= m_bitmap.width() || cliprect.bottom() >= m_bitmap.height()) + { + int new_width = MAX(cliprect.right() + 1, m_bitmap.width()); + int new_height = MAX(cliprect.bottom() + 1, m_bitmap.height()); + m_bitmap.resize(new_width, new_height, BITMAP_SLOP, BITMAP_SLOP); + m_dirty.resize(new_width, new_height); + } + + // clear out the region + if (clearit) + clear(cliprect); + + // wrap the bitmap, adjusting for x/y origins + _BitmapType wrapped(&m_bitmap.pix(0) - m_xorigin - m_yorigin * m_bitmap.rowpixels(), m_xorigin + cliprect.right() + 1, m_yorigin + cliprect.bottom() + 1, m_bitmap.rowpixels()); + + // compute adjusted cliprect in source space + rectangle adjusted = cliprect; + adjusted.offset(m_xorigin, m_yorigin); + + // render + draw(wrapped, adjusted); + } + +protected: + // device-level overrides + virtual void device_start() + { + // find spriteram + memory_share *spriteram = owner()->memshare(tag()); + if (spriteram == NULL) + throw emu_fatalerror("Unable to find shared spriteram with tag '%s'\n", tag()); + + // set up pointers + m_spriteram = reinterpret_cast<_SpriteRAMType *>(spriteram->ptr()); + m_spriteram_bytes = spriteram->bytes(); + + // allocate the double buffer to match the RAM size + m_buffer.resize(m_spriteram_bytes / sizeof(_SpriteRAMType)); + + // save states + save_item(NAME(m_buffer)); + } + + // subclass overrides + virtual void draw(_BitmapType &bitmap, const rectangle &cliprect) = 0; + + // subclass helpers + void mark_dirty(const rectangle &rect) { mark_dirty(rect.left(), rect.right(), rect.top(), rect.bottom()); } + void mark_dirty(INT32 left, INT32 right, INT32 top, INT32 bottom) { m_dirty.dirty(left - m_xorigin, right - m_xorigin, top - m_yorigin, bottom - m_yorigin); } + +private: + // configuration + INT32 m_xorigin; // X origin for drawing + INT32 m_yorigin; // Y origin for drawing + + // memory pointers and buffers + _SpriteRAMType * m_spriteram; // pointer to spriteram pointer + INT32 m_spriteram_bytes; // size of sprite RAM in bytes + dynamic_array<_SpriteRAMType> m_buffer; // buffered spriteram for those that use it + + // bitmaps + _BitmapType m_bitmap; // live bitmap + sparse_dirty_bitmap m_dirty; // dirty bitmap +}; + +typedef sprite_device<UINT8, bitmap_ind16> sprite8_device_ind16; +typedef sprite_device<UINT16, bitmap_ind16> sprite16_device_ind16; +typedef sprite_device<UINT32, bitmap_ind16> sprite32_device_ind16; + +typedef sprite_device<UINT8, bitmap_ind32> sprite8_device_ind32; +typedef sprite_device<UINT16, bitmap_ind32> sprite16_device_ind32; +typedef sprite_device<UINT32, bitmap_ind32> sprite32_device_ind32; + + +#endif // __SPRITE_H__ diff --git a/src/lib/util/bitmap.h b/src/lib/util/bitmap.h index cbbc9191b4e..ee2cc33f3d9 100644 --- a/src/lib/util/bitmap.h +++ b/src/lib/util/bitmap.h @@ -76,6 +76,12 @@ public: rectangle() { } rectangle(INT32 minx, INT32 maxx, INT32 miny, INT32 maxy) : min_x(minx), max_x(maxx), min_y(miny), max_y(maxy) { } + + // getters + INT32 left() const { return min_x; } + INT32 right() const { return max_x; } + INT32 top() const { return min_y; } + INT32 bottom() const { return max_y; } // compute intersection with another rect rectangle &operator&=(const rectangle &src) @@ -96,6 +102,14 @@ public: if (src.max_y > max_y) max_y = src.max_y; return *this; } + + // comparisons + bool operator==(const rectangle &rhs) const { return min_x == rhs.min_x && max_x == rhs.max_x && min_y == rhs.min_y && max_y == rhs.max_y; } + bool operator!=(const rectangle &rhs) const { return min_x != rhs.min_x || max_x != rhs.max_x || min_y != rhs.min_y || max_y != rhs.max_y; } + bool operator>(const rectangle &rhs) const { return min_x < rhs.min_x && min_y < rhs.min_y && max_x > rhs.max_x && max_y > rhs.max_y; } + bool operator>=(const rectangle &rhs) const { return min_x <= rhs.min_x && min_y <= rhs.min_y && max_x >= rhs.max_x && max_y >= rhs.max_y; } + bool operator<(const rectangle &rhs) const { return min_x >= rhs.min_x || min_y >= rhs.min_y || max_x <= rhs.max_x || max_y <= rhs.max_y; } + bool operator<=(const rectangle &rhs) const { return min_x > rhs.min_x || min_y > rhs.min_y || max_x < rhs.max_x || max_y < rhs.max_y; } // other helpers bool empty() const { return (min_x > max_x || min_y > max_y); } @@ -114,6 +128,11 @@ public: void set_height(INT32 height) { max_y = min_y + height - 1; } void set_origin(INT32 x, INT32 y) { max_x += x - min_x; max_y += y - min_y; min_x = x; min_y = y; } void set_size(INT32 width, INT32 height) { set_width(width); set_height(height); } + + // offset helpers + void offset(INT32 xdelta, INT32 ydelta) { min_x += xdelta; max_x += xdelta; min_y += ydelta; max_y += ydelta; } + void offsetx(INT32 delta) { min_x += delta; max_x += delta; } + void offsety(INT32 delta) { min_y += delta; max_y += delta; } // internal state INT32 min_x; // minimum X, or left coordinate diff --git a/src/mame/drivers/segahang.c b/src/mame/drivers/segahang.c index ffc7caaf2b0..b8f55b359b5 100644 --- a/src/mame/drivers/segahang.c +++ b/src/mame/drivers/segahang.c @@ -119,10 +119,10 @@ WRITE8_MEMBER( segahang_state::video_lamps_w ) // bit 7: screen flip segaic16_tilemap_set_flip(machine(), 0, data & 0x80); - segaic16_sprites_set_flip(machine(), 0, data & 0x80); + m_sprites->set_flip(data & 0x80); // bit 6: shadow/highlight control - segaic16_sprites_set_shadow(machine(), 0, ~data & 0x40); + m_shadow = ~data & 0x40; // bit 4: enable display segaic16_set_display_enable(machine(), data & 0x10); @@ -244,7 +244,7 @@ READ16_MEMBER( segahang_state::hangon_io_r ) } logerror("%06X:hangon_io_r - unknown read access to address %04X\n", m_maincpu->pc(), offset * 2); - return segaic16_open_bus_r(&space, 0, mem_mask); + return open_bus_r(space, 0, mem_mask); } @@ -305,7 +305,7 @@ READ16_MEMBER( segahang_state::sharrier_io_r ) } logerror("%06X:sharrier_io_r - unknown read access to address %04X\n", m_maincpu->pc(), offset * 2); - return segaic16_open_bus_r(&space, 0, mem_mask); + return open_bus_r(space, 0, mem_mask); } @@ -474,8 +474,8 @@ static ADDRESS_MAP_START( hangon_map, AS_PROGRAM, 16, segahang_state ) AM_RANGE(0x20c000, 0x20ffff) AM_RAM AM_SHARE("workram") AM_RANGE(0x400000, 0x403fff) AM_RAM_WRITE_LEGACY(segaic16_tileram_0_w) AM_SHARE("tileram") AM_RANGE(0x410000, 0x410fff) AM_RAM_WRITE_LEGACY(segaic16_textram_0_w) AM_SHARE("textram") - AM_RANGE(0x600000, 0x6007ff) AM_RAM AM_SHARE("spriteram") - AM_RANGE(0xa00000, 0xa00fff) AM_RAM_WRITE_LEGACY(segaic16_paletteram_w) AM_SHARE("paletteram") + AM_RANGE(0x600000, 0x6007ff) AM_RAM AM_SHARE("sprites") + AM_RANGE(0xa00000, 0xa00fff) AM_RAM_WRITE(paletteram_w) AM_SHARE("paletteram") AM_RANGE(0xc00000, 0xc3ffff) AM_ROM AM_REGION("subcpu", 0) AM_RANGE(0xc68000, 0xc68fff) AM_RAM AM_SHARE("roadram") AM_RANGE(0xc7c000, 0xc7ffff) AM_RAM AM_SHARE("subram") @@ -488,9 +488,9 @@ static ADDRESS_MAP_START( sharrier_map, AS_PROGRAM, 16, segahang_state ) AM_RANGE(0x040000, 0x043fff) AM_RAM AM_SHARE("workram") AM_RANGE(0x100000, 0x107fff) AM_RAM_WRITE_LEGACY(segaic16_tileram_0_w) AM_SHARE("tileram") AM_RANGE(0x108000, 0x108fff) AM_RAM_WRITE_LEGACY(segaic16_textram_0_w) AM_SHARE("textram") - AM_RANGE(0x110000, 0x110fff) AM_RAM_WRITE_LEGACY(segaic16_paletteram_w) AM_SHARE("paletteram") + AM_RANGE(0x110000, 0x110fff) AM_RAM_WRITE(paletteram_w) AM_SHARE("paletteram") AM_RANGE(0x124000, 0x127fff) AM_RAM AM_SHARE("subram") - AM_RANGE(0x130000, 0x130fff) AM_RAM AM_SHARE("spriteram") + AM_RANGE(0x130000, 0x130fff) AM_RAM AM_SHARE("sprites") AM_RANGE(0x140000, 0x14ffff) AM_READWRITE(sharrier_io_r, sharrier_io_w) AM_RANGE(0xc68000, 0xc68fff) AM_RAM AM_SHARE("roadram") ADDRESS_MAP_END @@ -855,7 +855,7 @@ MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( hangon_base, shared_base ) // video hardware - MCFG_SEGA16SP_ADD_HANGON("segaspr1") + MCFG_SEGA_HANGON_SPRITES_ADD("sprites") MACHINE_CONFIG_END @@ -870,7 +870,7 @@ static MACHINE_CONFIG_DERIVED( sharrier_base, shared_base ) MCFG_CPU_CLOCK(MASTER_CLOCK_10MHz) // video hardware - MCFG_SEGA16SP_ADD_SHARRIER("segaspr1") + MCFG_SEGA_SHARRIER_SPRITES_ADD("sprites") MACHINE_CONFIG_END @@ -1063,7 +1063,7 @@ ROM_START( hangon ) ROM_LOAD( "epr-6842.ic23", 0x08000, 0x08000, CRC(f677b568) SHA1(636ca60bd4be9b5c2be09de8ae49db1063aa6c79) ) ROM_LOAD( "epr-6843.ic7", 0x10000, 0x08000, CRC(a257f0da) SHA1(9828f8ce4ef245ffb8dbad347f9ca74ed81aa998) ) - ROM_REGION16_BE( 0x80000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x80000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "epr-6819.ic27", 0x000001, 0x8000, CRC(469dad07) SHA1(6d01c0b3506e28832928ad74d518577ff5be323b) ) ROM_LOAD16_BYTE( "epr-6820.ic34", 0x000000, 0x8000, CRC(87cbc6de) SHA1(b64652e062e1b88c6f6ae8dd2ffe4533bb27ba45) ) ROM_LOAD16_BYTE( "epr-6821.ic28", 0x010001, 0x8000, CRC(15792969) SHA1(b061dbf24e8b511116446794753c8b0cc49e2149) ) @@ -1089,7 +1089,7 @@ ROM_START( hangon ) ROM_LOAD( "epr-6831.ic5", 0x00000, 0x8000, CRC(cfef5481) SHA1(c04b302fee58f0e59a097b2be2b61e5d03df7c91) ) ROM_LOAD( "epr-6832.ic6", 0x08000, 0x8000, CRC(4165aea5) SHA1(be05c6d295807af2f396a1ff72d5a3d2a1e6054d) ) - ROM_REGION( 0x2000, "proms", 0 ) // zoom table + ROM_REGION( 0x2000, "sprites:zoom", 0 ) // zoom table ROM_LOAD( "epr-6844.ic123", 0x0000, 0x2000, CRC(e3ec7bd6) SHA1(feec0fe664e16fac0fde61cf64b401b9b0575323) ) ROM_END @@ -1118,7 +1118,7 @@ ROM_START( hangon1 ) ROM_LOAD( "epr-6842.ic23", 0x08000, 0x08000, CRC(f677b568) SHA1(636ca60bd4be9b5c2be09de8ae49db1063aa6c79) ) ROM_LOAD( "epr-6843.ic7", 0x10000, 0x08000, CRC(a257f0da) SHA1(9828f8ce4ef245ffb8dbad347f9ca74ed81aa998) ) - ROM_REGION16_BE( 0x80000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x80000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "epr-6819.ic27", 0x000001, 0x8000, CRC(469dad07) SHA1(6d01c0b3506e28832928ad74d518577ff5be323b) ) ROM_LOAD16_BYTE( "epr-6820.ic34", 0x000000, 0x8000, CRC(87cbc6de) SHA1(b64652e062e1b88c6f6ae8dd2ffe4533bb27ba45) ) ROM_LOAD16_BYTE( "epr-6821.ic28", 0x010001, 0x8000, CRC(15792969) SHA1(b061dbf24e8b511116446794753c8b0cc49e2149) ) @@ -1144,7 +1144,7 @@ ROM_START( hangon1 ) ROM_LOAD( "epr-6831.ic5", 0x00000, 0x8000, CRC(cfef5481) SHA1(c04b302fee58f0e59a097b2be2b61e5d03df7c91) ) ROM_LOAD( "epr-6832.ic6", 0x08000, 0x8000, CRC(4165aea5) SHA1(be05c6d295807af2f396a1ff72d5a3d2a1e6054d) ) - ROM_REGION( 0x2000, "proms", 0 ) // zoom table + ROM_REGION( 0x2000, "sprites:zoom", 0 ) // zoom table ROM_LOAD( "epr-6844.ic123", 0x0000, 0x2000, CRC(e3ec7bd6) SHA1(feec0fe664e16fac0fde61cf64b401b9b0575323) ) ROM_END @@ -1185,7 +1185,7 @@ ROM_START( shangonro ) ROM_LOAD( "epr-10651.23", 0x08000, 0x08000, CRC(c609ee7b) SHA1(c6dacf81cbfe7e5df1f9a967cf571be1dcf1c429) ) ROM_LOAD( "epr-10650.7", 0x10000, 0x08000, CRC(b236a403) SHA1(af02b8122794c083a66f2ab35d2c73b84b2df0be) ) - ROM_REGION16_BE( 0x00e0000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x00e0000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "epr-10675.22", 0x000001, 0x010000, CRC(d6ac012b) SHA1(305023b1a0a9d84cfc081ffc2ad7578b53d562f2) ) ROM_LOAD16_BYTE( "epr-10682.11", 0x000000, 0x010000, CRC(d9d83250) SHA1(f8ca3197edcdf53643a5b335c3c044ddc1310cd4) ) ROM_LOAD16_BYTE( "epr-10676.21", 0x020001, 0x010000, CRC(25ebf2c5) SHA1(abcf673ae4e280417dd9f46d18c0ec7c0e4802ae) ) @@ -1211,7 +1211,7 @@ ROM_START( shangonro ) ROM_LOAD( "epr-10835.55", 0x00000, 0x10000, CRC(da08ca2b) SHA1(2c94c127efd66f6cf86b25e2653637818a99aed1) ) ROM_LOAD( "epr-10836.56", 0x10000, 0x10000, CRC(8b10e601) SHA1(75e9bcdd3f096be9bed672d61064b9240690deec) ) - ROM_REGION( 0x2000, "proms", 0 ) // zoom table + ROM_REGION( 0x2000, "sprites:zoom", 0 ) // zoom table ROM_LOAD( "epr-6844.119", 0x0000, 0x2000, CRC(e3ec7bd6) SHA1(feec0fe664e16fac0fde61cf64b401b9b0575323) ) ROM_END @@ -1237,7 +1237,7 @@ ROM_START( shangonrb ) ROM_LOAD( "epr-10651.23", 0x08000, 0x08000, CRC(c609ee7b) SHA1(c6dacf81cbfe7e5df1f9a967cf571be1dcf1c429) ) ROM_LOAD( "epr-10650.7", 0x10000, 0x08000, CRC(b236a403) SHA1(af02b8122794c083a66f2ab35d2c73b84b2df0be) ) - ROM_REGION16_BE( 0x00e0000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x00e0000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "epr-10675.22", 0x000001, 0x010000, CRC(d6ac012b) SHA1(305023b1a0a9d84cfc081ffc2ad7578b53d562f2) ) ROM_LOAD16_BYTE( "epr-10682.11", 0x000000, 0x010000, CRC(d9d83250) SHA1(f8ca3197edcdf53643a5b335c3c044ddc1310cd4) ) ROM_LOAD16_BYTE( "s-hangon.20", 0x020001, 0x010000, CRC(eef23b3d) SHA1(2416fa9991afbdddf25d469082e53858289550db) ) @@ -1263,7 +1263,7 @@ ROM_START( shangonrb ) ROM_LOAD( "epr-10835.55", 0x00000, 0x10000, CRC(da08ca2b) SHA1(2c94c127efd66f6cf86b25e2653637818a99aed1) ) ROM_LOAD( "epr-10836.56", 0x10000, 0x10000, CRC(8b10e601) SHA1(75e9bcdd3f096be9bed672d61064b9240690deec) ) - ROM_REGION( 0x2000, "proms", 0 ) // zoom table + ROM_REGION( 0x2000, "sprites:zoom", 0 ) // zoom table ROM_LOAD( "epr-6844.119", 0x0000, 0x2000, CRC(e3ec7bd6) SHA1(feec0fe664e16fac0fde61cf64b401b9b0575323) ) ROM_END @@ -1299,7 +1299,7 @@ ROM_START( sharrier ) ROM_LOAD( "epr-7197.ic46", 0x08000, 0x08000, CRC(39d98bd1) SHA1(5aab91bdd08b0f1ea537cd43ccc2e82fd01dd031) ) ROM_LOAD( "epr-7198.ic60", 0x10000, 0x08000, CRC(3da3ea6b) SHA1(9a6ce304a14e6ef0be41d867284a63b941f960fb) ) - ROM_REGION32_LE( 0x100000, "gfx2", 0 ) // sprites + ROM_REGION32_LE( 0x100000, "sprites", 0 ) // sprites ROM_LOAD32_BYTE( "epr-7230.ic36", 0x00000, 0x8000, CRC(93e2d264) SHA1(ca56de13756ab77408506d88f291da1da8134435) ) ROM_LOAD32_BYTE( "epr-7222.ic28", 0x00001, 0x8000, CRC(edbf5fc3) SHA1(a93f8c431075741c181eb422b24c9303487ca16c) ) ROM_LOAD32_BYTE( "epr-7214.ic18", 0x00002, 0x8000, CRC(e8c537d8) SHA1(c9b3c0f33272c47d32e6aa349d72f7e355468e0e) ) @@ -1347,7 +1347,7 @@ ROM_START( sharrier ) ROM_REGION( 0x10000, "mcu", 0 ) // Internal i8751 MCU code ROM_LOAD( "315-5163a.ic32", 0x00000, 0x1000, NO_DUMP ) - ROM_REGION( 0x2000, "proms", 0 ) // zoom table + ROM_REGION( 0x2000, "sprites:zoom", 0 ) // zoom table ROM_LOAD( "epr-6844.ic123", 0x0000, 0x2000, CRC(e3ec7bd6) SHA1(feec0fe664e16fac0fde61cf64b401b9b0575323) ) ROM_END @@ -1380,7 +1380,7 @@ ROM_START( sharrier1 ) ROM_LOAD( "epr-7197.ic46", 0x08000, 0x08000, CRC(39d98bd1) SHA1(5aab91bdd08b0f1ea537cd43ccc2e82fd01dd031) ) ROM_LOAD( "epr-7198.ic60", 0x10000, 0x08000, CRC(3da3ea6b) SHA1(9a6ce304a14e6ef0be41d867284a63b941f960fb) ) - ROM_REGION32_LE( 0x100000, "gfx2", 0 ) // sprites + ROM_REGION32_LE( 0x100000, "sprites", 0 ) // sprites ROM_LOAD32_BYTE( "epr-7230.ic36", 0x00000, 0x8000, CRC(93e2d264) SHA1(ca56de13756ab77408506d88f291da1da8134435) ) ROM_LOAD32_BYTE( "epr-7222.ic28", 0x00001, 0x8000, CRC(edbf5fc3) SHA1(a93f8c431075741c181eb422b24c9303487ca16c) ) ROM_LOAD32_BYTE( "epr-7214.ic18", 0x00002, 0x8000, CRC(e8c537d8) SHA1(c9b3c0f33272c47d32e6aa349d72f7e355468e0e) ) @@ -1428,7 +1428,7 @@ ROM_START( sharrier1 ) ROM_REGION( 0x10000, "mcu", 0 ) // Internal i8751 MCU code ROM_LOAD( "315-5163.ic32", 0x00000, 0x1000, NO_DUMP ) - ROM_REGION( 0x2000, "proms", 0 ) // zoom table + ROM_REGION( 0x2000, "sprites:zoom", 0 ) // zoom table ROM_LOAD( "epr-6844.ic123", 0x0000, 0x2000, CRC(e3ec7bd6) SHA1(feec0fe664e16fac0fde61cf64b401b9b0575323) ) ROM_END @@ -1463,7 +1463,7 @@ ROM_START( enduror ) ROM_LOAD( "epr-7645.ic46", 0x08000, 0x08000, CRC(4caa0095) SHA1(a24c741cdca0542e462f17ff94f132c62710e198) ) ROM_LOAD( "epr-7646.ic60", 0x10000, 0x08000, CRC(7e432683) SHA1(c8249b23fce77eb456166161c2d9aa34309efe31) ) - ROM_REGION32_LE( 0x100000, "gfx2", 0 ) // sprites + ROM_REGION32_LE( 0x100000, "sprites", 0 ) // sprites ROM_LOAD32_BYTE( "epr-7678.ic36", 0x00000, 0x8000, CRC(9fb5e656) SHA1(264b0ad017eb0fc7e0b542e6dd160ba964c100fd) ) ROM_LOAD32_BYTE( "epr-7670.ic28", 0x00001, 0x8000, CRC(dbbe2f6e) SHA1(310797a61f91d6866e728e0da3b30828e06d1b52) ) ROM_LOAD32_BYTE( "epr-7662.ic18", 0x00002, 0x8000, CRC(cb0c13c5) SHA1(856d1234fd8f8146e20fe6c65c0a535b7b7512cd) ) @@ -1507,7 +1507,7 @@ ROM_START( enduror ) ROM_LOAD( "epr-7681.rom", 0x00000, 0x8000, CRC(bc0c4d12) SHA1(3de71bde4c23e3c31984f20fc4bc7e221354c56f) ) ROM_LOAD( "epr-7680.rom", 0x10000, 0x8000, CRC(627b3c8c) SHA1(806fe7dce619ad19c09178061be4607d2beba14d) ) - ROM_REGION( 0x2000, "proms", 0 ) // zoom table + ROM_REGION( 0x2000, "sprites:zoom", 0 ) // zoom table ROM_LOAD( "epr-6844.ic123", 0x0000, 0x2000, CRC(e3ec7bd6) SHA1(feec0fe664e16fac0fde61cf64b401b9b0575323) ) ROM_REGION( 0x2000, "maincpu:key", 0 ) // decryption key @@ -1542,7 +1542,7 @@ ROM_START( enduror1 ) ROM_LOAD( "epr-7645.ic46", 0x08000, 0x08000, CRC(4caa0095) SHA1(a24c741cdca0542e462f17ff94f132c62710e198) ) ROM_LOAD( "epr-7646.ic60", 0x10000, 0x08000, CRC(7e432683) SHA1(c8249b23fce77eb456166161c2d9aa34309efe31) ) - ROM_REGION32_LE( 0x100000, "gfx2", 0 ) // sprites + ROM_REGION32_LE( 0x100000, "sprites", 0 ) // sprites ROM_LOAD32_BYTE( "epr-7678.ic36", 0x00000, 0x8000, CRC(9fb5e656) SHA1(264b0ad017eb0fc7e0b542e6dd160ba964c100fd) ) ROM_LOAD32_BYTE( "epr-7670.ic28", 0x00001, 0x8000, CRC(dbbe2f6e) SHA1(310797a61f91d6866e728e0da3b30828e06d1b52) ) ROM_LOAD32_BYTE( "epr-7662.ic18", 0x00002, 0x8000, CRC(cb0c13c5) SHA1(856d1234fd8f8146e20fe6c65c0a535b7b7512cd) ) @@ -1587,7 +1587,7 @@ ROM_START( enduror1 ) ROM_LOAD( "epr-7762.ic5", 0x00000, 0x8000, CRC(bc0c4d12) SHA1(3de71bde4c23e3c31984f20fc4bc7e221354c56f) ) ROM_LOAD( "epr-7763.ic6", 0x08000, 0x8000, CRC(627b3c8c) SHA1(806fe7dce619ad19c09178061be4607d2beba14d) ) - ROM_REGION( 0x2000, "proms", 0 ) // zoom table + ROM_REGION( 0x2000, "sprites:zoom", 0 ) // zoom table ROM_LOAD( "epr-6844.ic123", 0x0000, 0x2000, CRC(e3ec7bd6) SHA1(feec0fe664e16fac0fde61cf64b401b9b0575323) ) ROM_REGION( 0x2000, "maincpu:key", 0 ) // decryption key @@ -1619,7 +1619,7 @@ ROM_START( endurobl ) ROM_LOAD( "epr-7645.ic46", 0x08000, 0x08000, CRC(4caa0095) SHA1(a24c741cdca0542e462f17ff94f132c62710e198) ) ROM_LOAD( "epr-7646.ic60", 0x10000, 0x08000, CRC(7e432683) SHA1(c8249b23fce77eb456166161c2d9aa34309efe31) ) - ROM_REGION32_LE( 0x100000, "gfx2", 0 ) // sprites + ROM_REGION32_LE( 0x100000, "sprites", 0 ) // sprites ROM_LOAD32_BYTE( "epr-7678.ic36", 0x00000, 0x8000, CRC(9fb5e656) SHA1(264b0ad017eb0fc7e0b542e6dd160ba964c100fd) ) ROM_LOAD32_BYTE( "epr-7670.ic28", 0x00001, 0x8000, CRC(dbbe2f6e) SHA1(310797a61f91d6866e728e0da3b30828e06d1b52) ) ROM_LOAD32_BYTE( "epr-7662.ic18", 0x00002, 0x8000, CRC(cb0c13c5) SHA1(856d1234fd8f8146e20fe6c65c0a535b7b7512cd) ) @@ -1664,7 +1664,7 @@ ROM_START( endurobl ) ROM_LOAD( "epr-7762.ic5", 0x00000, 0x8000, CRC(bc0c4d12) SHA1(3de71bde4c23e3c31984f20fc4bc7e221354c56f) ) ROM_LOAD( "epr-7763.ic6", 0x10000, 0x8000, CRC(627b3c8c) SHA1(806fe7dce619ad19c09178061be4607d2beba14d) ) - ROM_REGION( 0x2000, "proms", 0 ) // zoom table + ROM_REGION( 0x2000, "sprites:zoom", 0 ) // zoom table ROM_LOAD( "epr-6844.ic123", 0x0000, 0x2000, CRC(e3ec7bd6) SHA1(feec0fe664e16fac0fde61cf64b401b9b0575323) ) ROM_END @@ -1694,7 +1694,7 @@ ROM_START( endurob2 ) ROM_LOAD( "epr-7645.ic46", 0x08000, 0x08000, CRC(4caa0095) SHA1(a24c741cdca0542e462f17ff94f132c62710e198) ) ROM_LOAD( "epr-7646.ic60", 0x10000, 0x08000, CRC(7e432683) SHA1(c8249b23fce77eb456166161c2d9aa34309efe31) ) - ROM_REGION32_LE( 0x100000, "gfx2", 0 ) // sprites + ROM_REGION32_LE( 0x100000, "sprites", 0 ) // sprites ROM_LOAD32_BYTE( "epr-7678.ic36", 0x00000, 0x8000, CRC(9fb5e656) SHA1(264b0ad017eb0fc7e0b542e6dd160ba964c100fd) ) ROM_LOAD32_BYTE( "epr-7670.ic28", 0x00001, 0x8000, CRC(dbbe2f6e) SHA1(310797a61f91d6866e728e0da3b30828e06d1b52) ) ROM_LOAD32_BYTE( "epr-7662.ic18", 0x00002, 0x8000, CRC(cb0c13c5) SHA1(856d1234fd8f8146e20fe6c65c0a535b7b7512cd) ) @@ -1738,7 +1738,7 @@ ROM_START( endurob2 ) ROM_LOAD( "epr-7681.rom", 0x00000, 0x8000, CRC(bc0c4d12) SHA1(3de71bde4c23e3c31984f20fc4bc7e221354c56f) ) ROM_LOAD( "epr-7680.rom", 0x10000, 0x8000, CRC(627b3c8c) SHA1(806fe7dce619ad19c09178061be4607d2beba14d) ) - ROM_REGION( 0x2000, "proms", 0 ) // zoom table + ROM_REGION( 0x2000, "sprites:zoom", 0 ) // zoom table ROM_LOAD( "epr-6844.ic123", 0x0000, 0x2000, CRC(e3ec7bd6) SHA1(feec0fe664e16fac0fde61cf64b401b9b0575323) ) ROM_END @@ -1755,14 +1755,13 @@ ROM_END DRIVER_INIT_MEMBER(segahang_state,generic) { // point globals to allocated memory regions - segaic16_spriteram_0 = reinterpret_cast<UINT16 *>(memshare("spriteram")->ptr()); - segaic16_paletteram = reinterpret_cast<UINT16 *>(memshare("paletteram")->ptr()); segaic16_tileram_0 = reinterpret_cast<UINT16 *>(memshare("tileram")->ptr()); segaic16_textram_0 = reinterpret_cast<UINT16 *>(memshare("textram")->ptr()); segaic16_roadram_0 = reinterpret_cast<UINT16 *>(memshare("roadram")->ptr()); // save states save_item(NAME(m_adc_select)); + save_item(NAME(m_shadow)); } diff --git a/src/mame/drivers/segaorun.c b/src/mame/drivers/segaorun.c index 14ea64b3ba2..6c078d78246 100644 --- a/src/mame/drivers/segaorun.c +++ b/src/mame/drivers/segaorun.c @@ -428,11 +428,11 @@ void segaorun_state::memory_mapper(sega_315_5195_mapper_device &mapper, UINT8 in break; case 3: - mapper.map_as_ram(0x00000, 0x01000, 0xfff000, "spriteram", write16_delegate()); + mapper.map_as_ram(0x00000, 0x01000, 0xfff000, "sprites", write16_delegate()); break; case 2: - mapper.map_as_ram(0x00000, 0x02000, 0xffe000, "paletteram", write16_delegate(FUNC(segaorun_state::legacy_wrapper<segaic16_paletteram_w>), this)); + mapper.map_as_ram(0x00000, 0x02000, 0xffe000, "paletteram", write16_delegate(FUNC(segaorun_state::paletteram_w), this)); break; case 1: @@ -484,7 +484,7 @@ READ16_MEMBER( segaorun_state::misc_io_r ) if (!m_custom_io_r.isnull()) return m_custom_io_r(space, offset, mem_mask); logerror("%06X:misc_io_r - unknown read access to address %04X\n", cpu_get_pc(&space.device()), offset * 2); - return segaic16_open_bus_r(&space, 0, mem_mask); + return open_bus_r(space, 0, mem_mask); } @@ -657,7 +657,7 @@ READ16_MEMBER( segaorun_state::outrun_custom_io_r ) } logerror("%06X:outrun_custom_io_r - unknown read access to address %04X\n", cpu_get_pc(&space.device()), offset * 2); - return segaic16_open_bus_r(&space, 0, mem_mask); + return open_bus_r(space, 0, mem_mask); } @@ -695,7 +695,7 @@ WRITE16_MEMBER( segaorun_state::outrun_custom_io_w ) return; case 0x70/2: - segaic16_sprites_draw_0_w(&space, offset, data, mem_mask); + m_sprites->draw_write(space, offset, data, mem_mask); return; } logerror("%06X:misc_io_w - unknown write access to address %04X = %04X & %04X\n", cpu_get_pc(&space.device()), offset * 2, data, mem_mask); @@ -728,7 +728,7 @@ READ16_MEMBER( segaorun_state::shangon_custom_io_r ) } } logerror("%06X:misc_io_r - unknown read access to address %04X\n", cpu_get_pc(&space.device()), offset * 2); - return segaic16_open_bus_r(&space,0,mem_mask); + return open_bus_r(space,0,mem_mask); } @@ -814,7 +814,7 @@ static ADDRESS_MAP_START( outrun_map, AS_PROGRAM, 16, segaorun_state ) // these get overwritten by the memory mapper above, but we put them here // so they are properly allocated and tracked for saving - AM_RANGE(0x100000, 0x100fff) AM_RAM AM_SHARE("spriteram") + AM_RANGE(0x100000, 0x100fff) AM_RAM AM_SHARE("sprites") AM_RANGE(0x200000, 0x201fff) AM_RAM AM_SHARE("paletteram") AM_RANGE(0x300000, 0x30ffff) AM_RAM AM_SHARE("tileram") AM_RANGE(0x400000, 0x400fff) AM_RAM AM_SHARE("textram") @@ -1111,13 +1111,13 @@ MACHINE_CONFIG_END //************************************************************************** static MACHINE_CONFIG_DERIVED( outrundx, outrun_base ) - MCFG_SEGA16SP_ADD_OUTRUN("segaspr1") + MCFG_SEGA_OUTRUN_SPRITES_ADD("sprites") MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( outrun, outrun_base ) MCFG_NVRAM_ADD_0FILL("nvram") - MCFG_SEGA16SP_ADD_OUTRUN("segaspr1") + MCFG_SEGA_OUTRUN_SPRITES_ADD("sprites") MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( outrun_fd1094, outrun ) @@ -1133,7 +1133,7 @@ static MACHINE_CONFIG_DERIVED( shangon, outrun_base ) MCFG_SCREEN_RAW_PARAMS(MASTER_CLOCK_25MHz/4, 400, 0, 321, 262, 0, 224) MCFG_SCREEN_UPDATE_DRIVER(segaorun_state, screen_update_shangon) - MCFG_SEGA16SP_ADD_16B("segaspr1") + MCFG_SEGA_SYS16B_SPRITES_ADD("sprites") MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( shangon_fd1089b, shangon ) @@ -1184,7 +1184,7 @@ ROM_START( outrun ) ROM_LOAD( "opr-10266.101", 0x20000, 0x08000, CRC(9f6f1a74) SHA1(09164e858ebeedcff4d389524ddf89e7c216dcae) ) ROM_LOAD( "opr-10230.104", 0x28000, 0x08000, CRC(686f5e50) SHA1(03697b892f911177968aa40de6c5f464eb0258e7) ) - ROM_REGION32_LE( 0x100000, "gfx2", 0 ) // sprites + ROM_REGION32_LE( 0x100000, "sprites", 0 ) // sprites // VIDEO BD 837-6064-02 uses mask roms four times the size of those used on VIDEO BD 837-6064-01, same data ROM_LOAD32_BYTE( "mpr-10371.9", 0x00000, 0x20000, CRC(7cc86208) SHA1(21320f945f7c8e990c97c9b1232a0f4b6bd00f8f) ) ROM_LOAD32_BYTE( "mpr-10373.10", 0x00001, 0x20000, CRC(b0d26ac9) SHA1(3a9ce8547cd43b7b04abddf9a9ab5634e0bbfaba) ) @@ -1245,7 +1245,7 @@ ROM_START( outrunra ) ROM_LOAD( "opr-10266.101", 0x20000, 0x08000, CRC(9f6f1a74) SHA1(09164e858ebeedcff4d389524ddf89e7c216dcae) ) ROM_LOAD( "opr-10230.104", 0x28000, 0x08000, CRC(686f5e50) SHA1(03697b892f911177968aa40de6c5f464eb0258e7) ) - ROM_REGION32_LE( 0x100000, "gfx2", 0 ) // sprites + ROM_REGION32_LE( 0x100000, "sprites", 0 ) // sprites // VIDEO BD 837-6064-02 uses mask roms four times the size of those used on VIDEO BD 837-6064-01, same data ROM_LOAD32_BYTE( "mpr-10371.9", 0x00000, 0x20000, CRC(7cc86208) SHA1(21320f945f7c8e990c97c9b1232a0f4b6bd00f8f) ) ROM_LOAD32_BYTE( "mpr-10373.10", 0x00001, 0x20000, CRC(b0d26ac9) SHA1(3a9ce8547cd43b7b04abddf9a9ab5634e0bbfaba) ) @@ -1306,7 +1306,7 @@ ROM_START( outruno ) ROM_LOAD( "opr-10266.101", 0x20000, 0x08000, CRC(9f6f1a74) SHA1(09164e858ebeedcff4d389524ddf89e7c216dcae) ) ROM_LOAD( "opr-10230.104", 0x28000, 0x08000, CRC(686f5e50) SHA1(03697b892f911177968aa40de6c5f464eb0258e7) ) - ROM_REGION32_LE( 0x100000, "gfx2", 0 ) // sprites + ROM_REGION32_LE( 0x100000, "sprites", 0 ) // sprites // VIDEO BD 837-6064-01 uses eproms a fourth of the size of those used on VIDEO BD 837-6064-02, same data ROM_LOAD32_BYTE( "epr-10194.26", 0x00000, 0x08000, CRC(f0eda3bd) SHA1(173e10a10372d42da81e6eb48c3e23a117638c0c) ) ROM_LOAD32_BYTE( "epr-10203.38", 0x00001, 0x08000, CRC(8445a622) SHA1(1187dee7db09a42446fc75872d49936310141eb8) ) @@ -1400,7 +1400,7 @@ ROM_START( outrundx ) ROM_LOAD( "opr-10266.101", 0x20000, 0x08000, CRC(9f6f1a74) SHA1(09164e858ebeedcff4d389524ddf89e7c216dcae) ) ROM_LOAD( "opr-10230.104", 0x28000, 0x08000, CRC(686f5e50) SHA1(03697b892f911177968aa40de6c5f464eb0258e7) ) - ROM_REGION32_LE( 0x100000, "gfx2", 0 ) // sprites + ROM_REGION32_LE( 0x100000, "sprites", 0 ) // sprites // VIDEO BD 837-6064-01 uses eproms a fourth of the size of those used on VIDEO BD 837-6064-02, same data ROM_LOAD32_BYTE( "epr-10194.26", 0x00000, 0x08000, CRC(f0eda3bd) SHA1(173e10a10372d42da81e6eb48c3e23a117638c0c) ) ROM_LOAD32_BYTE( "epr-10203.38", 0x00001, 0x08000, CRC(8445a622) SHA1(1187dee7db09a42446fc75872d49936310141eb8) ) @@ -1507,7 +1507,7 @@ ROM_START( outrunb ) ROM_LOAD( "a-17.bin", 0x10000, 0x10000, CRC(899c781d) SHA1(4f759c316a57a1e42838375525290425d25b53e1) ) ROM_LOAD( "a-16.bin", 0x20000, 0x10000, CRC(98dd4d15) SHA1(914ebcb330455ab35968b4add4d94be123a185a5) ) - ROM_REGION32_LE( 0x100000, "gfx2", 0 ) // sprites + ROM_REGION32_LE( 0x100000, "sprites", 0 ) // sprites ROM_LOAD32_BYTE( "a-18.bin", 0x00000, 0x10000, CRC(77377e00) SHA1(4f376b05692f33d529f4c058dac989136c808ca1) ) ROM_LOAD32_BYTE( "a-20.bin", 0x00001, 0x10000, CRC(69ecc975) SHA1(3560e9a31fc71e263a6ff61224b8db2b17836075) ) ROM_LOAD32_BYTE( "a-22.bin", 0x00002, 0x10000, CRC(b6a8d0e2) SHA1(6184700dbe2c8c9c91f220e246501b7a865e4a05) ) @@ -1569,7 +1569,7 @@ ROM_START( shangon ) ROM_LOAD( "epr-10651.55", 0x08000, 0x08000, CRC(c609ee7b) SHA1(c6dacf81cbfe7e5df1f9a967cf571be1dcf1c429) ) ROM_LOAD( "epr-10650.56", 0x10000, 0x08000, CRC(b236a403) SHA1(af02b8122794c083a66f2ab35d2c73b84b2df0be) ) - ROM_REGION16_BE( 0x100000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x100000, "sprites", 0 ) // sprites // Super Hang-On Video board 837-6279-01 (mask rom type), same data but mask roms twice the size as "EPR" counterparts ROM_LOAD16_BYTE( "mpr-10794.8", 0x000001, 0x020000, CRC(7c958e63) SHA1(ef79614e94280607a6cdf6e13db051accfd2add0) ) ROM_LOAD16_BYTE( "mpr-10798.16", 0x000000, 0x020000, CRC(7d58f807) SHA1(783c9929d27a0270b3f7d5eb799cee6b2e5b7ae5) ) @@ -1628,7 +1628,7 @@ ROM_START( shangon3 ) ROM_LOAD( "epr-10651.55", 0x08000, 0x08000, CRC(c609ee7b) SHA1(c6dacf81cbfe7e5df1f9a967cf571be1dcf1c429) ) ROM_LOAD( "epr-10650.56", 0x10000, 0x08000, CRC(b236a403) SHA1(af02b8122794c083a66f2ab35d2c73b84b2df0be) ) - ROM_REGION16_BE( 0x0e0000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x0e0000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "epr-10675.8", 0x000001, 0x010000, CRC(d6ac012b) SHA1(305023b1a0a9d84cfc081ffc2ad7578b53d562f2) ) ROM_LOAD16_BYTE( "epr-10682.16", 0x000000, 0x010000, CRC(d9d83250) SHA1(f8ca3197edcdf53643a5b335c3c044ddc1310cd4) ) ROM_LOAD16_BYTE( "epr-10676.7", 0x020001, 0x010000, CRC(25ebf2c5) SHA1(abcf673ae4e280417dd9f46d18c0ec7c0e4802ae) ) @@ -1689,7 +1689,7 @@ ROM_START( shangon2 ) ROM_LOAD( "epr-10651.55", 0x08000, 0x08000, CRC(c609ee7b) SHA1(c6dacf81cbfe7e5df1f9a967cf571be1dcf1c429) ) ROM_LOAD( "epr-10650.56", 0x10000, 0x08000, CRC(b236a403) SHA1(af02b8122794c083a66f2ab35d2c73b84b2df0be) ) - ROM_REGION16_BE( 0x0e0000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x0e0000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "epr-10675.8", 0x000001, 0x010000, CRC(d6ac012b) SHA1(305023b1a0a9d84cfc081ffc2ad7578b53d562f2) ) ROM_LOAD16_BYTE( "epr-10682.16", 0x000000, 0x010000, CRC(d9d83250) SHA1(f8ca3197edcdf53643a5b335c3c044ddc1310cd4) ) ROM_LOAD16_BYTE( "epr-10676.7", 0x020001, 0x010000, CRC(25ebf2c5) SHA1(abcf673ae4e280417dd9f46d18c0ec7c0e4802ae) ) @@ -1750,7 +1750,7 @@ ROM_START( shangon1 ) ROM_LOAD( "epr-10651.55", 0x08000, 0x08000, CRC(c609ee7b) SHA1(c6dacf81cbfe7e5df1f9a967cf571be1dcf1c429) ) ROM_LOAD( "epr-10650.56", 0x10000, 0x08000, CRC(b236a403) SHA1(af02b8122794c083a66f2ab35d2c73b84b2df0be) ) - ROM_REGION16_BE( 0x0e0000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x0e0000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "epr-10675.8", 0x000001, 0x010000, CRC(d6ac012b) SHA1(305023b1a0a9d84cfc081ffc2ad7578b53d562f2) ) ROM_LOAD16_BYTE( "epr-10682.16", 0x000000, 0x010000, CRC(d9d83250) SHA1(f8ca3197edcdf53643a5b335c3c044ddc1310cd4) ) ROM_LOAD16_BYTE( "epr-10676.7", 0x020001, 0x010000, CRC(25ebf2c5) SHA1(abcf673ae4e280417dd9f46d18c0ec7c0e4802ae) ) @@ -1811,7 +1811,7 @@ ROM_START( shangonle ) ROM_LOAD( "epr-10651.55", 0x08000, 0x08000, CRC(c609ee7b) SHA1(c6dacf81cbfe7e5df1f9a967cf571be1dcf1c429) ) ROM_LOAD( "epr-10650.56", 0x10000, 0x08000, CRC(b236a403) SHA1(af02b8122794c083a66f2ab35d2c73b84b2df0be) ) - ROM_REGION16_BE( 0x0e0000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x0e0000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "epr-10675.8", 0x000001, 0x010000, CRC(d6ac012b) SHA1(305023b1a0a9d84cfc081ffc2ad7578b53d562f2) ) ROM_LOAD16_BYTE( "epr-10682.16", 0x000000, 0x010000, CRC(d9d83250) SHA1(f8ca3197edcdf53643a5b335c3c044ddc1310cd4) ) ROM_LOAD16_BYTE( "epr-13945.7", 0x020001, 0x010000, CRC(fbb1eef9) SHA1(2798df2f25706e0d3be01d945274f478d7e5a2ae) ) @@ -1878,7 +1878,7 @@ ROM_START( toutrun ) ROM_LOAD( "opr-12324.103", 0x10000, 0x10000, CRC(24607a55) SHA1(69033f2281cd42e88233c23d809b73607fe54853) ) ROM_LOAD( "opr-12325.104", 0x20000, 0x10000, CRC(1405137a) SHA1(367db88d36852e35c5e839f692be5ea8c8e072d2) ) - ROM_REGION32_LE( 0x100000, "gfx2", 0 ) // sprites + ROM_REGION32_LE( 0x100000, "sprites", 0 ) // sprites // Video BD 837-6906-2, Mask Roms twice the size as EPR/OPR counterparts ROM_LOAD32_BYTE( "mpr-12336.9", 0x00000, 0x20000, CRC(dda465c7) SHA1(83acc12a387b004986f084f25964c15a9f88a41a) ) ROM_LOAD32_BYTE( "mpr-12337.10", 0x00001, 0x20000, CRC(828233d1) SHA1(d73a200af4245d590e1fd3ac436723f99cc50452) ) @@ -1938,7 +1938,7 @@ ROM_START( toutrun3 ) ROM_LOAD( "opr-12324.103", 0x10000, 0x10000, CRC(24607a55) SHA1(69033f2281cd42e88233c23d809b73607fe54853) ) ROM_LOAD( "opr-12325.104", 0x20000, 0x10000, CRC(1405137a) SHA1(367db88d36852e35c5e839f692be5ea8c8e072d2) ) - ROM_REGION32_LE( 0x100000, "gfx2", 0 ) // sprites + ROM_REGION32_LE( 0x100000, "sprites", 0 ) // sprites ROM_LOAD32_BYTE( "opr-12307.9", 0x00000, 0x10000, CRC(437dcf09) SHA1(0022ee4d1c3698f77271e570cef98a8a1e5c5d6a) ) ROM_LOAD32_BYTE( "opr-12308.10", 0x00001, 0x10000, CRC(0de70cc2) SHA1(c03f8f8cda72daf64af2878bf254840ac6dd17eb) ) ROM_LOAD32_BYTE( "opr-12309.11", 0x00002, 0x10000, CRC(deb8c242) SHA1(c05d8ced4eafae52c4795fb1471cd66f5903d1aa) ) @@ -2005,7 +2005,7 @@ ROM_START( toutrun2 ) ROM_LOAD( "opr-12324.103", 0x10000, 0x10000, CRC(24607a55) SHA1(69033f2281cd42e88233c23d809b73607fe54853) ) ROM_LOAD( "opr-12325.104", 0x20000, 0x10000, CRC(1405137a) SHA1(367db88d36852e35c5e839f692be5ea8c8e072d2) ) - ROM_REGION32_LE( 0x100000, "gfx2", 0 ) // sprites + ROM_REGION32_LE( 0x100000, "sprites", 0 ) // sprites ROM_LOAD32_BYTE( "opr-12307.9", 0x00000, 0x10000, CRC(437dcf09) SHA1(0022ee4d1c3698f77271e570cef98a8a1e5c5d6a) ) ROM_LOAD32_BYTE( "opr-12308.10", 0x00001, 0x10000, CRC(0de70cc2) SHA1(c03f8f8cda72daf64af2878bf254840ac6dd17eb) ) ROM_LOAD32_BYTE( "opr-12309.11", 0x00002, 0x10000, CRC(deb8c242) SHA1(c05d8ced4eafae52c4795fb1471cd66f5903d1aa) ) @@ -2066,7 +2066,7 @@ ROM_START( toutrun1 ) ROM_LOAD( "opr-12324.103", 0x10000, 0x10000, CRC(24607a55) SHA1(69033f2281cd42e88233c23d809b73607fe54853) ) ROM_LOAD( "opr-12325.104", 0x20000, 0x10000, CRC(1405137a) SHA1(367db88d36852e35c5e839f692be5ea8c8e072d2) ) - ROM_REGION32_LE( 0x100000, "gfx2", 0 ) // sprites + ROM_REGION32_LE( 0x100000, "sprites", 0 ) // sprites ROM_LOAD32_BYTE( "opr-12307.9", 0x00000, 0x10000, CRC(437dcf09) SHA1(0022ee4d1c3698f77271e570cef98a8a1e5c5d6a) ) ROM_LOAD32_BYTE( "opr-12308.10", 0x00001, 0x10000, CRC(0de70cc2) SHA1(c03f8f8cda72daf64af2878bf254840ac6dd17eb) ) ROM_LOAD32_BYTE( "opr-12309.11", 0x00002, 0x10000, CRC(deb8c242) SHA1(c05d8ced4eafae52c4795fb1471cd66f5903d1aa) ) @@ -2120,8 +2120,6 @@ DRIVER_INIT_MEMBER(segaorun_state,generic) m_nvram->set_base(m_workram, m_workram.bytes()); // point globals to allocated memory regions - segaic16_spriteram_0 = reinterpret_cast<UINT16 *>(memshare("spriteram")->ptr()); - segaic16_paletteram = reinterpret_cast<UINT16 *>(memshare("paletteram")->ptr()); segaic16_tileram_0 = reinterpret_cast<UINT16 *>(memshare("tileram")->ptr()); segaic16_textram_0 = reinterpret_cast<UINT16 *>(memshare("textram")->ptr()); segaic16_roadram_0 = reinterpret_cast<UINT16 *>(memshare("roadram")->ptr()); diff --git a/src/mame/drivers/segas16a.c b/src/mame/drivers/segas16a.c index 735c1ebdacb..3e8eef32127 100644 --- a/src/mame/drivers/segas16a.c +++ b/src/mame/drivers/segas16a.c @@ -233,7 +233,7 @@ WRITE8_MEMBER( segas16a_state::misc_control_w ) // bit 7: screen flip segaic16_tilemap_set_flip(machine(), 0, data & 0x80); - segaic16_sprites_set_flip(machine(), 0, data & 0x80); + m_sprites->set_flip(data & 0x80); // bit 6: set 8751 interrupt line if (m_mcu != NULL) @@ -1007,8 +1007,8 @@ static ADDRESS_MAP_START( system16a_map, AS_PROGRAM, 16, segas16a_state ) AM_RANGE(0x000000, 0x03ffff) AM_MIRROR(0x380000) AM_ROM AM_RANGE(0x400000, 0x407fff) AM_MIRROR(0xb88000) AM_RAM_WRITE_LEGACY(segaic16_tileram_0_w) AM_SHARE("tileram") AM_RANGE(0x410000, 0x410fff) AM_MIRROR(0xb8f000) AM_RAM_WRITE_LEGACY(segaic16_textram_0_w) AM_SHARE("textram") - AM_RANGE(0x440000, 0x4407ff) AM_MIRROR(0x3bf800) AM_RAM AM_SHARE("spriteram") - AM_RANGE(0x840000, 0x840fff) AM_MIRROR(0x3bf000) AM_RAM_WRITE_LEGACY(segaic16_paletteram_w) AM_SHARE("paletteram") + AM_RANGE(0x440000, 0x4407ff) AM_MIRROR(0x3bf800) AM_RAM AM_SHARE("sprites") + AM_RANGE(0x840000, 0x840fff) AM_MIRROR(0x3bf000) AM_RAM_WRITE(paletteram_w) AM_SHARE("paletteram") AM_RANGE(0xc40000, 0xc43fff) AM_MIRROR(0x39c000) AM_READWRITE(misc_io_r, misc_io_w) AM_RANGE(0xc60000, 0xc6ffff) AM_READ(watchdog_reset16_r) AM_RANGE(0xc70000, 0xc73fff) AM_MIRROR(0x38c000) AM_RAM AM_SHARE("nvram") @@ -1969,7 +1969,7 @@ static MACHINE_CONFIG_START( system16a, segas16a_state ) MCFG_SCREEN_VISIBLE_AREA(0*8, 40*8-1, 0*8, 28*8-1) MCFG_SCREEN_UPDATE_DRIVER(segas16a_state, screen_update) - MCFG_SEGA16SP_ADD_16A("segaspr1") + MCFG_SEGA_SYS16A_SPRITES_ADD("sprites") MCFG_GFXDECODE(segas16a) MCFG_PALETTE_LENGTH(2048*3) @@ -2075,7 +2075,7 @@ ROM_START( aceattaca ) ROM_LOAD( "epr-11576.94", 0x10000, 0x10000, CRC(067ed682) SHA1(13e2e1f812e5a3994a0f1d35eb210881645e74cd) ) ROM_LOAD( "epr-11577.93", 0x20000, 0x10000, CRC(f67cf331) SHA1(457b9e618dfa678ae374cdeb25488af3de2e8949) ) - ROM_REGION16_BE( 0x080000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x080000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "epr-11501.10", 0x00001, 0x08000, CRC(09179ead) SHA1(3e6bf04e1e9ea867d087a47ff04ad0a064a8e299) ) ROM_CONTINUE( 0x40001, 0x08000 ) ROM_LOAD16_BYTE( "epr-11505.11", 0x00000, 0x08000, CRC(b67f1ecf) SHA1(3a26cdf91e5a1a11c1a8857e713a9e00cc1bfce0) ) @@ -2127,7 +2127,7 @@ ROM_START( afighter ) ROM_LOAD( "epr-10282.94", 0x10000, 0x10000, CRC(b67b8910) SHA1(f3f029a3e6547114cec28e5cf8fda65ef434c353) ) ROM_LOAD( "epr-10283.93", 0x20000, 0x10000, CRC(e7dbfd2d) SHA1(91bae3fbc4a3c612dc507eecfa8de1c2e1e7afee) ) - ROM_REGION16_BE( 0x40000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x40000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "epr-10285", 0x00001, 0x08000, CRC(98aa3d04) SHA1(1d26d17a72e55281e3444fee9c5af69ffb9e3c69) ) ROM_LOAD16_BYTE( "epr-10286", 0x10001, 0x08000, CRC(8da050cf) SHA1(c28e8968dbd9c110672581f4486f70d5f45df7f5) ) ROM_LOAD16_BYTE( "epr-10287", 0x20001, 0x08000, CRC(7989b74a) SHA1(a87acafe82b37a11d8f8b1f2ee4c9b2e1bb8161c) ) @@ -2163,7 +2163,7 @@ ROM_START( alexkidd ) ROM_LOAD( "epr-10432.94", 0x08000, 0x08000, CRC(db8cd24e) SHA1(656d98844ad9ccaa68e3f501137dddd0a27d999d) ) ROM_LOAD( "epr-10433.93", 0x10000, 0x08000, CRC(e163c8c2) SHA1(ac54c5ecedca5b1a2c550de32687ca57c4d3a411) ) - ROM_REGION16_BE( 0x040000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x040000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "epr-10437.10", 0x00001, 0x8000, CRC(522f7618) SHA1(9a6bc857dfef1dd1b7bffa034523c1c4cd8b3f4c) ) ROM_LOAD16_BYTE( "epr-10441.11", 0x00000, 0x8000, CRC(74e3a35c) SHA1(26b980a0a3aee94ac38e0e0c7d305bb35a60d1c4) ) ROM_LOAD16_BYTE( "epr-10438.17", 0x10001, 0x8000, CRC(738a6362) SHA1(a3c5f10c263cb216d275875f6333484a1cca281b) ) @@ -2200,7 +2200,7 @@ ROM_START( alexkidd1 ) ROM_LOAD( "epr-10432.94", 0x08000, 0x08000, CRC(db8cd24e) SHA1(656d98844ad9ccaa68e3f501137dddd0a27d999d) ) ROM_LOAD( "epr-10433.93", 0x10000, 0x08000, CRC(e163c8c2) SHA1(ac54c5ecedca5b1a2c550de32687ca57c4d3a411) ) - ROM_REGION16_BE( 0x040000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x040000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "epr-10437.10", 0x00001, 0x8000, CRC(522f7618) SHA1(9a6bc857dfef1dd1b7bffa034523c1c4cd8b3f4c) ) ROM_LOAD16_BYTE( "epr-10441.11", 0x00000, 0x8000, CRC(74e3a35c) SHA1(26b980a0a3aee94ac38e0e0c7d305bb35a60d1c4) ) ROM_LOAD16_BYTE( "epr-10438.17", 0x10001, 0x8000, CRC(738a6362) SHA1(a3c5f10c263cb216d275875f6333484a1cca281b) ) @@ -2245,7 +2245,7 @@ ROM_START( aliensyn5 ) ROM_LOAD( "epr-10740.94", 0x10000, 0x10000, CRC(47f93015) SHA1(68247a6bffd1d4d1c450148dd46214d01ce1c668) ) ROM_LOAD( "epr-10741.93", 0x20000, 0x10000, CRC(4970739c) SHA1(5bdf4222209ec46e0015bfc0f90578dd9b30bdd1) ) - ROM_REGION16_BE( 0x080000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x080000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "epr-10709.10", 0x00001, 0x08000, CRC(addf0a90) SHA1(a92c9531f1817763773471ce63f566b9e88360a0) ) ROM_CONTINUE( 0x40001, 0x08000 ) ROM_LOAD16_BYTE( "epr-10713.11", 0x00000, 0x08000, CRC(ececde3a) SHA1(9c12d4665179bf433c42f5ddc8a043ad592aa90e) ) @@ -2296,7 +2296,7 @@ ROM_START( aliensyn2 ) ROM_LOAD( "10740", 0x10000, 0x10000, CRC(47f93015) SHA1(68247a6bffd1d4d1c450148dd46214d01ce1c668) ) ROM_LOAD( "10741", 0x20000, 0x10000, CRC(4970739c) SHA1(5bdf4222209ec46e0015bfc0f90578dd9b30bdd1) ) - ROM_REGION16_BE( 0x080000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x080000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "10709.b1", 0x00001, 0x08000, CRC(addf0a90) SHA1(a92c9531f1817763773471ce63f566b9e88360a0) ) ROM_CONTINUE( 0x40001, 0x08000 ) ROM_LOAD16_BYTE( "10713.b5", 0x00000, 0x08000, CRC(ececde3a) SHA1(9c12d4665179bf433c42f5ddc8a043ad592aa90e) ) @@ -2347,7 +2347,7 @@ ROM_START( aliensynjo ) ROM_LOAD( "epr-10740.94", 0x10000, 0x10000, CRC(47f93015) SHA1(68247a6bffd1d4d1c450148dd46214d01ce1c668) ) ROM_LOAD( "epr-10741.93", 0x20000, 0x10000, CRC(4970739c) SHA1(5bdf4222209ec46e0015bfc0f90578dd9b30bdd1) ) - ROM_REGION16_BE( 0x080000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x080000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "epr-10709.10", 0x00001, 0x08000, CRC(addf0a90) SHA1(a92c9531f1817763773471ce63f566b9e88360a0) ) ROM_CONTINUE( 0x40001, 0x08000 ) ROM_LOAD16_BYTE( "epr-10713.11", 0x00000, 0x08000, CRC(ececde3a) SHA1(9c12d4665179bf433c42f5ddc8a043ad592aa90e) ) @@ -2402,7 +2402,7 @@ ROM_START( bodyslam ) ROM_LOAD( "epr-10322.c10", 0x08000, 0x8000, CRC(b53d3217) SHA1(baebf20925e9f8ab6660f041a24721716d5b7d92) ) ROM_LOAD( "epr-10323.c11", 0x10000, 0x8000, CRC(915a3e61) SHA1(6504a8b26b7b4880971cd69ac2c8aae30dcfa18c) ) - ROM_REGION16_BE( 0x40000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x40000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "epr-10012.c5", 0x00001, 0x08000, CRC(990824e8) SHA1(bd45f75d07cb4e17583c2d76050e5f819f4b7efe) ) ROM_LOAD16_BYTE( "epr-10016.b2", 0x00000, 0x08000, CRC(af5dc72f) SHA1(97bbb76940c702e642d8222dda71447b8f60b616) ) ROM_LOAD16_BYTE( "epr-10013.c6", 0x10001, 0x08000, CRC(9a0919c5) SHA1(e39e60c1e834b3b46bf2ef1c5952841bebe66ade) ) @@ -2447,7 +2447,7 @@ ROM_START( dumpmtmt ) ROM_LOAD( "epr-7708a.c10", 0x08000, 0x8000, CRC(411be9a4) SHA1(808a9c941d353f34c3491ca2cde984e73cc7a87d) ) ROM_LOAD( "epr-7709a.c11", 0x10000, 0x8000, CRC(74ceb5a8) SHA1(93ed6bb4a3c820f3a7ee5e9b2c2ce35d2bed8529) ) - ROM_REGION16_BE( 0x40000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x40000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "epr-7715.c5", 0x00001, 0x08000, CRC(bf47e040) SHA1(5aa1b9adaa2095844c10993402a0597bb5768efb) ) ROM_LOAD16_BYTE( "epr-7719.b2", 0x00000, 0x08000, CRC(fa5c5d6c) SHA1(6cac5d3fd705d1365348d57a18bbeb1eb9e412b8) ) ROM_LOAD16_BYTE( "epr-10013.c6", 0x10001, 0x08000, CRC(9a0919c5) SHA1(e39e60c1e834b3b46bf2ef1c5952841bebe66ade) ) // 7716 @@ -2494,7 +2494,7 @@ ROM_START( fantzone ) ROM_LOAD( "epr-7389.94", 0x08000, 0x08000, CRC(2f4f71b8) SHA1(ceb39e95cd43904b8e4f89c7227491e139fb3ca6) ) ROM_LOAD( "epr-7390.93", 0x10000, 0x08000, CRC(d90609c6) SHA1(4232f6ecb21f242c0c8d81e06b88bc742668609f) ) - ROM_REGION16_BE( 0x30000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x30000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "epr-7392.10", 0x00001, 0x8000, CRC(5bb7c8b6) SHA1(eaa0ed63ac4f66ee285757e842bdd7b005292600) ) ROM_LOAD16_BYTE( "epr-7396.11", 0x00000, 0x8000, CRC(74ae4b57) SHA1(1f24b1faea765994b85f0e7ac8e944c8da22103f) ) ROM_LOAD16_BYTE( "epr-7393.17", 0x10001, 0x8000, CRC(14fc7e82) SHA1(ca7caca989a3577dd30ad4f66b0fcce712a454ef) ) @@ -2524,7 +2524,7 @@ ROM_START( fantzone1 ) ROM_LOAD( "epr-7389.94", 0x08000, 0x08000, CRC(2f4f71b8) SHA1(ceb39e95cd43904b8e4f89c7227491e139fb3ca6) ) ROM_LOAD( "epr-7390.93", 0x10000, 0x08000, CRC(d90609c6) SHA1(4232f6ecb21f242c0c8d81e06b88bc742668609f) ) - ROM_REGION16_BE( 0x30000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x30000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "epr-7392.10", 0x00001, 0x8000, CRC(5bb7c8b6) SHA1(eaa0ed63ac4f66ee285757e842bdd7b005292600) ) ROM_LOAD16_BYTE( "epr-7396.11", 0x00000, 0x8000, CRC(74ae4b57) SHA1(1f24b1faea765994b85f0e7ac8e944c8da22103f) ) ROM_LOAD16_BYTE( "epr-7393.17", 0x10001, 0x8000, CRC(14fc7e82) SHA1(ca7caca989a3577dd30ad4f66b0fcce712a454ef) ) @@ -2554,7 +2554,7 @@ ROM_START( fantzonep ) ROM_LOAD( "epr-7389.94", 0x08000, 0x08000, CRC(2f4f71b8) SHA1(ceb39e95cd43904b8e4f89c7227491e139fb3ca6) ) ROM_LOAD( "epr-7390.93", 0x10000, 0x08000, CRC(d90609c6) SHA1(4232f6ecb21f242c0c8d81e06b88bc742668609f) ) - ROM_REGION16_BE( 0x30000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x30000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "epr-7392.10", 0x00001, 0x8000, CRC(5bb7c8b6) SHA1(eaa0ed63ac4f66ee285757e842bdd7b005292600) ) ROM_LOAD16_BYTE( "epr-7396.11", 0x00000, 0x8000, CRC(74ae4b57) SHA1(1f24b1faea765994b85f0e7ac8e944c8da22103f) ) ROM_LOAD16_BYTE( "epr-7393.17", 0x10001, 0x8000, CRC(14fc7e82) SHA1(ca7caca989a3577dd30ad4f66b0fcce712a454ef) ) @@ -2587,7 +2587,7 @@ ROM_START( mjleague ) ROM_LOAD( "epr-7052.10a", 0x08000, 0x08000, CRC(2550db0e) SHA1(28f8d68f43d26f12793fe295c205cc86adc4e96a) ) ROM_LOAD( "epr-7053.11a", 0x10000, 0x08000, CRC(5bfea038) SHA1(01dc6e14cc7bba9f7930e68573c441fa2841f49a) ) - ROM_REGION16_BE( 0x40000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x40000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "epr-7055.5a", 0x00001, 0x8000, CRC(1fb860bd) SHA1(4a4155d0352dfae9e402a2b2f1558ef17b1303b4) ) ROM_LOAD16_BYTE( "epr-7059.2b", 0x00000, 0x8000, CRC(3d14091d) SHA1(36208415b2012b6e948fefa15b0f7041748066be) ) ROM_LOAD16_BYTE( "epr-7056.6a", 0x10001, 0x8000, CRC(b35dd968) SHA1(e306b5e38acf583d7b2089302622ad25ae5564b0) ) @@ -2630,7 +2630,7 @@ ROM_START( passsht16a ) ROM_LOAD( "epr-11835.94", 0x10000, 0x10000, CRC(6a07acc0) SHA1(218071612ee6fa89b16a47a77325a962ba38926d) ) ROM_LOAD( "epr-11836.93", 0x20000, 0x10000, CRC(93c74928) SHA1(43ea7855d5d4dcc4921b3a7b814acc75c5cfde15) ) - ROM_REGION16_BE( 0x080000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x080000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "epr-11842.10", 0x00001, 0x08000, CRC(b6e94727) SHA1(0838e034f1f10d9cd1312c8c94b5c57387c0c271) ) ROM_CONTINUE( 0x40001, 0x08000 ) ROM_LOAD16_BYTE( "epr-11845.11", 0x00000, 0x08000, CRC(17e8d5d5) SHA1(ac1074b0a705be13c6e3391441e6cfec1d2b3f8a) ) @@ -2679,7 +2679,7 @@ ROM_START( quartet ) ROM_LOAD( "epr-7462.10c", 0x08000, 0x08000, CRC(7914af28) SHA1(4bf59fe4a0b0aa5d4cc0b6f9375ffab3c96e8a2b) ) ROM_LOAD( "epr-7463.11c", 0x10000, 0x08000, CRC(827c5603) SHA1(8db3bd6eae5aeeb229e017471049ef5347974df5) ) - ROM_REGION16_BE( 0x40000, "gfx2", 0 ) // sprites - the same as quartet 2 + ROM_REGION16_BE( 0x40000, "sprites", 0 ) // sprites - the same as quartet 2 ROM_LOAD16_BYTE( "epr-7465.5c", 0x00001, 0x8000, CRC(8a1ab7d7) SHA1(a2f317538c70a1603b65d795223407cbaaf88524) ) ROM_LOAD16_BYTE( "epr-7469.2b", 0x00000, 0x8000, CRC(cb65ae4f) SHA1(3ee7b3b4cce113a6f394e8dfd317cdb6ffae64f7) ) ROM_LOAD16_BYTE( "epr-7466.6c", 0x10001, 0x8000, CRC(b2d3f4f3) SHA1(65e654fde10bee4cb5eee8234d0babb78fe41cfb) ) @@ -2729,7 +2729,7 @@ ROM_START( quarteta ) ROM_LOAD( "epr-7462.10c", 0x08000, 0x08000, CRC(7914af28) SHA1(4bf59fe4a0b0aa5d4cc0b6f9375ffab3c96e8a2b) ) ROM_LOAD( "epr-7463.11c", 0x10000, 0x08000, CRC(827c5603) SHA1(8db3bd6eae5aeeb229e017471049ef5347974df5) ) - ROM_REGION16_BE( 0x40000, "gfx2", 0 ) // sprites - the same as quartet 2 + ROM_REGION16_BE( 0x40000, "sprites", 0 ) // sprites - the same as quartet 2 ROM_LOAD16_BYTE( "epr-7465.5c", 0x00001, 0x8000, CRC(8a1ab7d7) SHA1(a2f317538c70a1603b65d795223407cbaaf88524) ) ROM_LOAD16_BYTE( "epr-7469.2b", 0x00000, 0x8000, CRC(cb65ae4f) SHA1(3ee7b3b4cce113a6f394e8dfd317cdb6ffae64f7) ) ROM_LOAD16_BYTE( "epr-7466.6c", 0x10001, 0x8000, CRC(b2d3f4f3) SHA1(65e654fde10bee4cb5eee8234d0babb78fe41cfb) ) @@ -2785,7 +2785,7 @@ ROM_START( quartet2 ) ROM_LOAD( "epr-7699.c10", 0x08000, 0x08000, CRC(77ec901d) SHA1(b5961895473c16a8f4a111185cce48b05ab66885) ) ROM_LOAD( "epr-7700.c11", 0x10000, 0x08000, CRC(7e348cce) SHA1(82bba65280faaf3280208c85caef48ec8baeade8) ) - ROM_REGION16_BE( 0x040000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x040000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "epr-7465.5c", 0x00001, 0x8000, CRC(8a1ab7d7) SHA1(a2f317538c70a1603b65d795223407cbaaf88524) ) ROM_LOAD16_BYTE( "epr-7469.2b", 0x00000, 0x8000, CRC(cb65ae4f) SHA1(3ee7b3b4cce113a6f394e8dfd317cdb6ffae64f7) ) ROM_LOAD16_BYTE( "epr-7466.6c", 0x10001, 0x8000, CRC(b2d3f4f3) SHA1(65e654fde10bee4cb5eee8234d0babb78fe41cfb) ) @@ -2829,7 +2829,7 @@ ROM_START( quartet2a ) ROM_LOAD( "epr-7699.c10", 0x08000, 0x08000, CRC(77ec901d) SHA1(b5961895473c16a8f4a111185cce48b05ab66885) ) ROM_LOAD( "epr-7700.c11", 0x10000, 0x08000, CRC(7e348cce) SHA1(82bba65280faaf3280208c85caef48ec8baeade8) ) - ROM_REGION16_BE( 0x040000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x040000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "epr-7465.5c", 0x00001, 0x8000, CRC(8a1ab7d7) SHA1(a2f317538c70a1603b65d795223407cbaaf88524) ) ROM_LOAD16_BYTE( "epr-7469.2b", 0x00000, 0x8000, CRC(cb65ae4f) SHA1(3ee7b3b4cce113a6f394e8dfd317cdb6ffae64f7) ) ROM_LOAD16_BYTE( "epr-7466.6c", 0x10001, 0x8000, CRC(b2d3f4f3) SHA1(65e654fde10bee4cb5eee8234d0babb78fe41cfb) ) @@ -2873,7 +2873,7 @@ ROM_START( sdi ) ROM_LOAD( "epr-10757.94", 0x10000, 0x10000, CRC(497e1740) SHA1(95b166a9db46a27087e417c1b2cbb76bee2e64a7) ) ROM_LOAD( "epr-10758.93", 0x20000, 0x10000, CRC(61d61486) SHA1(d48ff87216947b78903cd98a10436babdf8b75a0) ) - ROM_REGION16_BE( 0x70000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x70000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "epr-10760.10", 0x00001, 0x08000, CRC(30e2c50a) SHA1(1fb9e69d4cb97fdcb0f98c2a7ede246aaa4ac382) ) ROM_CONTINUE( 0x40001, 0x08000 ) ROM_LOAD16_BYTE( "epr-10763.11", 0x00000, 0x08000, CRC(794e3e8b) SHA1(91ca1cb9aabf99adc8426feed4494a992afb8c4a) ) @@ -2913,7 +2913,7 @@ ROM_START( shinobi ) ROM_LOAD( "epr-11265.94", 0x10000, 0x10000, CRC(87d0f321) SHA1(885b38eaff2dcaeab4eeaa20cc8a2885d520abd6) ) ROM_LOAD( "epr-11266.93", 0x20000, 0x10000, CRC(efb4af87) SHA1(0b8a905023e1bc808fd2b1c3cfa3778cde79e659) ) - ROM_REGION16_BE( 0x080000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x080000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "epr-11290.10", 0x00001, 0x08000, CRC(611f413a) SHA1(180f83216e2dfbfd77b0fb3be83c3042954d12df) ) ROM_CONTINUE( 0x40001, 0x08000 ) ROM_LOAD16_BYTE( "epr-11294.11", 0x00000, 0x08000, CRC(5eb00fc1) SHA1(97e02eee74f61fabcad2a9e24f1868cafaac1d51) ) @@ -2956,7 +2956,7 @@ ROM_START( shinobls ) ROM_LOAD( "b6", 0x10000, 0x10000, CRC(87d0f321) SHA1(885b38eaff2dcaeab4eeaa20cc8a2885d520abd6) ) ROM_LOAD( "b7", 0x20000, 0x10000, CRC(efb4af87) SHA1(0b8a905023e1bc808fd2b1c3cfa3778cde79e659) ) - ROM_REGION16_BE( 0x080000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x080000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "b10", 0x00001, 0x08000, CRC(611f413a) SHA1(180f83216e2dfbfd77b0fb3be83c3042954d12df) ) ROM_CONTINUE( 0x40001, 0x08000 ) ROM_LOAD16_BYTE( "b14", 0x00000, 0x08000, CRC(5eb00fc1) SHA1(97e02eee74f61fabcad2a9e24f1868cafaac1d51) ) @@ -3003,7 +3003,7 @@ ROM_START( shinoblb ) ROM_LOAD( "7.4b", 0x10000, 0x10000, CRC(87d0f321) SHA1(885b38eaff2dcaeab4eeaa20cc8a2885d520abd6) ) ROM_LOAD( "6.5b", 0x20000, 0x10000, CRC(efb4af87) SHA1(0b8a905023e1bc808fd2b1c3cfa3778cde79e659) ) - ROM_REGION16_BE( 0x080000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x080000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "9.6r", 0x00001, 0x08000, CRC(611f413a) SHA1(180f83216e2dfbfd77b0fb3be83c3042954d12df) ) ROM_CONTINUE( 0x40001, 0x08000 ) ROM_LOAD16_BYTE( "13.8r", 0x00000, 0x08000, CRC(5eb00fc1) SHA1(97e02eee74f61fabcad2a9e24f1868cafaac1d51) ) @@ -3056,7 +3056,7 @@ ROM_START( shinobi1 ) ROM_LOAD( "epr-11265.94", 0x10000, 0x10000, CRC(87d0f321) SHA1(885b38eaff2dcaeab4eeaa20cc8a2885d520abd6) ) ROM_LOAD( "epr-11266.93", 0x20000, 0x10000, CRC(efb4af87) SHA1(0b8a905023e1bc808fd2b1c3cfa3778cde79e659) ) - ROM_REGION16_BE( 0x080000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x080000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "epr-11290.10", 0x00001, 0x08000, CRC(611f413a) SHA1(180f83216e2dfbfd77b0fb3be83c3042954d12df) ) ROM_CONTINUE( 0x40001, 0x08000 ) ROM_LOAD16_BYTE( "epr-11294.11", 0x00000, 0x08000, CRC(5eb00fc1) SHA1(97e02eee74f61fabcad2a9e24f1868cafaac1d51) ) @@ -3114,7 +3114,7 @@ ROM_START( sjryuko1 ) ROM_LOAD( "12226-93.b11", 0x10000, 0x08000, CRC(210e6999) SHA1(5707cc613060b0070a822850b9afab8293f64dd7) ) //(epr- xxxxx - S16a location . S16b location - ROM_REGION16_BE( 0x80000, "gfx2", ROMREGION_ERASE00 ) // sprites + ROM_REGION16_BE( 0x80000, "sprites", ROMREGION_ERASE00 ) // sprites ROM_LOAD16_BYTE( "12232-10.b1", 0x00001, 0x08000, CRC(0adec62b) SHA1(cd798a7994cea73bffe78feac4e692d755074b1d) ) ROM_CONTINUE( 0x40001, 0x08000 ) ROM_LOAD16_BYTE( "12236-11.b5", 0x00000, 0x08000, CRC(286b9af8) SHA1(085251b8ce8b7fadf15b8ebd5872f0337adf142b) ) @@ -3197,7 +3197,7 @@ ROM_START( tetris ) ROM_LOAD( "epr-12203.rom", 0x10000, 0x10000, CRC(a6e58ec5) SHA1(5a6c43c989768270e0ab61cfaa5ef86d4607fe20) ) ROM_LOAD( "epr-12204.rom", 0x20000, 0x10000, CRC(0ae98e23) SHA1(f067b81b85f9e03a6373c7c53ff52d5395b8a985) ) - ROM_REGION16_BE( 0x10000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x10000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "epr-12169.b1", 0x00001, 0x8000, CRC(dacc6165) SHA1(87b1a7643e3630ff73b2b117752496e1ea5da23d) ) ROM_LOAD16_BYTE( "epr-12170.b5", 0x00000, 0x8000, CRC(87354e42) SHA1(e7fd55aee59b51d82cb9b619fbb815ad6839560c) ) @@ -3222,7 +3222,7 @@ ROM_START( tetris3 ) ROM_LOAD( "epr-12203.rom", 0x10000, 0x10000, CRC(a6e58ec5) SHA1(5a6c43c989768270e0ab61cfaa5ef86d4607fe20) ) ROM_LOAD( "epr-12204.rom", 0x20000, 0x10000, CRC(0ae98e23) SHA1(f067b81b85f9e03a6373c7c53ff52d5395b8a985) ) - ROM_REGION16_BE( 0x10000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x10000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "epr-12169.b1", 0x00001, 0x8000, CRC(dacc6165) SHA1(87b1a7643e3630ff73b2b117752496e1ea5da23d) ) ROM_LOAD16_BYTE( "epr-12170.b5", 0x00000, 0x8000, CRC(87354e42) SHA1(e7fd55aee59b51d82cb9b619fbb815ad6839560c) ) @@ -3295,7 +3295,7 @@ ROM_START( timescan1 ) ROM_LOAD( "epr-10544.94", 0x08000, 0x8000, CRC(84fb9a3a) SHA1(efde54cc9582f68e58cae05f717a4fc8f620c0fc) ) ROM_LOAD( "epr-10545.93", 0x10000, 0x8000, CRC(c8694bc0) SHA1(e48fc349ef454ded86141937f70b006e64da6b6b) ) - ROM_REGION16_BE( 0x40000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x40000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "epr-10548.10", 0x00001, 0x8000, CRC(aa150735) SHA1(b6e6ff9229c641e196fc7a0a2cf7aa362f554676) ) ROM_LOAD16_BYTE( "epr-10552.11", 0x00000, 0x8000, CRC(6fcbb9f7) SHA1(0a0fab930477d8b79e500263bbc80d3bf73778f8) ) ROM_LOAD16_BYTE( "epr-10549.17", 0x10001, 0x8000, CRC(2f59f067) SHA1(1fb64cce2f98ddcb5ecb662e63ea636a8da08bcd) ) @@ -3340,7 +3340,7 @@ ROM_START( wb31 ) ROM_LOAD( "epr-12087.bin", 0x10000, 0x10000, CRC(6f0396b7) SHA1(0a340f2b58e5ecfe504197a8fd2111181e868a3e) ) ROM_LOAD( "epr-12088.bin", 0x20000, 0x10000, CRC(ba8c0749) SHA1(7d996c7a1ad249c06ef7ec9c87a83710c98005d3) ) - ROM_REGION16_BE( 0x80000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x80000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "epr-12090.b1", 0x00001, 0x008000, CRC(aeeecfca) SHA1(496124b170a725ad863c741d4e021ab947511e4c) ) ROM_CONTINUE( 0x40001, 0x008000 ) ROM_LOAD16_BYTE( "epr-12094.b5", 0x00000, 0x008000, CRC(615e4927) SHA1(d23f164973afa770714e284a77ddf10f18cc596b) ) @@ -3378,7 +3378,7 @@ ROM_START( wb35 ) ROM_LOAD( "epr-12087.94", 0x10000, 0x10000, CRC(5fb761aa) SHA1(dcf88e68732a8ec122d0603d87f6ea1f1614adef) ) ROM_LOAD( "epr-12088.83", 0x20000, 0x10000, CRC(00579c39) SHA1(12acdea75e3d040d60a9f32d05fd9e0191d38f21) ) - ROM_REGION16_BE( 0x80000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x80000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "epr-12090.10", 0x00001, 0x008000, CRC(c85904c1) SHA1(e5af26ce870813bd5a88b430fc3881c7fcb63aef) ) ROM_CONTINUE( 0x40001, 0x008000 ) ROM_LOAD16_BYTE( "epr-12094.11", 0x00000, 0x008000, CRC(615e4927) SHA1(d23f164973afa770714e284a77ddf10f18cc596b) ) @@ -3415,7 +3415,7 @@ ROM_START( wb35a ) ROM_LOAD( "epr-12087.94", 0x10000, 0x10000, CRC(5fb761aa) SHA1(dcf88e68732a8ec122d0603d87f6ea1f1614adef) ) ROM_LOAD( "epr-12088.83", 0x20000, 0x10000, CRC(00579c39) SHA1(12acdea75e3d040d60a9f32d05fd9e0191d38f21) ) - ROM_REGION16_BE( 0x80000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x80000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "epr-12090.b1", 0x00001, 0x008000, CRC(aeeecfca) SHA1(496124b170a725ad863c741d4e021ab947511e4c) ) ROM_CONTINUE( 0x40001, 0x008000 ) ROM_LOAD16_BYTE( "epr-12094.b5", 0x00000, 0x008000, CRC(615e4927) SHA1(d23f164973afa770714e284a77ddf10f18cc596b) ) @@ -3460,8 +3460,6 @@ DRIVER_INIT_MEMBER(segas16a_state,generic) m_custom_io_w = write16_delegate(FUNC(segas16a_state::standard_io_w), this); // point globals to allocated memory regions - segaic16_spriteram_0 = reinterpret_cast<UINT16 *>(memshare("spriteram")->ptr()); - segaic16_paletteram = reinterpret_cast<UINT16 *>(memshare("paletteram")->ptr()); segaic16_tileram_0 = reinterpret_cast<UINT16 *>(memshare("tileram")->ptr()); segaic16_textram_0 = reinterpret_cast<UINT16 *>(memshare("textram")->ptr()); diff --git a/src/mame/drivers/segas16b.c b/src/mame/drivers/segas16b.c index 72e830d1073..1762771414b 100644 --- a/src/mame/drivers/segas16b.c +++ b/src/mame/drivers/segas16b.c @@ -933,7 +933,7 @@ void segas16b_state::memory_mapper(sega_315_5195_mapper_device &mapper, UINT8 in break; case 6: // 4k of paletteram - mapper.map_as_ram(0x00000, 0x01000, 0xfff000, "paletteram", write16_delegate(FUNC(segas16b_state::legacy_wrapper<segaic16_paletteram_w>), this)); + mapper.map_as_ram(0x00000, 0x01000, 0xfff000, "paletteram", write16_delegate(FUNC(segas16b_state::paletteram_w), this)); break; case 5: // 64k of tileram + 4k of textram @@ -942,7 +942,7 @@ void segas16b_state::memory_mapper(sega_315_5195_mapper_device &mapper, UINT8 in break; case 4: // 2k of spriteram - mapper.map_as_ram(0x00000, 0x00800, 0xfff800, "spriteram", write16_delegate()); + mapper.map_as_ram(0x00000, 0x00800, 0xfff800, "sprites", write16_delegate()); break; case 3: // 16k or 256k of work RAM @@ -1050,7 +1050,7 @@ READ16_MEMBER( segas16b_state::rom_5797_bank_math_r ) // compare registers return m_cmptimer_1->read(space, offset, mem_mask); } - return segaic16_open_bus_r(&space, 0, mem_mask); + return open_bus_r(space, 0, mem_mask); } @@ -1125,7 +1125,7 @@ READ16_MEMBER( segas16b_state::standard_io_r ) return ioport((offset & 1) ? "DSW1" : "DSW2")->read(); } logerror("%06X:standard_io_r - unknown read access to address %04X\n", cpu_get_pc(&space.device()), offset * 2); - return segaic16_open_bus_r(&space, 0, mem_mask); + return open_bus_r(space, 0, mem_mask); } @@ -1150,7 +1150,7 @@ WRITE16_MEMBER( segas16b_state::standard_io_w ) // D0 : Output to coin counter 1 // segaic16_tilemap_set_flip(machine(), 0, data & 0x40); - segaic16_sprites_set_flip(machine(), 0, data & 0x40); + m_sprites->set_flip(data & 0x40); if (!m_disable_screen_blanking) segaic16_set_display_enable(machine(), data & 0x20); set_led_status(machine(), 1, data & 0x08); @@ -1321,7 +1321,7 @@ void segas16b_state::machine_reset() static const UINT8 alternate_banklist[] = { 0,255,255,255, 255,255,255,3, 255,255,255,2, 255,1,0,255 }; const UINT8 *banklist = (m_romboard == ROM_BOARD_171_5358 || m_romboard == ROM_BOARD_171_5358_SMALL) ? alternate_banklist : default_banklist; for (int banknum = 0; banknum < 16; banknum++) - segaic16_sprites_set_bank(machine(), 0, banknum, banklist[banknum]); + m_sprites->set_bank(banknum, banklist[banknum]); } @@ -1730,7 +1730,7 @@ static ADDRESS_MAP_START( system16b_map, AS_PROGRAM, 16, segas16b_state ) // these get overwritten by the memory mapper above, but we put them here // so they are properly allocated and tracked for saving - AM_RANGE(0x100000, 0x1007ff) AM_RAM AM_SHARE("spriteram") + AM_RANGE(0x100000, 0x1007ff) AM_RAM AM_SHARE("sprites") AM_RANGE(0x200000, 0x200fff) AM_RAM AM_SHARE("paletteram") AM_RANGE(0x300000, 0x30ffff) AM_RAM AM_SHARE("tileram") AM_RANGE(0x400000, 0x400fff) AM_RAM AM_SHARE("textram") @@ -1744,7 +1744,7 @@ static ADDRESS_MAP_START( system16c_map, AS_PROGRAM, 16, segas16b_state ) // these get overwritten by the memory mapper above, but we put them here // so they are properly allocated and tracked for saving - AM_RANGE(0x100000, 0x1007ff) AM_RAM AM_SHARE("spriteram") + AM_RANGE(0x100000, 0x1007ff) AM_RAM AM_SHARE("sprites") AM_RANGE(0x200000, 0x200fff) AM_RAM AM_SHARE("paletteram") AM_RANGE(0x300000, 0x30ffff) AM_RAM AM_SHARE("tileram") AM_RANGE(0x400000, 0x400fff) AM_RAM AM_SHARE("textram") @@ -3304,7 +3304,7 @@ static MACHINE_CONFIG_START( system16b, segas16b_state ) MCFG_SCREEN_RAW_PARAMS(MASTER_CLOCK_25MHz/4, 400, 0, 320, 262, 0, 224) MCFG_SCREEN_UPDATE_DRIVER(segas16b_state, screen_update) - MCFG_SEGA16SP_ADD_16B("segaspr1") + MCFG_SEGA_SYS16B_SPRITES_ADD("sprites") // sound hardware MCFG_SPEAKER_STANDARD_MONO("mono") @@ -3420,7 +3420,7 @@ ROM_START( aceattac ) ROM_LOAD( "epr-11494.b10", 0x10000, 0x10000, CRC(b67971ab) SHA1(95cb6927baf425bcc290832ea9741b19852c7a1b) ) ROM_LOAD( "epr-11495.b11", 0x20000, 0x10000, CRC(b687ab61) SHA1(b08130a9d777c918972895136b1bf520d7117114) ) - ROM_REGION16_BE( 0x80000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x80000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "epr-11501.b1", 0x00001, 0x10000, CRC(09179ead) SHA1(3e6bf04e1e9ea867d087a47ff04ad0a064a8e299) ) ROM_LOAD16_BYTE( "epr-11505.b5", 0x00000, 0x10000, CRC(b67f1ecf) SHA1(3a26cdf91e5a1a11c1a8857e713a9e00cc1bfce0) ) ROM_LOAD16_BYTE( "epr-11502.b2", 0x20001, 0x10000, CRC(a3ee36b8) SHA1(bc946ad67b8ad09d947465ab73160885a4a57be5) ) @@ -3460,7 +3460,7 @@ ROM_START( aliensyn ) ROM_LOAD( "epr-10703.b10", 0x10000, 0x10000, CRC(6b6dd9f5) SHA1(964409c6630caa13caf7d644d0c6fb071860b61b) ) ROM_LOAD( "epr-10704.b11", 0x20000, 0x10000, CRC(911e7ebc) SHA1(f03d3d3a09d19f7b705f9cb29f73140a3073463f) ) - ROM_REGION16_BE( 0x080000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x080000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "epr-10709.b1", 0x00001, 0x10000, CRC(addf0a90) SHA1(a92c9531f1817763773471ce63f566b9e88360a0) ) ROM_LOAD16_BYTE( "epr-10713.b5", 0x00000, 0x10000, CRC(ececde3a) SHA1(9c12d4665179bf433c42f5ddc8a043ad592aa90e) ) ROM_LOAD16_BYTE( "epr-10710.b2", 0x20001, 0x10000, CRC(992369eb) SHA1(c6796acf6807e9ba4c3d241903653f91adf4764e) ) @@ -3499,7 +3499,7 @@ ROM_START( aliensyn3 ) ROM_LOAD( "epr-10703.b10", 0x10000, 0x10000, CRC(6b6dd9f5) SHA1(964409c6630caa13caf7d644d0c6fb071860b61b) ) ROM_LOAD( "epr-10704.b11", 0x20000, 0x10000, CRC(911e7ebc) SHA1(f03d3d3a09d19f7b705f9cb29f73140a3073463f) ) - ROM_REGION16_BE( 0x080000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x080000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "epr-10709.b1", 0x00001, 0x10000, CRC(addf0a90) SHA1(a92c9531f1817763773471ce63f566b9e88360a0) ) ROM_LOAD16_BYTE( "epr-10713.b5", 0x00000, 0x10000, CRC(ececde3a) SHA1(9c12d4665179bf433c42f5ddc8a043ad592aa90e) ) ROM_LOAD16_BYTE( "epr-10710.b2", 0x20001, 0x10000, CRC(992369eb) SHA1(c6796acf6807e9ba4c3d241903653f91adf4764e) ) @@ -3542,7 +3542,7 @@ ROM_START( aliensynj ) ROM_LOAD( "epr-10703.b10", 0x10000, 0x10000, CRC(6b6dd9f5) SHA1(964409c6630caa13caf7d644d0c6fb071860b61b) ) ROM_LOAD( "epr-10704.b11", 0x20000, 0x10000, CRC(911e7ebc) SHA1(f03d3d3a09d19f7b705f9cb29f73140a3073463f) ) - ROM_REGION16_BE( 0x080000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x080000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "epr-10709.b1", 0x00001, 0x10000, CRC(addf0a90) SHA1(a92c9531f1817763773471ce63f566b9e88360a0) ) ROM_LOAD16_BYTE( "epr-10713.b5", 0x00000, 0x10000, CRC(ececde3a) SHA1(9c12d4665179bf433c42f5ddc8a043ad592aa90e) ) ROM_LOAD16_BYTE( "epr-10710.b2", 0x20001, 0x10000, CRC(992369eb) SHA1(c6796acf6807e9ba4c3d241903653f91adf4764e) ) @@ -3581,7 +3581,7 @@ ROM_START( altbeast ) ROM_LOAD( "opr-11675.a15", 0x20000, 0x20000, CRC(2ef2f144) SHA1(38d22d609db2d9b6067b5d12f6499436de4605cb) ) ROM_LOAD( "opr-11676.a16", 0x40000, 0x20000, CRC(0c04acac) SHA1(87fe2a0dd9913f9550e9b4cbc7e7465b61640e07) ) - ROM_REGION16_BE( 0x100000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x100000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "epr-11677.b1", 0x00001, 0x20000, CRC(a01425cd) SHA1(72be5ec29e476601f9bf6aaedef9b73cedeb42f0) ) ROM_LOAD16_BYTE( "epr-11681.b5", 0x00000, 0x20000, CRC(d9e03363) SHA1(995a7c6a8f0c61468b57a3bb407461a2a3ae8adc) ) ROM_LOAD16_BYTE( "epr-11678.b2", 0x40001, 0x20000, CRC(17a9fc53) SHA1(85a9a605742ae5aab86db37189b9ee4d54c70e56) ) @@ -3618,7 +3618,7 @@ ROM_START( altbeastj ) ROM_LOAD( "epr-11724.a16", 0x80000, 0x10000, CRC(6f2ed50a) SHA1(55d0c4299e7240b0ef5316b48db7a158145c76ab) ) // plane 3 ROM_LOAD( "epr-11738.b16", 0xa0000, 0x10000, CRC(de3d6d02) SHA1(428811f21c68761022521a17fc4716f6e7214b20) ) - ROM_REGION16_BE( 0x200000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x200000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "epr-11725.b1", 0x000001, 0x010000, CRC(f8b3684e) SHA1(3de2685cae5fb3c954b8440fafce313072747469) ) ROM_LOAD16_BYTE( "epr-11729.b5", 0x000000, 0x010000, CRC(ae3c2793) SHA1(c4f46861ea63ffa3c038a1ef931479b94e5382df) ) ROM_LOAD16_BYTE( "epr-11726.b2", 0x040001, 0x010000, CRC(3cce5419) SHA1(fccdbd6d05f5927272e7d6e5f997418d4fa2baf5) ) @@ -3661,7 +3661,7 @@ ROM_START( altbeast6 ) ROM_LOAD( "epr-11724.a16", 0x80000, 0x10000, CRC(6f2ed50a) SHA1(55d0c4299e7240b0ef5316b48db7a158145c76ab) ) // plane 3 ROM_LOAD( "epr-11738.b16", 0xa0000, 0x10000, CRC(de3d6d02) SHA1(428811f21c68761022521a17fc4716f6e7214b20) ) - ROM_REGION16_BE( 0x200000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x200000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "epr-11725.b1", 0x000001, 0x010000, CRC(f8b3684e) SHA1(3de2685cae5fb3c954b8440fafce313072747469) ) ROM_LOAD16_BYTE( "epr-11729.b5", 0x000000, 0x010000, CRC(ae3c2793) SHA1(c4f46861ea63ffa3c038a1ef931479b94e5382df) ) ROM_LOAD16_BYTE( "epr-11726.b2", 0x040001, 0x010000, CRC(3cce5419) SHA1(fccdbd6d05f5927272e7d6e5f997418d4fa2baf5) ) @@ -3710,7 +3710,7 @@ ROM_START( altbeast5 ) ROM_LOAD( "epr-11724.a16", 0x80000, 0x10000, CRC(6f2ed50a) SHA1(55d0c4299e7240b0ef5316b48db7a158145c76ab) ) // plane 3 ROM_LOAD( "epr-11738.b16", 0xa0000, 0x10000, CRC(de3d6d02) SHA1(428811f21c68761022521a17fc4716f6e7214b20) ) - ROM_REGION16_BE( 0x200000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x200000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "epr-11725.b1", 0x000001, 0x010000, CRC(f8b3684e) SHA1(3de2685cae5fb3c954b8440fafce313072747469) ) ROM_LOAD16_BYTE( "epr-11729.b5", 0x000000, 0x010000, CRC(ae3c2793) SHA1(c4f46861ea63ffa3c038a1ef931479b94e5382df) ) ROM_LOAD16_BYTE( "epr-11726.b2", 0x040001, 0x010000, CRC(3cce5419) SHA1(fccdbd6d05f5927272e7d6e5f997418d4fa2baf5) ) @@ -3751,7 +3751,7 @@ ROM_START( altbeast4 ) ROM_LOAD( "epr-11724.a16", 0x80000, 0x10000, CRC(6f2ed50a) SHA1(55d0c4299e7240b0ef5316b48db7a158145c76ab) ) // plane 3 ROM_LOAD( "epr-11738.b16", 0xa0000, 0x10000, CRC(de3d6d02) SHA1(428811f21c68761022521a17fc4716f6e7214b20) ) - ROM_REGION16_BE( 0x200000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x200000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "epr-11725.b1", 0x000001, 0x010000, CRC(f8b3684e) SHA1(3de2685cae5fb3c954b8440fafce313072747469) ) ROM_LOAD16_BYTE( "epr-11729.b5", 0x000000, 0x010000, CRC(ae3c2793) SHA1(c4f46861ea63ffa3c038a1ef931479b94e5382df) ) ROM_LOAD16_BYTE( "epr-11726.b2", 0x040001, 0x010000, CRC(3cce5419) SHA1(fccdbd6d05f5927272e7d6e5f997418d4fa2baf5) ) @@ -3797,7 +3797,7 @@ ROM_START( altbeastj3 ) ROM_LOAD( "epr-11724.a16", 0x80000, 0x10000, CRC(6f2ed50a) SHA1(55d0c4299e7240b0ef5316b48db7a158145c76ab) ) // plane 3 ROM_LOAD( "epr-11738.b16", 0xa0000, 0x10000, CRC(de3d6d02) SHA1(428811f21c68761022521a17fc4716f6e7214b20) ) - ROM_REGION16_BE( 0x200000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x200000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "epr-11725.b1", 0x000001, 0x010000, CRC(f8b3684e) SHA1(3de2685cae5fb3c954b8440fafce313072747469) ) ROM_LOAD16_BYTE( "epr-11729.b5", 0x000000, 0x010000, CRC(ae3c2793) SHA1(c4f46861ea63ffa3c038a1ef931479b94e5382df) ) ROM_LOAD16_BYTE( "epr-11726.b2", 0x040001, 0x010000, CRC(3cce5419) SHA1(fccdbd6d05f5927272e7d6e5f997418d4fa2baf5) ) @@ -3835,7 +3835,7 @@ ROM_START( altbeast2 ) ROM_LOAD( "opr-11675.a15", 0x20000, 0x20000, CRC(2ef2f144) SHA1(38d22d609db2d9b6067b5d12f6499436de4605cb) ) ROM_LOAD( "opr-11676.a16", 0x40000, 0x20000, CRC(0c04acac) SHA1(87fe2a0dd9913f9550e9b4cbc7e7465b61640e07) ) - ROM_REGION16_BE( 0x100000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x100000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "epr-11677.b1", 0x00001, 0x20000, CRC(a01425cd) SHA1(72be5ec29e476601f9bf6aaedef9b73cedeb42f0) ) ROM_LOAD16_BYTE( "epr-11681.b5", 0x00000, 0x20000, CRC(d9e03363) SHA1(995a7c6a8f0c61468b57a3bb407461a2a3ae8adc) ) ROM_LOAD16_BYTE( "epr-11678.b2", 0x40001, 0x20000, CRC(17a9fc53) SHA1(85a9a605742ae5aab86db37189b9ee4d54c70e56) ) @@ -3872,7 +3872,7 @@ ROM_START( altbeastj1 ) ROM_LOAD( "opr-11675.a15", 0x20000, 0x20000, CRC(2ef2f144) SHA1(38d22d609db2d9b6067b5d12f6499436de4605cb) ) ROM_LOAD( "opr-11676.a16", 0x40000, 0x20000, CRC(0c04acac) SHA1(87fe2a0dd9913f9550e9b4cbc7e7465b61640e07) ) - ROM_REGION16_BE( 0x100000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x100000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "epr-11677.b1", 0x00001, 0x20000, CRC(a01425cd) SHA1(72be5ec29e476601f9bf6aaedef9b73cedeb42f0) ) ROM_LOAD16_BYTE( "epr-11681.b5", 0x00000, 0x20000, CRC(d9e03363) SHA1(995a7c6a8f0c61468b57a3bb407461a2a3ae8adc) ) ROM_LOAD16_BYTE( "epr-11678.b2", 0x40001, 0x20000, CRC(17a9fc53) SHA1(85a9a605742ae5aab86db37189b9ee4d54c70e56) ) @@ -3956,7 +3956,7 @@ ROM_START( aurail ) ROM_LOAD( "mpr-13452.a16", 0x80000, 0x20000, CRC(047bde5e) SHA1(e759baedcbb637a6c14af461b8a492554cadc9e4) ) // plane 3 ROM_LOAD( "mpr-13467.b16", 0xa0000, 0x20000, CRC(6309fec4) SHA1(f90c9679bade3cfbaa7949e412410c29d5bfa4d3) ) - ROM_REGION16_BE( 0x200000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x200000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "mpr-13453.b1", 0x000001, 0x020000, CRC(5fa0a9f8) SHA1(d9d67cc006a608d48e37aa89359f1a9403172b00) ) ROM_LOAD16_BYTE( "mpr-13457.b5", 0x000000, 0x020000, CRC(0d1b54da) SHA1(c7a6393f9e13adabe93b7a86aa7845c5f4d188f1) ) ROM_LOAD16_BYTE( "mpr-13454.b2", 0x040001, 0x020000, CRC(5f6b33b1) SHA1(5d397bdaa2c7a9ce82cc9134bfeb78418dc613b0) ) @@ -3999,7 +3999,7 @@ ROM_START( aurail1 ) ROM_LOAD( "mpr-13452.a16", 0x80000, 0x20000, CRC(047bde5e) SHA1(e759baedcbb637a6c14af461b8a492554cadc9e4) ) // plane 3 ROM_LOAD( "mpr-13467.b16", 0xa0000, 0x20000, CRC(6309fec4) SHA1(f90c9679bade3cfbaa7949e412410c29d5bfa4d3) ) - ROM_REGION16_BE( 0x200000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x200000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "mpr-13453.b1", 0x000001, 0x020000, CRC(5fa0a9f8) SHA1(d9d67cc006a608d48e37aa89359f1a9403172b00) ) ROM_LOAD16_BYTE( "mpr-13457.b5", 0x000000, 0x020000, CRC(0d1b54da) SHA1(c7a6393f9e13adabe93b7a86aa7845c5f4d188f1) ) ROM_LOAD16_BYTE( "mpr-13454.b2", 0x040001, 0x020000, CRC(5f6b33b1) SHA1(5d397bdaa2c7a9ce82cc9134bfeb78418dc613b0) ) @@ -4066,7 +4066,7 @@ ROM_START( aurailj ) ROM_LOAD( "mpr-13452.a16", 0x80000, 0x20000, CRC(047bde5e) SHA1(e759baedcbb637a6c14af461b8a492554cadc9e4) ) // plane 3 ROM_LOAD( "mpr-13467.b16", 0xa0000, 0x20000, CRC(6309fec4) SHA1(f90c9679bade3cfbaa7949e412410c29d5bfa4d3) ) - ROM_REGION16_BE( 0x200000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x200000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "mpr-13453.b1", 0x000001, 0x020000, CRC(5fa0a9f8) SHA1(d9d67cc006a608d48e37aa89359f1a9403172b00) ) ROM_LOAD16_BYTE( "mpr-13457.b5", 0x000000, 0x020000, CRC(0d1b54da) SHA1(c7a6393f9e13adabe93b7a86aa7845c5f4d188f1) ) ROM_LOAD16_BYTE( "mpr-13454.b2", 0x040001, 0x020000, CRC(5f6b33b1) SHA1(5d397bdaa2c7a9ce82cc9134bfeb78418dc613b0) ) @@ -4116,7 +4116,7 @@ ROM_START( bayroute ) ROM_LOAD( "opr-12463.a15", 0x10000, 0x10000, CRC(62f8200d) SHA1(a5a0035249f339396b33f8a908d393777e8951c4) ) ROM_LOAD( "opr-12464.a16", 0x20000, 0x10000, CRC(c8c59703) SHA1(3a4f45b88990d27c55ddfde5fc93496954868200) ) - ROM_REGION16_BE( 0x80000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x80000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "mpr-12465.b1", 0x00001, 0x20000, CRC(11d61b45) SHA1(01678e07ffcafb8c161b52763f2183dc281c7578) ) ROM_LOAD16_BYTE( "mpr-12467.b5", 0x00000, 0x20000, CRC(c3b4e4c0) SHA1(2d8dbea5278b3fac03c7ad8749f931d36cc8f341) ) ROM_LOAD16_BYTE( "mpr-12466.b2", 0x40001, 0x20000, CRC(a57f236f) SHA1(c83219cdfcee10a4fdffcbf410808f161a2b1aef) ) @@ -4148,7 +4148,7 @@ ROM_START( bayroutej ) ROM_LOAD( "opr-12463.a15", 0x10000, 0x10000, CRC(62f8200d) SHA1(a5a0035249f339396b33f8a908d393777e8951c4) ) ROM_LOAD( "opr-12464.a16", 0x20000, 0x10000, CRC(c8c59703) SHA1(3a4f45b88990d27c55ddfde5fc93496954868200) ) - ROM_REGION16_BE( 0x80000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x80000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "mpr-12465.b1", 0x00001, 0x20000, CRC(11d61b45) SHA1(01678e07ffcafb8c161b52763f2183dc281c7578) ) ROM_LOAD16_BYTE( "mpr-12467.b5", 0x00000, 0x20000, CRC(c3b4e4c0) SHA1(2d8dbea5278b3fac03c7ad8749f931d36cc8f341) ) ROM_LOAD16_BYTE( "mpr-12466.b2", 0x40001, 0x20000, CRC(a57f236f) SHA1(c83219cdfcee10a4fdffcbf410808f161a2b1aef) ) @@ -4179,7 +4179,7 @@ ROM_START( bayroute1 ) ROM_LOAD( "opr-12463.a15", 0x10000, 0x10000, CRC(62f8200d) SHA1(a5a0035249f339396b33f8a908d393777e8951c4) ) ROM_LOAD( "opr-12464.a16", 0x20000, 0x10000, CRC(c8c59703) SHA1(3a4f45b88990d27c55ddfde5fc93496954868200) ) - ROM_REGION16_BE( 0x080000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x080000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "br_obj0o.b1", 0x00001, 0x10000, CRC(098a5e82) SHA1(c5922f418773bc3629071e584457839d67a370e9) ) ROM_LOAD16_BYTE( "br_obj0e.b5", 0x00000, 0x10000, CRC(85238af9) SHA1(39989a8d9b60c6d55272b5e2c213341a563dd993) ) ROM_LOAD16_BYTE( "br_obj1o.b2", 0x20001, 0x10000, CRC(cc641da1) SHA1(28f8a6502702cb9e2cc7f3e98f6c5d201f462fa3) ) @@ -4231,7 +4231,7 @@ ROM_START( bullet ) ROM_LOAD( "epr-10995.b10", 0x10000, 0x10000, CRC(6b97aff1) SHA1(323bafe43a703476f6f4e68b46ec86bb9152f88e) ) ROM_LOAD( "epr-10996.b11", 0x20000, 0x10000, CRC(501bddd6) SHA1(545273b1b874b3e68d23b0dcae81c8531bd98756) ) - ROM_REGION16_BE( 0x80000, "gfx2", ROMREGION_ERASE00 ) // sprites + ROM_REGION16_BE( 0x80000, "sprites", ROMREGION_ERASE00 ) // sprites ROM_LOAD16_BYTE( "epr-10999.b1", 0x00001, 0x010000, CRC(119f0008) SHA1(6a39b537bb58ea19ed3b0322ebca37e6574289fd) ) ROM_LOAD16_BYTE( "epr-11003.b5", 0x00000, 0x010000, CRC(2f429089) SHA1(08bf9d9c15fafbcb26604ff30be367ecf25404b2) ) ROM_LOAD16_BYTE( "epr-11000.b2", 0x20001, 0x010000, CRC(f5482bbe) SHA1(d8482ba73622798b15e78ab2c123d0fd4c33480a) ) @@ -4272,7 +4272,7 @@ ROM_START( cotton ) ROM_LOAD( "opr-13864.a16", 0x80000, 0x20000, CRC(d2b175bf) SHA1(897b7c794d0e7229ea5e9a682f64266a947a818f) ) ROM_LOAD( "opr-13879.b16", 0xa0000, 0x20000, CRC(b9d62531) SHA1(e8c5e7b93339c00f75a3b66ce18f7838255577be) ) - ROM_REGION16_BE( 0x200000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x200000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "opr-13869.b5", 0x000000, 0x20000, CRC(ab4b3468) SHA1(3071654a295152d609d2c2c1d4153b5ba3f174d5) ) ROM_LOAD16_BYTE( "opr-13865.b1", 0x000001, 0x20000, CRC(7024f404) SHA1(4b2f9cdfdd97218797a3e386106e53f713b8650d) ) ROM_LOAD16_BYTE( "opr-13870.b6", 0x040000, 0x20000, CRC(69b41ac3) SHA1(4c5a85e5a5ca9f8260557d4e97eb091dd857d63a) ) @@ -4318,7 +4318,7 @@ ROM_START( cottonu ) ROM_LOAD( "opr-13864.a16", 0x80000, 0x20000, CRC(d2b175bf) SHA1(897b7c794d0e7229ea5e9a682f64266a947a818f) ) ROM_LOAD( "opr-13879.b16", 0xa0000, 0x20000, CRC(b9d62531) SHA1(e8c5e7b93339c00f75a3b66ce18f7838255577be) ) - ROM_REGION16_BE( 0x200000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x200000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "opr-13869.b5", 0x000000, 0x20000, CRC(ab4b3468) SHA1(3071654a295152d609d2c2c1d4153b5ba3f174d5) ) ROM_LOAD16_BYTE( "opr-13865.b1", 0x000001, 0x20000, CRC(7024f404) SHA1(4b2f9cdfdd97218797a3e386106e53f713b8650d) ) ROM_LOAD16_BYTE( "opr-13870.b6", 0x040000, 0x20000, CRC(69b41ac3) SHA1(4c5a85e5a5ca9f8260557d4e97eb091dd857d63a) ) @@ -4365,7 +4365,7 @@ ROM_START( cottonj ) ROM_LOAD( "opr-13864.a16", 0x80000, 0x20000, CRC(d2b175bf) SHA1(897b7c794d0e7229ea5e9a682f64266a947a818f) ) ROM_LOAD( "opr-13879.b16", 0xa0000, 0x20000, CRC(b9d62531) SHA1(e8c5e7b93339c00f75a3b66ce18f7838255577be) ) - ROM_REGION16_BE( 0x200000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x200000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "opr-13869.b5", 0x000000, 0x20000, CRC(ab4b3468) SHA1(3071654a295152d609d2c2c1d4153b5ba3f174d5) ) ROM_LOAD16_BYTE( "opr-13865.b1", 0x000001, 0x20000, CRC(7024f404) SHA1(4b2f9cdfdd97218797a3e386106e53f713b8650d) ) ROM_LOAD16_BYTE( "opr-13870.b6", 0x040000, 0x20000, CRC(69b41ac3) SHA1(4c5a85e5a5ca9f8260557d4e97eb091dd857d63a) ) @@ -4410,7 +4410,7 @@ ROM_START( dunkshot ) ROM_LOAD( "epr-10486.b10", 0x08000, 0x8000, CRC(311d973c) SHA1(c4765917ba788ed45a801499f3d873a86c418eb8) ) ROM_LOAD( "epr-10487.b11", 0x10000, 0x8000, CRC(a8fb179f) SHA1(8a748d537b3d327c41d6dac17342de9be068e53b) ) - ROM_REGION16_BE( 0x80000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x80000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "epr-10481.b5", 0x00000, 0x8000, CRC(feb04bc9) SHA1(233dc8e3b887a88ac114723d58a909a58f0ae771) ) ROM_RELOAD( 0x10000, 0x8000 ) ROM_LOAD16_BYTE( "epr-10477.b1", 0x00001, 0x8000, CRC(f9d3b2cb) SHA1(b530fe16882c718122bfd1de098f39e54993de28) ) @@ -4479,7 +4479,7 @@ ROM_START( ddux ) ROM_LOAD( "mpr-11918.a15", 0x10000, 0x10000, CRC(c731db95) SHA1(b3b9cbd772f7bfd35355bcb2a7c0801b61eaf19f) ) ROM_LOAD( "mpr-11919.a16", 0x20000, 0x10000, CRC(64d5a491) SHA1(686151c9a58f524f786f52c03f086cdaa5728233) ) - ROM_REGION16_BE( 0x100000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x100000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "mpr-11920.b1", 0x00001, 0x020000, CRC(e5d1e3cd) SHA1(d8c0f40dab00f1b09f6d018597fd45147f9ca3f6) ) ROM_LOAD16_BYTE( "mpr-11922.b5", 0x00000, 0x020000, CRC(70b0c4dd) SHA1(b67acab0c6a0f5051fc3fcda2476b8834f65b376) ) ROM_LOAD16_BYTE( "mpr-11921.b2", 0x40001, 0x020000, CRC(61d2358c) SHA1(216fd295ff9d56976f9b1c465a48806be843dd04) ) @@ -4509,7 +4509,7 @@ ROM_START( ddux1 ) ROM_LOAD( "mpr-11918.a15", 0x10000, 0x10000, CRC(c731db95) SHA1(b3b9cbd772f7bfd35355bcb2a7c0801b61eaf19f) ) ROM_LOAD( "mpr-11919.a16", 0x20000, 0x10000, CRC(64d5a491) SHA1(686151c9a58f524f786f52c03f086cdaa5728233) ) - ROM_REGION16_BE( 0x100000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x100000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "mpr-11920.b1", 0x00001, 0x020000, CRC(e5d1e3cd) SHA1(d8c0f40dab00f1b09f6d018597fd45147f9ca3f6) ) ROM_LOAD16_BYTE( "mpr-11922.b5", 0x00000, 0x020000, CRC(70b0c4dd) SHA1(b67acab0c6a0f5051fc3fcda2476b8834f65b376) ) ROM_LOAD16_BYTE( "mpr-11921.b2", 0x40001, 0x020000, CRC(61d2358c) SHA1(216fd295ff9d56976f9b1c465a48806be843dd04) ) @@ -4543,7 +4543,7 @@ ROM_START( eswat ) ROM_LOAD( "mpr-12625.b12", 0x40000, 0x40000, CRC(3b8c757e) SHA1(0b66e8446d059a12e47e2a6fe8f0a333245bb95c) ) ROM_LOAD( "mpr-12626.b13", 0x80000, 0x40000, CRC(3efca25c) SHA1(0d866bf53a16b52719f73081e933f4db27d72ece) ) - ROM_REGION16_BE( 0x1c0000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x1c0000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "mpr-12618.b1", 0x000001, 0x20000, CRC(0d1530bf) SHA1(bb8626cd98761c1c20cee117d00315c85621ba6a) ) ROM_CONTINUE( 0x100001, 0x20000 ) ROM_LOAD16_BYTE( "mpr-12621.b4", 0x000000, 0x20000, CRC(18ff0799) SHA1(5417223378aef16ee2b4f438d1f8f11a23fe7265) ) @@ -4581,7 +4581,7 @@ ROM_START( eswatu ) ROM_LOAD( "mpr-12625.b12", 0x40000, 0x40000, CRC(3b8c757e) SHA1(0b66e8446d059a12e47e2a6fe8f0a333245bb95c) ) ROM_LOAD( "mpr-12626.b13", 0x80000, 0x40000, CRC(3efca25c) SHA1(0d866bf53a16b52719f73081e933f4db27d72ece) ) - ROM_REGION16_BE( 0x1c0000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x1c0000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "mpr-12618.b1", 0x000001, 0x20000, CRC(0d1530bf) SHA1(bb8626cd98761c1c20cee117d00315c85621ba6a) ) ROM_CONTINUE( 0x100001, 0x20000 ) ROM_LOAD16_BYTE( "mpr-12621.b4", 0x000000, 0x20000, CRC(18ff0799) SHA1(5417223378aef16ee2b4f438d1f8f11a23fe7265) ) @@ -4621,7 +4621,7 @@ ROM_START( eswatj ) ROM_LOAD( "mpr-12625.b12", 0x40000, 0x40000, CRC(3b8c757e) SHA1(0b66e8446d059a12e47e2a6fe8f0a333245bb95c) ) ROM_LOAD( "mpr-12626.b13", 0x80000, 0x40000, CRC(3efca25c) SHA1(0d866bf53a16b52719f73081e933f4db27d72ece) ) - ROM_REGION16_BE( 0x1c0000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x1c0000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "mpr-12618.b1", 0x000001, 0x20000, CRC(0d1530bf) SHA1(bb8626cd98761c1c20cee117d00315c85621ba6a) ) ROM_CONTINUE( 0x100001, 0x20000 ) ROM_LOAD16_BYTE( "mpr-12621.b4", 0x000000, 0x20000, CRC(18ff0799) SHA1(5417223378aef16ee2b4f438d1f8f11a23fe7265) ) @@ -4665,7 +4665,7 @@ ROM_START( exctleag ) ROM_LOAD( "epr-11943.b10", 0x10000, 0x10000, CRC(d97c8982) SHA1(3e604af1771caba3aa213796c4a0812a5e352580) ) ROM_LOAD( "epr-11944.b11", 0x20000, 0x10000, CRC(a75cae80) SHA1(17c148a33b09b5403e68f5d96e506545c2ced206) ) - ROM_REGION16_BE( 0x80000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x80000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "epr-11950.b01", 0x00001, 0x10000, CRC(af497849) SHA1(c5fdca8d3b1d83e3d377a49ecdc0fc53714afc09) ) ROM_LOAD16_BYTE( "epr-11954.b05", 0x00000, 0x10000, CRC(5fa2106c) SHA1(2f2620fa52d07667dff4720fea32a6615d99e522) ) ROM_LOAD16_BYTE( "epr-11951.b02", 0x20001, 0x10000, CRC(c04fa974) SHA1(b1a4fb8522126113d7857d559f169f09c5f51a13) ) @@ -4730,7 +4730,7 @@ ROM_START( fpoint ) ROM_LOAD( "opr-12594.a15", 0x10000, 0x10000, CRC(8bfc4815) SHA1(08d28b65e5024c592a9a289b270774ef5c553cbf) ) ROM_LOAD( "opr-12595.a16", 0x20000, 0x10000, CRC(5b18d60b) SHA1(8e9c81635dcefa52d1cf53c2937ae560191b5202) ) - ROM_REGION16_BE( 0x20000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x20000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "opr-12596.b1", 0x00001, 0x10000, CRC(4a4041f3) SHA1(4c52b30223d8aa80ccdbb196098cb17e64ad6583) ) ROM_LOAD16_BYTE( "opr-12597.b5", 0x00000, 0x10000, CRC(6961e676) SHA1(7639d2da086b57a9a8d6100fdacf40d97d7c4772) ) @@ -4775,7 +4775,7 @@ ROM_START( fpoint1 ) ROM_LOAD( "opr-12594.a15", 0x10000, 0x10000, CRC(8bfc4815) SHA1(08d28b65e5024c592a9a289b270774ef5c553cbf) ) ROM_LOAD( "opr-12595.a16", 0x20000, 0x10000, CRC(5b18d60b) SHA1(8e9c81635dcefa52d1cf53c2937ae560191b5202) ) - ROM_REGION16_BE( 0x20000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x20000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "opr-12596.b1", 0x00001, 0x10000, CRC(4a4041f3) SHA1(4c52b30223d8aa80ccdbb196098cb17e64ad6583) ) ROM_LOAD16_BYTE( "opr-12597.b5", 0x00000, 0x10000, CRC(6961e676) SHA1(7639d2da086b57a9a8d6100fdacf40d97d7c4772) ) @@ -4802,7 +4802,7 @@ ROM_START( goldnaxe ) ROM_LOAD( "epr-12386.ic20", 0x20000, 0x20000, CRC(25d7d779) SHA1(2de14a76a5176d5abc7e7f7f723146c620927610) ) ROM_LOAD( "epr-12387.ic21", 0x40000, 0x20000, CRC(c7fcadf3) SHA1(5f0fd600a75a02749935af21e1e0d2c714c6417e) ) - ROM_REGION16_BE( 0x1c0000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x1c0000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "mpr-12378.ic9", 0x000001, 0x20000, CRC(119e5a82) SHA1(261ed2bc4ebac7142e2ecca9f03c91242e792a98) ) ROM_CONTINUE( 0x100001, 0x20000 ) ROM_LOAD16_BYTE( "mpr-12379.ic12", 0x000000, 0x20000, CRC(1a0e8c57) SHA1(674f1ae7db632876fff346e76786801ae19d9799) ) @@ -4843,7 +4843,7 @@ ROM_START( goldnaxeu ) ROM_LOAD( "epr-12386.ic20", 0x20000, 0x20000, CRC(25d7d779) SHA1(2de14a76a5176d5abc7e7f7f723146c620927610) ) ROM_LOAD( "epr-12387.ic21", 0x40000, 0x20000, CRC(c7fcadf3) SHA1(5f0fd600a75a02749935af21e1e0d2c714c6417e) ) - ROM_REGION16_BE( 0x1c0000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x1c0000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "mpr-12378.ic9", 0x000001, 0x20000, CRC(119e5a82) SHA1(261ed2bc4ebac7142e2ecca9f03c91242e792a98) ) ROM_CONTINUE( 0x100001, 0x20000 ) ROM_LOAD16_BYTE( "mpr-12379.ic12", 0x000000, 0x20000, CRC(1a0e8c57) SHA1(674f1ae7db632876fff346e76786801ae19d9799) ) @@ -4884,7 +4884,7 @@ ROM_START( goldnaxej ) ROM_LOAD( "epr-12386.a15", 0x20000, 0x20000, CRC(25d7d779) SHA1(2de14a76a5176d5abc7e7f7f723146c620927610) ) ROM_LOAD( "epr-12387.a16", 0x40000, 0x20000, CRC(c7fcadf3) SHA1(5f0fd600a75a02749935af21e1e0d2c714c6417e) ) - ROM_REGION16_BE( 0x1c0000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x1c0000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "mpr-12378.b1", 0x000001, 0x20000, CRC(119e5a82) SHA1(261ed2bc4ebac7142e2ecca9f03c91242e792a98) ) ROM_CONTINUE( 0x100001, 0x20000 ) ROM_LOAD16_BYTE( "mpr-12379.b5", 0x000000, 0x20000, CRC(1a0e8c57) SHA1(674f1ae7db632876fff346e76786801ae19d9799) ) @@ -4925,7 +4925,7 @@ ROM_START( goldnaxe3 ) ROM_LOAD( "epr-12386.a15", 0x20000, 0x20000, CRC(25d7d779) SHA1(2de14a76a5176d5abc7e7f7f723146c620927610) ) ROM_LOAD( "epr-12387.a16", 0x40000, 0x20000, CRC(c7fcadf3) SHA1(5f0fd600a75a02749935af21e1e0d2c714c6417e) ) - ROM_REGION16_BE( 0x1c0000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x1c0000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "mpr-12378.b1", 0x000001, 0x20000, CRC(119e5a82) SHA1(261ed2bc4ebac7142e2ecca9f03c91242e792a98) ) ROM_CONTINUE( 0x100001, 0x20000 ) ROM_LOAD16_BYTE( "mpr-12379.b5", 0x000000, 0x20000, CRC(1a0e8c57) SHA1(674f1ae7db632876fff346e76786801ae19d9799) ) @@ -4962,7 +4962,7 @@ ROM_START( goldnaxe2 ) ROM_LOAD( "epr-12386.a15", 0x20000, 0x20000, CRC(25d7d779) SHA1(2de14a76a5176d5abc7e7f7f723146c620927610) ) ROM_LOAD( "epr-12387.a16", 0x40000, 0x20000, CRC(c7fcadf3) SHA1(5f0fd600a75a02749935af21e1e0d2c714c6417e) ) - ROM_REGION16_BE( 0x1c0000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x1c0000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "mpr-12378.b1", 0x000001, 0x20000, CRC(119e5a82) SHA1(261ed2bc4ebac7142e2ecca9f03c91242e792a98) ) ROM_CONTINUE( 0x100001, 0x20000 ) ROM_LOAD16_BYTE( "mpr-12379.b5", 0x000000, 0x20000, CRC(1a0e8c57) SHA1(674f1ae7db632876fff346e76786801ae19d9799) ) @@ -5003,7 +5003,7 @@ ROM_START( goldnaxe1 ) ROM_LOAD( "epr-12386.ic20", 0x20000, 0x20000, CRC(25d7d779) SHA1(2de14a76a5176d5abc7e7f7f723146c620927610) ) ROM_LOAD( "epr-12387.ic21", 0x40000, 0x20000, CRC(c7fcadf3) SHA1(5f0fd600a75a02749935af21e1e0d2c714c6417e) ) - ROM_REGION16_BE( 0x1c0000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x1c0000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "mpr-12378.ic9", 0x000001, 0x20000, CRC(119e5a82) SHA1(261ed2bc4ebac7142e2ecca9f03c91242e792a98) ) ROM_CONTINUE( 0x100001, 0x20000 ) ROM_LOAD16_BYTE( "mpr-12379.ic12", 0x000000, 0x20000, CRC(1a0e8c57) SHA1(674f1ae7db632876fff346e76786801ae19d9799) ) @@ -5045,7 +5045,7 @@ ROM_START( hwchamp ) ROM_LOAD( "mpr-11243.a16", 0x80000, 0x20000, CRC(f30cd5fd) SHA1(df6118ca4b724c37b11e18d9f2ea18e9591ae7aa) ) ROM_LOAD( "mpr-11168.b16", 0xA0000, 0x20000, CRC(5b8494a8) SHA1(9e3f09f4037a007b6a188dd81ec8f9c635e87650) ) - ROM_REGION16_BE( 0x200000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x200000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "mpr-11158.b1", 0x000001, 0x010000, CRC(fc098a13) SHA1(b4a6e00d4765265bad170dabf0b2a4a58e063b16) ) // all MPR-111xx here are 28 pin Fujitsu MB831000 MASK roms ROM_CONTINUE( 0x020001, 0x010000 ) ROM_LOAD16_BYTE( "mpr-11162.b5", 0x000000, 0x010000, CRC(5db934a8) SHA1(ba7cc93025af71ad2674b1376b61afbb7ae910ff) ) @@ -5093,7 +5093,7 @@ ROM_START( hwchampj ) ROM_LOAD( "epr-11204.a16", 0x80000, 0x20000, CRC(dfc4cd33) SHA1(880af38b6a3cb52220e7b4f0999cfafade0535f9) ) ROM_LOAD( "epr-11215.b16", 0xA0000, 0x20000, CRC(5b8494a8) SHA1(9e3f09f4037a007b6a188dd81ec8f9c635e87650) ) - ROM_REGION16_BE( 0x200000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x200000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "epr-11205.b1", 0x000001, 0x010000, CRC(fc098a13) SHA1(b4a6e00d4765265bad170dabf0b2a4a58e063b16) ) ROM_CONTINUE( 0x020001, 0x010000 ) ROM_LOAD16_BYTE( "epr-11209.b5", 0x000000, 0x010000, CRC(5db934a8) SHA1(ba7cc93025af71ad2674b1376b61afbb7ae910ff) ) @@ -5141,7 +5141,7 @@ ROM_START( mvp ) ROM_LOAD( "13012.rom", 0x40000, 0x40000, CRC(b75e6821) SHA1(a2b049995755d79a136a4b4b0dc78d902c5b9eed) ) ROM_LOAD( "13013.rom", 0x80000, 0x40000, CRC(f1944a3c) SHA1(db59cadb435c26f3a957bd4996a083fa30c8bbd0) ) - ROM_REGION16_BE( 0x200000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x200000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "13003.rom", 0x000001, 0x20000, CRC(21424151) SHA1(156e15eee9ff7122c30a42bfec0b307073b7a375) ) ROM_CONTINUE( 0x100001, 0x20000 ) ROM_LOAD16_BYTE( "13006.rom", 0x000000, 0x20000, CRC(2e9afd2f) SHA1(7fe0929e70e061878065fab2d26309066d14c038) ) @@ -5187,7 +5187,7 @@ ROM_START( mvpj ) ROM_LOAD( "epr-12973.a16", 0x80000, 0x20000, CRC(8dc9b9ea) SHA1(048e129874c6ee9f34c5ee1722b8dffa6db8841c) ) ROM_LOAD( "epr-12985.b16", 0xa0000, 0x20000, CRC(e3f33a8a) SHA1(e7bcc882dcfa926040d0e3e0df54ed924a6b146a) ) - ROM_REGION16_BE( 0x200000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x200000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "epr-12977.b5", 0x000000, 0x20000, CRC(b9eb9762) SHA1(dfcf607b2bc3c742770936a5476335506d778a2d) ) ROM_LOAD16_BYTE( "epr-12974.b1", 0x000001, 0x20000, CRC(e1da5597) SHA1(55e1e0948896f2afbb3b967847a341ee5afac751) ) ROM_LOAD16_BYTE( "epr-12978.b6", 0x040000, 0x20000, CRC(014b5442) SHA1(ab6273bd5107c837f33d31ba5e7efce752ee3649) ) @@ -5235,7 +5235,7 @@ ROM_START( passsht ) ROM_LOAD( "opr-11855.b10", 0x10000, 0x10000, CRC(b78762b4) SHA1(d594ef846bd7fed8da91a89906b39c1a2867a1fe) ) ROM_LOAD( "opr-11856.b11", 0x20000, 0x10000, CRC(ea49f666) SHA1(36ccd32cdcbb7fcc300628bb59c220ec3c324d82) ) - ROM_REGION16_BE( 0x60000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x60000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "opr-11862.b1", 0x00001, 0x10000, CRC(b6e94727) SHA1(0838e034f1f10d9cd1312c8c94b5c57387c0c271) ) ROM_LOAD16_BYTE( "opr-11865.b5", 0x00000, 0x10000, CRC(17e8d5d5) SHA1(ac1074b0a705be13c6e3391441e6cfec1d2b3f8a) ) ROM_LOAD16_BYTE( "opr-11863.b2", 0x20001, 0x10000, CRC(3e670098) SHA1(2cfc83f4294be30cd868738886ac546bd8489962) ) @@ -5269,7 +5269,7 @@ ROM_START( passshta ) ROM_LOAD( "opr-11855.b10", 0x10000, 0x10000, CRC(b78762b4) SHA1(d594ef846bd7fed8da91a89906b39c1a2867a1fe) ) ROM_LOAD( "opr-11856.b11", 0x20000, 0x10000, CRC(ea49f666) SHA1(36ccd32cdcbb7fcc300628bb59c220ec3c324d82) ) - ROM_REGION16_BE( 0x60000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x60000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "opr-11862.b1", 0x00001, 0x10000, CRC(b6e94727) SHA1(0838e034f1f10d9cd1312c8c94b5c57387c0c271) ) ROM_LOAD16_BYTE( "opr-11865.b5", 0x00000, 0x10000, CRC(17e8d5d5) SHA1(ac1074b0a705be13c6e3391441e6cfec1d2b3f8a) ) ROM_LOAD16_BYTE( "opr-11863.b2", 0x20001, 0x10000, CRC(3e670098) SHA1(2cfc83f4294be30cd868738886ac546bd8489962) ) @@ -5310,7 +5310,7 @@ ROM_START( passshtj ) ROM_LOAD( "opr-11855.b10", 0x10000, 0x10000, CRC(b78762b4) SHA1(d594ef846bd7fed8da91a89906b39c1a2867a1fe) ) ROM_LOAD( "opr-11856.b11", 0x20000, 0x10000, CRC(ea49f666) SHA1(36ccd32cdcbb7fcc300628bb59c220ec3c324d82) ) - ROM_REGION16_BE( 0x60000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x60000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "opr-11862.b1", 0x00001, 0x10000, CRC(b6e94727) SHA1(0838e034f1f10d9cd1312c8c94b5c57387c0c271) ) ROM_LOAD16_BYTE( "opr-11865.b5", 0x00000, 0x10000, CRC(17e8d5d5) SHA1(ac1074b0a705be13c6e3391441e6cfec1d2b3f8a) ) ROM_LOAD16_BYTE( "opr-11863.b2", 0x20001, 0x10000, CRC(3e670098) SHA1(2cfc83f4294be30cd868738886ac546bd8489962) ) @@ -5349,7 +5349,7 @@ ROM_START( riotcity ) ROM_LOAD( "epr-14618.bin", 0x80000, 0x20000, CRC(00eb260e) SHA1(f293180fb9a053c98022ef086bf4002563752f61) ) // plane 3 ROM_LOAD( "epr-14627.bin", 0xa0000, 0x20000, CRC(961e5f82) SHA1(dc88b511dff6cdebf96fe8bf388bf76098296b0f) ) - ROM_REGION16_BE( 0x1c0000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x1c0000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "epr-14619.bin", 0x000001, 0x020000, CRC(6f2b5ef7) SHA1(a0186fcc5b12c31b65b84355f88bcb10b1434135) ) ROM_CONTINUE( 0x100001, 0x020000 ) ROM_LOAD16_BYTE( "epr-14622.bin", 0x000000, 0x020000, CRC(7ca7e40d) SHA1(57d26cc1b530cb867b2a4779bb5108ac457b2154) ) @@ -5389,7 +5389,7 @@ ROM_START( ryukyu ) ROM_LOAD( "opr-13352.a15", 0x20000, 0x20000, CRC(5e5531e4) SHA1(e8e16b35f7985e6cdd77353ca5235db518914744) ) ROM_LOAD( "opr-13353.a16", 0x40000, 0x20000, CRC(6d23dfd8) SHA1(21266340290b9854cee0b62fc107cc2981519a80) ) - ROM_REGION16_BE( 0x80000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x80000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "opr-13354.b1", 0x00001, 0x20000, CRC(f07aad99) SHA1(71759525a5b7fe76d112cec93984f0f89cadbc00) ) ROM_LOAD16_BYTE( "opr-13356.b5", 0x00000, 0x20000, CRC(5498290b) SHA1(b3115b636d8cb6ecac22d5264b7961e3b807cf04) ) ROM_LOAD16_BYTE( "opr-13355.b2", 0x40001, 0x20000, CRC(67890019) SHA1(165c6a32f305273396ec0e9499e00329caadc484) ) @@ -5422,7 +5422,7 @@ ROM_START( defense ) ROM_LOAD( "10920.b10", 0x10000, 0x10000, CRC(22b1fb4c) SHA1(f4721796155f13d472d735c646bc52f20f04debd) ) ROM_LOAD( "10921.b11", 0x20000, 0x10000, CRC(7788f55d) SHA1(435273196a5e812f28a2224807e842ccadff9c10) ) - ROM_REGION16_BE( 0x60000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x60000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "10760.b1", 0x00001, 0x010000, CRC(70de327b) SHA1(11dde9cefd993f5fb02baf5809fae6c1176a58a1) ) ROM_LOAD16_BYTE( "10763.b5", 0x00000, 0x010000, CRC(99ec5cb5) SHA1(933a2216a2c772fc82499c739457865b1c75cdb8) ) ROM_LOAD16_BYTE( "10761.b2", 0x20001, 0x010000, CRC(4e80f80d) SHA1(d168235bdf09317545c999676a4adf015df32366) ) @@ -5457,7 +5457,7 @@ ROM_START( sdib ) ROM_LOAD( "epr-10773.b10", 0x10000, 0x10000, CRC(8f7129a2) SHA1(094a4065597d8d51fb2232546df1de9043fea731) ) ROM_LOAD( "epr-10774.b11", 0x20000, 0x10000, CRC(4409411f) SHA1(84fd7128e8440d96b0384ae3c391a59bd37ecf9d) ) - ROM_REGION16_BE( 0x60000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x60000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "10760.b1", 0x00001, 0x010000, CRC(70de327b) SHA1(11dde9cefd993f5fb02baf5809fae6c1176a58a1) ) ROM_LOAD16_BYTE( "10763.b5", 0x00000, 0x010000, CRC(99ec5cb5) SHA1(933a2216a2c772fc82499c739457865b1c75cdb8) ) ROM_LOAD16_BYTE( "10761.b2", 0x20001, 0x010000, CRC(4e80f80d) SHA1(d168235bdf09317545c999676a4adf015df32366) ) @@ -5492,7 +5492,7 @@ ROM_START( sdibl ) ROM_LOAD( "epr-10773.b10", 0x10000, 0x10000, CRC(8f7129a2) SHA1(094a4065597d8d51fb2232546df1de9043fea731) ) ROM_LOAD( "epr-10774.b11", 0x20000, 0x10000, CRC(4409411f) SHA1(84fd7128e8440d96b0384ae3c391a59bd37ecf9d) ) - ROM_REGION16_BE( 0x60000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x60000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "b1.rom", 0x00001, 0x010000, CRC(30e2c50a) SHA1(1fb9e69d4cb97fdcb0f98c2a7ede246aaa4ac382) ) ROM_LOAD16_BYTE( "b5.rom", 0x00000, 0x010000, CRC(794e3e8b) SHA1(91ca1cb9aabf99adc8426feed4494a992afb8c4a) ) ROM_LOAD16_BYTE( "b2.rom", 0x20001, 0x010000, CRC(6a8b3fd0) SHA1(a122d3cb0b3263714f026e57d85b0dbf6cb110d7) ) @@ -5522,7 +5522,7 @@ ROM_START( shinobi5 ) ROM_LOAD( "epr-11364.a15", 0x20000, 0x20000, CRC(e63649a4) SHA1(042dded1ff964889571f63d2642b2b21b75f9763) ) ROM_LOAD( "epr-11365.a16", 0x40000, 0x20000, CRC(1ef55d20) SHA1(314590881a2f18339b7b9c16010e408aa0164e04) ) - ROM_REGION16_BE( 0x80000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x80000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "epr-11366.b1", 0x00001, 0x20000, CRC(319ede73) SHA1(c48ba4694ff677f30cc1ced3a3ad11c0feb1122d) ) ROM_LOAD16_BYTE( "epr-11368.b5", 0x00000, 0x20000, CRC(0377d7ce) SHA1(14f9674c142b78bf8b458beccfef93cc3e722c03) ) ROM_LOAD16_BYTE( "epr-11367.b2", 0x40001, 0x20000, CRC(1d06c5c7) SHA1(3a44f5a2058b96f212930c2e838eda1ce1036818) ) @@ -5550,7 +5550,7 @@ ROM_START( shinobi4 ) ROM_LOAD( "epr-11364.a15", 0x20000, 0x20000, CRC(e63649a4) SHA1(042dded1ff964889571f63d2642b2b21b75f9763) ) ROM_LOAD( "epr-11365.a16", 0x40000, 0x20000, CRC(1ef55d20) SHA1(314590881a2f18339b7b9c16010e408aa0164e04) ) - ROM_REGION16_BE( 0x80000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x80000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "epr-11366.b1", 0x00001, 0x20000, CRC(319ede73) SHA1(c48ba4694ff677f30cc1ced3a3ad11c0feb1122d) ) ROM_LOAD16_BYTE( "epr-11368.b5", 0x00000, 0x20000, CRC(0377d7ce) SHA1(14f9674c142b78bf8b458beccfef93cc3e722c03) ) ROM_LOAD16_BYTE( "epr-11367.b2", 0x40001, 0x20000, CRC(1d06c5c7) SHA1(3a44f5a2058b96f212930c2e838eda1ce1036818) ) @@ -5583,7 +5583,7 @@ ROM_START( shinobi3 ) ROM_LOAD( "epr-11285.b10", 0x10000, 0x10000, CRC(75f8fbc9) SHA1(29072edcd583af60ec66b4c8bb82b179a3751edf) ) ROM_LOAD( "epr-11286.b11", 0x20000, 0x10000, CRC(06508bb9) SHA1(57c9036123ec8e35d0275ab6eaff25a16aa203d4) ) - ROM_REGION16_BE( 0x80000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x80000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "epr-11290.b1", 0x00001, 0x10000, CRC(611f413a) SHA1(180f83216e2dfbfd77b0fb3be83c3042954d12df) ) ROM_LOAD16_BYTE( "epr-11294.b5", 0x00000, 0x10000, CRC(5eb00fc1) SHA1(97e02eee74f61fabcad2a9e24f1868cafaac1d51) ) ROM_LOAD16_BYTE( "epr-11291.b2", 0x20001, 0x10000, CRC(3c0797c0) SHA1(df18c7987281bd9379026c6cf7f96f6ae49fd7f9) ) @@ -5623,7 +5623,7 @@ ROM_START( shinobi2 ) ROM_LOAD( "epr-11285.b10", 0x10000, 0x10000, CRC(75f8fbc9) SHA1(29072edcd583af60ec66b4c8bb82b179a3751edf) ) ROM_LOAD( "epr-11286.b11", 0x20000, 0x10000, CRC(06508bb9) SHA1(57c9036123ec8e35d0275ab6eaff25a16aa203d4) ) - ROM_REGION16_BE( 0x80000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x80000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "epr-11290.b1", 0x00001, 0x10000, CRC(611f413a) SHA1(180f83216e2dfbfd77b0fb3be83c3042954d12df) ) ROM_LOAD16_BYTE( "epr-11294.b5", 0x00000, 0x10000, CRC(5eb00fc1) SHA1(97e02eee74f61fabcad2a9e24f1868cafaac1d51) ) ROM_LOAD16_BYTE( "epr-11291.b2", 0x20001, 0x10000, CRC(3c0797c0) SHA1(df18c7987281bd9379026c6cf7f96f6ae49fd7f9) ) @@ -5676,7 +5676,7 @@ ROM_START( sonicbom ) ROM_LOAD( "opr-11345.b10", 0x10000, 0x10000, CRC(b44c068b) SHA1(05e875dc418aef12fc48d1df44f680249f6952de) ) ROM_LOAD( "opr-11346.b11", 0x20000, 0x10000, CRC(e5ada66c) SHA1(7e8e34ea909848d0d1b1fcccf628bf9ec169ae9b) ) - ROM_REGION16_BE( 0x80000, "gfx2", ROMREGION_ERASE00 ) // sprites + ROM_REGION16_BE( 0x80000, "sprites", ROMREGION_ERASE00 ) // sprites ROM_LOAD16_BYTE( "opr-11350.b1", 0x00001, 0x010000, CRC(525ba1df) SHA1(e35487c8bf4009a767e54258d9a55056d13ba02a) ) ROM_LOAD16_BYTE( "opr-11354.b5", 0x00000, 0x010000, CRC(793fa3ac) SHA1(14d5a71667b4745d5b556cc15334dd9bff8de93f) ) ROM_LOAD16_BYTE( "opr-11351.b2", 0x20001, 0x010000, CRC(63b1f1ca) SHA1(1f19a3af099d4a6ad196968b0a3c17a11384e474) ) @@ -5720,7 +5720,7 @@ ROM_START( sjryuko ) ROM_LOAD( "epr-12226-93.b11", 0x10000, 0x08000, CRC(210e6999) SHA1(5707cc613060b0070a822850b9afab8293f64dd7) ) //(epr xxxxx - S16a location . S16b location - ROM_REGION16_BE( 0x80000, "gfx2", ROMREGION_ERASE00 ) // sprites + ROM_REGION16_BE( 0x80000, "sprites", ROMREGION_ERASE00 ) // sprites ROM_LOAD16_BYTE( "epr-12232-10.b1", 0x00001, 0x010000, CRC(0adec62b) SHA1(cd798a7994cea73bffe78feac4e692d755074b1d) ) ROM_LOAD16_BYTE( "epr-12236-11.b5", 0x00000, 0x010000, CRC(286b9af8) SHA1(085251b8ce8b7fadf15b8ebd5872f0337adf142b) ) ROM_LOAD16_BYTE( "epr-12233-17.b2", 0x20001, 0x010000, CRC(3e45969c) SHA1(804f3714c97877c6f0caf458f8af38e8d8179d73) ) @@ -5767,7 +5767,7 @@ ROM_START( suprleag ) ROM_LOAD( "epr-11137.b10", 0x10000, 0x10000, CRC(92d96187) SHA1(45138795992b9842d5b0c86a96b300445bf12060) ) ROM_LOAD( "epr-11138.b11", 0x20000, 0x10000, CRC(c01dc773) SHA1(b27da906186e1272cdd6f8d5e5a979f6623255ac) ) - ROM_REGION16_BE( 0x80000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x80000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "epr-11144.b01", 0x00001, 0x10000, CRC(b31de51c) SHA1(011a79a37d32ab4545187e28e61f27aa0601f686) ) ROM_LOAD16_BYTE( "epr-11148.b05", 0x00000, 0x10000, CRC(126e1309) SHA1(7386ac5ac57325d8f661caf8cab0b19a42c0309d) ) ROM_LOAD16_BYTE( "epr-11145.b02", 0x20001, 0x10000, CRC(4223d2c3) SHA1(310d5c411eeaf69fe0dc9350e6bfe6dfe950b373) ) @@ -5806,7 +5806,7 @@ ROM_START( tetris2 ) ROM_LOAD( "epr-12166.b10", 0x10000, 0x10000, CRC(9abd183b) SHA1(621b017cb34973f9227be383e26b5cd41aea9422) ) ROM_LOAD( "epr-12167.b11", 0x20000, 0x10000, CRC(2495fd4e) SHA1(2db94ead9223a67238a97e724668076fc43e5534) ) - ROM_REGION16_BE( 0x020000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x020000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "obj0-o.rom", 0x00001, 0x10000, CRC(2fb38880) SHA1(0e1b601bbda78d1887951c1f7e752531c281bc83) ) ROM_LOAD16_BYTE( "obj0-e.rom", 0x00000, 0x10000, CRC(d6a02cba) SHA1(d80000f92e754e89c6ca7b7273feab448fc9a061) ) @@ -5845,7 +5845,7 @@ ROM_START( tetris1 ) ROM_LOAD( "epr-12166.b10", 0x10000, 0x10000, CRC(9abd183b) SHA1(621b017cb34973f9227be383e26b5cd41aea9422) ) ROM_LOAD( "epr-12167.b11", 0x20000, 0x10000, CRC(2495fd4e) SHA1(2db94ead9223a67238a97e724668076fc43e5534) ) - ROM_REGION16_BE( 0x10000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x10000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "epr-12169.b1", 0x0001, 0x8000, CRC(dacc6165) SHA1(87b1a7643e3630ff73b2b117752496e1ea5da23d) ) ROM_LOAD16_BYTE( "epr-12170.b5", 0x0000, 0x8000, CRC(87354e42) SHA1(e7fd55aee59b51d82cb9b619fbb815ad6839560c) ) @@ -5875,7 +5875,7 @@ ROM_START( timescan ) ROM_LOAD( "epr-10544.b10", 0x08000, 0x8000, CRC(84fb9a3a) SHA1(efde54cc9582f68e58cae05f717a4fc8f620c0fc) ) ROM_LOAD( "epr-10545.b11", 0x10000, 0x8000, CRC(c8694bc0) SHA1(e48fc349ef454ded86141937f70b006e64da6b6b) ) - ROM_REGION16_BE( 0x80000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x80000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "epr-10548.b1", 0x00001, 0x8000, CRC(aa150735) SHA1(b6e6ff9229c641e196fc7a0a2cf7aa362f554676) ) ROM_LOAD16_BYTE( "epr-10552.b5", 0x00000, 0x8000, CRC(6fcbb9f7) SHA1(0a0fab930477d8b79e500263bbc80d3bf73778f8) ) ROM_LOAD16_BYTE( "epr-10549.b2", 0x20001, 0x8000, CRC(2f59f067) SHA1(1fb64cce2f98ddcb5ecb662e63ea636a8da08bcd) ) @@ -5908,7 +5908,7 @@ ROM_START( toryumon ) ROM_LOAD( "epr-17701.b12", 0x40000, 0x40000, CRC(6dfb025b) SHA1(502c16f650596a791fae1834f9bce6f3aa25c45f) ) ROM_LOAD( "epr-17702.b13", 0x80000, 0x40000, CRC(ae0b7eab) SHA1(403ca2b50913a744e2c5e1cd0d59c69df5464836) ) - ROM_REGION16_BE( 0x100000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x100000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "epr-17692.b1", 0x00001, 0x20000, CRC(543c4327) SHA1(9f40163aaf165f5e4f5aefd8ce083d5f72ded125) ) ROM_LOAD16_BYTE( "epr-17695.b4", 0x00000, 0x20000, CRC(ee60f244) SHA1(21b912e12f6a56ea6b9e5e0be117b447d1ecda43) ) ROM_LOAD16_BYTE( "epr-17693.b2", 0x40001, 0x20000, CRC(4a350b3e) SHA1(70181bf713106475cdf684f86d593ee323ded2ca) ) @@ -5941,7 +5941,7 @@ ROM_START( tturf ) ROM_LOAD( "12269.a15", 0x10000, 0x10000, CRC(457a8790) SHA1(b701e1a1745cefb31083c8a3daa3b23181f89576) ) ROM_LOAD( "12270.a16", 0x20000, 0x10000, CRC(69fc025b) SHA1(20be1242de27f1b997d43890051cc5d5ac8a127a) ) - ROM_REGION16_BE( 0x100000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x100000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "12279.b1", 0x00001, 0x10000, CRC(7a169fb1) SHA1(1ec6da0d2cfcf727e61f61c847fd8b975b64f944) ) ROM_LOAD16_BYTE( "12283.b5", 0x00000, 0x10000, CRC(ae0fa085) SHA1(ae9af92d4dd0c8a0f064d24e647522b588fbd7f7) ) ROM_LOAD16_BYTE( "12278.b2", 0x40001, 0x10000, CRC(961d06b7) SHA1(b1a9dea63785bfa2c0e7b931387b91dfcd27d79b) ) @@ -5978,7 +5978,7 @@ ROM_START( tturfu ) ROM_LOAD( "12269.a15", 0x10000, 0x10000, CRC(457a8790) SHA1(b701e1a1745cefb31083c8a3daa3b23181f89576) ) ROM_LOAD( "12270.a16", 0x20000, 0x10000, CRC(69fc025b) SHA1(20be1242de27f1b997d43890051cc5d5ac8a127a) ) - ROM_REGION16_BE( 0x80000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x80000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "12276.b4", 0x00001, 0x10000, CRC(838bd71f) SHA1(82d9d127438f5e1906b1cf40bf3b4727f2ee5685) ) ROM_LOAD16_BYTE( "12280.b8", 0x00000, 0x10000, CRC(639a57cb) SHA1(84fd8b96758d38f9e1ba1a3c2cf8099ec0452784) ) ROM_LOAD16_BYTE( "12277.b3", 0x20001, 0x10000, CRC(f16b6ba2) SHA1(00cc04c7b5aad82d51d2d252e1e57bcdc5e2c9e3) ) @@ -6017,7 +6017,7 @@ ROM_START( wb3 ) ROM_LOAD( "epr-12125.a15", 0x10000, 0x10000, CRC(9fc36df7) SHA1(b39ccc687489e9781181197505fc78aa5cf7ea55) ) ROM_LOAD( "epr-12126.a16", 0x20000, 0x10000, CRC(a693fd94) SHA1(38e5446f41b6793a8e4134fdd92b02b86e3589f7) ) - ROM_REGION16_BE( 0x100000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x100000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "epr-12090.b1", 0x00001, 0x010000, CRC(aeeecfca) SHA1(496124b170a725ad863c741d4e021ab947511e4c) ) ROM_LOAD16_BYTE( "epr-12094.b5", 0x00000, 0x010000, CRC(615e4927) SHA1(d23f164973afa770714e284a77ddf10f18cc596b) ) ROM_LOAD16_BYTE( "epr-12091.b2", 0x40001, 0x010000, CRC(8409a243) SHA1(bcbb9510a6499d8147543d6befa5a49f4ac055d9) ) @@ -6053,7 +6053,7 @@ ROM_START( wb34 ) ROM_LOAD( "epr-12125.a15", 0x10000, 0x10000, CRC(9fc36df7) SHA1(b39ccc687489e9781181197505fc78aa5cf7ea55) ) ROM_LOAD( "epr-12126.a16", 0x20000, 0x10000, CRC(a693fd94) SHA1(38e5446f41b6793a8e4134fdd92b02b86e3589f7) ) - ROM_REGION16_BE( 0x100000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x100000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "epr-12090.b1", 0x00001, 0x010000, CRC(aeeecfca) SHA1(496124b170a725ad863c741d4e021ab947511e4c) ) ROM_LOAD16_BYTE( "epr-12094.b5", 0x00000, 0x010000, CRC(615e4927) SHA1(d23f164973afa770714e284a77ddf10f18cc596b) ) ROM_LOAD16_BYTE( "epr-12091.b2", 0x40001, 0x010000, CRC(8409a243) SHA1(bcbb9510a6499d8147543d6befa5a49f4ac055d9) ) @@ -6085,7 +6085,7 @@ ROM_START( wb33 ) ROM_LOAD( "epr-12125.a15", 0x10000, 0x10000, CRC(9fc36df7) SHA1(b39ccc687489e9781181197505fc78aa5cf7ea55) ) ROM_LOAD( "epr-12126.a16", 0x20000, 0x10000, CRC(a693fd94) SHA1(38e5446f41b6793a8e4134fdd92b02b86e3589f7) ) - ROM_REGION16_BE( 0x100000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x100000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "epr-12090.b1", 0x00001, 0x010000, CRC(aeeecfca) SHA1(496124b170a725ad863c741d4e021ab947511e4c) ) ROM_LOAD16_BYTE( "epr-12094.b5", 0x00000, 0x010000, CRC(615e4927) SHA1(d23f164973afa770714e284a77ddf10f18cc596b) ) ROM_LOAD16_BYTE( "epr-12091.b2", 0x40001, 0x010000, CRC(8409a243) SHA1(bcbb9510a6499d8147543d6befa5a49f4ac055d9) ) @@ -6132,7 +6132,7 @@ ROM_START( wb32 ) ROM_LOAD( "epr-12125.b10", 0x10000, 0x10000, CRC(9fc36df7) SHA1(b39ccc687489e9781181197505fc78aa5cf7ea55) ) ROM_LOAD( "epr-12126.b11", 0x20000, 0x10000, CRC(a693fd94) SHA1(38e5446f41b6793a8e4134fdd92b02b86e3589f7) ) - ROM_REGION16_BE( 0x80000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x80000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "epr-12090.b1", 0x00001, 0x010000, CRC(aeeecfca) SHA1(496124b170a725ad863c741d4e021ab947511e4c) ) ROM_LOAD16_BYTE( "epr-12094.b5", 0x00000, 0x010000, CRC(615e4927) SHA1(d23f164973afa770714e284a77ddf10f18cc596b) ) ROM_LOAD16_BYTE( "epr-12091.b2", 0x20001, 0x010000, CRC(8409a243) SHA1(bcbb9510a6499d8147543d6befa5a49f4ac055d9) ) @@ -6185,7 +6185,7 @@ ROM_START( wrestwar ) ROM_LOAD( "mpr-12151.a15", 0x20000, 0x20000, CRC(2b1a0751) SHA1(8cb1027ef3728f5bdfdb5e2df0f0421f743cdc0a) ) ROM_LOAD( "mpr-12152.a16", 0x40000, 0x20000, CRC(f6e190fe) SHA1(4c8b334fb22c449d8d00c8f49f5eccbe008e244f) ) - ROM_REGION16_BE( 0x180000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x180000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "mpr-12153.b1", 0x000001, 0x20000, CRC(ffa7d368) SHA1(e5663ef1cbe8ab27be0919a3cd78d9a7747bbac6) ) ROM_LOAD16_BYTE( "mpr-12157.b5", 0x000000, 0x20000, CRC(8d7794c1) SHA1(ace87970cfa02ab8200173622633d0d70ef7aa9e) ) ROM_LOAD16_BYTE( "mpr-12154.b2", 0x040001, 0x20000, CRC(0ed343f2) SHA1(951bd616e63c5fe0aa3f387c9c12153b4f29675f) ) @@ -6228,7 +6228,7 @@ ROM_START( wrestwar2 ) ROM_LOAD( "mpr-12151.a15", 0x20000, 0x20000, CRC(2b1a0751) SHA1(8cb1027ef3728f5bdfdb5e2df0f0421f743cdc0a) ) ROM_LOAD( "mpr-12152.a16", 0x40000, 0x20000, CRC(f6e190fe) SHA1(4c8b334fb22c449d8d00c8f49f5eccbe008e244f) ) - ROM_REGION16_BE( 0x180000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x180000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "mpr-12153.b1", 0x000001, 0x20000, CRC(ffa7d368) SHA1(e5663ef1cbe8ab27be0919a3cd78d9a7747bbac6) ) ROM_LOAD16_BYTE( "mpr-12157.b5", 0x000000, 0x20000, CRC(8d7794c1) SHA1(ace87970cfa02ab8200173622633d0d70ef7aa9e) ) ROM_LOAD16_BYTE( "mpr-12154.b2", 0x040001, 0x20000, CRC(0ed343f2) SHA1(951bd616e63c5fe0aa3f387c9c12153b4f29675f) ) @@ -6268,7 +6268,7 @@ ROM_START( wrestwar1 ) ROM_LOAD( "mpr-12151.a15", 0x20000, 0x20000, CRC(2b1a0751) SHA1(8cb1027ef3728f5bdfdb5e2df0f0421f743cdc0a) ) ROM_LOAD( "mpr-12152.a16", 0x40000, 0x20000, CRC(f6e190fe) SHA1(4c8b334fb22c449d8d00c8f49f5eccbe008e244f) ) - ROM_REGION16_BE( 0x180000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x180000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "mpr-12153.b1", 0x000001, 0x20000, CRC(ffa7d368) SHA1(e5663ef1cbe8ab27be0919a3cd78d9a7747bbac6) ) ROM_LOAD16_BYTE( "mpr-12157.b5", 0x000000, 0x20000, CRC(8d7794c1) SHA1(ace87970cfa02ab8200173622633d0d70ef7aa9e) ) ROM_LOAD16_BYTE( "mpr-12154.b2", 0x040001, 0x20000, CRC(0ed343f2) SHA1(951bd616e63c5fe0aa3f387c9c12153b4f29675f) ) @@ -6317,7 +6317,7 @@ ROM_START( fantzn2x ) // based on PS2 version ROM_LOAD( "fz2.a15", 0x20000, 0x20000, CRC(2b933344) SHA1(5b53ea8d58cc3d157aec6926db048359984e4276) ) ROM_LOAD( "fz2.a16", 0x40000, 0x20000, CRC(e63281a1) SHA1(72379c579484c1ef7784a9598d373446ef0a472b) ) - ROM_REGION16_BE( 0x180000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x180000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "fz2.b1", 0x000001, 0x20000, CRC(46bba615) SHA1(b291df4a83d7155eb7606f86ed733c24362a4db3) ) ROM_LOAD16_BYTE( "fz2.b5", 0x000000, 0x20000, CRC(bebeee5d) SHA1(9e57e62c6b9136667aa90d7d423fc33ac6df4352) ) ROM_LOAD16_BYTE( "fz2.b2", 0x040001, 0x20000, CRC(6681a7b6) SHA1(228df38601ba3895e9449921a64850941715b421) ) @@ -6349,7 +6349,7 @@ ROM_START( fantzn2xp ) // based on trial version ROM_LOAD( "tileb.bin", 0x20000, 0x20000, CRC(59e181b7) SHA1(0d57d7b49b85baafa3038dc5b7551fea85f4f5c8) ) ROM_LOAD( "tilec.bin", 0x40000, 0x20000, CRC(375d354c) SHA1(2af5374777b13cb5aefb7fe90adea0b4d79e9202) ) - ROM_REGION16_BE( 0x140000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x140000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "obja.bin", 0x000001, 0x20000, CRC(9af87a4d) SHA1(b4f0f40f96c4081803742bc6576c37edff6eab16) ) ROM_LOAD16_BYTE( "objb.bin", 0x000000, 0x20000, CRC(2fdbca68) SHA1(bc0c96bba9e89f2711267b737ecd4bf2a177edda) ) ROM_LOAD16_BYTE( "objc.bin", 0x040001, 0x20000, CRC(2587487a) SHA1(eb04c03e918f1d98c36360f2b089018fe25f8dad) ) @@ -6389,8 +6389,6 @@ void segas16b_state::init_generic(segas16b_rom_board rom_board) m_custom_io_w = write16_delegate(FUNC(segas16b_state::standard_io_w), this); // point globals to allocated memory regions - segaic16_spriteram_0 = reinterpret_cast<UINT16 *>(memshare("spriteram")->ptr()); - segaic16_paletteram = reinterpret_cast<UINT16 *>(memshare("paletteram")->ptr()); segaic16_tileram_0 = reinterpret_cast<UINT16 *>(memshare("tileram")->ptr()); segaic16_textram_0 = reinterpret_cast<UINT16 *>(memshare("textram")->ptr()); @@ -6753,7 +6751,7 @@ WRITE16_MEMBER( isgsm_state::data_w ) switch (m_data_type & 0x0f) { - case 0x0: dest = memregion("gfx2")->base(); + case 0x0: dest = memregion("sprites")->base(); break; case 0x1: dest = memregion("gfx1")->base(); @@ -6970,8 +6968,8 @@ static ADDRESS_MAP_START( isgsm_map, AS_PROGRAM, 16, isgsm_state ) AM_RANGE(0x3f0000, 0x3fffff) AM_WRITE(rom_5704_bank_w) AM_RANGE(0x400000, 0x40ffff) AM_RAM_WRITE_LEGACY(segaic16_tileram_0_w) AM_SHARE("tileram") AM_RANGE(0x410000, 0x410fff) AM_RAM_WRITE_LEGACY(segaic16_textram_0_w) AM_SHARE("textram") - AM_RANGE(0x440000, 0x4407ff) AM_RAM AM_SHARE("spriteram") - AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE_LEGACY(segaic16_paletteram_w) AM_SHARE("paletteram") + AM_RANGE(0x440000, 0x4407ff) AM_RAM AM_SHARE("sprites") + AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE(paletteram_w) AM_SHARE("paletteram") AM_RANGE(0xc40000, 0xc43fff) AM_READWRITE(standard_io_r, standard_io_w) AM_RANGE(0xe00000, 0xe00001) AM_WRITE(data_w) // writes decompressed data here (copied from RAM..) @@ -7109,7 +7107,7 @@ void isgsm_state::machine_reset() // configure sprite banks for (int i = 0; i < 16; i++) - segaic16_sprites_set_bank(machine(), 0, i, i); + m_sprites->set_bank(i, i); membank(ISGSM_MAIN_BANK)->set_base(memregion("bios")->base()); m_maincpu->reset(); @@ -7120,10 +7118,12 @@ static MACHINE_CONFIG_DERIVED_CLASS( isgsm, system16b, isgsm_state ) // basic machine hardware MCFG_DEVICE_REMOVE("maincpu") + MCFG_DEVICE_REMOVE("mapper") MCFG_CPU_ADD("maincpu", M68000, 16000000) // no obvious CPU, but seems to be clocked faster than an original system16 based on the boot times MCFG_CPU_PROGRAM_MAP(isgsm_map) MCFG_CPU_VBLANK_INT("screen", irq4_line_hold) + MACHINE_CONFIG_END DRIVER_INIT_MEMBER(isgsm_state,isgsm) @@ -7173,7 +7173,7 @@ DRIVER_INIT_MEMBER(isgsm_state,tetrbx) ROM_LOAD16_WORD_SWAP("ism2006v00.u1",0x00000,0x20000, CRC(2292585c) SHA1(97ba0e0f0be832a5114d95151e519bc027f6675b) ) \ ROM_REGION( 0x100000, "maincpu", ROMREGION_ERASE00 ) \ ROM_REGION( 0x60000, "gfx1", ROMREGION_ERASE00 ) \ - ROM_REGION16_BE( 0x200000, "gfx2", ROMREGION_ERASE00 ) \ + ROM_REGION16_BE( 0x200000, "sprites", ROMREGION_ERASE00 ) \ ROM_REGION( 0x40000, "soundcpu", ROMREGION_ERASE00 ) \ diff --git a/src/mame/drivers/segas18.c b/src/mame/drivers/segas18.c index 5ef90116f9c..76c15eec4ac 100644 --- a/src/mame/drivers/segas18.c +++ b/src/mame/drivers/segas18.c @@ -82,7 +82,7 @@ void segas18_state::memory_mapper(sega_315_5195_mapper_device &mapper, UINT8 ind break; case 6: - mapper.map_as_ram(0x00000, 0x02000, 0xffe000, "paletteram", write16_delegate(FUNC(segas18_state::legacy_wrapper<segaic16_paletteram_w>), this)); + mapper.map_as_ram(0x00000, 0x01000, 0xfff000, "paletteram", write16_delegate(FUNC(segas18_state::paletteram_w), this)); break; case 5: @@ -91,7 +91,7 @@ void segas18_state::memory_mapper(sega_315_5195_mapper_device &mapper, UINT8 ind break; case 4: - mapper.map_as_ram(0x00000, 0x00800, 0xfff800, "spriteram", write16_delegate()); + mapper.map_as_ram(0x00000, 0x00800, 0xfff800, "sprites", write16_delegate()); break; case 3: @@ -166,8 +166,6 @@ void segas18_state::init_generic(segas18_rom_board rom_board) m_nvram->set_base(m_workram, m_workram.bytes()); // point globals to allocated memory regions - segaic16_spriteram_0 = reinterpret_cast<UINT16 *>(memshare("spriteram")->ptr()); - segaic16_paletteram = reinterpret_cast<UINT16 *>(memshare("paletteram")->ptr()); segaic16_tileram_0 = reinterpret_cast<UINT16 *>(memshare("tileram")->ptr()); segaic16_textram_0 = reinterpret_cast<UINT16 *>(memshare("textram")->ptr()); @@ -295,7 +293,7 @@ WRITE16_MEMBER( segas18_state::io_chip_w ) case 0x06/2: set_grayscale(~data & 0x40); segaic16_tilemap_set_flip(machine(), 0, data & 0x20); - segaic16_sprites_set_flip(machine(), 0, data & 0x20); + m_sprites->set_flip(data & 0x20); // These are correct according to cgfm's docs, but mwalker and ddcrew both // enable the lockout and never turn it off // coin_lockout_w(machine(), 1, data & 0x08); @@ -344,7 +342,7 @@ READ16_MEMBER( segas18_state::misc_io_r ) if (!m_custom_io_r.isnull()) return m_custom_io_r(space, offset, mem_mask); logerror("%06X:misc_io_r - unknown read access to address %04X\n", cpu_get_pc(&space.device()), offset * 2); - return segaic16_open_bus_r(&space, 0, mem_mask); + return open_bus_r(space, 0, mem_mask); } @@ -407,11 +405,11 @@ WRITE16_MEMBER( segas18_state::rom_5987_bank_w ) // sprite banking else { - int maxbanks = memregion("gfx2")->bytes() / 0x40000; + int maxbanks = memregion("sprites")->bytes() / 0x40000; if (data >= maxbanks) data = 255; - segaic16_sprites_set_bank(machine(), 0, (offset - 8) * 2 + 0, data * 2 + 0); - segaic16_sprites_set_bank(machine(), 0, (offset - 8) * 2 + 1, data * 2 + 1); + m_sprites->set_bank((offset - 8) * 2 + 0, data * 2 + 0); + m_sprites->set_bank((offset - 8) * 2 + 1, data * 2 + 1); } } @@ -436,7 +434,7 @@ READ16_MEMBER( segas18_state::ddcrew_custom_io_r ) case 0x3024/2: return ioport("P34START")->read(); } - return segaic16_open_bus_r(&space, 0, mem_mask); + return open_bus_r(space, 0, mem_mask); } @@ -460,7 +458,7 @@ READ16_MEMBER( segas18_state::lghost_custom_io_r ) m_lghost_value <<= 1; return result; } - return segaic16_open_bus_r(&space, 0, mem_mask); + return open_bus_r(space, 0, mem_mask); } @@ -520,7 +518,7 @@ READ16_MEMBER( segas18_state::wwally_custom_io_r ) case 0x3014/2: return (ioport("TRACKY3")->read() - m_wwally_last_y[2]) & 0xff; } - return segaic16_open_bus_r(&space, 0, mem_mask); + return open_bus_r(space, 0, mem_mask); } @@ -598,8 +596,8 @@ static ADDRESS_MAP_START( system18_map, AS_PROGRAM, 16, segas18_state ) // these get overwritten by the memory mapper above, but we put them here // so they are properly allocated and tracked for saving - AM_RANGE(0x100000, 0x1007ff) AM_RAM AM_SHARE("spriteram") - AM_RANGE(0x200000, 0x201fff) AM_RAM AM_SHARE("paletteram") + AM_RANGE(0x100000, 0x1007ff) AM_RAM AM_SHARE("sprites") + AM_RANGE(0x200000, 0x200fff) AM_RAM AM_SHARE("paletteram") AM_RANGE(0x300000, 0x30ffff) AM_RAM AM_SHARE("tileram") AM_RANGE(0x400000, 0x400fff) AM_RAM AM_SHARE("textram") AM_RANGE(0x500000, 0x503fff) AM_RAM AM_SHARE("workram") @@ -1276,7 +1274,7 @@ static MACHINE_CONFIG_START( system18, segas18_state ) MCFG_GFXDECODE(segas18) MCFG_PALETTE_LENGTH(2048*3+2048 + 64*3) - MCFG_SEGA16SP_ADD_16B("segaspr1") + MCFG_SEGA_SYS16B_SPRITES_ADD("sprites") // sound hardware MCFG_SPEAKER_STANDARD_MONO("mono") @@ -1335,7 +1333,7 @@ ROM_START( astorm ) ROM_LOAD( "epr-13074.bin", 0x40000, 0x40000, CRC(787afab8) SHA1(a119042bb2dad54e9733bfba4eaab0ac5fc0f9e7) ) ROM_LOAD( "epr-13075.bin", 0x80000, 0x40000, CRC(4e01b477) SHA1(4178ce4a87ea427c3b0195e64acef6cddfb3485f) ) - ROM_REGION16_BE( 0x200000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x200000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "mpr-13082.bin", 0x000001, 0x40000, CRC(a782b704) SHA1(ba15bdfbc267b8d86f03e5310ce60846ff846de3) ) ROM_LOAD16_BYTE( "mpr-13089.bin", 0x000000, 0x40000, CRC(2a4227f0) SHA1(47284dce8f896f8e8eace9c20302842cacb479c1) ) ROM_LOAD16_BYTE( "mpr-13081.bin", 0x080001, 0x40000, CRC(eb510228) SHA1(4cd387b160ec7050e1300ebe708853742169e643) ) @@ -1371,7 +1369,7 @@ ROM_START( astorm3 ) ROM_LOAD( "epr-13074.bin", 0x40000, 0x40000, CRC(787afab8) SHA1(a119042bb2dad54e9733bfba4eaab0ac5fc0f9e7) ) ROM_LOAD( "epr-13075.bin", 0x80000, 0x40000, CRC(4e01b477) SHA1(4178ce4a87ea427c3b0195e64acef6cddfb3485f) ) - ROM_REGION16_BE( 0x200000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x200000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "mpr-13082.bin", 0x000001, 0x40000, CRC(a782b704) SHA1(ba15bdfbc267b8d86f03e5310ce60846ff846de3) ) ROM_LOAD16_BYTE( "mpr-13089.bin", 0x000000, 0x40000, CRC(2a4227f0) SHA1(47284dce8f896f8e8eace9c20302842cacb479c1) ) ROM_LOAD16_BYTE( "mpr-13081.bin", 0x080001, 0x40000, CRC(eb510228) SHA1(4cd387b160ec7050e1300ebe708853742169e643) ) @@ -1405,7 +1403,7 @@ ROM_START( astormu ) ROM_LOAD( "epr-13074.bin", 0x40000, 0x40000, CRC(787afab8) SHA1(a119042bb2dad54e9733bfba4eaab0ac5fc0f9e7) ) ROM_LOAD( "epr-13075.bin", 0x80000, 0x40000, CRC(4e01b477) SHA1(4178ce4a87ea427c3b0195e64acef6cddfb3485f) ) - ROM_REGION16_BE( 0x200000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x200000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "mpr-13082.bin", 0x000001, 0x40000, CRC(a782b704) SHA1(ba15bdfbc267b8d86f03e5310ce60846ff846de3) ) ROM_LOAD16_BYTE( "mpr-13089.bin", 0x000000, 0x40000, CRC(2a4227f0) SHA1(47284dce8f896f8e8eace9c20302842cacb479c1) ) ROM_LOAD16_BYTE( "mpr-13081.bin", 0x080001, 0x40000, CRC(eb510228) SHA1(4cd387b160ec7050e1300ebe708853742169e643) ) @@ -1440,7 +1438,7 @@ ROM_START( astormj ) ROM_LOAD( "epr-13074.bin", 0x40000, 0x40000, CRC(787afab8) SHA1(a119042bb2dad54e9733bfba4eaab0ac5fc0f9e7) ) ROM_LOAD( "epr-13075.bin", 0x80000, 0x40000, CRC(4e01b477) SHA1(4178ce4a87ea427c3b0195e64acef6cddfb3485f) ) - ROM_REGION16_BE( 0x200000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x200000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "mpr-13082.bin", 0x000001, 0x40000, CRC(a782b704) SHA1(ba15bdfbc267b8d86f03e5310ce60846ff846de3) ) ROM_LOAD16_BYTE( "mpr-13089.bin", 0x000000, 0x40000, CRC(2a4227f0) SHA1(47284dce8f896f8e8eace9c20302842cacb479c1) ) ROM_LOAD16_BYTE( "mpr-13081.bin", 0x080001, 0x40000, CRC(eb510228) SHA1(4cd387b160ec7050e1300ebe708853742169e643) ) @@ -1478,7 +1476,7 @@ ROM_START( bloxeed ) ROM_LOAD( "opr-12885.b2", 0x10000, 0x10000, CRC(8041b814)SHA1(29fa49ba9a73eed07865a86ea774e2c6a60aed5b) ) ROM_LOAD( "opr-12886.b3", 0x20000, 0x10000, CRC(de32285e)SHA1(8994dc128d6a23763e5fcfca1868b336d4aa0a21) ) - ROM_REGION( 0x20000, "gfx2", 0 ) // sprites + ROM_REGION( 0x20000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "opr-12891.a11", 0x00001, 0x10000, CRC(90d31a8c)SHA1(1747652a5109ce65add197cf06535f2463a99fdc) ) ROM_LOAD16_BYTE( "opr-12887.b11", 0x00000, 0x10000, CRC(f0c0f49d)SHA1(7ecd591265165f3149241e2ceb5059faab88360f) ) @@ -1512,7 +1510,7 @@ ROM_START( cltchitr ) ROM_LOAD( "mpr-13774.c2", 0x080000, 0x80000, CRC(2411a824) SHA1(0e383ccc4e0830ffb395d5102e2950610c147007) ) ROM_LOAD( "mpr-13775.c3", 0x100000, 0x80000, CRC(cf527bf6) SHA1(1f9cf1f0e92709f0465dc97ebbdaa715a419f7a7) ) - ROM_REGION16_BE( 0x600000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x600000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "mpr-13779.c10", 0x000001, 0x80000, CRC(c707f416) SHA1(e6a9d89849f7f1c303a3ca29a629f81397945a2d) ) ROM_LOAD16_BYTE( "mpr-13787.a10", 0x000000, 0x80000, CRC(f05c68c6) SHA1(b6a0535b6c734a0c89fdb6506c32ffe6ab3aa8cd) ) ROM_LOAD16_BYTE( "mpr-13780.c11", 0x200001, 0x80000, CRC(a4c341e0) SHA1(15a0b5a42b56465a7b7df98968cc2ed177ce6f59) ) @@ -1546,7 +1544,7 @@ ROM_START( cltchitrj ) ROM_LOAD( "mpr-13774.c2", 0x080000, 0x80000, CRC(2411a824) SHA1(0e383ccc4e0830ffb395d5102e2950610c147007) ) ROM_LOAD( "mpr-13775.c3", 0x100000, 0x80000, CRC(cf527bf6) SHA1(1f9cf1f0e92709f0465dc97ebbdaa715a419f7a7) ) - ROM_REGION16_BE( 0x800000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x800000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "mpr-13779.c10", 0x000001, 0x80000, CRC(c707f416) SHA1(e6a9d89849f7f1c303a3ca29a629f81397945a2d) ) ROM_LOAD16_BYTE( "mpr-13787.a10", 0x000000, 0x80000, CRC(f05c68c6) SHA1(b6a0535b6c734a0c89fdb6506c32ffe6ab3aa8cd) ) ROM_LOAD16_BYTE( "mpr-13780.c11", 0x200001, 0x80000, CRC(a4c341e0) SHA1(15a0b5a42b56465a7b7df98968cc2ed177ce6f59) ) @@ -1587,7 +1585,7 @@ ROM_START( ddcrew ) ROM_LOAD( "epr-14128.c2", 0x40000, 0x40000, CRC(edba8e10) SHA1(25a2833ead4ca363802ddc2eb97c40976502921a) ) ROM_LOAD( "epr-14129.c3", 0x80000, 0x40000, CRC(e8ecc305) SHA1(a26d0c5c7826cd315f8b2c27e5a503a2a7b535c4) ) - ROM_REGION16_BE( 0x800000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x800000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "mpr-14134.c10", 0x000001, 0x80000, CRC(4fda6a4b) SHA1(a9e582e494ab967e8f3ccf4d5844bb8ef889928c) ) ROM_LOAD16_BYTE( "mpr-14142.a10", 0x000000, 0x80000, CRC(3cbf1f2a) SHA1(80b6b006936740087786acd538e28aca85fa6894) ) ROM_LOAD16_BYTE( "mpr-14135.c11", 0x200001, 0x80000, CRC(e9c74876) SHA1(aff9d071e77f01c6937188bf67be38fa898343e6) ) @@ -1624,7 +1622,7 @@ ROM_START( ddcrewu ) ROM_LOAD( "epr-14128.c2", 0x40000, 0x40000, CRC(edba8e10) SHA1(25a2833ead4ca363802ddc2eb97c40976502921a) ) ROM_LOAD( "epr-14129.c3", 0x80000, 0x40000, CRC(e8ecc305) SHA1(a26d0c5c7826cd315f8b2c27e5a503a2a7b535c4) ) - ROM_REGION16_BE( 0x800000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x800000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "mpr-14134.c10", 0x000001, 0x80000, CRC(4fda6a4b) SHA1(a9e582e494ab967e8f3ccf4d5844bb8ef889928c) ) ROM_LOAD16_BYTE( "mpr-14142.a10", 0x000000, 0x80000, CRC(3cbf1f2a) SHA1(80b6b006936740087786acd538e28aca85fa6894) ) ROM_LOAD16_BYTE( "mpr-14135.c11", 0x200001, 0x80000, CRC(e9c74876) SHA1(aff9d071e77f01c6937188bf67be38fa898343e6) ) @@ -1661,7 +1659,7 @@ ROM_START( ddcrew2 ) ROM_LOAD( "epr-14128.c2", 0x40000, 0x40000, CRC(edba8e10) SHA1(25a2833ead4ca363802ddc2eb97c40976502921a) ) ROM_LOAD( "epr-14129.c3", 0x80000, 0x40000, CRC(e8ecc305) SHA1(a26d0c5c7826cd315f8b2c27e5a503a2a7b535c4) ) - ROM_REGION16_BE( 0x800000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x800000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "mpr-14134.c10", 0x000001, 0x80000, CRC(4fda6a4b) SHA1(a9e582e494ab967e8f3ccf4d5844bb8ef889928c) ) ROM_LOAD16_BYTE( "mpr-14142.a10", 0x000000, 0x80000, CRC(3cbf1f2a) SHA1(80b6b006936740087786acd538e28aca85fa6894) ) ROM_LOAD16_BYTE( "mpr-14135.c11", 0x200001, 0x80000, CRC(e9c74876) SHA1(aff9d071e77f01c6937188bf67be38fa898343e6) ) @@ -1699,7 +1697,7 @@ ROM_START( ddcrew1 ) ROM_LOAD( "epr-14128.c2", 0x40000, 0x40000, CRC(edba8e10) SHA1(25a2833ead4ca363802ddc2eb97c40976502921a) ) ROM_LOAD( "epr-14129.c3", 0x80000, 0x40000, CRC(e8ecc305) SHA1(a26d0c5c7826cd315f8b2c27e5a503a2a7b535c4) ) - ROM_REGION16_BE( 0x800000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x800000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "mpr-14134.c10", 0x000001, 0x80000, CRC(4fda6a4b) SHA1(a9e582e494ab967e8f3ccf4d5844bb8ef889928c) ) ROM_LOAD16_BYTE( "mpr-14142.a10", 0x000000, 0x80000, CRC(3cbf1f2a) SHA1(80b6b006936740087786acd538e28aca85fa6894) ) ROM_LOAD16_BYTE( "mpr-14135.c11", 0x200001, 0x80000, CRC(e9c74876) SHA1(aff9d071e77f01c6937188bf67be38fa898343e6) ) @@ -1737,7 +1735,7 @@ ROM_START( ddcrewj ) ROM_LOAD( "epr-14128.c2", 0x40000, 0x40000, CRC(edba8e10) SHA1(25a2833ead4ca363802ddc2eb97c40976502921a) ) ROM_LOAD( "epr-14129.c3", 0x80000, 0x40000, CRC(e8ecc305) SHA1(a26d0c5c7826cd315f8b2c27e5a503a2a7b535c4) ) - ROM_REGION16_BE( 0x800000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x800000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "mpr-14134.c10", 0x000001, 0x80000, CRC(4fda6a4b) SHA1(a9e582e494ab967e8f3ccf4d5844bb8ef889928c) ) ROM_LOAD16_BYTE( "mpr-14142.a10", 0x000000, 0x80000, CRC(3cbf1f2a) SHA1(80b6b006936740087786acd538e28aca85fa6894) ) ROM_LOAD16_BYTE( "mpr-14135.c11", 0x200001, 0x80000, CRC(e9c74876) SHA1(aff9d071e77f01c6937188bf67be38fa898343e6) ) @@ -1780,7 +1778,7 @@ ROM_START( desertbr ) ROM_LOAD( "mpr-14782.c2", 0x100000, 0x100000, CRC(ccc98d05) SHA1(b89594bbfff45e3b4fe433aeeaf8b4073c2cabb5) ) ROM_LOAD( "mpr-14783.c3", 0x200000, 0x100000, CRC(ef202bec) SHA1(b557092f8a3e1c9889d34588344c6dd2c6f06731) ) - ROM_REGION16_BE( 0x800000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x800000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "mpr-14788.c10", 0x000001, 0x100000, CRC(b5b05536) SHA1(f8fde7ebca38c0a6f6a864c17771aa155e6fc30d) ) ROM_LOAD16_BYTE( "mpr-14796.a10", 0x000000, 0x100000, CRC(c033220a) SHA1(279d3ef62b41d2c6a18ce1217a549402a874638b) ) ROM_LOAD16_BYTE( "mpr-14789.c11", 0x200001, 0x100000, CRC(0f9bcb97) SHA1(c15ab3ece596c54e1c4d8e8a755473609334e8ba) ) @@ -1820,7 +1818,7 @@ ROM_START( desertbrj ) ROM_LOAD( "mpr-14782.c2", 0x100000, 0x100000, CRC(ccc98d05) SHA1(b89594bbfff45e3b4fe433aeeaf8b4073c2cabb5) ) ROM_LOAD( "mpr-14783.c3", 0x200000, 0x100000, CRC(ef202bec) SHA1(b557092f8a3e1c9889d34588344c6dd2c6f06731) ) - ROM_REGION16_BE( 0x800000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x800000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "mpr-14788.c10", 0x000001, 0x100000, CRC(b5b05536) SHA1(f8fde7ebca38c0a6f6a864c17771aa155e6fc30d) ) ROM_LOAD16_BYTE( "mpr-14796.a10", 0x000000, 0x100000, CRC(c033220a) SHA1(279d3ef62b41d2c6a18ce1217a549402a874638b) ) ROM_LOAD16_BYTE( "mpr-14789.c11", 0x200001, 0x100000, CRC(0f9bcb97) SHA1(c15ab3ece596c54e1c4d8e8a755473609334e8ba) ) @@ -1860,7 +1858,7 @@ ROM_START( lghost ) ROM_LOAD( "epr-13415.c2", 0x40000, 0x40000, CRC(bbb62c48) SHA1(7a4c5bd11b73a92deece72b55627f48ac167acd6) ) ROM_LOAD( "epr-13416.c3", 0x80000, 0x40000, CRC(1d11dbae) SHA1(331aa49c6b38d32ec33184dbd0851888463ddbc7) ) - ROM_REGION16_BE( 0x800000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x800000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "epr-13603.a10", 0x000000, 0x80000, CRC(5350a94e) SHA1(47e99803cab4b508feb51069c940d6c824d6961d) ) ROM_LOAD16_BYTE( "epr-13604.c10", 0x000001, 0x80000, CRC(4009c8e5) SHA1(97f513d312f4c90f8bffdf797afa3749779989a5) ) ROM_LOAD16_BYTE( "mpr-13421.a11", 0x200000, 0x80000, CRC(2fc75890) SHA1(9f97f07dba3b978df8eb357894168ad74f151d30) ) @@ -1900,7 +1898,7 @@ ROM_START( lghostu ) ROM_LOAD( "epr-13415.c2", 0x40000, 0x40000, CRC(bbb62c48) SHA1(7a4c5bd11b73a92deece72b55627f48ac167acd6) ) ROM_LOAD( "epr-13416.c3", 0x80000, 0x40000, CRC(1d11dbae) SHA1(331aa49c6b38d32ec33184dbd0851888463ddbc7) ) - ROM_REGION16_BE( 0x800000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x800000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "epr-13603.a10", 0x000000, 0x80000, CRC(5350a94e) SHA1(47e99803cab4b508feb51069c940d6c824d6961d) ) ROM_LOAD16_BYTE( "epr-13604.c10", 0x000001, 0x80000, CRC(4009c8e5) SHA1(97f513d312f4c90f8bffdf797afa3749779989a5) ) ROM_LOAD16_BYTE( "mpr-13421.a11", 0x200000, 0x80000, CRC(2fc75890) SHA1(9f97f07dba3b978df8eb357894168ad74f151d30) ) @@ -1939,7 +1937,7 @@ ROM_START( mwalk ) ROM_LOAD( "mpr-13217.b2", 0x40000, 0x40000, CRC(7d1ac3ec) SHA1(8495357304f1df135bba77ef3b96e79a883b8ff0) ) ROM_LOAD( "mpr-13218.b3", 0x80000, 0x40000, CRC(56d3393c) SHA1(50a2d065060692c9ecaa56046a781cb21d93e554) ) - ROM_REGION16_BE( 0x200000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x200000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "mpr-13224.b11", 0x000001, 0x40000, CRC(c59f107b) SHA1(10fa60fca6e34eda277c483bb1c0e81bb88c8a47) ) ROM_LOAD16_BYTE( "mpr-13231.a11", 0x000000, 0x40000, CRC(a5e96346) SHA1(a854f4dd5dc16975373255110fdb8ab3d121b1af) ) ROM_LOAD16_BYTE( "mpr-13223.b10", 0x080001, 0x40000, CRC(364f60ff) SHA1(9ac887ec0b2e32b504b7c6a5f3bb1ce3fe41a15a) ) @@ -1977,7 +1975,7 @@ ROM_START( mwalku ) ROM_LOAD( "mpr-13217.b2", 0x40000, 0x40000, CRC(7d1ac3ec) SHA1(8495357304f1df135bba77ef3b96e79a883b8ff0) ) ROM_LOAD( "mpr-13218.b3", 0x80000, 0x40000, CRC(56d3393c) SHA1(50a2d065060692c9ecaa56046a781cb21d93e554) ) - ROM_REGION16_BE( 0x200000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x200000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "mpr-13224.b11", 0x000001, 0x40000, CRC(c59f107b) SHA1(10fa60fca6e34eda277c483bb1c0e81bb88c8a47) ) ROM_LOAD16_BYTE( "mpr-13231.a11", 0x000000, 0x40000, CRC(a5e96346) SHA1(a854f4dd5dc16975373255110fdb8ab3d121b1af) ) ROM_LOAD16_BYTE( "mpr-13223.b10", 0x080001, 0x40000, CRC(364f60ff) SHA1(9ac887ec0b2e32b504b7c6a5f3bb1ce3fe41a15a) ) @@ -2015,7 +2013,7 @@ ROM_START( mwalkj ) ROM_LOAD( "mpr-13217.b2", 0x40000, 0x40000, CRC(7d1ac3ec) SHA1(8495357304f1df135bba77ef3b96e79a883b8ff0) ) ROM_LOAD( "mpr-13218.b3", 0x80000, 0x40000, CRC(56d3393c) SHA1(50a2d065060692c9ecaa56046a781cb21d93e554) ) - ROM_REGION16_BE( 0x200000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x200000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "mpr-13224.b11", 0x000001, 0x40000, CRC(c59f107b) SHA1(10fa60fca6e34eda277c483bb1c0e81bb88c8a47) ) ROM_LOAD16_BYTE( "mpr-13231.a11", 0x000000, 0x40000, CRC(a5e96346) SHA1(a854f4dd5dc16975373255110fdb8ab3d121b1af) ) ROM_LOAD16_BYTE( "mpr-13223.b10", 0x080001, 0x40000, CRC(364f60ff) SHA1(9ac887ec0b2e32b504b7c6a5f3bb1ce3fe41a15a) ) @@ -2057,7 +2055,7 @@ ROM_START( pontoon ) ROM_LOAD( "epr-13098.b2", 0x40000, 0x40000, CRC(89fc9a9b) SHA1(d98691eb5fef8aca4ad5e416d0a3797d6ca9b012) ) ROM_LOAD( "epr-13099.b3", 0x80000, 0x40000, CRC(790e0ac6) SHA1(a4999b7015ef27d6cbe4f53bc0d7fe05ee40d178) ) - ROM_REGION16_BE( 0x80000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x80000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "epr-13173.b11", 0x000001, 0x40000, CRC(40a0ddfa) SHA1(f3917361f627865d2f1a22791904da056ce8a93a) ) ROM_LOAD16_BYTE( "epr-13176.a11", 0x000000, 0x40000, CRC(1184fbd2) SHA1(685ee2d7c4a0134af13ccf5d15f2e56a6b905195) ) @@ -2083,7 +2081,7 @@ ROM_START( shdancer ) ROM_LOAD( "mpr-12713.b2", 0x40000, 0x40000, CRC(852d2b1c) SHA1(8e5bc83d45e48b621ea3016207f2028fe41701e6) ) ROM_LOAD( "mpr-12714.b3", 0x80000, 0x40000, CRC(448226ce) SHA1(3060e4a43311069e2691d659c1e0c1a48edfeedb) ) - ROM_REGION16_BE( 0x200000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x200000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "mpr-12719.b11", 0x000001, 0x40000, CRC(d6888534) SHA1(2201f1921a68cf39e5a94b487c90e48d032d630f) ) ROM_LOAD16_BYTE( "mpr-12726.a11", 0x000000, 0x40000, CRC(ff344945) SHA1(2743778c42f53321f9691d60bbf94ea8baf1382f) ) ROM_LOAD16_BYTE( "mpr-12718.b10", 0x080001, 0x40000, CRC(ba2efc0c) SHA1(459a1a280f870c94aefb70127ed007cb090ed203) ) @@ -2113,7 +2111,7 @@ ROM_START( shdancerj ) ROM_LOAD( "mpr-12713.b2", 0x40000, 0x40000, CRC(852d2b1c) SHA1(8e5bc83d45e48b621ea3016207f2028fe41701e6) ) ROM_LOAD( "mpr-12714.b3", 0x80000, 0x40000, CRC(448226ce) SHA1(3060e4a43311069e2691d659c1e0c1a48edfeedb) ) - ROM_REGION16_BE( 0x200000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x200000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "mpr-12719.b11", 0x000001, 0x40000, CRC(d6888534) SHA1(2201f1921a68cf39e5a94b487c90e48d032d630f) ) ROM_LOAD16_BYTE( "mpr-12726.a11", 0x000000, 0x40000, CRC(ff344945) SHA1(2743778c42f53321f9691d60bbf94ea8baf1382f) ) ROM_LOAD16_BYTE( "mpr-12718.b10", 0x080001, 0x40000, CRC(ba2efc0c) SHA1(459a1a280f870c94aefb70127ed007cb090ed203) ) @@ -2147,7 +2145,7 @@ ROM_START( shdancer1 ) ROM_LOAD( "mpr-12713.b2", 0x40000, 0x40000, CRC(852d2b1c) SHA1(8e5bc83d45e48b621ea3016207f2028fe41701e6) ) ROM_LOAD( "mpr-12714.b3", 0x80000, 0x40000, CRC(448226ce) SHA1(3060e4a43311069e2691d659c1e0c1a48edfeedb) ) - ROM_REGION16_BE( 0x200000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x200000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "mpr-12719.b11", 0x000001, 0x40000, CRC(d6888534) SHA1(2201f1921a68cf39e5a94b487c90e48d032d630f) ) ROM_LOAD16_BYTE( "mpr-12726.a11", 0x000000, 0x40000, CRC(ff344945) SHA1(2743778c42f53321f9691d60bbf94ea8baf1382f) ) ROM_LOAD16_BYTE( "mpr-12718.b10", 0x080001, 0x40000, CRC(ba2efc0c) SHA1(459a1a280f870c94aefb70127ed007cb090ed203) ) @@ -2183,7 +2181,7 @@ ROM_START( wwallyj ) ROM_LOAD( "mpr-14720.c2", 0x040000, 0x40000, CRC(f96d19f4) SHA1(e350b551db8d01062397cd9a0c952a7b5dbf3fe6) ) ROM_LOAD( "mpr-14721.c3", 0x080000, 0x40000, CRC(c4ced91d) SHA1(4c8a070959ca10e2dddf407ddbba212415d78727) ) - ROM_REGION16_BE( 0x500000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x500000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "mpr-14726.c10", 0x000001, 0x100000, CRC(7213d1d3) SHA1(b70346a1dd3aa112bc696a7f4dd9ca908c3e5afa) ) ROM_LOAD16_BYTE( "mpr-14732.a10", 0x000000, 0x100000, CRC(04ced549) SHA1(59fd6510f0e14613d830ac6527f12ccc0b9351a5) ) ROM_LOAD16_BYTE( "mpr-14727.c11", 0x200001, 0x100000, CRC(3b74e0f0) SHA1(40432dbbbf75dae1e5e32b7cc2c4884f5e9e3bf5) ) @@ -2216,7 +2214,7 @@ ROM_START( wwallyja ) ROM_LOAD( "mpr-14720.c2", 0x040000, 0x40000, CRC(f96d19f4) SHA1(e350b551db8d01062397cd9a0c952a7b5dbf3fe6) ) ROM_LOAD( "mpr-14721.c3", 0x080000, 0x40000, CRC(c4ced91d) SHA1(4c8a070959ca10e2dddf407ddbba212415d78727) ) - ROM_REGION16_BE( 0x500000, "gfx2", 0 ) // sprites + ROM_REGION16_BE( 0x500000, "sprites", 0 ) // sprites ROM_LOAD16_BYTE( "mpr-14726.c10", 0x000001, 0x100000, CRC(7213d1d3) SHA1(b70346a1dd3aa112bc696a7f4dd9ca908c3e5afa) ) ROM_LOAD16_BYTE( "mpr-14732.a10", 0x000000, 0x100000, CRC(04ced549) SHA1(59fd6510f0e14613d830ac6527f12ccc0b9351a5) ) ROM_LOAD16_BYTE( "mpr-14727.c11", 0x200001, 0x100000, CRC(3b74e0f0) SHA1(40432dbbbf75dae1e5e32b7cc2c4884f5e9e3bf5) ) diff --git a/src/mame/drivers/segaxbd.c b/src/mame/drivers/segaxbd.c index b32f0fce25a..a4193172b7f 100644 --- a/src/mame/drivers/segaxbd.c +++ b/src/mame/drivers/segaxbd.c @@ -927,9 +927,9 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16, segaxbd_state ) AM_RANGE(0x0e0000, 0x0e0007) AM_MIRROR(0x003ff8) AM_DEVREADWRITE("multiplier_main", sega_315_5248_multiplier_device, read, write) AM_RANGE(0x0e4000, 0x0e401f) AM_MIRROR(0x003fe0) AM_DEVREADWRITE("divider_main", sega_315_5249_divider_device, read, write) AM_RANGE(0x0e8000, 0x0e801f) AM_MIRROR(0x003fe0) AM_DEVREADWRITE("cmptimer_main", sega_315_5250_compare_timer_device, read, write) - AM_RANGE(0x100000, 0x100fff) AM_MIRROR(0x00f000) AM_RAM AM_SHARE("spriteram") - AM_RANGE(0x110000, 0x11ffff) AM_WRITE_LEGACY(segaic16_sprites_draw_0_w) - AM_RANGE(0x120000, 0x123fff) AM_MIRROR(0x00c000) AM_RAM_WRITE_LEGACY(segaic16_paletteram_w) AM_SHARE("paletteram") + AM_RANGE(0x100000, 0x100fff) AM_MIRROR(0x00f000) AM_RAM AM_SHARE("sprites") + AM_RANGE(0x110000, 0x11ffff) AM_DEVWRITE("sprites", sega_xboard_sprite_device, draw_write) + AM_RANGE(0x120000, 0x123fff) AM_MIRROR(0x00c000) AM_RAM_WRITE(paletteram_w) AM_SHARE("paletteram") AM_RANGE(0x130000, 0x13ffff) AM_READWRITE(adc_r, adc_w) AM_RANGE(0x140000, 0x14000f) AM_MIRROR(0x00fff0) AM_READWRITE(iochip_0_r, iochip_0_w) AM_RANGE(0x150000, 0x15000f) AM_MIRROR(0x00fff0) AM_READWRITE(iochip_1_r, iochip_1_w) @@ -1613,7 +1613,7 @@ static MACHINE_CONFIG_START( xboard, segaxbd_state ) MCFG_SCREEN_RAW_PARAMS(MASTER_CLOCK/8, 400, 0, 320, 262, 0, 224) MCFG_SCREEN_UPDATE_DRIVER(segaxbd_state, screen_update) - MCFG_SEGA16SP_ADD_XBOARD("segaspr1") + MCFG_SEGA_XBOARD_SPRITES_ADD("sprites") // sound hardware MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") @@ -1736,7 +1736,7 @@ ROM_START( aburner ) ROM_LOAD( "epr-10925.153", 0x10000, 0x10000, CRC(4ef048cc) SHA1(3b386b3bfa600f114dbc19796bb6864a88ff4562) ) ROM_LOAD( "epr-10924.152", 0x20000, 0x10000, CRC(50c15a6d) SHA1(fc202cc583fc6804647abc884fdf332e72ea3100) ) - ROM_REGION32_LE( 0x200000, "gfx2", 0 ) // sprites + ROM_REGION32_LE( 0x200000, "sprites", 0 ) // sprites ROM_LOAD32_BYTE( "mpr-10932.90", 0x000000, 0x20000, CRC(cc0821d6) SHA1(22e84419a585209bbda1466d2180504c316a9b7f) ) // First 8 roms are MPR, the rest are EPR ROM_LOAD32_BYTE( "mpr-10934.94", 0x000001, 0x20000, CRC(4a51b1fa) SHA1(2eed018a5a1e935bb72b6f440a794466a1397dc5) ) ROM_LOAD32_BYTE( "mpr-10936.98", 0x000002, 0x20000, CRC(ada70d64) SHA1(ba6203b0fdb4c4998b7be5b446eb8354751d553a) ) @@ -1787,7 +1787,7 @@ ROM_START( aburner2 ) ROM_LOAD( "epr-11114.153", 0x10000, 0x10000, CRC(2e97f633) SHA1(074125c106dd00785903b2e10cd7e28d5036eb60) ) ROM_LOAD( "epr-11113.152", 0x20000, 0x10000, CRC(36058c8c) SHA1(52befe6c6c53f10b6fd4971098abc8f8d3eef9d4) ) - ROM_REGION32_LE( 0x200000, "gfx2", 0 ) // sprites + ROM_REGION32_LE( 0x200000, "sprites", 0 ) // sprites ROM_LOAD32_BYTE( "mpr-10932.90", 0x000000, 0x20000, CRC(cc0821d6) SHA1(22e84419a585209bbda1466d2180504c316a9b7f) ) // First 8 roms are MPR, the rest are EPR ROM_LOAD32_BYTE( "mpr-10934.94", 0x000001, 0x20000, CRC(4a51b1fa) SHA1(2eed018a5a1e935bb72b6f440a794466a1397dc5) ) ROM_LOAD32_BYTE( "mpr-10936.98", 0x000002, 0x20000, CRC(ada70d64) SHA1(ba6203b0fdb4c4998b7be5b446eb8354751d553a) ) @@ -1854,7 +1854,7 @@ ROM_START( loffire ) ROM_LOAD( "opr-12792.153", 0x10000, 0x10000, CRC(e506723c) SHA1(d04dc29686fe348f8f715d14c027de0e508c770f) ) ROM_LOAD( "opr-12793.152", 0x20000, 0x10000, CRC(0ce8cce3) SHA1(1a6b1af2b0b9e8240e681f7b15e9d08595753fe6) ) - ROM_REGION32_LE( 0x200000, "gfx2", 0 ) // sprites + ROM_REGION32_LE( 0x200000, "sprites", 0 ) // sprites ROM_LOAD32_BYTE( "epr-12787.90", 0x000000, 0x20000, CRC(6431a3a6) SHA1(63a732b7dfd2b83fe7684d47fea26063c4ece099) ) ROM_LOAD32_BYTE( "epr-12788.94", 0x000001, 0x20000, CRC(1982a0ce) SHA1(e4756f31b0094e0e9ddb2df53a5c938ac5559230) ) ROM_LOAD32_BYTE( "epr-12789.98", 0x000002, 0x20000, CRC(97d03274) SHA1(b4b9921db53949bc8e91f8a2992e89c172fe8893) ) @@ -1908,7 +1908,7 @@ ROM_START( loffireu ) ROM_LOAD( "opr-12792.153", 0x10000, 0x10000, CRC(e506723c) SHA1(d04dc29686fe348f8f715d14c027de0e508c770f) ) ROM_LOAD( "opr-12793.152", 0x20000, 0x10000, CRC(0ce8cce3) SHA1(1a6b1af2b0b9e8240e681f7b15e9d08595753fe6) ) - ROM_REGION32_LE( 0x200000, "gfx2", 0 ) // sprites + ROM_REGION32_LE( 0x200000, "sprites", 0 ) // sprites ROM_LOAD32_BYTE( "epr-12787.90", 0x000000, 0x20000, CRC(6431a3a6) SHA1(63a732b7dfd2b83fe7684d47fea26063c4ece099) ) ROM_LOAD32_BYTE( "epr-12788.94", 0x000001, 0x20000, CRC(1982a0ce) SHA1(e4756f31b0094e0e9ddb2df53a5c938ac5559230) ) ROM_LOAD32_BYTE( "epr-12789.98", 0x000002, 0x20000, CRC(97d03274) SHA1(b4b9921db53949bc8e91f8a2992e89c172fe8893) ) @@ -1965,7 +1965,7 @@ ROM_START( loffirej ) ROM_LOAD( "opr-12792.153", 0x10000, 0x10000, CRC(e506723c) SHA1(d04dc29686fe348f8f715d14c027de0e508c770f) ) ROM_LOAD( "opr-12793.152", 0x20000, 0x10000, CRC(0ce8cce3) SHA1(1a6b1af2b0b9e8240e681f7b15e9d08595753fe6) ) - ROM_REGION32_LE( 0x200000, "gfx2", 0 ) // sprites + ROM_REGION32_LE( 0x200000, "sprites", 0 ) // sprites ROM_LOAD32_BYTE( "epr-12787.90", 0x000000, 0x20000, CRC(6431a3a6) SHA1(63a732b7dfd2b83fe7684d47fea26063c4ece099) ) ROM_LOAD32_BYTE( "epr-12788.94", 0x000001, 0x20000, CRC(1982a0ce) SHA1(e4756f31b0094e0e9ddb2df53a5c938ac5559230) ) ROM_LOAD32_BYTE( "epr-12789.98", 0x000002, 0x20000, CRC(97d03274) SHA1(b4b9921db53949bc8e91f8a2992e89c172fe8893) ) @@ -2025,7 +2025,7 @@ ROM_START( thndrbld ) ROM_LOAD( "epr-11315.ic153", 0x10000, 0x10000, CRC(35813088) SHA1(ea1ec982d1509efb26e7b6a150825a6a905efed9) ) ROM_LOAD( "epr-11316.ic152", 0x20000, 0x10000, CRC(84290dff) SHA1(c13fb6ef12a991f79a95072f953a02b5c992aa2d) ) - ROM_REGION32_LE( 0x200000, "gfx2", 0 ) // sprites + ROM_REGION32_LE( 0x200000, "sprites", 0 ) // sprites ROM_LOAD32_BYTE( "epr-11323.ic90", 0x000000, 0x20000, CRC(27e40735) SHA1(284ddb88efe741fb78199ea619c9b230ee689803) ) ROM_LOAD32_BYTE( "epr-11322.ic94", 0x000001, 0x20000, CRC(10364d74) SHA1(393b19a972b5d8817ffd438f13ded73cd58ebe56) ) ROM_LOAD32_BYTE( "epr-11321.ic98", 0x000002, 0x20000, CRC(8e738f58) SHA1(9f2dceebf01e582cf60f072ae411000d8503894b) ) @@ -2079,7 +2079,7 @@ ROM_START( thndrbld1 ) ROM_LOAD( "epr-11315.ic153", 0x10000, 0x10000, CRC(35813088) SHA1(ea1ec982d1509efb26e7b6a150825a6a905efed9) ) ROM_LOAD( "epr-11316.ic152", 0x20000, 0x10000, CRC(84290dff) SHA1(c13fb6ef12a991f79a95072f953a02b5c992aa2d) ) - ROM_REGION32_LE( 0x200000, "gfx2", 0 ) // sprites + ROM_REGION32_LE( 0x200000, "sprites", 0 ) // sprites ROM_LOAD32_BYTE( "epr-11323.ic90", 0x000000, 0x20000, CRC(27e40735) SHA1(284ddb88efe741fb78199ea619c9b230ee689803) ) ROM_LOAD32_BYTE( "epr-11322.ic94", 0x000001, 0x20000, CRC(10364d74) SHA1(393b19a972b5d8817ffd438f13ded73cd58ebe56) ) ROM_LOAD32_BYTE( "epr-11321.ic98", 0x000002, 0x20000, CRC(8e738f58) SHA1(9f2dceebf01e582cf60f072ae411000d8503894b) ) @@ -2137,7 +2137,7 @@ ROM_START( lastsurv ) ROM_LOAD( "epr-12056.ic153", 0x10000, 0x10000, CRC(3cd4c306) SHA1(b0f178688870c67936a15383024c392072e3bc66) ) ROM_LOAD( "epr-12057.ic152", 0x20000, 0x10000, CRC(37e91770) SHA1(69e26f4d3c4ebfaf0225a9b1c60038595929ef05) ) - ROM_REGION32_LE( 0x200000, "gfx2", 0 ) // sprites + ROM_REGION32_LE( 0x200000, "sprites", 0 ) // sprites ROM_LOAD32_BYTE( "mpr-12064.ic90", 0x000000, 0x20000, CRC(84562a69) SHA1(815189a65065def213ef171fe40a44a455dfe75a) ) ROM_LOAD32_BYTE( "mpr-12063.ic94", 0x000001, 0x20000, CRC(d163727c) SHA1(50ed2b401e107a359874dad5d86eec788f5504eb) ) ROM_LOAD32_BYTE( "mpr-12062.ic98", 0x000002, 0x20000, CRC(6b57833b) SHA1(1d70894c81a4cd39f43067701a598d2c4fbffa58) ) @@ -2193,7 +2193,7 @@ ROM_START( rachero ) ROM_LOAD( "epr-12880.ic153", 0x10000, 0x10000, CRC(27ff04a5) SHA1(b554a6e060f4803100be8efa52977b503eb0f31d) ) ROM_LOAD( "epr-12881.ic152", 0x20000, 0x10000, CRC(72f14491) SHA1(b7a6cbd08470a5edda77cdd0337abd502c4905fd) ) - ROM_REGION32_LE( 0x200000, "gfx2", 0 ) // sprites + ROM_REGION32_LE( 0x200000, "sprites", 0 ) // sprites ROM_LOAD32_BYTE( "epr-12872.ic90", 0x000000, 0x20000, CRC(68d56139) SHA1(b5f32edbda10c31d52f90defea2bae226676069f) ) ROM_LOAD32_BYTE( "epr-12873.ic94", 0x000001, 0x20000, CRC(3d3ec450) SHA1(ac96ad8c7b365478bd1e5826a073e242f1208247) ) ROM_LOAD32_BYTE( "epr-12874.ic98", 0x000002, 0x20000, CRC(7d6bde23) SHA1(88b12ec6386cdad60b0028b72033a0037a0cdbdb) ) @@ -2289,7 +2289,7 @@ ROM_START( smgp ) ROM_LOAD( "epr-12430.153", 0x10000, 0x10000, CRC(05e00134) SHA1(8baaa80815d5dabd38dc8600e357975b96d23b95) ) ROM_LOAD( "epr-12431.152", 0x20000, 0x10000, CRC(35572f4a) SHA1(d66456ecf7b59f81736fb873c553926b56bb3977)) - ROM_REGION32_LE( 0x200000, "gfx2", 0 ) // sprites + ROM_REGION32_LE( 0x200000, "sprites", 0 ) // sprites ROM_LOAD32_BYTE( "mpr-12425.90", 0x000000, 0x20000, CRC(14bf2a15) SHA1(84db3ac09e4a8fe470ac051d8d5de1814b48bc72) ) ROM_LOAD32_BYTE( "mpr-12426.94", 0x000001, 0x20000, CRC(28b60dc0) SHA1(ad69d449434853445a076319a55a29014217a100) ) ROM_LOAD32_BYTE( "mpr-12427.98", 0x000002, 0x20000, CRC(0a367928) SHA1(bcb558b7c23906397e66a7f046b09eb5036c0888) ) @@ -2355,7 +2355,7 @@ ROM_START( smgp6 ) ROM_LOAD( "epr-12430.153", 0x10000, 0x10000, CRC(05e00134) SHA1(8baaa80815d5dabd38dc8600e357975b96d23b95) ) ROM_LOAD( "epr-12431.152", 0x20000, 0x10000, CRC(35572f4a) SHA1(d66456ecf7b59f81736fb873c553926b56bb3977)) - ROM_REGION32_LE( 0x200000, "gfx2", 0 ) // sprites + ROM_REGION32_LE( 0x200000, "sprites", 0 ) // sprites ROM_LOAD32_BYTE( "mpr-12425.90", 0x000000, 0x20000, CRC(14bf2a15) SHA1(84db3ac09e4a8fe470ac051d8d5de1814b48bc72) ) ROM_LOAD32_BYTE( "mpr-12426.94", 0x000001, 0x20000, CRC(28b60dc0) SHA1(ad69d449434853445a076319a55a29014217a100) ) ROM_LOAD32_BYTE( "mpr-12427.98", 0x000002, 0x20000, CRC(0a367928) SHA1(bcb558b7c23906397e66a7f046b09eb5036c0888) ) @@ -2471,7 +2471,7 @@ ROM_START( smgp5 ) ROM_LOAD( "epr-12430.153", 0x10000, 0x10000, CRC(05e00134) SHA1(8baaa80815d5dabd38dc8600e357975b96d23b95) ) ROM_LOAD( "epr-12431.152", 0x20000, 0x10000, CRC(35572f4a) SHA1(d66456ecf7b59f81736fb873c553926b56bb3977)) - ROM_REGION32_LE( 0x200000, "gfx2", 0 ) // sprites + ROM_REGION32_LE( 0x200000, "sprites", 0 ) // sprites ROM_LOAD32_BYTE( "mpr-12425.90", 0x000000, 0x20000, CRC(14bf2a15) SHA1(84db3ac09e4a8fe470ac051d8d5de1814b48bc72) ) ROM_LOAD32_BYTE( "mpr-12426.94", 0x000001, 0x20000, CRC(28b60dc0) SHA1(ad69d449434853445a076319a55a29014217a100) ) ROM_LOAD32_BYTE( "mpr-12427.98", 0x000002, 0x20000, CRC(0a367928) SHA1(bcb558b7c23906397e66a7f046b09eb5036c0888) ) @@ -2536,7 +2536,7 @@ ROM_START( smgpu ) ROM_LOAD( "epr-12430.153", 0x10000, 0x10000, CRC(05e00134) SHA1(8baaa80815d5dabd38dc8600e357975b96d23b95) ) ROM_LOAD( "epr-12431.152", 0x20000, 0x10000, CRC(35572f4a) SHA1(d66456ecf7b59f81736fb873c553926b56bb3977)) - ROM_REGION32_LE( 0x200000, "gfx2", 0 ) // sprites + ROM_REGION32_LE( 0x200000, "sprites", 0 ) // sprites ROM_LOAD32_BYTE( "mpr-12425.90", 0x000000, 0x20000, CRC(14bf2a15) SHA1(84db3ac09e4a8fe470ac051d8d5de1814b48bc72) ) ROM_LOAD32_BYTE( "mpr-12426.94", 0x000001, 0x20000, CRC(28b60dc0) SHA1(ad69d449434853445a076319a55a29014217a100) ) ROM_LOAD32_BYTE( "mpr-12427.98", 0x000002, 0x20000, CRC(0a367928) SHA1(bcb558b7c23906397e66a7f046b09eb5036c0888) ) @@ -2602,7 +2602,7 @@ ROM_START( smgpu1 ) ROM_LOAD( "epr-12430.153", 0x10000, 0x10000, CRC(05e00134) SHA1(8baaa80815d5dabd38dc8600e357975b96d23b95) ) ROM_LOAD( "epr-12431.152", 0x20000, 0x10000, CRC(35572f4a) SHA1(d66456ecf7b59f81736fb873c553926b56bb3977)) - ROM_REGION32_LE( 0x200000, "gfx2", 0 ) // sprites + ROM_REGION32_LE( 0x200000, "sprites", 0 ) // sprites ROM_LOAD32_BYTE( "mpr-12425.90", 0x000000, 0x20000, CRC(14bf2a15) SHA1(84db3ac09e4a8fe470ac051d8d5de1814b48bc72) ) ROM_LOAD32_BYTE( "mpr-12426.94", 0x000001, 0x20000, CRC(28b60dc0) SHA1(ad69d449434853445a076319a55a29014217a100) ) ROM_LOAD32_BYTE( "mpr-12427.98", 0x000002, 0x20000, CRC(0a367928) SHA1(bcb558b7c23906397e66a7f046b09eb5036c0888) ) @@ -2710,7 +2710,7 @@ ROM_START( smgpu2 ) ROM_LOAD( "epr-12430.153", 0x10000, 0x10000, CRC(05e00134) SHA1(8baaa80815d5dabd38dc8600e357975b96d23b95) ) ROM_LOAD( "epr-12431.152", 0x20000, 0x10000, CRC(35572f4a) SHA1(d66456ecf7b59f81736fb873c553926b56bb3977)) - ROM_REGION32_LE( 0x200000, "gfx2", 0 ) // sprites + ROM_REGION32_LE( 0x200000, "sprites", 0 ) // sprites ROM_LOAD32_BYTE( "mpr-12425.90", 0x000000, 0x20000, CRC(14bf2a15) SHA1(84db3ac09e4a8fe470ac051d8d5de1814b48bc72) ) ROM_LOAD32_BYTE( "mpr-12426.94", 0x000001, 0x20000, CRC(28b60dc0) SHA1(ad69d449434853445a076319a55a29014217a100) ) ROM_LOAD32_BYTE( "mpr-12427.98", 0x000002, 0x20000, CRC(0a367928) SHA1(bcb558b7c23906397e66a7f046b09eb5036c0888) ) @@ -2775,7 +2775,7 @@ ROM_START( smgpj ) ROM_LOAD( "epr-12430.153", 0x10000, 0x10000, CRC(05e00134) SHA1(8baaa80815d5dabd38dc8600e357975b96d23b95) ) ROM_LOAD( "epr-12431.152", 0x20000, 0x10000, CRC(35572f4a) SHA1(d66456ecf7b59f81736fb873c553926b56bb3977)) - ROM_REGION32_LE( 0x200000, "gfx2", 0 ) // sprites + ROM_REGION32_LE( 0x200000, "sprites", 0 ) // sprites ROM_LOAD32_BYTE( "mpr-12425.90", 0x000000, 0x20000, CRC(14bf2a15) SHA1(84db3ac09e4a8fe470ac051d8d5de1814b48bc72) ) ROM_LOAD32_BYTE( "mpr-12426.94", 0x000001, 0x20000, CRC(28b60dc0) SHA1(ad69d449434853445a076319a55a29014217a100) ) ROM_LOAD32_BYTE( "mpr-12427.98", 0x000002, 0x20000, CRC(0a367928) SHA1(bcb558b7c23906397e66a7f046b09eb5036c0888) ) @@ -2840,7 +2840,7 @@ ROM_START( smgpja ) ROM_LOAD( "epr-12430.153", 0x10000, 0x10000, CRC(05e00134) SHA1(8baaa80815d5dabd38dc8600e357975b96d23b95) ) ROM_LOAD( "epr-12431.152", 0x20000, 0x10000, CRC(35572f4a) SHA1(d66456ecf7b59f81736fb873c553926b56bb3977)) - ROM_REGION32_LE( 0x200000, "gfx2", 0 ) // sprites + ROM_REGION32_LE( 0x200000, "sprites", 0 ) // sprites ROM_LOAD32_BYTE( "mpr-12425.90", 0x000000, 0x20000, CRC(14bf2a15) SHA1(84db3ac09e4a8fe470ac051d8d5de1814b48bc72) ) ROM_LOAD32_BYTE( "mpr-12426.94", 0x000001, 0x20000, CRC(28b60dc0) SHA1(ad69d449434853445a076319a55a29014217a100) ) ROM_LOAD32_BYTE( "mpr-12427.98", 0x000002, 0x20000, CRC(0a367928) SHA1(bcb558b7c23906397e66a7f046b09eb5036c0888) ) @@ -2910,7 +2910,7 @@ ROM_START( abcop ) ROM_LOAD( "opr-13554.ic153", 0x10000, 0x10000, CRC(4e3df9f0) SHA1(8b481c2cd25c58612ac8ac3ffb7eeae9ca247d2e) ) ROM_LOAD( "opr-13555.ic152", 0x20000, 0x10000, CRC(6c4a1d42) SHA1(6c37b045b21173f1e2f7bd19d01c00979b8107fb) ) - ROM_REGION32_LE( 0x200000, "gfx2", 0 ) // sprites + ROM_REGION32_LE( 0x200000, "sprites", 0 ) // sprites ROM_LOAD32_BYTE( "opr-13552.ic90", 0x000000, 0x20000, CRC(cc2cf706) SHA1(ad39c22e652ebcd90ffb5e17ae35985645f93c71) ) ROM_LOAD32_BYTE( "opr-13551.ic94", 0x000001, 0x20000, CRC(d6f276c1) SHA1(9ec68157ea460e09ef4b69aa8ea17687dc47ea59) ) ROM_LOAD32_BYTE( "opr-13550.ic98", 0x000002, 0x20000, CRC(f16518dd) SHA1(a5f1785cd28f03069cb238ac92c6afb5a26cbd37) ) @@ -2963,7 +2963,7 @@ ROM_START( abcopj ) ROM_LOAD( "opr-13554.ic153", 0x10000, 0x10000, CRC(4e3df9f0) SHA1(8b481c2cd25c58612ac8ac3ffb7eeae9ca247d2e) ) ROM_LOAD( "opr-13555.ic152", 0x20000, 0x10000, CRC(6c4a1d42) SHA1(6c37b045b21173f1e2f7bd19d01c00979b8107fb) ) - ROM_REGION32_LE( 0x200000, "gfx2", 0 ) // sprites + ROM_REGION32_LE( 0x200000, "sprites", 0 ) // sprites ROM_LOAD32_BYTE( "opr-13552.ic90", 0x000000, 0x20000, CRC(cc2cf706) SHA1(ad39c22e652ebcd90ffb5e17ae35985645f93c71) ) ROM_LOAD32_BYTE( "opr-13551.ic94", 0x000001, 0x20000, CRC(d6f276c1) SHA1(9ec68157ea460e09ef4b69aa8ea17687dc47ea59) ) ROM_LOAD32_BYTE( "opr-13550.ic98", 0x000002, 0x20000, CRC(f16518dd) SHA1(a5f1785cd28f03069cb238ac92c6afb5a26cbd37) ) @@ -3021,7 +3021,7 @@ ROM_START( gprider ) ROM_LOAD( "epr-13384.ic153", 0x10000, 0x10000, CRC(fe8238bd) SHA1(601910bd86536e6b08f5308b298c8f01fa60f233) ) ROM_LOAD( "epr-13385.ic152", 0x20000, 0x10000, CRC(6df1b995) SHA1(5aab19b87a9ef162c30ccf5974cb795e37dba91f) ) - ROM_REGION32_LE( 0x200000, "gfx2", 0 ) // sprites + ROM_REGION32_LE( 0x200000, "sprites", 0 ) // sprites ROM_LOAD32_BYTE( "epr-13382.ic90", 0x000000, 0x20000, CRC(01dac209) SHA1(4c6b03308193c472f6cdbcede306f8ce6db0cc4b) ) ROM_LOAD32_BYTE( "epr-13381.ic94", 0x000001, 0x20000, CRC(3a50d931) SHA1(9d9cb1793f3b8f562ce0ea49f2afeef099f20859) ) ROM_LOAD32_BYTE( "epr-13380.ic98", 0x000002, 0x20000, CRC(ad1024c8) SHA1(86e941424b2e2e00940886e5daed640a78ed7403) ) @@ -3076,7 +3076,7 @@ ROM_START( gprideru ) ROM_LOAD( "epr-13384.ic153", 0x10000, 0x10000, CRC(fe8238bd) SHA1(601910bd86536e6b08f5308b298c8f01fa60f233) ) ROM_LOAD( "epr-13385.ic152", 0x20000, 0x10000, CRC(6df1b995) SHA1(5aab19b87a9ef162c30ccf5974cb795e37dba91f) ) - ROM_REGION32_LE( 0x200000, "gfx2", 0 ) // sprites + ROM_REGION32_LE( 0x200000, "sprites", 0 ) // sprites ROM_LOAD32_BYTE( "epr-13382.ic90", 0x000000, 0x20000, CRC(01dac209) SHA1(4c6b03308193c472f6cdbcede306f8ce6db0cc4b) ) ROM_LOAD32_BYTE( "epr-13381.ic94", 0x000001, 0x20000, CRC(3a50d931) SHA1(9d9cb1793f3b8f562ce0ea49f2afeef099f20859) ) ROM_LOAD32_BYTE( "epr-13380.ic98", 0x000002, 0x20000, CRC(ad1024c8) SHA1(86e941424b2e2e00940886e5daed640a78ed7403) ) @@ -3131,7 +3131,7 @@ ROM_START( gpriderj ) ROM_LOAD( "epr-13384.ic153", 0x10000, 0x10000, CRC(fe8238bd) SHA1(601910bd86536e6b08f5308b298c8f01fa60f233) ) ROM_LOAD( "epr-13385.ic152", 0x20000, 0x10000, CRC(6df1b995) SHA1(5aab19b87a9ef162c30ccf5974cb795e37dba91f) ) - ROM_REGION32_LE( 0x200000, "gfx2", 0 ) // sprites + ROM_REGION32_LE( 0x200000, "sprites", 0 ) // sprites ROM_LOAD32_BYTE( "epr-13382.ic90", 0x000000, 0x20000, CRC(01dac209) SHA1(4c6b03308193c472f6cdbcede306f8ce6db0cc4b) ) ROM_LOAD32_BYTE( "epr-13381.ic94", 0x000001, 0x20000, CRC(3a50d931) SHA1(9d9cb1793f3b8f562ce0ea49f2afeef099f20859) ) ROM_LOAD32_BYTE( "epr-13380.ic98", 0x000002, 0x20000, CRC(ad1024c8) SHA1(86e941424b2e2e00940886e5daed640a78ed7403) ) @@ -3182,7 +3182,7 @@ ROM_START( rascot ) ROM_LOAD( "epr-13962", 0x10000, 0x10000, CRC(7d7605bc) SHA1(20d3a7116807db7c831e285233d8c67317980e4a) ) ROM_LOAD( "epr-13963", 0x20000, 0x10000, CRC(f3376b65) SHA1(36b9292518a112409d03b97ea048b7ab22734841) ) - ROM_REGION32_LE( 0x200000, "gfx2", 0 ) // sprites + ROM_REGION32_LE( 0x200000, "sprites", 0 ) // sprites ROM_LOAD32_BYTE( "epr-13960", 0x000000, 0x20000, CRC(b974128d) SHA1(14450615b3a10b1de6d098a282f80f80c98c34b8) ) ROM_LOAD32_BYTE( "epr-13959", 0x000001, 0x20000, CRC(db245b22) SHA1(301b7caea7a3b42ab1ab21894ad61b8b14ef1e7c) ) ROM_LOAD32_BYTE( "epr-13958", 0x000002, 0x20000, CRC(7803a027) SHA1(ff659da334e4440a6de9be43dde9dfa21dae5f14) ) @@ -3218,8 +3218,6 @@ DRIVER_INIT_MEMBER(segaxbd_state,generic) m_iochip_custom_io_w[0][3] = iowrite_delegate(FUNC(segaxbd_state::generic_iochip0_lamps_w), this); // point globals to allocated memory regions - segaic16_spriteram_0 = reinterpret_cast<UINT16 *>(memshare("spriteram")->ptr()); - segaic16_paletteram = reinterpret_cast<UINT16 *>(memshare("paletteram")->ptr()); segaic16_tileram_0 = reinterpret_cast<UINT16 *>(memshare("tileram")->ptr()); segaic16_textram_0 = reinterpret_cast<UINT16 *>(memshare("textram")->ptr()); segaic16_roadram_0 = reinterpret_cast<UINT16 *>(memshare("roadram")->ptr()); diff --git a/src/mame/drivers/segaybd.c b/src/mame/drivers/segaybd.c index 10d13205f42..c181faaa953 100644 --- a/src/mame/drivers/segaybd.c +++ b/src/mame/drivers/segaybd.c @@ -725,7 +725,7 @@ static ADDRESS_MAP_START( subx_map, AS_PROGRAM, 16, segaybd_state ) AM_RANGE(0x080000, 0x080007) AM_MIRROR(0x001ff8) AM_DEVREADWRITE("multiplier_subx", sega_315_5248_multiplier_device, read, write) AM_RANGE(0x084000, 0x08401f) AM_MIRROR(0x001fe0) AM_DEVREADWRITE("divider_subx", sega_315_5249_divider_device, read, write) AM_RANGE(0x0c0000, 0x0cffff) AM_RAM AM_SHARE("shareram") - AM_RANGE(0x180000, 0x18ffff) AM_RAM AM_SHARE("spriteram2") + AM_RANGE(0x180000, 0x18ffff) AM_RAM AM_SHARE("ysprites") AM_RANGE(0x1f8000, 0x1fbfff) AM_RAM AM_RANGE(0x1fc000, 0x1fffff) AM_RAM AM_SHARE("backupram") ADDRESS_MAP_END @@ -738,8 +738,8 @@ static ADDRESS_MAP_START( suby_map, AS_PROGRAM, 16, segaybd_state ) AM_RANGE(0x084000, 0x08401f) AM_MIRROR(0x001fe0) AM_DEVREADWRITE("divider_suby", sega_315_5249_divider_device, read, write) AM_RANGE(0x0c0000, 0x0cffff) AM_RAM AM_SHARE("shareram") AM_RANGE(0x180000, 0x1807ff) AM_MIRROR(0x007800) AM_RAM AM_SHARE("rotateram") - AM_RANGE(0x188000, 0x188fff) AM_MIRROR(0x007000) AM_RAM AM_SHARE("spriteram") - AM_RANGE(0x190000, 0x193fff) AM_MIRROR(0x004000) AM_RAM_WRITE_LEGACY(segaic16_paletteram_w) AM_SHARE("paletteram") + AM_RANGE(0x188000, 0x188fff) AM_MIRROR(0x007000) AM_RAM AM_SHARE("bsprites") + AM_RANGE(0x190000, 0x193fff) AM_MIRROR(0x004000) AM_RAM_WRITE(paletteram_w) AM_SHARE("paletteram") AM_RANGE(0x198000, 0x19ffff) AM_READ_LEGACY(segaic16_rotate_control_0_r) AM_RANGE(0x1f0000, 0x1fffff) AM_RAM ADDRESS_MAP_END @@ -1235,8 +1235,8 @@ static MACHINE_CONFIG_START( yboard, segaybd_state ) MCFG_SCREEN_VISIBLE_AREA(0*8, 40*8-1, 0*8, 28*8-1) MCFG_SCREEN_UPDATE_DRIVER(segaybd_state,screen_update) - MCFG_SEGA16SP_ADD_YBOARD_16B("segaspr1") - MCFG_SEGA16SP_ADD_YBOARD("segaspr2") + MCFG_SEGA_SYS16B_SPRITES_ADD("bsprites") + MCFG_SEGA_YBOARD_SPRITES_ADD("ysprites") MCFG_PALETTE_LENGTH(8192*3) @@ -1291,13 +1291,13 @@ ROM_START( gforce2 ) ROM_LOAD16_BYTE( "epr-11816b.54", 0x000000, 0x20000, CRC(317dd0c2) SHA1(7f1c7dcfb111385e2a94912975c2f9bfe78445ac) ) ROM_LOAD16_BYTE( "epr-11815b.53", 0x000001, 0x20000, CRC(f1fb22f1) SHA1(da3ce521b0a19b391913c35af34084d29edceca7) ) - ROM_REGION16_BE( 0x080000, "gfx2", 0 ) + ROM_REGION16_BE( 0x080000, "bsprites", 0 ) ROM_LOAD16_BYTE( "mpr-11467.16", 0x000000, 0x20000, CRC(6e60e736) SHA1(73086744cb2fe1ce162f851cb879755c21819b33) ) ROM_LOAD16_BYTE( "mpr-11468.14", 0x000001, 0x20000, CRC(74ca9ca5) SHA1(c6f27ce43ef270088e6155c8240fd15afa5729fd) ) ROM_LOAD16_BYTE( "epr-11694.17", 0x040000, 0x20000, CRC(7e297b84) SHA1(bbf1aa2b0b6b1f9fdaf9bea77d24b7f4f9320696) ) ROM_LOAD16_BYTE( "epr-11695.15", 0x040001, 0x20000, CRC(38a864be) SHA1(ef7d89511713d695f6a454c42f079d3507d9690d) ) - ROM_REGION64_BE( 0x400000, "gfx1", 0) + ROM_REGION64_BE( 0x400000, "ysprites", 0) ROMX_LOAD( "mpr-11469.67", 0x000000, 0x20000, CRC(ed7a2299) SHA1(1aecf9ccba1fed0b7908008e798c522251a08b0f), ROM_SKIP(7) ) ROMX_LOAD( "mpr-11470.75", 0x000001, 0x20000, CRC(34dea550) SHA1(da95b8346c3530573461553629af4cc493bbb4af), ROM_SKIP(7) ) ROMX_LOAD( "mpr-11477.63", 0x000002, 0x20000, CRC(a2784653) SHA1(00a123d1fc8116ca678d6d8dbf1a5450feee014d), ROM_SKIP(7) ) @@ -1366,13 +1366,13 @@ ROM_START( gforce2ja ) ROM_LOAD16_BYTE( "epr-11690a.54", 0x000000, 0x20000, CRC(e18bc177) SHA1(3fb179c9074954fc9b64da1463f542d60a99ec84) ) ROM_LOAD16_BYTE( "epr-11689a.53", 0x000001, 0x20000, CRC(6010e63e) SHA1(00aa5e8516f094409a407744b84ef183393b8b19) ) - ROM_REGION16_BE( 0x080000, "gfx2", 0 ) + ROM_REGION16_BE( 0x080000, "bsprites", 0 ) ROM_LOAD16_BYTE( "mpr-11467.16", 0x000000, 0x20000, CRC(6e60e736) SHA1(73086744cb2fe1ce162f851cb879755c21819b33) ) ROM_LOAD16_BYTE( "mpr-11468.14", 0x000001, 0x20000, CRC(74ca9ca5) SHA1(c6f27ce43ef270088e6155c8240fd15afa5729fd) ) ROM_LOAD16_BYTE( "epr-11694.17", 0x040000, 0x20000, CRC(7e297b84) SHA1(bbf1aa2b0b6b1f9fdaf9bea77d24b7f4f9320696) ) ROM_LOAD16_BYTE( "epr-11695.15", 0x040001, 0x20000, CRC(38a864be) SHA1(ef7d89511713d695f6a454c42f079d3507d9690d) ) - ROM_REGION64_BE( 0x400000, "gfx1", 0) + ROM_REGION64_BE( 0x400000, "ysprites", 0) ROMX_LOAD( "mpr-11469.67", 0x000000, 0x20000, CRC(ed7a2299) SHA1(1aecf9ccba1fed0b7908008e798c522251a08b0f), ROM_SKIP(7) ) ROMX_LOAD( "mpr-11470.75", 0x000001, 0x20000, CRC(34dea550) SHA1(da95b8346c3530573461553629af4cc493bbb4af), ROM_SKIP(7) ) ROMX_LOAD( "mpr-11477.63", 0x000002, 0x20000, CRC(a2784653) SHA1(00a123d1fc8116ca678d6d8dbf1a5450feee014d), ROM_SKIP(7) ) @@ -1441,13 +1441,13 @@ ROM_START( gforce2j ) ROM_LOAD16_BYTE( "epr-11513.54", 0x000000, 0x20000, CRC(e18bc177) SHA1(3fb179c9074954fc9b64da1463f542d60a99ec84) ) ROM_LOAD16_BYTE( "epr-11512.53", 0x000001, 0x20000, CRC(6010e63e) SHA1(00aa5e8516f094409a407744b84ef183393b8b19) ) - ROM_REGION16_BE( 0x080000, "gfx2", 0 ) + ROM_REGION16_BE( 0x080000, "bsprites", 0 ) ROM_LOAD16_BYTE( "mpr-11467.16", 0x000000, 0x20000, CRC(6e60e736) SHA1(73086744cb2fe1ce162f851cb879755c21819b33) ) ROM_LOAD16_BYTE( "mpr-11468.14", 0x000001, 0x20000, CRC(74ca9ca5) SHA1(c6f27ce43ef270088e6155c8240fd15afa5729fd) ) ROM_LOAD16_BYTE( "epr-11694.17", 0x040000, 0x20000, CRC(7e297b84) SHA1(bbf1aa2b0b6b1f9fdaf9bea77d24b7f4f9320696) ) ROM_LOAD16_BYTE( "epr-11695.15", 0x040001, 0x20000, CRC(38a864be) SHA1(ef7d89511713d695f6a454c42f079d3507d9690d) ) - ROM_REGION64_BE( 0x400000, "gfx1", 0) + ROM_REGION64_BE( 0x400000, "ysprites", 0) ROMX_LOAD( "mpr-11469.67", 0x000000, 0x20000, CRC(ed7a2299) SHA1(1aecf9ccba1fed0b7908008e798c522251a08b0f), ROM_SKIP(7) ) ROMX_LOAD( "mpr-11470.75", 0x000001, 0x20000, CRC(34dea550) SHA1(da95b8346c3530573461553629af4cc493bbb4af), ROM_SKIP(7) ) ROMX_LOAD( "mpr-11477.63", 0x000002, 0x20000, CRC(a2784653) SHA1(00a123d1fc8116ca678d6d8dbf1a5450feee014d), ROM_SKIP(7) ) @@ -1523,13 +1523,13 @@ ROM_START( gloc ) ROM_LOAD16_BYTE( "epr-13030.54", 0x000000, 0x20000, CRC(81abcabf) SHA1(cb4e817d66a7f384aa9757758c51cd1bf7347dd0) ) ROM_LOAD16_BYTE( "epr-13029.53", 0x000001, 0x20000, CRC(f3638efb) SHA1(f82a46fc8616cbe0235746161c587e54adecfe50) ) - ROM_REGION16_BE( 0x200000, "gfx2", 0) + ROM_REGION16_BE( 0x200000, "bsprites", 0) ROM_LOAD16_BYTE( "epr-13039.16", 0x000000, 0x80000, CRC(d7e1266d) SHA1(b0fc4cc60a7e876ae2af343bba6da3fb926ea9c5) ) ROM_LOAD16_BYTE( "epr-13037.14", 0x000001, 0x80000, CRC(b801a250) SHA1(7d1f6a1f2022a4f302f22d11fa79057cf8134ad2) ) ROM_LOAD16_BYTE( "epr-13040.17", 0x100000, 0x80000, CRC(4aeb3a85) SHA1(5521fd2d3956839bdbe7b70a9e60cd9fb72a42f1) ) ROM_LOAD16_BYTE( "epr-13038.15", 0x100001, 0x80000, CRC(0b2edb6d) SHA1(04944d6e6f020cd6d33641110847706516630227) ) - ROM_REGION64_BE( 0x1000000, "gfx1", 0 ) + ROM_REGION64_BE( 0x1000000, "ysprites", 0 ) ROMX_LOAD( "epr-13048.67", 0x000000, 0x80000, CRC(fe1eb0dd) SHA1(5e292fc0b83505eb289e026d4be24c9038ef1418), ROM_SKIP(7) ) ROMX_LOAD( "epr-13056.75", 0x000001, 0x80000, CRC(5904f8e6) SHA1(fbb01dadc796624c360d44b7631e3f1f285abf2e), ROM_SKIP(7) ) ROMX_LOAD( "epr-13044.63", 0x000002, 0x80000, CRC(4d931f89) SHA1(ff603f4347e4728a2849d9f480893ad0af7abc5c), ROM_SKIP(7) ) @@ -1592,13 +1592,13 @@ ROM_START( glocr360 ) ROM_LOAD16_BYTE( "epr-13325a.54", 0x000000, 0x20000, CRC(aba307e5) SHA1(a27a7d3699a95d7c6265a23157b2fefd362003dd) ) ROM_LOAD16_BYTE( "epr-13324a.53", 0x000001, 0x20000, CRC(eb1b19e5) SHA1(3d1d7299cb3befc22afc0db0376d7f94dec37367) ) - ROM_REGION16_BE( 0x200000, "gfx2", 0) + ROM_REGION16_BE( 0x200000, "bsprites", 0) ROM_LOAD16_BYTE( "epr-13039.16", 0x000000, 0x80000, CRC(d7e1266d) SHA1(b0fc4cc60a7e876ae2af343bba6da3fb926ea9c5) ) ROM_LOAD16_BYTE( "epr-13037.14", 0x000001, 0x80000, CRC(b801a250) SHA1(7d1f6a1f2022a4f302f22d11fa79057cf8134ad2) ) ROM_LOAD16_BYTE( "epr-13040.17", 0x100000, 0x80000, CRC(4aeb3a85) SHA1(5521fd2d3956839bdbe7b70a9e60cd9fb72a42f1) ) ROM_LOAD16_BYTE( "epr-13038.15", 0x100001, 0x80000, CRC(0b2edb6d) SHA1(04944d6e6f020cd6d33641110847706516630227) ) - ROM_REGION64_BE( 0x1000000, "gfx1", 0 ) + ROM_REGION64_BE( 0x1000000, "ysprites", 0 ) ROMX_LOAD( "epr-13048.67", 0x000000, 0x80000, CRC(fe1eb0dd) SHA1(5e292fc0b83505eb289e026d4be24c9038ef1418), ROM_SKIP(7) ) ROMX_LOAD( "epr-13056.75", 0x000001, 0x80000, CRC(5904f8e6) SHA1(fbb01dadc796624c360d44b7631e3f1f285abf2e), ROM_SKIP(7) ) ROMX_LOAD( "epr-13044.63", 0x000002, 0x80000, CRC(4d931f89) SHA1(ff603f4347e4728a2849d9f480893ad0af7abc5c), ROM_SKIP(7) ) @@ -1668,13 +1668,13 @@ ROM_START( pdrift ) ROM_LOAD16_BYTE( "epr-12019a.54", 0x000000, 0x20000, CRC(11188a30) SHA1(42dd0344d92529848b53a8cec4c145237ccd5b51) ) ROM_LOAD16_BYTE( "epr-12018a.53", 0x000001, 0x20000, CRC(1c582e1f) SHA1(c32d2f921554bddd7dedcb81e231aa91f50fa27b) ) - ROM_REGION16_BE( 0x080000, "gfx2", 0 ) + ROM_REGION16_BE( 0x080000, "bsprites", 0 ) ROM_LOAD16_BYTE( "epr-11789.16", 0x000000, 0x20000, CRC(b86f8d2b) SHA1(a053f2021841fd0ef89fd3f28050a698b36c435e) ) ROM_LOAD16_BYTE( "epr-11791.14", 0x000001, 0x20000, CRC(36b2910a) SHA1(9948b91837f944a7a606542fa685525e74bbe398) ) ROM_LOAD16_BYTE( "epr-11790.17", 0x040000, 0x20000, CRC(2a564e66) SHA1(5f30fc15bfd017d75cfffe1e9e62ed0bcf32a98e) ) ROM_LOAD16_BYTE( "epr-11792.15", 0x040001, 0x20000, CRC(c85caf6e) SHA1(2411ea99ec7f6e2b0b4f219e86ff2172539ad2c4) ) - ROM_REGION64_BE( 0x400000, "gfx1", 0) + ROM_REGION64_BE( 0x400000, "ysprites", 0) ROMX_LOAD( "epr-11757.67", 0x000000, 0x20000, CRC(e46dc478) SHA1(baf79e230aef3d63fb50373b2b1626f7c56ee94f), ROM_SKIP(7) ) ROMX_LOAD( "epr-11758.75", 0x000001, 0x20000, CRC(5b435c87) SHA1(6b42b08e73957c36cd8faa896ca14461d00afd29), ROM_SKIP(7) ) ROMX_LOAD( "epr-11773.63", 0x000002, 0x20000, CRC(1b5d5758) SHA1(54f58a274740a0566e0553d145c0c284ffd1d36b), ROM_SKIP(7) ) @@ -1750,13 +1750,13 @@ ROM_START( pdrifta ) ROM_LOAD16_BYTE( "epr-12019.54", 0x000000, 0x20000, CRC(e514d7b6) SHA1(27ae99f5f3e8d2f248916f7a252e2c0686638df5) ) ROM_LOAD16_BYTE( "epr-12018.53", 0x000001, 0x20000, CRC(0a3f7faf) SHA1(fe20a164a7a2c9e9bf0e7aade75b0488bdc93d79) ) - ROM_REGION16_BE( 0x080000, "gfx2", 0 ) + ROM_REGION16_BE( 0x080000, "bsprites", 0 ) ROM_LOAD16_BYTE( "epr-11789.16", 0x000000, 0x20000, CRC(b86f8d2b) SHA1(a053f2021841fd0ef89fd3f28050a698b36c435e) ) ROM_LOAD16_BYTE( "epr-11791.14", 0x000001, 0x20000, CRC(36b2910a) SHA1(9948b91837f944a7a606542fa685525e74bbe398) ) ROM_LOAD16_BYTE( "epr-11790.17", 0x040000, 0x20000, CRC(2a564e66) SHA1(5f30fc15bfd017d75cfffe1e9e62ed0bcf32a98e) ) ROM_LOAD16_BYTE( "epr-11792.15", 0x040001, 0x20000, CRC(c85caf6e) SHA1(2411ea99ec7f6e2b0b4f219e86ff2172539ad2c4) ) - ROM_REGION64_BE( 0x400000, "gfx1", 0) + ROM_REGION64_BE( 0x400000, "ysprites", 0) ROMX_LOAD( "epr-11757.67", 0x000000, 0x20000, CRC(e46dc478) SHA1(baf79e230aef3d63fb50373b2b1626f7c56ee94f), ROM_SKIP(7) ) ROMX_LOAD( "epr-11758.75", 0x000001, 0x20000, CRC(5b435c87) SHA1(6b42b08e73957c36cd8faa896ca14461d00afd29), ROM_SKIP(7) ) ROMX_LOAD( "epr-11773.63", 0x000002, 0x20000, CRC(1b5d5758) SHA1(54f58a274740a0566e0553d145c0c284ffd1d36b), ROM_SKIP(7) ) @@ -1833,13 +1833,13 @@ ROM_START( pdrifte ) ROM_LOAD16_BYTE( "epr-11903.54", 0x000000, 0x20000, CRC(d004f411) SHA1(212a985275647fae24b580ebaffc1230c06318ac) ) ROM_LOAD16_BYTE( "epr-11902.53", 0x000001, 0x20000, CRC(e8028e08) SHA1(de4ee5011e9552e624b6223e0e1ef00bc271a811) ) - ROM_REGION16_BE( 0x080000, "gfx2", 0 ) + ROM_REGION16_BE( 0x080000, "bsprites", 0 ) ROM_LOAD16_BYTE( "epr-11789.16", 0x000000, 0x20000, CRC(b86f8d2b) SHA1(a053f2021841fd0ef89fd3f28050a698b36c435e) ) ROM_LOAD16_BYTE( "epr-11791.14", 0x000001, 0x20000, CRC(36b2910a) SHA1(9948b91837f944a7a606542fa685525e74bbe398) ) ROM_LOAD16_BYTE( "epr-11790.17", 0x040000, 0x20000, CRC(2a564e66) SHA1(5f30fc15bfd017d75cfffe1e9e62ed0bcf32a98e) ) ROM_LOAD16_BYTE( "epr-11792.15", 0x040001, 0x20000, CRC(c85caf6e) SHA1(2411ea99ec7f6e2b0b4f219e86ff2172539ad2c4) ) - ROM_REGION64_BE( 0x400000, "gfx1", 0) + ROM_REGION64_BE( 0x400000, "ysprites", 0) ROMX_LOAD( "epr-11757.67", 0x000000, 0x20000, CRC(e46dc478) SHA1(baf79e230aef3d63fb50373b2b1626f7c56ee94f), ROM_SKIP(7) ) ROMX_LOAD( "epr-11758.75", 0x000001, 0x20000, CRC(5b435c87) SHA1(6b42b08e73957c36cd8faa896ca14461d00afd29), ROM_SKIP(7) ) ROMX_LOAD( "epr-11773.63", 0x000002, 0x20000, CRC(1b5d5758) SHA1(54f58a274740a0566e0553d145c0c284ffd1d36b), ROM_SKIP(7) ) @@ -1919,13 +1919,13 @@ ROM_START( pdriftj ) ROM_LOAD16_BYTE( "epr-11750b.54", 0x000000, 0x20000, CRC(bc14ce30) SHA1(9bbadee0946e0abaac4f0d2625ba5550f11fa8a9) ) ROM_LOAD16_BYTE( "epr-11749b.53", 0x000001, 0x20000, CRC(9e385568) SHA1(74e22eaed645cc80b1eb0c52912186066e58b9d2) ) - ROM_REGION16_BE( 0x080000, "gfx2", 0 ) + ROM_REGION16_BE( 0x080000, "bsprites", 0 ) ROM_LOAD16_BYTE( "epr-11789.16", 0x000000, 0x20000, CRC(b86f8d2b) SHA1(a053f2021841fd0ef89fd3f28050a698b36c435e) ) ROM_LOAD16_BYTE( "epr-11791.14", 0x000001, 0x20000, CRC(36b2910a) SHA1(9948b91837f944a7a606542fa685525e74bbe398) ) ROM_LOAD16_BYTE( "epr-11790.17", 0x040000, 0x20000, CRC(2a564e66) SHA1(5f30fc15bfd017d75cfffe1e9e62ed0bcf32a98e) ) ROM_LOAD16_BYTE( "epr-11792.15", 0x040001, 0x20000, CRC(c85caf6e) SHA1(2411ea99ec7f6e2b0b4f219e86ff2172539ad2c4) ) - ROM_REGION64_BE( 0x400000, "gfx1", 0) + ROM_REGION64_BE( 0x400000, "ysprites", 0) ROMX_LOAD( "epr-11757.67", 0x000000, 0x20000, CRC(e46dc478) SHA1(baf79e230aef3d63fb50373b2b1626f7c56ee94f), ROM_SKIP(7) ) ROMX_LOAD( "epr-11758.75", 0x000001, 0x20000, CRC(5b435c87) SHA1(6b42b08e73957c36cd8faa896ca14461d00afd29), ROM_SKIP(7) ) ROMX_LOAD( "epr-11773.63", 0x000002, 0x20000, CRC(1b5d5758) SHA1(54f58a274740a0566e0553d145c0c284ffd1d36b), ROM_SKIP(7) ) @@ -2009,11 +2009,11 @@ ROM_START( rchase ) ROM_LOAD16_BYTE( "epr-14092.54", 0x000000, 0x20000, CRC(18eb23c5) SHA1(53e5681c7450a3879ed80c1680168d6295caa887) ) ROM_LOAD16_BYTE( "epr-14091.53", 0x000001, 0x20000, CRC(72a56f71) SHA1(d45d3072ea92b5dde5c70138e56e7f0ca248880e) ) - ROM_REGION16_BE( 0x080000, "gfx2", 0 ) + ROM_REGION16_BE( 0x080000, "bsprites", 0 ) ROM_LOAD16_BYTE( "mpr-13999.16", 0x000000, 0x40000, CRC(9a1dd53c) SHA1(cb01f2c64554914ea693879dfcb498181a1e7a9a) ) ROM_LOAD16_BYTE( "mpr-13997.14", 0x000001, 0x40000, CRC(1fdf1b87) SHA1(ed46af0f72081d545015b73a8d12240664f29506) ) - ROM_REGION64_BE( 0xc00000, "gfx1", 0) + ROM_REGION64_BE( 0xc00000, "ysprites", 0) ROMX_LOAD( "mpr-14021.67", 0x000000, 0x80000, CRC(9fa88781) SHA1(a035fd0fe1d37a589adf3a5029c20d237d5cc827), ROM_SKIP(7) ) ROMX_LOAD( "mpr-14022.75", 0x000001, 0x80000, CRC(49e824bb) SHA1(c1330719b5718aa664b5788244d8cb7b7103a57c), ROM_SKIP(7) ) ROMX_LOAD( "mpr-14009.63", 0x000002, 0x80000, CRC(35b5187e) SHA1(6f0f6471c4135d07a2c852cdc50322b99176712e), ROM_SKIP(7) ) @@ -2069,11 +2069,11 @@ ROM_START( rchasej ) ROM_LOAD16_BYTE( "epr-13990.54.verify", 0x000000, 0x20000, CRC(18eb23c5) SHA1(53e5681c7450a3879ed80c1680168d6295caa887) ) // Need to verify EPR #, same as epr-14092.54 above ROM_LOAD16_BYTE( "epr-13989.53.verify", 0x000001, 0x20000, CRC(8f4f824e) SHA1(d470f23ce2dca4e75b7b714175d47338c41bb721) ) // Need to verify EPR # - ROM_REGION16_BE( 0x080000, "gfx2", 0 ) + ROM_REGION16_BE( 0x080000, "bsprites", 0 ) ROM_LOAD16_BYTE( "mpr-13999.16", 0x000000, 0x40000, CRC(9a1dd53c) SHA1(cb01f2c64554914ea693879dfcb498181a1e7a9a) ) ROM_LOAD16_BYTE( "mpr-13997.14", 0x000001, 0x40000, CRC(1fdf1b87) SHA1(ed46af0f72081d545015b73a8d12240664f29506) ) - ROM_REGION64_BE( 0xc00000, "gfx1", 0) + ROM_REGION64_BE( 0xc00000, "ysprites", 0) ROMX_LOAD( "mpr-14021.67", 0x000000, 0x80000, CRC(9fa88781) SHA1(a035fd0fe1d37a589adf3a5029c20d237d5cc827), ROM_SKIP(7) ) ROMX_LOAD( "mpr-14022.75", 0x000001, 0x80000, CRC(49e824bb) SHA1(c1330719b5718aa664b5788244d8cb7b7103a57c), ROM_SKIP(7) ) ROMX_LOAD( "mpr-14009.63", 0x000002, 0x80000, CRC(35b5187e) SHA1(6f0f6471c4135d07a2c852cdc50322b99176712e), ROM_SKIP(7) ) @@ -2132,13 +2132,13 @@ ROM_START( strkfgtr ) ROM_LOAD16_BYTE( "epr-13828.54", 0x000000, 0x20000, CRC(2470cf5f) SHA1(eb1a732228fe7ad9cf0747d2b53e391c5a733667) ) ROM_LOAD16_BYTE( "epr-13827.53", 0x000001, 0x20000, CRC(a9d0cf7d) SHA1(c40c73c9e9105ed6503b77b65a6423a26057d810) ) - ROM_REGION16_BE( 0x200000, "gfx2", 0) + ROM_REGION16_BE( 0x200000, "bsprites", 0) ROM_LOAD16_BYTE( "epr-13833.16", 0x000000, 0x80000, CRC(6148e11a) SHA1(5802208cf0415f6af39de162e9f12e7c205915f7) ) ROM_LOAD16_BYTE( "epr-13832.14", 0x000001, 0x80000, CRC(41679754) SHA1(58d46f33a4318bbc9e2a20eb5550a66ee0b2e62f) ) ROM_LOAD16_BYTE( "epr-13040.17", 0x100000, 0x80000, CRC(4aeb3a85) SHA1(5521fd2d3956839bdbe7b70a9e60cd9fb72a42f1) ) ROM_LOAD16_BYTE( "epr-13038.15", 0x100001, 0x80000, CRC(0b2edb6d) SHA1(04944d6e6f020cd6d33641110847706516630227) ) - ROM_REGION64_BE( 0x1000000, "gfx1", 0 ) + ROM_REGION64_BE( 0x1000000, "ysprites", 0 ) ROMX_LOAD( "epr-13048.67", 0x000000, 0x80000, CRC(fe1eb0dd) SHA1(5e292fc0b83505eb289e026d4be24c9038ef1418), ROM_SKIP(7) ) ROMX_LOAD( "epr-13056.75", 0x000001, 0x80000, CRC(5904f8e6) SHA1(fbb01dadc796624c360d44b7631e3f1f285abf2e), ROM_SKIP(7) ) ROMX_LOAD( "epr-13044.63", 0x000002, 0x80000, CRC(4d931f89) SHA1(ff603f4347e4728a2849d9f480893ad0af7abc5c), ROM_SKIP(7) ) @@ -2200,9 +2200,6 @@ DRIVER_INIT_MEMBER(segaybd_state,generic) m_scanline_timer = timer_alloc(TID_IRQ2_GEN); // point globals to allocated memory regions - segaic16_spriteram_0 = reinterpret_cast<UINT16 *>(memshare("spriteram")->ptr()); - segaic16_spriteram_1 = reinterpret_cast<UINT16 *>(memshare("spriteram2")->ptr()); - segaic16_paletteram = reinterpret_cast<UINT16 *>(memshare("paletteram")->ptr()); segaic16_rotateram_0 = reinterpret_cast<UINT16 *>(memshare("rotateram")->ptr()); // save state diff --git a/src/mame/drivers/system16.c b/src/mame/drivers/system16.c index 1167a492c20..1f02073bce4 100644 --- a/src/mame/drivers/system16.c +++ b/src/mame/drivers/system16.c @@ -125,8 +125,8 @@ static ADDRESS_MAP_START( shinobib_map, AS_PROGRAM, 16, segas1x_bootleg_state ) AM_RANGE(0x410000, 0x410fff) AM_RAM AM_SHARE("textram") AM_RANGE(0x411000, 0x411fff) AM_RAM AM_SHARE("bg0_tileram") AM_RANGE(0x412000, 0x412fff) AM_RAM AM_SHARE("bg1_tileram") - AM_RANGE(0x440000, 0x440fff) AM_RAM AM_BASE_LEGACY(&segaic16_spriteram_0) - AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE_LEGACY(segaic16_paletteram_w) AM_BASE_LEGACY(&segaic16_paletteram) + AM_RANGE(0x440000, 0x440fff) AM_RAM AM_SHARE("sprites") + AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE(paletteram_w) AM_SHARE("paletteram") AM_RANGE(0xc40000, 0xc40001) AM_WRITE(sound_command_nmi_w) AM_RANGE(0xc41000, 0xc41001) AM_READ_PORT("SERVICE") AM_RANGE(0xc41002, 0xc41003) AM_READ_PORT("P1") @@ -181,8 +181,8 @@ static ADDRESS_MAP_START( passshtb_map, AS_PROGRAM, 16, segas1x_bootleg_state ) AM_RANGE(0x40a000, 0x40afff) AM_RAM AM_SHARE("bg1_tileram") AM_RANGE(0x410000, 0x410fff) AM_RAM AM_SHARE("textram") - AM_RANGE(0x440000, 0x440fff) AM_RAM AM_BASE_LEGACY(&segaic16_spriteram_0) - AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE_LEGACY(segaic16_paletteram_w) AM_BASE_LEGACY(&segaic16_paletteram) + AM_RANGE(0x440000, 0x440fff) AM_RAM AM_SHARE("sprites") + AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE(paletteram_w) AM_SHARE("paletteram") AM_RANGE(0xc40000, 0xc40001) AM_WRITE(sys16_coinctrl_w) AM_RANGE(0xc41002, 0xc41003) AM_READ_PORT("P1") AM_RANGE(0xc41004, 0xc41005) AM_READ_PORT("P2") @@ -259,8 +259,8 @@ static ADDRESS_MAP_START( passht4b_map, AS_PROGRAM, 16, segas1x_bootleg_state ) AM_RANGE(0x409000, 0x40afff) AM_RAM AM_SHARE("bg0_tileram") AM_RANGE(0x40a000, 0x40bfff) AM_RAM AM_SHARE("bg1_tileram") AM_RANGE(0x410000, 0x410fff) AM_RAM AM_SHARE("textram") - AM_RANGE(0x440000, 0x440fff) AM_RAM AM_BASE_LEGACY(&segaic16_spriteram_0) - AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE_LEGACY(segaic16_paletteram_w) AM_BASE_LEGACY(&segaic16_paletteram) + AM_RANGE(0x440000, 0x440fff) AM_RAM AM_SHARE("sprites") + AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE(paletteram_w) AM_SHARE("paletteram") AM_RANGE(0xc41000, 0xc41001) AM_READ(passht4b_service_r) AM_RANGE(0xc41002, 0xc41003) AM_READ(passht4b_io1_r) AM_RANGE(0xc41004, 0xc41005) AM_READ(passht4b_io2_r) @@ -308,8 +308,8 @@ static ADDRESS_MAP_START( wb3bbl_map, AS_PROGRAM, 16, segas1x_bootleg_state ) AM_RANGE(0x409000, 0x40afff) AM_RAM AM_SHARE("bg0_tileram") AM_RANGE(0x40a000, 0x40bfff) AM_RAM AM_SHARE("bg1_tileram") AM_RANGE(0x410000, 0x410fff) AM_RAM AM_SHARE("textram") - AM_RANGE(0x440000, 0x440fff) AM_RAM AM_BASE_LEGACY(&segaic16_spriteram_0) - AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE_LEGACY(segaic16_paletteram_w) AM_BASE_LEGACY(&segaic16_paletteram) + AM_RANGE(0x440000, 0x440fff) AM_RAM AM_SHARE("sprites") + AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE(paletteram_w) AM_SHARE("paletteram") AM_RANGE(0xc40000, 0xc40001) AM_WRITE(sys16_coinctrl_w) AM_RANGE(0xc41000, 0xc41001) AM_READ_PORT("SERVICE") AM_RANGE(0xc41002, 0xc41003) AM_READ_PORT("P1") @@ -510,10 +510,10 @@ static ADDRESS_MAP_START( bayroute_map, AS_PROGRAM, 16, segas1x_bootleg_state ) AM_RANGE(0x000000, 0x0bffff) AM_ROM AM_RANGE(0x100000, 0x100003) AM_WRITENOP // tilebank control? AM_RANGE(0x500000, 0x503fff) AM_RAM // work ram - AM_RANGE(0x600000, 0x600fff) AM_RAM AM_BASE_LEGACY(&segaic16_spriteram_0) + AM_RANGE(0x600000, 0x600fff) AM_RAM AM_SHARE("sprites") AM_RANGE(0x700000, 0x70ffff) AM_RAM_WRITE(sys16_tileram_w) AM_SHARE("tileram") AM_RANGE(0x710000, 0x710fff) AM_RAM_WRITE(sys16_textram_w) AM_SHARE("textram") - AM_RANGE(0x800000, 0x800fff) AM_RAM_WRITE_LEGACY(segaic16_paletteram_w) AM_BASE_LEGACY(&segaic16_paletteram) + AM_RANGE(0x800000, 0x800fff) AM_RAM_WRITE(paletteram_w) AM_SHARE("paletteram") AM_RANGE(0x900000, 0x900001) AM_WRITE(sys16_coinctrl_w) AM_RANGE(0x901002, 0x901003) AM_READ_PORT("P1") AM_RANGE(0x901006, 0x901007) AM_READ_PORT("P2") @@ -606,8 +606,8 @@ static ADDRESS_MAP_START( goldnaxeb1_map, AS_PROGRAM, 16, segas1x_bootleg_state AM_RANGE(0x118018, 0x118019) AM_WRITE(s16bl_bgscrollx_w) AM_RANGE(0x118020, 0x118021) AM_WRITE(s16bl_fgpage_w) AM_RANGE(0x118028, 0x118029) AM_WRITE(s16bl_bgpage_w) - AM_RANGE(0x140000, 0x143fff) AM_RAM_WRITE_LEGACY(segaic16_paletteram_w) AM_BASE_LEGACY(&segaic16_paletteram) - AM_RANGE(0x200000, 0x200fff) AM_RAM AM_BASE_LEGACY(&segaic16_spriteram_0) + AM_RANGE(0x140000, 0x143fff) AM_RAM_WRITE(paletteram_w) AM_SHARE("paletteram") + AM_RANGE(0x200000, 0x200fff) AM_RAM AM_SHARE("sprites") AM_RANGE(0xc40000, 0xc40001) AM_WRITE(sys16_coinctrl_w) AM_RANGE(0xc41002, 0xc41003) AM_READ_PORT("P1") AM_RANGE(0xc41006, 0xc41007) AM_READ_PORT("P2") @@ -624,7 +624,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( bayrouteb1_map, AS_PROGRAM, 16, segas1x_bootleg_state ) AM_RANGE(0x000000, 0x0bffff) AM_ROM AM_RANGE(0x500000, 0x503fff) AM_RAM // work ram - AM_RANGE(0x600000, 0x600fff) AM_RAM AM_BASE_LEGACY(&segaic16_spriteram_0) + AM_RANGE(0x600000, 0x600fff) AM_RAM AM_SHARE("sprites") AM_RANGE(0x700000, 0x70ffff) AM_RAM_WRITE(sys16_tileram_w) AM_SHARE("tileram") AM_RANGE(0x710000, 0x710fff) AM_RAM_WRITE(sys16_textram_w) AM_SHARE("textram") AM_RANGE(0x718000, 0x718001) AM_WRITE(s16bl_fgscrolly_w) @@ -633,7 +633,7 @@ static ADDRESS_MAP_START( bayrouteb1_map, AS_PROGRAM, 16, segas1x_bootleg_state AM_RANGE(0x718018, 0x718019) AM_WRITE(s16bl_bgscrollx_w) AM_RANGE(0x718020, 0x718021) AM_WRITE(s16bl_fgpage_w) AM_RANGE(0x718028, 0x718029) AM_WRITE(s16bl_bgpage_w) - AM_RANGE(0x800000, 0x800fff) AM_RAM_WRITE_LEGACY(segaic16_paletteram_w) AM_BASE_LEGACY(&segaic16_paletteram) + AM_RANGE(0x800000, 0x800fff) AM_RAM_WRITE(paletteram_w) AM_SHARE("paletteram") AM_RANGE(0x901000, 0x901001) AM_READ_PORT("SERVICE") AM_WRITE(sys16_coinctrl_w) AM_RANGE(0x901002, 0x901003) AM_READ_PORT("P1") AM_RANGE(0x901006, 0x901007) AM_READ_PORT("P2") @@ -693,7 +693,7 @@ WRITE16_MEMBER(segas1x_bootleg_state::datsu_page3_w) static ADDRESS_MAP_START( bayrouteb2_map, AS_PROGRAM, 16, segas1x_bootleg_state ) AM_RANGE(0x000000, 0x0bffff) AM_ROM AM_RANGE(0x500000, 0x503fff) AM_RAM // work ram - AM_RANGE(0x600000, 0x600fff) AM_RAM AM_BASE_LEGACY(&segaic16_spriteram_0) + AM_RANGE(0x600000, 0x600fff) AM_RAM AM_SHARE("sprites") AM_RANGE(0x700000, 0x70ffff) AM_RAM_WRITE(sys16_tileram_w) AM_SHARE("tileram") AM_RANGE(0x710000, 0x710fff) AM_RAM_WRITE(sys16_textram_w) AM_SHARE("textram") AM_RANGE(0x718000, 0x718001) AM_WRITE(s16bl_fgscrolly_w) @@ -705,7 +705,7 @@ static ADDRESS_MAP_START( bayrouteb2_map, AS_PROGRAM, 16, segas1x_bootleg_state AM_RANGE(0x718024, 0x718025) AM_WRITE(datsu_page2_w) AM_RANGE(0x718026, 0x718027) AM_WRITE(datsu_page3_w) - AM_RANGE(0x800000, 0x800fff) AM_RAM_WRITE_LEGACY(segaic16_paletteram_w) AM_BASE_LEGACY(&segaic16_paletteram) + AM_RANGE(0x800000, 0x800fff) AM_RAM_WRITE(paletteram_w) AM_SHARE("paletteram") AM_RANGE(0x900000, 0x900001) AM_READ_PORT("DSW1") AM_RANGE(0x900002, 0x900003) AM_READ_PORT("DSW2") AM_RANGE(0x900006, 0x900007) AM_WRITE(sound_command_w) @@ -719,8 +719,8 @@ static ADDRESS_MAP_START( dduxbl_map, AS_PROGRAM, 16, segas1x_bootleg_state ) AM_RANGE(0x3f0000, 0x3fffff) AM_WRITE(sys16_tilebank_w) AM_RANGE(0x400000, 0x40ffff) AM_RAM_WRITE(sys16_tileram_w) AM_SHARE("tileram") AM_RANGE(0x410000, 0x410fff) AM_RAM_WRITE(sys16_textram_w) AM_SHARE("textram") - AM_RANGE(0x440000, 0x440fff) AM_RAM AM_BASE_LEGACY(&segaic16_spriteram_0) - AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE_LEGACY(segaic16_paletteram_w) AM_BASE_LEGACY(&segaic16_paletteram) + AM_RANGE(0x440000, 0x440fff) AM_RAM AM_SHARE("sprites") + AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE(paletteram_w) AM_SHARE("paletteram") AM_RANGE(0xc40000, 0xc40001) AM_WRITE(sys16_coinctrl_w) AM_RANGE(0xc40006, 0xc40007) AM_WRITE(sound_command_w) AM_RANGE(0xc41002, 0xc41003) AM_READ_PORT("P1") @@ -811,8 +811,8 @@ static ADDRESS_MAP_START( goldnaxeb2_map, AS_PROGRAM, 16, segas1x_bootleg_state AM_RANGE(0x000000, 0x0bffff) AM_ROM AM_RANGE(0x100000, 0x10ffff) AM_RAM_WRITE(sys16_tileram_w) AM_SHARE("tileram") AM_RANGE(0x110000, 0x110fff) AM_RAM_WRITE(sys16_textram_w) AM_SHARE("textram") - AM_RANGE(0x140000, 0x143fff) AM_RAM_WRITE_LEGACY(segaic16_paletteram_w) AM_BASE_LEGACY(&segaic16_paletteram) - AM_RANGE(0x200000, 0x200fff) AM_RAM AM_BASE_LEGACY(&segaic16_spriteram_0) + AM_RANGE(0x140000, 0x143fff) AM_RAM_WRITE(paletteram_w) AM_SHARE("paletteram") + AM_RANGE(0x200000, 0x200fff) AM_RAM AM_SHARE("sprites") AM_RANGE(0xc40000, 0xc40001) AM_READ_PORT("DSW2") AM_WRITENOP AM_RANGE(0xc40002, 0xc40003) AM_READ_PORT("DSW1") AM_RANGE(0xc41000, 0xc41001) AM_READ_PORT("SERVICE") @@ -840,7 +840,7 @@ static ADDRESS_MAP_START( fpointbl_map, AS_PROGRAM, 16, segas1x_bootleg_state ) AM_RANGE(0x400000, 0x40ffff) AM_RAM_WRITE(sys16_tileram_w) AM_SHARE("tileram") AM_RANGE(0x410000, 0x410fff) AM_RAM_WRITE(sys16_textram_w) AM_SHARE("textram") - AM_RANGE(0x440000, 0x440fff) AM_RAM AM_BASE_LEGACY(&segaic16_spriteram_0) + AM_RANGE(0x440000, 0x440fff) AM_RAM AM_SHARE("sprites") AM_RANGE(0x600006, 0x600007) AM_WRITE(sound_command_w) AM_RANGE(0x601000, 0x601001) AM_READ_PORT("SERVICE") @@ -849,7 +849,7 @@ static ADDRESS_MAP_START( fpointbl_map, AS_PROGRAM, 16, segas1x_bootleg_state ) AM_RANGE(0x600000, 0x600001) AM_READ_PORT("DSW2") AM_RANGE(0x600002, 0x600003) AM_READ_PORT("DSW1") - AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE_LEGACY(segaic16_paletteram_w) AM_BASE_LEGACY(&segaic16_paletteram) + AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE(paletteram_w) AM_SHARE("paletteram") AM_RANGE(0x843000, 0x843001) AM_WRITENOP AM_RANGE(0xC46000, 0xC46001) AM_WRITE(s16bl_fgscrolly_w) @@ -889,8 +889,8 @@ static ADDRESS_MAP_START( eswatbl_map, AS_PROGRAM, 16, segas1x_bootleg_state ) AM_RANGE(0x418020, 0x418021) AM_WRITE(s16bl_bgpage_w) AM_RANGE(0x418028, 0x418029) AM_WRITE(s16bl_fgpage_w) - AM_RANGE(0x440000, 0x440fff) AM_RAM AM_BASE_LEGACY(&segaic16_spriteram_0) - AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE_LEGACY(segaic16_paletteram_w) AM_BASE_LEGACY(&segaic16_paletteram) + AM_RANGE(0x440000, 0x440fff) AM_RAM AM_SHARE("sprites") + AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE(paletteram_w) AM_SHARE("paletteram") AM_RANGE(0xc40000, 0xc40001) AM_WRITE(sys16_coinctrl_w) AM_RANGE(0xc41002, 0xc41003) AM_READ_PORT("P1") AM_RANGE(0xc41006, 0xc41007) AM_READ_PORT("P2") @@ -916,8 +916,8 @@ static ADDRESS_MAP_START( tetrisbl_map, AS_PROGRAM, 16, segas1x_bootleg_state ) AM_RANGE(0x418020, 0x418021) AM_WRITE(s16bl_fgpage_w) AM_RANGE(0x418028, 0x418029) AM_WRITE(s16bl_bgpage_w) - AM_RANGE(0x440000, 0x440fff) AM_RAM AM_BASE_LEGACY(&segaic16_spriteram_0) - AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE_LEGACY(segaic16_paletteram_w) AM_BASE_LEGACY(&segaic16_paletteram) + AM_RANGE(0x440000, 0x440fff) AM_RAM AM_SHARE("sprites") + AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE(paletteram_w) AM_SHARE("paletteram") AM_RANGE(0xc40000, 0xc40001) AM_WRITE(sys16_coinctrl_w) AM_RANGE(0xc41000, 0xc41001) AM_READ_PORT("SERVICE") AM_RANGE(0xc41002, 0xc41003) AM_READ_PORT("P1") @@ -956,8 +956,8 @@ static ADDRESS_MAP_START( beautyb_map, AS_PROGRAM, 16, segas1x_bootleg_state ) AM_RANGE(0x418020, 0x418021) AM_WRITE(s16bl_bgpage_w) AM_RANGE(0x418028, 0x418029) AM_WRITE(s16bl_fgpage_w) - AM_RANGE(0x440000, 0x440fff) AM_RAM AM_BASE_LEGACY(&segaic16_spriteram_0) - AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE_LEGACY(segaic16_paletteram_w) AM_BASE_LEGACY(&segaic16_paletteram) + AM_RANGE(0x440000, 0x440fff) AM_RAM AM_SHARE("sprites") + AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE(paletteram_w) AM_SHARE("paletteram") AM_RANGE(0xC41000, 0xC41001) AM_READ(beautyb_unkx_r ) AM_RANGE(0xC41002, 0xC41003) AM_READ(beautyb_unkx_r ) @@ -973,10 +973,10 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( tturfbl_map, AS_PROGRAM, 16, segas1x_bootleg_state ) AM_RANGE(0x000000, 0x03ffff) AM_ROM AM_RANGE(0x200000, 0x203fff) AM_RAM // work ram - AM_RANGE(0x300000, 0x300fff) AM_RAM AM_BASE_LEGACY(&segaic16_spriteram_0) + AM_RANGE(0x300000, 0x300fff) AM_RAM AM_SHARE("sprites") AM_RANGE(0x400000, 0x40ffff) AM_RAM_WRITE(sys16_tileram_w) AM_SHARE("tileram") AM_RANGE(0x410000, 0x410fff) AM_RAM_WRITE(sys16_textram_w) AM_SHARE("textram") - AM_RANGE(0x500000, 0x500fff) AM_RAM_WRITE_LEGACY(segaic16_paletteram_w) AM_BASE_LEGACY(&segaic16_paletteram) + AM_RANGE(0x500000, 0x500fff) AM_RAM_WRITE(paletteram_w) AM_SHARE("paletteram") AM_RANGE(0x600000, 0x600001) AM_WRITE(sys16_coinctrl_w) AM_RANGE(0x600000, 0x600001) AM_READ_PORT("DSW2") AM_RANGE(0x600002, 0x600003) AM_READ_PORT("DSW1") @@ -1117,8 +1117,8 @@ static ADDRESS_MAP_START( shdancbl_map, AS_PROGRAM, 16, segas1x_bootleg_state ) AM_RANGE(0x000000, 0x07ffff) AM_ROM AM_RANGE(0x400000, 0x40ffff) AM_RAM_WRITE(sys16_tileram_w) AM_SHARE("tileram") AM_RANGE(0x410000, 0x410fff) AM_RAM_WRITE(sys16_textram_w) AM_SHARE("textram") - AM_RANGE(0x440000, 0x440fff) AM_RAM AM_BASE_LEGACY(&segaic16_spriteram_0) - AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE_LEGACY(segaic16_paletteram_w) AM_BASE_LEGACY(&segaic16_paletteram) + AM_RANGE(0x440000, 0x440fff) AM_RAM AM_SHARE("sprites") + AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE(paletteram_w) AM_SHARE("paletteram") AM_RANGE(0xc00000, 0xc0ffff) AM_NOP AM_RANGE(0xc40000, 0xc40001) AM_READ_PORT("COINAGE") AM_RANGE(0xc40002, 0xc40003) AM_READ_PORT("DSW1") @@ -1258,8 +1258,8 @@ static ADDRESS_MAP_START( mwalkbl_map, AS_PROGRAM, 16, segas1x_bootleg_state ) AM_RANGE(0x000000, 0x07ffff) AM_ROM AM_RANGE(0x400000, 0x40ffff) AM_RAM_WRITE(sys16_tileram_w) AM_SHARE("tileram") AM_RANGE(0x410000, 0x410fff) AM_RAM_WRITE(sys16_textram_w) AM_SHARE("textram") - AM_RANGE(0x440000, 0x440fff) AM_RAM AM_BASE_LEGACY(&segaic16_spriteram_0) - AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE_LEGACY(segaic16_paletteram_w) AM_BASE_LEGACY(&segaic16_paletteram) + AM_RANGE(0x440000, 0x440fff) AM_RAM AM_SHARE("sprites") + AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE(paletteram_w) AM_SHARE("paletteram") /* bootleg video regs */ /*AM_RANGE(0xc00000, 0xc00001) AM_NOP @@ -1300,8 +1300,8 @@ static ADDRESS_MAP_START( astormbl_map, AS_PROGRAM, 16, segas1x_bootleg_state ) AM_RANGE(0x000000, 0x07ffff) AM_ROM AM_RANGE(0x100000, 0x10ffff) AM_RAM_WRITE(sys16_tileram_w) AM_SHARE("tileram") AM_RANGE(0x110000, 0x110fff) AM_RAM_WRITE(sys16_textram_w) AM_SHARE("textram") - AM_RANGE(0x140000, 0x140fff) AM_RAM_WRITE_LEGACY(segaic16_paletteram_w) AM_BASE_LEGACY(&segaic16_paletteram) - AM_RANGE(0x200000, 0x200fff) AM_RAM AM_BASE_LEGACY(&segaic16_spriteram_0) + AM_RANGE(0x140000, 0x140fff) AM_RAM_WRITE(paletteram_w) AM_SHARE("paletteram") + AM_RANGE(0x200000, 0x200fff) AM_RAM AM_SHARE("sprites") AM_RANGE(0xa00000, 0xa00001) AM_READ_PORT("COINAGE") AM_RANGE(0xa00002, 0xa00003) AM_READ_PORT("DSW1") AM_RANGE(0xa00006, 0xa00007) AM_WRITE(sound_command_nmi_w) @@ -2097,46 +2097,29 @@ static MACHINE_CONFIG_FRAGMENT( system16_datsu_sound ) MACHINE_CONFIG_END -static const sega16sp_interface shinobld_sega16sp_intf = -{ - 0, // which spriteram - 1024, // colorbase - 0x800, // ramsize - 117, // xoffs - segaic16_sprites_16a_bootleg_shinobld_draw, // draw function - 0, // use buffer -}; - static MACHINE_CONFIG_DERIVED( shinobib, system16 ) /* basic machine hardware */ MCFG_CPU_MODIFY("maincpu") MCFG_CPU_PROGRAM_MAP(shinobib_map) - MCFG_SEGA16SP_ADD("segaspr1", shinobld_sega16sp_intf) + MCFG_BOOTLEG_SYS16A_SPRITES_ADD("sprites") + MCFG_BOOTLEG_SYS16A_SPRITES_XORIGIN(189-117) MCFG_VIDEO_START( s16a_bootleg_shinobi ) MCFG_SCREEN_MODIFY("screen") MCFG_SCREEN_UPDATE_STATIC( s16a_bootleg ) MACHINE_CONFIG_END -static const sega16sp_interface passshtb_sega16sp_intf = -{ - 0, // which spriteram - 1024, // colorbase - 0x800, // ramsize - 117, // xoffs - segaic16_sprites_16a_bootleg_passhtb_draw, // draw function - 0, // use buffer -}; - static MACHINE_CONFIG_DERIVED( passshtb, system16_7759 ) /* basic machine hardware */ MCFG_CPU_MODIFY("maincpu") MCFG_CPU_PROGRAM_MAP(passshtb_map) - MCFG_SEGA16SP_ADD("segaspr1", passshtb_sega16sp_intf) + MCFG_BOOTLEG_SYS16A_SPRITES_ADD("sprites") + MCFG_BOOTLEG_SYS16A_SPRITES_XORIGIN(189-117) + MCFG_BOOTLEG_SYS16A_SPRITES_REMAP(1,0,3,2,5,4,7,6) MCFG_VIDEO_START( s16a_bootleg_passsht ) MCFG_SCREEN_MODIFY("screen") @@ -2151,30 +2134,25 @@ static MACHINE_CONFIG_DERIVED( passsht4b, system16_7759 ) MCFG_CPU_PROGRAM_MAP(passht4b_map) // wrong - MCFG_SEGA16SP_ADD("segaspr1", passshtb_sega16sp_intf) + MCFG_BOOTLEG_SYS16A_SPRITES_ADD("sprites") + MCFG_BOOTLEG_SYS16A_SPRITES_XORIGIN(189-117) + MCFG_BOOTLEG_SYS16A_SPRITES_REMAP(1,0,3,2,5,4,7,6) MCFG_VIDEO_START( s16a_bootleg_passsht ) MCFG_SCREEN_MODIFY("screen") MCFG_SCREEN_UPDATE_STATIC( s16a_bootleg_passht4b ) MACHINE_CONFIG_END -static const sega16sp_interface wb3bbl_sega16sp_intf = -{ - 0, // which spriteram - 1024, // colorbase - 0x800, // ramsize - 117, // xoffs - segaic16_sprites_16a_bootleg_wb3bl_draw, // draw function - 0, // use buffer -}; - static MACHINE_CONFIG_DERIVED( wb3bb, system16 ) /* basic machine hardware */ MCFG_CPU_MODIFY("maincpu") MCFG_CPU_PROGRAM_MAP(wb3bbl_map) - MCFG_SEGA16SP_ADD("segaspr1", wb3bbl_sega16sp_intf) + MCFG_BOOTLEG_SYS16A_SPRITES_ADD("sprites") + MCFG_BOOTLEG_SYS16A_SPRITES_XORIGIN(189-117) + MCFG_BOOTLEG_SYS16A_SPRITES_REMAP(4,0,5,1,6,2,7,3) + MCFG_BOOTLEG_SYS16A_SPRITES_YORIGIN(0) MCFG_VIDEO_START( s16a_bootleg_wb3bl ) MCFG_SCREEN_MODIFY("screen") @@ -2182,16 +2160,6 @@ static MACHINE_CONFIG_DERIVED( wb3bb, system16 ) MACHINE_CONFIG_END -static const sega16sp_interface s16bbl_x121_sega16sp_intf = -{ - 0, // which spriteram - 1024, // colorbase - 0x800, // ramsize - 121, // xoffs - segaic16_sprites_16b_draw, // draw function - 0, // use buffer -}; - static MACHINE_CONFIG_START( goldnaxeb1, segas1x_bootleg_state ) /* basic machine hardware */ @@ -2211,7 +2179,8 @@ static MACHINE_CONFIG_START( goldnaxeb1, segas1x_bootleg_state ) MCFG_GFXDECODE(sys16) MCFG_PALETTE_LENGTH(2048*SHADOW_COLORS_MULTIPLIER) - MCFG_SEGA16SP_ADD("segaspr1", s16bbl_x121_sega16sp_intf) + MCFG_BOOTLEG_SYS16B_SPRITES_ADD("sprites") + MCFG_BOOTLEG_SYS16B_SPRITES_XORIGIN(189-121) MCFG_PALETTE_INIT( all_black ) MCFG_VIDEO_START(system16) @@ -2233,16 +2202,6 @@ static MACHINE_CONFIG_DERIVED( bayrouteb1, goldnaxeb1 ) MCFG_CPU_PROGRAM_MAP(bayrouteb1_map) MACHINE_CONFIG_END -static const sega16sp_interface s16bbl_x107_sega16sp_intf = -{ - 0, // which spriteram - 1024, // colorbase - 0x800, // ramsize - 107, // xoffs - segaic16_sprites_16b_draw, // draw function - 0, // use buffer -}; - static MACHINE_CONFIG_DERIVED( bayrouteb2, goldnaxeb1 ) /* basic machine hardware */ @@ -2251,8 +2210,9 @@ static MACHINE_CONFIG_DERIVED( bayrouteb2, goldnaxeb1 ) MCFG_FRAGMENT_ADD(system16_datsu_sound) - MCFG_DEVICE_REMOVE("segaspr1") - MCFG_SEGA16SP_ADD("segaspr1", s16bbl_x107_sega16sp_intf) + MCFG_DEVICE_MODIFY("sprites") + MCFG_BOOTLEG_SYS16B_SPRITES_XORIGIN(189-107) + MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( tturfbl, system16_7759 ) @@ -2271,45 +2231,28 @@ static MACHINE_CONFIG_DERIVED( tturfbl, system16_7759 ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.80) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.80) - MCFG_SEGA16SP_ADD("segaspr1", s16bbl_x107_sega16sp_intf) + MCFG_BOOTLEG_SYS16B_SPRITES_ADD("sprites") + MCFG_BOOTLEG_SYS16B_SPRITES_XORIGIN(189-107) MACHINE_CONFIG_END -static const sega16sp_interface s16bbl_x112_sega16sp_intf = -{ - 0, // which spriteram - 1024, // colorbase - 0x800, // ramsize - 112, // xoffs - segaic16_sprites_16b_draw, // draw function - 0, // use buffer -}; - static MACHINE_CONFIG_DERIVED( dduxbl, system16 ) /* basic machine hardware */ MCFG_CPU_MODIFY("maincpu") MCFG_CPU_PROGRAM_MAP(dduxbl_map) - MCFG_SEGA16SP_ADD("segaspr1", s16bbl_x112_sega16sp_intf) + MCFG_BOOTLEG_SYS16B_SPRITES_ADD("sprites") + MCFG_BOOTLEG_SYS16B_SPRITES_XORIGIN(189-112) MACHINE_CONFIG_END -static const sega16sp_interface s16bbl_x124_sega16sp_intf = -{ - 0, // which spriteram - 1024, // colorbase - 0x800, // ramsize - 124, // xoffs - segaic16_sprites_16b_draw, // draw function - 0, // use buffer -}; - static MACHINE_CONFIG_DERIVED( eswatbl, system16_7759 ) /* basic machine hardware */ MCFG_CPU_MODIFY("maincpu") MCFG_CPU_PROGRAM_MAP(eswatbl_map) - MCFG_SEGA16SP_ADD("segaspr1", s16bbl_x124_sega16sp_intf) + MCFG_BOOTLEG_SYS16B_SPRITES_ADD("sprites") + MCFG_BOOTLEG_SYS16B_SPRITES_XORIGIN(189-124) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( fpointbl, system16 ) @@ -2321,7 +2264,8 @@ static MACHINE_CONFIG_DERIVED( fpointbl, system16 ) MCFG_CPU_MODIFY("soundcpu") MCFG_CPU_PROGRAM_MAP(fpointbl_sound_map) - MCFG_SEGA16SP_ADD("segaspr1", s16bbl_x107_sega16sp_intf) + MCFG_BOOTLEG_SYS16B_SPRITES_ADD("sprites") + MCFG_BOOTLEG_SYS16B_SPRITES_XORIGIN(189-107) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( tetrisbl, system16 ) @@ -2330,7 +2274,8 @@ static MACHINE_CONFIG_DERIVED( tetrisbl, system16 ) MCFG_CPU_MODIFY("maincpu") MCFG_CPU_PROGRAM_MAP(tetrisbl_map) - MCFG_SEGA16SP_ADD("segaspr1", s16bbl_x112_sega16sp_intf) + MCFG_BOOTLEG_SYS16B_SPRITES_ADD("sprites") + MCFG_BOOTLEG_SYS16B_SPRITES_XORIGIN(189-112) MACHINE_CONFIG_END @@ -2340,7 +2285,8 @@ static MACHINE_CONFIG_DERIVED( beautyb, system16 ) MCFG_CPU_MODIFY("maincpu") MCFG_CPU_PROGRAM_MAP(beautyb_map) - MCFG_SEGA16SP_ADD("segaspr1", s16bbl_x112_sega16sp_intf) + MCFG_BOOTLEG_SYS16B_SPRITES_ADD("sprites") + MCFG_BOOTLEG_SYS16B_SPRITES_XORIGIN(189-112) MACHINE_CONFIG_END @@ -2368,7 +2314,8 @@ static MACHINE_CONFIG_START( system18, segas1x_bootleg_state ) MCFG_VIDEO_START(system18old) - MCFG_SEGA16SP_ADD("segaspr1", s16bbl_x107_sega16sp_intf) + MCFG_BOOTLEG_SYS16B_SPRITES_ADD("sprites") + MCFG_BOOTLEG_SYS16B_SPRITES_XORIGIN(189-107) /* sound hardware */ MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") @@ -2448,7 +2395,7 @@ ROM_START( shinobld ) ROM_LOAD( "10.bin", 0x10000, 0x10000, CRC(7cc40b6c) SHA1(ffad7eef7ab2ff9a2e49a8d71b5785a61fa3c675) ) ROM_LOAD( "11.bin", 0x20000, 0x10000, CRC(0f6c7b1c) SHA1(defc76592c285b3396e89a3cff7a73f3a948117f) ) - ROM_REGION16_BE( 0x080000, "gfx2", ROMREGION_ERASEFF ) /* sprites */ + ROM_REGION16_BE( 0x080000, "sprites", ROMREGION_ERASEFF ) /* sprites */ ROM_LOAD16_BYTE( "5.bin", 0x00001, 0x10000, CRC(611f413a) SHA1(180f83216e2dfbfd77b0fb3be83c3042954d12df) ) ROM_LOAD16_BYTE( "3.bin", 0x00000, 0x10000, CRC(5eb00fc1) SHA1(97e02eee74f61fabcad2a9e24f1868cafaac1d51) ) ROM_LOAD16_BYTE( "8.bin", 0x20001, 0x10000, CRC(3c0797c0) SHA1(df18c7987281bd9379026c6cf7f96f6ae49fd7f9) ) @@ -2473,7 +2420,7 @@ ROM_START( passshtb ) ROM_LOAD( "opr11855.b10", 0x10000, 0x10000, CRC(b78762b4) SHA1(d594ef846bd7fed8da91a89906b39c1a2867a1fe) ) ROM_LOAD( "opr11856.b11", 0x20000, 0x10000, CRC(ea49f666) SHA1(36ccd32cdcbb7fcc300628bb59c220ec3c324d82) ) - ROM_REGION16_BE( 0x80000, "gfx2", ROMREGION_ERASEFF ) /* sprites */ + ROM_REGION16_BE( 0x80000, "sprites", ROMREGION_ERASEFF ) /* sprites */ ROM_LOAD16_BYTE( "opr11862.b1", 0x00001, 0x10000, CRC(b6e94727) SHA1(0838e034f1f10d9cd1312c8c94b5c57387c0c271) ) ROM_LOAD16_BYTE( "opr11865.b5", 0x00000, 0x10000, CRC(17e8d5d5) SHA1(ac1074b0a705be13c6e3391441e6cfec1d2b3f8a) ) ROM_LOAD16_BYTE( "opr11863.b2", 0x20001, 0x10000, CRC(3e670098) SHA1(2cfc83f4294be30cd868738886ac546bd8489962) ) @@ -2499,7 +2446,7 @@ ROM_START( passht4b ) ROM_LOAD( "pas4p.12", 0x10000, 0x10000, CRC(bebb9211) SHA1(4f56048f6f70b63f74a4c0d64456213d36ce5b26) ) ROM_LOAD( "pas4p.13", 0x20000, 0x10000, CRC(e37506c3) SHA1(e6fbf15d58f321a3d052fefbe5a1901e4a1734ae) ) - ROM_REGION16_BE( 0x60000, "gfx2", 0 ) /* sprites */ + ROM_REGION16_BE( 0x60000, "sprites", 0 ) /* sprites */ ROM_LOAD16_BYTE( "opr11862.b1", 0x00001, 0x10000, CRC(b6e94727) SHA1(0838e034f1f10d9cd1312c8c94b5c57387c0c271) ) ROM_LOAD16_BYTE( "opr11865.b5", 0x00000, 0x10000, CRC(17e8d5d5) SHA1(ac1074b0a705be13c6e3391441e6cfec1d2b3f8a) ) ROM_LOAD16_BYTE( "opr11863.b2", 0x20001, 0x10000, CRC(3e670098) SHA1(2cfc83f4294be30cd868738886ac546bd8489962) ) @@ -2524,7 +2471,7 @@ ROM_START( wb3bbl ) ROM_LOAD( "wb3_15", 0x10000, 0x10000, CRC(96ff9d52) SHA1(791a9da4860e0d42fba98f80a3c6725ad8c73e33) ) ROM_LOAD( "wb3_16", 0x20000, 0x10000, CRC(afaf0d31) SHA1(d4309329a0a543250788146b63b27ff058c02fc3) ) - ROM_REGION16_BE( 0x100000, "gfx2", ROMREGION_ERASEFF ) /* sprites */ + ROM_REGION16_BE( 0x100000, "sprites", ROMREGION_ERASEFF ) /* sprites */ ROM_LOAD16_BYTE( "epr12090.b1", 0x00001, 0x010000, CRC(aeeecfca) SHA1(496124b170a725ad863c741d4e021ab947511e4c) ) ROM_LOAD16_BYTE( "epr12094.b5", 0x00000, 0x010000, CRC(615e4927) SHA1(d23f164973afa770714e284a77ddf10f18cc596b) ) ROM_LOAD16_BYTE( "epr12091.b2", 0x20001, 0x010000, CRC(8409a243) SHA1(bcbb9510a6499d8147543d6befa5a49f4ac055d9) ) @@ -2570,7 +2517,7 @@ ROM_START( bayrouteb1 ) ROM_LOAD( "bs14.bin", 0x10000, 0x10000, CRC(6bc4d0a8) SHA1(90b9a61c7a140291d72554857ce26d54ebf03fc2) ) ROM_LOAD( "bs12.bin", 0x20000, 0x10000, CRC(c1f967a6) SHA1(8eb6bbd9e17dc531830bc798b8485c8ea999e56e) ) - ROM_REGION16_BE( 0x80000, "gfx2", 0 ) /* sprites */ + ROM_REGION16_BE( 0x80000, "sprites", 0 ) /* sprites */ ROM_LOAD16_BYTE( "br_obj0o.1b", 0x00001, 0x10000, CRC(098a5e82) SHA1(c5922f418773bc3629071e584457839d67a370e9) ) ROM_LOAD16_BYTE( "br_obj0e.5b", 0x00000, 0x10000, CRC(85238af9) SHA1(39989a8d9b60c6d55272b5e2c213341a563dd993) ) ROM_LOAD16_BYTE( "br_obj1o.2b", 0x20001, 0x10000, CRC(cc641da1) SHA1(28f8a6502702cb9e2cc7f3e98f6c5d201f462fa3) ) @@ -2606,7 +2553,7 @@ ROM_START( bayrouteb2 ) ROM_LOAD( "bs12.bin", 0x20000, 0x10000, CRC(c1f967a6) SHA1(8eb6bbd9e17dc531830bc798b8485c8ea999e56e) ) #if 0 // these look bad - ROM_REGION16_BE( 0x080000, "gfx2", ROMREGION_ERASEFF ) /* sprites */ + ROM_REGION16_BE( 0x080000, "sprites", ROMREGION_ERASEFF ) /* sprites */ ROM_LOAD16_BYTE( "br_11", 0x00001, 0x10000, CRC(65232905) SHA1(cb195a0ce8bff9d1d3e31678060b3aaccfefcd2d) ) ROM_LOAD16_BYTE( "br_obj0e.5b", 0x00000, 0x10000, CRC(85238af9) SHA1(39989a8d9b60c6d55272b5e2c213341a563dd993) ) ROM_LOAD16_BYTE( "br_obj1o.2b", 0x20001, 0x10000, CRC(cc641da1) SHA1(28f8a6502702cb9e2cc7f3e98f6c5d201f462fa3) ) @@ -2618,7 +2565,7 @@ ROM_START( bayrouteb2 ) #endif // use the roms from the first bootleg set - ROM_REGION16_BE( 0x080000, "gfx2", ROMREGION_ERASEFF ) /* sprites */ + ROM_REGION16_BE( 0x080000, "sprites", ROMREGION_ERASEFF ) /* sprites */ ROM_LOAD16_BYTE( "br_obj0o.1b", 0x00001, 0x10000, CRC(098a5e82) SHA1(c5922f418773bc3629071e584457839d67a370e9) ) ROM_LOAD16_BYTE( "br_obj0e.5b", 0x00000, 0x10000, CRC(85238af9) SHA1(39989a8d9b60c6d55272b5e2c213341a563dd993) ) ROM_LOAD16_BYTE( "br_obj1o.2b", 0x20001, 0x10000, CRC(cc641da1) SHA1(28f8a6502702cb9e2cc7f3e98f6c5d201f462fa3) ) @@ -2718,7 +2665,7 @@ ROM_START( goldnaxeb1 ) ROM_LOAD( "28.12", 0x40000, 0x10000, CRC(22f0667e) SHA1(2d11b2ce105a3db9c914942cace85aff17deded9) ) ROM_LOAD( "27.11", 0x50000, 0x10000, CRC(afb1a7e4) SHA1(726fded9db72a881128b43f449d2baf450131f63) ) - ROM_REGION16_BE( 0x1c0000, "gfx2", 0 ) /* sprites */ + ROM_REGION16_BE( 0x1c0000, "sprites", 0 ) /* sprites */ ROM_LOAD16_BYTE( "33.17", 0x000001, 0x10000, CRC(28ba70c8) SHA1(a6f33e1404928b6d1006943494646d6cfbd60a4b) ) ROM_LOAD16_BYTE( "34.18", 0x020001, 0x10000, CRC(2ed96a26) SHA1(edcf915243e6f92d31cdfc53965438f6b6bff51d) ) ROM_LOAD16_BYTE( "37.bin", 0x100001, 0x10000, CRC(84dccc5b) SHA1(10263d98d663f1170c3203066f391075a1d64ff5) ) @@ -2804,7 +2751,7 @@ ROM_START( goldnaxeb2 ) ROM_LOAD( "ic2.37", 0x40000, 0x10000, CRC(22f0667e) SHA1(2d11b2ce105a3db9c914942cace85aff17deded9) ) ROM_LOAD( "ic16.40", 0x50000, 0x10000, CRC(afb1a7e4) SHA1(726fded9db72a881128b43f449d2baf450131f63) ) - ROM_REGION16_BE( 0x1c0000, "gfx2", 0 ) /* sprites */ + ROM_REGION16_BE( 0x1c0000, "sprites", 0 ) /* sprites */ ROM_LOAD16_BYTE( "ic73.34", 0x000001, 0x10000, CRC(28ba70c8) SHA1(a6f33e1404928b6d1006943494646d6cfbd60a4b) ) // mpr12378.b1 [1/4] IDENTICAL ROM_LOAD16_BYTE( "ic74.33", 0x020001, 0x10000, CRC(2ed96a26) SHA1(edcf915243e6f92d31cdfc53965438f6b6bff51d) ) // mpr12378.b1 [2/4] IDENTICAL ROM_LOAD16_BYTE( "ic79.28", 0x100001, 0x10000, CRC(84dccc5b) SHA1(10263d98d663f1170c3203066f391075a1d64ff5) ) // mpr12378.b1 [3/4] IDENTICAL @@ -2847,7 +2794,7 @@ ROM_START( tturfbl ) ROM_LOAD( "tt16cf44.rom", 0x10000, 0x10000, CRC(4c467735) SHA1(8338b6605cbe2e076da0b3e3a47630409a79f002) ) ROM_LOAD( "tt17d59e.rom", 0x20000, 0x10000, CRC(60c0f2fe) SHA1(3fea4ed757d47628f59ff940e40cb86b3b5b443b) ) - ROM_REGION16_BE( 0x80000, "gfx2", 0 ) /* sprites */ + ROM_REGION16_BE( 0x80000, "sprites", 0 ) /* sprites */ ROM_LOAD16_BYTE( "12279.1b", 0x00001, 0x10000, CRC(7a169fb1) SHA1(1ec6da0d2cfcf727e61f61c847fd8b975b64f944) ) ROM_LOAD16_BYTE( "12283.5b", 0x00000, 0x10000, CRC(ae0fa085) SHA1(ae9af92d4dd0c8a0f064d24e647522b588fbd7f7) ) ROM_LOAD16_BYTE( "12278.2b", 0x20001, 0x10000, CRC(961d06b7) SHA1(b1a9dea63785bfa2c0e7b931387b91dfcd27d79b) ) @@ -2875,7 +2822,7 @@ ROM_START( dduxbl ) ROM_LOAD( "dduxb15.bin", 0x10000, 0x10000, CRC(ce0d2b30) SHA1(e60521c46f1650c9bdc76f2ceb91a6d61aaa0a09) ) ROM_LOAD( "dduxb16.bin", 0x20000, 0x10000, CRC(6de95434) SHA1(7bed2a0261cf6c2fbb3756633f05f0bb2173977c) ) - ROM_REGION16_BE( 0x100000, "gfx2", 0 ) //* sprites */ + ROM_REGION16_BE( 0x100000, "sprites", 0 ) //* sprites */ ROM_LOAD16_BYTE( "dduxb06.bin", 0x00000, 0x010000, CRC(b0079e99) SHA1(9bb4d3fa804a3d05a6e06b45a1280d7064e96ac6) ) ROM_LOAD16_BYTE( "dduxb10.bin", 0x00001, 0x010000, CRC(0be3aee5) SHA1(48fc779b7398abbb82cd0d0d28705ece75b3c4e3) ) ROM_LOAD16_BYTE( "dduxb07.bin", 0x20000, 0x010000, CRC(0217369c) SHA1(b6ec2fa1279a27a602d79e1073c54193745ea816) ) @@ -2903,7 +2850,7 @@ ROM_START( eswatbl ) ROM_LOAD( "mpr12625.b12", 0x40000, 0x40000, CRC(3b8c757e) SHA1(0b66e8446d059a12e47e2a6fe8f0a333245bb95c) ) // ic20 ROM_LOAD( "mpr12626.b13", 0x80000, 0x40000, CRC(3efca25c) SHA1(0d866bf53a16b52719f73081e933f4db27d72ece) ) // ic21 - ROM_REGION16_BE( 0x1c0000, "gfx2", 0 ) /* sprites */ + ROM_REGION16_BE( 0x1c0000, "sprites", 0 ) /* sprites */ ROM_LOAD16_BYTE( "ic9", 0x000001, 0x20000, CRC(0d1530bf) SHA1(bb8626cd98761c1c20cee117d00315c85621ba6a) ) ROM_CONTINUE( 0x100001, 0x20000 ) ROM_LOAD16_BYTE( "ic12", 0x000000, 0x20000, CRC(18ff0799) SHA1(5417223378aef16ee2b4f438d1f8f11a23fe7265) ) @@ -2932,7 +2879,7 @@ ROM_START( fpointbl ) ROM_LOAD( "flpoint.005", 0x10000, 0x10000, CRC(82c0b8b0) SHA1(e1e2e721cb8ad53df33065582dc90edeba9c3cab) ) ROM_LOAD( "flpoint.004", 0x20000, 0x10000, CRC(522426ae) SHA1(90fd0a19b30a8a61dc4cfa66a64115596333dcc6) ) - ROM_REGION16_BE( 0x20000, "gfx2", 0 ) /* sprites */ + ROM_REGION16_BE( 0x20000, "sprites", 0 ) /* sprites */ ROM_LOAD16_BYTE( "12596.bin", 0x00001, 0x010000, CRC(4a4041f3) SHA1(4c52b30223d8aa80ccdbb196098cb17e64ad6583) ) ROM_LOAD16_BYTE( "12597.bin", 0x00000, 0x010000, CRC(6961e676) SHA1(7639d2da086b57a9a8d6100fdacf40d97d7c4772) ) @@ -2950,7 +2897,7 @@ ROM_START( fpointbj ) ROM_LOAD( "flpoint.005", 0x10000, 0x10000, CRC(82c0b8b0) SHA1(e1e2e721cb8ad53df33065582dc90edeba9c3cab) ) ROM_LOAD( "flpoint.004", 0x20000, 0x10000, CRC(522426ae) SHA1(90fd0a19b30a8a61dc4cfa66a64115596333dcc6) ) - ROM_REGION16_BE( 0x20000, "gfx2", 0 ) /* sprites */ + ROM_REGION16_BE( 0x20000, "sprites", 0 ) /* sprites */ ROM_LOAD16_BYTE( "12596.bin", 0x00001, 0x010000, CRC(4a4041f3) SHA1(4c52b30223d8aa80ccdbb196098cb17e64ad6583) ) ROM_LOAD16_BYTE( "12597.bin", 0x00000, 0x010000, CRC(6961e676) SHA1(7639d2da086b57a9a8d6100fdacf40d97d7c4772) ) @@ -2978,7 +2925,7 @@ ROM_START( tetrisbl ) ROM_LOAD( "epr12166.b10", 0x10000, 0x10000, CRC(9abd183b) SHA1(621b017cb34973f9227be383e26b5cd41aea9422) ) ROM_LOAD( "epr12167.b11", 0x20000, 0x10000, CRC(2495fd4e) SHA1(2db94ead9223a67238a97e724668076fc43e5534) ) - ROM_REGION16_BE( 0x020000, "gfx2", 0 ) /* sprites */ + ROM_REGION16_BE( 0x020000, "sprites", 0 ) /* sprites */ ROM_LOAD16_BYTE( "obj0-o.rom", 0x00001, 0x10000, CRC(2fb38880) SHA1(0e1b601bbda78d1887951c1f7e752531c281bc83) ) ROM_LOAD16_BYTE( "obj0-e.rom", 0x00000, 0x10000, CRC(d6a02cba) SHA1(d80000f92e754e89c6ca7b7273feab448fc9a061) ) @@ -3009,7 +2956,7 @@ ROM_START( beautyb ) ROM_LOAD( "b53.bin", 0x10000, 0x10000, CRC(aca8e330) SHA1(912e636e3c1e238682ea29620e8e2c6089c77209) ) ROM_LOAD( "b63.bin", 0x00000, 0x10000, CRC(f2af2fd5) SHA1(0a95ebb5eae7cdc6535533d73d06419c23d01ac3) ) - ROM_REGION( 0x020000, "gfx2", ROMREGION_ERASEFF ) /* sprites */ + ROM_REGION( 0x020000, "sprites", ROMREGION_ERASEFF ) /* sprites */ /* no sprites on this */ ROM_REGION( 0x40000, "soundcpu", 0 ) /* sound CPU */ @@ -3036,7 +2983,7 @@ ROM_START( iqpipe ) ROM_LOAD( "iqpipe.5", 0x10000, 0x10000, CRC(dfaedd39) SHA1(498f1c34fecd8de497fdce41bb683d00047a868a) ) ROM_LOAD( "iqpipe.6", 0x00000, 0x10000, CRC(8e554f8d) SHA1(4b3b0e47c36f37947422f1c31063f11975108cd0) ) - ROM_REGION( 0x020000, "gfx2", ROMREGION_ERASEFF ) /* sprites */ + ROM_REGION( 0x020000, "sprites", ROMREGION_ERASEFF ) /* sprites */ /* no sprites on this */ ROM_REGION( 0x40000, "soundcpu", 0 ) /* sound CPU */ @@ -3068,7 +3015,7 @@ ROM_START( astormbl ) ROM_LOAD( "epr13074.bin", 0x40000, 0x40000, CRC(787afab8) SHA1(a119042bb2dad54e9733bfba4eaab0ac5fc0f9e7) ) ROM_LOAD( "epr13075.bin", 0x80000, 0x40000, CRC(4e01b477) SHA1(4178ce4a87ea427c3b0195e64acef6cddfb3485f) ) - ROM_REGION16_BE( 0x200000, "gfx2", 0 ) /* sprites */ + ROM_REGION16_BE( 0x200000, "sprites", 0 ) /* sprites */ ROM_LOAD16_BYTE( "mpr13082.bin", 0x000001, 0x40000, CRC(a782b704) SHA1(ba15bdfbc267b8d86f03e5310ce60846ff846de3) ) ROM_LOAD16_BYTE( "astorm.a11", 0x000000, 0x40000, CRC(7829c4f3) SHA1(3adb7aa7f70163d3848c98316e18b9783c41d663) ) ROM_LOAD16_BYTE( "mpr13081.bin", 0x080001, 0x40000, CRC(eb510228) SHA1(4cd387b160ec7050e1300ebe708853742169e643) ) @@ -3130,7 +3077,7 @@ ROM_START( astormb2 ) ROM_LOAD( "36.03", 0x80000, 0x20000, CRC(c0f9628d) SHA1(aeacf5e409adfa0b9c28c90d4e89eb1f56cd5f4d) ) // epr13075.bin [1/2] IDENTICAL ROM_LOAD( "37.031", 0xa0000, 0x20000, CRC(95af904e) SHA1(6574fa874c355c368109b417aab7d0b05c9d215d) ) // epr13075.bin [2/2] IDENTICAL - ROM_REGION16_BE( 0x200000, "gfx2", 0 ) /* sprites */ + ROM_REGION16_BE( 0x200000, "sprites", 0 ) /* sprites */ ROM_LOAD16_BYTE( "17.042", 0x000001, 0x20000, CRC(db08beb5) SHA1(c154d22c69b77637d6a9d0f2bffcfb47e6901ec8) ) // mpr13082.bin [1/2] IDENTICAL ROM_LOAD16_BYTE( "16.043", 0x040001, 0x20000, CRC(41f78977) SHA1(9cf9fcf96722d148c4b2cf7aa33425b6efcd0379) ) // mpr13082.bin [2/2] IDENTICAL ROM_LOAD16_BYTE( "29.012", 0x000000, 0x20000, CRC(22acf675) SHA1(80fd0d96017bf36d964a79f7e13e73fee7ed370a) ) // mpr13089.bin [1/2] 99.941254% @@ -3185,7 +3132,7 @@ ROM_START( mwalkbl ) ROM_LOAD( "mpr13217.b2", 0x40000, 0x40000, CRC(7d1ac3ec) SHA1(8495357304f1df135bba77ef3b96e79a883b8ff0) ) ROM_LOAD( "mpr13218.b3", 0x80000, 0x40000, CRC(56d3393c) SHA1(50a2d065060692c9ecaa56046a781cb21d93e554) ) - ROM_REGION16_BE( 0x200000, "gfx2", 0 ) /* sprites */ + ROM_REGION16_BE( 0x200000, "sprites", 0 ) /* sprites */ ROM_LOAD16_BYTE( "mpr13224.b11", 0x000001, 0x40000, CRC(c59f107b) SHA1(10fa60fca6e34eda277c483bb1c0e81bb88c8a47) ) ROM_LOAD16_BYTE( "mpr13231.a11", 0x000000, 0x40000, CRC(a5e96346) SHA1(a854f4dd5dc16975373255110fdb8ab3d121b1af) ) ROM_LOAD16_BYTE( "mpr13223.b10", 0x080001, 0x40000, CRC(364f60ff) SHA1(9ac887ec0b2e32b504b7c6a5f3bb1ce3fe41a15a) ) @@ -3223,7 +3170,7 @@ ROM_START( shdancbl ) ROM_LOAD( "ic2", 0x80000, 0x20000, CRC(60095070) SHA1(913c2ee51fb6f838f3c6cbd27032bdf754fbadf1) ) ROM_LOAD( "ic16", 0xa0000, 0x20000, CRC(0f0d5dd3) SHA1(76812e2f831256a8b6598257dd84a7f07443642e) ) - ROM_REGION16_BE( 0x200000, "gfx2", 0 ) /* sprites */ + ROM_REGION16_BE( 0x200000, "sprites", 0 ) /* sprites */ // 12719 ROM_LOAD16_BYTE( "ic73", 0x000001, 0x10000, CRC(59e77c96) SHA1(08da058529ac83352a4528d3792a21edda348f7a) ) diff --git a/src/mame/includes/segahang.h b/src/mame/includes/segahang.h index 03a9f3759b8..7c2767132c8 100644 --- a/src/mame/includes/segahang.h +++ b/src/mame/includes/segahang.h @@ -41,22 +41,24 @@ #include "machine/i8255.h" #include "machine/segaic16.h" #include "video/segaic16.h" +#include "video/sega16sp.h" // ======================> segahang_state -class segahang_state : public driver_device +class segahang_state : public sega_16bit_common_base { public: // construction/destruction segahang_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), + : sega_16bit_common_base(mconfig, type, tag), m_maincpu(*this, "maincpu"), m_subcpu(*this, "subcpu"), m_soundcpu(*this, "soundcpu"), m_mcu(*this, "mcu"), m_i8255_1(*this, "i8255_1"), m_i8255_2(*this, "i8255_2"), + m_sprites(*this, "sprites"), m_workram(*this, "workram"), m_sharrier_video(false), m_adc_select(0) @@ -87,6 +89,7 @@ public: DECLARE_DRIVER_INIT(enduror); DECLARE_DRIVER_INIT(endurobl); DECLARE_DRIVER_INIT(endurob2); + // video updates UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); @@ -116,7 +119,8 @@ protected: optional_device<i8751_device> m_mcu; required_device<i8255_device> m_i8255_1; required_device<i8255_device> m_i8255_2; - + required_device<sega_16bit_sprite_device> m_sprites; + // memory pointers required_shared_ptr<UINT16> m_workram; @@ -126,4 +130,5 @@ protected: // internal state UINT8 m_adc_select; + bool m_shadow; }; diff --git a/src/mame/includes/segaorun.h b/src/mame/includes/segaorun.h index 5a7f652bb77..28faca9ebe8 100644 --- a/src/mame/includes/segaorun.h +++ b/src/mame/includes/segaorun.h @@ -41,22 +41,24 @@ #include "machine/nvram.h" #include "machine/segaic16.h" #include "video/segaic16.h" +#include "video/sega16sp.h" // ======================> segaorun_state -class segaorun_state : public driver_device +class segaorun_state : public sega_16bit_common_base { public: // construction/destruction segaorun_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), + : sega_16bit_common_base(mconfig, type, tag), m_mapper(*this, "mapper"), m_maincpu(*this, "maincpu"), m_subcpu(*this, "subcpu"), m_soundcpu(*this, "soundcpu"), m_i8255(*this, "i8255"), m_nvram(*this, "nvram"), + m_sprites(*this, "sprites"), m_workram(*this, "workram"), m_custom_map(NULL), m_shangon_video(false), @@ -134,6 +136,7 @@ protected: required_device<z80_device> m_soundcpu; required_device<i8255_device> m_i8255; optional_device<nvram_device> m_nvram; + required_device<sega_16bit_sprite_device> m_sprites; // memory required_shared_ptr<UINT16> m_workram; diff --git a/src/mame/includes/segas16a.h b/src/mame/includes/segas16a.h index ebde15cbdfb..9513c23334b 100644 --- a/src/mame/includes/segas16a.h +++ b/src/mame/includes/segas16a.h @@ -45,16 +45,17 @@ #include "machine/segaic16.h" #include "sound/2151intf.h" #include "video/segaic16.h" +#include "video/sega16sp.h" // ======================> segas16a_state -class segas16a_state : public driver_device +class segas16a_state : public sega_16bit_common_base { public: // construction/destruction segas16a_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), + : sega_16bit_common_base(mconfig, type, tag), m_maincpu(*this, "maincpu"), m_soundcpu(*this, "soundcpu"), m_mcu(*this, "mcu"), @@ -63,6 +64,7 @@ public: m_n7751(*this, "n7751"), m_n7751_i8243(*this, "n7751_8243"), m_nvram(*this, "nvram"), + m_sprites(*this, "sprites"), m_workram(*this, "nvram"), m_video_control(0), m_mcu_control(0), @@ -158,6 +160,7 @@ protected: optional_device<n7751_device> m_n7751; optional_device<i8243_device> m_n7751_i8243; required_device<nvram_device> m_nvram; + required_device<sega_sys16a_sprite_device> m_sprites; // memory pointers required_shared_ptr<UINT16> m_workram; diff --git a/src/mame/includes/segas16b.h b/src/mame/includes/segas16b.h index a923e13bed9..a474c861c32 100644 --- a/src/mame/includes/segas16b.h +++ b/src/mame/includes/segas16b.h @@ -44,16 +44,17 @@ #include "sound/2413intf.h" #include "sound/upd7759.h" #include "video/segaic16.h" +#include "video/sega16sp.h" // ======================> segas16b_state -class segas16b_state : public driver_device +class segas16b_state : public sega_16bit_common_base { public: // construction/destruction segas16b_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), + : sega_16bit_common_base(mconfig, type, tag), m_mapper(*this, "mapper"), m_maincpu(*this, "maincpu"), m_soundcpu(*this, "soundcpu"), @@ -65,6 +66,7 @@ public: m_cmptimer_1(*this, "cmptimer_1"), m_cmptimer_2(*this, "cmptimer_2"), m_nvram(*this, "nvram"), + m_sprites(*this, "sprites"), m_workram(*this, "workram"), m_romboard(ROM_BOARD_INVALID), m_tilemap_type(SEGAIC16_TILEMAP_16B), @@ -193,7 +195,7 @@ protected: DECLARE_WRITE16_MEMBER( sjryuko_custom_io_w ); // devices - required_device<sega_315_5195_mapper_device> m_mapper; + optional_device<sega_315_5195_mapper_device> m_mapper; required_device<m68000_device> m_maincpu; optional_device<z80_device> m_soundcpu; optional_device<i8751_device> m_mcu; @@ -204,6 +206,7 @@ protected: optional_device<sega_315_5250_compare_timer_device> m_cmptimer_1; optional_device<sega_315_5250_compare_timer_device> m_cmptimer_2; required_device<nvram_device> m_nvram; + required_device<sega_sys16b_sprite_device> m_sprites; // memory pointers required_shared_ptr<UINT16> m_workram; diff --git a/src/mame/includes/segas18.h b/src/mame/includes/segas18.h index 657cd550817..402ce82ba95 100644 --- a/src/mame/includes/segas18.h +++ b/src/mame/includes/segas18.h @@ -38,26 +38,28 @@ #include "cpu/m68000/m68000.h" #include "cpu/mcs51/mcs51.h" #include "cpu/z80/z80.h" +#include "machine/megavdp.h" #include "machine/nvram.h" #include "machine/segaic16.h" #include "video/segaic16.h" -#include "machine/megavdp.h" +#include "video/sega16sp.h" // ======================> segas18_state -class segas18_state : public driver_device +class segas18_state : public sega_16bit_common_base { public: // construction/destruction segas18_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), + : sega_16bit_common_base(mconfig, type, tag), m_mapper(*this, "mapper"), m_maincpu(*this, "maincpu"), m_soundcpu(*this, "soundcpu"), m_mcu(*this, "mcu"), m_vdp(*this, "gen_vdp"), m_nvram(*this, "nvram"), + m_sprites(*this, "sprites"), m_workram(*this, "workram"), m_romboard(ROM_BOARD_INVALID), m_has_guns(false), @@ -150,6 +152,7 @@ protected: optional_device<i8751_device> m_mcu; required_device<sega_genesis_vdp_device> m_vdp; required_device<nvram_device> m_nvram; + required_device<sega_sys16b_sprite_device> m_sprites; // memory pointers required_shared_ptr<UINT16> m_workram; diff --git a/src/mame/includes/segaxbd.h b/src/mame/includes/segaxbd.h index 45ba3f45cc2..6c98a504b4e 100644 --- a/src/mame/includes/segaxbd.h +++ b/src/mame/includes/segaxbd.h @@ -40,22 +40,24 @@ #include "cpu/z80/z80.h" #include "machine/segaic16.h" #include "video/segaic16.h" +#include "video/sega16sp.h" // ======================> segaxbd_state -class segaxbd_state : public driver_device +class segaxbd_state : public sega_16bit_common_base { public: // construction/destruction segaxbd_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), + : sega_16bit_common_base(mconfig, type, tag), m_maincpu(*this, "maincpu"), m_subcpu(*this, "subcpu"), m_soundcpu(*this, "soundcpu"), m_soundcpu2(*this, "soundcpu2"), m_mcu(*this, "mcu"), m_cmptimer_1(*this, "cmptimer_main"), + m_sprites(*this, "sprites"), m_gprider_hack(false), m_road_priority(1), m_scanline_timer(NULL), @@ -145,6 +147,7 @@ protected: optional_device<z80_device> m_soundcpu2; optional_device<i8751_device> m_mcu; required_device<sega_315_5250_compare_timer_device> m_cmptimer_1; + required_device<sega_xboard_sprite_device> m_sprites; // configuration bool m_gprider_hack; diff --git a/src/mame/includes/segaybd.h b/src/mame/includes/segaybd.h index 8ca70dadbda..b6d663e9b56 100644 --- a/src/mame/includes/segaybd.h +++ b/src/mame/includes/segaybd.h @@ -39,20 +39,23 @@ #include "cpu/z80/z80.h" #include "machine/segaic16.h" #include "video/segaic16.h" +#include "video/sega16sp.h" // ======================> segaybd_state -class segaybd_state : public driver_device +class segaybd_state : public sega_16bit_common_base { public: // construction/destruction segaybd_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), + : sega_16bit_common_base(mconfig, type, tag), m_maincpu(*this, "maincpu"), m_subx(*this, "subx"), m_suby(*this, "suby"), m_soundcpu(*this, "soundcpu"), + m_bsprites(*this, "bsprites"), + m_ysprites(*this, "ysprites"), m_pdrift_bank(0), m_scanline_timer(NULL), m_irq2_scanline(0), @@ -121,6 +124,8 @@ protected: required_device<m68000_device> m_subx; required_device<m68000_device> m_suby; required_device<z80_device> m_soundcpu; + required_device<sega_sys16b_sprite_device> m_bsprites; + required_device<sega_yboard_sprite_device> m_ysprites; // configuration output_delegate m_output_cb1; diff --git a/src/mame/includes/system16.h b/src/mame/includes/system16.h index d27fe627e6f..808b5d1aa68 100644 --- a/src/mame/includes/system16.h +++ b/src/mame/includes/system16.h @@ -1,17 +1,22 @@ // later, this might be merged with segas1x_state in segas16.h -class segas1x_bootleg_state : public driver_device +#include "video/sega16sp.h" +#include "machine/segaic16.h" + +class segas1x_bootleg_state : public sega_16bit_common_base { public: segas1x_bootleg_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag) , + : sega_16bit_common_base(mconfig, type, tag) , m_textram(*this, "textram"), m_bg0_tileram(*this, "bg0_tileram"), m_bg1_tileram(*this, "bg1_tileram"), m_tileram(*this, "tileram"), m_goldnaxeb2_bgpage(*this, "gab2_bgpage"), - m_goldnaxeb2_fgpage(*this, "gab2_fgpage"){ } + m_goldnaxeb2_fgpage(*this, "gab2_fgpage"), + m_sprites(*this, "sprites") + { } required_shared_ptr<UINT16> m_textram; optional_shared_ptr<UINT16> m_bg0_tileram; @@ -20,6 +25,7 @@ public: optional_shared_ptr<UINT16> m_goldnaxeb2_bgpage; optional_shared_ptr<UINT16> m_goldnaxeb2_fgpage; + required_device<sega_16bit_sprite_device> m_sprites; UINT16 m_coinctrl; diff --git a/src/mame/machine/segaic16.c b/src/mame/machine/segaic16.c index 2747caeaf02..72f53ccb88e 100644 --- a/src/mame/machine/segaic16.c +++ b/src/mame/machine/segaic16.c @@ -67,11 +67,27 @@ const device_type SEGA_315_5250_COMPARE_TIMER = &device_creator<sega_315_5250_co // MISC HELPERS //************************************************************************** -READ16_HANDLER( segaic16_open_bus_r ) +//------------------------------------------------- +// sega_16bit_common_base - constructor +//------------------------------------------------- + +sega_16bit_common_base::sega_16bit_common_base(const machine_config &mconfig, device_type type, const char *tag) + : driver_device(mconfig, type, tag), + m_paletteram(*this, "paletteram"), + m_open_bus_recurse(false), + m_palette_entries(0) { - static UINT8 recurse = 0; - UINT16 result; + palette_init(); +} + +//------------------------------------------------- +// open_bus_r - return value from reading an +// unmapped address +//------------------------------------------------- + +READ16_MEMBER( sega_16bit_common_base::open_bus_r ) +{ // Unmapped memory returns the last word on the data bus, which is almost always the opcode // of the next instruction due to prefetch; however, since we may be encrypted, we actually // need to return the encrypted opcode, not the last decrypted data. @@ -81,17 +97,101 @@ READ16_HANDLER( segaic16_open_bus_r ) // return the prefetched value. // prevent recursion - if (recurse) + if (m_open_bus_recurse) return 0xffff; // read original encrypted memory at that address - recurse = 1; - result = space->read_word(cpu_get_pc(&space->device())); - recurse = 0; + m_open_bus_recurse = true; + UINT16 result = space.read_word(cpu_get_pc(&space.device())); + m_open_bus_recurse = false; return result; } +//------------------------------------------------- +// palette_init - precompute weighted RGB values +// for each input value 0-31 +//------------------------------------------------- + +void sega_16bit_common_base::palette_init() +{ + // + // Color generation details + // + // Each color is made up of 5 bits, connected through one or more resistors like so: + // + // Bit 0 = 1 x 3.9K ohm + // Bit 1 = 1 x 2.0K ohm + // Bit 2 = 1 x 1.0K ohm + // Bit 3 = 2 x 1.0K ohm + // Bit 4 = 4 x 1.0K ohm + // + // Another data bit is connected by a tristate buffer to the color output through a + // 470 ohm resistor. The buffer allows the resistor to have no effect (tristate), + // halve brightness (pull-down) or double brightness (pull-up). The data bit source + // is bit 15 of each color RAM entry. + // + + // compute weight table for regular palette entries + static const int resistances_normal[6] = { 3900, 2000, 1000, 1000/2, 1000/4, 0 }; + double weights_normal[6]; + compute_resistor_weights(0, 255, -1.0, + 6, resistances_normal, weights_normal, 0, 0, + 0, NULL, NULL, 0, 0, + 0, NULL, NULL, 0, 0); + + // compute weight table for shadow/hilight palette entries + static const int resistances_sh[6] = { 3900, 2000, 1000, 1000/2, 1000/4, 470 }; + double weights_sh[6]; + compute_resistor_weights(0, 255, -1.0, + 6, resistances_sh, weights_sh, 0, 0, + 0, NULL, NULL, 0, 0, + 0, NULL, NULL, 0, 0); + + // compute R, G, B for each weight + for (int value = 0; value < 32; value++) + { + int i4 = (value >> 4) & 1; + int i3 = (value >> 3) & 1; + int i2 = (value >> 2) & 1; + int i1 = (value >> 1) & 1; + int i0 = (value >> 0) & 1; + m_palette_normal[value] = combine_6_weights(weights_normal, i0, i1, i2, i3, i4, 0); + m_palette_shadow[value] = combine_6_weights(weights_sh, i0, i1, i2, i3, i4, 0); + m_palette_hilight[value] = combine_6_weights(weights_sh, i0, i1, i2, i3, i4, 1); + } +} + + +//------------------------------------------------- +// paletteram_w - handle writes to palette RAM +//------------------------------------------------- + +WRITE16_MEMBER( sega_16bit_common_base::paletteram_w ) +{ + // compute the number of entries + if (m_palette_entries == 0) + m_palette_entries = memshare("paletteram")->bytes() / 2; + + // get the new value + UINT16 newval = m_paletteram[offset]; + COMBINE_DATA(&newval); + m_paletteram[offset] = newval; + + // byte 0 byte 1 + // sBGR BBBB GGGG RRRR + // x000 4321 4321 4321 + int r = ((newval >> 12) & 0x01) | ((newval << 1) & 0x1e); + int g = ((newval >> 13) & 0x01) | ((newval >> 3) & 0x1e); + int b = ((newval >> 14) & 0x01) | ((newval >> 7) & 0x1e); + + // normal colors + palette_set_color_rgb(machine(), offset + 0 * m_palette_entries, m_palette_normal[r], m_palette_normal[g], m_palette_normal[b]); + palette_set_color_rgb(machine(), offset + 1 * m_palette_entries, m_palette_shadow[r], m_palette_shadow[g], m_palette_shadow[b]); + palette_set_color_rgb(machine(), offset + 2 * m_palette_entries, m_palette_hilight[r], m_palette_hilight[g], m_palette_hilight[b]); +} + + //************************************************************************** // 315-5195 MEMORY MAPPER @@ -273,7 +373,7 @@ READ8_MEMBER( sega_315_5195_mapper_device::read ) logerror("Unknown memory_mapper_r from address %02X\n", offset); break; } - return (space.data_width() == 8) ? 0xff : segaic16_open_bus_r(&space, 0, 0xffff); + return (space.data_width() == 8) ? 0xff : machine().driver_data<sega_16bit_common_base>()->open_bus_r(space, 0, 0xffff); } diff --git a/src/mame/machine/segaic16.h b/src/mame/machine/segaic16.h index 5b189ba7742..8e6286647e5 100644 --- a/src/mame/machine/segaic16.h +++ b/src/mame/machine/segaic16.h @@ -80,6 +80,38 @@ //************************************************************************** +// ======================> sega_16bit_common_base + +class sega_16bit_common_base : public driver_device +{ +public: + // construction/destruction + sega_16bit_common_base(const machine_config &mconfig, device_type type, const char *tag); + + // open bus read helpers + DECLARE_READ16_MEMBER( open_bus_r ); + + // palette helpers + DECLARE_WRITE16_MEMBER( paletteram_w ); + +protected: + // internal helpers + void palette_init(); + +public: // -- stupid system16.c + // memory pointers + required_shared_ptr<UINT16> m_paletteram; +protected: + + // internal state + bool m_open_bus_recurse; // flag to track recursion through open_bus_r + UINT32 m_palette_entries; // number of palette entries + UINT8 m_palette_normal[32]; // RGB translations for normal pixels + UINT8 m_palette_shadow[32]; // RGB translations for shadowed pixels + UINT8 m_palette_hilight[32]; // RGB translations for hilighted pixels +}; + + // ======================> sega_315_5195_mapper_device class sega_315_5195_mapper_device : public device_t @@ -272,9 +304,4 @@ extern const device_type SEGA_315_5249_DIVIDER; extern const device_type SEGA_315_5250_COMPARE_TIMER; - -/* open bus read helpers */ -READ16_HANDLER( segaic16_open_bus_r ); - - #endif diff --git a/src/mame/video/sega16sp.c b/src/mame/video/sega16sp.c index 461dfce55dd..c9eb594631b 100644 --- a/src/mame/video/sega16sp.c +++ b/src/mame/video/sega16sp.c @@ -1,457 +1,570 @@ +/*************************************************************************** + + Sega 16-bit sprite hardware + +**************************************************************************** + + Copyright Aaron Giles + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + * Neither the name 'MAME' nor the names of its contributors may be + used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND ANY EXPRESS OR + IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +***************************************************************************/ + #include "emu.h" +#include "sega16sp.h" #include "segaic16.h" -UINT16 *segaic16_spriteram_0; -UINT16 *segaic16_spriteram_1; +//**************************************************************************** +// CONSTANTS +//**************************************************************************** + +// device type definition +const device_type SEGA_HANGON_SPRITES = &device_creator<sega_hangon_sprite_device>; +const device_type SEGA_SHARRIER_SPRITES = &device_creator<sega_sharrier_sprite_device>; +const device_type SEGA_OUTRUN_SPRITES = &device_creator<sega_outrun_sprite_device>; +const device_type SEGA_SYS16A_SPRITES = &device_creator<sega_sys16a_sprite_device>; +const device_type BOOTLEG_SYS16A_SPRITES = &device_creator<bootleg_sys16a_sprite_device>; +const device_type SEGA_SYS16B_SPRITES = &device_creator<sega_sys16b_sprite_device>; +const device_type SEGA_XBOARD_SPRITES = &device_creator<sega_xboard_sprite_device>; +const device_type SEGA_YBOARD_SPRITES = &device_creator<sega_yboard_sprite_device>; + + + +//**************************************************************************** +// DEVICE INTERFACE +//**************************************************************************** + +//------------------------------------------------- +// sega_16bit_sprite_device -- core constructor +//------------------------------------------------- + +sega_16bit_sprite_device::sega_16bit_sprite_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner) + : sprite16_device_ind16(mconfig, type, name, tag, owner), + m_flip(false) +{ + // default to 1:1 bank mapping + for (int bank = 0; bank < ARRAY_LENGTH(m_bank); bank++) + m_bank[bank] = bank; +} + + +//------------------------------------------------- +// device_start -- device startup +//------------------------------------------------- + +void sega_16bit_sprite_device::device_start() +{ + // let the parent do its work + sprite16_device_ind16::device_start(); + // save states + save_item(NAME(m_flip)); + save_item(NAME(m_bank)); +} -/***************************************************************************** - INLINE FUNCTIONS -*****************************************************************************/ +//------------------------------------------------- +// draw_write -- trigger a buffer flip +//------------------------------------------------- -INLINE sega16sp_state *get_safe_token( device_t *device ) +WRITE16_MEMBER( sega_16bit_sprite_device::draw_write ) { - assert(device != NULL); - assert(device->type() == SEGA16SP); + UINT32 *src = reinterpret_cast<UINT32 *>(spriteram()); + UINT32 *dst = reinterpret_cast<UINT32 *>(buffer()); + + // swap the halves of the sprite RAM + for (int i = 0; i < spriteram_bytes()/4; i++) + { + UINT32 temp = *src; + *src++ = *dst; + *dst++ = temp; + } + + // hack for thunderblade + *spriteram() = 0xffff; - return (sega16sp_state *)downcast<legacy_device_base *>(device)->token(); + // we will render the sprites when the video update happens } -INLINE const sega16sp_interface *get_interface( device_t *device ) + + +//**************************************************************************** +// HANG ON-STYLE SPRITES +//**************************************************************************** + +//------------------------------------------------- +// sega_hangon_sprite_device -- constructor +//------------------------------------------------- + +sega_hangon_sprite_device::sega_hangon_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : sega_16bit_sprite_device(mconfig, SEGA_HANGON_SPRITES, "Sega Hang On Sprites", tag, owner) { - assert(device != NULL); - assert((device->type() == SEGA16SP)); - return (const sega16sp_interface *) device->static_config(); + set_origin(189, -1); } -/******************************************************************************************* - * - * Hang On-style sprites - * - * Offs Bits Usage - * +0 bbbbbbbb -------- Bottom scanline of sprite - 1 - * +0 -------- tttttttt Top scanline of sprite - 1 - * +2 bbbb---- -------- Sprite bank - * +2 -------x xxxxxxxx X position of sprite (position $BD is screen position 0) - * +4 pppppppp pppppppp Signed 16-bit pitch value between scanlines - * +6 -ooooooo oooooooo Offset within selected sprite bank - * +6 f------- -------- Horizontal flip: read the data backwards if set - * +8 --cccccc -------- Sprite color palette - * +8 -------- zzzzzz-- Zoom factor - * +8 -------- ------pp Sprite priority - * +E dddddddd dddddddd Scratch space for current address - * - * Special notes: - * - * There is an interaction between the horizonal flip bit and the offset. - * The offset is maintained as a 16-bit value, even though only the lower - * 15 bits are used for the address. The top bit is used to control flipping. - * This means that if the low 15 bits overflow during rendering, the sprite - * data will be read backwards after the overflow. This is important to - * emulate correctly as many games make use of this feature to render sprites - * at the beginning of a bank. - * - *******************************************************************************************/ - -#define hangon_draw_pixel() \ - /* only draw if onscreen, not 0 or 15 */ \ - if (pix != 0 && pix != 15) \ - { \ - /* are we high enough priority to be visible? */ \ - if (sprpri > pri[x]) \ - { \ - /* shadow/hilight mode? */ \ - if (color == sega16sp->colorbase + (0x3f << 4)) \ - dest[x] += sega16sp->shadow ? segaic16_palette.entries*2 : segaic16_palette.entries; \ - \ - /* regular draw */ \ - else \ - dest[x] = pix | color; \ - } \ - \ - /* always mark priority so no one else draws here */ \ - pri[x] = 0xff; \ - } \ - -void segaic16_sprites_hangon_draw(running_machine &machine, device_t *device, bitmap_ind16 &bitmap, const rectangle &cliprect) + +//------------------------------------------------- +// draw -- render the sprites within the cliprect +//------------------------------------------------- + +void sega_hangon_sprite_device::draw(bitmap_ind16 &bitmap, const rectangle &cliprect) { - UINT8 numbanks = machine.root_device().memregion("gfx2")->bytes() / 0x10000; - const UINT16 *spritebase = (const UINT16 *)machine.root_device().memregion("gfx2")->base(); - const UINT8 *zoom = (const UINT8 *)machine.root_device().memregion("proms")->base(); - sega16sp_state *sega16sp = get_safe_token(device); - UINT16* data = sega16sp->spriteram; - - /* first scan forward to find the end of the list */ - for (data = sega16sp->spriteram; data < sega16sp->spriteram + sega16sp->ramsize/2; data += 8) - if ((data[0] >> 8) > 0xf0) + // + // Hang On-style sprites + // + // Offs Bits Usage + // +0 bbbbbbbb -------- Bottom scanline of sprite - 1 + // +0 -------- tttttttt Top scanline of sprite - 1 + // +2 bbbb---- -------- Sprite bank + // +2 -------x xxxxxxxx X position of sprite (position $BD is screen position 0) + // +4 pppppppp pppppppp Signed 16-bit pitch value between scanlines + // +6 -ooooooo oooooooo Offset within selected sprite bank + // +6 f------- -------- Horizontal flip: read the data backwards if set + // +8 --cccccc -------- Sprite color palette + // +8 -------- zzzzzz-- Zoom factor + // +8 -------- ------pp Sprite priority + // +E dddddddd dddddddd Scratch space for current address + // + // Final bitmap format: + // + // ----pp-- -------- Sprite priority + // ------cc cccc---- Sprite color palette + // -------- ----llll 4-bit pixel data + // + // Special notes: + // + // There is an interaction between the horizonal flip bit and the offset. + // The offset is maintained as a 16-bit value, even though only the lower + // 15 bits are used for the address. The top bit is used to control flipping. + // This means that if the low 15 bits overflow during rendering, the sprite + // data will be read backwards after the overflow. This is important to + // emulate correctly as many games make use of this feature to render sprites + // at the beginning of a bank. + // + + // render the sprites in order + const UINT16 *spritebase = reinterpret_cast<const UINT16 *>(region()->base()); + UINT8 numbanks = region()->bytes() / 0x10000; + const UINT8 *zoom = memregion("zoom")->base(); + UINT16 *ramend = spriteram() + spriteram_elements(); + for (UINT16 *data = spriteram(); data < ramend; data += 8) + { + // fetch the bottom; stop when we get something out of range + int bottom = data[0] >> 8; + if (bottom > 0xf0) break; - /* now scan backwards and render the sprites in order */ - for (data -= 8; data >= sega16sp->spriteram; data -= 8) - { - int bottom = (data[0] >> 8) + 1; - int top = (data[0] & 0xff) + 1; - int bank = sega16sp->bank[(data[1] >> 12) & 0xf]; - int xpos = (data[1] & 0x1ff) - 0xbd; - int pitch = (INT16)data[2]; + // extract remaining parameters + int top = data[0] & 0xff; + int bank = m_bank[(data[1] >> 12) & 0xf]; + int xpos = data[1] & 0x1ff; + int pitch = INT16(data[2]); UINT16 addr = data[3]; - int color = sega16sp->colorbase + (((data[4] >> 8) & 0x3f) << 4); + int colpri = (((data[4] >> 8) & 0x3f) << 4) | (((data[4] >> 0) & 0x3) << 10); int vzoom = (data[4] >> 2) & 0x3f; int hzoom = vzoom << 1; - int sprpri = 1 << ((data[4] >> 0) & 0x3); - int x, y, pix, zaddr, zmask; - const UINT16 *spritedata; - /* initialize the end address to the start address */ + // initialize the end address to the start address data[7] = addr; - /* if hidden, or top greater than/equal to bottom, or invalid bank, punt */ - if ((top >= bottom) || bank == 255) + // if hidden, or top greater than/equal to bottom, or invalid bank, punt + if (top >= bottom || bank == 255) continue; - /* clamp to within the memory region size */ + // clamp to within the memory region size if (numbanks) bank %= numbanks; - spritedata = spritebase + 0x8000 * bank; - - /* determine the starting zoom address and mask */ - zaddr = (vzoom & 0x38) << 5; - zmask = 1 << (vzoom & 7); - - /* loop from top to bottom */ - for (y = top; y < bottom; y++) + const UINT16 *spritedata = spritebase + 0x8000 * bank; + + // determine the starting zoom address and mask + int zaddr = (vzoom & 0x38) << 5; + int zmask = 1 << (vzoom & 7); + + // loop from top to bottom + int minx = xpos; + int maxx = xpos; + int miny = -1; + int maxy = -1; + for (int y = top; y < bottom; y++) { - /* advance a row */ + // advance a row addr += pitch; - /* if the zoom bit says so, add pitch a second time */ + // if the zoom bit says so, add pitch a second time if (zoom[zaddr++] & zmask) addr += pitch; - /* skip drawing if not within the cliprect */ + // skip drawing if not within the cliprect if (y >= cliprect.min_y && y <= cliprect.max_y) { - UINT16 *dest = &bitmap.pix16(y); - UINT8 *pri = &machine.priority_bitmap.pix8(y); + UINT16 *dest = &bitmap.pix(y); int xacc = 0x00; + int x; - /* note that the System 16A sprites have a design flaw that allows the address */ - /* to carry into the flip flag, which is the topmost bit -- it is very important */ - /* to emulate this as the games compensate for it */ + // note that the System 16A sprites have a design flaw that allows the address + // to carry into the flip flag, which is the topmost bit -- it is very important + // to emulate this as the games compensate for it - /* non-flipped case */ + // non-flipped case if (!(addr & 0x8000)) { - /* start at the word before because we preincrement below */ + // start at the word before because we preincrement below data[7] = addr - 1; for (x = xpos; x <= cliprect.max_x; ) { UINT16 pixels = spritedata[++data[7] & 0x7fff]; - /* draw four pixels */ - pix = (pixels >> 12) & 0xf; xacc = (xacc & 0xff) + hzoom; if (xacc < 0x100) { if (x >= cliprect.min_x) hangon_draw_pixel(); x++; } - pix = (pixels >> 8) & 0xf; xacc = (xacc & 0xff) + hzoom; if (xacc < 0x100) { if (x >= cliprect.min_x) hangon_draw_pixel(); x++; } - pix = (pixels >> 4) & 0xf; xacc = (xacc & 0xff) + hzoom; if (xacc < 0x100) { if (x >= cliprect.min_x) hangon_draw_pixel(); x++; } - pix = (pixels >> 0) & 0xf; xacc = (xacc & 0xff) + hzoom; if (xacc < 0x100) { if (x >= cliprect.min_x) hangon_draw_pixel(); x++; } + // draw four pixels + int pix; + pix = (pixels >> 12) & 0xf; xacc = (xacc & 0xff) + hzoom; if (xacc < 0x100) { if (x >= cliprect.min_x && pix != 0 && pix != 15) dest[x] = colpri | pix; x++; } + pix = (pixels >> 8) & 0xf; xacc = (xacc & 0xff) + hzoom; if (xacc < 0x100) { if (x >= cliprect.min_x && pix != 0 && pix != 15) dest[x] = colpri | pix; x++; } + pix = (pixels >> 4) & 0xf; xacc = (xacc & 0xff) + hzoom; if (xacc < 0x100) { if (x >= cliprect.min_x && pix != 0 && pix != 15) dest[x] = colpri | pix; x++; } + pix = (pixels >> 0) & 0xf; xacc = (xacc & 0xff) + hzoom; if (xacc < 0x100) { if (x >= cliprect.min_x && pix != 0 && pix != 15) dest[x] = colpri | pix; x++; } - /* stop if the last pixel in the group was 0xf */ + // stop if the last pixel in the group was 0xf if (pix == 15) break; } } - /* flipped case */ + // flipped case else { - /* start at the word after because we predecrement below */ + // start at the word after because we predecrement below data[7] = addr + 1; for (x = xpos; x <= cliprect.max_x; ) { UINT16 pixels = spritedata[--data[7] & 0x7fff]; - /* draw four pixels */ - pix = (pixels >> 0) & 0xf; xacc = (xacc & 0xff) + hzoom; if (xacc < 0x100) { if (x >= cliprect.min_x) hangon_draw_pixel(); x++; } - pix = (pixels >> 4) & 0xf; xacc = (xacc & 0xff) + hzoom; if (xacc < 0x100) { if (x >= cliprect.min_x) hangon_draw_pixel(); x++; } - pix = (pixels >> 8) & 0xf; xacc = (xacc & 0xff) + hzoom; if (xacc < 0x100) { if (x >= cliprect.min_x) hangon_draw_pixel(); x++; } - pix = (pixels >> 12) & 0xf; xacc = (xacc & 0xff) + hzoom; if (xacc < 0x100) { if (x >= cliprect.min_x) hangon_draw_pixel(); x++; } + // draw four pixels + int pix; + pix = (pixels >> 0) & 0xf; xacc = (xacc & 0xff) + hzoom; if (xacc < 0x100) { if (x >= cliprect.min_x && pix != 0 && pix != 15) dest[x] = colpri | pix; x++; } + pix = (pixels >> 4) & 0xf; xacc = (xacc & 0xff) + hzoom; if (xacc < 0x100) { if (x >= cliprect.min_x && pix != 0 && pix != 15) dest[x] = colpri | pix; x++; } + pix = (pixels >> 8) & 0xf; xacc = (xacc & 0xff) + hzoom; if (xacc < 0x100) { if (x >= cliprect.min_x && pix != 0 && pix != 15) dest[x] = colpri | pix; x++; } + pix = (pixels >> 12) & 0xf; xacc = (xacc & 0xff) + hzoom; if (xacc < 0x100) { if (x >= cliprect.min_x && pix != 0 && pix != 15) dest[x] = colpri | pix; x++; } - /* stop if the last pixel in the group was 0xf */ + // stop if the last pixel in the group was 0xf if (pix == 15) break; } } + + // update bounds + if (x > maxx) maxx = x; + if (miny == -1) miny = y; + maxy = y; } } + + // mark dirty + if (miny != -1) + mark_dirty(minx, maxx, miny, maxy); } } -/******************************************************************************************* - * - * Space Harrier-style sprites - * - * Offs Bits Usage - * +0 bbbbbbbb -------- Bottom scanline of sprite - 1 - * +0 -------- tttttttt Top scanline of sprite - 1 - * +2 bbbb---- -------- Sprite bank - * +2 -------x xxxxxxxx X position of sprite (position $BD is screen position 0) - * +4 s------- -------- Sprite shadow enable (0=enable, 1=disable) - * +4 -p------ -------- Sprite priority - * +4 --cccccc -------- Sprite color palette - * +4 -------- -ppppppp Signed 7-bit pitch value between scanlines - * +6 f------- -------- Horizontal flip: read the data backwards if set - * +6 -ooooooo oooooooo Offset within selected sprite bank - * +8 --zzzzzz -------- Horizontal zoom factor - * +8 -------- --zzzzzz Vertical zoom factor - * +E dddddddd dddddddd Scratch space for current address - * - * Special notes: - * - * There is an interaction between the horizonal flip bit and the offset. - * The offset is maintained as a 16-bit value, even though only the lower - * 15 bits are used for the address. The top bit is used to control flipping. - * This means that if the low 15 bits overflow during rendering, the sprite - * data will be read backwards after the overflow. This is important to - * emulate correctly as many games make use of this feature to render sprites - * at the beginning of a bank. - * - *******************************************************************************************/ - -#define sharrier_draw_pixel() \ - /* only draw if onscreen, not 0 or 15 */ \ - if (pix != 0 && pix != 15) \ - { \ - /* are we high enough priority to be visible? */ \ - if (sprpri > pri[x]) \ - { \ - /* shadow/hilight mode? */ \ - if (shadow && pix == 0xa) \ - dest[x] += (segaic16_paletteram[dest[x]] & 0x8000) ? segaic16_palette.entries*2 : segaic16_palette.entries; \ - \ - /* regular draw */ \ - else \ - dest[x] = pix | color; \ - } \ - \ - /* always mark priority so no one else draws here */ \ - pri[x] = 0xff; \ - } \ - -void segaic16_sprites_sharrier_draw(running_machine &machine, device_t *device, bitmap_ind16 &bitmap, const rectangle &cliprect) +//**************************************************************************** +// SPACE HARRIER-STYLE SPRITES +//**************************************************************************** + +//------------------------------------------------- +// sega_sharrier_sprite_device -- constructor +//------------------------------------------------- + +sega_sharrier_sprite_device::sega_sharrier_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : sega_16bit_sprite_device(mconfig, SEGA_SHARRIER_SPRITES, "Sega Space Harrier Sprites", tag, owner) +{ + set_origin(189, -1); +} + + +//------------------------------------------------- +// draw -- render the sprites within the cliprect +//------------------------------------------------- + +void sega_sharrier_sprite_device::draw(bitmap_ind16 &bitmap, const rectangle &cliprect) { - UINT8 numbanks = machine.root_device().memregion("gfx2")->bytes() / 0x20000; - const UINT32 *spritebase = (const UINT32 *)machine.root_device().memregion("gfx2")->base(); - const UINT8 *zoom = (const UINT8 *)machine.root_device().memregion("proms")->base(); - sega16sp_state *sega16sp = get_safe_token(device); - UINT16* data = sega16sp->spriteram; - - /* first scan forward to find the end of the list */ - for (data = sega16sp->spriteram; data < sega16sp->spriteram + sega16sp->ramsize/2; data += 8) - if ((data[0] >> 8) > 0xf0) + // + // Space Harrier-style sprites + // + // Offs Bits Usage + // +0 bbbbbbbb -------- Bottom scanline of sprite - 1 + // +0 -------- tttttttt Top scanline of sprite - 1 + // +2 bbbb---- -------- Sprite bank + // +2 -------x xxxxxxxx X position of sprite (position $BD is screen position 0) + // +4 s------- -------- Sprite shadow disable (0=enable, 1=disable) + // +4 -p------ -------- Sprite priority + // +4 --cccccc -------- Sprite color palette + // +4 -------- -ppppppp Signed 7-bit pitch value between scanlines + // +6 f------- -------- Horizontal flip: read the data backwards if set + // +6 -ooooooo oooooooo Offset within selected sprite bank + // +8 --zzzzzz -------- Horizontal zoom factor + // +8 -------- --zzzzzz Vertical zoom factor + // +E dddddddd dddddddd Scratch space for current address + // + // Final bitmap format: + // + // ----s--- -------- Sprite shadow disable + // -----p-- -------- Sprite priority + // ------cc cccc---- Sprite color palette + // -------- ----llll 4-bit pixel data + // + // Special notes: + // + // There is an interaction between the horizonal flip bit and the offset. + // The offset is maintained as a 16-bit value, even though only the lower + // 15 bits are used for the address. The top bit is used to control flipping. + // This means that if the low 15 bits overflow during rendering, the sprite + // data will be read backwards after the overflow. This is important to + // emulate correctly as many games make use of this feature to render sprites + // at the beginning of a bank. + // + + // render the sprites in order + const UINT32 *spritebase = reinterpret_cast<const UINT32 *>(region()->base()); + UINT8 numbanks = region()->bytes() / 0x20000; + const UINT8 *zoom = memregion("zoom")->base(); + UINT16 *ramend = spriteram() + spriteram_elements(); + for (UINT16 *data = spriteram(); data < ramend; data += 8) + { + // fetch the bottom; stop when we get something out of range + int bottom = data[0] >> 8; + if (bottom > 0xf0) break; - /* now scan backwards and render the sprites in order */ - for (data -= 8; data >= sega16sp->spriteram; data -= 8) - { - int bottom = (data[0] >> 8) + 1; - int top = (data[0] & 0xff) + 1; - int bank = sega16sp->bank[(data[1] >> 12) & 0x7]; - int xpos = (data[1] & 0x1ff) - 0xbd; - int shadow = (~data[2] >> 15) & 1; - int sprpri = ((data[2] >> 14) & 1) ? (1<<3) : (1<<1); - int color = sega16sp->colorbase + (((data[2] >> 8) & 0x3f) << 4); - int pitch = (INT16)(data[2] << 9) >> 9; + // extract remaining parameters + int top = data[0] & 0xff; + int bank = m_bank[(data[1] >> 12) & 0x7]; + int xpos = data[1] & 0x1ff; + int colpri = ((data[2] >> 8) & 0xff) << 4; + int pitch = INT16(data[2] << 9) >> 9; UINT16 addr = data[3]; int hzoom = ((data[4] >> 8) & 0x3f) << 1; int vzoom = (data[4] >> 0) & 0x3f; - int x, y, pix, zaddr, zmask; - const UINT32 *spritedata; - /* initialize the end address to the start address */ + // initialize the end address to the start address data[7] = addr; - /* if hidden, or top greater than/equal to bottom, or invalid bank, punt */ - if ((top >= bottom) || bank == 255) + // if hidden, or top greater than/equal to bottom, or invalid bank, punt + if (top >= bottom || bank == 255) continue; - /* clamp to within the memory region size */ + // clamp to within the memory region size if (numbanks) bank %= numbanks; - spritedata = spritebase + 0x8000 * bank; - - /* determine the starting zoom address and mask */ - zaddr = (vzoom & 0x38) << 5; - zmask = 1 << (vzoom & 7); - - /* loop from top to bottom */ - for (y = top; y < bottom; y++) + const UINT32 *spritedata = spritebase + 0x8000 * bank; + + // determine the starting zoom address and mask + int zaddr = (vzoom & 0x38) << 5; + int zmask = 1 << (vzoom & 7); + + // loop from top to bottom + int minx = xpos; + int maxx = xpos; + int miny = -1; + int maxy = -1; + for (int y = top; y < bottom; y++) { - /* advance a row */ + // advance a row addr += pitch; - /* if the zoom bit says so, add pitch a second time */ + // if the zoom bit says so, add pitch a second time if (zoom[zaddr++] & zmask) addr += pitch; - /* skip drawing if not within the cliprect */ + // skip drawing if not within the cliprect if (y >= cliprect.min_y && y <= cliprect.max_y) { - UINT16 *dest = &bitmap.pix16(y); - UINT8 *pri = &machine.priority_bitmap.pix8(y); + UINT16 *dest = &bitmap.pix(y); int xacc = 0x00; + int x; - /* note that the System 16A sprites have a design flaw that allows the address */ - /* to carry into the flip flag, which is the topmost bit -- it is very important */ - /* to emulate this as the games compensate for it */ + // note that the System 16A sprites have a design flaw that allows the address + // to carry into the flip flag, which is the topmost bit -- it is very important + // to emulate this as the games compensate for it - /* non-flipped case */ + // non-flipped case if (!(addr & 0x8000)) { - /* start at the word before because we preincrement below */ + // start at the word before because we preincrement below data[7] = addr - 1; for (x = xpos; x <= cliprect.max_x; ) { UINT32 pixels = spritedata[++data[7] & 0x7fff]; - /* draw 8 pixels */ - pix = (pixels >> 28) & 0xf; xacc = (xacc & 0xff) + hzoom; if (xacc < 0x100) { if (x >= cliprect.min_x) sharrier_draw_pixel(); x++; } - pix = (pixels >> 24) & 0xf; xacc = (xacc & 0xff) + hzoom; if (xacc < 0x100) { if (x >= cliprect.min_x) sharrier_draw_pixel(); x++; } - pix = (pixels >> 20) & 0xf; xacc = (xacc & 0xff) + hzoom; if (xacc < 0x100) { if (x >= cliprect.min_x) sharrier_draw_pixel(); x++; } - pix = (pixels >> 16) & 0xf; xacc = (xacc & 0xff) + hzoom; if (xacc < 0x100) { if (x >= cliprect.min_x) sharrier_draw_pixel(); x++; } - pix = (pixels >> 12) & 0xf; xacc = (xacc & 0xff) + hzoom; if (xacc < 0x100) { if (x >= cliprect.min_x) sharrier_draw_pixel(); x++; } - pix = (pixels >> 8) & 0xf; xacc = (xacc & 0xff) + hzoom; if (xacc < 0x100) { if (x >= cliprect.min_x) sharrier_draw_pixel(); x++; } - pix = (pixels >> 4) & 0xf; xacc = (xacc & 0xff) + hzoom; if (xacc < 0x100) { if (x >= cliprect.min_x) sharrier_draw_pixel(); x++; } - pix = (pixels >> 0) & 0xf; xacc = (xacc & 0xff) + hzoom; if (xacc < 0x100) { if (x >= cliprect.min_x) sharrier_draw_pixel(); x++; } - - /* stop if the last pixel in the group was 0xf */ + // draw 8 pixels + int pix; + pix = (pixels >> 28) & 0xf; xacc = (xacc & 0xff) + hzoom; if (xacc < 0x100) { if (x >= cliprect.min_x && pix != 0 && pix != 15) dest[x] = colpri | pix; x++; } + pix = (pixels >> 24) & 0xf; xacc = (xacc & 0xff) + hzoom; if (xacc < 0x100) { if (x >= cliprect.min_x && pix != 0 && pix != 15) dest[x] = colpri | pix; x++; } + pix = (pixels >> 20) & 0xf; xacc = (xacc & 0xff) + hzoom; if (xacc < 0x100) { if (x >= cliprect.min_x && pix != 0 && pix != 15) dest[x] = colpri | pix; x++; } + pix = (pixels >> 16) & 0xf; xacc = (xacc & 0xff) + hzoom; if (xacc < 0x100) { if (x >= cliprect.min_x && pix != 0 && pix != 15) dest[x] = colpri | pix; x++; } + pix = (pixels >> 12) & 0xf; xacc = (xacc & 0xff) + hzoom; if (xacc < 0x100) { if (x >= cliprect.min_x && pix != 0 && pix != 15) dest[x] = colpri | pix; x++; } + pix = (pixels >> 8) & 0xf; xacc = (xacc & 0xff) + hzoom; if (xacc < 0x100) { if (x >= cliprect.min_x && pix != 0 && pix != 15) dest[x] = colpri | pix; x++; } + pix = (pixels >> 4) & 0xf; xacc = (xacc & 0xff) + hzoom; if (xacc < 0x100) { if (x >= cliprect.min_x && pix != 0 && pix != 15) dest[x] = colpri | pix; x++; } + pix = (pixels >> 0) & 0xf; xacc = (xacc & 0xff) + hzoom; if (xacc < 0x100) { if (x >= cliprect.min_x && pix != 0 && pix != 15) dest[x] = colpri | pix; x++; } + + // stop if the last pixel in the group was 0xf if (pix == 15) break; } } - /* flipped case */ + // flipped case else { - /* start at the word after because we predecrement below */ + // start at the word after because we predecrement below data[7] = addr + 1; for (x = xpos; x <= cliprect.max_x; ) { UINT32 pixels = spritedata[--data[7] & 0x7fff]; - /* draw 8 pixels */ - pix = (pixels >> 0) & 0xf; xacc = (xacc & 0xff) + hzoom; if (xacc < 0x100) { if (x >= cliprect.min_x) sharrier_draw_pixel(); x++; } - pix = (pixels >> 4) & 0xf; xacc = (xacc & 0xff) + hzoom; if (xacc < 0x100) { if (x >= cliprect.min_x) sharrier_draw_pixel(); x++; } - pix = (pixels >> 8) & 0xf; xacc = (xacc & 0xff) + hzoom; if (xacc < 0x100) { if (x >= cliprect.min_x) sharrier_draw_pixel(); x++; } - pix = (pixels >> 12) & 0xf; xacc = (xacc & 0xff) + hzoom; if (xacc < 0x100) { if (x >= cliprect.min_x) sharrier_draw_pixel(); x++; } - pix = (pixels >> 16) & 0xf; xacc = (xacc & 0xff) + hzoom; if (xacc < 0x100) { if (x >= cliprect.min_x) sharrier_draw_pixel(); x++; } - pix = (pixels >> 20) & 0xf; xacc = (xacc & 0xff) + hzoom; if (xacc < 0x100) { if (x >= cliprect.min_x) sharrier_draw_pixel(); x++; } - pix = (pixels >> 24) & 0xf; xacc = (xacc & 0xff) + hzoom; if (xacc < 0x100) { if (x >= cliprect.min_x) sharrier_draw_pixel(); x++; } - pix = (pixels >> 28) & 0xf; xacc = (xacc & 0xff) + hzoom; if (xacc < 0x100) { if (x >= cliprect.min_x) sharrier_draw_pixel(); x++; } - - /* stop if the last pixel in the group was 0xf */ + // draw 8 pixels + int pix; + pix = (pixels >> 0) & 0xf; xacc = (xacc & 0xff) + hzoom; if (xacc < 0x100) { if (x >= cliprect.min_x && pix != 0 && pix != 15) dest[x] = colpri | pix; x++; } + pix = (pixels >> 4) & 0xf; xacc = (xacc & 0xff) + hzoom; if (xacc < 0x100) { if (x >= cliprect.min_x && pix != 0 && pix != 15) dest[x] = colpri | pix; x++; } + pix = (pixels >> 8) & 0xf; xacc = (xacc & 0xff) + hzoom; if (xacc < 0x100) { if (x >= cliprect.min_x && pix != 0 && pix != 15) dest[x] = colpri | pix; x++; } + pix = (pixels >> 12) & 0xf; xacc = (xacc & 0xff) + hzoom; if (xacc < 0x100) { if (x >= cliprect.min_x && pix != 0 && pix != 15) dest[x] = colpri | pix; x++; } + pix = (pixels >> 16) & 0xf; xacc = (xacc & 0xff) + hzoom; if (xacc < 0x100) { if (x >= cliprect.min_x && pix != 0 && pix != 15) dest[x] = colpri | pix; x++; } + pix = (pixels >> 20) & 0xf; xacc = (xacc & 0xff) + hzoom; if (xacc < 0x100) { if (x >= cliprect.min_x && pix != 0 && pix != 15) dest[x] = colpri | pix; x++; } + pix = (pixels >> 24) & 0xf; xacc = (xacc & 0xff) + hzoom; if (xacc < 0x100) { if (x >= cliprect.min_x && pix != 0 && pix != 15) dest[x] = colpri | pix; x++; } + pix = (pixels >> 28) & 0xf; xacc = (xacc & 0xff) + hzoom; if (xacc < 0x100) { if (x >= cliprect.min_x && pix != 0 && pix != 15) dest[x] = colpri | pix; x++; } + + // stop if the last pixel in the group was 0xf if (pix == 15) break; } } + + // update bounds + if (x > maxx) maxx = x; + if (miny == -1) miny = y; + maxy = y; } } + + // mark dirty + if (miny != -1) + mark_dirty(minx, maxx, miny, maxy); } } -/******************************************************************************************* - * - * System 16A-style sprites - * - * Offs Bits Usage - * +0 bbbbbbbb -------- Bottom scanline of sprite - 1 - * +0 -------- tttttttt Top scanline of sprite - 1 - * +2 -------x xxxxxxxx X position of sprite (position $BD is screen position 0) - * +4 pppppppp pppppppp Signed 16-bit pitch value between scanlines - * +6 -ooooooo oooooooo Offset within selected sprite bank - * +6 f------- -------- Horizontal flip: read the data backwards if set - * +8 --cccccc -------- Sprite color palette - * +8 -------- -bbb---- Sprite bank - * +8 -------- ------pp Sprite priority - * +E dddddddd dddddddd Scratch space for current address - * - * Special notes: - * - * There is an interaction between the horizonal flip bit and the offset. - * The offset is maintained as a 16-bit value, even though only the lower - * 15 bits are used for the address. The top bit is used to control flipping. - * This means that if the low 15 bits overflow during rendering, the sprite - * data will be read backwards after the overflow. This is important to - * emulate correctly as many games make use of this feature to render sprites - * at the beginning of a bank. - * - *******************************************************************************************/ - -#define system16a_draw_pixel() \ - /* only draw if onscreen, not 0 or 15 */ \ - if (x >= cliprect.min_x && x <= cliprect.max_x && pix != 0 && pix != 15) \ - { \ - /* are we high enough priority to be visible? */ \ - if (sprpri > pri[x]) \ - { \ - /* shadow/hilight mode? */ \ - if (color == sega16sp->colorbase + (0x3f << 4)) \ - dest[x] += (segaic16_paletteram[dest[x]] & 0x8000) ? segaic16_palette.entries*2 : segaic16_palette.entries; \ - \ - /* regular draw */ \ - else \ - dest[x] = pix | color; \ - } \ - \ - /* always mark priority so no one else draws here */ \ - pri[x] = 0xff; \ - } \ - -void segaic16_sprites_16a_draw(running_machine &machine, device_t *device, bitmap_ind16 &bitmap, const rectangle &cliprect) +//**************************************************************************** +// SYSTEM 16A-STYLE SPRITES +//**************************************************************************** + +//------------------------------------------------- +// sega_sys16a_sprite_device -- constructor +//------------------------------------------------- + +sega_sys16a_sprite_device::sega_sys16a_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : sega_16bit_sprite_device(mconfig, SEGA_SYS16A_SPRITES, "Sega System 16A Sprites", tag, owner) { - UINT8 numbanks = machine.root_device().memregion("gfx2")->bytes() / 0x10000; - const UINT16 *spritebase = (const UINT16 *)machine.root_device().memregion("gfx2")->base(); - sega16sp_state *sega16sp = get_safe_token(device); - UINT16* data = sega16sp->spriteram; - - /* first scan forward to find the end of the list */ - for (data = sega16sp->spriteram; data < sega16sp->spriteram + sega16sp->ramsize/2; data += 8) - if ((data[0] >> 8) > 0xf0) - break; + set_origin(189, -1); +} - /* now scan backwards and render the sprites in order */ - for (data -= 8; data >= sega16sp->spriteram; data -= 8) + +//------------------------------------------------- +// draw -- render the sprites within the cliprect +//------------------------------------------------- + +void sega_sys16a_sprite_device::draw(bitmap_ind16 &bitmap, const rectangle &cliprect) +{ + // + // System 16A-style sprites + // + // Offs Bits Usage + // +0 bbbbbbbb -------- Bottom scanline of sprite - 1 + // +0 -------- tttttttt Top scanline of sprite - 1 + // +2 -------x xxxxxxxx X position of sprite (position $BD is screen position 0) + // +4 pppppppp pppppppp Signed 16-bit pitch value between scanlines + // +6 -ooooooo oooooooo Offset within selected sprite bank + // +6 f------- -------- Horizontal flip: read the data backwards if set + // +8 --cccccc -------- Sprite color palette + // +8 -------- -bbb---- Sprite bank + // +8 -------- ------pp Sprite priority + // +E dddddddd dddddddd Scratch space for current address + // + // Final bitmap format: + // + // ----pp-- -------- Sprite priority + // ------cc cccc---- Sprite color palette + // -------- ----llll 4-bit pixel data + // + // Special notes: + // + // There is an interaction between the horizonal flip bit and the offset. + // The offset is maintained as a 16-bit value, even though only the lower + // 15 bits are used for the address. The top bit is used to control flipping. + // This means that if the low 15 bits overflow during rendering, the sprite + // data will be read backwards after the overflow. This is important to + // emulate correctly as many games make use of this feature to render sprites + // at the beginning of a bank. + // + + // render the sprites in order + const UINT16 *spritebase = reinterpret_cast<const UINT16 *>(region()->base()); + UINT8 numbanks = region()->bytes() / 0x10000; + UINT16 *ramend = spriteram() + spriteram_elements(); + for (UINT16 *data = spriteram(); data < ramend; data += 8) { - int bottom = (data[0] >> 8) + 1; - int top = (data[0] & 0xff) + 1; - int xpos = (data[1] & 0x1ff) - 0xbd; - int pitch = (INT16)data[2]; + // fetch the bottom; stop when we get something out of range + int bottom = data[0] >> 8; + if (bottom > 0xf0) + break; + + // extract remaining parameters + int top = data[0] & 0xff; + int xpos = data[1] & 0x1ff; + int pitch = INT16(data[2]); UINT16 addr = data[3]; - int color = sega16sp->colorbase + (((data[4] >> 8) & 0x3f) << 4); - int bank = sega16sp->bank[(data[4] >> 4) & 0x7]; - int sprpri = 1 << ((data[4] >> 0) & 0x3); - const UINT16 *spritedata; - int x, y, pix, xdelta = 1; + int colpri = (((data[4] >> 8) & 0x3f) << 4) | (((data[4] >> 0) & 0x3) << 10); + int bank = m_bank[(data[4] >> 4) & 0x7]; - /* initialize the end address to the start address */ + // initialize the end address to the start address data[7] = addr; - /* if hidden, or top greater than/equal to bottom, or invalid bank, punt */ - if ((top >= bottom) || bank == 255) + // if hidden, or top greater than/equal to bottom, or invalid bank, punt + if (top >= bottom || bank == 255) continue; - /* clamp to within the memory region size */ + // clamp to within the memory region size if (numbanks) bank %= numbanks; - spritedata = spritebase + 0x8000 * bank; + const UINT16 *spritedata = spritebase + 0x8000 * bank; - /* adjust positions for screen flipping */ - if (sega16sp->flip) + // adjust positions for screen flipping + int xdelta = 1; + if (m_flip) { int temp = top; top = 224 - bottom; @@ -460,179 +573,180 @@ void segaic16_sprites_16a_draw(running_machine &machine, device_t *device, bitma xdelta = -1; } - /* loop from top to bottom */ - for (y = top; y < bottom; y++) + // loop from top to bottom + int minx = xpos; + int maxx = xpos; + int miny = -1; + int maxy = -1; + for (int y = top; y < bottom; y++) { - /* advance a row */ + // advance a row addr += pitch; - /* skip drawing if not within the cliprect */ + // skip drawing if not within the cliprect if (y >= cliprect.min_y && y <= cliprect.max_y) { - UINT16 *dest = &bitmap.pix16(y); - UINT8 *pri = &machine.priority_bitmap.pix8(y); + UINT16 *dest = &bitmap.pix(y); + int x; - /* note that the System 16A sprites have a design flaw that allows the address */ - /* to carry into the flip flag, which is the topmost bit -- it is very important */ - /* to emulate this as the games compensate for it */ + // note that the System 16A sprites have a design flaw that allows the address + // to carry into the flip flag, which is the topmost bit -- it is very important + // to emulate this as the games compensate for it - /* non-flipped case */ + // non-flipped case if (!(addr & 0x8000)) { - /* start at the word before because we preincrement below */ + // start at the word before because we preincrement below data[7] = addr - 1; for (x = xpos; ((xpos - x) & 0x1ff) != 1; ) { UINT16 pixels = spritedata[++data[7] & 0x7fff]; - /* draw four pixels */ - pix = (pixels >> 12) & 0xf; system16a_draw_pixel(); x += xdelta; - pix = (pixels >> 8) & 0xf; system16a_draw_pixel(); x += xdelta; - pix = (pixels >> 4) & 0xf; system16a_draw_pixel(); x += xdelta; - pix = (pixels >> 0) & 0xf; system16a_draw_pixel(); x += xdelta; + // draw four pixels + int pix; + pix = (pixels >> 12) & 0xf; if (x >= cliprect.min_x && x <= cliprect.max_x && pix != 0 && pix != 15) dest[x] = colpri | pix; x += xdelta; + pix = (pixels >> 8) & 0xf; if (x >= cliprect.min_x && x <= cliprect.max_x && pix != 0 && pix != 15) dest[x] = colpri | pix; x += xdelta; + pix = (pixels >> 4) & 0xf; if (x >= cliprect.min_x && x <= cliprect.max_x && pix != 0 && pix != 15) dest[x] = colpri | pix; x += xdelta; + pix = (pixels >> 0) & 0xf; if (x >= cliprect.min_x && x <= cliprect.max_x && pix != 0 && pix != 15) dest[x] = colpri | pix; x += xdelta; - /* stop if the last pixel in the group was 0xf */ + // stop if the last pixel in the group was 0xf if (pix == 15) break; } } - /* flipped case */ + // flipped case else { - /* start at the word after because we predecrement below */ + // start at the word after because we predecrement below data[7] = addr + 1; for (x = xpos; ((xpos - x) & 0x1ff) != 1; ) { UINT16 pixels = spritedata[--data[7] & 0x7fff]; - /* draw four pixels */ - pix = (pixels >> 0) & 0xf; system16a_draw_pixel(); x += xdelta; - pix = (pixels >> 4) & 0xf; system16a_draw_pixel(); x += xdelta; - pix = (pixels >> 8) & 0xf; system16a_draw_pixel(); x += xdelta; - pix = (pixels >> 12) & 0xf; system16a_draw_pixel(); x += xdelta; + // draw four pixels + int pix; + pix = (pixels >> 0) & 0xf; if (x >= cliprect.min_x && x <= cliprect.max_x && pix != 0 && pix != 15) dest[x] = colpri | pix; x += xdelta; + pix = (pixels >> 4) & 0xf; if (x >= cliprect.min_x && x <= cliprect.max_x && pix != 0 && pix != 15) dest[x] = colpri | pix; x += xdelta; + pix = (pixels >> 8) & 0xf; if (x >= cliprect.min_x && x <= cliprect.max_x && pix != 0 && pix != 15) dest[x] = colpri | pix; x += xdelta; + pix = (pixels >> 12) & 0xf; if (x >= cliprect.min_x && x <= cliprect.max_x && pix != 0 && pix != 15) dest[x] = colpri | pix; x += xdelta; - /* stop if the last pixel in the group was 0xf */ + // stop if the last pixel in the group was 0xf if (pix == 15) break; } } + + // update bounds + if (x > maxx) maxx = x; + if (x < minx) minx = x; + if (miny == -1) miny = y; + maxy = y; } } + + // mark dirty + if (miny != -1) + mark_dirty(minx, maxx, miny, maxy); } } +//**************************************************************************** +// BOOTLEG SYSTEM 16A-STYLE SPRITES +//**************************************************************************** -/******************************************************************************************* - * - * System 16B-style sprites - * - * Offs Bits Usage - * +0 bbbbbbbb -------- Bottom scanline of sprite - 1 - * +0 -------- tttttttt Top scanline of sprite - 1 - * +2 -------x xxxxxxxx X position of sprite (position $BD is screen position 0) - * +4 e------- -------- Signify end of sprite list - * +4 -h------ -------- Hide this sprite - * +4 -------f -------- Horizontal flip: read the data backwards if set - * +4 -------- pppppppp Signed 8-bit pitch value between scanlines - * +6 oooooooo oooooooo Offset within selected sprite bank - * +8 ----bbbb -------- Sprite bank - * +8 -------- pp------ Sprite priority, relative to tilemaps - * +8 -------- --cccccc Sprite color palette - * +A ------vv vvv----- Vertical zoom factor (0 = full size, 0x10 = half size) - * +A -------- ---hhhhh Horizontal zoom factor (0 = full size, 0x10 = half size) - * +E dddddddd dddddddd Scratch space for current address - * - * Note that the zooming described below is 100% accurate to the real board. - * - *******************************************************************************************/ - -#define system16b_draw_pixel() \ - /* only draw if onscreen, not 0 or 15 */ \ - if (x >= cliprect.min_x && x <= cliprect.max_x && pix != 0 && pix != 15) \ - { \ - /* are we high enough priority to be visible? */ \ - if (sprpri > pri[x]) \ - { \ - /* shadow/hilight mode? */ \ - if (color == sega16sp->colorbase + (0x3f << 4)) \ - { \ - /* we have to check this for System 18 so that we don't */ \ - /* attempt to shadow VDP pixels */ \ - if (dest[x] < segaic16_palette.entries) \ - dest[x] += (segaic16_paletteram[dest[x]] & 0x8000) ? segaic16_palette.entries*2 : segaic16_palette.entries; \ - } \ - \ - /* regular draw */ \ - else \ - dest[x] = pix | color; \ - } \ - \ - /* always mark priority so no one else draws here */ \ - pri[x] = 0xff; \ - } \ - -void segaic16_sprites_16b_draw(running_machine &machine, device_t *device, bitmap_ind16 &bitmap, const rectangle &cliprect) +//------------------------------------------------- +// bootleg_sys16a_sprite_device -- constructor +//------------------------------------------------- + +bootleg_sys16a_sprite_device::bootleg_sys16a_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : sega_16bit_sprite_device(mconfig, BOOTLEG_SYS16A_SPRITES, "Bootleg System 16A Sprites", tag, owner) { - UINT8 numbanks; - const UINT16 *spritebase; - sega16sp_state *sega16sp = get_safe_token(device); - UINT16* data = sega16sp->spriteram; + m_addrmap[0] = 0; + m_addrmap[1] = 1; + m_addrmap[2] = 2; + m_addrmap[3] = 3; + m_addrmap[4] = 4; + m_addrmap[5] = 5; + m_addrmap[6] = 6; + m_addrmap[7] = 7; + set_origin(189, -1); +} - spritebase = (const UINT16 *)machine.root_device().memregion("gfx2")->base(); - if (!spritebase) - return; - numbanks = machine.root_device().memregion("gfx2")->bytes() / 0x20000; +//------------------------------------------------- +// static_set_remap -- configure sprite address +// remapping +//------------------------------------------------- - /* first scan forward to find the end of the list */ - for (data = sega16sp->spriteram; data < sega16sp->spriteram + sega16sp->ramsize/2; data += 8) - if (data[2] & 0x8000) - break; +void bootleg_sys16a_sprite_device::static_set_remap(device_t &device, UINT8 offs0, UINT8 offs1, UINT8 offs2, UINT8 offs3, UINT8 offs4, UINT8 offs5, UINT8 offs6, UINT8 offs7) +{ + bootleg_sys16a_sprite_device &target = downcast<bootleg_sys16a_sprite_device &>(device); + target.m_addrmap[0] = offs0; + target.m_addrmap[1] = offs1; + target.m_addrmap[2] = offs2; + target.m_addrmap[3] = offs3; + target.m_addrmap[4] = offs4; + target.m_addrmap[5] = offs5; + target.m_addrmap[6] = offs6; + target.m_addrmap[7] = offs7; +} - /* now scan backwards and render the sprites in order */ - for (data -= 8; data >= sega16sp->spriteram; data -= 8) - { - int bottom = data[0] >> 8; - int top = data[0] & 0xff; - int xpos = (data[1] & 0x1ff); - int hide = data[2] & 0x4000; - int flip = data[2] & 0x100; - int pitch = (INT8)(data[2] & 0xff); - UINT16 addr = data[3]; - int bank = sega16sp->bank[(data[4] >> 8) & 0xf]; - int sprpri = 1 << ((data[4] >> 6) & 0x3); - int color = sega16sp->colorbase + ((data[4] & 0x3f) << 4); - int vzoom = (data[5] >> 5) & 0x1f; - int hzoom = data[5] & 0x1f; - const UINT16 *spritedata; - int x, y, pix, xdelta = 1; - /* some bootlegs have offset sprites */ - xpos += sega16sp->xoffs; - xpos &= 0x1ff; +//------------------------------------------------- +// draw -- render the sprites within the cliprect +//------------------------------------------------- - /* originals all have this offset */ - xpos -= 0xb8; +void bootleg_sys16a_sprite_device::draw(bitmap_ind16 &bitmap, const rectangle &cliprect) +{ + // + // Bootleg System 16A-style sprites + // + // These are identical to regular System 16A sprites (see above), with two exceptions: + // + // 1. Addresses within each sprite entry are generally shuffled relative + // to the original, and + // + // 2. The pitch increment happens at the end, not at the beginning of + // the loop. + // + + // render the sprites in order + const UINT16 *spritebase = reinterpret_cast<const UINT16 *>(region()->base()); + UINT8 numbanks = region()->bytes() / 0x10000; + UINT16 *ramend = spriteram() + spriteram_elements(); + for (UINT16 *data = spriteram(); data < ramend; data += 8) + { + // fetch the bottom; stop when we get something out of range + int bottom = data[m_addrmap[0]] >> 8; + if (bottom > 0xf0) + break; - /* initialize the end address to the start address */ - data[7] = addr; + // extract remaining parameters + int top = data[m_addrmap[0]] & 0xff; + int xpos = data[m_addrmap[1]] & 0x1ff; + int pitch = INT16(data[m_addrmap[2]]); + UINT16 addr = data[m_addrmap[3]]; + int colpri = (((data[m_addrmap[4]] >> 8) & 0x3f) << 4) | (((data[m_addrmap[4]] >> 0) & 0x3) << 10); + int bank = m_bank[(data[m_addrmap[4]] >> 4) & 0x7]; - /* if hidden, or top greater than/equal to bottom, or invalid bank, punt */ - if (hide || (top >= bottom) || bank == 255) + // initialize the end address to the start address + UINT16 &data7 = data[m_addrmap[7]]; + data7 = addr; + + // if hidden, or top greater than/equal to bottom, or invalid bank, punt + if (top >= bottom || bank == 255) continue; - /* clamp to within the memory region size */ + // clamp to within the memory region size if (numbanks) bank %= numbanks; - spritedata = spritebase + 0x10000 * bank; - - /* reset the yzoom counter */ - data[5] &= 0x03ff; + const UINT16 *spritedata = spritebase + 0x8000 * bank; - /* adjust positions for screen flipping */ - if (sega16sp->flip) + // adjust positions for screen flipping + int xdelta = 1; + if (m_flip) { int temp = top; top = 224 - bottom; @@ -641,151 +755,181 @@ void segaic16_sprites_16b_draw(running_machine &machine, device_t *device, bitma xdelta = -1; } - /* loop from top to bottom */ - for (y = top; y < bottom; y++) + // loop from top to bottom + int minx = xpos; + int maxx = xpos; + int miny = -1; + int maxy = -1; + for (int y = top; y < bottom; y++) { - /* advance a row */ - addr += pitch; - - /* accumulate zoom factors; if we carry into the high bit, skip an extra row */ - data[5] += vzoom << 10; - if (data[5] & 0x8000) - { - addr += pitch; - data[5] &= ~0x8000; - } - - /* skip drawing if not within the cliprect */ + // skip drawing if not within the cliprect if (y >= cliprect.min_y && y <= cliprect.max_y) { - UINT16 *dest = &bitmap.pix16(y); - UINT8 *pri = &machine.priority_bitmap.pix8(y); - int xacc; + UINT16 *dest = &bitmap.pix(y); + int x; - /* compute the initial X zoom accumulator; this is verified on the real PCB */ - xacc = 4 * hzoom; + // note that the System 16A sprites have a design flaw that allows the address + // to carry into the flip flag, which is the topmost bit -- it is very important + // to emulate this as the games compensate for it - /* non-flipped case */ - if (!flip) + // non-flipped case + if (!(addr & 0x8000)) { - /* start at the word before because we preincrement below */ - data[7] = addr - 1; + // start at the word before because we preincrement below + data7 = addr - 1; for (x = xpos; ((xpos - x) & 0x1ff) != 1; ) { - UINT16 pixels = spritedata[++data[7]]; + UINT16 pixels = spritedata[++data7 & 0x7fff]; - /* draw four pixels */ - pix = (pixels >> 12) & 0xf; xacc = (xacc & 0x3f) + hzoom; if (xacc < 0x40) { system16b_draw_pixel(); x += xdelta; } - pix = (pixels >> 8) & 0xf; xacc = (xacc & 0x3f) + hzoom; if (xacc < 0x40) { system16b_draw_pixel(); x += xdelta; } - pix = (pixels >> 4) & 0xf; xacc = (xacc & 0x3f) + hzoom; if (xacc < 0x40) { system16b_draw_pixel(); x += xdelta; } - pix = (pixels >> 0) & 0xf; xacc = (xacc & 0x3f) + hzoom; if (xacc < 0x40) { system16b_draw_pixel(); x += xdelta; } + // draw four pixels + int pix; + pix = (pixels >> 12) & 0xf; if (x >= cliprect.min_x && x <= cliprect.max_x && pix != 0 && pix != 15) dest[x] = colpri | pix; x += xdelta; + pix = (pixels >> 8) & 0xf; if (x >= cliprect.min_x && x <= cliprect.max_x && pix != 0 && pix != 15) dest[x] = colpri | pix; x += xdelta; + pix = (pixels >> 4) & 0xf; if (x >= cliprect.min_x && x <= cliprect.max_x && pix != 0 && pix != 15) dest[x] = colpri | pix; x += xdelta; + pix = (pixels >> 0) & 0xf; if (x >= cliprect.min_x && x <= cliprect.max_x && pix != 0 && pix != 15) dest[x] = colpri | pix; x += xdelta; - /* stop if the last pixel in the group was 0xf */ + // stop if the last pixel in the group was 0xf if (pix == 15) break; } } - /* flipped case */ + // flipped case else { - /* start at the word after because we predecrement below */ - data[7] = addr + 1; + // start at the word after because we predecrement below + data7 = addr + 1; for (x = xpos; ((xpos - x) & 0x1ff) != 1; ) { - UINT16 pixels = spritedata[--data[7]]; + UINT16 pixels = spritedata[--data7 & 0x7fff]; - /* draw four pixels */ - pix = (pixels >> 0) & 0xf; xacc = (xacc & 0x3f) + hzoom; if (xacc < 0x40) { system16b_draw_pixel(); x += xdelta; } - pix = (pixels >> 4) & 0xf; xacc = (xacc & 0x3f) + hzoom; if (xacc < 0x40) { system16b_draw_pixel(); x += xdelta; } - pix = (pixels >> 8) & 0xf; xacc = (xacc & 0x3f) + hzoom; if (xacc < 0x40) { system16b_draw_pixel(); x += xdelta; } - pix = (pixels >> 12) & 0xf; xacc = (xacc & 0x3f) + hzoom; if (xacc < 0x40) { system16b_draw_pixel(); x += xdelta; } + // draw four pixels + int pix; + pix = (pixels >> 0) & 0xf; if (x >= cliprect.min_x && x <= cliprect.max_x && pix != 0 && pix != 15) dest[x] = colpri | pix; x += xdelta; + pix = (pixels >> 4) & 0xf; if (x >= cliprect.min_x && x <= cliprect.max_x && pix != 0 && pix != 15) dest[x] = colpri | pix; x += xdelta; + pix = (pixels >> 8) & 0xf; if (x >= cliprect.min_x && x <= cliprect.max_x && pix != 0 && pix != 15) dest[x] = colpri | pix; x += xdelta; + pix = (pixels >> 12) & 0xf; if (x >= cliprect.min_x && x <= cliprect.max_x && pix != 0 && pix != 15) dest[x] = colpri | pix; x += xdelta; - /* stop if the last pixel in the group was 0xf */ + // stop if the last pixel in the group was 0xf if (pix == 15) break; } } + + // update bounds + if (x > maxx) maxx = x; + if (x < minx) minx = x; + if (miny == -1) miny = y; + maxy = y; } + + // advance a row - must be done at the end on the bootlegs! + addr += pitch; } + + // mark dirty + if (miny != -1) + mark_dirty(minx, maxx, miny, maxy); } } -/******************************************************************************************* - * - * The Y-board variant has different mixing properties. The sprite implementation itself - * is identical, however. - * - *******************************************************************************************/ - -#define yboard_16b_draw_pixel() \ - /* only draw if onscreen, not 0 or 15 */ \ - if (x >= cliprect.min_x && x <= cliprect.max_x && pix != 0 && pix != 15) \ - { \ - /* are we high enough priority to be visible? */ \ - if ((sprpri & 0x1f) < (pri[x] & 0x1f)) \ - { \ - /* shadow/hilight mode? */ \ - if (pix == 14) \ - dest[x] += (segaic16_paletteram[dest[x]] & 0x8000) ? segaic16_palette.entries*2 : segaic16_palette.entries; \ - \ - /* regular draw */ \ - else \ - dest[x] = pix | color; \ - } \ - \ - /* always mark priority so no one else draws here */ \ - pri[x] = 0; \ - } \ - -void segaic16_sprites_yboard_16b_draw(running_machine &machine, device_t *device, bitmap_ind16 &bitmap, const rectangle &cliprect) + +//**************************************************************************** +// SYSTEM 16B-STYLE SPRITES +//**************************************************************************** + +//------------------------------------------------- +// sega_sys16b_sprite_device -- constructor +//------------------------------------------------- + +sega_sys16b_sprite_device::sega_sys16b_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : sega_16bit_sprite_device(mconfig, SEGA_SYS16B_SPRITES, "Sega System 16B Sprites", tag, owner) { - UINT8 numbanks = machine.root_device().memregion("gfx2")->bytes() / 0x20000; - const UINT16 *spritebase = (const UINT16 *)machine.root_device().memregion("gfx2")->base(); - sega16sp_state *sega16sp = get_safe_token(device); - UINT16* data = sega16sp->spriteram; + set_origin(184, 0x00); +} + + +//------------------------------------------------- +// draw -- render the sprites within the cliprect +//------------------------------------------------- - /* first scan forward to find the end of the list */ - for (data = sega16sp->spriteram; data < sega16sp->spriteram + sega16sp->ramsize/2; data += 8) +void sega_sys16b_sprite_device::draw(bitmap_ind16 &bitmap, const rectangle &cliprect) +{ + // + // System 16B-style sprites + // + // Offs Bits Usage + // +0 bbbbbbbb -------- Bottom scanline of sprite - 1 + // +0 -------- tttttttt Top scanline of sprite - 1 + // +2 -------x xxxxxxxx X position of sprite (position $BD is screen position 0) + // +2 ---iiii- -------- Sprite/sprite priority for Y-board + // +4 e------- -------- Signify end of sprite list + // +4 -h------ -------- Hide this sprite + // +4 -------f -------- Horizontal flip: read the data backwards if set + // +4 -------- pppppppp Signed 8-bit pitch value between scanlines + // +6 oooooooo oooooooo Offset within selected sprite bank + // +8 ----bbbb -------- Sprite bank + // +8 -------- pp------ Sprite priority, relative to tilemaps + // +8 -------- --cccccc Sprite color palette + // +A ------vv vvv----- Vertical zoom factor (0 = full size, 0x10 = half size) + // +A -------- ---hhhhh Horizontal zoom factor (0 = full size, 0x10 = half size) + // +E dddddddd dddddddd Scratch space for current address + // + // Final bitmap format: + // + // iiii---- -------- Sprite/sprite priority for Y-board + // ----pp-- -------- Sprite priority + // ------cc cccc---- Sprite color palette + // -------- ----llll 4-bit pixel data + // + // Note that the zooming described below is 100% accurate to the real board. + // + + // render the sprites in order + const UINT16 *spritebase = reinterpret_cast<const UINT16 *>(region()->base()); + UINT8 numbanks = region()->bytes() / 0x20000; + UINT16 *ramend = spriteram() + spriteram_elements(); + for (UINT16 *data = spriteram(); data < ramend; data += 8) + { + // stop when we hit the end of sprite list if (data[2] & 0x8000) break; - /* now scan backwards and render the sprites in order */ - for (data -= 8; data >= sega16sp->spriteram; data -= 8) - { + // extract parameters int bottom = data[0] >> 8; int top = data[0] & 0xff; - int xpos = (data[1] & 0x1ff) - 0xb8; - int sprpri = (data[1] >> 8) & 0x1e; // 0x00 = high, 0x7f = low -- 0x71 = ship in gforce, 0x31 = strike fighter logo + int xpos = data[1] & 0x1ff; int hide = data[2] & 0x4000; int flip = data[2] & 0x100; - int pitch = (INT8)(data[2] & 0xff); + int pitch = INT8(data[2] & 0xff); UINT16 addr = data[3]; - int bank = sega16sp->bank[(data[4] >> 8) & 0xf]; - int color = sega16sp->colorbase + ((data[4] & 0x7f) << 4); + int bank = m_bank[(data[4] >> 8) & 0xf]; + int colpri = ((data[4] & 0xff) << 4) | (((data[1] >> 9) & 0xf) << 12); int vzoom = (data[5] >> 5) & 0x1f; int hzoom = data[5] & 0x1f; const UINT16 *spritedata; - int x, y, pix, xdelta = 1; - /* initialize the end address to the start address */ + xpos &= 0x1ff; + + // initialize the end address to the start address data[7] = addr; - /* if hidden, or top greater than/equal to bottom, or invalid bank, punt */ - if (hide || (top >= bottom) || bank == 255) + // if hidden, or top greater than/equal to bottom, or invalid bank, punt + if (hide || top >= bottom || bank == 255) continue; - /* clamp to within the memory region size */ + // clamp to within the memory region size if (numbanks) bank %= numbanks; spritedata = spritebase + 0x10000 * bank; - /* reset the yzoom counter */ + // reset the yzoom counter data[5] &= 0x03ff; - /* adjust positions for screen flipping */ - if (sega16sp->flip) + // adjust positions for screen flipping + int xdelta = 1; + if (m_flip) { int temp = top; top = 224 - bottom; @@ -794,13 +938,17 @@ void segaic16_sprites_yboard_16b_draw(running_machine &machine, device_t *device xdelta = -1; } - /* loop from top to bottom */ - for (y = top; y < bottom; y++) + // loop from top to bottom + int minx = xpos; + int maxx = xpos; + int miny = -1; + int maxy = -1; + for (int y = top; y < bottom; y++) { - /* advance a row */ + // advance a row addr += pitch; - /* accumulate zoom factors; if we carry into the high bit, skip an extra row */ + // accumulate zoom factors; if we carry into the high bit, skip an extra row data[5] += vzoom << 10; if (data[5] & 0x8000) { @@ -808,891 +956,506 @@ void segaic16_sprites_yboard_16b_draw(running_machine &machine, device_t *device data[5] &= ~0x8000; } - /* skip drawing if not within the cliprect */ + // skip drawing if not within the cliprect if (y >= cliprect.min_y && y <= cliprect.max_y) { - UINT16 *dest = &bitmap.pix16(y); - UINT8 *pri = &machine.priority_bitmap.pix8(y); - int xacc; + UINT16 *dest = &bitmap.pix(y); + int x; - /* compute the initial X zoom accumulator; this is verified on the real PCB */ - xacc = 4 * hzoom; + // compute the initial X zoom accumulator; this is verified on the real PCB + int xacc = 4 * hzoom; - /* non-flipped case */ + // non-flipped case if (!flip) { - /* start at the word before because we preincrement below */ + // start at the word before because we preincrement below data[7] = addr - 1; for (x = xpos; ((xpos - x) & 0x1ff) != 1; ) { UINT16 pixels = spritedata[++data[7]]; - /* draw four pixels */ - pix = (pixels >> 12) & 0xf; xacc = (xacc & 0x3f) + hzoom; if (xacc < 0x40) { yboard_16b_draw_pixel(); x += xdelta; } - pix = (pixels >> 8) & 0xf; xacc = (xacc & 0x3f) + hzoom; if (xacc < 0x40) { yboard_16b_draw_pixel(); x += xdelta; } - pix = (pixels >> 4) & 0xf; xacc = (xacc & 0x3f) + hzoom; if (xacc < 0x40) { yboard_16b_draw_pixel(); x += xdelta; } - pix = (pixels >> 0) & 0xf; xacc = (xacc & 0x3f) + hzoom; if (xacc < 0x40) { yboard_16b_draw_pixel(); x += xdelta; } + // draw four pixels + int pix; + pix = (pixels >> 12) & 0xf; xacc = (xacc & 0x3f) + hzoom; if (xacc < 0x40) { if (x >= cliprect.min_x && x <= cliprect.max_x && pix != 0 && pix != 15) dest[x] = colpri | pix; x += xdelta; } + pix = (pixels >> 8) & 0xf; xacc = (xacc & 0x3f) + hzoom; if (xacc < 0x40) { if (x >= cliprect.min_x && x <= cliprect.max_x && pix != 0 && pix != 15) dest[x] = colpri | pix; x += xdelta; } + pix = (pixels >> 4) & 0xf; xacc = (xacc & 0x3f) + hzoom; if (xacc < 0x40) { if (x >= cliprect.min_x && x <= cliprect.max_x && pix != 0 && pix != 15) dest[x] = colpri | pix; x += xdelta; } + pix = (pixels >> 0) & 0xf; xacc = (xacc & 0x3f) + hzoom; if (xacc < 0x40) { if (x >= cliprect.min_x && x <= cliprect.max_x && pix != 0 && pix != 15) dest[x] = colpri | pix; x += xdelta; } - /* stop if the last pixel in the group was 0xf */ + // stop if the last pixel in the group was 0xf if (pix == 15) break; } } - /* flipped case */ + // flipped case else { - /* start at the word after because we predecrement below */ + // start at the word after because we predecrement below data[7] = addr + 1; for (x = xpos; ((xpos - x) & 0x1ff) != 1; ) { UINT16 pixels = spritedata[--data[7]]; - /* draw four pixels */ - pix = (pixels >> 0) & 0xf; xacc = (xacc & 0x3f) + hzoom; if (xacc < 0x40) { yboard_16b_draw_pixel(); x += xdelta; } - pix = (pixels >> 4) & 0xf; xacc = (xacc & 0x3f) + hzoom; if (xacc < 0x40) { yboard_16b_draw_pixel(); x += xdelta; } - pix = (pixels >> 8) & 0xf; xacc = (xacc & 0x3f) + hzoom; if (xacc < 0x40) { yboard_16b_draw_pixel(); x += xdelta; } - pix = (pixels >> 12) & 0xf; xacc = (xacc & 0x3f) + hzoom; if (xacc < 0x40) { yboard_16b_draw_pixel(); x += xdelta; } + // draw four pixels + int pix; + pix = (pixels >> 0) & 0xf; xacc = (xacc & 0x3f) + hzoom; if (xacc < 0x40) { if (x >= cliprect.min_x && x <= cliprect.max_x && pix != 0 && pix != 15) dest[x] = colpri | pix; x += xdelta; } + pix = (pixels >> 4) & 0xf; xacc = (xacc & 0x3f) + hzoom; if (xacc < 0x40) { if (x >= cliprect.min_x && x <= cliprect.max_x && pix != 0 && pix != 15) dest[x] = colpri | pix; x += xdelta; } + pix = (pixels >> 8) & 0xf; xacc = (xacc & 0x3f) + hzoom; if (xacc < 0x40) { if (x >= cliprect.min_x && x <= cliprect.max_x && pix != 0 && pix != 15) dest[x] = colpri | pix; x += xdelta; } + pix = (pixels >> 12) & 0xf; xacc = (xacc & 0x3f) + hzoom; if (xacc < 0x40) { if (x >= cliprect.min_x && x <= cliprect.max_x && pix != 0 && pix != 15) dest[x] = colpri | pix; x += xdelta; } - /* stop if the last pixel in the group was 0xf */ + // stop if the last pixel in the group was 0xf if (pix == 15) break; } } + + // update bounds + if (x > maxx) maxx = x; + if (x < minx) minx = x; + if (miny == -1) miny = y; + maxy = y; } } + + // mark dirty + if (miny != -1) + mark_dirty(minx, maxx, miny, maxy); } } -/******************************************************************************************* - * - * Out Run/X-Board-style sprites - * - * Offs Bits Usage - * +0 e------- -------- Signify end of sprite list - * +0 -h-h---- -------- Hide this sprite if either bit is set - * +0 ----bbb- -------- Sprite bank - * +0 -------t tttttttt Top scanline of sprite + 256 - * +2 oooooooo oooooooo Offset within selected sprite bank - * +4 ppppppp- -------- Signed 7-bit pitch value between scanlines - * +4 -------x xxxxxxxx X position of sprite (position $BE is screen position 0) - * +6 -s------ -------- Enable shadows - * +6 --pp---- -------- Sprite priority, relative to tilemaps - * +6 ------vv vvvvvvvv Vertical zoom factor (0x200 = full size, 0x100 = half size, 0x300 = 2x size) - * +8 y------- -------- Render from top-to-bottom (1) or bottom-to-top (0) on screen - * +8 -f------ -------- Horizontal flip: read the data backwards if set - * +8 --x----- -------- Render from left-to-right (1) or right-to-left (0) on screen - * +8 ------hh hhhhhhhh Horizontal zoom factor (0x200 = full size, 0x100 = half size, 0x300 = 2x size) - * +E dddddddd dddddddd Scratch space for current address - * - * Out Run only: - * +A hhhhhhhh -------- Height in scanlines - 1 - * +A -------- -ccccccc Sprite color palette - * - * X-Board only: - * +A ----hhhh hhhhhhhh Height in scanlines - 1 - * +C -------- cccccccc Sprite color palette - * - *******************************************************************************************/ - -#define outrun_draw_pixel() \ - /* only draw if onscreen, not 0 or 15 */ \ - if (x >= cliprect.min_x && x <= cliprect.max_x && pix != 0 && pix != 15) \ - { \ - /* are we high enough priority to be visible? */ \ - if (sprpri > pri[x]) \ - { \ - /* shadow/hilight mode? */ \ - if (shadow && pix == 0xa) \ - dest[x] += (segaic16_paletteram[dest[x]] & 0x8000) ? segaic16_palette.entries*2 : segaic16_palette.entries; \ - \ - /* regular draw */ \ - else \ - dest[x] = pix | color; \ - } \ - \ - /* always mark priority so no one else draws here */ \ - pri[x] = 0xff; \ - } \ - -static void segaic16_sprites_xboard_outrun_draw(running_machine &machine, device_t *device, bitmap_ind16 &bitmap, const rectangle &cliprect, int type) +//**************************************************************************** +// OUT RUN/X-BOARD-STYLE SPRITES +//**************************************************************************** + +//------------------------------------------------- +// sega_outrun_sprite_device -- constructor +//------------------------------------------------- + +sega_outrun_sprite_device::sega_outrun_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : sega_16bit_sprite_device(mconfig, SEGA_OUTRUN_SPRITES, "Sega Out Run Sprites", tag, owner), + m_is_xboard(false) +{ + set_origin(190, 0x00); +} + +sega_outrun_sprite_device::sega_outrun_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock, bool xboard_variant) + : sega_16bit_sprite_device(mconfig, SEGA_XBOARD_SPRITES, "Sega X-Board Sprites", tag, owner), + m_is_xboard(true) +{ + set_origin(190, 0x00); +} + + +//------------------------------------------------- +// sega_xboard_sprite_device -- constructor +//------------------------------------------------- + +sega_xboard_sprite_device::sega_xboard_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : sega_outrun_sprite_device(mconfig, tag, owner, clock, true) { - UINT8 numbanks = machine.root_device().memregion("gfx2")->bytes() / 0x40000; - const UINT32 *spritebase = (const UINT32 *)machine.root_device().memregion("gfx2")->base(); - sega16sp_state *sega16sp = get_safe_token(device); - UINT16* data = sega16sp->spriteram; +} + + +//------------------------------------------------- +// draw -- render the sprites within the cliprect +//------------------------------------------------- - /* first scan forward to find the end of the list */ - for (data = sega16sp->buffer; data < sega16sp->buffer + sega16sp->ramsize/2; data += 8) +void sega_outrun_sprite_device::draw(bitmap_ind16 &bitmap, const rectangle &cliprect) +{ + // + // Out Run/X-Board-style sprites + // + // Offs Bits Usage + // +0 e------- -------- Signify end of sprite list + // +0 -h-h---- -------- Hide this sprite if either bit is set + // +0 ----bbb- -------- Sprite bank + // +0 -------t tttttttt Top scanline of sprite + 256 + // +2 oooooooo oooooooo Offset within selected sprite bank + // +4 ppppppp- -------- Signed 7-bit pitch value between scanlines + // +4 -------x xxxxxxxx X position of sprite (position $BE is screen position 0) + // +6 -s------ -------- Enable shadows + // +6 --pp---- -------- Sprite priority, relative to tilemaps + // +6 ------vv vvvvvvvv Vertical zoom factor (0x200 = full size, 0x100 = half size, 0x300 = 2x size) + // +8 y------- -------- Render from top-to-bottom (1) or bottom-to-top (0) on screen + // +8 -f------ -------- Horizontal flip: read the data backwards if set + // +8 --x----- -------- Render from left-to-right (1) or right-to-left (0) on screen + // +8 ------hh hhhhhhhh Horizontal zoom factor (0x200 = full size, 0x100 = half size, 0x300 = 2x size) + // +E dddddddd dddddddd Scratch space for current address + // + // Out Run only: + // +A hhhhhhhh -------- Height in scanlines - 1 + // +A -------- -ccccccc Sprite color palette + // + // X-Board only: + // +A ----hhhh hhhhhhhh Height in scanlines - 1 + // +C -------- cccccccc Sprite color palette + // + // Final bitmap format: + // + // -s------ -------- Shadow control + // --pp---- -------- Sprite priority + // ----cccc cccc---- Sprite color palette + // -------- ----llll 4-bit pixel data + // + + // render the sprites in order + const UINT32 *spritebase = reinterpret_cast<const UINT32 *>(region()->base()); + UINT8 numbanks = region()->bytes() / 0x40000; + UINT16 *ramend = buffer() + spriteram_elements(); + for (UINT16 *data = buffer(); data < ramend; data += 8) + { + // stop when we hit the end of sprite list if (data[0] & 0x8000) break; - /* now scan backwards and render the sprites in order */ - for (data -= 8; data >= sega16sp->buffer; data -= 8) - { + // extract parameters int hide = (data[0] & 0x5000); int bank = (data[0] >> 9) & 7; int top = (data[0] & 0x1ff) - 0x100; UINT16 addr = data[1]; - int pitch = (INT16)((data[2] >> 1) | ((data[4] & 0x1000) << 3)) >> 8; + int pitch = INT16((data[2] >> 1) | ((data[4] & 0x1000) << 3)) >> 8; int xpos = data[2] & 0x1ff; - int shadow = (data[3] >> 14) & 1; - int sprpri = 1 << ((data[3] >> 12) & 3); int vzoom = data[3] & 0x7ff; int ydelta = (data[4] & 0x8000) ? 1 : -1; int flip = (~data[4] >> 14) & 1; int xdelta = (data[4] & 0x2000) ? 1 : -1; int hzoom = data[4] & 0x7ff; - int height = ((type == SEGAIC16_SPRITES_OUTRUN) ? (data[5] >> 8) : (data[5] & 0xfff)) + 1; - int color = sega16sp->colorbase + (((type == SEGAIC16_SPRITES_OUTRUN) ? (data[5] & 0x7f) : (data[6] & 0xff)) << 4); - int x, y, ytarget, yacc = 0, pix; - const UINT32 *spritedata; - - /* adjust X coordinate */ - /* note: the threshhold below is a guess. If it is too high, rachero will draw garbage */ - /* If it is too low, smgp won't draw the bottom part of the road */ + int height = (m_is_xboard ? (data[5] & 0xfff) : (data[5] >> 8)) + 1; + int colpri = ((m_is_xboard ? (data[6] & 0xff) : (data[5] & 0x7f)) << 4) | (((data[3] >> 12) & 7) << 12); + + // adjust X coordinate + // note: the threshhold below is a guess. If it is too high, rachero will draw garbage + // If it is too low, smgp won't draw the bottom part of the road if (xpos < 0x80 && xdelta < 0) xpos += 0x200; - xpos -= 0xbe; - /* initialize the end address to the start address */ + // initialize the end address to the start address data[7] = addr; - /* if hidden, or top greater than/equal to bottom, or invalid bank, punt */ + // if hidden, or top greater than/equal to bottom, or invalid bank, punt if (hide || height == 0) continue; - /* clamp to within the memory region size */ + // clamp to within the memory region size if (numbanks) bank %= numbanks; - spritedata = spritebase + 0x10000 * bank; + const UINT32 *spritedata = spritebase + 0x10000 * bank; - /* clamp to a maximum of 8x (not 100% confirmed) */ + // clamp to a maximum of 8x (not 100% confirmed) if (vzoom < 0x40) vzoom = 0x40; if (hzoom < 0x40) hzoom = 0x40; - /* loop from top to bottom */ - ytarget = top + ydelta * height; - for (y = top; y != ytarget; y += ydelta) + // loop from top to bottom + int minx = xpos; + int maxx = xpos; + int miny = -1; + int maxy = -1; + int yacc = 0; + int ytarget = top + ydelta * height; + for (int y = top; y != ytarget; y += ydelta) { - /* skip drawing if not within the cliprect */ + // skip drawing if not within the cliprect if (y >= cliprect.min_y && y <= cliprect.max_y) { - UINT16 *dest = &bitmap.pix16(y); - UINT8 *pri = &machine.priority_bitmap.pix8(y); + UINT16 *dest = &bitmap.pix(y); int xacc = 0; + int x; - /* non-flipped case */ + // non-flipped case if (!flip) { - /* start at the word before because we preincrement below */ + // start at the word before because we preincrement below data[7] = addr - 1; for (x = xpos; (xdelta > 0 && x <= cliprect.max_x) || (xdelta < 0 && x >= cliprect.min_x); ) { UINT32 pixels = spritedata[++data[7]]; - /* draw four pixels */ - pix = (pixels >> 28) & 0xf; while (xacc < 0x200) { outrun_draw_pixel(); x += xdelta; xacc += hzoom; } xacc -= 0x200; - pix = (pixels >> 24) & 0xf; while (xacc < 0x200) { outrun_draw_pixel(); x += xdelta; xacc += hzoom; } xacc -= 0x200; - pix = (pixels >> 20) & 0xf; while (xacc < 0x200) { outrun_draw_pixel(); x += xdelta; xacc += hzoom; } xacc -= 0x200; - pix = (pixels >> 16) & 0xf; while (xacc < 0x200) { outrun_draw_pixel(); x += xdelta; xacc += hzoom; } xacc -= 0x200; - pix = (pixels >> 12) & 0xf; while (xacc < 0x200) { outrun_draw_pixel(); x += xdelta; xacc += hzoom; } xacc -= 0x200; - pix = (pixels >> 8) & 0xf; while (xacc < 0x200) { outrun_draw_pixel(); x += xdelta; xacc += hzoom; } xacc -= 0x200; - pix = (pixels >> 4) & 0xf; while (xacc < 0x200) { outrun_draw_pixel(); x += xdelta; xacc += hzoom; } xacc -= 0x200; - pix = (pixels >> 0) & 0xf; while (xacc < 0x200) { outrun_draw_pixel(); x += xdelta; xacc += hzoom; } xacc -= 0x200; - - /* stop if the second-to-last pixel in the group was 0xf */ + // draw four pixels + int pix; + pix = (pixels >> 28) & 0xf; while (xacc < 0x200) { if (x >= cliprect.min_x && x <= cliprect.max_x && pix != 0 && pix != 15) dest[x] = colpri | pix; x += xdelta; xacc += hzoom; } xacc -= 0x200; + pix = (pixels >> 24) & 0xf; while (xacc < 0x200) { if (x >= cliprect.min_x && x <= cliprect.max_x && pix != 0 && pix != 15) dest[x] = colpri | pix; x += xdelta; xacc += hzoom; } xacc -= 0x200; + pix = (pixels >> 20) & 0xf; while (xacc < 0x200) { if (x >= cliprect.min_x && x <= cliprect.max_x && pix != 0 && pix != 15) dest[x] = colpri | pix; x += xdelta; xacc += hzoom; } xacc -= 0x200; + pix = (pixels >> 16) & 0xf; while (xacc < 0x200) { if (x >= cliprect.min_x && x <= cliprect.max_x && pix != 0 && pix != 15) dest[x] = colpri | pix; x += xdelta; xacc += hzoom; } xacc -= 0x200; + pix = (pixels >> 12) & 0xf; while (xacc < 0x200) { if (x >= cliprect.min_x && x <= cliprect.max_x && pix != 0 && pix != 15) dest[x] = colpri | pix; x += xdelta; xacc += hzoom; } xacc -= 0x200; + pix = (pixels >> 8) & 0xf; while (xacc < 0x200) { if (x >= cliprect.min_x && x <= cliprect.max_x && pix != 0 && pix != 15) dest[x] = colpri | pix; x += xdelta; xacc += hzoom; } xacc -= 0x200; + pix = (pixels >> 4) & 0xf; while (xacc < 0x200) { if (x >= cliprect.min_x && x <= cliprect.max_x && pix != 0 && pix != 15) dest[x] = colpri | pix; x += xdelta; xacc += hzoom; } xacc -= 0x200; + pix = (pixels >> 0) & 0xf; while (xacc < 0x200) { if (x >= cliprect.min_x && x <= cliprect.max_x && pix != 0 && pix != 15) dest[x] = colpri | pix; x += xdelta; xacc += hzoom; } xacc -= 0x200; + + // stop if the second-to-last pixel in the group was 0xf if ((pixels & 0x000000f0) == 0x000000f0) break; } } - /* flipped case */ + // flipped case else { - /* start at the word after because we predecrement below */ + // start at the word after because we predecrement below data[7] = addr + 1; for (x = xpos; (xdelta > 0 && x <= cliprect.max_x) || (xdelta < 0 && x >= cliprect.min_x); ) { UINT32 pixels = spritedata[--data[7]]; - /* draw four pixels */ - pix = (pixels >> 0) & 0xf; while (xacc < 0x200) { outrun_draw_pixel(); x += xdelta; xacc += hzoom; } xacc -= 0x200; - pix = (pixels >> 4) & 0xf; while (xacc < 0x200) { outrun_draw_pixel(); x += xdelta; xacc += hzoom; } xacc -= 0x200; - pix = (pixels >> 8) & 0xf; while (xacc < 0x200) { outrun_draw_pixel(); x += xdelta; xacc += hzoom; } xacc -= 0x200; - pix = (pixels >> 12) & 0xf; while (xacc < 0x200) { outrun_draw_pixel(); x += xdelta; xacc += hzoom; } xacc -= 0x200; - pix = (pixels >> 16) & 0xf; while (xacc < 0x200) { outrun_draw_pixel(); x += xdelta; xacc += hzoom; } xacc -= 0x200; - pix = (pixels >> 20) & 0xf; while (xacc < 0x200) { outrun_draw_pixel(); x += xdelta; xacc += hzoom; } xacc -= 0x200; - pix = (pixels >> 24) & 0xf; while (xacc < 0x200) { outrun_draw_pixel(); x += xdelta; xacc += hzoom; } xacc -= 0x200; - pix = (pixels >> 28) & 0xf; while (xacc < 0x200) { outrun_draw_pixel(); x += xdelta; xacc += hzoom; } xacc -= 0x200; - - /* stop if the second-to-last pixel in the group was 0xf */ + // draw four pixels + int pix; + pix = (pixels >> 0) & 0xf; while (xacc < 0x200) { if (x >= cliprect.min_x && x <= cliprect.max_x && pix != 0 && pix != 15) dest[x] = colpri | pix; x += xdelta; xacc += hzoom; } xacc -= 0x200; + pix = (pixels >> 4) & 0xf; while (xacc < 0x200) { if (x >= cliprect.min_x && x <= cliprect.max_x && pix != 0 && pix != 15) dest[x] = colpri | pix; x += xdelta; xacc += hzoom; } xacc -= 0x200; + pix = (pixels >> 8) & 0xf; while (xacc < 0x200) { if (x >= cliprect.min_x && x <= cliprect.max_x && pix != 0 && pix != 15) dest[x] = colpri | pix; x += xdelta; xacc += hzoom; } xacc -= 0x200; + pix = (pixels >> 12) & 0xf; while (xacc < 0x200) { if (x >= cliprect.min_x && x <= cliprect.max_x && pix != 0 && pix != 15) dest[x] = colpri | pix; x += xdelta; xacc += hzoom; } xacc -= 0x200; + pix = (pixels >> 16) & 0xf; while (xacc < 0x200) { if (x >= cliprect.min_x && x <= cliprect.max_x && pix != 0 && pix != 15) dest[x] = colpri | pix; x += xdelta; xacc += hzoom; } xacc -= 0x200; + pix = (pixels >> 20) & 0xf; while (xacc < 0x200) { if (x >= cliprect.min_x && x <= cliprect.max_x && pix != 0 && pix != 15) dest[x] = colpri | pix; x += xdelta; xacc += hzoom; } xacc -= 0x200; + pix = (pixels >> 24) & 0xf; while (xacc < 0x200) { if (x >= cliprect.min_x && x <= cliprect.max_x && pix != 0 && pix != 15) dest[x] = colpri | pix; x += xdelta; xacc += hzoom; } xacc -= 0x200; + pix = (pixels >> 28) & 0xf; while (xacc < 0x200) { if (x >= cliprect.min_x && x <= cliprect.max_x && pix != 0 && pix != 15) dest[x] = colpri | pix; x += xdelta; xacc += hzoom; } xacc -= 0x200; + + // stop if the second-to-last pixel in the group was 0xf if ((pixels & 0x0f000000) == 0x0f000000) break; } } + + // update bounds + if (x > maxx) maxx = x; + if (x < minx) minx = x; + if (miny == -1) miny = y; + maxy = y; } - /* accumulate zoom factors; if we carry into the high bit, skip an extra row */ + // accumulate zoom factors; if we carry into the high bit, skip an extra row yacc += vzoom; addr += pitch * (yacc >> 9); yacc &= 0x1ff; } + + // mark dirty + if (miny != -1) + mark_dirty(minx, maxx, miny, maxy); } } -void segaic16_sprites_outrun_draw(running_machine &machine, device_t *device, bitmap_ind16 &bitmap, const rectangle &cliprect) -{ - segaic16_sprites_xboard_outrun_draw(machine, device, bitmap, cliprect, SEGAIC16_SPRITES_OUTRUN); -} -void segaic16_sprites_xboard_draw(running_machine &machine, device_t *device, bitmap_ind16 &bitmap, const rectangle &cliprect) + +//**************************************************************************** +// Y BOARD-STYLE SPRITES +//**************************************************************************** + +//------------------------------------------------- +// sega_yboard_sprite_device -- constructor +//------------------------------------------------- + +sega_yboard_sprite_device::sega_yboard_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : sega_16bit_sprite_device(mconfig, SEGA_YBOARD_SPRITES, "Sega Y-Board Sprites", tag, owner) { - segaic16_sprites_xboard_outrun_draw(machine, device, bitmap, cliprect, SEGAIC16_SPRITES_XBOARD); + set_origin(0x600, 0x600); } -/******************************************************************************************* - * - * Y-Board-style sprites - * - * Offs Bits Usage - * +0 e------- -------- Signify end of sprite list - * +0 -----iii iiiiiiii Address of indirection table (/16) - * +2 bbbb---- -------- Upper 4 bits of bank index - * +2 ----xxxx xxxxxxxx X position of sprite (position $600 is screen position 0) - * +4 bbbb---- -------- Lower 4 bits of bank index - * +4 ----yyyy yyyyyyyy Y position of sprite (position $600 is screen position 0) - * +6 oooooooo oooooooo Offset within selected sprite bank - * +8 hhhhhhhh hhhhhhhh Height of sprite - * +A -y------ -------- Render from top-to-bottom (1) or bottom-to-top (0) on screen - * +A --f----- -------- Horizontal flip: read the data backwards if set - * +A ---x---- -------- Render from left-to-right (1) or right-to-left (0) on screen - * +A -----zzz zzzzzzzz Zoom factor - * +C -ccc---- -------- Sprite color - * +C ----rrrr -------- Sprite priority - * +C -------- pppppppp Signed 8-bit pitch value between scanlines - * +E ----nnnn nnnnnnnn Index of next sprite - * - * In addition to these parameters, the sprite area is clipped using scanline extents - * stored for every pair of scanlines in the rotation RAM. It's a bit of a cheat for us - * to poke our nose into the rotation structure, but there are no known cases of Y-board - * sprites without rotation RAM. - * - *******************************************************************************************/ - -#define yboard_draw_pixel() \ - /* only draw if onscreen */ \ - if (x >= minx && x <= maxx && ind < 0x1fe) \ - dest[x] = ind | colorpri; \ - -void segaic16_sprites_yboard_draw(running_machine &machine, device_t *device, bitmap_ind16 &bitmap, const rectangle &cliprect) +//------------------------------------------------- +// draw -- render the sprites within the cliprect +//------------------------------------------------- + +void sega_yboard_sprite_device::draw(bitmap_ind16 &bitmap, const rectangle &cliprect) { - UINT8 numbanks = machine.root_device().memregion("gfx1")->bytes() / 0x80000; - const UINT64 *spritebase = (const UINT64 *)machine.root_device().memregion("gfx1")->base(); + // + // Y-Board-style sprites + // + // Offs Bits Usage + // +0 e------- -------- Signify end of sprite list + // +0 -----iii iiiiiiii Address of indirection table (/16) + // +2 bbbb---- -------- Upper 4 bits of bank index + // +2 ----xxxx xxxxxxxx X position of sprite (position $600 is screen position 0) + // +4 bbbb---- -------- Lower 4 bits of bank index + // +4 ----yyyy yyyyyyyy Y position of sprite (position $600 is screen position 0) + // +6 oooooooo oooooooo Offset within selected sprite bank + // +8 hhhhhhhh hhhhhhhh Height of sprite + // +A -y------ -------- Render from top-to-bottom (1) or bottom-to-top (0) on screen + // +A --f----- -------- Horizontal flip: read the data backwards if set + // +A ---x---- -------- Render from left-to-right (1) or right-to-left (0) on screen + // +A -----zzz zzzzzzzz Zoom factor + // +C -ccc---- -------- Sprite color + // +C ----rrrr -------- Sprite priority + // +C -------- pppppppp Signed 8-bit pitch value between scanlines + // +E ----nnnn nnnnnnnn Index of next sprite + // + // Final bitmap format: + // + // ccc----- -------- Sprite color + // ---rrrr- -------- Sprite priority + // -------i iiiiiiii Indirected color data + // + // In addition to these parameters, the sprite area is clipped using scanline extents + // stored for every pair of scanlines in the rotation RAM. It's a bit of a cheat for us + // to poke our nose into the rotation structure, but there are no known cases of Y-board + // sprites without rotation RAM. + // + + // clear out any scanlines we might be using const UINT16 *rotatebase = segaic16_rotate[0].buffer ? segaic16_rotate[0].buffer : segaic16_rotate[0].rotateram; - UINT8 visited[0x1000]; - sega16sp_state *sega16sp = get_safe_token(device); - int next = 0; - int y; - UINT16* data = sega16sp->spriteram; + rotatebase -= yorigin(); + for (int y = cliprect.min_y; y <= cliprect.max_y; y++) + if (!(rotatebase[y & ~1] & 0xc000)) + memset(&bitmap.pix(y, cliprect.min_x), 0xff, cliprect.width() * sizeof(UINT16)); - /* reset the visited list */ + // reset the visited list + UINT8 visited[0x1000]; memset(visited, 0, sizeof(visited)); - /* clear out any scanlines we might be using */ - for (y = cliprect.min_y; y <= cliprect.max_y; y++) - if (!(rotatebase[y & ~1] & 0xc000)) - memset(&bitmap.pix16(y, cliprect.min_x), 0xff, cliprect.width() * sizeof(UINT16)); - - /* now scan backwards and render the sprites in order */ - for (data = sega16sp->spriteram; !(data[0] & 0x8000) && !visited[next]; data = sega16sp->spriteram + next * 8) + // render the sprites in order + const UINT64 *spritebase = reinterpret_cast<const UINT64 *>(region()->base()); + UINT8 numbanks = region()->bytes() / 0x80000; + int next = 0; + for (UINT16 *data = spriteram(); !(data[0] & 0x8000) && !visited[next]; data = spriteram() + next * 8) { int hide = (data[0] & 0x5000); - UINT16 *indirect = sega16sp->spriteram + ((data[0] & 0x7ff) << 4); + const UINT16 *indirect = spriteram() + ((data[0] & 0x7ff) << 4); int bank = ((data[1] >> 8) & 0x10) | ((data[2] >> 12) & 0x0f); - int xpos = (data[1] & 0xfff) - 0x600; - int top = (data[2] & 0xfff) - 0x600; + int xpos = data[1] & 0xfff; + int top = data[2] & 0xfff; UINT16 addr = data[3]; int height = data[4]; int ydelta = (data[5] & 0x4000) ? 1 : -1; int flip = (~data[5] >> 13) & 1; int xdelta = (data[5] & 0x1000) ? 1 : -1; int zoom = data[5] & 0x7ff; - int colorpri= (data[6] << 1) & 0xfe00; - int pitch = (INT8)data[6]; - int x, y, ytarget, yacc = 0, pix, ind; - const UINT64 *spritedata; - UINT16 offs; + int colpri = (data[6] << 1) & 0xfe00; + int pitch = INT8(data[6]); - /* note that we've visited this entry and get the offset of the next one */ + // note that we've visited this entry and get the offset of the next one visited[next] = 1; next = data[7] & 0xfff; - /* if hidden, or top greater than/equal to bottom, or invalid bank, punt */ + // if hidden, or top greater than/equal to bottom, or invalid bank, punt if (hide || height == 0) continue; - /* clamp to within the memory region size */ + // clamp to within the memory region size if (numbanks) bank %= numbanks; - spritedata = spritebase + 0x10000 * bank; + const UINT64 *spritedata = spritebase + 0x10000 * bank; - /* clamp to a maximum of 8x (not 100% confirmed) */ + // clamp to a maximum of 8x (not 100% confirmed) if (zoom == 0) zoom = 1; - /* loop from top to bottom */ - ytarget = top + ydelta * height; - for (y = top; y != ytarget; y += ydelta) + // loop from top to bottom + int dminx = xpos; + int dmaxx = xpos; + int dminy = -1; + int dmaxy = -1; + int ytarget = top + ydelta * height; + int yacc = 0; + for (int y = top; y != ytarget; y += ydelta) { - /* skip drawing if not within the cliprect */ + // skip drawing if not within the cliprect if (y >= cliprect.min_y && y <= cliprect.max_y) { - UINT16 *dest = &bitmap.pix16(y); + UINT16 *dest = &bitmap.pix(y); int minx = rotatebase[y & ~1]; int maxx = rotatebase[y | 1]; int xacc = 0; - /* bit 0x8000 from rotate RAM means that Y is above the top of the screen */ + // bit 0x8000 from rotate RAM means that Y is above the top of the screen if ((minx & 0x8000) && ydelta < 0) break; - /* bit 0x4000 from rotate RAM means that Y is below the bottom of the screen */ + // bit 0x4000 from rotate RAM means that Y is below the bottom of the screen if ((minx & 0x4000) && ydelta > 0) break; - /* if either bit is set, skip the rest for this scanline */ + // if either bit is set, skip the rest for this scanline if (!(minx & 0xc000)) { - /* clamp min/max to the cliprect */ - minx -= 0x600; - maxx -= 0x600; + // clamp min/max to the cliprect if (minx < cliprect.min_x) minx = cliprect.min_x; if (maxx > cliprect.max_x) maxx = cliprect.max_x; - /* non-flipped case */ + // non-flipped case + int x; if (!flip) { - /* start at the word before because we preincrement below */ - offs = addr - 1; + // start at the word before because we preincrement below + UINT16 offs = addr - 1; for (x = xpos; (xdelta > 0 && x <= maxx) || (xdelta < 0 && x >= minx); ) { UINT64 pixels = spritedata[++offs]; - /* draw four pixels */ - pix = (pixels >> 60) & 0xf; ind = indirect[pix]; while (xacc < 0x200) { yboard_draw_pixel(); x += xdelta; xacc += zoom; } xacc -= 0x200; - pix = (pixels >> 56) & 0xf; ind = indirect[pix]; while (xacc < 0x200) { yboard_draw_pixel(); x += xdelta; xacc += zoom; } xacc -= 0x200; - pix = (pixels >> 52) & 0xf; ind = indirect[pix]; while (xacc < 0x200) { yboard_draw_pixel(); x += xdelta; xacc += zoom; } xacc -= 0x200; - pix = (pixels >> 48) & 0xf; ind = indirect[pix]; while (xacc < 0x200) { yboard_draw_pixel(); x += xdelta; xacc += zoom; } xacc -= 0x200; - pix = (pixels >> 44) & 0xf; ind = indirect[pix]; while (xacc < 0x200) { yboard_draw_pixel(); x += xdelta; xacc += zoom; } xacc -= 0x200; - pix = (pixels >> 40) & 0xf; ind = indirect[pix]; while (xacc < 0x200) { yboard_draw_pixel(); x += xdelta; xacc += zoom; } xacc -= 0x200; - pix = (pixels >> 36) & 0xf; ind = indirect[pix]; while (xacc < 0x200) { yboard_draw_pixel(); x += xdelta; xacc += zoom; } xacc -= 0x200; - pix = (pixels >> 32) & 0xf; ind = indirect[pix]; while (xacc < 0x200) { yboard_draw_pixel(); x += xdelta; xacc += zoom; } xacc -= 0x200; - pix = (pixels >> 28) & 0xf; ind = indirect[pix]; while (xacc < 0x200) { yboard_draw_pixel(); x += xdelta; xacc += zoom; } xacc -= 0x200; - pix = (pixels >> 24) & 0xf; ind = indirect[pix]; while (xacc < 0x200) { yboard_draw_pixel(); x += xdelta; xacc += zoom; } xacc -= 0x200; - pix = (pixels >> 20) & 0xf; ind = indirect[pix]; while (xacc < 0x200) { yboard_draw_pixel(); x += xdelta; xacc += zoom; } xacc -= 0x200; - pix = (pixels >> 16) & 0xf; ind = indirect[pix]; while (xacc < 0x200) { yboard_draw_pixel(); x += xdelta; xacc += zoom; } xacc -= 0x200; - pix = (pixels >> 12) & 0xf; ind = indirect[pix]; while (xacc < 0x200) { yboard_draw_pixel(); x += xdelta; xacc += zoom; } xacc -= 0x200; - pix = (pixels >> 8) & 0xf; ind = indirect[pix]; while (xacc < 0x200) { yboard_draw_pixel(); x += xdelta; xacc += zoom; } xacc -= 0x200; - pix = (pixels >> 4) & 0xf; ind = indirect[pix]; while (xacc < 0x200) { yboard_draw_pixel(); x += xdelta; xacc += zoom; } xacc -= 0x200; - pix = (pixels >> 0) & 0xf; ind = indirect[pix]; while (xacc < 0x200) { yboard_draw_pixel(); x += xdelta; xacc += zoom; } xacc -= 0x200; - - /* stop if the second-to-last pixel in the group was 0xf */ + // draw 16 pixels + int pix, ind; + pix = (pixels >> 60) & 0xf; ind = indirect[pix]; while (xacc < 0x200) { if (x >= minx && x <= maxx && ind < 0x1fe) dest[x] = colpri | ind; x += xdelta; xacc += zoom; } xacc -= 0x200; + pix = (pixels >> 56) & 0xf; ind = indirect[pix]; while (xacc < 0x200) { if (x >= minx && x <= maxx && ind < 0x1fe) dest[x] = colpri | ind; x += xdelta; xacc += zoom; } xacc -= 0x200; + pix = (pixels >> 52) & 0xf; ind = indirect[pix]; while (xacc < 0x200) { if (x >= minx && x <= maxx && ind < 0x1fe) dest[x] = colpri | ind; x += xdelta; xacc += zoom; } xacc -= 0x200; + pix = (pixels >> 48) & 0xf; ind = indirect[pix]; while (xacc < 0x200) { if (x >= minx && x <= maxx && ind < 0x1fe) dest[x] = colpri | ind; x += xdelta; xacc += zoom; } xacc -= 0x200; + pix = (pixels >> 44) & 0xf; ind = indirect[pix]; while (xacc < 0x200) { if (x >= minx && x <= maxx && ind < 0x1fe) dest[x] = colpri | ind; x += xdelta; xacc += zoom; } xacc -= 0x200; + pix = (pixels >> 40) & 0xf; ind = indirect[pix]; while (xacc < 0x200) { if (x >= minx && x <= maxx && ind < 0x1fe) dest[x] = colpri | ind; x += xdelta; xacc += zoom; } xacc -= 0x200; + pix = (pixels >> 36) & 0xf; ind = indirect[pix]; while (xacc < 0x200) { if (x >= minx && x <= maxx && ind < 0x1fe) dest[x] = colpri | ind; x += xdelta; xacc += zoom; } xacc -= 0x200; + pix = (pixels >> 32) & 0xf; ind = indirect[pix]; while (xacc < 0x200) { if (x >= minx && x <= maxx && ind < 0x1fe) dest[x] = colpri | ind; x += xdelta; xacc += zoom; } xacc -= 0x200; + pix = (pixels >> 28) & 0xf; ind = indirect[pix]; while (xacc < 0x200) { if (x >= minx && x <= maxx && ind < 0x1fe) dest[x] = colpri | ind; x += xdelta; xacc += zoom; } xacc -= 0x200; + pix = (pixels >> 24) & 0xf; ind = indirect[pix]; while (xacc < 0x200) { if (x >= minx && x <= maxx && ind < 0x1fe) dest[x] = colpri | ind; x += xdelta; xacc += zoom; } xacc -= 0x200; + pix = (pixels >> 20) & 0xf; ind = indirect[pix]; while (xacc < 0x200) { if (x >= minx && x <= maxx && ind < 0x1fe) dest[x] = colpri | ind; x += xdelta; xacc += zoom; } xacc -= 0x200; + pix = (pixels >> 16) & 0xf; ind = indirect[pix]; while (xacc < 0x200) { if (x >= minx && x <= maxx && ind < 0x1fe) dest[x] = colpri | ind; x += xdelta; xacc += zoom; } xacc -= 0x200; + pix = (pixels >> 12) & 0xf; ind = indirect[pix]; while (xacc < 0x200) { if (x >= minx && x <= maxx && ind < 0x1fe) dest[x] = colpri | ind; x += xdelta; xacc += zoom; } xacc -= 0x200; + pix = (pixels >> 8) & 0xf; ind = indirect[pix]; while (xacc < 0x200) { if (x >= minx && x <= maxx && ind < 0x1fe) dest[x] = colpri | ind; x += xdelta; xacc += zoom; } xacc -= 0x200; + pix = (pixels >> 4) & 0xf; ind = indirect[pix]; while (xacc < 0x200) { if (x >= minx && x <= maxx && ind < 0x1fe) dest[x] = colpri | ind; x += xdelta; xacc += zoom; } xacc -= 0x200; + pix = (pixels >> 0) & 0xf; ind = indirect[pix]; while (xacc < 0x200) { if (x >= minx && x <= maxx && ind < 0x1fe) dest[x] = colpri | ind; x += xdelta; xacc += zoom; } xacc -= 0x200; + + // stop if the last pixel in the group was 0xf if (pix == 0x0f) break; } } - /* flipped case */ + // flipped case else { - /* start at the word after because we predecrement below */ - offs = addr + 1; + // start at the word after because we predecrement below + UINT16 offs = addr + 1; for (x = xpos; (xdelta > 0 && x <= maxx) || (xdelta < 0 && x >= minx); ) { UINT64 pixels = spritedata[--offs]; - /* draw four pixels */ - pix = (pixels >> 0) & 0xf; ind = indirect[pix]; while (xacc < 0x200) { yboard_draw_pixel(); x += xdelta; xacc += zoom; } xacc -= 0x200; - pix = (pixels >> 4) & 0xf; ind = indirect[pix]; while (xacc < 0x200) { yboard_draw_pixel(); x += xdelta; xacc += zoom; } xacc -= 0x200; - pix = (pixels >> 8) & 0xf; ind = indirect[pix]; while (xacc < 0x200) { yboard_draw_pixel(); x += xdelta; xacc += zoom; } xacc -= 0x200; - pix = (pixels >> 12) & 0xf; ind = indirect[pix]; while (xacc < 0x200) { yboard_draw_pixel(); x += xdelta; xacc += zoom; } xacc -= 0x200; - pix = (pixels >> 16) & 0xf; ind = indirect[pix]; while (xacc < 0x200) { yboard_draw_pixel(); x += xdelta; xacc += zoom; } xacc -= 0x200; - pix = (pixels >> 20) & 0xf; ind = indirect[pix]; while (xacc < 0x200) { yboard_draw_pixel(); x += xdelta; xacc += zoom; } xacc -= 0x200; - pix = (pixels >> 24) & 0xf; ind = indirect[pix]; while (xacc < 0x200) { yboard_draw_pixel(); x += xdelta; xacc += zoom; } xacc -= 0x200; - pix = (pixels >> 28) & 0xf; ind = indirect[pix]; while (xacc < 0x200) { yboard_draw_pixel(); x += xdelta; xacc += zoom; } xacc -= 0x200; - pix = (pixels >> 32) & 0xf; ind = indirect[pix]; while (xacc < 0x200) { yboard_draw_pixel(); x += xdelta; xacc += zoom; } xacc -= 0x200; - pix = (pixels >> 36) & 0xf; ind = indirect[pix]; while (xacc < 0x200) { yboard_draw_pixel(); x += xdelta; xacc += zoom; } xacc -= 0x200; - pix = (pixels >> 40) & 0xf; ind = indirect[pix]; while (xacc < 0x200) { yboard_draw_pixel(); x += xdelta; xacc += zoom; } xacc -= 0x200; - pix = (pixels >> 44) & 0xf; ind = indirect[pix]; while (xacc < 0x200) { yboard_draw_pixel(); x += xdelta; xacc += zoom; } xacc -= 0x200; - pix = (pixels >> 48) & 0xf; ind = indirect[pix]; while (xacc < 0x200) { yboard_draw_pixel(); x += xdelta; xacc += zoom; } xacc -= 0x200; - pix = (pixels >> 52) & 0xf; ind = indirect[pix]; while (xacc < 0x200) { yboard_draw_pixel(); x += xdelta; xacc += zoom; } xacc -= 0x200; - pix = (pixels >> 56) & 0xf; ind = indirect[pix]; while (xacc < 0x200) { yboard_draw_pixel(); x += xdelta; xacc += zoom; } xacc -= 0x200; - pix = (pixels >> 60) & 0xf; ind = indirect[pix]; while (xacc < 0x200) { yboard_draw_pixel(); x += xdelta; xacc += zoom; } xacc -= 0x200; - - /* stop if the second-to-last pixel in the group was 0xf */ + // draw 16 pixels + int pix, ind; + pix = (pixels >> 0) & 0xf; ind = indirect[pix]; while (xacc < 0x200) { if (x >= minx && x <= maxx && ind < 0x1fe) dest[x] = colpri | ind; x += xdelta; xacc += zoom; } xacc -= 0x200; + pix = (pixels >> 4) & 0xf; ind = indirect[pix]; while (xacc < 0x200) { if (x >= minx && x <= maxx && ind < 0x1fe) dest[x] = colpri | ind; x += xdelta; xacc += zoom; } xacc -= 0x200; + pix = (pixels >> 8) & 0xf; ind = indirect[pix]; while (xacc < 0x200) { if (x >= minx && x <= maxx && ind < 0x1fe) dest[x] = colpri | ind; x += xdelta; xacc += zoom; } xacc -= 0x200; + pix = (pixels >> 12) & 0xf; ind = indirect[pix]; while (xacc < 0x200) { if (x >= minx && x <= maxx && ind < 0x1fe) dest[x] = colpri | ind; x += xdelta; xacc += zoom; } xacc -= 0x200; + pix = (pixels >> 16) & 0xf; ind = indirect[pix]; while (xacc < 0x200) { if (x >= minx && x <= maxx && ind < 0x1fe) dest[x] = colpri | ind; x += xdelta; xacc += zoom; } xacc -= 0x200; + pix = (pixels >> 20) & 0xf; ind = indirect[pix]; while (xacc < 0x200) { if (x >= minx && x <= maxx && ind < 0x1fe) dest[x] = colpri | ind; x += xdelta; xacc += zoom; } xacc -= 0x200; + pix = (pixels >> 24) & 0xf; ind = indirect[pix]; while (xacc < 0x200) { if (x >= minx && x <= maxx && ind < 0x1fe) dest[x] = colpri | ind; x += xdelta; xacc += zoom; } xacc -= 0x200; + pix = (pixels >> 28) & 0xf; ind = indirect[pix]; while (xacc < 0x200) { if (x >= minx && x <= maxx && ind < 0x1fe) dest[x] = colpri | ind; x += xdelta; xacc += zoom; } xacc -= 0x200; + pix = (pixels >> 32) & 0xf; ind = indirect[pix]; while (xacc < 0x200) { if (x >= minx && x <= maxx && ind < 0x1fe) dest[x] = colpri | ind; x += xdelta; xacc += zoom; } xacc -= 0x200; + pix = (pixels >> 36) & 0xf; ind = indirect[pix]; while (xacc < 0x200) { if (x >= minx && x <= maxx && ind < 0x1fe) dest[x] = colpri | ind; x += xdelta; xacc += zoom; } xacc -= 0x200; + pix = (pixels >> 40) & 0xf; ind = indirect[pix]; while (xacc < 0x200) { if (x >= minx && x <= maxx && ind < 0x1fe) dest[x] = colpri | ind; x += xdelta; xacc += zoom; } xacc -= 0x200; + pix = (pixels >> 44) & 0xf; ind = indirect[pix]; while (xacc < 0x200) { if (x >= minx && x <= maxx && ind < 0x1fe) dest[x] = colpri | ind; x += xdelta; xacc += zoom; } xacc -= 0x200; + pix = (pixels >> 48) & 0xf; ind = indirect[pix]; while (xacc < 0x200) { if (x >= minx && x <= maxx && ind < 0x1fe) dest[x] = colpri | ind; x += xdelta; xacc += zoom; } xacc -= 0x200; + pix = (pixels >> 52) & 0xf; ind = indirect[pix]; while (xacc < 0x200) { if (x >= minx && x <= maxx && ind < 0x1fe) dest[x] = colpri | ind; x += xdelta; xacc += zoom; } xacc -= 0x200; + pix = (pixels >> 56) & 0xf; ind = indirect[pix]; while (xacc < 0x200) { if (x >= minx && x <= maxx && ind < 0x1fe) dest[x] = colpri | ind; x += xdelta; xacc += zoom; } xacc -= 0x200; + pix = (pixels >> 60) & 0xf; ind = indirect[pix]; while (xacc < 0x200) { if (x >= minx && x <= maxx && ind < 0x1fe) dest[x] = colpri | ind; x += xdelta; xacc += zoom; } xacc -= 0x200; + + // stop if the last pixel in the group was 0xf if (pix == 0x0f) break; } } + + // update bounds + if (x > dmaxx) dmaxx = x; + if (x < dminx) dminx = x; + if (dminy == -1) dminy = y; + dmaxy = y; } } - /* accumulate zoom factors; if we carry into the high bit, skip an extra row */ + // accumulate zoom factors; if we carry into the high bit, skip an extra row yacc += zoom; addr += pitch * (yacc >> 9); yacc &= 0x1ff; } - } -} - -/* bootlegs */ - -/* - - the system16a bootleg sprite hardware differs in subtle ways on a per game basis - with each game having the words swapped around. - - there are also some subtle, but important changes when compared to the original - system16a sprites, mainly the increment of the address not happening until - the end of the loop - -*/ - -/* ignores the sprite priority until we understand priority better on the bootlegs */ -#define system16a_bootleg_draw_pixel() \ - /* only draw if onscreen, not 0 or 15 */ \ - if (x >= cliprect.min_x && x <= cliprect.max_x && pix != 0 && pix != 15) \ - { \ - /* are we high enough priority to be visible? */ \ - if (sprpri || 1) \ - { \ - /* shadow/hilight mode? */ \ - if (color == sega16sp->colorbase + (0x3f << 4)) \ - dest[x] += (segaic16_paletteram[dest[x]] & 0x8000) ? segaic16_palette.entries*2 : segaic16_palette.entries; \ - \ - /* regular draw */ \ - else \ - dest[x] = pix | color; \ - } \ - \ - /* always mark priority so no one else draws here */ \ - pri[x] = 0xff; \ - } \ - - -/* make this an actual function */ -#define system16a_bootleg_draw_core() \ - { \ - const UINT16 *spritedata; \ - int x, y, pix, xdelta = 1; \ - \ - xpos += sega16sp->xoffs; \ - xpos &= 0x1ff; \ - \ - xpos -= 0xbd; \ - \ - /* initialize the end address to the start address */ \ - data[7] = addr; \ - \ - /* if hidden, or top greater than/equal to bottom, or invalid bank, punt */ \ - if ((top >= bottom) || bank == 255) \ - continue; \ - \ - /* clamp to within the memory region size */ \ - if (numbanks) \ - bank %= numbanks; \ - spritedata = spritebase + 0x8000 * bank; \ - \ - /* adjust positions for screen flipping */ \ - if (sega16sp->flip) \ - { \ - int temp = top; \ - top = 224 - bottom; \ - bottom = 224 - temp; \ - xpos = 320 - xpos; \ - xdelta = -1; \ - } \ - \ - /* loop from top to bottom */ \ - for (y = top; y < bottom; y++) \ - { \ - \ - /* skip drawing if not within the cliprect */ \ - if (y >= cliprect.min_y && y <= cliprect.max_y) \ - { \ - UINT16 *dest = &bitmap.pix16(y); \ - UINT8 *pri = &machine.priority_bitmap.pix8(y); \ - \ - /* note that the System 16A sprites have a design flaw that allows the address */ \ - /* to carry into the flip flag, which is the topmost bit -- it is very important */ \ - /* to emulate this as the games compensate for it */ \ - \ - /* non-flipped case */ \ - if (!(addr & 0x8000)) \ - { \ - /* start at the word before because we preincrement below */ \ - data[7] = addr - 1; \ - for (x = xpos; ((xpos - x) & 0x1ff) != 1; ) \ - { \ - UINT16 pixels = spritedata[++data[7] & 0x7fff]; \ - \ - /* draw four pixels */ \ - pix = (pixels >> 12) & 0xf; system16a_bootleg_draw_pixel(); x += xdelta; \ - pix = (pixels >> 8) & 0xf; system16a_bootleg_draw_pixel(); x += xdelta; \ - pix = (pixels >> 4) & 0xf; system16a_bootleg_draw_pixel(); x += xdelta; \ - pix = (pixels >> 0) & 0xf; system16a_bootleg_draw_pixel(); x += xdelta; \ - \ - /* stop if the last pixel in the group was 0xf */ \ - if (pix == 15) \ - break; \ - } \ - } \ - \ - /* flipped case */ \ - else \ - { \ - /* start at the word after because we predecrement below */ \ - data[7] = addr + 1; \ - for (x = xpos; ((xpos - x) & 0x1ff) != 1; ) \ - { \ - UINT16 pixels = spritedata[--data[7] & 0x7fff]; \ - \ - /* draw four pixels */ \ - pix = (pixels >> 0) & 0xf; system16a_bootleg_draw_pixel(); x += xdelta; \ - pix = (pixels >> 4) & 0xf; system16a_bootleg_draw_pixel(); x += xdelta; \ - pix = (pixels >> 8) & 0xf; system16a_bootleg_draw_pixel(); x += xdelta; \ - pix = (pixels >> 12) & 0xf; system16a_bootleg_draw_pixel(); x += xdelta; \ - \ - /* stop if the last pixel in the group was 0xf */ \ - if (pix == 15) \ - break; \ - } \ - } \ - } \ - \ - /* advance a row - must be done at the end on the bootlegs! */ \ - addr += pitch; \ - } \ - } \ - - - -void segaic16_sprites_16a_bootleg_wb3bl_draw(running_machine &machine, device_t *device, bitmap_ind16 &bitmap, const rectangle &cliprect) -{ - UINT8 numbanks = machine.root_device().memregion("gfx2")->bytes() / 0x10000; - const UINT16 *spritebase = (const UINT16 *)machine.root_device().memregion("gfx2")->base(); - sega16sp_state *sega16sp = get_safe_token(device); - UINT16* data = sega16sp->spriteram; - - for (data = sega16sp->spriteram; data < sega16sp->spriteram+ sega16sp->ramsize/2; data += 8) - { - int bottom = (data[4] >> 8); - int top = (data[4] & 0xff); - int xpos = (data[0]); - int pitch = (INT16)data[5]; - UINT16 addr = data[1]; - int color = sega16sp->colorbase + (((data[6] >> 8) & 0x3f) << 4); - int bank = sega16sp->bank[(data[6] >> 4) & 0x7]; - int sprpri = 1 << ((data[6] >> 0) & 0x3); - - system16a_bootleg_draw_core(); - } -} - -/* 4 player passing shot is different to this.. */ -void segaic16_sprites_16a_bootleg_passhtb_draw(running_machine &machine, device_t *device, bitmap_ind16 &bitmap, const rectangle &cliprect) -{ - UINT8 numbanks = machine.root_device().memregion("gfx2")->bytes() / 0x10000; - const UINT16 *spritebase = (const UINT16 *)machine.root_device().memregion("gfx2")->base(); - sega16sp_state *sega16sp = get_safe_token(device); - UINT16* data = sega16sp->spriteram; - - for (data = sega16sp->spriteram; data < sega16sp->spriteram+ sega16sp->ramsize/2; data += 8) - { - int bottom = (data[1] >> 8)-1; - int top = (data[1] & 0xff)-1; - int xpos = (data[0]); - int pitch = (INT16)data[3]; - UINT16 addr = data[2]; - int color = sega16sp->colorbase + (((data[5] >> 8) & 0x3f) << 4); - int bank = sega16sp->bank[(data[5] >> 4) & 0x7]; - int sprpri = 1 << ((data[5] >> 0) & 0x3); - - system16a_bootleg_draw_core(); - } -} - -void segaic16_sprites_16a_bootleg_shinobld_draw(running_machine &machine, device_t *device, bitmap_ind16 &bitmap, const rectangle &cliprect) -{ - UINT8 numbanks = machine.root_device().memregion("gfx2")->bytes() / 0x10000; - const UINT16 *spritebase = (const UINT16 *)machine.root_device().memregion("gfx2")->base(); - sega16sp_state *sega16sp = get_safe_token(device); - UINT16* data = sega16sp->spriteram; - - for (data = sega16sp->spriteram; data < sega16sp->spriteram+ sega16sp->ramsize/2; data += 8) - { - int bottom = (data[0] >> 8)-1; - int top = (data[0] & 0xff)-1; - int xpos = (data[1]); - int pitch = (INT16)data[2]; - UINT16 addr = data[3]; - int color = sega16sp->colorbase + (((data[4] >> 8) & 0x3f) << 4); - int bank = sega16sp->bank[(data[4] >> 4) & 0x7]; - int sprpri = 1 << ((data[4] >> 0) & 0x3); - - system16a_bootleg_draw_core(); - } -} - -/************************************* - * - * General sprite drawing - * - *************************************/ - -void segaic16_sprites_draw(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int which) -{ - device_t* device = 0; - sega16sp_state *sega16sp; - - if (!which) - device = screen.machine().device("segaspr1"); - else - device = screen.machine().device("segaspr2"); - - if (!device) - fatalerror("segaic16_sprites_draw device not found\n"); - - sega16sp = get_safe_token(device); - - if (!sega16sp->which) - sega16sp->spriteram = segaic16_spriteram_0; - else - sega16sp->spriteram = segaic16_spriteram_1; - - (*sega16sp->draw)(screen.machine(), device, bitmap, cliprect); -} - - - -/************************************* - * - * General sprite banking - * - *************************************/ - -void segaic16_sprites_set_bank(running_machine &machine, int which, int banknum, int offset) -{ - device_t* device = 0; - - if (!which) - device = machine.device("segaspr1"); - else - device = machine.device("segaspr2"); - - if (!device) - fatalerror("segaic16_sprites_set_bank device not found\n"); - - sega16sp_state *sega16sp = get_safe_token(device); - - if (sega16sp->bank[banknum] != offset) - { - screen_device &screen = *machine.primary_screen; - screen.update_partial(screen.vpos()); - sega16sp->bank[banknum] = offset; - } -} - - - -/************************************* - * - * General sprite screen flipping - * - *************************************/ - -void segaic16_sprites_set_flip(running_machine &machine, int which, int flip) -{ - device_t* device = 0; - - if (!which) - device = machine.device("segaspr1"); - else - device = machine.device("segaspr2"); - - if (!device) - fatalerror("segaic16_sprites_set_flip device not found\n"); - - sega16sp_state *sega16sp = get_safe_token(device); - - flip = (flip != 0); - if (sega16sp->flip != flip) - { - screen_device &screen = *machine.primary_screen; - screen.update_partial(screen.vpos()); - sega16sp->flip = flip; - } -} - - - -/************************************* - * - * General sprite shadows - * - *************************************/ - -void segaic16_sprites_set_shadow(running_machine &machine, int which, int shadow) -{ - device_t* device = 0; - - if (!which) - device = machine.device("segaspr1"); - else - device = machine.device("segaspr2"); - - if (!device) - fatalerror("segaic16_sprites_set_shadow device not found\n"); - - sega16sp_state *sega16sp = get_safe_token(device); - - shadow = (shadow != 0); - if (sega16sp->shadow != shadow) - { - screen_device &screen = *machine.primary_screen; - screen.update_partial(screen.vpos()); - sega16sp->shadow = shadow; - } -} - - - -/************************************* - * - * General sprite buffer control - * - *************************************/ - -static void segaic16_sprites_buffer(device_t* device) -{ - sega16sp_state *sega16sp = get_safe_token(device); - - if (!sega16sp->which) - sega16sp->spriteram = segaic16_spriteram_0; - else - sega16sp->spriteram = segaic16_spriteram_1; - - - if (sega16sp->buffer) - { - UINT32 *src = (UINT32 *)sega16sp->spriteram; - UINT32 *dst = (UINT32 *)sega16sp->buffer; - int i; - - /* swap the halves of the sprite RAM */ - for (i = 0; i < sega16sp->ramsize/4; i++) - { - UINT32 temp = *src; - *src++ = *dst; - *dst++ = temp; - } - - /* hack for thunderblade */ - *sega16sp->spriteram = 0xffff; - } - - /* we will render the sprites when the video update happens */ -} - - -WRITE16_HANDLER( segaic16_sprites_draw_0_w ) -{ - device_t* device = 0; - - device = space->machine().device("segaspr1"); - - if (!device) - fatalerror("segaic16_sprites_draw_0_w device not found\n"); - - segaic16_sprites_buffer(device); -} - - -WRITE16_HANDLER( segaic16_sprites_draw_1_w ) -{ - device_t* device = 0; - - device = space->machine().device("segaspr2"); - - if (!device) - fatalerror("segaic16_sprites_draw_1_w device not found\n"); - - if (device) - segaic16_sprites_buffer(device); -} - - -/***************************************************************************** - DEVICE INTERFACE -*****************************************************************************/ - -static DEVICE_START( sega16sp ) -{ - sega16sp_state *sega16sp = get_safe_token(device); - const sega16sp_interface *intf = get_interface(device); - int i; - - sega16sp->flip = 0; - sega16sp->shadow = 0; - - for (i=0;i<16;i++) - sega16sp->bank[i] = i;// intf->bank[i]; - - sega16sp->which = intf->which; - sega16sp->colorbase = intf->colorbase; - sega16sp->ramsize = intf->ramsize; - sega16sp->xoffs = intf->xoffs; - sega16sp->draw = intf->draw; - - if (intf->buffer) - sega16sp->buffer = auto_alloc_array(device->machine(), UINT16, sega16sp->ramsize/2); - - - device->save_item(NAME(sega16sp->flip)); - device->save_item(NAME(sega16sp->shadow)); - device->save_item(NAME(sega16sp->bank)); - device->save_item(NAME(sega16sp->colorbase)); - device->save_item(NAME(sega16sp->xoffs)); - - if (intf->buffer) - device->save_pointer(NAME(((UINT8 *) sega16sp->buffer)), sega16sp->ramsize); - - -} - - -DEVICE_GET_INFO( sega16sp ) -{ - switch (state) - { - /* --- the following bits of info are returned as 64-bit signed integers --- */ - case DEVINFO_INT_TOKEN_BYTES: info->i = sizeof(sega16sp_state); break; - - /* --- the following bits of info are returned as pointers to data or functions --- */ - case DEVINFO_FCT_START: info->start = DEVICE_START_NAME(sega16sp); break; - case DEVINFO_FCT_STOP: /* Nothing */ break; - case DEVINFO_FCT_RESET: /*info->reset = DEVICE_RESET_NAME(sega16sp);*/ break; - - /* --- the following bits of info are returned as NULL-terminated strings --- */ - case DEVINFO_STR_NAME: strcpy(info->s, "Sega System SH/HO/OR/16/18/X/Y Sprites"); break; - case DEVINFO_STR_FAMILY: strcpy(info->s, "Sega Video ICs"); break; - case DEVINFO_STR_VERSION: strcpy(info->s, "1.0"); break; - case DEVINFO_STR_SOURCE_FILE: strcpy(info->s, __FILE__); break; - case DEVINFO_STR_CREDITS: strcpy(info->s, "Copyright MAME Team"); break; + + // mark dirty + if (dminy != -1) + mark_dirty(dminx, dmaxx, dminy, dmaxy); } } diff --git a/src/mame/video/sega16sp.h b/src/mame/video/sega16sp.h new file mode 100644 index 00000000000..162306f6bba --- /dev/null +++ b/src/mame/video/sega16sp.h @@ -0,0 +1,252 @@ +/*************************************************************************** + + Sega 16-bit sprite hardware + +**************************************************************************** + + Copyright Aaron Giles + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + * Neither the name 'MAME' nor the names of its contributors may be + used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND ANY EXPRESS OR + IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +***************************************************************************/ + +#pragma once + +#include "sprite.h" + + +#ifndef __SEGA16SP_H__ +#define __SEGA16SP_H__ + + +//************************************************************************** +// INTERFACE CONFIGURATION MACROS +//************************************************************************** + +#define MCFG_SEGA_HANGON_SPRITES_ADD(_tag) \ + MCFG_DEVICE_ADD(_tag, SEGA_HANGON_SPRITES, 0) \ + +#define MCFG_SEGA_SHARRIER_SPRITES_ADD(_tag) \ + MCFG_DEVICE_ADD(_tag, SEGA_SHARRIER_SPRITES, 0) \ + +#define MCFG_SEGA_OUTRUN_SPRITES_ADD(_tag) \ + MCFG_DEVICE_ADD(_tag, SEGA_OUTRUN_SPRITES, 0) \ + +#define MCFG_SEGA_SYS16A_SPRITES_ADD(_tag) \ + MCFG_DEVICE_ADD(_tag, SEGA_SYS16A_SPRITES, 0) \ + +#define MCFG_SEGA_SYS16B_SPRITES_ADD(_tag) \ + MCFG_DEVICE_ADD(_tag, SEGA_SYS16B_SPRITES, 0) \ + +#define MCFG_SEGA_XBOARD_SPRITES_ADD(_tag) \ + MCFG_DEVICE_ADD(_tag, SEGA_XBOARD_SPRITES, 0) \ + +#define MCFG_SEGA_YBOARD_SPRITES_ADD(_tag) \ + MCFG_DEVICE_ADD(_tag, SEGA_YBOARD_SPRITES, 0) \ + + +#define MCFG_BOOTLEG_SYS16A_SPRITES_ADD(_tag) \ + MCFG_DEVICE_ADD(_tag, BOOTLEG_SYS16A_SPRITES, 0) \ + +#define MCFG_BOOTLEG_SYS16A_SPRITES_REMAP(_0,_1,_2,_3,_4,_5,_6,_7) \ + bootleg_sys16a_sprite_device::static_set_remap(*device, _0,_1,_2,_3,_4,_5,_6,_7); + +#define MCFG_BOOTLEG_SYS16A_SPRITES_XORIGIN(_xorigin) \ + bootleg_sys16a_sprite_device::static_set_xorigin(*device, _xorigin); + +#define MCFG_BOOTLEG_SYS16A_SPRITES_YORIGIN(_yorigin) \ + bootleg_sys16a_sprite_device::static_set_yorigin(*device, _yorigin); + + +#define MCFG_BOOTLEG_SYS16B_SPRITES_ADD(_tag) \ + MCFG_DEVICE_ADD(_tag, SEGA_SYS16B_SPRITES, 0) \ + +#define MCFG_BOOTLEG_SYS16B_SPRITES_XORIGIN(_xorigin) \ + bootleg_sys16a_sprite_device::static_set_xorigin(*device, _xorigin); + + + +//************************************************************************** +// TYPE DEFINITIONS +//************************************************************************** + + +// ======================> sega_16bit_sprite_device + +class sega_16bit_sprite_device : public sprite16_device_ind16 +{ +protected: + // construction/destruction + sega_16bit_sprite_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner); + +public: + // live configuration + void set_bank(int banknum, int offset) { m_bank[banknum] = offset; } + void set_flip(bool flip) { m_flip = flip; } + + // write trigger memory handler + DECLARE_WRITE16_MEMBER( draw_write ); + +protected: + // device-level overrides + virtual void device_start(); + + // internal state + bool m_flip; // screen flip? + UINT8 m_bank[16]; // banking redirection +}; + + +// ======================> sega_hangon_sprite_device + +class sega_hangon_sprite_device : public sega_16bit_sprite_device +{ +public: + // construction/destruction + sega_hangon_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + +protected: + // subclass overrides + virtual void draw(bitmap_ind16 &bitmap, const rectangle &cliprect); +}; + + +// ======================> sega_sharrier_sprite_device + +class sega_sharrier_sprite_device : public sega_16bit_sprite_device +{ +public: + // construction/destruction + sega_sharrier_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + +protected: + // subclass overrides + virtual void draw(bitmap_ind16 &bitmap, const rectangle &cliprect); +}; + + +// ======================> sega_outrun_sprite_device + +class sega_outrun_sprite_device : public sega_16bit_sprite_device +{ +public: + // construction/destruction + sega_outrun_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); +protected: + sega_outrun_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock, bool xboard_variant); + + // subclass overrides + virtual void draw(bitmap_ind16 &bitmap, const rectangle &cliprect); + + // configuration + bool m_is_xboard; +}; + +class sega_xboard_sprite_device : public sega_outrun_sprite_device +{ +public: + // construction/destruction + sega_xboard_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); +}; + + +// ======================> sega_sys16a_sprite_device + +class sega_sys16a_sprite_device : public sega_16bit_sprite_device +{ +public: + // construction/destruction + sega_sys16a_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + +protected: + // subclass overrides + virtual void draw(bitmap_ind16 &bitmap, const rectangle &cliprect); +}; + + +// ======================> bootleg_sys16a_sprite_device + +class bootleg_sys16a_sprite_device : public sega_16bit_sprite_device +{ +public: + // construction/destruction + bootleg_sys16a_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + // configuration + static void static_set_remap(device_t &device, UINT8 offs0, UINT8 offs1, UINT8 offs2, UINT8 offs3, UINT8 offs4, UINT8 offs5, UINT8 offs6, UINT8 offs7); + +protected: + // subclass overrides + virtual void draw(bitmap_ind16 &bitmap, const rectangle &cliprect); + + // internal state + UINT8 m_addrmap[8]; +}; + + +// ======================> sega_sys16b_sprite_device + +class sega_sys16b_sprite_device : public sega_16bit_sprite_device +{ +public: + // construction/destruction + sega_sys16b_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + +protected: + // subclass overrides + virtual void draw(bitmap_ind16 &bitmap, const rectangle &cliprect); +}; + + +// ======================> sega_yboard_sprite_device + +class sega_yboard_sprite_device : public sega_16bit_sprite_device +{ +public: + // construction/destruction + sega_yboard_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + +protected: + // subclass overrides + virtual void draw(bitmap_ind16 &bitmap, const rectangle &cliprect); +}; + + +// device type definition +extern const device_type SEGA_HANGON_SPRITES; +extern const device_type SEGA_SHARRIER_SPRITES; +extern const device_type SEGA_OUTRUN_SPRITES; +extern const device_type SEGA_SYS16A_SPRITES; +extern const device_type BOOTLEG_SYS16A_SPRITES; +extern const device_type SEGA_SYS16B_SPRITES; +extern const device_type SEGA_XBOARD_SPRITES; +extern const device_type SEGA_YBOARD_SPRITES; + + +#endif + diff --git a/src/mame/video/segahang.c b/src/mame/video/segahang.c index 11e090a32f4..a3f1e9909b7 100644 --- a/src/mame/video/segahang.c +++ b/src/mame/video/segahang.c @@ -46,9 +46,6 @@ void segahang_state::video_start() { - // compute palette info - segaic16_palette_init(0x800); - // initialize the tile/text layers segaic16_tilemap_init(machine(), 0, SEGAIC16_TILEMAP_HANGON, 0x000, 0, 2); @@ -70,6 +67,9 @@ UINT32 segahang_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap return 0; } + // start the sprites drawing + m_sprites->draw_async(cliprect); + // reset priorities machine().priority_bitmap.fill(0, cliprect); @@ -93,8 +93,66 @@ UINT32 segahang_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap segaic16_tilemap_draw(screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_TEXT, 0, 0x08); segaic16_tilemap_draw(screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_TEXT, 1, 0x08); - // draw the sprites - segaic16_sprites_draw(screen, bitmap, cliprect, 0); + // mix in sprites + bitmap_ind16 &sprites = m_sprites->bitmap(); + for (const sparse_dirty_rect *rect = m_sprites->first_dirty_rect(cliprect); rect != NULL; rect = rect->next()) + for (int y = rect->min_y; y <= rect->max_y; y++) + { + UINT16 *dest = &bitmap.pix(y); + UINT16 *src = &sprites.pix(y); + UINT8 *pri = &machine().priority_bitmap.pix(y); + + // hangon mixing + if (!m_sharrier_video) + { + for (int x = rect->min_x; x <= rect->max_x; x++) + { + // only process written pixels + UINT16 pix = src[x]; + if (pix != 0xffff) + { + // compare sprite priority against tilemap priority + int priority = pix >> 10; + if ((1 << priority) > pri[x]) + { + // if color bits are all 1, this triggers shadow/hilight + if ((pix & 0x3f0) == 0x3f0) + dest[x] += m_shadow ? m_palette_entries*2 : m_palette_entries; + + // otherwise, just add in sprite palette base + else + dest[x] = 1024 + (pix & 0x3ff); + } + } + } + } + + // sharrier mixing + else + { + for (int x = rect->min_x; x <= rect->max_x; x++) + { + // only process written pixels + UINT16 pix = src[x]; + if (pix != 0xffff) + { + // compare sprite priority against tilemap priority + int priority = ((pix >> 9) & 2) | 1; + if ((1 << priority) > pri[x]) + { + // if shadow bit is 0 and pix data is 0xa, this triggers shadow/hilight + if ((pix & 0x80f) == 0x00a) + dest[x] += (m_paletteram[dest[x]] & 0x8000) ? m_palette_entries*2 : m_palette_entries; + + // otherwise, just add in sprite palette base + else + dest[x] = 1024 + (pix & 0x3ff); + } + } + } + } + } + return 0; } diff --git a/src/mame/video/segaic16.c b/src/mame/video/segaic16.c index e5d7ffe422c..0fb67ff4390 100644 --- a/src/mame/video/segaic16.c +++ b/src/mame/video/segaic16.c @@ -380,9 +380,7 @@ UINT16 *segaic16_tileram_0; UINT16 *segaic16_textram_0; UINT16 *segaic16_roadram_0; UINT16 *segaic16_rotateram_0; -UINT16 *segaic16_paletteram; -struct palette_info segaic16_palette; struct rotate_info segaic16_rotate[SEGAIC16_MAX_ROTATE]; struct road_info segaic16_road[SEGAIC16_MAX_ROADS]; @@ -418,101 +416,6 @@ void segaic16_set_display_enable(running_machine &machine, int enable) /************************************* * - * Palette computation - * - *************************************/ - -/* - Color generation details - - Each color is made up of 5 bits, connected through one or more resistors like so: - - Bit 0 = 1 x 3.9K ohm - Bit 1 = 1 x 2.0K ohm - Bit 2 = 1 x 1.0K ohm - Bit 3 = 2 x 1.0K ohm - Bit 4 = 4 x 1.0K ohm - - Another data bit is connected by a tristate buffer to the color output through a - 470 ohm resistor. The buffer allows the resistor to have no effect (tristate), - halve brightness (pull-down) or double brightness (pull-up). The data bit source - is bit 15 of each color RAM entry. -*/ - -void segaic16_palette_init(int entries) -{ - static const int resistances_normal[6] = { 3900, 2000, 1000, 1000/2, 1000/4, 0 }; - static const int resistances_sh[6] = { 3900, 2000, 1000, 1000/2, 1000/4, 470 }; - double weights[2][6]; - int i; - struct palette_info *info = &segaic16_palette; - - /* compute the number of palette entries */ - info->entries = entries; - - /* compute weight table for regular palette entries */ - compute_resistor_weights(0, 255, -1.0, - 6, resistances_normal, weights[0], 0, 0, - 0, NULL, NULL, 0, 0, - 0, NULL, NULL, 0, 0); - - /* compute weight table for shadow/hilight palette entries */ - compute_resistor_weights(0, 255, -1.0, - 6, resistances_sh, weights[1], 0, 0, - 0, NULL, NULL, 0, 0, - 0, NULL, NULL, 0, 0); - - /* compute R, G, B for each weight */ - for (i = 0; i < 32; i++) - { - int i4 = (i >> 4) & 1; - int i3 = (i >> 3) & 1; - int i2 = (i >> 2) & 1; - int i1 = (i >> 1) & 1; - int i0 = (i >> 0) & 1; - - info->normal[i] = combine_6_weights(weights[0], i0, i1, i2, i3, i4, 0); - info->shadow[i] = combine_6_weights(weights[1], i0, i1, i2, i3, i4, 0); - info->hilight[i] = combine_6_weights(weights[1], i0, i1, i2, i3, i4, 1); - } -} - - - -/************************************* - * - * Palette accessors - * - *************************************/ - -WRITE16_HANDLER( segaic16_paletteram_w ) -{ - UINT16 newval; - int r, g, b; - struct palette_info *info = &segaic16_palette; - - /* get the new value */ - newval = segaic16_paletteram[offset]; - COMBINE_DATA(&newval); - segaic16_paletteram[offset] = newval; - - /* byte 0 byte 1 */ - /* sBGR BBBB GGGG RRRR */ - /* x000 4321 4321 4321 */ - r = ((newval >> 12) & 0x01) | ((newval << 1) & 0x1e); - g = ((newval >> 13) & 0x01) | ((newval >> 3) & 0x1e); - b = ((newval >> 14) & 0x01) | ((newval >> 7) & 0x1e); - - /* normal colors */ - palette_set_color_rgb(space->machine(), offset + 0 * info->entries, info->normal[r], info->normal[g], info->normal[b]); - palette_set_color_rgb(space->machine(), offset + 1 * info->entries, info->shadow[r], info->shadow[g], info->shadow[b]); - palette_set_color_rgb(space->machine(), offset + 2 * info->entries, info->hilight[r], info->hilight[g], info->hilight[b]); -} - - - -/************************************* - * * Draw a split tilemap in up to * four pieces * @@ -2029,7 +1932,7 @@ void segaic16_rotate_init(running_machine &machine, int which, int type, int col * *************************************/ -void segaic16_rotate_draw(running_machine &machine, int which, bitmap_ind16 &bitmap, const rectangle &cliprect, bitmap_ind16 *srcbitmap) +void segaic16_rotate_draw(running_machine &machine, int which, bitmap_ind16 &bitmap, const rectangle &cliprect, bitmap_ind16 &srcbitmap) { struct rotate_info *info = &segaic16_rotate[which]; INT32 currx = (info->buffer[0x3f0] << 16) | info->buffer[0x3f1]; @@ -2048,7 +1951,7 @@ void segaic16_rotate_draw(running_machine &machine, int which, bitmap_ind16 &bit for (y = cliprect.min_y; y <= cliprect.max_y; y++) { UINT16 *dest = &bitmap.pix16(y); - UINT16 *src = &srcbitmap->pix16(0); + UINT16 *src = &srcbitmap.pix16(0); UINT8 *pri = &machine.priority_bitmap.pix8(y); INT32 tx = currx; INT32 ty = curry; @@ -2059,7 +1962,7 @@ void segaic16_rotate_draw(running_machine &machine, int which, bitmap_ind16 &bit /* fetch the pixel from the source bitmap */ int sx = (tx >> 14) & 0x1ff; int sy = (ty >> 14) & 0x1ff; - int pix = src[sy * srcbitmap->rowpixels() + sx]; + int pix = src[sy * srcbitmap.rowpixels() + sx]; /* non-zero pixels get written; everything else is the scanline color */ if (pix != 0xffff) @@ -2113,6 +2016,3 @@ READ16_HANDLER( segaic16_rotate_control_0_r ) return 0xffff; } - - -DEFINE_LEGACY_DEVICE(SEGA16SP, sega16sp); diff --git a/src/mame/video/segaic16.h b/src/mame/video/segaic16.h index b7e5990422d..dd3afbe3312 100644 --- a/src/mame/video/segaic16.h +++ b/src/mame/video/segaic16.h @@ -10,19 +10,12 @@ extern UINT8 segaic16_display_enable; extern UINT16 *segaic16_tileram_0; extern UINT16 *segaic16_textram_0; -extern UINT16 *segaic16_spriteram_0; -extern UINT16 *segaic16_spriteram_1; extern UINT16 *segaic16_roadram_0; extern UINT16 *segaic16_rotateram_0; -extern UINT16 *segaic16_paletteram; /* misc functions */ void segaic16_set_display_enable(running_machine &machine, int enable); -/* palette handling */ -void segaic16_palette_init(int entries); -WRITE16_HANDLER( segaic16_paletteram_w ); - /* tilemap systems */ #define SEGAIC16_MAX_TILEMAPS 1 @@ -46,19 +39,6 @@ void segaic16_tilemap_set_colscroll(running_machine &machine, int which, int ena WRITE16_HANDLER( segaic16_tileram_0_w ); WRITE16_HANDLER( segaic16_textram_0_w ); -/* sprite systems */ -#define SEGAIC16_MAX_SPRITES 2 - -#define SEGAIC16_SPRITES_OUTRUN 4 -#define SEGAIC16_SPRITES_XBOARD 5 - -void segaic16_sprites_draw(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int which); -void segaic16_sprites_set_bank(running_machine &machine, int which, int banknum, int offset); -void segaic16_sprites_set_flip(running_machine &machine, int which, int flip); -void segaic16_sprites_set_shadow(running_machine &machine, int which, int shadow); -WRITE16_HANDLER( segaic16_sprites_draw_0_w ); -WRITE16_HANDLER( segaic16_sprites_draw_1_w ); - /* road systems */ #define SEGAIC16_MAX_ROADS 1 @@ -81,7 +61,7 @@ WRITE16_HANDLER( segaic16_road_control_0_w ); #define SEGAIC16_ROTATE_YBOARD 0 void segaic16_rotate_init(running_machine &machine, int which, int type, int colorbase); -void segaic16_rotate_draw(running_machine &machine, int which, bitmap_ind16 &bitmap, const rectangle &cliprect, bitmap_ind16 *srcbitmap); +void segaic16_rotate_draw(running_machine &machine, int which, bitmap_ind16 &bitmap, const rectangle &cliprect, bitmap_ind16 &srcbitmap); READ16_HANDLER( segaic16_rotate_control_0_r ); /************************************* @@ -139,14 +119,6 @@ struct road_info UINT8 * gfx; /* expanded road graphics */ }; -struct palette_info -{ - INT32 entries; /* number of entries (not counting shadows) */ - UINT8 normal[32]; /* RGB translations for normal pixels */ - UINT8 shadow[32]; /* RGB translations for shadowed pixels */ - UINT8 hilight[32]; /* RGB translations for hilighted pixels */ -}; - struct rotate_info { UINT8 index; /* index of this structure */ @@ -157,178 +129,11 @@ struct rotate_info UINT16 * buffer; /* buffered data */ }; -/* interface */ -typedef struct _sega16sp_interface sega16sp_interface; -struct _sega16sp_interface -{ - UINT8 which; /* which sprite RAM */ - UINT16 colorbase; /* base color index */ - INT32 ramsize; /* size of sprite RAM */ - INT32 xoffs; /* X scroll offset */ - void (*draw)(running_machine &machine, device_t* device, bitmap_ind16 &bitmap, const rectangle &cliprect); - int buffer; /* should ram be buffered? */ -}; - - - - -/* state */ -typedef struct _sega16sp_state sega16sp_state; -struct _sega16sp_state -{ - UINT8 which; /* which sprite RAM */ - UINT8 flip; /* screen flip? */ - UINT8 shadow; /* shadow or hilight? */ - UINT8 bank[16]; /* banking redirection */ - UINT16 colorbase; /* base color index */ - INT32 ramsize; /* size of sprite RAM */ - INT32 xoffs; /* X scroll offset */ - void (*draw)(running_machine &machine, device_t* device, bitmap_ind16 &bitmap, const rectangle &cliprect); - UINT16 * spriteram; /* pointer to spriteram pointer */ - UINT16 * buffer; /* buffered spriteram for those that use it */ - -}; /*************************************************************************** FUNCTION PROTOTYPES ***************************************************************************/ -DECLARE_LEGACY_DEVICE(SEGA16SP, sega16sp); - -void segaic16_sprites_hangon_draw(running_machine &machine, device_t *device, bitmap_ind16 &bitmap, const rectangle &cliprect); -void segaic16_sprites_sharrier_draw(running_machine &machine, device_t *device, bitmap_ind16 &bitmap, const rectangle &cliprect); -void segaic16_sprites_16a_draw(running_machine &machine, device_t *device, bitmap_ind16 &bitmap, const rectangle &cliprect); -void segaic16_sprites_16b_draw(running_machine &machine, device_t *device, bitmap_ind16 &bitmap, const rectangle &cliprect); -void segaic16_sprites_yboard_16b_draw(running_machine &machine, device_t *device, bitmap_ind16 &bitmap, const rectangle &cliprect); -void segaic16_sprites_yboard_draw(running_machine &machine, device_t *device, bitmap_ind16 &bitmap, const rectangle &cliprect); -void segaic16_sprites_outrun_draw(running_machine &machine, device_t *device, bitmap_ind16 &bitmap, const rectangle &cliprect); -void segaic16_sprites_xboard_draw(running_machine &machine, device_t *device, bitmap_ind16 &bitmap, const rectangle &cliprect); -void segaic16_sprites_16a_bootleg_wb3bl_draw(running_machine &machine, device_t *device, bitmap_ind16 &bitmap, const rectangle &cliprect); -void segaic16_sprites_16a_bootleg_passhtb_draw(running_machine &machine, device_t *device, bitmap_ind16 &bitmap, const rectangle &cliprect); -void segaic16_sprites_16a_bootleg_shinobld_draw(running_machine &machine, device_t *device, bitmap_ind16 &bitmap, const rectangle &cliprect); - -/* the various sprite configs */ -static const sega16sp_interface hangon_sega16sp_intf = -{ - 0, // which spriteram - 1024, // colorbase - 0x800, // ramsize - 0, // xoffs - segaic16_sprites_hangon_draw, // draw function - 0, // use buffer -}; - -static const sega16sp_interface sharrier_sega16sp_intf = -{ - 0, // which spriteram - 1024, // colorbase - 0x1000, // ramsize - 0, // xoffs - segaic16_sprites_sharrier_draw, // draw function - 0, // use buffer -}; - -static const sega16sp_interface yboard_16b_sega16sp_intf = -{ - 0, // which spriteram - 2048, // colorbase - 0x800, // ramsize - 0, // xoffs - segaic16_sprites_yboard_16b_draw, // draw function - 0, // use buffer -}; - -static const sega16sp_interface yboard_sega16sp_intf = -{ - 1, // which spriteram - 4096, // colorbase - 0x10000, // ramsize - 0, // xoffs - segaic16_sprites_yboard_draw, // draw function - 0, // use buffer -}; - -static const sega16sp_interface s16a_sega16sp_intf = -{ - 0, // which spriteram - 1024, // colorbase - 0x800, // ramsize - 0, // xoffs - segaic16_sprites_16a_draw, // draw function - 0, // use buffer -}; - -static const sega16sp_interface s16b_sega16sp_intf = -{ - 0, // which spriteram - 1024, // colorbase - 0x800, // ramsize - 0, // xoffs - segaic16_sprites_16b_draw, // draw function - 0, // use buffer -}; - -static const sega16sp_interface outrun_sega16sp_intf = -{ - 0, // which spriteram - 2048, // colorbase - 0x1000, // ramsize - 0, // xoffs - segaic16_sprites_outrun_draw, // draw function - 1, // use buffer -}; - - -static const sega16sp_interface xboard_sega16sp_intf = -{ - 0, // which spriteram - 0, // colorbase - 0x1000, // ramsize - 0, // xoffs - segaic16_sprites_xboard_draw, // draw function - 1, // use buffer -}; - - - -#define MCFG_SEGA16SP_ADD(_tag, _interface) \ - MCFG_DEVICE_ADD(_tag, SEGA16SP, 0) \ - MCFG_DEVICE_CONFIG(_interface) - -#define MCFG_SEGA16SP_ADD_HANGON(_tag) \ - MCFG_DEVICE_ADD(_tag, SEGA16SP, 0) \ - MCFG_DEVICE_CONFIG(hangon_sega16sp_intf) - -#define MCFG_SEGA16SP_ADD_SHARRIER(_tag) \ - MCFG_DEVICE_ADD(_tag, SEGA16SP, 0) \ - MCFG_DEVICE_CONFIG(sharrier_sega16sp_intf) - -#define MCFG_SEGA16SP_ADD_YBOARD(_tag) \ - MCFG_DEVICE_ADD(_tag, SEGA16SP, 0) \ - MCFG_DEVICE_CONFIG(yboard_sega16sp_intf) - -#define MCFG_SEGA16SP_ADD_YBOARD_16B(_tag) \ - MCFG_DEVICE_ADD(_tag, SEGA16SP, 0) \ - MCFG_DEVICE_CONFIG(yboard_16b_sega16sp_intf) - -#define MCFG_SEGA16SP_ADD_16A(_tag) \ - MCFG_DEVICE_ADD(_tag, SEGA16SP, 0) \ - MCFG_DEVICE_CONFIG(s16a_sega16sp_intf) - -#define MCFG_SEGA16SP_ADD_16B(_tag) \ - MCFG_DEVICE_ADD(_tag, SEGA16SP, 0) \ - MCFG_DEVICE_CONFIG(s16b_sega16sp_intf) - -#define MCFG_SEGA16SP_ADD_OUTRUN(_tag) \ - MCFG_DEVICE_ADD(_tag, SEGA16SP, 0) \ - MCFG_DEVICE_CONFIG(outrun_sega16sp_intf) - -#define MCFG_SEGA16SP_ADD_XBOARD(_tag) \ - MCFG_DEVICE_ADD(_tag, SEGA16SP, 0) \ - MCFG_DEVICE_CONFIG(xboard_sega16sp_intf) - - -extern struct palette_info segaic16_palette; extern struct rotate_info segaic16_rotate[SEGAIC16_MAX_ROTATE]; extern struct road_info segaic16_road[SEGAIC16_MAX_ROADS]; diff --git a/src/mame/video/segaorun.c b/src/mame/video/segaorun.c index 2f8179e0718..87746439fa3 100644 --- a/src/mame/video/segaorun.c +++ b/src/mame/video/segaorun.c @@ -46,9 +46,6 @@ void segaorun_state::video_start() { - // compute palette info - segaic16_palette_init(0x1000); - if (m_shangon_video) { // initialize the tile/text layers @@ -75,6 +72,9 @@ void segaorun_state::video_start() UINT32 segaorun_state::screen_update_shangon(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { + // start the sprites drawing + m_sprites->draw_async(cliprect); + // reset priorities machine().priority_bitmap.fill(0, cliprect); @@ -98,8 +98,36 @@ UINT32 segaorun_state::screen_update_shangon(screen_device &screen, bitmap_ind16 segaic16_tilemap_draw(screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_TEXT, 0, 0x08); segaic16_tilemap_draw(screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_TEXT, 1, 0x08); - // draw the sprites - segaic16_sprites_draw(screen, bitmap, cliprect, 0); + // mix in sprites + bitmap_ind16 &sprites = m_sprites->bitmap(); + for (const sparse_dirty_rect *rect = m_sprites->first_dirty_rect(cliprect); rect != NULL; rect = rect->next()) + for (int y = rect->min_y; y <= rect->max_y; y++) + { + UINT16 *dest = &bitmap.pix(y); + UINT16 *src = &sprites.pix(y); + UINT8 *pri = &machine().priority_bitmap.pix(y); + for (int x = rect->min_x; x <= rect->max_x; x++) + { + // only process written pixels + UINT16 pix = src[x]; + if (pix != 0xffff) + { + // compare sprite priority against tilemap priority + int priority = (pix >> 10) & 3; + if ((1 << priority) > pri[x]) + { + // if the color is set to maximum, shadow pixels underneath us + if ((pix & 0x03f0) == 0x03f0) + dest[x] += (m_paletteram[dest[x]] & 0x8000) ? m_palette_entries*2 : m_palette_entries; + + // otherwise, just add in sprite palette base + else + dest[x] = 1024 + (pix & 0x3ff); + } + } + } + } + return 0; } @@ -113,6 +141,9 @@ UINT32 segaorun_state::screen_update_outrun(screen_device &screen, bitmap_ind16 return 0; } + // start the sprites drawing + m_sprites->draw_async(cliprect); + // reset priorities machine().priority_bitmap.fill(0, cliprect); @@ -134,7 +165,35 @@ UINT32 segaorun_state::screen_update_outrun(screen_device &screen, bitmap_ind16 segaic16_tilemap_draw(screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_TEXT, 0, 0x04); segaic16_tilemap_draw(screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_TEXT, 1, 0x08); - // draw the sprites - segaic16_sprites_draw(screen, bitmap, cliprect, 0); + // mix in sprites + bitmap_ind16 &sprites = m_sprites->bitmap(); + for (const sparse_dirty_rect *rect = m_sprites->first_dirty_rect(cliprect); rect != NULL; rect = rect->next()) + for (int y = rect->min_y; y <= rect->max_y; y++) + { + UINT16 *dest = &bitmap.pix(y); + UINT16 *src = &sprites.pix(y); + UINT8 *pri = &machine().priority_bitmap.pix(y); + for (int x = rect->min_x; x <= rect->max_x; x++) + { + // only process written pixels + UINT16 pix = src[x]; + if (pix != 0xffff) + { + // compare sprite priority against tilemap priority + int priority = (pix >> 12) & 3; + if ((1 << priority) > pri[x]) + { + // if the shadow flag is set, this triggers shadow/hilight for pen 0xa + if ((pix & 0x400f) == 0x400a) + dest[x] += (m_paletteram[dest[x]] & 0x8000) ? m_palette_entries*2 : m_palette_entries; + + // otherwise, just add in sprite palette base + else + dest[x] = 2048 + (pix & 0x7ff); + } + } + } + } + return 0; } diff --git a/src/mame/video/segas16a.c b/src/mame/video/segas16a.c index 7bff586fd04..1ee48f3630e 100644 --- a/src/mame/video/segas16a.c +++ b/src/mame/video/segas16a.c @@ -46,9 +46,6 @@ void segas16a_state::video_start() { - // compute palette info - segaic16_palette_init(0x800); - // initialize the tile/text layers segaic16_tilemap_init(machine(), 0, SEGAIC16_TILEMAP_16A, 0x000, 0, 1); } @@ -67,6 +64,9 @@ UINT32 segas16a_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap return 0; } + // start the sprites drawing + m_sprites->draw_async(cliprect); + // reset priorities machine().priority_bitmap.fill(0, cliprect); @@ -87,7 +87,35 @@ UINT32 segas16a_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap segaic16_tilemap_draw(screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_TEXT, 0, 0x04); segaic16_tilemap_draw(screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_TEXT, 1, 0x08); - // draw the sprites - segaic16_sprites_draw(screen, bitmap, cliprect, 0); + // mix in sprites + bitmap_ind16 &sprites = m_sprites->bitmap(); + for (const sparse_dirty_rect *rect = m_sprites->first_dirty_rect(cliprect); rect != NULL; rect = rect->next()) + for (int y = rect->min_y; y <= rect->max_y; y++) + { + UINT16 *dest = &bitmap.pix(y); + UINT16 *src = &sprites.pix(y); + UINT8 *pri = &machine().priority_bitmap.pix(y); + for (int x = rect->min_x; x <= rect->max_x; x++) + { + // only process written pixels + UINT16 pix = src[x]; + if (pix != 0xffff) + { + // compare sprite priority against tilemap priority + int priority = pix >> 10; + if ((1 << priority) > pri[x]) + { + // if color bits are all 1, this triggers shadow/hilight + if ((pix & 0x3f0) == 0x3f0) + dest[x] += (m_paletteram[dest[x]] & 0x8000) ? m_palette_entries*2 : m_palette_entries; + + // otherwise, just add in sprite palette base + else + dest[x] = 1024 + (pix & 0x3ff); + } + } + } + } + return 0; } diff --git a/src/mame/video/segas16b.c b/src/mame/video/segas16b.c index acce4c31b9b..6c03f98e534 100644 --- a/src/mame/video/segas16b.c +++ b/src/mame/video/segas16b.c @@ -46,9 +46,6 @@ void segas16b_state::video_start() { - // compute palette info - segaic16_palette_init(0x800); - // initialize the tile/text layers segaic16_tilemap_init(machine(), 0, m_tilemap_type, 0x000, 0, 2); } @@ -67,6 +64,9 @@ UINT32 segas16b_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap return 0; } + // start the sprites drawing + m_sprites->draw_async(cliprect); + // reset priorities machine().priority_bitmap.fill(0, cliprect); @@ -87,7 +87,35 @@ UINT32 segas16b_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap segaic16_tilemap_draw(screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_TEXT, 0, 0x04); segaic16_tilemap_draw(screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_TEXT, 1, 0x08); - // draw the sprites - segaic16_sprites_draw(screen, bitmap, cliprect, 0); + // mix in sprites + bitmap_ind16 &sprites = m_sprites->bitmap(); + for (const sparse_dirty_rect *rect = m_sprites->first_dirty_rect(cliprect); rect != NULL; rect = rect->next()) + for (int y = rect->min_y; y <= rect->max_y; y++) + { + UINT16 *dest = &bitmap.pix(y); + UINT16 *src = &sprites.pix(y); + UINT8 *pri = &machine().priority_bitmap.pix(y); + for (int x = rect->min_x; x <= rect->max_x; x++) + { + // only process written pixels + UINT16 pix = src[x]; + if (pix != 0xffff) + { + // compare sprite priority against tilemap priority + int priority = (pix >> 10) & 3; + if ((1 << priority) > pri[x]) + { + // if the color is set to maximum, shadow pixels underneath us + if ((pix & 0x03f0) == 0x03f0) + dest[x] += (m_paletteram[dest[x]] & 0x8000) ? m_palette_entries*2 : m_palette_entries; + + // otherwise, just add in sprite palette base + else + dest[x] = 1024 + (pix & 0x3ff); + } + } + } + } + return 0; } diff --git a/src/mame/video/segas18.c b/src/mame/video/segas18.c index 6a3b11f1255..6ae5c308dca 100644 --- a/src/mame/video/segas18.c +++ b/src/mame/video/segas18.c @@ -63,9 +63,6 @@ void segas18_state::video_start() m_vdp_enable = false; m_vdp_mixing = 0; - // compute palette info - segaic16_palette_init(0x800); - // initialize the tile/text layers segaic16_tilemap_init(machine(), 0, SEGAIC16_TILEMAP_16B, 0x000, 0, 8); @@ -227,6 +224,9 @@ UINT32 segas18_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, return 0; } + // start the sprites drawing + m_sprites->draw_async(cliprect); + // reset priorities machine().priority_bitmap.fill(0, cliprect); @@ -250,8 +250,35 @@ UINT32 segas18_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, segaic16_tilemap_draw(screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_TEXT, 1, 0x08); if (m_vdp_enable && vdplayer == 3) draw_vdp(screen, bitmap, cliprect, vdppri); - // draw the sprites - segaic16_sprites_draw(screen, bitmap, cliprect, 0); + // mix in sprites + bitmap_ind16 &sprites = m_sprites->bitmap(); + for (const sparse_dirty_rect *rect = m_sprites->first_dirty_rect(cliprect); rect != NULL; rect = rect->next()) + for (int y = rect->min_y; y <= rect->max_y; y++) + { + UINT16 *dest = &bitmap.pix(y); + UINT16 *src = &sprites.pix(y); + UINT8 *pri = &machine().priority_bitmap.pix(y); + for (int x = rect->min_x; x <= rect->max_x; x++) + { + // only process written pixels + UINT16 pix = src[x]; + if (pix != 0xffff) + { + // compare sprite priority against tilemap priority + int priority = (pix >> 10) & 3; + if ((1 << priority) > pri[x]) + { + // if the color is set to maximum, shadow pixels underneath us + if ((pix & 0x03f0) == 0x03f0) + dest[x] += (m_paletteram[dest[x]] & 0x8000) ? m_palette_entries*2 : m_palette_entries; + + // otherwise, just add in sprite palette base + else + dest[x] = 1024 + (pix & 0x3ff); + } + } + } + } #if DEBUG_VDP if (m_vdp_enable && machine().input().code_pressed(KEYCODE_V)) diff --git a/src/mame/video/segaxbd.c b/src/mame/video/segaxbd.c index 36a83a8b726..795ca4f8e02 100644 --- a/src/mame/video/segaxbd.c +++ b/src/mame/video/segaxbd.c @@ -45,9 +45,6 @@ void segaxbd_state::video_start() { - // compute palette info - segaic16_palette_init(0x2000); - // initialize the tile/text layers segaic16_tilemap_init(machine(), 0, SEGAIC16_TILEMAP_16B, 0x1c00, 0, 2); @@ -70,6 +67,9 @@ UINT32 segaxbd_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, return 0; } + // start the sprites drawing + m_sprites->draw_async(cliprect); + // reset priorities machine().priority_bitmap.fill(0, cliprect); @@ -94,7 +94,35 @@ UINT32 segaxbd_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, segaic16_tilemap_draw(screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_TEXT, 0, 0x04); segaic16_tilemap_draw(screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_TEXT, 1, 0x08); - // draw the sprites - segaic16_sprites_draw(screen, bitmap, cliprect, 0); + // mix in sprites + bitmap_ind16 &sprites = m_sprites->bitmap(); + for (const sparse_dirty_rect *rect = m_sprites->first_dirty_rect(cliprect); rect != NULL; rect = rect->next()) + for (int y = rect->min_y; y <= rect->max_y; y++) + { + UINT16 *dest = &bitmap.pix(y); + UINT16 *src = &sprites.pix(y); + UINT8 *pri = &machine().priority_bitmap.pix(y); + for (int x = rect->min_x; x <= rect->max_x; x++) + { + // only process written pixels + UINT16 pix = src[x]; + if (pix != 0xffff) + { + // compare sprite priority against tilemap priority + int priority = (pix >> 12) & 3; + if ((1 << priority) > pri[x]) + { + // if the shadow flag is set, this triggers shadow/hilight for pen 0xa + if ((pix & 0x400f) == 0x400a) + dest[x] += (m_paletteram[dest[x]] & 0x8000) ? m_palette_entries*2 : m_palette_entries; + + // otherwise, just add in sprite palette base + else + dest[x] = pix & 0xfff; + } + } + } + } + return 0; } diff --git a/src/mame/video/segaybd.c b/src/mame/video/segaybd.c index f48b9014741..7fce16d2b96 100644 --- a/src/mame/video/segaybd.c +++ b/src/mame/video/segaybd.c @@ -45,9 +45,6 @@ void segaybd_state::video_start() { - // compute palette info - segaic16_palette_init(0x2000); - // initialize the rotation layer segaic16_rotate_init(machine(), 0, SEGAIC16_ROTATE_YBOARD, 0x000); } @@ -67,14 +64,44 @@ UINT32 segaybd_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, return 0; } - // draw the yboard sprites + // start the sprites drawing rectangle yboard_clip(0, 511, 0, 511); - segaic16_sprites_draw(screen, m_tmp_bitmap, yboard_clip, 1); + m_ysprites->bitmap().fill(0xffff); + m_ysprites->draw_async(yboard_clip); + m_bsprites->draw_async(cliprect); // apply rotation - segaic16_rotate_draw(machine(), 0, bitmap, cliprect, &m_tmp_bitmap); + segaic16_rotate_draw(machine(), 0, bitmap, cliprect, m_ysprites->bitmap()); + + // mix in 16B sprites + bitmap_ind16 &sprites = m_bsprites->bitmap(); + for (const sparse_dirty_rect *rect = m_bsprites->first_dirty_rect(cliprect); rect != NULL; rect = rect->next()) + for (int y = rect->min_y; y <= rect->max_y; y++) + { + UINT16 *dest = &bitmap.pix(y); + UINT16 *src = &sprites.pix(y); + UINT8 *pri = &machine().priority_bitmap.pix(y); + for (int x = rect->min_x; x <= rect->max_x; x++) + { + // only process written pixels + UINT16 pix = src[x]; + if (pix != 0xffff) + { + // compare sprite priority against tilemap priority + int priority = (pix >> 11) & 0x1e; + if (priority < pri[x]) + { + // if the color is set to maximum, shadow pixels underneath us + if ((pix & 0xf) == 0xe) + dest[x] += (m_paletteram[dest[x]] & 0x8000) ? m_palette_entries*2 : m_palette_entries; + + // otherwise, just add in sprite palette base + else + dest[x] = 2048 + (pix & 0x3ff); + } + } + } + } - // draw the 16B sprites - segaic16_sprites_draw(screen, bitmap, cliprect, 0); return 0; } diff --git a/src/mame/video/system16.c b/src/mame/video/system16.c index 9013e097c51..8463bd38450 100644 --- a/src/mame/video/system16.c +++ b/src/mame/video/system16.c @@ -39,14 +39,14 @@ static void setup_system16_bootleg_spritebanking( running_machine& machine ) static const UINT8 default_banklist[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }; int i; for (i = 0; i < 16; i++) - segaic16_sprites_set_bank(machine, 0, i, default_banklist[i]); + state->m_sprites->set_bank(i, default_banklist[i]); } else { static const UINT8 alternate_banklist[] = { 0,255,255,255, 255,255,255,3, 255,255,255,2, 255,1,0,255 }; int i; for (i = 0; i < 16; i++) - segaic16_sprites_set_bank(machine, 0, i, alternate_banklist[i]); + state->m_sprites->set_bank(i, alternate_banklist[i]); } @@ -431,10 +431,7 @@ VIDEO_START( system16 ) state->m_system18 = 0; } - segaic16_palette_init(0x800); setup_system16_bootleg_spritebanking(machine); - - } VIDEO_START( system18old ) @@ -597,9 +594,6 @@ VIDEO_START( s16a_bootleg ) state->m_text_tilemap->set_transparent_pen(0); state->m_bg_tilemaps[0]->set_transparent_pen(0); state->m_bg_tilemaps[1]->set_transparent_pen(0); - - segaic16_palette_init(0x800); - } VIDEO_START( s16a_bootleg_wb3bl ) @@ -635,6 +629,9 @@ SCREEN_UPDATE_IND16( s16a_bootleg ) bitmap.fill(get_black_pen(screen.machine()), cliprect); + // start the sprites drawing + state->m_sprites->draw_async(cliprect); + // I can't bring myself to care about dirty tile marking on something which runs at a bazillion % speed anyway, clean code is better state->m_bg_tilemaps[0]->mark_all_dirty(); state->m_bg_tilemaps[1]->mark_all_dirty(); @@ -672,8 +669,36 @@ SCREEN_UPDATE_IND16( s16a_bootleg ) state->m_text_tilemap->draw(bitmap, cliprect, 0, 0); } - /* draw the sprites */ - segaic16_sprites_draw(screen, bitmap, cliprect, 0); + // mix in sprites + bitmap_ind16 &sprites = state->m_sprites->bitmap(); + for (const sparse_dirty_rect *rect = state->m_sprites->first_dirty_rect(cliprect); rect != NULL; rect = rect->next()) + for (int y = rect->min_y; y <= rect->max_y; y++) + { + UINT16 *dest = &bitmap.pix(y); + UINT16 *src = &sprites.pix(y); +// UINT8 *pri = &screen.machine().priority_bitmap.pix(y); + for (int x = rect->min_x; x <= rect->max_x; x++) + { + // only process written pixels + UINT16 pix = src[x]; + if (pix != 0xffff) + { + // compare sprite priority against tilemap priority +// int priority = (pix >> 12) & 3; + if (1) + { + // if the color is set to maximum, shadow pixels underneath us + if ((pix & 0x03f0) == 0x03f0) + dest[x] += (state->m_paletteram[dest[x]] & 0x8000) ? screen.machine().total_colors()*2 : screen.machine().total_colors(); + + // otherwise, just add in sprite palette base + else + dest[x] = 1024 + (pix & 0x3ff); + } + } + } + } + return 0; } @@ -693,6 +718,9 @@ SCREEN_UPDATE_IND16( s16a_bootleg_passht4b ) bitmap.fill(get_black_pen(screen.machine()), cliprect); + // start the sprites drawing + state->m_sprites->draw_async(cliprect); + // I can't bring myself to care about dirty tile marking on something which runs at a bazillion % speed anyway, clean code is better state->m_bg_tilemaps[0]->mark_all_dirty(); state->m_bg_tilemaps[1]->mark_all_dirty(); @@ -713,8 +741,36 @@ SCREEN_UPDATE_IND16( s16a_bootleg_passht4b ) state->m_text_tilemap->draw(bitmap, cliprect, 0, 0); } - /* draw the sprites */ - segaic16_sprites_draw(screen, bitmap, cliprect, 0); + // mix in sprites + bitmap_ind16 &sprites = state->m_sprites->bitmap(); + for (const sparse_dirty_rect *rect = state->m_sprites->first_dirty_rect(cliprect); rect != NULL; rect = rect->next()) + for (int y = rect->min_y; y <= rect->max_y; y++) + { + UINT16 *dest = &bitmap.pix(y); + UINT16 *src = &sprites.pix(y); +// UINT8 *pri = &screen.machine().priority_bitmap.pix(y); + for (int x = rect->min_x; x <= rect->max_x; x++) + { + // only process written pixels + UINT16 pix = src[x]; + if (pix != 0xffff) + { + // compare sprite priority against tilemap priority +// int priority = (pix >> 12) & 3; + if (1) + { + // if the color is set to maximum, shadow pixels underneath us + if ((pix & 0x03f0) == 0x03f0) + dest[x] += (state->m_paletteram[dest[x]] & 0x8000) ? screen.machine().total_colors()*2 : screen.machine().total_colors(); + + // otherwise, just add in sprite palette base + else + dest[x] = 1024 + (pix & 0x3ff); + } + } + } + } + return 0; } @@ -732,6 +788,9 @@ SCREEN_UPDATE_IND16( system16 ) return 0; } + // start the sprites drawing + state->m_sprites->draw_async(cliprect); + update_page(screen.machine()); screen.machine().priority_bitmap.fill(0, cliprect); @@ -762,8 +821,37 @@ SCREEN_UPDATE_IND16( system16 ) //draw_sprites(screen.machine(), bitmap, cliprect,0); - /* draw the sprites */ - segaic16_sprites_draw(screen, bitmap, cliprect, 0); + + // mix in sprites + bitmap_ind16 &sprites = state->m_sprites->bitmap(); + for (const sparse_dirty_rect *rect = state->m_sprites->first_dirty_rect(cliprect); rect != NULL; rect = rect->next()) + for (int y = rect->min_y; y <= rect->max_y; y++) + { + UINT16 *dest = &bitmap.pix(y); + UINT16 *src = &sprites.pix(y); +// UINT8 *pri = &screen.machine().priority_bitmap.pix(y); + for (int x = rect->min_x; x <= rect->max_x; x++) + { + // only process written pixels + UINT16 pix = src[x]; + if (pix != 0xffff) + { + // compare sprite priority against tilemap priority +// int priority = (pix >> 12) & 3; + if (1) + { + // if the color is set to maximum, shadow pixels underneath us + if ((pix & 0x03f0) == 0x03f0) + dest[x] += (state->m_paletteram[dest[x]] & 0x8000) ? screen.machine().total_colors()*2 : screen.machine().total_colors(); + + // otherwise, just add in sprite palette base + else + dest[x] = 1024 + (pix & 0x3ff); + } + } + } + } + return 0; } @@ -778,6 +866,9 @@ SCREEN_UPDATE_IND16( system18old ) return 0; } + // start the sprites drawing + state->m_sprites->draw_async(cliprect); + update_page(screen.machine()); screen.machine().priority_bitmap.fill(0); @@ -796,8 +887,35 @@ SCREEN_UPDATE_IND16( system18old ) state->m_text_layer->draw(bitmap, cliprect, 1, 0x7); state->m_text_layer->draw(bitmap, cliprect, 0, 0xf); - /* draw the sprites */ - segaic16_sprites_draw(screen, bitmap, cliprect, 0); + // mix in sprites + bitmap_ind16 &sprites = state->m_sprites->bitmap(); + for (const sparse_dirty_rect *rect = state->m_sprites->first_dirty_rect(cliprect); rect != NULL; rect = rect->next()) + for (int y = rect->min_y; y <= rect->max_y; y++) + { + UINT16 *dest = &bitmap.pix(y); + UINT16 *src = &sprites.pix(y); +// UINT8 *pri = &screen.machine().priority_bitmap.pix(y); + for (int x = rect->min_x; x <= rect->max_x; x++) + { + // only process written pixels + UINT16 pix = src[x]; + if (pix != 0xffff) + { + // compare sprite priority against tilemap priority +// int priority = (pix >> 12) & 3; + if (1) + { + // if the color is set to maximum, shadow pixels underneath us + if ((pix & 0x03f0) == 0x03f0) + dest[x] += (state->m_paletteram[dest[x]] & 0x8000) ? screen.machine().total_colors()*2 : screen.machine().total_colors(); + + // otherwise, just add in sprite palette base + else + dest[x] = 1024 + (pix & 0x3ff); + } + } + } + } return 0; } |