mirror of
https://github.com/holub/mame
synced 2025-06-01 18:41:47 +03:00
Just a code reorganization, nothing here should result in any functional change. From Haze (nw)
This commit is contained in:
parent
8805247d21
commit
7bfa2c6e08
@ -223,7 +223,7 @@ static ADDRESS_MAP_START( puckpkmn_map, AS_PROGRAM, 16, md_boot_state )
|
|||||||
AM_RANGE(0xa04000, 0xa04003) AM_DEVREADWRITE8_LEGACY("ymsnd", megadriv_68k_YM2612_read, megadriv_68k_YM2612_write, 0xffff)
|
AM_RANGE(0xa04000, 0xa04003) AM_DEVREADWRITE8_LEGACY("ymsnd", megadriv_68k_YM2612_read, megadriv_68k_YM2612_write, 0xffff)
|
||||||
AM_RANGE(0xc00000, 0xc0001f) AM_DEVREADWRITE("gen_vdp", sega_genesis_vdp_device, megadriv_vdp_r,megadriv_vdp_w)
|
AM_RANGE(0xc00000, 0xc0001f) AM_DEVREADWRITE("gen_vdp", sega_genesis_vdp_device, megadriv_vdp_r,megadriv_vdp_w)
|
||||||
|
|
||||||
AM_RANGE(0xe00000, 0xe0ffff) AM_RAM AM_MIRROR(0x1f0000) AM_BASE_LEGACY(&megadrive_ram)
|
AM_RANGE(0xe00000, 0xe0ffff) AM_RAM AM_MIRROR(0x1f0000)
|
||||||
|
|
||||||
/* Unknown reads/writes: */
|
/* Unknown reads/writes: */
|
||||||
AM_RANGE(0xa00000, 0xa00551) AM_WRITENOP /* ? */
|
AM_RANGE(0xa00000, 0xa00551) AM_WRITENOP /* ? */
|
||||||
@ -248,17 +248,13 @@ static ADDRESS_MAP_START( jzth_map, AS_PROGRAM, 16, md_boot_state )
|
|||||||
AM_RANGE(0xc00000, 0xc0001f) AM_DEVREADWRITE("gen_vdp", sega_genesis_vdp_device, megadriv_vdp_r,megadriv_vdp_w)
|
AM_RANGE(0xc00000, 0xc0001f) AM_DEVREADWRITE("gen_vdp", sega_genesis_vdp_device, megadriv_vdp_r,megadriv_vdp_w)
|
||||||
|
|
||||||
|
|
||||||
AM_RANGE(0xe00000, 0xe0ffff) AM_RAM AM_MIRROR(0x1f0000) AM_BASE_LEGACY(&megadrive_ram)
|
AM_RANGE(0xe00000, 0xe0ffff) AM_RAM AM_MIRROR(0x1f0000)
|
||||||
|
|
||||||
AM_RANGE(0xa00000, 0xa00551) AM_NOP
|
AM_RANGE(0xa00000, 0xa00551) AM_NOP
|
||||||
|
|
||||||
AM_RANGE(0xA11100, 0xA11101) AM_NOP
|
AM_RANGE(0xA11100, 0xA11101) AM_NOP
|
||||||
|
|
||||||
AM_RANGE(0x710000, 0x710001) AM_READWRITE(bl_710000_r,bl_710000_w) // protection, will erase the VDP address causing writes to 0 unless this returns 0xe
|
AM_RANGE(0x710000, 0x710001) AM_READWRITE(bl_710000_r,bl_710000_w) // protection, will erase the VDP address causing writes to 0 unless this returns 0xe
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ADDRESS_MAP_END
|
ADDRESS_MAP_END
|
||||||
|
|
||||||
static READ16_HANDLER(puckpkmna_70001c_r)
|
static READ16_HANDLER(puckpkmna_70001c_r)
|
||||||
|
@ -113,10 +113,10 @@ static MACHINE_START( segac2 )
|
|||||||
static MACHINE_RESET( segac2 )
|
static MACHINE_RESET( segac2 )
|
||||||
{
|
{
|
||||||
segac2_state *state = machine.driver_data<segac2_state>();
|
segac2_state *state = machine.driver_data<segac2_state>();
|
||||||
megadrive_ram = reinterpret_cast<UINT16 *>(state->memshare("nvram")->ptr());
|
megadriv_framerate = 60;
|
||||||
|
megadriv_scanline_timer = machine.device<timer_device>("md_scan_timer");
|
||||||
/* set up interrupts and such */
|
megadriv_scanline_timer->adjust(attotime::zero);
|
||||||
MACHINE_RESET_CALL(megadriv);
|
megadriv_reset_vdp(machine);
|
||||||
|
|
||||||
/* determine how many sound banks */
|
/* determine how many sound banks */
|
||||||
state->m_sound_banks = 0;
|
state->m_sound_banks = 0;
|
||||||
@ -1789,7 +1789,6 @@ void segac2_state::segac2_common_init(running_machine& machine, int (*func)(int
|
|||||||
state->m_prot_func = func;
|
state->m_prot_func = func;
|
||||||
|
|
||||||
genvdp_use_cram = 0;
|
genvdp_use_cram = 0;
|
||||||
genesis_other_hacks = 0;
|
|
||||||
|
|
||||||
if (upd != NULL)
|
if (upd != NULL)
|
||||||
machine.device("maincpu")->memory().space(AS_PROGRAM)->install_legacy_write_handler(*upd, 0x880000, 0x880001, 0, 0x13fefe, FUNC(segac2_upd7759_w));
|
machine.device("maincpu")->memory().space(AS_PROGRAM)->install_legacy_write_handler(*upd, 0x880000, 0x880001, 0, 0x13fefe, FUNC(segac2_upd7759_w));
|
||||||
|
@ -51,7 +51,6 @@ MACHINE_CONFIG_EXTERN( md_bootleg ); // for topshoot.c & hshavoc.c
|
|||||||
|
|
||||||
extern UINT16* megadriv_backupram;
|
extern UINT16* megadriv_backupram;
|
||||||
extern int megadriv_backupram_length;
|
extern int megadriv_backupram_length;
|
||||||
extern UINT16* megadrive_ram;
|
|
||||||
|
|
||||||
extern UINT8 megatech_bios_port_cc_dc_r(running_machine &machine, int offset, int ctrl);
|
extern UINT8 megatech_bios_port_cc_dc_r(running_machine &machine, int offset, int ctrl);
|
||||||
extern void megadriv_stop_scanline_timer(void);
|
extern void megadriv_stop_scanline_timer(void);
|
||||||
@ -81,30 +80,10 @@ SCREEN_UPDATE_RGB32( megadriv );
|
|||||||
SCREEN_VBLANK( megadriv );
|
SCREEN_VBLANK( megadriv );
|
||||||
|
|
||||||
|
|
||||||
struct genesis_z80_vars
|
|
||||||
{
|
|
||||||
int z80_is_reset;
|
|
||||||
int z80_has_bus;
|
|
||||||
UINT32 z80_bank_addr;
|
|
||||||
UINT8* z80_prgram;
|
|
||||||
};
|
|
||||||
|
|
||||||
extern genesis_z80_vars genz80;
|
|
||||||
|
|
||||||
extern UINT16* megadrive_vdp_palette_lookup;
|
|
||||||
extern UINT16* megadrive_vdp_palette_lookup_sprite; // for C2
|
|
||||||
extern UINT16* megadrive_vdp_palette_lookup_shadow;
|
|
||||||
extern UINT16* megadrive_vdp_palette_lookup_highlight;
|
|
||||||
|
|
||||||
extern int segac2_bg_pal_lookup[4];
|
|
||||||
extern int segac2_sp_pal_lookup[4];
|
|
||||||
|
|
||||||
extern int genvdp_use_cram;
|
|
||||||
extern int genesis_other_hacks;
|
|
||||||
|
|
||||||
extern int megadrive_6buttons_pad;
|
extern int megadrive_6buttons_pad;
|
||||||
extern int megadrive_region_export;
|
|
||||||
extern int megadrive_region_pal;
|
|
||||||
|
|
||||||
/* Megaplay - Megatech specific */
|
/* Megaplay - Megatech specific */
|
||||||
/* It might be possible to move the following structs in the drivers */
|
/* It might be possible to move the following structs in the drivers */
|
||||||
@ -432,9 +411,6 @@ extern cpu_device *_32x_master_cpu;
|
|||||||
extern cpu_device *_32x_slave_cpu;
|
extern cpu_device *_32x_slave_cpu;
|
||||||
|
|
||||||
// called from out main scanline timers...
|
// called from out main scanline timers...
|
||||||
extern void _32x_scanline_cb0(running_machine& machine);
|
|
||||||
extern void _32x_scanline_cb1(void);
|
|
||||||
extern void _32x_check_framebuffer_swap(void);
|
|
||||||
|
|
||||||
extern int _32x_fifo_available_callback(device_t *device, UINT32 src, UINT32 dst, UINT32 data, int size);
|
extern int _32x_fifo_available_callback(device_t *device, UINT32 src, UINT32 dst, UINT32 data, int size);
|
||||||
extern MACHINE_RESET( _32x );
|
extern MACHINE_RESET( _32x );
|
||||||
@ -442,11 +418,7 @@ ADDRESS_MAP_EXTERN( sh2_main_map, driver_device );
|
|||||||
ADDRESS_MAP_EXTERN( sh2_slave_map, driver_device );
|
ADDRESS_MAP_EXTERN( sh2_slave_map, driver_device );
|
||||||
extern emu_timer *_32x_pwm_timer;
|
extern emu_timer *_32x_pwm_timer;
|
||||||
extern TIMER_CALLBACK( _32x_pwm_callback );
|
extern TIMER_CALLBACK( _32x_pwm_callback );
|
||||||
UINT32* _32x_render_videobuffer_to_screenbuffer_helper(running_machine &machine, int scanline);
|
|
||||||
|
|
||||||
extern int _32x_displaymode;
|
|
||||||
extern int _32x_videopriority;
|
|
||||||
extern int _32x_hcount_compare_val;
|
|
||||||
extern int megadrive_vblank_flag;
|
extern int megadrive_vblank_flag;
|
||||||
extern int genesis_scanline_counter;
|
extern int genesis_scanline_counter;
|
||||||
|
|
||||||
@ -479,23 +451,24 @@ MACHINE_START( md_sram );
|
|||||||
extern WRITE16_HANDLER( jcart_ctrl_w );
|
extern WRITE16_HANDLER( jcart_ctrl_w );
|
||||||
extern READ16_HANDLER( jcart_ctrl_r );
|
extern READ16_HANDLER( jcart_ctrl_r );
|
||||||
|
|
||||||
/* vdp / video */
|
/* machine/megavdp.c */
|
||||||
extern UINT16 (*vdp_get_word_from_68k_mem)(running_machine &machine, UINT32 source);
|
extern UINT16 (*vdp_get_word_from_68k_mem)(running_machine &machine, UINT32 source);
|
||||||
extern UINT16 vdp_get_word_from_68k_mem_default(running_machine &machine, UINT32 source);
|
extern UINT16 vdp_get_word_from_68k_mem_default(running_machine &machine, UINT32 source);
|
||||||
extern int megadrive_visible_scanlines;
|
|
||||||
extern int megadrive_irq6_scanline;
|
|
||||||
extern int megadrive_z80irq_scanline;
|
|
||||||
extern int megadrive_imode;
|
|
||||||
extern int megadriv_framerate;
|
extern int megadriv_framerate;
|
||||||
extern int megadrive_total_scanlines;
|
extern int megadrive_total_scanlines;
|
||||||
extern int megadrive_vblank_flag;
|
extern int megadrive_vblank_flag;
|
||||||
extern int genesis_scanline_counter;
|
extern int genesis_scanline_counter;
|
||||||
extern timer_device* megadriv_render_timer;
|
extern UINT16* megadrive_vdp_palette_lookup;
|
||||||
|
extern UINT16* megadrive_vdp_palette_lookup_sprite; // for C2
|
||||||
|
extern UINT16* megadrive_vdp_palette_lookup_shadow;
|
||||||
|
extern UINT16* megadrive_vdp_palette_lookup_highlight;
|
||||||
|
extern int segac2_bg_pal_lookup[4];
|
||||||
|
extern int segac2_sp_pal_lookup[4];
|
||||||
|
extern int genvdp_use_cram;
|
||||||
|
extern int megadrive_region_export;
|
||||||
|
extern int megadrive_region_pal;
|
||||||
|
|
||||||
|
/* machine/megadriv.c */
|
||||||
extern TIMER_DEVICE_CALLBACK( megadriv_scanline_timer_callback );
|
extern TIMER_DEVICE_CALLBACK( megadriv_scanline_timer_callback );
|
||||||
extern TIMER_DEVICE_CALLBACK( megadriv_render_timer_callback );
|
|
||||||
extern TIMER_DEVICE_CALLBACK( irq6_on_callback );
|
|
||||||
extern int megadrive_irq6_pending;
|
|
||||||
extern int megadrive_irq4_pending;
|
|
||||||
extern timer_device* megadriv_scanline_timer;
|
extern timer_device* megadriv_scanline_timer;
|
||||||
extern timer_device* irq4_on_timer;
|
|
||||||
extern void megadriv_reset_vdp(running_machine &machine);
|
extern void megadriv_reset_vdp(running_machine &machine);
|
||||||
|
@ -56,7 +56,15 @@ static cpu_device *_genesis_snd_z80_cpu;
|
|||||||
int genesis_other_hacks = 0; // misc hacks
|
int genesis_other_hacks = 0; // misc hacks
|
||||||
|
|
||||||
timer_device* megadriv_scanline_timer;
|
timer_device* megadriv_scanline_timer;
|
||||||
|
UINT16* megadrive_ram = NULL;
|
||||||
|
|
||||||
|
struct genesis_z80_vars
|
||||||
|
{
|
||||||
|
int z80_is_reset;
|
||||||
|
int z80_has_bus;
|
||||||
|
UINT32 z80_bank_addr;
|
||||||
|
UINT8* z80_prgram;
|
||||||
|
};
|
||||||
|
|
||||||
genesis_z80_vars genz80;
|
genesis_z80_vars genz80;
|
||||||
|
|
||||||
@ -956,9 +964,6 @@ SCREEN_UPDATE_RGB32(megadriv)
|
|||||||
|
|
||||||
/*****************************************************************************************/
|
/*****************************************************************************************/
|
||||||
|
|
||||||
static int hazemdchoice_megadrive_region_export;
|
|
||||||
static int hazemdchoice_megadrive_region_pal;
|
|
||||||
static int hazemdchoice_megadriv_framerate;
|
|
||||||
|
|
||||||
MACHINE_START( megadriv )
|
MACHINE_START( megadriv )
|
||||||
{
|
{
|
||||||
@ -971,8 +976,6 @@ MACHINE_RESET( megadriv )
|
|||||||
/* default state of z80 = reset, with bus */
|
/* default state of z80 = reset, with bus */
|
||||||
mame_printf_debug("Resetting Megadrive / Genesis\n");
|
mame_printf_debug("Resetting Megadrive / Genesis\n");
|
||||||
|
|
||||||
megadriv_framerate = hazemdchoice_megadriv_framerate;
|
|
||||||
|
|
||||||
if (machine.device("genesis_snd_z80") != NULL)
|
if (machine.device("genesis_snd_z80") != NULL)
|
||||||
{
|
{
|
||||||
genz80.z80_is_reset = 1;
|
genz80.z80_is_reset = 1;
|
||||||
@ -993,7 +996,7 @@ MACHINE_RESET( megadriv )
|
|||||||
{
|
{
|
||||||
// set_refresh_rate(megadriv_framerate);
|
// set_refresh_rate(megadriv_framerate);
|
||||||
// machine.device("maincpu")->set_clock_scale(0.9950f); /* Fatal Rewind is very fussy... (and doesn't work now anyway, so don't bother with this) */
|
// machine.device("maincpu")->set_clock_scale(0.9950f); /* Fatal Rewind is very fussy... (and doesn't work now anyway, so don't bother with this) */
|
||||||
|
if (megadrive_ram)
|
||||||
memset(megadrive_ram,0x00,0x10000);
|
memset(megadrive_ram,0x00,0x10000);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1091,6 +1094,23 @@ void genesis_vdp_lv4irqline_callback_genesis_68k(running_machine &machine, bool
|
|||||||
cputag_set_input_line(machine, "maincpu", 4, CLEAR_LINE);
|
cputag_set_input_line(machine, "maincpu", 4, CLEAR_LINE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Callback when the 68k takes an IRQ */
|
||||||
|
static IRQ_CALLBACK(genesis_int_callback)
|
||||||
|
{
|
||||||
|
md_base_state *state = device->machine().driver_data<md_base_state>();
|
||||||
|
|
||||||
|
if (irqline==4)
|
||||||
|
{
|
||||||
|
state->m_vdp->vdp_clear_irq4_pending();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (irqline==6)
|
||||||
|
{
|
||||||
|
state->m_vdp->vdp_clear_irq6_pending();
|
||||||
|
}
|
||||||
|
|
||||||
|
return (0x60+irqline*4)/4; // vector address
|
||||||
|
}
|
||||||
|
|
||||||
MACHINE_CONFIG_FRAGMENT( megadriv_timers )
|
MACHINE_CONFIG_FRAGMENT( megadriv_timers )
|
||||||
MCFG_TIMER_ADD("md_scan_timer", megadriv_scanline_timer_callback)
|
MCFG_TIMER_ADD("md_scan_timer", megadriv_scanline_timer_callback)
|
||||||
@ -1376,22 +1396,7 @@ MACHINE_CONFIG_DERIVED( genesis_32x_scd, genesis_32x )
|
|||||||
MACHINE_CONFIG_END
|
MACHINE_CONFIG_END
|
||||||
|
|
||||||
|
|
||||||
/* Callback when the genesis enters interrupt code */
|
|
||||||
static IRQ_CALLBACK(genesis_int_callback)
|
|
||||||
{
|
|
||||||
if (irqline==4)
|
|
||||||
{
|
|
||||||
megadrive_irq4_pending = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (irqline==6)
|
|
||||||
{
|
|
||||||
megadrive_irq6_pending = 0;
|
|
||||||
// mame_printf_debug("clear pending!\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
return (0x60+irqline*4)/4; // vector address
|
|
||||||
}
|
|
||||||
|
|
||||||
static int megadriv_tas_callback(device_t *device)
|
static int megadriv_tas_callback(device_t *device)
|
||||||
{
|
{
|
||||||
@ -1513,9 +1518,7 @@ DRIVER_INIT_MEMBER(md_base_state,megadriv_c2)
|
|||||||
genesis_other_hacks = 0;
|
genesis_other_hacks = 0;
|
||||||
|
|
||||||
megadriv_init_common(machine());
|
megadriv_init_common(machine());
|
||||||
hazemdchoice_megadrive_region_export = 1;
|
megadriv_framerate = 60;
|
||||||
hazemdchoice_megadrive_region_pal = 0;
|
|
||||||
hazemdchoice_megadriv_framerate = 60;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1526,9 +1529,7 @@ DRIVER_INIT_MEMBER(md_base_state,megadriv)
|
|||||||
genesis_other_hacks = 1;
|
genesis_other_hacks = 1;
|
||||||
|
|
||||||
megadriv_init_common(machine());
|
megadriv_init_common(machine());
|
||||||
hazemdchoice_megadrive_region_export = 1;
|
megadriv_framerate = 60;
|
||||||
hazemdchoice_megadrive_region_pal = 0;
|
|
||||||
hazemdchoice_megadriv_framerate = 60;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DRIVER_INIT_MEMBER(md_base_state,megadrij)
|
DRIVER_INIT_MEMBER(md_base_state,megadrij)
|
||||||
@ -1537,9 +1538,7 @@ DRIVER_INIT_MEMBER(md_base_state,megadrij)
|
|||||||
genesis_other_hacks = 1;
|
genesis_other_hacks = 1;
|
||||||
|
|
||||||
megadriv_init_common(machine());
|
megadriv_init_common(machine());
|
||||||
hazemdchoice_megadrive_region_export = 0;
|
megadriv_framerate = 60;
|
||||||
hazemdchoice_megadrive_region_pal = 0;
|
|
||||||
hazemdchoice_megadriv_framerate = 60;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DRIVER_INIT_MEMBER(md_base_state,megadrie)
|
DRIVER_INIT_MEMBER(md_base_state,megadrie)
|
||||||
@ -1548,9 +1547,7 @@ DRIVER_INIT_MEMBER(md_base_state,megadrie)
|
|||||||
genesis_other_hacks = 1;
|
genesis_other_hacks = 1;
|
||||||
|
|
||||||
megadriv_init_common(machine());
|
megadriv_init_common(machine());
|
||||||
hazemdchoice_megadrive_region_export = 1;
|
megadriv_framerate = 50;
|
||||||
hazemdchoice_megadrive_region_pal = 1;
|
|
||||||
hazemdchoice_megadriv_framerate = 50;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DRIVER_INIT_MEMBER(md_base_state,mpnew)
|
DRIVER_INIT_MEMBER(md_base_state,mpnew)
|
||||||
|
@ -7,10 +7,6 @@
|
|||||||
|
|
||||||
#include "sound/sn76496.h"
|
#include "sound/sn76496.h"
|
||||||
|
|
||||||
extern int megadrive_imode;
|
|
||||||
extern int megadrive_total_scanlines;
|
|
||||||
extern int megadrive_visible_scanlines;
|
|
||||||
extern int megadrive_irq6_scanline;
|
|
||||||
extern cpu_device *_svp_cpu;
|
extern cpu_device *_svp_cpu;
|
||||||
extern int segacd_wordram_mapped;
|
extern int segacd_wordram_mapped;
|
||||||
extern timer_device* megadriv_scanline_timer;
|
extern timer_device* megadriv_scanline_timer;
|
||||||
@ -29,16 +25,10 @@ extern int _32x_is_connected;
|
|||||||
|
|
||||||
|
|
||||||
/* external gunk still has dependencies on these */
|
/* external gunk still has dependencies on these */
|
||||||
|
|
||||||
int megadrive_visible_scanlines;
|
|
||||||
int megadrive_irq6_scanline;
|
|
||||||
int megadrive_z80irq_scanline;
|
|
||||||
int megadriv_framerate;
|
int megadriv_framerate;
|
||||||
int megadrive_total_scanlines;
|
int megadrive_total_scanlines;
|
||||||
int megadrive_vblank_flag = 0;
|
int megadrive_vblank_flag = 0;
|
||||||
int genesis_scanline_counter = 0;
|
int genesis_scanline_counter = 0;
|
||||||
int megadrive_irq6_pending = 0;
|
|
||||||
int megadrive_irq4_pending = 0;
|
|
||||||
|
|
||||||
int segac2_bg_pal_lookup[4];
|
int segac2_bg_pal_lookup[4];
|
||||||
int segac2_sp_pal_lookup[4];
|
int segac2_sp_pal_lookup[4];
|
||||||
@ -50,8 +40,6 @@ UINT16* megadrive_vdp_palette_lookup;
|
|||||||
UINT16* megadrive_vdp_palette_lookup_sprite; // for C2
|
UINT16* megadrive_vdp_palette_lookup_sprite; // for C2
|
||||||
UINT16* megadrive_vdp_palette_lookup_shadow;
|
UINT16* megadrive_vdp_palette_lookup_shadow;
|
||||||
UINT16* megadrive_vdp_palette_lookup_highlight;
|
UINT16* megadrive_vdp_palette_lookup_highlight;
|
||||||
UINT16* megadrive_ram;
|
|
||||||
|
|
||||||
|
|
||||||
int megadrive_region_export;
|
int megadrive_region_export;
|
||||||
int megadrive_region_pal;
|
int megadrive_region_pal;
|
||||||
@ -172,8 +160,11 @@ void sega_genesis_vdp_device::device_start()
|
|||||||
save_item(NAME(m_imode_odd_frame));
|
save_item(NAME(m_imode_odd_frame));
|
||||||
save_item(NAME(m_sprite_collision));
|
save_item(NAME(m_sprite_collision));
|
||||||
save_item(NAME(megadrive_imode));
|
save_item(NAME(megadrive_imode));
|
||||||
|
save_item(NAME(megadrive_irq6_pending));
|
||||||
|
save_item(NAME(megadrive_irq4_pending));
|
||||||
|
save_item(NAME(megadrive_visible_scanlines));
|
||||||
|
save_item(NAME(megadrive_irq6_scanline));
|
||||||
|
save_item(NAME(megadrive_z80irq_scanline));
|
||||||
|
|
||||||
m_sprite_renderline = auto_alloc_array(machine(), UINT8, 1024);
|
m_sprite_renderline = auto_alloc_array(machine(), UINT8, 1024);
|
||||||
m_highpri_renderline = auto_alloc_array(machine(), UINT8, 320);
|
m_highpri_renderline = auto_alloc_array(machine(), UINT8, 320);
|
||||||
@ -200,6 +191,8 @@ void sega_genesis_vdp_device::device_reset()
|
|||||||
m_imode_odd_frame = 0;
|
m_imode_odd_frame = 0;
|
||||||
m_sprite_collision = 0;
|
m_sprite_collision = 0;
|
||||||
megadrive_imode = 0;
|
megadrive_imode = 0;
|
||||||
|
megadrive_irq6_pending = 0;
|
||||||
|
megadrive_irq4_pending = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void sega_genesis_vdp_device::device_reset_old()
|
void sega_genesis_vdp_device::device_reset_old()
|
||||||
|
@ -165,6 +165,9 @@ public:
|
|||||||
void vdp_handle_irq4_on_timer_callback(running_machine &machine, int param);
|
void vdp_handle_irq4_on_timer_callback(running_machine &machine, int param);
|
||||||
void vdp_handle_vblank(screen_device &screen);
|
void vdp_handle_vblank(screen_device &screen);
|
||||||
void device_reset_old();
|
void device_reset_old();
|
||||||
|
void vdp_clear_irq6_pending(void) { megadrive_irq6_pending = 0; };
|
||||||
|
void vdp_clear_irq4_pending(void) { megadrive_irq4_pending = 0; };
|
||||||
|
|
||||||
|
|
||||||
bitmap_ind16* m_render_bitmap;
|
bitmap_ind16* m_render_bitmap;
|
||||||
|
|
||||||
@ -189,9 +192,17 @@ private:
|
|||||||
int m_irq4counter;
|
int m_irq4counter;
|
||||||
int m_imode_odd_frame;
|
int m_imode_odd_frame;
|
||||||
int m_sprite_collision;
|
int m_sprite_collision;
|
||||||
|
int megadrive_irq6_pending;
|
||||||
|
int megadrive_irq4_pending;
|
||||||
|
|
||||||
int megadrive_imode;
|
int megadrive_imode;
|
||||||
|
|
||||||
|
|
||||||
|
int megadrive_visible_scanlines;
|
||||||
|
int megadrive_irq6_scanline;
|
||||||
|
int megadrive_z80irq_scanline;
|
||||||
|
|
||||||
|
|
||||||
UINT16* m_vdp_regs;
|
UINT16* m_vdp_regs;
|
||||||
UINT16* m_vram;
|
UINT16* m_vram;
|
||||||
UINT16* m_cram;
|
UINT16* m_cram;
|
||||||
|
Loading…
Reference in New Issue
Block a user