mirror of
https://github.com/holub/mame
synced 2025-05-22 13:48:55 +03:00
segac2 updates - breaks ribbit for now. this isn't really ready yet, but since the c2 stuff broke anyway I'm sending it.
This commit is contained in:
parent
1a720bdf32
commit
095f32a199
@ -53,6 +53,7 @@ Known Non-Issues (confirmed on Real Genesis)
|
|||||||
#include "cpu/m68000/m68000.h"
|
#include "cpu/m68000/m68000.h"
|
||||||
#include "megadriv.h"
|
#include "megadriv.h"
|
||||||
|
|
||||||
|
|
||||||
#define MEGADRIV_VDP_VRAM(address) megadrive_vdp_vram[(address)&0x7fff]
|
#define MEGADRIV_VDP_VRAM(address) megadrive_vdp_vram[(address)&0x7fff]
|
||||||
|
|
||||||
/* the same on all systems? */
|
/* the same on all systems? */
|
||||||
@ -71,14 +72,21 @@ static int megadrive_vblank_flag = 0;
|
|||||||
static int megadrive_irq6_pending = 0;
|
static int megadrive_irq6_pending = 0;
|
||||||
static int megadrive_irq4_pending = 0;
|
static int megadrive_irq4_pending = 0;
|
||||||
|
|
||||||
|
// hacks for C2
|
||||||
|
int genvdp_use_cram = 1; // c2 uses it's own palette ram
|
||||||
|
int genesis_has_z80 = 1; // c2 doesn't have a z80..
|
||||||
|
int genesis_always_irq6 = 0; // c2 never enables the irq6, different source??
|
||||||
|
int genesis_other_hacks = 1; // misc hacks
|
||||||
|
|
||||||
INLINE UINT16 get_hposition(void);
|
INLINE UINT16 get_hposition(void);
|
||||||
|
|
||||||
static UINT8* sprite_renderline;
|
static UINT8* sprite_renderline;
|
||||||
static UINT8* highpri_renderline;
|
static UINT8* highpri_renderline;
|
||||||
static UINT16* video_renderline;
|
static UINT32* video_renderline;
|
||||||
static UINT16* megadrive_vdp_palette_lookup;
|
UINT16* megadrive_vdp_palette_lookup;
|
||||||
static UINT16* megadrive_vdp_palette_lookup_shadow;
|
UINT16* megadrive_vdp_palette_lookup_sprite; // for C2
|
||||||
static UINT16* megadrive_vdp_palette_lookup_highlight;
|
UINT16* megadrive_vdp_palette_lookup_shadow;
|
||||||
|
UINT16* megadrive_vdp_palette_lookup_highlight;
|
||||||
UINT16* megadrive_ram;
|
UINT16* megadrive_ram;
|
||||||
static UINT8 megadrive_vram_fill_pending = 0;
|
static UINT8 megadrive_vram_fill_pending = 0;
|
||||||
static UINT16 megadrive_vram_fill_length = 0;
|
static UINT16 megadrive_vram_fill_length = 0;
|
||||||
@ -376,7 +384,7 @@ static void write_cram_value(running_machine *machine, int offset, int data)
|
|||||||
megadrive_vdp_cram[offset] = data;
|
megadrive_vdp_cram[offset] = data;
|
||||||
|
|
||||||
//logerror("Wrote to CRAM addr %04x data %04x\n",megadrive_vdp_address&0xfffe,megadrive_vdp_cram[megadrive_vdp_address>>1]);
|
//logerror("Wrote to CRAM addr %04x data %04x\n",megadrive_vdp_address&0xfffe,megadrive_vdp_cram[megadrive_vdp_address>>1]);
|
||||||
|
if (genvdp_use_cram)
|
||||||
{
|
{
|
||||||
int r,g,b;
|
int r,g,b;
|
||||||
r = ((data >> 1)&0x07);
|
r = ((data >> 1)&0x07);
|
||||||
@ -384,9 +392,9 @@ static void write_cram_value(running_machine *machine, int offset, int data)
|
|||||||
b = ((data >> 9)&0x07);
|
b = ((data >> 9)&0x07);
|
||||||
palette_set_color_rgb(machine,offset,pal3bit(r),pal3bit(g),pal3bit(b));
|
palette_set_color_rgb(machine,offset,pal3bit(r),pal3bit(g),pal3bit(b));
|
||||||
megadrive_vdp_palette_lookup[offset] = (b<<2) | (g<<7) | (r<<12);
|
megadrive_vdp_palette_lookup[offset] = (b<<2) | (g<<7) | (r<<12);
|
||||||
|
megadrive_vdp_palette_lookup_sprite[offset] = (b<<2) | (g<<7) | (r<<12);
|
||||||
megadrive_vdp_palette_lookup_shadow[offset] = (b<<1) | (g<<6) | (r<<11);
|
megadrive_vdp_palette_lookup_shadow[offset] = (b<<1) | (g<<6) | (r<<11);
|
||||||
megadrive_vdp_palette_lookup_highlight[offset] = ((b|0x08)<<1) | ((g|0x08)<<6) | ((r|0x08)<<11);
|
megadrive_vdp_palette_lookup_highlight[offset] = ((b|0x08)<<1) | ((g|0x08)<<6) | ((r|0x08)<<11);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -530,7 +538,7 @@ static void megadrive_vdp_set_register(running_machine *machine, int regnum, UIN
|
|||||||
{
|
{
|
||||||
if (megadrive_irq6_pending)
|
if (megadrive_irq6_pending)
|
||||||
{
|
{
|
||||||
if (MEGADRIVE_REG01_IRQ6_ENABLE)
|
if (MEGADRIVE_REG01_IRQ6_ENABLE )
|
||||||
cpunum_set_input_line(machine, 0,6,HOLD_LINE);
|
cpunum_set_input_line(machine, 0,6,HOLD_LINE);
|
||||||
else
|
else
|
||||||
cpunum_set_input_line(machine, 0,6,CLEAR_LINE);
|
cpunum_set_input_line(machine, 0,6,CLEAR_LINE);
|
||||||
@ -2994,13 +3002,17 @@ VIDEO_START(megadriv)
|
|||||||
|
|
||||||
sprite_renderline = auto_malloc(1024);
|
sprite_renderline = auto_malloc(1024);
|
||||||
highpri_renderline = auto_malloc(320);
|
highpri_renderline = auto_malloc(320);
|
||||||
video_renderline = auto_malloc(320*2);
|
video_renderline = auto_malloc(320*4);
|
||||||
|
|
||||||
megadrive_vdp_palette_lookup = auto_malloc(0x40*2);
|
megadrive_vdp_palette_lookup = auto_malloc(0x40*2);
|
||||||
|
megadrive_vdp_palette_lookup_sprite = auto_malloc(0x40*2);
|
||||||
|
|
||||||
megadrive_vdp_palette_lookup_shadow = auto_malloc(0x40*2);
|
megadrive_vdp_palette_lookup_shadow = auto_malloc(0x40*2);
|
||||||
megadrive_vdp_palette_lookup_highlight = auto_malloc(0x40*2);
|
megadrive_vdp_palette_lookup_highlight = auto_malloc(0x40*2);
|
||||||
|
|
||||||
memset(megadrive_vdp_palette_lookup,0x00,0x40*2);
|
memset(megadrive_vdp_palette_lookup,0x00,0x40*2);
|
||||||
|
memset(megadrive_vdp_palette_lookup_sprite,0x00,0x40*2);
|
||||||
|
|
||||||
memset(megadrive_vdp_palette_lookup_shadow,0x00,0x40*2);
|
memset(megadrive_vdp_palette_lookup_shadow,0x00,0x40*2);
|
||||||
memset(megadrive_vdp_palette_lookup_highlight,0x00,0x40*2);
|
memset(megadrive_vdp_palette_lookup_highlight,0x00,0x40*2);
|
||||||
}
|
}
|
||||||
@ -4172,7 +4184,11 @@ static void genesis_render_videoline_to_videobuffer(int scanline)
|
|||||||
{
|
{
|
||||||
if (!MEGADRIVE_REG0C_SHADOW_HIGLIGHT)
|
if (!MEGADRIVE_REG0C_SHADOW_HIGLIGHT)
|
||||||
{
|
{
|
||||||
if (sprite_renderline[x+128] & 0x40) video_renderline[x] = sprite_renderline[x+128]&0x3f;
|
if (sprite_renderline[x+128] & 0x40)
|
||||||
|
{
|
||||||
|
video_renderline[x] = sprite_renderline[x+128]&0x3f;
|
||||||
|
video_renderline[x] |= 0x10000; // mark as sprite pixel
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{ /* Special Shadow / Highlight processing */
|
{ /* Special Shadow / Highlight processing */
|
||||||
@ -4186,6 +4202,7 @@ static void genesis_render_videoline_to_videobuffer(int scanline)
|
|||||||
{
|
{
|
||||||
/* BUG in sprite chip, these colours are always normal intensity */
|
/* BUG in sprite chip, these colours are always normal intensity */
|
||||||
video_renderline[x] = spritedata | 0x4000;
|
video_renderline[x] = spritedata | 0x4000;
|
||||||
|
video_renderline[x] |= 0x10000; // mark as sprite pixel
|
||||||
}
|
}
|
||||||
else if (spritedata==0x3e)
|
else if (spritedata==0x3e)
|
||||||
{
|
{
|
||||||
@ -4201,6 +4218,7 @@ static void genesis_render_videoline_to_videobuffer(int scanline)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
video_renderline[x] = spritedata;
|
video_renderline[x] = spritedata;
|
||||||
|
video_renderline[x] |= 0x10000; // mark as sprite pixel
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -4240,7 +4258,11 @@ static void genesis_render_videoline_to_videobuffer(int scanline)
|
|||||||
if (!MEGADRIVE_REG0C_SHADOW_HIGLIGHT)
|
if (!MEGADRIVE_REG0C_SHADOW_HIGLIGHT)
|
||||||
{
|
{
|
||||||
/* Normal */
|
/* Normal */
|
||||||
if (sprite_renderline[x+128] & 0x80) video_renderline[x] = sprite_renderline[x+128]&0x3f;
|
if (sprite_renderline[x+128] & 0x80)
|
||||||
|
{
|
||||||
|
video_renderline[x] = sprite_renderline[x+128]&0x3f;
|
||||||
|
video_renderline[x] |= 0x10000; // mark as sprite pixel
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -4262,10 +4284,10 @@ static void genesis_render_videoline_to_videobuffer(int scanline)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
video_renderline[x] = spritedata | 0x4000;
|
video_renderline[x] = spritedata | 0x4000;
|
||||||
|
video_renderline[x] |= 0x10000; // mark as sprite pixel
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4281,25 +4303,31 @@ static void genesis_render_videobuffer_to_screenbuffer(running_machine *machine,
|
|||||||
|
|
||||||
for (x=0;x<320;x++)
|
for (x=0;x<320;x++)
|
||||||
{
|
{
|
||||||
UINT16 dat;
|
UINT32 dat;
|
||||||
dat = video_renderline[x];
|
dat = video_renderline[x];
|
||||||
lineptr[x] = megadrive_vdp_palette_lookup[dat&0x3f];
|
if (dat&0x10000)
|
||||||
|
lineptr[x] = megadrive_vdp_palette_lookup_sprite[dat&0x3f];
|
||||||
|
else
|
||||||
|
lineptr[x] = megadrive_vdp_palette_lookup[dat&0x3f];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
for (x=0;x<320;x++)
|
for (x=0;x<320;x++)
|
||||||
{
|
{
|
||||||
UINT16 dat;
|
UINT32 dat;
|
||||||
dat = video_renderline[x];
|
dat = video_renderline[x];
|
||||||
|
|
||||||
/* Verify my handling.. I'm not sure all cases are correct */
|
/* Verify my handling.. I'm not sure all cases are correct */
|
||||||
|
|
||||||
switch (dat&0xe000)
|
switch (dat&0x1e000)
|
||||||
{
|
{
|
||||||
case 0x0000: // low priority, no shadow sprite, no highlight = shadow
|
case 0x00000: // low priority, no shadow sprite, no highlight = shadow
|
||||||
case 0x2000: // low priority, shadow sprite, no highlight = shadow
|
case 0x02000: // low priority, shadow sprite, no highlight = shadow
|
||||||
case 0x6000: // normal pri, shadow sprite, no highlight = shadow?
|
case 0x06000: // normal pri, shadow sprite, no highlight = shadow?
|
||||||
|
case 0x10000: // (sprite) low priority, no shadow sprite, no highlight = shadow
|
||||||
|
case 0x12000: // (sprite) low priority, shadow sprite, no highlight = shadow
|
||||||
|
case 0x16000: // (sprite) normal pri, shadow sprite, no highlight = shadow?
|
||||||
lineptr[x] = megadrive_vdp_palette_lookup_shadow[dat&0x3f];
|
lineptr[x] = megadrive_vdp_palette_lookup_shadow[dat&0x3f];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -4308,14 +4336,26 @@ static void genesis_render_videobuffer_to_screenbuffer(running_machine *machine,
|
|||||||
lineptr[x] = megadrive_vdp_palette_lookup[dat&0x3f];
|
lineptr[x] = megadrive_vdp_palette_lookup[dat&0x3f];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0xc000: // normal pri, highlight set = highlight?
|
case 0x14000: // (sprite) normal pri, no shadow sprite, no highlight = normal;
|
||||||
|
case 0x18000: // (sprite) low pri, highlight sprite = normal;
|
||||||
|
lineptr[x] = megadrive_vdp_palette_lookup_sprite[dat&0x3f];
|
||||||
|
break;
|
||||||
|
|
||||||
|
|
||||||
|
case 0x0c000: // normal pri, highlight set = highlight?
|
||||||
|
case 0x1c000: // (sprite) normal pri, highlight set = highlight?
|
||||||
lineptr[x] = megadrive_vdp_palette_lookup_highlight[dat&0x3f];
|
lineptr[x] = megadrive_vdp_palette_lookup_highlight[dat&0x3f];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0xa000: // shadow set, highlight set - not possible
|
case 0x0a000: // shadow set, highlight set - not possible
|
||||||
case 0xe000: // shadow set, highlight set, normal set, not possible
|
case 0x0e000: // shadow set, highlight set, normal set, not possible
|
||||||
|
case 0x1a000: // (sprite)shadow set, highlight set - not possible
|
||||||
|
case 0x1e000: // (sprite)shadow set, highlight set, normal set, not possible
|
||||||
lineptr[x] = megadrive_vdp_palette_lookup_highlight[mame_rand(machine)&0x3f];
|
lineptr[x] = megadrive_vdp_palette_lookup_highlight[mame_rand(machine)&0x3f];
|
||||||
break;
|
|
||||||
|
default:
|
||||||
|
lineptr[x] = mame_rand(Machine)&0x3f;
|
||||||
|
break;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -4707,7 +4747,8 @@ static TIMER_CALLBACK( scanline_timer_callback )
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if (genesis_has_z80)
|
||||||
|
{
|
||||||
if (genesis_scanline_counter==megadrive_z80irq_scanline)
|
if (genesis_scanline_counter==megadrive_z80irq_scanline)
|
||||||
{
|
{
|
||||||
if ((genz80.z80_has_bus==1) && (genz80.z80_is_reset==0)) cpunum_set_input_line(machine, 1,0,HOLD_LINE);
|
if ((genz80.z80_has_bus==1) && (genz80.z80_is_reset==0)) cpunum_set_input_line(machine, 1,0,HOLD_LINE);
|
||||||
@ -4716,7 +4757,7 @@ static TIMER_CALLBACK( scanline_timer_callback )
|
|||||||
{
|
{
|
||||||
cpunum_set_input_line(machine, 1,0,CLEAR_LINE);
|
cpunum_set_input_line(machine, 1,0,CLEAR_LINE);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else /* pretend we're still on the same scanline to compensate for rounding errors */
|
else /* pretend we're still on the same scanline to compensate for rounding errors */
|
||||||
@ -4732,7 +4773,7 @@ static TIMER_CALLBACK( irq6_on_callback )
|
|||||||
|
|
||||||
{
|
{
|
||||||
// megadrive_irq6_pending = 1;
|
// megadrive_irq6_pending = 1;
|
||||||
if (MEGADRIVE_REG01_IRQ6_ENABLE) cpunum_set_input_line(machine, 0,6,HOLD_LINE);
|
if (MEGADRIVE_REG01_IRQ6_ENABLE || genesis_always_irq6) cpunum_set_input_line(machine, 0,6,HOLD_LINE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4785,7 +4826,8 @@ MACHINE_RESET( megadriv )
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (genesis_has_z80)
|
||||||
|
{
|
||||||
genz80.z80_is_reset = 1;
|
genz80.z80_is_reset = 1;
|
||||||
cpunum_set_input_line(machine, genz80.z80_cpunum, INPUT_LINE_RESET, ASSERT_LINE);
|
cpunum_set_input_line(machine, genz80.z80_cpunum, INPUT_LINE_RESET, ASSERT_LINE);
|
||||||
genz80.z80_has_bus = 1;
|
genz80.z80_has_bus = 1;
|
||||||
@ -4793,6 +4835,7 @@ MACHINE_RESET( megadriv )
|
|||||||
genz80.z80_bank_pos = 0;
|
genz80.z80_bank_pos = 0;
|
||||||
genz80.z80_bank_addr = 0;
|
genz80.z80_bank_addr = 0;
|
||||||
genesis_scanline_counter = -1;
|
genesis_scanline_counter = -1;
|
||||||
|
}
|
||||||
|
|
||||||
megadrive_imode = 0;
|
megadrive_imode = 0;
|
||||||
|
|
||||||
@ -4808,18 +4851,23 @@ MACHINE_RESET( megadriv )
|
|||||||
timer_adjust_oneshot(frame_timer, attotime_zero, 0);
|
timer_adjust_oneshot(frame_timer, attotime_zero, 0);
|
||||||
timer_adjust_oneshot(scanline_timer, attotime_zero, 0);
|
timer_adjust_oneshot(scanline_timer, attotime_zero, 0);
|
||||||
|
|
||||||
|
if (genesis_other_hacks)
|
||||||
|
{
|
||||||
// set_refresh_rate(megadriv_framerate);
|
// set_refresh_rate(megadriv_framerate);
|
||||||
cpunum_set_clockscale(machine, 0, 0.9950f); /* Fatal Rewind is very fussy... */
|
cpunum_set_clockscale(machine, 0, 0.9950f); /* Fatal Rewind is very fussy... */
|
||||||
// cpunum_set_clockscale(machine, 0, 0.3800f); /* Fatal Rewind is very fussy... */
|
// cpunum_set_clockscale(machine, 0, 0.3800f); /* Fatal Rewind is very fussy... */
|
||||||
|
|
||||||
memset(megadrive_ram,0x00,0x10000);
|
memset(megadrive_ram,0x00,0x10000);
|
||||||
|
}
|
||||||
|
|
||||||
irq4counter = -1;
|
irq4counter = -1;
|
||||||
megadrive_total_scanlines = 262;
|
megadrive_total_scanlines = 262;
|
||||||
megadrive_visible_scanlines = 224;
|
megadrive_visible_scanlines = 224;
|
||||||
megadrive_irq6_scanline = 224;
|
megadrive_irq6_scanline = 224;
|
||||||
megadrive_z80irq_scanline = 226;
|
megadrive_z80irq_scanline = 226;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void megadriv_stop_scanline_timer(void)
|
void megadriv_stop_scanline_timer(void)
|
||||||
@ -5115,9 +5163,15 @@ static int megadriv_tas_callback(void)
|
|||||||
|
|
||||||
static void megadriv_init_common(running_machine *machine)
|
static void megadriv_init_common(running_machine *machine)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if (genesis_has_z80)
|
||||||
|
{
|
||||||
genz80.z80_cpunum = 1;
|
genz80.z80_cpunum = 1;
|
||||||
genz80.z80_prgram = auto_malloc(0x2000);
|
genz80.z80_prgram = auto_malloc(0x2000);
|
||||||
memory_set_bankptr( 1, genz80.z80_prgram );
|
memory_set_bankptr( 1, genz80.z80_prgram );
|
||||||
|
}
|
||||||
|
|
||||||
cpunum_set_irq_callback(0, genesis_int_callback);
|
cpunum_set_irq_callback(0, genesis_int_callback);
|
||||||
megadriv_backupram = NULL;
|
megadriv_backupram = NULL;
|
||||||
@ -5161,9 +5215,28 @@ static void megadriv_init_common(running_machine *machine)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DRIVER_INIT( megadriv_c2 )
|
||||||
|
{
|
||||||
|
genvdp_use_cram = 0;
|
||||||
|
genesis_has_z80 = 0;
|
||||||
|
genesis_always_irq6 = 1;
|
||||||
|
genesis_other_hacks = 0;
|
||||||
|
|
||||||
|
megadriv_init_common(machine);
|
||||||
|
hazemdchoice_megadrive_region_export = 1;
|
||||||
|
hazemdchoice_megadrive_region_pal = 0;
|
||||||
|
hazemdchoice_megadriv_framerate = 60;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
DRIVER_INIT( megadriv )
|
DRIVER_INIT( megadriv )
|
||||||
{
|
{
|
||||||
|
genvdp_use_cram = 1;
|
||||||
|
genesis_has_z80 = 1;
|
||||||
|
genesis_always_irq6 = 0;
|
||||||
|
genesis_other_hacks = 1;
|
||||||
|
|
||||||
megadriv_init_common(machine);
|
megadriv_init_common(machine);
|
||||||
hazemdchoice_megadrive_region_export = 1;
|
hazemdchoice_megadrive_region_export = 1;
|
||||||
hazemdchoice_megadrive_region_pal = 0;
|
hazemdchoice_megadrive_region_pal = 0;
|
||||||
@ -5172,6 +5245,11 @@ DRIVER_INIT( megadriv )
|
|||||||
|
|
||||||
DRIVER_INIT( megadrij )
|
DRIVER_INIT( megadrij )
|
||||||
{
|
{
|
||||||
|
genvdp_use_cram = 1;
|
||||||
|
genesis_has_z80 = 1;
|
||||||
|
genesis_always_irq6 = 0;
|
||||||
|
genesis_other_hacks = 1;
|
||||||
|
|
||||||
megadriv_init_common(machine);
|
megadriv_init_common(machine);
|
||||||
hazemdchoice_megadrive_region_export = 0;
|
hazemdchoice_megadrive_region_export = 0;
|
||||||
hazemdchoice_megadrive_region_pal = 0;
|
hazemdchoice_megadrive_region_pal = 0;
|
||||||
@ -5180,6 +5258,11 @@ DRIVER_INIT( megadrij )
|
|||||||
|
|
||||||
DRIVER_INIT( megadrie )
|
DRIVER_INIT( megadrie )
|
||||||
{
|
{
|
||||||
|
genvdp_use_cram = 1;
|
||||||
|
genesis_has_z80 = 1;
|
||||||
|
genesis_always_irq6 = 0;
|
||||||
|
genesis_other_hacks = 1;
|
||||||
|
|
||||||
megadriv_init_common(machine);
|
megadriv_init_common(machine);
|
||||||
hazemdchoice_megadrive_region_export = 1;
|
hazemdchoice_megadrive_region_export = 1;
|
||||||
hazemdchoice_megadrive_region_pal = 1;
|
hazemdchoice_megadrive_region_pal = 1;
|
||||||
@ -5188,6 +5271,11 @@ DRIVER_INIT( megadrie )
|
|||||||
|
|
||||||
DRIVER_INIT( megadsvp )
|
DRIVER_INIT( megadsvp )
|
||||||
{
|
{
|
||||||
|
genvdp_use_cram = 1;
|
||||||
|
genesis_has_z80 = 1;
|
||||||
|
genesis_always_irq6 = 0;
|
||||||
|
genesis_other_hacks = 1;
|
||||||
|
|
||||||
megadriv_init_common(machine);
|
megadriv_init_common(machine);
|
||||||
svp_init(machine);
|
svp_init(machine);
|
||||||
hazemdchoice_megadrive_region_export = 1;
|
hazemdchoice_megadrive_region_export = 1;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/***********************************************************************************************
|
/***********************************************************************************************
|
||||||
|
|
||||||
Sega System C/C2 Driver
|
Sega System C (System 14)/C2 Driver
|
||||||
driver by David Haywood and Aaron Giles
|
driver by David Haywood and Aaron Giles
|
||||||
---------------------------------------
|
---------------------------------------
|
||||||
Last Update 15 Nov 2005
|
Last Update 15 Nov 2005
|
||||||
@ -63,29 +63,17 @@
|
|||||||
Sega for producing some Fantastic Games...
|
Sega for producing some Fantastic Games...
|
||||||
and anyone else who knows they've contributed :)
|
and anyone else who knows they've contributed :)
|
||||||
|
|
||||||
************************************************************************************************
|
|
||||||
|
|
||||||
Hiscores:
|
|
||||||
|
|
||||||
Bloxeed @ f400-???? [key = ???]
|
|
||||||
Columns @ fc00-ffff [key = '(C) SEGA 1990.JAN BY.TAKOSUKEZOU' @ fc00,ffe0]
|
|
||||||
Columns2 @ fc00-ffff [key = '(C) SEGA 1990.SEP.COLUMNS2 JAPAN' @ fc00,fd00,fe00,ffe0]
|
|
||||||
Borench @ f400-f5ff [key = 'EIJI' in last word]
|
|
||||||
TForceAC @ 8100-817f/8180-81ff [key = '(c)Tehcno soft90' @ 8070 and 80f0]
|
|
||||||
TantR @ fc00-fcff/fd00-fdff [key = 0xd483 in last word]
|
|
||||||
PuyoPuyo @ fc00-fdff/fe00-ffff [key = 0x28e1 in first word]
|
|
||||||
Ichidant @ fc00-fcff/fd00-fdff [key = 0x85a9 in last word]
|
|
||||||
StkClmns @ fc00-fc7f/fc80-fcff [key = ???]
|
|
||||||
PuyoPuy2
|
|
||||||
PotoPoto
|
|
||||||
ZunkYou
|
|
||||||
|
|
||||||
***********************************************************************************************/
|
***********************************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
#include "driver.h"
|
#include "driver.h"
|
||||||
#include "cpu/m68000/m68000.h"
|
#include "cpu/m68000/m68000.h"
|
||||||
#include "genesis.h"
|
//#include "genesis.h"
|
||||||
|
#include "megadriv.h"
|
||||||
|
#include "sound/okim6295.h"
|
||||||
|
#include "sound/sn76496.h"
|
||||||
|
#include "sound/2612intf.h"
|
||||||
|
#include "sound/upd7759.h"
|
||||||
|
|
||||||
#define XL1_CLOCK 640000
|
#define XL1_CLOCK 640000
|
||||||
#define XL2_CLOCK 53693175
|
#define XL2_CLOCK 53693175
|
||||||
@ -96,7 +84,7 @@
|
|||||||
#define LOG_IOCHIP 0
|
#define LOG_IOCHIP 0
|
||||||
|
|
||||||
|
|
||||||
|
static void recompute_palette_tables(void);
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
Global variables
|
Global variables
|
||||||
@ -118,7 +106,6 @@ static UINT8 sp_palbase;
|
|||||||
|
|
||||||
/* sound-related variables */
|
/* sound-related variables */
|
||||||
static UINT8 sound_banks; /* number of sound banks */
|
static UINT8 sound_banks; /* number of sound banks */
|
||||||
static UINT8 bloxeed_sound; /* use kludge for bloxeed sound? */
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -137,14 +124,17 @@ static MACHINE_START( segac2 )
|
|||||||
state_save_register_global(prot_write_buf);
|
state_save_register_global(prot_write_buf);
|
||||||
state_save_register_global(prot_read_buf);
|
state_save_register_global(prot_read_buf);
|
||||||
|
|
||||||
MACHINE_START_CALL(genesis);
|
// MACHINE_START_CALL(genesis);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static MACHINE_RESET( segac2 )
|
static MACHINE_RESET( segac2 )
|
||||||
{
|
{
|
||||||
|
megadrive_ram = generic_nvram16;
|
||||||
|
|
||||||
/* set up interrupts and such */
|
/* set up interrupts and such */
|
||||||
MACHINE_RESET_CALL(genesis);
|
MACHINE_RESET_CALL(megadriv);
|
||||||
|
|
||||||
|
|
||||||
/* determine how many sound banks */
|
/* determine how many sound banks */
|
||||||
sound_banks = 0;
|
sound_banks = 0;
|
||||||
@ -159,6 +149,9 @@ static MACHINE_RESET( segac2 )
|
|||||||
palbank = 0;
|
palbank = 0;
|
||||||
bg_palbase = 0;
|
bg_palbase = 0;
|
||||||
sp_palbase = 0;
|
sp_palbase = 0;
|
||||||
|
|
||||||
|
recompute_palette_tables();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -198,13 +191,6 @@ static WRITE16_HANDLER( ym3438_w )
|
|||||||
{
|
{
|
||||||
static UINT8 last_port;
|
static UINT8 last_port;
|
||||||
|
|
||||||
/* kludge for Bloxeed - it seems to accidentally trip timer 2 */
|
|
||||||
/* and has no recourse for clearing the interrupt; until we */
|
|
||||||
/* find more documentation on the 2612/3438, it's unknown what */
|
|
||||||
/* to do here */
|
|
||||||
if (bloxeed_sound && last_port == 0x27 && (offset & 1))
|
|
||||||
data &= ~0x08;
|
|
||||||
|
|
||||||
switch (offset)
|
switch (offset)
|
||||||
{
|
{
|
||||||
case 0: ym3438_control_port_0_a_w(machine, 0, data & 0xff); last_port = data; break;
|
case 0: ym3438_control_port_0_a_w(machine, 0, data & 0xff); last_port = data; break;
|
||||||
@ -260,11 +246,23 @@ static READ16_HANDLER( palette_r )
|
|||||||
return paletteram16[offset + palbank * 0x200];
|
return paletteram16[offset + palbank * 0x200];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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;
|
||||||
|
|
||||||
|
|
||||||
|
UINT16 megadrive_vdp_palette_lookup_segac2[0x800];
|
||||||
|
UINT16 megadrive_vdp_palette_lookup_sprite_segac2[0x800];
|
||||||
|
UINT16 megadrive_vdp_palette_lookup_shadow_segac2[0x800];
|
||||||
|
UINT16 megadrive_vdp_palette_lookup_highlight_segac2[0x800];
|
||||||
|
|
||||||
|
|
||||||
/* handle writes to the paletteram */
|
/* handle writes to the paletteram */
|
||||||
static WRITE16_HANDLER( palette_w )
|
static WRITE16_HANDLER( palette_w )
|
||||||
{
|
{
|
||||||
int r,g,b,newword;
|
int r,g,b,newword;
|
||||||
|
int tmpr,tmpg,tmpb;
|
||||||
|
|
||||||
/* adjust for the palette bank */
|
/* adjust for the palette bank */
|
||||||
offset &= 0x1ff;
|
offset &= 0x1ff;
|
||||||
@ -283,6 +281,16 @@ static WRITE16_HANDLER( palette_w )
|
|||||||
|
|
||||||
/* set the color */
|
/* set the color */
|
||||||
palette_set_color_rgb(machine, offset, pal5bit(r), pal5bit(g), pal5bit(b));
|
palette_set_color_rgb(machine, offset, pal5bit(r), pal5bit(g), pal5bit(b));
|
||||||
|
|
||||||
|
megadrive_vdp_palette_lookup_segac2[offset] = (b) | (g<<5) | (r<<10);
|
||||||
|
megadrive_vdp_palette_lookup_sprite_segac2[offset] = (b) | (g<<5) | (r<<10);
|
||||||
|
|
||||||
|
tmpr = r>>1;tmpg=g>>1;tmpb=b>>1;
|
||||||
|
megadrive_vdp_palette_lookup_shadow_segac2[offset] = (tmpb) | (tmpg<<5) | (tmpr<<10);
|
||||||
|
|
||||||
|
// how is it calculated on c2?
|
||||||
|
tmpr = tmpr|0x10; tmpg = tmpg|0x10; tmpb = tmpb|0x10;
|
||||||
|
megadrive_vdp_palette_lookup_highlight_segac2[offset] = (tmpb) | (tmpg<<5) | (tmpr<<10);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -321,6 +329,9 @@ static void recompute_palette_tables(void)
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
int genesis_bg_pal_lookup[4];
|
||||||
|
int genesis_sp_pal_lookup[4];
|
||||||
|
|
||||||
for (i = 0; i < 4; i++)
|
for (i = 0; i < 4; i++)
|
||||||
{
|
{
|
||||||
int bgpal = 0x000 + bg_palbase * 0x40 + i * 0x10;
|
int bgpal = 0x000 + bg_palbase * 0x40 + i * 0x10;
|
||||||
@ -328,15 +339,22 @@ static void recompute_palette_tables(void)
|
|||||||
|
|
||||||
if (!alt_palette_mode)
|
if (!alt_palette_mode)
|
||||||
{
|
{
|
||||||
genesis_bg_pal_lookup[i] = palbank * 0x200 + bgpal;
|
genesis_bg_pal_lookup[i] = bgpal;
|
||||||
genesis_sp_pal_lookup[i] = palbank * 0x200 + sppal;
|
genesis_sp_pal_lookup[i] = sppal;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
genesis_bg_pal_lookup[i] = palbank * 0x200 + ((bgpal << 1) & 0x180) + ((~bgpal >> 2) & 0x40) + (bgpal & 0x30);
|
genesis_bg_pal_lookup[i] = ((bgpal << 1) & 0x180) + ((~bgpal >> 2) & 0x40) + (bgpal & 0x30);
|
||||||
genesis_sp_pal_lookup[i] = palbank * 0x200 + ((~sppal << 2) & 0x100) + ((sppal << 2) & 0x80) + ((~sppal >> 2) & 0x40) + ((sppal >> 2) & 0x20) + (sppal & 0x10);
|
genesis_sp_pal_lookup[i] = ((~sppal << 2) & 0x100) + ((sppal << 2) & 0x80) + ((~sppal >> 2) & 0x40) + ((sppal >> 2) & 0x20) + (sppal & 0x10);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
megadrive_vdp_palette_lookup = &megadrive_vdp_palette_lookup_segac2[palbank * 0x200 + bg_palbase * 0x40];
|
||||||
|
megadrive_vdp_palette_lookup_sprite = &megadrive_vdp_palette_lookup_sprite_segac2[palbank * 0x200 + 0x100+sp_palbase * 0x40];
|
||||||
|
megadrive_vdp_palette_lookup_shadow = &megadrive_vdp_palette_lookup_shadow_segac2[palbank * 0x200 + bg_palbase * 0x40];
|
||||||
|
megadrive_vdp_palette_lookup_highlight = &megadrive_vdp_palette_lookup_highlight_segac2[palbank * 0x200 + bg_palbase * 0x40];
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -456,7 +474,7 @@ static WRITE16_HANDLER( io_chip_w )
|
|||||||
newbank = data & 3;
|
newbank = data & 3;
|
||||||
if (newbank != palbank)
|
if (newbank != palbank)
|
||||||
{
|
{
|
||||||
video_screen_update_partial(machine->primary_screen, video_screen_get_vpos(machine->primary_screen) + 1);
|
//video_screen_update_partial(machine->primary_screen, video_screen_get_vpos(machine->primary_screen) + 1);
|
||||||
palbank = newbank;
|
palbank = newbank;
|
||||||
recompute_palette_tables();
|
recompute_palette_tables();
|
||||||
}
|
}
|
||||||
@ -495,7 +513,7 @@ static WRITE16_HANDLER( control_w )
|
|||||||
data &= 0x0f;
|
data &= 0x0f;
|
||||||
|
|
||||||
/* bit 0 controls display enable */
|
/* bit 0 controls display enable */
|
||||||
segac2_enable_display(machine, ~data & 1);
|
//segac2_enable_display(machine, ~data & 1);
|
||||||
|
|
||||||
/* bit 1 resets the protection */
|
/* bit 1 resets the protection */
|
||||||
if (!(data & 2))
|
if (!(data & 2))
|
||||||
@ -658,7 +676,7 @@ static ADDRESS_MAP_START( main_map, ADDRESS_SPACE_PROGRAM, 16 )
|
|||||||
AM_RANGE(0x880000, 0x880001) AM_MIRROR(0x13fefe) AM_WRITE(segac2_upd7759_w)
|
AM_RANGE(0x880000, 0x880001) AM_MIRROR(0x13fefe) AM_WRITE(segac2_upd7759_w)
|
||||||
AM_RANGE(0x880100, 0x880101) AM_MIRROR(0x13fefe) AM_WRITE(counter_timer_w)
|
AM_RANGE(0x880100, 0x880101) AM_MIRROR(0x13fefe) AM_WRITE(counter_timer_w)
|
||||||
AM_RANGE(0x8c0000, 0x8c0fff) AM_MIRROR(0x13f000) AM_READWRITE(palette_r, palette_w) AM_BASE(&paletteram16)
|
AM_RANGE(0x8c0000, 0x8c0fff) AM_MIRROR(0x13f000) AM_READWRITE(palette_r, palette_w) AM_BASE(&paletteram16)
|
||||||
AM_RANGE(0xc00000, 0xc0001f) AM_MIRROR(0x18ff00) AM_READWRITE(genesis_vdp_r, genesis_vdp_w)
|
AM_RANGE(0xc00000, 0xc0001f) AM_MIRROR(0x18ff00) AM_READWRITE(megadriv_vdp_r, megadriv_vdp_w)
|
||||||
AM_RANGE(0xe00000, 0xe0ffff) AM_MIRROR(0x1f0000) AM_RAM AM_BASE(&generic_nvram16) AM_SIZE(&generic_nvram_size)
|
AM_RANGE(0xe00000, 0xe0ffff) AM_MIRROR(0x1f0000) AM_RAM AM_BASE(&generic_nvram16) AM_SIZE(&generic_nvram_size)
|
||||||
ADDRESS_MAP_END
|
ADDRESS_MAP_END
|
||||||
|
|
||||||
@ -1342,9 +1360,14 @@ INPUT_PORTS_END
|
|||||||
Sound interfaces
|
Sound interfaces
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
|
void segac2_irq2_interrupt(running_machine *machine, int state)
|
||||||
|
{
|
||||||
|
//printf("sound irq %d\n", state);
|
||||||
|
cpunum_set_input_line(machine, 0, 2, state ? ASSERT_LINE : CLEAR_LINE);
|
||||||
|
}
|
||||||
static const ym3438_interface ym3438_intf =
|
static const ym3438_interface ym3438_intf =
|
||||||
{
|
{
|
||||||
genesis_irq2_interrupt /* IRQ handler */
|
segac2_irq2_interrupt, /* IRQ handler */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -1361,30 +1384,50 @@ static const ym3438_interface ym3438_intf =
|
|||||||
|
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
|
VIDEO_START(segac2_new)
|
||||||
|
{
|
||||||
|
VIDEO_START_CALL(megadriv);
|
||||||
|
|
||||||
|
megadrive_vdp_palette_lookup = megadrive_vdp_palette_lookup_segac2;
|
||||||
|
megadrive_vdp_palette_lookup_sprite = megadrive_vdp_palette_lookup_sprite_segac2;
|
||||||
|
megadrive_vdp_palette_lookup_shadow = megadrive_vdp_palette_lookup_shadow_segac2;
|
||||||
|
megadrive_vdp_palette_lookup_highlight = megadrive_vdp_palette_lookup_highlight_segac2;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
VIDEO_UPDATE(segac2_new)
|
||||||
|
{
|
||||||
|
VIDEO_UPDATE_CALL(megadriv);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static MACHINE_DRIVER_START( segac )
|
static MACHINE_DRIVER_START( segac )
|
||||||
|
|
||||||
/* basic machine hardware */
|
/* basic machine hardware */
|
||||||
MDRV_CPU_ADD("main", M68000, XL2_CLOCK/6)
|
MDRV_CPU_ADD("main", M68000, XL2_CLOCK/6)
|
||||||
MDRV_CPU_PROGRAM_MAP(main_map,0)
|
MDRV_CPU_PROGRAM_MAP(main_map,0)
|
||||||
MDRV_CPU_VBLANK_INT("main", genesis_vblank_interrupt)
|
|
||||||
|
|
||||||
MDRV_MACHINE_START(segac2)
|
MDRV_MACHINE_START(segac2)
|
||||||
MDRV_MACHINE_RESET(segac2)
|
MDRV_MACHINE_RESET(segac2)
|
||||||
MDRV_NVRAM_HANDLER(generic_randfill)
|
MDRV_NVRAM_HANDLER(generic_randfill)
|
||||||
|
|
||||||
/* video hardware */
|
/* video hardware */
|
||||||
MDRV_VIDEO_ATTRIBUTES(VIDEO_HAS_SHADOWS | VIDEO_HAS_HIGHLIGHTS)
|
//MDRV_VIDEO_ATTRIBUTES(VIDEO_HAS_SHADOWS | VIDEO_HAS_HIGHLIGHTS)
|
||||||
|
|
||||||
MDRV_SCREEN_ADD("main", RASTER)
|
MDRV_SCREEN_ADD("megadriv", RASTER)
|
||||||
|
MDRV_SCREEN_FORMAT(BITMAP_FORMAT_RGB15)
|
||||||
MDRV_SCREEN_REFRESH_RATE(60)
|
MDRV_SCREEN_REFRESH_RATE(60)
|
||||||
MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
|
MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) // Vblank handled manually.
|
||||||
MDRV_SCREEN_SIZE(342,262)
|
MDRV_SCREEN_SIZE(64*8, 64*8)
|
||||||
MDRV_SCREEN_VISIBLE_AREA(0, 319, 0, 223)
|
MDRV_SCREEN_VISIBLE_AREA(0, 32*8-1, 0, 28*8-1)
|
||||||
|
|
||||||
MDRV_PALETTE_LENGTH(2048)
|
MDRV_PALETTE_LENGTH(2048)
|
||||||
|
|
||||||
MDRV_VIDEO_START(segac2)
|
MDRV_VIDEO_START(segac2_new)
|
||||||
MDRV_VIDEO_UPDATE(segac2)
|
MDRV_VIDEO_UPDATE(segac2_new)
|
||||||
|
MDRV_VIDEO_EOF( megadriv )
|
||||||
|
|
||||||
/* sound hardware */
|
/* sound hardware */
|
||||||
MDRV_SPEAKER_STANDARD_MONO("mono")
|
MDRV_SPEAKER_STANDARD_MONO("mono")
|
||||||
@ -1415,16 +1458,6 @@ MACHINE_DRIVER_END
|
|||||||
Rom Definitions
|
Rom Definitions
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
|
|
||||||
All the known System C/C2 Dumps are listed here with the exception of
|
|
||||||
the version of Puzzle & Action (I believe its actually Ichidant-R) which
|
|
||||||
was credited to SpainDumps in the included text file. This appears to be
|
|
||||||
a bad dump (half sized roms) however the roms do not match up exactly with
|
|
||||||
the good dump of the game. English language sets are assumed to be the
|
|
||||||
parent where they exist. Hopefully some more alternate version dumps will
|
|
||||||
turn up sometime soon for example English Language version of Tant-R or
|
|
||||||
Japanese Language versions of Borench (if of course these games were
|
|
||||||
released in other locations.
|
|
||||||
|
|
||||||
Games are in Order of Date (Year) with System-C titles coming first.
|
Games are in Order of Date (Year) with System-C titles coming first.
|
||||||
|
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
@ -1827,10 +1860,22 @@ it should be, otherwise I don't see how the formula could be computed.
|
|||||||
|
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
static void segac2_common_init(int (*func)(int in))
|
extern int genvdp_use_cram;
|
||||||
|
extern int genesis_has_z80;
|
||||||
|
extern int genesis_always_irq6;
|
||||||
|
extern int genesis_other_hacks;
|
||||||
|
extern DRIVER_INIT( megadriv_c2 );
|
||||||
|
|
||||||
|
static void segac2_common_init(running_machine* machine, int (*func)(int in))
|
||||||
{
|
{
|
||||||
|
DRIVER_INIT_CALL( megadriv_c2 );
|
||||||
|
|
||||||
prot_func = func;
|
prot_func = func;
|
||||||
bloxeed_sound = 0;
|
|
||||||
|
genvdp_use_cram = 0;
|
||||||
|
genesis_has_z80 = 0;
|
||||||
|
genesis_always_irq6 = 1;
|
||||||
|
genesis_other_hacks = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -2060,118 +2105,120 @@ static int prot_func_pclubjv5(int in)
|
|||||||
|
|
||||||
static DRIVER_INIT( c2boot )
|
static DRIVER_INIT( c2boot )
|
||||||
{
|
{
|
||||||
segac2_common_init(NULL);
|
segac2_common_init(machine, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static DRIVER_INIT( bloxeedc )
|
static DRIVER_INIT( bloxeedc )
|
||||||
{
|
{
|
||||||
segac2_common_init(NULL);
|
segac2_common_init(machine, NULL);
|
||||||
bloxeed_sound = 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static DRIVER_INIT( columns )
|
static DRIVER_INIT( columns )
|
||||||
{
|
{
|
||||||
segac2_common_init(prot_func_columns);
|
segac2_common_init(machine, prot_func_columns);
|
||||||
}
|
}
|
||||||
|
|
||||||
static DRIVER_INIT( columns2 )
|
static DRIVER_INIT( columns2 )
|
||||||
{
|
{
|
||||||
segac2_common_init(prot_func_columns2);
|
segac2_common_init(machine, prot_func_columns2);
|
||||||
}
|
}
|
||||||
|
|
||||||
static DRIVER_INIT( tfrceac )
|
static DRIVER_INIT( tfrceac )
|
||||||
{
|
{
|
||||||
segac2_common_init(prot_func_tfrceac);
|
segac2_common_init(machine, prot_func_tfrceac);
|
||||||
}
|
}
|
||||||
|
|
||||||
static DRIVER_INIT( tfrceacb )
|
static DRIVER_INIT( tfrceacb )
|
||||||
{
|
{
|
||||||
/* disable the palette bank switching from the protection chip */
|
/* disable the palette bank switching from the protection chip */
|
||||||
segac2_common_init(NULL);
|
segac2_common_init(machine, NULL);
|
||||||
memory_install_write16_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x800000, 0x800001, 0, 0, SMH_NOP);
|
memory_install_write16_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x800000, 0x800001, 0, 0, SMH_NOP);
|
||||||
}
|
}
|
||||||
|
|
||||||
static DRIVER_INIT( borench )
|
static DRIVER_INIT( borench )
|
||||||
{
|
{
|
||||||
segac2_common_init(prot_func_borench);
|
segac2_common_init(machine, prot_func_borench);
|
||||||
}
|
}
|
||||||
|
|
||||||
static DRIVER_INIT( twinsqua )
|
static DRIVER_INIT( twinsqua )
|
||||||
{
|
{
|
||||||
segac2_common_init(prot_func_twinsqua);
|
segac2_common_init(machine, prot_func_twinsqua);
|
||||||
}
|
}
|
||||||
|
|
||||||
static DRIVER_INIT( ribbit )
|
static DRIVER_INIT( ribbit )
|
||||||
{
|
{
|
||||||
segac2_common_init(prot_func_ribbit);
|
segac2_common_init(machine, prot_func_ribbit);
|
||||||
}
|
}
|
||||||
|
|
||||||
static DRIVER_INIT( puyo )
|
static DRIVER_INIT( puyo )
|
||||||
{
|
{
|
||||||
segac2_common_init(prot_func_puyo);
|
segac2_common_init(machine, prot_func_puyo);
|
||||||
}
|
}
|
||||||
|
|
||||||
static DRIVER_INIT( tantr )
|
static DRIVER_INIT( tantr )
|
||||||
{
|
{
|
||||||
segac2_common_init(prot_func_tantr);
|
segac2_common_init(machine, prot_func_tantr);
|
||||||
}
|
}
|
||||||
|
|
||||||
static DRIVER_INIT( tantrkor )
|
static DRIVER_INIT( tantrkor )
|
||||||
{
|
{
|
||||||
segac2_common_init(prot_func_tantrkor);
|
segac2_common_init(machine, prot_func_tantrkor);
|
||||||
}
|
}
|
||||||
|
|
||||||
static DRIVER_INIT( potopoto )
|
static DRIVER_INIT( potopoto )
|
||||||
{
|
{
|
||||||
segac2_common_init(prot_func_potopoto);
|
segac2_common_init(machine, prot_func_potopoto);
|
||||||
}
|
}
|
||||||
|
|
||||||
static DRIVER_INIT( stkclmns )
|
static DRIVER_INIT( stkclmns )
|
||||||
{
|
{
|
||||||
segac2_common_init(prot_func_stkclmns);
|
segac2_common_init(machine, prot_func_stkclmns);
|
||||||
}
|
}
|
||||||
|
|
||||||
static DRIVER_INIT( stkclmnj )
|
static DRIVER_INIT( stkclmnj )
|
||||||
{
|
{
|
||||||
segac2_common_init(prot_func_stkclmnj);
|
segac2_common_init(machine, prot_func_stkclmnj);
|
||||||
}
|
}
|
||||||
|
|
||||||
static DRIVER_INIT( ichir )
|
static DRIVER_INIT( ichir )
|
||||||
{
|
{
|
||||||
segac2_common_init(prot_func_ichir);
|
segac2_common_init(machine, prot_func_ichir);
|
||||||
}
|
}
|
||||||
|
|
||||||
static DRIVER_INIT( ichirk )
|
static DRIVER_INIT( ichirk )
|
||||||
{
|
{
|
||||||
segac2_common_init(prot_func_ichirk);
|
segac2_common_init(machine, prot_func_ichirk);
|
||||||
}
|
}
|
||||||
|
|
||||||
static DRIVER_INIT( ichirj )
|
static DRIVER_INIT( ichirj )
|
||||||
{
|
{
|
||||||
segac2_common_init(prot_func_ichirj);
|
segac2_common_init(machine, prot_func_ichirj);
|
||||||
}
|
}
|
||||||
|
|
||||||
static DRIVER_INIT( ichirjbl )
|
static DRIVER_INIT( ichirjbl )
|
||||||
{
|
{
|
||||||
|
|
||||||
/* when did this actually work? - the protection is patched but the new check fails? */
|
/* when did this actually work? - the protection is patched but the new check fails? */
|
||||||
UINT16 *rom = (UINT16 *)memory_region(machine, "main");
|
UINT16 *rom = (UINT16 *)memory_region(machine, "main");
|
||||||
rom[0x390/2] = 0x6600;
|
rom[0x390/2] = 0x6600;
|
||||||
|
|
||||||
|
segac2_common_init(machine, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static DRIVER_INIT( puyopuy2 )
|
static DRIVER_INIT( puyopuy2 )
|
||||||
{
|
{
|
||||||
segac2_common_init(prot_func_puyopuy2);
|
segac2_common_init(machine, prot_func_puyopuy2);
|
||||||
}
|
}
|
||||||
|
|
||||||
static DRIVER_INIT( zunkyou )
|
static DRIVER_INIT( zunkyou )
|
||||||
{
|
{
|
||||||
segac2_common_init(prot_func_zunkyou);
|
segac2_common_init(machine, prot_func_zunkyou);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static DRIVER_INIT( pclub )
|
static DRIVER_INIT( pclub )
|
||||||
{
|
{
|
||||||
segac2_common_init(prot_func_pclub);
|
segac2_common_init(machine, prot_func_pclub);
|
||||||
|
|
||||||
memory_install_read16_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x880120, 0x880121, 0, 0, printer_r );/*Print Club Vol.1*/
|
memory_install_read16_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x880120, 0x880121, 0, 0, printer_r );/*Print Club Vol.1*/
|
||||||
memory_install_read16_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x880124, 0x880125, 0, 0, printer_r );/*Print Club Vol.2*/
|
memory_install_read16_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x880124, 0x880125, 0, 0, printer_r );/*Print Club Vol.2*/
|
||||||
@ -2180,7 +2227,7 @@ static DRIVER_INIT( pclub )
|
|||||||
|
|
||||||
static DRIVER_INIT( pclubjv2 )
|
static DRIVER_INIT( pclubjv2 )
|
||||||
{
|
{
|
||||||
segac2_common_init(prot_func_pclubjv2);
|
segac2_common_init(machine, prot_func_pclubjv2);
|
||||||
|
|
||||||
memory_install_read16_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x880120, 0x880121, 0, 0, printer_r );/*Print Club Vol.1*/
|
memory_install_read16_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x880120, 0x880121, 0, 0, printer_r );/*Print Club Vol.1*/
|
||||||
memory_install_read16_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x880124, 0x880125, 0, 0, printer_r );/*Print Club Vol.2*/
|
memory_install_read16_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x880124, 0x880125, 0, 0, printer_r );/*Print Club Vol.2*/
|
||||||
@ -2189,7 +2236,7 @@ static DRIVER_INIT( pclubjv2 )
|
|||||||
|
|
||||||
static DRIVER_INIT( pclubjv4 )
|
static DRIVER_INIT( pclubjv4 )
|
||||||
{
|
{
|
||||||
segac2_common_init(prot_func_pclubjv4);
|
segac2_common_init(machine, prot_func_pclubjv4);
|
||||||
|
|
||||||
memory_install_read16_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x880120, 0x880121, 0, 0, printer_r );/*Print Club Vol.1*/
|
memory_install_read16_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x880120, 0x880121, 0, 0, printer_r );/*Print Club Vol.1*/
|
||||||
memory_install_read16_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x880124, 0x880125, 0, 0, printer_r );/*Print Club Vol.2*/
|
memory_install_read16_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x880124, 0x880125, 0, 0, printer_r );/*Print Club Vol.2*/
|
||||||
@ -2198,7 +2245,7 @@ static DRIVER_INIT( pclubjv4 )
|
|||||||
|
|
||||||
static DRIVER_INIT( pclubjv5 )
|
static DRIVER_INIT( pclubjv5 )
|
||||||
{
|
{
|
||||||
segac2_common_init(prot_func_pclubjv5);
|
segac2_common_init(machine, prot_func_pclubjv5);
|
||||||
|
|
||||||
memory_install_read16_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x880120, 0x880121, 0, 0, printer_r );/*Print Club Vol.1*/
|
memory_install_read16_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x880120, 0x880121, 0, 0, printer_r );/*Print Club Vol.1*/
|
||||||
memory_install_read16_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x880124, 0x880125, 0, 0, printer_r );/*Print Club Vol.2*/
|
memory_install_read16_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x880124, 0x880125, 0, 0, printer_r );/*Print Club Vol.2*/
|
||||||
|
Loading…
Reference in New Issue
Block a user