summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author angelosa <salese_corp_ltd@email.it>2017-11-17 00:22:14 +0100
committer angelosa <salese_corp_ltd@email.it>2017-11-17 00:27:20 +0100
commitaa5d139047b9bf142a6c33920a15f2c99aa69f19 (patch)
tree95e8969b87c0205acaa40e5eca9ddd6383641f6d
parent4383667401cd4032b10b171708db97c99b735f6b (diff)
amusco.cpp: remove vram placeholder, allocate it in video_start (nw)
-rw-r--r--src/mame/drivers/amusco.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/mame/drivers/amusco.cpp b/src/mame/drivers/amusco.cpp
index 015b9878194..65a513c4b71 100644
--- a/src/mame/drivers/amusco.cpp
+++ b/src/mame/drivers/amusco.cpp
@@ -103,7 +103,6 @@ class amusco_state : public driver_device
public:
amusco_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
- m_videoram(*this, "videoram"),
m_maincpu(*this, "maincpu"),
m_gfxdecode(*this, "gfxdecode"),
m_pit(*this, "pit8253"),
@@ -132,7 +131,7 @@ protected:
virtual void video_start() override;
virtual void machine_start() override;
private:
- required_shared_ptr<uint8_t> m_videoram;
+ uint8_t *m_videoram;
tilemap_t *m_bg_tilemap;
required_device<cpu_device> m_maincpu;
@@ -146,6 +145,7 @@ private:
uint8_t m_mc6845_address;
uint16_t m_video_update_address;
bool m_blink_state;
+ static constexpr uint32_t videoram_size = 0x10000;
};
@@ -179,6 +179,10 @@ void amusco_state::video_start()
{
m_bg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(amusco_state::get_bg_tile_info),this), TILEMAP_SCAN_ROWS, 8, 10, 74, 24);
m_blink_state = false;
+
+ m_videoram = auto_alloc_array_clear(machine(), uint8_t, videoram_size);
+
+ save_pointer(NAME(m_videoram), videoram_size);
}
void amusco_state::machine_start()
@@ -192,7 +196,6 @@ void amusco_state::machine_start()
static ADDRESS_MAP_START( amusco_mem_map, AS_PROGRAM, 8, amusco_state )
AM_RANGE(0x00000, 0x0ffff) AM_RAM
- AM_RANGE(0xec000, 0xecfff) AM_RAM AM_SHARE("videoram") // placeholder
AM_RANGE(0xf8000, 0xfffff) AM_ROM
ADDRESS_MAP_END