summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/video/qix.c
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2011-04-01 06:50:56 +0000
committer Aaron Giles <aaron@aarongiles.com>2011-04-01 06:50:56 +0000
commit8409f7d3233f0dd5d211f68e564ca4ebb662f8bf (patch)
tree3edea78fc971015d4b0799f6c5999657685df573 /src/mame/video/qix.c
parent86afc9b913dd13338a8888f27bb13d1548ef8f33 (diff)
Final bulk rename for 0.142: ensure that all members of
driver_device classes have an m_ prefix on them. When we eventually move functions using these into member functions, we will be able to remove the state-> pointers, and having the member variables prefixed will allow them to be distinguished from local variables. Some regex'es used (plus manually fixing the remaining stuff): In src/mame/... state->([a-zA-Z_][^_][a-zA-Z0-9_]*) state->m_\1 state->([^m]_[a-zA-Z0-9_]*) state->m_\1 state->m_save_item state->save_item state->m_save_pointer state->save_pointer (AM_BASE_MEMBER *\( *[a-zA-Z0-9_]+ *, *)([a-zA-Z_][^_]) \1m_\2 (AM_BASE_SIZE_MEMBER *\( *[a-zA-Z0-9_]+ *, *)([a-zA-Z_][^_][a-zA-Z0-9_]* *, *)([a-zA-Z_][^_]) \1m_\2m_\3 (AM_SIZE_MEMBER *\( *[a-zA-Z0-9_]+ *, *)([a-zA-Z_][^_]) \1m_\2 m__ m_ In src/mame/includes/... (\t[a-zA-Z0-9_<>]+[ \t]+[&*]*[ \t]*)([a-zA-Z_][^_][][a-zA-Z0-9_]*;)$ \1m_\2 (\t[a-zA-Z0-9_<>]+[ \t]*[&*]*[ \t]+)([a-zA-Z_][^_][][a-zA-Z0-9_]*;)$ \1m_\2
Diffstat (limited to 'src/mame/video/qix.c')
-rw-r--r--src/mame/video/qix.c82
1 files changed, 41 insertions, 41 deletions
diff --git a/src/mame/video/qix.c b/src/mame/video/qix.c
index 29ee8774c4c..eab35c4d42a 100644
--- a/src/mame/video/qix.c
+++ b/src/mame/video/qix.c
@@ -46,13 +46,13 @@ static VIDEO_START( qix )
qix_state *state = machine.driver_data<qix_state>();
/* allocate memory for the full video RAM */
- state->videoram = auto_alloc_array(machine, UINT8, 256 * 256);
+ state->m_videoram = auto_alloc_array(machine, UINT8, 256 * 256);
/* set up save states */
- state->save_pointer(NAME(state->videoram), 256 * 256);
- state->save_item(NAME(state->flip));
- state->save_item(NAME(state->palette_bank));
- state->save_item(NAME(state->leds));
+ state->save_pointer(NAME(state->m_videoram), 256 * 256);
+ state->save_item(NAME(state->m_flip));
+ state->save_item(NAME(state->m_palette_bank));
+ state->save_item(NAME(state->m_leds));
}
@@ -74,7 +74,7 @@ static WRITE_LINE_DEVICE_HANDLER( display_enable_changed )
UINT8 ra = mc6845_get_ra(device);
/* RA0-RA2 goes to D0-D2 and MA5-MA9 goes to D3-D7 */
- *driver_state->scanline_latch = ((ma >> 2) & 0xf8) | (ra & 0x07);
+ *driver_state->m_scanline_latch = ((ma >> 2) & 0xf8) | (ra & 0x07);
}
}
@@ -90,7 +90,7 @@ WRITE8_DEVICE_HANDLER( qix_flip_screen_w )
{
qix_state *state = device->machine().driver_data<qix_state>();
- state->flip = data;
+ state->m_flip = data;
}
@@ -115,8 +115,8 @@ static READ8_HANDLER( qix_videoram_r )
qix_state *state = space->machine().driver_data<qix_state>();
/* add in the upper bit of the address latch */
- offset += (state->videoram_address[0] & 0x80) << 8;
- return state->videoram[offset];
+ offset += (state->m_videoram_address[0] & 0x80) << 8;
+ return state->m_videoram[offset];
}
@@ -129,10 +129,10 @@ static WRITE8_HANDLER( qix_videoram_w )
space->machine().primary_screen->update_now();
/* add in the upper bit of the address latch */
- offset += (state->videoram_address[0] & 0x80) << 8;
+ offset += (state->m_videoram_address[0] & 0x80) << 8;
/* write the data */
- state->videoram[offset] = data;
+ state->m_videoram[offset] = data;
}
@@ -145,10 +145,10 @@ static WRITE8_HANDLER( slither_videoram_w )
space->machine().primary_screen->update_now();
/* add in the upper bit of the address latch */
- offset += (state->videoram_address[0] & 0x80) << 8;
+ offset += (state->m_videoram_address[0] & 0x80) << 8;
/* blend the data */
- state->videoram[offset] = (state->videoram[offset] & ~*state->videoram_mask) | (data & *state->videoram_mask);
+ state->m_videoram[offset] = (state->m_videoram[offset] & ~*state->m_videoram_mask) | (data & *state->m_videoram_mask);
}
@@ -173,8 +173,8 @@ static READ8_HANDLER( qix_addresslatch_r )
qix_state *state = space->machine().driver_data<qix_state>();
/* compute the value at the address latch */
- offset = (state->videoram_address[0] << 8) | state->videoram_address[1];
- return state->videoram[offset];
+ offset = (state->m_videoram_address[0] << 8) | state->m_videoram_address[1];
+ return state->m_videoram[offset];
}
@@ -186,10 +186,10 @@ static WRITE8_HANDLER( qix_addresslatch_w )
space->machine().primary_screen->update_now();
/* compute the value at the address latch */
- offset = (state->videoram_address[0] << 8) | state->videoram_address[1];
+ offset = (state->m_videoram_address[0] << 8) | state->m_videoram_address[1];
/* write the data */
- state->videoram[offset] = data;
+ state->m_videoram[offset] = data;
}
@@ -201,10 +201,10 @@ static WRITE8_HANDLER( slither_addresslatch_w )
space->machine().primary_screen->update_now();
/* compute the value at the address latch */
- offset = (state->videoram_address[0] << 8) | state->videoram_address[1];
+ offset = (state->m_videoram_address[0] << 8) | state->m_videoram_address[1];
/* blend the data */
- state->videoram[offset] = (state->videoram[offset] & ~*state->videoram_mask) | (data & *state->videoram_mask);
+ state->m_videoram[offset] = (state->m_videoram[offset] & ~*state->m_videoram_mask) | (data & *state->m_videoram_mask);
}
@@ -220,13 +220,13 @@ static WRITE8_HANDLER( qix_paletteram_w )
{
qix_state *state = space->machine().driver_data<qix_state>();
- UINT8 old_data = state->paletteram[offset];
+ UINT8 old_data = state->m_paletteram[offset];
/* set the palette RAM value */
- state->paletteram[offset] = data;
+ state->m_paletteram[offset] = data;
/* trigger an update if a currently visible pen has changed */
- if (((offset >> 8) == state->palette_bank) &&
+ if (((offset >> 8) == state->m_palette_bank) &&
(old_data != data))
space->machine().primary_screen->update_now();
}
@@ -237,14 +237,14 @@ WRITE8_HANDLER( qix_palettebank_w )
qix_state *state = space->machine().driver_data<qix_state>();
/* set the bank value */
- if (state->palette_bank != (data & 3))
+ if (state->m_palette_bank != (data & 3))
{
space->machine().primary_screen->update_now();
- state->palette_bank = data & 3;
+ state->m_palette_bank = data & 3;
}
/* LEDs are in the upper 6 bits */
- state->leds = ~data & 0xfc;
+ state->m_leds = ~data & 0xfc;
}
@@ -275,11 +275,11 @@ static void get_pens(qix_state *state, pen_t *pens)
0xff /* value = 3, intensity = 3 */
};
- for (offs = state->palette_bank << 8; offs < (state->palette_bank << 8) + NUM_PENS; offs++)
+ for (offs = state->m_palette_bank << 8; offs < (state->m_palette_bank << 8) + NUM_PENS; offs++)
{
int bits, intensity, r, g, b;
- UINT8 data = state->paletteram[offs];
+ UINT8 data = state->m_paletteram[offs];
/* compute R, G, B from the table */
intensity = (data >> 0) & 0x03;
@@ -314,9 +314,9 @@ static MC6845_BEGIN_UPDATE( begin_update )
#endif
/* create the pens */
- get_pens(state, state->pens);
+ get_pens(state, state->m_pens);
- return state->pens;
+ return state->m_pens;
}
@@ -330,10 +330,10 @@ static MC6845_UPDATE_ROW( update_row )
/* the memory is hooked up to the MA, RA lines this way */
offs_t offs = ((ma << 6) & 0xf800) | ((ra << 8) & 0x0700);
- offs_t offs_xor = state->flip ? 0xffff : 0;
+ offs_t offs_xor = state->m_flip ? 0xffff : 0;
for (x = 0; x < x_count * 8; x++)
- dest[x] = pens[state->videoram[(offs + x) ^ offs_xor]];
+ dest[x] = pens[state->m_videoram[(offs + x) ^ offs_xor]];
}
@@ -367,10 +367,10 @@ static ADDRESS_MAP_START( qix_video_map, AS_PROGRAM, 8 )
AM_RANGE(0x8800, 0x8800) AM_MIRROR(0x03ff) AM_WRITE(qix_palettebank_w)
AM_RANGE(0x8c00, 0x8c00) AM_MIRROR(0x03fe) AM_READWRITE(qix_data_firq_r, qix_data_firq_w)
AM_RANGE(0x8c01, 0x8c01) AM_MIRROR(0x03fe) AM_READWRITE(qix_video_firq_ack_r, qix_video_firq_ack_w)
- AM_RANGE(0x9000, 0x93ff) AM_RAM_WRITE(qix_paletteram_w) AM_BASE_MEMBER(qix_state, paletteram)
+ AM_RANGE(0x9000, 0x93ff) AM_RAM_WRITE(qix_paletteram_w) AM_BASE_MEMBER(qix_state, m_paletteram)
AM_RANGE(0x9400, 0x9400) AM_MIRROR(0x03fc) AM_READWRITE(qix_addresslatch_r, qix_addresslatch_w)
- AM_RANGE(0x9402, 0x9403) AM_MIRROR(0x03fc) AM_WRITEONLY AM_BASE_MEMBER(qix_state, videoram_address)
- AM_RANGE(0x9800, 0x9800) AM_MIRROR(0x03ff) AM_READONLY AM_BASE_MEMBER(qix_state, scanline_latch)
+ AM_RANGE(0x9402, 0x9403) AM_MIRROR(0x03fc) AM_WRITEONLY AM_BASE_MEMBER(qix_state, m_videoram_address)
+ AM_RANGE(0x9800, 0x9800) AM_MIRROR(0x03ff) AM_READONLY AM_BASE_MEMBER(qix_state, m_scanline_latch)
AM_RANGE(0x9c00, 0x9c00) AM_MIRROR(0x03fe) AM_DEVWRITE("vid_u18", mc6845_address_w)
AM_RANGE(0x9c01, 0x9c01) AM_MIRROR(0x03fe) AM_DEVREADWRITE("vid_u18", mc6845_register_r, mc6845_register_w)
AM_RANGE(0xa000, 0xffff) AM_ROM
@@ -385,10 +385,10 @@ static ADDRESS_MAP_START( zookeep_video_map, AS_PROGRAM, 8 )
AM_RANGE(0x8801, 0x8801) AM_MIRROR(0x03fe) AM_WRITE(zookeep_bankswitch_w)
AM_RANGE(0x8c00, 0x8c00) AM_MIRROR(0x03fe) AM_READWRITE(qix_data_firq_r, qix_data_firq_w)
AM_RANGE(0x8c01, 0x8c01) AM_MIRROR(0x03fe) AM_READWRITE(qix_video_firq_ack_r, qix_video_firq_ack_w)
- AM_RANGE(0x9000, 0x93ff) AM_RAM_WRITE(qix_paletteram_w) AM_BASE_MEMBER(qix_state, paletteram)
+ AM_RANGE(0x9000, 0x93ff) AM_RAM_WRITE(qix_paletteram_w) AM_BASE_MEMBER(qix_state, m_paletteram)
AM_RANGE(0x9400, 0x9400) AM_MIRROR(0x03fc) AM_READWRITE(qix_addresslatch_r, qix_addresslatch_w)
- AM_RANGE(0x9402, 0x9403) AM_MIRROR(0x03fc) AM_WRITEONLY AM_BASE_MEMBER(qix_state, videoram_address)
- AM_RANGE(0x9800, 0x9800) AM_MIRROR(0x03ff) AM_READONLY AM_BASE_MEMBER(qix_state, scanline_latch)
+ AM_RANGE(0x9402, 0x9403) AM_MIRROR(0x03fc) AM_WRITEONLY AM_BASE_MEMBER(qix_state, m_videoram_address)
+ AM_RANGE(0x9800, 0x9800) AM_MIRROR(0x03ff) AM_READONLY AM_BASE_MEMBER(qix_state, m_scanline_latch)
AM_RANGE(0x9c00, 0x9c00) AM_MIRROR(0x03fe) AM_DEVWRITE("vid_u18", mc6845_address_w)
AM_RANGE(0x9c01, 0x9c01) AM_MIRROR(0x03fe) AM_DEVREADWRITE("vid_u18", mc6845_register_r, mc6845_register_w)
AM_RANGE(0xa000, 0xbfff) AM_ROMBANK("bank1")
@@ -403,11 +403,11 @@ static ADDRESS_MAP_START( slither_video_map, AS_PROGRAM, 8 )
AM_RANGE(0x8800, 0x8800) AM_MIRROR(0x03ff) AM_WRITE(qix_palettebank_w)
AM_RANGE(0x8c00, 0x8c00) AM_MIRROR(0x03fe) AM_READWRITE(qix_data_firq_r, qix_data_firq_w)
AM_RANGE(0x8c01, 0x8c01) AM_MIRROR(0x03fe) AM_READWRITE(qix_video_firq_ack_r, qix_video_firq_ack_w)
- AM_RANGE(0x9000, 0x93ff) AM_RAM_WRITE(qix_paletteram_w) AM_BASE_MEMBER(qix_state, paletteram)
+ AM_RANGE(0x9000, 0x93ff) AM_RAM_WRITE(qix_paletteram_w) AM_BASE_MEMBER(qix_state, m_paletteram)
AM_RANGE(0x9400, 0x9400) AM_MIRROR(0x03fc) AM_READWRITE(qix_addresslatch_r, slither_addresslatch_w)
- AM_RANGE(0x9401, 0x9401) AM_MIRROR(0x03fc) AM_WRITEONLY AM_BASE_MEMBER(qix_state, videoram_mask)
- AM_RANGE(0x9402, 0x9403) AM_MIRROR(0x03fc) AM_WRITEONLY AM_BASE_MEMBER(qix_state, videoram_address)
- AM_RANGE(0x9800, 0x9800) AM_MIRROR(0x03ff) AM_READONLY AM_BASE_MEMBER(qix_state, scanline_latch)
+ AM_RANGE(0x9401, 0x9401) AM_MIRROR(0x03fc) AM_WRITEONLY AM_BASE_MEMBER(qix_state, m_videoram_mask)
+ AM_RANGE(0x9402, 0x9403) AM_MIRROR(0x03fc) AM_WRITEONLY AM_BASE_MEMBER(qix_state, m_videoram_address)
+ AM_RANGE(0x9800, 0x9800) AM_MIRROR(0x03ff) AM_READONLY AM_BASE_MEMBER(qix_state, m_scanline_latch)
AM_RANGE(0x9c00, 0x9c00) AM_MIRROR(0x03fe) AM_DEVWRITE("vid_u18", mc6845_address_w)
AM_RANGE(0x9c01, 0x9c01) AM_MIRROR(0x03fe) AM_DEVREADWRITE("vid_u18", mc6845_register_r, mc6845_register_w)
AM_RANGE(0xa000, 0xffff) AM_ROM