Checkpoint: gfx_elements now have a pointer to a palette_device (which is not actually initialized or used yet), and no longer have an unneeded pointer to the running_machine. Removed some gfx_element getter methods described in comments (by Aaron?) as 'a bit gross', and fixed the tiny handful of drivers that were using them (nw)

This commit is contained in:
Alex W. Jackson 2014-03-11 14:28:45 +00:00
parent 940bb2190e
commit 04b9d9e0f9
74 changed files with 496 additions and 361 deletions

View File

@ -60,7 +60,8 @@ const device_type IQ151_VIDEO32 = &device_creator<iq151_video32_device>;
iq151_video32_device::iq151_video32_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, IQ151_VIDEO32, "IQ151 video32", tag, owner, clock, "iq151_video32", __FILE__),
device_iq151cart_interface( mconfig, *this ),
m_gfxdecode(*this, "gfxdecode")
m_gfxdecode(*this, "gfxdecode"),
m_palette(*this, ":palette")
{
}
@ -74,7 +75,7 @@ void iq151_video32_device::device_start()
m_videoram = (UINT8*)memregion("videoram")->base();
m_chargen = (UINT8*)memregion("chargen")->base();
m_gfxdecode->set_gfx(0, auto_alloc(machine(), gfx_element(machine(), iq151_video32_charlayout, m_chargen, 1, 0)));
m_gfxdecode->set_gfx(0, auto_alloc(machine(), gfx_element(m_palette, iq151_video32_charlayout, m_chargen, 1, 0)));
}
//-------------------------------------------------

View File

@ -40,6 +40,7 @@ private:
UINT8 * m_videoram;
UINT8 * m_chargen;
required_device<gfxdecode_device> m_gfxdecode;
required_device<palette_device> m_palette;
};

View File

@ -60,7 +60,8 @@ const device_type IQ151_VIDEO64 = &device_creator<iq151_video64_device>;
iq151_video64_device::iq151_video64_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, IQ151_VIDEO64, "IQ151 video64", tag, owner, clock, "iq151_video64", __FILE__),
device_iq151cart_interface( mconfig, *this ),
m_gfxdecode(*this, "gfxdecode")
m_gfxdecode(*this, "gfxdecode"),
m_palette(*this, ":palette")
{
}
@ -73,7 +74,7 @@ void iq151_video64_device::device_start()
m_videoram = (UINT8*)memregion("videoram")->base();
m_chargen = (UINT8*)memregion("chargen")->base();
m_gfxdecode->set_gfx(0,auto_alloc(machine(), gfx_element(machine(), iq151_video64_charlayout, m_chargen, 1, 0)));
m_gfxdecode->set_gfx(0,auto_alloc(machine(), gfx_element(m_palette, iq151_video64_charlayout, m_chargen, 1, 0)));
}
//-------------------------------------------------

View File

@ -40,7 +40,8 @@ protected:
private:
UINT8 * m_videoram;
UINT8 * m_chargen;
required_device<gfxdecode_device> m_gfxdecode;
required_device<gfxdecode_device> m_gfxdecode;
required_device<palette_device> m_palette;
};

View File

@ -73,6 +73,7 @@ const device_type GFXDECODE = &device_creator<gfxdecode_device>;
gfxdecode_device::gfxdecode_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, GFXDECODE, "gfxdecode", tag, owner, clock, "gfxdecode", __FILE__),
m_palette(NULL),
m_gfxdecodeinfo(NULL)
{
memset(m_gfx, 0, sizeof(m_gfx));
@ -243,7 +244,7 @@ void gfxdecode_device::device_start()
glcopy.total = total;
// allocate the graphics
m_gfx[curgfx] = auto_alloc(machine(), gfx_element(machine(), glcopy, (region_base != NULL) ? region_base + gfxdecode->start : NULL, gfxdecode->total_color_codes, gfxdecode->color_codes_start));
m_gfx[curgfx] = auto_alloc(machine(), gfx_element(m_palette, glcopy, (region_base != NULL) ? region_base + gfxdecode->start : NULL, gfxdecode->total_color_codes, gfxdecode->color_codes_start));
}
}
@ -336,8 +337,9 @@ void gfxdecode_device::device_validity_check(validity_checker &valid) const
// gfx_element - constructor
//-------------------------------------------------
gfx_element::gfx_element(running_machine &machine)
: m_width(0),
gfx_element::gfx_element()
: m_palette(NULL),
m_width(0),
m_height(0),
m_startx(0),
m_starty(0),
@ -355,13 +357,13 @@ gfx_element::gfx_element(running_machine &machine)
m_gfxdata(NULL),
m_layout_is_raw(false),
m_layout_planes(0),
m_layout_charincrement(0),
m_machine(machine)
m_layout_charincrement(0)
{
}
gfx_element::gfx_element(running_machine &machine, UINT8 *base, UINT32 width, UINT32 height, UINT32 rowbytes, UINT32 total_colors, UINT32 color_base, UINT32 color_granularity)
: m_width(width),
gfx_element::gfx_element(palette_device *palette, UINT8 *base, UINT32 width, UINT32 height, UINT32 rowbytes, UINT32 total_colors, UINT32 color_base, UINT32 color_granularity)
: m_palette(palette),
m_width(width),
m_height(height),
m_startx(0),
m_starty(0),
@ -379,13 +381,13 @@ gfx_element::gfx_element(running_machine &machine, UINT8 *base, UINT32 width, UI
m_gfxdata(base),
m_layout_is_raw(true),
m_layout_planes(0),
m_layout_charincrement(0),
m_machine(machine)
m_layout_charincrement(0)
{
}
gfx_element::gfx_element(running_machine &machine, const gfx_layout &gl, const UINT8 *srcdata, UINT32 total_colors, UINT32 color_base)
: m_width(0),
gfx_element::gfx_element(palette_device *palette, const gfx_layout &gl, const UINT8 *srcdata, UINT32 total_colors, UINT32 color_base)
: m_palette(palette),
m_width(0),
m_height(0),
m_startx(0),
m_starty(0),
@ -403,8 +405,7 @@ gfx_element::gfx_element(running_machine &machine, const gfx_layout &gl, const U
m_gfxdata(NULL),
m_layout_is_raw(false),
m_layout_planes(0),
m_layout_charincrement(0),
m_machine(machine)
m_layout_charincrement(0)
{
// set the layout
set_layout(gl, srcdata);

View File

@ -133,12 +133,12 @@ class gfx_element
{
public:
// construction/destruction
gfx_element(running_machine &machine);
gfx_element(running_machine &machine, const gfx_layout &gl, const UINT8 *srcdata, UINT32 total_colors, UINT32 color_base);
gfx_element(running_machine &machine, UINT8 *base, UINT32 width, UINT32 height, UINT32 rowbytes, UINT32 total_colors, UINT32 color_base, UINT32 color_granularity);
gfx_element();
gfx_element(palette_device *palette, const gfx_layout &gl, const UINT8 *srcdata, UINT32 total_colors, UINT32 color_base);
gfx_element(palette_device *palette, UINT8 *base, UINT32 width, UINT32 height, UINT32 rowbytes, UINT32 total_colors, UINT32 color_base, UINT32 color_granularity);
// getters
running_machine &machine() const { return m_machine; }
palette_device *palette() const { return m_palette; }
UINT16 width() const { return m_width; }
UINT16 height() const { return m_height; }
UINT32 elements() const { return m_total_elements; }
@ -149,15 +149,14 @@ public:
UINT32 rowbytes() const { return m_line_modulo; }
bool has_pen_usage() const { return (m_pen_usage.count() > 0); }
// a bit gross that people muck with this stuff...
const UINT8 *srcdata() const { return m_srcdata; }
// used by tilemaps
UINT32 dirtyseq() const { return m_dirtyseq; }
UINT32 *pen_usage() { return &m_pen_usage[0]; }
// setters
void set_layout(const gfx_layout &gl, const UINT8 *srcdata);
void set_raw_layout(const UINT8 *srcdata, UINT32 width, UINT32 height, UINT32 total, UINT32 linemod, UINT32 charmod);
void set_source(const UINT8 *source) { m_srcdata = source; if (m_layout_is_raw) m_gfxdata = const_cast<UINT8 *>(source); memset(m_dirty, 1, elements()); }
void set_palette(palette_device *palette) { m_palette = palette; }
void set_colors(UINT32 colors) { m_total_colors = colors; }
void set_colorbase(UINT16 colorbase) { m_color_base = colorbase; }
void set_granularity(UINT16 granularity) { m_color_granularity = granularity; }
@ -227,8 +226,6 @@ public:
void prio_transtable(palette_device &palette, bitmap_rgb32 &dest, const rectangle &cliprect, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, bitmap_ind8 &priority, UINT32 pmask, const UINT8 *pentable, const pen_t *shadowtable);
void prio_alpha(palette_device &palette, bitmap_rgb32 &dest, const rectangle &cliprect, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, bitmap_ind8 &priority, UINT32 pmask, UINT32 transpen, UINT8 alpha);
// ----- priority masked zoomed graphics drawing -----
// specific prio_zoom implementations for each transparency type
@ -244,13 +241,15 @@ public:
void prio_zoom_transtable(palette_device &palette, bitmap_rgb32 &dest, const rectangle &cliprect, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 scalex, UINT32 scaley, bitmap_ind8 &priority, UINT32 pmask, const UINT8 *pentable, const pen_t *shadowtable);
void prio_zoom_alpha(palette_device &palette, bitmap_rgb32 &dest, const rectangle &cliprect, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 scalex, UINT32 scaley, bitmap_ind8 &priority, UINT32 pmask, UINT32 transpen, UINT8 alpha);
// implementations moved here from specific drivers
void prio_transpen_additive(palette_device &palette, bitmap_rgb32 &dest, const rectangle &cliprect, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, bitmap_ind8 &priority, UINT32 pmask, UINT32 trans_pen);
void prio_zoom_transpen_additive(palette_device &palette, bitmap_rgb32 &dest, const rectangle &cliprect,UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty,UINT32 scalex, UINT32 scaley, bitmap_ind8 &priority, UINT32 pmask,UINT32 trans_pen);
void alphastore(palette_device &palette, bitmap_rgb32 &dest, const rectangle &cliprect,UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty,int fixedalpha, UINT8 *alphatable);
void alphatable(palette_device &palette, bitmap_rgb32 &dest, const rectangle &cliprect, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, int fixedalpha ,UINT8 *alphatable);
private:
// internal state
palette_device *m_palette; // palette used for drawing
UINT16 m_width; // current pixel width of each element (changeble with source clipping)
UINT16 m_height; // current pixel height of each element (changeble with source clipping)
UINT16 m_startx; // current source clip X offset
@ -281,8 +280,6 @@ private:
dynamic_array<UINT32> m_layout_planeoffset;// plane offsets
dynamic_array<UINT32> m_layout_xoffset; // X offsets
dynamic_array<UINT32> m_layout_yoffset; // Y offsets
running_machine &m_machine; // pointer to the owning machine
};
@ -466,6 +463,7 @@ protected:
private:
// configuration state
palette_device * m_palette;
const gfx_decode_entry *m_gfxdecodeinfo; // pointer to array of graphics decoding information
gfx_element * m_gfx[MAX_GFX_ELEMENTS]; // array of pointers to graphic sets (chars, sprites)
};

View File

@ -294,7 +294,7 @@ void tc0091lvc_device::device_start()
//printf("m_gfx_index %d\n", m_gfx_index);
m_gfxdecode->set_gfx(m_gfx_index, auto_alloc(machine(), gfx_element(machine(), char_layout, (UINT8 *)m_pcg_ram, m_palette->entries() / 16, 0)));
m_gfxdecode->set_gfx(m_gfx_index, auto_alloc(machine(), gfx_element(m_palette, char_layout, (UINT8 *)m_pcg_ram, m_palette->entries() / 16, 0)));
}
void tc0091lvc_device::device_reset()

View File

@ -898,6 +898,7 @@ static MACHINE_CONFIG_START( bonzeadv, asuka_state )
MCFG_PC090OJ_PALETTE("palette")
MCFG_TC0100SCN_ADD("tc0100scn", asuka_tc0100scn_intf)
MCFG_TC0100SCN_GFXDECODE("gfxdecode")
MCFG_TC0100SCN_PALETTE("palette")
MCFG_TC0110PCR_ADD("tc0110pcr")
MCFG_TC0110PCR_PALETTE("palette")
@ -945,6 +946,7 @@ static MACHINE_CONFIG_START( asuka, asuka_state )
MCFG_PC090OJ_PALETTE("palette")
MCFG_TC0100SCN_ADD("tc0100scn", asuka_tc0100scn_intf)
MCFG_TC0100SCN_GFXDECODE("gfxdecode")
MCFG_TC0100SCN_PALETTE("palette")
MCFG_TC0110PCR_ADD("tc0110pcr")
MCFG_TC0110PCR_PALETTE("palette")
@ -1000,6 +1002,7 @@ static MACHINE_CONFIG_START( cadash, asuka_state )
MCFG_PC090OJ_PALETTE("palette")
MCFG_TC0100SCN_ADD("tc0100scn", cadash_tc0100scn_intf)
MCFG_TC0100SCN_GFXDECODE("gfxdecode")
MCFG_TC0100SCN_PALETTE("palette")
MCFG_TC0110PCR_ADD("tc0110pcr")
MCFG_TC0110PCR_PALETTE("palette")
@ -1047,6 +1050,7 @@ static MACHINE_CONFIG_START( mofflott, asuka_state )
MCFG_PC090OJ_PALETTE("palette")
MCFG_TC0100SCN_ADD("tc0100scn", cadash_tc0100scn_intf)
MCFG_TC0100SCN_GFXDECODE("gfxdecode")
MCFG_TC0100SCN_PALETTE("palette")
MCFG_TC0110PCR_ADD("tc0110pcr")
MCFG_TC0110PCR_PALETTE("palette")
@ -1098,6 +1102,7 @@ static MACHINE_CONFIG_START( galmedes, asuka_state )
MCFG_PC090OJ_PALETTE("palette")
MCFG_TC0100SCN_ADD("tc0100scn", cadash_tc0100scn_intf)
MCFG_TC0100SCN_GFXDECODE("gfxdecode")
MCFG_TC0100SCN_PALETTE("palette")
MCFG_TC0110PCR_ADD("tc0110pcr")
MCFG_TC0110PCR_PALETTE("palette")
@ -1145,6 +1150,7 @@ static MACHINE_CONFIG_START( eto, asuka_state )
MCFG_PC090OJ_PALETTE("palette")
MCFG_TC0100SCN_ADD("tc0100scn", cadash_tc0100scn_intf)
MCFG_TC0100SCN_GFXDECODE("gfxdecode")
MCFG_TC0100SCN_PALETTE("palette")
MCFG_TC0110PCR_ADD("tc0110pcr")
MCFG_TC0110PCR_PALETTE("palette")

View File

@ -1323,8 +1323,6 @@ static MACHINE_CONFIG_START( btime, btime_state )
MCFG_PALETTE_INIT_OWNER(btime_state,btime)
MCFG_PALETTE_FORMAT(BBGGGRRR)
MCFG_VIDEO_START_OVERRIDE(btime_state,btime)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@ -1414,6 +1412,7 @@ static MACHINE_CONFIG_DERIVED( bnj, btime )
MCFG_GFXDECODE_MODIFY("gfxdecode", bnj)
MCFG_VIDEO_START_OVERRIDE(btime_state,bnj)
MCFG_SCREEN_MODIFY("screen")
MCFG_SCREEN_UPDATE_DRIVER(btime_state, screen_update_bnj)
MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 1*8, 31*8-1) // 256 * 240, confirmed
@ -1470,6 +1469,8 @@ static MACHINE_CONFIG_DERIVED( disco, btime )
MCFG_PALETTE_MODIFY("palette")
MCFG_PALETTE_ENTRIES(32)
MCFG_VIDEO_START_OVERRIDE(btime_state,disco)
MCFG_SCREEN_MODIFY("screen")
MCFG_SCREEN_UPDATE_DRIVER(btime_state, screen_update_disco)
MACHINE_CONFIG_END

View File

@ -321,6 +321,7 @@ public:
m_io_an7(*this, "AN7"),
m_io_config(*this, "CONFIG"),
m_gfxdecode(*this, "gfxdecode"),
m_palette(*this, "palette"),
m_screen(*this, "screen")
{
}
@ -365,6 +366,7 @@ public:
required_ioport m_io_an7;
required_ioport m_io_config;
required_device<gfxdecode_device> m_gfxdecode;
required_device<palette_device> m_palette;
required_device<screen_device> m_screen;
bitmap_ind16 m_temp_bitmap_sprites;
@ -563,7 +565,7 @@ void coolridr_state::video_start()
m_screen->register_screen_bitmap(m_screen1_bitmap);
m_screen->register_screen_bitmap(m_screen2_bitmap);
m_gfxdecode->set_gfx(m_gfx_index, auto_alloc(machine(), gfx_element(machine(), h1_tile_layout, m_h1_pcg, 8, 0)));
m_gfxdecode->set_gfx(m_gfx_index, auto_alloc(machine(), gfx_element(m_palette, h1_tile_layout, m_h1_pcg, 8, 0)));
}
/*

View File

@ -667,7 +667,7 @@ inline void cps3_state::cps3_drawgfxzoom(bitmap_rgb32 &dest_bmp,const rectangle
if (c&0x02) dest[x] |= 0x4000;
if (c&0x04) dest[x] |= 0x8000;
if (c&0x08) dest[x] |= 0x10000;
if (c&0xf0) dest[x] |= gfx->machine().rand(); // ?? not used?
if (c&0xf0) dest[x] |= machine().rand(); // ?? not used?
}
else
{
@ -904,12 +904,12 @@ void cps3_state::video_start()
save_pointer(NAME(m_char_ram), 0x800000 /4);
/* create the char set (gfx will then be updated dynamically from RAM) */
m_gfxdecode->set_gfx(0, auto_alloc(machine(), gfx_element(machine(), cps3_tiles8x8_layout, (UINT8 *)m_ss_ram, m_palette->entries() / 16, 0)));
m_gfxdecode->set_gfx(0, auto_alloc(machine(), gfx_element(m_palette, cps3_tiles8x8_layout, (UINT8 *)m_ss_ram, m_palette->entries() / 16, 0)));
//decode_ssram();
/* create the char set (gfx will then be updated dynamically from RAM) */
m_gfxdecode->set_gfx(1, auto_alloc(machine(), gfx_element(machine(), cps3_tiles16x16_layout, (UINT8 *)m_char_ram, m_palette->entries() / 64, 0)));
m_gfxdecode->set_gfx(1, auto_alloc(machine(), gfx_element(m_palette, cps3_tiles16x16_layout, (UINT8 *)m_char_ram, m_palette->entries() / 64, 0)));
m_gfxdecode->gfx(1)->set_granularity(64);
//decode_charram();

View File

@ -318,8 +318,10 @@ static MACHINE_CONFIG_START( galastrm, galastrm_state )
MCFG_TC0100SCN_ADD("tc0100scn", galastrm_tc0100scn_intf)
MCFG_TC0100SCN_GFXDECODE("gfxdecode")
MCFG_TC0100SCN_PALETTE("palette")
MCFG_TC0480SCP_ADD("tc0480scp", galastrm_tc0480scp_intf)
MCFG_TC0480SCP_GFXDECODE("gfxdecode")
MCFG_TC0480SCP_PALETTE("palette")
/* sound hardware */
MCFG_FRAGMENT_ADD(taito_en_sound)

View File

@ -372,8 +372,10 @@ static MACHINE_CONFIG_START( groundfx, groundfx_state )
MCFG_TC0100SCN_ADD("tc0100scn", groundfx_tc0100scn_intf)
MCFG_TC0100SCN_GFXDECODE("gfxdecode")
MCFG_TC0100SCN_PALETTE("palette")
MCFG_TC0480SCP_ADD("tc0480scp", groundfx_tc0480scp_intf)
MCFG_TC0480SCP_GFXDECODE("gfxdecode")
MCFG_TC0480SCP_PALETTE("palette")
/* sound hardware */
MCFG_FRAGMENT_ADD(taito_en_sound)

View File

@ -317,6 +317,7 @@ static MACHINE_CONFIG_START( gunbustr, gunbustr_state )
MCFG_TC0480SCP_ADD("tc0480scp", gunbustr_tc0480scp_intf)
MCFG_TC0480SCP_GFXDECODE("gfxdecode")
MCFG_TC0480SCP_PALETTE("palette")
/* sound hardware */
MCFG_FRAGMENT_ADD(taito_en_sound)

View File

@ -360,7 +360,7 @@ void igs017_state::draw_sprite(bitmap_ind16 &bitmap,const rectangle &cliprect, i
if ( addr + dimx * dimy >= m_sprites_gfx_size )
return;
gfx_element gfx(machine(), m_sprites_gfx + addr, dimx, dimy, dimx, m_palette->entries(), 0x100, 32);
gfx_element gfx(m_palette, m_sprites_gfx + addr, dimx, dimy, dimx, m_palette->entries(), 0x100, 32);
gfx.transpen(m_palette, bitmap,cliprect,
0, color,

View File

@ -91,6 +91,7 @@ public:
TILE_GET_INFO_MEMBER(get_fg_tile_info);
virtual void video_start();
UINT32 screen_update_limenko(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
void draw_single_sprite(bitmap_ind16 &dest_bmp,const rectangle &clip,gfx_element *gfx,UINT32 code,UINT32 color,int flipx,int flipy,int sx,int sy,int priority);
void draw_sprites(UINT32 *sprites, const rectangle &cliprect, int count);
void copy_sprites(bitmap_ind16 &bitmap, bitmap_ind16 &sprites_bitmap, bitmap_ind8 &priority_bitmap, const rectangle &cliprect);
required_device<cpu_device> m_maincpu;
@ -310,11 +311,10 @@ TILE_GET_INFO_MEMBER(limenko_state::get_fg_tile_info)
SET_TILE_INFO_MEMBER(0,tile,color,0);
}
static void draw_single_sprite(bitmap_ind16 &dest_bmp,const rectangle &clip,gfx_element *gfx,
void limenko_state::draw_single_sprite(bitmap_ind16 &dest_bmp,const rectangle &clip,gfx_element *gfx,
UINT32 code,UINT32 color,int flipx,int flipy,int sx,int sy,
int priority)
{
limenko_state *state = gfx->machine().driver_data<limenko_state>();
int pal_base = gfx->colorbase() + gfx->granularity() * (color % gfx->colors());
const UINT8 *source_base = gfx->get_data(code % gfx->elements());
@ -385,7 +385,7 @@ static void draw_single_sprite(bitmap_ind16 &dest_bmp,const rectangle &clip,gfx_
{
const UINT8 *source = source_base + (y_index>>16) * gfx->rowbytes();
UINT16 *dest = &dest_bmp.pix16(y);
UINT8 *pri = &state->m_sprites_bitmap_pri.pix8(y);
UINT8 *pri = &m_sprites_bitmap_pri.pix8(y);
int x, x_index = x_index_base;
for( x=sx; x<ex; x++ )
@ -452,7 +452,7 @@ void limenko_state::draw_sprites(UINT32 *sprites, const rectangle &cliprect, int
continue;
/* prepare GfxElement on the fly */
gfx_element gfx(machine(), gfxdata, width, height, width, m_palette->entries(), 0, 256);
gfx_element gfx(m_palette, gfxdata, width, height, width, m_palette->entries(), 0, 256);
draw_single_sprite(m_sprites_bitmap,cliprect,&gfx,0,color,flipx,flipy,x,y,pri);

View File

@ -482,10 +482,10 @@ VIDEO_START_MEMBER(mpu4vid_state,mpu4_vid)
assert(m_gfx_index != MAX_GFX_ELEMENTS);
/* create the char set (gfx will then be updated dynamically from RAM) */
m_gfxdecode->set_gfx(m_gfx_index+0, auto_alloc(machine(), gfx_element(machine(), mpu4_vid_char_8x8_layout, reinterpret_cast<UINT8 *>(m_vid_vidram.target()), m_palette->entries() / 16, 0)));
m_gfxdecode->set_gfx(m_gfx_index+1, auto_alloc(machine(), gfx_element(machine(), mpu4_vid_char_8x16_layout, reinterpret_cast<UINT8 *>(m_vid_vidram.target()), m_palette->entries() / 16, 0)));
m_gfxdecode->set_gfx(m_gfx_index+2, auto_alloc(machine(), gfx_element(machine(), mpu4_vid_char_16x8_layout, reinterpret_cast<UINT8 *>(m_vid_vidram.target()), m_palette->entries() / 16, 0)));
m_gfxdecode->set_gfx(m_gfx_index+3, auto_alloc(machine(), gfx_element(machine(), mpu4_vid_char_16x16_layout, reinterpret_cast<UINT8 *>(m_vid_vidram.target()), m_palette->entries() / 16, 0)));
m_gfxdecode->set_gfx(m_gfx_index+0, auto_alloc(machine(), gfx_element(m_palette, mpu4_vid_char_8x8_layout, reinterpret_cast<UINT8 *>(m_vid_vidram.target()), m_palette->entries() / 16, 0)));
m_gfxdecode->set_gfx(m_gfx_index+1, auto_alloc(machine(), gfx_element(m_palette, mpu4_vid_char_8x16_layout, reinterpret_cast<UINT8 *>(m_vid_vidram.target()), m_palette->entries() / 16, 0)));
m_gfxdecode->set_gfx(m_gfx_index+2, auto_alloc(machine(), gfx_element(m_palette, mpu4_vid_char_16x8_layout, reinterpret_cast<UINT8 *>(m_vid_vidram.target()), m_palette->entries() / 16, 0)));
m_gfxdecode->set_gfx(m_gfx_index+3, auto_alloc(machine(), gfx_element(m_palette, mpu4_vid_char_16x16_layout, reinterpret_cast<UINT8 *>(m_vid_vidram.target()), m_palette->entries() / 16, 0)));
m_scn2674->init_stuff();

View File

@ -1443,7 +1443,7 @@ void namco_c45_road_device::draw(bitmap_ind16 &bitmap, const rectangle &cliprect
void namco_c45_road_device::device_start()
{
// create a gfx_element describing the road graphics
m_gfxdecode->set_gfx(0, auto_alloc(machine(), gfx_element(machine(), s_tile_layout, 0x10000 + (UINT8 *)&m_ram[0], 0x3f, 0xf00)));
m_gfxdecode->set_gfx(0, auto_alloc(machine(), gfx_element(m_palette, s_tile_layout, 0x10000 + (UINT8 *)&m_ram[0], 0x3f, 0xf00)));
// create a tilemap for the road
m_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(namco_c45_road_device::get_road_info), this),

View File

@ -842,10 +842,14 @@ static MACHINE_CONFIG_START( ninjaw, ninjaw_state )
MCFG_TC0100SCN_ADD("tc0100scn_1", darius2_tc0100scn_intf_l)
MCFG_TC0100SCN_GFXDECODE("gfxdecode")
MCFG_TC0100SCN_PALETTE("palette")
MCFG_TC0100SCN_ADD("tc0100scn_2", darius2_tc0100scn_intf_m)
MCFG_TC0100SCN_GFXDECODE("gfxdecode")
MCFG_TC0100SCN_PALETTE("palette2")
MCFG_TC0100SCN_ADD("tc0100scn_3", darius2_tc0100scn_intf_r)
MCFG_TC0100SCN_GFXDECODE("gfxdecode")
MCFG_TC0100SCN_PALETTE("palette3")
MCFG_TC0110PCR_ADD("tc0110pcr_1")
MCFG_TC0110PCR_PALETTE("palette")
MCFG_TC0110PCR_ADD("tc0110pcr_2")
@ -933,10 +937,14 @@ static MACHINE_CONFIG_START( darius2, ninjaw_state )
MCFG_TC0100SCN_ADD("tc0100scn_1", darius2_tc0100scn_intf_l)
MCFG_TC0100SCN_GFXDECODE("gfxdecode")
MCFG_TC0100SCN_PALETTE("palette")
MCFG_TC0100SCN_ADD("tc0100scn_2", darius2_tc0100scn_intf_m)
MCFG_TC0100SCN_GFXDECODE("gfxdecode")
MCFG_TC0100SCN_PALETTE("palette2")
MCFG_TC0100SCN_ADD("tc0100scn_3", darius2_tc0100scn_intf_r)
MCFG_TC0100SCN_GFXDECODE("gfxdecode")
MCFG_TC0100SCN_PALETTE("palette3")
MCFG_TC0110PCR_ADD("tc0110pcr_1")
MCFG_TC0110PCR_PALETTE("palette")
MCFG_TC0110PCR_ADD("tc0110pcr_2")

View File

@ -693,6 +693,8 @@ static MACHINE_CONFIG_START( othunder, othunder_state )
MCFG_TC0100SCN_ADD("tc0100scn", othunder_tc0100scn_intf)
MCFG_TC0100SCN_GFXDECODE("gfxdecode")
MCFG_TC0100SCN_PALETTE("palette")
MCFG_TC0110PCR_ADD("tc0110pcr")
MCFG_TC0110PCR_PALETTE("palette")

View File

@ -4025,7 +4025,7 @@ void pgm_state::expand_32x32x5bpp()
glcopy.total = (gfx2_size_needed / glcopy.charincrement)*8;
m_gfxdecode->set_gfx(1, auto_alloc(machine(), gfx_element(machine(), glcopy, (UINT8 *)dst, 32, 0x400)));
m_gfxdecode->set_gfx(1, auto_alloc(machine(), gfx_element(m_palette, glcopy, (UINT8 *)dst, 32, 0x400)));
}

View File

@ -224,7 +224,7 @@ void popobear_state::video_start()
/* create the char set (gfx will then be updated dynamically from RAM) */
m_gfxdecode->set_gfx(m_gfx_index, auto_alloc(machine(), gfx_element(machine(), popobear_char_layout, (UINT8 *)m_vram_rearranged, m_palette->entries() / 16, 0)));
m_gfxdecode->set_gfx(m_gfx_index, auto_alloc(machine(), gfx_element(m_palette, popobear_char_layout, (UINT8 *)m_vram_rearranged, m_palette->entries() / 16, 0)));
m_bg_tilemap[0] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(popobear_state::get_popobear_bg0_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 128, 64);
m_bg_tilemap[1] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(popobear_state::get_popobear_bg1_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 128, 64);

View File

@ -271,7 +271,6 @@ static MACHINE_CONFIG_START( dommy, scregg_state )
MCFG_PALETTE_ADD("palette", 8)
MCFG_PALETTE_INIT_OWNER(scregg_state,btime)
MCFG_VIDEO_START_OVERRIDE(scregg_state,btime)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@ -303,7 +302,6 @@ static MACHINE_CONFIG_START( scregg, scregg_state )
MCFG_PALETTE_ADD("palette", 8)
MCFG_PALETTE_INIT_OWNER(scregg_state,btime)
MCFG_VIDEO_START_OVERRIDE(scregg_state,btime)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")

View File

@ -552,6 +552,7 @@ static MACHINE_CONFIG_START( slapshot, slapshot_state )
MCFG_TC0480SCP_ADD("tc0480scp", slapshot_tc0480scp_intf)
MCFG_TC0480SCP_GFXDECODE("gfxdecode")
MCFG_TC0480SCP_PALETTE("palette")
MCFG_TC0360PRI_ADD("tc0360pri")
/* sound hardware */
@ -599,6 +600,7 @@ static MACHINE_CONFIG_START( opwolf3, slapshot_state )
MCFG_TC0480SCP_ADD("tc0480scp", slapshot_tc0480scp_intf)
MCFG_TC0480SCP_GFXDECODE("gfxdecode")
MCFG_TC0480SCP_PALETTE("palette")
MCFG_TC0360PRI_ADD("tc0360pri")
/* sound hardware */

View File

@ -169,7 +169,7 @@ void srmp6_state::video_start()
m_sprram_old = auto_alloc_array_clear(machine(), UINT16, 0x80000/2);
/* create the char set (gfx will then be updated dynamically from RAM) */
m_gfxdecode->set_gfx(0, auto_alloc(machine(), gfx_element(machine(), tiles8x8_layout, (UINT8*)m_tileram, m_palette->entries() / 256, 0)));
m_gfxdecode->set_gfx(0, auto_alloc(machine(), gfx_element(m_palette, tiles8x8_layout, (UINT8*)m_tileram, m_palette->entries() / 256, 0)));
m_gfxdecode->gfx(0)->set_granularity(256);
m_brightness = 0x60;

View File

@ -351,6 +351,7 @@ static MACHINE_CONFIG_START( superchs, superchs_state )
MCFG_TC0480SCP_ADD("tc0480scp", superchs_tc0480scp_intf)
MCFG_TC0480SCP_GFXDECODE("gfxdecode")
MCFG_TC0480SCP_PALETTE("palette")
/* sound hardware */
MCFG_FRAGMENT_ADD(taito_en_sound)

View File

@ -3077,6 +3077,8 @@ static MACHINE_CONFIG_DERIVED( finalb, taito_f2_tc0220ioc )
MCFG_TC0100SCN_ADD("tc0100scn", finalb_tc0100scn_intf)
MCFG_TC0100SCN_GFXDECODE("gfxdecode")
MCFG_TC0100SCN_PALETTE("palette")
MCFG_TC0110PCR_ADD("tc0110pcr")
MCFG_TC0110PCR_PALETTE("palette")
MACHINE_CONFIG_END
@ -3097,6 +3099,8 @@ static MACHINE_CONFIG_DERIVED( dondokod, taito_f2_tc0220ioc )
MCFG_TC0100SCN_ADD("tc0100scn", dondokod_tc0100scn_intf)
MCFG_TC0100SCN_GFXDECODE("gfxdecode")
MCFG_TC0100SCN_PALETTE("palette")
MCFG_TC0280GRD_ADD("tc0280grd", taitof2_tc0280grd_intf)
MCFG_TC0280GRD_GFXDECODE("gfxdecode");
MCFG_TC0360PRI_ADD("tc0360pri")
@ -3116,6 +3120,8 @@ static MACHINE_CONFIG_DERIVED( megab, taito_f2_tc0220ioc )
MCFG_TC0100SCN_ADD("tc0100scn", liquidk_tc0100scn_intf)
MCFG_TC0100SCN_GFXDECODE("gfxdecode")
MCFG_TC0100SCN_PALETTE("palette")
MCFG_TC0360PRI_ADD("tc0360pri")
MACHINE_CONFIG_END
@ -3135,8 +3141,12 @@ static MACHINE_CONFIG_DERIVED( thundfox, taito_f2_tc0220ioc )
MCFG_TC0100SCN_ADD("tc0100scn_1", thundfox_tc0100scn_intf_1)
MCFG_TC0100SCN_GFXDECODE("gfxdecode")
MCFG_TC0100SCN_PALETTE("palette")
MCFG_TC0100SCN_ADD("tc0100scn_2", thundfox_tc0100scn_intf_2)
MCFG_TC0100SCN_GFXDECODE("gfxdecode")
MCFG_TC0100SCN_PALETTE("palette")
MCFG_TC0360PRI_ADD("tc0360pri")
MACHINE_CONFIG_END
@ -3155,6 +3165,8 @@ static MACHINE_CONFIG_DERIVED( cameltry, taito_f2_tc0220ioc )
MCFG_TC0100SCN_ADD("tc0100scn", dondokod_tc0100scn_intf)
MCFG_TC0100SCN_GFXDECODE("gfxdecode")
MCFG_TC0100SCN_PALETTE("palette")
MCFG_TC0280GRD_ADD("tc0280grd", taitof2_tc0280grd_intf)
MCFG_TC0280GRD_GFXDECODE("gfxdecode");
MCFG_TC0360PRI_ADD("tc0360pri")
@ -3174,6 +3186,8 @@ static MACHINE_CONFIG_DERIVED( qtorimon, taito_f2_tc0220ioc )
MCFG_TC0100SCN_ADD("tc0100scn", taitof2_tc0100scn_intf)
MCFG_TC0100SCN_GFXDECODE("gfxdecode")
MCFG_TC0100SCN_PALETTE("palette")
MCFG_TC0110PCR_ADD("tc0110pcr")
MCFG_TC0110PCR_PALETTE("palette")
MACHINE_CONFIG_END
@ -3193,6 +3207,8 @@ static MACHINE_CONFIG_DERIVED( liquidk, taito_f2_tc0220ioc )
MCFG_TC0100SCN_ADD("tc0100scn", liquidk_tc0100scn_intf)
MCFG_TC0100SCN_GFXDECODE("gfxdecode")
MCFG_TC0100SCN_PALETTE("palette")
MCFG_TC0360PRI_ADD("tc0360pri")
MACHINE_CONFIG_END
@ -3210,6 +3226,8 @@ static MACHINE_CONFIG_DERIVED( quizhq, taito_f2 )
MCFG_TC0100SCN_ADD("tc0100scn", taitof2_tc0100scn_intf)
MCFG_TC0100SCN_GFXDECODE("gfxdecode")
MCFG_TC0100SCN_PALETTE("palette")
MCFG_TC0110PCR_ADD("tc0110pcr")
MCFG_TC0110PCR_PALETTE("palette")
MACHINE_CONFIG_END
@ -3232,6 +3250,7 @@ static MACHINE_CONFIG_DERIVED( ssi, taito_f2_tc0510nio )
MCFG_TC0100SCN_ADD("tc0100scn", liquidk_tc0100scn_intf)
MCFG_TC0100SCN_GFXDECODE("gfxdecode")
MCFG_TC0100SCN_PALETTE("palette")
MACHINE_CONFIG_END
@ -3252,6 +3271,8 @@ static MACHINE_CONFIG_DERIVED( gunfront, taito_f2_tc0510nio )
MCFG_TC0100SCN_ADD("tc0100scn", liquidk_tc0100scn_intf)
MCFG_TC0100SCN_GFXDECODE("gfxdecode")
MCFG_TC0100SCN_PALETTE("palette")
MCFG_TC0360PRI_ADD("tc0360pri")
MACHINE_CONFIG_END
@ -3269,6 +3290,8 @@ static MACHINE_CONFIG_DERIVED( growl, taito_f2 )
MCFG_TC0100SCN_ADD("tc0100scn", liquidk_tc0100scn_intf)
MCFG_TC0100SCN_GFXDECODE("gfxdecode")
MCFG_TC0100SCN_PALETTE("palette")
MCFG_TC0360PRI_ADD("tc0360pri")
MACHINE_CONFIG_END
@ -3284,6 +3307,8 @@ static MACHINE_CONFIG_DERIVED( mjnquest, taito_f2 )
MCFG_TC0100SCN_ADD("tc0100scn", taitof2_tc0100scn_intf)
MCFG_TC0100SCN_GFXDECODE("gfxdecode")
MCFG_TC0100SCN_PALETTE("palette")
MCFG_TC0110PCR_ADD("tc0110pcr")
MCFG_TC0110PCR_PALETTE("palette")
MACHINE_CONFIG_END
@ -3304,6 +3329,8 @@ static MACHINE_CONFIG_DERIVED( footchmp, taito_f2 )
MCFG_TC0480SCP_ADD("tc0480scp", footchmp_tc0480scp_intf)
MCFG_TC0480SCP_GFXDECODE("gfxdecode")
MCFG_TC0480SCP_PALETTE("palette")
MCFG_TC0360PRI_ADD("tc0360pri")
MACHINE_CONFIG_END
@ -3330,6 +3357,7 @@ static MACHINE_CONFIG_DERIVED( hthero, taito_f2 )
MCFG_TC0360PRI_ADD("tc0360pri")
MCFG_TC0480SCP_ADD("tc0480scp", hthero_tc0480scp_intf)
MCFG_TC0480SCP_GFXDECODE("gfxdecode")
MCFG_TC0480SCP_PALETTE("palette")
MACHINE_CONFIG_END
@ -3348,6 +3376,8 @@ static MACHINE_CONFIG_DERIVED( koshien, taito_f2_tc0510nio )
MCFG_TC0100SCN_ADD("tc0100scn", koshien_tc0100scn_intf)
MCFG_TC0100SCN_GFXDECODE("gfxdecode")
MCFG_TC0100SCN_PALETTE("palette")
MCFG_TC0360PRI_ADD("tc0360pri")
MACHINE_CONFIG_END
@ -3369,6 +3399,7 @@ static MACHINE_CONFIG_DERIVED( yuyugogo, taito_f2_tc0510nio )
MCFG_TC0100SCN_ADD("tc0100scn", liquidk_tc0100scn_intf)
MCFG_TC0100SCN_GFXDECODE("gfxdecode")
MCFG_TC0100SCN_PALETTE("palette")
MACHINE_CONFIG_END
@ -3385,6 +3416,8 @@ static MACHINE_CONFIG_DERIVED( ninjak, taito_f2 )
MCFG_TC0100SCN_ADD("tc0100scn", finalb_tc0100scn_intf)
MCFG_TC0100SCN_GFXDECODE("gfxdecode")
MCFG_TC0100SCN_PALETTE("palette")
MCFG_TC0360PRI_ADD("tc0360pri")
MACHINE_CONFIG_END
@ -3402,6 +3435,8 @@ static MACHINE_CONFIG_DERIVED( solfigtr, taito_f2 )
MCFG_TC0100SCN_ADD("tc0100scn", solfigtr_tc0100scn_intf)
MCFG_TC0100SCN_GFXDECODE("gfxdecode")
MCFG_TC0100SCN_PALETTE("palette")
MCFG_TC0360PRI_ADD("tc0360pri")
MACHINE_CONFIG_END
@ -3418,6 +3453,7 @@ static MACHINE_CONFIG_DERIVED( qzquest, taito_f2_tc0510nio )
MCFG_TC0100SCN_ADD("tc0100scn", taitof2_tc0100scn_intf)
MCFG_TC0100SCN_GFXDECODE("gfxdecode")
MCFG_TC0100SCN_PALETTE("palette")
MACHINE_CONFIG_END
@ -3435,6 +3471,8 @@ static MACHINE_CONFIG_DERIVED( pulirula, taito_f2_tc0510nio )
MCFG_TC0100SCN_ADD("tc0100scn", dondokod_tc0100scn_intf)
MCFG_TC0100SCN_GFXDECODE("gfxdecode")
MCFG_TC0100SCN_PALETTE("palette")
MCFG_TC0430GRW_ADD("tc0430grw", taitof2_tc0430grw_intf)
MCFG_TC0430GRW_GFXDECODE("gfxdecode")
MCFG_TC0360PRI_ADD("tc0360pri")
@ -3458,6 +3496,8 @@ static MACHINE_CONFIG_DERIVED( metalb, taito_f2_tc0510nio )
MCFG_TC0480SCP_ADD("tc0480scp", metalb_tc0480scp_intf)
MCFG_TC0480SCP_GFXDECODE("gfxdecode")
MCFG_TC0480SCP_PALETTE("palette")
MCFG_TC0360PRI_ADD("tc0360pri")
MACHINE_CONFIG_END
@ -3475,6 +3515,7 @@ static MACHINE_CONFIG_DERIVED( qzchikyu, taito_f2_tc0510nio )
MCFG_TC0100SCN_ADD("tc0100scn", qzchikyu_tc0100scn_intf)
MCFG_TC0100SCN_GFXDECODE("gfxdecode")
MCFG_TC0100SCN_PALETTE("palette")
MACHINE_CONFIG_END
@ -3492,6 +3533,7 @@ static MACHINE_CONFIG_DERIVED( yesnoj, taito_f2 )
MCFG_TC0100SCN_ADD("tc0100scn", liquidk_tc0100scn_intf)
MCFG_TC0100SCN_GFXDECODE("gfxdecode")
MCFG_TC0100SCN_PALETTE("palette")
MACHINE_CONFIG_END
@ -3509,6 +3551,8 @@ static MACHINE_CONFIG_DERIVED( deadconx, taito_f2 )
MCFG_TC0480SCP_ADD("tc0480scp", deadconx_tc0480scp_intf)
MCFG_TC0480SCP_GFXDECODE("gfxdecode")
MCFG_TC0480SCP_PALETTE("palette")
MCFG_TC0360PRI_ADD("tc0360pri")
MACHINE_CONFIG_END
@ -3527,6 +3571,8 @@ static MACHINE_CONFIG_DERIVED( deadconxj, taito_f2 )
MCFG_TC0480SCP_ADD("tc0480scp", deadconxj_tc0480scp_intf)
MCFG_TC0480SCP_GFXDECODE("gfxdecode")
MCFG_TC0480SCP_PALETTE("palette")
MCFG_TC0360PRI_ADD("tc0360pri")
MACHINE_CONFIG_END
@ -3547,6 +3593,8 @@ static MACHINE_CONFIG_DERIVED( dinorex, taito_f2_tc0510nio )
MCFG_TC0100SCN_ADD("tc0100scn", liquidk_tc0100scn_intf)
MCFG_TC0100SCN_GFXDECODE("gfxdecode")
MCFG_TC0100SCN_PALETTE("palette")
MCFG_TC0360PRI_ADD("tc0360pri")
MACHINE_CONFIG_END
@ -3567,6 +3615,8 @@ static MACHINE_CONFIG_DERIVED( qjinsei, taito_f2_tc0510nio )
MCFG_TC0100SCN_ADD("tc0100scn", liquidk_tc0100scn_intf)
MCFG_TC0100SCN_GFXDECODE("gfxdecode")
MCFG_TC0100SCN_PALETTE("palette")
MCFG_TC0360PRI_ADD("tc0360pri")
MACHINE_CONFIG_END
@ -3587,6 +3637,8 @@ static MACHINE_CONFIG_DERIVED( qcrayon, taito_f2_tc0510nio )
MCFG_TC0100SCN_ADD("tc0100scn", liquidk_tc0100scn_intf)
MCFG_TC0100SCN_GFXDECODE("gfxdecode")
MCFG_TC0100SCN_PALETTE("palette")
MCFG_TC0360PRI_ADD("tc0360pri")
MACHINE_CONFIG_END
@ -3607,6 +3659,8 @@ static MACHINE_CONFIG_DERIVED( qcrayon2, taito_f2_tc0510nio )
MCFG_TC0100SCN_ADD("tc0100scn", liquidk_tc0100scn_intf)
MCFG_TC0100SCN_GFXDECODE("gfxdecode")
MCFG_TC0100SCN_PALETTE("palette")
MCFG_TC0360PRI_ADD("tc0360pri")
MACHINE_CONFIG_END
@ -3625,6 +3679,8 @@ static MACHINE_CONFIG_DERIVED( driftout, taito_f2_tc0510nio )
MCFG_TC0100SCN_ADD("tc0100scn", dondokod_tc0100scn_intf)
MCFG_TC0100SCN_GFXDECODE("gfxdecode")
MCFG_TC0100SCN_PALETTE("palette")
MCFG_TC0430GRW_ADD("tc0430grw", taitof2_tc0430grw_intf)
MCFG_TC0430GRW_GFXDECODE("gfxdecode")
MCFG_TC0360PRI_ADD("tc0360pri")
@ -3662,6 +3718,8 @@ static MACHINE_CONFIG_START( cameltrya, taitof2_state )
MCFG_TC0100SCN_ADD("tc0100scn", dondokod_tc0100scn_intf)
MCFG_TC0100SCN_GFXDECODE("gfxdecode")
MCFG_TC0100SCN_PALETTE("palette")
MCFG_TC0280GRD_ADD("tc0280grd", taitof2_tc0280grd_intf)
MCFG_TC0280GRD_GFXDECODE("gfxdecode");
MCFG_TC0360PRI_ADD("tc0360pri")
@ -3715,6 +3773,8 @@ static MACHINE_CONFIG_START( driveout, taitof2_state )
MCFG_TC0100SCN_ADD("tc0100scn", dondokod_tc0100scn_intf)
MCFG_TC0100SCN_GFXDECODE("gfxdecode")
MCFG_TC0100SCN_PALETTE("palette")
MCFG_TC0430GRW_ADD("tc0430grw", taitof2_tc0430grw_intf)
MCFG_TC0430GRW_GFXDECODE("gfxdecode")
MCFG_TC0360PRI_ADD("tc0360pri")

View File

@ -700,6 +700,7 @@ static MACHINE_CONFIG_START( syvalion, taitoh_state )
MCFG_TC0080VCO_ADD("tc0080vco", syvalion_tc0080vco_intf)
MCFG_TC0080VCO_GFXDECODE("gfxdecode")
MCFG_TC0080VCO_PALETTE("palette")
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@ -743,6 +744,7 @@ static MACHINE_CONFIG_START( recordbr, taitoh_state )
MCFG_TC0080VCO_ADD("tc0080vco", recordbr_tc0080vco_intf)
MCFG_TC0080VCO_GFXDECODE("gfxdecode")
MCFG_TC0080VCO_PALETTE("palette")
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@ -794,6 +796,7 @@ static MACHINE_CONFIG_START( dleague, taitoh_state )
MCFG_TC0080VCO_ADD("tc0080vco", recordbr_tc0080vco_intf)
MCFG_TC0080VCO_GFXDECODE("gfxdecode")
MCFG_TC0080VCO_PALETTE("palette")
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")

View File

@ -261,6 +261,7 @@ static MACHINE_CONFIG_START( parentj, taitoo_state )
MCFG_TC0080VCO_ADD("tc0080vco", parentj_intf)
MCFG_TC0080VCO_GFXDECODE("gfxdecode")
MCFG_TC0080VCO_PALETTE("palette")
MCFG_SPEAKER_STANDARD_MONO("mono")

View File

@ -3091,6 +3091,8 @@ static MACHINE_CONFIG_START( contcirc, taitoz_state )
MCFG_TC0100SCN_ADD("tc0100scn", taitoz_tc0100scn_intf)
MCFG_TC0100SCN_GFXDECODE("gfxdecode")
MCFG_TC0100SCN_PALETTE("palette")
MCFG_TC0150ROD_ADD("tc0150rod", taitoz_tc0150rod_intf)
MCFG_TC0110PCR_ADD("tc0110pcr")
MCFG_TC0110PCR_PALETTE("palette")
@ -3156,6 +3158,8 @@ static MACHINE_CONFIG_START( chasehq, taitoz_state )
MCFG_TC0100SCN_ADD("tc0100scn", chasehq_tc0100scn_intf)
MCFG_TC0100SCN_GFXDECODE("gfxdecode")
MCFG_TC0100SCN_PALETTE("palette")
MCFG_TC0150ROD_ADD("tc0150rod", taitoz_tc0150rod_intf)
MCFG_TC0110PCR_ADD("tc0110pcr")
MCFG_TC0110PCR_PALETTE("palette")
@ -3223,6 +3227,8 @@ static MACHINE_CONFIG_START( enforce, taitoz_state )
MCFG_TC0100SCN_ADD("tc0100scn", taitoz_tc0100scn_intf)
MCFG_TC0100SCN_GFXDECODE("gfxdecode")
MCFG_TC0100SCN_PALETTE("palette")
MCFG_TC0150ROD_ADD("tc0150rod", taitoz_tc0150rod_intf)
MCFG_TC0110PCR_ADD("tc0110pcr")
MCFG_TC0110PCR_PALETTE("palette")
@ -3286,6 +3292,8 @@ static MACHINE_CONFIG_START( bshark, taitoz_state )
MCFG_TC0100SCN_ADD("tc0100scn", taitoz_tc0100scn_intf)
MCFG_TC0100SCN_GFXDECODE("gfxdecode")
MCFG_TC0100SCN_PALETTE("palette")
MCFG_TC0150ROD_ADD("tc0150rod", taitoz_tc0150rod_intf)
/* sound hardware */
@ -3359,6 +3367,8 @@ static MACHINE_CONFIG_START( sci, taitoz_state )
MCFG_TC0100SCN_ADD("tc0100scn", taitoz_tc0100scn_intf)
MCFG_TC0100SCN_GFXDECODE("gfxdecode")
MCFG_TC0100SCN_PALETTE("palette")
MCFG_TC0150ROD_ADD("tc0150rod", taitoz_tc0150rod_intf)
/* sound hardware */
@ -3423,6 +3433,8 @@ static MACHINE_CONFIG_START( nightstr, taitoz_state )
MCFG_TC0100SCN_ADD("tc0100scn", chasehq_tc0100scn_intf)
MCFG_TC0100SCN_GFXDECODE("gfxdecode")
MCFG_TC0100SCN_PALETTE("palette")
MCFG_TC0150ROD_ADD("tc0150rod", taitoz_tc0150rod_intf)
MCFG_TC0110PCR_ADD("tc0110pcr")
MCFG_TC0110PCR_PALETTE("palette")
@ -3490,6 +3502,8 @@ static MACHINE_CONFIG_START( aquajack, taitoz_state )
MCFG_TC0100SCN_ADD("tc0100scn", taitoz_tc0100scn_intf)
MCFG_TC0100SCN_GFXDECODE("gfxdecode")
MCFG_TC0100SCN_PALETTE("palette")
MCFG_TC0150ROD_ADD("tc0150rod", taitoz_tc0150rod_intf)
MCFG_TC0110PCR_ADD("tc0110pcr")
MCFG_TC0110PCR_PALETTE("palette")
@ -3552,6 +3566,8 @@ static MACHINE_CONFIG_START( spacegun, taitoz_state )
MCFG_TC0100SCN_ADD("tc0100scn", spacegun_tc0100scn_intf)
MCFG_TC0100SCN_GFXDECODE("gfxdecode")
MCFG_TC0100SCN_PALETTE("palette")
MCFG_TC0110PCR_ADD("tc0110pcr")
MCFG_TC0110PCR_PALETTE("palette")
@ -3617,6 +3633,8 @@ static MACHINE_CONFIG_START( dblaxle, taitoz_state )
MCFG_TC0480SCP_ADD("tc0480scp", taitoz_tc0480scp_intf)
MCFG_TC0480SCP_GFXDECODE("gfxdecode")
MCFG_TC0480SCP_PALETTE("palette")
MCFG_TC0150ROD_ADD("tc0150rod", taitoz_tc0150rod_intf)
/* sound hardware */
@ -3680,6 +3698,8 @@ static MACHINE_CONFIG_START( racingb, taitoz_state )
MCFG_TC0480SCP_ADD("tc0480scp", taitoz_tc0480scp_intf)
MCFG_TC0480SCP_GFXDECODE("gfxdecode")
MCFG_TC0480SCP_PALETTE("palette")
MCFG_TC0150ROD_ADD("tc0150rod", taitoz_tc0150rod_intf)
/* sound hardware */

View File

@ -723,6 +723,7 @@ static MACHINE_CONFIG_START( airsys, taitoair_state )
MCFG_TC0080VCO_ADD("tc0080vco", airsys_tc0080vco_intf)
MCFG_TC0080VCO_GFXDECODE("gfxdecode")
MCFG_TC0080VCO_PALETTE("palette")
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")

View File

@ -738,8 +738,10 @@ static MACHINE_CONFIG_START( undrfire, undrfire_state )
MCFG_TC0100SCN_ADD("tc0100scn", undrfire_tc0100scn_intf)
MCFG_TC0100SCN_GFXDECODE("gfxdecode")
MCFG_TC0100SCN_PALETTE("palette")
MCFG_TC0480SCP_ADD("tc0480scp", undrfire_tc0480scp_intf)
MCFG_TC0480SCP_GFXDECODE("gfxdecode")
MCFG_TC0480SCP_PALETTE("palette")
/* sound hardware */
MCFG_FRAGMENT_ADD(taito_en_sound)
@ -775,8 +777,11 @@ static MACHINE_CONFIG_START( cbombers, undrfire_state )
MCFG_TC0100SCN_ADD("tc0100scn", undrfire_tc0100scn_intf)
MCFG_TC0100SCN_GFXDECODE("gfxdecode")
MCFG_TC0100SCN_PALETTE("palette")
MCFG_TC0480SCP_ADD("tc0480scp", undrfire_tc0480scp_intf)
MCFG_TC0480SCP_GFXDECODE("gfxdecode")
MCFG_TC0480SCP_PALETTE("palette")
/* sound hardware */
MCFG_FRAGMENT_ADD(taito_en_sound)

View File

@ -534,8 +534,12 @@ static MACHINE_CONFIG_START( darius2d, warriorb_state )
MCFG_TC0100SCN_ADD("tc0100scn_1", darius2d_tc0100scn_intf_l)
MCFG_TC0100SCN_GFXDECODE("gfxdecode")
MCFG_TC0100SCN_PALETTE("palette")
MCFG_TC0100SCN_ADD("tc0100scn_2", darius2d_tc0100scn_intf_r)
MCFG_TC0100SCN_GFXDECODE("gfxdecode")
MCFG_TC0100SCN_PALETTE("palette2")
MCFG_TC0110PCR_ADD("tc0110pcr_1")
MCFG_TC0110PCR_PALETTE("palette")
MCFG_TC0110PCR_ADD("tc0110pcr_2")
@ -604,8 +608,12 @@ static MACHINE_CONFIG_START( warriorb, warriorb_state )
MCFG_TC0100SCN_ADD("tc0100scn_1", warriorb_tc0100scn_intf_l)
MCFG_TC0100SCN_GFXDECODE("gfxdecode")
MCFG_TC0100SCN_PALETTE("palette")
MCFG_TC0100SCN_ADD("tc0100scn_2", warriorb_tc0100scn_intf_r)
MCFG_TC0100SCN_GFXDECODE("gfxdecode")
MCFG_TC0100SCN_PALETTE("palette2")
MCFG_TC0110PCR_ADD("tc0110pcr_1")
MCFG_TC0110PCR_PALETTE("palette")
MCFG_TC0110PCR_ADD("tc0110pcr_2")

View File

@ -995,6 +995,7 @@ static MACHINE_CONFIG_START( wgp, wgp_state )
MCFG_TC0100SCN_ADD("tc0100scn", wgp_tc0100scn_intf)
MCFG_TC0100SCN_GFXDECODE("gfxdecode")
MCFG_TC0100SCN_PALETTE("palette")
/* sound hardware */
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
@ -1019,6 +1020,7 @@ static MACHINE_CONFIG_DERIVED( wgp2, wgp )
MCFG_DEVICE_REMOVE("tc0100scn")
MCFG_TC0100SCN_ADD("tc0100scn", wgp2_tc0100scn_intf)
MCFG_TC0100SCN_GFXDECODE("gfxdecode")
MCFG_TC0100SCN_PALETTE("palette")
MACHINE_CONFIG_END

View File

@ -109,13 +109,13 @@ public:
DECLARE_DRIVER_INIT(lnc);
DECLARE_MACHINE_START(btime);
DECLARE_MACHINE_RESET(btime);
DECLARE_VIDEO_START(btime);
DECLARE_PALETTE_INIT(btime);
DECLARE_MACHINE_RESET(lnc);
DECLARE_PALETTE_INIT(lnc);
DECLARE_MACHINE_START(mmonkey);
DECLARE_MACHINE_RESET(mmonkey);
DECLARE_VIDEO_START(bnj);
DECLARE_VIDEO_START(disco);
UINT32 screen_update_btime(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
UINT32 screen_update_cookrace(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
UINT32 screen_update_lnc(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);

View File

@ -157,6 +157,7 @@ public:
TIMER_DEVICE_CALLBACK_MEMBER(gdfs_interrupt);
void update_irq_state();
IRQ_CALLBACK_MEMBER(ssv_irq_callback);
void ssv_drawgfx(bitmap_ind16 &bitmap, const rectangle &cliprect, gfx_element *gfx,UINT32 code,UINT32 color,int flipx,int flipy,int x0,int y0,int shadow);
void draw_row(bitmap_ind16 &bitmap, const rectangle &cliprect, int sx, int sy, int scroll);
void draw_layer(bitmap_ind16 &bitmap, const rectangle &cliprect, int nr);
void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);

View File

@ -299,4 +299,7 @@ protected:
private:
inline void get_tile_info(tile_data &tileinfo, int tile_index, UINT16 *gfx_base);
inline void f3_drawgfx(bitmap_rgb32 &dest_bmp,const rectangle &clip,gfx_element *gfx,int code,int color,int flipx,int flipy,int sx,int sy,UINT8 pri_dst);
inline void f3_drawgfxzoom(bitmap_rgb32 &dest_bmp,const rectangle &clip,gfx_element *gfx,int code,int color,int flipx,int flipy,int sx,int sy,int scalex,int scaley,UINT8 pri_dst);
void draw_sprites(bitmap_rgb32 &bitmap, const rectangle &cliprect);
};

View File

@ -96,6 +96,7 @@ public:
INTERRUPT_GEN_MEMBER(hotchase_sound_timer);
TIMER_DEVICE_CALLBACK_MEMBER(wecleman_scanline);
TIMER_DEVICE_CALLBACK_MEMBER(hotchase_scanline);
void draw_cloud(bitmap_rgb32 &bitmap,gfx_element *gfx,UINT16 *tm_base,int x0,int y0,int xcount,int ycount,int scrollx,int scrolly,int tmw_l2,int tmh_l2,int alpha,int pal_offset);
void wecleman_unpack_sprites();
void bitswap(UINT8 *src,size_t len,int _14,int _13,int _12,int _11,int _10,int _f,int _e,int _d,int _c,int _b,int _a,int _9,int _8,int _7,int _6,int _5,int _4,int _3,int _2,int _1,int _0);
void hotchase_sprite_decode( int num16_banks, int bank_size );

View File

@ -26,7 +26,7 @@ const device_type SEGA_SEGACD_EUROPE = &device_creator<sega_segacd_europe_device
sega_segacd_device::sega_segacd_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
: device_t(mconfig, type, name, tag, owner, clock, shortname, source),
m_scdcpu(*this, "segacd_68k"),
m_gfxdecode(*this)
m_gfxdecode(*this, "gfxdecode")
{
}
@ -46,17 +46,6 @@ sega_segacd_europe_device::sega_segacd_europe_device(const machine_config &mconf
}
//-------------------------------------------------
// static_set_gfxdecode_tag: Set the tag of the
// gfx decoder
//-------------------------------------------------
void sega_segacd_device::static_set_gfxdecode_tag(device_t &device, const char *tag)
{
downcast<sega_segacd_device &>(device).m_gfxdecode.set_tag(tag);
}
TIMER_DEVICE_CALLBACK_MEMBER( sega_segacd_device::segacd_irq3_timer_callback )
{
CHECK_SCD_LV3_INTERRUPT
@ -127,6 +116,186 @@ ADDRESS_MAP_START( segacd_map, AS_PROGRAM, 16, sega_segacd_device )
ADDRESS_MAP_END
// the tiles in RAM are 8x8 tiles
// they are referenced in the cell look-up map as either 16x16 or 32x32 tiles (made of 4 / 16 8x8 tiles)
#define SEGACD_BYTES_PER_TILE16 (128)
#define SEGACD_BYTES_PER_TILE32 (512)
#define SEGACD_NUM_TILES16 (0x40000/SEGACD_BYTES_PER_TILE16)
#define SEGACD_NUM_TILES32 (0x40000/SEGACD_BYTES_PER_TILE32)
#define _16x16_SEQUENCE_1 { 8,12,0,4,24,28,16,20, 512+8, 512+12, 512+0, 512+4, 512+24, 512+28, 512+16, 512+20 },
#define _16x16_SEQUENCE_1_FLIP { 512+20,512+16,512+28,512+24,512+4,512+0, 512+12,512+8, 20,16,28,24,4,0,12,8 },
#define _16x16_SEQUENCE_2 { 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32, 8*32, 9*32,10*32,11*32,12*32,13*32,14*32,15*32 },
#define _16x16_SEQUENCE_2_FLIP { 15*32, 14*32, 13*32, 12*32, 11*32, 10*32, 9*32, 8*32, 7*32, 6*32, 5*32, 4*32, 3*32, 2*32, 1*32, 0*32 },
#define _16x16_START \
{ \
16,16, \
SEGACD_NUM_TILES16, \
4, \
{ 0,1,2,3 },
#define _16x16_END \
8*128 \
};
#define _32x32_START \
{ \
32,32, \
SEGACD_NUM_TILES32, \
4, \
{ 0,1,2,3 },
#define _32x32_END \
8*512 \
};
#define _32x32_SEQUENCE_1 \
{ 8,12,0,4,24,28,16,20, \
1024+8, 1024+12, 1024+0, 1024+4, 1024+24, 1024+28, 1024+16, 1024+20, \
2048+8, 2048+12, 2048+0, 2048+4, 2048+24, 2048+28, 2048+16, 2048+20, \
3072+8, 3072+12, 3072+0, 3072+4, 3072+24, 3072+28, 3072+16, 3072+20 \
},
#define _32x32_SEQUENCE_1_FLIP \
{ 3072+20, 3072+16, 3072+28, 3072+24, 3072+4, 3072+0, 3072+12, 3072+8, \
2048+20, 2048+16, 2048+28, 2048+24, 2048+4, 2048+0, 2048+12, 2048+8, \
1024+20, 1024+16, 1024+28, 1024+24, 1024+4, 1024+0, 1024+12, 1024+8, \
20, 16, 28, 24, 4, 0, 12, 8},
#define _32x32_SEQUENCE_2 \
{ 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32, \
8*32, 9*32, 10*32, 11*32, 12*32, 13*32, 14*32, 15*32, \
16*32,17*32,18*32,19*32,20*32,21*32,22*32,23*32, \
24*32,25*32, 26*32, 27*32, 28*32, 29*32, 30*32, 31*32},
#define _32x32_SEQUENCE_2_FLIP \
{ 31*32, 30*32, 29*32, 28*32, 27*32, 26*32, 25*32, 24*32, \
23*32, 22*32, 21*32, 20*32, 19*32, 18*32, 17*32, 16*32, \
15*32, 14*32, 13*32, 12*32, 11*32, 10*32, 9*32 , 8*32 , \
7*32 , 6*32 , 5*32 , 4*32 , 3*32 , 2*32 , 1*32 , 0*32},
/* 16x16 decodes */
static const gfx_layout sega_16x16_r00_f0_layout =
_16x16_START
_16x16_SEQUENCE_1
_16x16_SEQUENCE_2
_16x16_END
static const gfx_layout sega_16x16_r01_f0_layout =
_16x16_START
_16x16_SEQUENCE_2
_16x16_SEQUENCE_1_FLIP
_16x16_END
static const gfx_layout sega_16x16_r10_f0_layout =
_16x16_START
_16x16_SEQUENCE_1_FLIP
_16x16_SEQUENCE_2_FLIP
_16x16_END
static const gfx_layout sega_16x16_r11_f0_layout =
_16x16_START
_16x16_SEQUENCE_2_FLIP
_16x16_SEQUENCE_1
_16x16_END
static const gfx_layout sega_16x16_r00_f1_layout =
_16x16_START
_16x16_SEQUENCE_1_FLIP
_16x16_SEQUENCE_2
_16x16_END
static const gfx_layout sega_16x16_r01_f1_layout =
_16x16_START
_16x16_SEQUENCE_2
_16x16_SEQUENCE_1
_16x16_END
static const gfx_layout sega_16x16_r10_f1_layout =
_16x16_START
_16x16_SEQUENCE_1
_16x16_SEQUENCE_2_FLIP
_16x16_END
static const gfx_layout sega_16x16_r11_f1_layout =
_16x16_START
_16x16_SEQUENCE_2_FLIP
_16x16_SEQUENCE_1_FLIP
_16x16_END
/* 32x32 decodes */
static const gfx_layout sega_32x32_r00_f0_layout =
_32x32_START
_32x32_SEQUENCE_1
_32x32_SEQUENCE_2
_32x32_END
static const gfx_layout sega_32x32_r01_f0_layout =
_32x32_START
_32x32_SEQUENCE_2
_32x32_SEQUENCE_1_FLIP
_32x32_END
static const gfx_layout sega_32x32_r10_f0_layout =
_32x32_START
_32x32_SEQUENCE_1_FLIP
_32x32_SEQUENCE_2_FLIP
_32x32_END
static const gfx_layout sega_32x32_r11_f0_layout =
_32x32_START
_32x32_SEQUENCE_2_FLIP
_32x32_SEQUENCE_1
_32x32_END
static const gfx_layout sega_32x32_r00_f1_layout =
_32x32_START
_32x32_SEQUENCE_1_FLIP
_32x32_SEQUENCE_2
_32x32_END
static const gfx_layout sega_32x32_r01_f1_layout =
_32x32_START
_32x32_SEQUENCE_2
_32x32_SEQUENCE_1
_32x32_END
static const gfx_layout sega_32x32_r10_f1_layout =
_32x32_START
_32x32_SEQUENCE_1
_32x32_SEQUENCE_2_FLIP
_32x32_END
static const gfx_layout sega_32x32_r11_f1_layout =
_32x32_START
_32x32_SEQUENCE_2_FLIP
_32x32_SEQUENCE_1_FLIP
_32x32_END
GFXDECODE_START( segacd )
GFXDECODE_ENTRY( NULL, 0, sega_16x16_r00_f0_layout, 0, 0 )
GFXDECODE_ENTRY( NULL, 0, sega_16x16_r01_f0_layout, 0, 0 )
GFXDECODE_ENTRY( NULL, 0, sega_16x16_r10_f0_layout, 0, 0 )
GFXDECODE_ENTRY( NULL, 0, sega_16x16_r11_f0_layout, 0, 0 )
GFXDECODE_ENTRY( NULL, 0, sega_16x16_r00_f1_layout, 0, 0 )
GFXDECODE_ENTRY( NULL, 0, sega_16x16_r11_f1_layout, 0, 0 )
GFXDECODE_ENTRY( NULL, 0, sega_16x16_r10_f1_layout, 0, 0 )
GFXDECODE_ENTRY( NULL, 0, sega_16x16_r01_f1_layout, 0, 0 )
GFXDECODE_ENTRY( NULL, 0, sega_32x32_r00_f0_layout, 0, 0 )
GFXDECODE_ENTRY( NULL, 0, sega_32x32_r01_f0_layout, 0, 0 )
GFXDECODE_ENTRY( NULL, 0, sega_32x32_r10_f0_layout, 0, 0 )
GFXDECODE_ENTRY( NULL, 0, sega_32x32_r11_f0_layout, 0, 0 )
GFXDECODE_ENTRY( NULL, 0, sega_32x32_r00_f1_layout, 0, 0 )
GFXDECODE_ENTRY( NULL, 0, sega_32x32_r11_f1_layout, 0, 0 )
GFXDECODE_ENTRY( NULL, 0, sega_32x32_r10_f1_layout, 0, 0 )
GFXDECODE_ENTRY( NULL, 0, sega_32x32_r01_f1_layout, 0, 0 )
GFXDECODE_END
static MACHINE_CONFIG_FRAGMENT( segacd_fragment )
MCFG_CPU_ADD("segacd_68k", M68000, SEGACD_CLOCK ) /* 12.5 MHz */
@ -143,6 +312,7 @@ static MACHINE_CONFIG_FRAGMENT( segacd_fragment )
MCFG_TIMER_DRIVER_ADD("stamp_timer", sega_segacd_device, segacd_gfx_conversion_timer_callback)
MCFG_TIMER_DRIVER_ADD("scd_dma_timer", sega_segacd_device, scd_dma_timer_callback)
MCFG_GFXDECODE_ADD("gfxdecode", segacd)
MCFG_DEFAULT_LAYOUT( layout_megacd )
@ -1605,28 +1775,9 @@ void sega_segacd_device::device_start()
space.install_read_handler (0x0000070, 0x0000073, read16_delegate(FUNC(sega_segacd_device::scd_hint_vector_r),this) );
/* create the char set (gfx will then be updated dynamically from RAM) */
m_gfxdecode->set_gfx(0 , auto_alloc(machine(), gfx_element(machine(), sega_16x16_r00_f0_layout, (UINT8 *)segacd_dataram, 0, 0)));
m_gfxdecode->set_gfx(1 , auto_alloc(machine(), gfx_element(machine(), sega_16x16_r01_f0_layout, (UINT8 *)segacd_dataram, 0, 0)));
m_gfxdecode->set_gfx(2 , auto_alloc(machine(), gfx_element(machine(), sega_16x16_r10_f0_layout, (UINT8 *)segacd_dataram, 0, 0)));
m_gfxdecode->set_gfx(3 , auto_alloc(machine(), gfx_element(machine(), sega_16x16_r11_f0_layout, (UINT8 *)segacd_dataram, 0, 0)));
m_gfxdecode->set_gfx(4 , auto_alloc(machine(), gfx_element(machine(), sega_16x16_r00_f1_layout, (UINT8 *)segacd_dataram, 0, 0)));
m_gfxdecode->set_gfx(5 , auto_alloc(machine(), gfx_element(machine(), sega_16x16_r11_f1_layout, (UINT8 *)segacd_dataram, 0, 0)));
m_gfxdecode->set_gfx(6 , auto_alloc(machine(), gfx_element(machine(), sega_16x16_r10_f1_layout, (UINT8 *)segacd_dataram, 0, 0)));
m_gfxdecode->set_gfx(7 , auto_alloc(machine(), gfx_element(machine(), sega_16x16_r01_f1_layout, (UINT8 *)segacd_dataram, 0, 0)));
m_gfxdecode->set_gfx(8 , auto_alloc(machine(), gfx_element(machine(), sega_32x32_r00_f0_layout, (UINT8 *)segacd_dataram, 0, 0)));
m_gfxdecode->set_gfx(9 , auto_alloc(machine(), gfx_element(machine(), sega_32x32_r01_f0_layout, (UINT8 *)segacd_dataram, 0, 0)));
m_gfxdecode->set_gfx(10, auto_alloc(machine(), gfx_element(machine(), sega_32x32_r10_f0_layout, (UINT8 *)segacd_dataram, 0, 0)));
m_gfxdecode->set_gfx(11, auto_alloc(machine(), gfx_element(machine(), sega_32x32_r11_f0_layout, (UINT8 *)segacd_dataram, 0, 0)));
m_gfxdecode->set_gfx(12, auto_alloc(machine(), gfx_element(machine(), sega_32x32_r00_f1_layout, (UINT8 *)segacd_dataram, 0, 0)));
m_gfxdecode->set_gfx(13, auto_alloc(machine(), gfx_element(machine(), sega_32x32_r11_f1_layout, (UINT8 *)segacd_dataram, 0, 0)));
m_gfxdecode->set_gfx(14, auto_alloc(machine(), gfx_element(machine(), sega_32x32_r10_f1_layout, (UINT8 *)segacd_dataram, 0, 0)));
m_gfxdecode->set_gfx(15, auto_alloc(machine(), gfx_element(machine(), sega_32x32_r01_f1_layout, (UINT8 *)segacd_dataram, 0, 0)));
for (int i = 0; i < 16; i++)
m_gfxdecode->gfx(i)->set_source((UINT8 *)segacd_dataram);
segacd_stampmap[0] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(sega_segacd_device::get_stampmap_16x16_1x1_tile_info),this), TILEMAP_SCAN_ROWS, 16, 16, 16, 16);
segacd_stampmap[1] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(sega_segacd_device::get_stampmap_32x32_1x1_tile_info),this), TILEMAP_SCAN_ROWS, 32, 32, 8, 8);

View File

@ -34,177 +34,11 @@
#define SEGACD_IRQ3_TIMER_SPEED (attotime::from_nsec(segacd_irq3_timer_reg*30720))
// the tiles in RAM are 8x8 tiles
// they are referenced in the cell look-up map as either 16x16 or 32x32 tiles (made of 4 / 16 8x8 tiles)
#define SEGACD_BYTES_PER_TILE16 (128)
#define SEGACD_BYTES_PER_TILE32 (512)
#define SEGACD_NUM_TILES16 (0x40000/SEGACD_BYTES_PER_TILE16)
#define SEGACD_NUM_TILES32 (0x40000/SEGACD_BYTES_PER_TILE32)
#define _16x16_SEQUENCE_1 { 8,12,0,4,24,28,16,20, 512+8, 512+12, 512+0, 512+4, 512+24, 512+28, 512+16, 512+20 },
#define _16x16_SEQUENCE_1_FLIP { 512+20,512+16,512+28,512+24,512+4,512+0, 512+12,512+8, 20,16,28,24,4,0,12,8 },
#define _16x16_SEQUENCE_2 { 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32, 8*32, 9*32,10*32,11*32,12*32,13*32,14*32,15*32 },
#define _16x16_SEQUENCE_2_FLIP { 15*32, 14*32, 13*32, 12*32, 11*32, 10*32, 9*32, 8*32, 7*32, 6*32, 5*32, 4*32, 3*32, 2*32, 1*32, 0*32 },
#define _16x16_START \
{ \
16,16, \
SEGACD_NUM_TILES16, \
4, \
{ 0,1,2,3 },
#define _16x16_END \
8*128 \
};
#define _32x32_START \
{ \
32,32, \
SEGACD_NUM_TILES32, \
4, \
{ 0,1,2,3 },
#define _32x32_END \
8*512 \
};
#define _32x32_SEQUENCE_1 \
{ 8,12,0,4,24,28,16,20, \
1024+8, 1024+12, 1024+0, 1024+4, 1024+24, 1024+28, 1024+16, 1024+20, \
2048+8, 2048+12, 2048+0, 2048+4, 2048+24, 2048+28, 2048+16, 2048+20, \
3072+8, 3072+12, 3072+0, 3072+4, 3072+24, 3072+28, 3072+16, 3072+20 \
},
#define _32x32_SEQUENCE_1_FLIP \
{ 3072+20, 3072+16, 3072+28, 3072+24, 3072+4, 3072+0, 3072+12, 3072+8, \
2048+20, 2048+16, 2048+28, 2048+24, 2048+4, 2048+0, 2048+12, 2048+8, \
1024+20, 1024+16, 1024+28, 1024+24, 1024+4, 1024+0, 1024+12, 1024+8, \
20, 16, 28, 24, 4, 0, 12, 8},
#define _32x32_SEQUENCE_2 \
{ 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32, \
8*32, 9*32, 10*32, 11*32, 12*32, 13*32, 14*32, 15*32, \
16*32,17*32,18*32,19*32,20*32,21*32,22*32,23*32, \
24*32,25*32, 26*32, 27*32, 28*32, 29*32, 30*32, 31*32},
#define _32x32_SEQUENCE_2_FLIP \
{ 31*32, 30*32, 29*32, 28*32, 27*32, 26*32, 25*32, 24*32, \
23*32, 22*32, 21*32, 20*32, 19*32, 18*32, 17*32, 16*32, \
15*32, 14*32, 13*32, 12*32, 11*32, 10*32, 9*32 , 8*32 , \
7*32 , 6*32 , 5*32 , 4*32 , 3*32 , 2*32 , 1*32 , 0*32},
/* 16x16 decodes */
static const gfx_layout sega_16x16_r00_f0_layout =
_16x16_START
_16x16_SEQUENCE_1
_16x16_SEQUENCE_2
_16x16_END
static const gfx_layout sega_16x16_r01_f0_layout =
_16x16_START
_16x16_SEQUENCE_2
_16x16_SEQUENCE_1_FLIP
_16x16_END
static const gfx_layout sega_16x16_r10_f0_layout =
_16x16_START
_16x16_SEQUENCE_1_FLIP
_16x16_SEQUENCE_2_FLIP
_16x16_END
static const gfx_layout sega_16x16_r11_f0_layout =
_16x16_START
_16x16_SEQUENCE_2_FLIP
_16x16_SEQUENCE_1
_16x16_END
static const gfx_layout sega_16x16_r00_f1_layout =
_16x16_START
_16x16_SEQUENCE_1_FLIP
_16x16_SEQUENCE_2
_16x16_END
static const gfx_layout sega_16x16_r01_f1_layout =
_16x16_START
_16x16_SEQUENCE_2
_16x16_SEQUENCE_1
_16x16_END
static const gfx_layout sega_16x16_r10_f1_layout =
_16x16_START
_16x16_SEQUENCE_1
_16x16_SEQUENCE_2_FLIP
_16x16_END
static const gfx_layout sega_16x16_r11_f1_layout =
_16x16_START
_16x16_SEQUENCE_2_FLIP
_16x16_SEQUENCE_1_FLIP
_16x16_END
/* 32x32 decodes */
static const gfx_layout sega_32x32_r00_f0_layout =
_32x32_START
_32x32_SEQUENCE_1
_32x32_SEQUENCE_2
_32x32_END
static const gfx_layout sega_32x32_r01_f0_layout =
_32x32_START
_32x32_SEQUENCE_2
_32x32_SEQUENCE_1_FLIP
_32x32_END
static const gfx_layout sega_32x32_r10_f0_layout =
_32x32_START
_32x32_SEQUENCE_1_FLIP
_32x32_SEQUENCE_2_FLIP
_32x32_END
static const gfx_layout sega_32x32_r11_f0_layout =
_32x32_START
_32x32_SEQUENCE_2_FLIP
_32x32_SEQUENCE_1
_32x32_END
static const gfx_layout sega_32x32_r00_f1_layout =
_32x32_START
_32x32_SEQUENCE_1_FLIP
_32x32_SEQUENCE_2
_32x32_END
static const gfx_layout sega_32x32_r01_f1_layout =
_32x32_START
_32x32_SEQUENCE_2
_32x32_SEQUENCE_1
_32x32_END
static const gfx_layout sega_32x32_r10_f1_layout =
_32x32_START
_32x32_SEQUENCE_1
_32x32_SEQUENCE_2_FLIP
_32x32_END
static const gfx_layout sega_32x32_r11_f1_layout =
_32x32_START
_32x32_SEQUENCE_2_FLIP
_32x32_SEQUENCE_1_FLIP
_32x32_END
#define MCFG_SEGACD_GFXDECODE(_gfxtag) \
sega_segacd_device::static_set_gfxdecode_tag(*device, "^" _gfxtag);
class sega_segacd_device : public device_t
{
public:
sega_segacd_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
// static configuration
static void static_set_gfxdecode_tag(device_t &device, const char *tag);
required_device<cpu_device> m_scdcpu;
lc89510_temp_device *lc89510_temp;

View File

@ -617,15 +617,15 @@ int atarisy1_state::get_bank(UINT8 prom1, UINT8 prom2, int bpp)
switch (bpp)
{
case 4:
m_gfxdecode->set_gfx(gfx_index,auto_alloc(machine(), gfx_element(machine(), objlayout_4bpp, srcdata, 0x40, 256)));
m_gfxdecode->set_gfx(gfx_index,auto_alloc(machine(), gfx_element(m_palette, objlayout_4bpp, srcdata, 0x40, 256)));
break;
case 5:
m_gfxdecode->set_gfx(gfx_index,auto_alloc(machine(), gfx_element(machine(), objlayout_5bpp, srcdata, 0x40, 256)));
m_gfxdecode->set_gfx(gfx_index,auto_alloc(machine(), gfx_element(m_palette, objlayout_5bpp, srcdata, 0x40, 256)));
break;
case 6:
m_gfxdecode->set_gfx(gfx_index,auto_alloc(machine(), gfx_element(machine(), objlayout_6bpp, srcdata, 0x40, 256)));
m_gfxdecode->set_gfx(gfx_index,auto_alloc(machine(), gfx_element(m_palette, objlayout_6bpp, srcdata, 0x40, 256)));
break;
default:

View File

@ -114,12 +114,11 @@ Start the video hardware emulation.
***************************************************************************/
VIDEO_START_MEMBER(btime_state,btime)
VIDEO_START_MEMBER(btime_state,disco)
{
if (m_gfxdecode->gfx(0)->srcdata() == NULL)
m_gfxdecode->gfx(0)->set_source(m_deco_charram);
if (m_gfxdecode->gfx(1)->srcdata() == NULL)
m_gfxdecode->gfx(1)->set_source(m_deco_charram);
// graphics are in RAM
m_gfxdecode->gfx(0)->set_source(m_deco_charram);
m_gfxdecode->gfx(1)->set_source(m_deco_charram);
}
@ -131,8 +130,6 @@ VIDEO_START_MEMBER(btime_state,bnj)
m_background_bitmap = auto_bitmap_ind16_alloc(machine(), 2 * width, height);
save_item(NAME(*m_background_bitmap));
VIDEO_START_CALL_MEMBER(btime);
}

View File

@ -222,17 +222,6 @@ void bwing_state::video_start()
// m_bgfx = m_gfxdecode->gfx(3);
m_gfxdecode->gfx(3)->set_source(m_srbase[1] + 0x1000);
/*
WTF??
dwptr = m_gfxdecode->gfx(2)->pen_usage();
if (dwptr)
{
dwptr[0] = 0;
for(i = 1; i < BW_NTILES; i++)
dwptr[i) = -1;
}
*/
}
//****************************************************************************

View File

@ -547,7 +547,7 @@ void hyprduel_state::draw_sprites( screen_device &screen, bitmap_ind16 &bitmap,
if ((gfxstart + width * height - 1) >= gfx_size)
continue;
gfx_element gfx(machine(), base_gfx8 + gfxstart, width, height, width, m_palette->entries(), 0, 256);
gfx_element gfx(m_palette, base_gfx8 + gfxstart, width, height, width, m_palette->entries(), 0, 256);
gfx.prio_zoom_transpen(m_palette, bitmap,cliprect,
0,
@ -563,7 +563,7 @@ void hyprduel_state::draw_sprites( screen_device &screen, bitmap_ind16 &bitmap,
if ((gfxstart + width / 2 * height - 1) >= gfx_size)
continue;
gfx_element gfx(machine(), base_gfx4 + 2 * gfxstart, width, height, width, m_palette->entries(), 0, 16);
gfx_element gfx(m_palette, base_gfx4 + 2 * gfxstart, width, height, width, m_palette->entries(), 0, 16);
gfx.prio_zoom_transpen(m_palette, bitmap,cliprect,
0,

View File

@ -120,8 +120,8 @@ void k001604_device::device_start()
m_layer_8x8[0]->set_transparent_pen(0);
m_layer_8x8[1]->set_transparent_pen(0);
m_gfxdecode->set_gfx(m_gfx_index[0], auto_alloc_clear(machine(), gfx_element(machine(), k001604_char_layout_layer_8x8, (UINT8*)&m_char_ram[0], m_palette->entries() / 16, 0)));
m_gfxdecode->set_gfx(m_gfx_index[1], auto_alloc_clear(machine(), gfx_element(machine(), k001604_char_layout_layer_16x16, (UINT8*)&m_char_ram[0], m_palette->entries() / 16, 0)));
m_gfxdecode->set_gfx(m_gfx_index[0], auto_alloc_clear(machine(), gfx_element(m_palette, k001604_char_layout_layer_8x8, (UINT8*)&m_char_ram[0], m_palette->entries() / 16, 0)));
m_gfxdecode->set_gfx(m_gfx_index[1], auto_alloc_clear(machine(), gfx_element(m_palette, k001604_char_layout_layer_16x16, (UINT8*)&m_char_ram[0], m_palette->entries() / 16, 0)));
save_pointer(NAME(m_reg), 0x400 / 4);
save_pointer(NAME(m_char_ram), 0x200000 / 4);

View File

@ -72,7 +72,7 @@ void k037122_device::device_start()
m_layer[0]->set_transparent_pen(0);
m_layer[1]->set_transparent_pen(0);
m_gfxdecode->set_gfx(m_gfx_index,auto_alloc_clear(machine(), gfx_element(machine(), k037122_char_layout, (UINT8*)m_char_ram, m_palette->entries() / 16, 0)));
m_gfxdecode->set_gfx(m_gfx_index,auto_alloc_clear(machine(), gfx_element(m_palette, k037122_char_layout, (UINT8*)m_char_ram, m_palette->entries() / 16, 0)));
save_pointer(NAME(m_reg), 0x400 / 4);
save_pointer(NAME(m_char_ram), 0x200000 / 4);

View File

@ -106,6 +106,8 @@ public:
int get_lookup(int bits); /* Asterix */
void set_tile_bank(int bank); /* Asterix */
int get_gfx_num() const { return m_gfx_num; }
DECLARE_READ32_MEMBER( ram_long_r );
DECLARE_READ32_MEMBER( rom_long_r );
DECLARE_WRITE32_MEMBER( ram_long_w );

View File

@ -82,7 +82,7 @@ void konami_decode_gfx(running_machine &machine, gfxdecode_device * gfxdecode, p
memcpy(&gl, layout, sizeof(gl));
gl.total = total;
gfxdecode->set_gfx(gfx_index, auto_alloc(machine, gfx_element(machine, gl, data, palette.entries() >> bpp, 0)));
gfxdecode->set_gfx(gfx_index, auto_alloc(machine, gfx_element(&palette, gl, data, palette.entries() >> bpp, 0)));
}

View File

@ -98,7 +98,7 @@ VIDEO_START_MEMBER(m10_state,m10)
m_tx_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(m10_state::get_tile_info),this), tilemap_mapper_delegate(FUNC(m10_state::tilemap_scan),this), 8, 8, 32, 32);
m_tx_tilemap->set_transparent_pen(0);
m_back_gfx = auto_alloc(machine(), gfx_element(machine(), backlayout, m_chargen, 8, 0));
m_back_gfx = auto_alloc(machine(), gfx_element(m_palette, backlayout, m_chargen, 8, 0));
m_gfxdecode->set_gfx(1, m_back_gfx);
return ;
@ -106,7 +106,7 @@ VIDEO_START_MEMBER(m10_state,m10)
VIDEO_START_MEMBER(m10_state,m15)
{
m_gfxdecode->set_gfx(0,auto_alloc(machine(), gfx_element(machine(), charlayout, m_chargen, 8, 0)));
m_gfxdecode->set_gfx(0,auto_alloc(machine(), gfx_element(m_palette, charlayout, m_chargen, 8, 0)));
m_tx_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(m10_state::get_tile_info),this),tilemap_mapper_delegate(FUNC(m10_state::tilemap_scan),this), 8, 8, 32, 32);

View File

@ -500,7 +500,7 @@ void metro_state::metro_draw_sprites( screen_device &screen, bitmap_ind16 &bitma
if ((gfxstart + width * height - 1) >= gfx_size)
continue;
gfx_element gfx(machine(), base_gfx8 + gfxstart, width, height, width, m_palette->entries(), 0, 256);
gfx_element gfx(m_palette, base_gfx8 + gfxstart, width, height, width, m_palette->entries(), 0, 256);
gfx.prio_zoom_transpen(m_palette, bitmap,cliprect,
0,
@ -516,7 +516,7 @@ void metro_state::metro_draw_sprites( screen_device &screen, bitmap_ind16 &bitma
if ((gfxstart + width / 2 * height - 1) >= gfx_size)
continue;
gfx_element gfx(machine(), base_gfx4 + 2 * gfxstart, width, height, width, m_palette->entries(),0, 16);
gfx_element gfx(m_palette, base_gfx4 + 2 * gfxstart, width, height, width, m_palette->entries(),0, 16);
gfx.prio_zoom_transpen(m_palette, bitmap,cliprect,
0,

View File

@ -19,12 +19,8 @@ static void mystwarr_decode_tiles(running_machine &machine)
int len = machine.root_device().memregion("gfx1")->bytes();
UINT8 *pFinish = s+len-3;
UINT8 *d, *decoded;
int gfxnum;
for (gfxnum = 0; gfxnum < MAX_GFX_ELEMENTS; gfxnum++)
if (state->m_gfxdecode->gfx(gfxnum) != NULL && state->m_gfxdecode->gfx(gfxnum)->srcdata() == s)
break;
assert(gfxnum != ARRAY_LENGTH(state->m_gfxdecode->gfx()));
int gfxnum = state->m_k056832->get_gfx_num();
decoded = auto_alloc_array(machine, UINT8, len);
d = decoded;

View File

@ -289,9 +289,9 @@ void namcona1_state::video_start()
m_shaperam = auto_alloc_array_clear(machine(), UINT16, 0x2000*4/2 );
m_cgram = auto_alloc_array_clear(machine(), UINT16, 0x1000*0x40/2 );
m_gfxdecode->set_gfx(0, auto_alloc( machine(), gfx_element( machine(), cg_layout_8bpp, (UINT8 *)m_cgram, m_palette->entries()/256, 0 )));
m_gfxdecode->set_gfx(1, auto_alloc( machine(), gfx_element( machine(), cg_layout_4bpp, (UINT8 *)m_cgram, m_palette->entries()/16, 0 )));
m_gfxdecode->set_gfx(2, auto_alloc( machine(), gfx_element( machine(), shape_layout, (UINT8 *)m_shaperam, m_palette->entries()/2, 0 )));
m_gfxdecode->set_gfx(0, auto_alloc( machine(), gfx_element(m_palette, cg_layout_8bpp, (UINT8 *)m_cgram, m_palette->entries()/256, 0 )));
m_gfxdecode->set_gfx(1, auto_alloc( machine(), gfx_element(m_palette, cg_layout_4bpp, (UINT8 *)m_cgram, m_palette->entries()/16, 0 )));
m_gfxdecode->set_gfx(2, auto_alloc( machine(), gfx_element(m_palette, shape_layout, (UINT8 *)m_shaperam, m_palette->entries()/2, 0 )));
} /* namcona1_vh_start */

View File

@ -99,7 +99,7 @@ void polygonet_state::video_start()
assert(m_ttl_gfx_index != MAX_GFX_ELEMENTS);
/* decode the ttl layer's gfx */
m_gfxdecode->set_gfx(m_ttl_gfx_index, auto_alloc(machine(), gfx_element(machine(), charlayout, memregion("gfx1")->base(), m_palette->entries() / 16, 0)));
m_gfxdecode->set_gfx(m_ttl_gfx_index, auto_alloc(machine(), gfx_element(m_palette, charlayout, memregion("gfx1")->base(), m_palette->entries() / 16, 0)));
/* create the tilemap */
m_ttl_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(polygonet_state::ttl_get_tile_info),this), tilemap_mapper_delegate(FUNC(polygonet_state::plygonet_scan),this), 8, 8, 64, 32);

View File

@ -86,7 +86,7 @@ void rungun_state::video_start()
assert(gfx_index != MAX_GFX_ELEMENTS);
// decode the ttl layer's gfx
m_gfxdecode->set_gfx(gfx_index, auto_alloc(machine(), gfx_element(machine(), charlayout, memregion("gfx3")->base(), m_palette->entries() / 16, 0)));
m_gfxdecode->set_gfx(gfx_index, auto_alloc(machine(), gfx_element(m_palette, charlayout, memregion("gfx3")->base(), m_palette->entries() / 16, 0)));
m_ttl_gfx_index = gfx_index;
// create the tilemap

View File

@ -117,7 +117,7 @@ void segas24_tile::device_start()
memset(char_ram, 0, 0x80000);
memset(tile_ram, 0, 0x10000);
m_gfxdecode->set_gfx(char_gfx_index, auto_alloc(machine(), gfx_element(machine(), char_layout, (UINT8 *)char_ram, m_palette->entries() / 16, 0)));
m_gfxdecode->set_gfx(char_gfx_index, auto_alloc(machine(), gfx_element(m_palette, char_layout, (UINT8 *)char_ram, m_palette->entries() / 16, 0)));
save_pointer(NAME(tile_ram), 0x10000/2);
save_pointer(NAME(char_ram), 0x80000/2);

View File

@ -141,11 +141,10 @@ Note: press Z to show some info on each sprite (debug builds only)
#endif
static void ssv_drawgfx( bitmap_ind16 &bitmap, const rectangle &cliprect, gfx_element *gfx,
void ssv_state::ssv_drawgfx(bitmap_ind16 &bitmap, const rectangle &cliprect, gfx_element *gfx,
UINT32 code,UINT32 color,int flipx,int flipy,int x0,int y0,
int shadow )
{
ssv_state *state = gfx->machine().driver_data<ssv_state>();
const UINT8 *addr, *source;
UINT8 pen;
UINT16 *dest;
@ -183,7 +182,7 @@ static void ssv_drawgfx( bitmap_ind16 &bitmap, const rectangle &cliprect, gfx
if (shadow)
{
SSV_DRAWGFX( { dest[sx] = ((dest[sx] & state->m_shadow_pen_mask) | (pen << state->m_shadow_pen_shift)) & 0x7fff; } )
SSV_DRAWGFX( { dest[sx] = ((dest[sx] & m_shadow_pen_mask) | (pen << m_shadow_pen_shift)) & 0x7fff; } )
}
else
{

View File

@ -449,7 +449,7 @@ VIDEO_START_MEMBER(st0016_state,st0016)
assert(gfx_index != MAX_GFX_ELEMENTS);
/* create the char set (gfx will then be updated dynamically from RAM) */
m_gfxdecode->set_gfx(gfx_index, auto_alloc(machine(), gfx_element(machine(), charlayout, (UINT8 *) st0016_charram, 0x40, 0)));
m_gfxdecode->set_gfx(gfx_index, auto_alloc(machine(), gfx_element(m_palette, charlayout, (UINT8 *) st0016_charram, 0x40, 0)));
st0016_ramgfx = gfx_index;
spr_dx=0;

View File

@ -78,7 +78,7 @@ void st0020_device::device_start()
if (m_gfxdecode->gfx(m_gfx_index) == 0)
break;
m_gfxdecode->set_gfx(m_gfx_index, auto_alloc(machine(), gfx_element(machine(), layout_16x8x8_2, (UINT8 *)m_st0020_gfxram, m_palette->entries() / 64, 0)));
m_gfxdecode->set_gfx(m_gfx_index, auto_alloc(machine(), gfx_element(m_palette, layout_16x8x8_2, (UINT8 *)m_st0020_gfxram, m_palette->entries() / 64, 0)));
m_gfxdecode->gfx(m_gfx_index)->set_granularity(64); /* 256 colour sprites with palette selectable on 64 colour boundaries */

View File

@ -2539,7 +2539,7 @@ static void scanline_draw(running_machine &machine, bitmap_rgb32 &bitmap, const
/******************************************************************************/
#define PSET_T \
c = *source & state->m_sprite_pen_mask; \
c = *source & m_sprite_pen_mask; \
if(c) \
{ \
p=*pri; \
@ -2554,7 +2554,7 @@ static void scanline_draw(running_machine &machine, bitmap_rgb32 &bitmap, const
p=*pri; \
if(!p || p==0xff) \
{ \
*dest = pal[*source & state->m_sprite_pen_mask]; \
*dest = pal[*source & m_sprite_pen_mask]; \
*pri = pri_dst; \
}
@ -2563,15 +2563,14 @@ static void scanline_draw(running_machine &machine, bitmap_rgb32 &bitmap, const
dest++; \
pri++;
INLINE void f3_drawgfx(
bitmap_rgb32 &dest_bmp,const rectangle &clip,gfx_element *gfx,
inline void taito_f3_state::f3_drawgfx(bitmap_rgb32 &dest_bmp,const rectangle &clip,
gfx_element *gfx,
int code,
int color,
int flipx,int flipy,
int sx,int sy,
UINT8 pri_dst)
{
taito_f3_state *state = gfx->machine().driver_data<taito_f3_state>();
rectangle myclip;
pri_dst=1<<pri_dst;
@ -2583,7 +2582,7 @@ INLINE void f3_drawgfx(
if( gfx )
{
const pen_t *pal = &state->m_palette->pen(gfx->colorbase() + gfx->granularity() * (color % gfx->colors()));
const pen_t *pal = &m_palette->pen(gfx->colorbase() + gfx->granularity() * (color % gfx->colors()));
const UINT8 *code_base = gfx->get_data(code % gfx->elements());
{
@ -2646,12 +2645,12 @@ INLINE void f3_drawgfx(
// if (dest_bmp.bpp == 32)
{
int y=ey-sy;
int x=(ex-sx-1)|(state->m_tile_opaque_sp[code % gfx->elements()]<<4);
int x=(ex-sx-1)|(m_tile_opaque_sp[code % gfx->elements()]<<4);
const UINT8 *source0 = code_base + y_index * 16 + x_index_base;
UINT32 *dest0 = &dest_bmp.pix32(sy, sx);
UINT8 *pri0 = &state->m_pri_alp_bitmap.pix8(sy, sx);
UINT8 *pri0 = &m_pri_alp_bitmap.pix8(sy, sx);
int yadv = dest_bmp.rowpixels();
int yadvp = state->m_pri_alp_bitmap.rowpixels();
int yadvp = m_pri_alp_bitmap.rowpixels();
dy=dy*16;
while(1)
{
@ -2713,8 +2712,8 @@ INLINE void f3_drawgfx(
#undef NEXT_P
INLINE void f3_drawgfxzoom(
bitmap_rgb32 &dest_bmp,const rectangle &clip,gfx_element *gfx,
inline void taito_f3_state::f3_drawgfxzoom(bitmap_rgb32 &dest_bmp,const rectangle &clip,
gfx_element *gfx,
int code,
int color,
int flipx,int flipy,
@ -2722,7 +2721,6 @@ INLINE void f3_drawgfxzoom(
int scalex, int scaley,
UINT8 pri_dst)
{
taito_f3_state *state = gfx->machine().driver_data<taito_f3_state>();
rectangle myclip;
pri_dst=1<<pri_dst;
@ -2734,7 +2732,7 @@ INLINE void f3_drawgfxzoom(
if( gfx )
{
const pen_t *pal = &state->m_palette->pen(gfx->colorbase() + gfx->granularity() * (color % gfx->colors()));
const pen_t *pal = &m_palette->pen(gfx->colorbase() + gfx->granularity() * (color % gfx->colors()));
const UINT8 *code_base = gfx->get_data(code % gfx->elements());
{
@ -2801,12 +2799,12 @@ INLINE void f3_drawgfxzoom(
{
const UINT8 *source = code_base + (y_index>>16) * 16;
UINT32 *dest = &dest_bmp.pix32(y);
UINT8 *pri = &state->m_pri_alp_bitmap.pix8(y);
UINT8 *pri = &m_pri_alp_bitmap.pix8(y);
int x, x_index = x_index_base;
for( x=sx; x<ex; x++ )
{
int c = source[x_index>>16] & state->m_sprite_pen_mask;
int c = source[x_index>>16] & m_sprite_pen_mask;
if(c)
{
UINT8 p=pri[x];
@ -3102,31 +3100,30 @@ static void get_sprite_info(running_machine &machine, const UINT16 *spriteram16_
#undef CALC_ZOOM
static void draw_sprites(running_machine &machine, bitmap_rgb32 &bitmap, const rectangle &cliprect)
void taito_f3_state::draw_sprites(bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
taito_f3_state *state = machine.driver_data<taito_f3_state>();
const struct tempsprite *sprite_ptr;
gfx_element *sprite_gfx = state->m_gfxdecode->gfx(2);
gfx_element *sprite_gfx = m_gfxdecode->gfx(2);
sprite_ptr = state->m_sprite_end;
state->m_sprite_pri_usage=0;
sprite_ptr = m_sprite_end;
m_sprite_pri_usage=0;
// if sprites use more than 4bpp, the bottom bits of the color code must be masked out.
// This fixes (at least) stage 1 battle ships and attract mode explosions in Ray Force.
while (sprite_ptr != state->m_spritelist)
while (sprite_ptr != m_spritelist)
{
int pri;
sprite_ptr--;
pri=sprite_ptr->pri;
state->m_sprite_pri_usage|=1<<pri;
m_sprite_pri_usage|=1<<pri;
if(sprite_ptr->zoomx==16 && sprite_ptr->zoomy==16)
f3_drawgfx(
bitmap,cliprect,sprite_gfx,
sprite_ptr->code,
sprite_ptr->color & (~state->m_sprite_extra_planes),
sprite_ptr->color & (~m_sprite_extra_planes),
sprite_ptr->flipx,sprite_ptr->flipy,
sprite_ptr->x,sprite_ptr->y,
pri);
@ -3134,7 +3131,7 @@ static void draw_sprites(running_machine &machine, bitmap_rgb32 &bitmap, const r
f3_drawgfxzoom(
bitmap,cliprect,sprite_gfx,
sprite_ptr->code,
sprite_ptr->color & (~state->m_sprite_extra_planes),
sprite_ptr->color & (~m_sprite_extra_planes),
sprite_ptr->flipx,sprite_ptr->flipy,
sprite_ptr->x,sprite_ptr->y,
sprite_ptr->zoomx,sprite_ptr->zoomy,
@ -3189,7 +3186,7 @@ UINT32 taito_f3_state::screen_update_f3(screen_device &screen, bitmap_rgb32 &bit
get_sprite_info(machine(), m_spriteram);
/* Update sprite buffer */
draw_sprites(machine(), bitmap,cliprect);
draw_sprites(bitmap,cliprect);
/* Parse sprite, alpha & clipping parts of lineram */
get_spritealphaclip_info(this);

View File

@ -315,7 +315,7 @@ void taitojc_state::video_start()
m_tile_ram = auto_alloc_array_clear(machine(), UINT32, 0x4000/4);
/* create the char set (gfx will then be updated dynamically from RAM) */
m_gfxdecode->set_gfx(m_gfx_index, auto_alloc(machine(), gfx_element(machine(), taitojc_char_layout, (UINT8 *)m_char_ram, m_palette->entries() / 16, 0)));
m_gfxdecode->set_gfx(m_gfx_index, auto_alloc(machine(), gfx_element(m_palette, taitojc_char_layout, (UINT8 *)m_char_ram, m_palette->entries() / 16, 0)));
m_texture = auto_alloc_array(machine(), UINT8, 0x400000);

View File

@ -95,7 +95,8 @@ tc0080vco_device::tc0080vco_device(const machine_config &mconfig, const char *ta
m_bg1_scrollx(0),
m_bg1_scrolly(0),
m_flipscreen(0),
m_gfxdecode(*this)
m_gfxdecode(*this),
m_palette(*this)
{
}
@ -109,6 +110,16 @@ void tc0080vco_device::static_set_gfxdecode_tag(device_t &device, const char *ta
downcast<tc0080vco_device &>(device).m_gfxdecode.set_tag(tag);
}
//-------------------------------------------------
// static_set_palette_tag: Set the tag of the
// palette device
//-------------------------------------------------
void tc0080vco_device::static_set_palette_tag(device_t &device, const char *tag)
{
downcast<tc0080vco_device &>(device).m_palette.set_tag(tag);
}
//-------------------------------------------------
// device_config_complete - perform any
// operations now that the configuration is
@ -190,7 +201,7 @@ void tc0080vco_device::device_start()
m_scroll_ram = m_ram + 0x20800 / 2;
/* create the char set (gfx will then be updated dynamically from RAM) */
m_gfxdecode->set_gfx(m_txnum, auto_alloc_clear(machine(), gfx_element(machine(), charlayout, (UINT8 *)m_char_ram, 64, 0)));
m_gfxdecode->set_gfx(m_txnum, auto_alloc_clear(machine(), gfx_element(m_palette, charlayout, (UINT8 *)m_char_ram, 64, 0)));
save_pointer(NAME(m_ram), TC0080VCO_RAM_SIZE / 2);
machine().save().register_postload(save_prepost_delegate(FUNC(tc0080vco_device::postload), this));

View File

@ -21,6 +21,7 @@ public:
// static configuration
static void static_set_gfxdecode_tag(device_t &device, const char *tag);
static void static_set_palette_tag(device_t &device, const char *tag);
DECLARE_READ16_MEMBER( word_r );
DECLARE_WRITE16_MEMBER( word_w );
@ -69,6 +70,7 @@ public:
INT32 m_flipscreen;
required_device<gfxdecode_device> m_gfxdecode;
required_device<palette_device> m_palette;
TILE_GET_INFO_MEMBER(get_bg0_tile_info);
TILE_GET_INFO_MEMBER(get_bg1_tile_info);
@ -86,4 +88,7 @@ extern const device_type TC0080VCO;
#define MCFG_TC0080VCO_GFXDECODE(_gfxtag) \
tc0080vco_device::static_set_gfxdecode_tag(*device, "^" _gfxtag);
#define MCFG_TC0080VCO_PALETTE(_palette_tag) \
tc0080vco_device::static_set_palette_tag(*device, "^" _palette_tag);
#endif

View File

@ -142,7 +142,8 @@ tc0100scn_device::tc0100scn_device(const machine_config &mconfig, const char *ta
m_bg1_colbank(0),
m_tx_colbank(0),
m_dblwidth(0),
m_gfxdecode(*this)
m_gfxdecode(*this),
m_palette(*this)
{
}
@ -156,6 +157,16 @@ void tc0100scn_device::static_set_gfxdecode_tag(device_t &device, const char *ta
downcast<tc0100scn_device &>(device).m_gfxdecode.set_tag(tag);
}
//-------------------------------------------------
// static_set_palette_tag: Set the tag of the
// palette device
//-------------------------------------------------
void tc0100scn_device::static_set_palette_tag(device_t &device, const char *tag)
{
downcast<tc0100scn_device &>(device).m_palette.set_tag(tag);
}
//-------------------------------------------------
// device_config_complete - perform any
// operations now that the configuration is
@ -272,7 +283,7 @@ void tc0100scn_device::device_start()
/* we call this here, so that they can be modified at video_start*/
/* create the char set (gfx will then be updated dynamically from RAM) */
m_gfxdecode->set_gfx(m_txnum, auto_alloc_clear(machine(), gfx_element(machine(), tc0100scn_charlayout, (UINT8 *)m_char_ram, 64, 0)));
m_gfxdecode->set_gfx(m_txnum, auto_alloc_clear(machine(), gfx_element(m_palette, tc0100scn_charlayout, (UINT8 *)m_char_ram, 64, 0)));
save_pointer(NAME(m_ram), TC0100SCN_RAM_SIZE / 2);
save_item(NAME(m_ctrl));

View File

@ -23,6 +23,7 @@ public:
// static configuration
static void static_set_gfxdecode_tag(device_t &device, const char *tag);
static void static_set_palette_tag(device_t &device, const char *tag);
#define TC0100SCN_SINGLE_VDU 1024
@ -88,7 +89,9 @@ private:
INT32 m_gfxbank, m_colbank;
INT32 m_bg0_colbank, m_bg1_colbank, m_tx_colbank;
int m_dblwidth;
required_device<gfxdecode_device> m_gfxdecode;
required_device<palette_device> m_palette;
TILE_GET_INFO_MEMBER(get_bg_tile_info);
TILE_GET_INFO_MEMBER(get_fg_tile_info);
@ -113,4 +116,8 @@ extern const device_type TC0100SCN;
#define MCFG_TC0100SCN_GFXDECODE(_gfxtag) \
tc0100scn_device::static_set_gfxdecode_tag(*device, "^" _gfxtag);
#define MCFG_TC0100SCN_PALETTE(_palette_tag) \
tc0100scn_device::static_set_palette_tag(*device, "^" _palette_tag);
#endif

View File

@ -153,7 +153,8 @@ tc0480scp_device::tc0480scp_device(const machine_config &mconfig, const char *ta
m_pri_reg(0),
m_dblwidth(0),
m_x_offs(0),
m_gfxdecode(*this)
m_gfxdecode(*this),
m_palette(*this)
{
}
@ -167,6 +168,15 @@ void tc0480scp_device::static_set_gfxdecode_tag(device_t &device, const char *ta
downcast<tc0480scp_device &>(device).m_gfxdecode.set_tag(tag);
}
//-------------------------------------------------
// static_set_palette_tag: Set the tag of the
// palette device
//-------------------------------------------------
void tc0480scp_device::static_set_palette_tag(device_t &device, const char *tag)
{
downcast<tc0480scp_device &>(device).m_palette.set_tag(tag);
}
//-------------------------------------------------
// device_config_complete - perform any
@ -282,7 +292,7 @@ void tc0480scp_device::device_start()
set_layer_ptrs();
/* create the char set (gfx will then be updated dynamically from RAM) */
m_gfxdecode->set_gfx(m_txnum, auto_alloc_clear(machine(), gfx_element(machine(), tc0480scp_charlayout, (UINT8 *)m_char_ram, 64, 0)));
m_gfxdecode->set_gfx(m_txnum, auto_alloc_clear(machine(), gfx_element(m_palette, tc0480scp_charlayout, (UINT8 *)m_char_ram, 64, 0)));
save_pointer(NAME(m_ram), TC0480SCP_RAM_SIZE / 2);
save_item(NAME(m_ctrl));

View File

@ -24,6 +24,7 @@ public:
// static configuration
static void static_set_gfxdecode_tag(device_t &device, const char *tag);
static void static_set_palette_tag(device_t &device, const char *tag);
/* When writing a driver, pass zero for the text and flip offsets initially:
then tweak them once you have the 4 bg layer positions correct. Col_base
@ -78,7 +79,9 @@ private:
tilemap_t *m_tilemap[5][2];
INT32 m_dblwidth;
int m_x_offs;
required_device<gfxdecode_device> m_gfxdecode;
required_device<palette_device> m_palette;
void common_get_tc0480bg_tile_info( tile_data &tileinfo, int tile_index, UINT16 *ram, int gfxnum );
void common_get_tc0480tx_tile_info( tile_data &tileinfo, int tile_index, UINT16 *ram, int gfxnum );
@ -104,4 +107,7 @@ extern const device_type TC0480SCP;
#define MCFG_TC0480SCP_GFXDECODE(_gfxtag) \
tc0480scp_device::static_set_gfxdecode_tag(*device, "^" _gfxtag);
#define MCFG_TC0480SCP_PALETTE(_palette_tag) \
tc0480scp_device::static_set_palette_tag(*device, "^" _palette_tag);
#endif

View File

@ -253,13 +253,13 @@ void tceptor_state::decode_bg(const char * region)
auto_free(machine(), buffer);
/* decode the graphics */
m_gfxdecode->set_gfx(gfx_index, auto_alloc(machine(), gfx_element(machine(), bg_layout, memregion(region)->base(), 64, 0x0a00)));
m_gfxdecode->set_gfx(gfx_index, auto_alloc(machine(), gfx_element(m_palette, bg_layout, memregion(region)->base(), 64, 0x0a00)));
}
void tceptor_state::decode_sprite(int gfx_index, const gfx_layout *layout, const void *data)
{
/* decode the graphics */
m_gfxdecode->set_gfx(gfx_index, auto_alloc(machine(), gfx_element(machine(), *layout, (const UINT8 *)data, 64, 1024)));
m_gfxdecode->set_gfx(gfx_index, auto_alloc(machine(), gfx_element(m_palette, *layout, (const UINT8 *)data, 64, 1024)));
}
// fix sprite order

View File

@ -651,7 +651,7 @@ static void wecleman_draw_road(running_machine &machine, bitmap_rgb32 &bitmap, c
------------------------------------------------------------------------*/
// blends two 8x8x16bpp direct RGB tilemaps
static void draw_cloud(bitmap_rgb32 &bitmap,
void wecleman_state::draw_cloud(bitmap_rgb32 &bitmap,
gfx_element *gfx,
UINT16 *tm_base,
int x0, int y0, // target coordinate
@ -660,7 +660,6 @@ static void draw_cloud(bitmap_rgb32 &bitmap,
int tmw_l2, int tmh_l2, // tilemap width and height in log(2)
int alpha, int pal_offset ) // alpha(0-3f), # of color codes to shift
{
wecleman_state *state = gfx->machine().driver_data<wecleman_state>();
const UINT8 *src_ptr;
UINT16 *tmap_ptr;
UINT32 *dst_base, *dst_ptr;
@ -689,7 +688,7 @@ static void draw_cloud(bitmap_rgb32 &bitmap,
dst_base = &bitmap.pix32(y0+dy, x0+dx);
pal_base = state->m_palette->pens() + pal_offset * gfx->granularity();
pal_base = m_palette->pens() + pal_offset * gfx->granularity();
alpha <<= 6;
@ -733,9 +732,9 @@ static void draw_cloud(bitmap_rgb32 &bitmap,
dg = (dstrgb >> 11) & 0x1f;
db = (dstrgb >> 19) & 0x1f;
dr = (state->m_t32x32pm[dr - sr + alpha] >> 5) + dr;
dg = (state->m_t32x32pm[dg - sg + alpha] >> 5) + dg;
db = (state->m_t32x32pm[db - sb + alpha] >> 5) + db;
dr = (m_t32x32pm[dr - sr + alpha] >> 5) + dr;
dg = (m_t32x32pm[dg - sg + alpha] >> 5) + dg;
db = (m_t32x32pm[db - sb + alpha] >> 5) + db;
dst_ptr[tx] = rgb_t(pal5bit(db), pal5bit(dg), pal5bit(dr));
}
@ -1070,8 +1069,7 @@ UINT32 wecleman_state::screen_update_wecleman(screen_device &screen, bitmap_rgb3
((pen_t *)mrct)[0] = ((pen_t *)mrct)[0x40] = ((pen_t *)mrct)[0x200] = ((pen_t *)mrct)[0x205];
if (video_on)
draw_cloud(
bitmap,
draw_cloud(bitmap,
m_gfxdecode->gfx(0),
m_pageram+0x1800,
BMP_PAD, BMP_PAD,

View File

@ -228,8 +228,8 @@ void casloopy_state::video_start()
for(int i=0;i<0x10000;i++)
m_vram[i] = i & 0xff;
m_gfxdecode->set_gfx(m_gfx_index, auto_alloc(machine(), gfx_element(machine(), casloopy_4bpp_layout, m_vram, 0x10, 0)));
m_gfxdecode->set_gfx(m_gfx_index+1, auto_alloc(machine(), gfx_element(machine(), casloopy_8bpp_layout, m_vram, 1, 0)));
m_gfxdecode->set_gfx(m_gfx_index, auto_alloc(machine(), gfx_element(m_palette, casloopy_4bpp_layout, m_vram, 0x10, 0)));
m_gfxdecode->set_gfx(m_gfx_index+1, auto_alloc(machine(), gfx_element(m_palette, casloopy_8bpp_layout, m_vram, 1, 0)));
}
UINT32 casloopy_state::screen_update_casloopy(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)

View File

@ -580,9 +580,6 @@ static MACHINE_CONFIG_START( genesis_scd, md_cons_state )
MCFG_MACHINE_RESET_OVERRIDE( md_cons_state, ms_megadriv )
MCFG_DEVICE_ADD("segacd", SEGA_SEGACD_US, 0)
MCFG_SEGACD_GFXDECODE("gfxdecode")
MCFG_GFXDECODE_ADD("gfxdecode", empty)
MCFG_CDROM_ADD( "cdrom",scd_cdrom )
@ -596,9 +593,6 @@ static MACHINE_CONFIG_START( md_scd, md_cons_state )
MCFG_MACHINE_RESET_OVERRIDE( md_cons_state, ms_megadriv )
MCFG_DEVICE_ADD("segacd", SEGA_SEGACD_EUROPE, 0)
MCFG_SEGACD_GFXDECODE("gfxdecode")
MCFG_GFXDECODE_ADD("gfxdecode", empty)
MCFG_CDROM_ADD( "cdrom",scd_cdrom )
@ -612,9 +606,6 @@ static MACHINE_CONFIG_START( mdj_scd, md_cons_state )
MCFG_MACHINE_RESET_OVERRIDE( md_cons_state, ms_megadriv )
MCFG_DEVICE_ADD("segacd", SEGA_SEGACD_JAPAN, 0)
MCFG_SEGACD_GFXDECODE("gfxdecode")
MCFG_GFXDECODE_ADD("gfxdecode", empty)
MCFG_CDROM_ADD( "cdrom",scd_cdrom )
@ -625,9 +616,7 @@ MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( genesis_32x_scd, genesis_32x )
MCFG_DEVICE_ADD("segacd", SEGA_SEGACD_US, 0)
MCFG_SEGACD_GFXDECODE("gfxdecode")
MCFG_GFXDECODE_ADD("gfxdecode", empty)
//MCFG_QUANTUM_PERFECT_CPU("32x_master_sh2")
MACHINE_CONFIG_END

View File

@ -1782,8 +1782,8 @@ void mz2500_state::machine_start()
save_pointer(NAME(m_emm_ram), 0x100000);
/* TODO: gfx[4] crashes as per now */
m_gfxdecode->set_gfx(3, auto_alloc(machine(), gfx_element(machine(), mz2500_pcg_layout_1bpp, (UINT8 *)m_pcg_ram, 0x10, 0)));
m_gfxdecode->set_gfx(4, auto_alloc(machine(), gfx_element(machine(), mz2500_pcg_layout_3bpp, (UINT8 *)m_pcg_ram, 4, 0)));
m_gfxdecode->set_gfx(3, auto_alloc(machine(), gfx_element(m_palette, mz2500_pcg_layout_1bpp, (UINT8 *)m_pcg_ram, 0x10, 0)));
m_gfxdecode->set_gfx(4, auto_alloc(machine(), gfx_element(m_palette, mz2500_pcg_layout_3bpp, (UINT8 *)m_pcg_ram, 4, 0)));
}
void mz2500_state::machine_reset()

View File

@ -988,7 +988,7 @@ void smc777_state::machine_start()
save_pointer(NAME(m_gvram), 0x8000);
save_pointer(NAME(m_pcg), 0x800);
m_gfxdecode->set_gfx(0, auto_alloc(machine(), gfx_element(machine(), smc777_charlayout, (UINT8 *)m_pcg, 8, 0)));
m_gfxdecode->set_gfx(0, auto_alloc(machine(), gfx_element(m_palette, smc777_charlayout, (UINT8 *)m_pcg, 8, 0)));
}
void smc777_state::machine_reset()

View File

@ -2526,7 +2526,7 @@ MACHINE_START_MEMBER(x1_state,x1)
save_pointer(NAME(m_emm_ram), 0x1000000);
save_pointer(NAME(m_pcg_ram), 0x1800);
m_gfxdecode->set_gfx(3, auto_alloc(machine(), gfx_element(machine(), x1_pcg_8x8, (UINT8 *)m_pcg_ram, 1, 0)));
m_gfxdecode->set_gfx(3, auto_alloc(machine(), gfx_element(m_palette, x1_pcg_8x8, (UINT8 *)m_pcg_ram, 1, 0)));
}
PALETTE_INIT_MEMBER(x1_state,x1)

View File

@ -1094,11 +1094,11 @@ VIDEO_START_MEMBER(x68k_state,x68000)
break;
/* create the char set (gfx will then be updated dynamically from RAM) */
m_gfxdecode->set_gfx(gfx_index, auto_alloc(machine(), gfx_element(machine(), x68k_pcg_8, memregion("user1")->base(), 32, 0)));
m_gfxdecode->set_gfx(gfx_index, auto_alloc(machine(), gfx_element(m_palette, x68k_pcg_8, memregion("user1")->base(), 32, 0)));
gfx_index++;
m_gfxdecode->set_gfx(gfx_index, auto_alloc(machine(), gfx_element(machine(), x68k_pcg_16, memregion("user1")->base(), 32, 0)));
m_gfxdecode->set_gfx(gfx_index, auto_alloc(machine(), gfx_element(m_palette, x68k_pcg_16, memregion("user1")->base(), 32, 0)));
m_gfxdecode->gfx(gfx_index)->set_colors(32);
/* Tilemaps */