summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/astinvad.c
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2012-04-11 14:10:06 +0000
committer Miodrag Milanovic <mmicko@gmail.com>2012-04-11 14:10:06 +0000
commit83f070ea3b3f354577f5fc2e54ca6196249eb477 (patch)
tree00d278b578e8f4cc3debe2203a92f96470e7066b /src/mame/drivers/astinvad.c
parenta1ee0822d64c54a810231c19cd21bf2046cf5b88 (diff)
AM_BASE and AM_BASE_SIZE to AM_SHARE by request from Aaron (no whatsnew)
Diffstat (limited to 'src/mame/drivers/astinvad.c')
-rw-r--r--src/mame/drivers/astinvad.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/mame/drivers/astinvad.c b/src/mame/drivers/astinvad.c
index 300598d4c2b..4c797922bfe 100644
--- a/src/mame/drivers/astinvad.c
+++ b/src/mame/drivers/astinvad.c
@@ -45,11 +45,12 @@ class astinvad_state : public driver_device
{
public:
astinvad_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag) { }
+ : driver_device(mconfig, type, tag) ,
+ m_videoram(*this, "videoram"){ }
UINT8 * m_colorram;
- UINT8 * m_videoram;
- size_t m_videoram_size;
+ required_shared_ptr<UINT8> m_videoram;
+//OBRISI.ME
emu_timer *m_int_timer;
UINT8 m_sound_state[2];
@@ -111,10 +112,10 @@ static const ppi8255_interface ppi8255_intf[2] =
static VIDEO_START( spaceint )
{
astinvad_state *state = machine.driver_data<astinvad_state>();
- state->m_colorram = auto_alloc_array(machine, UINT8, state->m_videoram_size);
+ state->m_colorram = auto_alloc_array(machine, UINT8, state->m_videoram.bytes());
state->save_item(NAME(state->m_color_latch));
- state->save_pointer(NAME(state->m_colorram), state->m_videoram_size);
+ state->save_pointer(NAME(state->m_colorram), state->m_videoram.bytes());
}
@@ -181,7 +182,7 @@ static SCREEN_UPDATE_RGB32( spaceint )
const UINT8 *color_prom = screen.machine().region("proms")->base();
int offs;
- for (offs = 0; offs < state->m_videoram_size; offs++)
+ for (offs = 0; offs < state->m_videoram.bytes(); offs++)
{
UINT8 data = state->m_videoram[offs];
UINT8 color = state->m_colorram[offs];
@@ -398,14 +399,14 @@ static ADDRESS_MAP_START( kamikaze_map, AS_PROGRAM, 8, astinvad_state )
ADDRESS_MAP_GLOBAL_MASK(0x3fff)
AM_RANGE(0x0000, 0x1bff) AM_ROM
AM_RANGE(0x1c00, 0x1fff) AM_RAM
- AM_RANGE(0x2000, 0x3fff) AM_RAM AM_BASE_SIZE(m_videoram, m_videoram_size)
+ AM_RANGE(0x2000, 0x3fff) AM_RAM AM_SHARE("videoram")
ADDRESS_MAP_END
static ADDRESS_MAP_START( spaceint_map, AS_PROGRAM, 8, astinvad_state )
AM_RANGE(0x0000, 0x1fff) AM_ROM
AM_RANGE(0x2000, 0x23ff) AM_RAM
- AM_RANGE(0x4000, 0x5fff) AM_RAM_WRITE(spaceint_videoram_w) AM_BASE_SIZE(m_videoram, m_videoram_size)
+ AM_RANGE(0x4000, 0x5fff) AM_RAM_WRITE(spaceint_videoram_w) AM_SHARE("videoram")
ADDRESS_MAP_END