diff --git a/src/emu/diexec.h b/src/emu/diexec.h index 995da80c974..a39ef45b789 100644 --- a/src/emu/diexec.h +++ b/src/emu/diexec.h @@ -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)); \ diff --git a/src/mame/drivers/1945kiii.c b/src/mame/drivers/1945kiii.c index c8ff5f6f98d..974bb53de23 100644 --- a/src/mame/drivers/1945kiii.c +++ b/src/mame/drivers/1945kiii.c @@ -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(); - 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(); 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) diff --git a/src/mame/drivers/5clown.c b/src/mame/drivers/5clown.c index c23d750df85..fd078988420 100644 --- a/src/mame/drivers/5clown.c +++ b/src/mame/drivers/5clown.c @@ -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 */ diff --git a/src/mame/drivers/ace.c b/src/mame/drivers/ace.c index 99b86d06594..1e0e4c5c594 100644 --- a/src/mame/drivers/ace.c +++ b/src/mame/drivers/ace.c @@ -82,10 +82,10 @@ READ8_MEMBER(aceal_state::ace_objpos_r) static VIDEO_START( ace ) { aceal_state *state = machine.driver_data(); - 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); } diff --git a/src/mame/drivers/acefruit.c b/src/mame/drivers/acefruit.c index 8564a373dd7..05f57eae656 100644 --- a/src/mame/drivers/acefruit.c +++ b/src/mame/drivers/acefruit.c @@ -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) diff --git a/src/mame/drivers/acommand.c b/src/mame/drivers/acommand.c index 3450cfb119d..f41d79caaa3 100644 --- a/src/mame/drivers/acommand.c +++ b/src/mame/drivers/acommand.c @@ -101,7 +101,7 @@ static TILEMAP_MAPPER( bg_scan ) static TILE_GET_INFO( ac_get_bg_tile_info ) { acommand_state *state = machine.driver_data(); - 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(); - 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(); - 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; } diff --git a/src/mame/drivers/albazc.c b/src/mame/drivers/albazc.c index 1a993790018..ab6bcaf6edf 100644 --- a/src/mame/drivers/albazc.c +++ b/src/mame/drivers/albazc.c @@ -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) { diff --git a/src/mame/drivers/albazg.c b/src/mame/drivers/albazg.c index 7843f1386b5..5914f575809 100644 --- a/src/mame/drivers/albazg.c +++ b/src/mame/drivers/albazg.c @@ -74,8 +74,8 @@ public: static TILE_GET_INFO( y_get_bg_tile_info ) { albazg_state *state = machine.driver_data(); - 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*/ diff --git a/src/mame/drivers/aristmk4.c b/src/mame/drivers/aristmk4.c index 31f3bf99c2f..7c25f98c091 100644 --- a/src/mame/drivers/aristmk4.c +++ b/src/mame/drivers/aristmk4.c @@ -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; } diff --git a/src/mame/drivers/astinvad.c b/src/mame/drivers/astinvad.c index b76e5fd5a82..4cf6a5efd47 100644 --- a/src/mame/drivers/astinvad.c +++ b/src/mame/drivers/astinvad.c @@ -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; diff --git a/src/mame/drivers/astrocorp.c b/src/mame/drivers/astrocorp.c index ddd31468332..fcff8a8b7cf 100644 --- a/src/mame/drivers/astrocorp.c +++ b/src/mame/drivers/astrocorp.c @@ -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(); - 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) ); } diff --git a/src/mame/drivers/atarisy4.c b/src/mame/drivers/atarisy4.c index 8f87b8004a4..5aec6b4c071 100644 --- a/src/mame/drivers/atarisy4.c +++ b/src/mame/drivers/atarisy4.c @@ -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) diff --git a/src/mame/drivers/avt.c b/src/mame/drivers/avt.c index a378a8f6a5a..07a087f0c2e 100644 --- a/src/mame/drivers/avt.c +++ b/src/mame/drivers/avt.c @@ -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;xm_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)); diff --git a/src/mame/drivers/backfire.c b/src/mame/drivers/backfire.c index b08006b8ba3..59df4900a77 100644 --- a/src/mame/drivers/backfire.c +++ b/src/mame/drivers/backfire.c @@ -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("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("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("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("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]; } diff --git a/src/mame/drivers/beaminv.c b/src/mame/drivers/beaminv.c index b16d5dc2704..9bbe342b254 100644 --- a/src/mame/drivers/beaminv.c +++ b/src/mame/drivers/beaminv.c @@ -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++) { diff --git a/src/mame/drivers/berzerk.c b/src/mame/drivers/berzerk.c index bdf263edfe1..7da4a68cd6d 100644 --- a/src/mame/drivers/berzerk.c +++ b/src/mame/drivers/berzerk.c @@ -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; diff --git a/src/mame/drivers/bestleag.c b/src/mame/drivers/bestleag.c index 0ea56442ccb..1a7d8c6904f 100644 --- a/src/mame/drivers/bestleag.c +++ b/src/mame/drivers/bestleag.c @@ -54,7 +54,7 @@ public: static TILE_GET_INFO( get_tx_tile_info ) { bestleag_state *state = machine.driver_data(); - 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(); - 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(); - 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(); - 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(); - 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(); - 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); } diff --git a/src/mame/drivers/bingor.c b/src/mame/drivers/bingor.c index aab7203e6b9..91fbc0f32c9 100644 --- a/src/mame/drivers/bingor.c +++ b/src/mame/drivers/bingor.c @@ -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]; diff --git a/src/mame/drivers/blackt96.c b/src/mame/drivers/blackt96.c index cf788e7ad1f..da3c75267e3 100644 --- a/src/mame/drivers/blackt96.c +++ b/src/mame/drivers/blackt96.c @@ -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++; } diff --git a/src/mame/drivers/blitz.c b/src/mame/drivers/blitz.c index 65e2a62d727..8f3bf0f0eed 100644 --- a/src/mame/drivers/blitz.c +++ b/src/mame/drivers/blitz.c @@ -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 */ diff --git a/src/mame/drivers/bmcbowl.c b/src/mame/drivers/bmcbowl.c index 57faf947ddd..e72541e84c6 100644 --- a/src/mame/drivers/bmcbowl.c +++ b/src/mame/drivers/bmcbowl.c @@ -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; im_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 } diff --git a/src/mame/drivers/boxer.c b/src/mame/drivers/boxer.c index 7fa1c589f79..bc288d1b816 100644 --- a/src/mame/drivers/boxer.c +++ b/src/mame/drivers/boxer.c @@ -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], diff --git a/src/mame/drivers/buster.c b/src/mame/drivers/buster.c index 43a194f3a2e..2b5f33ef100 100644 --- a/src/mame/drivers/buster.c +++ b/src/mame/drivers/buster.c @@ -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); diff --git a/src/mame/drivers/cabaret.c b/src/mame/drivers/cabaret.c index 8207c80a0a9..e3d75f8b757 100644 --- a/src/mame/drivers/cabaret.c +++ b/src/mame/drivers/cabaret.c @@ -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(); - 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(); - 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); } diff --git a/src/mame/drivers/calorie.c b/src/mame/drivers/calorie.c index 40c5af50311..fec43caee04 100644 --- a/src/mame/drivers/calorie.c +++ b/src/mame/drivers/calorie.c @@ -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(); - 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); } diff --git a/src/mame/drivers/cardline.c b/src/mame/drivers/cardline.c index ac47538a7c0..7d9e4403bb7 100644 --- a/src/mame/drivers/cardline.c +++ b/src/mame/drivers/cardline.c @@ -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) diff --git a/src/mame/drivers/carrera.c b/src/mame/drivers/carrera.c index 63426b09797..7995e5b8abe 100644 --- a/src/mame/drivers/carrera.c +++ b/src/mame/drivers/carrera.c @@ -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++; diff --git a/src/mame/drivers/caswin.c b/src/mame/drivers/caswin.c index 02ac512ed37..02c678a16fe 100644 --- a/src/mame/drivers/caswin.c +++ b/src/mame/drivers/caswin.c @@ -72,8 +72,8 @@ public: static TILE_GET_INFO( get_sc0_tile_info ) { caswin_state *state = machine.driver_data(); - 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); } diff --git a/src/mame/drivers/cb2001.c b/src/mame/drivers/cb2001.c index 19b3575537c..05f29f279d3 100644 --- a/src/mame/drivers/cb2001.c +++ b/src/mame/drivers/cb2001.c @@ -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(); - 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(); - 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(); - 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 /* diff --git a/src/mame/drivers/cball.c b/src/mame/drivers/cball.c index 08d12c5d479..9840de60496 100644 --- a/src/mame/drivers/cball.c +++ b/src/mame/drivers/cball.c @@ -32,7 +32,7 @@ public: static TILE_GET_INFO( get_tile_info ) { cball_state *state = machine.driver_data(); - 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; } diff --git a/src/mame/drivers/cesclass.c b/src/mame/drivers/cesclass.c index 7054f9a2ce7..be17c054950 100644 --- a/src/mame/drivers/cesclass.c +++ b/src/mame/drivers/cesclass.c @@ -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]; diff --git a/src/mame/drivers/chanbara.c b/src/mame/drivers/chanbara.c index 420f24d7d99..fec3c0e2b0e 100644 --- a/src/mame/drivers/chanbara.c +++ b/src/mame/drivers/chanbara.c @@ -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(); - 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(); - 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) { diff --git a/src/mame/drivers/chinsan.c b/src/mame/drivers/chinsan.c index e1475dd6c66..913e0f7e772 100644 --- a/src/mame/drivers/chinsan.c +++ b/src/mame/drivers/chinsan.c @@ -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++; } diff --git a/src/mame/drivers/clayshoo.c b/src/mame/drivers/clayshoo.c index cc7a12b1bbe..4574b8f51bf 100644 --- a/src/mame/drivers/clayshoo.c +++ b/src/mame/drivers/clayshoo.c @@ -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++) { diff --git a/src/mame/drivers/cmmb.c b/src/mame/drivers/cmmb.c index 612582d5627..bb192bd29f9 100644 --- a/src/mame/drivers/cmmb.c +++ b/src/mame/drivers/cmmb.c @@ -71,7 +71,7 @@ static VIDEO_START( cmmb ) static SCREEN_UPDATE_IND16( cmmb ) { cmmb_state *state = screen.machine().driver_data(); - UINT8 *videoram = state->m_videoram.target(); + UINT8 *videoram = state->m_videoram; const gfx_element *gfx = screen.machine().gfx[0]; int count = 0x00000; diff --git a/src/mame/drivers/cntsteer.c b/src/mame/drivers/cntsteer.c index f5846f141f0..490ad2d98ca 100644 --- a/src/mame/drivers/cntsteer.c +++ b/src/mame/drivers/cntsteer.c @@ -112,7 +112,7 @@ static PALETTE_INIT( zerotrgt ) static TILE_GET_INFO( get_bg_tile_info ) { cntsteer_state *state = machine.driver_data(); - 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(); - 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); } diff --git a/src/mame/drivers/coinmstr.c b/src/mame/drivers/coinmstr.c index b6a9989b0ec..1beb60d6cab 100644 --- a/src/mame/drivers/coinmstr.c +++ b/src/mame/drivers/coinmstr.c @@ -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(); - 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); } diff --git a/src/mame/drivers/coinmvga.c b/src/mame/drivers/coinmvga.c index 180222e813b..5ded1a579e7 100644 --- a/src/mame/drivers/coinmvga.c +++ b/src/mame/drivers/coinmvga.c @@ -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); diff --git a/src/mame/drivers/coolridr.c b/src/mame/drivers/coolridr.c index 0ace9126b9c..4d4eb81197d 100644 --- a/src/mame/drivers/coolridr.c +++ b/src/mame/drivers/coolridr.c @@ -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 ) diff --git a/src/mame/drivers/crystal.c b/src/mame/drivers/crystal.c index 722f8141152..a39dc4af432 100644 --- a/src/mame/drivers/crystal.c +++ b/src/mame/drivers/crystal.c @@ -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(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(state->m_textureram.target())); head++; head &= 0x7ff; if (DoFlip) diff --git a/src/mame/drivers/cshooter.c b/src/mame/drivers/cshooter.c index f71174f7076..585fa81f002 100644 --- a/src/mame/drivers/cshooter.c +++ b/src/mame/drivers/cshooter.c @@ -119,8 +119,8 @@ public: static TILE_GET_INFO( get_cstx_tile_info ) { cshooter_state *state = machine.driver_data(); - 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;im_spriteram.bytes();i+=4) { diff --git a/src/mame/drivers/cultures.c b/src/mame/drivers/cultures.c index 4e7dae98aed..6e1527f70ee 100644 --- a/src/mame/drivers/cultures.c +++ b/src/mame/drivers/cultures.c @@ -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(); - 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); } } diff --git a/src/mame/drivers/cybertnk.c b/src/mame/drivers/cybertnk.c index af865506e32..44474fe6aa6 100644 --- a/src/mame/drivers/cybertnk.c +++ b/src/mame/drivers/cybertnk.c @@ -201,7 +201,7 @@ public: static TILE_GET_INFO( get_tx_tile_info ) { cybertnk_state *state = machine.driver_data(); - 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 ) diff --git a/src/mame/drivers/cyclemb.c b/src/mame/drivers/cyclemb.c index 86ae86771ee..cafb0d1ba39 100644 --- a/src/mame/drivers/cyclemb.c +++ b/src/mame/drivers/cyclemb.c @@ -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) { diff --git a/src/mame/drivers/d9final.c b/src/mame/drivers/d9final.c index bbe6383461c..ab8d2f56673 100644 --- a/src/mame/drivers/d9final.c +++ b/src/mame/drivers/d9final.c @@ -49,8 +49,8 @@ public: static TILE_GET_INFO( get_sc0_tile_info ) { d9final_state *state = machine.driver_data(); - 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); } diff --git a/src/mame/drivers/dacholer.c b/src/mame/drivers/dacholer.c index b65e5ac1436..2589f8da5ec 100644 --- a/src/mame/drivers/dacholer.c +++ b/src/mame/drivers/dacholer.c @@ -88,13 +88,13 @@ public: static TILE_GET_INFO( get_bg_tile_info ) { dacholer_state *state = machine.driver_data(); - 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(); - 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); } diff --git a/src/mame/drivers/dai3wksi.c b/src/mame/drivers/dai3wksi.c index 09138328508..9fec366b1f0 100644 --- a/src/mame/drivers/dai3wksi.c +++ b/src/mame/drivers/dai3wksi.c @@ -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); diff --git a/src/mame/drivers/dblewing.c b/src/mame/drivers/dblewing.c index cc951c6ebfe..9f963f8c5ea 100644 --- a/src/mame/drivers/dblewing.c +++ b/src/mame/drivers/dblewing.c @@ -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); diff --git a/src/mame/drivers/ddayjlc.c b/src/mame/drivers/ddayjlc.c index 98e3eed2287..100a0ce7358 100644 --- a/src/mame/drivers/ddayjlc.c +++ b/src/mame/drivers/ddayjlc.c @@ -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(); - 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 diff --git a/src/mame/drivers/ddealer.c b/src/mame/drivers/ddealer.c index ecbdec2f1ba..5dc6ff1dd2b 100644 --- a/src/mame/drivers/ddealer.c +++ b/src/mame/drivers/ddealer.c @@ -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(); - 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; } } diff --git a/src/mame/drivers/deco_ld.c b/src/mame/drivers/deco_ld.c index a644cdf39b1..6e36d1098d0 100644 --- a/src/mame/drivers/deco_ld.c +++ b/src/mame/drivers/deco_ld.c @@ -133,7 +133,7 @@ public: static SCREEN_UPDATE_IND16( rblaster ) { deco_ld_state *state = screen.machine().driver_data(); - UINT8 *videoram = state->m_videoram.target(); + UINT8 *videoram = state->m_videoram; const gfx_element *gfx = screen.machine().gfx[0]; int count = 0x0000; diff --git a/src/mame/drivers/deshoros.c b/src/mame/drivers/deshoros.c index 2a29d2401d2..f430263c0b9 100644 --- a/src/mame/drivers/deshoros.c +++ b/src/mame/drivers/deshoros.c @@ -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); } diff --git a/src/mame/drivers/destroyr.c b/src/mame/drivers/destroyr.c index d5787015db2..84d70b16988 100644 --- a/src/mame/drivers/destroyr.c +++ b/src/mame/drivers/destroyr.c @@ -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); } diff --git a/src/mame/drivers/diverboy.c b/src/mame/drivers/diverboy.c index ad8a47680a6..2d5769acc3b 100644 --- a/src/mame/drivers/diverboy.c +++ b/src/mame/drivers/diverboy.c @@ -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(); - UINT16 *source = state->m_spriteram.target(); + UINT16 *source = state->m_spriteram; UINT16 *finish = source + (state->m_spriteram.bytes() / 2); while (source < finish) diff --git a/src/mame/drivers/dlair.c b/src/mame/drivers/dlair.c index 0eaa676842e..15d3858bb0b 100644 --- a/src/mame/drivers/dlair.c +++ b/src/mame/drivers/dlair.c @@ -225,7 +225,7 @@ static PALETTE_INIT( dleuro ) static SCREEN_UPDATE_IND16( dleuro ) { dlair_state *state = screen.machine().driver_data(); - UINT8 *videoram = state->m_videoram.target(); + UINT8 *videoram = state->m_videoram; int x, y; /* redraw the overlay */ diff --git a/src/mame/drivers/dmndrby.c b/src/mame/drivers/dmndrby.c index 0cf50c679a5..5526d84fb99 100644 --- a/src/mame/drivers/dmndrby.c +++ b/src/mame/drivers/dmndrby.c @@ -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); diff --git a/src/mame/drivers/dominob.c b/src/mame/drivers/dominob.c index 3693f36df32..712c3a5fbc5 100644 --- a/src/mame/drivers/dominob.c +++ b/src/mame/drivers/dominob.c @@ -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); } diff --git a/src/mame/drivers/dorachan.c b/src/mame/drivers/dorachan.c index 8c4443195ed..82fd276d2c3 100644 --- a/src/mame/drivers/dorachan.c +++ b/src/mame/drivers/dorachan.c @@ -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; diff --git a/src/mame/drivers/dotrikun.c b/src/mame/drivers/dotrikun.c index 0c5b6e9059b..b5f563028eb 100644 --- a/src/mame/drivers/dotrikun.c +++ b/src/mame/drivers/dotrikun.c @@ -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++) { diff --git a/src/mame/drivers/dreamwld.c b/src/mame/drivers/dreamwld.c index 368c8751335..9b26ce9e584 100644 --- a/src/mame/drivers/dreamwld.c +++ b/src/mame/drivers/dreamwld.c @@ -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(); 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(); 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(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)); } diff --git a/src/mame/drivers/drtomy.c b/src/mame/drivers/drtomy.c index 201123a8832..4d9691ecc1f 100644 --- a/src/mame/drivers/drtomy.c +++ b/src/mame/drivers/drtomy.c @@ -41,8 +41,8 @@ public: static TILE_GET_INFO( get_tile_info_fg ) { drtomy_state *state = machine.driver_data(); - 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(); - 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); } diff --git a/src/mame/drivers/dynadice.c b/src/mame/drivers/dynadice.c index 20a6db8e0c0..c8973d26d3f 100644 --- a/src/mame/drivers/dynadice.c +++ b/src/mame/drivers/dynadice.c @@ -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(); - int code = state->m_videoram.target()[tile_index]; + int code = state->m_videoram[tile_index]; SET_TILE_INFO(1, code, 0, 0); } diff --git a/src/mame/drivers/egghunt.c b/src/mame/drivers/egghunt.c index f85aeecf70c..813475c3560 100644 --- a/src/mame/drivers/egghunt.c +++ b/src/mame/drivers/egghunt.c @@ -119,7 +119,7 @@ static TILE_GET_INFO( get_bg_tile_info ) { egghunt_state *state = machine.driver_data(); 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); } diff --git a/src/mame/drivers/embargo.c b/src/mame/drivers/embargo.c index f1414cb853c..eaa28cedb57 100644 --- a/src/mame/drivers/embargo.c +++ b/src/mame/drivers/embargo.c @@ -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++) { diff --git a/src/mame/drivers/enigma2.c b/src/mame/drivers/enigma2.c index 220be397522..66744c35518 100644 --- a/src/mame/drivers/enigma2.c +++ b/src/mame/drivers/enigma2.c @@ -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 */ diff --git a/src/mame/drivers/esh.c b/src/mame/drivers/esh.c index d00347d4c5b..c795b2043db 100644 --- a/src/mame/drivers/esh.c +++ b/src/mame/drivers/esh.c @@ -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); } diff --git a/src/mame/drivers/ettrivia.c b/src/mame/drivers/ettrivia.c index 130658f998c..0c828c9b5e9 100644 --- a/src/mame/drivers/ettrivia.c +++ b/src/mame/drivers/ettrivia.c @@ -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); } diff --git a/src/mame/drivers/f-32.c b/src/mame/drivers/f-32.c index d0819908ecf..24806edbba8 100644 --- a/src/mame/drivers/f-32.c +++ b/src/mame/drivers/f-32.c @@ -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; } } diff --git a/src/mame/drivers/feversoc.c b/src/mame/drivers/feversoc.c index 74bfb9f0236..b1dc4de8ff5 100644 --- a/src/mame/drivers/feversoc.c +++ b/src/mame/drivers/feversoc.c @@ -89,7 +89,7 @@ static VIDEO_START( feversoc ) static SCREEN_UPDATE_IND16( feversoc ) { feversoc_state *state = screen.machine().driver_data(); - 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 diff --git a/src/mame/drivers/firebeat.c b/src/mame/drivers/firebeat.c index fd1cd6774cb..cbbcf905999 100644 --- a/src/mame/drivers/firebeat.c +++ b/src/mame/drivers/firebeat.c @@ -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("flash0"); state->m_flash[1] = machine.device("flash1"); diff --git a/src/mame/drivers/firefox.c b/src/mame/drivers/firefox.c index 80e7e71d494..e0ba27e495c 100644 --- a/src/mame/drivers/firefox.c +++ b/src/mame/drivers/firefox.c @@ -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(); - 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 ); } diff --git a/src/mame/drivers/flyball.c b/src/mame/drivers/flyball.c index 7395ececdda..382e786d25b 100644 --- a/src/mame/drivers/flyball.c +++ b/src/mame/drivers/flyball.c @@ -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(); - 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(); diff --git a/src/mame/drivers/fortecar.c b/src/mame/drivers/fortecar.c index ff75c80aee1..caacf638372 100644 --- a/src/mame/drivers/fortecar.c +++ b/src/mame/drivers/fortecar.c @@ -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;im_vram.bytes();i++) - state->m_vram.target()[i] = machine.rand(); + state->m_vram[i] = machine.rand(); } diff --git a/src/mame/drivers/funkball.c b/src/mame/drivers/funkball.c index c4db9fa56fa..9307b553c58 100644 --- a/src/mame/drivers/funkball.c +++ b/src/mame/drivers/funkball.c @@ -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 ) diff --git a/src/mame/drivers/gal3.c b/src/mame/drivers/gal3.c index 0b40bb99951..00d511d8551 100644 --- a/src/mame/drivers/gal3.c +++ b/src/mame/drivers/gal3.c @@ -256,7 +256,7 @@ static NVRAM_HANDLER( gal3 ) { for( i=0; im_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; im_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; } diff --git a/src/mame/drivers/galaxi.c b/src/mame/drivers/galaxi.c index 6ff710748e2..02f8db11c0d 100644 --- a/src/mame/drivers/galaxi.c +++ b/src/mame/drivers/galaxi.c @@ -96,65 +96,65 @@ public: static TILE_GET_INFO( get_bg1_tile_info ) { galaxi_state *state = machine.driver_data(); - 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(); - 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(); - 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(); - 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(); - 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); } diff --git a/src/mame/drivers/gamecstl.c b/src/mame/drivers/gamecstl.c index 634e7a83d1d..13d266b157d 100644 --- a/src/mame/drivers/gamecstl.c +++ b/src/mame/drivers/gamecstl.c @@ -152,7 +152,7 @@ static SCREEN_UPDATE_IND16(gamecstl) gamecstl_state *state = screen.machine().driver_data(); 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); diff --git a/src/mame/drivers/go2000.c b/src/mame/drivers/go2000.c index 50995481493..2d4a7283702 100644 --- a/src/mame/drivers/go2000.c +++ b/src/mame/drivers/go2000.c @@ -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; diff --git a/src/mame/drivers/goldngam.c b/src/mame/drivers/goldngam.c index e2f979895c5..c0d7d97d7ce 100644 --- a/src/mame/drivers/goldngam.c +++ b/src/mame/drivers/goldngam.c @@ -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(state->m_videoram.target()); int index = 0; for(y = 0; y < 512; ++y) diff --git a/src/mame/drivers/goldnpkr.c b/src/mame/drivers/goldnpkr.c index 9e692d6d323..1d4ece0d22d 100644 --- a/src/mame/drivers/goldnpkr.c +++ b/src/mame/drivers/goldnpkr.c @@ -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 */ diff --git a/src/mame/drivers/good.c b/src/mame/drivers/good.c index 0564b94d429..52bef4e96cb 100644 --- a/src/mame/drivers/good.c +++ b/src/mame/drivers/good.c @@ -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(); - 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(); - 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); } diff --git a/src/mame/drivers/gpworld.c b/src/mame/drivers/gpworld.c index c8b3a777151..515e3bd91a8 100644 --- a/src/mame/drivers/gpworld.c +++ b/src/mame/drivers/gpworld.c @@ -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); */ diff --git a/src/mame/drivers/gstream.c b/src/mame/drivers/gstream.c index 9b06f066e90..396b8c35a52 100644 --- a/src/mame/drivers/gstream.c +++ b/src/mame/drivers/gstream.c @@ -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(); - 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(); - 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(); - 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 ) diff --git a/src/mame/drivers/gticlub.c b/src/mame/drivers/gticlub.c index 643b909dda7..94fea7584ef 100644 --- a/src/mame/drivers/gticlub.c +++ b/src/mame/drivers/gticlub.c @@ -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 ) diff --git a/src/mame/drivers/halleys.c b/src/mame/drivers/halleys.c index 41d9ba3e844..f01c225a064 100644 --- a/src/mame/drivers/halleys.c +++ b/src/mame/drivers/halleys.c @@ -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(); - 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); } diff --git a/src/mame/drivers/highvdeo.c b/src/mame/drivers/highvdeo.c index 8653fa2dcc7..ce53d7b3e8b 100644 --- a/src/mame/drivers/highvdeo.c +++ b/src/mame/drivers/highvdeo.c @@ -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; diff --git a/src/mame/drivers/hitpoker.c b/src/mame/drivers/hitpoker.c index cafa6e9b6c2..b3f2272f770 100644 --- a/src/mame/drivers/hitpoker.c +++ b/src/mame/drivers/hitpoker.c @@ -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 diff --git a/src/mame/drivers/hotblock.c b/src/mame/drivers/hotblock.c index 52894bae7af..81d706cbd87 100644 --- a/src/mame/drivers/hotblock.c +++ b/src/mame/drivers/hotblock.c @@ -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++; } } diff --git a/src/mame/drivers/hotstuff.c b/src/mame/drivers/hotstuff.c index ac495bb1273..2d9d8efb4e6 100644 --- a/src/mame/drivers/hotstuff.c +++ b/src/mame/drivers/hotstuff.c @@ -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++; diff --git a/src/mame/drivers/hvyunit.c b/src/mame/drivers/hvyunit.c index c74d6cf87ce..0fd4b1f071c 100644 --- a/src/mame/drivers/hvyunit.c +++ b/src/mame/drivers/hvyunit.c @@ -164,8 +164,8 @@ static TILE_GET_INFO( get_bg_tile_info ) { hvyunit_state *state = machine.driver_data(); - 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); } diff --git a/src/mame/drivers/igs009.c b/src/mame/drivers/igs009.c index a549faee621..72ba4f9a5ab 100644 --- a/src/mame/drivers/igs009.c +++ b/src/mame/drivers/igs009.c @@ -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(); - 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(); - 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(); - 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(); - 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(); - 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(); - 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(); - 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(); - 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(); - 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); diff --git a/src/mame/drivers/igs011.c b/src/mame/drivers/igs011.c index c507777d743..36ade3c9d2d 100644 --- a/src/mame/drivers/igs011.c +++ b/src/mame/drivers/igs011.c @@ -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(); - 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"); } } diff --git a/src/mame/drivers/igs017.c b/src/mame/drivers/igs017.c index 8c325b06780..2f4312cb1e3 100644 --- a/src/mame/drivers/igs017.c +++ b/src/mame/drivers/igs017.c @@ -156,27 +156,27 @@ static VIDEO_RESET( igs017 ) static TILE_GET_INFO( get_fg_tile_info ) { igs017_state *state = machine.driver_data(); - 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(); - 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(); - UINT8 *s = state->m_spriteram.target(); + UINT8 *s = state->m_spriteram; UINT8 *end = state->m_spriteram + 0x800; for ( ; s < end; s += 8 ) diff --git a/src/mame/drivers/igs_m027.c b/src/mame/drivers/igs_m027.c index 00b58cf496c..8bf2214a7b9 100644 --- a/src/mame/drivers/igs_m027.c +++ b/src/mame/drivers/igs_m027.c @@ -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(); //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(); //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(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]); } diff --git a/src/mame/drivers/igspoker.c b/src/mame/drivers/igspoker.c index 561f1a19d35..88062be8492 100644 --- a/src/mame/drivers/igspoker.c +++ b/src/mame/drivers/igspoker.c @@ -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(); - 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(); - 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); } diff --git a/src/mame/drivers/imolagp.c b/src/mame/drivers/imolagp.c index 3259aa079bb..f9639d9a3be 100644 --- a/src/mame/drivers/imolagp.c +++ b/src/mame/drivers/imolagp.c @@ -496,7 +496,7 @@ static INTERRUPT_GEN( vblank_irq ) imolagp_state *state = device->machine().driver_data(); #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); diff --git a/src/mame/drivers/intrscti.c b/src/mame/drivers/intrscti.c index 9ff9504a16f..692fdb2fade 100644 --- a/src/mame/drivers/intrscti.c +++ b/src/mame/drivers/intrscti.c @@ -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++; } diff --git a/src/mame/drivers/istellar.c b/src/mame/drivers/istellar.c index ed971844da5..7dfd725e2e0 100644 --- a/src/mame/drivers/istellar.c +++ b/src/mame/drivers/istellar.c @@ -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); } } diff --git a/src/mame/drivers/jackie.c b/src/mame/drivers/jackie.c index 5bf5785cf4b..59919b6fdd8 100644 --- a/src/mame/drivers/jackie.c +++ b/src/mame/drivers/jackie.c @@ -111,20 +111,20 @@ public: static TILE_GET_INFO( get_fg_tile_info ) { jackie_state *state = machine.driver_data(); - 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(); - 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(); - 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(); - 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); diff --git a/src/mame/drivers/jackpool.c b/src/mame/drivers/jackpool.c index 0dad994ecec..4f5e32b5c1e 100644 --- a/src/mame/drivers/jackpool.c +++ b/src/mame/drivers/jackpool.c @@ -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) { diff --git a/src/mame/drivers/jaguar.c b/src/mame/drivers/jaguar.c index 46713f040bd..e27eb5f39f5 100644 --- a/src/mame/drivers/jaguar.c +++ b/src/mame/drivers/jaguar.c @@ -918,9 +918,9 @@ WRITE32_MEMBER(cojag_state::latch_w) READ32_MEMBER(cojag_state::eeprom_data_r) { if (cojag_is_r3000) - return m_nvram.target()[offset] | 0xffffff00; + return m_nvram[offset] | 0xffffff00; else - return m_nvram.target()[offset] | 0x00ffffff; + return m_nvram[offset] | 0x00ffffff; } @@ -935,9 +935,9 @@ WRITE32_MEMBER(cojag_state::eeprom_data_w) // if (m_eeprom_enable) { if (cojag_is_r3000) - m_nvram.target()[offset] = data & 0x000000ff; + m_nvram[offset] = data & 0x000000ff; else - m_nvram.target()[offset] = data & 0xff000000; + m_nvram[offset] = data & 0xff000000; } // else // logerror("%08X:error writing to disabled EEPROM\n", cpu_get_previouspc(&space.device())); @@ -2405,7 +2405,7 @@ static DRIVER_INIT( maxforce ) cojag_common_init(machine, 0x0c0, 0x09e); /* patch the protection */ - state->m_rom_base.target()[0x220/4] = 0x03e00008; + state->m_rom_base[0x220/4] = 0x03e00008; #if ENABLE_SPEEDUP_HACKS /* install speedup for main CPU */ @@ -2422,7 +2422,7 @@ static DRIVER_INIT( area51mx ) cojag_common_init(machine, 0x0c0, 0x09e); /* patch the protection */ - state->m_rom_base.target()[0x418/4] = 0x4e754e75; + state->m_rom_base[0x418/4] = 0x4e754e75; #if ENABLE_SPEEDUP_HACKS /* install speedup for main CPU */ @@ -2438,7 +2438,7 @@ static DRIVER_INIT( a51mxr3k ) cojag_common_init(machine, 0x0c0, 0x09e); /* patch the protection */ - state->m_rom_base.target()[0x220/4] = 0x03e00008; + state->m_rom_base[0x220/4] = 0x03e00008; #if ENABLE_SPEEDUP_HACKS /* install speedup for main CPU */ diff --git a/src/mame/drivers/jalmah.c b/src/mame/drivers/jalmah.c index badced61062..54d412153da 100644 --- a/src/mame/drivers/jalmah.c +++ b/src/mame/drivers/jalmah.c @@ -239,7 +239,7 @@ static TILEMAP_MAPPER( range3_8x8 ) static TILE_GET_INFO( get_sc0_tile_info ) { jalmah_state *state = machine.driver_data(); - int code = state->m_sc0_vram.target()[tile_index]; + int code = state->m_sc0_vram[tile_index]; SET_TILE_INFO( 3, (code & 0xfff) + ((state->m_sc0bank & 3) << 12), @@ -250,7 +250,7 @@ static TILE_GET_INFO( get_sc0_tile_info ) static TILE_GET_INFO( get_sc1_tile_info ) { jalmah_state *state = machine.driver_data(); - int code = state->m_sc1_vram.target()[tile_index]; + int code = state->m_sc1_vram[tile_index]; SET_TILE_INFO( 2, code & 0xfff, @@ -261,7 +261,7 @@ static TILE_GET_INFO( get_sc1_tile_info ) static TILE_GET_INFO( get_sc2_tile_info ) { jalmah_state *state = machine.driver_data(); - int code = state->m_sc2_vram.target()[tile_index]; + int code = state->m_sc2_vram[tile_index]; SET_TILE_INFO( 1, code & 0xfff, @@ -272,7 +272,7 @@ static TILE_GET_INFO( get_sc2_tile_info ) static TILE_GET_INFO( get_sc3_tile_info ) { jalmah_state *state = machine.driver_data(); - int code = state->m_sc3_vram.target()[tile_index]; + int code = state->m_sc3_vram[tile_index]; SET_TILE_INFO( 0, code & 0xfff, @@ -502,7 +502,7 @@ static SCREEN_UPDATE_IND16( urashima ) WRITE16_MEMBER(jalmah_state::sc0_vram_w) { - COMBINE_DATA(&m_sc0_vram.target()[offset]); + COMBINE_DATA(&m_sc0_vram[offset]); /*2048x256 tilemap*/ m_sc0_tilemap_0->mark_tile_dirty(offset); /*1024x512 tilemap*/ @@ -515,7 +515,7 @@ WRITE16_MEMBER(jalmah_state::sc0_vram_w) WRITE16_MEMBER(jalmah_state::sc3_vram_w) { - COMBINE_DATA(&m_sc3_vram.target()[offset]); + COMBINE_DATA(&m_sc3_vram[offset]); /*2048x256 tilemap*/ m_sc3_tilemap_0->mark_tile_dirty(offset); /*1024x512 tilemap*/ @@ -526,7 +526,7 @@ WRITE16_MEMBER(jalmah_state::sc3_vram_w) WRITE16_MEMBER(jalmah_state::sc1_vram_w) { - COMBINE_DATA(&m_sc1_vram.target()[offset]); + COMBINE_DATA(&m_sc1_vram[offset]); /*2048x256 tilemap*/ m_sc1_tilemap_0->mark_tile_dirty(offset); /*1024x512 tilemap*/ @@ -539,7 +539,7 @@ WRITE16_MEMBER(jalmah_state::sc1_vram_w) WRITE16_MEMBER(jalmah_state::sc2_vram_w) { - COMBINE_DATA(&m_sc2_vram.target()[offset]); + COMBINE_DATA(&m_sc2_vram[offset]); /*2048x256 tilemap*/ m_sc2_tilemap_0->mark_tile_dirty(offset); /*1024x512 tilemap*/ @@ -617,13 +617,13 @@ WRITE16_MEMBER(jalmah_state::urashima_bank_w) WRITE16_MEMBER(jalmah_state::urashima_sc0_vram_w) { - COMBINE_DATA(&m_sc0_vram.target()[offset]); + COMBINE_DATA(&m_sc0_vram[offset]); m_sc0_tilemap_0->mark_tile_dirty(offset); } WRITE16_MEMBER(jalmah_state::urashima_sc3_vram_w) { - COMBINE_DATA(&m_sc3_vram.target()[offset]); + COMBINE_DATA(&m_sc3_vram[offset]); m_sc3_tilemap_0->mark_tile_dirty(offset); } @@ -739,7 +739,7 @@ static void daireika_palette_dma(running_machine &machine, UINT16 val) static void daireika_mcu_run(running_machine &machine) { jalmah_state *state = machine.driver_data(); - UINT16 *jm_shared_ram = state->m_jm_shared_ram.target(); + UINT16 *jm_shared_ram = state->m_jm_shared_ram; if(((jm_shared_ram[0x550/2] & 0xf00) == 0x700) && ((jm_shared_ram[0x540/2] & 0xf00) != state->m_dma_old)) { @@ -789,7 +789,7 @@ static void daireika_mcu_run(running_machine &machine) static void mjzoomin_mcu_run(running_machine &machine) { jalmah_state *state = machine.driver_data(); - UINT16 *jm_shared_ram = state->m_jm_shared_ram.target(); + UINT16 *jm_shared_ram = state->m_jm_shared_ram; if(state->m_test_mode) //service_mode { @@ -834,7 +834,7 @@ static void mjzoomin_mcu_run(running_machine &machine) static void urashima_mcu_run(running_machine &machine) { jalmah_state *state = machine.driver_data(); - UINT16 *jm_shared_ram = state->m_jm_shared_ram.target(); + UINT16 *jm_shared_ram = state->m_jm_shared_ram; if(state->m_test_mode) //service_mode { @@ -879,7 +879,7 @@ static void urashima_mcu_run(running_machine &machine) static void second_mcu_run(running_machine &machine) { jalmah_state *state = machine.driver_data(); - UINT16 *jm_shared_ram = state->m_jm_shared_ram.target(); + UINT16 *jm_shared_ram = state->m_jm_shared_ram; if(state->m_test_mode) //service_mode { jm_shared_ram[0x200/2] = input_port_read(machine, "KEY0"); @@ -1759,8 +1759,8 @@ data value is REQ under mjzoomin video test menu.It is related to the MCU? */ WRITE16_MEMBER(jalmah_state::urashima_mcu_w) { - UINT16 *jm_shared_ram = m_jm_shared_ram.target(); - UINT16 *jm_mcu_code = m_jm_mcu_code.target(); + UINT16 *jm_shared_ram = m_jm_shared_ram; + UINT16 *jm_mcu_code = m_jm_mcu_code; if(ACCESSING_BITS_0_7 && data) { /******************************************************* @@ -1980,8 +1980,8 @@ static const UINT16 dai_mcu_code[0x11] = { 0x33c5, 0x0010, 0x07fe, 0x3a39,0x000f WRITE16_MEMBER(jalmah_state::daireika_mcu_w) { - UINT16 *jm_shared_ram = m_jm_shared_ram.target(); - UINT16 *jm_mcu_code = m_jm_mcu_code.target(); + UINT16 *jm_shared_ram = m_jm_shared_ram; + UINT16 *jm_mcu_code = m_jm_mcu_code; UINT16 i; if(ACCESSING_BITS_0_7 && data) @@ -2256,8 +2256,8 @@ data value is REQ under mjzoomin video test menu.It is related to the MCU? */ WRITE16_MEMBER(jalmah_state::mjzoomin_mcu_w) { - UINT16 *jm_shared_ram = m_jm_shared_ram.target(); - UINT16 *jm_mcu_code = m_jm_mcu_code.target(); + UINT16 *jm_shared_ram = m_jm_shared_ram; + UINT16 *jm_mcu_code = m_jm_mcu_code; if(ACCESSING_BITS_0_7 && data) { /****************************************************** diff --git a/src/mame/drivers/jokrwild.c b/src/mame/drivers/jokrwild.c index 3f65aacf84b..40945cb4308 100644 --- a/src/mame/drivers/jokrwild.c +++ b/src/mame/drivers/jokrwild.c @@ -121,14 +121,14 @@ public: WRITE8_MEMBER(jokrwild_state::jokrwild_videoram_w) { - m_videoram.target()[offset] = data; + m_videoram[offset] = data; m_bg_tilemap->mark_tile_dirty(offset); } WRITE8_MEMBER(jokrwild_state::jokrwild_colorram_w) { - m_colorram.target()[offset] = data; + m_colorram[offset] = data; m_bg_tilemap->mark_tile_dirty(offset); } @@ -141,8 +141,8 @@ static TILE_GET_INFO( get_bg_tile_info ) xx-- ---- bank select. ---- xxxx color code. */ - int attr = state->m_colorram.target()[tile_index]; - int code = state->m_videoram.target()[tile_index] | ((attr & 0xc0) << 2); + int attr = state->m_colorram[tile_index]; + int code = state->m_videoram[tile_index] | ((attr & 0xc0) << 2); int color = (attr & 0x0f); SET_TILE_INFO( 0, code , color , 0); diff --git a/src/mame/drivers/jollyjgr.c b/src/mame/drivers/jollyjgr.c index 2d1e5f08aa2..02200a0306a 100644 --- a/src/mame/drivers/jollyjgr.c +++ b/src/mame/drivers/jollyjgr.c @@ -145,7 +145,7 @@ public: WRITE8_MEMBER(jollyjgr_state::jollyjgr_videoram_w) { - m_videoram.target()[offset] = data; + m_videoram[offset] = data; m_bg_tilemap->mark_tile_dirty(offset); } @@ -165,7 +165,7 @@ WRITE8_MEMBER(jollyjgr_state::jollyjgr_attrram_w) m_bg_tilemap->set_scrolly(offset >> 1, data); } - m_colorram.target()[offset] = data; + m_colorram[offset] = data; } WRITE8_MEMBER(jollyjgr_state::jollyjgr_misc_w) @@ -437,9 +437,9 @@ static PALETTE_INIT( jollyjgr ) static TILE_GET_INFO( get_bg_tile_info ) { jollyjgr_state *state = machine.driver_data(); - int color = state->m_colorram.target()[((tile_index & 0x1f) << 1) | 1] & 7; + int color = state->m_colorram[((tile_index & 0x1f) << 1) | 1] & 7; int region = (state->m_tilemap_bank & 0x20) ? 2 : 0; - SET_TILE_INFO(region, state->m_videoram.target()[tile_index], color, 0); + SET_TILE_INFO(region, state->m_videoram[tile_index], color, 0); } static VIDEO_START( jollyjgr ) @@ -465,9 +465,9 @@ static void draw_bitmap( running_machine &machine, bitmap_ind16 &bitmap ) { for(i = 0; i < 8; i++) { - bit0 = (state->m_bitmap.target()[count] >> i) & 1; - bit1 = (state->m_bitmap.target()[count + 0x2000] >> i) & 1; - bit2 = (state->m_bitmap.target()[count + 0x4000] >> i) & 1; + bit0 = (state->m_bitmap[count] >> i) & 1; + bit1 = (state->m_bitmap[count + 0x2000] >> i) & 1; + bit2 = (state->m_bitmap[count + 0x4000] >> i) & 1; color = bit0 | (bit1 << 1) | (bit2 << 2); if(color) @@ -491,7 +491,7 @@ static void draw_bitmap( running_machine &machine, bitmap_ind16 &bitmap ) static SCREEN_UPDATE_IND16( jollyjgr ) { jollyjgr_state *state = screen.machine().driver_data(); - UINT8 *spriteram = state->m_spriteram.target(); + UINT8 *spriteram = state->m_spriteram; int offs; bitmap.fill(32, cliprect); @@ -556,8 +556,8 @@ static SCREEN_UPDATE_IND16( fspider ) Assume bullets to look the same as on Galaxian hw, that is, simply 4 pixels. Colours are unknown. */ for (int offs=0;offs<0x10;offs+=2) { - UINT8 sy=~state->m_bulletram.target()[offs]; - UINT8 sx=~state->m_bulletram.target()[offs|1]; + UINT8 sy=~state->m_bulletram[offs]; + UINT8 sx=~state->m_bulletram[offs|1]; UINT16 bc=(offs<4)? 32+7: // player, white 32+3; // enemy, yellow diff --git a/src/mame/drivers/jongkyo.c b/src/mame/drivers/jongkyo.c index 5133182dc80..d48e55776f9 100644 --- a/src/mame/drivers/jongkyo.c +++ b/src/mame/drivers/jongkyo.c @@ -90,8 +90,8 @@ static SCREEN_UPDATE_IND16( jongkyo ) - data1 = state->m_videoram.target()[0x4000 + x / 4 + y * 64]; - data2 = state->m_videoram.target()[x / 4 + y * 64]; + data1 = state->m_videoram[0x4000 + x / 4 + y * 64]; + data2 = state->m_videoram[x / 4 + y * 64]; for (b = 0; b < 4; ++b) { diff --git a/src/mame/drivers/jubilee.c b/src/mame/drivers/jubilee.c index 53a7a569e32..11ea6521a59 100644 --- a/src/mame/drivers/jubilee.c +++ b/src/mame/drivers/jubilee.c @@ -111,7 +111,7 @@ public: WRITE8_MEMBER(jubilee_state::jubileep_videoram_w) { - m_videoram.target()[offset] = data; + m_videoram[offset] = data; m_bg_tilemap->mark_tile_dirty(offset); } @@ -119,7 +119,7 @@ WRITE8_MEMBER(jubilee_state::jubileep_videoram_w) static TILE_GET_INFO( get_bg_tile_info ) { jubilee_state *state = machine.driver_data(); - int code = state->m_videoram.target()[tile_index]; + int code = state->m_videoram[tile_index]; SET_TILE_INFO( 0, code, 0, 0); } diff --git a/src/mame/drivers/kingdrby.c b/src/mame/drivers/kingdrby.c index 042139cfb0b..389df39a9aa 100644 --- a/src/mame/drivers/kingdrby.c +++ b/src/mame/drivers/kingdrby.c @@ -124,8 +124,8 @@ xxxx ---- basic color? static TILE_GET_INFO( get_sc0_tile_info ) { kingdrby_state *state = machine.driver_data(); - int tile = state->m_vram.target()[tile_index] | state->m_attr.target()[tile_index]<<8; - int color = (state->m_attr.target()[tile_index] & 0x06)>>1; + int tile = state->m_vram[tile_index] | state->m_attr[tile_index]<<8; + int color = (state->m_attr[tile_index] & 0x06)>>1; tile&=0x1ff; @@ -139,8 +139,8 @@ static TILE_GET_INFO( get_sc0_tile_info ) static TILE_GET_INFO( get_sc1_tile_info ) { kingdrby_state *state = machine.driver_data(); - int tile = state->m_vram.target()[tile_index] | state->m_attr.target()[tile_index]<<8; - int color = (state->m_attr.target()[tile_index] & 0x06)>>1; + int tile = state->m_vram[tile_index] | state->m_attr[tile_index]<<8; + int color = (state->m_attr[tile_index] & 0x06)>>1; tile&=0x1ff; //original 0xc @@ -153,7 +153,7 @@ static TILE_GET_INFO( get_sc1_tile_info ) color|0x40, 0); - tileinfo.category = (state->m_attr.target()[tile_index] & 0x08)>>3; + tileinfo.category = (state->m_attr[tile_index] & 0x08)>>3; } static VIDEO_START(kingdrby) @@ -175,7 +175,7 @@ static const UINT8 hw_sprite[16] = static void draw_sprites(running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect) { kingdrby_state *state = machine.driver_data(); - UINT8 *spriteram = state->m_spriteram.target(); + UINT8 *spriteram = state->m_spriteram; int count = 0; /*sprites not fully understood.*/ @@ -222,10 +222,10 @@ static SCREEN_UPDATE_IND16(kingdrby) kingdrby_state *state = screen.machine().driver_data(); const rectangle &visarea = screen.visible_area(); rectangle clip; - state->m_sc0_tilemap->set_scrollx(0, state->m_vram.target()[0x342]); - state->m_sc0_tilemap->set_scrolly(0, state->m_vram.target()[0x341]); - state->m_sc1_tilemap->set_scrollx(0, state->m_vram.target()[0x342]); - state->m_sc1_tilemap->set_scrolly(0, state->m_vram.target()[0x341]); + state->m_sc0_tilemap->set_scrollx(0, state->m_vram[0x342]); + state->m_sc0_tilemap->set_scrolly(0, state->m_vram[0x341]); + state->m_sc1_tilemap->set_scrollx(0, state->m_vram[0x342]); + state->m_sc1_tilemap->set_scrolly(0, state->m_vram[0x341]); state->m_sc0w_tilemap->set_scrolly(0, 32); /* maybe it needs two window tilemaps? (one at the top, the other at the bottom)*/ @@ -242,7 +242,7 @@ static SCREEN_UPDATE_IND16(kingdrby) WRITE8_MEMBER(kingdrby_state::sc0_vram_w) { - m_vram.target()[offset] = data; + m_vram[offset] = data; m_sc0_tilemap->mark_tile_dirty(offset); m_sc0w_tilemap->mark_tile_dirty(offset); m_sc1_tilemap->mark_tile_dirty(offset); @@ -250,7 +250,7 @@ WRITE8_MEMBER(kingdrby_state::sc0_vram_w) WRITE8_MEMBER(kingdrby_state::sc0_attr_w) { - m_attr.target()[offset] = data; + m_attr[offset] = data; m_sc0_tilemap->mark_tile_dirty(offset); m_sc0w_tilemap->mark_tile_dirty(offset); m_sc1_tilemap->mark_tile_dirty(offset); diff --git a/src/mame/drivers/kinst.c b/src/mame/drivers/kinst.c index 98cfe0498af..5be4212e064 100644 --- a/src/mame/drivers/kinst.c +++ b/src/mame/drivers/kinst.c @@ -176,9 +176,9 @@ static MACHINE_START( kinst ) mips3drc_set_options(machine.device("maincpu"), MIPS3DRC_FASTEST_OPTIONS); /* configure fast RAM regions for DRC */ - mips3drc_add_fastram(machine.device("maincpu"), 0x08000000, 0x087fffff, FALSE, state->m_rambase2.target()); - mips3drc_add_fastram(machine.device("maincpu"), 0x00000000, 0x0007ffff, FALSE, state->m_rambase.target()); - mips3drc_add_fastram(machine.device("maincpu"), 0x1fc00000, 0x1fc7ffff, TRUE, state->m_rombase.target()); + mips3drc_add_fastram(machine.device("maincpu"), 0x08000000, 0x087fffff, FALSE, state->m_rambase2); + mips3drc_add_fastram(machine.device("maincpu"), 0x00000000, 0x0007ffff, FALSE, state->m_rambase); + mips3drc_add_fastram(machine.device("maincpu"), 0x1fc00000, 0x1fc7ffff, TRUE, state->m_rombase); } @@ -225,7 +225,7 @@ static MACHINE_RESET( kinst ) } /* set a safe base location for video */ - state->m_video_base = &state->m_rambase.target()[0x30000/4]; + state->m_video_base = &state->m_rambase[0x30000/4]; } @@ -333,7 +333,7 @@ READ32_MEMBER(kinst_state::kinst_control_r) /* apply shuffling */ offset = m_control_map[offset / 2]; - result = m_control.target()[offset]; + result = m_control[offset]; switch (offset) { @@ -367,16 +367,16 @@ WRITE32_MEMBER(kinst_state::kinst_control_w) /* apply shuffling */ offset = m_control_map[offset / 2]; - olddata = m_control.target()[offset]; - COMBINE_DATA(&m_control.target()[offset]); + olddata = m_control[offset]; + COMBINE_DATA(&m_control[offset]); switch (offset) { case 0: /* $80 - VRAM buffer control */ if (data & 4) - m_video_base = &m_rambase.target()[0x58000/4]; + m_video_base = &m_rambase[0x58000/4]; else - m_video_base = &m_rambase.target()[0x30000/4]; + m_video_base = &m_rambase[0x30000/4]; break; case 1: /* $88 - sound reset */ @@ -384,8 +384,8 @@ WRITE32_MEMBER(kinst_state::kinst_control_w) break; case 2: /* $90 - sound control */ - if (!(olddata & 0x02) && (m_control.target()[offset] & 0x02)) - dcs_data_w(machine(), m_control.target()[3]); + if (!(olddata & 0x02) && (m_control[offset] & 0x02)) + dcs_data_w(machine(), m_control[3]); break; case 3: /* $98 - sound data */ diff --git a/src/mame/drivers/koftball.c b/src/mame/drivers/koftball.c index db6b4333797..70e83db1299 100644 --- a/src/mame/drivers/koftball.c +++ b/src/mame/drivers/koftball.c @@ -67,7 +67,7 @@ public: static TILE_GET_INFO( get_t1_tile_info ) { koftball_state *state = machine.driver_data(); - int data = state->m_bmc_1_videoram.target()[tile_index]; + int data = state->m_bmc_1_videoram[tile_index]; SET_TILE_INFO( 0, data, @@ -78,7 +78,7 @@ static TILE_GET_INFO( get_t1_tile_info ) static TILE_GET_INFO( get_t2_tile_info ) { koftball_state *state = machine.driver_data(); - int data = state->m_bmc_2_videoram.target()[tile_index]; + int data = state->m_bmc_2_videoram[tile_index]; SET_TILE_INFO( 0, data, @@ -147,13 +147,13 @@ WRITE16_MEMBER(koftball_state::prot_w) WRITE16_MEMBER(koftball_state::bmc_1_videoram_w) { - COMBINE_DATA(&m_bmc_1_videoram.target()[offset]); + COMBINE_DATA(&m_bmc_1_videoram[offset]); m_tilemap_1->mark_tile_dirty(offset); } WRITE16_MEMBER(koftball_state::bmc_2_videoram_w) { - COMBINE_DATA(&m_bmc_2_videoram.target()[offset]); + COMBINE_DATA(&m_bmc_2_videoram[offset]); m_tilemap_2->mark_tile_dirty(offset); } @@ -315,7 +315,7 @@ static DRIVER_INIT(koftball) int offset=0; while(nvram[offset]!=0xffff) { - state->m_main_ram.target()[offset]=nvram[offset]; + state->m_main_ram[offset]=nvram[offset]; ++offset; } } diff --git a/src/mame/drivers/koikoi.c b/src/mame/drivers/koikoi.c index bef99f7055b..9c6a3a71ce5 100644 --- a/src/mame/drivers/koikoi.c +++ b/src/mame/drivers/koikoi.c @@ -78,9 +78,9 @@ public: static TILE_GET_INFO( get_tile_info ) { koikoi_state *state = machine.driver_data(); - int code = state->m_videoram.target()[tile_index] | ((state->m_videoram.target()[tile_index + 0x400] & 0x40) << 2); - int color = (state->m_videoram.target()[tile_index + 0x400] & 0x1f); - int flip = (state->m_videoram.target()[tile_index + 0x400] & 0x80) ? (TILEMAP_FLIPX | TILEMAP_FLIPY) : 0; + int code = state->m_videoram[tile_index] | ((state->m_videoram[tile_index + 0x400] & 0x40) << 2); + int color = (state->m_videoram[tile_index + 0x400] & 0x1f); + int flip = (state->m_videoram[tile_index + 0x400] & 0x80) ? (TILEMAP_FLIPX | TILEMAP_FLIPY) : 0; SET_TILE_INFO( 0, code, color, flip); } @@ -151,7 +151,7 @@ static SCREEN_UPDATE_IND16(koikoi) WRITE8_MEMBER(koikoi_state::vram_w) { - m_videoram.target()[offset] = data; + m_videoram[offset] = data; m_tmap->mark_tile_dirty(offset & 0x3ff); } diff --git a/src/mame/drivers/konamim2.c b/src/mame/drivers/konamim2.c index dd42bc76956..3885afe2d2a 100644 --- a/src/mame/drivers/konamim2.c +++ b/src/mame/drivers/konamim2.c @@ -262,12 +262,12 @@ static SCREEN_UPDATE_IND16( m2 ) UINT32 fb_start = 0xffffffff; if (state->m_vdl0_address != 0) { - fb_start = *(UINT32*)&state->m_main_ram.target()[(state->m_vdl0_address - 0x40000000) / 8] - 0x40000000; + fb_start = *(UINT32*)&state->m_main_ram[(state->m_vdl0_address - 0x40000000) / 8] - 0x40000000; } if (fb_start <= 0x800000) { - UINT16 *frame = (UINT16*)&state->m_main_ram.target()[fb_start/8]; + UINT16 *frame = (UINT16*)&state->m_main_ram[fb_start/8]; for (j=0; j < 384; j++) { UINT16 *fb = &frame[(j*512)]; diff --git a/src/mame/drivers/laserbas.c b/src/mame/drivers/laserbas.c index d2ba3d92caa..117a1e7910f 100644 --- a/src/mame/drivers/laserbas.c +++ b/src/mame/drivers/laserbas.c @@ -126,13 +126,13 @@ WRITE8_MEMBER(laserbas_state::vrambank_w) READ8_MEMBER(laserbas_state::protram_r) { - return m_protram.target()[offset]; + return m_protram[offset]; } WRITE8_MEMBER(laserbas_state::protram_w) { - m_protram.target()[offset] = data; + m_protram[offset] = data; } static ADDRESS_MAP_START( laserbas_memory, AS_PROGRAM, 8, laserbas_state ) diff --git a/src/mame/drivers/lgp.c b/src/mame/drivers/lgp.c index 4b976a1b3df..3f37697f399 100644 --- a/src/mame/drivers/lgp.c +++ b/src/mame/drivers/lgp.c @@ -114,7 +114,7 @@ static SCREEN_UPDATE_IND16( lgp ) /* Somewhere there's a flag that offsets the tilemap by 0x100*x */ /* Palette is likely set somewhere as well (tile_control_ram?) */ drawgfx_transpen(bitmap, cliprect, screen.machine().gfx[0], - state->m_tile_ram.target()[current_screen_character], + state->m_tile_ram[current_screen_character], 0, 0, 0, charx*8, chary*8, 0); } diff --git a/src/mame/drivers/liberatr.c b/src/mame/drivers/liberatr.c index c7233e7a119..2cca12600e6 100644 --- a/src/mame/drivers/liberatr.c +++ b/src/mame/drivers/liberatr.c @@ -389,7 +389,7 @@ static MACHINE_CONFIG_START( liberatr, liberatr_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6502, MASTER_CLOCK/16) /* 1.25Mhz divided from 20Mhz master clock */ MCFG_CPU_PROGRAM_MAP(liberatr_map) - MCFG_CPU_PERIODIC_INT(irq0_line_hold,4*60) + MCFG_DEVICE_PERIODIC_INT_DRIVER(driver_device,irq0_line_hold,4*60) MCFG_ER2055_ADD("earom") diff --git a/src/mame/drivers/limenko.c b/src/mame/drivers/limenko.c index aaec636d0b2..3b89928ee6f 100644 --- a/src/mame/drivers/limenko.c +++ b/src/mame/drivers/limenko.c @@ -107,19 +107,19 @@ WRITE32_MEMBER(limenko_state::limenko_paletteram_w) WRITE32_MEMBER(limenko_state::bg_videoram_w) { - COMBINE_DATA(&m_bg_videoram.target()[offset]); + COMBINE_DATA(&m_bg_videoram[offset]); m_bg_tilemap->mark_tile_dirty(offset); } WRITE32_MEMBER(limenko_state::md_videoram_w) { - COMBINE_DATA(&m_md_videoram.target()[offset]); + COMBINE_DATA(&m_md_videoram[offset]); m_md_tilemap->mark_tile_dirty(offset); } WRITE32_MEMBER(limenko_state::fg_videoram_w) { - COMBINE_DATA(&m_fg_videoram.target()[offset]); + COMBINE_DATA(&m_fg_videoram[offset]); m_fg_tilemap->mark_tile_dirty(offset); } @@ -155,7 +155,7 @@ WRITE32_MEMBER(limenko_state::spriteram_buffer_w) } // buffer the next number of sprites to draw - m_prev_sprites_count = (m_videoreg.target()[0] & 0x1ff0000) >> 16; + m_prev_sprites_count = (m_videoreg[0] & 0x1ff0000) >> 16; } /***************************************************************************************************** @@ -245,24 +245,24 @@ ADDRESS_MAP_END static TILE_GET_INFO( get_bg_tile_info ) { limenko_state *state = machine.driver_data(); - int tile = state->m_bg_videoram.target()[tile_index] & 0x7ffff; - int color = (state->m_bg_videoram.target()[tile_index]>>28) & 0xf; + int tile = state->m_bg_videoram[tile_index] & 0x7ffff; + int color = (state->m_bg_videoram[tile_index]>>28) & 0xf; SET_TILE_INFO(0,tile,color,0); } static TILE_GET_INFO( get_md_tile_info ) { limenko_state *state = machine.driver_data(); - int tile = state->m_md_videoram.target()[tile_index] & 0x7ffff; - int color = (state->m_md_videoram.target()[tile_index]>>28) & 0xf; + int tile = state->m_md_videoram[tile_index] & 0x7ffff; + int color = (state->m_md_videoram[tile_index]>>28) & 0xf; SET_TILE_INFO(0,tile,color,0); } static TILE_GET_INFO( get_fg_tile_info ) { limenko_state *state = machine.driver_data(); - int tile = state->m_fg_videoram.target()[tile_index] & 0x7ffff; - int color = (state->m_fg_videoram.target()[tile_index]>>28) & 0xf; + int tile = state->m_fg_videoram[tile_index] & 0x7ffff; + int color = (state->m_fg_videoram[tile_index]>>28) & 0xf; SET_TILE_INFO(0,tile,color,0); } @@ -465,27 +465,27 @@ static VIDEO_START( limenko ) static SCREEN_UPDATE_IND16( limenko ) { limenko_state *state = screen.machine().driver_data(); - // state->m_videoreg.target()[4] ???? It always has this value: 0xffeffff8 (2 signed bytes? values: -17 and -8 ?) + // state->m_videoreg[4] ???? It always has this value: 0xffeffff8 (2 signed bytes? values: -17 and -8 ?) screen.machine().priority_bitmap.fill(0, cliprect); - state->m_bg_tilemap->enable(state->m_videoreg.target()[0] & 4); - state->m_md_tilemap->enable(state->m_videoreg.target()[0] & 2); - state->m_fg_tilemap->enable(state->m_videoreg.target()[0] & 1); + state->m_bg_tilemap->enable(state->m_videoreg[0] & 4); + state->m_md_tilemap->enable(state->m_videoreg[0] & 2); + state->m_fg_tilemap->enable(state->m_videoreg[0] & 1); - state->m_bg_tilemap->set_scrolly(0, state->m_videoreg.target()[3] & 0xffff); - state->m_md_tilemap->set_scrolly(0, state->m_videoreg.target()[2] & 0xffff); - state->m_fg_tilemap->set_scrolly(0, state->m_videoreg.target()[1] & 0xffff); + state->m_bg_tilemap->set_scrolly(0, state->m_videoreg[3] & 0xffff); + state->m_md_tilemap->set_scrolly(0, state->m_videoreg[2] & 0xffff); + state->m_fg_tilemap->set_scrolly(0, state->m_videoreg[1] & 0xffff); - state->m_bg_tilemap->set_scrollx(0, (state->m_videoreg.target()[3] & 0xffff0000) >> 16); - state->m_md_tilemap->set_scrollx(0, (state->m_videoreg.target()[2] & 0xffff0000) >> 16); - state->m_fg_tilemap->set_scrollx(0, (state->m_videoreg.target()[1] & 0xffff0000) >> 16); + state->m_bg_tilemap->set_scrollx(0, (state->m_videoreg[3] & 0xffff0000) >> 16); + state->m_md_tilemap->set_scrollx(0, (state->m_videoreg[2] & 0xffff0000) >> 16); + state->m_fg_tilemap->set_scrollx(0, (state->m_videoreg[1] & 0xffff0000) >> 16); state->m_bg_tilemap->draw(bitmap, cliprect, 0,0); state->m_md_tilemap->draw(bitmap, cliprect, 0,0); state->m_fg_tilemap->draw(bitmap, cliprect, 0,1); - if(state->m_videoreg.target()[0] & 8) + if(state->m_videoreg[0] & 8) copy_sprites(screen.machine(), bitmap, state->m_sprites_bitmap, screen.machine().priority_bitmap, cliprect); return 0; @@ -1006,7 +1006,7 @@ READ32_MEMBER(limenko_state::dynabomb_speedup_r) machine().firstcpu->eat_cycles(50); } - return m_mainram.target()[0xe2784/4]; + return m_mainram[0xe2784/4]; } READ32_MEMBER(limenko_state::legendoh_speedup_r) @@ -1016,7 +1016,7 @@ READ32_MEMBER(limenko_state::legendoh_speedup_r) machine().firstcpu->eat_cycles(50); } - return m_mainram.target()[0x32ab0/4]; + return m_mainram[0x32ab0/4]; } READ32_MEMBER(limenko_state::sb2003_speedup_r) @@ -1026,7 +1026,7 @@ READ32_MEMBER(limenko_state::sb2003_speedup_r) machine().firstcpu->eat_cycles(50); } - return m_mainram.target()[0x135800/4]; + return m_mainram[0x135800/4]; } READ32_MEMBER(limenko_state::spotty_speedup_r) @@ -1036,7 +1036,7 @@ READ32_MEMBER(limenko_state::spotty_speedup_r) machine().firstcpu->eat_cycles(50); } - return m_mainram.target()[0x6626c/4]; + return m_mainram[0x6626c/4]; } static DRIVER_INIT( dynabomb ) diff --git a/src/mame/drivers/littlerb.c b/src/mame/drivers/littlerb.c index e9bbd711788..7ce627c7279 100644 --- a/src/mame/drivers/littlerb.c +++ b/src/mame/drivers/littlerb.c @@ -112,7 +112,7 @@ public: WRITE16_MEMBER(littlerb_state::region4_w) { - COMBINE_DATA(&m_region4.target()[offset]); + COMBINE_DATA(&m_region4[offset]); } READ16_MEMBER(littlerb_state::buffer_status_r) @@ -472,7 +472,7 @@ static SCREEN_UPDATE_IND16(littlerb) littlerb_state *state = screen.machine().driver_data(); int x,y,offs; int xsize,ysize; - UINT16* spriteregion = &state->m_region4.target()[0x400]; + UINT16* spriteregion = &state->m_region4[0x400]; bitmap.fill(get_black_pen(screen.machine()), cliprect); //printf("frame\n"); /* the spriteram format is something like this .. */ diff --git a/src/mame/drivers/looping.c b/src/mame/drivers/looping.c index bf422a2f20e..ae4672b95fd 100644 --- a/src/mame/drivers/looping.c +++ b/src/mame/drivers/looping.c @@ -192,8 +192,8 @@ static PALETTE_INIT( looping ) static TILE_GET_INFO( get_tile_info ) { looping_state *state = machine.driver_data(); - int tile_number = state->m_videoram.target()[tile_index]; - int color = state->m_colorram.target()[(tile_index & 0x1f) * 2 + 1] & 0x07; + int tile_number = state->m_videoram[tile_index]; + int color = state->m_colorram[(tile_index & 0x1f) * 2 + 1] & 0x07; SET_TILE_INFO(0, tile_number, color, 0); } @@ -231,7 +231,7 @@ WRITE8_MEMBER(looping_state::flip_screen_y_w) WRITE8_MEMBER(looping_state::looping_videoram_w) { - m_videoram.target()[offset] = data; + m_videoram[offset] = data; m_bg_tilemap->mark_tile_dirty(offset); } @@ -240,7 +240,7 @@ WRITE8_MEMBER(looping_state::looping_colorram_w) { int i; - m_colorram.target()[offset] = data; + m_colorram[offset] = data; /* odd bytes are column color attribute */ if (offset & 1) @@ -269,7 +269,7 @@ static void draw_sprites(running_machine &machine, bitmap_ind16 &bitmap, const r const UINT8 *source; looping_state *state = machine.driver_data(); - for (source = state->m_spriteram.target(); source < state->m_spriteram + 0x40; source += 4) + for (source = state->m_spriteram; source < state->m_spriteram + 0x40; source += 4) { int sx = source[3]; int sy = 240 - source[0]; diff --git a/src/mame/drivers/ltcasino.c b/src/mame/drivers/ltcasino.c index 7fa68450a54..7bd9f2876c7 100644 --- a/src/mame/drivers/ltcasino.c +++ b/src/mame/drivers/ltcasino.c @@ -41,8 +41,8 @@ static TILE_GET_INFO( get_ltcasino_tile_info ) ltcasino_state *state = machine.driver_data(); int tileno, colour; - tileno = state->m_tile_num_ram.target()[tile_index]; - colour = state->m_tile_atr_ram.target()[tile_index]; + tileno = state->m_tile_num_ram[tile_index]; + colour = state->m_tile_atr_ram[tile_index]; tileno += (colour & 0x80) << 1; @@ -58,13 +58,13 @@ static VIDEO_START(ltcasino) WRITE8_MEMBER(ltcasino_state::ltcasino_tile_num_w) { - m_tile_num_ram.target()[offset] = data; + m_tile_num_ram[offset] = data; m_tilemap->mark_tile_dirty(offset); } WRITE8_MEMBER(ltcasino_state::ltcasino_tile_atr_w) { - m_tile_atr_ram.target()[offset] = data; + m_tile_atr_ram[offset] = data; m_tilemap->mark_tile_dirty(offset); } diff --git a/src/mame/drivers/luckgrln.c b/src/mame/drivers/luckgrln.c index 31e35508fab..045955b9873 100644 --- a/src/mame/drivers/luckgrln.c +++ b/src/mame/drivers/luckgrln.c @@ -149,13 +149,13 @@ public: WRITE8_MEMBER(luckgrln_state::luckgrln_reel1_ram_w) { - m_reel1_ram.target()[offset] = data; + m_reel1_ram[offset] = data; m_reel1_tilemap->mark_tile_dirty(offset); } WRITE8_MEMBER(luckgrln_state::luckgrln_reel1_attr_w) { - m_reel1_attr.target()[offset] = data; + m_reel1_attr[offset] = data; m_reel1_tilemap->mark_tile_dirty(offset); } @@ -164,8 +164,8 @@ WRITE8_MEMBER(luckgrln_state::luckgrln_reel1_attr_w) static TILE_GET_INFO( get_luckgrln_reel1_tile_info ) { luckgrln_state *state = machine.driver_data(); - int code = state->m_reel1_ram.target()[tile_index]; - int attr = state->m_reel1_attr.target()[tile_index]; + int code = state->m_reel1_ram[tile_index]; + int attr = state->m_reel1_attr[tile_index]; int col = (attr & 0x1f); code |= (attr & 0xe0)<<3; @@ -181,13 +181,13 @@ static TILE_GET_INFO( get_luckgrln_reel1_tile_info ) WRITE8_MEMBER(luckgrln_state::luckgrln_reel2_ram_w) { - m_reel2_ram.target()[offset] = data; + m_reel2_ram[offset] = data; m_reel2_tilemap->mark_tile_dirty(offset); } WRITE8_MEMBER(luckgrln_state::luckgrln_reel2_attr_w) { - m_reel2_attr.target()[offset] = data; + m_reel2_attr[offset] = data; m_reel2_tilemap->mark_tile_dirty(offset); } @@ -195,8 +195,8 @@ WRITE8_MEMBER(luckgrln_state::luckgrln_reel2_attr_w) static TILE_GET_INFO( get_luckgrln_reel2_tile_info ) { luckgrln_state *state = machine.driver_data(); - int code = state->m_reel2_ram.target()[tile_index]; - int attr = state->m_reel2_attr.target()[tile_index]; + int code = state->m_reel2_ram[tile_index]; + int attr = state->m_reel2_attr[tile_index]; int col = (attr & 0x1f); code |= (attr & 0xe0)<<3; @@ -211,13 +211,13 @@ static TILE_GET_INFO( get_luckgrln_reel2_tile_info ) WRITE8_MEMBER(luckgrln_state::luckgrln_reel3_ram_w) { - m_reel3_ram.target()[offset] = data; + m_reel3_ram[offset] = data; m_reel3_tilemap->mark_tile_dirty(offset); } WRITE8_MEMBER(luckgrln_state::luckgrln_reel3_attr_w) { - m_reel3_attr.target()[offset] = data; + m_reel3_attr[offset] = data; m_reel3_tilemap->mark_tile_dirty(offset); } @@ -225,8 +225,8 @@ WRITE8_MEMBER(luckgrln_state::luckgrln_reel3_attr_w) static TILE_GET_INFO( get_luckgrln_reel3_tile_info ) { luckgrln_state *state = machine.driver_data(); - int code = state->m_reel3_ram.target()[tile_index]; - int attr = state->m_reel3_attr.target()[tile_index]; + int code = state->m_reel3_ram[tile_index]; + int attr = state->m_reel3_attr[tile_index]; int col = (attr & 0x1f); code |= (attr & 0xe0)<<3; @@ -240,13 +240,13 @@ static TILE_GET_INFO( get_luckgrln_reel3_tile_info ) WRITE8_MEMBER(luckgrln_state::luckgrln_reel4_ram_w) { - m_reel4_ram.target()[offset] = data; + m_reel4_ram[offset] = data; m_reel4_tilemap->mark_tile_dirty(offset); } WRITE8_MEMBER(luckgrln_state::luckgrln_reel4_attr_w) { - m_reel4_attr.target()[offset] = data; + m_reel4_attr[offset] = data; m_reel4_tilemap->mark_tile_dirty(offset); } @@ -254,8 +254,8 @@ WRITE8_MEMBER(luckgrln_state::luckgrln_reel4_attr_w) static TILE_GET_INFO( get_luckgrln_reel4_tile_info ) { luckgrln_state *state = machine.driver_data(); - int code = state->m_reel4_ram.target()[tile_index]; - int attr = state->m_reel4_attr.target()[tile_index]; + int code = state->m_reel4_ram[tile_index]; + int attr = state->m_reel4_attr[tile_index]; int col = (attr & 0x1f); code |= (attr & 0xe0)<<3; @@ -300,10 +300,10 @@ static SCREEN_UPDATE_IND16(luckgrln) for (i= 0;i < 64;i++) { - state->m_reel1_tilemap->set_scrolly(i, state->m_reel1_scroll.target()[i]); - state->m_reel2_tilemap->set_scrolly(i, state->m_reel2_scroll.target()[i]); - state->m_reel3_tilemap->set_scrolly(i, state->m_reel3_scroll.target()[i]); - state->m_reel4_tilemap->set_scrolly(i, state->m_reel4_scroll.target()[i]); + state->m_reel1_tilemap->set_scrolly(i, state->m_reel1_scroll[i]); + state->m_reel2_tilemap->set_scrolly(i, state->m_reel2_scroll[i]); + state->m_reel3_tilemap->set_scrolly(i, state->m_reel3_scroll[i]); + state->m_reel4_tilemap->set_scrolly(i, state->m_reel4_scroll[i]); } @@ -317,9 +317,9 @@ static SCREEN_UPDATE_IND16(luckgrln) for (x=0;x<64;x++) { - UINT16 tile = (state->m_luck_vram1.target()[count] & 0xff); - UINT16 tile_high = (state->m_luck_vram2.target()[count]); - UINT16 tileattr = (state->m_luck_vram3.target()[count]); + UINT16 tile = (state->m_luck_vram1[count] & 0xff); + UINT16 tile_high = (state->m_luck_vram2[count]); + UINT16 tileattr = (state->m_luck_vram3[count]); UINT8 col = 0; UINT8 region = 0; UINT8 bgenable; diff --git a/src/mame/drivers/m14.c b/src/mame/drivers/m14.c index 319f970fd24..83f5de6e1b5 100644 --- a/src/mame/drivers/m14.c +++ b/src/mame/drivers/m14.c @@ -109,8 +109,8 @@ static TILE_GET_INFO( m14_get_tile_info ) { m14_state *state = machine.driver_data(); - int code = state->m_video_ram.target()[tile_index]; - int color = state->m_color_ram.target()[tile_index] & 0x0f; + int code = state->m_video_ram[tile_index]; + int color = state->m_color_ram[tile_index] & 0x0f; /* colorram & 0xf0 used but unknown purpose*/ @@ -140,14 +140,14 @@ static SCREEN_UPDATE_IND16( m14 ) WRITE8_MEMBER(m14_state::m14_vram_w) { - m_video_ram.target()[offset] = data; + m_video_ram[offset] = data; m_m14_tilemap->mark_tile_dirty(offset); } WRITE8_MEMBER(m14_state::m14_cram_w) { - m_color_ram.target()[offset] = data; + m_color_ram[offset] = data; m_m14_tilemap->mark_tile_dirty(offset); } diff --git a/src/mame/drivers/m63.c b/src/mame/drivers/m63.c index a2e87de9edb..9a6b33040e9 100644 --- a/src/mame/drivers/m63.c +++ b/src/mame/drivers/m63.c @@ -236,21 +236,21 @@ static PALETTE_INIT( m63 ) WRITE8_MEMBER(m63_state::m63_videoram_w) { - m_videoram.target()[offset] = data; + m_videoram[offset] = data; m_bg_tilemap->mark_tile_dirty(offset); } WRITE8_MEMBER(m63_state::m63_colorram_w) { - m_colorram.target()[offset] = data; + m_colorram[offset] = data; m_bg_tilemap->mark_tile_dirty(offset); } WRITE8_MEMBER(m63_state::m63_videoram2_w) { - m_videoram2.target()[offset] = data; + m_videoram2[offset] = data; m_fg_tilemap->mark_tile_dirty(offset); } @@ -285,8 +285,8 @@ static TILE_GET_INFO( get_bg_tile_info ) { m63_state *state = machine.driver_data(); - int attr = state->m_colorram.target()[tile_index]; - int code = state->m_videoram.target()[tile_index] | ((attr & 0x30) << 4); + int attr = state->m_colorram[tile_index]; + int code = state->m_videoram[tile_index] | ((attr & 0x30) << 4); int color = (attr & 0x0f) + (state->m_pal_bank << 4); SET_TILE_INFO(1, code, color, 0); @@ -296,7 +296,7 @@ static TILE_GET_INFO( get_fg_tile_info ) { m63_state *state = machine.driver_data(); - int code = state->m_videoram2.target()[tile_index]; + int code = state->m_videoram2[tile_index]; SET_TILE_INFO(0, code, 0, state->m_fg_flag); } @@ -319,12 +319,12 @@ static void draw_sprites( running_machine &machine, bitmap_ind16 &bitmap, const for (offs = 0; offs < state->m_spriteram.bytes(); offs += 4) { - int code = state->m_spriteram.target()[offs + 1] | ((state->m_spriteram.target()[offs + 2] & 0x10) << 4); - int color = (state->m_spriteram.target()[offs + 2] & 0x0f) + (state->m_pal_bank << 4); - int flipx = state->m_spriteram.target()[offs + 2] & 0x20; + int code = state->m_spriteram[offs + 1] | ((state->m_spriteram[offs + 2] & 0x10) << 4); + int color = (state->m_spriteram[offs + 2] & 0x0f) + (state->m_pal_bank << 4); + int flipx = state->m_spriteram[offs + 2] & 0x20; int flipy = 0; - int sx = state->m_spriteram.target()[offs + 3]; - int sy = state->m_sy_offset - state->m_spriteram.target()[offs]; + int sx = state->m_spriteram[offs + 3]; + int sy = state->m_sy_offset - state->m_spriteram[offs]; if (state->flip_screen()) { @@ -360,7 +360,7 @@ static SCREEN_UPDATE_IND16( m63 ) int col; for (col = 0; col < 32; col++) - state->m_bg_tilemap->set_scrolly(col, state->m_scrollram.target()[col * 8]); + state->m_bg_tilemap->set_scrolly(col, state->m_scrollram[col * 8]); state->m_bg_tilemap->draw(bitmap, cliprect, 0, 0); draw_sprites(screen.machine(), bitmap, cliprect); diff --git a/src/mame/drivers/m79amb.c b/src/mame/drivers/m79amb.c index a7845b8d12b..2144f5e0231 100644 --- a/src/mame/drivers/m79amb.c +++ b/src/mame/drivers/m79amb.c @@ -82,7 +82,7 @@ public: WRITE8_MEMBER(m79amb_state::ramtek_videoram_w) { - m_videoram.target()[offset] = data & ~*m_mask.target(); + m_videoram[offset] = data & ~*m_mask; } static SCREEN_UPDATE_RGB32( ramtek ) @@ -94,7 +94,7 @@ static SCREEN_UPDATE_RGB32( ramtek ) { int i; - UINT8 data = state->m_videoram.target()[offs]; + UINT8 data = state->m_videoram[offs]; int y = offs >> 5; int x = (offs & 0x1f) << 3; diff --git a/src/mame/drivers/magic10.c b/src/mame/drivers/magic10.c index 814cf82ae34..3196a5ed287 100644 --- a/src/mame/drivers/magic10.c +++ b/src/mame/drivers/magic10.c @@ -121,19 +121,19 @@ public: WRITE16_MEMBER(magic10_state::layer0_videoram_w) { - COMBINE_DATA(&m_layer0_videoram.target()[offset]); + COMBINE_DATA(&m_layer0_videoram[offset]); m_layer0_tilemap->mark_tile_dirty(offset >> 1); } WRITE16_MEMBER(magic10_state::layer1_videoram_w) { - COMBINE_DATA(&m_layer1_videoram.target()[offset]); + COMBINE_DATA(&m_layer1_videoram[offset]); m_layer1_tilemap->mark_tile_dirty(offset >> 1); } WRITE16_MEMBER(magic10_state::layer2_videoram_w) { - COMBINE_DATA(&m_layer2_videoram.target()[offset]); + COMBINE_DATA(&m_layer2_videoram[offset]); m_layer2_tilemap->mark_tile_dirty(offset >> 1); } @@ -150,9 +150,9 @@ static TILE_GET_INFO( get_layer0_tile_info ) SET_TILE_INFO ( 1, - state->m_layer0_videoram.target()[tile_index * 2], - state->m_layer0_videoram.target()[tile_index * 2 + 1] & 0x0f, - TILE_FLIPYX((state->m_layer0_videoram.target()[tile_index * 2 + 1] & 0xc0) >> 6) + state->m_layer0_videoram[tile_index * 2], + state->m_layer0_videoram[tile_index * 2 + 1] & 0x0f, + TILE_FLIPYX((state->m_layer0_videoram[tile_index * 2 + 1] & 0xc0) >> 6) ); } @@ -162,9 +162,9 @@ static TILE_GET_INFO( get_layer1_tile_info ) SET_TILE_INFO ( 1, - state->m_layer1_videoram.target()[tile_index * 2], - state->m_layer1_videoram.target()[tile_index * 2 + 1] & 0x0f, - TILE_FLIPYX((state->m_layer1_videoram.target()[tile_index * 2 + 1] & 0xc0) >> 6) + state->m_layer1_videoram[tile_index * 2], + state->m_layer1_videoram[tile_index * 2 + 1] & 0x0f, + TILE_FLIPYX((state->m_layer1_videoram[tile_index * 2 + 1] & 0xc0) >> 6) ); } @@ -174,8 +174,8 @@ static TILE_GET_INFO( get_layer2_tile_info ) SET_TILE_INFO ( 0, - state->m_layer2_videoram.target()[tile_index * 2], - state->m_layer2_videoram.target()[tile_index * 2 + 1] & 0x0f, + state->m_layer2_videoram[tile_index * 2], + state->m_layer2_videoram[tile_index * 2 + 1] & 0x0f, 0 ); } @@ -203,8 +203,8 @@ static SCREEN_UPDATE_IND16( magic10 ) 4 and 6 are y/x global register writes. 0 and 2 are y/x writes for the scrolling layer. */ - state->m_layer1_tilemap->set_scrolly(0, (state->m_vregs.target()[0/2] - state->m_vregs.target()[4/2])+0); - state->m_layer1_tilemap->set_scrollx(0, (state->m_vregs.target()[2/2] - state->m_vregs.target()[6/2])+4); + state->m_layer1_tilemap->set_scrolly(0, (state->m_vregs[0/2] - state->m_vregs[4/2])+0); + state->m_layer1_tilemap->set_scrollx(0, (state->m_vregs[2/2] - state->m_vregs[6/2])+4); state->m_layer0_tilemap->draw(bitmap, cliprect, 0, 0); state->m_layer1_tilemap->draw(bitmap, cliprect, 0, 0); diff --git a/src/mame/drivers/magicard.c b/src/mame/drivers/magicard.c index e414ca4e6a1..ba2fe03bdcf 100644 --- a/src/mame/drivers/magicard.c +++ b/src/mame/drivers/magicard.c @@ -248,7 +248,7 @@ TODO: check this register,doesn't seem to be 100% correct. */ /*63 at post test,6d all the time.*/ -#define SCC_CSR_VREG (state->m_pcab_vregs.target()[0x00/2] & 0xffff) +#define SCC_CSR_VREG (state->m_pcab_vregs[0x00/2] & 0xffff) #define SCC_CG_VREG ((SCC_CSR_VREG & 0x10)>>4) /* @@ -274,7 +274,7 @@ TODO: check this register,doesn't seem to be 100% correct. w ........ ....aaaa VSR:H = video start address (MSB's) */ -#define SCC_DCR_VREG (state->m_pcab_vregs.target()[0x02/2] & 0xffff) +#define SCC_DCR_VREG (state->m_pcab_vregs[0x02/2] & 0xffff) #define SCC_DE_VREG ((SCC_DCR_VREG & 0x8000)>>15) #define SCC_FG_VREG ((SCC_DCR_VREG & 0x0080)>>7) #define SCC_VSR_VREG_H ((SCC_DCR_VREG & 0xf)>>0) @@ -284,7 +284,7 @@ TODO: check this register,doesn't seem to be 100% correct. w aaaaaaaa aaaaaaaa VSR:L = video start address (LSB's) */ -#define SCC_VSR_VREG_L (state->m_pcab_vregs.target()[0x04/2] & 0xffff) +#define SCC_VSR_VREG_L (state->m_pcab_vregs[0x04/2] & 0xffff) #define SCC_VSR_VREG ((SCC_VSR_VREG_H)<<16) | (SCC_VSR_VREG_L) /* @@ -303,7 +303,7 @@ TODO: check this register,doesn't seem to be 100% correct. w ........ xxxx.... not used w ........ ....aaaa "data" (dunno the purpose...) */ -#define SCC_DCR2_VREG (state->m_pcab_vregs.target()[0x08/2] & 0xffff) +#define SCC_DCR2_VREG (state->m_pcab_vregs[0x08/2] & 0xffff) /* (Note: not present on the original vreg listing) @@ -324,14 +324,14 @@ TODO: check this register,doesn't seem to be 100% correct. 1ffff0 a = source register a w nnnnnnnn nnnnnnnn source */ -#define SCC_SRCA_VREG (state->m_pcab_vregs.target()[0x10/2] & 0xffff) +#define SCC_SRCA_VREG (state->m_pcab_vregs[0x10/2] & 0xffff) /* 1ffff2 b = destination register b rw nnnnnnnn nnnnnnnn destination */ -#define SCC_DSTB_VREG (state->m_pcab_vregs.target()[0x12/2] & 0xffff) +#define SCC_DSTB_VREG (state->m_pcab_vregs[0x12/2] & 0xffff) /* 1ffff4 pcr = pixac command register @@ -378,7 +378,7 @@ TODO: check this register,doesn't seem to be 100% correct. w ........ .......0 */ -#define SCC_PCR_VREG (state->m_pcab_vregs.target()[0x14/2] & 0xffff) +#define SCC_PCR_VREG (state->m_pcab_vregs[0x14/2] & 0xffff) /* 1ffff6 mask = mask register @@ -430,22 +430,22 @@ static SCREEN_UPDATE_RGB32(magicard) { UINT32 color; - color = ((state->m_magicram.target()[count]) & 0x000f)>>0; + color = ((state->m_magicram[count]) & 0x000f)>>0; if(cliprect.contains((x*4)+3, y)) bitmap.pix32(y, (x*4)+3) = screen.machine().pens[color]; - color = ((state->m_magicram.target()[count]) & 0x00f0)>>4; + color = ((state->m_magicram[count]) & 0x00f0)>>4; if(cliprect.contains((x*4)+2, y)) bitmap.pix32(y, (x*4)+2) = screen.machine().pens[color]; - color = ((state->m_magicram.target()[count]) & 0x0f00)>>8; + color = ((state->m_magicram[count]) & 0x0f00)>>8; if(cliprect.contains((x*4)+1, y)) bitmap.pix32(y, (x*4)+1) = screen.machine().pens[color]; - color = ((state->m_magicram.target()[count]) & 0xf000)>>12; + color = ((state->m_magicram[count]) & 0xf000)>>12; if(cliprect.contains((x*4)+0, y)) bitmap.pix32(y, (x*4)+0) = screen.machine().pens[color]; @@ -462,12 +462,12 @@ static SCREEN_UPDATE_RGB32(magicard) { UINT32 color; - color = ((state->m_magicram.target()[count]) & 0x00ff)>>0; + color = ((state->m_magicram[count]) & 0x00ff)>>0; if(cliprect.contains((x*2)+1, y)) bitmap.pix32(y, (x*2)+1) = screen.machine().pens[color]; - color = ((state->m_magicram.target()[count]) & 0xff00)>>8; + color = ((state->m_magicram[count]) & 0xff00)>>8; if(cliprect.contains((x*2)+0, y)) bitmap.pix32(y, (x*2)+0) = screen.machine().pens[color]; @@ -534,17 +534,17 @@ READ16_MEMBER(magicard_state::philips_66470_r) //printf("[%04x]\n",offset*2); - return m_pcab_vregs.target()[offset]; + return m_pcab_vregs[offset]; } WRITE16_MEMBER(magicard_state::philips_66470_w) { - COMBINE_DATA(&m_pcab_vregs.target()[offset]); + COMBINE_DATA(&m_pcab_vregs[offset]); // if(offset == 0x10/2) // { - //printf("%04x %04x %04x\n",data,m_pcab_vregs.target()[0x12/2],m_pcab_vregs.target()[0x14/2]); - //m_pcab_vregs.target()[0x12/2] = m_pcab_vregs.target()[0x10/2]; + //printf("%04x %04x %04x\n",data,m_pcab_vregs[0x12/2],m_pcab_vregs[0x14/2]); + //m_pcab_vregs[0x12/2] = m_pcab_vregs[0x10/2]; // } } @@ -552,12 +552,12 @@ WRITE16_MEMBER(magicard_state::philips_66470_w) READ16_MEMBER(magicard_state::scc68070_ext_irqc_r) { - return m_scc68070_ext_irqc_regs.target()[offset]; + return m_scc68070_ext_irqc_regs[offset]; } WRITE16_MEMBER(magicard_state::scc68070_ext_irqc_w) { - m_scc68070_ext_irqc_regs.target()[offset] = data; + m_scc68070_ext_irqc_regs[offset] = data; } READ16_MEMBER(magicard_state::scc68070_iic_r) @@ -566,15 +566,15 @@ READ16_MEMBER(magicard_state::scc68070_iic_r) switch(offset) { - case 0x04/2: return m_scc68070_iic_regs.target()[offset] & 0xef; //iic status register, bit 4 = pending irq + case 0x04/2: return m_scc68070_iic_regs[offset] & 0xef; //iic status register, bit 4 = pending irq } - return m_scc68070_iic_regs.target()[offset]; + return m_scc68070_iic_regs[offset]; } WRITE16_MEMBER(magicard_state::scc68070_iic_w) { - m_scc68070_iic_regs.target()[offset] = data; + m_scc68070_iic_regs[offset] = data; } READ16_MEMBER(magicard_state::scc68070_uart_r) @@ -586,62 +586,62 @@ READ16_MEMBER(magicard_state::scc68070_uart_r) case 0x02/2: return machine().rand(); //uart mode register } - return m_scc68070_uart_regs.target()[offset]; + return m_scc68070_uart_regs[offset]; } WRITE16_MEMBER(magicard_state::scc68070_uart_w) { - m_scc68070_uart_regs.target()[offset] = data; + m_scc68070_uart_regs[offset] = data; } READ16_MEMBER(magicard_state::scc68070_timer_r) { - return m_scc68070_timer_regs.target()[offset]; + return m_scc68070_timer_regs[offset]; } WRITE16_MEMBER(magicard_state::scc68070_timer_w) { - m_scc68070_timer_regs.target()[offset] = data; + m_scc68070_timer_regs[offset] = data; } READ16_MEMBER(magicard_state::scc68070_int_irqc_r) { - return m_scc68070_int_irqc_regs.target()[offset]; + return m_scc68070_int_irqc_regs[offset]; } WRITE16_MEMBER(magicard_state::scc68070_int_irqc_w) { - m_scc68070_int_irqc_regs.target()[offset] = data; + m_scc68070_int_irqc_regs[offset] = data; } READ16_MEMBER(magicard_state::scc68070_dma_ch1_r) { - return m_scc68070_dma_ch1_regs.target()[offset]; + return m_scc68070_dma_ch1_regs[offset]; } WRITE16_MEMBER(magicard_state::scc68070_dma_ch1_w) { - m_scc68070_dma_ch1_regs.target()[offset] = data; + m_scc68070_dma_ch1_regs[offset] = data; } READ16_MEMBER(magicard_state::scc68070_dma_ch2_r) { - return m_scc68070_dma_ch2_regs.target()[offset]; + return m_scc68070_dma_ch2_regs[offset]; } WRITE16_MEMBER(magicard_state::scc68070_dma_ch2_w) { - m_scc68070_dma_ch2_regs.target()[offset] = data; + m_scc68070_dma_ch2_regs[offset] = data; } READ16_MEMBER(magicard_state::scc68070_mmu_r) { - return m_scc68070_mmu_regs.target()[offset]; + return m_scc68070_mmu_regs[offset]; } WRITE16_MEMBER(magicard_state::scc68070_mmu_w) { - m_scc68070_mmu_regs.target()[offset] = data; + m_scc68070_mmu_regs[offset] = data; switch(offset) { @@ -694,7 +694,7 @@ static MACHINE_RESET( magicard ) { magicard_state *state = machine.driver_data(); UINT16 *src = (UINT16*)machine.region("maincpu" )->base(); - UINT16 *dst = state->m_magicram.target(); + UINT16 *dst = state->m_magicram; memcpy (dst, src, 0x80000); machine.device("maincpu")->reset(); } diff --git a/src/mame/drivers/magicfly.c b/src/mame/drivers/magicfly.c index 03f318370ce..d0605fab00d 100644 --- a/src/mame/drivers/magicfly.c +++ b/src/mame/drivers/magicfly.c @@ -443,13 +443,13 @@ public: WRITE8_MEMBER(magicfly_state::magicfly_videoram_w) { - m_videoram.target()[offset] = data; + m_videoram[offset] = data; m_bg_tilemap->mark_tile_dirty(offset); } WRITE8_MEMBER(magicfly_state::magicfly_colorram_w) { - m_colorram.target()[offset] = data; + m_colorram[offset] = data; m_bg_tilemap->mark_tile_dirty(offset); } @@ -465,16 +465,16 @@ static TILE_GET_INFO( get_magicfly_tile_info ) x--- ---- Mirrored from bit 3. The code check this one to boot the game. */ - int attr = state->m_colorram.target()[tile_index]; - int code = state->m_videoram.target()[tile_index]; + int attr = state->m_colorram[tile_index]; + int code = state->m_videoram[tile_index]; int bank = (attr & 0x10) >> 4; /* bit 4 switch the gfx banks */ int color = attr & 0x07; /* bits 0-2 for color */ /* Seems that bit 7 is mirrored from bit 3 to have a normal boot */ /* Boot only check the first color RAM offset */ - state->m_colorram.target()[0] = state->m_colorram.target()[0] | ((state->m_colorram.target()[0] & 0x08) << 4); /* only for 1st offset */ - //state->m_colorram.target()[tile_index] = attr | ((attr & 0x08) << 4); /* for the whole color RAM */ + state->m_colorram[0] = state->m_colorram[0] | ((state->m_colorram[0] & 0x08) << 4); /* only for 1st offset */ + //state->m_colorram[tile_index] = attr | ((attr & 0x08) << 4); /* for the whole color RAM */ SET_TILE_INFO(bank, code, color, 0); } @@ -497,16 +497,16 @@ static TILE_GET_INFO( get_7mezzo_tile_info ) x--- ---- Mirrored from bit 2. The code check this one to boot the game. */ - int attr = state->m_colorram.target()[tile_index]; - int code = state->m_videoram.target()[tile_index]; + int attr = state->m_colorram[tile_index]; + int code = state->m_videoram[tile_index]; int bank = (attr & 0x10) >> 4; /* bit 4 switch the gfx banks */ int color = attr & 0x07; /* bits 0-2 for color */ /* Seems that bit 7 is mirrored from bit 2 to have a normal boot */ /* Boot only check the first color RAM offset */ - state->m_colorram.target()[0] = state->m_colorram.target()[0] | ((state->m_colorram.target()[0] & 0x04) << 5); /* only for 1st offset */ - //state->m_colorram.target()[tile_index] = attr | ((attr & 0x04) << 5); /* for the whole color RAM */ + state->m_colorram[0] = state->m_colorram[0] | ((state->m_colorram[0] & 0x04) << 5); /* only for 1st offset */ + //state->m_colorram[tile_index] = attr | ((attr & 0x04) << 5); /* for the whole color RAM */ SET_TILE_INFO(bank, code, color, 0); } diff --git a/src/mame/drivers/magictg.c b/src/mame/drivers/magictg.c index 22346231ddd..f33178a4533 100644 --- a/src/mame/drivers/magictg.c +++ b/src/mame/drivers/magictg.c @@ -242,7 +242,7 @@ void magictg_state::machine_reset() word |= adsp_boot[i*3 + 1] << 8; word |= adsp_boot[i*3 + 2]; - m_adsp_pram.target()[i] = word; + m_adsp_pram[i] = word; } } diff --git a/src/mame/drivers/marinedt.c b/src/mame/drivers/marinedt.c index 82908bceb7f..b4cdc0dc9fb 100644 --- a/src/mame/drivers/marinedt.c +++ b/src/mame/drivers/marinedt.c @@ -153,7 +153,7 @@ public: WRITE8_MEMBER(marinedt_state::tx_tileram_w) { - m_tx_tileram.target()[offset] = data; + m_tx_tileram[offset] = data; m_tx_tilemap->mark_tile_dirty(offset); } @@ -479,7 +479,7 @@ bit0 = 0; static TILE_GET_INFO( get_tile_info ) { marinedt_state *state = machine.driver_data(); - int code = state->m_tx_tileram.target()[tile_index]; + int code = state->m_tx_tileram[tile_index]; int color = 0; int flags = TILE_FLIPX; diff --git a/src/mame/drivers/mastboy.c b/src/mame/drivers/mastboy.c index 1f905cd9af1..3ac72c9aa9d 100644 --- a/src/mame/drivers/mastboy.c +++ b/src/mame/drivers/mastboy.c @@ -493,7 +493,7 @@ static SCREEN_UPDATE_IND16(mastboy) for (i=0;i<0x200;i+=2) { - int coldat = state->m_colram.target()[i+1] | (state->m_colram.target()[i+0]<<8); + int coldat = state->m_colram[i+1] | (state->m_colram[i+0]<<8); palette_set_color_rgb(screen.machine(),i/2,pal4bit(coldat>>8),pal4bit(coldat>>12),pal4bit(coldat>>4)); } @@ -503,8 +503,8 @@ static SCREEN_UPDATE_IND16(mastboy) for (x=0;x<32;x++) { /* bytes 0 and 3 seem to be unused for rendering , they appear to contain data the game uses internally */ - int tileno = (state->m_tileram.target()[count+1]|(state->m_tileram.target()[count+2]<<8))&0xfff; - int attr = (state->m_tileram.target()[count+2]&0xf0)>>4; + int tileno = (state->m_tileram[count+1]|(state->m_tileram[count+2]<<8))&0xfff; + int attr = (state->m_tileram[count+2]&0xf0)>>4; gfx_element *gfx; if (tileno&0x800) @@ -606,14 +606,14 @@ WRITE8_MEMBER(mastboy_state::mastboy_bank_w) READ8_MEMBER(mastboy_state::mastboy_backupram_r) { - return m_nvram.target()[offset]; + return m_nvram[offset]; } WRITE8_MEMBER(mastboy_state::mastboy_backupram_w) { // if (m_backupram_enabled) // { - m_nvram.target()[offset] = data; + m_nvram[offset] = data; // } // else // { diff --git a/src/mame/drivers/mayumi.c b/src/mame/drivers/mayumi.c index 368eec03c29..db363964a9a 100644 --- a/src/mame/drivers/mayumi.c +++ b/src/mame/drivers/mayumi.c @@ -47,8 +47,8 @@ public: static TILE_GET_INFO( get_tile_info ) { mayumi_state *state = machine.driver_data(); - int code = state->m_videoram.target()[tile_index] + (state->m_videoram.target()[tile_index + 0x800] & 0x1f) * 0x100; - int col = (state->m_videoram.target()[tile_index + 0x1000] >> 3) & 0x1f; + int code = state->m_videoram[tile_index] + (state->m_videoram[tile_index + 0x800] & 0x1f) * 0x100; + int col = (state->m_videoram[tile_index + 0x1000] >> 3) & 0x1f; SET_TILE_INFO(0, code, col, 0); } @@ -61,7 +61,7 @@ static VIDEO_START( mayumi ) WRITE8_MEMBER(mayumi_state::mayumi_videoram_w) { - m_videoram.target()[offset] = data; + m_videoram[offset] = data; m_tilemap->mark_tile_dirty(offset & 0x7ff); } diff --git a/src/mame/drivers/mazerbla.c b/src/mame/drivers/mazerbla.c index 6d9abc063ef..a098e8854c6 100644 --- a/src/mame/drivers/mazerbla.c +++ b/src/mame/drivers/mazerbla.c @@ -395,13 +395,13 @@ READ8_MEMBER(mazerbla_state::vcu_set_cmd_param_r) m_vcu_gfx_param_addr = offset; /* offset = 0 is not known */ - m_xpos = m_cfb_ram.target()[m_vcu_gfx_param_addr + 1] | (m_cfb_ram.target()[m_vcu_gfx_param_addr + 2]<<8); - m_ypos = m_cfb_ram.target()[m_vcu_gfx_param_addr + 3] | (m_cfb_ram.target()[m_vcu_gfx_param_addr + 4]<<8); - m_color1 = m_cfb_ram.target()[m_vcu_gfx_param_addr + 5]; - m_color2 = m_cfb_ram.target()[m_vcu_gfx_param_addr + 6]; - m_mode = m_cfb_ram.target()[m_vcu_gfx_param_addr + 7]; - m_pix_xsize = m_cfb_ram.target()[m_vcu_gfx_param_addr + 8]; - m_pix_ysize = m_cfb_ram.target()[m_vcu_gfx_param_addr + 9]; + m_xpos = m_cfb_ram[m_vcu_gfx_param_addr + 1] | (m_cfb_ram[m_vcu_gfx_param_addr + 2]<<8); + m_ypos = m_cfb_ram[m_vcu_gfx_param_addr + 3] | (m_cfb_ram[m_vcu_gfx_param_addr + 4]<<8); + m_color1 = m_cfb_ram[m_vcu_gfx_param_addr + 5]; + m_color2 = m_cfb_ram[m_vcu_gfx_param_addr + 6]; + m_mode = m_cfb_ram[m_vcu_gfx_param_addr + 7]; + m_pix_xsize = m_cfb_ram[m_vcu_gfx_param_addr + 8]; + m_pix_ysize = m_cfb_ram[m_vcu_gfx_param_addr + 9]; m_plane = m_mode & 3; @@ -428,7 +428,7 @@ READ8_MEMBER(mazerbla_state::vcu_set_gfx_addr_r) logerror("paradr="); logerror("%3x ", m_vcu_gfx_param_addr ); - logerror("%02x ", m_cfb_ram.target()[vcu_gfx_param_addr + 0] ); + logerror("%02x ", m_cfb_ram[vcu_gfx_param_addr + 0] ); logerror("x=%04x ", m_xpos ); //1,2 logerror("y=%04x ", m_ypos ); //3,4 logerror("color1=%02x ", m_color1); //5 @@ -571,7 +571,7 @@ READ8_MEMBER(mazerbla_state::vcu_set_clr_addr_r) logerror("paladr="); logerror("%3x ", m_vcu_gfx_param_addr ); - logerror("%02x ", m_cfb_ram.target()[m_vcu_gfx_param_addr + 0] ); + logerror("%02x ", m_cfb_ram[m_vcu_gfx_param_addr + 0] ); logerror("x=%04x ", m_xpos ); //1,2 logerror("y=%04x ", m_ypos ); //3,4 logerror("color1=%02x ", m_color1); //5 @@ -587,7 +587,7 @@ READ8_MEMBER(mazerbla_state::vcu_set_clr_addr_r) logerror("%04x: ", offset + y * 16); for (x = 0; x < 16; x++) { - logerror("%02x ", m_cfb_ram.target()[offset + x + y * 16]); + logerror("%02x ", m_cfb_ram[offset + x + y * 16]); } logerror("\n"); } @@ -664,7 +664,7 @@ READ8_MEMBER(mazerbla_state::vcu_set_clr_addr_r) { for (x = 0; x < 16; x++) { - UINT8 colour = m_cfb_ram.target()[offs + x + y * 16]; + UINT8 colour = m_cfb_ram[offs + x + y * 16]; /* red component */ bit1 = (colour >> 7) & 0x01; @@ -699,7 +699,7 @@ READ8_MEMBER(mazerbla_state::vcu_set_clr_addr_r) { for (x = 0; x < 16; x++) { - UINT8 dat = m_cfb_ram.target()[offs + x + y * 16]; + UINT8 dat = m_cfb_ram[offs + x + y * 16]; m_lookup_ram[lookup_offs + x + y * 16] = dat; } } @@ -713,7 +713,7 @@ READ8_MEMBER(mazerbla_state::vcu_set_clr_addr_r) { for (x = 0; x < 16; x++) { - UINT8 dat = m_cfb_ram.target()[offs + x + y * 16]; + UINT8 dat = m_cfb_ram[offs + x + y * 16]; m_lookup_ram[lookup_offs + x + y * 16] = dat; } } @@ -727,7 +727,7 @@ READ8_MEMBER(mazerbla_state::vcu_set_clr_addr_r) { for (x = 0; x < 16; x++) { - UINT8 dat = m_cfb_ram.target()[offs + x + y * 16]; + UINT8 dat = m_cfb_ram[offs + x + y * 16]; m_lookup_ram[lookup_offs + x + y * 16] = dat; } } diff --git a/src/mame/drivers/mediagx.c b/src/mame/drivers/mediagx.c index 92c1fe5999a..51d1d026488 100644 --- a/src/mame/drivers/mediagx.c +++ b/src/mame/drivers/mediagx.c @@ -277,7 +277,7 @@ static void draw_framebuffer(running_machine &machine, bitmap_rgb32 &bitmap, con if (state->m_disp_ctrl_reg[DC_OUTPUT_CFG] & 0x1) // 8-bit mode { - UINT8 *framebuf = (UINT8*)&state->m_vram.target()[state->m_disp_ctrl_reg[DC_FB_ST_OFFSET]/4]; + UINT8 *framebuf = (UINT8*)&state->m_vram[state->m_disp_ctrl_reg[DC_FB_ST_OFFSET]/4]; UINT8 *pal = state->m_pal; for (j=0; j < state->m_frame_height; j++) @@ -297,7 +297,7 @@ static void draw_framebuffer(running_machine &machine, bitmap_rgb32 &bitmap, con } else // 16-bit { - UINT16 *framebuf = (UINT16*)&state->m_vram.target()[state->m_disp_ctrl_reg[DC_FB_ST_OFFSET]/4]; + UINT16 *framebuf = (UINT16*)&state->m_vram[state->m_disp_ctrl_reg[DC_FB_ST_OFFSET]/4]; // RGB 5-6-5 mode if ((state->m_disp_ctrl_reg[DC_OUTPUT_CFG] & 0x2) == 0) @@ -343,7 +343,7 @@ static void draw_cga(running_machine &machine, bitmap_rgb32 &bitmap, const recta mediagx_state *state = machine.driver_data(); int i, j; const gfx_element *gfx = machine.gfx[0]; - UINT32 *cga = state->m_cga_ram.target(); + UINT32 *cga = state->m_cga_ram; int index = 0; for (j=0; j < 25; j++) @@ -1243,7 +1243,7 @@ INLINE UINT32 generic_speedup(address_space *space, int idx) state->m_speedup_hits[idx]++; device_spin_until_interrupt(&space->device()); } - return state->m_main_ram.target()[state->m_speedup_table[idx].offset/4]; + return state->m_main_ram[state->m_speedup_table[idx].offset/4]; } static READ32_HANDLER( speedup0_r ) { return generic_speedup(space, 0); } diff --git a/src/mame/drivers/meijinsn.c b/src/mame/drivers/meijinsn.c index f2780ccfda6..ec94feef267 100644 --- a/src/mame/drivers/meijinsn.c +++ b/src/mame/drivers/meijinsn.c @@ -107,16 +107,16 @@ READ16_MEMBER(meijinsn_state::alpha_mcu_r) static const UINT8 coinage1[2][2] = {{1,1}, {1,2}}; static const UINT8 coinage2[2][2] = {{1,5}, {2,1}}; - int source = m_shared_ram.target()[offset]; + int source = m_shared_ram[offset]; switch (offset) { case 0: /* Dipswitch 2 */ - m_shared_ram.target()[0] = (source & 0xff00) | input_port_read(machine(), "DSW"); + m_shared_ram[0] = (source & 0xff00) | input_port_read(machine(), "DSW"); return 0; case 0x22: /* Coin value */ - m_shared_ram.target()[0x22] = (source & 0xff00) | (m_credits & 0x00ff); + m_shared_ram[0x22] = (source & 0xff00) | (m_credits & 0x00ff); return 0; case 0x29: /* Query microcontroller for coin insert */ @@ -128,8 +128,8 @@ READ16_MEMBER(meijinsn_state::alpha_mcu_r) if ((input_port_read(machine(), "COINS") & 0x1) == 0 && !m_mcu_latch) { - m_shared_ram.target()[0x29] = (source & 0xff00) | 0x22; // coinA - m_shared_ram.target()[0x22] = (source & 0xff00) | 0x00; + m_shared_ram[0x29] = (source & 0xff00) | 0x22; // coinA + m_shared_ram[0x22] = (source & 0xff00) | 0x00; m_mcu_latch = 1; m_coinvalue = (~input_port_read(machine(), "DSW")>>3) & 1; @@ -145,8 +145,8 @@ READ16_MEMBER(meijinsn_state::alpha_mcu_r) } else if ((input_port_read(machine(), "COINS") & 0x2) == 0 && !m_mcu_latch) { - m_shared_ram.target()[0x29] = (source & 0xff00) | 0x22; // coinA - m_shared_ram.target()[0x22] = (source & 0xff00) | 0x00; + m_shared_ram[0x29] = (source & 0xff00) | 0x22; // coinA + m_shared_ram[0x22] = (source & 0xff00) | 0x00; m_mcu_latch = 1; m_coinvalue = (~input_port_read(machine(), "DSW") >> 3) & 1; @@ -162,7 +162,7 @@ READ16_MEMBER(meijinsn_state::alpha_mcu_r) } else { - m_shared_ram.target()[0x29] = (source & 0xff00) | 0x22; + m_shared_ram[0x29] = (source & 0xff00) | 0x22; } return 0; } @@ -297,8 +297,8 @@ static SCREEN_UPDATE_IND16(meijinsn) sx = offs >> 8; sy = offs & 0xff; - data1 = state->m_videoram.target()[offs] >> 8; - data2 = state->m_videoram.target()[offs] & 0xff; + data1 = state->m_videoram[offs] >> 8; + data2 = state->m_videoram[offs] & 0xff; for (x = 0; x < 4; x++) { diff --git a/src/mame/drivers/merit.c b/src/mame/drivers/merit.c index 88822e2aaaa..8c3a1983193 100644 --- a/src/mame/drivers/merit.c +++ b/src/mame/drivers/merit.c @@ -174,7 +174,7 @@ READ8_MEMBER(merit_state::palette_r) { int co; - co = ((m_ram_attr.target()[offset] & 0x7F) << 3) | (offset & 0x07); + co = ((m_ram_attr[offset] & 0x7F) << 3) | (offset & 0x07); return m_ram_palette[co]; } @@ -185,7 +185,7 @@ WRITE8_MEMBER(merit_state::palette_w) machine().primary_screen->update_now(); data &= 0x0f; - co = ((m_ram_attr.target()[offset] & 0x7F) << 3) | (offset & 0x07); + co = ((m_ram_attr[offset] & 0x7F) << 3) | (offset & 0x07); m_ram_palette[co] = data; } @@ -228,9 +228,9 @@ static MC6845_UPDATE_ROW( update_row ) for (cx = 0; cx < x_count; cx++) { int i; - int attr = state->m_ram_attr.target()[ma & 0x7ff]; + int attr = state->m_ram_attr[ma & 0x7ff]; int region = (attr & 0x40) >> 6; - int addr = ((state->m_ram_video.target()[ma & 0x7ff] | ((attr & 0x80) << 1) | (state->m_extra_video_bank_bit)) << 4) | (ra & 0x0f); + int addr = ((state->m_ram_video[ma & 0x7ff] | ((attr & 0x80) << 1) | (state->m_extra_video_bank_bit)) << 4) | (ra & 0x0f); int colour = (attr & 0x7f) << 3; UINT8 *data; @@ -328,7 +328,7 @@ static WRITE8_DEVICE_HANDLER( misc_couple_w ) /* other bits unknown */ /*kludge to avoid jumps on ram area in The Couples*/ - state->m_backup_ram.target()[0x1011] = 0xc9; //ret + state->m_backup_ram[0x1011] = 0xc9; //ret } WRITE8_MEMBER(merit_state::casino5_bank_w) diff --git a/src/mame/drivers/mgolf.c b/src/mame/drivers/mgolf.c index 4ece21ed98f..414b95fcc07 100644 --- a/src/mame/drivers/mgolf.c +++ b/src/mame/drivers/mgolf.c @@ -39,7 +39,7 @@ public: static TILE_GET_INFO( get_tile_info ) { mgolf_state *state = machine.driver_data(); - 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); } @@ -47,7 +47,7 @@ static TILE_GET_INFO( get_tile_info ) WRITE8_MEMBER(mgolf_state::mgolf_vram_w) { - m_video_ram.target()[offset] = data; + m_video_ram[offset] = data; m_bg_tilemap->mark_tile_dirty(offset); } @@ -71,18 +71,18 @@ static SCREEN_UPDATE_IND16( mgolf ) for (i = 0; i < 2; i++) { drawgfx_transpen(bitmap, cliprect, screen.machine().gfx[1], - state->m_video_ram.target()[0x399 + 4 * i], + state->m_video_ram[0x399 + 4 * i], i, 0, 0, - state->m_video_ram.target()[0x390 + 2 * i] - 7, - state->m_video_ram.target()[0x398 + 4 * i] - 16, 0); + state->m_video_ram[0x390 + 2 * i] - 7, + state->m_video_ram[0x398 + 4 * i] - 16, 0); drawgfx_transpen(bitmap, cliprect, screen.machine().gfx[1], - state->m_video_ram.target()[0x39b + 4 * i], + state->m_video_ram[0x39b + 4 * i], i, 0, 0, - state->m_video_ram.target()[0x390 + 2 * i] - 15, - state->m_video_ram.target()[0x39a + 4 * i] - 16, 0); + state->m_video_ram[0x390 + 2 * i] - 15, + state->m_video_ram[0x39a + 4 * i] - 16, 0); } return 0; } @@ -137,7 +137,7 @@ static double calc_plunger_pos(running_machine &machine) READ8_MEMBER(mgolf_state::mgolf_wram_r) { - return m_video_ram.target()[0x380 + offset]; + return m_video_ram[0x380 + offset]; } @@ -179,7 +179,7 @@ READ8_MEMBER(mgolf_state::mgolf_misc_r) WRITE8_MEMBER(mgolf_state::mgolf_wram_w) { - m_video_ram.target()[0x380 + offset] = data; + m_video_ram[0x380 + offset] = data; } diff --git a/src/mame/drivers/midas.c b/src/mame/drivers/midas.c index dd0c324c976..06d92835063 100644 --- a/src/mame/drivers/midas.c +++ b/src/mame/drivers/midas.c @@ -235,9 +235,9 @@ WRITE16_MEMBER(midas_state::midas_gfxregs_w) { case 1: { - UINT16 addr = m_gfxregs.target()[0]; + UINT16 addr = m_gfxregs[0]; m_gfxram[addr] = data; - m_gfxregs.target()[0] += m_gfxregs.target()[2]; + m_gfxregs[0] += m_gfxregs[2]; if ( addr >= 0x7000 && addr <= 0x7fff ) m_tmap->mark_tile_dirty(addr - 0x7000); diff --git a/src/mame/drivers/mil4000.c b/src/mame/drivers/mil4000.c index 31cf3b4fac0..472b585767c 100644 --- a/src/mame/drivers/mil4000.c +++ b/src/mame/drivers/mil4000.c @@ -123,9 +123,9 @@ public: static TILE_GET_INFO( get_sc0_tile_info ) { mil4000_state *state = machine.driver_data(); - UINT32 data = (state->m_sc0_vram.target()[tile_index*2]<<16) | state->m_sc0_vram.target()[tile_index*2+1]; + UINT32 data = (state->m_sc0_vram[tile_index*2]<<16) | state->m_sc0_vram[tile_index*2+1]; int tile = data >> 14; - int color = (state->m_sc0_vram.target()[tile_index*2+1] & 0x1f)+0; + int color = (state->m_sc0_vram[tile_index*2+1] & 0x1f)+0; SET_TILE_INFO( 0, @@ -137,9 +137,9 @@ static TILE_GET_INFO( get_sc0_tile_info ) static TILE_GET_INFO( get_sc1_tile_info ) { mil4000_state *state = machine.driver_data(); - UINT32 data = (state->m_sc1_vram.target()[tile_index*2]<<16) | state->m_sc1_vram.target()[tile_index*2+1]; + UINT32 data = (state->m_sc1_vram[tile_index*2]<<16) | state->m_sc1_vram[tile_index*2+1]; int tile = data >> 14; - int color = (state->m_sc1_vram.target()[tile_index*2+1] & 0x1f)+0x10; + int color = (state->m_sc1_vram[tile_index*2+1] & 0x1f)+0x10; SET_TILE_INFO( 0, @@ -151,9 +151,9 @@ static TILE_GET_INFO( get_sc1_tile_info ) static TILE_GET_INFO( get_sc2_tile_info ) { mil4000_state *state = machine.driver_data(); - UINT32 data = (state->m_sc2_vram.target()[tile_index*2]<<16) | state->m_sc2_vram.target()[tile_index*2+1]; + UINT32 data = (state->m_sc2_vram[tile_index*2]<<16) | state->m_sc2_vram[tile_index*2+1]; int tile = data >> 14; - int color = (state->m_sc2_vram.target()[tile_index*2+1] & 0x1f)+0x20; + int color = (state->m_sc2_vram[tile_index*2+1] & 0x1f)+0x20; SET_TILE_INFO( 0, @@ -165,9 +165,9 @@ static TILE_GET_INFO( get_sc2_tile_info ) static TILE_GET_INFO( get_sc3_tile_info ) { mil4000_state *state = machine.driver_data(); - UINT32 data = (state->m_sc3_vram.target()[tile_index*2]<<16) | state->m_sc3_vram.target()[tile_index*2+1]; + UINT32 data = (state->m_sc3_vram[tile_index*2]<<16) | state->m_sc3_vram[tile_index*2+1]; int tile = data >> 14; - int color = (state->m_sc3_vram.target()[tile_index*2+1] & 0x1f)+0x30; + int color = (state->m_sc3_vram[tile_index*2+1] & 0x1f)+0x30; SET_TILE_INFO( 0, @@ -223,25 +223,25 @@ READ16_MEMBER(mil4000_state::hvretrace_r) WRITE16_MEMBER(mil4000_state::sc0_vram_w) { - m_sc0_vram.target()[offset] = data; + m_sc0_vram[offset] = data; m_sc0_tilemap->mark_tile_dirty(offset/2); } WRITE16_MEMBER(mil4000_state::sc1_vram_w) { - m_sc1_vram.target()[offset] = data; + m_sc1_vram[offset] = data; m_sc1_tilemap->mark_tile_dirty(offset/2); } WRITE16_MEMBER(mil4000_state::sc2_vram_w) { - m_sc2_vram.target()[offset] = data; + m_sc2_vram[offset] = data; m_sc2_tilemap->mark_tile_dirty(offset/2); } WRITE16_MEMBER(mil4000_state::sc3_vram_w) { - m_sc3_vram.target()[offset] = data; + m_sc3_vram[offset] = data; m_sc3_tilemap->mark_tile_dirty(offset/2); } diff --git a/src/mame/drivers/miniboy7.c b/src/mame/drivers/miniboy7.c index 6be50100575..58e857f5b34 100644 --- a/src/mame/drivers/miniboy7.c +++ b/src/mame/drivers/miniboy7.c @@ -174,13 +174,13 @@ public: WRITE8_MEMBER(miniboy7_state::miniboy7_videoram_w) { - m_videoram.target()[offset] = data; + m_videoram[offset] = data; m_bg_tilemap->mark_tile_dirty(offset); } WRITE8_MEMBER(miniboy7_state::miniboy7_colorram_w) { - m_colorram.target()[offset] = data; + m_colorram[offset] = data; m_bg_tilemap->mark_tile_dirty(offset); } @@ -193,8 +193,8 @@ static TILE_GET_INFO( get_bg_tile_info ) ---- --x- tiles bank. xx-- ---x seems unused. */ - int attr = state->m_colorram.target()[tile_index]; - int code = state->m_videoram.target()[tile_index]; + int attr = state->m_colorram[tile_index]; + int code = state->m_videoram[tile_index]; int bank = (attr & 0x02) >> 1; /* bit 1 switch the gfx banks */ int color = (attr & 0x3c); /* bits 2-3-4-5 for color? */ diff --git a/src/mame/drivers/minivadr.c b/src/mame/drivers/minivadr.c index 216a3616509..14173f12bd6 100644 --- a/src/mame/drivers/minivadr.c +++ b/src/mame/drivers/minivadr.c @@ -42,7 +42,7 @@ static SCREEN_UPDATE_RGB32( minivadr ) UINT8 x = offs << 3; int y = offs >> 5; - UINT8 data = state->m_videoram.target()[offs]; + UINT8 data = state->m_videoram[offs]; for (i = 0; i < 8; i++) { diff --git a/src/mame/drivers/mirage.c b/src/mame/drivers/mirage.c index 96778d34902..84534a1e06c 100644 --- a/src/mame/drivers/mirage.c +++ b/src/mame/drivers/mirage.c @@ -89,7 +89,7 @@ static SCREEN_UPDATE_RGB32( mirage ) screen.machine().device("spritegen")->draw_sprites(bitmap, cliprect, state->m_spriteram->buffer(), 0x400); - 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(256, cliprect); /* not verified */ diff --git a/src/mame/drivers/mirax.c b/src/mame/drivers/mirax.c index c830c9eefc6..17140f610d4 100644 --- a/src/mame/drivers/mirax.c +++ b/src/mame/drivers/mirax.c @@ -167,8 +167,8 @@ static void draw_tilemap(running_machine &machine, bitmap_ind16 &bitmap, const r { for (x=0;x<32;x++) { - int tile = state->m_videoram.target()[32*y+x]; - int color = (state->m_colorram.target()[x*2]<<8) | (state->m_colorram.target()[(x*2)+1]); + int tile = state->m_videoram[32*y+x]; + int color = (state->m_colorram[x*2]<<8) | (state->m_colorram[(x*2)+1]); int x_scroll = (color & 0xff00)>>8; tile |= ((color & 0xe0)<<3); @@ -189,7 +189,7 @@ static void draw_tilemap(running_machine &machine, bitmap_ind16 &bitmap, const r static void draw_sprites(running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect) { mirax_state *state = machine.driver_data(); - UINT8 *spriteram = state->m_spriteram.target(); + UINT8 *spriteram = state->m_spriteram; int count; for(count=0;count<0x200;count+=4) diff --git a/src/mame/drivers/missile.c b/src/mame/drivers/missile.c index a951691cf26..956454e27ea 100644 --- a/src/mame/drivers/missile.c +++ b/src/mame/drivers/missile.c @@ -494,7 +494,7 @@ DIRECT_UPDATE_HANDLER( missile_direct_handler ) if (address < 0x4000) { missile_state *state = direct.space().machine().driver_data(); - direct.explicit_configure(0x0000 | offset, 0x3fff | offset, 0x3fff, state->m_videoram.target()); + direct.explicit_configure(0x0000 | offset, 0x3fff | offset, 0x3fff, state->m_videoram); return ~0; } @@ -595,7 +595,7 @@ INLINE offs_t get_bit3_addr(offs_t pixaddr) static void write_vram(address_space *space, offs_t address, UINT8 data) { missile_state *state = space->machine().driver_data(); - UINT8 *videoram = state->m_videoram.target(); + UINT8 *videoram = state->m_videoram; static const UINT8 data_lookup[4] = { 0x00, 0x0f, 0xf0, 0xff }; offs_t vramaddr; UINT8 vramdata; @@ -627,7 +627,7 @@ static void write_vram(address_space *space, offs_t address, UINT8 data) static UINT8 read_vram(address_space *space, offs_t address) { missile_state *state = space->machine().driver_data(); - UINT8 *videoram = state->m_videoram.target(); + UINT8 *videoram = state->m_videoram; offs_t vramaddr; UINT8 vramdata; UINT8 vrammask; @@ -671,7 +671,7 @@ static UINT8 read_vram(address_space *space, offs_t address) static SCREEN_UPDATE_IND16( missile ) { missile_state *state = screen.machine().driver_data(); - UINT8 *videoram = state->m_videoram.target(); + UINT8 *videoram = state->m_videoram; int x, y; /* draw the bitmap to the screen, looping over Y */ @@ -713,7 +713,7 @@ static SCREEN_UPDATE_IND16( missile ) WRITE8_MEMBER(missile_state::missile_w) { - UINT8 *videoram = m_videoram.target(); + UINT8 *videoram = m_videoram; /* if we're in MADSEL mode, write to video RAM */ if (get_madsel(&space)) { @@ -770,7 +770,7 @@ WRITE8_MEMBER(missile_state::missile_w) READ8_MEMBER(missile_state::missile_r) { - UINT8 *videoram = m_videoram.target(); + UINT8 *videoram = m_videoram; UINT8 result = 0xff; /* if we're in MADSEL mode, read from video RAM */ diff --git a/src/mame/drivers/mlanding.c b/src/mame/drivers/mlanding.c index cd609f5aba9..f7c81ad0dfb 100644 --- a/src/mame/drivers/mlanding.c +++ b/src/mame/drivers/mlanding.c @@ -91,7 +91,7 @@ static SCREEN_UPDATE_IND16(mlanding) for (y = cliprect.min_y; y <= cliprect.max_y; ++y) { - UINT16 *src = &state->m_g_ram.target()[y * 512/2 + cliprect.min_x]; + UINT16 *src = &state->m_g_ram[y * 512/2 + cliprect.min_x]; UINT16 *dst = &bitmap.pix16(y, cliprect.min_x); for (x = cliprect.min_x; x <= cliprect.max_x; x += 2) @@ -124,14 +124,14 @@ static int start_dma(running_machine &machine) int j, k; - UINT16 attr = state->m_dma_ram.target()[offs]; + UINT16 attr = state->m_dma_ram[offs]; if (attr == 0) continue; - x = state->m_dma_ram.target()[offs + 1]; - y = state->m_dma_ram.target()[offs + 2]; - colour = state->m_dma_ram.target()[offs + 3]; + x = state->m_dma_ram[offs + 1]; + y = state->m_dma_ram[offs + 2]; + colour = state->m_dma_ram[offs + 3]; dx = x >> 11; dy = y >> 11; @@ -166,8 +166,8 @@ static int start_dma(running_machine &machine) // Draw the 8x8 chunk for (y1 = 0; y1 < 8; ++y1) { - UINT16 *src = &state->m_ml_tileram.target()[(code * 2 * 8) + y1*2]; - UINT16 *dst = &state->m_g_ram.target()[(y + k*8+y1)*512/2 + (j*8+x)/2]; + UINT16 *src = &state->m_ml_tileram[(code * 2 * 8) + y1*2]; + UINT16 *dst = &state->m_g_ram[(y + k*8+y1)*512/2 + (j*8+x)/2]; UINT8 p2 = *src & 0xff; UINT8 p1 = *src++ >> 8; @@ -214,7 +214,7 @@ static int start_dma(running_machine &machine) for(y1 = 0; y1 < dy*8; y1++) { int x1; - UINT16 *dst = &state->m_g_ram.target()[((y + y1) * 512/2) + x/2]; + UINT16 *dst = &state->m_g_ram[((y + y1) * 512/2) + x/2]; for(x1 = 0; x1 < dx*8; x1+=2) { @@ -228,12 +228,12 @@ static int start_dma(running_machine &machine) WRITE16_MEMBER(mlanding_state::ml_tileram_w) { - COMBINE_DATA(&m_ml_tileram.target()[offset]); + COMBINE_DATA(&m_ml_tileram[offset]); } READ16_MEMBER(mlanding_state::ml_tileram_r) { - return m_ml_tileram.target()[offset]; + return m_ml_tileram[offset]; } @@ -459,7 +459,7 @@ WRITE16_MEMBER(mlanding_state::ml_nmi_to_sound_w) READ16_MEMBER(mlanding_state::ml_mecha_ram_r) { - return (m_mecha_ram.target()[offset*2]<<8)|m_mecha_ram.target()[offset*2+1]; + return (m_mecha_ram[offset*2]<<8)|m_mecha_ram[offset*2+1]; } WRITE16_MEMBER(mlanding_state::ml_mecha_ram_w) @@ -549,12 +549,12 @@ ADDRESS_MAP_END READ16_MEMBER(mlanding_state::ml_dotram_r) { - return m_ml_dotram.target()[offset]; + return m_ml_dotram[offset]; } WRITE16_MEMBER(mlanding_state::ml_dotram_w) { - m_ml_dotram.target()[offset] = data; + m_ml_dotram[offset] = data; } READ16_MEMBER(mlanding_state::dsp_HOLD_signal_r) diff --git a/src/mame/drivers/mogura.c b/src/mame/drivers/mogura.c index 0db7b529f3d..2aaffaa6606 100644 --- a/src/mame/drivers/mogura.c +++ b/src/mame/drivers/mogura.c @@ -65,8 +65,8 @@ static PALETTE_INIT( mogura ) static TILE_GET_INFO( get_mogura_tile_info ) { mogura_state *state = machine.driver_data(); - int code = state->m_tileram.target()[tile_index]; - int attr = state->m_tileram.target()[tile_index + 0x800]; + int code = state->m_tileram[tile_index]; + int attr = state->m_tileram[tile_index + 0x800]; SET_TILE_INFO( 0, @@ -79,7 +79,7 @@ static TILE_GET_INFO( get_mogura_tile_info ) static VIDEO_START( mogura ) { mogura_state *state = machine.driver_data(); - gfx_element_set_source(machine.gfx[0], state->m_gfxram.target()); + gfx_element_set_source(machine.gfx[0], state->m_gfxram); state->m_tilemap = tilemap_create(machine, get_mogura_tile_info, tilemap_scan_rows, 8, 8, 64, 32); } @@ -104,7 +104,7 @@ static SCREEN_UPDATE_IND16( mogura ) WRITE8_MEMBER(mogura_state::mogura_tileram_w) { - m_tileram.target()[offset] = data; + m_tileram[offset] = data; m_tilemap->mark_tile_dirty(offset & 0x7ff); } @@ -117,7 +117,7 @@ WRITE8_MEMBER(mogura_state::mogura_dac_w) WRITE8_MEMBER(mogura_state::mogura_gfxram_w) { - m_gfxram.target()[offset] = data ; + m_gfxram[offset] = data ; gfx_element_mark_dirty(machine().gfx[0], offset / 16); } diff --git a/src/mame/drivers/mpoker.c b/src/mame/drivers/mpoker.c index a944cbcd407..312e51f4359 100644 --- a/src/mame/drivers/mpoker.c +++ b/src/mame/drivers/mpoker.c @@ -215,8 +215,8 @@ static SCREEN_UPDATE_IND16(mpoker) { for (x=0;x<32;x++) { - UINT16 dat = state->m_video.target()[count]; - UINT16 col = state->m_video.target()[count+0x400] & 0x7f; + UINT16 dat = state->m_video[count]; + UINT16 col = state->m_video[count+0x400] & 0x7f; drawgfx_opaque(bitmap,cliprect,gfx,dat,col,0,0,x*16,y*16); count++; } diff --git a/src/mame/drivers/murogem.c b/src/mame/drivers/murogem.c index 1387d3b37b3..46c4ce9e4ff 100644 --- a/src/mame/drivers/murogem.c +++ b/src/mame/drivers/murogem.c @@ -213,8 +213,8 @@ static SCREEN_UPDATE_IND16(murogem) { for(xx=0;xx<32;xx++) { - int tileno = state->m_videoram.target()[count]&0x3f; - int attr = state->m_videoram.target()[count+0x400]&0x0f; + int tileno = state->m_videoram[count]&0x3f; + int attr = state->m_videoram[count+0x400]&0x0f; drawgfx_transpen(bitmap,cliprect,screen.machine().gfx[0],tileno,attr,0,0,xx*8,yy*8,0); diff --git a/src/mame/drivers/murogmbl.c b/src/mame/drivers/murogmbl.c index 14d800f5cdf..ea552de3164 100644 --- a/src/mame/drivers/murogmbl.c +++ b/src/mame/drivers/murogmbl.c @@ -103,7 +103,7 @@ static SCREEN_UPDATE_IND16(murogmbl) { for (x = 0; x < 32; x++) { - int tile = state->m_video.target()[count]; + int tile = state->m_video[count]; drawgfx_opaque(bitmap, cliprect, gfx, tile, 0, 0, 0, x * 8, y * 8); count++; diff --git a/src/mame/drivers/mwarr.c b/src/mame/drivers/mwarr.c index 1430c8b402b..e5d4568d192 100644 --- a/src/mame/drivers/mwarr.c +++ b/src/mame/drivers/mwarr.c @@ -103,28 +103,28 @@ public: WRITE16_MEMBER(mwarr_state::bg_videoram_w) { - COMBINE_DATA(&m_bg_videoram.target()[offset]); + COMBINE_DATA(&m_bg_videoram[offset]); m_bg_tilemap->mark_tile_dirty(offset); } WRITE16_MEMBER(mwarr_state::mlow_videoram_w) { - COMBINE_DATA(&m_mlow_videoram.target()[offset]); + COMBINE_DATA(&m_mlow_videoram[offset]); m_mlow_tilemap->mark_tile_dirty(offset); } WRITE16_MEMBER(mwarr_state::mhigh_videoram_w) { - COMBINE_DATA(&m_mhigh_videoram.target()[offset]); + COMBINE_DATA(&m_mhigh_videoram[offset]); m_mhigh_tilemap->mark_tile_dirty(offset); } WRITE16_MEMBER(mwarr_state::tx_videoram_w) { - COMBINE_DATA(&m_tx_videoram.target()[offset]); + COMBINE_DATA(&m_tx_videoram[offset]); m_tx_tilemap->mark_tile_dirty(offset); } @@ -157,7 +157,7 @@ WRITE16_MEMBER(mwarr_state::sprites_commands_w) /* refresh sprites on screen */ for (i = 0; i < 0x800; i++) { - m_sprites_buffer[i] = m_spriteram.target()[i]; + m_sprites_buffer[i] = m_spriteram[i]; } break; @@ -175,7 +175,7 @@ WRITE16_MEMBER(mwarr_state::mwarr_brightness_w) int i; double brightness; - COMBINE_DATA(&m_mwarr_ram.target()[0x14 / 2]); + COMBINE_DATA(&m_mwarr_ram[0x14 / 2]); brightness = (double)(data & 0xff); for (i = 0; i < 0x800; i++) @@ -352,8 +352,8 @@ GFXDECODE_END static TILE_GET_INFO( get_bg_tile_info ) { mwarr_state *state = machine.driver_data(); - int tileno = state->m_bg_videoram.target()[tile_index] & 0x1fff; - int colour = (state->m_bg_videoram.target()[tile_index] & 0xe000) >> 13; + int tileno = state->m_bg_videoram[tile_index] & 0x1fff; + int colour = (state->m_bg_videoram[tile_index] & 0xe000) >> 13; SET_TILE_INFO(4, tileno, colour, 0); } @@ -361,8 +361,8 @@ static TILE_GET_INFO( get_bg_tile_info ) static TILE_GET_INFO( get_mlow_tile_info ) { mwarr_state *state = machine.driver_data(); - int tileno = state->m_mlow_videoram.target()[tile_index] & 0x1fff; - int colour = (state->m_mlow_videoram.target()[tile_index] & 0xe000) >> 13; + int tileno = state->m_mlow_videoram[tile_index] & 0x1fff; + int colour = (state->m_mlow_videoram[tile_index] & 0xe000) >> 13; SET_TILE_INFO(3, tileno, colour, 0); } @@ -370,8 +370,8 @@ static TILE_GET_INFO( get_mlow_tile_info ) static TILE_GET_INFO( get_mhigh_tile_info ) { mwarr_state *state = machine.driver_data(); - int tileno = state->m_mhigh_videoram.target()[tile_index] & 0x1fff; - int colour = (state->m_mhigh_videoram.target()[tile_index] & 0xe000) >> 13; + int tileno = state->m_mhigh_videoram[tile_index] & 0x1fff; + int colour = (state->m_mhigh_videoram[tile_index] & 0xe000) >> 13; SET_TILE_INFO(2, tileno, colour, 0); } @@ -379,8 +379,8 @@ static TILE_GET_INFO( get_mhigh_tile_info ) static TILE_GET_INFO( get_tx_tile_info ) { mwarr_state *state = machine.driver_data(); - int tileno = state->m_tx_videoram.target()[tile_index] & 0x1fff; - int colour = (state->m_tx_videoram.target()[tile_index] & 0xe000) >> 13; + int tileno = state->m_tx_videoram[tile_index] & 0x1fff; + int colour = (state->m_tx_videoram[tile_index] & 0xe000) >> 13; SET_TILE_INFO(1, tileno, colour, 0); } @@ -483,45 +483,45 @@ static SCREEN_UPDATE_IND16( mwarr ) screen.machine().priority_bitmap.fill(0, cliprect); - if (BIT(state->m_vidattrram.target()[6], 0)) + if (BIT(state->m_vidattrram[6], 0)) { for (i = 0; i < 256; i++) - state->m_bg_tilemap->set_scrollx(i, state->m_bg_scrollram.target()[i] + 20); + state->m_bg_tilemap->set_scrollx(i, state->m_bg_scrollram[i] + 20); } else { for (i = 0; i < 256; i++) - state->m_bg_tilemap->set_scrollx(i, state->m_bg_scrollram.target()[0] + 19); + state->m_bg_tilemap->set_scrollx(i, state->m_bg_scrollram[0] + 19); } - if (BIT(state->m_vidattrram.target()[6], 2)) + if (BIT(state->m_vidattrram[6], 2)) { for (i = 0; i < 256; i++) - state->m_mlow_tilemap->set_scrollx(i, state->m_mlow_scrollram.target()[i] + 19); + state->m_mlow_tilemap->set_scrollx(i, state->m_mlow_scrollram[i] + 19); } else { for (i = 0; i < 256; i++) - state->m_mlow_tilemap->set_scrollx(i, state->m_mlow_scrollram.target()[0] + 19); + state->m_mlow_tilemap->set_scrollx(i, state->m_mlow_scrollram[0] + 19); } - if (BIT(state->m_vidattrram.target()[6], 4)) + if (BIT(state->m_vidattrram[6], 4)) { for (i = 0; i < 256; i++) - state->m_mhigh_tilemap->set_scrollx(i, state->m_mhigh_scrollram.target()[i] + 19); + state->m_mhigh_tilemap->set_scrollx(i, state->m_mhigh_scrollram[i] + 19); } else { for (i = 0; i < 256; i++) - state->m_mhigh_tilemap->set_scrollx(i, state->m_mhigh_scrollram.target()[0] + 19); + state->m_mhigh_tilemap->set_scrollx(i, state->m_mhigh_scrollram[0] + 19); } - state->m_bg_tilemap->set_scrolly(0, state->m_vidattrram.target()[1] + 1); - state->m_mlow_tilemap->set_scrolly(0, state->m_vidattrram.target()[2] + 1); - state->m_mhigh_tilemap->set_scrolly(0, state->m_vidattrram.target()[3] + 1); + state->m_bg_tilemap->set_scrolly(0, state->m_vidattrram[1] + 1); + state->m_mlow_tilemap->set_scrolly(0, state->m_vidattrram[2] + 1); + state->m_mhigh_tilemap->set_scrolly(0, state->m_vidattrram[3] + 1); - state->m_tx_tilemap->set_scrollx(0, state->m_vidattrram.target()[0] + 16); - state->m_tx_tilemap->set_scrolly(0, state->m_vidattrram.target()[4] + 1); + state->m_tx_tilemap->set_scrollx(0, state->m_vidattrram[0] + 16); + state->m_tx_tilemap->set_scrolly(0, state->m_vidattrram[4] + 1); state->m_bg_tilemap->draw(bitmap, cliprect, 0, 0x01); state->m_mlow_tilemap->draw(bitmap, cliprect, 0, 0x02); diff --git a/src/mame/drivers/namcos23.c b/src/mame/drivers/namcos23.c index f7b186f5cb4..56de25d7703 100644 --- a/src/mame/drivers/namcos23.c +++ b/src/mame/drivers/namcos23.c @@ -1454,14 +1454,14 @@ static TILE_GET_INFO( TextTilemapGetInfo ) WRITE32_MEMBER(namcos23_state::namcos23_textram_w) { - COMBINE_DATA( &m_textram.target()[offset] ); + COMBINE_DATA( &m_textram[offset] ); m_bgtilemap->mark_tile_dirty(offset*2); m_bgtilemap->mark_tile_dirty((offset*2)+1); } WRITE32_MEMBER(namcos23_state::s23_txtchar_w) { - COMBINE_DATA(&m_charram.target()[offset]); + COMBINE_DATA(&m_charram[offset]); gfx_element_mark_dirty(machine().gfx[0], offset/32); } @@ -1862,12 +1862,12 @@ WRITE32_MEMBER(namcos23_state::s23_mcuen_w) READ32_MEMBER(namcos23_state::gorgon_sharedram_r) { - return m_shared_ram.target()[offset]; + return m_shared_ram[offset]; } WRITE32_MEMBER(namcos23_state::gorgon_sharedram_w) { - COMBINE_DATA(&m_shared_ram.target()[offset]); + COMBINE_DATA(&m_shared_ram[offset]); // hack for final furlong if ((offset == 0x6000/4) && (data == 0) && (mem_mask == 0xff000000)) @@ -2397,7 +2397,7 @@ static void render_run(running_machine &machine, bitmap_rgb32 &bitmap) static VIDEO_START( ss23 ) { namcos23_state *state = machine.driver_data(); - gfx_element_set_source(machine.gfx[0], (UINT8 *)state->m_charram.target()); + gfx_element_set_source(machine.gfx[0], reinterpret_cast(state->m_charram.target())); state->m_bgtilemap = tilemap_create(machine, TextTilemapGetInfo, tilemap_scan_rows, 16, 16, 64, 64); state->m_bgtilemap->set_transparent_pen(0xf); @@ -2518,12 +2518,12 @@ READ32_MEMBER(namcos23_state::gmen_trigger_sh2) READ32_MEMBER(namcos23_state::sh2_shared_r) { - return m_gmen_sh2_shared.target()[offset]; + return m_gmen_sh2_shared[offset]; } WRITE32_MEMBER(namcos23_state::sh2_shared_w) { - COMBINE_DATA(&m_gmen_sh2_shared.target()[offset]); + COMBINE_DATA(&m_gmen_sh2_shared[offset]); } static ADDRESS_MAP_START( gmen_mips_map, AS_PROGRAM, 32, namcos23_state ) @@ -2546,7 +2546,7 @@ static MACHINE_RESET(gmen) WRITE16_MEMBER(namcos23_state::sharedram_sub_w) { - UINT16 *shared16 = (UINT16 *)m_shared_ram.target(); + UINT16 *shared16 = reinterpret_cast(m_shared_ram.target()); // fake that an I/O board is connected for games w/o a dump or that aren't properly communicating with it yet if (!m_has_jvsio) @@ -2562,7 +2562,7 @@ WRITE16_MEMBER(namcos23_state::sharedram_sub_w) READ16_MEMBER(namcos23_state::sharedram_sub_r) { - UINT16 *shared16 = (UINT16 *)m_shared_ram.target(); + UINT16 *shared16 = reinterpret_cast(m_shared_ram.target()); return shared16[BYTE_XOR_BE(offset)]; } diff --git a/src/mame/drivers/neoprint.c b/src/mame/drivers/neoprint.c index 846b385e2b6..213ca58bb08 100644 --- a/src/mame/drivers/neoprint.c +++ b/src/mame/drivers/neoprint.c @@ -73,9 +73,9 @@ static void draw_layer(running_machine &machine, bitmap_ind16 &bitmap,const rect const gfx_element *gfx = machine.gfx[0]; INT16 scrollx, scrolly; - i = (state->m_npvidregs.target()[((layer*8)+0x06)/2] & 7) * 0x1000/4; - scrollx = ((state->m_npvidregs.target()[((layer*8)+0x00)/2] - (0xd8 + layer*4)) & 0x03ff); - scrolly = ((state->m_npvidregs.target()[((layer*8)+0x02)/2] - 0xffeb) & 0x03ff); + i = (state->m_npvidregs[((layer*8)+0x06)/2] & 7) * 0x1000/4; + scrollx = ((state->m_npvidregs[((layer*8)+0x00)/2] - (0xd8 + layer*4)) & 0x03ff); + scrolly = ((state->m_npvidregs[((layer*8)+0x02)/2] - 0xffeb) & 0x03ff); scrollx/=2; scrolly/=2; @@ -84,14 +84,14 @@ static void draw_layer(running_machine &machine, bitmap_ind16 &bitmap,const rect { for (x=0;x<32;x++) { - UINT16 dat = state->m_npvidram.target()[i*2] >> data_shift; // a video register? + UINT16 dat = state->m_npvidram[i*2] >> data_shift; // a video register? UINT16 color; - if(state->m_npvidram.target()[i*2+1] & 0x0020) // TODO: 8bpp switch? - color = ((state->m_npvidram.target()[i*2+1] & 0x8000) << 1) | 0x200 | ((state->m_npvidram.target()[i*2+1] & 0xff00) >> 7); + if(state->m_npvidram[i*2+1] & 0x0020) // TODO: 8bpp switch? + color = ((state->m_npvidram[i*2+1] & 0x8000) << 1) | 0x200 | ((state->m_npvidram[i*2+1] & 0xff00) >> 7); else - color = ((state->m_npvidram.target()[i*2+1] & 0xff00) >> 8) | ((state->m_npvidram.target()[i*2+1] & 0x0010) << 4); - UINT8 fx = (state->m_npvidram.target()[i*2+1] & 0x0040); - UINT8 fy = (state->m_npvidram.target()[i*2+1] & 0x0080); + color = ((state->m_npvidram[i*2+1] & 0xff00) >> 8) | ((state->m_npvidram[i*2+1] & 0x0010) << 4); + UINT8 fx = (state->m_npvidram[i*2+1] & 0x0040); + UINT8 fy = (state->m_npvidram[i*2+1] & 0x0080); drawgfx_transpen(bitmap,cliprect,gfx,dat,color,fx,fy,x*16+scrollx,y*16-scrolly,0); drawgfx_transpen(bitmap,cliprect,gfx,dat,color,fx,fy,x*16+scrollx-512,y*16-scrolly,0); diff --git a/src/mame/drivers/nightgal.c b/src/mame/drivers/nightgal.c index 70bcc6bcc94..1c09d61b8a3 100644 --- a/src/mame/drivers/nightgal.c +++ b/src/mame/drivers/nightgal.c @@ -379,13 +379,13 @@ READ8_MEMBER(nightgal_state::royalqn_nsc_blit_r) READ8_MEMBER(nightgal_state::royalqn_comm_r) { - return (m_comms_ram.target()[offset] & 0x80) | (0x7f); //bits 6-0 are undefined, presumably open bus + return (m_comms_ram[offset] & 0x80) | (0x7f); //bits 6-0 are undefined, presumably open bus } WRITE8_MEMBER(nightgal_state::royalqn_comm_w) { - m_comms_ram.target()[offset] = data & 0x80; + m_comms_ram[offset] = data & 0x80; } #ifdef UNUSED_CODE diff --git a/src/mame/drivers/nmg5.c b/src/mame/drivers/nmg5.c index 82bede60576..7f79b33911a 100644 --- a/src/mame/drivers/nmg5.c +++ b/src/mame/drivers/nmg5.c @@ -271,13 +271,13 @@ public: WRITE16_MEMBER(nmg5_state::fg_videoram_w) { - COMBINE_DATA(&m_fg_videoram.target()[offset]); + COMBINE_DATA(&m_fg_videoram[offset]); m_fg_tilemap->mark_tile_dirty(offset); } WRITE16_MEMBER(nmg5_state::bg_videoram_w) { - COMBINE_DATA(&m_bg_videoram.target()[offset]); + COMBINE_DATA(&m_bg_videoram[offset]); m_bg_tilemap->mark_tile_dirty(offset); } @@ -866,13 +866,13 @@ static void draw_bitmap( running_machine &machine, bitmap_ind16 &bitmap ) { for (x = 0; x < xxx; x++) { - pix = (state->m_bitmap.target()[count] & 0xf000) >> 12; + pix = (state->m_bitmap[count] & 0xf000) >> 12; if (pix) bitmap.pix16(y + yoff, x * 4 + 0 + xoff) = pix + 0x300; - pix = (state->m_bitmap.target()[count] & 0x0f00) >> 8; + pix = (state->m_bitmap[count] & 0x0f00) >> 8; if (pix) bitmap.pix16(y + yoff, x * 4 + 1 + xoff) = pix + 0x300; - pix = (state->m_bitmap.target()[count] & 0x00f0) >> 4; + pix = (state->m_bitmap[count] & 0x00f0) >> 4; if (pix) bitmap.pix16(y + yoff, x * 4 + 2 + xoff) = pix + 0x300; - pix = (state->m_bitmap.target()[count] & 0x000f) >> 0; + pix = (state->m_bitmap[count] & 0x000f) >> 0; if (pix) bitmap.pix16(y + yoff, x * 4 + 3 + xoff) = pix + 0x300; count++; @@ -885,10 +885,10 @@ static SCREEN_UPDATE_IND16( nmg5 ) { nmg5_state *state = screen.machine().driver_data(); - state->m_bg_tilemap->set_scrolly(0, state->m_scroll_ram.target()[3] + 9); - state->m_bg_tilemap->set_scrollx(0, state->m_scroll_ram.target()[2] + 3); - state->m_fg_tilemap->set_scrolly(0, state->m_scroll_ram.target()[1] + 9); - state->m_fg_tilemap->set_scrollx(0, state->m_scroll_ram.target()[0] - 1); + state->m_bg_tilemap->set_scrolly(0, state->m_scroll_ram[3] + 9); + state->m_bg_tilemap->set_scrollx(0, state->m_scroll_ram[2] + 3); + state->m_fg_tilemap->set_scrolly(0, state->m_scroll_ram[1] + 9); + state->m_fg_tilemap->set_scrollx(0, state->m_scroll_ram[0] - 1); state->m_bg_tilemap->draw(bitmap, cliprect, 0, 0); diff --git a/src/mame/drivers/nsmpoker.c b/src/mame/drivers/nsmpoker.c index 61dc680ad68..753e7e56762 100644 --- a/src/mame/drivers/nsmpoker.c +++ b/src/mame/drivers/nsmpoker.c @@ -89,14 +89,14 @@ public: WRITE8_MEMBER(nsmpoker_state::nsmpoker_videoram_w) { - m_videoram.target()[offset] = data; + m_videoram[offset] = data; m_bg_tilemap->mark_tile_dirty(offset); } WRITE8_MEMBER(nsmpoker_state::nsmpoker_colorram_w) { - m_colorram.target()[offset] = data; + m_colorram[offset] = data; m_bg_tilemap->mark_tile_dirty(offset); } @@ -110,8 +110,8 @@ static TILE_GET_INFO( get_bg_tile_info ) ---- ---- color code. ---- ---- seems unused. */ -// int attr = state->m_colorram.target()[tile_index]; - int code = state->m_videoram.target()[tile_index]; +// int attr = state->m_colorram[tile_index]; + int code = state->m_videoram[tile_index]; // int bank = (attr & 0x08) >> 3; // int color = (attr & 0x03); diff --git a/src/mame/drivers/nwk-tr.c b/src/mame/drivers/nwk-tr.c index 37268f37b29..0e898db70cd 100644 --- a/src/mame/drivers/nwk-tr.c +++ b/src/mame/drivers/nwk-tr.c @@ -467,15 +467,15 @@ WRITE32_MEMBER(nwktr_state::lanc2_w) { if (mame_stricmp(machine().system().name, "thrilld") == 0) { - m_work_ram.target()[(0x3ffed0/4) + 0] = 0x472a3731; - m_work_ram.target()[(0x3ffed0/4) + 1] = 0x33202020; - m_work_ram.target()[(0x3ffed0/4) + 2] = 0x2d2d2a2a; - m_work_ram.target()[(0x3ffed0/4) + 3] = 0x2a207878; + m_work_ram[(0x3ffed0/4) + 0] = 0x472a3731; + m_work_ram[(0x3ffed0/4) + 1] = 0x33202020; + m_work_ram[(0x3ffed0/4) + 2] = 0x2d2d2a2a; + m_work_ram[(0x3ffed0/4) + 3] = 0x2a207878; - m_work_ram.target()[(0x3fff40/4) + 0] = 0x47433731; - m_work_ram.target()[(0x3fff40/4) + 1] = 0x33000000; - m_work_ram.target()[(0x3fff40/4) + 2] = 0x19994a41; - m_work_ram.target()[(0x3fff40/4) + 3] = 0x4100a9b1; + m_work_ram[(0x3fff40/4) + 0] = 0x47433731; + m_work_ram[(0x3fff40/4) + 1] = 0x33000000; + m_work_ram[(0x3fff40/4) + 2] = 0x19994a41; + m_work_ram[(0x3fff40/4) + 3] = 0x4100a9b1; } } @@ -491,7 +491,7 @@ static MACHINE_START( nwktr ) ppcdrc_set_options(machine.device("maincpu"), PPCDRC_COMPATIBLE_OPTIONS); /* configure fast RAM regions for DRC */ - ppcdrc_add_fastram(machine.device("maincpu"), 0x00000000, 0x003fffff, FALSE, state->m_work_ram.target()); + ppcdrc_add_fastram(machine.device("maincpu"), 0x00000000, 0x003fffff, FALSE, state->m_work_ram); } static ADDRESS_MAP_START( nwktr_map, AS_PROGRAM, 32, nwktr_state ) diff --git a/src/mame/drivers/nyny.c b/src/mame/drivers/nyny.c index 4c9905177fa..7e410c1770d 100644 --- a/src/mame/drivers/nyny.c +++ b/src/mame/drivers/nyny.c @@ -327,10 +327,10 @@ static MC6845_UPDATE_ROW( update_row ) if (state->m_flipscreen) offs = offs ^ 0x9fff; - data1 = state->m_videoram1.target()[offs]; - data2 = state->m_videoram2.target()[offs]; - color1 = state->m_colorram1.target()[offs] & 0x07; - color2 = state->m_colorram2.target()[offs] & 0x07; + data1 = state->m_videoram1[offs]; + data2 = state->m_videoram2[offs]; + color1 = state->m_colorram1[offs] & 0x07; + color2 = state->m_colorram2[offs] & 0x07; for (i = 0; i < 8; i++) { diff --git a/src/mame/drivers/olibochu.c b/src/mame/drivers/olibochu.c index 453a1eb5e19..ddf923e4c6e 100644 --- a/src/mame/drivers/olibochu.c +++ b/src/mame/drivers/olibochu.c @@ -124,13 +124,13 @@ static PALETTE_INIT( olibochu ) WRITE8_MEMBER(olibochu_state::olibochu_videoram_w) { - m_videoram.target()[offset] = data; + m_videoram[offset] = data; m_bg_tilemap->mark_tile_dirty(offset); } WRITE8_MEMBER(olibochu_state::olibochu_colorram_w) { - m_colorram.target()[offset] = data; + m_colorram[offset] = data; m_bg_tilemap->mark_tile_dirty(offset); } @@ -148,8 +148,8 @@ WRITE8_MEMBER(olibochu_state::olibochu_flipscreen_w) static TILE_GET_INFO( get_bg_tile_info ) { olibochu_state *state = machine.driver_data(); - int attr = state->m_colorram.target()[tile_index]; - int code = state->m_videoram.target()[tile_index] + ((attr & 0x20) << 3); + int attr = state->m_colorram[tile_index]; + int code = state->m_videoram[tile_index] + ((attr & 0x20) << 3); int color = (attr & 0x1f) + 0x20; int flags = ((attr & 0x40) ? TILE_FLIPX : 0) | ((attr & 0x80) ? TILE_FLIPY : 0); @@ -165,8 +165,8 @@ static VIDEO_START( olibochu ) static void draw_sprites( running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect ) { olibochu_state *state = machine.driver_data(); - UINT8 *spriteram = state->m_spriteram.target(); - UINT8 *spriteram_2 = state->m_spriteram2.target(); + UINT8 *spriteram = state->m_spriteram; + UINT8 *spriteram_2 = state->m_spriteram2; int offs; /* 16x16 sprites */ diff --git a/src/mame/drivers/onetwo.c b/src/mame/drivers/onetwo.c index 4f94a8f9954..88069cc44f7 100644 --- a/src/mame/drivers/onetwo.c +++ b/src/mame/drivers/onetwo.c @@ -85,8 +85,8 @@ public: static TILE_GET_INFO( get_fg_tile_info ) { onetwo_state *state = machine.driver_data(); - int code = (state->m_fgram.target()[tile_index * 2 + 1] << 8) | state->m_fgram.target()[tile_index * 2]; - int color = (state->m_fgram.target()[tile_index * 2 + 1] & 0x80) >> 7; + int code = (state->m_fgram[tile_index * 2 + 1] << 8) | state->m_fgram[tile_index * 2]; + int color = (state->m_fgram[tile_index * 2 + 1] & 0x80) >> 7; code &= 0x7fff; @@ -114,7 +114,7 @@ static SCREEN_UPDATE_IND16( onetwo ) WRITE8_MEMBER(onetwo_state::onetwo_fgram_w) { - m_fgram.target()[offset] = data; + m_fgram[offset] = data; m_fg_tilemap->mark_tile_dirty(offset / 2); } @@ -141,21 +141,21 @@ static void set_color(running_machine &machine, int offset) onetwo_state *state = machine.driver_data(); int r, g, b; - r = state->m_paletteram.target()[offset] & 0x1f; - g = state->m_paletteram2.target()[offset] & 0x1f; - b = ((state->m_paletteram.target()[offset] & 0x60) >> 2) | ((state->m_paletteram2.target()[offset] & 0xe0) >> 5); + r = state->m_paletteram[offset] & 0x1f; + g = state->m_paletteram2[offset] & 0x1f; + b = ((state->m_paletteram[offset] & 0x60) >> 2) | ((state->m_paletteram2[offset] & 0xe0) >> 5); palette_set_color_rgb(machine, offset, pal5bit(r), pal5bit(g), pal5bit(b)); } WRITE8_MEMBER(onetwo_state::palette1_w) { - m_paletteram.target()[offset] = data; + m_paletteram[offset] = data; set_color(machine(), offset); } WRITE8_MEMBER(onetwo_state::palette2_w) { - m_paletteram2.target()[offset] = data; + m_paletteram2[offset] = data; set_color(machine(), offset); } diff --git a/src/mame/drivers/othello.c b/src/mame/drivers/othello.c index 54059b3d08b..d20ebec8ec6 100644 --- a/src/mame/drivers/othello.c +++ b/src/mame/drivers/othello.c @@ -104,7 +104,7 @@ static MC6845_UPDATE_ROW( update_row ) for(cx = 0; cx < x_count; ++cx) { - data_address = ((state->m_videoram.target()[ma + cx] + state->m_tile_bank) << 4) | ra; + data_address = ((state->m_videoram[ma + cx] + state->m_tile_bank) << 4) | ra; tmp = gfx[data_address] | (gfx[data_address + 0x2000] << 8) | (gfx[data_address + 0x4000] << 16); for(x = 0; x < TILE_WIDTH; ++x) diff --git a/src/mame/drivers/panicr.c b/src/mame/drivers/panicr.c index f46e2c6f110..a319190a832 100644 --- a/src/mame/drivers/panicr.c +++ b/src/mame/drivers/panicr.c @@ -163,7 +163,7 @@ static TILE_GET_INFO( get_bgtile_info ) static TILE_GET_INFO( get_txttile_info ) { panicr_state *state = machine.driver_data(); - UINT8 *videoram = state->m_videoram.target(); + UINT8 *videoram = state->m_videoram; int code=videoram[tile_index*4]; int attr=videoram[tile_index*4+2]; int color = attr & 0x07; @@ -224,7 +224,7 @@ static VIDEO_START( panicr ) static void draw_sprites(running_machine &machine, bitmap_ind16 &bitmap,const rectangle &cliprect ) { panicr_state *state = machine.driver_data(); - UINT8 *spriteram = state->m_spriteram.target(); + UINT8 *spriteram = state->m_spriteram; int offs,flipx,flipy,x,y,color,sprite; for (offs = 0; offs<0x1000; offs+=16) @@ -236,7 +236,7 @@ static void draw_sprites(running_machine &machine, bitmap_ind16 &bitmap,const re if (spriteram[offs+1] & 0x40) x -= 0x100; color = spriteram[offs+1] & 0x0f; - sprite = spriteram[offs+0]+(state->m_scrollram.target()[0x0c]<<8); + sprite = spriteram[offs+0]+(state->m_scrollram[0x0c]<<8); drawgfx_transmask(bitmap,cliprect,machine.gfx[2], sprite, @@ -250,7 +250,7 @@ static SCREEN_UPDATE_IND16( panicr) panicr_state *state = screen.machine().driver_data(); bitmap.fill(get_black_pen(screen.machine()), cliprect); state->m_txttilemap ->mark_all_dirty(); - state->m_bgtilemap->set_scrollx(0, ((state->m_scrollram.target()[0x02]&0x0f)<<12)+((state->m_scrollram.target()[0x02]&0xf0)<<4)+((state->m_scrollram.target()[0x04]&0x7f)<<1)+((state->m_scrollram.target()[0x04]&0x80)>>7) ); + state->m_bgtilemap->set_scrollx(0, ((state->m_scrollram[0x02]&0x0f)<<12)+((state->m_scrollram[0x02]&0xf0)<<4)+((state->m_scrollram[0x04]&0x7f)<<1)+((state->m_scrollram[0x04]&0x80)>>7) ); state->m_bgtilemap->draw(bitmap, cliprect, 0,0); draw_sprites(screen.machine(),bitmap,cliprect); state->m_txttilemap->draw(bitmap, cliprect, 0,0); diff --git a/src/mame/drivers/pasha2.c b/src/mame/drivers/pasha2.c index 826711a59d7..a11608a210d 100644 --- a/src/mame/drivers/pasha2.c +++ b/src/mame/drivers/pasha2.c @@ -138,14 +138,14 @@ WRITE16_MEMBER(pasha2_state::pasha2_palette_w) { int color; - COMBINE_DATA(&m_paletteram.target()[offset]); + COMBINE_DATA(&m_paletteram[offset]); offset &= 0xff; - color = (m_paletteram.target()[offset] >> 8) | (m_paletteram.target()[offset + 0x100] & 0xff00); + color = (m_paletteram[offset] >> 8) | (m_paletteram[offset + 0x100] & 0xff00); palette_set_color_rgb(machine(), offset * 2 + 0, pal5bit(color), pal5bit(color >> 5), pal5bit(color >> 10)); - color = (m_paletteram.target()[offset] & 0xff) | ((m_paletteram.target()[offset + 0x100] & 0xff) << 8); + color = (m_paletteram[offset] & 0xff) | ((m_paletteram[offset + 0x100] & 0xff) << 8); palette_set_color_rgb(machine(), offset * 2 + 1, pal5bit(color), pal5bit(color >> 5), pal5bit(color >> 10)); } @@ -468,7 +468,7 @@ READ16_MEMBER(pasha2_state::pasha2_speedup_r) if(cpu_get_pc(&space.device()) == 0x8302) device_spin_until_interrupt(&space.device()); - return m_wram.target()[(0x95744 / 2) + offset]; + return m_wram[(0x95744 / 2) + offset]; } static DRIVER_INIT( pasha2 ) diff --git a/src/mame/drivers/peplus.c b/src/mame/drivers/peplus.c index ab0324fade1..1adf366aeb1 100644 --- a/src/mame/drivers/peplus.c +++ b/src/mame/drivers/peplus.c @@ -371,10 +371,10 @@ static WRITE_LINE_DEVICE_HANDLER(crtc_vsync) WRITE8_MEMBER(peplus_state::peplus_crtc_display_w) { - UINT8 *videoram = m_videoram.target(); + UINT8 *videoram = m_videoram; videoram[m_vid_address] = data; - m_palette_ram[m_vid_address] = m_io_port.target()[1]; - m_palette_ram2[m_vid_address] = m_io_port.target()[3]; + m_palette_ram[m_vid_address] = m_io_port[1]; + m_palette_ram2[m_vid_address] = m_io_port[3]; m_bg_tilemap->mark_tile_dirty(m_vid_address); @@ -384,7 +384,7 @@ WRITE8_MEMBER(peplus_state::peplus_crtc_display_w) WRITE8_MEMBER(peplus_state::peplus_io_w) { - m_io_port.target()[offset] = data; + m_io_port[offset] = data; } WRITE8_MEMBER(peplus_state::peplus_duart_w) @@ -403,37 +403,37 @@ WRITE8_MEMBER(peplus_state::peplus_cmos_w) peplus_load_superdata(machine(), bank_name); } - m_cmos_ram.target()[offset] = data; + m_cmos_ram[offset] = data; } WRITE8_MEMBER(peplus_state::peplus_s3000_w) { - m_s3000_ram.target()[offset] = data; + m_s3000_ram[offset] = data; } WRITE8_MEMBER(peplus_state::peplus_s5000_w) { - m_s5000_ram.target()[offset] = data; + m_s5000_ram[offset] = data; } WRITE8_MEMBER(peplus_state::peplus_s7000_w) { - m_s7000_ram.target()[offset] = data; + m_s7000_ram[offset] = data; } WRITE8_MEMBER(peplus_state::peplus_sb000_w) { - m_sb000_ram.target()[offset] = data; + m_sb000_ram[offset] = data; } WRITE8_MEMBER(peplus_state::peplus_sd000_w) { - m_sd000_ram.target()[offset] = data; + m_sd000_ram[offset] = data; } WRITE8_MEMBER(peplus_state::peplus_sf000_w) { - m_sf000_ram.target()[offset] = data; + m_sf000_ram[offset] = data; } WRITE8_MEMBER(peplus_state::peplus_output_bank_a_w) @@ -491,7 +491,7 @@ static WRITE8_DEVICE_HANDLER(i2c_nvram_w) READ8_MEMBER(peplus_state::peplus_io_r) { - return m_io_port.target()[offset]; + return m_io_port[offset]; } READ8_MEMBER(peplus_state::peplus_duart_r) @@ -502,37 +502,37 @@ READ8_MEMBER(peplus_state::peplus_duart_r) READ8_MEMBER(peplus_state::peplus_cmos_r) { - return m_cmos_ram.target()[offset]; + return m_cmos_ram[offset]; } READ8_MEMBER(peplus_state::peplus_s3000_r) { - return m_s3000_ram.target()[offset]; + return m_s3000_ram[offset]; } READ8_MEMBER(peplus_state::peplus_s5000_r) { - return m_s5000_ram.target()[offset]; + return m_s5000_ram[offset]; } READ8_MEMBER(peplus_state::peplus_s7000_r) { - return m_s7000_ram.target()[offset]; + return m_s7000_ram[offset]; } READ8_MEMBER(peplus_state::peplus_sb000_r) { - return m_sb000_ram.target()[offset]; + return m_sb000_ram[offset]; } READ8_MEMBER(peplus_state::peplus_sd000_r) { - return m_sd000_ram.target()[offset]; + return m_sd000_ram[offset]; } READ8_MEMBER(peplus_state::peplus_sf000_r) { - return m_sf000_ram.target()[offset]; + return m_sf000_ram[offset]; } /* Last Color in Every Palette is bgcolor */ @@ -662,7 +662,7 @@ static READ8_DEVICE_HANDLER( peplus_input_bank_a_r ) static TILE_GET_INFO( get_bg_tile_info ) { peplus_state *state = machine.driver_data(); - UINT8 *videoram = state->m_videoram.target(); + UINT8 *videoram = state->m_videoram; int pr = state->m_palette_ram[tile_index]; int pr2 = state->m_palette_ram2[tile_index]; int vr = videoram[tile_index]; @@ -1019,22 +1019,22 @@ static MACHINE_RESET( peplus ) peplus_state *state = machine.driver_data(); // pepp0158 - state->m_program_ram.target()[0xa19f] = 0x22; // RET - Disable Memory Test - state->m_program_ram.target()[0xddea] = 0x22; // RET - Disable Program Checksum + state->m_program_ram[0xa19f] = 0x22; // RET - Disable Memory Test + state->m_program_ram[0xddea] = 0x22; // RET - Disable Program Checksum state->m_autohold_addr = 0x5ffe; // AutoHold Address // pepp0188 - state->m_program_ram.target()[0x9a8d] = 0x22; // RET - Disable Memory Test - state->m_program_ram.target()[0xf429] = 0x22; // RET - Disable Program Checksum + state->m_program_ram[0x9a8d] = 0x22; // RET - Disable Memory Test + state->m_program_ram[0xf429] = 0x22; // RET - Disable Program Checksum state->m_autohold_addr = 0x742f; // AutoHold Address // pepp0516 - state->m_program_ram.target()[0x9a24] = 0x22; // RET - Disable Memory Test - state->m_program_ram.target()[0xd61d] = 0x22; // RET - Disable Program Checksum + state->m_program_ram[0x9a24] = 0x22; // RET - Disable Memory Test + state->m_program_ram[0xd61d] = 0x22; // RET - Disable Program Checksum state->m_autohold_addr = 0x5e7e; // AutoHold Address if (state->m_autohold_addr) - state->m_program_ram.target()[state->m_autohold_addr] = input_port_read_safe(machine, "AUTOHOLD",0x00) & 0x01; + state->m_program_ram[state->m_autohold_addr] = input_port_read_safe(machine, "AUTOHOLD",0x00) & 0x01; #endif } diff --git a/src/mame/drivers/photon2.c b/src/mame/drivers/photon2.c index 91eee003640..935a9247d38 100644 --- a/src/mame/drivers/photon2.c +++ b/src/mame/drivers/photon2.c @@ -133,7 +133,7 @@ static SCREEN_UPDATE_IND16( spectrum ) unsigned char *attr, *scr; // int full_refresh = 1; - scr=state->m_spectrum_video_ram.target(); + scr=state->m_spectrum_video_ram; bitmap.fill(state->m_spectrum_port_fe & 0x07, cliprect); diff --git a/src/mame/drivers/pinkiri8.c b/src/mame/drivers/pinkiri8.c index ab360d7ec34..6d8c9a28928 100644 --- a/src/mame/drivers/pinkiri8.c +++ b/src/mame/drivers/pinkiri8.c @@ -205,7 +205,7 @@ static SCREEN_UPDATE_IND16( pinkiri8 ) for (i=0x00;i<0x40;i+=2) { - printf("%02x, ", state->m_janshi_widthflags.target()[i+1]); + printf("%02x, ", state->m_janshi_widthflags[i+1]); count2++; @@ -223,8 +223,8 @@ static SCREEN_UPDATE_IND16( pinkiri8 ) - //popmessage("%02x",state->m_janshi_crtc_regs.target()[0x0a]); - col_bank = (state->m_janshi_crtc_regs.target()[0x0a] & 0x40) >> 6; + //popmessage("%02x",state->m_janshi_crtc_regs[0x0a]); + col_bank = (state->m_janshi_crtc_regs[0x0a] & 0x40) >> 6; bitmap.fill(get_black_pen(screen.machine()), cliprect); @@ -238,8 +238,8 @@ static SCREEN_UPDATE_IND16( pinkiri8 ) { for(x=0;x<32;x++) { - tile = state->m_janshi_back_vram.target()[count+1]<<8 | state->m_janshi_back_vram.target()[count+0]; - attr = state->m_janshi_back_vram.target()[count+2] ^ 0xf0; + tile = state->m_janshi_back_vram[count+1]<<8 | state->m_janshi_back_vram[count+0]; + attr = state->m_janshi_back_vram[count+2] ^ 0xf0; col = (attr >> 4) | 0x10; drawgfx_transpen(bitmap,cliprect,gfx,tile,col,0,0,x*16,y*8,0); @@ -275,15 +275,15 @@ static SCREEN_UPDATE_IND16( pinkiri8 ) */ - spr_offs = ((state->m_janshi_vram1.target()[(i*4)+0] & 0xff) | (state->m_janshi_vram1.target()[(i*4)+1]<<8)) & 0xffff; - col = (state->m_janshi_vram1.target()[(i*4)+2] & 0xf8) >> 3; - x = state->m_janshi_vram1.target()[(i*4)+3]; + spr_offs = ((state->m_janshi_vram1[(i*4)+0] & 0xff) | (state->m_janshi_vram1[(i*4)+1]<<8)) & 0xffff; + col = (state->m_janshi_vram1[(i*4)+2] & 0xf8) >> 3; + x = state->m_janshi_vram1[(i*4)+3]; x &= 0xff; x *= 2; -// unk2 = state->m_janshi_vram2.target()[(i*2)+1]; - y = (state->m_janshi_vram2.target()[(i*2)+0]); +// unk2 = state->m_janshi_vram2[(i*2)+1]; + y = (state->m_janshi_vram2[(i*2)+0]); y = 0x100-y; @@ -296,7 +296,7 @@ static SCREEN_UPDATE_IND16( pinkiri8 ) // these bits seem to somehow determine the sprite height / widths for the sprite ram region? - int bit = state->m_janshi_widthflags.target()[(i/0x20)*2 + 1]; + int bit = state->m_janshi_widthflags[(i/0x20)*2 + 1]; if (bit) { diff --git a/src/mame/drivers/pipeline.c b/src/mame/drivers/pipeline.c index a1aea3432f0..4bf8a2308f4 100644 --- a/src/mame/drivers/pipeline.c +++ b/src/mame/drivers/pipeline.c @@ -100,7 +100,7 @@ public: static TILE_GET_INFO( get_tile_info ) { pipeline_state *state = machine.driver_data(); - int code = state->m_vram2.target()[tile_index]+state->m_vram2.target()[tile_index+0x800]*256; + int code = state->m_vram2[tile_index]+state->m_vram2[tile_index+0x800]*256; SET_TILE_INFO( 0, code, @@ -111,8 +111,8 @@ static TILE_GET_INFO( get_tile_info ) static TILE_GET_INFO( get_tile_info2 ) { pipeline_state *state = machine.driver_data(); - int code =state->m_vram1.target()[tile_index]+((state->m_vram1.target()[tile_index+0x800]>>4))*256; - int color=((state->m_vram1.target()[tile_index+0x800])&0xf); + int code =state->m_vram1[tile_index]+((state->m_vram1[tile_index+0x800]>>4))*256; + int color=((state->m_vram1[tile_index+0x800])&0xf); SET_TILE_INFO ( 1, @@ -151,7 +151,7 @@ WRITE8_MEMBER(pipeline_state::vram2_w) if(!(m_vidctrl&1)) { m_tilemap1->mark_tile_dirty(offset&0x7ff); - m_vram2.target()[offset]=data; + m_vram2[offset]=data; } else { @@ -167,7 +167,7 @@ WRITE8_MEMBER(pipeline_state::vram2_w) WRITE8_MEMBER(pipeline_state::vram1_w) { m_tilemap2->mark_tile_dirty(offset&0x7ff); - m_vram1.target()[offset]=data; + m_vram1[offset]=data; } static READ8_DEVICE_HANDLER(protection_r) diff --git a/src/mame/drivers/pkscram.c b/src/mame/drivers/pkscram.c index 8330c8bb755..2134910314f 100644 --- a/src/mame/drivers/pkscram.c +++ b/src/mame/drivers/pkscram.c @@ -46,19 +46,19 @@ enum { interrupt_scanline=192 }; WRITE16_MEMBER(pkscram_state::pkscramble_fgtilemap_w) { - COMBINE_DATA(&m_pkscramble_fgtilemap_ram.target()[offset]); + COMBINE_DATA(&m_pkscramble_fgtilemap_ram[offset]); m_fg_tilemap->mark_tile_dirty(offset >> 1); } WRITE16_MEMBER(pkscram_state::pkscramble_mdtilemap_w) { - COMBINE_DATA(&m_pkscramble_mdtilemap_ram.target()[offset]); + COMBINE_DATA(&m_pkscramble_mdtilemap_ram[offset]); m_md_tilemap->mark_tile_dirty(offset >> 1); } WRITE16_MEMBER(pkscram_state::pkscramble_bgtilemap_w) { - COMBINE_DATA(&m_pkscramble_bgtilemap_ram.target()[offset]); + COMBINE_DATA(&m_pkscramble_bgtilemap_ram[offset]); m_bg_tilemap->mark_tile_dirty(offset >> 1); } @@ -187,8 +187,8 @@ INPUT_PORTS_END static TILE_GET_INFO( get_bg_tile_info ) { pkscram_state *state = machine.driver_data(); - int tile = state->m_pkscramble_bgtilemap_ram.target()[tile_index*2]; - int color = state->m_pkscramble_bgtilemap_ram.target()[tile_index*2 + 1] & 0x7f; + int tile = state->m_pkscramble_bgtilemap_ram[tile_index*2]; + int color = state->m_pkscramble_bgtilemap_ram[tile_index*2 + 1] & 0x7f; SET_TILE_INFO(0,tile,color,0); } @@ -196,8 +196,8 @@ static TILE_GET_INFO( get_bg_tile_info ) static TILE_GET_INFO( get_md_tile_info ) { pkscram_state *state = machine.driver_data(); - int tile = state->m_pkscramble_mdtilemap_ram.target()[tile_index*2]; - int color = state->m_pkscramble_mdtilemap_ram.target()[tile_index*2 + 1] & 0x7f; + int tile = state->m_pkscramble_mdtilemap_ram[tile_index*2]; + int color = state->m_pkscramble_mdtilemap_ram[tile_index*2 + 1] & 0x7f; SET_TILE_INFO(0,tile,color,0); } @@ -205,8 +205,8 @@ static TILE_GET_INFO( get_md_tile_info ) static TILE_GET_INFO( get_fg_tile_info ) { pkscram_state *state = machine.driver_data(); - int tile = state->m_pkscramble_fgtilemap_ram.target()[tile_index*2]; - int color = state->m_pkscramble_fgtilemap_ram.target()[tile_index*2 + 1] & 0x7f; + int tile = state->m_pkscramble_fgtilemap_ram[tile_index*2]; + int color = state->m_pkscramble_fgtilemap_ram[tile_index*2 + 1] & 0x7f; SET_TILE_INFO(0,tile,color,0); } diff --git a/src/mame/drivers/poker72.c b/src/mame/drivers/poker72.c index 842c106431d..9ab726688e7 100644 --- a/src/mame/drivers/poker72.c +++ b/src/mame/drivers/poker72.c @@ -47,10 +47,10 @@ static SCREEN_UPDATE_IND16(poker72) { for (x=0;x<64;x++) { - int tile = ((state->m_vram.target()[count+1] & 0x0f) << 8 ) | (state->m_vram.target()[count+0] & 0xff); //TODO: tile bank - int fx = (state->m_vram.target()[count+1] & 0x10); - int fy = (state->m_vram.target()[count+1] & 0x20); - int color = (state->m_vram.target()[count+1] & 0xc0) >> 6; + int tile = ((state->m_vram[count+1] & 0x0f) << 8 ) | (state->m_vram[count+0] & 0xff); //TODO: tile bank + int fx = (state->m_vram[count+1] & 0x10); + int fy = (state->m_vram[count+1] & 0x20); + int color = (state->m_vram[count+1] & 0xc0) >> 6; tile|= state->m_tile_bank << 12; @@ -66,11 +66,11 @@ static SCREEN_UPDATE_IND16(poker72) WRITE8_MEMBER(poker72_state::poker72_paletteram_w) { int r,g,b; - m_pal.target()[offset] = data; + m_pal[offset] = data; - r = m_pal.target()[(offset & 0x3ff)+0x000] & 0x3f; - g = m_pal.target()[(offset & 0x3ff)+0x400] & 0x3f; - b = m_pal.target()[(offset & 0x3ff)+0x800] & 0x3f; + r = m_pal[(offset & 0x3ff)+0x000] & 0x3f; + g = m_pal[(offset & 0x3ff)+0x400] & 0x3f; + b = m_pal[(offset & 0x3ff)+0x800] & 0x3f; palette_set_color_rgb( machine(), offset & 0x3ff, pal6bit(r), pal6bit(g), pal6bit(b)); } diff --git a/src/mame/drivers/poo.c b/src/mame/drivers/poo.c index 2a43a1910bc..3ad2239e73f 100644 --- a/src/mame/drivers/poo.c +++ b/src/mame/drivers/poo.c @@ -86,9 +86,9 @@ static SCREEN_UPDATE_IND16(unclepoo) { for (y=0;y<32;y++) { - int tile = state->m_vram.target()[count+0x000] | ((state->m_vram.target()[count+0x400] & 3) <<8); - int color = (state->m_vram.target()[count+0x400] & 0x38) >> 3; - int scrolly = (state->m_scrolly.target()[x*4]); + int tile = state->m_vram[count+0x000] | ((state->m_vram[count+0x400] & 3) <<8); + int color = (state->m_vram[count+0x400] & 0x38) >> 3; + int scrolly = (state->m_scrolly[x*4]); drawgfx_opaque(bitmap,cliprect,gfx,tile,color+state->m_vram_colbank,0,0,x*8,256-(y*8)+scrolly); drawgfx_opaque(bitmap,cliprect,gfx,tile,color+state->m_vram_colbank,0,0,x*8,0-(y*8)+scrolly); @@ -102,10 +102,10 @@ static SCREEN_UPDATE_IND16(unclepoo) for(i=0;i<0x80;i+=4) { - spr_offs = state->m_sprites.target()[i+2] | (state->m_sprites.target()[i+3] & 3) << 8; - y = state->m_sprites.target()[i+0]+8; - x = state->m_sprites.target()[i+1]; - col = (state->m_sprites.target()[i+3] & 0xf8) >> 3; + spr_offs = state->m_sprites[i+2] | (state->m_sprites[i+3] & 3) << 8; + y = state->m_sprites[i+0]+8; + x = state->m_sprites[i+1]; + col = (state->m_sprites[i+3] & 0xf8) >> 3; fx = 0; fy = 0; diff --git a/src/mame/drivers/popobear.c b/src/mame/drivers/popobear.c index 8b1f731c0a4..2c3d6cf7743 100644 --- a/src/mame/drivers/popobear.c +++ b/src/mame/drivers/popobear.c @@ -104,13 +104,14 @@ VIDEO_START(popobear) static void draw_layer(running_machine &machine, bitmap_ind16 &bitmap,const rectangle &cliprect, UINT8 layer_n) { popobear_state *state = machine.driver_data(); - UINT8* vram = (UINT8 *)state->m_vram.target(); - UINT16* vreg = (UINT16 *)state->m_vregs.target(); + // ERROR: This cast is NOT endian-safe without the use of BYTE/WORD/DWORD_XOR_* macros! + UINT8* vram = reinterpret_cast(state->m_vram.target()); + UINT16* vreg = (UINT16 *)state->m_vregs; int count; const UINT8 vreg_base[] = { 0x10/2, 0x14/2 }; int xscroll,yscroll; -// count = (state->m_vregs.target()[vreg_base[layer_n]]<<5); +// count = (state->m_vregs[vreg_base[layer_n]]<<5); // count &= 0xfc000; count = (0xf0000+layer_n*0x4000); if(layer_n & 2) @@ -177,7 +178,8 @@ static void draw_layer(running_machine &machine, bitmap_ind16 &bitmap,const rect static void draw_sprites(running_machine &machine, bitmap_ind16 &bitmap,const rectangle &cliprect) { popobear_state *state = machine.driver_data(); - UINT8* vram = (UINT8 *)state->m_spr.target(); + // ERROR: This cast is NOT endian-safe without the use of BYTE/WORD/DWORD_XOR_* macros! + UINT8* vram = reinterpret_cast(state->m_spr.target()); int i; #if 0 static int bank_test = 1; @@ -259,7 +261,7 @@ SCREEN_UPDATE_IND16( popobear ) bitmap.fill(0, cliprect); - //popmessage("%04x",state->m_vregs.target()[0/2]); + //popmessage("%04x",state->m_vregs[0/2]); draw_layer(screen.machine(),bitmap,cliprect,3); draw_layer(screen.machine(),bitmap,cliprect,2); diff --git a/src/mame/drivers/ppmast93.c b/src/mame/drivers/ppmast93.c index c2729f26268..ee4c634cc0a 100644 --- a/src/mame/drivers/ppmast93.c +++ b/src/mame/drivers/ppmast93.c @@ -159,13 +159,13 @@ public: WRITE8_MEMBER(ppmast93_state::ppmast93_fgram_w) { - m_fgram.target()[offset] = data; + m_fgram[offset] = data; m_fg_tilemap->mark_tile_dirty(offset/2); } WRITE8_MEMBER(ppmast93_state::ppmast93_bgram_w) { - m_bgram.target()[offset] = data; + m_bgram[offset] = data; m_bg_tilemap->mark_tile_dirty(offset/2); } @@ -325,7 +325,7 @@ GFXDECODE_END static TILE_GET_INFO( get_ppmast93_bg_tile_info ) { ppmast93_state *state = machine.driver_data(); - int code = (state->m_bgram.target()[tile_index*2+1] << 8) | state->m_bgram.target()[tile_index*2]; + int code = (state->m_bgram[tile_index*2+1] << 8) | state->m_bgram[tile_index*2]; SET_TILE_INFO( 0, code & 0x0fff, @@ -336,7 +336,7 @@ static TILE_GET_INFO( get_ppmast93_bg_tile_info ) static TILE_GET_INFO( get_ppmast93_fg_tile_info ) { ppmast93_state *state = machine.driver_data(); - int code = (state->m_fgram.target()[tile_index*2+1] << 8) | state->m_fgram.target()[tile_index*2]; + int code = (state->m_fgram[tile_index*2+1] << 8) | state->m_fgram[tile_index*2]; SET_TILE_INFO( 0, (code & 0x0fff)+0x1000, diff --git a/src/mame/drivers/progolf.c b/src/mame/drivers/progolf.c index fc969ca1af3..fe120593b5e 100644 --- a/src/mame/drivers/progolf.c +++ b/src/mame/drivers/progolf.c @@ -153,7 +153,7 @@ static SCREEN_UPDATE_IND16( progolf ) WRITE8_MEMBER(progolf_state::progolf_charram_w) { int i; - m_fbram.target()[offset] = data; + m_fbram[offset] = data; if(m_char_pen == 7) { diff --git a/src/mame/drivers/pturn.c b/src/mame/drivers/pturn.c index 3a875d61d2d..8d424c46ac7 100644 --- a/src/mame/drivers/pturn.c +++ b/src/mame/drivers/pturn.c @@ -128,7 +128,7 @@ static const UINT8 tile_lookup[0x10]= static TILE_GET_INFO( get_pturn_tile_info ) { pturn_state *state = machine.driver_data(); - UINT8 *videoram = state->m_videoram.target(); + UINT8 *videoram = state->m_videoram; int tileno; tileno = videoram[tile_index]; @@ -164,7 +164,7 @@ static VIDEO_START(pturn) static SCREEN_UPDATE_IND16(pturn) { pturn_state *state = screen.machine().driver_data(); - UINT8 *spriteram = state->m_spriteram.target(); + UINT8 *spriteram = state->m_spriteram; int offs; int sx, sy; int flipx, flipy; @@ -219,7 +219,7 @@ READ8_MEMBER(pturn_state::pturn_protection2_r) WRITE8_MEMBER(pturn_state::pturn_videoram_w) { - UINT8 *videoram = m_videoram.target(); + UINT8 *videoram = m_videoram; videoram[offset]=data; m_fgmap->mark_tile_dirty(offset); } diff --git a/src/mame/drivers/pzletime.c b/src/mame/drivers/pzletime.c index 3793dffd246..b86c9dabcbb 100644 --- a/src/mame/drivers/pzletime.c +++ b/src/mame/drivers/pzletime.c @@ -57,8 +57,8 @@ public: static TILE_GET_INFO( get_mid_tile_info ) { pzletime_state *state = machine.driver_data(); - int tileno = state->m_mid_videoram.target()[tile_index] & 0x0fff; - int colour = state->m_mid_videoram.target()[tile_index] & 0xf000; + int tileno = state->m_mid_videoram[tile_index] & 0x0fff; + int colour = state->m_mid_videoram[tile_index] & 0xf000; colour = colour >> 12; SET_TILE_INFO(2, tileno, colour, 0); } @@ -66,8 +66,8 @@ static TILE_GET_INFO( get_mid_tile_info ) static TILE_GET_INFO( get_txt_tile_info ) { pzletime_state *state = machine.driver_data(); - int tileno = state->m_txt_videoram.target()[tile_index] & 0x0fff; - int colour = state->m_txt_videoram.target()[tile_index] & 0xf000; + int tileno = state->m_txt_videoram[tile_index] & 0x0fff; + int colour = state->m_txt_videoram[tile_index] & 0xf000; colour = colour >> 12; SET_TILE_INFO(0, tileno, colour, 0); @@ -94,13 +94,13 @@ static SCREEN_UPDATE_IND16( pzletime ) bitmap.fill(screen.machine().pens[0], cliprect); //bg pen - state->m_txt_tilemap->set_scrolly(0, state->m_tilemap_regs.target()[0] - 3); - state->m_txt_tilemap->set_scrollx(0, state->m_tilemap_regs.target()[1]); + state->m_txt_tilemap->set_scrolly(0, state->m_tilemap_regs[0] - 3); + state->m_txt_tilemap->set_scrollx(0, state->m_tilemap_regs[1]); - state->m_mid_tilemap->set_scrolly(0, state->m_tilemap_regs.target()[2] - 3); - state->m_mid_tilemap->set_scrollx(0, state->m_tilemap_regs.target()[3] - 7); + state->m_mid_tilemap->set_scrolly(0, state->m_tilemap_regs[2] - 3); + state->m_mid_tilemap->set_scrollx(0, state->m_tilemap_regs[3] - 7); - if (state->m_video_regs.target()[2] & 1) + if (state->m_video_regs[2] & 1) { count = 0; @@ -108,8 +108,8 @@ static SCREEN_UPDATE_IND16( pzletime ) { for (x = 0; x < 512; x++) { - if (state->m_bg_videoram.target()[count] & 0x8000) - bitmap.pix16((y - 18) & 0xff, (x - 32) & 0x1ff) = 0x300 + (state->m_bg_videoram.target()[count] & 0x7fff); + if (state->m_bg_videoram[count] & 0x8000) + bitmap.pix16((y - 18) & 0xff, (x - 32) & 0x1ff) = 0x300 + (state->m_bg_videoram[count] & 0x7fff); count++; } @@ -119,7 +119,7 @@ static SCREEN_UPDATE_IND16( pzletime ) state->m_mid_tilemap->draw(bitmap, cliprect, 0, 0); { - UINT16 *spriteram = state->m_spriteram.target(); + UINT16 *spriteram = state->m_spriteram; int offs, spr_offs, colour, sx, sy; for(offs = 0; offs < 0x2000 / 2; offs += 4) @@ -147,13 +147,13 @@ static SCREEN_UPDATE_IND16( pzletime ) WRITE16_MEMBER(pzletime_state::mid_videoram_w) { - COMBINE_DATA(&m_mid_videoram.target()[offset]); + COMBINE_DATA(&m_mid_videoram[offset]); m_mid_tilemap->mark_tile_dirty(offset); } WRITE16_MEMBER(pzletime_state::txt_videoram_w) { - COMBINE_DATA(&m_txt_videoram.target()[offset]); + COMBINE_DATA(&m_txt_videoram[offset]); m_txt_tilemap->mark_tile_dirty(offset); } @@ -179,25 +179,25 @@ WRITE16_MEMBER(pzletime_state::video_regs_w) { int i; - COMBINE_DATA(&m_video_regs.target()[offset]); + COMBINE_DATA(&m_video_regs[offset]); if (offset == 0) { - if (m_video_regs.target()[0] > 0) + if (m_video_regs[0] > 0) { for (i = 0; i < 0x300; i++) { - palette_set_pen_contrast(machine(), i, (double)0x8000/(double)m_video_regs.target()[0]); + palette_set_pen_contrast(machine(), i, (double)0x8000/(double)m_video_regs[0]); } } } else if (offset == 1) { - if (m_video_regs.target()[1] > 0) + if (m_video_regs[1] > 0) { for (i = 0x300; i < 32768 + 0x300; i++) { - palette_set_pen_contrast(machine(), i, (double)0x8000/(double)m_video_regs.target()[1]); + palette_set_pen_contrast(machine(), i, (double)0x8000/(double)m_video_regs[1]); } } } diff --git a/src/mame/drivers/quizpun2.c b/src/mame/drivers/quizpun2.c index 71bfaf96a36..0bfa09ecb81 100644 --- a/src/mame/drivers/quizpun2.c +++ b/src/mame/drivers/quizpun2.c @@ -120,27 +120,27 @@ public: static TILE_GET_INFO( get_bg_tile_info ) { quizpun2_state *state = machine.driver_data(); - UINT16 code = state->m_bg_ram.target()[ tile_index * 2 ] + state->m_bg_ram.target()[ tile_index * 2 + 1 ] * 256; + UINT16 code = state->m_bg_ram[ tile_index * 2 ] + state->m_bg_ram[ tile_index * 2 + 1 ] * 256; SET_TILE_INFO(0, code, 0, 0); } static TILE_GET_INFO( get_fg_tile_info ) { quizpun2_state *state = machine.driver_data(); - UINT16 code = state->m_fg_ram.target()[ tile_index * 4 ] + state->m_fg_ram.target()[ tile_index * 4 + 1 ] * 256; - UINT8 color = state->m_fg_ram.target()[ tile_index * 4 + 2 ]; + UINT16 code = state->m_fg_ram[ tile_index * 4 ] + state->m_fg_ram[ tile_index * 4 + 1 ] * 256; + UINT8 color = state->m_fg_ram[ tile_index * 4 + 2 ]; SET_TILE_INFO(1, code, color & 0x0f, 0); } WRITE8_MEMBER(quizpun2_state::bg_ram_w) { - m_bg_ram.target()[offset] = data; + m_bg_ram[offset] = data; m_bg_tmap->mark_tile_dirty(offset/2); } WRITE8_MEMBER(quizpun2_state::fg_ram_w) { - m_fg_ram.target()[offset] = data; + m_fg_ram[offset] = data; m_fg_tmap->mark_tile_dirty(offset/4); } diff --git a/src/mame/drivers/quizshow.c b/src/mame/drivers/quizshow.c index 7acf37757ab..3fd119f1c22 100644 --- a/src/mame/drivers/quizshow.c +++ b/src/mame/drivers/quizshow.c @@ -88,7 +88,7 @@ PALETTE_INIT( quizshow ) static TILE_GET_INFO( get_tile_info ) { quizshow_state *state = machine.driver_data(); - UINT8 code = state->m_main_ram.target()[tile_index]; + UINT8 code = state->m_main_ram[tile_index]; // d6: blink, d7: invert UINT8 color = (code & (state->m_blink_state | 0x80)) >> 6; @@ -200,7 +200,7 @@ READ8_MEMBER(quizshow_state::quizshow_tape_signal_r) WRITE8_MEMBER(quizshow_state::quizshow_main_ram_w) { - m_main_ram.target()[offset]=data; + m_main_ram[offset]=data; m_tilemap->mark_tile_dirty(offset); } diff --git a/src/mame/drivers/r2dtank.c b/src/mame/drivers/r2dtank.c index 1662f7a6e31..c45af7056a0 100644 --- a/src/mame/drivers/r2dtank.c +++ b/src/mame/drivers/r2dtank.c @@ -353,8 +353,8 @@ static MC6845_UPDATE_ROW( update_row ) if (state->m_flipscreen) offs = offs ^ 0x1fff; - data = state->m_videoram.target()[offs]; - fore_color = (state->m_colorram.target()[offs] >> 5) & 0x07; + data = state->m_videoram[offs]; + fore_color = (state->m_colorram[offs] >> 5) & 0x07; for (i = 0; i < 8; i++) { diff --git a/src/mame/drivers/r2dx_v33.c b/src/mame/drivers/r2dx_v33.c index b19bb209e16..25bf65378ee 100644 --- a/src/mame/drivers/r2dx_v33.c +++ b/src/mame/drivers/r2dx_v33.c @@ -98,7 +98,7 @@ static TILE_GET_INFO( get_tx_tile_info ) static void draw_sprites(running_machine &machine, bitmap_ind16 &bitmap,const rectangle &cliprect,int pri) { r2dx_v33_state *state = machine.driver_data(); - UINT16 *spriteram16 = state->m_spriteram.target(); + UINT16 *spriteram16 = state->m_spriteram; int offs,fx,fy,x,y,color,sprite; // int cur_pri; int dx,dy,ax,ay; diff --git a/src/mame/drivers/rbmk.c b/src/mame/drivers/rbmk.c index c93ce2518c6..85b9302534b 100644 --- a/src/mame/drivers/rbmk.c +++ b/src/mame/drivers/rbmk.c @@ -504,7 +504,7 @@ static SCREEN_UPDATE_IND16(rbmk) { for (x=0;x<64;x++) { - int tile = state->m_gms_vidram2.target()[count+0x600]; + int tile = state->m_gms_vidram2[count+0x600]; drawgfx_opaque(bitmap,cliprect,screen.machine().gfx[0],(tile&0xfff)+((state->m_tilebank&0x10)>>4)*0x1000,tile>>12,0,0,x*8,y*32); count++; } @@ -516,7 +516,7 @@ static SCREEN_UPDATE_IND16(rbmk) { for (x=0;x<64;x++) { - int tile = state->m_gms_vidram.target()[count]; + int tile = state->m_gms_vidram[count]; drawgfx_transpen(bitmap,cliprect,screen.machine().gfx[1],(tile&0xfff)+((state->m_tilebank>>1)&3)*0x1000,tile>>12,0,0,x*8,y*8,0); count++; } diff --git a/src/mame/drivers/re900.c b/src/mame/drivers/re900.c index cdd86d68734..3a82a8efce1 100644 --- a/src/mame/drivers/re900.c +++ b/src/mame/drivers/re900.c @@ -174,7 +174,7 @@ static READ8_DEVICE_HANDLER (re_psg_portB_r) READ8_MEMBER(re900_state::rom_r) { - return m_rom.target()[offset]; + return m_rom[offset]; } diff --git a/src/mame/drivers/rgum.c b/src/mame/drivers/rgum.c index 1d32b7fe3f6..3023a2d01f8 100644 --- a/src/mame/drivers/rgum.c +++ b/src/mame/drivers/rgum.c @@ -50,7 +50,7 @@ static SCREEN_UPDATE_IND16(royalgum) { for(x=0;x<66;x++) { - int tile = state->m_vram.target()[count] | ((state->m_cram.target()[count] & 0xf) <<8); + int tile = state->m_vram[count] | ((state->m_cram[count] & 0xf) <<8); drawgfx_opaque(bitmap,cliprect,gfx,tile,0,0,0,x*8,y*8); diff --git a/src/mame/drivers/rmhaihai.c b/src/mame/drivers/rmhaihai.c index d09888e46e0..356cb1921c5 100644 --- a/src/mame/drivers/rmhaihai.c +++ b/src/mame/drivers/rmhaihai.c @@ -60,21 +60,21 @@ public: WRITE8_MEMBER(rmhaihai_state::rmhaihai_videoram_w) { - m_videoram.target()[offset] = data; + m_videoram[offset] = data; m_bg_tilemap->mark_tile_dirty(offset); } WRITE8_MEMBER(rmhaihai_state::rmhaihai_colorram_w) { - m_colorram.target()[offset] = data; + m_colorram[offset] = data; m_bg_tilemap->mark_tile_dirty(offset); } static TILE_GET_INFO( get_bg_tile_info ) { rmhaihai_state *state = machine.driver_data(); - int attr = state->m_colorram.target()[tile_index]; - int code = state->m_videoram.target()[tile_index] + (state->m_gfxbank << 12) + ((attr & 0x07) << 8) + ((attr & 0x80) << 4); + int attr = state->m_colorram[tile_index]; + int code = state->m_videoram[tile_index] + (state->m_gfxbank << 12) + ((attr & 0x07) << 8) + ((attr & 0x80) << 4); int color = (state->m_gfxbank << 5) + (attr >> 3); SET_TILE_INFO(0, code, color, 0); diff --git a/src/mame/drivers/rotaryf.c b/src/mame/drivers/rotaryf.c index 9da11c96759..d66a0e94e9d 100644 --- a/src/mame/drivers/rotaryf.c +++ b/src/mame/drivers/rotaryf.c @@ -72,7 +72,7 @@ static SCREEN_UPDATE_RGB32( rotaryf ) UINT8 x = offs << 3; int y = offs >> 5; - UINT8 data = state->m_videoram.target()[offs]; + UINT8 data = state->m_videoram[offs]; for (i = 0; i < 8; i++) { diff --git a/src/mame/drivers/royalmah.c b/src/mame/drivers/royalmah.c index e77f88c5bc2..3113ccf0721 100644 --- a/src/mame/drivers/royalmah.c +++ b/src/mame/drivers/royalmah.c @@ -278,7 +278,7 @@ WRITE8_MEMBER(royalmah_state::mjderngr_palbank_w) static SCREEN_UPDATE_IND16( royalmah ) { royalmah_state *state = screen.machine().driver_data(); - UINT8 *videoram = state->m_videoram.target(); + UINT8 *videoram = state->m_videoram; offs_t offs; @@ -898,7 +898,7 @@ READ8_MEMBER(royalmah_state::mjifb_rom_io_r) WRITE8_MEMBER(royalmah_state::mjifb_rom_io_w) { - UINT8 *videoram = m_videoram.target(); + UINT8 *videoram = m_videoram; if (m_mjifb_rom_enable) { videoram[offset] = data; @@ -926,7 +926,7 @@ WRITE8_MEMBER(royalmah_state::mjifb_rom_io_w) WRITE8_MEMBER(royalmah_state::mjifb_videoram_w) { - UINT8 *videoram = m_videoram.target(); + UINT8 *videoram = m_videoram; videoram[offset + 0x4000] = data; } @@ -1007,7 +1007,7 @@ READ8_MEMBER(royalmah_state::mjdejavu_rom_io_r) WRITE8_MEMBER(royalmah_state::mjdejavu_rom_io_w) { - UINT8 *videoram = m_videoram.target(); + UINT8 *videoram = m_videoram; if (m_mjifb_rom_enable) { videoram[offset] = data; @@ -1194,7 +1194,7 @@ READ8_MEMBER(royalmah_state::mjvegasa_rom_io_r) WRITE8_MEMBER(royalmah_state::mjvegasa_rom_io_w) { - UINT8 *videoram = m_videoram.target(); + UINT8 *videoram = m_videoram; if ((m_rombank & 0x70) != 0x70) { videoram[offset] = data; diff --git a/src/mame/drivers/safarir.c b/src/mame/drivers/safarir.c index e3aebc606b6..0481a04155c 100644 --- a/src/mame/drivers/safarir.c +++ b/src/mame/drivers/safarir.c @@ -201,7 +201,7 @@ static SCREEN_UPDATE_IND16( safarir ) { safarir_state *state = screen.machine().driver_data(); - state->m_bg_tilemap->set_scrollx(0, *state->m_bg_scroll.target()); + state->m_bg_tilemap->set_scrollx(0, *state->m_bg_scroll); state->m_bg_tilemap->draw(bitmap, cliprect, 0, 0); state->m_fg_tilemap->draw(bitmap, cliprect, 0, 0); diff --git a/src/mame/drivers/sbowling.c b/src/mame/drivers/sbowling.c index b9bd0ae1f07..b57f493b562 100644 --- a/src/mame/drivers/sbowling.c +++ b/src/mame/drivers/sbowling.c @@ -96,15 +96,15 @@ WRITE8_MEMBER(sbowling_state::sbw_videoram_w) int flip = flip_screen(); int x,y,i,v1,v2; - m_videoram.target()[offset] = data; + m_videoram[offset] = data; offset &= 0x1fff; y = offset / 32; x = (offset % 32) * 8; - v1 = m_videoram.target()[offset]; - v2 = m_videoram.target()[offset+0x2000]; + v1 = m_videoram[offset]; + v2 = m_videoram[offset+0x2000]; for (i = 0; i < 8; i++) { @@ -189,7 +189,7 @@ WRITE8_MEMBER(sbowling_state::system_w) { int offs; for (offs = 0;offs < 0x4000; offs++) - sbw_videoram_w(space, offs, m_videoram.target()[offs]); + sbw_videoram_w(space, offs, m_videoram[offs]); } m_sbw_system = data; } diff --git a/src/mame/drivers/sbrkout.c b/src/mame/drivers/sbrkout.c index a9dc83cec94..f0acb4225be 100644 --- a/src/mame/drivers/sbrkout.c +++ b/src/mame/drivers/sbrkout.c @@ -98,7 +98,7 @@ static TIMER_CALLBACK( pot_trigger_callback ); static MACHINE_START( sbrkout ) { sbrkout_state *state = machine.driver_data(); - UINT8 *videoram = state->m_videoram.target(); + UINT8 *videoram = state->m_videoram; memory_set_bankptr(machine, "bank1", &videoram[0x380]); state->m_scanline_timer = machine.scheduler().timer_alloc(FUNC(scanline_callback)); state->m_pot_timer = machine.scheduler().timer_alloc(FUNC(pot_trigger_callback)); @@ -126,7 +126,7 @@ static MACHINE_RESET( sbrkout ) static TIMER_CALLBACK( scanline_callback ) { sbrkout_state *state = machine.driver_data(); - UINT8 *videoram = state->m_videoram.target(); + UINT8 *videoram = state->m_videoram; int scanline = param; /* force a partial update before anything happens */ @@ -299,7 +299,7 @@ READ8_MEMBER(sbrkout_state::sync2_r) static TILE_GET_INFO( get_bg_tile_info ) { sbrkout_state *state = machine.driver_data(); - UINT8 *videoram = state->m_videoram.target(); + UINT8 *videoram = state->m_videoram; int code = (videoram[tile_index] & 0x80) ? videoram[tile_index] : 0; SET_TILE_INFO(0, code, 0, 0); } @@ -314,7 +314,7 @@ static VIDEO_START( sbrkout ) WRITE8_MEMBER(sbrkout_state::sbrkout_videoram_w) { - UINT8 *videoram = m_videoram.target(); + UINT8 *videoram = m_videoram; videoram[offset] = data; m_bg_tilemap->mark_tile_dirty(offset); } @@ -330,7 +330,7 @@ WRITE8_MEMBER(sbrkout_state::sbrkout_videoram_w) static SCREEN_UPDATE_IND16( sbrkout ) { sbrkout_state *state = screen.machine().driver_data(); - UINT8 *videoram = state->m_videoram.target(); + UINT8 *videoram = state->m_videoram; int ball; state->m_bg_tilemap->draw(bitmap, cliprect, 0, 0); diff --git a/src/mame/drivers/seattle.c b/src/mame/drivers/seattle.c index fb73d86fc47..f58a88bf6b6 100644 --- a/src/mame/drivers/seattle.c +++ b/src/mame/drivers/seattle.c @@ -534,8 +534,8 @@ static MACHINE_START( seattle ) mips3drc_set_options(machine.device("maincpu"), MIPS3DRC_FASTEST_OPTIONS + MIPS3DRC_STRICT_VERIFY); /* configure fast RAM regions for DRC */ - mips3drc_add_fastram(machine.device("maincpu"), 0x00000000, 0x007fffff, FALSE, state->m_rambase.target()); - mips3drc_add_fastram(machine.device("maincpu"), 0x1fc00000, 0x1fc7ffff, TRUE, state->m_rombase.target()); + mips3drc_add_fastram(machine.device("maincpu"), 0x00000000, 0x007fffff, FALSE, state->m_rambase); + mips3drc_add_fastram(machine.device("maincpu"), 0x1fc00000, 0x1fc7ffff, TRUE, state->m_rombase); /* register for save states */ state_save_register_global_array(machine, state->m_galileo.reg); @@ -677,7 +677,7 @@ READ32_MEMBER(seattle_state::interrupt_state2_r) WRITE32_MEMBER(seattle_state::interrupt_config_w) { int irq; - COMBINE_DATA(m_interrupt_config.target()); + COMBINE_DATA(m_interrupt_config); /* VBLANK: clear anything pending on the old IRQ */ if (m_vblank_irq_num != 0) @@ -719,9 +719,9 @@ WRITE32_MEMBER(seattle_state::interrupt_config_w) WRITE32_MEMBER(seattle_state::seattle_interrupt_enable_w) { - UINT32 old = *m_interrupt_enable.target(); - COMBINE_DATA(m_interrupt_enable.target()); - if (old != *m_interrupt_enable.target()) + UINT32 old = *m_interrupt_enable; + COMBINE_DATA(m_interrupt_enable); + if (old != *m_interrupt_enable) { if (m_vblank_latch) update_vblank_irq(machine()); @@ -1628,7 +1628,7 @@ WRITE32_MEMBER(seattle_state::cmos_w) READ32_MEMBER(seattle_state::cmos_r) { - return m_nvram.target()[offset]; + return m_nvram[offset]; } @@ -1659,7 +1659,7 @@ WRITE32_MEMBER(seattle_state::seattle_watchdog_w) WRITE32_MEMBER(seattle_state::asic_reset_w) { - COMBINE_DATA(m_asic_reset.target()); + COMBINE_DATA(m_asic_reset); if (!(*m_asic_reset & 0x0002)) midway_ioasic_reset(machine()); } @@ -2937,7 +2937,7 @@ static DRIVER_INIT( blitz ) init_common(machine, MIDWAY_IOASIC_BLITZ99, 444/* or 528 */, 80, SEATTLE_CONFIG); /* for some reason, the code in the ROM appears buggy; this is a small patch to fix it */ - state->m_rombase.target()[0x934/4] += 4; + state->m_rombase[0x934/4] += 4; /* main CPU speedups */ mips3drc_add_hotspot(machine.device("maincpu"), 0x80135510, 0x3C028024, 250); /* confirmed */ diff --git a/src/mame/drivers/segald.c b/src/mame/drivers/segald.c index 6bc5f48782e..302656d7a67 100644 --- a/src/mame/drivers/segald.c +++ b/src/mame/drivers/segald.c @@ -69,7 +69,7 @@ static void astron_draw_characters(running_machine &machine, bitmap_ind16 &bitma for (characterY = 0; characterY < 32; characterY++) { int current_screen_character = (characterY*32) + characterX; - drawgfx_transpen(bitmap, cliprect, machine.gfx[0], state->m_fix_RAM.target()[current_screen_character], + drawgfx_transpen(bitmap, cliprect, machine.gfx[0], state->m_fix_RAM[current_screen_character], 1, 0, 0, characterX*8, characterY*8, 0); } } @@ -95,8 +95,8 @@ static void astron_draw_sprites(running_machine &machine, bitmap_ind16 &bitmap, for (spr_number = 0; spr_number < 32; spr_number++) { spr_base = 0x10 * spr_number; - sy = state->m_obj_RAM.target()[spr_base + SPR_Y_TOP]; - sx = state->m_obj_RAM.target()[spr_base + SPR_X_LO]; + sy = state->m_obj_RAM[spr_base + SPR_Y_TOP]; + sx = state->m_obj_RAM[spr_base + SPR_X_LO]; if (sx != 0 || sy != 0) logerror("Hey! A sprite's not at 0,0 : %d %d", sx, sy); @@ -132,22 +132,22 @@ READ8_MEMBER(segald_state::astron_DISC_read) READ8_MEMBER(segald_state::astron_OUT_read) { - logerror("OUT read (0x%04x) @ 0x%04x [0x%x]\n", m_out_RAM.target()[offset], offset, cpu_get_pc(&space.device())); - return m_out_RAM.target()[offset]; + logerror("OUT read (0x%04x) @ 0x%04x [0x%x]\n", m_out_RAM[offset], offset, cpu_get_pc(&space.device())); + return m_out_RAM[offset]; } READ8_MEMBER(segald_state::astron_OBJ_read) { - logerror("OBJ read (0x%04x) @ 0x%04x [0x%x]\n", m_obj_RAM.target()[offset], offset, cpu_get_pc(&space.device())); - return m_obj_RAM.target()[offset]; + logerror("OBJ read (0x%04x) @ 0x%04x [0x%x]\n", m_obj_RAM[offset], offset, cpu_get_pc(&space.device())); + return m_obj_RAM[offset]; } READ8_MEMBER(segald_state::astron_COLOR_read) { - logerror("COLOR read (0x%04x) @ 0x%04x [0x%x]\n", m_color_RAM.target()[offset], offset, cpu_get_pc(&space.device())); - return m_color_RAM.target()[offset]; + logerror("COLOR read (0x%04x) @ 0x%04x [0x%x]\n", m_color_RAM[offset], offset, cpu_get_pc(&space.device())); + return m_color_RAM[offset]; } @@ -197,13 +197,13 @@ WRITE8_MEMBER(segald_state::astron_OUT_write) break; } - m_out_RAM.target()[offset] = data; + m_out_RAM[offset] = data; } WRITE8_MEMBER(segald_state::astron_OBJ_write) { - m_obj_RAM.target()[offset] = data; + m_obj_RAM[offset] = data; logerror("OBJ write : 0x%04x @ 0x%04x [0x%x]\n", data, offset, cpu_get_pc(&space.device())); } @@ -214,11 +214,11 @@ WRITE8_MEMBER(segald_state::astron_COLOR_write) const UINT8 palIndex = offset >> 1; /* Combine */ - m_color_RAM.target()[offset] = data; + m_color_RAM[offset] = data; /* Easy access */ - highBits = m_color_RAM.target()[(palIndex<<1)+1] & 0x0f; - lowBits = m_color_RAM.target()[(palIndex<<1)]; + highBits = m_color_RAM[(palIndex<<1)+1] & 0x0f; + lowBits = m_color_RAM[(palIndex<<1)]; /* 4-bit RGB */ r = (lowBits & 0x0f); @@ -233,7 +233,7 @@ WRITE8_MEMBER(segald_state::astron_COLOR_write) WRITE8_MEMBER(segald_state::astron_FIX_write) { - m_fix_RAM.target()[offset] = data; + m_fix_RAM[offset] = data; /* logerror("FIX write : 0x%04x @ 0x%04x [0x%x]\n", data, offset, cpu_get_pc(&space.device())); */ } diff --git a/src/mame/drivers/sfbonus.c b/src/mame/drivers/sfbonus.c index 9fa7c93db9f..3edb91b2286 100644 --- a/src/mame/drivers/sfbonus.c +++ b/src/mame/drivers/sfbonus.c @@ -808,8 +808,8 @@ static void sfbonus_draw_reel_layer(screen_device &screen, bitmap_ind16 &bitmap, UINT8* selectbase = &state->m_videoram[0x600]; UINT8* bg_scroll = &state->m_videoram[0x000]; UINT8* reels_rowscroll = &state->m_videoram[0x400]; - int globalyscrollreels = (state->m_vregs.target()[6] | state->m_vregs.target()[7]<<8); - int globalxscrollreels = (state->m_vregs.target()[4] | state->m_vregs.target()[5]<<8); + int globalyscrollreels = (state->m_vregs[6] | state->m_vregs[7]<<8); + int globalxscrollreels = (state->m_vregs[4] | state->m_vregs[5]<<8); globalyscrollreels += 8; globalxscrollreels += 8; @@ -938,8 +938,8 @@ static SCREEN_UPDATE_IND16(sfbonus) { sfbonus_state *state = screen.machine().driver_data(); - int globalyscroll = (state->m_vregs.target()[2] | state->m_vregs.target()[3]<<8); - int globalxscroll = (state->m_vregs.target()[0] | state->m_vregs.target()[1]<<8); + int globalyscroll = (state->m_vregs[2] | state->m_vregs[3]<<8); + int globalxscroll = (state->m_vregs[0] | state->m_vregs[1]<<8); UINT8* front_rowscroll = &state->m_videoram[0x200]; ioport_constructor ipt; int i; @@ -997,52 +997,52 @@ static SCREEN_UPDATE_IND16(sfbonus) } #if 0 popmessage("%02x %02x %02x %02x %02x %02x %02x %02x -- %02x -- %02x %02x -- %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x", - state->m_3800_regs.target()[0], - state->m_3800_regs.target()[1], - state->m_3800_regs.target()[2], - state->m_3800_regs.target()[3], - state->m_3800_regs.target()[4], - state->m_3800_regs.target()[5], - state->m_3800_regs.target()[6], - state->m_3800_regs.target()[7], - state->m_3000_regs.target()[0], - state->m_2801_regs.target()[0], - state->m_2c01_regs.target()[0], - state->m_vregs.target()[8], - state->m_vregs.target()[0], - state->m_vregs.target()[10], - state->m_vregs.target()[11], - state->m_vregs.target()[12], - state->m_vregs.target()[13], - state->m_vregs.target()[14], - state->m_vregs.target()[15], - state->m_vregs.target()[16], - state->m_vregs.target()[17], - state->m_vregs.target()[18], - state->m_vregs.target()[19], - state->m_vregs.target()[20], - state->m_vregs.target()[21], - state->m_vregs.target()[22], - state->m_vregs.target()[23], - state->m_vregs.target()[24], - state->m_vregs.target()[25], - state->m_vregs.target()[26], - state->m_vregs.target()[27], - state->m_vregs.target()[28], - state->m_vregs.target()[29], - state->m_vregs.target()[30], - state->m_vregs.target()[31] + state->m_3800_regs[0], + state->m_3800_regs[1], + state->m_3800_regs[2], + state->m_3800_regs[3], + state->m_3800_regs[4], + state->m_3800_regs[5], + state->m_3800_regs[6], + state->m_3800_regs[7], + state->m_3000_regs[0], + state->m_2801_regs[0], + state->m_2c01_regs[0], + state->m_vregs[8], + state->m_vregs[0], + state->m_vregs[10], + state->m_vregs[11], + state->m_vregs[12], + state->m_vregs[13], + state->m_vregs[14], + state->m_vregs[15], + state->m_vregs[16], + state->m_vregs[17], + state->m_vregs[18], + state->m_vregs[19], + state->m_vregs[20], + state->m_vregs[21], + state->m_vregs[22], + state->m_vregs[23], + state->m_vregs[24], + state->m_vregs[25], + state->m_vregs[26], + state->m_vregs[27], + state->m_vregs[28], + state->m_vregs[29], + state->m_vregs[30], + state->m_vregs[31] ); popmessage("-- %02x %02x %02x %02x %02x %02x %02x %02x", - state->m_1800_regs.target()[0], - state->m_1800_regs.target()[1], - state->m_1800_regs.target()[2], - state->m_1800_regs.target()[3], - state->m_1800_regs.target()[4], - state->m_1800_regs.target()[5], - state->m_1800_regs.target()[6], - state->m_1800_regs.target()[7]); + state->m_1800_regs[0], + state->m_1800_regs[1], + state->m_1800_regs[2], + state->m_1800_regs[3], + state->m_1800_regs[4], + state->m_1800_regs[5], + state->m_1800_regs[6], + state->m_1800_regs[7]); #endif ipt = screen.machine().system().ipt; @@ -1050,22 +1050,22 @@ static SCREEN_UPDATE_IND16(sfbonus) || (ipt == INPUT_PORTS_NAME(amcoe2_poker))) { // based on pirpok2 - output_set_lamp_value(0, (state->m_1800_regs.target()[6] & 0x1) >> 0); - output_set_lamp_value(1, (state->m_1800_regs.target()[6] & 0x4) >> 2); - output_set_lamp_value(2, (state->m_1800_regs.target()[5] & 0x4) >> 2); - output_set_lamp_value(3, (state->m_1800_regs.target()[5] & 0x1) >> 0); - output_set_lamp_value(4, (state->m_1800_regs.target()[4] & 0x4) >> 2); - output_set_lamp_value(5, (state->m_1800_regs.target()[4] & 0x1) >> 0); + output_set_lamp_value(0, (state->m_1800_regs[6] & 0x1) >> 0); + output_set_lamp_value(1, (state->m_1800_regs[6] & 0x4) >> 2); + output_set_lamp_value(2, (state->m_1800_regs[5] & 0x4) >> 2); + output_set_lamp_value(3, (state->m_1800_regs[5] & 0x1) >> 0); + output_set_lamp_value(4, (state->m_1800_regs[4] & 0x4) >> 2); + output_set_lamp_value(5, (state->m_1800_regs[4] & 0x1) >> 0); } else if ((ipt == INPUT_PORTS_NAME(amcoe1_reels3)) || (ipt == INPUT_PORTS_NAME(amcoe1_reels4)) || (ipt == INPUT_PORTS_NAME(amcoe1_poker))) { - output_set_lamp_value(0, (state->m_1800_regs.target()[0] & 0x2) >> 1); - output_set_lamp_value(1, (state->m_1800_regs.target()[4] & 0x2) >> 1); - output_set_lamp_value(2, (state->m_1800_regs.target()[3] & 0x2) >> 1); - output_set_lamp_value(3, (state->m_1800_regs.target()[6] & 0x4) >> 2); - output_set_lamp_value(4, (state->m_1800_regs.target()[4] & 0x4) >> 2); - output_set_lamp_value(5, (state->m_1800_regs.target()[3] & 0x4) >> 2); + output_set_lamp_value(0, (state->m_1800_regs[0] & 0x2) >> 1); + output_set_lamp_value(1, (state->m_1800_regs[4] & 0x2) >> 1); + output_set_lamp_value(2, (state->m_1800_regs[3] & 0x2) >> 1); + output_set_lamp_value(3, (state->m_1800_regs[6] & 0x4) >> 2); + output_set_lamp_value(4, (state->m_1800_regs[4] & 0x4) >> 2); + output_set_lamp_value(5, (state->m_1800_regs[3] & 0x4) >> 2); } return 0; @@ -1119,27 +1119,27 @@ READ8_MEMBER(sfbonus_state::sfbonus_3800_r) // lamps and coin counters WRITE8_MEMBER(sfbonus_state::sfbonus_1800_w) { - m_1800_regs.target()[offset] = data; + m_1800_regs[offset] = data; } WRITE8_MEMBER(sfbonus_state::sfbonus_3800_w) { - m_3800_regs.target()[offset] = data; + m_3800_regs[offset] = data; } WRITE8_MEMBER(sfbonus_state::sfbonus_3000_w) { - m_3000_regs.target()[offset] = data; + m_3000_regs[offset] = data; } WRITE8_MEMBER(sfbonus_state::sfbonus_2801_w) { - m_2801_regs.target()[offset] = data; + m_2801_regs[offset] = data; } WRITE8_MEMBER(sfbonus_state::sfbonus_2c01_w) { - m_2c01_regs.target()[offset] = data; + m_2c01_regs[offset] = data; } diff --git a/src/mame/drivers/shougi.c b/src/mame/drivers/shougi.c index 47029199e2d..fa1af56ff3c 100644 --- a/src/mame/drivers/shougi.c +++ b/src/mame/drivers/shougi.c @@ -186,8 +186,8 @@ static SCREEN_UPDATE_IND16( shougi ) //if (flipscreen[0]) sx = 31 - sx; //if (flipscreen[1]) sy = 31 - sy; - data1 = state->m_videoram.target()[offs]; /* color */ - data2 = state->m_videoram.target()[0x4000 + offs]; /* pixel data */ + data1 = state->m_videoram[offs]; /* color */ + data2 = state->m_videoram[0x4000 + offs]; /* pixel data */ for (x=0; x<4; x++) /*4 pixels per byte (2 bitplanes in 2 nibbles: 1st=bits 7-4, 2nd=bits 3-0)*/ { diff --git a/src/mame/drivers/sigmab98.c b/src/mame/drivers/sigmab98.c index a7c1c049c01..7bd72a6cfb7 100644 --- a/src/mame/drivers/sigmab98.c +++ b/src/mame/drivers/sigmab98.c @@ -213,7 +213,7 @@ public: static void draw_sprites(running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect, int pri_mask) { sigmab98_state *state = machine.driver_data(); - UINT8 *end = state->m_spriteram.target() - 0x10; + UINT8 *end = state->m_spriteram - 0x10; UINT8 *s = end + state->m_spriteram.bytes(); for ( ; s != end; s -= 0x10 ) @@ -902,7 +902,7 @@ READ8_MEMBER(sigmab98_state::haekaka_b000_r) case 0x65: // SPRITERAM if (offset < 0x1000) - return m_spriteram.target()[offset]; + return m_spriteram[offset]; case 0x67: // PALETTERAM + TABLE? + REGS if (offset < 0x200) @@ -923,7 +923,7 @@ WRITE8_MEMBER(sigmab98_state::haekaka_b000_w) case 0x65: // SPRITERAM if (offset < 0x1000) { - m_spriteram.target()[offset] = data; + m_spriteram[offset] = data; return; } break; @@ -1074,8 +1074,8 @@ WRITE8_MEMBER(sigmab98_state::itazuram_rombank_w) break; case 0x6c: // 3800 IS RAM! (1000 bytes) - SPRITERAM - memory_set_bankptr(machine(), "rombank0", m_spriteram.target()); - memory_set_bankptr(machine(), "sprbank0", m_spriteram.target()); + memory_set_bankptr(machine(), "rombank0", m_spriteram); + memory_set_bankptr(machine(), "sprbank0", m_spriteram); // memory_set_bankptr(machine(), "sprbank1", m_spriteram + 0x1000*4); // scratch break; @@ -1139,7 +1139,7 @@ WRITE8_MEMBER(sigmab98_state::itazuram_rambank_w) m_rambank = data; switch (data) { - case 0x52: memory_set_bankptr(machine(), "palbank", m_nvram.target()); break; + case 0x52: memory_set_bankptr(machine(), "palbank", m_nvram); break; case 0x64: memory_set_bankptr(machine(), "palbank", m_generic_paletteram_8); break; default: logerror("%s: unknown ram bank = %02x, reg2 = %02x\n", machine().describe_context(), data, m_reg2); @@ -1177,7 +1177,7 @@ WRITE8_MEMBER(sigmab98_state::itazuram_nvram_palette_w) } else if (m_rambank == 0x52) { - m_nvram.target()[offset] = data; + m_nvram[offset] = data; } else { @@ -1378,7 +1378,7 @@ READ8_MEMBER(sigmab98_state::tdoboon_c000_r) case 0x64: // SPRITERAM if (offset < 0x1000) - return m_spriteram.target()[offset]; + return m_spriteram[offset]; break; case 0x66: // PALETTERAM + TABLE? @@ -1403,7 +1403,7 @@ WRITE8_MEMBER(sigmab98_state::tdoboon_c000_w) case 0x64: // SPRITERAM if (offset < 0x1000) { - m_spriteram.target()[offset] = data; + m_spriteram[offset] = data; return; } break; diff --git a/src/mame/drivers/skeetsht.c b/src/mame/drivers/skeetsht.c index 00046e69d24..774fb190b1c 100644 --- a/src/mame/drivers/skeetsht.c +++ b/src/mame/drivers/skeetsht.c @@ -70,7 +70,7 @@ static void skeetsht_scanline_update(screen_device &screen, bitmap_rgb32 &bitmap { skeetsht_state *state = screen.machine().driver_data(); const rgb_t *const pens = tlc34076_get_pens(screen.machine().device("tlc34076")); - UINT16 *vram = &state->m_tms_vram.target()[(params->rowaddr << 8) & 0x3ff00]; + UINT16 *vram = &state->m_tms_vram[(params->rowaddr << 8) & 0x3ff00]; UINT32 *dest = &bitmap.pix32(scanline); int coladdr = params->coladdr; int x; diff --git a/src/mame/drivers/skimaxx.c b/src/mame/drivers/skimaxx.c index 84017515682..3cab3bef3ec 100644 --- a/src/mame/drivers/skimaxx.c +++ b/src/mame/drivers/skimaxx.c @@ -83,7 +83,7 @@ public: // Set up blit parameters WRITE32_MEMBER(skimaxx_state::skimaxx_blitter_w) { - UINT32 newdata = COMBINE_DATA( &m_blitter_regs.target()[offset] ); + UINT32 newdata = COMBINE_DATA( &m_blitter_regs[offset] ); switch (offset) { @@ -167,13 +167,13 @@ static SCREEN_UPDATE_IND16( skimaxx ) static void skimaxx_to_shiftreg(address_space *space, UINT32 address, UINT16 *shiftreg) { skimaxx_state *state = space->machine().driver_data(); - memcpy(shiftreg, &state->m_fg_buffer.target()[TOWORD(address)], 512 * sizeof(UINT16)); + memcpy(shiftreg, &state->m_fg_buffer[TOWORD(address)], 512 * sizeof(UINT16)); } static void skimaxx_from_shiftreg(address_space *space, UINT32 address, UINT16 *shiftreg) { skimaxx_state *state = space->machine().driver_data(); - memcpy(&state->m_fg_buffer.target()[TOWORD(address)], shiftreg, 512 * sizeof(UINT16)); + memcpy(&state->m_fg_buffer[TOWORD(address)], shiftreg, 512 * sizeof(UINT16)); } @@ -191,7 +191,7 @@ static void skimaxx_scanline_update(screen_device &screen, bitmap_ind16 &bitmap, if (params->rowaddr >= 0x220) { UINT32 rowaddr = (params->rowaddr - 0x220); - UINT16 *fg = &state->m_fg_buffer.target()[rowaddr << 8]; + UINT16 *fg = &state->m_fg_buffer[rowaddr << 8]; UINT32 *bg = &state->m_bg_buffer_front[rowaddr/2 * 1024/2]; UINT16 *dest = &bitmap.pix16(scanline); //int coladdr = params->coladdr; diff --git a/src/mame/drivers/skyarmy.c b/src/mame/drivers/skyarmy.c index 2d8b57e4af2..0ca6ab0b989 100644 --- a/src/mame/drivers/skyarmy.c +++ b/src/mame/drivers/skyarmy.c @@ -65,8 +65,8 @@ WRITE8_MEMBER(skyarmy_state::skyarmy_flip_screen_y_w) static TILE_GET_INFO( get_skyarmy_tile_info ) { skyarmy_state *state = machine.driver_data(); - int code = state->m_videoram.target()[tile_index]; - int attr = BITSWAP8(state->m_colorram.target()[tile_index], 7, 6, 5, 4, 3, 0, 1, 2) & 7; + int code = state->m_videoram[tile_index]; + int attr = BITSWAP8(state->m_colorram[tile_index], 7, 6, 5, 4, 3, 0, 1, 2) & 7; SET_TILE_INFO( 0, code, attr, 0); } @@ -74,14 +74,14 @@ static TILE_GET_INFO( get_skyarmy_tile_info ) WRITE8_MEMBER(skyarmy_state::skyarmy_videoram_w) { - m_videoram.target()[offset] = data; + m_videoram[offset] = data; m_tilemap->mark_tile_dirty(offset); } WRITE8_MEMBER(skyarmy_state::skyarmy_colorram_w) { - m_colorram.target()[offset] = data; + m_colorram[offset] = data; m_tilemap->mark_tile_dirty(offset); } @@ -125,12 +125,12 @@ static VIDEO_START( skyarmy ) static SCREEN_UPDATE_IND16( skyarmy ) { skyarmy_state *state = screen.machine().driver_data(); - UINT8 *spriteram = state->m_spriteram.target(); + UINT8 *spriteram = state->m_spriteram; int sx, sy, flipx, flipy, offs,pal; int i; for(i=0;i<0x20;i++) - state->m_tilemap->set_scrolly(i,state->m_scrollram.target()[i]); + state->m_tilemap->set_scrolly(i,state->m_scrollram[i]); state->m_tilemap->draw(bitmap, cliprect, 0,0); diff --git a/src/mame/drivers/skylncr.c b/src/mame/drivers/skylncr.c index 07927acaa6c..65536bbfd54 100644 --- a/src/mame/drivers/skylncr.c +++ b/src/mame/drivers/skylncr.c @@ -110,13 +110,13 @@ public: WRITE8_MEMBER(skylncr_state::skylncr_videoram_w) { - m_videoram.target()[offset] = data; + m_videoram[offset] = data; m_tmap->mark_tile_dirty(offset); } WRITE8_MEMBER(skylncr_state::skylncr_colorram_w) { - m_colorram.target()[offset] = data; + m_colorram[offset] = data; m_tmap->mark_tile_dirty(offset); } @@ -124,35 +124,35 @@ WRITE8_MEMBER(skylncr_state::skylncr_colorram_w) static TILE_GET_INFO( get_tile_info ) { skylncr_state *state = machine.driver_data(); - UINT16 code = state->m_videoram.target()[ tile_index ] + (state->m_colorram.target()[ tile_index ] << 8); + UINT16 code = state->m_videoram[ tile_index ] + (state->m_colorram[ tile_index ] << 8); SET_TILE_INFO(0, code, 0, TILE_FLIPYX( 0 )); } static TILE_GET_INFO( get_reel_1_tile_info ) { skylncr_state *state = machine.driver_data(); - UINT16 code = state->m_reeltiles_1_ram.target()[ tile_index ] + (state->m_reeltileshigh_1_ram.target()[ tile_index ] << 8); + UINT16 code = state->m_reeltiles_1_ram[ tile_index ] + (state->m_reeltileshigh_1_ram[ tile_index ] << 8); SET_TILE_INFO(1, code, 0, TILE_FLIPYX( 0 )); } static TILE_GET_INFO( get_reel_2_tile_info ) { skylncr_state *state = machine.driver_data(); - UINT16 code = state->m_reeltiles_2_ram.target()[ tile_index ] + (state->m_reeltileshigh_2_ram.target()[ tile_index ] << 8); + UINT16 code = state->m_reeltiles_2_ram[ tile_index ] + (state->m_reeltileshigh_2_ram[ tile_index ] << 8); SET_TILE_INFO(1, code, 0, TILE_FLIPYX( 0 )); } static TILE_GET_INFO( get_reel_3_tile_info ) { skylncr_state *state = machine.driver_data(); - UINT16 code = state->m_reeltiles_3_ram.target()[ tile_index ] + (state->m_reeltileshigh_3_ram.target()[ tile_index ] << 8); + UINT16 code = state->m_reeltiles_3_ram[ tile_index ] + (state->m_reeltileshigh_3_ram[ tile_index ] << 8); SET_TILE_INFO(1, code, 0, TILE_FLIPYX( 0 )); } static TILE_GET_INFO( get_reel_4_tile_info ) { skylncr_state *state = machine.driver_data(); - UINT16 code = state->m_reeltiles_4_ram.target()[ tile_index ] + (state->m_reeltileshigh_4_ram.target()[ tile_index ] << 8); + UINT16 code = state->m_reeltiles_4_ram[ tile_index ] + (state->m_reeltileshigh_4_ram[ tile_index ] << 8); SET_TILE_INFO(1, code, 0, TILE_FLIPYX( 0 )); } @@ -196,9 +196,9 @@ static SCREEN_UPDATE_IND16( skylncr ) for (i= 0;i < 64;i++) { - state->m_reel_2_tilemap->set_scrolly(i, state->m_reelscroll2.target()[i]); - state->m_reel_3_tilemap->set_scrolly(i, state->m_reelscroll3.target()[i]); - state->m_reel_4_tilemap->set_scrolly(i, state->m_reelscroll4.target()[i]); + state->m_reel_2_tilemap->set_scrolly(i, state->m_reelscroll2[i]); + state->m_reel_3_tilemap->set_scrolly(i, state->m_reelscroll3[i]); + state->m_reel_4_tilemap->set_scrolly(i, state->m_reelscroll4[i]); } state->m_reel_2_tilemap->draw(bitmap, visible1, 0, 0); @@ -212,49 +212,49 @@ static SCREEN_UPDATE_IND16( skylncr ) WRITE8_MEMBER(skylncr_state::reeltiles_1_w) { - m_reeltiles_1_ram.target()[offset] = data; + m_reeltiles_1_ram[offset] = data; m_reel_1_tilemap->mark_tile_dirty(offset); } WRITE8_MEMBER(skylncr_state::reeltiles_2_w) { - m_reeltiles_2_ram.target()[offset] = data; + m_reeltiles_2_ram[offset] = data; m_reel_2_tilemap->mark_tile_dirty(offset); } WRITE8_MEMBER(skylncr_state::reeltiles_3_w) { - m_reeltiles_3_ram.target()[offset] = data; + m_reeltiles_3_ram[offset] = data; m_reel_3_tilemap->mark_tile_dirty(offset); } WRITE8_MEMBER(skylncr_state::reeltiles_4_w) { - m_reeltiles_4_ram.target()[offset] = data; + m_reeltiles_4_ram[offset] = data; m_reel_4_tilemap->mark_tile_dirty(offset); } WRITE8_MEMBER(skylncr_state::reeltileshigh_1_w) { - m_reeltileshigh_1_ram.target()[offset] = data; + m_reeltileshigh_1_ram[offset] = data; m_reel_1_tilemap->mark_tile_dirty(offset); } WRITE8_MEMBER(skylncr_state::reeltileshigh_2_w) { - m_reeltileshigh_2_ram.target()[offset] = data; + m_reeltileshigh_2_ram[offset] = data; m_reel_2_tilemap->mark_tile_dirty(offset); } WRITE8_MEMBER(skylncr_state::reeltileshigh_3_w) { - m_reeltileshigh_3_ram.target()[offset] = data; + m_reeltileshigh_3_ram[offset] = data; m_reel_3_tilemap->mark_tile_dirty(offset); } WRITE8_MEMBER(skylncr_state::reeltileshigh_4_w) { - m_reeltileshigh_4_ram.target()[offset] = data; + m_reeltileshigh_4_ram[offset] = data; m_reel_4_tilemap->mark_tile_dirty(offset); } @@ -309,22 +309,22 @@ WRITE8_MEMBER(skylncr_state::skylncr_paletteram2_w) WRITE8_MEMBER(skylncr_state::reelscroll1_w) { - m_reelscroll1.target()[offset] = data; + m_reelscroll1[offset] = data; } WRITE8_MEMBER(skylncr_state::reelscroll2_w) { - m_reelscroll2.target()[offset] = data; + m_reelscroll2[offset] = data; } WRITE8_MEMBER(skylncr_state::reelscroll3_w) { - m_reelscroll3.target()[offset] = data; + m_reelscroll3[offset] = data; } WRITE8_MEMBER(skylncr_state::reelscroll4_w) { - m_reelscroll4.target()[offset] = data; + m_reelscroll4[offset] = data; } diff --git a/src/mame/drivers/sliver.c b/src/mame/drivers/sliver.c index c4f97df94b2..76a2eb20602 100644 --- a/src/mame/drivers/sliver.c +++ b/src/mame/drivers/sliver.c @@ -132,9 +132,9 @@ static void plot_pixel_pal(running_machine &machine, int x, int y, int addr) if (y < 0 || x < 0 || x > 383 || y > 255) return; - b=(state->m_colorram.target()[addr] << 2) | (state->m_colorram.target()[addr] & 0x3); - g=(state->m_colorram.target()[addr+0x100] << 2) | (state->m_colorram.target()[addr+0x100] & 3); - r=(state->m_colorram.target()[addr+0x200] << 2) | (state->m_colorram.target()[addr+0x200] & 3); + b=(state->m_colorram[addr] << 2) | (state->m_colorram[addr] & 0x3); + g=(state->m_colorram[addr+0x100] << 2) | (state->m_colorram[addr+0x100] & 3); + r=(state->m_colorram[addr+0x200] << 2) | (state->m_colorram[addr+0x200] & 3); state->m_bitmap_fg.pix32(y, x) = r | (g<<8) | (b<<16); } diff --git a/src/mame/drivers/slotcarn.c b/src/mame/drivers/slotcarn.c index ea177614402..4c93fcae745 100644 --- a/src/mame/drivers/slotcarn.c +++ b/src/mame/drivers/slotcarn.c @@ -63,7 +63,7 @@ READ8_MEMBER(slotcarn_state::palette_r) { int co; - co = ((m_ram_attr.target()[offset] & 0x7F) << 3) | (offset & 0x07); + co = ((m_ram_attr[offset] & 0x7F) << 3) | (offset & 0x07); return m_ram_palette[co]; } @@ -74,7 +74,7 @@ WRITE8_MEMBER(slotcarn_state::palette_w) machine().primary_screen->update_now(); data &= 0x0f; - co = ((m_ram_attr.target()[offset] & 0x7F) << 3) | (offset & 0x07); + co = ((m_ram_attr[offset] & 0x7F) << 3) | (offset & 0x07); m_ram_palette[co] = data; } @@ -120,9 +120,9 @@ static MC6845_UPDATE_ROW( update_row ) for (cx = 0; cx < x_count; cx++) { int i; - int attr = state->m_ram_attr.target()[ma & 0x7ff]; + int attr = state->m_ram_attr[ma & 0x7ff]; int region = (attr & 0x40) >> 6; - int addr = ((state->m_ram_video.target()[ma & 0x7ff] | ((attr & 0x80) << 1) | (extra_video_bank_bit)) << 4) | (ra & 0x0f); + int addr = ((state->m_ram_video[ma & 0x7ff] | ((attr & 0x80) << 1) | (extra_video_bank_bit)) << 4) | (ra & 0x0f); int colour = (attr & 0x7f) << 3; UINT8 *data; diff --git a/src/mame/drivers/spaceg.c b/src/mame/drivers/spaceg.c index eaa84e84d2b..0784db3224d 100644 --- a/src/mame/drivers/spaceg.c +++ b/src/mame/drivers/spaceg.c @@ -226,16 +226,16 @@ static PALETTE_INIT( spaceg ) WRITE8_MEMBER(spaceg_state::zvideoram_w) { - int col = m_colorram.target()[0x400]; + int col = m_colorram[0x400]; int xoff = *m_io9400 >> 5 & 7; UINT16 offset2 = (offset + 0x100) & 0x1fff; UINT16 sdata = data << (8 - xoff); - UINT16 vram_data = m_videoram.target()[offset] << 8 | (m_videoram.target()[offset2]); + UINT16 vram_data = m_videoram[offset] << 8 | (m_videoram[offset2]); if (col > 0x0f) popmessage("color > 0x0f = %2d", col); col &= 0x0f; - switch (*m_io9401.target()) + switch (*m_io9401) { // draw case 0: @@ -245,8 +245,8 @@ WRITE8_MEMBER(spaceg_state::zvideoram_w) vram_data |= sdata; // update colorram - if (sdata&0xff00) m_colorram.target()[offset] = col; - if (sdata&0x00ff) m_colorram.target()[offset2] = col; + if (sdata&0xff00) m_colorram[offset] = col; + if (sdata&0x00ff) m_colorram[offset2] = col; break; // erase @@ -260,8 +260,8 @@ WRITE8_MEMBER(spaceg_state::zvideoram_w) return; } - m_videoram.target()[offset]=vram_data>>8; - m_videoram.target()[offset2]=vram_data&0xff; + m_videoram[offset]=vram_data>>8; + m_videoram[offset2]=vram_data&0xff; } @@ -271,7 +271,7 @@ READ8_MEMBER(spaceg_state::spaceg_colorram_r) if (offset < 0x400) { - rgbcolor = (m_colorram.target()[offset] << 1) | ((offset &0x100) >> 8); + rgbcolor = (m_colorram[offset] << 1) | ((offset &0x100) >> 8); if ((offset >= 0x200) && (offset < 0x220)) /* 0xa200- 0xa21f */ { @@ -292,7 +292,7 @@ READ8_MEMBER(spaceg_state::spaceg_colorram_r) if (*m_io9401 != 0x40) logerror("colorram read in mode: 9401 = %02x (offset = %04x)\n", *m_io9401, offset); - return m_colorram.target()[offset]; + return m_colorram[offset]; } @@ -304,13 +304,13 @@ static SCREEN_UPDATE_IND16( spaceg ) for (offs = 0; offs < 0x2000; offs++) { int i; - UINT8 data = state->m_videoram.target()[offs]; + UINT8 data = state->m_videoram[offs]; int y = offs & 0xff; int x = (offs >> 8) << 3; for (i = 0; i < 8; i++) { - bitmap.pix16(y, x) = (data & 0x80) ? state->m_colorram.target()[offs] : 0; + bitmap.pix16(y, x) = (data & 0x80) ? state->m_colorram[offs] : 0; x++; data <<= 1; diff --git a/src/mame/drivers/splus.c b/src/mame/drivers/splus.c index 80f9d7b6e78..cd785eb07f2 100644 --- a/src/mame/drivers/splus.c +++ b/src/mame/drivers/splus.c @@ -183,21 +183,21 @@ WRITE8_MEMBER(splus_state::splus_io_w) #endif } - m_io_port.target()[offset] = data; + m_io_port[offset] = data; } WRITE8_MEMBER(splus_state::splus_load_pulse_w) { // UINT8 out = 0; -// out = ((~m_io_port.target()[1] & 0xf0)>>4); // Output Bank +// out = ((~m_io_port[1] & 0xf0)>>4); // Output Bank } WRITE8_MEMBER(splus_state::splus_serial_w) { UINT8 out = 0; - out = ((~m_io_port.target()[1] & 0xe0)>>5); // Output Bank + out = ((~m_io_port[1] & 0xe0)>>5); // Output Bank switch (out) { @@ -346,8 +346,8 @@ WRITE8_MEMBER(splus_state::splus_7seg_w) seg = ((~data & 0xf0)>>4); // Segment Number val = (~data & 0x0f); // Digit Value - // Need to add ~m_io_port.target()[1]-1 to seg value - if (seg < 0x0a && (m_io_port.target()[1] & 0xe0) == 0xe0) + // Need to add ~m_io_port[1]-1 to seg value + if (seg < 0x0a && (m_io_port[1] & 0xe0) == 0xe0) output_set_digit_value(seg, ls48_map[val]); } @@ -378,7 +378,7 @@ READ8_MEMBER(splus_state::splus_serial_r) UINT8 in = 0x00; UINT8 val = 0x00; - in = ((~m_io_port.target()[1] & 0xe0)>>5); // Input Bank + in = ((~m_io_port[1] & 0xe0)>>5); // Input Bank switch (in) { @@ -512,16 +512,16 @@ READ8_MEMBER(splus_state::splus_serial_r) READ8_MEMBER(splus_state::splus_m_reel_ram_r) { - return m_reel_ram.target()[offset]; + return m_reel_ram[offset]; } READ8_MEMBER(splus_state::splus_io_r) { if (offset == 3) - return m_io_port.target()[offset] & 0xf3; // Ignore Int0 and Int1, or machine will loop forever waiting + return m_io_port[offset] & 0xf3; // Ignore Int0 and Int1, or machine will loop forever waiting else - return m_io_port.target()[offset]; + return m_io_port[offset]; } READ8_MEMBER(splus_state::splus_duart_r) diff --git a/src/mame/drivers/spoker.c b/src/mame/drivers/spoker.c index 4ba951da5f9..a8c5e94a30b 100644 --- a/src/mame/drivers/spoker.c +++ b/src/mame/drivers/spoker.c @@ -57,35 +57,35 @@ public: WRITE8_MEMBER(spoker_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 ) { spoker_state *state = machine.driver_data(); - 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 & 0xff, 0, 0); } static TILE_GET_INFO( get_fg_tile_info ) { spoker_state *state = machine.driver_data(); - 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(0, code, (4*(code >> 14)+3), 0); } WRITE8_MEMBER(spoker_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(spoker_state::fg_color_w) { - m_fg_color_ram.target()[offset] = data; + m_fg_color_ram[offset] = data; m_fg_tilemap->mark_tile_dirty(offset); } diff --git a/src/mame/drivers/spool99.c b/src/mame/drivers/spool99.c index cca2b4bb0cc..d6512cc2a30 100644 --- a/src/mame/drivers/spool99.c +++ b/src/mame/drivers/spool99.c @@ -116,8 +116,8 @@ public: static TILE_GET_INFO( get_spool99_tile_info ) { spool99_state *state = machine.driver_data(); - int code = ((state->m_vram.target()[tile_index*2+1]<<8) | (state->m_vram.target()[tile_index*2+0])); - int color = state->m_cram.target()[tile_index*2+0]; + int code = ((state->m_vram[tile_index*2+1]<<8) | (state->m_vram[tile_index*2+0])); + int color = state->m_cram[tile_index*2+0]; SET_TILE_INFO( 0, @@ -144,14 +144,14 @@ static SCREEN_UPDATE_IND16(spool99) WRITE8_MEMBER(spool99_state::spool99_vram_w) { - m_vram.target()[offset] = data; + m_vram[offset] = data; m_sc0_tilemap->mark_tile_dirty(offset/2); } WRITE8_MEMBER(spool99_state::spool99_cram_w) { - m_cram.target()[offset] = data; + m_cram[offset] = data; m_sc0_tilemap->mark_tile_dirty(offset/2); } diff --git a/src/mame/drivers/srmp6.c b/src/mame/drivers/srmp6.c index 6916858cab6..383c2562e14 100644 --- a/src/mame/drivers/srmp6.c +++ b/src/mame/drivers/srmp6.c @@ -363,14 +363,14 @@ WRITE16_MEMBER(srmp6_state::video_regs_w) logerror("video_regs_w (PC=%06X): %04x = %04x & %04x\n", cpu_get_previouspc(&space.device()), offset*2, data, mem_mask); break; } - COMBINE_DATA(&m_video_regs.target()[offset]); + COMBINE_DATA(&m_video_regs[offset]); } READ16_MEMBER(srmp6_state::video_regs_r) { logerror("video_regs_r (PC=%06X): %04x\n", cpu_get_previouspc(&space.device()), offset*2); - return m_video_regs.target()[offset]; + return m_video_regs[offset]; } @@ -413,7 +413,7 @@ static UINT32 process(running_machine &machine,UINT8 b,UINT32 dst_offset) WRITE16_MEMBER(srmp6_state::srmp6_dma_w) { - UINT16* dmaram = m_dmaram.target(); + UINT16* dmaram = m_dmaram; COMBINE_DATA(&dmaram[offset]); if (offset==13 && dmaram[offset]==0x40) @@ -487,14 +487,14 @@ WRITE16_MEMBER(srmp6_state::srmp6_dma_w) READ16_MEMBER(srmp6_state::tileram_r) { - return m_chrram.target()[offset]; + return m_chrram[offset]; } WRITE16_MEMBER(srmp6_state::tileram_w) { //UINT16 tmp; - COMBINE_DATA(&m_chrram.target()[offset]); + COMBINE_DATA(&m_chrram[offset]); /* are the DMA registers enabled some other way, or always mapped here, over RAM? */ if (offset >= 0xfff00/2 && offset <= 0xfff1a/2 ) diff --git a/src/mame/drivers/ssfindo.c b/src/mame/drivers/ssfindo.c index 9db3d85a9ce..567885a8bd9 100644 --- a/src/mame/drivers/ssfindo.c +++ b/src/mame/drivers/ssfindo.c @@ -262,10 +262,10 @@ static SCREEN_UPDATE_IND16(ssfindo) for(y=0;y<256;y++) for(x=0;x<320;x+=4) { - bitmap.pix16(y, x+0) = state->m_vram.target()[s]&0xff; - bitmap.pix16(y, x+1) = (state->m_vram.target()[s]>>8)&0xff; - bitmap.pix16(y, x+2) = (state->m_vram.target()[s]>>16)&0xff; - bitmap.pix16(y, x+3) = (state->m_vram.target()[s]>>24)&0xff; + bitmap.pix16(y, x+0) = state->m_vram[s]&0xff; + bitmap.pix16(y, x+1) = (state->m_vram[s]>>8)&0xff; + bitmap.pix16(y, x+2) = (state->m_vram[s]>>16)&0xff; + bitmap.pix16(y, x+3) = (state->m_vram[s]>>24)&0xff; s++; } } diff --git a/src/mame/drivers/sshot.c b/src/mame/drivers/sshot.c index 6213ce555f5..1efc9d340ec 100644 --- a/src/mame/drivers/sshot.c +++ b/src/mame/drivers/sshot.c @@ -183,7 +183,7 @@ static TILE_GET_INFO( get_supershot_text_tile_info ) { supershot_state *state = machine.driver_data(); - UINT8 code = state->m_videoram.target()[tile_index]; + UINT8 code = state->m_videoram[tile_index]; SET_TILE_INFO(0, code, 0, 0); } @@ -203,7 +203,7 @@ static SCREEN_UPDATE_IND16( supershot ) WRITE8_MEMBER(supershot_state::supershot_vidram_w) { - m_videoram.target()[offset] = data; + m_videoram[offset] = data; m_tilemap->mark_tile_dirty(offset); } diff --git a/src/mame/drivers/sstrangr.c b/src/mame/drivers/sstrangr.c index 16f1ca39681..33b14dc785c 100644 --- a/src/mame/drivers/sstrangr.c +++ b/src/mame/drivers/sstrangr.c @@ -45,7 +45,7 @@ static SCREEN_UPDATE_RGB32( sstrangr ) UINT8 x = offs << 3; int y = offs >> 5; - UINT8 data = state->m_ram.target()[offs]; + UINT8 data = state->m_ram[offs]; for (i = 0; i < 8; i++) { @@ -103,7 +103,7 @@ static SCREEN_UPDATE_RGB32( sstrngr2 ) offs_t color_address = (offs >> 9 << 5) | (offs & 0x1f); - UINT8 data = state->m_ram.target()[offs]; + UINT8 data = state->m_ram[offs]; UINT8 fore_color = color_map_base[color_address] & 0x07; for (i = 0; i < 8; i++) diff --git a/src/mame/drivers/statriv2.c b/src/mame/drivers/statriv2.c index 36ccbe16557..37dc4431cad 100644 --- a/src/mame/drivers/statriv2.c +++ b/src/mame/drivers/statriv2.c @@ -112,7 +112,7 @@ public: static TILE_GET_INFO( horizontal_tile_info ) { statriv2_state *state = machine.driver_data(); - UINT8 *videoram = state->m_videoram.target(); + UINT8 *videoram = state->m_videoram; int code = videoram[0x400+tile_index]; int attr = videoram[tile_index] & 0x3f; @@ -122,7 +122,7 @@ static TILE_GET_INFO( horizontal_tile_info ) static TILE_GET_INFO( vertical_tile_info ) { statriv2_state *state = machine.driver_data(); - UINT8 *videoram = state->m_videoram.target(); + UINT8 *videoram = state->m_videoram; int code = videoram[0x400+tile_index]; int attr = videoram[tile_index] & 0x3f; @@ -170,7 +170,7 @@ static VIDEO_START( vertical ) WRITE8_MEMBER(statriv2_state::statriv2_videoram_w) { - UINT8 *videoram = m_videoram.target(); + UINT8 *videoram = m_videoram; videoram[offset] = data; m_tilemap->mark_tile_dirty(offset & 0x3ff); } @@ -229,12 +229,12 @@ READ8_MEMBER(statriv2_state::question_data_r) UINT32 address; if (m_question_offset_high == 0xff) - m_question_offset.target()[m_question_offset_low]++; + m_question_offset[m_question_offset_low]++; - address = m_question_offset.target()[m_question_offset_low]; - address |= m_question_offset.target()[m_question_offset_mid] << 8; + address = m_question_offset[m_question_offset_low]; + address |= m_question_offset[m_question_offset_mid] << 8; if (m_question_offset_high != 0xff) - address |= m_question_offset.target()[m_question_offset_high] << 16; + address |= m_question_offset[m_question_offset_high] << 16; return (address < qromsize) ? qrom[address] : 0xff; } diff --git a/src/mame/drivers/sub.c b/src/mame/drivers/sub.c index 5bcf4e1946d..2a1b438d891 100644 --- a/src/mame/drivers/sub.c +++ b/src/mame/drivers/sub.c @@ -149,12 +149,12 @@ static SCREEN_UPDATE_IND16(sub) { for (x=0;x<32;x++) { - UINT16 tile = state->m_vid.target()[count]; + UINT16 tile = state->m_vid[count]; UINT8 col; - UINT8 y_offs = state->m_scrolly.target()[x]; + UINT8 y_offs = state->m_scrolly[x]; - tile += (state->m_attr.target()[count]&0xe0)<<3; - col = (state->m_attr.target()[count]&0x1f); + tile += (state->m_attr[count]&0xe0)<<3; + col = (state->m_attr[count]&0x1f); drawgfx_opaque(bitmap,cliprect,gfx,tile,col+0x40,0,0,x*8,(y*8)-y_offs); drawgfx_opaque(bitmap,cliprect,gfx,tile,col+0x40,0,0,x*8,(y*8)-y_offs+256); @@ -175,8 +175,8 @@ static SCREEN_UPDATE_IND16(sub) 1 --cc cccc color */ { - UINT8 *spriteram = state->m_spriteram.target(); - UINT8 *spriteram_2 = state->m_spriteram2.target(); + UINT8 *spriteram = state->m_spriteram; + UINT8 *spriteram_2 = state->m_spriteram2; UINT8 x,y,spr_offs,i,col,fx,fy; for(i=0;i<0x40;i+=2) @@ -200,12 +200,12 @@ static SCREEN_UPDATE_IND16(sub) { for (x=0;x<32;x++) { - UINT16 tile = state->m_vid.target()[count]; + UINT16 tile = state->m_vid[count]; UINT8 col; - UINT8 y_offs = state->m_scrolly.target()[x]; + UINT8 y_offs = state->m_scrolly[x]; - tile += (state->m_attr.target()[count]&0xe0)<<3; - col = (state->m_attr.target()[count]&0x1f); + tile += (state->m_attr[count]&0xe0)<<3; + col = (state->m_attr[count]&0x1f); if(x >= 28) { diff --git a/src/mame/drivers/subsino.c b/src/mame/drivers/subsino.c index 41e9db4b332..1882d1fb6cf 100644 --- a/src/mame/drivers/subsino.c +++ b/src/mame/drivers/subsino.c @@ -300,20 +300,20 @@ WRITE8_MEMBER(subsino_state::subsino_tiles_offset_w) WRITE8_MEMBER(subsino_state::subsino_videoram_w) { - m_videoram.target()[offset] = data; + m_videoram[offset] = data; m_tmap->mark_tile_dirty(offset); } WRITE8_MEMBER(subsino_state::subsino_colorram_w) { - m_colorram.target()[offset] = data; + m_colorram[offset] = data; m_tmap->mark_tile_dirty(offset); } static TILE_GET_INFO( get_tile_info ) { subsino_state *state = machine.driver_data(); - UINT16 code = state->m_videoram.target()[ tile_index ] + (state->m_colorram.target()[ tile_index ] << 8); + UINT16 code = state->m_videoram[ tile_index ] + (state->m_colorram[ tile_index ] << 8); UINT16 color = (code >> 8) & 0x0f; code = ((code & 0xf000) >> 4) + ((code & 0xff) >> 0); code += state->m_tiles_offset; @@ -323,7 +323,7 @@ static TILE_GET_INFO( get_tile_info ) static TILE_GET_INFO( get_stisub_tile_info ) { subsino_state *state = machine.driver_data(); - UINT16 code = state->m_videoram.target()[ tile_index ] + (state->m_colorram.target()[ tile_index ] << 8); + UINT16 code = state->m_videoram[ tile_index ] + (state->m_colorram[ tile_index ] << 8); code&= 0x3fff; SET_TILE_INFO(0, code, 0, 0); } @@ -341,14 +341,14 @@ static VIDEO_START( subsino ) WRITE8_MEMBER(subsino_state::subsino_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_subsino_reel1_tile_info ) { subsino_state *state = machine.driver_data(); - int code = state->m_reel1_ram.target()[tile_index]; + int code = state->m_reel1_ram[tile_index]; int colour = (state->m_out_c&0x7) + 8; SET_TILE_INFO( @@ -361,7 +361,7 @@ static TILE_GET_INFO( get_subsino_reel1_tile_info ) static TILE_GET_INFO( get_stisub_reel1_tile_info ) { subsino_state *state = machine.driver_data(); - int code = state->m_reel1_ram.target()[tile_index]; + int code = state->m_reel1_ram[tile_index]; int attr = state->m_reel1_attr[tile_index]; SET_TILE_INFO( @@ -374,14 +374,14 @@ static TILE_GET_INFO( get_stisub_reel1_tile_info ) WRITE8_MEMBER(subsino_state::subsino_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_subsino_reel2_tile_info ) { subsino_state *state = machine.driver_data(); - int code = state->m_reel2_ram.target()[tile_index]; + int code = state->m_reel2_ram[tile_index]; int colour = (state->m_out_c&0x7) + 8; SET_TILE_INFO( @@ -394,7 +394,7 @@ static TILE_GET_INFO( get_subsino_reel2_tile_info ) static TILE_GET_INFO( get_stisub_reel2_tile_info ) { subsino_state *state = machine.driver_data(); - int code = state->m_reel2_ram.target()[tile_index]; + int code = state->m_reel2_ram[tile_index]; int attr = state->m_reel2_attr[tile_index]; SET_TILE_INFO( @@ -406,14 +406,14 @@ static TILE_GET_INFO( get_stisub_reel2_tile_info ) WRITE8_MEMBER(subsino_state::subsino_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_subsino_reel3_tile_info ) { subsino_state *state = machine.driver_data(); - int code = state->m_reel3_ram.target()[tile_index]; + int code = state->m_reel3_ram[tile_index]; int colour = (state->m_out_c&0x7) + 8; SET_TILE_INFO( @@ -426,7 +426,7 @@ static TILE_GET_INFO( get_subsino_reel3_tile_info ) static TILE_GET_INFO( get_stisub_reel3_tile_info ) { subsino_state *state = machine.driver_data(); - int code = state->m_reel3_ram.target()[tile_index]; + int code = state->m_reel3_ram[tile_index]; int attr = state->m_reel3_attr[tile_index]; SET_TILE_INFO( @@ -486,9 +486,9 @@ static SCREEN_UPDATE_IND16( subsino_reels ) for (i= 0;i < 64;i++) { - state->m_reel1_tilemap->set_scrolly(i, state->m_reel1_scroll.target()[i]); - state->m_reel2_tilemap->set_scrolly(i, state->m_reel2_scroll.target()[i]); - state->m_reel3_tilemap->set_scrolly(i, state->m_reel3_scroll.target()[i]); + state->m_reel1_tilemap->set_scrolly(i, state->m_reel1_scroll[i]); + state->m_reel2_tilemap->set_scrolly(i, state->m_reel2_scroll[i]); + state->m_reel3_tilemap->set_scrolly(i, state->m_reel3_scroll[i]); } if (state->m_out_c&0x08) @@ -523,9 +523,9 @@ static SCREEN_UPDATE_IND16( stisub_reels ) for (i= 0;i < 64;i++) { - state->m_reel1_tilemap->set_scrolly(i, state->m_reel1_scroll.target()[i]); - state->m_reel2_tilemap->set_scrolly(i, state->m_reel2_scroll.target()[i]); - state->m_reel3_tilemap->set_scrolly(i, state->m_reel3_scroll.target()[i]); + state->m_reel1_tilemap->set_scrolly(i, state->m_reel1_scroll[i]); + state->m_reel2_tilemap->set_scrolly(i, state->m_reel2_scroll[i]); + state->m_reel3_tilemap->set_scrolly(i, state->m_reel3_scroll[i]); } if (state->m_out_c&0x08) @@ -1107,15 +1107,15 @@ WRITE8_MEMBER(subsino_state::reel_scrollattr_w) } else if (offset<0x80) { - m_reel2_scroll.target()[offset&0x3f] = data; + m_reel2_scroll[offset&0x3f] = data; } else if (offset<0xc0) { - m_reel1_scroll.target()[offset&0x3f] = data; + m_reel1_scroll[offset&0x3f] = data; } else { - m_reel3_scroll.target()[offset&0x3f] = data; + m_reel3_scroll[offset&0x3f] = data; } } } diff --git a/src/mame/drivers/subsino2.c b/src/mame/drivers/subsino2.c index 104e7cc2cc3..7621b943a06 100644 --- a/src/mame/drivers/subsino2.c +++ b/src/mame/drivers/subsino2.c @@ -832,36 +832,36 @@ enum READ8_MEMBER(subsino2_state::am188em_regs_r) { - return m_am188em_regs.target()[offset]; + return m_am188em_regs[offset]; } WRITE8_MEMBER(subsino2_state::am188em_regs_w) { - m_am188em_regs.target()[offset] = data; + m_am188em_regs[offset] = data; } static MACHINE_RESET( am188em ) { subsino2_state *state = machine.driver_data(); // start with masked interrupts - state->m_am188em_regs.target()[AM188EM_IMASK+0] = 0xfd; - state->m_am188em_regs.target()[AM188EM_IMASK+1] = 0x07; - state->m_am188em_regs.target()[AM188EM_I0CON+0] = 0x0f; - state->m_am188em_regs.target()[AM188EM_I0CON+1] = 0x00; + state->m_am188em_regs[AM188EM_IMASK+0] = 0xfd; + state->m_am188em_regs[AM188EM_IMASK+1] = 0x07; + state->m_am188em_regs[AM188EM_I0CON+0] = 0x0f; + state->m_am188em_regs[AM188EM_I0CON+1] = 0x00; } static INTERRUPT_GEN( am188em_int0_irq ) { subsino2_state *state = device->machine().driver_data(); - if ( ((state->m_am188em_regs.target()[AM188EM_IMASK+0] & 0x10) == 0) || // IMASK.I0 mask - ((state->m_am188em_regs.target()[AM188EM_I0CON+0] & 0x08) == 0) ) // I0CON.MSK mask + if ( ((state->m_am188em_regs[AM188EM_IMASK+0] & 0x10) == 0) || // IMASK.I0 mask + ((state->m_am188em_regs[AM188EM_I0CON+0] & 0x08) == 0) ) // I0CON.MSK mask device_set_input_line_and_vector(device, 0, HOLD_LINE, 0x0c); // INT0 (background scrolling in xplan) } static TIMER_DEVICE_CALLBACK( am188em_timer2_irq ) { subsino2_state *state = timer.machine().driver_data(); - if ((state->m_am188em_regs.target()[AM188EM_IMASK+0] & 0x01) == 0) // TMR mask + if ((state->m_am188em_regs[AM188EM_IMASK+0] & 0x01) == 0) // TMR mask cputag_set_input_line_and_vector(timer.machine(), "maincpu", 0, HOLD_LINE, 0x4c/4); } @@ -925,7 +925,7 @@ READ16_MEMBER(subsino2_state::bishjan_input_r) WRITE16_MEMBER(subsino2_state::bishjan_outputs_w) { - m_outputs16.target()[offset] = data; + m_outputs16[offset] = data; switch (offset) { @@ -939,7 +939,7 @@ WRITE16_MEMBER(subsino2_state::bishjan_outputs_w) break; } -// popmessage("0: %04x", m_outputs16.target()[0]); +// popmessage("0: %04x", m_outputs16[0]); } @@ -997,7 +997,7 @@ ADDRESS_MAP_END WRITE8_MEMBER(subsino2_state::expcard_outputs_w) { - m_outputs.target()[offset] = data; + m_outputs[offset] = data; switch (offset) { @@ -1024,7 +1024,7 @@ WRITE8_MEMBER(subsino2_state::expcard_outputs_w) break; } -// popmessage("0: %02x - 1: %02x - 2: %02x - 3: %02x", m_outputs.target()[0], m_outputs.target()[1], m_outputs.target()[2], m_outputs.target()[3]); +// popmessage("0: %02x - 1: %02x - 2: %02x - 3: %02x", m_outputs[0], m_outputs[1], m_outputs[2], m_outputs[3]); } /*************************************************************************** @@ -1033,7 +1033,7 @@ WRITE8_MEMBER(subsino2_state::expcard_outputs_w) WRITE8_MEMBER(subsino2_state::mtrain_outputs_w) { - m_outputs.target()[offset] = data; + m_outputs[offset] = data; switch (offset) { @@ -1059,7 +1059,7 @@ WRITE8_MEMBER(subsino2_state::mtrain_outputs_w) break; } -// popmessage("0: %02x - 1: %02x - 2: %02x - 3: %02x", m_outputs.target()[0], m_outputs.target()[1], m_outputs.target()[2], m_outputs.target()[3]); +// popmessage("0: %02x - 1: %02x - 2: %02x - 3: %02x", m_outputs[0], m_outputs[1], m_outputs[2], m_outputs[3]); } WRITE8_MEMBER(subsino2_state::mtrain_videoram_w) @@ -1163,7 +1163,7 @@ ADDRESS_MAP_END WRITE8_MEMBER(subsino2_state::saklove_outputs_w) { - m_outputs.target()[offset] = data; + m_outputs[offset] = data; switch (offset) { @@ -1183,7 +1183,7 @@ WRITE8_MEMBER(subsino2_state::saklove_outputs_w) break; } -// popmessage("0: %02x - 1: %02x - 2: %02x - 3: %02x", m_outputs.target()[0], m_outputs.target()[1], m_outputs.target()[2], m_outputs.target()[3]); +// popmessage("0: %02x - 1: %02x - 2: %02x - 3: %02x", m_outputs[0], m_outputs[1], m_outputs[2], m_outputs[3]); } static ADDRESS_MAP_START( saklove_map, AS_PROGRAM, 8, subsino2_state ) @@ -1245,7 +1245,7 @@ ADDRESS_MAP_END WRITE8_MEMBER(subsino2_state::xplan_outputs_w) { - m_outputs.target()[offset] = data; + m_outputs[offset] = data; switch (offset) { @@ -1273,7 +1273,7 @@ WRITE8_MEMBER(subsino2_state::xplan_outputs_w) break; } -// popmessage("0: %02x - 1: %02x - 2: %02x - 3: %02x", m_outputs.target()[0], m_outputs.target()[1], m_outputs.target()[2], m_outputs.target()[3]); +// popmessage("0: %02x - 1: %02x - 2: %02x - 3: %02x", m_outputs[0], m_outputs[1], m_outputs[2], m_outputs[3]); } static ADDRESS_MAP_START( xplan_map, AS_PROGRAM, 8, subsino2_state ) @@ -1347,7 +1347,7 @@ ADDRESS_MAP_END WRITE8_MEMBER(subsino2_state::xtrain_outputs_w) { - m_outputs.target()[offset] = data; + m_outputs[offset] = data; switch (offset) { @@ -1376,7 +1376,7 @@ WRITE8_MEMBER(subsino2_state::xtrain_outputs_w) break; } -// popmessage("0: %02x - 1: %02x - 2: %02x - 3: %02x", m_outputs.target()[0], m_outputs.target()[1], m_outputs.target()[2], m_outputs.target()[3]); +// popmessage("0: %02x - 1: %02x - 2: %02x - 3: %02x", m_outputs[0], m_outputs[1], m_outputs[2], m_outputs[3]); } static ADDRESS_MAP_START( expcard_io, AS_IO, 8, subsino2_state ) diff --git a/src/mame/drivers/summit.c b/src/mame/drivers/summit.c index f45b6027cde..22b5ab07bcd 100644 --- a/src/mame/drivers/summit.c +++ b/src/mame/drivers/summit.c @@ -50,7 +50,7 @@ static SCREEN_UPDATE_IND16(summit) { for (x=0;x<32;x++) { - int tile = (state->m_vram.target()[count] | ((state->m_attr.target()[count]&1)<<8) ); + int tile = (state->m_vram[count] | ((state->m_attr[count]&1)<<8) ); drawgfx_opaque(bitmap,cliprect,gfx,tile,0,0,0,x*8,y*8); count++; diff --git a/src/mame/drivers/supdrapo.c b/src/mame/drivers/supdrapo.c index c85a691dd32..cc7f124fd29 100644 --- a/src/mame/drivers/supdrapo.c +++ b/src/mame/drivers/supdrapo.c @@ -109,9 +109,9 @@ static SCREEN_UPDATE_IND16( supdrapo ) { for(x = 0; x < 32; x++) { - int tile = state->m_videoram.target()[count] + state->m_char_bank.target()[count] * 0x100; + int tile = state->m_videoram[count] + state->m_char_bank[count] * 0x100; /* Global Column Coloring, GUESS! */ - color = state->m_col_line.target()[(x*2) + 1] ? (state->m_col_line.target()[(x*2) + 1] - 1) & 7 : 0; + color = state->m_col_line[(x*2) + 1] ? (state->m_col_line[(x*2) + 1] - 1) & 7 : 0; drawgfx_opaque(bitmap, cliprect, screen.machine().gfx[0], tile,color, 0, 0, x*8, y*8); diff --git a/src/mame/drivers/superdq.c b/src/mame/drivers/superdq.c index 1b0a477715b..23ad4154013 100644 --- a/src/mame/drivers/superdq.c +++ b/src/mame/drivers/superdq.c @@ -51,7 +51,7 @@ public: static TILE_GET_INFO( get_tile_info ) { superdq_state *state = machine.driver_data(); - int tile = state->m_videoram.target()[tile_index]; + int tile = state->m_videoram[tile_index]; SET_TILE_INFO(0, tile, state->m_color_bank, 0); } @@ -147,7 +147,7 @@ static INTERRUPT_GEN( superdq_vblank ) WRITE8_MEMBER(superdq_state::superdq_videoram_w) { - m_videoram.target()[offset] = data; + m_videoram[offset] = data; m_tilemap->mark_tile_dirty(offset); } diff --git a/src/mame/drivers/superwng.c b/src/mame/drivers/superwng.c index fc618896a9c..20172ac4a13 100644 --- a/src/mame/drivers/superwng.c +++ b/src/mame/drivers/superwng.c @@ -72,8 +72,8 @@ public: static TILE_GET_INFO( get_bg_tile_info ) { superwng_state *state = machine.driver_data(); - int code = state->m_videoram_bg.target()[tile_index]; - int attr = state->m_colorram_bg.target()[tile_index]; + int code = state->m_videoram_bg[tile_index]; + int attr = state->m_colorram_bg[tile_index]; code= (code&0x7f) | ((attr&0x40)<<1) | ((code&0x80)<<1); code|=state->m_tile_bank?0x200:0; @@ -87,8 +87,8 @@ static TILE_GET_INFO( get_bg_tile_info ) static TILE_GET_INFO( get_fg_tile_info ) { superwng_state *state = machine.driver_data(); - int code = state->m_videoram_fg.target()[tile_index]; - int attr = state->m_colorram_fg.target()[tile_index]; + int code = state->m_videoram_fg[tile_index]; + int attr = state->m_colorram_fg[tile_index]; code= (code&0x7f) | ((attr&0x40)<<1) | ((code&0x80)<<1); @@ -143,10 +143,10 @@ static SCREEN_UPDATE_IND16( superwng ) for(int i=0x3e; i>=0; i-=2) { - int code=(state->m_videoram_bg.target()[i]>>2)+0x40; - int sx=256-state->m_videoram_bg.target()[i+1]-8; - int sy = state->m_colorram_bg.target()[i]+8; - int attr = state->m_colorram_bg.target()[i+1]; + int code=(state->m_videoram_bg[i]>>2)+0x40; + int sx=256-state->m_videoram_bg[i+1]-8; + int sy = state->m_colorram_bg[i]+8; + int attr = state->m_colorram_bg[i+1]; if (flip) { @@ -154,7 +154,7 @@ static SCREEN_UPDATE_IND16( superwng ) sx-=8; } - if(state->m_videoram_bg.target()[i+1] | state->m_colorram_bg.target()[i]) + if(state->m_videoram_bg[i+1] | state->m_colorram_bg[i]) { drawgfx_transpen(bitmap, cliprect,screen.machine().gfx[1], @@ -246,25 +246,25 @@ static INTERRUPT_GEN( superwng_sound_nmi_assert ) WRITE8_MEMBER(superwng_state::superwng_bg_vram_w) { - m_videoram_bg.target()[offset] = data; + m_videoram_bg[offset] = data; m_bg_tilemap->mark_tile_dirty(offset); } WRITE8_MEMBER(superwng_state::superwng_bg_cram_w) { - m_colorram_bg.target()[offset] = data; + m_colorram_bg[offset] = data; m_bg_tilemap->mark_tile_dirty(offset); } WRITE8_MEMBER(superwng_state::superwng_fg_vram_w) { - m_videoram_fg.target()[offset] = data; + m_videoram_fg[offset] = data; m_fg_tilemap->mark_tile_dirty(offset); } WRITE8_MEMBER(superwng_state::superwng_fg_cram_w) { - m_colorram_fg.target()[offset] = data; + m_colorram_fg[offset] = data; m_fg_tilemap->mark_tile_dirty(offset); } diff --git a/src/mame/drivers/suprgolf.c b/src/mame/drivers/suprgolf.c index 649a8568cad..46dc7d965e2 100644 --- a/src/mame/drivers/suprgolf.c +++ b/src/mame/drivers/suprgolf.c @@ -60,8 +60,8 @@ public: static TILE_GET_INFO( get_tile_info ) { suprgolf_state *state = machine.driver_data(); - int code = state->m_videoram.target()[tile_index*2]+256*(state->m_videoram.target()[tile_index*2+1]); - int color = state->m_videoram.target()[tile_index*2+0x800] & 0x7f; + int code = state->m_videoram[tile_index*2]+256*(state->m_videoram[tile_index*2+1]); + int color = state->m_videoram[tile_index*2+0x800] & 0x7f; SET_TILE_INFO( 0, @@ -134,7 +134,7 @@ READ8_MEMBER(suprgolf_state::suprgolf_videoram_r) if (m_palette_switch) return m_paletteram[offset]; else - return m_videoram.target()[offset]; + return m_videoram[offset]; } WRITE8_MEMBER(suprgolf_state::suprgolf_videoram_w) @@ -155,7 +155,7 @@ WRITE8_MEMBER(suprgolf_state::suprgolf_videoram_w) } else { - m_videoram.target()[offset] = data; + m_videoram[offset] = data; m_tilemap->mark_tile_dirty((offset & 0x7fe) >> 1); } } diff --git a/src/mame/drivers/tapatune.c b/src/mame/drivers/tapatune.c index db92a4c5b62..10ccd0b0062 100644 --- a/src/mame/drivers/tapatune.c +++ b/src/mame/drivers/tapatune.c @@ -342,9 +342,10 @@ static MC6845_UPDATE_ROW( update_row ) offs_t offs = (ma*2 + ra*0x40)*4; + UINT8 *videoram = reinterpret_cast(state->m_videoram.target()); for (x = 0; x < x_count*4; x++) { - UINT8 pix = ((UINT8*)state->m_videoram.target())[BYTE_XOR_BE(offs + x)]; + UINT8 pix = videoram[BYTE_XOR_BE(offs + x)]; dest[2*x] = pens[((pix >> 4) & 0x0f)]; dest[2*x + 1] = pens[(pix & 0x0f)]; } diff --git a/src/mame/drivers/tattack.c b/src/mame/drivers/tattack.c index 57c37972115..397eb6826e9 100644 --- a/src/mame/drivers/tattack.c +++ b/src/mame/drivers/tattack.c @@ -40,8 +40,8 @@ public: static TILE_GET_INFO( get_tile_info ) { tattack_state *state = machine.driver_data(); - 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&1 ) || (color>15) ) logerror("COLOR %i\n",color); diff --git a/src/mame/drivers/tgtpanic.c b/src/mame/drivers/tgtpanic.c index 526b4e2283c..fcac7fc8868 100644 --- a/src/mame/drivers/tgtpanic.c +++ b/src/mame/drivers/tgtpanic.c @@ -46,7 +46,7 @@ static SCREEN_UPDATE_RGB32( tgtpanic ) for (offs = 0; offs < 0x2000; ++offs) { - UINT8 val = state->m_ram.target()[offs]; + UINT8 val = state->m_ram[offs]; y = (offs & 0x7f) << 1; x = (offs >> 7) << 2; diff --git a/src/mame/drivers/tickee.c b/src/mame/drivers/tickee.c index 21402767359..62569531cef 100644 --- a/src/mame/drivers/tickee.c +++ b/src/mame/drivers/tickee.c @@ -113,8 +113,8 @@ static TIMER_CALLBACK( setup_gun_interrupts ) state->m_setup_gun_timer->adjust(machine.primary_screen->time_until_pos(0)); /* only do work if the palette is flashed */ - if (state->m_control.target()) - if (!state->m_control.target()[2]) + if (state->m_control) + if (!state->m_control[2]) return; /* generate interrupts for player 1's gun */ @@ -155,14 +155,14 @@ static VIDEO_START( tickee ) static void scanline_update(screen_device &screen, bitmap_rgb32 &bitmap, int scanline, const tms34010_display_params *params) { tickee_state *state = screen.machine().driver_data(); - UINT16 *src = &state->m_vram.target()[(params->rowaddr << 8) & 0x3ff00]; + UINT16 *src = &state->m_vram[(params->rowaddr << 8) & 0x3ff00]; UINT32 *dest = &bitmap.pix32(scanline); const rgb_t *pens = tlc34076_get_pens(screen.machine().device("tlc34076")); int coladdr = params->coladdr << 1; int x; /* blank palette: fill with pen 255 */ - if (state->m_control.target()[2]) + if (state->m_control[2]) { for (x = params->heblnk; x < params->hsblnk; x++) dest[x] = pens[0xff]; @@ -181,7 +181,7 @@ static void scanline_update(screen_device &screen, bitmap_rgb32 &bitmap, int sca static void rapidfir_scanline_update(screen_device &screen, bitmap_rgb32 &bitmap, int scanline, const tms34010_display_params *params) { tickee_state *state = screen.machine().driver_data(); - UINT16 *src = &state->m_vram.target()[(params->rowaddr << 8) & 0x3ff00]; + UINT16 *src = &state->m_vram[(params->rowaddr << 8) & 0x3ff00]; UINT32 *dest = &bitmap.pix32(scanline); const rgb_t *pens = tlc34076_get_pens(screen.machine().device("tlc34076")); int coladdr = params->coladdr << 1; @@ -240,13 +240,13 @@ WRITE16_MEMBER(tickee_state::rapidfir_transparent_w) { if (!(data & 0xff00)) mem_mask &= 0x00ff; if (!(data & 0x00ff)) mem_mask &= 0xff00; - COMBINE_DATA(&m_vram.target()[offset]); + COMBINE_DATA(&m_vram[offset]); } READ16_MEMBER(tickee_state::rapidfir_transparent_r) { - return m_vram.target()[offset]; + return m_vram[offset]; } @@ -254,7 +254,7 @@ static void rapidfir_to_shiftreg(address_space *space, UINT32 address, UINT16 *s { tickee_state *state = space->machine().driver_data(); if (address < 0x800000) - memcpy(shiftreg, &state->m_vram.target()[TOWORD(address)], TOBYTE(0x2000)); + memcpy(shiftreg, &state->m_vram[TOWORD(address)], TOBYTE(0x2000)); } @@ -262,7 +262,7 @@ static void rapidfir_from_shiftreg(address_space *space, UINT32 address, UINT16 { tickee_state *state = space->machine().driver_data(); if (address < 0x800000) - memcpy(&state->m_vram.target()[TOWORD(address)], shiftreg, TOBYTE(0x2000)); + memcpy(&state->m_vram[TOWORD(address)], shiftreg, TOBYTE(0x2000)); } @@ -275,7 +275,7 @@ static void rapidfir_from_shiftreg(address_space *space, UINT32 address, UINT16 WRITE16_MEMBER(tickee_state::tickee_control_w) { - UINT16 olddata = m_control.target()[offset]; + UINT16 olddata = m_control[offset]; /* offsets: @@ -284,7 +284,7 @@ WRITE16_MEMBER(tickee_state::tickee_control_w) 6 = lamps? (changing all the time) */ - COMBINE_DATA(&m_control.target()[offset]); + COMBINE_DATA(&m_control[offset]); if (offset == 3) { @@ -292,8 +292,8 @@ WRITE16_MEMBER(tickee_state::tickee_control_w) machine().device("ticket2")->write(space, 0, (data & 4) << 5); } - if (olddata != m_control.target()[offset]) - logerror("%08X:tickee_control_w(%d) = %04X (was %04X)\n", cpu_get_pc(&space.device()), offset, m_control.target()[offset], olddata); + if (olddata != m_control[offset]) + logerror("%08X:tickee_control_w(%d) = %04X (was %04X)\n", cpu_get_pc(&space.device()), offset, m_control[offset], olddata); } diff --git a/src/mame/drivers/timetrv.c b/src/mame/drivers/timetrv.c index abedab9d723..a3541c8d6ea 100644 --- a/src/mame/drivers/timetrv.c +++ b/src/mame/drivers/timetrv.c @@ -53,7 +53,7 @@ static VIDEO_START( timetrv ) static SCREEN_UPDATE_IND16( timetrv ) { timetrv_state *state = screen.machine().driver_data(); - popmessage("%s%s",state->m_led_vram_lo.target(),state->m_led_vram_hi.target()); + popmessage("%s%s",reinterpret_cast(state->m_led_vram_lo.target()),reinterpret_cast(state->m_led_vram_hi.target())); return 0; } diff --git a/src/mame/drivers/tmaster.c b/src/mame/drivers/tmaster.c index b4260bfd248..6b9b25c8103 100644 --- a/src/mame/drivers/tmaster.c +++ b/src/mame/drivers/tmaster.c @@ -360,8 +360,8 @@ static SCREEN_UPDATE_IND16( tmaster ) bitmap.fill(get_black_pen(screen.machine()), cliprect); - if (layers_ctrl & 1) copybitmap_trans(bitmap, state->m_bitmap[0][(state->m_regs.target()[0x02/2]>>8)&1], 0,0,0,0, cliprect, 0xff); - if (layers_ctrl & 2) copybitmap_trans(bitmap, state->m_bitmap[1][(state->m_regs.target()[0x02/2]>>9)&1], 0,0,0,0, cliprect, 0xff); + if (layers_ctrl & 1) copybitmap_trans(bitmap, state->m_bitmap[0][(state->m_regs[0x02/2]>>8)&1], 0,0,0,0, cliprect, 0xff); + if (layers_ctrl & 2) copybitmap_trans(bitmap, state->m_bitmap[1][(state->m_regs[0x02/2]>>9)&1], 0,0,0,0, cliprect, 0xff); return 0; } @@ -385,15 +385,15 @@ static void tmaster_draw(running_machine &machine) UINT16 pen; - buffer = (state->m_regs.target()[0x02/2] >> 8) & 3; // 1 bit per layer, selects the currently displayed buffer - sw = state->m_regs.target()[0x04/2]; - sx = state->m_regs.target()[0x06/2]; - sh = state->m_regs.target()[0x08/2] + 1; - sy = state->m_regs.target()[0x0a/2]; + buffer = (state->m_regs[0x02/2] >> 8) & 3; // 1 bit per layer, selects the currently displayed buffer + sw = state->m_regs[0x04/2]; + sx = state->m_regs[0x06/2]; + sh = state->m_regs[0x08/2] + 1; + sy = state->m_regs[0x0a/2]; addr = (*state->m_compute_addr)( - state->m_regs.target()[0x0c/2], - state->m_regs.target()[0x0e/2], state->m_addr); - mode = state->m_regs.target()[0x10/2]; + state->m_regs[0x0c/2], + state->m_regs[0x0e/2], state->m_addr); + mode = state->m_regs[0x10/2]; layer = (mode >> 7) & 1; // layer to draw to buffer = ((mode >> 6) & 1) ^ ((buffer >> layer) & 1); // bit 6 selects whether to use the opposite buffer to that displayed diff --git a/src/mame/drivers/tmspoker.c b/src/mame/drivers/tmspoker.c index cca21fabdef..1d8abe5b18d 100644 --- a/src/mame/drivers/tmspoker.c +++ b/src/mame/drivers/tmspoker.c @@ -235,7 +235,7 @@ public: WRITE8_MEMBER(tmspoker_state::tmspoker_videoram_w) { - m_videoram.target()[offset] = data; + m_videoram[offset] = data; m_bg_tilemap->mark_tile_dirty(offset); } @@ -249,7 +249,7 @@ static TILE_GET_INFO( get_bg_tile_info ) ---- ---- seems unused. */ tmspoker_state *state = machine.driver_data(); - int code = state->m_videoram.target()[tile_index]; + int code = state->m_videoram[tile_index]; SET_TILE_INFO( 0 /* bank */, code, 0 /* color */, 0); } diff --git a/src/mame/drivers/tomcat.c b/src/mame/drivers/tomcat.c index c097b38880b..96e7dd679c4 100644 --- a/src/mame/drivers/tomcat.c +++ b/src/mame/drivers/tomcat.c @@ -255,12 +255,12 @@ READ16_MEMBER(tomcat_state::dsp_BIO_r) READ16_MEMBER(tomcat_state::tomcat_shared_ram_r) { - return m_shared_ram.target()[offset]; + return m_shared_ram[offset]; } WRITE16_MEMBER(tomcat_state::tomcat_shared_ram_w) { - COMBINE_DATA(&m_shared_ram.target()[offset]); + COMBINE_DATA(&m_shared_ram[offset]); } READ8_MEMBER(tomcat_state::tomcat_nvram_r) @@ -358,10 +358,10 @@ INPUT_PORTS_END static MACHINE_START(tomcat) { tomcat_state *state = machine.driver_data(); - ((UINT16*)state->m_shared_ram.target())[0x0000] = 0xf600; - ((UINT16*)state->m_shared_ram.target())[0x0001] = 0x0000; - ((UINT16*)state->m_shared_ram.target())[0x0002] = 0xf600; - ((UINT16*)state->m_shared_ram.target())[0x0003] = 0x0000; + ((UINT16*)state->m_shared_ram)[0x0000] = 0xf600; + ((UINT16*)state->m_shared_ram)[0x0001] = 0x0000; + ((UINT16*)state->m_shared_ram)[0x0002] = 0xf600; + ((UINT16*)state->m_shared_ram)[0x0003] = 0x0000; machine.device("nvram")->set_base(state->m_nvram, 0x800); diff --git a/src/mame/drivers/toratora.c b/src/mame/drivers/toratora.c index 745838f7b63..3da4d4f19c1 100644 --- a/src/mame/drivers/toratora.c +++ b/src/mame/drivers/toratora.c @@ -79,7 +79,7 @@ static SCREEN_UPDATE_RGB32( toratora ) UINT8 y = offs >> 5; UINT8 x = offs << 3; - UINT8 data = state->m_videoram.target()[offs]; + UINT8 data = state->m_videoram[offs]; for (i = 0; i < 8; i++) { @@ -92,7 +92,7 @@ static SCREEN_UPDATE_RGB32( toratora ) /* the video system clears as it writes out the pixels */ if (state->m_clear_tv) - state->m_videoram.target()[offs] = 0; + state->m_videoram[offs] = 0; } state->m_clear_tv = 0; diff --git a/src/mame/drivers/trvmadns.c b/src/mame/drivers/trvmadns.c index 953de93c1cd..93b659089c6 100644 --- a/src/mame/drivers/trvmadns.c +++ b/src/mame/drivers/trvmadns.c @@ -160,7 +160,7 @@ WRITE8_MEMBER(trvmadns_state::trvmadns_banking_w) WRITE8_MEMBER(trvmadns_state::trvmadns_gfxram_w) { - m_gfxram.target()[offset] = data; + m_gfxram[offset] = data; gfx_element_mark_dirty(machine().gfx[0], offset/16); } @@ -208,7 +208,7 @@ WRITE8_MEMBER(trvmadns_state::trvmadns_tileram_w) } - m_tileram.target()[offset] = data; + m_tileram[offset] = data; m_bg_tilemap->mark_tile_dirty(offset >> 1); } @@ -264,8 +264,8 @@ static TILE_GET_INFO( get_bg_tile_info ) trvmadns_state *state = machine.driver_data(); int tile,attr,color,flag; - attr = state->m_tileram.target()[tile_index*2 + 0]; - tile = state->m_tileram.target()[tile_index*2 + 1] + ((attr & 0x01) << 8); + attr = state->m_tileram[tile_index*2 + 0]; + tile = state->m_tileram[tile_index*2 + 1] + ((attr & 0x01) << 8); color = (attr & 0x18) >> 3; flag = TILE_FLIPXY((attr & 0x06) >> 1); @@ -287,7 +287,7 @@ static VIDEO_START( trvmadns ) // fg_tilemap->set_transparent_pen(1); - gfx_element_set_source(machine.gfx[0], state->m_gfxram.target()); + gfx_element_set_source(machine.gfx[0], state->m_gfxram); } static SCREEN_UPDATE_IND16( trvmadns ) @@ -304,8 +304,8 @@ static SCREEN_UPDATE_IND16( trvmadns ) { for (x=0;x<32;x++) { - int attr = state->m_tileram.target()[count*2+0]; - int tile = state->m_tileram.target()[count*2+1] | ((attr & 0x01) << 8); + int attr = state->m_tileram[count*2+0]; + int tile = state->m_tileram[count*2+1] | ((attr & 0x01) << 8); int color = (attr & 0x18) >> 3; int flipx = attr & 4; int flipy = attr & 2; @@ -322,8 +322,8 @@ static SCREEN_UPDATE_IND16( trvmadns ) { for (x=0;x<32;x++) { - int attr = state->m_tileram.target()[count*2+0]; - int tile = state->m_tileram.target()[count*2+1] | ((attr & 0x01) << 8); + int attr = state->m_tileram[count*2+0]; + int tile = state->m_tileram[count*2+1] | ((attr & 0x01) << 8); int color = (attr & 0x18) >> 3; int flipx = attr & 4; int flipy = attr & 2; diff --git a/src/mame/drivers/ttchamp.c b/src/mame/drivers/ttchamp.c index 3cfc75992e6..1e4352c4362 100644 --- a/src/mame/drivers/ttchamp.c +++ b/src/mame/drivers/ttchamp.c @@ -87,11 +87,12 @@ static SCREEN_UPDATE_IND16(ttchamp) // } count=0; + UINT8 *videoram = reinterpret_cast(state->m_peno_vram.target()); for (y=0;ym_peno_vram.target())[BYTE_XOR_LE(count)]+0x300; + /*if(hotblock_port0&0x40)*/bitmap.pix16(y, x) = videoram[BYTE_XOR_LE(count)]+0x300; count++; } } diff --git a/src/mame/drivers/tugboat.c b/src/mame/drivers/tugboat.c index acce48a7733..e4201257b67 100644 --- a/src/mame/drivers/tugboat.c +++ b/src/mame/drivers/tugboat.c @@ -87,8 +87,8 @@ WRITE8_MEMBER(tugboat_state::tugboat_hd46505_1_w) WRITE8_MEMBER(tugboat_state::tugboat_score_w) { - if (offset>=0x8) m_ram.target()[0x291d + 32*offset + 32*(1-8)] = data ^ 0x0f; - if (offset<0x8 ) m_ram.target()[0x291d + 32*offset + 32*9] = data ^ 0x0f; + if (offset>=0x8) m_ram[0x291d + 32*offset + 32*(1-8)] = data ^ 0x0f; + if (offset<0x8 ) m_ram[0x291d + 32*offset + 32*9] = data ^ 0x0f; } static void draw_tilemap(running_machine &machine, bitmap_ind16 &bitmap,const rectangle &cliprect, @@ -101,7 +101,7 @@ static void draw_tilemap(running_machine &machine, bitmap_ind16 &bitmap,const re { for (x = 0;x < 32;x++) { - int code = (state->m_ram.target()[addr + 0x400] << 8) | state->m_ram.target()[addr]; + int code = (state->m_ram[addr + 0x400] << 8) | state->m_ram[addr]; int color = (code & 0x3c00) >> 10; int rgn; diff --git a/src/mame/drivers/twins.c b/src/mame/drivers/twins.c index 6e8a13515ac..7a5489df5cc 100644 --- a/src/mame/drivers/twins.c +++ b/src/mame/drivers/twins.c @@ -142,11 +142,12 @@ static SCREEN_UPDATE_IND16(twins) } count=0; + UINT8 *videoram = reinterpret_cast(state->m_videoram.target()); for (y=0;ym_videoram.target())[BYTE_XOR_LE(count)]; + bitmap.pix16(y, x) = videoram[BYTE_XOR_LE(count)]; count++; } } @@ -241,11 +242,12 @@ static SCREEN_UPDATE_IND16(twinsa) } count=0; + UINT8 *videoram = reinterpret_cast(state->m_videoram.target()); for (y=0;ym_videoram.target())[BYTE_XOR_LE(count)]; + bitmap.pix16(y, x) = videoram[BYTE_XOR_LE(count)]; count++; } } diff --git a/src/mame/drivers/ultrsprt.c b/src/mame/drivers/ultrsprt.c index 6123eb8eb94..5ec3cf4f5f1 100644 --- a/src/mame/drivers/ultrsprt.c +++ b/src/mame/drivers/ultrsprt.c @@ -44,7 +44,7 @@ static SCREEN_UPDATE_IND16( ultrsprt ) ultrsprt_state *state = screen.machine().driver_data(); int i, j; - UINT8 *ram = (UINT8 *)state->m_vram.target(); + UINT8 *ram = reinterpret_cast(state->m_vram.target()); for (j=0; j < 400; j++) { @@ -107,8 +107,8 @@ static MACHINE_START( ultrsprt ) ppcdrc_set_options(machine.device("maincpu"), PPCDRC_COMPATIBLE_OPTIONS); /* configure fast RAM regions for DRC */ - ppcdrc_add_fastram(machine.device("maincpu"), 0x80000000, 0x8007ffff, FALSE, state->m_vram.target()); - ppcdrc_add_fastram(machine.device("maincpu"), 0xff000000, 0xff01ffff, FALSE, state->m_workram.target()); + ppcdrc_add_fastram(machine.device("maincpu"), 0x80000000, 0x8007ffff, FALSE, state->m_vram); + ppcdrc_add_fastram(machine.device("maincpu"), 0xff000000, 0xff01ffff, FALSE, state->m_workram); } diff --git a/src/mame/drivers/umipoker.c b/src/mame/drivers/umipoker.c index ed606e738a9..b37abea7e5a 100644 --- a/src/mame/drivers/umipoker.c +++ b/src/mame/drivers/umipoker.c @@ -63,8 +63,8 @@ public: static TILE_GET_INFO( get_tile_info_0 ) { umipoker_state *state = machine.driver_data(); - int tile = state->m_vram_0.target()[tile_index*2+0]; - int color = state->m_vram_0.target()[tile_index*2+1] & 0x3f; + int tile = state->m_vram_0[tile_index*2+0]; + int color = state->m_vram_0[tile_index*2+1] & 0x3f; SET_TILE_INFO( 0, @@ -76,8 +76,8 @@ static TILE_GET_INFO( get_tile_info_0 ) static TILE_GET_INFO( get_tile_info_1 ) { umipoker_state *state = machine.driver_data(); - int tile = state->m_vram_1.target()[tile_index*2+0]; - int color = state->m_vram_1.target()[tile_index*2+1] & 0x3f; + int tile = state->m_vram_1[tile_index*2+0]; + int color = state->m_vram_1[tile_index*2+1] & 0x3f; SET_TILE_INFO( 0, @@ -89,8 +89,8 @@ static TILE_GET_INFO( get_tile_info_1 ) static TILE_GET_INFO( get_tile_info_2 ) { umipoker_state *state = machine.driver_data(); - int tile = state->m_vram_2.target()[tile_index*2+0]; - int color = state->m_vram_2.target()[tile_index*2+1] & 0x3f; + int tile = state->m_vram_2[tile_index*2+0]; + int color = state->m_vram_2[tile_index*2+1] & 0x3f; SET_TILE_INFO( 0, @@ -102,8 +102,8 @@ static TILE_GET_INFO( get_tile_info_2 ) static TILE_GET_INFO( get_tile_info_3 ) { umipoker_state *state = machine.driver_data(); - int tile = state->m_vram_3.target()[tile_index*2+0]; - int color = state->m_vram_3.target()[tile_index*2+1] & 0x3f; + int tile = state->m_vram_3[tile_index*2+0]; + int color = state->m_vram_3[tile_index*2+1] & 0x3f; SET_TILE_INFO( 0, @@ -159,7 +159,7 @@ READ8_MEMBER(umipoker_state::z80_shared_ram_r) machine().scheduler().synchronize(); // force resync - return m_z80_wram.target()[offset]; + return m_z80_wram[offset]; } WRITE8_MEMBER(umipoker_state::z80_shared_ram_w) @@ -167,7 +167,7 @@ WRITE8_MEMBER(umipoker_state::z80_shared_ram_w) machine().scheduler().synchronize(); // force resync - m_z80_wram.target()[offset] = data; + m_z80_wram[offset] = data; } WRITE16_MEMBER(umipoker_state::umipoker_irq_ack_w) @@ -187,14 +187,14 @@ WRITE16_MEMBER(umipoker_state::umipoker_scrolly_3_w){ COMBINE_DATA(&m_umipoker_s WRITE16_MEMBER(umipoker_state::umipoker_vram_0_w) { - COMBINE_DATA(&m_vram_0.target()[offset]); + COMBINE_DATA(&m_vram_0[offset]); m_tilemap_0->mark_tile_dirty(offset >> 1); } WRITE16_MEMBER(umipoker_state::umipoker_vram_1_w) { - COMBINE_DATA(&m_vram_1.target()[offset]); + COMBINE_DATA(&m_vram_1[offset]); m_tilemap_1->mark_tile_dirty(offset >> 1); } @@ -202,14 +202,14 @@ WRITE16_MEMBER(umipoker_state::umipoker_vram_1_w) WRITE16_MEMBER(umipoker_state::umipoker_vram_2_w) { - COMBINE_DATA(&m_vram_2.target()[offset]); + COMBINE_DATA(&m_vram_2[offset]); m_tilemap_2->mark_tile_dirty(offset >> 1); } WRITE16_MEMBER(umipoker_state::umipoker_vram_3_w) { - COMBINE_DATA(&m_vram_3.target()[offset]); + COMBINE_DATA(&m_vram_3[offset]); m_tilemap_3->mark_tile_dirty(offset >> 1); } diff --git a/src/mame/drivers/unkhorse.c b/src/mame/drivers/unkhorse.c index 1cfa0938f55..03626c64075 100644 --- a/src/mame/drivers/unkhorse.c +++ b/src/mame/drivers/unkhorse.c @@ -58,8 +58,8 @@ static SCREEN_UPDATE_IND16( horse ) { for (int x = 0; x < 32; x++) { - UINT8 data = state->m_video_ram.target()[y << 5 | x]; - UINT8 color = state->m_color_ram.target()[(y << 3 & 0x780) | x] >> 4; + UINT8 data = state->m_video_ram[y << 5 | x]; + UINT8 color = state->m_color_ram[(y << 3 & 0x780) | x] >> 4; for (int i = 0; i < 8; i++) bitmap.pix16(y, x << 3 | i) = (data >> i & 1) ? color : 0; diff --git a/src/mame/drivers/vamphalf.c b/src/mame/drivers/vamphalf.c index 8cf2daf5693..067e0a6a3fa 100644 --- a/src/mame/drivers/vamphalf.c +++ b/src/mame/drivers/vamphalf.c @@ -529,38 +529,38 @@ static void draw_sprites(screen_device &screen, bitmap_ind16 &bitmap) // 16bit version if(state->m_tiles != NULL) { - if(state->m_tiles.target()[offs] & 0x0100) continue; + if(state->m_tiles[offs] & 0x0100) continue; - code = state->m_tiles.target()[offs+1]; - color = (state->m_tiles.target()[offs+2] >> state->m_palshift) & 0x7f; + code = state->m_tiles[offs+1]; + color = (state->m_tiles[offs+2] >> state->m_palshift) & 0x7f; // boonggab if(state->m_has_extra_gfx) { - code |= ((state->m_tiles.target()[offs+2] & 0x100) << 8); + code |= ((state->m_tiles[offs+2] & 0x100) << 8); } - x = state->m_tiles.target()[offs+3] & 0x01ff; - y = 256 - (state->m_tiles.target()[offs] & 0x00ff); + x = state->m_tiles[offs+3] & 0x01ff; + y = 256 - (state->m_tiles[offs] & 0x00ff); - fx = state->m_tiles.target()[offs] & 0x8000; - fy = state->m_tiles.target()[offs] & 0x4000; + fx = state->m_tiles[offs] & 0x8000; + fy = state->m_tiles[offs] & 0x4000; } // 32bit version else { offs /= 2; - if(state->m_tiles32.target()[offs] & 0x01000000) continue; + if(state->m_tiles32[offs] & 0x01000000) continue; - code = state->m_tiles32.target()[offs] & 0xffff; - color = ((state->m_tiles32.target()[offs+1] >> state->m_palshift) & 0x7f0000) >> 16; + code = state->m_tiles32[offs] & 0xffff; + color = ((state->m_tiles32[offs+1] >> state->m_palshift) & 0x7f0000) >> 16; - x = state->m_tiles32.target()[offs+1] & 0x01ff; - y = 256 - ((state->m_tiles32.target()[offs] & 0x00ff0000) >> 16); + x = state->m_tiles32[offs+1] & 0x01ff; + y = 256 - ((state->m_tiles32[offs] & 0x00ff0000) >> 16); - fx = state->m_tiles32.target()[offs] & 0x80000000; - fy = state->m_tiles32.target()[offs] & 0x40000000; + fx = state->m_tiles32[offs] & 0x80000000; + fy = state->m_tiles32[offs] & 0x40000000; } if(state->m_flipscreen) @@ -607,14 +607,14 @@ static void draw_sprites_aoh(screen_device &screen, bitmap_ind16 &bitmap) offs = (block + cnt) / 2; { offs /= 2; - code = (state->m_tiles32.target()[offs] & 0xffff) | ((state->m_tiles32.target()[offs] & 0x3000000) >> 8); - color = ((state->m_tiles32.target()[offs+1] >> state->m_palshift) & 0x7f0000) >> 16; + code = (state->m_tiles32[offs] & 0xffff) | ((state->m_tiles32[offs] & 0x3000000) >> 8); + color = ((state->m_tiles32[offs+1] >> state->m_palshift) & 0x7f0000) >> 16; - x = state->m_tiles32.target()[offs+1] & 0x01ff; - y = 256 - ((state->m_tiles32.target()[offs] & 0x00ff0000) >> 16); + x = state->m_tiles32[offs+1] & 0x01ff; + y = 256 - ((state->m_tiles32[offs] & 0x00ff0000) >> 16); - fx = state->m_tiles32.target()[offs] & 0x4000000; - fy = 0; // not used ? or it's state->m_tiles32.target()[offs] & 0x8000000? + fx = state->m_tiles32[offs] & 0x4000000; + fy = 0; // not used ? or it's state->m_tiles32[offs] & 0x8000000? } if(state->m_flipscreen) @@ -2088,7 +2088,7 @@ READ16_MEMBER(vamphalf_state::vamphalf_speedup_r) device_eat_cycles(&space.device(), 50); } - return m_wram.target()[(0x4a840/2)+offset]; + return m_wram[(0x4a840/2)+offset]; } READ16_MEMBER(vamphalf_state::vamphafk_speedup_r) @@ -2101,7 +2101,7 @@ READ16_MEMBER(vamphalf_state::vamphafk_speedup_r) device_eat_cycles(&space.device(), 50); } - return m_wram.target()[(0x4a6d0/2)+offset]; + return m_wram[(0x4a6d0/2)+offset]; } READ16_MEMBER(vamphalf_state::misncrft_speedup_r) @@ -2114,7 +2114,7 @@ READ16_MEMBER(vamphalf_state::misncrft_speedup_r) device_eat_cycles(&space.device(), 50); } - return m_wram.target()[(0x72eb4/2)+offset]; + return m_wram[(0x72eb4/2)+offset]; } READ16_MEMBER(vamphalf_state::coolmini_speedup_r) @@ -2127,7 +2127,7 @@ READ16_MEMBER(vamphalf_state::coolmini_speedup_r) device_eat_cycles(&space.device(), 50); } - return m_wram.target()[(0xd2e80/2)+offset]; + return m_wram[(0xd2e80/2)+offset]; } READ16_MEMBER(vamphalf_state::suplup_speedup_r) @@ -2140,7 +2140,7 @@ READ16_MEMBER(vamphalf_state::suplup_speedup_r) device_eat_cycles(&space.device(), 50); } - return m_wram.target()[(0x11605c/2)+offset]; + return m_wram[(0x11605c/2)+offset]; } READ16_MEMBER(vamphalf_state::luplup_speedup_r) @@ -2153,7 +2153,7 @@ READ16_MEMBER(vamphalf_state::luplup_speedup_r) device_eat_cycles(&space.device(), 50); } - return m_wram.target()[(0x115e84/2)+offset]; + return m_wram[(0x115e84/2)+offset]; } READ16_MEMBER(vamphalf_state::luplup29_speedup_r) @@ -2166,7 +2166,7 @@ READ16_MEMBER(vamphalf_state::luplup29_speedup_r) device_eat_cycles(&space.device(), 50); } - return m_wram.target()[(0x113f08/2)+offset]; + return m_wram[(0x113f08/2)+offset]; } READ16_MEMBER(vamphalf_state::puzlbang_speedup_r) @@ -2179,7 +2179,7 @@ READ16_MEMBER(vamphalf_state::puzlbang_speedup_r) device_eat_cycles(&space.device(), 50); } - return m_wram.target()[(0x113ecc/2)+offset]; + return m_wram[(0x113ecc/2)+offset]; } READ32_MEMBER(vamphalf_state::wyvernwg_speedup_r) @@ -2194,7 +2194,7 @@ READ32_MEMBER(vamphalf_state::wyvernwg_speedup_r) device_eat_cycles(&space.device(), 50); } - return m_wram32.target()[0x00b56fc/4]; + return m_wram32[0x00b56fc/4]; } READ32_MEMBER(vamphalf_state::wyvernwga_speedup_r) @@ -2209,7 +2209,7 @@ READ32_MEMBER(vamphalf_state::wyvernwga_speedup_r) device_eat_cycles(&space.device(), 50); } - return m_wram32.target()[0x00b74f8/4]; + return m_wram32[0x00b74f8/4]; } @@ -2224,7 +2224,7 @@ READ32_MEMBER(vamphalf_state::finalgdr_speedup_r) device_eat_cycles(&space.device(), 50); } - return m_wram32.target()[0x005e874/4]; + return m_wram32[0x005e874/4]; } READ32_MEMBER(vamphalf_state::mrkicker_speedup_r) @@ -2238,7 +2238,7 @@ READ32_MEMBER(vamphalf_state::mrkicker_speedup_r) device_eat_cycles(&space.device(), 50); } - return m_wram32.target()[0x00701a4/4]; + return m_wram32[0x00701a4/4]; } @@ -2252,7 +2252,7 @@ READ16_MEMBER(vamphalf_state::dquizgo2_speedup_r) device_eat_cycles(&space.device(), 50); } - return m_wram.target()[(0xcde70/2)+offset]; + return m_wram[(0xcde70/2)+offset]; } READ32_MEMBER(vamphalf_state::aoh_speedup_r) @@ -2267,7 +2267,7 @@ READ32_MEMBER(vamphalf_state::aoh_speedup_r) } - return m_wram32.target()[0x28a09c/4]; + return m_wram32[0x28a09c/4]; } READ16_MEMBER(vamphalf_state::jmpbreak_speedup_r) @@ -2280,7 +2280,7 @@ READ16_MEMBER(vamphalf_state::jmpbreak_speedup_r) device_eat_cycles(&space.device(), 50); } - return m_wram.target()[(0x00906fc / 2)+offset]; + return m_wram[(0x00906fc / 2)+offset]; } READ16_MEMBER(vamphalf_state::mrdig_speedup_r) @@ -2293,7 +2293,7 @@ READ16_MEMBER(vamphalf_state::mrdig_speedup_r) device_eat_cycles(&space.device(), 50); } - return m_wram.target()[(0x00a99c / 2)+offset]; + return m_wram[(0x00a99c / 2)+offset]; } READ16_MEMBER(vamphalf_state::dtfamily_speedup_r) @@ -2304,7 +2304,7 @@ READ16_MEMBER(vamphalf_state::dtfamily_speedup_r) if (pc == 0x12fa6) device_spin_until_interrupt(&space.device()); - return m_wram.target()[0xcc2a8 / 2]; + return m_wram[0xcc2a8 / 2]; } @@ -2314,7 +2314,7 @@ READ16_MEMBER(vamphalf_state::toyland_speedup_r) if (cpu_get_pc(&space.device()) == 0x130c2) device_spin_until_interrupt(&space.device()); - return m_wram.target()[0x780d8 / 2]; + return m_wram[0x780d8 / 2]; } @@ -2326,7 +2326,7 @@ READ16_MEMBER(vamphalf_state::boonggab_speedup_r) device_spin_until_interrupt(&space.device()); } - return m_wram.target()[(0xf1b7c / 2)+offset]; + return m_wram[(0xf1b7c / 2)+offset]; } static DRIVER_INIT( vamphalf ) diff --git a/src/mame/drivers/vcombat.c b/src/mame/drivers/vcombat.c index 86f5c586d5d..ad587d8b113 100644 --- a/src/mame/drivers/vcombat.c +++ b/src/mame/drivers/vcombat.c @@ -418,7 +418,7 @@ DIRECT_UPDATE_HANDLER( vcombat_vid_0_direct_handler ) vcombat_state *state = machine.driver_data(); if (address >= 0xfffc0000 && address <= 0xffffffff) { - direct.explicit_configure(0xfffc0000, 0xffffffff, 0x3ffff, state->m_vid_0_shared_RAM.target()); + direct.explicit_configure(0xfffc0000, 0xffffffff, 0x3ffff, state->m_vid_0_shared_RAM); return ~0; } return address; @@ -429,7 +429,7 @@ DIRECT_UPDATE_HANDLER( vcombat_vid_1_direct_handler ) vcombat_state *state = machine.driver_data(); if (address >= 0xfffc0000 && address <= 0xffffffff) { - direct.explicit_configure(0xfffc0000, 0xffffffff, 0x3ffff, state->m_vid_1_shared_RAM.target()); + direct.explicit_configure(0xfffc0000, 0xffffffff, 0x3ffff, state->m_vid_1_shared_RAM); return ~0; } return address; diff --git a/src/mame/drivers/vegas.c b/src/mame/drivers/vegas.c index 8c8df8f57d2..f8fbac127e9 100644 --- a/src/mame/drivers/vegas.c +++ b/src/mame/drivers/vegas.c @@ -546,8 +546,8 @@ static MACHINE_START( vegas ) mips3drc_set_options(machine.device("maincpu"), MIPS3DRC_FASTEST_OPTIONS + MIPS3DRC_STRICT_VERIFY + MIPS3DRC_FLUSH_PC); /* configure fast RAM regions for DRC */ - mips3drc_add_fastram(machine.device("maincpu"), 0x00000000, state->m_rambase.bytes() - 1, FALSE, state->m_rambase.target()); - mips3drc_add_fastram(machine.device("maincpu"), 0x1fc00000, 0x1fc7ffff, TRUE, state->m_rombase.target()); + mips3drc_add_fastram(machine.device("maincpu"), 0x00000000, state->m_rambase.bytes() - 1, FALSE, state->m_rambase); + mips3drc_add_fastram(machine.device("maincpu"), 0x1fc00000, 0x1fc7ffff, TRUE, state->m_rombase); /* register for save states */ state_save_register_global(machine, state->m_nile_irq_state); @@ -845,22 +845,22 @@ static WRITE32_HANDLER( pci_3dfx_w ) static void update_nile_irqs(running_machine &machine) { vegas_state *state = machine.driver_data(); - UINT32 intctll = state->m_nile_regs.target()[NREG_INTCTRL+0]; - UINT32 intctlh = state->m_nile_regs.target()[NREG_INTCTRL+1]; + UINT32 intctll = state->m_nile_regs[NREG_INTCTRL+0]; + UINT32 intctlh = state->m_nile_regs[NREG_INTCTRL+1]; UINT8 irq[6]; int i; /* check for UART transmit IRQ enable and synthsize one */ - if (state->m_nile_regs.target()[NREG_UARTIER] & 2) + if (state->m_nile_regs[NREG_UARTIER] & 2) state->m_nile_irq_state |= 0x0010; else state->m_nile_irq_state &= ~0x0010; irq[0] = irq[1] = irq[2] = irq[3] = irq[4] = irq[5] = 0; - state->m_nile_regs.target()[NREG_INTSTAT0+0] = 0; - state->m_nile_regs.target()[NREG_INTSTAT0+1] = 0; - state->m_nile_regs.target()[NREG_INTSTAT1+0] = 0; - state->m_nile_regs.target()[NREG_INTSTAT1+1] = 0; + state->m_nile_regs[NREG_INTSTAT0+0] = 0; + state->m_nile_regs[NREG_INTSTAT0+1] = 0; + state->m_nile_regs[NREG_INTSTAT1+0] = 0; + state->m_nile_regs[NREG_INTSTAT1+1] = 0; /* handle the lower interrupts */ for (i = 0; i < 8; i++) @@ -871,7 +871,7 @@ static void update_nile_irqs(running_machine &machine) if (vector < 6) { irq[vector] = 1; - state->m_nile_regs.target()[NREG_INTSTAT0 + vector/2] |= 1 << (i + 16*(vector&1)); + state->m_nile_regs[NREG_INTSTAT0 + vector/2] |= 1 << (i + 16*(vector&1)); } } @@ -884,7 +884,7 @@ static void update_nile_irqs(running_machine &machine) if (vector < 6) { irq[vector] = 1; - state->m_nile_regs.target()[NREG_INTSTAT0 + vector/2] |= 1 << (i + 8 + 16*(vector&1)); + state->m_nile_regs[NREG_INTSTAT0 + vector/2] |= 1 << (i + 8 + 16*(vector&1)); } } @@ -911,7 +911,7 @@ static TIMER_CALLBACK( nile_timer_callback ) { vegas_state *state = machine.driver_data(); int which = param; - UINT32 *regs = &state->m_nile_regs.target()[NREG_T0CTRL + which * 4]; + UINT32 *regs = &state->m_nile_regs[NREG_T0CTRL + which * 4]; if (LOG_TIMERS) logerror("timer %d fired\n", which); /* adjust the timer to fire again */ @@ -943,7 +943,7 @@ static TIMER_CALLBACK( nile_timer_callback ) static READ32_HANDLER( nile_r ) { vegas_state *state = space->machine().driver_data(); - UINT32 result = state->m_nile_regs.target()[offset]; + UINT32 result = state->m_nile_regs[offset]; int logit = 1, which; switch (offset) @@ -1000,11 +1000,11 @@ static READ32_HANDLER( nile_r ) case NREG_T2CNTR: /* general purpose timer control (counter) */ case NREG_T3CNTR: /* watchdog timer control (counter) */ which = (offset - NREG_T0CTRL) / 4; - if (state->m_nile_regs.target()[offset - 1] & 1) + if (state->m_nile_regs[offset - 1] & 1) { - if (state->m_nile_regs.target()[offset] & 2) + if (state->m_nile_regs[offset] & 2) logerror("Unexpected value: timer %d is prescaled\n", which); - result = state->m_nile_regs.target()[offset + 1] = state->m_timer[which]->remaining().as_double() * (double)SYSTEM_CLOCK; + result = state->m_nile_regs[offset + 1] = state->m_timer[which]->remaining().as_double() * (double)SYSTEM_CLOCK; } if (LOG_TIMERS) logerror("%08X:NILE READ: timer %d counter(%03X) = %08X\n", cpu_get_pc(&space->device()), which, offset*4, result); @@ -1012,7 +1012,7 @@ static READ32_HANDLER( nile_r ) break; case NREG_UARTIIR: /* serial port interrupt ID */ - if (state->m_nile_regs.target()[NREG_UARTIER] & 2) + if (state->m_nile_regs[NREG_UARTIER] & 2) result = 0x02; /* transmitter buffer IRQ pending */ else result = 0x01; /* no IRQ pending */ @@ -1056,10 +1056,10 @@ static READ32_HANDLER( nile_r ) static WRITE32_HANDLER( nile_w ) { vegas_state *state = space->machine().driver_data(); - UINT32 olddata = state->m_nile_regs.target()[offset]; + UINT32 olddata = state->m_nile_regs[offset]; int logit = 1, which; - COMBINE_DATA(&state->m_nile_regs.target()[offset]); + COMBINE_DATA(&state->m_nile_regs[offset]); switch (offset) { @@ -1094,7 +1094,7 @@ static WRITE32_HANDLER( nile_w ) case NREG_INTCLR+1: /* Interrupt clear */ if (LOG_NILE) logerror("%08X:NILE WRITE: interrupt clear(%03X) = %08X & %08X\n", cpu_get_pc(&space->device()), offset*4, data, mem_mask); logit = 0; - state->m_nile_irq_state &= ~(state->m_nile_regs.target()[offset] & ~0xf00); + state->m_nile_irq_state &= ~(state->m_nile_regs[offset] & ~0xf00); update_nile_irqs(space->machine()); break; @@ -1115,7 +1115,7 @@ static WRITE32_HANDLER( nile_w ) break; case NREG_PCIINIT1+0: /* PCI master */ - if (((olddata & 0xe) == 0xa) != ((state->m_nile_regs.target()[offset] & 0xe) == 0xa)) + if (((olddata & 0xe) == 0xa) != ((state->m_nile_regs[offset] & 0xe) == 0xa)) remap_dynamic_addresses(space->machine()); logit = 0; break; @@ -1129,22 +1129,22 @@ static WRITE32_HANDLER( nile_w ) logit = 0; /* timer just enabled? */ - if (!(olddata & 1) && (state->m_nile_regs.target()[offset] & 1)) + if (!(olddata & 1) && (state->m_nile_regs[offset] & 1)) { - UINT32 scale = state->m_nile_regs.target()[offset + 1]; - if (state->m_nile_regs.target()[offset] & 2) + UINT32 scale = state->m_nile_regs[offset + 1]; + if (state->m_nile_regs[offset] & 2) logerror("Unexpected value: timer %d is prescaled\n", which); if (scale != 0) state->m_timer[which]->adjust(TIMER_PERIOD * scale, which); - if (LOG_TIMERS) logerror("Starting timer %d at a rate of %d Hz\n", which, (int)ATTOSECONDS_TO_HZ((TIMER_PERIOD * (state->m_nile_regs.target()[offset + 1] + 1)).attoseconds)); + if (LOG_TIMERS) logerror("Starting timer %d at a rate of %d Hz\n", which, (int)ATTOSECONDS_TO_HZ((TIMER_PERIOD * (state->m_nile_regs[offset + 1] + 1)).attoseconds)); } /* timer disabled? */ - else if ((olddata & 1) && !(state->m_nile_regs.target()[offset] & 1)) + else if ((olddata & 1) && !(state->m_nile_regs[offset] & 1)) { - if (state->m_nile_regs.target()[offset] & 2) + if (state->m_nile_regs[offset] & 2) logerror("Unexpected value: timer %d is prescaled\n", which); - state->m_nile_regs.target()[offset + 1] = state->m_timer[which]->remaining().as_double() * SYSTEM_CLOCK; + state->m_nile_regs[offset + 1] = state->m_timer[which]->remaining().as_double() * SYSTEM_CLOCK; state->m_timer[which]->adjust(attotime::never, which); } break; @@ -1157,11 +1157,11 @@ static WRITE32_HANDLER( nile_w ) if (LOG_TIMERS) logerror("%08X:NILE WRITE: timer %d counter(%03X) = %08X & %08X\n", cpu_get_pc(&space->device()), which, offset*4, data, mem_mask); logit = 0; - if (state->m_nile_regs.target()[offset - 1] & 1) + if (state->m_nile_regs[offset - 1] & 1) { - if (state->m_nile_regs.target()[offset - 1] & 2) + if (state->m_nile_regs[offset - 1] & 2) logerror("Unexpected value: timer %d is prescaled\n", which); - state->m_timer[which]->adjust(TIMER_PERIOD * state->m_nile_regs.target()[offset], which); + state->m_timer[which]->adjust(TIMER_PERIOD * state->m_nile_regs[offset], which); } break; @@ -1560,7 +1560,7 @@ static void remap_dynamic_addresses(running_machine &machine) state->m_dynamic_count = 0; /* DCS2 */ - base = state->m_nile_regs.target()[NREG_DCS2] & 0x1fffff00; + base = state->m_nile_regs[NREG_DCS2] & 0x1fffff00; if (base >= state->m_rambase.bytes()) { add_dynamic_address(state, base + 0x0000, base + 0x0003, sio_irq_clear_r, sio_irq_clear_w); @@ -1574,22 +1574,22 @@ static void remap_dynamic_addresses(running_machine &machine) } /* DCS3 */ - base = state->m_nile_regs.target()[NREG_DCS3] & 0x1fffff00; + base = state->m_nile_regs[NREG_DCS3] & 0x1fffff00; if (base >= state->m_rambase.bytes()) add_dynamic_address(state, base + 0x0000, base + 0x0003, analog_port_r, analog_port_w); /* DCS4 */ - base = state->m_nile_regs.target()[NREG_DCS4] & 0x1fffff00; + base = state->m_nile_regs[NREG_DCS4] & 0x1fffff00; if (base >= state->m_rambase.bytes()) add_dynamic_address(state, base + 0x0000, base + 0x7fff, timekeeper_r, timekeeper_w); /* DCS5 */ - base = state->m_nile_regs.target()[NREG_DCS5] & 0x1fffff00; + base = state->m_nile_regs[NREG_DCS5] & 0x1fffff00; if (base >= state->m_rambase.bytes()) add_dynamic_address(state, base + 0x0000, base + 0x0003, sio_r, sio_w); /* DCS6 */ - base = state->m_nile_regs.target()[NREG_DCS6] & 0x1fffff00; + base = state->m_nile_regs[NREG_DCS6] & 0x1fffff00; if (base >= state->m_rambase.bytes()) { add_dynamic_address(state, base + 0x0000, base + 0x003f, midway_ioasic_packed_r, midway_ioasic_packed_w); @@ -1604,7 +1604,7 @@ static void remap_dynamic_addresses(running_machine &machine) } /* DCS7 */ - base = state->m_nile_regs.target()[NREG_DCS7] & 0x1fffff00; + base = state->m_nile_regs[NREG_DCS7] & 0x1fffff00; if (base >= state->m_rambase.bytes()) { add_dynamic_device_address(state, ethernet, base + 0x1000, base + 0x100f, ethernet_r, ethernet_w); @@ -1616,9 +1616,9 @@ static void remap_dynamic_addresses(running_machine &machine) } /* PCI config space */ - if ((state->m_nile_regs.target()[NREG_PCIINIT1] & 0xe) == 0xa) + if ((state->m_nile_regs[NREG_PCIINIT1] & 0xe) == 0xa) { - base = state->m_nile_regs.target()[NREG_PCIW1] & 0x1fffff00; + base = state->m_nile_regs[NREG_PCIW1] & 0x1fffff00; if (base >= state->m_rambase.bytes()) { add_dynamic_address(state, base + (1 << (21 + 4)) + 0x0000, base + (1 << (21 + 4)) + 0x00ff, pci_3dfx_r, pci_3dfx_w); diff --git a/src/mame/drivers/vroulet.c b/src/mame/drivers/vroulet.c index d28a76e7726..901d9eed61d 100644 --- a/src/mame/drivers/vroulet.c +++ b/src/mame/drivers/vroulet.c @@ -85,21 +85,21 @@ WRITE8_MEMBER(vroulet_state::vroulet_paletteram_w) WRITE8_MEMBER(vroulet_state::vroulet_videoram_w) { - m_videoram.target()[offset] = data; + m_videoram[offset] = data; m_bg_tilemap->mark_tile_dirty(offset); } WRITE8_MEMBER(vroulet_state::vroulet_colorram_w) { - m_colorram.target()[offset] = data; + m_colorram[offset] = data; m_bg_tilemap->mark_tile_dirty(offset); } static TILE_GET_INFO( get_bg_tile_info ) { vroulet_state *state = machine.driver_data(); - int attr = state->m_colorram.target()[tile_index]; - int code = state->m_videoram.target()[tile_index] + ((attr & 0xc0) << 2); + int attr = state->m_colorram[tile_index]; + int code = state->m_videoram[tile_index] + ((attr & 0xc0) << 2); int color = attr & 0x1f; SET_TILE_INFO(0, code, color, 0); @@ -117,7 +117,7 @@ static SCREEN_UPDATE_IND16(vroulet) vroulet_state *state = screen.machine().driver_data(); state->m_bg_tilemap->draw(bitmap, cliprect, 0, 0); drawgfx_transpen(bitmap, cliprect, screen.machine().gfx[0], 0x320, 1, 0, 0, - state->m_ball.target()[1], state->m_ball.target()[0] - 12, 0); + state->m_ball[1], state->m_ball[0] - 12, 0); return 0; } diff --git a/src/mame/drivers/wallc.c b/src/mame/drivers/wallc.c index 0d497e669bb..12ba61f9c6a 100644 --- a/src/mame/drivers/wallc.c +++ b/src/mame/drivers/wallc.c @@ -131,7 +131,7 @@ static PALETTE_INIT( wallc ) WRITE8_MEMBER(wallc_state::wallc_videoram_w) { - UINT8 *videoram = m_videoram.target(); + UINT8 *videoram = m_videoram; videoram[offset] = data; m_bg_tilemap->mark_tile_dirty(offset); } @@ -139,7 +139,7 @@ WRITE8_MEMBER(wallc_state::wallc_videoram_w) static TILE_GET_INFO( get_bg_tile_info ) { wallc_state *state = machine.driver_data(); - UINT8 *videoram = state->m_videoram.target(); + UINT8 *videoram = state->m_videoram; SET_TILE_INFO(0, videoram[tile_index] + 0x100, 1, 0); } diff --git a/src/mame/drivers/warpsped.c b/src/mame/drivers/warpsped.c index 894a9cfe881..1c9a9efb8d6 100644 --- a/src/mame/drivers/warpsped.c +++ b/src/mame/drivers/warpsped.c @@ -112,7 +112,7 @@ static TILE_GET_INFO( get_warpspeed_text_tile_info ) { warpspeed_state *state = machine.driver_data(); - UINT8 code = state->m_videoram.target()[tile_index] & 0x3f; + UINT8 code = state->m_videoram[tile_index] & 0x3f; SET_TILE_INFO(0, code, 0, 0); } @@ -129,7 +129,7 @@ static TILE_GET_INFO( get_warpspeed_starfield_tile_info ) WRITE8_MEMBER(warpspeed_state::warpspeed_vidram_w) { - m_videoram.target()[offset] = data; + m_videoram[offset] = data; m_text_tilemap->mark_tile_dirty(offset); } diff --git a/src/mame/drivers/wink.c b/src/mame/drivers/wink.c index a498792cd90..284db339c79 100644 --- a/src/mame/drivers/wink.c +++ b/src/mame/drivers/wink.c @@ -43,7 +43,7 @@ public: static TILE_GET_INFO( get_bg_tile_info ) { wink_state *state = machine.driver_data(); - UINT8 *videoram = state->m_videoram.target(); + UINT8 *videoram = state->m_videoram; int code = videoram[tile_index]; code |= 0x200 * state->m_tile_bank; @@ -71,7 +71,7 @@ static SCREEN_UPDATE_IND16( wink ) WRITE8_MEMBER(wink_state::bgram_w) { - UINT8 *videoram = m_videoram.target(); + UINT8 *videoram = m_videoram; videoram[offset] = data; m_bg_tilemap->mark_tile_dirty(offset); } diff --git a/src/mame/drivers/witch.c b/src/mame/drivers/witch.c index 303055ebcb1..7a9e09a1bed 100644 --- a/src/mame/drivers/witch.c +++ b/src/mame/drivers/witch.c @@ -239,8 +239,8 @@ public: static TILE_GET_INFO( get_gfx0b_tile_info ) { witch_state *state = machine.driver_data(); - int code = state->m_gfx0_vram.target()[tile_index]; - int color = state->m_gfx0_cram.target()[tile_index]; + int code = state->m_gfx0_vram[tile_index]; + int color = state->m_gfx0_cram[tile_index]; code=code | ((color & 0xe0) << 3); @@ -259,8 +259,8 @@ static TILE_GET_INFO( get_gfx0b_tile_info ) static TILE_GET_INFO( get_gfx0a_tile_info ) { witch_state *state = machine.driver_data(); - int code = state->m_gfx0_vram.target()[tile_index]; - int color = state->m_gfx0_cram.target()[tile_index]; + int code = state->m_gfx0_vram[tile_index]; + int color = state->m_gfx0_cram[tile_index]; code=code | ((color & 0xe0) << 3); @@ -279,8 +279,8 @@ static TILE_GET_INFO( get_gfx0a_tile_info ) static TILE_GET_INFO( get_gfx1_tile_info ) { witch_state *state = machine.driver_data(); - int code = state->m_gfx1_vram.target()[tile_index]; - int color = state->m_gfx1_cram.target()[tile_index]; + int code = state->m_gfx1_vram[tile_index]; + int color = state->m_gfx1_cram[tile_index]; SET_TILE_INFO( 0, @@ -291,25 +291,25 @@ static TILE_GET_INFO( get_gfx1_tile_info ) WRITE8_MEMBER(witch_state::gfx0_vram_w) { - m_gfx0_vram.target()[offset] = data; + m_gfx0_vram[offset] = data; m_gfx0a_tilemap->mark_tile_dirty(offset); m_gfx0b_tilemap->mark_tile_dirty(offset); } WRITE8_MEMBER(witch_state::gfx0_cram_w) { - m_gfx0_cram.target()[offset] = data; + m_gfx0_cram[offset] = data; m_gfx0a_tilemap->mark_tile_dirty(offset); m_gfx0b_tilemap->mark_tile_dirty(offset); } READ8_MEMBER(witch_state::gfx0_vram_r) { - return m_gfx0_vram.target()[offset]; + return m_gfx0_vram[offset]; } READ8_MEMBER(witch_state::gfx0_cram_r) { - return m_gfx0_cram.target()[offset]; + return m_gfx0_cram[offset]; } #define FIX_OFFSET() do { \ @@ -318,26 +318,26 @@ READ8_MEMBER(witch_state::gfx0_cram_r) WRITE8_MEMBER(witch_state::gfx1_vram_w) { FIX_OFFSET(); - m_gfx1_vram.target()[offset] = data; + m_gfx1_vram[offset] = data; m_gfx1_tilemap->mark_tile_dirty(offset); } WRITE8_MEMBER(witch_state::gfx1_cram_w) { FIX_OFFSET(); - m_gfx1_cram.target()[offset] = data; + m_gfx1_cram[offset] = data; m_gfx1_tilemap->mark_tile_dirty(offset); } READ8_MEMBER(witch_state::gfx1_vram_r) { FIX_OFFSET(); - return m_gfx1_vram.target()[offset]; + return m_gfx1_vram[offset]; } READ8_MEMBER(witch_state::gfx1_cram_r) { FIX_OFFSET(); - return m_gfx1_cram.target()[offset]; + return m_gfx1_cram[offset]; } READ8_MEMBER(witch_state::read_a00x) @@ -724,12 +724,12 @@ static void draw_sprites(running_machine &machine, bitmap_ind16 &bitmap, const r for(i=0;i<0x800;i+=0x20) { - sx = state->m_sprite_ram.target()[i+1]; + sx = state->m_sprite_ram[i+1]; if(sx!=0xF8) { - tileno = (state->m_sprite_ram.target()[i]<<2) | (( state->m_sprite_ram.target()[i+0x800] & 0x07 ) << 10 ); + tileno = (state->m_sprite_ram[i]<<2) | (( state->m_sprite_ram[i+0x800] & 0x07 ) << 10 ); - sy = state->m_sprite_ram.target()[i+2]; - flags = state->m_sprite_ram.target()[i+3]; + sy = state->m_sprite_ram[i+2]; + flags = state->m_sprite_ram[i+3]; flipx = (flags & 0x10 ) ? 1 : 0; flipy = (flags & 0x20 ) ? 1 : 0; diff --git a/src/mame/drivers/wldarrow.c b/src/mame/drivers/wldarrow.c index a8198c40a34..a7945db53c0 100644 --- a/src/mame/drivers/wldarrow.c +++ b/src/mame/drivers/wldarrow.c @@ -85,9 +85,9 @@ static SCREEN_UPDATE_RGB32( wldarrow ) UINT8 y = offs >> 5; UINT8 x = offs << 3; - UINT8 data0 = state->m_videoram_0.target()[offs]; - UINT8 data1 = state->m_videoram_1.target()[offs]; - UINT8 data2 = state->m_videoram_2.target()[offs]; + UINT8 data0 = state->m_videoram_0[offs]; + UINT8 data1 = state->m_videoram_1[offs]; + UINT8 data2 = state->m_videoram_2[offs]; /* weird equations, but it matches every flyer screenshot - perhaphs they used a look-up PROM? */ diff --git a/src/mame/drivers/xtheball.c b/src/mame/drivers/xtheball.c index cbf25267d2a..b9a07cdebea 100644 --- a/src/mame/drivers/xtheball.c +++ b/src/mame/drivers/xtheball.c @@ -42,7 +42,7 @@ public: static void xtheball_scanline_update(screen_device &screen, bitmap_rgb32 &bitmap, int scanline, const tms34010_display_params *params) { xtheball_state *state = screen.machine().driver_data(); - UINT16 *srcbg = &state->m_vram_bg.target()[(params->rowaddr << 8) & 0xff00]; + UINT16 *srcbg = &state->m_vram_bg[(params->rowaddr << 8) & 0xff00]; UINT32 *dest = &bitmap.pix32(scanline); const rgb_t *pens = tlc34076_get_pens(screen.machine().device("tlc34076")); int coladdr = params->coladdr; @@ -52,7 +52,7 @@ static void xtheball_scanline_update(screen_device &screen, bitmap_rgb32 &bitmap if (!state->m_bitvals[0x13]) { /* mode 0: foreground is the same as background */ - UINT16 *srcfg = &state->m_vram_fg.target()[(params->rowaddr << 8) & 0xff00]; + UINT16 *srcfg = &state->m_vram_fg[(params->rowaddr << 8) & 0xff00]; for (x = params->heblnk; x < params->hsblnk; x += 2, coladdr++) { @@ -67,7 +67,7 @@ static void xtheball_scanline_update(screen_device &screen, bitmap_rgb32 &bitmap { /* mode 1: foreground is half background resolution in */ /* X and supports two pages */ - UINT16 *srcfg = &state->m_vram_fg.target()[(params->rowaddr << 7) & 0xff00]; + UINT16 *srcfg = &state->m_vram_fg[(params->rowaddr << 7) & 0xff00]; for (x = params->heblnk; x < params->hsblnk; x += 2, coladdr++) { @@ -93,9 +93,9 @@ static void xtheball_to_shiftreg(address_space *space, UINT32 address, UINT16 *s { xtheball_state *state = space->machine().driver_data(); if (address >= 0x01000000 && address <= 0x010fffff) - memcpy(shiftreg, &state->m_vram_bg.target()[TOWORD(address & 0xff000)], TOBYTE(0x1000)); + memcpy(shiftreg, &state->m_vram_bg[TOWORD(address & 0xff000)], TOBYTE(0x1000)); else if (address >= 0x02000000 && address <= 0x020fffff) - memcpy(shiftreg, &state->m_vram_fg.target()[TOWORD(address & 0xff000)], TOBYTE(0x1000)); + memcpy(shiftreg, &state->m_vram_fg[TOWORD(address & 0xff000)], TOBYTE(0x1000)); else logerror("%s:xtheball_to_shiftreg(%08X)\n", space->machine().describe_context(), address); } @@ -105,9 +105,9 @@ static void xtheball_from_shiftreg(address_space *space, UINT32 address, UINT16 { xtheball_state *state = space->machine().driver_data(); if (address >= 0x01000000 && address <= 0x010fffff) - memcpy(&state->m_vram_bg.target()[TOWORD(address & 0xff000)], shiftreg, TOBYTE(0x1000)); + memcpy(&state->m_vram_bg[TOWORD(address & 0xff000)], shiftreg, TOBYTE(0x1000)); else if (address >= 0x02000000 && address <= 0x020fffff) - memcpy(&state->m_vram_fg.target()[TOWORD(address & 0xff000)], shiftreg, TOBYTE(0x1000)); + memcpy(&state->m_vram_fg[TOWORD(address & 0xff000)], shiftreg, TOBYTE(0x1000)); else logerror("%s:xtheball_from_shiftreg(%08X)\n", space->machine().describe_context(), address); } diff --git a/src/mame/drivers/zr107.c b/src/mame/drivers/zr107.c index 5ad7605edd9..fff9be5c8ca 100644 --- a/src/mame/drivers/zr107.c +++ b/src/mame/drivers/zr107.c @@ -405,7 +405,7 @@ static MACHINE_START( zr107 ) 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_workram.target()); + ppcdrc_add_fastram(machine.device("maincpu"), 0x00000000, 0x000fffff, FALSE, state->m_workram); } static ADDRESS_MAP_START( zr107_map, AS_PROGRAM, 32, zr107_state )