diff options
| author | 2012-04-19 07:47:35 +0000 | |
|---|---|---|
| committer | 2012-04-19 07:47:35 +0000 | |
| commit | 70eab27301c7a778d4a9acf2060c0bbc7a6c6c2b (patch) | |
| tree | 8ef33002e29a78e8379ed3e7f102ff2c466d47ca /src | |
| parent | c931255796bb0f9bcf7d64a2868cb6732c370fb4 (diff) | |
Fix most remaining regressions.
Diffstat (limited to 'src')
67 files changed, 170 insertions, 160 deletions
diff --git a/src/mame/drivers/bmcbowl.c b/src/mame/drivers/bmcbowl.c index 993ef40a55e..f8266123c44 100644 --- a/src/mame/drivers/bmcbowl.c +++ b/src/mame/drivers/bmcbowl.c @@ -112,7 +112,7 @@ class bmcbowl_state : public driver_device public: bmcbowl_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , - m_stats_ram(*this, "stats_ram"), + m_stats_ram(*this, "stats_ram", 16), m_vid1(*this, "vid1"), m_vid2(*this, "vid2"){ } diff --git a/src/mame/drivers/byvid.c b/src/mame/drivers/byvid.c index 17851388d40..317355c9641 100644 --- a/src/mame/drivers/byvid.c +++ b/src/mame/drivers/byvid.c @@ -23,7 +23,7 @@ public: // devices required_device<cpu_device> m_maincpu; required_device<cpu_device> m_videocpu; - required_device<cpu_device> m_pia; + required_device<pia6821_device> m_pia; DECLARE_INPUT_CHANGED_MEMBER(test_switch_press); // UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); diff --git a/src/mame/drivers/dlair.c b/src/mame/drivers/dlair.c index 15d3858bb0b..5c18a3db1af 100644 --- a/src/mame/drivers/dlair.c +++ b/src/mame/drivers/dlair.c @@ -97,7 +97,7 @@ public: optional_device<pioneer_ldv1000_device> m_ldv1000; optional_device<pioneer_pr7820_device> m_pr7820; optional_device<phillips_22vp932_device> m_22vp932; - required_shared_ptr<UINT8> m_videoram; + optional_shared_ptr<UINT8> m_videoram; UINT8 m_last_misc; UINT8 m_laserdisc_data; DECLARE_WRITE8_MEMBER(misc_w); diff --git a/src/mame/drivers/hornet.c b/src/mame/drivers/hornet.c index 023f0e22008..2e09e20aacd 100644 --- a/src/mame/drivers/hornet.c +++ b/src/mame/drivers/hornet.c @@ -336,7 +336,7 @@ public: UINT8 m_led_reg1; required_shared_ptr<UINT32> m_workram; required_shared_ptr<UINT32> m_sharc_dataram0; - required_shared_ptr<UINT32> m_sharc_dataram1; + optional_shared_ptr<UINT32> m_sharc_dataram1; UINT8 *m_jvs_sdata; UINT32 m_jvs_sdata_ptr; emu_timer *m_sound_irq_timer; diff --git a/src/mame/drivers/igs017.c b/src/mame/drivers/igs017.c index 1742949242a..e81877deee1 100644 --- a/src/mame/drivers/igs017.c +++ b/src/mame/drivers/igs017.c @@ -56,9 +56,9 @@ public: : driver_device(mconfig, type, tag), m_input_addr(-1), m_maincpu(*this, "maincpu"), - m_spriteram(*this, "spriteram"), - m_fg_videoram(*this, "fg_videoram"), - m_bg_videoram(*this, "bg_videoram"){ } + m_spriteram(*this, "spriteram", 0), + m_fg_videoram(*this, "fg_videoram", 0), + m_bg_videoram(*this, "bg_videoram", 0){ } int m_input_addr; required_device<cpu_device> m_maincpu; diff --git a/src/mame/drivers/merit.c b/src/mame/drivers/merit.c index 8c3a1983193..cd2bed4d676 100644 --- a/src/mame/drivers/merit.c +++ b/src/mame/drivers/merit.c @@ -72,7 +72,7 @@ public: int m_extra_video_bank_bit; int m_question_address; int m_decryption_key; - required_shared_ptr<UINT8> m_backup_ram; + optional_shared_ptr<UINT8> m_backup_ram; DECLARE_READ8_MEMBER(questions_r); DECLARE_WRITE8_MEMBER(low_offset_w); DECLARE_WRITE8_MEMBER(med_offset_w); diff --git a/src/mame/drivers/photon2.c b/src/mame/drivers/photon2.c index aa85369106f..eb99b7a5e51 100644 --- a/src/mame/drivers/photon2.c +++ b/src/mame/drivers/photon2.c @@ -19,10 +19,10 @@ public: photon2_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_maincpu(*this,"maincpu"), - m_spectrum_video_ram(*this, "spectruvideo_ram"){ } + m_spectrum_video_ram(*this, "spectrum_vram"){ } required_device<cpu_device> m_maincpu; - optional_shared_ptr<UINT8> m_spectrum_video_ram; + required_shared_ptr<UINT8> m_spectrum_video_ram; int m_spectrum_frame_number; int m_spectrum_flash_invert; UINT8 m_spectrum_port_fe; diff --git a/src/mame/drivers/seta.c b/src/mame/drivers/seta.c index 10fa095b4fe..90fc664a76d 100644 --- a/src/mame/drivers/seta.c +++ b/src/mame/drivers/seta.c @@ -10653,8 +10653,8 @@ static DRIVER_INIT( crazyfgt ) RAM[0x1078/2] = 0x4e71; // fixed priorities? - //TODO:FIX - //state->m_vregs = auto_alloc_array_clear(machine, UINT16, 3); + seta_state *state = machine.driver_data<seta_state>(); + state->m_vregs.allocate(3); DRIVER_INIT_CALL(blandia); } @@ -10669,8 +10669,8 @@ static DRIVER_INIT( inttoote ) UINT16 *ROM = (UINT16 *)machine.region( "maincpu" )->base(); // missing / unused video regs - //TODO:FIX - //state->m_vregs = auto_alloc_array_clear(machine, UINT16, 3); + seta_state *state = machine.driver_data<seta_state>(); + state->m_vregs.allocate(3); // code patches (to be removed...) ROM[0x4de0/2] = 0x4e71; // hardware test errors @@ -10685,8 +10685,8 @@ static DRIVER_INIT( inttootea ) //UINT16 *ROM = (UINT16 *)machine.region( "maincpu" )->base(); // missing / unused video regs - //TODO:FIX - //state->m_vregs = auto_alloc_array_clear(machine, UINT16, 3); + seta_state *state = machine.driver_data<seta_state>(); + state->m_vregs.allocate(3); // code patches (to be removed...) //ROM[0x4de0/2] = 0x4e71; // hardware test errors diff --git a/src/mame/drivers/sigmab98.c b/src/mame/drivers/sigmab98.c index e5ba8364def..d101c09d0b4 100644 --- a/src/mame/drivers/sigmab98.c +++ b/src/mame/drivers/sigmab98.c @@ -2114,9 +2114,8 @@ static DRIVER_INIT( animalc ) memory_configure_bank(machine, "rambank", 1, 4, bankedram, 0x1000); memory_set_bank(machine, "rambank", 0); - //state->m_spriteram = auto_alloc_array(machine, UINT8, 0x1000 * 5); - //memset(state->m_spriteram, 0, 0x1000 * 5); - //state->m_spriteram_size = 0x1000; + state->m_spriteram.allocate(0x1000 * 5); + memset(state->m_spriteram, 0, 0x1000 * 5); memory_configure_bank(machine, "sprbank", 0, 5, state->m_spriteram, 0x1000); memory_set_bank(machine, "sprbank", 0); @@ -2162,9 +2161,8 @@ static DRIVER_INIT( itazuram ) memory_set_bankptr(machine, "palbank", state->m_generic_paletteram_8); state->m_rambank = 0x64; - //state->m_spriteram = auto_alloc_array(machine, UINT8, 0x1000 * 5); - //memset(state->m_spriteram, 0, 0x1000 * 5); - //state->m_spriteram_size = 0x1000; + state->m_spriteram.allocate(0x1000 * 5); + memset(state->m_spriteram, 0, 0x1000 * 5); memory_set_bankptr(machine, "sprbank0", state->m_spriteram + 0x1000*4); // scratch memory_set_bankptr(machine, "sprbank1", state->m_spriteram + 0x1000*4); // scratch @@ -2274,9 +2272,8 @@ static DRIVER_INIT( haekaka ) state->m_generic_paletteram_8.allocate(0x200); memset(state->m_generic_paletteram_8, 0, 0x200); - //state->m_spriteram = auto_alloc_array(machine, UINT8, 0x1000); - //memset(state->m_spriteram, 0, 0x1000); - //state->m_spriteram_size = 0x1000; + state->m_spriteram.allocate(0x1000); + memset(state->m_spriteram, 0, 0x1000); state->m_rombank = 0x65; state->m_rambank = 0x53; diff --git a/src/mame/drivers/srmp6.c b/src/mame/drivers/srmp6.c index 46a4fa519ca..3f16448638c 100644 --- a/src/mame/drivers/srmp6.c +++ b/src/mame/drivers/srmp6.c @@ -157,7 +157,7 @@ static VIDEO_START(srmp6) srmp6_state *state = machine.driver_data<srmp6_state>(); state->m_tileram = auto_alloc_array_clear(machine, UINT16, 0x100000*16/2); - //state->m_dmaram = auto_alloc_array(machine, UINT16, 0x100/2); + state->m_dmaram.allocate(0x100/2); state->m_sprram_old = auto_alloc_array_clear(machine, UINT16, 0x80000/2); /* create the char set (gfx will then be updated dynamically from RAM) */ diff --git a/src/mame/drivers/subsino.c b/src/mame/drivers/subsino.c index 9e46fa4cdfc..ab856a7327c 100644 --- a/src/mame/drivers/subsino.c +++ b/src/mame/drivers/subsino.c @@ -3555,9 +3555,9 @@ static DRIVER_INIT( stisub ) rom[0x957] = 0x18; //patch "losing protection" check state->m_stisub_colorram = auto_alloc_array(machine, UINT8, 256*3); - //state->m_reel1_scroll = auto_alloc_array(machine, UINT8, 0x40); - //state->m_reel2_scroll = auto_alloc_array(machine, UINT8, 0x40); - //state->m_reel3_scroll = auto_alloc_array(machine, UINT8, 0x40); + state->m_reel1_scroll.allocate(0x40); + state->m_reel2_scroll.allocate(0x40); + state->m_reel3_scroll.allocate(0x40); state->m_reel1_attr = auto_alloc_array(machine, UINT8, 0x200); state->m_reel2_attr = auto_alloc_array(machine, UINT8, 0x200); @@ -3569,9 +3569,9 @@ static DRIVER_INIT( mtrainnv ) subsino_state *state = machine.driver_data<subsino_state>(); state->m_stisub_colorram = auto_alloc_array(machine, UINT8, 256*3); - //state->m_reel1_scroll = auto_alloc_array(machine, UINT8, 0x40); - //state->m_reel2_scroll = auto_alloc_array(machine, UINT8, 0x40); - //state->m_reel3_scroll = auto_alloc_array(machine, UINT8, 0x40); + state->m_reel1_scroll.allocate(0x40); + state->m_reel2_scroll.allocate(0x40); + state->m_reel3_scroll.allocate(0x40); state->m_reel1_attr = auto_alloc_array(machine, UINT8, 0x200); state->m_reel2_attr = auto_alloc_array(machine, UINT8, 0x200); diff --git a/src/mame/drivers/subsino2.c b/src/mame/drivers/subsino2.c index ac42cad5172..1ba6311193d 100644 --- a/src/mame/drivers/subsino2.c +++ b/src/mame/drivers/subsino2.c @@ -81,7 +81,7 @@ public: : driver_device(mconfig, type, tag) , m_outputs16(*this, "outputs16"), m_outputs(*this, "outputs"), - m_am188em_regs(*this, "am188eregs"){ } + m_am188em_regs(*this, "am188em_regs"){ } UINT8 *m_hm86171_colorram; layer_t m_layers[2]; @@ -94,9 +94,9 @@ public: UINT8 m_ss9601_disable; int m_hm86171_offs; UINT8 m_dsw_mask; - required_shared_ptr<UINT16> m_outputs16; + optional_shared_ptr<UINT16> m_outputs16; optional_shared_ptr<UINT8> m_outputs; - optional_shared_ptr<UINT8> m_am188em_regs; + required_shared_ptr<UINT8> m_am188em_regs; UINT16 m_bishjan_sel; UINT16 m_bishjan_input; DECLARE_WRITE8_MEMBER(ss9601_byte_lo_w); diff --git a/src/mame/drivers/tickee.c b/src/mame/drivers/tickee.c index 62569531cef..7cf5ba9fe83 100644 --- a/src/mame/drivers/tickee.c +++ b/src/mame/drivers/tickee.c @@ -38,7 +38,7 @@ public: m_control(*this, "control"){ } required_shared_ptr<UINT16> m_vram; - required_shared_ptr<UINT16> m_control; + optional_shared_ptr<UINT16> m_control; emu_timer *m_setup_gun_timer; int m_beamxadd; int m_beamyadd; diff --git a/src/mame/includes/aerofgt.h b/src/mame/includes/aerofgt.h index ee4e0207311..820739987b5 100644 --- a/src/mame/includes/aerofgt.h +++ b/src/mame/includes/aerofgt.h @@ -15,11 +15,11 @@ public: /* memory pointers */ required_shared_ptr<UINT16> m_bg1videoram; - required_shared_ptr<UINT16> m_bg2videoram; - required_shared_ptr<UINT16> m_rasterram; + optional_shared_ptr<UINT16> m_bg2videoram; + optional_shared_ptr<UINT16> m_rasterram; optional_shared_ptr<UINT16> m_bitmapram; - required_shared_ptr<UINT16> m_spriteram1; - required_shared_ptr<UINT16> m_spriteram2; + optional_shared_ptr<UINT16> m_spriteram1; + optional_shared_ptr<UINT16> m_spriteram2; required_shared_ptr<UINT16> m_spriteram3; optional_shared_ptr<UINT16> m_tx_tilemap_ram; // UINT16 * m_paletteram; // currently this uses generic palette handling diff --git a/src/mame/includes/alpha68k.h b/src/mame/includes/alpha68k.h index e1b9af9f016..aea2554ea29 100644 --- a/src/mame/includes/alpha68k.h +++ b/src/mame/includes/alpha68k.h @@ -18,7 +18,7 @@ public: required_shared_ptr<UINT16> m_shared_ram; required_shared_ptr<UINT16> m_spriteram; required_shared_ptr<UINT16> m_videoram; - required_shared_ptr<UINT16> m_paletteram; + optional_shared_ptr<UINT16> m_paletteram; /* video-related */ tilemap_t *m_fix_tilemap; diff --git a/src/mame/includes/argus.h b/src/mame/includes/argus.h index 1c4e4c93f47..097527aa477 100644 --- a/src/mame/includes/argus.h +++ b/src/mame/includes/argus.h @@ -13,8 +13,8 @@ public: m_spriteram(*this, "spriteram"), m_butasan_bg1ram(*this, "butasan_bg1ram"){ } - required_shared_ptr<UINT8> m_bg0_scrollx; - required_shared_ptr<UINT8> m_bg0_scrolly; + optional_shared_ptr<UINT8> m_bg0_scrollx; + optional_shared_ptr<UINT8> m_bg0_scrolly; required_shared_ptr<UINT8> m_bg1_scrollx; required_shared_ptr<UINT8> m_bg1_scrolly; required_shared_ptr<UINT8> m_paletteram; diff --git a/src/mame/includes/astrocde.h b/src/mame/includes/astrocde.h index 5cc9bb387a1..57ac457df4d 100644 --- a/src/mame/includes/astrocde.h +++ b/src/mame/includes/astrocde.h @@ -22,7 +22,7 @@ public: m_videoram(*this, "videoram"), m_protected_ram(*this, "protected_ram"){ } - required_shared_ptr<UINT8> m_videoram; + optional_shared_ptr<UINT8> m_videoram; UINT8 m_video_config; UINT8 m_sparkle[4]; char m_totalword[256]; diff --git a/src/mame/includes/atarigt.h b/src/mame/includes/atarigt.h index 2f043367877..d7b19cb00dc 100644 --- a/src/mame/includes/atarigt.h +++ b/src/mame/includes/atarigt.h @@ -17,10 +17,12 @@ class atarigt_state : public atarigen_state { public: atarigt_state(const machine_config &mconfig, device_type type, const char *tag) - : atarigen_state(mconfig, type, tag) { } + : atarigen_state(mconfig, type, tag), + m_colorram(*this, "colorram", 32), + m_mo_command(*this, "mo_command") { } UINT8 m_is_primrage; - UINT16 * m_colorram; + required_shared_ptr<UINT16> m_colorram; bitmap_ind16 * m_pf_bitmap; bitmap_ind16 * m_an_bitmap; @@ -34,7 +36,7 @@ public: UINT32 m_expanded_mram[MRAM_ENTRIES * 3]; - UINT32 * m_mo_command; + required_shared_ptr<UINT32> m_mo_command; void (*m_protection_w)(address_space *space, offs_t offset, UINT16 data); void (*m_protection_r)(address_space *space, offs_t offset, UINT16 *data); diff --git a/src/mame/includes/bloodbro.h b/src/mame/includes/bloodbro.h index effcc1cfe0a..ab9041e01ef 100644 --- a/src/mame/includes/bloodbro.h +++ b/src/mame/includes/bloodbro.h @@ -13,7 +13,7 @@ public: required_shared_ptr<UINT16> m_bgvideoram; required_shared_ptr<UINT16> m_fgvideoram; required_shared_ptr<UINT16> m_txvideoram; - required_shared_ptr<UINT16> m_scroll; + optional_shared_ptr<UINT16> m_scroll; tilemap_t *m_bg_tilemap; tilemap_t *m_fg_tilemap; diff --git a/src/mame/includes/cclimber.h b/src/mame/includes/cclimber.h index 6f79754b1d7..aac2ce27129 100644 --- a/src/mame/includes/cclimber.h +++ b/src/mame/includes/cclimber.h @@ -18,7 +18,7 @@ public: required_shared_ptr<UINT8> m_bigsprite_videoram; required_shared_ptr<UINT8> m_videoram; - required_shared_ptr<UINT8> m_column_scroll; + optional_shared_ptr<UINT8> m_column_scroll; required_shared_ptr<UINT8> m_spriteram; required_shared_ptr<UINT8> m_bigsprite_control; required_shared_ptr<UINT8> m_colorram; diff --git a/src/mame/includes/centiped.h b/src/mame/includes/centiped.h index 3a11ba62908..2d566655a86 100644 --- a/src/mame/includes/centiped.h +++ b/src/mame/includes/centiped.h @@ -14,7 +14,7 @@ public: m_spriteram(*this, "spriteram"), m_bullsdrt_tiles_bankram(*this, "bullsdrt_bank"){ } - required_shared_ptr<UINT8> m_rambase; + optional_shared_ptr<UINT8> m_rambase; required_shared_ptr<UINT8> m_videoram; required_shared_ptr<UINT8> m_spriteram; optional_shared_ptr<UINT8> m_bullsdrt_tiles_bankram; diff --git a/src/mame/includes/cischeat.h b/src/mame/includes/cischeat.h index 17091d9ccea..bd29e157863 100644 --- a/src/mame/includes/cischeat.h +++ b/src/mame/includes/cischeat.h @@ -12,9 +12,9 @@ public: m_f1gpstr2_ioready(*this, "ioready"){ } required_shared_ptr<UINT16> m_vregs; - required_shared_ptr_array<UINT16,3> m_scrollram; + optional_shared_ptr_array<UINT16,3> m_scrollram; required_shared_ptr<UINT16> m_ram; - required_shared_ptr_array<UINT16,2> m_roadram; + optional_shared_ptr_array<UINT16,2> m_roadram; optional_shared_ptr<UINT16> m_f1gpstr2_ioready; UINT16 *m_objectram; diff --git a/src/mame/includes/cninja.h b/src/mame/includes/cninja.h index 31c25e85e94..929eb595116 100644 --- a/src/mame/includes/cninja.h +++ b/src/mame/includes/cninja.h @@ -44,7 +44,7 @@ public: required_shared_ptr<UINT16> m_pf2_rowscroll; required_shared_ptr<UINT16> m_pf3_rowscroll; required_shared_ptr<UINT16> m_pf4_rowscroll; - required_shared_ptr<UINT16> m_ram; + optional_shared_ptr<UINT16> m_ram; /* misc */ int m_scanline; diff --git a/src/mame/includes/dooyong.h b/src/mame/includes/dooyong.h index af9d61e80d0..c8087ce4c76 100644 --- a/src/mame/includes/dooyong.h +++ b/src/mame/includes/dooyong.h @@ -12,7 +12,7 @@ public: optional_device<buffered_spriteram8_device> m_spriteram; optional_device<buffered_spriteram16_device> m_spriteram16; - required_shared_ptr<UINT8> m_txvideoram; + optional_shared_ptr<UINT8> m_txvideoram; optional_shared_ptr<UINT8> m_paletteram_flytiger; UINT8 m_sprites_disabled; UINT8 m_flytiger_palette_bank; diff --git a/src/mame/includes/fantland.h b/src/mame/includes/fantland.h index d2a8a719f27..de3cfa6b33f 100644 --- a/src/mame/includes/fantland.h +++ b/src/mame/includes/fantland.h @@ -5,8 +5,8 @@ class fantland_state : public driver_device public: fantland_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , - m_spriteram(*this, "spriteram", 16), - m_spriteram2(*this, "spriteram2", 16){ } + m_spriteram(*this, "spriteram", 0), + m_spriteram2(*this, "spriteram2", 0){ } /* memory pointers */ // UINT8 * m_spriteram; // currently directly used in a 16bit map... @@ -29,8 +29,8 @@ public: device_t *m_msm2; device_t *m_msm3; device_t *m_msm4; - required_shared_ptr<UINT8> m_spriteram; - required_shared_ptr<UINT8> m_spriteram2; + optional_shared_ptr<UINT8> m_spriteram; + optional_shared_ptr<UINT8> m_spriteram2; DECLARE_WRITE8_MEMBER(fantland_nmi_enable_w); DECLARE_WRITE16_MEMBER(fantland_nmi_enable_16_w); DECLARE_WRITE8_MEMBER(fantland_soundlatch_w); diff --git a/src/mame/includes/fastfred.h b/src/mame/includes/fastfred.h index 13d2f9b9d48..606c838ae65 100644 --- a/src/mame/includes/fastfred.h +++ b/src/mame/includes/fastfred.h @@ -11,18 +11,22 @@ class fastfred_state : public galaxold_state { public: fastfred_state(const machine_config &mconfig, device_type type, const char *tag) - : galaxold_state(mconfig, type, tag) { } + : galaxold_state(mconfig, type, tag), + m_videoram(*this, "videoram"), + m_spriteram(*this, "spriteram"), + m_attributesram(*this, "attributesram"), + m_background_color(*this, "bgcolor"), + m_imago_fg_videoram(*this, "imago_fg_vram") { } UINT8 m_imago_sprites[0x800*3]; UINT16 m_imago_sprites_address; UINT8 m_imago_sprites_bank; int m_hardware_type; - UINT8 *m_videoram; - UINT8 *m_spriteram; - size_t m_spriteram_size; - UINT8 *m_attributesram; - UINT8 *m_background_color; - UINT8 *m_imago_fg_videoram; + required_shared_ptr<UINT8> m_videoram; + required_shared_ptr<UINT8> m_spriteram; + required_shared_ptr<UINT8> m_attributesram; + optional_shared_ptr<UINT8> m_background_color; + optional_shared_ptr<UINT8> m_imago_fg_videoram; UINT16 m_charbank; UINT8 m_colorbank; tilemap_t *m_bg_tilemap; diff --git a/src/mame/includes/flstory.h b/src/mame/includes/flstory.h index 2dd125b86ef..e3545d5c498 100644 --- a/src/mame/includes/flstory.h +++ b/src/mame/includes/flstory.h @@ -13,7 +13,7 @@ public: required_shared_ptr<UINT8> m_videoram; required_shared_ptr<UINT8> m_spriteram; required_shared_ptr<UINT8> m_scrlram; - required_shared_ptr<UINT8> m_workram; + optional_shared_ptr<UINT8> m_workram; // UINT8 * m_paletteram; // currently this uses generic palette handling // UINT8 * m_paletteram_2; // currently this uses generic palette handling diff --git a/src/mame/includes/galpani2.h b/src/mame/includes/galpani2.h index 99c03c8024b..afb8009fbce 100644 --- a/src/mame/includes/galpani2.h +++ b/src/mame/includes/galpani2.h @@ -5,21 +5,29 @@ class galpani2_state : public kaneko16_state public: galpani2_state(const machine_config &mconfig, device_type type, const char *tag) : kaneko16_state(mconfig, type, tag), + m_bg8(*this, "bg8"), + m_palette(*this, "palette"), + m_bg8_scrollx(*this, "bg8_scrollx"), + m_bg8_scrolly(*this, "bg8_scrolly"), + m_bg15(*this, "bg15"), + m_ram(*this, "ram"), + m_ram2(*this, "ram2"), + m_rombank(*this, "rombank"), m_maincpu(*this,"maincpu"), m_subcpu(*this,"sub") { } - UINT16 *m_bg8[2]; - UINT16 *m_palette[2]; - UINT16 *m_bg8_scrollx[2]; - UINT16 *m_bg8_scrolly[2]; - UINT16 *m_bg15; + required_shared_ptr_array<UINT16, 2> m_bg8; + optional_shared_ptr_array<UINT16, 2> m_palette; + required_shared_ptr_array<UINT16, 2> m_bg8_scrollx; + required_shared_ptr_array<UINT16, 2> m_bg8_scrolly; + required_shared_ptr<UINT16> m_bg15; UINT16 m_eeprom_word; - UINT16 *m_ram; - UINT16 *m_ram2; + required_shared_ptr<UINT16> m_ram; + required_shared_ptr<UINT16> m_ram2; UINT16 m_old_mcu_nmi1; UINT16 m_old_mcu_nmi2; - UINT16 *m_rombank; + required_shared_ptr<UINT16> m_rombank; bitmap_ind16 *m_bg8_bitmap[2]; bitmap_ind16 *m_bg15_bitmap; diff --git a/src/mame/includes/galpanic.h b/src/mame/includes/galpanic.h index 3e1ab3ac94b..e1dfabe7d02 100644 --- a/src/mame/includes/galpanic.h +++ b/src/mame/includes/galpanic.h @@ -4,15 +4,16 @@ class galpanic_state : public kaneko16_state { public: galpanic_state(const machine_config &mconfig, device_type type, const char *tag) - : kaneko16_state(mconfig, type, tag) { } + : kaneko16_state(mconfig, type, tag), + m_bgvideoram(*this, "bgvideoram"), + m_fgvideoram(*this, "fgvideoram"), + m_spriteram(*this, "spriteram") { } - UINT16 *m_bgvideoram; - UINT16 *m_fgvideoram; - size_t m_fgvideoram_size; + required_shared_ptr<UINT16> m_bgvideoram; + required_shared_ptr<UINT16> m_fgvideoram; bitmap_ind16 m_bitmap; bitmap_ind16 m_sprites_bitmap; - UINT16 *m_spriteram; - size_t m_spriteram_size; + required_shared_ptr<UINT16> m_spriteram; DECLARE_WRITE16_MEMBER(galpanic_6295_bankswitch_w); DECLARE_WRITE16_MEMBER(galpanica_6295_bankswitch_w); DECLARE_WRITE16_MEMBER(galpanica_misc_w); diff --git a/src/mame/includes/gberet.h b/src/mame/includes/gberet.h index bda5dc58721..981fd15422b 100644 --- a/src/mame/includes/gberet.h +++ b/src/mame/includes/gberet.h @@ -19,10 +19,10 @@ public: /* memory pointers */ required_shared_ptr<UINT8> m_colorram; required_shared_ptr<UINT8> m_videoram; - required_shared_ptr<UINT8> m_spriteram2; + optional_shared_ptr<UINT8> m_spriteram2; required_shared_ptr<UINT8> m_spriteram; - required_shared_ptr<UINT8> m_scrollram; - required_shared_ptr<UINT8> m_soundlatch; + optional_shared_ptr<UINT8> m_scrollram; + optional_shared_ptr<UINT8> m_soundlatch; /* video-related */ tilemap_t * m_bg_tilemap; diff --git a/src/mame/includes/itech32.h b/src/mame/includes/itech32.h index 34cdf2ce5b2..3e433589112 100644 --- a/src/mame/includes/itech32.h +++ b/src/mame/includes/itech32.h @@ -19,10 +19,10 @@ class itech32_state : public driver_device public: itech32_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , - m_main_ram(*this, "main_ram"), - m_nvram(*this, "nvram"), - m_video(*this, "video"), - m_main_rom(*this, "main_rom"), + m_main_ram(*this, "main_ram", 0), + m_nvram(*this, "nvram", 0), + m_video(*this, "video", 0), + m_main_rom(*this, "main_rom", 0), m_drivedge_zbuf_control(*this, "drivedge_zctl"), m_tms1_boot(*this, "tms1_boot"), m_tms1_ram(*this, "tms1_ram"), diff --git a/src/mame/includes/kaneko16.h b/src/mame/includes/kaneko16.h index e4f6d7bb6f3..a6617ffbdb3 100644 --- a/src/mame/includes/kaneko16.h +++ b/src/mame/includes/kaneko16.h @@ -92,13 +92,13 @@ public: optional_shared_ptr<UINT16> m_spriteram; optional_shared_ptr<UINT16> m_bg15_reg; optional_shared_ptr<UINT16> m_bg15_select; - required_shared_ptr<UINT16> m_sprites_regs; + optional_shared_ptr<UINT16> m_sprites_regs; optional_shared_ptr_array<UINT16,4> m_vram; optional_shared_ptr_array<UINT16,4> m_vscroll; - required_shared_ptr<UINT16> m_layers_0_regs; + optional_shared_ptr<UINT16> m_layers_0_regs; optional_shared_ptr<UINT16> m_layers_1_regs; - required_shared_ptr<UINT16> m_mcu_ram; - required_shared_ptr<UINT16> m_mainram; + optional_shared_ptr<UINT16> m_mcu_ram; + optional_shared_ptr<UINT16> m_mainram; UINT8 m_nvram_save[128]; int m_sprite_type; diff --git a/src/mame/includes/liberate.h b/src/mame/includes/liberate.h index 5a7b9d017a1..292dd0354a3 100644 --- a/src/mame/includes/liberate.h +++ b/src/mame/includes/liberate.h @@ -10,7 +10,7 @@ public: m_spriteram(*this, "spriteram"), m_scratchram(*this, "scratchram"){ } - required_shared_ptr<UINT8> m_paletteram; + optional_shared_ptr<UINT8> m_paletteram; optional_shared_ptr<UINT8> m_bg_vram; /* prosport */ required_shared_ptr<UINT8> m_colorram; required_shared_ptr<UINT8> m_videoram; diff --git a/src/mame/includes/m72.h b/src/mame/includes/m72.h index e89dce7afc9..30887ecc140 100644 --- a/src/mame/includes/m72.h +++ b/src/mame/includes/m72.h @@ -21,7 +21,7 @@ public: required_shared_ptr<UINT16> m_videoram2; optional_shared_ptr<UINT16> m_majtitle_rowscrollram; optional_shared_ptr<UINT16> m_spriteram2; - required_shared_ptr<UINT8> m_soundram; + optional_shared_ptr<UINT8> m_soundram; UINT16 *m_protection_ram; emu_timer *m_scanline_timer; diff --git a/src/mame/includes/m90.h b/src/mame/includes/m90.h index e7daa7e989f..017e9b2273a 100644 --- a/src/mame/includes/m90.h +++ b/src/mame/includes/m90.h @@ -7,7 +7,7 @@ public: m_spriteram(*this, "spriteram"){ } required_shared_ptr<UINT16> m_video_data; - required_shared_ptr<UINT16> m_spriteram; + optional_shared_ptr<UINT16> m_spriteram; UINT16 m_video_control_data[8]; tilemap_t *m_pf1_layer; tilemap_t *m_pf2_layer; diff --git a/src/mame/includes/meadows.h b/src/mame/includes/meadows.h index 6f4a085fb0b..ec8b6371301 100644 --- a/src/mame/includes/meadows.h +++ b/src/mame/includes/meadows.h @@ -14,7 +14,7 @@ public: m_spriteram(*this, "spriteram"), m_videoram(*this, "videoram"){ } - required_shared_ptr<UINT8> m_spriteram; + optional_shared_ptr<UINT8> m_spriteram; required_shared_ptr<UINT8> m_videoram; UINT8 m_dac; int m_dac_enable; diff --git a/src/mame/includes/midvunit.h b/src/mame/includes/midvunit.h index 4474af0a676..1d6829a4102 100644 --- a/src/mame/includes/midvunit.h +++ b/src/mame/includes/midvunit.h @@ -42,16 +42,16 @@ public: m_nvram(*this, "nvram"), m_ram_base(*this, "ram_base"), m_fastram_base(*this, "fastram_base"), - m_tms32031_control(*this, "tms32031_control"), + m_tms32031_control(*this, "32031_control"), m_midvplus_misc(*this, "midvplus_misc"), - m_videoram(*this, "videoram"), + m_videoram(*this, "videoram", 32), m_textureram(*this, "textureram") { } optional_shared_ptr<UINT32> m_nvram; required_shared_ptr<UINT32> m_ram_base; - required_shared_ptr<UINT32> m_fastram_base; + optional_shared_ptr<UINT32> m_fastram_base; required_shared_ptr<UINT32> m_tms32031_control; - required_shared_ptr<UINT32> m_midvplus_misc; + optional_shared_ptr<UINT32> m_midvplus_misc; required_shared_ptr<UINT16> m_videoram; required_shared_ptr<UINT32> m_textureram; diff --git a/src/mame/includes/midwunit.h b/src/mame/includes/midwunit.h index 68027dd8ff8..e4c1adcb689 100644 --- a/src/mame/includes/midwunit.h +++ b/src/mame/includes/midwunit.h @@ -9,10 +9,11 @@ class midwunit_state : public midtunit_state public: midwunit_state(const machine_config &mconfig, device_type type, const char *tag) : midtunit_state(mconfig, type, tag), - m_nvram(*this, "nvram") { } + m_nvram(*this, "nvram"), + m_decode_memory(*this, "decode_memory", 16) { } required_shared_ptr<UINT16> m_nvram; - UINT8 *m_decode_memory; + required_shared_ptr<UINT8> m_decode_memory; UINT8 m_cmos_write_enable; UINT16 m_iodata[8]; UINT8 m_ioshuffle[16]; diff --git a/src/mame/includes/model2.h b/src/mame/includes/model2.h index eae9d2b89ca..6691e26ea9b 100644 --- a/src/mame/includes/model2.h +++ b/src/mame/includes/model2.h @@ -29,7 +29,7 @@ public: required_shared_ptr<UINT32> m_textureram0; required_shared_ptr<UINT32> m_textureram1; required_shared_ptr<UINT32> m_lumaram; - required_shared_ptr<UINT16> m_soundram; + optional_shared_ptr<UINT16> m_soundram; optional_shared_ptr<UINT32> m_tgp_program; UINT32 m_intreq; diff --git a/src/mame/includes/moo.h b/src/mame/includes/moo.h index de85942c108..e9579ea4071 100644 --- a/src/mame/includes/moo.h +++ b/src/mame/includes/moo.h @@ -13,7 +13,7 @@ public: m_spriteram(*this, "spriteram"){ } /* memory pointers */ - required_shared_ptr<UINT16> m_workram; + optional_shared_ptr<UINT16> m_workram; required_shared_ptr<UINT16> m_spriteram; // UINT16 * m_paletteram; // currently this uses generic palette handling diff --git a/src/mame/includes/mystwarr.h b/src/mame/includes/mystwarr.h index ae4aef8d609..86fd6b5fce6 100644 --- a/src/mame/includes/mystwarr.h +++ b/src/mame/includes/mystwarr.h @@ -22,7 +22,7 @@ public: int m_roz_rombank; tilemap_t *m_ult_936_tilemap; UINT16 m_clip; - required_shared_ptr<UINT16> m_spriteram; + optional_shared_ptr<UINT16> m_spriteram; required_device<cpu_device> m_maincpu; DECLARE_READ16_MEMBER(eeprom_r); diff --git a/src/mame/includes/n8080.h b/src/mame/includes/n8080.h index 63d9118b878..3e28e74da4a 100644 --- a/src/mame/includes/n8080.h +++ b/src/mame/includes/n8080.h @@ -9,7 +9,7 @@ public: /* memory pointers */ required_shared_ptr<UINT8> m_videoram; - required_shared_ptr<UINT8> m_colorram; // for helifire + optional_shared_ptr<UINT8> m_colorram; // for helifire /* video-related */ emu_timer* m_cannon_timer; diff --git a/src/mame/includes/ninjakd2.h b/src/mame/includes/ninjakd2.h index 35b7044ce4f..4e958d79052 100644 --- a/src/mame/includes/ninjakd2.h +++ b/src/mame/includes/ninjakd2.h @@ -11,7 +11,7 @@ public: UINT8 m_omegaf_io_protection[3]; UINT8 m_omegaf_io_protection_input; int m_omegaf_io_protection_tic; - required_shared_ptr<UINT8> m_bg_videoram; + optional_shared_ptr<UINT8> m_bg_videoram; required_shared_ptr<UINT8> m_fg_videoram; int m_next_sprite_overdraw_enabled; int (*m_stencil_compare_function) (UINT16 pal); diff --git a/src/mame/includes/nmk16.h b/src/mame/includes/nmk16.h index ca031674eb8..fa1a1a82de8 100644 --- a/src/mame/includes/nmk16.h +++ b/src/mame/includes/nmk16.h @@ -18,7 +18,7 @@ public: int mask[4*2]; required_shared_ptr<UINT16> m_nmk_bgvideoram0; - required_shared_ptr<UINT16> m_nmk_txvideoram; + optional_shared_ptr<UINT16> m_nmk_txvideoram; required_shared_ptr<UINT16> m_mainram; optional_shared_ptr<UINT16> m_gunnail_scrollram; optional_shared_ptr<UINT8> m_spriteram; diff --git a/src/mame/includes/nova2001.h b/src/mame/includes/nova2001.h index d7ae0747f45..dec827d625f 100644 --- a/src/mame/includes/nova2001.h +++ b/src/mame/includes/nova2001.h @@ -8,11 +8,11 @@ public: m_spriteram(*this, "spriteram"){ } UINT8 m_ninjakun_io_a002_ctrl; - required_shared_ptr<UINT8> m_fg_videoram; + optional_shared_ptr<UINT8> m_fg_videoram; required_shared_ptr<UINT8> m_bg_videoram; tilemap_t *m_bg_tilemap; tilemap_t *m_fg_tilemap; - required_shared_ptr<UINT8> m_spriteram; + optional_shared_ptr<UINT8> m_spriteram; DECLARE_WRITE8_MEMBER(ninjakun_cpu1_io_A002_w); DECLARE_WRITE8_MEMBER(ninjakun_cpu2_io_A002_w); DECLARE_WRITE8_MEMBER(ninjakun_paletteram_w); diff --git a/src/mame/includes/offtwall.h b/src/mame/includes/offtwall.h index 8d5d125015d..d75efe3b530 100644 --- a/src/mame/includes/offtwall.h +++ b/src/mame/includes/offtwall.h @@ -10,10 +10,11 @@ class offtwall_state : public atarigen_state { public: offtwall_state(const machine_config &mconfig, device_type type, const char *tag) - : atarigen_state(mconfig, type, tag) { } + : atarigen_state(mconfig, type, tag), + m_bankrom_base(*this, "bankrom_base") { } UINT16 *m_bankswitch_base; - UINT16 *m_bankrom_base; + required_shared_ptr<UINT16> m_bankrom_base; UINT32 m_bank_offset; UINT16 *m_spritecache_count; diff --git a/src/mame/includes/ojankohs.h b/src/mame/includes/ojankohs.h index 7808c4e788f..1fcf01c15d5 100644 --- a/src/mame/includes/ojankohs.h +++ b/src/mame/includes/ojankohs.h @@ -14,8 +14,8 @@ public: m_paletteram(*this, "paletteram"){ } /* memory pointers */ - required_shared_ptr<UINT8> m_videoram; - required_shared_ptr<UINT8> m_colorram; + optional_shared_ptr<UINT8> m_videoram; + optional_shared_ptr<UINT8> m_colorram; optional_shared_ptr<UINT8> m_paletteram; /* video-related */ diff --git a/src/mame/includes/pktgaldx.h b/src/mame/includes/pktgaldx.h index dff06d35018..c007d8a9cc4 100644 --- a/src/mame/includes/pktgaldx.h +++ b/src/mame/includes/pktgaldx.h @@ -16,9 +16,9 @@ public: m_pktgaldb_sprites(*this, "pktgaldb_spr"){ } /* memory pointers */ - required_shared_ptr<UINT16> m_pf1_rowscroll; - required_shared_ptr<UINT16> m_pf2_rowscroll; - required_shared_ptr<UINT16> m_spriteram; + optional_shared_ptr<UINT16> m_pf1_rowscroll; + optional_shared_ptr<UINT16> m_pf2_rowscroll; + optional_shared_ptr<UINT16> m_spriteram; // UINT16 * paletteram; // currently this uses generic palette handling (in decocomn.c) optional_shared_ptr<UINT16> m_pktgaldb_fgram; diff --git a/src/mame/includes/qix.h b/src/mame/includes/qix.h index e81bffc9421..2bf7dc631f6 100644 --- a/src/mame/includes/qix.h +++ b/src/mame/includes/qix.h @@ -33,13 +33,13 @@ public: m_scanline_latch(*this, "scanline_latch") { } /* machine state */ - required_shared_ptr<UINT8> m_68705_port_out; - required_shared_ptr<UINT8> m_68705_ddr; + optional_shared_ptr<UINT8> m_68705_port_out; + optional_shared_ptr<UINT8> m_68705_ddr; UINT8 m_68705_port_in[3]; UINT8 m_coinctrl; /* video state */ - required_shared_ptr<UINT8> m_videoram; + optional_shared_ptr<UINT8> m_videoram; required_shared_ptr<UINT8> m_videoram_address; optional_shared_ptr<UINT8> m_videoram_mask; required_shared_ptr<UINT8> m_paletteram; diff --git a/src/mame/includes/rainbow.h b/src/mame/includes/rainbow.h index 8e14a709b6f..3ac7f07a897 100644 --- a/src/mame/includes/rainbow.h +++ b/src/mame/includes/rainbow.h @@ -12,7 +12,7 @@ public: m_spriteram(*this, "spriteram"){ } /* memory pointers */ - required_shared_ptr<UINT16> m_spriteram; + optional_shared_ptr<UINT16> m_spriteram; // UINT16 * paletteram; // currently this uses generic palette handling /* video-related */ diff --git a/src/mame/includes/realbrk.h b/src/mame/includes/realbrk.h index 2e878c60b47..26f5f1c39d6 100644 --- a/src/mame/includes/realbrk.h +++ b/src/mame/includes/realbrk.h @@ -18,7 +18,7 @@ public: required_shared_ptr<UINT16> m_vram_1; required_shared_ptr<UINT16> m_vram_2; required_shared_ptr<UINT16> m_vregs; - required_shared_ptr<UINT16> m_dsw_select; + optional_shared_ptr<UINT16> m_dsw_select; optional_shared_ptr<UINT16> m_backup_ram; optional_shared_ptr<UINT16> m_vram_0ras; optional_shared_ptr<UINT16> m_vram_1ras; diff --git a/src/mame/includes/scramble.h b/src/mame/includes/scramble.h index 613bd9b0b92..93a9a37e238 100644 --- a/src/mame/includes/scramble.h +++ b/src/mame/includes/scramble.h @@ -5,9 +5,10 @@ class scramble_state : public galaxold_state { public: scramble_state(const machine_config &mconfig, device_type type, const char *tag) - : galaxold_state(mconfig, type, tag) { } + : galaxold_state(mconfig, type, tag), + m_soundram(*this, "soundram") { } - UINT8 *m_soundram; + required_shared_ptr<UINT8> m_soundram; UINT8 m_cavelon_bank; UINT8 m_security_2B_counter; UINT8 m_xb; diff --git a/src/mame/includes/segas32.h b/src/mame/includes/segas32.h index 2b70d4c41d9..f83e31a4b21 100644 --- a/src/mame/includes/segas32.h +++ b/src/mame/includes/segas32.h @@ -21,13 +21,13 @@ public: m_z80_shared_ram(*this,"z80_shared_ram"), m_ga2_dpram(*this,"ga2_dpram"), m_system32_workram(*this,"workram"), - m_system32_videoram(*this,"videoram"), - m_system32_spriteram(*this,"spriteram"), - m_system32_paletteram(*this,"paletteram") { } + m_system32_videoram(*this,"videoram", 0), + m_system32_spriteram(*this,"spriteram", 0), + m_system32_paletteram(*this,"paletteram", 0) { } required_shared_ptr<UINT8> m_z80_shared_ram; optional_shared_ptr<UINT8> m_ga2_dpram; - required_shared_ptr<UINT16> m_system32_workram; + optional_shared_ptr<UINT16> m_system32_workram; required_shared_ptr<UINT16> m_system32_videoram; required_shared_ptr<UINT16> m_system32_spriteram; diff --git a/src/mame/includes/seta2.h b/src/mame/includes/seta2.h index 41d4711b380..ba15d3271b5 100644 --- a/src/mame/includes/seta2.h +++ b/src/mame/includes/seta2.h @@ -5,8 +5,8 @@ public: : driver_device(mconfig, type, tag), m_maincpu(*this,"maincpu"), m_nvram(*this, "nvram") , - m_spriteram(*this, "spriteram"), - m_vregs(*this, "vregs"), + m_spriteram(*this, "spriteram", 0), + m_vregs(*this, "vregs", 0), m_coldfire_regs(*this, "coldfire_regs"), m_funcube_outputs(*this, "funcube_outputs"), m_funcube_leds(*this, "funcube_leds"){ } diff --git a/src/mame/includes/suna8.h b/src/mame/includes/suna8.h index e90debb8e1e..8a5e2d46613 100644 --- a/src/mame/includes/suna8.h +++ b/src/mame/includes/suna8.h @@ -13,9 +13,9 @@ public: m_wram(*this, "wram"){ } required_device<cpu_device> m_maincpu; - required_shared_ptr<UINT8> m_hardhead_ip; - required_shared_ptr<UINT8> m_spriteram; - required_shared_ptr<UINT8> m_wram; + optional_shared_ptr<UINT8> m_hardhead_ip; + optional_shared_ptr<UINT8> m_spriteram; + optional_shared_ptr<UINT8> m_wram; UINT8 m_rombank; UINT8 m_spritebank; diff --git a/src/mame/includes/system16.h b/src/mame/includes/system16.h index 8842305c48d..4b5be991c07 100644 --- a/src/mame/includes/system16.h +++ b/src/mame/includes/system16.h @@ -16,7 +16,7 @@ public: required_shared_ptr<UINT16> m_textram; optional_shared_ptr<UINT16> m_bg0_tileram; optional_shared_ptr<UINT16> m_bg1_tileram; - required_shared_ptr<UINT16> m_tileram; + optional_shared_ptr<UINT16> m_tileram; optional_shared_ptr<UINT16> m_goldnaxeb2_bgpage; optional_shared_ptr<UINT16> m_goldnaxeb2_fgpage; diff --git a/src/mame/includes/tatsumi.h b/src/mame/includes/tatsumi.h index 84acd9c2f6d..eb718d5e6e0 100644 --- a/src/mame/includes/tatsumi.h +++ b/src/mame/includes/tatsumi.h @@ -22,12 +22,12 @@ public: m_roundup_l_ram(*this, "roundup_l_ram"), m_spriteram(*this, "spriteram") { } - required_shared_ptr<UINT16> m_videoram; - required_shared_ptr<UINT16> m_cyclwarr_cpua_ram; - required_shared_ptr<UINT16> m_cyclwarr_cpub_ram; + optional_shared_ptr<UINT16> m_videoram; + optional_shared_ptr<UINT16> m_cyclwarr_cpua_ram; + optional_shared_ptr<UINT16> m_cyclwarr_cpub_ram; UINT16 m_bigfight_a20000[8]; UINT16 m_bigfight_a60000[2]; - required_shared_ptr<UINT16> m_apache3_g_ram; + optional_shared_ptr<UINT16> m_apache3_g_ram; UINT16 m_bigfight_a40000[2]; UINT8 *m_rom_sprite_lookup1; UINT8 *m_rom_sprite_lookup2; @@ -38,8 +38,8 @@ public: optional_shared_ptr<UINT16> m_roundup5_unknown0; optional_shared_ptr<UINT16> m_roundup5_unknown1; optional_shared_ptr<UINT16> m_roundup5_unknown2; - required_shared_ptr<UINT16> m_68k_ram; - required_shared_ptr<UINT8> m_apache3_z80_ram; + optional_shared_ptr<UINT16> m_68k_ram; + optional_shared_ptr<UINT8> m_apache3_z80_ram; UINT16 m_control_word; UINT16 m_apache3_rotate_ctrl[12]; required_shared_ptr<UINT16> m_sprite_control_ram; diff --git a/src/mame/includes/tmnt.h b/src/mame/includes/tmnt.h index 2b19dd53511..7beea478e7a 100644 --- a/src/mame/includes/tmnt.h +++ b/src/mame/includes/tmnt.h @@ -11,7 +11,7 @@ public: m_tmnt2_1c0800(*this, "tmnt2_1c0800"){ } /* memory pointers */ - required_shared_ptr<UINT16> m_spriteram; + optional_shared_ptr<UINT16> m_spriteram; optional_shared_ptr<UINT16> m_tmnt2_rom; optional_shared_ptr<UINT16> m_sunset_104000; optional_shared_ptr<UINT16> m_tmnt2_1c0800; diff --git a/src/mame/includes/toaplan1.h b/src/mame/includes/toaplan1.h index 5610a367e77..6be545488bc 100644 --- a/src/mame/includes/toaplan1.h +++ b/src/mame/includes/toaplan1.h @@ -18,7 +18,7 @@ public: required_shared_ptr<UINT16> m_colorram1; required_shared_ptr<UINT16> m_colorram2; - required_shared_ptr<UINT8> m_sharedram; + optional_shared_ptr<UINT8> m_sharedram; int m_coin_count; /* coin count increments on startup ? , so dont count it */ int m_intenable; diff --git a/src/mame/includes/tubep.h b/src/mame/includes/tubep.h index 01d11d918a7..8bdfdd7d77f 100644 --- a/src/mame/includes/tubep.h +++ b/src/mame/includes/tubep.h @@ -14,7 +14,7 @@ public: emu_timer *m_interrupt_timer; int m_curr_scanline; required_shared_ptr<UINT8> m_textram; - required_shared_ptr<UINT8> m_backgroundram; + optional_shared_ptr<UINT8> m_backgroundram; required_shared_ptr<UINT8> m_sprite_colorsharedram; optional_shared_ptr<UINT8> m_rjammer_backgroundram; UINT8 *m_spritemap; diff --git a/src/mame/includes/unico.h b/src/mame/includes/unico.h index af28507e1ee..15b9c49dbe6 100644 --- a/src/mame/includes/unico.h +++ b/src/mame/includes/unico.h @@ -7,16 +7,16 @@ public: m_scroll(*this, "scroll"), m_vram32(*this, "vram32"), m_scroll32(*this, "scroll32"), - m_spriteram(*this, "spriteram"){ } + m_spriteram(*this, "spriteram", 0){ } - required_shared_ptr<UINT16> m_vram; - required_shared_ptr<UINT16> m_scroll; + optional_shared_ptr<UINT16> m_vram; + optional_shared_ptr<UINT16> m_scroll; optional_shared_ptr<UINT32> m_vram32; optional_shared_ptr<UINT32> m_scroll32; tilemap_t *m_tilemap[3]; int m_sprites_scrolldx; int m_sprites_scrolldy; - required_shared_ptr<UINT16> m_spriteram; + optional_shared_ptr<UINT16> m_spriteram; DECLARE_WRITE16_MEMBER(zeropnt_sound_bank_w); DECLARE_READ16_MEMBER(unico_gunx_0_msb_r); DECLARE_READ16_MEMBER(unico_guny_0_msb_r); diff --git a/src/mame/includes/wecleman.h b/src/mame/includes/wecleman.h index b97fabf1bb4..41acf8380e4 100644 --- a/src/mame/includes/wecleman.h +++ b/src/mame/includes/wecleman.h @@ -11,10 +11,10 @@ public: m_spriteram(*this, "spriteram"), m_roadram(*this, "roadram"){ } - required_shared_ptr<UINT16> m_videostatus; - required_shared_ptr<UINT16> m_protection_ram; + optional_shared_ptr<UINT16> m_videostatus; + optional_shared_ptr<UINT16> m_protection_ram; required_shared_ptr<UINT16> m_blitter_regs; - required_shared_ptr<UINT16> m_pageram; + optional_shared_ptr<UINT16> m_pageram; optional_shared_ptr<UINT16> m_txtram; required_shared_ptr<UINT16> m_spriteram; required_shared_ptr<UINT16> m_roadram; diff --git a/src/mame/machine/opwolf.c b/src/mame/machine/opwolf.c index 0c976230748..2d925b8be5f 100644 --- a/src/mame/machine/opwolf.c +++ b/src/mame/machine/opwolf.c @@ -718,8 +718,7 @@ void opwolf_cchip_init( running_machine &machine ) { opwolf_state *state = machine.driver_data<opwolf_state>(); - //TODO:FIX - //state->m_cchip_ram = auto_alloc_array_clear(machine, UINT8, 0x400 * 8); + state->m_cchip_ram.allocate(0x400 * 8); state->save_item(NAME(state->m_current_bank)); state->save_item(NAME(state->m_current_cmd)); @@ -732,7 +731,6 @@ void opwolf_cchip_init( running_machine &machine ) state->save_item(NAME(state->m_cchip_coins)); state->save_item(NAME(state->m_cchip_coins_for_credit)); state->save_item(NAME(state->m_cchip_credits_for_coin)); - //state->save_pointer(NAME(state->m_cchip_ram), 0x400 * 8); state->m_current_bank = 0; state->m_current_cmd = 0; diff --git a/src/mame/video/fastfred.c b/src/mame/video/fastfred.c index 1ffd97d9f4a..64bfe1e5ba8 100644 --- a/src/mame/video/fastfred.c +++ b/src/mame/video/fastfred.c @@ -239,7 +239,7 @@ static void draw_sprites(running_machine &machine, bitmap_ind16 &bitmap, const r fastfred_state *state = machine.driver_data<fastfred_state>(); int offs; - for (offs = state->m_spriteram_size - 4; offs >= 0; offs -= 4) + for (offs = state->m_spriteram.bytes() - 4; offs >= 0; offs -= 4) { UINT8 code,sx,sy; int flipx,flipy; diff --git a/src/mame/video/galpanic.c b/src/mame/video/galpanic.c index 70f3946aed7..f9dd8b944f8 100644 --- a/src/mame/video/galpanic.c +++ b/src/mame/video/galpanic.c @@ -53,7 +53,7 @@ static void comad_draw_sprites(running_machine &machine, bitmap_ind16 &bitmap, c int offs; int sx=0, sy=0; - for (offs = 0;offs < state->m_spriteram_size/2;offs += 4) + for (offs = 0;offs < state->m_spriteram.bytes()/2;offs += 4) { int code,color,flipx,flipy; @@ -89,7 +89,7 @@ static void draw_fgbitmap(running_machine &machine, bitmap_ind16 &bitmap, const galpanic_state *state = machine.driver_data<galpanic_state>(); int offs; - for (offs = 0;offs < state->m_fgvideoram_size/2;offs++) + for (offs = 0;offs < state->m_fgvideoram.bytes()/2;offs++) { int sx,sy,color; diff --git a/src/mame/video/suna8.c b/src/mame/video/suna8.c index 5350a910e07..dcbb086c552 100644 --- a/src/mame/video/suna8.c +++ b/src/mame/video/suna8.c @@ -170,8 +170,7 @@ static void suna8_vh_start_common(running_machine &machine, int dim) if (!(state->m_text_dim > 0)) { state->m_generic_paletteram_8.allocate(0x200 * 2); - //TODO:FIX - //state->m_spriteram = auto_alloc_array(machine, UINT8, 0x2000 * 2); + state->m_spriteram.allocate(0x2000 * 2); state->m_spritebank = 0; state->m_palettebank = 0; } diff --git a/src/mame/video/zaxxon.c b/src/mame/video/zaxxon.c index ac6d649d7f7..4bcb164d77e 100644 --- a/src/mame/video/zaxxon.c +++ b/src/mame/video/zaxxon.c @@ -165,14 +165,12 @@ VIDEO_START( congo ) zaxxon_state *state = machine.driver_data<zaxxon_state>(); /* allocate our own spriteram since it is not accessible by the main CPU */ - //TODO:TIX - //state->m_spriteram = auto_alloc_array(machine, UINT8, 0x100); + state->m_spriteram.allocate(0x100); /* register for save states */ state->save_item(NAME(state->m_congo_fg_bank)); state->save_item(NAME(state->m_congo_color_bank)); state->save_item(NAME(state->m_congo_custom)); - //state->save_pointer(NAME(state->m_spriteram), 0x100); video_start_common(machine, congo_get_fg_tile_info); } |
