Removed unnecessary target() calls from shared_ptr references.

You still need target() if you want to cast to another pointer size.
This should be rare, and in fact fixing these pointed out a few
cases where code was missing BYTE/WORD/DWORD_XOR_* macros. I flagged
these with:

// ERROR: This cast is NOT endian-safe without the use of BYTE/WORD/DWORD_XOR_* macros!

For future fixing.
This commit is contained in:
Aaron Giles 2012-04-11 16:29:24 +00:00
parent 986f1ef77d
commit 4407afdb54
239 changed files with 1681 additions and 1671 deletions

View File

@ -129,7 +129,7 @@ enum
device_execute_interface::static_set_periodic_int(*device, _func, attotime::from_hz(_rate)); \
#define MCFG_DEVICE_PERIODIC_INT_DRIVER(_class, _func, _rate) \
device_execute_interface::static_set_vblank_int(*device, device_interrupt_delegate(&_class::_func, #_class "::" #_func, downcast<_class *>(&config.root_device())), attotime::from_hz(_rate)); \
device_execute_interface::static_set_periodic_int(*device, device_interrupt_delegate(&_class::_func, #_class "::" #_func, downcast<_class *>(&config.root_device())), attotime::from_hz(_rate)); \

View File

@ -79,14 +79,14 @@ public:
WRITE16_MEMBER(k3_state::k3_bgram_w)
{
COMBINE_DATA(&m_bgram.target()[offset]);
COMBINE_DATA(&m_bgram[offset]);
m_bg_tilemap->mark_tile_dirty(offset);
}
static TILE_GET_INFO( get_k3_bg_tile_info )
{
k3_state *state = machine.driver_data<k3_state>();
int tileno = state->m_bgram.target()[tile_index];
int tileno = state->m_bgram[tile_index];
SET_TILE_INFO(1, tileno, 0, 0);
}
@ -100,8 +100,8 @@ static void draw_sprites( running_machine &machine, bitmap_ind16 &bitmap, const
{
k3_state *state = machine.driver_data<k3_state>();
const gfx_element *gfx = machine.gfx[0];
UINT16 *source = state->m_spriteram_1.target();
UINT16 *source2 = state->m_spriteram_2.target();
UINT16 *source = state->m_spriteram_1;
UINT16 *source2 = state->m_spriteram_2;
UINT16 *finish = source + 0x1000 / 2;
while (source < finish)

View File

@ -488,13 +488,13 @@ public:
WRITE8_MEMBER(_5clown_state::fclown_videoram_w)
{
m_videoram.target()[offset] = data;
m_videoram[offset] = data;
m_bg_tilemap->mark_tile_dirty(offset);
}
WRITE8_MEMBER(_5clown_state::fclown_colorram_w)
{
m_colorram.target()[offset] = data;
m_colorram[offset] = data;
m_bg_tilemap->mark_tile_dirty(offset);
}
@ -512,8 +512,8 @@ static TILE_GET_INFO( get_fclown_tile_info )
x--- ---- Extra color for 7's.
*/
int attr = state->m_colorram.target()[tile_index];
int code = ((attr & 0x01) << 8) | ((attr & 0x40) << 2) | state->m_videoram.target()[tile_index]; /* bit 8 for extended char set */
int attr = state->m_colorram[tile_index];
int code = ((attr & 0x01) << 8) | ((attr & 0x40) << 2) | state->m_videoram[tile_index]; /* bit 8 for extended char set */
int bank = (attr & 0x02) >> 1; /* bit 1 switch the gfx banks */
int color = (attr & 0x3c) >> 2 | ((attr & 0x80) >> 3); /* bits 2-3-4-5-7 for color */

View File

@ -82,10 +82,10 @@ READ8_MEMBER(aceal_state::ace_objpos_r)
static VIDEO_START( ace )
{
aceal_state *state = machine.driver_data<aceal_state>();
gfx_element_set_source(machine.gfx[1], state->m_characterram.target());
gfx_element_set_source(machine.gfx[2], state->m_characterram.target());
gfx_element_set_source(machine.gfx[3], state->m_characterram.target());
gfx_element_set_source(machine.gfx[4], state->m_scoreram.target());
gfx_element_set_source(machine.gfx[1], state->m_characterram);
gfx_element_set_source(machine.gfx[2], state->m_characterram);
gfx_element_set_source(machine.gfx[3], state->m_characterram);
gfx_element_set_source(machine.gfx[4], state->m_scoreram);
}
static SCREEN_UPDATE_IND16( ace )
@ -136,14 +136,14 @@ static PALETTE_INIT( ace )
WRITE8_MEMBER(aceal_state::ace_characterram_w)
{
if (m_characterram.target()[offset] != data)
if (m_characterram[offset] != data)
{
if (data & ~0x07)
{
logerror("write to %04x data = %02x\n", 0x8000 + offset, data);
popmessage("write to %04x data = %02x\n", 0x8000 + offset, data);
}
m_characterram.target()[offset] = data;
m_characterram[offset] = data;
gfx_element_mark_dirty(machine().gfx[1], 0);
gfx_element_mark_dirty(machine().gfx[2], 0);
gfx_element_mark_dirty(machine().gfx[3], 0);
@ -152,7 +152,7 @@ WRITE8_MEMBER(aceal_state::ace_characterram_w)
WRITE8_MEMBER(aceal_state::ace_scoreram_w)
{
m_scoreram.target()[offset] = data;
m_scoreram[offset] = data;
gfx_element_mark_dirty(machine().gfx[4], offset / 32);
}

View File

@ -49,7 +49,7 @@ static void acefruit_update_irq(running_machine &machine, int vpos )
for( col = 0; col < 32; col++ )
{
int tile_index = ( col * 32 ) + row;
int color = state->m_colorram.target()[ tile_index ];
int color = state->m_colorram[ tile_index ];
switch( color )
{
@ -104,8 +104,8 @@ static SCREEN_UPDATE_IND16( acefruit )
for( col = 0; col < 32; col++ )
{
int tile_index = ( col * 32 ) + row;
int code = state->m_videoram.target()[ tile_index ];
int color = state->m_colorram.target()[ tile_index ];
int code = state->m_videoram[ tile_index ];
int color = state->m_colorram[ tile_index ];
if( color < 0x4 )
{
@ -121,7 +121,7 @@ static SCREEN_UPDATE_IND16( acefruit )
for( x = 0; x < 16; x++ )
{
int sprite = ( state->m_spriteram.target()[ ( spriteindex / 64 ) % 6 ] & 0xf ) ^ 0xf;
int sprite = ( state->m_spriteram[ ( spriteindex / 64 ) % 6 ] & 0xf ) ^ 0xf;
const UINT8 *gfxdata = gfx_element_get_data(gfx, sprite);
for( y = 0; y < 8; y++ )
@ -228,7 +228,7 @@ CUSTOM_INPUT_MEMBER(acefruit_state::starspnr_payout_r)
WRITE8_MEMBER(acefruit_state::acefruit_colorram_w)
{
m_colorram.target()[ offset ] = data & 0xf;
m_colorram[ offset ] = data & 0xf;
}
WRITE8_MEMBER(acefruit_state::acefruit_coin_w)

View File

@ -101,7 +101,7 @@ static TILEMAP_MAPPER( bg_scan )
static TILE_GET_INFO( ac_get_bg_tile_info )
{
acommand_state *state = machine.driver_data<acommand_state>();
int code = state->m_ac_bgvram.target()[tile_index];
int code = state->m_ac_bgvram[tile_index];
SET_TILE_INFO(
1,
code & 0xfff,
@ -112,7 +112,7 @@ static TILE_GET_INFO( ac_get_bg_tile_info )
static TILE_GET_INFO( ac_get_tx_tile_info )
{
acommand_state *state = machine.driver_data<acommand_state>();
int code = state->m_ac_txvram.target()[tile_index];
int code = state->m_ac_txvram[tile_index];
SET_TILE_INFO(
0,
code & 0xfff,
@ -123,7 +123,7 @@ static TILE_GET_INFO( ac_get_tx_tile_info )
static void draw_sprites(running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect, int priority, int pri_mask)
{
acommand_state *state = machine.driver_data<acommand_state>();
UINT16 *spriteram16 = state->m_spriteram.target();
UINT16 *spriteram16 = state->m_spriteram;
int offs;
for (offs = 0;offs < state->m_spriteram.bytes()/2;offs += 8)
@ -269,13 +269,13 @@ static SCREEN_UPDATE_IND16( acommand )
WRITE16_MEMBER(acommand_state::ac_bgvram_w)
{
COMBINE_DATA(&m_ac_bgvram.target()[offset]);
COMBINE_DATA(&m_ac_bgvram[offset]);
m_bg_tilemap->mark_tile_dirty(offset);
}
WRITE16_MEMBER(acommand_state::ac_txvram_w)
{
COMBINE_DATA(&m_ac_txvram.target()[offset]);
COMBINE_DATA(&m_ac_txvram[offset]);
m_tx_tilemap->mark_tile_dirty(offset);
}
@ -345,24 +345,24 @@ READ16_MEMBER(acommand_state::ac_devices_r)
*/
//22dc8
{
m_ufo_sw1 = m_ac_devram.target()[offset] & 3;
if(m_ac_devram.target()[offset] & 0x10)
m_ufo_sw1 = m_ac_devram[offset] & 3;
if(m_ac_devram[offset] & 0x10)
m_ufo_sw1|= 0x10;
if(m_ac_devram.target()[offset] & 0x40)
if(m_ac_devram[offset] & 0x40)
m_ufo_sw1|= 0x20;
if(m_ac_devram.target()[offset] & 0x100)
if(m_ac_devram[offset] & 0x100)
m_ufo_sw1|=0x100;
if(m_ac_devram.target()[offset] & 0x400)
if(m_ac_devram[offset] & 0x400)
m_ufo_sw1|=0x200;
if(m_ac_devram.target()[offset] & 0x1000)
if(m_ac_devram[offset] & 0x1000)
m_ufo_sw1|=0x1000;
if(m_ac_devram.target()[offset] & 0x4000)
if(m_ac_devram[offset] & 0x4000)
m_ufo_sw1|=0x2000;
// if(m_ac_devram.target()[0x0048/2] & 0x0001)
// if(m_ac_devram[0x0048/2] & 0x0001)
// m_ufo_sw1|=0x0040;
// if(m_ac_devram.target()[0x0048/2] & 0x0004)
// if(m_ac_devram[0x0048/2] & 0x0004)
// m_ufo_sw1|=0x0400;
// if(m_ac_devram.target()[0x0048/2] & 0x0100)
// if(m_ac_devram[0x0048/2] & 0x0100)
// m_ufo_sw1|=0x4000;
return m_ufo_sw1;
}
@ -375,18 +375,18 @@ READ16_MEMBER(acommand_state::ac_devices_r)
*/
{
m_ufo_sw2 = 0;
if(m_ac_devram.target()[offset] & 0x01)
if(m_ac_devram[offset] & 0x01)
m_ufo_sw2|= 1;
if(m_ac_devram.target()[offset] & 0x04)
if(m_ac_devram[offset] & 0x04)
m_ufo_sw2|= 2;
if(m_ac_devram.target()[offset] & 0x10)
if(m_ac_devram[offset] & 0x10)
m_ufo_sw2|=0x10;
if(m_ac_devram.target()[offset] & 0x40)
if(m_ac_devram[offset] & 0x40)
m_ufo_sw2|=0x20;
return m_ufo_sw2;
}
case 0x0048/2:
return m_ac_devram.target()[offset];
return m_ac_devram[offset];
case 0x005c/2:
/*
xxxx xxxx ---- ---- DIPSW4
@ -394,12 +394,12 @@ READ16_MEMBER(acommand_state::ac_devices_r)
*/
return input_port_read(machine(), "IN1");
}
return m_ac_devram.target()[offset];
return m_ac_devram[offset];
}
WRITE16_MEMBER(acommand_state::ac_devices_w)
{
COMBINE_DATA(&m_ac_devram.target()[offset]);
COMBINE_DATA(&m_ac_devram[offset]);
switch(offset)
{
case 0x00/2:
@ -437,11 +437,11 @@ WRITE16_MEMBER(acommand_state::ac_devices_w)
case 0x48/2:
break;
case 0x50/2:
m_led0 = m_ac_devram.target()[offset];
m_led0 = m_ac_devram[offset];
//popmessage("%04x",m_led0);
break;
case 0x54/2:
m_led1 = m_ac_devram.target()[offset];
m_led1 = m_ac_devram[offset];
//popmessage("%04x",m_led0);
break;
}

View File

@ -65,12 +65,12 @@ static void draw_sprites( running_machine &machine, bitmap_ind16 &bitmap, const
for (i = 511; i >= 0; i--)
{
int code = state->m_spriteram1.target()[i] | (state->m_spriteram2.target()[i] << 8);
int color = (state->m_spriteram2.target()[i + 0x200] & 0xf8) >> 3;
int code = state->m_spriteram1[i] | (state->m_spriteram2[i] << 8);
int color = (state->m_spriteram2[i + 0x200] & 0xf8) >> 3;
int flipx = 0;
int flipy = 0;
int sx = state->m_spriteram1.target()[i + 0x200] | ((state->m_spriteram2.target()[i + 0x200] & 0x07) << 8);
int sy = 242 - state->m_spriteram3.target()[i];
int sx = state->m_spriteram1[i + 0x200] | ((state->m_spriteram2[i + 0x200] & 0x07) << 8);
int sy = 242 - state->m_spriteram3[i];
if (state->m_flip_bit)
{

View File

@ -74,8 +74,8 @@ public:
static TILE_GET_INFO( y_get_bg_tile_info )
{
albazg_state *state = machine.driver_data<albazg_state>();
int code = state->m_videoram.target()[tile_index];
int color = state->m_colorram.target()[tile_index];
int code = state->m_videoram[tile_index];
int color = state->m_colorram[tile_index];
SET_TILE_INFO(
0,
@ -118,13 +118,13 @@ GFXDECODE_END
WRITE8_MEMBER(albazg_state::yumefuda_vram_w)
{
m_videoram.target()[offset] = data;
m_videoram[offset] = data;
m_bg_tilemap->mark_tile_dirty(offset);
}
WRITE8_MEMBER(albazg_state::yumefuda_cram_w)
{
m_colorram.target()[offset] = data;
m_colorram[offset] = data;
m_bg_tilemap->mark_tile_dirty(offset);
}
@ -132,14 +132,14 @@ WRITE8_MEMBER(albazg_state::yumefuda_cram_w)
READ8_MEMBER(albazg_state::custom_ram_r)
{
// logerror("Custom RAM read at %02x PC = %x\n", offset + 0xaf80, cpu_get_pc(&space.device()));
return m_cus_ram.target()[offset];// ^ 0x55;
return m_cus_ram[offset];// ^ 0x55;
}
WRITE8_MEMBER(albazg_state::custom_ram_w)
{
// logerror("Custom RAM write at %02x : %02x PC = %x\n", offset + 0xaf80, data, cpu_get_pc(&space.device()));
if(m_prot_lock)
m_cus_ram.target()[offset] = data;
m_cus_ram[offset] = data;
}
/*this might be used as NVRAM commands btw*/

View File

@ -362,14 +362,14 @@ static SCREEN_UPDATE_IND16(aristmk4)
{
for (x=38;x--;)
{
color = ((state->m_mkiv_vram.target()[count]) & 0xe0) >> 5;
tile = (state->m_mkiv_vram.target()[count+1]|state->m_mkiv_vram.target()[count]<<8) & 0x3ff;
bgtile = (state->m_mkiv_vram.target()[count+1]|state->m_mkiv_vram.target()[count]<<8) & 0xff; // first 256 tiles
color = ((state->m_mkiv_vram[count]) & 0xe0) >> 5;
tile = (state->m_mkiv_vram[count+1]|state->m_mkiv_vram[count]<<8) & 0x3ff;
bgtile = (state->m_mkiv_vram[count+1]|state->m_mkiv_vram[count]<<8) & 0xff; // first 256 tiles
uBackgroundColour(screen.machine()); // read sw7
gfx_element_decode(gfx, bgtile); // force the machine to update only the first 256 tiles.
// as we only update the background, not the entire display.
flipx = ((state->m_mkiv_vram.target()[count]) & 0x04);
flipy = ((state->m_mkiv_vram.target()[count]) & 0x08);
flipx = ((state->m_mkiv_vram[count]) & 0x04);
flipy = ((state->m_mkiv_vram[count]) & 0x08);
drawgfx_opaque(bitmap,cliprect,gfx,tile,color,flipx,flipy,(38-x-1)<<3,(27-y-1)<<3);
count+=2;
}

View File

@ -126,7 +126,7 @@ WRITE8_MEMBER(astinvad_state::color_latch_w)
WRITE8_MEMBER(astinvad_state::spaceint_videoram_w)
{
m_videoram.target()[offset] = data;
m_videoram[offset] = data;
m_colorram[offset] = m_color_latch;
}
@ -167,7 +167,7 @@ static SCREEN_UPDATE_RGB32( astinvad )
for (x = cliprect.min_x & ~7; x <= cliprect.max_x; x += 8)
{
UINT8 color = color_prom[((y & 0xf8) << 2) | (x >> 3)] >> (state->m_screen_flip ? 0 : 4);
UINT8 data = state->m_videoram.target()[(((y ^ state->m_screen_flip) + yoffs) << 5) | ((x ^ state->m_screen_flip) >> 3)];
UINT8 data = state->m_videoram[(((y ^ state->m_screen_flip) + yoffs) << 5) | ((x ^ state->m_screen_flip) >> 3)];
plot_byte(screen.machine(), bitmap, y, x, data, state->m_screen_red ? 1 : color);
}
@ -183,7 +183,7 @@ static SCREEN_UPDATE_RGB32( spaceint )
for (offs = 0; offs < state->m_videoram.bytes(); offs++)
{
UINT8 data = state->m_videoram.target()[offs];
UINT8 data = state->m_videoram[offs];
UINT8 color = state->m_colorram[offs];
UINT8 y = ~offs;

View File

@ -101,8 +101,8 @@ static VIDEO_START( astrocorp )
static void draw_sprites( running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect )
{
astrocorp_state *state = machine.driver_data<astrocorp_state>();
UINT16 *source = state->m_spriteram.target();
UINT16 *finish = state->m_spriteram.target() + state->m_spriteram.bytes() / 2;
UINT16 *source = state->m_spriteram;
UINT16 *finish = state->m_spriteram + state->m_spriteram.bytes() / 2;
for ( ; source < finish; source += 8 / 2 )
{
@ -279,11 +279,11 @@ READ16_MEMBER(astrocorp_state::astrocorp_unk_r)
// 5-6-5 Palette: BBBBB-GGGGGG-RRRRR
WRITE16_MEMBER(astrocorp_state::astrocorp_palette_w)
{
COMBINE_DATA(&m_paletteram.target()[offset]);
COMBINE_DATA(&m_paletteram[offset]);
palette_set_color_rgb(machine(), offset,
pal5bit((m_paletteram.target()[offset] >> 0) & 0x1f),
pal6bit((m_paletteram.target()[offset] >> 5) & 0x3f),
pal5bit((m_paletteram.target()[offset] >> 11) & 0x1f)
pal5bit((m_paletteram[offset] >> 0) & 0x1f),
pal6bit((m_paletteram[offset] >> 5) & 0x3f),
pal5bit((m_paletteram[offset] >> 11) & 0x1f)
);
}

View File

@ -170,7 +170,7 @@ static SCREEN_UPDATE_RGB32( atarisy4 )
for (y = cliprect.min_y; y <= cliprect.max_y; ++y)
{
UINT16 *src = &state->m_screen_ram.target()[(offset + (4096 * y)) / 2];
UINT16 *src = &state->m_screen_ram[(offset + (4096 * y)) / 2];
UINT32 *dest = &bitmap.pix32(y, cliprect.min_x);
int x;
@ -225,14 +225,14 @@ static void image_mem_to_screen(atarisy4_state *state, bool clip)
{
if (x >= 0 && x <= 511)
{
UINT16 pix = state->m_screen_ram.target()[xy_to_screen_addr(x,y) >> 1];
UINT16 pix = state->m_screen_ram[xy_to_screen_addr(x,y) >> 1];
if (x & 1)
pix = (pix & (0x00ff)) | gpu.idr << 8;
else
pix = (pix & (0xff00)) | gpu.idr;
state->m_screen_ram.target()[xy_to_screen_addr(x,y) >> 1] = pix;
state->m_screen_ram[xy_to_screen_addr(x,y) >> 1] = pix;
}
++x;
}
@ -271,7 +271,7 @@ static void draw_polygon(atarisy4_state *state, UINT16 color)
clip.set(0, 511, 0, 511);
extra->color = color;
extra->screen_ram = state->m_screen_ram.target();
extra->screen_ram = state->m_screen_ram;
v1.x = gpu.points[0].x;
v1.y = gpu.points[0].y;
@ -373,7 +373,7 @@ void execute_gpu_command(running_machine &machine)
for (i = 0; i < gpu.gr[3]; ++i)
{
UINT16 val = state->m_screen_ram.target()[offset >> 1];
UINT16 val = state->m_screen_ram[offset >> 1];
val >>= (~offset & 1) << 3;
if (gpu.gr[4] & 0x10)

View File

@ -468,14 +468,14 @@ public:
WRITE8_MEMBER( avt_state::avt_videoram_w )
{
m_videoram.target()[offset] = data;
m_videoram[offset] = data;
m_bg_tilemap->mark_tile_dirty(offset);
}
WRITE8_MEMBER( avt_state::avt_colorram_w )
{
m_colorram.target()[offset] = data;
m_colorram[offset] = data;
m_bg_tilemap->mark_tile_dirty(offset);
}
@ -488,8 +488,8 @@ static TILE_GET_INFO( get_bg_tile_info )
xxxx ---- color code.
---- xxxx seems unused.
*/
int attr = state->m_colorram.target()[tile_index];
int code = state->m_videoram.target()[tile_index] | ((attr & 1) << 8);
int attr = state->m_colorram[tile_index];
int code = state->m_videoram[tile_index] | ((attr & 1) << 8);
int color = (attr & 0xf0)>>4;
SET_TILE_INFO( 0, code, color, 0);
@ -516,8 +516,8 @@ static SCREEN_UPDATE_IND16( avt )
{
for(x=0;x<mc6845_h_display;x++)
{
UINT16 tile = state->m_videoram.target()[count] | ((state->m_colorram.target()[count] & 1) << 8);
UINT8 color = (state->m_colorram.target()[count] & 0xf0) >> 4;
UINT16 tile = state->m_videoram[count] | ((state->m_colorram[count] & 1) << 8);
UINT8 color = (state->m_colorram[count] & 0xf0) >> 4;
drawgfx_opaque(bitmap,cliprect,gfx,tile,color,0,0,x*8,(y*8));

View File

@ -119,20 +119,20 @@ static SCREEN_UPDATE_IND16( backfire_left )
screen.machine().priority_bitmap.fill(0);
bitmap.fill(0x100, cliprect);
if (state->m_left_priority.target()[0] == 0)
if (state->m_left_priority[0] == 0)
{
deco16ic_tilemap_1_draw(state->m_deco_tilegen2, bitmap, cliprect, 0, 1);
deco16ic_tilemap_1_draw(state->m_deco_tilegen1, bitmap, cliprect, 0, 2);
screen.machine().device<decospr_device>("spritegen")->draw_sprites(bitmap, cliprect, state->m_spriteram_1, 0x800);
}
else if (state->m_left_priority.target()[0] == 2)
else if (state->m_left_priority[0] == 2)
{
deco16ic_tilemap_1_draw(state->m_deco_tilegen1, bitmap, cliprect, 0, 2);
deco16ic_tilemap_1_draw(state->m_deco_tilegen2, bitmap, cliprect, 0, 4);
screen.machine().device<decospr_device>("spritegen")->draw_sprites(bitmap, cliprect, state->m_spriteram_1, 0x800);
}
else
popmessage( "unknown left priority %08x", state->m_left_priority.target()[0]);
popmessage( "unknown left priority %08x", state->m_left_priority[0]);
return 0;
}
@ -152,20 +152,20 @@ static SCREEN_UPDATE_IND16( backfire_right )
screen.machine().priority_bitmap.fill(0);
bitmap.fill(0x500, cliprect);
if (state->m_right_priority.target()[0] == 0)
if (state->m_right_priority[0] == 0)
{
deco16ic_tilemap_2_draw(state->m_deco_tilegen2, bitmap, cliprect, 0, 1);
deco16ic_tilemap_2_draw(state->m_deco_tilegen1, bitmap, cliprect, 0, 2);
screen.machine().device<decospr_device>("spritegen2")->draw_sprites(bitmap, cliprect, state->m_spriteram_2, 0x800);
}
else if (state->m_right_priority.target()[0] == 2)
else if (state->m_right_priority[0] == 2)
{
deco16ic_tilemap_2_draw(state->m_deco_tilegen1, bitmap, cliprect, 0, 2);
deco16ic_tilemap_2_draw(state->m_deco_tilegen2, bitmap, cliprect, 0, 4);
screen.machine().device<decospr_device>("spritegen2")->draw_sprites(bitmap, cliprect, state->m_spriteram_2, 0x800);
}
else
popmessage( "unknown right priority %08x", state->m_right_priority.target()[0]);
popmessage( "unknown right priority %08x", state->m_right_priority[0]);
return 0;
}
@ -699,7 +699,7 @@ READ32_MEMBER(backfire_state::backfire_speedup_r)
if (cpu_get_pc(&space.device() )== 0xce44) device_spin_until_time(&space.device(), attotime::from_usec(400)); // backfire
if (cpu_get_pc(&space.device()) == 0xcee4) device_spin_until_time(&space.device(), attotime::from_usec(400)); // backfirea
return m_mainram.target()[0x18/4];
return m_mainram[0x18/4];
}

View File

@ -179,7 +179,7 @@ static SCREEN_UPDATE_RGB32( beaminv )
UINT8 y = offs;
UINT8 x = offs >> 8 << 3;
UINT8 data = state->m_videoram.target()[offs];
UINT8 data = state->m_videoram[offs];
for (i = 0; i < 8; i++)
{

View File

@ -363,7 +363,7 @@ WRITE8_MEMBER(berzerk_state::magicram_w)
{
UINT8 alu_output;
UINT8 current_video_data = m_videoram.target()[offset];
UINT8 current_video_data = m_videoram[offset];
/* shift data towards LSB. MSB bits are filled by data from last_shift_data.
The shifter consists of 5 74153 devices @ 7A, 8A, 9A, 10A and 11A,
@ -390,7 +390,7 @@ WRITE8_MEMBER(berzerk_state::magicram_w)
alu_output = (TTL74181_read(LS181_10C, TTL74181_OUTPUT_F0, 4) << 4) |
(TTL74181_read(LS181_12C, TTL74181_OUTPUT_F0, 4) << 0);
m_videoram.target()[offset] = alu_output ^ 0xff;
m_videoram[offset] = alu_output ^ 0xff;
/* save data for next time */
m_last_shift_data = data & 0x7f;
@ -465,8 +465,8 @@ static SCREEN_UPDATE_RGB32( berzerk )
{
int i;
UINT8 data = state->m_videoram.target()[offs];
UINT8 color = state->m_colorram.target()[((offs >> 2) & 0x07e0) | (offs & 0x001f)];
UINT8 data = state->m_videoram[offs];
UINT8 color = state->m_colorram[((offs >> 2) & 0x07e0) | (offs & 0x001f)];
UINT8 y = offs >> 5;
UINT8 x = offs << 3;

View File

@ -54,7 +54,7 @@ public:
static TILE_GET_INFO( get_tx_tile_info )
{
bestleag_state *state = machine.driver_data<bestleag_state>();
int code = state->m_txram.target()[tile_index];
int code = state->m_txram[tile_index];
SET_TILE_INFO(
0,
@ -66,7 +66,7 @@ static TILE_GET_INFO( get_tx_tile_info )
static TILE_GET_INFO( get_bg_tile_info )
{
bestleag_state *state = machine.driver_data<bestleag_state>();
int code = state->m_bgram.target()[tile_index];
int code = state->m_bgram[tile_index];
SET_TILE_INFO(
1,
@ -78,7 +78,7 @@ static TILE_GET_INFO( get_bg_tile_info )
static TILE_GET_INFO( get_fg_tile_info )
{
bestleag_state *state = machine.driver_data<bestleag_state>();
int code = state->m_fgram.target()[tile_index];
int code = state->m_fgram[tile_index];
SET_TILE_INFO(
1,
@ -117,7 +117,7 @@ Note: sprite chip is different than the other Big Striker sets and they
static void draw_sprites(running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
bestleag_state *state = machine.driver_data<bestleag_state>();
UINT16 *spriteram16 = state->m_spriteram.target();
UINT16 *spriteram16 = state->m_spriteram;
/*
@ -140,7 +140,7 @@ static void draw_sprites(running_machine &machine, bitmap_ind16 &bitmap, const r
return;
/* it can change sprites color mask like the original set */
if(state->m_vregs.target()[0x00/2] & 0x1000)
if(state->m_vregs[0x00/2] & 0x1000)
color &= 7;
drawgfx_transpen(bitmap,cliprect,machine.gfx[2],
@ -173,12 +173,12 @@ static void draw_sprites(running_machine &machine, bitmap_ind16 &bitmap, const r
static SCREEN_UPDATE_IND16(bestleag)
{
bestleag_state *state = screen.machine().driver_data<bestleag_state>();
state->m_bg_tilemap->set_scrollx(0,(state->m_vregs.target()[0x00/2] & 0xfff) + (state->m_vregs.target()[0x08/2] & 0x7) - 3);
state->m_bg_tilemap->set_scrolly(0,state->m_vregs.target()[0x02/2]);
state->m_tx_tilemap->set_scrollx(0,state->m_vregs.target()[0x04/2]);
state->m_tx_tilemap->set_scrolly(0,state->m_vregs.target()[0x06/2]);
state->m_fg_tilemap->set_scrollx(0,state->m_vregs.target()[0x08/2] & 0xfff8);
state->m_fg_tilemap->set_scrolly(0,state->m_vregs.target()[0x0a/2]);
state->m_bg_tilemap->set_scrollx(0,(state->m_vregs[0x00/2] & 0xfff) + (state->m_vregs[0x08/2] & 0x7) - 3);
state->m_bg_tilemap->set_scrolly(0,state->m_vregs[0x02/2]);
state->m_tx_tilemap->set_scrollx(0,state->m_vregs[0x04/2]);
state->m_tx_tilemap->set_scrolly(0,state->m_vregs[0x06/2]);
state->m_fg_tilemap->set_scrollx(0,state->m_vregs[0x08/2] & 0xfff8);
state->m_fg_tilemap->set_scrolly(0,state->m_vregs[0x0a/2]);
state->m_bg_tilemap->draw(bitmap, cliprect, 0,0);
state->m_fg_tilemap->draw(bitmap, cliprect, 0,0);
@ -190,12 +190,12 @@ static SCREEN_UPDATE_IND16(bestleag)
static SCREEN_UPDATE_IND16(bestleaw)
{
bestleag_state *state = screen.machine().driver_data<bestleag_state>();
state->m_bg_tilemap->set_scrollx(0,state->m_vregs.target()[0x08/2]);
state->m_bg_tilemap->set_scrolly(0,state->m_vregs.target()[0x0a/2]);
state->m_tx_tilemap->set_scrollx(0,state->m_vregs.target()[0x00/2]);
state->m_tx_tilemap->set_scrolly(0,state->m_vregs.target()[0x02/2]);
state->m_fg_tilemap->set_scrollx(0,state->m_vregs.target()[0x04/2]);
state->m_fg_tilemap->set_scrolly(0,state->m_vregs.target()[0x06/2]);
state->m_bg_tilemap->set_scrollx(0,state->m_vregs[0x08/2]);
state->m_bg_tilemap->set_scrolly(0,state->m_vregs[0x0a/2]);
state->m_tx_tilemap->set_scrollx(0,state->m_vregs[0x00/2]);
state->m_tx_tilemap->set_scrolly(0,state->m_vregs[0x02/2]);
state->m_fg_tilemap->set_scrollx(0,state->m_vregs[0x04/2]);
state->m_fg_tilemap->set_scrolly(0,state->m_vregs[0x06/2]);
state->m_bg_tilemap->draw(bitmap, cliprect, 0,0);
state->m_fg_tilemap->draw(bitmap, cliprect, 0,0);
@ -206,19 +206,19 @@ static SCREEN_UPDATE_IND16(bestleaw)
WRITE16_MEMBER(bestleag_state::bestleag_txram_w)
{
m_txram.target()[offset] = data;
m_txram[offset] = data;
m_tx_tilemap->mark_tile_dirty(offset);
}
WRITE16_MEMBER(bestleag_state::bestleag_bgram_w)
{
m_bgram.target()[offset] = data;
m_bgram[offset] = data;
m_bg_tilemap->mark_tile_dirty(offset);
}
WRITE16_MEMBER(bestleag_state::bestleag_fgram_w)
{
m_fgram.target()[offset] = data;
m_fgram[offset] = data;
m_fg_tilemap->mark_tile_dirty(offset);
}

View File

@ -475,22 +475,22 @@ static SCREEN_UPDATE_RGB32(bingor)
{
UINT32 color;
color = (state->m_blit_ram.target()[count] & 0xf000)>>12;
color = (state->m_blit_ram[count] & 0xf000)>>12;
if(cliprect.contains(x+3, y))
bitmap.pix32(y, x+3) = screen.machine().pens[color];
color = (state->m_blit_ram.target()[count] & 0x0f00)>>8;
color = (state->m_blit_ram[count] & 0x0f00)>>8;
if(cliprect.contains(x+2, y))
bitmap.pix32(y, x+2) = screen.machine().pens[color];
color = (state->m_blit_ram.target()[count] & 0x00f0)>>4;
color = (state->m_blit_ram[count] & 0x00f0)>>4;
if(cliprect.contains(x+1, y))
bitmap.pix32(y, x+1) = screen.machine().pens[color];
color = (state->m_blit_ram.target()[count] & 0x000f)>>0;
color = (state->m_blit_ram[count] & 0x000f)>>0;
if(cliprect.contains(x+0, y))
bitmap.pix32(y, x+0) = screen.machine().pens[color];

View File

@ -90,9 +90,9 @@ static void draw_strip(running_machine &machine, bitmap_ind16 &bitmap, const rec
for (y=0;y<32;y++)
{
UINT16 tile = (state->m_tilemapram2.target()[count*2 + (base/2)+1]&0x3fff);
UINT16 flipx = (state->m_tilemapram2.target()[count*2 + (base/2)+1]&0x4000);
UINT16 colour = (state->m_tilemapram2.target()[count*2 + (base/2)]&0x00ff);
UINT16 tile = (state->m_tilemapram2[count*2 + (base/2)+1]&0x3fff);
UINT16 flipx = (state->m_tilemapram2[count*2 + (base/2)+1]&0x4000);
UINT16 colour = (state->m_tilemapram2[count*2 + (base/2)]&0x00ff);
if (tile&0x2000)
{
@ -121,8 +121,8 @@ static void draw_main(running_machine &machine, bitmap_ind16 &bitmap, const rect
int yy;
int s = 0;
xx= ((state->m_tilemapram2.target()[x+0]&0x001f)<<4) | (state->m_tilemapram2.target()[x+1]&0xf000)>>12;
yy = ((state->m_tilemapram2.target()[x+1]&0x1ff));
xx= ((state->m_tilemapram2[x+0]&0x001f)<<4) | (state->m_tilemapram2[x+1]&0xf000)>>12;
yy = ((state->m_tilemapram2[x+1]&0x1ff));
if (xx&0x100) xx-=0x200;
yy = 0x1ff-yy;
@ -156,7 +156,7 @@ static SCREEN_UPDATE_IND16( blackt96 )
{
for (y=0;y<32;y++)
{
UINT16 tile = (state->m_tilemapram.target()[count*2]&0x7ff)+0x800; // +0xc00 for korean text
UINT16 tile = (state->m_tilemapram[count*2]&0x7ff)+0x800; // +0xc00 for korean text
drawgfx_transpen(bitmap,cliprect,gfx,tile,0,0,0,x*8,-16+y*8,0);
count++;
}

View File

@ -317,13 +317,13 @@ public:
WRITE8_MEMBER(blitz_state::megadpkr_videoram_w)
{
m_videoram.target()[offset] = data;
m_videoram[offset] = data;
m_bg_tilemap->mark_tile_dirty(offset);
}
WRITE8_MEMBER(blitz_state::megadpkr_colorram_w)
{
m_colorram.target()[offset] = data;
m_colorram[offset] = data;
m_bg_tilemap->mark_tile_dirty(offset);
}
@ -339,8 +339,8 @@ static TILE_GET_INFO( get_bg_tile_info )
xx-- ---- unused.
*/
int attr = state->m_colorram.target()[tile_index];
int code = ((attr & 1) << 8) | state->m_videoram.target()[tile_index];
int attr = state->m_colorram[tile_index];
int code = ((attr & 1) << 8) | state->m_videoram[tile_index];
int bank = (attr & 0x02) >> 1; /* bit 1 switch the gfx banks */
int color = (attr & 0x3c) >> 2; /* bits 2-3-4-5 for color */

View File

@ -154,28 +154,28 @@ static SCREEN_UPDATE_IND16( bmcbowl )
{
for (x=0;x<280;x+=2)
{
pixdat = state->m_vid2.target()[0x8000+z];
pixdat = state->m_vid2[0x8000+z];
if(pixdat&0xff)
bitmap.pix16(y, x+1) = (pixdat&0xff);
if(pixdat>>8)
bitmap.pix16(y, x) = (pixdat>>8);
pixdat = state->m_vid2.target()[z];
pixdat = state->m_vid2[z];
if(pixdat&0xff)
bitmap.pix16(y, x+1) = (pixdat&0xff);
if(pixdat>>8)
bitmap.pix16(y, x) = (pixdat>>8);
pixdat = state->m_vid1.target()[0x8000+z];
pixdat = state->m_vid1[0x8000+z];
if(pixdat&0xff)
bitmap.pix16(y, x+1) = (pixdat&0xff);
if(pixdat>>8)
bitmap.pix16(y, x) = (pixdat>>8);
pixdat = state->m_vid1.target()[z];
pixdat = state->m_vid1[z];
if(pixdat&0xff)
bitmap.pix16(y, x+1) = (pixdat&0xff);
@ -297,7 +297,7 @@ static void init_stats(bmcbowl_state *state, const UINT8 *table, int table_len,
{
int i;
for (i=0; i<table_len; i++)
state->m_stats_ram.target()[address+2*i]=table[i];
state->m_stats_ram[address+2*i]=table[i];
}
#endif
@ -312,7 +312,7 @@ static NVRAM_HANDLER( bmcbowl )
#ifdef NVRAM_HACK
for (i = 0; i < state->m_stats_ram.bytes(); i++)
state->m_stats_ram.target()[i] = 0xff;
state->m_stats_ram[i] = 0xff;
init_stats(state,bmc_nv1,ARRAY_LENGTH(bmc_nv1),0);
init_stats(state,bmc_nv2,ARRAY_LENGTH(bmc_nv2),0x3b0);
@ -323,7 +323,7 @@ static NVRAM_HANDLER( bmcbowl )
else
for (i = 0; i < state->m_stats_ram.bytes(); i++)
state->m_stats_ram.target()[i] = 0xff;
state->m_stats_ram[i] = 0xff;
#endif
}

View File

@ -130,11 +130,11 @@ static void draw_boxer( running_machine &machine, bitmap_ind16 &bitmap, const re
int i, j;
int x = 196 - state->m_sprite_ram.target()[0 + 2 * n];
int y = 192 - state->m_sprite_ram.target()[1 + 2 * n];
int x = 196 - state->m_sprite_ram[0 + 2 * n];
int y = 192 - state->m_sprite_ram[1 + 2 * n];
int l = state->m_sprite_ram.target()[4 + 2 * n] & 15;
int r = state->m_sprite_ram.target()[5 + 2 * n] & 15;
int l = state->m_sprite_ram[4 + 2 * n] & 15;
int r = state->m_sprite_ram[5 + 2 * n] & 15;
for (i = 0; i < 8; i++)
{
@ -178,7 +178,7 @@ static SCREEN_UPDATE_IND16( boxer )
{
for (j = 0; j < 32; j++)
{
UINT8 code = state->m_tile_ram.target()[32 * i + j];
UINT8 code = state->m_tile_ram[32 * i + j];
drawgfx_transpen(bitmap, cliprect,
screen.machine().gfx[2],

View File

@ -41,7 +41,7 @@ static SCREEN_UPDATE_IND16(buster)
{
for (x=0;x<32;x++)
{
int tile = (state->m_vram.target()[count+1])|(state->m_vram.target()[count]<<8);
int tile = (state->m_vram[count+1])|(state->m_vram[count]<<8);
//int colour = tile>>12;
drawgfx_opaque(bitmap,cliprect,gfx,tile,0,0,0,x*8,y*4);

View File

@ -63,40 +63,40 @@ public:
WRITE8_MEMBER(cabaret_state::bg_scroll_w)
{
m_bg_scroll.target()[offset] = data;
m_bg_scroll[offset] = data;
m_bg_tilemap->set_scrolly(offset,data);
}
WRITE8_MEMBER(cabaret_state::bg_tile_w)
{
m_bg_tile_ram.target()[offset] = data;
m_bg_tile_ram[offset] = data;
m_bg_tilemap->mark_tile_dirty(offset);
}
static TILE_GET_INFO( get_bg_tile_info )
{
cabaret_state *state = machine.driver_data<cabaret_state>();
int code = state->m_bg_tile_ram.target()[tile_index];
int code = state->m_bg_tile_ram[tile_index];
SET_TILE_INFO(1, code & 0xff, 0, 0);
}
static TILE_GET_INFO( get_fg_tile_info )
{
cabaret_state *state = machine.driver_data<cabaret_state>();
int code = state->m_fg_tile_ram.target()[tile_index] | (state->m_fg_color_ram.target()[tile_index] << 8);
int code = state->m_fg_tile_ram[tile_index] | (state->m_fg_color_ram[tile_index] << 8);
int tile = code & 0x1fff;
SET_TILE_INFO(0, code, tile != 0x1fff ? ((code >> 12) & 0xe) + 1 : 0, 0);
}
WRITE8_MEMBER(cabaret_state::fg_tile_w)
{
m_fg_tile_ram.target()[offset] = data;
m_fg_tile_ram[offset] = data;
m_fg_tilemap->mark_tile_dirty(offset);
}
WRITE8_MEMBER(cabaret_state::fg_color_w)
{
m_fg_color_ram.target()[offset] = data;
m_fg_color_ram[offset] = data;
m_fg_tilemap->mark_tile_dirty(offset);
}

View File

@ -129,10 +129,10 @@ static TILE_GET_INFO( get_bg_tile_info )
static TILE_GET_INFO( get_fg_tile_info )
{
calorie_state *state = machine.driver_data<calorie_state>();
int code = ((state->m_fg_ram.target()[tile_index + 0x400] & 0x30) << 4) | state->m_fg_ram.target()[tile_index];
int color = state->m_fg_ram.target()[tile_index + 0x400] & 0x0f;
int code = ((state->m_fg_ram[tile_index + 0x400] & 0x30) << 4) | state->m_fg_ram[tile_index];
int color = state->m_fg_ram[tile_index + 0x400] & 0x0f;
SET_TILE_INFO(0, code, color, TILE_FLIPYX((state->m_fg_ram.target()[tile_index + 0x400] & 0xc0) >> 6));
SET_TILE_INFO(0, code, color, TILE_FLIPYX((state->m_fg_ram[tile_index + 0x400] & 0xc0) >> 6));
}
@ -166,16 +166,16 @@ static SCREEN_UPDATE_IND16( calorie )
{
int xpos, ypos, tileno, color, flipx, flipy;
tileno = state->m_sprites.target()[x + 0];
color = state->m_sprites.target()[x + 1] & 0x0f;
flipx = state->m_sprites.target()[x + 1] & 0x40;
tileno = state->m_sprites[x + 0];
color = state->m_sprites[x + 1] & 0x0f;
flipx = state->m_sprites[x + 1] & 0x40;
flipy = 0;
ypos = 0xff - state->m_sprites.target()[x + 2];
xpos = state->m_sprites.target()[x + 3];
ypos = 0xff - state->m_sprites[x + 2];
xpos = state->m_sprites[x + 3];
if (state->flip_screen())
{
if (state->m_sprites.target()[x + 1] & 0x10)
if (state->m_sprites[x + 1] & 0x10)
ypos = 0xff - ypos + 32;
else
ypos = 0xff - ypos + 16;
@ -185,7 +185,7 @@ static SCREEN_UPDATE_IND16( calorie )
flipy = !flipy;
}
if (state->m_sprites.target()[x + 1] & 0x10)
if (state->m_sprites[x + 1] & 0x10)
{
/* 32x32 sprites */
drawgfx_transpen(bitmap, cliprect, screen.machine().gfx[3], tileno | 0x40, color, flipx, flipy, xpos, ypos - 31, 0);
@ -207,7 +207,7 @@ static SCREEN_UPDATE_IND16( calorie )
WRITE8_MEMBER(calorie_state::fg_ram_w)
{
m_fg_ram.target()[offset] = data;
m_fg_ram[offset] = data;
m_fg_tilemap->mark_tile_dirty(offset & 0x3ff);
}

View File

@ -45,8 +45,8 @@ public:
#define DRAW_TILE(machine, offset, transparency) drawgfx_transpen(bitmap, cliprect, (machine).gfx[0],\
(state->m_videoram.target()[index+offset] | (state->m_colorram.target()[index+offset]<<8))&0x3fff,\
(state->m_colorram.target()[index+offset]&0x80)>>7,\
(state->m_videoram[index+offset] | (state->m_colorram[index+offset]<<8))&0x3fff,\
(state->m_colorram[index+offset]&0x80)>>7,\
0,0,\
x<<3, y<<3,\
transparency?transparency:(UINT32)-1);
@ -80,13 +80,13 @@ static SCREEN_UPDATE_IND16( cardline )
WRITE8_MEMBER(cardline_state::vram_w)
{
offset+=0x1000*((m_video&2)>>1);
m_videoram.target()[offset]=data;
m_videoram[offset]=data;
}
WRITE8_MEMBER(cardline_state::attr_w)
{
offset+=0x1000*((m_video&2)>>1);
m_colorram.target()[offset]=data;
m_colorram[offset]=data;
}
WRITE8_MEMBER(cardline_state::video_w)

View File

@ -256,7 +256,7 @@ static SCREEN_UPDATE_IND16(carrera)
{
for (x=0;x<64;x++)
{
int tile = state->m_tileram.target()[count&0x7ff] | state->m_tileram.target()[(count&0x7ff)+0x800]<<8;
int tile = state->m_tileram[count&0x7ff] | state->m_tileram[(count&0x7ff)+0x800]<<8;
drawgfx_opaque(bitmap,cliprect,screen.machine().gfx[0],tile,0,0,0,x*8,y*8);
count++;

View File

@ -72,8 +72,8 @@ public:
static TILE_GET_INFO( get_sc0_tile_info )
{
caswin_state *state = machine.driver_data<caswin_state>();
int tile = (state->m_sc0_vram.target()[tile_index] | ((state->m_sc0_attr.target()[tile_index] & 0x70)<<4)) & 0x7ff;
int colour = state->m_sc0_attr.target()[tile_index] & 0xf;
int tile = (state->m_sc0_vram[tile_index] | ((state->m_sc0_attr[tile_index] & 0x70)<<4)) & 0x7ff;
int colour = state->m_sc0_attr[tile_index] & 0xf;
SET_TILE_INFO(
0,
@ -97,13 +97,13 @@ static SCREEN_UPDATE_IND16(vvillage)
WRITE8_MEMBER(caswin_state::sc0_vram_w)
{
m_sc0_vram.target()[offset] = data;
m_sc0_vram[offset] = data;
m_sc0_tilemap->mark_tile_dirty(offset);
}
WRITE8_MEMBER(caswin_state::sc0_attr_w)
{
m_sc0_attr.target()[offset] = data;
m_sc0_attr[offset] = data;
m_sc0_tilemap->mark_tile_dirty(offset);
}

View File

@ -346,8 +346,8 @@ static SCREEN_UPDATE_RGB32(cb2001)
int tile;
int colour;
tile = (state->m_vram_bg.target()[count] & 0x0fff);
colour = (state->m_vram_bg.target()[count] & 0xf000)>>12;
tile = (state->m_vram_bg[count] & 0x0fff);
colour = (state->m_vram_bg[count] & 0xf000)>>12;
tile += state->m_videobank*0x2000;
@ -365,21 +365,21 @@ static SCREEN_UPDATE_RGB32(cb2001)
{
UINT16 scroll;
scroll = state->m_vram_bg.target()[0xa00/2 + i/2];
scroll = state->m_vram_bg[0xa00/2 + i/2];
if (i&1)
scroll >>=8;
scroll &=0xff;
state->m_reel2_tilemap->set_scrolly(i, scroll);
scroll = state->m_vram_bg.target()[0x800/2 + i/2];
scroll = state->m_vram_bg[0x800/2 + i/2];
if (i&1)
scroll >>=8;
scroll &=0xff;
state->m_reel1_tilemap->set_scrolly(i, scroll);
scroll = state->m_vram_bg.target()[0xc00/2 + i/2];
scroll = state->m_vram_bg[0xc00/2 + i/2];
if (i&1)
scroll >>=8;
scroll &=0xff;
@ -408,8 +408,8 @@ static SCREEN_UPDATE_RGB32(cb2001)
int tile;
int colour;
tile = (state->m_vram_fg.target()[count] & 0x0fff);
colour = (state->m_vram_fg.target()[count] & 0xf000)>>12;
tile = (state->m_vram_fg[count] & 0x0fff);
colour = (state->m_vram_fg[count] & 0xf000)>>12;
tile += state->m_videobank*0x2000;
if (state->m_other2 & 0x4)
@ -459,7 +459,7 @@ WRITE16_MEMBER(cb2001_state::cb2001_vidctrl2_w)
static TILE_GET_INFO( get_cb2001_reel1_tile_info )
{
cb2001_state *state = machine.driver_data<cb2001_state>();
int code = state->m_vram_bg.target()[(0x0000/2) + tile_index/2];
int code = state->m_vram_bg[(0x0000/2) + tile_index/2];
if (tile_index&1)
code >>=8;
@ -478,7 +478,7 @@ static TILE_GET_INFO( get_cb2001_reel1_tile_info )
static TILE_GET_INFO( get_cb2001_reel2_tile_info )
{
cb2001_state *state = machine.driver_data<cb2001_state>();
int code = state->m_vram_bg.target()[(0x0200/2) + tile_index/2];
int code = state->m_vram_bg[(0x0200/2) + tile_index/2];
if (tile_index&1)
code >>=8;
@ -498,7 +498,7 @@ static TILE_GET_INFO( get_cb2001_reel2_tile_info )
static TILE_GET_INFO( get_cb2001_reel3_tile_info )
{
cb2001_state *state = machine.driver_data<cb2001_state>();
int code = state->m_vram_bg.target()[(0x0400/2) + tile_index/2];
int code = state->m_vram_bg[(0x0400/2) + tile_index/2];
int colour = 0;//(cb2001_out_c&0x7) + 8;
if (tile_index&1)
@ -528,7 +528,7 @@ static VIDEO_START(cb2001)
WRITE16_MEMBER(cb2001_state::cb2001_bg_w)
{
COMBINE_DATA(&m_vram_bg.target()[offset]);
COMBINE_DATA(&m_vram_bg[offset]);
// also used for the reel tilemaps in a different mode
/*

View File

@ -32,7 +32,7 @@ public:
static TILE_GET_INFO( get_tile_info )
{
cball_state *state = machine.driver_data<cball_state>();
UINT8 code = state->m_video_ram.target()[tile_index];
UINT8 code = state->m_video_ram[tile_index];
SET_TILE_INFO(0, code, code >> 7, 0);
}
@ -41,7 +41,7 @@ static TILE_GET_INFO( get_tile_info )
WRITE8_MEMBER(cball_state::cball_vram_w)
{
m_video_ram.target()[offset] = data;
m_video_ram[offset] = data;
m_bg_tilemap->mark_tile_dirty(offset);
}
@ -62,11 +62,11 @@ static SCREEN_UPDATE_IND16( cball )
/* draw sprite */
drawgfx_transpen(bitmap, cliprect, screen.machine().gfx[1],
state->m_video_ram.target()[0x399] >> 4,
state->m_video_ram[0x399] >> 4,
0,
0, 0,
240 - state->m_video_ram.target()[0x390],
240 - state->m_video_ram.target()[0x398], 0);
240 - state->m_video_ram[0x390],
240 - state->m_video_ram[0x398], 0);
return 0;
}
@ -113,14 +113,14 @@ static PALETTE_INIT( cball )
READ8_MEMBER(cball_state::cball_wram_r)
{
return m_video_ram.target()[0x380 + offset];
return m_video_ram[0x380 + offset];
}
WRITE8_MEMBER(cball_state::cball_wram_w)
{
m_video_ram.target()[0x380 + offset] = data;
m_video_ram[0x380 + offset] = data;
}

View File

@ -75,8 +75,8 @@ UINT32 cesclassic_state::screen_update(screen_device &screen, bitmap_rgb32 &bitm
{
UINT8 color;
color = (((m_vram.target()[x+y*16+0x400])>>(15-xi)) & 1);
color |= (((m_vram.target()[x+y*16])>>(15-xi)) & 1)<<1;
color = (((m_vram[x+y*16+0x400])>>(15-xi)) & 1);
color |= (((m_vram[x+y*16])>>(15-xi)) & 1)<<1;
if((x*16+xi)<256 && ((y)+0)<256)
bitmap.pix32(y, x*16+xi) = machine().pens[color];

View File

@ -103,28 +103,28 @@ static PALETTE_INIT( chanbara )
WRITE8_MEMBER(chanbara_state::chanbara_videoram_w)
{
m_videoram.target()[offset] = data;
m_videoram[offset] = data;
m_bg_tilemap->mark_tile_dirty(offset);
}
WRITE8_MEMBER(chanbara_state::chanbara_colorram_w)
{
m_colorram.target()[offset] = data;
m_colorram[offset] = data;
m_bg_tilemap->mark_tile_dirty(offset);
}
WRITE8_MEMBER(chanbara_state::chanbara_videoram2_w)
{
m_videoram2.target()[offset] = data;
m_videoram2[offset] = data;
m_bg2_tilemap->mark_tile_dirty(offset);
}
WRITE8_MEMBER(chanbara_state::chanbara_colorram2_w)
{
m_colorram2.target()[offset] = data;
m_colorram2[offset] = data;
m_bg2_tilemap->mark_tile_dirty(offset);
}
@ -132,8 +132,8 @@ WRITE8_MEMBER(chanbara_state::chanbara_colorram2_w)
static TILE_GET_INFO( get_bg_tile_info )
{
chanbara_state *state = machine.driver_data<chanbara_state>();
int code = state->m_videoram.target()[tile_index] + ((state->m_colorram.target()[tile_index] & 1) << 8);
int color = (state->m_colorram.target()[tile_index] >> 1) & 0x1f;
int code = state->m_videoram[tile_index] + ((state->m_colorram[tile_index] & 1) << 8);
int color = (state->m_colorram[tile_index] >> 1) & 0x1f;
SET_TILE_INFO(0, code, color, 0);
}
@ -141,8 +141,8 @@ static TILE_GET_INFO( get_bg_tile_info )
static TILE_GET_INFO( get_bg2_tile_info )
{
chanbara_state *state = machine.driver_data<chanbara_state>();
int code = state->m_videoram2.target()[tile_index];
int color = (state->m_colorram2.target()[tile_index] >> 1) & 0x1f;
int code = state->m_videoram2[tile_index];
int color = (state->m_colorram2[tile_index] >> 1) & 0x1f;
SET_TILE_INFO(2, code, color, 0);
}
@ -162,21 +162,21 @@ static void draw_sprites( running_machine &machine, bitmap_ind16 &bitmap, const
for (offs = 0; offs < 0x80; offs += 4)
{
if (state->m_spriteram.target()[offs + 0x80] & 0x80)
if (state->m_spriteram[offs + 0x80] & 0x80)
{
int attr = state->m_spriteram.target()[offs + 0];
int code = state->m_spriteram.target()[offs + 1];
int color = state->m_spriteram.target()[offs + 0x80] & 0x1f;
int attr = state->m_spriteram[offs + 0];
int code = state->m_spriteram[offs + 1];
int color = state->m_spriteram[offs + 0x80] & 0x1f;
int flipx = 0;
int flipy = attr & 2;
int sx = 240 - state->m_spriteram.target()[offs + 3];
int sy = 232 - state->m_spriteram.target()[offs + 2];
int sx = 240 - state->m_spriteram[offs + 3];
int sy = 232 - state->m_spriteram[offs + 2];
sy+=16;
if (state->m_spriteram.target()[offs + 0x80] & 0x10) code += 0x200;
if (state->m_spriteram.target()[offs + 0x80] & 0x20) code += 0x400;
if (state->m_spriteram.target()[offs + 0x80] & 0x40) code += 0x100;
if (state->m_spriteram[offs + 0x80] & 0x10) code += 0x200;
if (state->m_spriteram[offs + 0x80] & 0x20) code += 0x400;
if (state->m_spriteram[offs + 0x80] & 0x40) code += 0x100;
if (attr & 0x10)
{

View File

@ -99,8 +99,8 @@ static SCREEN_UPDATE_IND16( chinsan )
for (x = 0; x < 64; x++)
{
int tileno, colour;
tileno = state->m_video.target()[count] | (state->m_video.target()[count + 0x800] << 8);
colour = state->m_video.target()[count + 0x1000] >> 3;
tileno = state->m_video[count] | (state->m_video[count + 0x800] << 8);
colour = state->m_video[count + 0x1000] >> 3;
drawgfx_opaque(bitmap,cliprect,screen.machine().gfx[0],tileno,colour,0,0,x*8,y*8);
count++;
}

View File

@ -193,7 +193,7 @@ static SCREEN_UPDATE_RGB32( clayshoo )
int i;
UINT8 x = offs << 3;
UINT8 y = ~(offs >> 5);
UINT8 data = state->m_videoram.target()[offs];
UINT8 data = state->m_videoram[offs];
for (i = 0; i < 8; i++)
{

View File

@ -71,7 +71,7 @@ static VIDEO_START( cmmb )
static SCREEN_UPDATE_IND16( cmmb )
{
cmmb_state *state = screen.machine().driver_data<cmmb_state>();
UINT8 *videoram = state->m_videoram.target();
UINT8 *videoram = state->m_videoram;
const gfx_element *gfx = screen.machine().gfx[0];
int count = 0x00000;

View File

@ -112,7 +112,7 @@ static PALETTE_INIT( zerotrgt )
static TILE_GET_INFO( get_bg_tile_info )
{
cntsteer_state *state = machine.driver_data<cntsteer_state>();
int code = state->m_videoram2.target()[tile_index];
int code = state->m_videoram2[tile_index];
SET_TILE_INFO(2, code + state->m_bg_bank, state->m_bg_color_bank, 0);
}
@ -120,8 +120,8 @@ static TILE_GET_INFO( get_bg_tile_info )
static TILE_GET_INFO( get_fg_tile_info )
{
cntsteer_state *state = machine.driver_data<cntsteer_state>();
int code = state->m_videoram.target()[tile_index];
int attr = state->m_colorram.target()[tile_index];
int code = state->m_videoram[tile_index];
int attr = state->m_colorram[tile_index];
code |= (attr & 0x01) << 8;
@ -172,18 +172,18 @@ static void zerotrgt_draw_sprites( running_machine &machine, bitmap_ind16 &bitma
{
int multi, fx, fy, sx, sy, code, color;
if ((state->m_spriteram.target()[offs + 1] & 1) == 1)
if ((state->m_spriteram[offs + 1] & 1) == 1)
continue;
code = state->m_spriteram.target()[offs + 3] + ((state->m_spriteram.target()[offs + 1] & 0xc0) << 2);
sx = (state->m_spriteram.target()[offs + 2]);
sy = 0xf0 - state->m_spriteram.target()[offs];
color = 0x10 + ((state->m_spriteram.target()[offs + 1] & 0x20) >> 4) + ((state->m_spriteram.target()[offs + 1] & 0x8)>>3);
code = state->m_spriteram[offs + 3] + ((state->m_spriteram[offs + 1] & 0xc0) << 2);
sx = (state->m_spriteram[offs + 2]);
sy = 0xf0 - state->m_spriteram[offs];
color = 0x10 + ((state->m_spriteram[offs + 1] & 0x20) >> 4) + ((state->m_spriteram[offs + 1] & 0x8)>>3);
fx = !(state->m_spriteram.target()[offs + 1] & 0x04);
fy = (state->m_spriteram.target()[offs + 1] & 0x02);
fx = !(state->m_spriteram[offs + 1] & 0x04);
fy = (state->m_spriteram[offs + 1] & 0x02);
multi = state->m_spriteram.target()[offs + 1] & 0x10;
multi = state->m_spriteram[offs + 1] & 0x10;
if (state->m_flipscreen)
{
@ -230,18 +230,18 @@ static void cntsteer_draw_sprites( running_machine &machine, bitmap_ind16 &bitma
{
int multi, fx, fy, sx, sy, code, color;
if ((state->m_spriteram.target()[offs + 0] & 1) == 0)
if ((state->m_spriteram[offs + 0] & 1) == 0)
continue;
code = state->m_spriteram.target()[offs + 1] + ((state->m_spriteram.target()[offs + 0x80] & 0x03) << 8);
sx = 0x100 - state->m_spriteram.target()[offs + 3];
sy = 0x100 - state->m_spriteram.target()[offs + 2];
color = 0x10 + ((state->m_spriteram.target()[offs + 0x80] & 0x70) >> 4);
code = state->m_spriteram[offs + 1] + ((state->m_spriteram[offs + 0x80] & 0x03) << 8);
sx = 0x100 - state->m_spriteram[offs + 3];
sy = 0x100 - state->m_spriteram[offs + 2];
color = 0x10 + ((state->m_spriteram[offs + 0x80] & 0x70) >> 4);
fx = (state->m_spriteram.target()[offs + 0] & 0x04);
fy = (state->m_spriteram.target()[offs + 0] & 0x02);
fx = (state->m_spriteram[offs + 0] & 0x04);
fy = (state->m_spriteram[offs + 0] & 0x02);
multi = state->m_spriteram.target()[offs + 0] & 0x10;
multi = state->m_spriteram[offs + 0] & 0x10;
if (state->m_flipscreen)
{
@ -433,19 +433,19 @@ WRITE8_MEMBER(cntsteer_state::cntsteer_vregs_w)
WRITE8_MEMBER(cntsteer_state::cntsteer_foreground_vram_w)
{
m_videoram.target()[offset] = data;
m_videoram[offset] = data;
m_fg_tilemap->mark_tile_dirty(offset);
}
WRITE8_MEMBER(cntsteer_state::cntsteer_foreground_attr_w)
{
m_colorram.target()[offset] = data;
m_colorram[offset] = data;
m_fg_tilemap->mark_tile_dirty(offset);
}
WRITE8_MEMBER(cntsteer_state::cntsteer_background_w)
{
m_videoram2.target()[offset] = data;
m_videoram2[offset] = data;
m_bg_tilemap->mark_tile_dirty(offset);
}

View File

@ -57,7 +57,7 @@ public:
WRITE8_MEMBER(coinmstr_state::quizmstr_bg_w)
{
UINT8 *videoram = m_videoram.target();
UINT8 *videoram = m_videoram;
videoram[offset] = data;
if(offset >= 0x0240)
@ -100,12 +100,12 @@ static void coinmstr_set_pal(running_machine &machine, UINT32 paldat, int col)
WRITE8_MEMBER(coinmstr_state::quizmstr_attr1_w)
{
m_attr_ram1.target()[offset] = data;
m_attr_ram1[offset] = data;
if(offset >= 0x0240)
{
// the later games also use attr3 for something..
UINT32 paldata = (m_attr_ram1.target()[offset] & 0x7f) | ((m_attr_ram2.target()[offset] & 0x7f) << 7);
UINT32 paldata = (m_attr_ram1[offset] & 0x7f) | ((m_attr_ram2[offset] & 0x7f) << 7);
m_bg_tilemap->mark_tile_dirty(offset - 0x0240);
coinmstr_set_pal(machine(), paldata, offset - 0x240);
@ -115,12 +115,12 @@ WRITE8_MEMBER(coinmstr_state::quizmstr_attr1_w)
WRITE8_MEMBER(coinmstr_state::quizmstr_attr2_w)
{
m_attr_ram2.target()[offset] = data;
m_attr_ram2[offset] = data;
if(offset >= 0x0240)
{
// the later games also use attr3 for something..
UINT32 paldata = (m_attr_ram1.target()[offset] & 0x7f) | ((m_attr_ram2.target()[offset] & 0x7f) << 7);
UINT32 paldata = (m_attr_ram1[offset] & 0x7f) | ((m_attr_ram2[offset] & 0x7f) << 7);
m_bg_tilemap->mark_tile_dirty(offset - 0x0240);
coinmstr_set_pal(machine(), paldata, offset - 0x240);
@ -130,7 +130,7 @@ WRITE8_MEMBER(coinmstr_state::quizmstr_attr2_w)
WRITE8_MEMBER(coinmstr_state::quizmstr_attr3_w)
{
m_attr_ram3.target()[offset] = data;
m_attr_ram3[offset] = data;
if(offset >= 0x0240)
m_bg_tilemap->mark_tile_dirty(offset - 0x0240);
@ -901,14 +901,14 @@ GFXDECODE_END
static TILE_GET_INFO( get_bg_tile_info )
{
coinmstr_state *state = machine.driver_data<coinmstr_state>();
UINT8 *videoram = state->m_videoram.target();
UINT8 *videoram = state->m_videoram;
int tile = videoram[tile_index + 0x0240];
int color = tile_index;
tile |= (state->m_attr_ram1.target()[tile_index + 0x0240] & 0x80) << 1;
tile |= (state->m_attr_ram2.target()[tile_index + 0x0240] & 0x80) << 2;
tile |= (state->m_attr_ram1[tile_index + 0x0240] & 0x80) << 1;
tile |= (state->m_attr_ram2[tile_index + 0x0240] & 0x80) << 2;
tile |= (state->m_attr_ram3.target()[tile_index + 0x0240] & 0x03) << (6+4);
tile |= (state->m_attr_ram3[tile_index + 0x0240] & 0x03) << (6+4);
SET_TILE_INFO(0, tile, color, 0);
}

View File

@ -258,7 +258,7 @@ static SCREEN_UPDATE_IND16( coinmvga )
{
for (x=0;x<128;x++)
{
int tile = state->m_vram.target()[count];
int tile = state->m_vram[count];
//int colour = tile>>12;
drawgfx_opaque(bitmap,cliprect,gfx,tile,0,0,0,x*8,y*8);

View File

@ -375,10 +375,10 @@ static SCREEN_UPDATE_RGB32(coolridr)
{
int tile;
tile = (state->m_h1_vram.target()[count] & 0x0fff0000) >> 16;
tile = (state->m_h1_vram[count] & 0x0fff0000) >> 16;
drawgfx_opaque(bitmap,cliprect,gfx,tile,state->m_color,0,0,(x+0)*16,y*16);
tile = (state->m_h1_vram.target()[count] & 0x00000fff) >> 0;
tile = (state->m_h1_vram[count] & 0x00000fff) >> 0;
drawgfx_opaque(bitmap,cliprect,gfx,tile,state->m_color,0,0,(x+1)*16,y*16);
count++;
@ -404,19 +404,19 @@ READ32_MEMBER(coolridr_state::sysh1_unk_r)
m_vblank^=1;
return (m_h1_unk.target()[offset] & 0xfdffffff) | (m_vblank<<25);
return (m_h1_unk[offset] & 0xfdffffff) | (m_vblank<<25);
}
case 0x14/4:
return m_h1_unk.target()[offset];
return m_h1_unk[offset];
//case 0x20/4:
}
return 0xffffffff;//m_h1_unk.target()[offset];
return 0xffffffff;//m_h1_unk[offset];
}
WRITE32_MEMBER(coolridr_state::sysh1_unk_w)
{
COMBINE_DATA(&m_h1_unk.target()[offset]);
COMBINE_DATA(&m_h1_unk[offset]);
}
/* According to Guru, this is actually the same I/O chip of Sega Model 2 HW */
@ -438,7 +438,7 @@ WRITE32_MEMBER(coolridr_state::sysh1_ioga_w)
WRITE32_MEMBER(coolridr_state::sysh1_txt_blit_w)
{
COMBINE_DATA(&m_sysh1_txt_blit.target()[offset]);
COMBINE_DATA(&m_sysh1_txt_blit[offset]);
switch(offset)
{
@ -600,10 +600,10 @@ static void sysh1_dma_transfer( address_space *space, UINT16 dma_index )
end_dma_mark = 0;
do{
src = (state->m_framebuffer_vram.target()[(0+dma_index)/4] & 0x0fffffff);
dst = (state->m_framebuffer_vram.target()[(4+dma_index)/4]);
size = state->m_framebuffer_vram.target()[(8+dma_index)/4];
type = (state->m_framebuffer_vram.target()[(0+dma_index)/4] & 0xf0000000) >> 28;
src = (state->m_framebuffer_vram[(0+dma_index)/4] & 0x0fffffff);
dst = (state->m_framebuffer_vram[(4+dma_index)/4]);
size = state->m_framebuffer_vram[(8+dma_index)/4];
type = (state->m_framebuffer_vram[(0+dma_index)/4] & 0xf0000000) >> 28;
#if 0
if(type == 0xc || type == 0xd || type == 0xe)
@ -669,26 +669,26 @@ static void sysh1_dma_transfer( address_space *space, UINT16 dma_index )
WRITE32_MEMBER(coolridr_state::sysh1_dma_w)
{
COMBINE_DATA(&m_framebuffer_vram.target()[offset]);
COMBINE_DATA(&m_framebuffer_vram[offset]);
if(offset*4 == 0x000)
{
if((m_framebuffer_vram.target()[offset] & 0xff00000) == 0xfe00000)
sysh1_dma_transfer(&space, m_framebuffer_vram.target()[offset] & 0xffff);
if((m_framebuffer_vram[offset] & 0xff00000) == 0xfe00000)
sysh1_dma_transfer(&space, m_framebuffer_vram[offset] & 0xffff);
}
}
WRITE32_MEMBER(coolridr_state::sysh1_char_w)
{
COMBINE_DATA(&m_h1_charram.target()[offset]);
COMBINE_DATA(&m_h1_charram[offset]);
{
UINT8 *gfx = machine().region("ram_gfx")->base();
gfx[offset*4+0] = (m_h1_charram.target()[offset] & 0xff000000) >> 24;
gfx[offset*4+1] = (m_h1_charram.target()[offset] & 0x00ff0000) >> 16;
gfx[offset*4+2] = (m_h1_charram.target()[offset] & 0x0000ff00) >> 8;
gfx[offset*4+3] = (m_h1_charram.target()[offset] & 0x000000ff) >> 0;
gfx[offset*4+0] = (m_h1_charram[offset] & 0xff000000) >> 24;
gfx[offset*4+1] = (m_h1_charram[offset] & 0x00ff0000) >> 16;
gfx[offset*4+2] = (m_h1_charram[offset] & 0x0000ff00) >> 8;
gfx[offset*4+3] = (m_h1_charram[offset] & 0x000000ff) >> 0;
gfx_element_mark_dirty(machine().gfx[2], offset/64); //*4/256
}
@ -1235,7 +1235,7 @@ READ32_MEMBER(coolridr_state::coolridr_hack1_r)
if(pc == 0x6012374 || pc == 0x6012392)
return 0;
return m_sysh1_workram_h.target()[0xd88a4/4];
return m_sysh1_workram_h[0xd88a4/4];
}
#endif
@ -1246,7 +1246,7 @@ READ32_MEMBER(coolridr_state::coolridr_hack2_r)
if(pc == 0x6002cba || pc == 0x6002d42)
return 0;
return m_sysh1_workram_h.target()[0xd8894/4];
return m_sysh1_workram_h[0xd8894/4];
}
static DRIVER_INIT( coolridr )

View File

@ -626,7 +626,7 @@ static MACHINE_RESET( crystal )
state->m_Timer[i]->adjust(attotime::never);
}
vr0_snd_set_areas(machine.device("vrender"), state->m_textureram, state->m_frameram.target());
vr0_snd_set_areas(machine.device("vrender"), state->m_textureram, state->m_frameram);
#ifdef IDLE_LOOP_SPEEDUP
state->m_FlipCntRead = 0;
#endif
@ -672,7 +672,8 @@ static SCREEN_UPDATE_IND16( crystal )
}
Visible = (UINT16*) Front;
DrawDest = (UINT16 *) state->m_frameram.target();
// ERROR: This cast is NOT endian-safe without the use of BYTE/WORD/DWORD_XOR_* macros!
DrawDest = reinterpret_cast<UINT16 *>(state->m_frameram.target());
if (GetVidReg(space, 0x8c) & 0x80)
@ -689,7 +690,8 @@ static SCREEN_UPDATE_IND16( crystal )
tail = GetVidReg(space, 0x80);
while ((head & 0x7ff) != (tail & 0x7ff))
{
DoFlip = vrender0_ProcessPacket(state->m_vr0video, 0x03800000 + head * 64, DrawDest, (UINT8*)state->m_textureram.target());
// ERROR: This cast is NOT endian-safe without the use of BYTE/WORD/DWORD_XOR_* macros!
DoFlip = vrender0_ProcessPacket(state->m_vr0video, 0x03800000 + head * 64, DrawDest, reinterpret_cast<UINT8*>(state->m_textureram.target()));
head++;
head &= 0x7ff;
if (DoFlip)

View File

@ -119,8 +119,8 @@ public:
static TILE_GET_INFO( get_cstx_tile_info )
{
cshooter_state *state = machine.driver_data<cshooter_state>();
int code = (state->m_txram.target()[tile_index*2]);
int attr = (state->m_txram.target()[tile_index*2+1]);
int code = (state->m_txram[tile_index*2]);
int attr = (state->m_txram[tile_index*2+1]);
int rg;
rg=0;
if (attr & 0x20) rg = 1;
@ -135,7 +135,7 @@ static TILE_GET_INFO( get_cstx_tile_info )
WRITE8_MEMBER(cshooter_state::cshooter_txram_w)
{
m_txram.target()[offset] = data;
m_txram[offset] = data;
m_txtilemap->mark_tile_dirty(offset/2);
}
@ -154,7 +154,7 @@ static SCREEN_UPDATE_IND16(cshooter)
//sprites
{
UINT8 *spriteram = state->m_spriteram.target();
UINT8 *spriteram = state->m_spriteram;
int i;
for(i=0;i<state->m_spriteram.bytes();i+=4)
{

View File

@ -73,7 +73,7 @@ static TILE_GET_INFO( get_bg2_tile_info )
static TILE_GET_INFO( get_bg0_tile_info )
{
cultures_state *state = machine.driver_data<cultures_state>();
int code = state->m_bg0_videoram.target()[tile_index * 2] + (state->m_bg0_videoram.target()[tile_index * 2 + 1] << 8);
int code = state->m_bg0_videoram[tile_index * 2] + (state->m_bg0_videoram[tile_index * 2 + 1] << 8);
SET_TILE_INFO(0, code, code >> 12, 0);
}
@ -102,22 +102,22 @@ static SCREEN_UPDATE_IND16( cultures )
int attr;
// tilemaps attributes
attr = (state->m_bg0_regs_x.target()[3] & 1 ? TILEMAP_FLIPX : 0) | (state->m_bg0_regs_y.target()[3] & 1 ? TILEMAP_FLIPY : 0);
attr = (state->m_bg0_regs_x[3] & 1 ? TILEMAP_FLIPX : 0) | (state->m_bg0_regs_y[3] & 1 ? TILEMAP_FLIPY : 0);
state->m_bg0_tilemap->set_flip(attr);
attr = (state->m_bg1_regs_x.target()[3] & 1 ? TILEMAP_FLIPX : 0) | (state->m_bg1_regs_y.target()[3] & 1 ? TILEMAP_FLIPY : 0);
attr = (state->m_bg1_regs_x[3] & 1 ? TILEMAP_FLIPX : 0) | (state->m_bg1_regs_y[3] & 1 ? TILEMAP_FLIPY : 0);
state->m_bg1_tilemap->set_flip(attr);
attr = (state->m_bg2_regs_x.target()[3] & 1 ? TILEMAP_FLIPX : 0) | (state->m_bg2_regs_y.target()[3] & 1 ? TILEMAP_FLIPY : 0);
attr = (state->m_bg2_regs_x[3] & 1 ? TILEMAP_FLIPX : 0) | (state->m_bg2_regs_y[3] & 1 ? TILEMAP_FLIPY : 0);
state->m_bg2_tilemap->set_flip(attr);
// tilemaps scrolls
state->m_bg0_tilemap->set_scrollx(0, (state->m_bg0_regs_x.target()[2] << 8) + state->m_bg0_regs_x.target()[0]);
state->m_bg1_tilemap->set_scrollx(0, (state->m_bg1_regs_x.target()[2] << 8) + state->m_bg1_regs_x.target()[0]);
state->m_bg2_tilemap->set_scrollx(0, (state->m_bg2_regs_x.target()[2] << 8) + state->m_bg2_regs_x.target()[0]);
state->m_bg0_tilemap->set_scrolly(0, (state->m_bg0_regs_y.target()[2] << 8) + state->m_bg0_regs_y.target()[0]);
state->m_bg1_tilemap->set_scrolly(0, (state->m_bg1_regs_y.target()[2] << 8) + state->m_bg1_regs_y.target()[0]);
state->m_bg2_tilemap->set_scrolly(0, (state->m_bg2_regs_y.target()[2] << 8) + state->m_bg2_regs_y.target()[0]);
state->m_bg0_tilemap->set_scrollx(0, (state->m_bg0_regs_x[2] << 8) + state->m_bg0_regs_x[0]);
state->m_bg1_tilemap->set_scrollx(0, (state->m_bg1_regs_x[2] << 8) + state->m_bg1_regs_x[0]);
state->m_bg2_tilemap->set_scrollx(0, (state->m_bg2_regs_x[2] << 8) + state->m_bg2_regs_x[0]);
state->m_bg0_tilemap->set_scrolly(0, (state->m_bg0_regs_y[2] << 8) + state->m_bg0_regs_y[0]);
state->m_bg1_tilemap->set_scrolly(0, (state->m_bg1_regs_y[2] << 8) + state->m_bg1_regs_y[0]);
state->m_bg2_tilemap->set_scrolly(0, (state->m_bg2_regs_y[2] << 8) + state->m_bg2_regs_y[0]);
state->m_bg2_tilemap->draw(bitmap, cliprect, 0, 0);
state->m_bg0_tilemap->draw(bitmap, cliprect, 0, 0);
@ -149,7 +149,7 @@ WRITE8_MEMBER(cultures_state::bg0_videoram_w)
}
else
{
m_bg0_videoram.target()[offset] = data;
m_bg0_videoram[offset] = data;
m_bg0_tilemap->mark_tile_dirty(offset >> 1);
}
}

View File

@ -201,7 +201,7 @@ public:
static TILE_GET_INFO( get_tx_tile_info )
{
cybertnk_state *state = machine.driver_data<cybertnk_state>();
int code = state->m_tx_vram.target()[tile_index];
int code = state->m_tx_vram[tile_index];
SET_TILE_INFO(
0,
code & 0x1fff,
@ -238,8 +238,8 @@ static UINT32 update_screen(screen_device &screen, bitmap_ind16 &bitmap, const r
for (i=0;i<0x1000/4;i+=4)
{
UINT16 param1 = state->m_roadram.target()[i+2];
UINT16 param2 = state->m_roadram.target()[i+0];
UINT16 param1 = state->m_roadram[i+2];
UINT16 param2 = state->m_roadram[i+0];
drawgfx_transpen(bitmap,cliprect,gfx,param1,0x23,0,0,-param2+screen_shift,i/4,0);
@ -259,8 +259,8 @@ static UINT32 update_screen(screen_device &screen, bitmap_ind16 &bitmap, const r
{
for (x=0;x<128;x++)
{
UINT16 tile = state->m_bg_vram.target()[count] & 0x1fff;
UINT16 color = (state->m_fg_vram.target()[count] & 0xe000) >> 13;
UINT16 tile = state->m_bg_vram[count] & 0x1fff;
UINT16 color = (state->m_fg_vram[count] & 0xe000) >> 13;
drawgfx_transpen(bitmap,cliprect,gfx,tile,color+0x194,0,0,(x*8)+screen_shift,(y*8),0);
@ -280,8 +280,8 @@ static UINT32 update_screen(screen_device &screen, bitmap_ind16 &bitmap, const r
{
for (x=0;x<128;x++)
{
UINT16 tile = state->m_fg_vram.target()[count] & 0x1fff;
UINT16 color = (state->m_fg_vram.target()[count] & 0xe000) >> 13;
UINT16 tile = state->m_fg_vram[count] & 0x1fff;
UINT16 color = (state->m_fg_vram[count] & 0xe000) >> 13;
drawgfx_transpen(bitmap,cliprect,gfx,tile,color+0x1c0,0,0,(x*8)+screen_shift,(y*8),0);
@ -301,20 +301,20 @@ static UINT32 update_screen(screen_device &screen, bitmap_ind16 &bitmap, const r
for(offs=0;offs<0x1000/2;offs+=8)
{
z = (state->m_spr_ram.target()[offs+(0x6/2)] & 0xffff);
if(z == 0xffff || state->m_spr_ram.target()[offs+(0x0/2)] == 0x0000) //TODO: check the correct bit
z = (state->m_spr_ram[offs+(0x6/2)] & 0xffff);
if(z == 0xffff || state->m_spr_ram[offs+(0x0/2)] == 0x0000) //TODO: check the correct bit
continue;
x = (state->m_spr_ram.target()[offs+(0xa/2)] & 0x3ff);
y = (state->m_spr_ram.target()[offs+(0x4/2)] & 0xff);
if(state->m_spr_ram.target()[offs+(0x4/2)] & 0x100)
x = (state->m_spr_ram[offs+(0xa/2)] & 0x3ff);
y = (state->m_spr_ram[offs+(0x4/2)] & 0xff);
if(state->m_spr_ram[offs+(0x4/2)] & 0x100)
y = 0x100 - y;
spr_offs = (((state->m_spr_ram.target()[offs+(0x0/2)] & 7) << 16) | (state->m_spr_ram.target()[offs+(0x2/2)])) << 2;
xsize = ((state->m_spr_ram.target()[offs+(0xc/2)] & 0x000f)+1) << 3;
ysize = (state->m_spr_ram.target()[offs+(0x8/2)] & 0x00ff)+1;
fx = (state->m_spr_ram.target()[offs+(0xa/2)] & 0x8000) >> 15;
zoom = (state->m_spr_ram.target()[offs+(0xc/2)] & 0xff00) >> 8;
spr_offs = (((state->m_spr_ram[offs+(0x0/2)] & 7) << 16) | (state->m_spr_ram[offs+(0x2/2)])) << 2;
xsize = ((state->m_spr_ram[offs+(0xc/2)] & 0x000f)+1) << 3;
ysize = (state->m_spr_ram[offs+(0x8/2)] & 0x00ff)+1;
fx = (state->m_spr_ram[offs+(0xa/2)] & 0x8000) >> 15;
zoom = (state->m_spr_ram[offs+(0xc/2)] & 0xff00) >> 8;
col_bank = (state->m_spr_ram.target()[offs+(0x0/2)] & 0xff00) >> 8;
col_bank = (state->m_spr_ram[offs+(0x0/2)] & 0xff00) >> 8;
xf = 0;
yf = 0;
@ -522,7 +522,7 @@ static SCREEN_UPDATE_IND16( cybertnk_right ) { return update_screen(screen, bitm
WRITE16_MEMBER(cybertnk_state::tx_vram_w)
{
COMBINE_DATA(&m_tx_vram.target()[offset]);
COMBINE_DATA(&m_tx_vram[offset]);
m_tx_tilemap->mark_tile_dirty(offset);
}
@ -537,18 +537,18 @@ READ16_MEMBER(cybertnk_state::io_r)
// 0x001100D5 is controller data
// 0x00110004 low is controller data ready
case 4/2:
switch( (m_io_ram.target()[6/2]) & 0xff )
switch( (m_io_ram[6/2]) & 0xff )
{
case 0:
m_io_ram.target()[0xd4/2] = input_port_read(machine(), "TRAVERSE");
m_io_ram[0xd4/2] = input_port_read(machine(), "TRAVERSE");
break;
case 0x20:
m_io_ram.target()[0xd4/2] = input_port_read(machine(), "ELEVATE");
m_io_ram[0xd4/2] = input_port_read(machine(), "ELEVATE");
break;
case 0x40:
m_io_ram.target()[0xd4/2] = input_port_read(machine(), "ACCEL");
m_io_ram[0xd4/2] = input_port_read(machine(), "ACCEL");
break;
case 0x42:
@ -556,11 +556,11 @@ READ16_MEMBER(cybertnk_state::io_r)
// controller return value is stored in $42(a6)
// but I don't see it referenced again.
//popmessage("unknown controller device 0x42");
m_io_ram.target()[0xd4/2] = 0;
m_io_ram[0xd4/2] = 0;
break;
case 0x60:
m_io_ram.target()[0xd4/2] = input_port_read(machine(), "HANDLE");
m_io_ram[0xd4/2] = input_port_read(machine(), "HANDLE");
break;
//default:
@ -578,19 +578,19 @@ READ16_MEMBER(cybertnk_state::io_r)
return input_port_read(machine(), "DSW2");
case 0xd4/2:
return m_io_ram.target()[offset]; // controller data
return m_io_ram[offset]; // controller data
default:
{
//popmessage("unknown io read 0x%08x", offset);
return m_io_ram.target()[offset];
return m_io_ram[offset];
}
}
}
WRITE16_MEMBER(cybertnk_state::io_w)
{
COMBINE_DATA(&m_io_ram.target()[offset]);
COMBINE_DATA(&m_io_ram[offset]);
switch( offset )
{
@ -651,7 +651,7 @@ WRITE16_MEMBER(cybertnk_state::io_w)
case 0x80/2:
case 0x82/2:
case 0x84/2:
popmessage("%02x %02x %02x %02x %02x %02x %02x",m_io_ram.target()[0x40/2],m_io_ram.target()[0x42/2],m_io_ram.target()[0x44/2],m_io_ram.target()[0x46/2],m_io_ram.target()[0x48/2],m_io_ram.target()[0x4a/2],m_io_ram.target()[0x4c/2]);
popmessage("%02x %02x %02x %02x %02x %02x %02x",m_io_ram[0x40/2],m_io_ram[0x42/2],m_io_ram[0x44/2],m_io_ram[0x46/2],m_io_ram[0x48/2],m_io_ram[0x4a/2],m_io_ram[0x4c/2]);
break;
default:
@ -662,7 +662,7 @@ WRITE16_MEMBER(cybertnk_state::io_w)
READ8_MEMBER(cybertnk_state::soundport_r)
{
return m_io_ram.target()[0] & 0xff;
return m_io_ram[0] & 0xff;
}
static ADDRESS_MAP_START( master_mem, AS_PROGRAM, 16, cybertnk_state )

View File

@ -143,12 +143,12 @@ static SCREEN_UPDATE_IND16( cyclemb )
{
for (x=0;x<64;x++)
{
int attr = state->m_cram.target()[count];
int tile = (state->m_vram.target()[count]) | ((attr & 3)<<8);
int attr = state->m_cram[count];
int tile = (state->m_vram[count]) | ((attr & 3)<<8);
int color = ((attr & 0xf8) >> 3) ^ 0x1f;
int odd_line = y & 1 ? 0x40 : 0x00;
// int sx_offs = flip_screen ? 512 : 0
int scrollx = ((state->m_vram.target()[(y/2)+odd_line]) + (state->m_cram.target()[(y/2)+odd_line]<<8) + 48) & 0x1ff;
int scrollx = ((state->m_vram[(y/2)+odd_line]) + (state->m_cram[(y/2)+odd_line]<<8) + 48) & 0x1ff;
if(flip_screen)
{
@ -193,24 +193,24 @@ static SCREEN_UPDATE_IND16( cyclemb )
for(i=0;i<0x40;i+=2)
{
y = 0xf1 - state->m_obj2_ram.target()[i];
x = state->m_obj2_ram.target()[i+1] - 56;
spr_offs = (state->m_obj1_ram.target()[i+0]);
col = (state->m_obj1_ram.target()[i+1] & 0x3f);
region = ((state->m_obj3_ram.target()[i] & 0x10) >> 4) + 1;
y = 0xf1 - state->m_obj2_ram[i];
x = state->m_obj2_ram[i+1] - 56;
spr_offs = (state->m_obj1_ram[i+0]);
col = (state->m_obj1_ram[i+1] & 0x3f);
region = ((state->m_obj3_ram[i] & 0x10) >> 4) + 1;
if(region == 2)
{
spr_offs >>= 2;
spr_offs += ((state->m_obj3_ram.target()[i+0] & 3) << 5);
spr_offs += ((state->m_obj3_ram[i+0] & 3) << 5);
y-=16;
}
if(state->m_obj3_ram.target()[i+1] & 1)
if(state->m_obj3_ram[i+1] & 1)
x+=256;
//if(state->m_obj3_ram.target()[i+1] & 2)
//if(state->m_obj3_ram[i+1] & 2)
// x-=256;
fx = (state->m_obj3_ram.target()[i+0] & 4) >> 2;
fy = (state->m_obj3_ram.target()[i+0] & 8) >> 3;
fx = (state->m_obj3_ram[i+0] & 4) >> 2;
fy = (state->m_obj3_ram[i+0] & 8) >> 3;
if(flip_screen)
{

View File

@ -49,8 +49,8 @@ public:
static TILE_GET_INFO( get_sc0_tile_info )
{
d9final_state *state = machine.driver_data<d9final_state>();
int tile = ((state->m_hi_vram.target()[tile_index] & 0x3f)<<8) | state->m_lo_vram.target()[tile_index];
int color = state->m_cram.target()[tile_index] & 0x3f;
int tile = ((state->m_hi_vram[tile_index] & 0x3f)<<8) | state->m_lo_vram[tile_index];
int color = state->m_cram[tile_index] & 0x3f;
SET_TILE_INFO(
0,
@ -74,19 +74,19 @@ static SCREEN_UPDATE_IND16(d9final)
WRITE8_MEMBER(d9final_state::sc0_lovram)
{
m_lo_vram.target()[offset] = data;
m_lo_vram[offset] = data;
m_sc0_tilemap->mark_tile_dirty(offset);
}
WRITE8_MEMBER(d9final_state::sc0_hivram)
{
m_hi_vram.target()[offset] = data;
m_hi_vram[offset] = data;
m_sc0_tilemap->mark_tile_dirty(offset);
}
WRITE8_MEMBER(d9final_state::sc0_cram)
{
m_cram.target()[offset] = data;
m_cram[offset] = data;
m_sc0_tilemap->mark_tile_dirty(offset);
}

View File

@ -88,13 +88,13 @@ public:
static TILE_GET_INFO( get_bg_tile_info )
{
dacholer_state *state = machine.driver_data<dacholer_state>();
SET_TILE_INFO(1, state->m_bgvideoram.target()[tile_index] + state->m_bg_bank * 0x100, 0, 0);
SET_TILE_INFO(1, state->m_bgvideoram[tile_index] + state->m_bg_bank * 0x100, 0, 0);
}
static TILE_GET_INFO( get_fg_tile_info )
{
dacholer_state *state = machine.driver_data<dacholer_state>();
SET_TILE_INFO(0, state->m_fgvideoram.target()[tile_index], 0, 0);
SET_TILE_INFO(0, state->m_fgvideoram[tile_index], 0, 0);
}
static VIDEO_START( dacholer )
@ -123,14 +123,14 @@ static void draw_sprites( running_machine &machine, bitmap_ind16 &bitmap, const
for (offs = 0; offs < state->m_spriteram.bytes(); offs += 4)
{
code = state->m_spriteram.target()[offs + 1];
attr = state->m_spriteram.target()[offs + 2];
code = state->m_spriteram[offs + 1];
attr = state->m_spriteram[offs + 2];
flipx = attr & 0x10;
flipy = attr & 0x20;
sx = (state->m_spriteram.target()[offs + 3] - 128) + 256 * (attr & 0x01);
sy = 255 - state->m_spriteram.target()[offs];
sx = (state->m_spriteram[offs + 3] - 128) + 256 * (attr & 0x01);
sy = 255 - state->m_spriteram[offs];
if (state->flip_screen())
{
@ -171,13 +171,13 @@ static SCREEN_UPDATE_IND16(dacholer)
WRITE8_MEMBER(dacholer_state::background_w)
{
m_bgvideoram.target()[offset] = data;
m_bgvideoram[offset] = data;
m_bg_tilemap->mark_tile_dirty(offset);
}
WRITE8_MEMBER(dacholer_state::foreground_w)
{
m_fgvideoram.target()[offset] = data;
m_fgvideoram[offset] = data;
m_fg_tilemap->mark_tile_dirty(offset);
}

View File

@ -140,7 +140,7 @@ static SCREEN_UPDATE_RGB32( dai3wksi )
UINT8 x = offs << 2;
UINT8 y = offs >> 6;
UINT8 data = state->m_dai3wksi_videoram.target()[offs];
UINT8 data = state->m_dai3wksi_videoram[offs];
UINT8 color;
int value = (x >> 2) + ((y >> 5) << 6) + 64 * 8 * (state->m_dai3wksi_redterop ? 1 : 0);

View File

@ -104,7 +104,7 @@ static SCREEN_UPDATE_IND16(dblewing)
UINT16 flip = deco16ic_pf_control_r(state->m_deco_tilegen1, 0, 0xffff);
state->flip_screen_set(BIT(flip, 7));
deco16ic_pf_update(state->m_deco_tilegen1, state->m_pf1_rowscroll, state->m_pf2_rowscroll.target());
deco16ic_pf_update(state->m_deco_tilegen1, state->m_pf1_rowscroll, state->m_pf2_rowscroll);
bitmap.fill(0, cliprect); /* not Confirmed */
screen.machine().priority_bitmap.fill(0);

View File

@ -166,13 +166,13 @@ WRITE8_MEMBER(ddayjlc_state::ddayjlc_bgram_w)
if (!offset)
m_bg_tilemap->set_scrollx(0, data + 8);
m_bgram.target()[offset] = data;
m_bgram[offset] = data;
m_bg_tilemap->mark_tile_dirty(offset & 0x3ff);
}
WRITE8_MEMBER(ddayjlc_state::ddayjlc_videoram_w)
{
m_videoram.target()[offset] = data;
m_videoram[offset] = data;
}
@ -371,9 +371,9 @@ GFXDECODE_END
static TILE_GET_INFO( get_tile_info_bg )
{
ddayjlc_state *state = machine.driver_data<ddayjlc_state>();
int code = state->m_bgram.target()[tile_index] + ((state->m_bgram.target()[tile_index + 0x400] & 0x08) << 5);
int color = (state->m_bgram.target()[tile_index + 0x400] & 0x7);
color |= (state->m_bgram.target()[tile_index + 0x400] & 0x40) >> 3;
int code = state->m_bgram[tile_index] + ((state->m_bgram[tile_index + 0x400] & 0x08) << 5);
int color = (state->m_bgram[tile_index + 0x400] & 0x7);
color |= (state->m_bgram[tile_index + 0x400] & 0x40) >> 3;
SET_TILE_INFO(2, code, color, 0);
}
@ -392,10 +392,10 @@ static SCREEN_UPDATE_IND16( ddayjlc )
for (i = 0; i < 0x400; i += 4)
{
UINT8 flags = state->m_spriteram.target()[i + 2];
UINT8 y = 256 - state->m_spriteram.target()[i + 0] - 8;
UINT16 code = state->m_spriteram.target()[i + 1];
UINT8 x = state->m_spriteram.target()[i + 3] - 16;
UINT8 flags = state->m_spriteram[i + 2];
UINT8 y = 256 - state->m_spriteram[i + 0] - 8;
UINT16 code = state->m_spriteram[i + 1];
UINT8 x = state->m_spriteram[i + 3] - 16;
UINT8 xflip = flags & 0x80;
UINT8 yflip = (code & 0x80);
UINT8 color = flags & 0xf;
@ -411,7 +411,7 @@ static SCREEN_UPDATE_IND16( ddayjlc )
for (y = 0; y < 32; y++)
for (x = 0; x < 32; x++)
{
c = state->m_videoram.target()[y * 32 + x];
c = state->m_videoram[y * 32 + x];
if (x > 1 && x < 30)
drawgfx_transpen(bitmap, cliprect, screen.machine().gfx[1], c + state->m_char_bank * 0x100, 2, 0, 0, x*8, y*8, 0);
else

View File

@ -163,7 +163,7 @@ WRITE16_MEMBER(ddealer_state::ddealer_flipscreen_w)
static TILE_GET_INFO( get_back_tile_info )
{
ddealer_state *state = machine.driver_data<ddealer_state>();
int code = state->m_back_vram.target()[tile_index];
int code = state->m_back_vram[tile_index];
SET_TILE_INFO(
0,
code & 0xfff,
@ -276,26 +276,26 @@ static SCREEN_UPDATE_IND16( ddealer )
if (!state->m_flipscreen)
{
if (state->m_vregs.target()[0xcc / 2] & 0x80)
if (state->m_vregs[0xcc / 2] & 0x80)
{
ddealer_draw_video_layer(screen.machine(), &state->m_vregs.target()[0x1e0 / 2], state->m_left_fg_vram_top, state->m_left_fg_vram_bottom, bitmap, cliprect, state->m_flipscreen);
ddealer_draw_video_layer(screen.machine(), &state->m_vregs.target()[0xcc / 2], state->m_right_fg_vram_top, state->m_right_fg_vram_bottom, bitmap, cliprect, state->m_flipscreen);
ddealer_draw_video_layer(screen.machine(), &state->m_vregs[0x1e0 / 2], state->m_left_fg_vram_top, state->m_left_fg_vram_bottom, bitmap, cliprect, state->m_flipscreen);
ddealer_draw_video_layer(screen.machine(), &state->m_vregs[0xcc / 2], state->m_right_fg_vram_top, state->m_right_fg_vram_bottom, bitmap, cliprect, state->m_flipscreen);
}
else
{
ddealer_draw_video_layer(screen.machine(), &state->m_vregs.target()[0x1e0 / 2], state->m_left_fg_vram_top, state->m_left_fg_vram_bottom, bitmap, cliprect, state->m_flipscreen);
ddealer_draw_video_layer(screen.machine(), &state->m_vregs[0x1e0 / 2], state->m_left_fg_vram_top, state->m_left_fg_vram_bottom, bitmap, cliprect, state->m_flipscreen);
}
}
else
{
if (state->m_vregs.target()[0xcc / 2] & 0x80)
if (state->m_vregs[0xcc / 2] & 0x80)
{
ddealer_draw_video_layer(screen.machine(), &state->m_vregs.target()[0xcc / 2], state->m_left_fg_vram_top, state->m_left_fg_vram_bottom, bitmap, cliprect, state->m_flipscreen);
ddealer_draw_video_layer(screen.machine(), &state->m_vregs.target()[0x1e0 / 2], state->m_right_fg_vram_top, state->m_right_fg_vram_bottom, bitmap, cliprect, state->m_flipscreen);
ddealer_draw_video_layer(screen.machine(), &state->m_vregs[0xcc / 2], state->m_left_fg_vram_top, state->m_left_fg_vram_bottom, bitmap, cliprect, state->m_flipscreen);
ddealer_draw_video_layer(screen.machine(), &state->m_vregs[0x1e0 / 2], state->m_right_fg_vram_top, state->m_right_fg_vram_bottom, bitmap, cliprect, state->m_flipscreen);
}
else
{
ddealer_draw_video_layer(screen.machine(), &state->m_vregs.target()[0x1e0 / 2], state->m_left_fg_vram_top, state->m_left_fg_vram_bottom, bitmap, cliprect, state->m_flipscreen);
ddealer_draw_video_layer(screen.machine(), &state->m_vregs[0x1e0 / 2], state->m_left_fg_vram_top, state->m_left_fg_vram_bottom, bitmap, cliprect, state->m_flipscreen);
}
}
@ -314,7 +314,7 @@ static TIMER_DEVICE_CALLBACK( ddealer_mcu_sim )
if (state->m_coin_input & 0x01)//coin 1
{
if((state->m_input_pressed & 0x01) == 0)
state->m_mcu_shared_ram.target()[0x000 / 2]++;
state->m_mcu_shared_ram[0x000 / 2]++;
state->m_input_pressed = (state->m_input_pressed & 0xfe) | 1;
}
else
@ -323,7 +323,7 @@ static TIMER_DEVICE_CALLBACK( ddealer_mcu_sim )
if (state->m_coin_input & 0x02)//coin 2
{
if ((state->m_input_pressed & 0x02) == 0)
state->m_mcu_shared_ram.target()[0x000 / 2]++;
state->m_mcu_shared_ram[0x000 / 2]++;
state->m_input_pressed = (state->m_input_pressed & 0xfd) | 2;
}
else
@ -332,7 +332,7 @@ static TIMER_DEVICE_CALLBACK( ddealer_mcu_sim )
if (state->m_coin_input & 0x04)//service 1
{
if ((state->m_input_pressed & 0x04) == 0)
state->m_mcu_shared_ram.target()[0x000 / 2]++;
state->m_mcu_shared_ram[0x000 / 2]++;
state->m_input_pressed = (state->m_input_pressed & 0xfb) | 4;
}
else
@ -340,12 +340,12 @@ static TIMER_DEVICE_CALLBACK( ddealer_mcu_sim )
/*0x104/2 is some sort of "start-lock",i.e. used on the girl selection.
Without it,the game "steals" one credit if you press the start button on that.*/
if (state->m_mcu_shared_ram.target()[0x000 / 2] > 0 && state->m_work_ram.target()[0x104 / 2] & 1)
if (state->m_mcu_shared_ram[0x000 / 2] > 0 && state->m_work_ram[0x104 / 2] & 1)
{
if (state->m_coin_input & 0x08)//start 1
{
if ((state->m_input_pressed & 0x08) == 0 && (~(state->m_work_ram.target()[0x100 / 2] & 1)))
state->m_mcu_shared_ram.target()[0x000 / 2]--;
if ((state->m_input_pressed & 0x08) == 0 && (~(state->m_work_ram[0x100 / 2] & 1)))
state->m_mcu_shared_ram[0x000 / 2]--;
state->m_input_pressed = (state->m_input_pressed & 0xf7) | 8;
}
else
@ -353,8 +353,8 @@ static TIMER_DEVICE_CALLBACK( ddealer_mcu_sim )
if (state->m_coin_input & 0x10)//start 2
{
if((state->m_input_pressed & 0x10) == 0 && (~(state->m_work_ram.target()[0x100 / 2] & 2)))
state->m_mcu_shared_ram.target()[0x000 / 2]--;
if((state->m_input_pressed & 0x10) == 0 && (~(state->m_work_ram[0x100 / 2] & 2)))
state->m_mcu_shared_ram[0x000 / 2]--;
state->m_input_pressed = (state->m_input_pressed & 0xef) | 0x10;
}
else
@ -362,24 +362,24 @@ static TIMER_DEVICE_CALLBACK( ddealer_mcu_sim )
}
/*random number generators,controls order of cards*/
state->m_mcu_shared_ram.target()[0x10 / 2] = timer.machine().rand() & 0xffff;
state->m_mcu_shared_ram.target()[0x12 / 2] = timer.machine().rand() & 0xffff;
state->m_mcu_shared_ram.target()[0x14 / 2] = timer.machine().rand() & 0xffff;
state->m_mcu_shared_ram.target()[0x16 / 2] = timer.machine().rand() & 0xffff;
state->m_mcu_shared_ram[0x10 / 2] = timer.machine().rand() & 0xffff;
state->m_mcu_shared_ram[0x12 / 2] = timer.machine().rand() & 0xffff;
state->m_mcu_shared_ram[0x14 / 2] = timer.machine().rand() & 0xffff;
state->m_mcu_shared_ram[0x16 / 2] = timer.machine().rand() & 0xffff;
}
WRITE16_MEMBER(ddealer_state::back_vram_w)
{
COMBINE_DATA(&m_back_vram.target()[offset]);
COMBINE_DATA(&m_back_vram[offset]);
m_back_tilemap->mark_tile_dirty(offset);
}
WRITE16_MEMBER(ddealer_state::ddealer_vregs_w)
{
COMBINE_DATA(&m_vregs.target()[offset]);
COMBINE_DATA(&m_vregs[offset]);
}
/******************************************************************************************************
@ -389,24 +389,24 @@ Protection handling,identical to Hacha Mecha Fighter / Thunder Dragon with diffe
******************************************************************************************************/
#define PROT_JSR(_offs_,_protvalue_,_pc_) \
if(m_mcu_shared_ram.target()[(_offs_)/2] == _protvalue_) \
if(m_mcu_shared_ram[(_offs_)/2] == _protvalue_) \
{ \
m_mcu_shared_ram.target()[(_offs_)/2] = 0xffff; /*(MCU job done)*/ \
m_mcu_shared_ram.target()[(_offs_+2-0x10)/2] = 0x4ef9;/*JMP*/\
m_mcu_shared_ram.target()[(_offs_+4-0x10)/2] = 0x0000;/*HI-DWORD*/\
m_mcu_shared_ram.target()[(_offs_+6-0x10)/2] = _pc_; /*LO-DWORD*/\
m_mcu_shared_ram[(_offs_)/2] = 0xffff; /*(MCU job done)*/ \
m_mcu_shared_ram[(_offs_+2-0x10)/2] = 0x4ef9;/*JMP*/\
m_mcu_shared_ram[(_offs_+4-0x10)/2] = 0x0000;/*HI-DWORD*/\
m_mcu_shared_ram[(_offs_+6-0x10)/2] = _pc_; /*LO-DWORD*/\
} \
#define PROT_INPUT(_offs_,_protvalue_,_protinput_,_input_) \
if(m_mcu_shared_ram.target()[_offs_] == _protvalue_) \
if(m_mcu_shared_ram[_offs_] == _protvalue_) \
{\
m_mcu_shared_ram.target()[_protinput_] = ((_input_ & 0xffff0000)>>16);\
m_mcu_shared_ram.target()[_protinput_+1] = (_input_ & 0x0000ffff);\
m_mcu_shared_ram[_protinput_] = ((_input_ & 0xffff0000)>>16);\
m_mcu_shared_ram[_protinput_+1] = (_input_ & 0x0000ffff);\
}
WRITE16_MEMBER(ddealer_state::ddealer_mcu_shared_w)
{
COMBINE_DATA(&m_mcu_shared_ram.target()[offset]);
COMBINE_DATA(&m_mcu_shared_ram[offset]);
switch(offset)
{
@ -438,25 +438,25 @@ WRITE16_MEMBER(ddealer_state::ddealer_mcu_shared_w)
case 0x4fe/2: PROT_JSR(0x4fe,0x8018,0x9818); break;
/*Start-up vector,I think that only the first ram address can be written by the main CPU,or it is a whole sequence.*/
case 0x000/2:
if (m_mcu_shared_ram.target()[0x000 / 2] == 0x60fe)
if (m_mcu_shared_ram[0x000 / 2] == 0x60fe)
{
m_mcu_shared_ram.target()[0x000 / 2] = 0x0000;//coin counter
m_mcu_shared_ram.target()[0x002 / 2] = 0x0000;//coin counter "decimal point"
m_mcu_shared_ram.target()[0x004 / 2] = 0x4ef9;
m_mcu_shared_ram[0x000 / 2] = 0x0000;//coin counter
m_mcu_shared_ram[0x002 / 2] = 0x0000;//coin counter "decimal point"
m_mcu_shared_ram[0x004 / 2] = 0x4ef9;
}
break;
case 0x002/2:
case 0x004/2:
if (m_mcu_shared_ram.target()[0x002 / 2] == 0x0000 && m_mcu_shared_ram.target()[0x004 / 2] == 0x0214)
m_mcu_shared_ram.target()[0x004 / 2] = 0x4ef9;
if (m_mcu_shared_ram[0x002 / 2] == 0x0000 && m_mcu_shared_ram[0x004 / 2] == 0x0214)
m_mcu_shared_ram[0x004 / 2] = 0x4ef9;
break;
case 0x008/2:
if (m_mcu_shared_ram.target()[0x008 / 2] == 0x000f)
m_mcu_shared_ram.target()[0x008 / 2] = 0x0604;
if (m_mcu_shared_ram[0x008 / 2] == 0x000f)
m_mcu_shared_ram[0x008 / 2] = 0x0604;
break;
case 0x00c/2:
if (m_mcu_shared_ram.target()[0x00c / 2] == 0x000f)
m_mcu_shared_ram.target()[0x00c / 2] = 0x0000;
if (m_mcu_shared_ram[0x00c / 2] == 0x000f)
m_mcu_shared_ram[0x00c / 2] = 0x0000;
break;
}
}

View File

@ -133,7 +133,7 @@ public:
static SCREEN_UPDATE_IND16( rblaster )
{
deco_ld_state *state = screen.machine().driver_data<deco_ld_state>();
UINT8 *videoram = state->m_videoram.target();
UINT8 *videoram = state->m_videoram;
const gfx_element *gfx = screen.machine().gfx[0];
int count = 0x0000;

View File

@ -84,12 +84,12 @@ READ8_MEMBER(deshoros_state::io_r)
case 0x03: return input_port_read(machine(), "KEY0" );
case 0x04: return input_port_read(machine(), "KEY1" );
case 0x05: return input_port_read(machine(), "SYSTEM" );
case 0x0a: return m_io_ram.target()[offset]; //"buzzer" 0 read
case 0x0b: return m_io_ram.target()[offset]; //"buzzer" 1 read
case 0x0a: return m_io_ram[offset]; //"buzzer" 0 read
case 0x0b: return m_io_ram[offset]; //"buzzer" 1 read
}
// printf("R -> [%02x]\n",offset);
return m_io_ram.target()[offset];
return m_io_ram[offset];
}
WRITE8_MEMBER(deshoros_state::io_w)
@ -98,13 +98,13 @@ WRITE8_MEMBER(deshoros_state::io_w)
{
case 0x00: /*Printer data*/ return;
case 0x02: update_led_array(data); return;
case 0x05: coin_lockout_w(machine(), 0,m_io_ram.target()[offset] & 1);return;
case 0x05: coin_lockout_w(machine(), 0,m_io_ram[offset] & 1);return;
case 0x06: /*Printer IRQ enable*/ return;
// case 0x0a: "buzzer" 0 write
// case 0x0b: "buzzer" 1 write
case 0x0c: answer_bankswitch(machine(),data&0x03); return; //data & 0x10 enabled too,dunno if it is worth to shift the data...
}
m_io_ram.target()[offset] = data;
m_io_ram[offset] = data;
// printf("%02x -> [%02x]\n",data,offset);
}

View File

@ -61,8 +61,8 @@ static SCREEN_UPDATE_IND16( destroyr )
/* draw major objects */
for (i = 0; i < 16; i++)
{
int attr = state->m_major_obj_ram.target()[2 * i + 0] ^ 0xff;
int horz = state->m_major_obj_ram.target()[2 * i + 1];
int attr = state->m_major_obj_ram[2 * i + 0] ^ 0xff;
int horz = state->m_major_obj_ram[2 * i + 1];
int num = attr & 3;
int scan = attr & 4;
@ -87,7 +87,7 @@ static SCREEN_UPDATE_IND16( destroyr )
{
for (j = 0; j < 32; j++)
{
int num = state->m_alpha_num_ram.target()[32 * i + j];
int num = state->m_alpha_num_ram[32 * i + j];
drawgfx_transpen(bitmap, cliprect, screen.machine().gfx[0], num, 0, 0, 0, 8 * j, 8 * i, 0);
}
@ -96,9 +96,9 @@ static SCREEN_UPDATE_IND16( destroyr )
/* draw minor objects */
for (i = 0; i < 2; i++)
{
int num = i << 4 | (state->m_minor_obj_ram.target()[i + 0] & 0xf);
int horz = 256 - state->m_minor_obj_ram.target()[i + 2];
int vert = 256 - state->m_minor_obj_ram.target()[i + 4];
int num = i << 4 | (state->m_minor_obj_ram[i + 0] & 0xf);
int horz = 256 - state->m_minor_obj_ram[i + 2];
int vert = 256 - state->m_minor_obj_ram[i + 4];
drawgfx_transpen(bitmap, cliprect, screen.machine().gfx[1], num, 0, 0, 0, horz, vert, 0);
}

View File

@ -77,7 +77,7 @@ static VIDEO_START(diverboy)
static void draw_sprites( running_machine& machine, bitmap_ind16 &bitmap, const rectangle &cliprect )
{
diverboy_state *state = machine.driver_data<diverboy_state>();
UINT16 *source = state->m_spriteram.target();
UINT16 *source = state->m_spriteram;
UINT16 *finish = source + (state->m_spriteram.bytes() / 2);
while (source < finish)

View File

@ -225,7 +225,7 @@ static PALETTE_INIT( dleuro )
static SCREEN_UPDATE_IND16( dleuro )
{
dlair_state *state = screen.machine().driver_data<dlair_state>();
UINT8 *videoram = state->m_videoram.target();
UINT8 *videoram = state->m_videoram;
int x, y;
/* redraw the overlay */

View File

@ -362,11 +362,11 @@ racetrack seems to be stored in 4th and 5th prom.
can we draw it with the tilemap? maybe not, the layout is a litle strange
*/
// base = state->m_scroll_ram.target()[0];
// base = state->m_scroll_ram[0];
off=0x1900-(state->m_bg*0x100)+(state->m_scroll_ram.target()[1])*0x100;
scrolly = 0xff-(state->m_scroll_ram.target()[0]);
if(state->m_scroll_ram.target()[1]==0xff) off=0x1800;
off=0x1900-(state->m_bg*0x100)+(state->m_scroll_ram[1])*0x100;
scrolly = 0xff-(state->m_scroll_ram[0]);
if(state->m_scroll_ram[1]==0xff) off=0x1800;
for(x=0;x<16;x++) {
for(y=0;y<16;y++) {
int chr = state->m_racetrack_tilemap_rom[off];
@ -398,12 +398,12 @@ wouldnt like to say its the most effective way though...
int a=0;
int b=0;
int base = count*4;
int sprx=state->m_sprite_ram.target()[base+3];
int spry=state->m_sprite_ram.target()[base+2];
//state->m_sprite_ram.target()[base+1];
int col = (state->m_sprite_ram.target()[base+1]&0x1f);
int anim = (state->m_sprite_ram.target()[base]&0x3)*0x40; // animation frame - probably wrong but seems right
int horse = (state->m_sprite_ram.target()[base+1]&0x7)*8+7; // horse label from 1 - 6
int sprx=state->m_sprite_ram[base+3];
int spry=state->m_sprite_ram[base+2];
//state->m_sprite_ram[base+1];
int col = (state->m_sprite_ram[base+1]&0x1f);
int anim = (state->m_sprite_ram[base]&0x3)*0x40; // animation frame - probably wrong but seems right
int horse = (state->m_sprite_ram[base+1]&0x7)*8+7; // horse label from 1 - 6
for (a=0;a<8 ;a++)
{
@ -426,10 +426,10 @@ wouldnt like to say its the most effective way though...
for(x=0;x<32;x++)
{
int tileno,bank,color;
tileno=state->m_dderby_vidchars.target()[count];
bank=(state->m_dderby_vidattribs.target()[count]&0x20)>>5;
tileno=state->m_dderby_vidchars[count];
bank=(state->m_dderby_vidattribs[count]&0x20)>>5;
tileno|=(bank<<8);
color=((state->m_dderby_vidattribs.target()[count])&0x1f);
color=((state->m_dderby_vidattribs[count])&0x1f);
drawgfx_transpen(bitmap,cliprect,gfx,tileno,color,0,0,x*8,y*8,(tileno == 0x38) ? 0 : -1);

View File

@ -100,21 +100,21 @@ static void draw_sprites( running_machine &machine, bitmap_ind16 &bitmap, const
{
int sx, sy, code;
sx = state->m_spriteram.target()[offs];
sy = 248 - state->m_spriteram.target()[offs + 1];
sx = state->m_spriteram[offs];
sy = 248 - state->m_spriteram[offs + 1];
if (state->flip_screen_x()) sx = 248 - sx;
if (state->flip_screen_y()) sy = 248 - sy;
code = state->m_spriteram.target()[offs + 3] + ((state->m_spriteram.target()[offs + 2] & 0x03) << 8) ;
code = state->m_spriteram[offs + 3] + ((state->m_spriteram[offs + 2] & 0x03) << 8) ;
drawgfx_transpen(bitmap,cliprect,machine.gfx[0],
2 * code,
((state->m_spriteram.target()[offs + 2] & 0xf8) >> 3) ,
((state->m_spriteram[offs + 2] & 0xf8) >> 3) ,
state->flip_screen_x(),state->flip_screen_y(),
sx,sy + (state->flip_screen_y() ? 8 : -8),0);
drawgfx_transpen(bitmap,cliprect,machine.gfx[0],
2 * code + 1,
((state->m_spriteram.target()[offs + 2] & 0xf8) >> 3) ,
((state->m_spriteram[offs + 2] & 0xf8) >> 3) ,
state->flip_screen_x(),state->flip_screen_y(),
sx,sy,0);
}
@ -135,8 +135,8 @@ static SCREEN_UPDATE_IND16( dominob )
drawgfx_opaque(bitmap,
cliprect,
screen.machine().gfx[1],
state->m_bgram.target()[index] + 256 * (state->m_bgram.target()[index + 1] & 0xf),
state->m_bgram.target()[index + 1] >> 4,
state->m_bgram[index] + 256 * (state->m_bgram[index + 1] & 0xf),
state->m_bgram[index + 1] >> 4,
0, 0,
x * 32, y * 32);
index += 2;
@ -150,8 +150,8 @@ static SCREEN_UPDATE_IND16( dominob )
drawgfx_transpen( bitmap,
cliprect,
screen.machine().gfx[0],
state->m_videoram.target()[(y * 32 + x) * 2 + 1] + (state->m_videoram.target()[(y * 32 + x) * 2] & 7) * 256,
(state->m_videoram.target()[(y * 32 + x) * 2] >> 3),
state->m_videoram[(y * 32 + x) * 2 + 1] + (state->m_videoram[(y * 32 + x) * 2] & 7) * 256,
(state->m_videoram[(y * 32 + x) * 2] >> 3),
0, 0,
x * 8, y * 8,0);
}

View File

@ -101,7 +101,7 @@ static SCREEN_UPDATE_RGB32( dorachan )
/* the need for +1 is extremely unusual, but definetely correct */
offs_t color_address = ((((offs << 2) & 0x03e0) | (offs >> 8)) + 1) & 0x03ff;
UINT8 data = state->m_videoram.target()[offs];
UINT8 data = state->m_videoram[offs];
if (state->m_flip_screen)
fore_color = (color_map_base[color_address] >> 3) & 0x07;

View File

@ -72,7 +72,7 @@ static SCREEN_UPDATE_RGB32( dotrikun )
{
for (x = 0; x < 256; x+=16)
{
UINT8 data = state->m_dotrikun_bitmap.target()[((x/16)+((y/2)*16))];
UINT8 data = state->m_dotrikun_bitmap[((x/16)+((y/2)*16))];
for (i = 0; i < 8; i++)
{

View File

@ -229,7 +229,7 @@ static void draw_sprites( running_machine &machine, bitmap_ind16 &bitmap, const
WRITE32_MEMBER(dreamwld_state::dreamwld_bg_videoram_w)
{
COMBINE_DATA(&m_bg_videoram.target()[offset]);
COMBINE_DATA(&m_bg_videoram[offset]);
m_bg_tilemap->mark_tile_dirty(offset * 2);
m_bg_tilemap->mark_tile_dirty(offset * 2 + 1);
}
@ -238,7 +238,7 @@ static TILE_GET_INFO( get_dreamwld_bg_tile_info )
{
dreamwld_state *state = machine.driver_data<dreamwld_state>();
int tileno, colour;
tileno = (tile_index & 1) ? (state->m_bg_videoram.target()[tile_index >> 1] & 0xffff) : ((state->m_bg_videoram.target()[tile_index >> 1] >> 16) & 0xffff);
tileno = (tile_index & 1) ? (state->m_bg_videoram[tile_index >> 1] & 0xffff) : ((state->m_bg_videoram[tile_index >> 1] >> 16) & 0xffff);
colour = tileno >> 13;
tileno &= 0x1fff;
SET_TILE_INFO(1, tileno + state->m_tilebank[0] * 0x2000, 0x80 + colour, 0);
@ -247,7 +247,7 @@ static TILE_GET_INFO( get_dreamwld_bg_tile_info )
WRITE32_MEMBER(dreamwld_state::dreamwld_bg2_videoram_w)
{
COMBINE_DATA(&m_bg2_videoram.target()[offset]);
COMBINE_DATA(&m_bg2_videoram[offset]);
m_bg2_tilemap->mark_tile_dirty(offset * 2);
m_bg2_tilemap->mark_tile_dirty(offset * 2 + 1);
}
@ -256,7 +256,7 @@ static TILE_GET_INFO( get_dreamwld_bg2_tile_info )
{
dreamwld_state *state = machine.driver_data<dreamwld_state>();
UINT16 tileno, colour;
tileno = (tile_index & 1) ? (state->m_bg2_videoram.target()[tile_index >> 1] & 0xffff) : ((state->m_bg2_videoram.target()[tile_index >> 1] >> 16) & 0xffff);
tileno = (tile_index & 1) ? (state->m_bg2_videoram[tile_index >> 1] & 0xffff) : ((state->m_bg2_videoram[tile_index >> 1] >> 16) & 0xffff);
colour = tileno >> 13;
tileno &= 0x1fff;
SET_TILE_INFO(1, tileno + state->m_tilebank[1] * 0x2000, 0xc0 + colour, 0);
@ -304,13 +304,13 @@ static SCREEN_UPDATE_IND16( dreamwld )
tmptilemap0 = state->m_bg_tilemap;
tmptilemap1 = state->m_bg2_tilemap;
int layer0_scrolly = state->m_vregs.target()[(0x400 / 4)] + 32;
int layer1_scrolly = state->m_vregs.target()[(0x400 / 4) + 2] + 32;
int layer0_scrolly = state->m_vregs[(0x400 / 4)] + 32;
int layer1_scrolly = state->m_vregs[(0x400 / 4) + 2] + 32;
int layer0_scrollx = state->m_vregs.target()[(0x400 / 4) + 1] + 3;
int layer1_scrollx = state->m_vregs.target()[(0x400 / 4) + 3] + 5;
UINT32 layer0_ctrl = state->m_vregs.target()[0x412 / 4];
UINT32 layer1_ctrl = state->m_vregs.target()[0x416 / 4];
int layer0_scrollx = state->m_vregs[(0x400 / 4) + 1] + 3;
int layer1_scrollx = state->m_vregs[(0x400 / 4) + 3] + 5;
UINT32 layer0_ctrl = state->m_vregs[0x412 / 4];
UINT32 layer1_ctrl = state->m_vregs[0x416 / 4];
tmptilemap0->set_scrolly(0, layer0_scrolly);
tmptilemap1->set_scrolly(0, layer1_scrolly);
@ -340,14 +340,15 @@ static SCREEN_UPDATE_IND16( dreamwld )
int x0 = 0, x1 = 0;
/* layer 0 */
UINT16 *vregs = reinterpret_cast<UINT16 *>(state->m_vregs.target());
if (layer0_ctrl & 0x0300)
{
if (layer0_ctrl & 0x0200)
/* per-tile rowscroll */
x0 = ((UINT16 *)state->m_vregs.target())[BYTE_XOR_BE(0x000/2 + i/16)];
x0 = vregs[BYTE_XOR_BE(0x000/2 + i/16)];
else
/* per-line rowscroll */
x0 = ((UINT16 *)state->m_vregs.target())[BYTE_XOR_BE(0x000/2 + ((i + layer0_scrolly)&0xff))]; // different handling to psikyo.c? ( + scrolly )
x0 = vregs[BYTE_XOR_BE(0x000/2 + ((i + layer0_scrolly)&0xff))]; // different handling to psikyo.c? ( + scrolly )
}
@ -361,10 +362,10 @@ static SCREEN_UPDATE_IND16( dreamwld )
{
if (layer1_ctrl & 0x0200)
/* per-tile rowscroll */
x1 = ((UINT16 *)state->m_vregs.target())[BYTE_XOR_BE(0x200/2 + i/16)];
x1 = vregs[BYTE_XOR_BE(0x200/2 + i/16)];
else
/* per-line rowscroll */
x1 = ((UINT16 *)state->m_vregs.target())[BYTE_XOR_BE(0x200/2 + ((i + layer1_scrolly)&0xff))]; // different handling to psikyo.c? ( + scrolly )
x1 = vregs[BYTE_XOR_BE(0x200/2 + ((i + layer1_scrolly)&0xff))]; // different handling to psikyo.c? ( + scrolly )
}
@ -374,8 +375,8 @@ static SCREEN_UPDATE_IND16( dreamwld )
}
state->m_tilebank[0] = (state->m_vregs.target()[(0x400 / 4) + 4] >> 6) & 1;
state->m_tilebank[1] = (state->m_vregs.target()[(0x400 / 4) + 5] >> 6) & 1;
state->m_tilebank[0] = (state->m_vregs[(0x400 / 4) + 4] >> 6) & 1;
state->m_tilebank[1] = (state->m_vregs[(0x400 / 4) + 5] >> 6) & 1;
if (state->m_tilebank[0] != state->m_tilebankold[0])
{
@ -445,13 +446,13 @@ WRITE32_MEMBER(dreamwld_state::dreamwld_palette_w)
UINT16 dat;
int color;
COMBINE_DATA(&m_paletteram.target()[offset]);
COMBINE_DATA(&m_paletteram[offset]);
color = offset * 2;
dat = m_paletteram.target()[offset] & 0x7fff;
dat = m_paletteram[offset] & 0x7fff;
palette_set_color_rgb(machine(), color+1, pal5bit(dat >> 10), pal5bit(dat >> 5), pal5bit(dat >> 0));
dat = (m_paletteram.target()[offset] >> 16) & 0x7fff;
dat = (m_paletteram[offset] >> 16) & 0x7fff;
palette_set_color_rgb(machine(), color, pal5bit(dat >> 10), pal5bit(dat >> 5), pal5bit(dat >> 0));
}

View File

@ -41,8 +41,8 @@ public:
static TILE_GET_INFO( get_tile_info_fg )
{
drtomy_state *state = machine.driver_data<drtomy_state>();
int code = state->m_videoram_fg.target()[tile_index] & 0xfff;
int color = (state->m_videoram_fg.target()[tile_index] & 0xf000) >> 12;
int code = state->m_videoram_fg[tile_index] & 0xfff;
int color = (state->m_videoram_fg[tile_index] & 0xf000) >> 12;
SET_TILE_INFO(2, code, color, 0);
}
@ -50,8 +50,8 @@ static TILE_GET_INFO( get_tile_info_fg )
static TILE_GET_INFO( get_tile_info_bg )
{
drtomy_state *state = machine.driver_data<drtomy_state>();
int code = state->m_videoram_bg.target()[tile_index] & 0xfff;
int color = (state->m_videoram_bg.target()[tile_index] & 0xf000) >> 12;
int code = state->m_videoram_bg[tile_index] & 0xfff;
int color = (state->m_videoram_bg[tile_index] & 0xf000) >> 12;
SET_TILE_INFO(1, code, color, 0);
}
@ -84,11 +84,11 @@ static void draw_sprites( running_machine &machine, bitmap_ind16 &bitmap, const
for (i = 3; i < 0x1000 / 2; i += 4)
{
int sx = state->m_spriteram.target()[i + 2] & 0x01ff;
int sy = (240 - (state->m_spriteram.target()[i] & 0x00ff)) & 0x00ff;
int number = state->m_spriteram.target()[i + 3];
int color = (state->m_spriteram.target()[i + 2] & 0x1e00) >> 9;
int attr = (state->m_spriteram.target()[i] & 0xfe00) >> 9;
int sx = state->m_spriteram[i + 2] & 0x01ff;
int sy = (240 - (state->m_spriteram[i] & 0x00ff)) & 0x00ff;
int number = state->m_spriteram[i + 3];
int color = (state->m_spriteram[i + 2] & 0x1e00) >> 9;
int attr = (state->m_spriteram[i] & 0xfe00) >> 9;
int xflip = attr & 0x20;
int yflip = attr & 0x40;
@ -140,13 +140,13 @@ static SCREEN_UPDATE_IND16( drtomy )
WRITE16_MEMBER(drtomy_state::drtomy_vram_fg_w)
{
COMBINE_DATA(&m_videoram_fg.target()[offset]);
COMBINE_DATA(&m_videoram_fg[offset]);
m_tilemap_fg->mark_tile_dirty(offset);
}
WRITE16_MEMBER(drtomy_state::drtomy_vram_bg_w)
{
COMBINE_DATA(&m_videoram_bg.target()[offset]);
COMBINE_DATA(&m_videoram_bg[offset]);
m_tilemap_bg->mark_tile_dirty(offset);
}

View File

@ -63,7 +63,7 @@ public:
WRITE8_MEMBER(dynadice_state::dynadice_videoram_w)
{
m_videoram.target()[offset] = data;
m_videoram[offset] = data;
m_bg_tilemap->mark_tile_dirty(offset);
m_top_tilemap->mark_all_dirty();
}
@ -193,7 +193,7 @@ GFXDECODE_END
static TILE_GET_INFO( get_tile_info )
{
dynadice_state *state = machine.driver_data<dynadice_state>();
int code = state->m_videoram.target()[tile_index];
int code = state->m_videoram[tile_index];
SET_TILE_INFO(1, code, 0, 0);
}

View File

@ -119,7 +119,7 @@ static TILE_GET_INFO( get_bg_tile_info )
{
egghunt_state *state = machine.driver_data<egghunt_state>();
int code = ((state->m_bgram[tile_index * 2 + 1] << 8) | state->m_bgram[tile_index * 2]) & 0x3fff;
int colour = state->m_atram.target()[tile_index] & 0x3f;
int colour = state->m_atram[tile_index] & 0x3f;
if(code & 0x2000)
{
@ -161,7 +161,7 @@ WRITE8_MEMBER(egghunt_state::egghunt_bgram_w)
WRITE8_MEMBER(egghunt_state::egghunt_atram_w)
{
m_atram.target()[offset] = data;
m_atram[offset] = data;
m_bg_tilemap->mark_tile_dirty(offset);
}

View File

@ -47,7 +47,7 @@ static SCREEN_UPDATE_RGB32( embargo )
UINT8 x = offs << 3;
UINT8 y = offs >> 5;
UINT8 data = state->m_videoram.target()[offs];
UINT8 data = state->m_videoram[offs];
for (i = 0; i < 8; i++)
{

View File

@ -242,7 +242,7 @@ static SCREEN_UPDATE_RGB32( enigma2 )
and the adder at 16A is activated */
if (state->m_flip_screen) videoram_address = (~videoram_address + 0x0400) & 0x1fff;
video_data = state->m_videoram.target()[videoram_address];
video_data = state->m_videoram[videoram_address];
fore_color = color_map_base[color_map_address] & 0x07;
star_color = star_map_base[star_map_address] & 0x07;
@ -313,7 +313,7 @@ static SCREEN_UPDATE_RGB32( enigma2a )
and the adder at 16A is activated */
if (state->m_flip_screen) videoram_address = (~videoram_address + 0x0400) & 0x1fff;
video_data = state->m_videoram.target()[videoram_address];
video_data = state->m_videoram[videoram_address];
}
/* plot the current pixel */

View File

@ -69,13 +69,13 @@ static SCREEN_UPDATE_IND16( esh )
{
int current_screen_character = (chary*32) + charx;
int palIndex = (state->m_tile_control_ram.target()[current_screen_character] & 0x0f);
int tileOffs = (state->m_tile_control_ram.target()[current_screen_character] & 0x10) >> 4;
//int blinkLine = (state->m_tile_control_ram.target()[current_screen_character] & 0x40) >> 6;
//int blinkChar = (state->m_tile_control_ram.target()[current_screen_character] & 0x80) >> 7;
int palIndex = (state->m_tile_control_ram[current_screen_character] & 0x0f);
int tileOffs = (state->m_tile_control_ram[current_screen_character] & 0x10) >> 4;
//int blinkLine = (state->m_tile_control_ram[current_screen_character] & 0x40) >> 6;
//int blinkChar = (state->m_tile_control_ram[current_screen_character] & 0x80) >> 7;
drawgfx_transpen(bitmap, cliprect, screen.machine().gfx[0],
state->m_tile_ram.target()[current_screen_character] + (0x100 * tileOffs),
state->m_tile_ram[current_screen_character] + (0x100 * tileOffs),
palIndex,
0, 0, charx*8, chary*8, 0);
}

View File

@ -61,13 +61,13 @@ public:
WRITE8_MEMBER(ettrivia_state::ettrivia_fg_w)
{
m_fg_videoram.target()[offset] = data;
m_fg_videoram[offset] = data;
m_fg_tilemap->mark_tile_dirty(offset);
}
WRITE8_MEMBER(ettrivia_state::ettrivia_bg_w)
{
m_bg_videoram.target()[offset] = data;
m_bg_videoram[offset] = data;
m_bg_tilemap->mark_tile_dirty(offset);
}

View File

@ -44,8 +44,8 @@ static SCREEN_UPDATE_IND16( mosaicf2 )
if ((x < 0xa0) && (y < 0xe0))
{
bitmap.pix16(y, (x * 2) + 0) = (state->m_videoram.target()[offs] >> 16) & 0x7fff;
bitmap.pix16(y, (x * 2) + 1) = (state->m_videoram.target()[offs] >> 0) & 0x7fff;
bitmap.pix16(y, (x * 2) + 0) = (state->m_videoram[offs] >> 16) & 0x7fff;
bitmap.pix16(y, (x * 2) + 1) = (state->m_videoram[offs] >> 0) & 0x7fff;
}
}

View File

@ -89,7 +89,7 @@ static VIDEO_START( feversoc )
static SCREEN_UPDATE_IND16( feversoc )
{
feversoc_state *state = screen.machine().driver_data<feversoc_state>();
UINT32 *spriteram32 = state->m_spriteram.target();
UINT32 *spriteram32 = state->m_spriteram;
int offs,spr_offs,colour,sx,sy,h,w,dx,dy;
bitmap.fill(screen.machine().pens[0], cliprect); //black pen

View File

@ -1743,7 +1743,7 @@ static MACHINE_START( firebeat )
ppcdrc_set_options(machine.device("maincpu"), PPCDRC_COMPATIBLE_OPTIONS);
/* configure fast RAM regions for DRC */
ppcdrc_add_fastram(machine.device("maincpu"), 0x00000000, 0x01ffffff, FALSE, state->m_work_ram.target());
ppcdrc_add_fastram(machine.device("maincpu"), 0x00000000, 0x01ffffff, FALSE, state->m_work_ram);
state->m_flash[0] = machine.device<fujitsu_29f016a_device>("flash0");
state->m_flash[1] = machine.device<fujitsu_29f016a_device>("flash1");

View File

@ -190,13 +190,13 @@ WRITE8_MEMBER(firefox_state::firefox_disc_data_w)
static TILE_GET_INFO( bgtile_get_info )
{
firefox_state *state = machine.driver_data<firefox_state>();
SET_TILE_INFO(0, state->m_tileram.target()[tile_index], 0, 0);
SET_TILE_INFO(0, state->m_tileram[tile_index], 0, 0);
}
WRITE8_MEMBER(firefox_state::tileram_w)
{
m_tileram.target()[offset] = data;
m_tileram[offset] = data;
m_bgtiles->mark_tile_dirty(offset);
}
@ -265,13 +265,13 @@ static void set_rgba( running_machine &machine, int start, int index, unsigned c
WRITE8_MEMBER(firefox_state::tile_palette_w)
{
m_tile_palette.target()[ offset ] = data;
m_tile_palette[ offset ] = data;
set_rgba( machine(), 0, offset & 0xff, m_tile_palette );
}
WRITE8_MEMBER(firefox_state::sprite_palette_w)
{
m_sprite_palette.target()[ offset ] = data;
m_sprite_palette[ offset ] = data;
set_rgba( machine(), 256, offset & 0xff, m_sprite_palette );
}

View File

@ -75,7 +75,7 @@ static TILEMAP_MAPPER( flyball_get_memory_offset )
static TILE_GET_INFO( flyball_get_tile_info )
{
flyball_state *state = machine.driver_data<flyball_state>();
UINT8 data = state->m_playfield_ram.target()[tile_index];
UINT8 data = state->m_playfield_ram[tile_index];
int flags = ((data & 0x40) ? TILE_FLIPX : 0) | ((data & 0x80) ? TILE_FLIPY : 0);
int code = data & 63;
@ -392,7 +392,7 @@ static MACHINE_RESET( flyball )
UINT8* ROM = machine.region("maincpu")->base() + 0x2000;
for (i = 0; i < 0x1000; i++)
state->m_rombase.target()[i] = ROM[i ^ 0x1ff];
state->m_rombase[i] = ROM[i ^ 0x1ff];
machine.device("maincpu")->reset();

View File

@ -354,9 +354,9 @@ static SCREEN_UPDATE_IND16(fortecar)
{
int tile,color,bpp;
tile = (state->m_vram.target()[(count*4)+1] | (state->m_vram.target()[(count*4)+2]<<8)) & 0xfff;
color = state->m_vram.target()[(count*4)+3] & 0x1f;
bpp = (state->m_vram.target()[(count*4)+3] & 0x20) >> 5;
tile = (state->m_vram[(count*4)+1] | (state->m_vram[(count*4)+2]<<8)) & 0xfff;
color = state->m_vram[(count*4)+3] & 0x1f;
bpp = (state->m_vram[(count*4)+3] & 0x20) >> 5;
if(bpp)
color&=0x3;
@ -673,7 +673,7 @@ static MACHINE_RESET(fortecar)
/* apparently there's a random fill in there (checked thru trojan TODO: extract proper algorythm) */
for(i=0;i<state->m_vram.bytes();i++)
state->m_vram.target()[i] = machine.rand();
state->m_vram[i] = machine.rand();
}

View File

@ -1111,8 +1111,8 @@ static MACHINE_START( funkball )
kbdc8042_init(machine, &at8042);
/* defaults, otherwise it won't boot */
state->m_unk_ram.target()[0x010/4] = 0x2f8d85ff;
state->m_unk_ram.target()[0x018/4] = 0x000018c5;
state->m_unk_ram[0x010/4] = 0x2f8d85ff;
state->m_unk_ram[0x018/4] = 0x000018c5;
}
static MACHINE_RESET( funkball )

View File

@ -256,7 +256,7 @@ static NVRAM_HANDLER( gal3 )
{
for( i=0; i<state->m_nvmem.bytes()/4; i++ )
{
UINT32 dword = state->m_nvmem.target()[i];
UINT32 dword = state->m_nvmem[i];
data[0] = dword>>24;
data[1] = (dword&0x00ff0000)>>16;
data[2] = (dword&0x0000ff00)>>8;
@ -271,7 +271,7 @@ static NVRAM_HANDLER( gal3 )
for( i=0; i<state->m_nvmem.bytes()/4; i++ )
{
file->read( data, 4 );
state->m_nvmem.target()[i] = (data[0]<<24)|(data[1]<<16)|(data[2]<<8)|data[3];
state->m_nvmem[i] = (data[0]<<24)|(data[1]<<16)|(data[2]<<8)|data[3];
}
}
else
@ -343,17 +343,17 @@ READ32_MEMBER(gal3_state::rso_r)
Check @$009a==1 to start DEMO
HACK*/
offset *= 2;
return (m_rsoSharedRAM.target()[offset]<<16)|m_rsoSharedRAM.target()[offset+1];
return (m_rsoSharedRAM[offset]<<16)|m_rsoSharedRAM[offset+1];
}
WRITE32_MEMBER(gal3_state::rso_w)
{
UINT32 v;
offset *= 2;
v = (m_rsoSharedRAM.target()[offset]<<16)|m_rsoSharedRAM.target()[offset+1];
v = (m_rsoSharedRAM[offset]<<16)|m_rsoSharedRAM[offset+1];
COMBINE_DATA( &v );
m_rsoSharedRAM.target()[offset+0] = v>>16;
m_rsoSharedRAM.target()[offset+1] = v&0xffff;
m_rsoSharedRAM[offset+0] = v>>16;
m_rsoSharedRAM[offset+1] = v&0xffff;
}

View File

@ -96,65 +96,65 @@ public:
static TILE_GET_INFO( get_bg1_tile_info )
{
galaxi_state *state = machine.driver_data<galaxi_state>();
UINT16 code = state->m_bg1_ram.target()[tile_index];
UINT16 code = state->m_bg1_ram[tile_index];
SET_TILE_INFO(0, code, 0x10 + (code >> 12), 0);
}
static TILE_GET_INFO( get_bg2_tile_info )
{
galaxi_state *state = machine.driver_data<galaxi_state>();
UINT16 code = state->m_bg2_ram.target()[tile_index];
UINT16 code = state->m_bg2_ram[tile_index];
SET_TILE_INFO(0, code, 0x10 + (code >> 12), 0);
}
static TILE_GET_INFO( get_bg3_tile_info )
{
galaxi_state *state = machine.driver_data<galaxi_state>();
UINT16 code = state->m_bg3_ram.target()[tile_index];
UINT16 code = state->m_bg3_ram[tile_index];
SET_TILE_INFO(0, code, (code >> 12), 0);
}
static TILE_GET_INFO( get_bg4_tile_info )
{
galaxi_state *state = machine.driver_data<galaxi_state>();
UINT16 code = state->m_bg4_ram.target()[tile_index];
UINT16 code = state->m_bg4_ram[tile_index];
SET_TILE_INFO(0, code, (code >> 12), 0);
}
static TILE_GET_INFO( get_fg_tile_info )
{
galaxi_state *state = machine.driver_data<galaxi_state>();
UINT16 code = state->m_fg_ram.target()[tile_index];
UINT16 code = state->m_fg_ram[tile_index];
SET_TILE_INFO(1, code, 0x20 + (code >> 12), 0);
}
WRITE16_MEMBER(galaxi_state::galaxi_bg1_w)
{
COMBINE_DATA(&m_bg1_ram.target()[offset]);
COMBINE_DATA(&m_bg1_ram[offset]);
m_bg1_tmap->mark_tile_dirty(offset);
}
WRITE16_MEMBER(galaxi_state::galaxi_bg2_w)
{
COMBINE_DATA(&m_bg2_ram.target()[offset]);
COMBINE_DATA(&m_bg2_ram[offset]);
m_bg2_tmap->mark_tile_dirty(offset);
}
WRITE16_MEMBER(galaxi_state::galaxi_bg3_w)
{
COMBINE_DATA(&m_bg3_ram.target()[offset]);
COMBINE_DATA(&m_bg3_ram[offset]);
m_bg3_tmap->mark_tile_dirty(offset);
}
WRITE16_MEMBER(galaxi_state::galaxi_bg4_w)
{
COMBINE_DATA(&m_bg4_ram.target()[offset]);
COMBINE_DATA(&m_bg4_ram[offset]);
m_bg4_tmap->mark_tile_dirty(offset);
}
WRITE16_MEMBER(galaxi_state::galaxi_fg_w)
{
COMBINE_DATA(&m_fg_ram.target()[offset]);
COMBINE_DATA(&m_fg_ram[offset]);
m_fg_tmap->mark_tile_dirty(offset);
}

View File

@ -152,7 +152,7 @@ static SCREEN_UPDATE_IND16(gamecstl)
gamecstl_state *state = screen.machine().driver_data<gamecstl_state>();
int i, j;
const gfx_element *gfx = screen.machine().gfx[0];
UINT32 *cga = state->m_cga_ram.target();
UINT32 *cga = state->m_cga_ram;
int index = 0;
bitmap.fill(0, cliprect);

View File

@ -183,8 +183,8 @@ static SCREEN_UPDATE_IND16(go2000)
{
for (y = 0; y < 32; y++)
{
int tile = state->m_videoram.target()[count];
int attr = state->m_videoram2.target()[count];
int tile = state->m_videoram[count];
int attr = state->m_videoram2[count];
drawgfx_opaque(bitmap, cliprect, screen.machine().gfx[0], tile, attr, 0, 0, x * 8, y * 8);
count++;
}
@ -195,8 +195,8 @@ static SCREEN_UPDATE_IND16(go2000)
{
for (y = 0; y < 32; y++)
{
int tile = state->m_videoram.target()[count];
int attr = state->m_videoram2.target()[count];
int tile = state->m_videoram[count];
int attr = state->m_videoram2[count];
drawgfx_transpen(bitmap, cliprect, screen.machine().gfx[0], tile, attr, 0, 0, x * 8, y * 8, 0xf);
count++;
}
@ -217,9 +217,9 @@ static SCREEN_UPDATE_IND16(go2000)
int dx, dy;
int flipx, y0;
int y = state->m_videoram.target()[offs + 0 + 0x00000 / 2];
int x = state->m_videoram.target()[offs + 1 + 0x00000 / 2];
int dim = state->m_videoram2.target()[offs + 0 + 0x00000 / 2];
int y = state->m_videoram[offs + 0 + 0x00000 / 2];
int x = state->m_videoram[offs + 1 + 0x00000 / 2];
int dim = state->m_videoram2[offs + 0 + 0x00000 / 2];
int bank = (x >> 12) & 0xf;
@ -268,8 +268,8 @@ static SCREEN_UPDATE_IND16(go2000)
for (dx = 0; dx < dimx * 8; dx += 8)
{
int addr = (srcpg * 0x20 * 0x20) + ((srcx + tile_x) & 0x1f) * 0x20 + ((srcy + tile_y) & 0x1f);
int tile = state->m_videoram.target()[addr + 0x00000 / 2];
int attr = state->m_videoram2.target()[addr + 0x00000 / 2];
int tile = state->m_videoram[addr + 0x00000 / 2];
int attr = state->m_videoram2[addr + 0x00000 / 2];
int sx = x + dx;
int sy = (y + dy) & 0xff;

View File

@ -264,7 +264,8 @@ static SCREEN_UPDATE_IND16( goldngam )
int x, y;
UINT8 *tmp = (UINT8 *) state->m_videoram.target();
// ERROR: This cast is NOT endian-safe without the use of BYTE/WORD/DWORD_XOR_* macros!
UINT8 *tmp = reinterpret_cast<UINT8 *>(state->m_videoram.target());
int index = 0;
for(y = 0; y < 512; ++y)

View File

@ -980,13 +980,13 @@ public:
WRITE8_MEMBER(goldnpkr_state::goldnpkr_videoram_w)
{
m_videoram.target()[offset] = data;
m_videoram[offset] = data;
m_bg_tilemap->mark_tile_dirty(offset);
}
WRITE8_MEMBER(goldnpkr_state::goldnpkr_colorram_w)
{
m_colorram.target()[offset] = data;
m_colorram[offset] = data;
m_bg_tilemap->mark_tile_dirty(offset);
}
@ -1001,8 +1001,8 @@ static TILE_GET_INFO( get_bg_tile_info )
xx-- ---- unused.
*/
int attr = state->m_colorram.target()[tile_index];
int code = ((attr & 1) << 8) | state->m_videoram.target()[tile_index];
int attr = state->m_colorram[tile_index];
int code = ((attr & 1) << 8) | state->m_videoram[tile_index];
int bank = (attr & 0x02) >> 1; /* bit 1 switch the gfx banks */
int color = (attr & 0x3c) >> 2; /* bits 2-3-4-5 for color */
@ -1020,8 +1020,8 @@ static TILE_GET_INFO( wcrdxtnd_get_bg_tile_info )
xx-- --xx tiles bank.
*/
int attr = state->m_colorram.target()[tile_index];
int code = ((attr & 1) << 8) | state->m_videoram.target()[tile_index];
int attr = state->m_colorram[tile_index];
int code = ((attr & 1) << 8) | state->m_videoram[tile_index];
int bank = (attr & 0x03) + ((attr & 0xc0) >> 4); /* bits 0, 1, 6 & 7 switch the gfx banks */
int color = (attr & 0x3c) >> 2; /* bits 2-3-4-5 for color */

View File

@ -59,29 +59,29 @@ public:
WRITE16_MEMBER(good_state::fg_tilemapram_w)
{
COMBINE_DATA(&m_fg_tilemapram.target()[offset]);
COMBINE_DATA(&m_fg_tilemapram[offset]);
m_fg_tilemap->mark_tile_dirty(offset / 2);
}
static TILE_GET_INFO( get_fg_tile_info )
{
good_state *state = machine.driver_data<good_state>();
int tileno = state->m_fg_tilemapram.target()[tile_index * 2];
int attr = state->m_fg_tilemapram.target()[tile_index * 2 + 1] & 0xf;
int tileno = state->m_fg_tilemapram[tile_index * 2];
int attr = state->m_fg_tilemapram[tile_index * 2 + 1] & 0xf;
SET_TILE_INFO(0, tileno, attr, 0);
}
WRITE16_MEMBER(good_state::bg_tilemapram_w)
{
COMBINE_DATA(&m_bg_tilemapram.target()[offset]);
COMBINE_DATA(&m_bg_tilemapram[offset]);
m_bg_tilemap->mark_tile_dirty(offset / 2);
}
static TILE_GET_INFO( get_bg_tile_info )
{
good_state *state = machine.driver_data<good_state>();
int tileno = state->m_bg_tilemapram.target()[tile_index * 2];
int attr = state->m_bg_tilemapram.target()[tile_index * 2 + 1] & 0xf;
int tileno = state->m_bg_tilemapram[tile_index * 2];
int attr = state->m_bg_tilemapram[tile_index * 2 + 1] & 0xf;
SET_TILE_INFO(1, tileno, attr, 0);
}

View File

@ -92,7 +92,7 @@ static void gpworld_draw_tiles(running_machine &machine, bitmap_ind16 &bitmap,co
{
int current_screen_character = (characterY*64) + characterX;
drawgfx_transpen(bitmap, cliprect, machine.gfx[0], state->m_tile_RAM.target()[current_screen_character],
drawgfx_transpen(bitmap, cliprect, machine.gfx[0], state->m_tile_RAM[current_screen_character],
characterY, 0, 0, characterX*8, characterY*8, 0);
}
}
@ -278,15 +278,15 @@ WRITE8_MEMBER(gpworld_state::palette_write)
/* This is all just a (bad) guess */
int pal_index, r, g, b, a;
m_palette_RAM.target()[offset] = data;
m_palette_RAM[offset] = data;
/* "Round down" to the nearest palette entry */
pal_index = offset & 0xffe;
g = (m_palette_RAM.target()[pal_index] & 0xf0) << 0;
b = (m_palette_RAM.target()[pal_index] & 0x0f) << 4;
r = (m_palette_RAM.target()[pal_index+1] & 0x0f) << 4;
a = (m_palette_RAM.target()[pal_index+1] & 0x80) ? 0 : 255; /* guess */
g = (m_palette_RAM[pal_index] & 0xf0) << 0;
b = (m_palette_RAM[pal_index] & 0x0f) << 4;
r = (m_palette_RAM[pal_index+1] & 0x0f) << 4;
a = (m_palette_RAM[pal_index+1] & 0x80) ? 0 : 255; /* guess */
/* logerror("PAL WRITE index : %x rgb : %d %d %d (real %x) at %x\n", pal_index, r,g,b, data, offset); */

View File

@ -211,21 +211,21 @@ CUSTOM_INPUT_MEMBER(gstream_state::gstream_mirror_r)
WRITE32_MEMBER(gstream_state::gstream_palette_w)
{
COMBINE_DATA(&m_paletteram.target()[offset]);
COMBINE_DATA(&m_paletteram[offset]);
palette_set_color_rgb(machine(), offset * 2, pal5bit(m_paletteram.target()[offset] >> (0 + 16)),
pal5bit(m_paletteram.target()[offset] >> (6 + 16)),
pal5bit(m_paletteram.target()[offset] >> (11 + 16)));
palette_set_color_rgb(machine(), offset * 2, pal5bit(m_paletteram[offset] >> (0 + 16)),
pal5bit(m_paletteram[offset] >> (6 + 16)),
pal5bit(m_paletteram[offset] >> (11 + 16)));
palette_set_color_rgb(machine(),offset * 2 + 1,pal5bit(m_paletteram.target()[offset] >> (0)),
pal5bit(m_paletteram.target()[offset] >> (6)),
pal5bit(m_paletteram.target()[offset] >> (11)));
palette_set_color_rgb(machine(),offset * 2 + 1,pal5bit(m_paletteram[offset] >> (0)),
pal5bit(m_paletteram[offset] >> (6)),
pal5bit(m_paletteram[offset] >> (11)));
}
WRITE32_MEMBER(gstream_state::gstream_vram_w)
{
COMBINE_DATA(&m_vram.target()[offset]);
COMBINE_DATA(&m_vram[offset]);
if (ACCESSING_BITS_24_31)
{
@ -447,16 +447,16 @@ GFXDECODE_END
static TILE_GET_INFO( get_gs1_tile_info )
{
gstream_state *state = machine.driver_data<gstream_state>();
int tileno = (state->m_vram.target()[tile_index + 0x000 / 4] & 0x0fff0000) >> 16;
int palette = (state->m_vram.target()[tile_index + 0x000 / 4] & 0xc0000000) >> 30;
int tileno = (state->m_vram[tile_index + 0x000 / 4] & 0x0fff0000) >> 16;
int palette = (state->m_vram[tile_index + 0x000 / 4] & 0xc0000000) >> 30;
SET_TILE_INFO(0, tileno, palette + 0x10, 0);
}
static TILE_GET_INFO( get_gs2_tile_info )
{
gstream_state *state = machine.driver_data<gstream_state>();
int tileno = (state->m_vram.target()[tile_index + 0x400 / 4] & 0x0fff0000) >> 16;
int palette = (state->m_vram.target()[tile_index + 0x400 / 4] & 0xc0000000) >> 30;
int tileno = (state->m_vram[tile_index + 0x400 / 4] & 0x0fff0000) >> 16;
int palette = (state->m_vram[tile_index + 0x400 / 4] & 0xc0000000) >> 30;
SET_TILE_INFO(0, tileno + 0x1000, palette + 0x14, 0);
}
@ -464,8 +464,8 @@ static TILE_GET_INFO( get_gs2_tile_info )
static TILE_GET_INFO( get_gs3_tile_info )
{
gstream_state *state = machine.driver_data<gstream_state>();
int tileno = (state->m_vram.target()[tile_index + 0x800 / 4] & 0x0fff0000) >> 16;
int palette = (state->m_vram.target()[tile_index + 0x800 / 4] & 0xc0000000) >> 30;
int tileno = (state->m_vram[tile_index + 0x800 / 4] & 0x0fff0000) >> 16;
int palette = (state->m_vram[tile_index + 0x800 / 4] & 0xc0000000) >> 30;
SET_TILE_INFO(0, tileno + 0x2000, palette + 0x18, 0);
}
@ -518,10 +518,10 @@ static SCREEN_UPDATE_IND16(gstream)
for (i = 0x0000 / 4; i < 0x4000 / 4; i += 4)
{
/* Upper bits are used by the tilemaps */
int code = state->m_vram.target()[i + 0] & 0xffff;
int x = state->m_vram.target()[i + 1] & 0xffff;
int y = state->m_vram.target()[i + 2] & 0xffff;
int col = state->m_vram.target()[i + 3] & 0x1f;
int code = state->m_vram[i + 0] & 0xffff;
int x = state->m_vram[i + 1] & 0xffff;
int y = state->m_vram[i + 2] & 0xffff;
int col = state->m_vram[i + 3] & 0x1f;
/* co-ordinates are signed */
if (x & 0x8000) x -= 0x10000;
@ -642,7 +642,7 @@ READ32_MEMBER(gstream_state::gstream_speedup_r)
m_maincpu->eat_cycles(50);
}
return m_workram.target()[0xd1ee0 / 4];
return m_workram[0xd1ee0 / 4];
}
static DRIVER_INIT( gstream )

View File

@ -411,7 +411,7 @@ static MACHINE_START( gticlub )
ppcdrc_set_options(machine.device("maincpu"), PPCDRC_COMPATIBLE_OPTIONS);
/* configure fast RAM regions for DRC */
ppcdrc_add_fastram(machine.device("maincpu"), 0x00000000, 0x000fffff, FALSE, state->m_work_ram.target());
ppcdrc_add_fastram(machine.device("maincpu"), 0x00000000, 0x000fffff, FALSE, state->m_work_ram);
}
static ADDRESS_MAP_START( gticlub_map, AS_PROGRAM, 32, gticlub_state )

View File

@ -1027,7 +1027,7 @@ READ8_MEMBER(halleys_state::blitter_r)
if (i==0 || i==4) return(1);
return(m_blitter_ram.target()[offset]);
return(m_blitter_ram[offset]);
}
@ -1042,7 +1042,7 @@ WRITE8_MEMBER(halleys_state::blitter_w)
{
int i = offset & 0xf;
m_blitter_ram.target()[offset] = data;
m_blitter_ram[offset] = data;
if (i==0) blit(offset);
@ -1093,7 +1093,7 @@ READ8_MEMBER(halleys_state::collision_id_r)
return(0);
}
return(m_io_ram.target()[0x66]);
return(m_io_ram[0x66]);
}
@ -1496,9 +1496,9 @@ static SCREEN_UPDATE_IND16( halleys )
copy_fixed_xp (bitmap, state->m_render_layer[0]);
// HALF-HACK: apply RGB filter when the following conditions are met
i = state->m_io_ram.target()[0xa0];
j = state->m_io_ram.target()[0xa1];
if (state->m_io_ram.target()[0x2b] && (i>0xc6 && i<0xfe) && (j==0xc0 || j==0xed)) filter_bitmap(screen.machine(), bitmap, i);
i = state->m_io_ram[0xa0];
j = state->m_io_ram[0xa1];
if (state->m_io_ram[0x2b] && (i>0xc6 && i<0xfe) && (j==0xc0 || j==0xed)) filter_bitmap(screen.machine(), bitmap, i);
return 0;
}
@ -1506,7 +1506,7 @@ static SCREEN_UPDATE_IND16( halleys )
static SCREEN_UPDATE_IND16( benberob )
{
halleys_state *state = screen.machine().driver_data<halleys_state>();
if (state->m_io_ram.target()[0xa0] & 0x80)
if (state->m_io_ram[0xa0] & 0x80)
copy_scroll_op(bitmap, state->m_render_layer[2], *state->m_scrollx1, *state->m_scrolly1);
else
bitmap.fill(state->m_bgcolor, cliprect);
@ -1526,7 +1526,7 @@ READ8_MEMBER(halleys_state::zero_r){ return(0); }
READ8_MEMBER(halleys_state::debug_r)
{
return(m_io_ram.target()[offset]);
return(m_io_ram[offset]);
}
#endif
@ -1598,7 +1598,7 @@ READ8_MEMBER(halleys_state::vector_r)
WRITE8_MEMBER(halleys_state::firq_ack_w)
{
m_io_ram.target()[0x9c] = data;
m_io_ram[0x9c] = data;
if (m_firq_level) m_firq_level--;
cputag_set_input_line(machine(), "maincpu", M6809_FIRQ_LINE, CLEAR_LINE);
@ -1615,7 +1615,7 @@ static WRITE8_DEVICE_HANDLER( sndnmi_msk_w )
WRITE8_MEMBER(halleys_state::soundcommand_w)
{
m_io_ram.target()[0x8a] = data;
m_io_ram[0x8a] = data;
soundlatch_byte_w(space,offset,data);
cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE);
}
@ -1937,7 +1937,7 @@ static MACHINE_RESET( halleys )
state->m_bgcolor = get_black_pen(machine);
state->m_fftail = state->m_ffhead = state->m_ffcount = 0;
memset(state->m_io_ram.target(), 0xff, state->m_io_ram.bytes());
memset(state->m_io_ram, 0xff, state->m_io_ram.bytes());
memset(state->m_render_layer[0], 0, SCREEN_BYTESIZE * MAX_LAYERS);
}

View File

@ -141,12 +141,12 @@ static SCREEN_UPDATE_RGB32(tourvisn)
{
UINT32 color;
color = ((state->m_blit_ram.target()[count]) & 0x00ff)>>0;
color = ((state->m_blit_ram[count]) & 0x00ff)>>0;
if(cliprect.contains((x*2)+0, y))
bitmap.pix32(y, (x*2)+0) = screen.machine().pens[color];
color = ((state->m_blit_ram.target()[count]) & 0xff00)>>8;
color = ((state->m_blit_ram[count]) & 0xff00)>>8;
if(cliprect.contains((x*2)+1, y))
bitmap.pix32(y, (x*2)+1) = screen.machine().pens[color];
@ -175,7 +175,7 @@ static SCREEN_UPDATE_RGB32(brasil)
UINT32 g;
UINT32 r;
color = (state->m_blit_ram.target()[count]) & 0xffff;
color = (state->m_blit_ram[count]) & 0xffff;
b = (color & 0x001f) << 3;
g = (color & 0x07e0) >> 3;

View File

@ -129,7 +129,7 @@ WRITE8_MEMBER(hitpoker_state::hitpoker_vram_w)
{
// UINT8 *ROM = machine().region("maincpu")->base();
// if(m_sys_regs.target()[0x00] & 0x10)
// if(m_sys_regs[0x00] & 0x10)
m_videoram[offset] = data;
}
@ -221,7 +221,7 @@ READ8_MEMBER(hitpoker_state::hitpoker_pic_r)
return (m_pic_data & 0x7f) | (m_pic_data & 0x40 ? 0x80 : 0x00);
}
return m_sys_regs.target()[offset];
return m_sys_regs[offset];
}
WRITE8_MEMBER(hitpoker_state::hitpoker_pic_w)
@ -229,7 +229,7 @@ WRITE8_MEMBER(hitpoker_state::hitpoker_pic_w)
if(offset == 0)
m_pic_data = (data & 0xff);// | (data & 0x40) ? 0x80 : 0x00;
// logerror("%02x W\n",data);
m_sys_regs.target()[offset] = data;
m_sys_regs[offset] = data;
}
#if 0

View File

@ -79,7 +79,7 @@ READ8_MEMBER(hotblock_state::hotblock_video_read)
}
else // port 0 = 88 c8
{
return m_vram.target()[offset];
return m_vram[offset];
}
}
@ -117,7 +117,7 @@ WRITE8_MEMBER(hotblock_state::hotblock_video_write)
}
else // port 0 = 88 c8
{
m_vram.target()[offset] = data;
m_vram[offset] = data;
}
}
@ -163,7 +163,7 @@ static SCREEN_UPDATE_IND16(hotblock)
for(x = 0; x < xxx; x++)
{
if (state->m_port0 & 0x40)
bitmap.pix16(y, x) = state->m_vram.target()[count];
bitmap.pix16(y, x) = state->m_vram[count];
count++;
}
}

View File

@ -46,7 +46,7 @@ SCREEN_UPDATE_RGB32( hotstuff )
for (p=0;p<0x10;p++)
{
row_palette_data[p] = state->m_bitmapram.target()[count+p];
row_palette_data[p] = state->m_bitmapram[count+p];
row_palette_data_as_rgb32_pen_data[p] = MAKE_RGB( (row_palette_data[p] & 0x0f00)>>4, (row_palette_data[p] & 0x00f0)>>0, (row_palette_data[p] & 0x000f)<<4 );
@ -55,13 +55,13 @@ SCREEN_UPDATE_RGB32( hotstuff )
for(x = 0; x < xxx; x++)
{
{
bitmap.pix32(y, x) = row_palette_data_as_rgb32_pen_data[(state->m_bitmapram.target()[count] &0xf000)>>12];
bitmap.pix32(y, x) = row_palette_data_as_rgb32_pen_data[(state->m_bitmapram[count] &0xf000)>>12];
x++;
bitmap.pix32(y, x) = row_palette_data_as_rgb32_pen_data[(state->m_bitmapram.target()[count] &0x0f00)>>8];
bitmap.pix32(y, x) = row_palette_data_as_rgb32_pen_data[(state->m_bitmapram[count] &0x0f00)>>8];
x++;
bitmap.pix32(y, x) = row_palette_data_as_rgb32_pen_data[(state->m_bitmapram.target()[count] &0x00f0)>>4];
bitmap.pix32(y, x) = row_palette_data_as_rgb32_pen_data[(state->m_bitmapram[count] &0x00f0)>>4];
x++;
bitmap.pix32(y, x) = row_palette_data_as_rgb32_pen_data[(state->m_bitmapram.target()[count] &0x000f)>>0];
bitmap.pix32(y, x) = row_palette_data_as_rgb32_pen_data[(state->m_bitmapram[count] &0x000f)>>0];
}
count++;

View File

@ -164,8 +164,8 @@ static TILE_GET_INFO( get_bg_tile_info )
{
hvyunit_state *state = machine.driver_data<hvyunit_state>();
int attr = state->m_colorram.target()[tile_index];
int code = state->m_videoram.target()[tile_index] + ((attr & 0x0f) << 8);
int attr = state->m_colorram[tile_index];
int code = state->m_videoram[tile_index] + ((attr & 0x0f) << 8);
int color = (attr >> 4);
SET_TILE_INFO(1, code, color, 0);
@ -261,14 +261,14 @@ WRITE8_MEMBER(hvyunit_state::trigger_nmi_on_sound_cpu2)
WRITE8_MEMBER(hvyunit_state::hu_videoram_w)
{
m_videoram.target()[offset] = data;
m_videoram[offset] = data;
m_bg_tilemap->mark_tile_dirty(offset);
}
WRITE8_MEMBER(hvyunit_state::hu_colorram_w)
{
m_colorram.target()[offset] = data;
m_colorram[offset] = data;
m_bg_tilemap->mark_tile_dirty(offset);
}

View File

@ -80,14 +80,14 @@ public:
WRITE8_MEMBER(igs009_state::gp98_reel1_ram_w)
{
m_gp98_reel1_ram.target()[offset] = data;
m_gp98_reel1_ram[offset] = data;
m_gp98_reel1_tilemap->mark_tile_dirty(offset);
}
static TILE_GET_INFO( get_jingbell_reel1_tile_info )
{
igs009_state *state = machine.driver_data<igs009_state>();
int code = state->m_gp98_reel1_ram.target()[tile_index];
int code = state->m_gp98_reel1_ram[tile_index];
SET_TILE_INFO(
0,
@ -100,7 +100,7 @@ static TILE_GET_INFO( get_jingbell_reel1_tile_info )
static TILE_GET_INFO( get_gp98_reel1_tile_info )
{
igs009_state *state = machine.driver_data<igs009_state>();
int code = state->m_gp98_reel1_ram.target()[tile_index];
int code = state->m_gp98_reel1_ram[tile_index];
SET_TILE_INFO(
0,
@ -112,14 +112,14 @@ static TILE_GET_INFO( get_gp98_reel1_tile_info )
WRITE8_MEMBER(igs009_state::gp98_reel2_ram_w)
{
m_gp98_reel2_ram.target()[offset] = data;
m_gp98_reel2_ram[offset] = data;
m_gp98_reel2_tilemap->mark_tile_dirty(offset);
}
static TILE_GET_INFO( get_jingbell_reel2_tile_info )
{
igs009_state *state = machine.driver_data<igs009_state>();
int code = state->m_gp98_reel2_ram.target()[tile_index];
int code = state->m_gp98_reel2_ram[tile_index];
SET_TILE_INFO(
0,
@ -131,7 +131,7 @@ static TILE_GET_INFO( get_jingbell_reel2_tile_info )
static TILE_GET_INFO( get_gp98_reel2_tile_info )
{
igs009_state *state = machine.driver_data<igs009_state>();
int code = state->m_gp98_reel2_ram.target()[tile_index];
int code = state->m_gp98_reel2_ram[tile_index];
SET_TILE_INFO(
0,
@ -144,14 +144,14 @@ static TILE_GET_INFO( get_gp98_reel2_tile_info )
WRITE8_MEMBER(igs009_state::gp98_reel3_ram_w)
{
m_gp98_reel3_ram.target()[offset] = data;
m_gp98_reel3_ram[offset] = data;
m_gp98_reel3_tilemap->mark_tile_dirty(offset);
}
static TILE_GET_INFO( get_jingbell_reel3_tile_info )
{
igs009_state *state = machine.driver_data<igs009_state>();
int code = state->m_gp98_reel3_ram.target()[tile_index];
int code = state->m_gp98_reel3_ram[tile_index];
SET_TILE_INFO(
0,
@ -163,7 +163,7 @@ static TILE_GET_INFO( get_jingbell_reel3_tile_info )
static TILE_GET_INFO( get_gp98_reel3_tile_info )
{
igs009_state *state = machine.driver_data<igs009_state>();
int code = state->m_gp98_reel3_ram.target()[tile_index];
int code = state->m_gp98_reel3_ram[tile_index];
SET_TILE_INFO(
0,
@ -176,14 +176,14 @@ static TILE_GET_INFO( get_gp98_reel3_tile_info )
WRITE8_MEMBER(igs009_state::gp98_reel4_ram_w)
{
m_gp98_reel4_ram.target()[offset] = data;
m_gp98_reel4_ram[offset] = data;
m_gp98_reel4_tilemap->mark_tile_dirty(offset);
}
static TILE_GET_INFO( get_jingbell_reel4_tile_info )
{
igs009_state *state = machine.driver_data<igs009_state>();
int code = state->m_gp98_reel4_ram.target()[tile_index];
int code = state->m_gp98_reel4_ram[tile_index];
SET_TILE_INFO(
0,
@ -195,7 +195,7 @@ static TILE_GET_INFO( get_jingbell_reel4_tile_info )
static TILE_GET_INFO( get_gp98_reel4_tile_info )
{
igs009_state *state = machine.driver_data<igs009_state>();
int code = state->m_gp98_reel4_ram.target()[tile_index];
int code = state->m_gp98_reel4_ram[tile_index];
SET_TILE_INFO(
0,
@ -212,7 +212,7 @@ static TILE_GET_INFO( get_gp98_reel4_tile_info )
WRITE8_MEMBER(igs009_state::bg_scroll_w)
{
m_bg_scroll.target()[offset] = data;
m_bg_scroll[offset] = data;
// bg_tilemap->set_scrolly(offset,data);
}
@ -220,19 +220,19 @@ WRITE8_MEMBER(igs009_state::bg_scroll_w)
static TILE_GET_INFO( get_fg_tile_info )
{
igs009_state *state = machine.driver_data<igs009_state>();
int code = state->m_fg_tile_ram.target()[tile_index] | (state->m_fg_color_ram.target()[tile_index] << 8);
int code = state->m_fg_tile_ram[tile_index] | (state->m_fg_color_ram[tile_index] << 8);
SET_TILE_INFO(1, code, (4*(code >> 14)+3), 0);
}
WRITE8_MEMBER(igs009_state::fg_tile_w)
{
m_fg_tile_ram.target()[offset] = data;
m_fg_tile_ram[offset] = data;
m_fg_tilemap->mark_tile_dirty(offset);
}
WRITE8_MEMBER(igs009_state::fg_color_w)
{
m_fg_color_ram.target()[offset] = data;
m_fg_color_ram[offset] = data;
m_fg_tilemap->mark_tile_dirty(offset);
}
@ -298,10 +298,10 @@ static SCREEN_UPDATE_IND16(jingbell)
for (i= 0;i < 0x80;i++)
{
state->m_gp98_reel1_tilemap->set_scrolly(i, state->m_bg_scroll.target()[i]*2);
state->m_gp98_reel2_tilemap->set_scrolly(i, state->m_bg_scroll.target()[i+0x80]*2);
state->m_gp98_reel3_tilemap->set_scrolly(i, state->m_bg_scroll.target()[i+0x100]*2);
state->m_gp98_reel4_tilemap->set_scrolly(i, state->m_bg_scroll.target()[i+0x180]*2);
state->m_gp98_reel1_tilemap->set_scrolly(i, state->m_bg_scroll[i]*2);
state->m_gp98_reel2_tilemap->set_scrolly(i, state->m_bg_scroll[i+0x80]*2);
state->m_gp98_reel3_tilemap->set_scrolly(i, state->m_bg_scroll[i+0x100]*2);
state->m_gp98_reel4_tilemap->set_scrolly(i, state->m_bg_scroll[i+0x180]*2);
}
@ -310,7 +310,7 @@ static SCREEN_UPDATE_IND16(jingbell)
for (zz=0;zz<0x80-8;zz++) // -8 because of visible area (2*8 = 16)
{
rectangle clip;
int rowenable = state->m_bg_scroll2.target()[zz];
int rowenable = state->m_bg_scroll2[zz];
/* draw top of screen */
clip.set(visarea.min_x, visarea.max_x, startclipmin, startclipmin+2);

View File

@ -249,7 +249,7 @@ static SCREEN_UPDATE_IND16( igs011 )
}
#endif
pri_ram = &state->m_priority_ram.target()[(state->m_priority & 7) * 512/2];
pri_ram = &state->m_priority_ram[(state->m_priority & 7) * 512/2];
for (y = cliprect.min_y; y <= cliprect.max_y; y++)
{
@ -2407,8 +2407,8 @@ static SCREEN_VBLANK( vbowl )
if (vblank_on)
{
igs011_state *state = screen.machine().driver_data<igs011_state>();
state->m_vbowl_trackball.target()[0] = state->m_vbowl_trackball.target()[1];
state->m_vbowl_trackball.target()[1] = (input_port_read(screen.machine(), "AN1") << 8) | input_port_read(screen.machine(), "AN0");
state->m_vbowl_trackball[0] = state->m_vbowl_trackball[1];
state->m_vbowl_trackball[1] = (input_port_read(screen.machine(), "AN1") << 8) | input_port_read(screen.machine(), "AN0");
}
}

View File

@ -156,27 +156,27 @@ static VIDEO_RESET( igs017 )
static TILE_GET_INFO( get_fg_tile_info )
{
igs017_state *state = machine.driver_data<igs017_state>();
int code = state->m_fg_videoram.target()[tile_index*4+0] + (state->m_fg_videoram.target()[tile_index*4+1] << 8);
int attr = state->m_fg_videoram.target()[tile_index*4+2] + (state->m_fg_videoram.target()[tile_index*4+3] << 8);
int code = state->m_fg_videoram[tile_index*4+0] + (state->m_fg_videoram[tile_index*4+1] << 8);
int attr = state->m_fg_videoram[tile_index*4+2] + (state->m_fg_videoram[tile_index*4+3] << 8);
SET_TILE_INFO(0, code, COLOR(attr), TILE_FLIPXY( attr >> 5 ));
}
static TILE_GET_INFO( get_bg_tile_info )
{
igs017_state *state = machine.driver_data<igs017_state>();
int code = state->m_bg_videoram.target()[tile_index*4+0] + (state->m_bg_videoram.target()[tile_index*4+1] << 8);
int attr = state->m_bg_videoram.target()[tile_index*4+2] + (state->m_bg_videoram.target()[tile_index*4+3] << 8);
int code = state->m_bg_videoram[tile_index*4+0] + (state->m_bg_videoram[tile_index*4+1] << 8);
int attr = state->m_bg_videoram[tile_index*4+2] + (state->m_bg_videoram[tile_index*4+3] << 8);
SET_TILE_INFO(0, code, COLOR(attr)+8, TILE_FLIPXY( attr >> 5 ));
}
WRITE8_MEMBER(igs017_state::fg_w)
{
m_fg_videoram.target()[offset] = data;
m_fg_videoram[offset] = data;
m_fg_tilemap->mark_tile_dirty(offset/4);
}
WRITE8_MEMBER(igs017_state::bg_w)
{
m_bg_videoram.target()[offset] = data;
m_bg_videoram[offset] = data;
m_bg_tilemap->mark_tile_dirty(offset/4);
}
@ -184,7 +184,7 @@ WRITE8_MEMBER(igs017_state::bg_w)
READ16_MEMBER(igs017_state::fg_lsb_r)
{
return m_fg_videoram.target()[offset];
return m_fg_videoram[offset];
}
WRITE16_MEMBER(igs017_state::fg_lsb_w)
{
@ -194,7 +194,7 @@ WRITE16_MEMBER(igs017_state::fg_lsb_w)
READ16_MEMBER(igs017_state::bg_lsb_r)
{
return m_bg_videoram.target()[offset];
return m_bg_videoram[offset];
}
WRITE16_MEMBER(igs017_state::bg_lsb_w)
{
@ -204,12 +204,12 @@ WRITE16_MEMBER(igs017_state::bg_lsb_w)
READ16_MEMBER(igs017_state::spriteram_lsb_r)
{
return m_spriteram.target()[offset];
return m_spriteram[offset];
}
WRITE16_MEMBER(igs017_state::spriteram_lsb_w)
{
if (ACCESSING_BITS_0_7)
m_spriteram.target()[offset] = data;
m_spriteram[offset] = data;
}
@ -306,7 +306,7 @@ static void draw_sprite(running_machine &machine, bitmap_ind16 &bitmap,const rec
static void draw_sprites(running_machine &machine, bitmap_ind16 &bitmap,const rectangle &cliprect)
{
igs017_state *state = machine.driver_data<igs017_state>();
UINT8 *s = state->m_spriteram.target();
UINT8 *s = state->m_spriteram;
UINT8 *end = state->m_spriteram + 0x800;
for ( ; s < end; s += 8 )

View File

@ -63,9 +63,9 @@ public:
/* CGLayer */
WRITE32_MEMBER(igs_m027_state::igs_cg_videoram_w)
{
COMBINE_DATA(&m_igs_cg_videoram.target()[offset]);
COMBINE_DATA(&m_igs_cg_videoram[offset]);
//if(data!=0)
logerror("PC(%08X) CG @%x = %x!\n",cpu_get_pc(&space.device()),offset ,m_igs_cg_videoram.target()[offset]);
logerror("PC(%08X) CG @%x = %x!\n",cpu_get_pc(&space.device()),offset ,m_igs_cg_videoram[offset]);
@ -106,10 +106,10 @@ WRITE32_MEMBER(igs_m027_state::igs_cg_videoram_w)
/* TX Layer */
WRITE32_MEMBER(igs_m027_state::igs_tx_videoram_w)
{
COMBINE_DATA(&m_igs_tx_videoram.target()[offset]);
COMBINE_DATA(&m_igs_tx_videoram[offset]);
m_igs_tx_tilemap->mark_tile_dirty(offset);
//if(data!=0)
//logerror( "TX VIDEO RAM OFFSET %x ,data %x!\n",offset ,m_igs_tx_videoram.target()[offset]);
//logerror( "TX VIDEO RAM OFFSET %x ,data %x!\n",offset ,m_igs_tx_videoram[offset]);
}
static TILE_GET_INFO( get_tx_tilemap_tile_info )
@ -117,8 +117,8 @@ static TILE_GET_INFO( get_tx_tilemap_tile_info )
igs_m027_state *state = machine.driver_data<igs_m027_state>();
//ppppppppNNNNNNNN
int tileno,colour;
tileno = state->m_igs_tx_videoram.target()[tile_index] & 0xffff;
colour = (state->m_igs_tx_videoram.target()[tile_index]>>0x10) & 0xffff;
tileno = state->m_igs_tx_videoram[tile_index] & 0xffff;
colour = (state->m_igs_tx_videoram[tile_index]>>0x10) & 0xffff;
SET_TILE_INFO(0,tileno,colour,0);
}
@ -126,10 +126,10 @@ static TILE_GET_INFO( get_tx_tilemap_tile_info )
/* BG Layer */
WRITE32_MEMBER(igs_m027_state::igs_bg_videoram_w)
{
COMBINE_DATA(&m_igs_bg_videoram.target()[offset]);
COMBINE_DATA(&m_igs_bg_videoram[offset]);
m_igs_bg_tilemap->mark_tile_dirty(offset);
//if(data!=0)
logerror("BG VIDEO RAM OFFSET %x ,data %x!\n",offset ,m_igs_bg_videoram.target()[offset]);
logerror("BG VIDEO RAM OFFSET %x ,data %x!\n",offset ,m_igs_bg_videoram[offset]);
}
static TILE_GET_INFO( get_bg_tilemap_tile_info )
@ -137,8 +137,8 @@ static TILE_GET_INFO( get_bg_tilemap_tile_info )
igs_m027_state *state = machine.driver_data<igs_m027_state>();
//ppppppppNNNNNNNN
int tileno,colour;
tileno = state->m_igs_bg_videoram.target()[tile_index] & 0xffff;
colour = (state->m_igs_bg_videoram.target()[tile_index]>>0x10) & 0xffff;
tileno = state->m_igs_bg_videoram[tile_index] & 0xffff;
colour = (state->m_igs_bg_videoram[tile_index]>>0x10) & 0xffff;
SET_TILE_INFO(0,tileno,colour,0);
}
@ -147,12 +147,12 @@ static TILE_GET_INFO( get_bg_tilemap_tile_info )
/* Palette Layer */
WRITE32_MEMBER(igs_m027_state::igs_palette32_w)
{
m_generic_paletteram_16.set_target((UINT16 *)m_igs_palette32.target(), 0x800);
COMBINE_DATA(&m_igs_palette32.target()[offset]);
m_generic_paletteram_16.set_target(reinterpret_cast<UINT16 *>(m_igs_palette32.target()), 0x800);
COMBINE_DATA(&m_igs_palette32[offset]);
//paletteram_xGGGGGRRRRRBBBBB_word_w(offset*2,m_generic_paletteram_16[offset*2],0);
//paletteram_xGGGGGRRRRRBBBBB_word_w(offset*2+1,m_generic_paletteram_16[offset*2+1],0);
//if(data!=0)
//fprintf(stdout,"PALETTE RAM OFFSET %x ,data %x!\n",offset ,m_igs_palette32.target()[offset]);
//fprintf(stdout,"PALETTE RAM OFFSET %x ,data %x!\n",offset ,m_igs_palette32[offset]);
}

View File

@ -148,33 +148,33 @@ WRITE8_MEMBER(igspoker_state::igs_irqack_w)
static TILE_GET_INFO( get_bg_tile_info )
{
igspoker_state *state = machine.driver_data<igspoker_state>();
int code = state->m_bg_tile_ram.target()[tile_index];
int code = state->m_bg_tile_ram[tile_index];
SET_TILE_INFO(1 + (tile_index & 3), code, 0, 0);
}
static TILE_GET_INFO( get_fg_tile_info )
{
igspoker_state *state = machine.driver_data<igspoker_state>();
int code = state->m_fg_tile_ram.target()[tile_index] | (state->m_fg_color_ram.target()[tile_index] << 8);
int code = state->m_fg_tile_ram[tile_index] | (state->m_fg_color_ram[tile_index] << 8);
int tile = code & 0x1fff;
SET_TILE_INFO(0, code, tile != 0x1fff ? ((code >> 12) & 0xe) + 1 : 0, 0);
}
WRITE8_MEMBER(igspoker_state::bg_tile_w)
{
m_bg_tile_ram.target()[offset] = data;
m_bg_tile_ram[offset] = data;
m_bg_tilemap->mark_tile_dirty(offset);
}
WRITE8_MEMBER(igspoker_state::fg_tile_w)
{
m_fg_tile_ram.target()[offset] = data;
m_fg_tile_ram[offset] = data;
m_fg_tilemap->mark_tile_dirty(offset);
}
WRITE8_MEMBER(igspoker_state::fg_color_w)
{
m_fg_color_ram.target()[offset] = data;
m_fg_color_ram[offset] = data;
m_fg_tilemap->mark_tile_dirty(offset);
}

View File

@ -496,7 +496,7 @@ static INTERRUPT_GEN( vblank_irq )
imolagp_state *state = device->machine().driver_data<imolagp_state>();
#ifdef HLE_COM
memcpy(&state->m_slave_workram.target()[0x80], state->m_mComData, state->m_mComCount);
memcpy(&state->m_slave_workram[0x80], state->m_mComData, state->m_mComCount);
state->m_mComCount = 0;
#endif
device_set_input_line(device, 0, HOLD_LINE);

View File

@ -82,7 +82,7 @@ static SCREEN_UPDATE_IND16(intrscti)
for (x=0;x<32;x++)
{
int dat;
dat = state->m_ram.target()[count];
dat = state->m_ram[count];
drawgfx_transpen(bitmap,cliprect,screen.machine().gfx[0],dat/*+0x100*/,0,0,0,x*8,y*8,0);
count++;
}

View File

@ -70,7 +70,7 @@ static SCREEN_UPDATE_IND16( istellar )
/*
for (charx = 0; charx < 0x400; charx ++)
{
printf ("%x ", state->m_sprite_ram.target()[charx]) ;
printf ("%x ", state->m_sprite_ram[charx]) ;
}
printf("\n\n\n");
*/
@ -83,8 +83,8 @@ static SCREEN_UPDATE_IND16( istellar )
int current_screen_character = (chary*32) + charx;
drawgfx_transpen(bitmap, cliprect, screen.machine().gfx[0],
state->m_tile_ram.target()[current_screen_character],
(state->m_tile_control_ram.target()[current_screen_character] & 0x0f),
state->m_tile_ram[current_screen_character],
(state->m_tile_control_ram[current_screen_character] & 0x0f),
0, 0, charx*8, chary*8, 0);
}
}

View File

@ -111,20 +111,20 @@ public:
static TILE_GET_INFO( get_fg_tile_info )
{
jackie_state *state = machine.driver_data<jackie_state>();
int code = state->m_fg_tile_ram.target()[tile_index] | (state->m_fg_color_ram.target()[tile_index] << 8);
int code = state->m_fg_tile_ram[tile_index] | (state->m_fg_color_ram[tile_index] << 8);
int tile = code & 0x1fff;
SET_TILE_INFO(0, code, tile != 0x1fff ? ((code >> 12) & 0xe) + 1 : 0, 0);
}
WRITE8_MEMBER(jackie_state::fg_tile_w)
{
m_fg_tile_ram.target()[offset] = data;
m_fg_tile_ram[offset] = data;
m_fg_tilemap->mark_tile_dirty(offset);
}
WRITE8_MEMBER(jackie_state::fg_color_w)
{
m_fg_color_ram.target()[offset] = data;
m_fg_color_ram[offset] = data;
m_fg_tilemap->mark_tile_dirty(offset);
}
@ -133,20 +133,20 @@ WRITE8_MEMBER(jackie_state::fg_color_w)
WRITE8_MEMBER(jackie_state::bg_scroll_w)
{
m_bg_scroll.target()[offset] = data;
m_bg_scroll[offset] = data;
}
WRITE8_MEMBER(jackie_state::jackie_reel1_ram_w)
{
m_reel1_ram.target()[offset] = data;
m_reel1_ram[offset] = data;
m_reel1_tilemap->mark_tile_dirty(offset);
}
static TILE_GET_INFO( get_jackie_reel1_tile_info )
{
jackie_state *state = machine.driver_data<jackie_state>();
int code = state->m_reel1_ram.target()[tile_index];
int code = state->m_reel1_ram[tile_index];
SET_TILE_INFO(1, code, 0, 0);
}
@ -154,28 +154,28 @@ static TILE_GET_INFO( get_jackie_reel1_tile_info )
WRITE8_MEMBER(jackie_state::jackie_reel2_ram_w)
{
m_reel2_ram.target()[offset] = data;
m_reel2_ram[offset] = data;
m_reel2_tilemap->mark_tile_dirty(offset);
}
static TILE_GET_INFO( get_jackie_reel2_tile_info )
{
jackie_state *state = machine.driver_data<jackie_state>();
int code = state->m_reel2_ram.target()[tile_index];
int code = state->m_reel2_ram[tile_index];
SET_TILE_INFO(1, code, 0, 0);
}
WRITE8_MEMBER(jackie_state::jackie_reel3_ram_w)
{
m_reel3_ram.target()[offset] = data;
m_reel3_ram[offset] = data;
m_reel3_tilemap->mark_tile_dirty(offset);
}
static TILE_GET_INFO( get_jackie_reel3_tile_info )
{
jackie_state *state = machine.driver_data<jackie_state>();
int code = state->m_reel3_ram.target()[tile_index];
int code = state->m_reel3_ram[tile_index];
SET_TILE_INFO(1, code, 0, 0);
}
@ -206,15 +206,15 @@ static SCREEN_UPDATE_IND16(jackie)
for (i=0;i < 0x40;i++)
{
state->m_reel1_tilemap->set_scrolly(i, state->m_bg_scroll.target()[i+0x000]);
state->m_reel2_tilemap->set_scrolly(i, state->m_bg_scroll.target()[i+0x040]);
state->m_reel3_tilemap->set_scrolly(i, state->m_bg_scroll.target()[i+0x080]);
state->m_reel1_tilemap->set_scrolly(i, state->m_bg_scroll[i+0x000]);
state->m_reel2_tilemap->set_scrolly(i, state->m_bg_scroll[i+0x040]);
state->m_reel3_tilemap->set_scrolly(i, state->m_bg_scroll[i+0x080]);
}
for (j=0; j < 0x100-1; j++)
{
rectangle clip;
int rowenable = state->m_bg_scroll2.target()[j];
int rowenable = state->m_bg_scroll2[j];
/* draw top of screen */
clip.set(visarea.min_x, visarea.max_x, startclipmin, startclipmin+1);

View File

@ -56,8 +56,8 @@ static SCREEN_UPDATE_IND16(jackpool)
{
for (x=0;x<64;x++)
{
int tile = (state->m_vram.target()[count+(0x2000/2)] & 0x7fff);
int attr = (state->m_vram.target()[count+(0x2000/2)+0x800] & 0x1f00)>>8;
int tile = (state->m_vram[count+(0x2000/2)] & 0x7fff);
int attr = (state->m_vram[count+(0x2000/2)+0x800] & 0x1f00)>>8;
drawgfx_opaque(bitmap,cliprect,gfx,tile,attr,0,0,x*8,y*8);
count++;
@ -69,12 +69,12 @@ static SCREEN_UPDATE_IND16(jackpool)
{
for (x=0;x<64;x++)
{
int tile = (state->m_vram.target()[count] & 0x7fff);
int tile = (state->m_vram[count] & 0x7fff);
if(tile != 0)
{
int attr = (state->m_vram.target()[count+0x800] & 0x1f00)>>8;
int t_pen = (state->m_vram.target()[count+0x800] & 0x1000);
int attr = (state->m_vram[count+0x800] & 0x1f00)>>8;
int t_pen = (state->m_vram[count+0x800] & 0x1000);
drawgfx_transpen(bitmap,cliprect,gfx,tile,attr,0,0,x*8,y*8,(t_pen) ? 0 : -1);
}
@ -119,12 +119,12 @@ READ16_MEMBER(jackpool_state::jackpool_io_r)
}
// printf("R %02x\n",offset*2);
return m_io.target()[offset];
return m_io[offset];
}
WRITE16_MEMBER(jackpool_state::jackpool_io_w)
{
COMBINE_DATA(&m_io.target()[offset]);
COMBINE_DATA(&m_io[offset]);
switch(offset*2)
{

Some files were not shown because too many files have changed in this diff Show More