mirror of
https://github.com/holub/mame
synced 2025-10-09 17:53:01 +03:00
removed some more dead code + cleaned up some function names
to clarify their usage. nw.
This commit is contained in:
parent
00580e6211
commit
74dbffb0ba
@ -57,54 +57,6 @@ Bugs:
|
||||
|
||||
#define MASTER_CLOCK 53693100
|
||||
|
||||
// Interrupt handler - from drivers/segasyse.c
|
||||
#if 0
|
||||
static UINT8 segae_vintpending;
|
||||
static UINT8 segae_hintpending;
|
||||
static UINT8 *segae_vdp_regs[]; /* pointer to vdp's registers */
|
||||
|
||||
static UINT8 hintcount; /* line interrupt counter, decreased each scanline */
|
||||
|
||||
static INTERRUPT_GEN (megaplay_bios_irq)
|
||||
{
|
||||
int sline;
|
||||
sline = device->m_screen->vpos();
|
||||
|
||||
if (sline ==0) {
|
||||
hintcount = segae_vdp_regs[0][10];
|
||||
}
|
||||
|
||||
if (sline <= 192) {
|
||||
// if (sline != 192) segae_drawscanline(sline,1,1);
|
||||
|
||||
if (sline == 192)
|
||||
segae_vintpending = 1;
|
||||
|
||||
if (hintcount == 0) {
|
||||
hintcount = segae_vdp_regs[0][10];
|
||||
segae_hintpending = 1;
|
||||
|
||||
if ((segae_vdp_regs[0][0] & 0x10)) {
|
||||
device->execute().set_input_line(0, HOLD_LINE);
|
||||
return;
|
||||
}
|
||||
|
||||
} else {
|
||||
hintcount--;
|
||||
}
|
||||
}
|
||||
|
||||
if (sline > 192) {
|
||||
hintcount = segae_vdp_regs[0][10];
|
||||
|
||||
if ( (sline<0xe0) && (segae_vintpending) ) {
|
||||
device->execute().set_input_line(0, HOLD_LINE);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
static INPUT_PORTS_START ( megaplay )
|
||||
PORT_INCLUDE( md_common )
|
||||
|
||||
@ -600,14 +552,12 @@ VIDEO_START_MEMBER(mplay_state,megplay)
|
||||
{
|
||||
//printf("megplay vs\n");
|
||||
VIDEO_START_CALL_MEMBER(megadriv);
|
||||
// VIDEO_START_CALL_MEMBER(megaplay_normal);
|
||||
}
|
||||
|
||||
UINT32 mplay_state::screen_update_megplay(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
//printf("megplay vu\n");
|
||||
screen_update_megadriv(screen,bitmap,cliprect);
|
||||
// screen_update_megaplay_normal(screen,bitmap,cliprect);
|
||||
screen_update_megaplay_bios(screen,bitmap,cliprect);
|
||||
return 0;
|
||||
}
|
||||
@ -871,8 +821,7 @@ DRIVER_INIT_MEMBER(mplay_state,megaplay)
|
||||
/* instead of a RAM mirror the 68k sees the extra ram of the 2nd z80 too */
|
||||
m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xa02000, 0xa03fff, read16_delegate(FUNC(mplay_state::megadriv_68k_read_z80_extra_ram),this), write16_delegate(FUNC(mplay_state::megadriv_68k_write_z80_extra_ram),this));
|
||||
|
||||
init_megatech_bios();
|
||||
|
||||
init_megaplay_legacy_overlay();
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -273,16 +273,14 @@ TIMER_CALLBACK_MEMBER(mtech_state::megatech_z80_stop_state )
|
||||
machine().device("ymsnd")->reset();
|
||||
|
||||
megadriv_stop_scanline_timer();// stop the scanline timer for the genesis vdp... it can be restarted in video eof when needed
|
||||
segae_md_sms_stop_scanline_timer();// stop the scanline timer for the sms vdp
|
||||
megatech_sms_stop_scanline_timer();// stop the scanline timer for the sms vdp
|
||||
|
||||
|
||||
/* if the regions exist we're fine */
|
||||
if (game_region)
|
||||
{
|
||||
{
|
||||
timer_set(attotime::zero, TIMER_Z80_RUN_STATE, param);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* no cart.. */
|
||||
@ -324,13 +322,11 @@ WRITE8_MEMBER(mtech_state::bios_ctrl_w )
|
||||
{
|
||||
if (offset == 1)
|
||||
{
|
||||
output_set_value("Alarm_sound", data>>7 & 0x01);
|
||||
output_set_value("Alarm_sound", BIT(data, 7));
|
||||
m_bios_ctrl_inputs = data & 0x04; // Genesis/SMS input ports disable bit
|
||||
}
|
||||
else if (offset == 2)
|
||||
{
|
||||
output_set_value("Flash_screen", data>>1 & 0x01);
|
||||
}
|
||||
output_set_value("Flash_screen", BIT(data, 1));
|
||||
|
||||
m_bios_ctrl[offset] = data;
|
||||
}
|
||||
@ -351,14 +347,9 @@ WRITE8_MEMBER(mtech_state::megatech_z80_write_68k_banked_data )
|
||||
space68k.write_byte(m_mt_bank_addr + offset,data);
|
||||
}
|
||||
|
||||
void mtech_state::megatech_z80_bank_w(UINT16 data)
|
||||
{
|
||||
m_mt_bank_addr = ((m_mt_bank_addr >> 1) | (data << 23)) & 0xff8000;
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(mtech_state::mt_z80_bank_w )
|
||||
{
|
||||
megatech_z80_bank_w(data & 1);
|
||||
m_mt_bank_addr = ((m_mt_bank_addr >> 1) | (data << 23)) & 0xff8000;
|
||||
}
|
||||
|
||||
READ8_MEMBER(mtech_state::megatech_banked_ram_r )
|
||||
@ -452,7 +443,7 @@ UINT32 mtech_state::screen_update_mtnew(screen_device &screen, bitmap_rgb32 &bit
|
||||
if (!m_current_game_is_sms)
|
||||
screen_update_megadriv(screen, bitmap, cliprect);
|
||||
else
|
||||
screen_update_megatech_md_sms(screen, bitmap, cliprect);
|
||||
screen_update_megatech_sms(screen, bitmap, cliprect);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -335,10 +335,9 @@ public:
|
||||
|
||||
};
|
||||
|
||||
UINT32 screen_update_megatech_bios(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
|
||||
UINT32 screen_update_megaplay_bios(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
|
||||
UINT32 screen_update_megatech_md_sms(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
|
||||
void init_megatech_bios();
|
||||
UINT32 screen_update_megatech_sms(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
|
||||
void init_megaplay_legacy_overlay();
|
||||
DECLARE_MACHINE_RESET(megatech_bios);
|
||||
DECLARE_MACHINE_RESET(megatech_md_sms);
|
||||
void screen_eof_megatech_bios(screen_device &screen, bool state);
|
||||
@ -351,7 +350,7 @@ public:
|
||||
DECLARE_WRITE8_MEMBER( sms_vdp_ctrl_w );
|
||||
|
||||
void init_for_megadrive();
|
||||
void segae_md_sms_stop_scanline_timer();
|
||||
void megatech_sms_stop_scanline_timer();
|
||||
void megatech_set_genz80_as_sms_standard_map(const char* tag);
|
||||
private:
|
||||
|
||||
@ -516,7 +515,6 @@ public:
|
||||
DECLARE_WRITE8_MEMBER( bios_ctrl_w );
|
||||
DECLARE_READ8_MEMBER( megatech_z80_read_68k_banked_data );
|
||||
DECLARE_WRITE8_MEMBER( megatech_z80_write_68k_banked_data );
|
||||
void megatech_z80_bank_w(UINT16 data);
|
||||
DECLARE_WRITE8_MEMBER( mt_z80_bank_w );
|
||||
DECLARE_READ8_MEMBER( megatech_banked_ram_r );
|
||||
DECLARE_WRITE8_MEMBER( megatech_banked_ram_w );
|
||||
|
@ -320,7 +320,7 @@ void *segamsys_state::start_vdp(int type)
|
||||
}
|
||||
|
||||
/* stop timer and clear ram.. used on megatech when we switch between genesis and sms mode */
|
||||
void segamsys_state::segae_md_sms_stop_scanline_timer()
|
||||
void segamsys_state::megatech_sms_stop_scanline_timer()
|
||||
{
|
||||
md_sms_vdp->sms_scanline_timer->adjust(attotime::never);
|
||||
memset(md_sms_vdp->vram,0x00,0x4000);
|
||||
@ -974,7 +974,7 @@ void segamsys_state::screen_eof_megatech_bios(screen_device &screen, bool state)
|
||||
end_of_frame(screen, vdp1);
|
||||
}
|
||||
|
||||
UINT32 segamsys_state::screen_update_megatech_md_sms(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
|
||||
UINT32 segamsys_state::screen_update_megatech_sms(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
int x,y;
|
||||
|
||||
@ -993,24 +993,6 @@ UINT32 segamsys_state::screen_update_megatech_md_sms(screen_device &screen, bitm
|
||||
}
|
||||
|
||||
|
||||
UINT32 segamsys_state::screen_update_megatech_bios(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
int x,y;
|
||||
|
||||
for (y=0;y<224;y++)
|
||||
{
|
||||
UINT32* lineptr = &bitmap.pix32(y);
|
||||
UINT32* srcptr = &vdp1->r_bitmap->pix32(y);
|
||||
|
||||
for (x=0;x<256;x++)
|
||||
{
|
||||
lineptr[x]=srcptr[x];
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
UINT32 segamsys_state::screen_update_megaplay_bios(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
int x,y;
|
||||
@ -1045,7 +1027,7 @@ void segamsys_state::init_for_megadrive()
|
||||
|
||||
|
||||
|
||||
void segamsys_state::init_megatech_bios()
|
||||
void segamsys_state::init_megaplay_legacy_overlay()
|
||||
{
|
||||
vdp1 = (struct sms_vdp *)start_vdp(SMS2_VDP);
|
||||
vdp1->set_irq = segamsys_state::sms_vdp_cpu2_irq_callback;
|
||||
|
Loading…
Reference in New Issue
Block a user