removed some driver_data<> calls (nw)

This commit is contained in:
smf- 2016-11-03 19:20:47 +00:00
parent 87490d4815
commit dbb95a051b
13 changed files with 93 additions and 106 deletions

View File

@ -1406,11 +1406,6 @@ WRITE32_MEMBER(model2_state::model2o_luma_w)
}
}
WRITE32_MEMBER(model2_state::model2_3d_zclip_w)
{
model2_3d_set_zclip( machine(), data & 0xFF );
}
/* Top Skater reads here and discards the result */
READ8_MEMBER(model2_state::tgpid_r)
{

View File

@ -733,7 +733,6 @@ JP4/5/6/7 - Jumpers to configure ROMs
#include "emu.h"
#include "cpu/m68000/m68000.h"
#include "cpu/powerpc/ppc.h"
#include "machine/eepromser.h"
#include "machine/53c810.h"
#include "machine/nvram.h"
@ -952,20 +951,19 @@ WRITE64_MEMBER(model3_state::mpc105_reg_w)
m_mpc105_regs[(offset*2)+1] = (uint32_t)data;
}
static void mpc105_init(running_machine &machine)
void model3_state::mpc105_init()
{
model3_state *state = machine.driver_data<model3_state>();
/* set reset values */
memset(state->m_mpc105_regs, 0, sizeof(state->m_mpc105_regs));
state->m_mpc105_regs[0x00/4] = 0x00011057; /* Vendor ID & Device ID */
state->m_mpc105_regs[0x04/4] = 0x00800006; /* PCI Command & PCI Status */
state->m_mpc105_regs[0x08/4] = 0x00060000; /* Class code */
state->m_mpc105_regs[0xa8/4] = 0x0010ff00; /* Processor interface configuration 1 */
state->m_mpc105_regs[0xac/4] = 0x060c000c; /* Processor interface configuration 2 */
state->m_mpc105_regs[0xb8/4] = 0x04000000;
state->m_mpc105_regs[0xf0/4] = 0x0000ff02; /* Memory control configuration 1 */
state->m_mpc105_regs[0xf4/4] = 0x00030000; /* Memory control configuration 2 */
state->m_mpc105_regs[0xfc/4] = 0x00000010; /* Memory control configuration 4 */
memset(m_mpc105_regs, 0, sizeof(m_mpc105_regs));
m_mpc105_regs[0x00/4] = 0x00011057; /* Vendor ID & Device ID */
m_mpc105_regs[0x04/4] = 0x00800006; /* PCI Command & PCI Status */
m_mpc105_regs[0x08/4] = 0x00060000; /* Class code */
m_mpc105_regs[0xa8/4] = 0x0010ff00; /* Processor interface configuration 1 */
m_mpc105_regs[0xac/4] = 0x060c000c; /* Processor interface configuration 2 */
m_mpc105_regs[0xb8/4] = 0x04000000;
m_mpc105_regs[0xf0/4] = 0x0000ff02; /* Memory control configuration 1 */
m_mpc105_regs[0xf4/4] = 0x00030000; /* Memory control configuration 2 */
m_mpc105_regs[0xfc/4] = 0x00000010; /* Memory control configuration 4 */
}
/*****************************************************************************/
@ -1044,25 +1042,24 @@ WRITE64_MEMBER(model3_state::mpc106_reg_w)
m_mpc106_regs[(offset*2)+1] = (uint32_t)data;
}
static void mpc106_init(running_machine &machine)
void model3_state::mpc106_init()
{
model3_state *state = machine.driver_data<model3_state>();
/* set reset values */
memset(state->m_mpc106_regs, 0, sizeof(state->m_mpc106_regs));
state->m_mpc106_regs[0x00/4] = 0x00021057; /* Vendor ID & Device ID */
state->m_mpc106_regs[0x04/4] = 0x00800006; /* PCI Command & PCI Status */
state->m_mpc106_regs[0x08/4] = 0x00060000; /* Class code */
state->m_mpc106_regs[0x0c/4] = 0x00000800; /* Cache line size */
state->m_mpc106_regs[0x70/4] = 0x00cd0000; /* Output driver control */
state->m_mpc106_regs[0xa8/4] = 0x0010ff00; /* Processor interface configuration 1 */
state->m_mpc106_regs[0xac/4] = 0x060c000c; /* Processor interface configuration 2 */
state->m_mpc106_regs[0xb8/4] = 0x04000000;
state->m_mpc106_regs[0xc0/4] = 0x00000100; /* Error enabling 1 */
state->m_mpc106_regs[0xe0/4] = 0x00420fff; /* Emulation support configuration 1 */
state->m_mpc106_regs[0xe8/4] = 0x00200000; /* Emulation support configuration 2 */
state->m_mpc106_regs[0xf0/4] = 0x0000ff02; /* Memory control configuration 1 */
state->m_mpc106_regs[0xf4/4] = 0x00030000; /* Memory control configuration 2 */
state->m_mpc106_regs[0xfc/4] = 0x00000010; /* Memory control configuration 4 */
memset(m_mpc106_regs, 0, sizeof(m_mpc106_regs));
m_mpc106_regs[0x00/4] = 0x00021057; /* Vendor ID & Device ID */
m_mpc106_regs[0x04/4] = 0x00800006; /* PCI Command & PCI Status */
m_mpc106_regs[0x08/4] = 0x00060000; /* Class code */
m_mpc106_regs[0x0c/4] = 0x00000800; /* Cache line size */
m_mpc106_regs[0x70/4] = 0x00cd0000; /* Output driver control */
m_mpc106_regs[0xa8/4] = 0x0010ff00; /* Processor interface configuration 1 */
m_mpc106_regs[0xac/4] = 0x060c000c; /* Processor interface configuration 2 */
m_mpc106_regs[0xb8/4] = 0x04000000;
m_mpc106_regs[0xc0/4] = 0x00000100; /* Error enabling 1 */
m_mpc106_regs[0xe0/4] = 0x00420fff; /* Emulation support configuration 1 */
m_mpc106_regs[0xe8/4] = 0x00200000; /* Emulation support configuration 2 */
m_mpc106_regs[0xf0/4] = 0x0000ff02; /* Memory control configuration 1 */
m_mpc106_regs[0xf4/4] = 0x00030000; /* Memory control configuration 2 */
m_mpc106_regs[0xfc/4] = 0x00000010; /* Memory control configuration 4 */
}
/*****************************************************************************/
@ -1260,14 +1257,13 @@ LSI53C810_DMA_CB(model3_state::real3d_dma_callback)
/*****************************************************************************/
static void configure_fast_ram(running_machine &machine)
void model3_state::configure_fast_ram()
{
model3_state *state = machine.driver_data<model3_state>();
/* set conservative DRC options */
machine.device<ppc_device>("maincpu")->ppcdrc_set_options(PPCDRC_COMPATIBLE_OPTIONS);
m_maincpu->ppcdrc_set_options(PPCDRC_COMPATIBLE_OPTIONS);
/* configure fast RAM regions for DRC */
machine.device<ppc_device>("maincpu")->ppcdrc_add_fastram(0x00000000, 0x007fffff, false, state->m_work_ram);
m_maincpu->ppcdrc_add_fastram(0x00000000, 0x007fffff, false, m_work_ram);
}
TIMER_CALLBACK_MEMBER(model3_state::model3_sound_timer_tick)
@ -1285,28 +1281,28 @@ TIMER_CALLBACK_MEMBER(model3_state::real3d_dma_timer_callback)
MACHINE_START_MEMBER(model3_state,model3_10)
{
configure_fast_ram(machine());
configure_fast_ram();
m_sound_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(model3_state::model3_sound_timer_tick),this));
m_real3d_dma_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(model3_state::real3d_dma_timer_callback),this));
}
MACHINE_START_MEMBER(model3_state,model3_15)
{
configure_fast_ram(machine());
configure_fast_ram();
m_sound_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(model3_state::model3_sound_timer_tick),this));
m_real3d_dma_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(model3_state::real3d_dma_timer_callback),this));
}
MACHINE_START_MEMBER(model3_state,model3_20)
{
configure_fast_ram(machine());
configure_fast_ram();
m_sound_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(model3_state::model3_sound_timer_tick),this));
m_real3d_dma_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(model3_state::real3d_dma_timer_callback),this));
}
MACHINE_START_MEMBER(model3_state,model3_21)
{
configure_fast_ram(machine());
configure_fast_ram();
m_sound_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(model3_state::model3_sound_timer_tick),this));
m_real3d_dma_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(model3_state::real3d_dma_timer_callback),this));
@ -1338,17 +1334,17 @@ void model3_state::model3_init(int step)
{
if (m_step15_with_mpc106)
{
mpc106_init(machine());
mpc106_init();
}
else
{
mpc105_init(machine());
mpc105_init();
}
m_real3d_device_id = 0x16c311db; /* PCI Vendor ID (11db = SEGA), Device ID (16c3 = 315-5827) */
}
else
{
mpc106_init(machine());
mpc106_init();
// some step 2+ games need the older PCI ID (obvious symptom:
// vbl is enabled briefly then disabled so the game hangs)
if (m_step20_with_old_real3d)
@ -5740,18 +5736,17 @@ static MACHINE_CONFIG_DERIVED( model3_21_5881, model3_21 )
MACHINE_CONFIG_END
static void interleave_vroms(running_machine &machine)
void model3_state::interleave_vroms()
{
model3_state *state = machine.driver_data<model3_state>();
int start;
int i,j,x;
uint16_t *vrom1 = (uint16_t*)state->memregion("user3")->base();
uint16_t *vrom2 = (uint16_t*)state->memregion("user4")->base();
int vrom_length = state->memregion("user3")->bytes();
uint16_t *vrom1 = (uint16_t*)memregion("user3")->base();
uint16_t *vrom2 = (uint16_t*)memregion("user4")->base();
int vrom_length = memregion("user3")->bytes();
uint16_t *vrom;
state->m_vrom = std::make_unique<uint32_t[]>(0x4000000/4);
vrom = (uint16_t *)state->m_vrom.get();
m_vrom = std::make_unique<uint32_t[]>(0x4000000/4);
vrom = (uint16_t *)m_vrom.get();
if( vrom_length <= 0x1000000 ) {
start = 0x1000000;
@ -5783,7 +5778,7 @@ DRIVER_INIT_MEMBER(model3_state, genprot)
DRIVER_INIT_MEMBER(model3_state,model3_10)
{
interleave_vroms(machine());
interleave_vroms();
m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xc0000000, 0xc00000ff, read64_delegate(FUNC(model3_state::scsi_r),this), write64_delegate(FUNC(model3_state::scsi_w),this));
@ -5796,7 +5791,7 @@ DRIVER_INIT_MEMBER(model3_state,model3_10)
DRIVER_INIT_MEMBER(model3_state,model3_15)
{
interleave_vroms(machine());
interleave_vroms();
m_maincpu->space(AS_PROGRAM).install_read_bank(0xff000000, 0xff7fffff, "bank1" );
m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xf0800cf8, 0xf0800cff, read64_delegate(FUNC(model3_state::mpc105_addr_r),this), write64_delegate(FUNC(model3_state::mpc105_addr_w),this));
@ -5806,7 +5801,7 @@ DRIVER_INIT_MEMBER(model3_state,model3_15)
DRIVER_INIT_MEMBER(model3_state,model3_20)
{
interleave_vroms(machine());
interleave_vroms();
m_maincpu->space(AS_PROGRAM).install_read_bank(0xff000000, 0xff7fffff, "bank1" );
m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xc2000000, 0xc20000ff, read64_delegate(FUNC(model3_state::real3d_dma_r),this), write64_delegate(FUNC(model3_state::real3d_dma_w),this));
@ -5875,7 +5870,7 @@ DRIVER_INIT_MEMBER(model3_state,vs215)
{
m_step15_with_mpc106 = true;
interleave_vroms(machine());
interleave_vroms();
m_maincpu->space(AS_PROGRAM).install_read_bank(0xff000000, 0xff7fffff, "bank1" );
m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xf9000000, 0xf90000ff, read64_delegate(FUNC(model3_state::scsi_r),this), write64_delegate(FUNC(model3_state::scsi_w),this));
@ -5896,7 +5891,7 @@ DRIVER_INIT_MEMBER(model3_state,vs29815)
rom[(0x6028ec^4)/4] = 0x60000000;
rom[(0x60290c^4)/4] = 0x60000000;
interleave_vroms(machine());
interleave_vroms();
m_maincpu->space(AS_PROGRAM).install_read_bank(0xff000000, 0xff7fffff, "bank1" );
m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xf9000000, 0xf90000ff, read64_delegate(FUNC(model3_state::scsi_r),this), write64_delegate(FUNC(model3_state::scsi_w),this));
@ -5912,7 +5907,7 @@ DRIVER_INIT_MEMBER(model3_state,bass)
{
m_step15_with_mpc106 = true;
interleave_vroms(machine());
interleave_vroms();
m_maincpu->space(AS_PROGRAM).install_read_bank(0xff000000, 0xff7fffff, "bank1" );
m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xf9000000, 0xf90000ff, read64_delegate(FUNC(model3_state::scsi_r),this), write64_delegate(FUNC(model3_state::scsi_w),this));
@ -5926,7 +5921,7 @@ DRIVER_INIT_MEMBER(model3_state,bass)
DRIVER_INIT_MEMBER(model3_state,getbass)
{
interleave_vroms(machine());
interleave_vroms();
m_maincpu->space(AS_PROGRAM).install_read_bank(0xff000000, 0xff7fffff, "bank1" );
m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xf9000000, 0xf90000ff, read64_delegate(FUNC(model3_state::scsi_r),this), write64_delegate(FUNC(model3_state::scsi_w),this));

View File

@ -118,6 +118,7 @@ public:
DECLARE_WRITE8_MEMBER(quizpun2_soundlatch_w);
TILE_GET_INFO_MEMBER(get_bg_tile_info);
TILE_GET_INFO_MEMBER(get_fg_tile_info);
void log_protection(address_space &space, const char *warning);
virtual void machine_reset() override;
virtual void video_start() override;
uint32_t screen_update_quizpun2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
@ -213,11 +214,10 @@ void quizpun2_state::machine_reset()
prot.addr = 0;
}
static void log_protection( address_space &space, const char *warning )
void quizpun2_state::log_protection( address_space &space, const char *warning )
{
quizpun2_state *state = space.machine().driver_data<quizpun2_state>();
struct prot_t &prot = state->m_prot;
state->logerror("%04x: protection - %s (state %x, wait %x, param %02x, cmd %02x, addr %02x)\n", space.device().safe_pc(), warning,
struct prot_t &prot = m_prot;
logerror("%04x: protection - %s (state %x, wait %x, param %02x, cmd %02x, addr %02x)\n", space.device().safe_pc(), warning,
prot.state,
prot.wait_param,
prot.param,

View File

@ -1386,18 +1386,17 @@ Note: on screen copyright is (c)1998 Coinmaster.
/*------------------------------
update timer
------------------------------*/
static void uPD71054_update_timer( running_machine &machine, device_t *cpu, int no )
void seta_state::uPD71054_update_timer(device_t *cpu, int no)
{
seta_state *state = machine.driver_data<seta_state>();
uPD71054_state *uPD71054 = &state->m_uPD71054;
uPD71054_state *uPD71054 = &m_uPD71054;
uint16_t max = uPD71054->max[no]&0xffff;
if( max != 0 ) {
attotime period = attotime::from_hz(machine.device("maincpu")->unscaled_clock()) * (16 * max);
attotime period = attotime::from_hz(m_maincpu->unscaled_clock()) * (16 * max);
uPD71054->timer[no]->adjust( period, no );
} else {
uPD71054->timer[no]->adjust( attotime::never, no);
state->logerror( "CPU #0 PC %06X: uPD71054 error, timer %d duration is 0\n",
logerror( "CPU #0 PC %06X: uPD71054 error, timer %d duration is 0\n",
(cpu != nullptr) ? cpu->safe_pc() : -1, no );
}
}
@ -1410,7 +1409,7 @@ static void uPD71054_update_timer( running_machine &machine, device_t *cpu, int
TIMER_CALLBACK_MEMBER(seta_state::uPD71054_timer_callback)
{
m_maincpu->set_input_line(4, HOLD_LINE );
uPD71054_update_timer( machine(), nullptr, param );
uPD71054_update_timer( nullptr, param );
}
@ -1459,7 +1458,7 @@ WRITE16_MEMBER(seta_state::timer_regs_w)
uPD71054->max[offset] = (uPD71054->max[offset]&0x00ff)+(data<<8);
}
if( uPD71054->max[offset] != 0 ) {
uPD71054_update_timer( machine(), &space.device(), offset );
uPD71054_update_timer( &space.device(), offset );
}
break;
case 0x0003:

View File

@ -425,17 +425,15 @@ command 1 - stop?
*/
static void tumbleb2_playmusic( device_t *device )
void tumbleb_state::tumbleb2_playmusic(okim6295_device *oki)
{
tumbleb_state *state = device->machine().driver_data<tumbleb_state>();
okim6295_device *oki = downcast<okim6295_device *>(device);
int status = oki->read_status();
if (state->m_music_is_playing)
if (m_music_is_playing)
{
if (!BIT(status, 3))
{
oki->write_command(0x80 | state->m_music_command);
oki->write_command(0x80 | m_music_command);
oki->write_command(0x00 | 0x82);
}
}

View File

@ -128,6 +128,7 @@ public:
DECLARE_DRIVER_INIT(vcombat);
DECLARE_MACHINE_RESET(vcombat);
DECLARE_MACHINE_RESET(shadfgtr);
uint32_t update_screen(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect, int index);
uint32_t screen_update_vcombat_main(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
uint32_t screen_update_vcombat_aux(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
required_device<cpu_device> m_maincpu;
@ -137,14 +138,13 @@ public:
required_device<dac_word_interface> m_dac;
};
static uint32_t update_screen(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect, int index)
uint32_t vcombat_state::update_screen(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect, int index)
{
vcombat_state *state = screen.machine().driver_data<vcombat_state>();
int y;
const rgb_t *const pens = state->m_tlc34076->get_pens();
const rgb_t *const pens = m_tlc34076->get_pens();
uint16_t *m68k_buf = state->m_m68k_framebuffer[(*state->m_framebuffer_ctrl & 0x20) ? 1 : 0].get();
uint16_t *i860_buf = state->m_i860_framebuffer[index][0].get();
uint16_t *m68k_buf = m_m68k_framebuffer[(*m_framebuffer_ctrl & 0x20) ? 1 : 0].get();
uint16_t *i860_buf = m_i860_framebuffer[index][0].get();
/* TODO: It looks like the leftmost chunk of the ground should really be on the right side? */
/* But the i860 draws the background correctly, so it may be an original game issue. */

View File

@ -165,6 +165,8 @@ public:
DECLARE_WRITE32_MEMBER(model2_5881prot_w);
int first_read;
void model2_3d_init(uint16_t *texture_rom);
void geo_init(uint32_t *polygon_rom);
DECLARE_READ32_MEMBER(maxx_r);
DECLARE_WRITE32_MEMBER(mode_w);
DECLARE_WRITE32_MEMBER(model2o_tex_w0);
@ -396,8 +398,3 @@ struct quad_m2
uint16_t texheader[4];
uint8_t luma;
};
/*----------- defined in video/model2.c -----------*/
void model2_3d_set_zclip( running_machine &machine, uint8_t clip );

View File

@ -1,5 +1,6 @@
// license:BSD-3-Clause
// copyright-holders:R. Belmont, Ville Linde
#include "cpu/powerpc/ppc.h"
#include "video/poly.h"
#include "bus/scsi/scsi.h"
#include "machine/53c810.h"
@ -72,7 +73,7 @@ public:
m_step20_with_old_real3d = false;
}
required_device<cpu_device> m_maincpu;
required_device<ppc_device> m_maincpu;
optional_device<lsi53c810_device> m_lsi53c810;
required_device<cpu_device> m_audiocpu;
required_device<scsp_device> m_scsp1;
@ -198,12 +199,14 @@ public:
DECLARE_WRITE64_MEMBER(mpc105_data_w);
DECLARE_READ64_MEMBER(mpc105_reg_r);
DECLARE_WRITE64_MEMBER(mpc105_reg_w);
void mpc105_init();
DECLARE_READ64_MEMBER(mpc106_addr_r);
DECLARE_WRITE64_MEMBER(mpc106_addr_w);
DECLARE_READ64_MEMBER(mpc106_data_r);
DECLARE_WRITE64_MEMBER(mpc106_data_w);
DECLARE_READ64_MEMBER(mpc106_reg_r);
DECLARE_WRITE64_MEMBER(mpc106_reg_w);
void mpc106_init();
DECLARE_READ64_MEMBER(scsi_r);
DECLARE_WRITE64_MEMBER(scsi_w);
DECLARE_READ64_MEMBER(real3d_dma_r);
@ -222,6 +225,8 @@ public:
DECLARE_WRITE16_MEMBER(model3snd_ctrl);
uint32_t pci_device_get_reg();
void pci_device_set_reg(uint32_t value);
void configure_fast_ram();
void interleave_vroms();
DECLARE_DRIVER_INIT(genprot);
DECLARE_DRIVER_INIT(lemans24);
DECLARE_DRIVER_INIT(vs298);

View File

@ -250,6 +250,7 @@ public:
uint32_t screen_update_seta_layers(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
void screen_eof_seta_buffer_sprites(screen_device &screen, bool state);
void screen_eof_setaroul(screen_device &screen, bool state);
void uPD71054_update_timer(device_t *cpu, int no);
INTERRUPT_GEN_MEMBER(wrofaero_interrupt);
TIMER_CALLBACK_MEMBER(uPD71054_timer_callback);
TIMER_CALLBACK_MEMBER(keroppi_prize_hop_callback);

View File

@ -211,6 +211,7 @@ public:
DECLARE_WRITE8_MEMBER( ti83pse_ctimer3_count_w );
void ti8x_update_bank(address_space &space, uint8_t bank, uint8_t *base, uint8_t page, bool is_ram);
void update_ti85_memory ();
void update_ti83p_memory ();
void update_ti83pse_memory ();

View File

@ -128,6 +128,7 @@ public:
void tumbleb_draw_common(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int pf1x_offs, int pf1y_offs, int pf2x_offs, int pf2y_offs);
void tumbleb2_set_music_bank( int bank );
void tumbleb2_play_sound( okim6295_device *oki, int data );
void tumbleb2_playmusic(okim6295_device *oki);
void process_tumbleb2_music_command( okim6295_device *oki, int data );
void tumblepb_gfx_rearrange(int rgn);
void suprtrio_decrypt_code();

View File

@ -134,12 +134,11 @@ void ti85_state::device_timer(emu_timer &timer, device_timer_id id, int param, v
}
}
inline void ti8x_update_bank(address_space &space, uint8_t bank, uint8_t *base, uint8_t page, bool is_ram)
void ti85_state::ti8x_update_bank(address_space &space, uint8_t bank, uint8_t *base, uint8_t page, bool is_ram)
{
ti85_state *state = space.machine().driver_data<ti85_state>();
static const char *const tag[] = {"bank1", "bank2", "bank3", "bank4"};
state->membank(tag[bank&3])->set_base(base + (0x4000 * page));
membank(tag[bank&3])->set_base(base + (0x4000 * page));
if (is_ram)
space.install_write_bank(bank * 0x4000, bank * 0x4000 + 0x3fff, tag[bank&3]);

View File

@ -275,13 +275,11 @@ struct raster_state
*
*******************************************/
static void model2_3d_init( running_machine &machine, uint16_t *texture_rom )
void model2_state::model2_3d_init( uint16_t *texture_rom )
{
model2_state *state = machine.driver_data<model2_state>();
m_raster = auto_alloc_clear(machine(), <raster_state>());
state->m_raster = auto_alloc_clear( machine, <raster_state>() );
state->m_raster->texture_rom = texture_rom;
m_raster->texture_rom = texture_rom;
}
/*******************************************
@ -290,10 +288,9 @@ static void model2_3d_init( running_machine &machine, uint16_t *texture_rom )
*
*******************************************/
void model2_3d_set_zclip( running_machine &machine, uint8_t clip )
WRITE32_MEMBER(model2_state::model2_3d_zclip_w)
{
model2_state *state = machine.driver_data<model2_state>();
state->m_raster->master_z_clip = clip;
m_raster->master_z_clip = data;
}
/*******************************************
@ -1194,14 +1191,13 @@ struct geo_state
*
*******************************************/
static void geo_init( running_machine &machine, uint32_t *polygon_rom )
void model2_state::geo_init( uint32_t *polygon_rom )
{
model2_state *state = machine.driver_data<model2_state>();
state->m_geo = auto_alloc_clear(machine, <geo_state>());
state->m_geo->state = state;
m_geo = auto_alloc_clear(machine(), <geo_state>());
m_geo->state = this;
state->m_geo->raster = state->m_raster;
state->m_geo->polygon_rom = polygon_rom;
m_geo->raster = m_raster;
m_geo->polygon_rom = polygon_rom;
}
/*******************************************
@ -2595,10 +2591,10 @@ VIDEO_START_MEMBER(model2_state,model2)
m_poly = auto_alloc(machine(), model2_renderer(*this));
/* initialize the hardware rasterizer */
model2_3d_init( machine(), (uint16_t*)memregion("user3")->base() );
model2_3d_init( (uint16_t*)memregion("user3")->base() );
/* initialize the geometry engine */
geo_init( machine(), (uint32_t*)memregion("user2")->base() );
geo_init( (uint32_t*)memregion("user2")->base() );
/* init various video-related pointers */
m_palram = make_unique_clear<uint16_t[]>(0x2000);