mirror of
https://github.com/libretro/mame2003-plus-libretro.git
synced 2026-11-09 03:09:34 -10:00
Compare commits
48
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bf6a7455d7 | ||
|
|
b12d6012b5 | ||
|
|
2decddc0b5 | ||
|
|
fd01c495ad | ||
|
|
eb611beff8 | ||
|
|
4a79de6337 | ||
|
|
7b1ad60b94 | ||
|
|
b5ca65f5fd | ||
|
|
5f39e722a5 | ||
|
|
74a1af5baf | ||
|
|
ccaebab82e | ||
|
|
aa2b32f913 | ||
|
|
b0068b501e | ||
|
|
3277597377 | ||
|
|
da8c86f159 | ||
|
|
e05caba0aa | ||
|
|
9d9d1ed901 | ||
|
|
155d68254c | ||
|
|
0fe5665808 | ||
|
|
97cb277199 | ||
|
|
d73ba22c26 | ||
|
|
64de9b21ed | ||
|
|
1104e225f9 | ||
|
|
21c9f8ffd4 | ||
|
|
10315f744e | ||
|
|
b52156ee5d | ||
|
|
a0ab0427b9 | ||
|
|
c620bfebef | ||
|
|
f073a5af73 | ||
|
|
0d9a325c96 | ||
|
|
31419303cb | ||
|
|
0077ef7e41 | ||
|
|
546424f3cd | ||
|
|
8393e124af | ||
|
|
0f72193fcc | ||
|
|
5da0428c7f | ||
|
|
e059bb0fe8 | ||
|
|
6e6f19aa43 | ||
|
|
9bbb94cf6d | ||
|
|
d3ac6c95f2 | ||
|
|
3a2f7f39b1 | ||
|
|
07a41088de | ||
|
|
21256d2412 | ||
|
|
a045126dad | ||
|
|
6c514a3242 | ||
|
|
dc1f391a83 | ||
|
|
93159c0ce9 | ||
|
|
5bbb84086c |
No files matched your search
@@ -462,6 +462,7 @@ else ifeq ($(platform), psp1)
|
||||
AR = psp-ar$(EXE_EXT)
|
||||
PLATCFLAGS += -DPSP
|
||||
CFLAGS += -G0
|
||||
CFLAGS += -Wno-incompatible-pointer-types
|
||||
STATIC_LINKING = 1
|
||||
|
||||
# Vita
|
||||
|
||||
+5295
-5295
File diff suppressed because it is too large.
Load diff
+3286
-181
File diff suppressed because it is too large.
Load diff
@@ -470,6 +470,19 @@ void konami_set_reg(int regnum, unsigned val)
|
||||
/****************************************************************************/
|
||||
void konami_init(void)
|
||||
{
|
||||
int cpu = cpu_getactivecpu();
|
||||
state_save_register_UINT16("konami", cpu, "PC", &PC, 1);
|
||||
state_save_register_UINT16("konami", cpu, "U", &U, 1);
|
||||
state_save_register_UINT16("konami", cpu, "S", &S, 1);
|
||||
state_save_register_UINT16("konami", cpu, "X", &X, 1);
|
||||
state_save_register_UINT16("konami", cpu, "Y", &Y, 1);
|
||||
state_save_register_UINT16("konami", cpu, "D", &D, 1);
|
||||
state_save_register_UINT8("konami", cpu, "DP", &DP, 1);
|
||||
state_save_register_UINT8("konami", cpu, "CC", &CC, 1);
|
||||
state_save_register_UINT8("konami", cpu, "INT", &konami.int_state, 1);
|
||||
state_save_register_UINT8("konami", cpu, "NMI", &konami.nmi_state, 1);
|
||||
state_save_register_UINT8("konami", cpu, "IRQ", &konami.irq_state[0], 1);
|
||||
state_save_register_UINT8("konami", cpu, "FIRQ", &konami.irq_state[1], 1);
|
||||
}
|
||||
|
||||
void konami_reset(void *param)
|
||||
|
||||
@@ -163,6 +163,50 @@ struct cpuinfo
|
||||
|
||||
static struct cpuinfo cpu[MAX_CPU];
|
||||
|
||||
/* The lasting suspend reasons of each CPU (held in reset, halted or
|
||||
disabled), kept for save states. Without them a loaded save state keeps
|
||||
the suspend state of the board that loads it: a sound CPU that was held
|
||||
in reset at that moment is reset again when the game releases its reset
|
||||
line, and it restarts its program while the main CPU does not. The
|
||||
short-lived reasons (spin, trigger) are not kept: the loaded CPU simply
|
||||
runs until it waits again. */
|
||||
#define SUSPEND_LASTING_REASONS (SUSPEND_REASON_HALT | SUSPEND_REASON_RESET | SUSPEND_REASON_DISABLE)
|
||||
static INT32 saved_suspend[MAX_CPU];
|
||||
|
||||
/* Each CPU's local time (how far it ran past the timer system's time) and
|
||||
cycle count, kept with a save: without them a loaded CPU keeps the offset
|
||||
it had when the save was loaded, a few cycles off, and a game that polls
|
||||
another CPU drifts from the run it was saved from. */
|
||||
static double saved_localtime[MAX_CPU];
|
||||
static UINT32 saved_cycles[MAX_CPU * 2];
|
||||
|
||||
static void cpu_suspend_presave(void)
|
||||
{
|
||||
int cpunum;
|
||||
|
||||
for (cpunum = 0; cpunum < cpu_gettotalcpu(); cpunum++)
|
||||
{
|
||||
saved_suspend[cpunum] = cpu[cpunum].nextsuspend & SUSPEND_LASTING_REASONS;
|
||||
saved_localtime[cpunum] = cpu[cpunum].localtime;
|
||||
saved_cycles[cpunum * 2] = (UINT32)cpu[cpunum].totalcycles;
|
||||
saved_cycles[cpunum * 2 + 1] = (UINT32)(cpu[cpunum].totalcycles >> 32);
|
||||
}
|
||||
}
|
||||
|
||||
static void cpu_suspend_postload(void)
|
||||
{
|
||||
int cpunum;
|
||||
|
||||
for (cpunum = 0; cpunum < cpu_gettotalcpu(); cpunum++)
|
||||
{
|
||||
cpu[cpunum].suspend = cpu[cpunum].nextsuspend = saved_suspend[cpunum] & SUSPEND_LASTING_REASONS;
|
||||
if (saved_suspend[cpunum])
|
||||
cpu[cpunum].eatcycles = cpu[cpunum].nexteatcycles = 1;
|
||||
cpu[cpunum].localtime = saved_localtime[cpunum];
|
||||
cpu[cpunum].totalcycles = ((UINT64)saved_cycles[cpunum * 2 + 1] << 32) | saved_cycles[cpunum * 2];
|
||||
}
|
||||
}
|
||||
|
||||
static int time_to_reset;
|
||||
static int time_to_quit;
|
||||
|
||||
@@ -269,6 +313,11 @@ int cpu_init(void)
|
||||
/* save some stuff in tag 0 */
|
||||
state_save_set_current_tag(0);
|
||||
state_save_register_INT32("cpu", 0, "watchdog count", &watchdog_counter, 1);
|
||||
state_save_register_INT32("cpu", 0, "suspend", saved_suspend, cpu_gettotalcpu());
|
||||
state_save_register_double("cpu", 0, "localtime", saved_localtime, cpu_gettotalcpu());
|
||||
state_save_register_UINT32("cpu", 0, "totalcycles", saved_cycles, cpu_gettotalcpu() * 2);
|
||||
state_save_register_func_presave(cpu_suspend_presave);
|
||||
state_save_register_func_postload(cpu_suspend_postload);
|
||||
|
||||
/* reset the IRQ lines and save those */
|
||||
if (cpuint_init())
|
||||
|
||||
@@ -62,6 +62,26 @@ static INT32 irq_line_vector[MAX_CPU][MAX_IRQ_LINES];
|
||||
static INT32 irq_event_queue[MAX_CPU][MAX_IRQ_EVENTS];
|
||||
static int irq_event_index[MAX_CPU];
|
||||
|
||||
static void cpu_empty_event_queue(int cpunum);
|
||||
|
||||
/* A save made at the end of a frame finds the VBLANK interrupt still in the
|
||||
queue (it is emptied by a timer at the same time, which runs in the next
|
||||
frame). The queue is saved with the game, and a load sets that timer again,
|
||||
or the CPU misses that interrupt: a game that does its work every other
|
||||
frame then runs one frame late after loading. */
|
||||
static void cpuint_postload(void)
|
||||
{
|
||||
int cpunum;
|
||||
|
||||
for (cpunum = 0; cpunum < cpu_gettotalcpu(); cpunum++)
|
||||
{
|
||||
if (irq_event_index[cpunum] > MAX_IRQ_EVENTS)
|
||||
irq_event_index[cpunum] = MAX_IRQ_EVENTS;
|
||||
if (irq_event_index[cpunum] > 0)
|
||||
timer_set(TIME_NOW, cpunum, cpu_empty_event_queue);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*************************************
|
||||
@@ -131,6 +151,10 @@ int cpuint_init(void)
|
||||
state_save_register_INT32("cpu", 0, "irq vector", &interrupt_vector[0][0],cpu_gettotalcpu() * MAX_IRQ_LINES);
|
||||
state_save_register_UINT8("cpu", 0, "irqline state", &irq_line_state[0][0], cpu_gettotalcpu() * MAX_IRQ_LINES);
|
||||
state_save_register_INT32("cpu", 0, "irqline vector", &irq_line_vector[0][0], cpu_gettotalcpu() * MAX_IRQ_LINES);
|
||||
state_save_register_INT32("cpu", 0, "irq event queue", &irq_event_queue[0][0], cpu_gettotalcpu() * MAX_IRQ_EVENTS);
|
||||
for (cpunum = 0; cpunum < cpu_gettotalcpu(); cpunum++)
|
||||
state_save_register_int("cpu", cpunum, "irq events", &irq_event_index[cpunum]);
|
||||
state_save_register_func_postload(cpuint_postload);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
+47
-10
@@ -2050,24 +2050,51 @@ V-V TP-027
|
||||
DRIVER( makaimuc ) /* 9/1985 (c) 1985 */
|
||||
DRIVER( makaimug ) /* 9/1985 (c) 1985 */
|
||||
DRIVER( diamond ) /* (c) 1989 KH Video (NOT A CAPCOM GAME but runs on GnG hardware) */
|
||||
DRIVER( gngknight ) /* Hack */
|
||||
DRIVER( gngknighta ) /* Hack */
|
||||
DRIVER( gngknightb ) /* Hack */
|
||||
DRIVER( gngknightc ) /* Hack */
|
||||
DRIVER( gngknightt ) /* Hack */
|
||||
DRIVER( gngenh ) /* Hack */
|
||||
DRIVER( gngaenh ) /* Hack */
|
||||
DRIVER( gngbenh ) /* Hack */
|
||||
DRIVER( gngcenh ) /* Hack */
|
||||
DRIVER( gngtenh ) /* Hack */
|
||||
DRIVER( makaimurenh ) /* Hack */
|
||||
DRIVER( makaimurbenh ) /* Hack */
|
||||
DRIVER( makaimurcenh ) /* Hack */
|
||||
DRIVER( makaimurgenh ) /* Hack */
|
||||
DRIVER( gngmaiden ) /* Hack */
|
||||
DRIVER( gngmaidenenh ) /* Hack */
|
||||
DRIVER( gngmaidena ) /* Hack */
|
||||
DRIVER( gngmaidenaenh ) /* Hack */
|
||||
DRIVER( gngmaidenb ) /* Hack */
|
||||
DRIVER( gngmaidenbenh ) /* Hack */
|
||||
DRIVER( gngmaidenc ) /* Hack */
|
||||
DRIVER( gngmaidencenh ) /* Hack */
|
||||
DRIVER( gngmaident ) /* Hack */
|
||||
DRIVER( makknight ) /* Hack */
|
||||
DRIVER( makknightb ) /* Hack */
|
||||
DRIVER( makknightc ) /* Hack */
|
||||
DRIVER( makknightg ) /* Hack */
|
||||
DRIVER( gngmaidentenh ) /* Hack */
|
||||
DRIVER( gngknight ) /* Hack */
|
||||
DRIVER( gngknightenh ) /* Hack */
|
||||
DRIVER( gngknighta ) /* Hack */
|
||||
DRIVER( gngknightaenh ) /* Hack */
|
||||
DRIVER( gngknightb ) /* Hack */
|
||||
DRIVER( gngknightbenh ) /* Hack */
|
||||
DRIVER( gngknightc ) /* Hack */
|
||||
DRIVER( gngknightcenh ) /* Hack */
|
||||
DRIVER( gngknightt ) /* Hack */
|
||||
DRIVER( gngknighttenh ) /* Hack */
|
||||
DRIVER( makmaiden ) /* Hack */
|
||||
DRIVER( makmaidenenh ) /* Hack */
|
||||
DRIVER( makmaidenb ) /* Hack */
|
||||
DRIVER( makmaidenbenh ) /* Hack */
|
||||
DRIVER( makmaidenc ) /* Hack */
|
||||
DRIVER( makmaidencenh ) /* Hack */
|
||||
DRIVER( makmaideng ) /* Hack */
|
||||
DRIVER( makmaidengenh ) /* Hack */
|
||||
DRIVER( makknight ) /* Hack */
|
||||
DRIVER( makknightenh ) /* Hack */
|
||||
DRIVER( makknightb ) /* Hack */
|
||||
DRIVER( makknightbenh ) /* Hack */
|
||||
DRIVER( makknightc ) /* Hack */
|
||||
DRIVER( makknightcenh ) /* Hack */
|
||||
DRIVER( makknightg ) /* Hack */
|
||||
DRIVER( makknightgenh ) /* Hack */
|
||||
DRIVER( gunsmoke ) /* 11/1985 (c) 1985 (World) */
|
||||
DRIVER( gunsmoku ) /* 11/1985 (c) 1985 + Romstar (US) */
|
||||
DRIVER( gunsmoka ) /* 11/1985 (c) 1985 (US) */
|
||||
@@ -2138,6 +2165,12 @@ V-V TP-027
|
||||
DRIVER( ghouls ) /* 12/1988 (c) 1988 (World) */
|
||||
DRIVER( ghoulsu ) /* 12/1988 (c) 1988 (US) */
|
||||
DRIVER( daimakai ) /* 12/1988 (c) 1988 (Japan) */
|
||||
DRIVER( ghoulsmaiden ) /* Hack */
|
||||
DRIVER( ghoulsknight ) /* Hack */
|
||||
DRIVER( ghoulsumaiden ) /* Hack */
|
||||
DRIVER( ghoulsuknight ) /* Hack */
|
||||
DRIVER( daimakaimaiden ) /* Hack */
|
||||
DRIVER( daimakaiknight ) /* Hack */
|
||||
DRIVER( strider ) /* 3/1989 (c) 1989 (not explicitly stated but should be US) */
|
||||
DRIVER( stridrua ) /* 3/1989 (c) 1989 (not explicitly stated but should be US) */
|
||||
DRIVER( striderj ) /* 3/1989 (c) 1989 */
|
||||
@@ -3353,12 +3386,16 @@ BOMULEUL CHAJARA SEGA ST-V 1997/04/11
|
||||
/* Sega MegaPlay */
|
||||
DRIVER( mp_sonic ) /* 01 */
|
||||
DRIVER( mp_gaxe2 ) /* 02 */
|
||||
DRIVER( mp_gslam ) /* 03 */
|
||||
DRIVER( mp_sor2 ) /* 03 */
|
||||
DRIVER( mp_twc ) /* 04 */
|
||||
DRIVER( mp_soni2 ) /* 05 */
|
||||
DRIVER( mp_bio ) /* 06 */
|
||||
DRIVER( mp_shnb3 ) /* 07 */
|
||||
DRIVER( mp_col3 ) /* 10 */
|
||||
DRIVER( mp_gunhe ) /* 10 */
|
||||
DRIVER( mp_mazin ) /* 11 */
|
||||
DRIVER( mp_col3 ) /* ?? */
|
||||
DRIVER( mp_addams )
|
||||
|
||||
/* Data East "Burger Time hardware" games */
|
||||
DRIVER( lnc ) /* (c) 1981 */
|
||||
|
||||
+21
-6
@@ -8,6 +8,7 @@ Preliminary driver by:
|
||||
***************************************************************************/
|
||||
|
||||
#include "driver.h"
|
||||
#include "state.h"
|
||||
#include "vidhrdw/generic.h"
|
||||
#include "cpu/konami/konami.h" /* for the callback and the firq irq definition */
|
||||
#include "vidhrdw/konamiic.h"
|
||||
@@ -434,26 +435,33 @@ ROM_END
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
static void aliens_banking( int lines )
|
||||
static int aliens_rombank = 0x10; /* CPU ROM bank lines, kept for save states */
|
||||
|
||||
static void aliens_rombank_set(void)
|
||||
{
|
||||
unsigned char *RAM = memory_region(REGION_CPU1);
|
||||
int lines = aliens_rombank;
|
||||
int offs = 0x18000;
|
||||
|
||||
|
||||
if (lines & 0x10) offs -= 0x8000;
|
||||
|
||||
offs += (lines & 0x0f)*0x2000;
|
||||
cpu_setbank( 1, &RAM[offs] );
|
||||
}
|
||||
|
||||
static void aliens_banking( int lines )
|
||||
{
|
||||
aliens_rombank = lines;
|
||||
aliens_rombank_set();
|
||||
}
|
||||
|
||||
static MACHINE_INIT( aliens )
|
||||
{
|
||||
unsigned char *RAM = memory_region(REGION_CPU1);
|
||||
|
||||
konami_cpu_setlines_callback = aliens_banking;
|
||||
|
||||
/* init the default bank */
|
||||
cpu_setbank( 1, &RAM[0x10000] );
|
||||
/* init the default bank (0x10000) */
|
||||
aliens_rombank = 0x10;
|
||||
aliens_rombank_set();
|
||||
}
|
||||
|
||||
|
||||
@@ -462,6 +470,13 @@ static DRIVER_INIT( aliens )
|
||||
{
|
||||
konami_rom_deinterleave_2(REGION_GFX1);
|
||||
konami_rom_deinterleave_2(REGION_GFX2);
|
||||
|
||||
/* Save the ROM bank and the work RAM / palette switch, and map the
|
||||
saved bank again after loading, so a loaded save state runs the
|
||||
right code */
|
||||
state_save_register_int("aliens", 0, "rombank", &aliens_rombank);
|
||||
state_save_register_int("aliens", 0, "palette_selected", &palette_selected);
|
||||
state_save_register_func_postload(aliens_rombank_set);
|
||||
}
|
||||
|
||||
|
||||
|
||||
+36
-36
@@ -199,16 +199,15 @@ INPUT_PORTS_START( brkthru )
|
||||
PORT_DIPSETTING( 0x03, "3" )
|
||||
PORT_DIPSETTING( 0x01, "5" )
|
||||
PORT_BITX(0, 0x00, IPT_DIPSWITCH_SETTING | IPF_CHEAT, "99", IP_KEY_NONE, IP_JOY_NONE )
|
||||
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Bonus_Life ) )
|
||||
PORT_DIPSETTING( 0x00, "20000 Points Only" )
|
||||
PORT_DIPSETTING( 0x04, "10000/20000 Points" )
|
||||
PORT_DIPSETTING( 0x0c, "20000/30000 Points" )
|
||||
PORT_DIPSETTING( 0x08, "20000/40000 Points" )
|
||||
PORT_DIPNAME( 0x10, 0x10, "Allow Continue" )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( No ) )
|
||||
PORT_DIPSETTING( 0x10, DEF_STR( Yes ) )
|
||||
PORT_BIT_IMPULSE( 0x20, IP_ACTIVE_LOW, IPT_COIN1, 2 )
|
||||
PORT_BIT_IMPULSE( 0x20, IP_ACTIVE_LOW, IPT_COIN1, 2 ) /* Manual says Pitcure Flip=On, Normal=Off */
|
||||
PORT_BIT_IMPULSE( 0x40, IP_ACTIVE_LOW, IPT_COIN2, 2 )
|
||||
PORT_BIT_IMPULSE( 0x80, IP_ACTIVE_LOW, IPT_SERVICE1, 2 )
|
||||
|
||||
@@ -223,17 +222,18 @@ INPUT_PORTS_START( brkthru )
|
||||
PORT_DIPSETTING( 0x0c, DEF_STR( 1C_1C ) )
|
||||
PORT_DIPSETTING( 0x08, DEF_STR( 1C_2C ) )
|
||||
PORT_DIPSETTING( 0x04, DEF_STR( 1C_3C ) )
|
||||
PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Cabinet ) )
|
||||
PORT_DIPSETTING( 0x00, "Upright 1 Player" )
|
||||
PORT_DIPSETTING( 0x40, "Upright 2 Players" )
|
||||
/* PORT_DIPSETTING( 0x80, DEF_STR( Cocktail ) ) */ /* "Cocktail 1 Player" - IMPOSSIBLE !*/
|
||||
PORT_DIPSETTING( 0xc0, DEF_STR( Cocktail ) ) /* "Cocktail 2 Players"*/
|
||||
PORT_DIPNAME( 0x10, 0x10, "Enemy Vehicles" )
|
||||
PORT_DIPSETTING( 0x10, "Slow" )
|
||||
PORT_DIPSETTING( 0x00, "Fast" )
|
||||
PORT_DIPNAME( 0x20, 0x20, "Enemy Bullets" )
|
||||
PORT_DIPSETTING( 0x20, "Slow" )
|
||||
PORT_DIPSETTING( 0x00, "Fast" )
|
||||
PORT_DIPNAME( 0x40, 0x00, "Control Panel" )
|
||||
PORT_DIPSETTING( 0x40, DEF_STR( Upright ) ) /* 1 Player */
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) ) /* 2 Players */
|
||||
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Cabinet ) )
|
||||
PORT_DIPSETTING( 0x80, DEF_STR( Upright ) )
|
||||
PORT_DIPSETTING( 0xc0, DEF_STR( Cocktail ) )
|
||||
INPUT_PORTS_END
|
||||
|
||||
INPUT_PORTS_START( brkthruj )
|
||||
@@ -263,14 +263,13 @@ INPUT_PORTS_START( brkthruj )
|
||||
PORT_DIPSETTING( 0x03, "3" )
|
||||
PORT_DIPSETTING( 0x01, "5" )
|
||||
PORT_BITX(0, 0x00, IPT_DIPSWITCH_SETTING | IPF_CHEAT, "99", IP_KEY_NONE, IP_JOY_NONE )
|
||||
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Bonus_Life ) )
|
||||
PORT_DIPSETTING( 0x00, "20000 Points Only" )
|
||||
PORT_DIPSETTING( 0x04, "10000/20000 Points" )
|
||||
PORT_DIPSETTING( 0x0c, "20000/30000 Points" )
|
||||
PORT_DIPSETTING( 0x08, "20000/40000 Points" )
|
||||
PORT_SERVICE( 0x10, IP_ACTIVE_LOW )
|
||||
PORT_BIT_IMPULSE( 0x20, IP_ACTIVE_LOW, IPT_COIN1, 2 )
|
||||
PORT_BIT_IMPULSE( 0x20, IP_ACTIVE_LOW, IPT_COIN1, 2 ) /* Manual says Pitcure Flip=On, Normal=Off */
|
||||
PORT_BIT_IMPULSE( 0x40, IP_ACTIVE_LOW, IPT_COIN2, 2 )
|
||||
PORT_BIT_IMPULSE( 0x80, IP_ACTIVE_LOW, IPT_SERVICE1, 2 )
|
||||
|
||||
@@ -285,17 +284,18 @@ INPUT_PORTS_START( brkthruj )
|
||||
PORT_DIPSETTING( 0x0c, DEF_STR( 1C_1C ) )
|
||||
PORT_DIPSETTING( 0x08, DEF_STR( 1C_2C ) )
|
||||
PORT_DIPSETTING( 0x04, DEF_STR( 1C_3C ) )
|
||||
PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Cabinet ) )
|
||||
PORT_DIPSETTING( 0x00, "Upright 1 Player" )
|
||||
PORT_DIPSETTING( 0x40, "Upright 2 Players" )
|
||||
/* PORT_DIPSETTING( 0x80, DEF_STR( Cocktail ) ) */ /* "Cocktail 1 Player" - IMPOSSIBLE !*/
|
||||
PORT_DIPSETTING( 0xc0, DEF_STR( Cocktail ) ) /* "Cocktail 2 Players"*/
|
||||
PORT_DIPNAME( 0x10, 0x10, "Enemy Vehicles" )
|
||||
PORT_DIPSETTING( 0x10, "Slow" )
|
||||
PORT_DIPSETTING( 0x00, "Fast" )
|
||||
PORT_DIPNAME( 0x20, 0x20, "Enemy Bullets" )
|
||||
PORT_DIPSETTING( 0x20, "Slow" )
|
||||
PORT_DIPSETTING( 0x00, "Fast" )
|
||||
PORT_DIPNAME( 0x40, 0x00, "Control Panel" )
|
||||
PORT_DIPSETTING( 0x40, DEF_STR( Upright ) ) /* 1 Player */
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) ) /* 2 Players */
|
||||
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Cabinet ) )
|
||||
PORT_DIPSETTING( 0x80, DEF_STR( Upright ) )
|
||||
PORT_DIPSETTING( 0xc0, DEF_STR( Cocktail ) )
|
||||
INPUT_PORTS_END
|
||||
|
||||
INPUT_PORTS_START( darwin )
|
||||
|
||||
+295
-8
@@ -13,6 +13,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
#include "driver.h"
|
||||
#include "state.h"
|
||||
#include "vidhrdw/generic.h"
|
||||
#include "machine/eeprom.h"
|
||||
#include "ost_samples.h"
|
||||
@@ -231,20 +232,37 @@ static WRITE16_HANDLER( qsound_sharedram2_w )
|
||||
qsound_sharedram2[offset] = data;
|
||||
}
|
||||
|
||||
static int qsound_bank; /* Z80 bank, kept for save states */
|
||||
|
||||
static void qsound_banksw_set(void)
|
||||
{
|
||||
unsigned char *RAM = memory_region(REGION_CPU2);
|
||||
int bankaddress=0x10000+(qsound_bank*0x4000);
|
||||
if (bankaddress >= memory_region_length(REGION_CPU2))
|
||||
{
|
||||
log_cb(RETRO_LOG_DEBUG, LOGPRE "WARNING: Q sound bank overflow (%02x)\n", qsound_bank);
|
||||
bankaddress=0x10000;
|
||||
}
|
||||
cpu_setbank(1, &RAM[bankaddress]);
|
||||
}
|
||||
|
||||
static WRITE_HANDLER( qsound_banksw_w )
|
||||
{
|
||||
/*
|
||||
Z80 bank register for music note data. It's odd that it isn't encrypted
|
||||
though.
|
||||
*/
|
||||
unsigned char *RAM = memory_region(REGION_CPU2);
|
||||
int bankaddress=0x10000+((data&0x0f)*0x4000);
|
||||
if (bankaddress >= memory_region_length(REGION_CPU2))
|
||||
{
|
||||
log_cb(RETRO_LOG_DEBUG, LOGPRE "WARNING: Q sound bank overflow (%02x)\n", data);
|
||||
bankaddress=0x10000;
|
||||
}
|
||||
cpu_setbank(1, &RAM[bankaddress]);
|
||||
qsound_bank = data & 0x0f;
|
||||
qsound_banksw_set();
|
||||
}
|
||||
|
||||
/* Save the Z80 bank of the QSound games: after loading a save state the
|
||||
music code runs from the right bank again. */
|
||||
void cps_qsound_state_register(void)
|
||||
{
|
||||
qsound_bank = 0;
|
||||
state_save_register_int("qsound_z80", 0, "bank", &qsound_bank);
|
||||
state_save_register_func_postload(qsound_banksw_set);
|
||||
}
|
||||
|
||||
|
||||
@@ -4264,6 +4282,265 @@ ROM_START( daimakai )
|
||||
ROM_CONTINUE( 0x10000, 0x08000 )
|
||||
ROM_END
|
||||
|
||||
// Ghouls'n Ghosts - Artoria Edition hacks (GoodLuckTrying)
|
||||
ROM_START( ghoulsmaiden )
|
||||
ROM_REGION( CODE_SIZE, REGION_CPU1, 0 )
|
||||
ROM_LOAD16_BYTE( "dme_29maiden.10h", 0x00000, 0x20000, CRC(62bc0f9f) SHA1(cd715aa5ccad61bc2c038d32594843377d2ea8ab) )
|
||||
ROM_LOAD16_BYTE( "dme_30maiden.10j", 0x00001, 0x20000, CRC(3d770ee1) SHA1(a5f913923c078187b26783ef0baae3aed7361e66) )
|
||||
ROM_LOAD16_BYTE( "dme_27maiden.9h", 0x40000, 0x20000, CRC(717dfa2f) SHA1(64a0397e9203cdf0e92d07adef6de94a7ee3fd47) )
|
||||
ROM_LOAD16_BYTE( "dme_28maiden.9j", 0x40001, 0x20000, CRC(00136f06) SHA1(430d469717c3535a06d74d1df23c5fa348a87793) )
|
||||
ROM_LOAD16_WORD( "dm-17maiden.7j", 0x80000, 0x80000, CRC(f96c3f5d) SHA1(2be095270f3afe827306ef19df4ac3a3bfaeab35) )
|
||||
|
||||
ROM_REGION( 0x300000, REGION_GFX1, 0 )
|
||||
ROMX_LOAD( "dm-05maiden.3a", 0x000000, 0x80000, CRC(089d3e31) SHA1(e9f9406fc16686a98e1372bc09e7c51456315a66), ROM_GROUPWORD | ROM_SKIP(6) )
|
||||
ROMX_LOAD( "dm-07maiden.3f", 0x000002, 0x80000, CRC(b7b0567c) SHA1(f3d74ebd9daa4bdc7e91080f02f801e2ac9dd40d), ROM_GROUPWORD | ROM_SKIP(6) )
|
||||
ROMX_LOAD( "dm-06maiden.3c", 0x000004, 0x80000, CRC(92ca0ba1) SHA1(a5dd14e8cb0cb4c7f4ebad07cfc36abf148fcf78), ROM_GROUPWORD | ROM_SKIP(6) )
|
||||
ROMX_LOAD( "dm-08maiden.3g", 0x000006, 0x80000, CRC(0f39afc8) SHA1(44d499fd38e2e9155a843ab834bee4e91ced4375), ROM_GROUPWORD | ROM_SKIP(6) )
|
||||
ROMX_LOAD( "09maiden.4a", 0x200000, 0x10000, CRC(e99f777e) SHA1(015549b7745e7a1c26ae50450e5a3ff0116c64eb), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "18maiden.7a", 0x200001, 0x10000, CRC(9798c4be) SHA1(601a2122e774b5142d152d9666cbec0a512c0fae), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "13maiden.4e", 0x200002, 0x10000, CRC(d731677a) SHA1(53138a653737556023e384fb075c971ca0640235), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "22maiden.7e", 0x200003, 0x10000, CRC(e9282194) SHA1(47d635673d894725cb343b2753e2be632bcb23cd), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "11maiden.4c", 0x200004, 0x10000, CRC(f94717d0) SHA1(dc0e13727d0a2b4111f9fa64ca272986de822196), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "20maiden.7c", 0x200005, 0x10000, CRC(d2605c04) SHA1(e6e5343d1f3737a0cdd815c8045acc81f1e6587e), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "15maiden.4g", 0x200006, 0x10000, CRC(ad8a53ec) SHA1(48a763d5ab320a1b3ce9f8ec5319a6a854f34fca), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "24maiden.7g", 0x200007, 0x10000, CRC(ae66ab27) SHA1(3eb22952e3b6843e13d05f14b3ccaf7c504c7aeb), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "10maiden.4b", 0x280000, 0x10000, CRC(afce74dd) SHA1(a13d7a7e11f900d6f5a7273ca93e30f1e0a385b1), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "19maiden.7b", 0x280001, 0x10000, CRC(0b4e155f) SHA1(268188162286e12af63653d5f700263f6f3b70d4), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "14maiden.4f", 0x280002, 0x10000, CRC(5bc8e886) SHA1(17b727169c68b0ed3574bc321db4fbfd4d2f9266), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "23maiden.7f", 0x280003, 0x10000, CRC(095a6785) SHA1(659530f934c1f33067e9af71503b92da88315018), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "12maiden.4d", 0x280004, 0x10000, CRC(c8a5b7e9) SHA1(35b2f96994338816b29e1f65127f81d949a3a775), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "21maiden.7d", 0x280005, 0x10000, CRC(7d2f39f4) SHA1(6156385421104fef4e7b02bb1aba04f13aadb750), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "16maiden.4h", 0x280006, 0x10000, CRC(2913fa9b) SHA1(c37e526f5c647091cc45fa045f1e8049ec71483a), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "25maiden.7h", 0x280007, 0x10000, CRC(35d1b525) SHA1(e10226e6a34c827a44908384c37a0f9aaa74c934), ROM_SKIP(7) )
|
||||
|
||||
ROM_REGION( 0x18000, REGION_CPU2, 0 )
|
||||
ROM_LOAD( "26.10a", 0x00000, 0x08000, CRC(3692f6e5) SHA1(61b8438d60a39b4cf5062dff0a53228e8a4e4b5f) )
|
||||
ROM_CONTINUE( 0x10000, 0x08000 )
|
||||
|
||||
ROM_REGION( 0x8000, REGION_GFX2, 0 )
|
||||
ROM_COPY( REGION_GFX1, 0x000000, 0x000000, 0x8000 ) /* stars */
|
||||
ROM_END
|
||||
|
||||
ROM_START( ghoulsknight )
|
||||
ROM_REGION( CODE_SIZE, REGION_CPU1, 0 )
|
||||
ROM_LOAD16_BYTE( "dme_29knight.10h", 0x00000, 0x20000, CRC(a26366a2) SHA1(5fcbb7b594814d5dd074f17c61d2ef72467b89fc) )
|
||||
ROM_LOAD16_BYTE( "dme_30knight.10j", 0x00001, 0x20000, CRC(906bfbd9) SHA1(003d5cffd8ef23f349158136c0b6e34c93f4abbd) )
|
||||
ROM_LOAD16_BYTE( "dme_27knight.9h", 0x40000, 0x20000, CRC(0f80f588) SHA1(b0def403185ccbf0c373a868afcfe757e7b7caf8) )
|
||||
ROM_LOAD16_BYTE( "dme_28knight.9j", 0x40001, 0x20000, CRC(448bf481) SHA1(804a2e8a22153135c16a6388f69150049bd9c651) )
|
||||
ROM_LOAD16_WORD( "dm-17knight.7j", 0x80000, 0x80000, CRC(e856d9b6) SHA1(10a49dbba04c90c1676ad63a093c3b6f10345134) )
|
||||
|
||||
ROM_REGION( 0x300000, REGION_GFX1, 0 )
|
||||
ROMX_LOAD( "dm-05knight.3a", 0x000000, 0x80000, CRC(68381793) SHA1(1d82de2a42cac3a25faf3ffa04292303d08fcbc5), ROM_GROUPWORD | ROM_SKIP(6) )
|
||||
ROMX_LOAD( "dm-07knight.3f", 0x000002, 0x80000, CRC(fe68674d) SHA1(648645333767270fe859f275a1cacc816e0f05fe), ROM_GROUPWORD | ROM_SKIP(6) )
|
||||
ROMX_LOAD( "dm-06knight.3c", 0x000004, 0x80000, CRC(c0e27e48) SHA1(6a8f67c6ac4d2e720475fe6ec9160fd5b6de7916), ROM_GROUPWORD | ROM_SKIP(6) )
|
||||
ROMX_LOAD( "dm-08knight.3g", 0x000006, 0x80000, CRC(7be8f80a) SHA1(7b6c1f423fcf0dfeb2f2fd705b2aeed8345c4a5e), ROM_GROUPWORD | ROM_SKIP(6) )
|
||||
ROMX_LOAD( "09knight.4a", 0x200000, 0x10000, CRC(a726123a) SHA1(b9b5133ac838d98aa2eb0098ce6dc95e1ed36e19), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "18knight.7a", 0x200001, 0x10000, CRC(379d3bee) SHA1(8c65e0443cf7ff7695b103bc67d7288e156a613a), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "13knight.4e", 0x200002, 0x10000, CRC(eedbdd71) SHA1(603855bf2e046543bc6cab4708b1fde01c5593e0), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "22knight.7e", 0x200003, 0x10000, CRC(96a4311f) SHA1(02faedaffef031c0c446f1ec27d3de286094f0b3), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "11knight.4c", 0x200004, 0x10000, CRC(af590ecd) SHA1(38b1398600aa16b0adaa89813169977d2565cc9a), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "20knight.7c", 0x200005, 0x10000, CRC(00bdeef0) SHA1(6a2aa247a1bc2d467e4f1ae2c3f6b937d13310b0), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "15knight.4g", 0x200006, 0x10000, CRC(d409bf40) SHA1(a9d79df80e97391118c74571eed55cdb1a89da00), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "24knight.7g", 0x200007, 0x10000, CRC(fc91ec7c) SHA1(4d099e4fa67daab094997a217b3381340955e0ab), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "10knight.4b", 0x280000, 0x10000, CRC(08043aa8) SHA1(41dcf3219d1895489ef1db67226420f50264f9cc), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "19knight.7b", 0x280001, 0x10000, CRC(daca4bc1) SHA1(8566fff3073e2323eeb7e4b265e18808fb92e1a5), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "14knight.4f", 0x280002, 0x10000, CRC(0d7d3de4) SHA1(618025aaf21b622ad7beaff286bea01313015628), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "23knight.7f", 0x280003, 0x10000, CRC(53622c1c) SHA1(3546fa048823922d01d50fdbc9a717738c535eb6), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "12knight.4d", 0x280004, 0x10000, CRC(95efe854) SHA1(03bcdd7bf25637e1ab7166985093d14111699dc5), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "21knight.7d", 0x280005, 0x10000, CRC(5fd971cf) SHA1(dc2fb8e909cd4a5de1d637b750d383ad34480d2e), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "16knight.4h", 0x280006, 0x10000, CRC(5c63b626) SHA1(069b6efaac107abdf762db1edd025ec4d607bac2), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "25knight.7h", 0x280007, 0x10000, CRC(2556bc0e) SHA1(4f62a23bd7e43c6b00ef744de618d9b44e7d76f6), ROM_SKIP(7) )
|
||||
|
||||
ROM_REGION( 0x18000, REGION_CPU2, 0 )
|
||||
ROM_LOAD( "26.10a", 0x00000, 0x08000, CRC(3692f6e5) SHA1(61b8438d60a39b4cf5062dff0a53228e8a4e4b5f) )
|
||||
ROM_CONTINUE( 0x10000, 0x08000 )
|
||||
|
||||
ROM_REGION( 0x8000, REGION_GFX2, 0 )
|
||||
ROM_COPY( REGION_GFX1, 0x000000, 0x000000, 0x8000 ) /* stars */
|
||||
ROM_END
|
||||
|
||||
ROM_START( ghoulsumaiden )
|
||||
ROM_REGION( CODE_SIZE, REGION_CPU1, 0 )
|
||||
ROM_LOAD16_BYTE( "dmu_29maiden.10h", 0x00000, 0x20000, CRC(7ac6c63e) SHA1(669087b80001ea86181a889d7f1fc712ad94215a) )
|
||||
ROM_LOAD16_BYTE( "dmu_30maiden.10j", 0x00001, 0x20000, CRC(0a3d58f0) SHA1(89727371eed9188da622e9858cd90eea0a28cc97) )
|
||||
ROM_LOAD16_BYTE( "dmu_27maiden.9h", 0x40000, 0x20000, CRC(db966113) SHA1(0c0af55ba5ad550aa2f9548431cbc349d68a91be) )
|
||||
ROM_LOAD16_BYTE( "dmu_28maiden.9j", 0x40001, 0x20000, CRC(d6594f60) SHA1(54edb2db45974ccfad1c61697f50032342584556) )
|
||||
ROM_LOAD16_WORD( "dm-17maiden.7j", 0x80000, 0x80000, CRC(f96c3f5d) SHA1(2be095270f3afe827306ef19df4ac3a3bfaeab35) )
|
||||
|
||||
ROM_REGION( 0x300000, REGION_GFX1, 0 )
|
||||
ROMX_LOAD( "dm-05maiden.3a", 0x000000, 0x80000, CRC(089d3e31) SHA1(e9f9406fc16686a98e1372bc09e7c51456315a66), ROM_GROUPWORD | ROM_SKIP(6) )
|
||||
ROMX_LOAD( "dm-07maiden.3f", 0x000002, 0x80000, CRC(b7b0567c) SHA1(f3d74ebd9daa4bdc7e91080f02f801e2ac9dd40d), ROM_GROUPWORD | ROM_SKIP(6) )
|
||||
ROMX_LOAD( "dm-06maiden.3c", 0x000004, 0x80000, CRC(92ca0ba1) SHA1(a5dd14e8cb0cb4c7f4ebad07cfc36abf148fcf78), ROM_GROUPWORD | ROM_SKIP(6) )
|
||||
ROMX_LOAD( "dm-08maiden.3g", 0x000006, 0x80000, CRC(0f39afc8) SHA1(44d499fd38e2e9155a843ab834bee4e91ced4375), ROM_GROUPWORD | ROM_SKIP(6) )
|
||||
ROMX_LOAD( "09maiden.4a", 0x200000, 0x10000, CRC(e99f777e) SHA1(015549b7745e7a1c26ae50450e5a3ff0116c64eb), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "18maiden.7a", 0x200001, 0x10000, CRC(9798c4be) SHA1(601a2122e774b5142d152d9666cbec0a512c0fae), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "13maiden.4e", 0x200002, 0x10000, CRC(d731677a) SHA1(53138a653737556023e384fb075c971ca0640235), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "22maiden.7e", 0x200003, 0x10000, CRC(e9282194) SHA1(47d635673d894725cb343b2753e2be632bcb23cd), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "11maiden.4c", 0x200004, 0x10000, CRC(f94717d0) SHA1(dc0e13727d0a2b4111f9fa64ca272986de822196), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "20maiden.7c", 0x200005, 0x10000, CRC(d2605c04) SHA1(e6e5343d1f3737a0cdd815c8045acc81f1e6587e), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "15maiden.4g", 0x200006, 0x10000, CRC(ad8a53ec) SHA1(48a763d5ab320a1b3ce9f8ec5319a6a854f34fca), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "24maiden.7g", 0x200007, 0x10000, CRC(ae66ab27) SHA1(3eb22952e3b6843e13d05f14b3ccaf7c504c7aeb), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "10maiden.4b", 0x280000, 0x10000, CRC(afce74dd) SHA1(a13d7a7e11f900d6f5a7273ca93e30f1e0a385b1), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "19maiden.7b", 0x280001, 0x10000, CRC(0b4e155f) SHA1(268188162286e12af63653d5f700263f6f3b70d4), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "14maiden.4f", 0x280002, 0x10000, CRC(5bc8e886) SHA1(17b727169c68b0ed3574bc321db4fbfd4d2f9266), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "23maiden.7f", 0x280003, 0x10000, CRC(095a6785) SHA1(659530f934c1f33067e9af71503b92da88315018), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "12maiden.4d", 0x280004, 0x10000, CRC(c8a5b7e9) SHA1(35b2f96994338816b29e1f65127f81d949a3a775), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "21maiden.7d", 0x280005, 0x10000, CRC(7d2f39f4) SHA1(6156385421104fef4e7b02bb1aba04f13aadb750), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "16maiden.4h", 0x280006, 0x10000, CRC(2913fa9b) SHA1(c37e526f5c647091cc45fa045f1e8049ec71483a), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "25maiden.7h", 0x280007, 0x10000, CRC(35d1b525) SHA1(e10226e6a34c827a44908384c37a0f9aaa74c934), ROM_SKIP(7) )
|
||||
|
||||
ROM_REGION( 0x18000, REGION_CPU2, 0 )
|
||||
ROM_LOAD( "26.10a", 0x00000, 0x08000, CRC(3692f6e5) SHA1(61b8438d60a39b4cf5062dff0a53228e8a4e4b5f) )
|
||||
ROM_CONTINUE( 0x10000, 0x08000 )
|
||||
|
||||
ROM_REGION( 0x8000, REGION_GFX2, 0 )
|
||||
ROM_COPY( REGION_GFX1, 0x000000, 0x000000, 0x8000 ) /* stars */
|
||||
ROM_END
|
||||
|
||||
ROM_START( ghoulsuknight )
|
||||
ROM_REGION( CODE_SIZE, REGION_CPU1, 0 )
|
||||
ROM_LOAD16_BYTE( "dmu_29knight.10h", 0x00000, 0x20000, CRC(6b315490) SHA1(6b3ccff317295a772ea5c15ae3a2cb3ec16ba398) )
|
||||
ROM_LOAD16_BYTE( "dmu_30knight.10j", 0x00001, 0x20000, CRC(e3209d51) SHA1(e573a2649b83d9d57ccab60977a5a3e233c1733a) )
|
||||
ROM_LOAD16_BYTE( "dmu_27knight.9h", 0x40000, 0x20000, CRC(0cc89606) SHA1(87903a4f5e00b48573f2e3e5b12f4d202e485f7c) )
|
||||
ROM_LOAD16_BYTE( "dmu_28knight.9j", 0x40001, 0x20000, CRC(a263bde6) SHA1(5912b748a6f2949453634d50b5bdaaa567eaa1c3) )
|
||||
ROM_LOAD16_WORD( "dm-17knight.7j", 0x80000, 0x80000, CRC(e856d9b6) SHA1(10a49dbba04c90c1676ad63a093c3b6f10345134) )
|
||||
|
||||
ROM_REGION( 0x300000, REGION_GFX1, 0 )
|
||||
ROMX_LOAD( "dm-05knight.3a", 0x000000, 0x80000, CRC(68381793) SHA1(1d82de2a42cac3a25faf3ffa04292303d08fcbc5), ROM_GROUPWORD | ROM_SKIP(6) )
|
||||
ROMX_LOAD( "dm-07knight.3f", 0x000002, 0x80000, CRC(fe68674d) SHA1(648645333767270fe859f275a1cacc816e0f05fe), ROM_GROUPWORD | ROM_SKIP(6) )
|
||||
ROMX_LOAD( "dm-06knight.3c", 0x000004, 0x80000, CRC(c0e27e48) SHA1(6a8f67c6ac4d2e720475fe6ec9160fd5b6de7916), ROM_GROUPWORD | ROM_SKIP(6) )
|
||||
ROMX_LOAD( "dm-08knight.3g", 0x000006, 0x80000, CRC(7be8f80a) SHA1(7b6c1f423fcf0dfeb2f2fd705b2aeed8345c4a5e), ROM_GROUPWORD | ROM_SKIP(6) )
|
||||
ROMX_LOAD( "09knight.4a", 0x200000, 0x10000, CRC(a726123a) SHA1(b9b5133ac838d98aa2eb0098ce6dc95e1ed36e19), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "18knight.7a", 0x200001, 0x10000, CRC(379d3bee) SHA1(8c65e0443cf7ff7695b103bc67d7288e156a613a), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "13knight.4e", 0x200002, 0x10000, CRC(eedbdd71) SHA1(603855bf2e046543bc6cab4708b1fde01c5593e0), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "22knight.7e", 0x200003, 0x10000, CRC(96a4311f) SHA1(02faedaffef031c0c446f1ec27d3de286094f0b3), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "11knight.4c", 0x200004, 0x10000, CRC(af590ecd) SHA1(38b1398600aa16b0adaa89813169977d2565cc9a), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "20knight.7c", 0x200005, 0x10000, CRC(00bdeef0) SHA1(6a2aa247a1bc2d467e4f1ae2c3f6b937d13310b0), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "15knight.4g", 0x200006, 0x10000, CRC(d409bf40) SHA1(a9d79df80e97391118c74571eed55cdb1a89da00), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "24knight.7g", 0x200007, 0x10000, CRC(fc91ec7c) SHA1(4d099e4fa67daab094997a217b3381340955e0ab), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "10knight.4b", 0x280000, 0x10000, CRC(08043aa8) SHA1(41dcf3219d1895489ef1db67226420f50264f9cc), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "19knight.7b", 0x280001, 0x10000, CRC(daca4bc1) SHA1(8566fff3073e2323eeb7e4b265e18808fb92e1a5), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "14knight.4f", 0x280002, 0x10000, CRC(0d7d3de4) SHA1(618025aaf21b622ad7beaff286bea01313015628), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "23knight.7f", 0x280003, 0x10000, CRC(53622c1c) SHA1(3546fa048823922d01d50fdbc9a717738c535eb6), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "12knight.4d", 0x280004, 0x10000, CRC(95efe854) SHA1(03bcdd7bf25637e1ab7166985093d14111699dc5), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "21knight.7d", 0x280005, 0x10000, CRC(5fd971cf) SHA1(dc2fb8e909cd4a5de1d637b750d383ad34480d2e), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "16knight.4h", 0x280006, 0x10000, CRC(5c63b626) SHA1(069b6efaac107abdf762db1edd025ec4d607bac2), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "25knight.7h", 0x280007, 0x10000, CRC(2556bc0e) SHA1(4f62a23bd7e43c6b00ef744de618d9b44e7d76f6), ROM_SKIP(7) )
|
||||
|
||||
ROM_REGION( 0x18000, REGION_CPU2, 0 )
|
||||
ROM_LOAD( "26.10a", 0x00000, 0x08000, CRC(3692f6e5) SHA1(61b8438d60a39b4cf5062dff0a53228e8a4e4b5f) )
|
||||
ROM_CONTINUE( 0x10000, 0x08000 )
|
||||
|
||||
ROM_REGION( 0x8000, REGION_GFX2, 0 )
|
||||
ROM_COPY( REGION_GFX1, 0x000000, 0x000000, 0x8000 ) /* stars */
|
||||
ROM_END
|
||||
|
||||
ROM_START( daimakaimaiden )
|
||||
ROM_REGION( CODE_SIZE, REGION_CPU1, 0 )
|
||||
ROM_LOAD16_BYTE( "dmj_38maiden.12f", 0x00000, 0x20000, CRC(7f436646) SHA1(dd60f7757418e0b682c3d14ab1f077668aa328f6) )
|
||||
ROM_LOAD16_BYTE( "dmj_39maiden.12h", 0x00001, 0x20000, CRC(ebc72dee) SHA1(f82157fdacfe6496398b8702cb4e97a3bcb750c5) )
|
||||
ROM_LOAD16_BYTE( "dmj_40maiden.13f", 0x40000, 0x20000, CRC(a8371817) SHA1(56f2be6fba857d026da3a0d4e801edd0e6e53d10) )
|
||||
ROM_LOAD16_BYTE( "dmj_41maiden.13h", 0x40001, 0x20000, CRC(cd7de9bb) SHA1(77dcf1128ae8fd2c5ef3ff9800f69aa875c56436) )
|
||||
ROM_LOAD16_BYTE( "dm_33maiden.10f", 0x80000, 0x20000, CRC(0e47e3b3) SHA1(3e0b12607f5745c5b4a789e68307cfd08da1ac18) )
|
||||
ROM_LOAD16_BYTE( "dm_34maiden.10h", 0x80001, 0x20000, CRC(d9675957) SHA1(43fd195995ec311bde79f6a17c47e938baaae545) )
|
||||
ROM_LOAD16_BYTE( "dm_35maiden.11f", 0xc0000, 0x20000, CRC(c04b85c8) SHA1(f8659624bb9d418d02f63f43478d3b53cfe18718) )
|
||||
ROM_LOAD16_BYTE( "dm_36maiden.11h", 0xc0001, 0x20000, CRC(89be83de) SHA1(6dfd1380304a85dee7cac4d0b2cfd7625b9020bf) )
|
||||
|
||||
ROM_REGION( 0x300000, REGION_GFX1, 0 )
|
||||
ROMX_LOAD( "dm_02maiden.4b", 0x000000, 0x20000, CRC(e195234d) SHA1(e83fe906577ff9a55c6222b148ae616eee71f9bd), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "dm_01maiden.4a", 0x000001, 0x20000, CRC(bf40447c) SHA1(129f989307618346d4d0f048cf0975fcd9ac85ba), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "dm_10maiden.9b", 0x000002, 0x20000, CRC(64506deb) SHA1(81795caef6c183c26597e69f0ca4dc2f46a97a9b), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "dm_09maiden.9a", 0x000003, 0x20000, CRC(6db846bf) SHA1(3031a7a754cc8a45265663d5d13c588ed1a2e3e4), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "dm_18maiden.5e", 0x000004, 0x20000, CRC(3d707890) SHA1(1fb13ac4f4d458c1d8429cb18b3cb0c755582c8f), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "dm_17maiden.5c", 0x000005, 0x20000, CRC(25adb6e2) SHA1(e57207799427f9372052a886be92aadd1521f9b2), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "dm_30maiden.8h", 0x000006, 0x20000, CRC(29bb7d32) SHA1(fbf501e9674e64528846c1b4bdf1c50350e2163e), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "dm_29maiden.8f", 0x000007, 0x20000, CRC(d99c38e0) SHA1(0d1a2a391a63eb723a07cec051daadaba8bd93b2), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "dm_04maiden.5b", 0x100000, 0x20000, CRC(a4f4f8f0) SHA1(edca0f61b40a18afe279f7007c233064130cfb4f), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "dm_03maiden.5a", 0x100001, 0x20000, CRC(b1033e62) SHA1(547fc281dd9e7a74ac86c3692508c7bde9b6167b), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "dm_12maiden.10b", 0x100002, 0x20000, CRC(10fdd76a) SHA1(aee774d6323292799dff7a30ef9559c92fe5507a), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "dm_11maiden.10a", 0x100003, 0x20000, CRC(9040cb04) SHA1(b32e9056fc20a5162868eade10f3ef5efc167a28), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "dm_20maiden.7e", 0x100004, 0x20000, CRC(281d0b3e) SHA1(70e1813de184ad0ec164145b7b843b5e387494e3), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "dm_19maiden.7c", 0x100005, 0x20000, CRC(2623b52f) SHA1(fc4200924452bfbff687934782398ed345dc0aa0), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "dm_32maiden.9h", 0x100006, 0x20000, CRC(99692344) SHA1(67dc70618568b7c0adcb00a612aaf5501f6c8c0f), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "dm_31maiden.9f", 0x100007, 0x20000, CRC(54acb729) SHA1(d1fca43db36253fd19db4337c49272a6cadff597), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "dm_06maiden.7b", 0x200000, 0x10000, CRC(e99f777e) SHA1(015549b7745e7a1c26ae50450e5a3ff0116c64eb), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "dm_05maiden.7a", 0x200001, 0x10000, CRC(9798c4be) SHA1(601a2122e774b5142d152d9666cbec0a512c0fae), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "dm_14maiden.11b", 0x200002, 0x10000, CRC(d731677a) SHA1(53138a653737556023e384fb075c971ca0640235), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "dm_13maiden.11a", 0x200003, 0x10000, CRC(e9282194) SHA1(47d635673d894725cb343b2753e2be632bcb23cd), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "dm_22maiden.8e", 0x200004, 0x10000, CRC(f94717d0) SHA1(dc0e13727d0a2b4111f9fa64ca272986de822196), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "dm_21maiden.8c", 0x200005, 0x10000, CRC(d2605c04) SHA1(e6e5343d1f3737a0cdd815c8045acc81f1e6587e), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "dm_26maiden.10e", 0x200006, 0x10000, CRC(ad8a53ec) SHA1(48a763d5ab320a1b3ce9f8ec5319a6a854f34fca), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "dm_25maiden.10c", 0x200007, 0x10000, CRC(ae66ab27) SHA1(3eb22952e3b6843e13d05f14b3ccaf7c504c7aeb), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "dm_08maiden.8b", 0x280000, 0x10000, CRC(afce74dd) SHA1(a13d7a7e11f900d6f5a7273ca93e30f1e0a385b1), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "dm_07maiden.8a", 0x280001, 0x10000, CRC(0b4e155f) SHA1(268188162286e12af63653d5f700263f6f3b70d4), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "dm_16maiden.12b", 0x280002, 0x10000, CRC(5bc8e886) SHA1(17b727169c68b0ed3574bc321db4fbfd4d2f9266), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "dm_15maiden.12a", 0x280003, 0x10000, CRC(095a6785) SHA1(659530f934c1f33067e9af71503b92da88315018), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "dm_24maiden.9e", 0x280004, 0x10000, CRC(c8a5b7e9) SHA1(35b2f96994338816b29e1f65127f81d949a3a775), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "dm_23maiden.9c", 0x280005, 0x10000, CRC(7d2f39f4) SHA1(6156385421104fef4e7b02bb1aba04f13aadb750), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "dm_28maiden.11e", 0x280006, 0x10000, CRC(2913fa9b) SHA1(c37e526f5c647091cc45fa045f1e8049ec71483a), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "dm_27maiden.11c", 0x280007, 0x10000, CRC(35d1b525) SHA1(e10226e6a34c827a44908384c37a0f9aaa74c934), ROM_SKIP(7) )
|
||||
|
||||
ROM_REGION( 0x18000, REGION_CPU2, 0 )
|
||||
ROM_LOAD( "37.13c", 0x00000, 0x08000, CRC(3692f6e5) SHA1(61b8438d60a39b4cf5062dff0a53228e8a4e4b5f) )
|
||||
ROM_CONTINUE( 0x10000, 0x08000 )
|
||||
|
||||
ROM_REGION( 0x8000, REGION_GFX2, 0 )
|
||||
ROM_COPY( REGION_GFX1, 0x000000, 0x000000, 0x8000 ) /* stars */
|
||||
ROM_END
|
||||
|
||||
ROM_START( daimakaiknight )
|
||||
ROM_REGION( CODE_SIZE, REGION_CPU1, 0 )
|
||||
ROM_LOAD16_BYTE( "dmj_38knight.12f", 0x00000, 0x20000, CRC(3098aca7) SHA1(ac1f175deffd486eab177f0c6c3992802c24dd49) )
|
||||
ROM_LOAD16_BYTE( "dmj_39knight.12h", 0x00001, 0x20000, CRC(222d253b) SHA1(7c26d6a0fe204a83dfc9cba6db7ed2635a7b9f7b) )
|
||||
ROM_LOAD16_BYTE( "dmj_40knight.13f", 0x40000, 0x20000, CRC(1050f528) SHA1(c09ddd0f63e093ad1e6c50782db4ffa21114c6e1) )
|
||||
ROM_LOAD16_BYTE( "dmj_41knight.13h", 0x40001, 0x20000, CRC(bff07623) SHA1(2f8d6980ae5a3f798fd3296185f14fb59b8a472a) )
|
||||
ROM_LOAD16_BYTE( "dm_33knight.10f", 0x80000, 0x20000, CRC(37619c8a) SHA1(39782b4285fbf103b2a820d745dc56ae1a1e9def) )
|
||||
ROM_LOAD16_BYTE( "dm_34knight.10h", 0x80001, 0x20000, CRC(f92dc399) SHA1(eb92ba0d28e22c6f3c6f16396017ed45c4932487) )
|
||||
ROM_LOAD16_BYTE( "dm_35knight.11f", 0xc0000, 0x20000, CRC(c04b85c8) SHA1(f8659624bb9d418d02f63f43478d3b53cfe18718) )
|
||||
ROM_LOAD16_BYTE( "dm_36knight.11h", 0xc0001, 0x20000, CRC(89be83de) SHA1(6dfd1380304a85dee7cac4d0b2cfd7625b9020bf) )
|
||||
|
||||
ROM_REGION( 0x300000, REGION_GFX1, 0 )
|
||||
ROMX_LOAD( "dm_02knight.4b", 0x000000, 0x20000, CRC(27bd1d69) SHA1(464ba1ec2ccb7997a9bcce6a024b3f4f62cbbb6d), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "dm_01knight.4a", 0x000001, 0x20000, CRC(e8ba76ec) SHA1(9c285eb2377155973aa2d06cec86c116e8db8c28), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "dm_10knight.9b", 0x000002, 0x20000, CRC(44d222eb) SHA1(874da73471bf67aa59aefd03ccbb41b5a3ad26e9), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "dm_09knight.9a", 0x000003, 0x20000, CRC(5561f7df) SHA1(27aac04774b098fb97847cac0ebe7bdaa7583c65), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "dm_18knight.5e", 0x000004, 0x20000, CRC(a65e9f34) SHA1(6f4f293189bf487dc3b32539b7698da523eba7b0), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "dm_17knight.5c", 0x000005, 0x20000, CRC(3f84db19) SHA1(d33389b29d09bc711bed91769ca588795908b313), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "dm_30knight.8h", 0x000006, 0x20000, CRC(500840f2) SHA1(85efda21fd449a68d8daec435dd2da301b9dd738), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "dm_29knight.8f", 0x000007, 0x20000, CRC(bafb92de) SHA1(0d221a7004f197a95081be728ee0a54316d9b406), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "dm_04knight.5b", 0x100000, 0x20000, CRC(a4f4f8f0) SHA1(edca0f61b40a18afe279f7007c233064130cfb4f), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "dm_03knight.5a", 0x100001, 0x20000, CRC(b1033e62) SHA1(547fc281dd9e7a74ac86c3692508c7bde9b6167b), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "dm_12knight.10b", 0x100002, 0x20000, CRC(10fdd76a) SHA1(aee774d6323292799dff7a30ef9559c92fe5507a), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "dm_11knight.10a", 0x100003, 0x20000, CRC(9040cb04) SHA1(b32e9056fc20a5162868eade10f3ef5efc167a28), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "dm_20knight.7e", 0x100004, 0x20000, CRC(281d0b3e) SHA1(70e1813de184ad0ec164145b7b843b5e387494e3), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "dm_19knight.7c", 0x100005, 0x20000, CRC(2623b52f) SHA1(fc4200924452bfbff687934782398ed345dc0aa0), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "dm_32knight.9h", 0x100006, 0x20000, CRC(99692344) SHA1(67dc70618568b7c0adcb00a612aaf5501f6c8c0f), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "dm_31knight.9f", 0x100007, 0x20000, CRC(54acb729) SHA1(d1fca43db36253fd19db4337c49272a6cadff597), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "dm_06knight.7b", 0x200000, 0x10000, CRC(a726123a) SHA1(b9b5133ac838d98aa2eb0098ce6dc95e1ed36e19), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "dm_05knight.7a", 0x200001, 0x10000, CRC(379d3bee) SHA1(8c65e0443cf7ff7695b103bc67d7288e156a613a), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "dm_14knight.11b", 0x200002, 0x10000, CRC(eedbdd71) SHA1(603855bf2e046543bc6cab4708b1fde01c5593e0), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "dm_13knight.11a", 0x200003, 0x10000, CRC(96a4311f) SHA1(02faedaffef031c0c446f1ec27d3de286094f0b3), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "dm_22knight.8e", 0x200004, 0x10000, CRC(af590ecd) SHA1(38b1398600aa16b0adaa89813169977d2565cc9a), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "dm_21knight.8c", 0x200005, 0x10000, CRC(00bdeef0) SHA1(6a2aa247a1bc2d467e4f1ae2c3f6b937d13310b0), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "dm_26knight.10e", 0x200006, 0x10000, CRC(d409bf40) SHA1(a9d79df80e97391118c74571eed55cdb1a89da00), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "dm_25knight.10c", 0x200007, 0x10000, CRC(fc91ec7c) SHA1(4d099e4fa67daab094997a217b3381340955e0ab), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "dm_08knight.8b", 0x280000, 0x10000, CRC(08043aa8) SHA1(41dcf3219d1895489ef1db67226420f50264f9cc), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "dm_07knight.8a", 0x280001, 0x10000, CRC(daca4bc1) SHA1(8566fff3073e2323eeb7e4b265e18808fb92e1a5), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "dm_16knight.12b", 0x280002, 0x10000, CRC(0d7d3de4) SHA1(618025aaf21b622ad7beaff286bea01313015628), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "dm_15knight.12a", 0x280003, 0x10000, CRC(53622c1c) SHA1(3546fa048823922d01d50fdbc9a717738c535eb6), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "dm_24knight.9e", 0x280004, 0x10000, CRC(95efe854) SHA1(03bcdd7bf25637e1ab7166985093d14111699dc5), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "dm_23knight.9c", 0x280005, 0x10000, CRC(5fd971cf) SHA1(dc2fb8e909cd4a5de1d637b750d383ad34480d2e), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "dm_28knight.11e", 0x280006, 0x10000, CRC(5c63b626) SHA1(069b6efaac107abdf762db1edd025ec4d607bac2), ROM_SKIP(7) )
|
||||
ROMX_LOAD( "dm_27knight.11c", 0x280007, 0x10000, CRC(2556bc0e) SHA1(4f62a23bd7e43c6b00ef744de618d9b44e7d76f6), ROM_SKIP(7) )
|
||||
|
||||
ROM_REGION( 0x18000, REGION_CPU2, 0 )
|
||||
ROM_LOAD( "37.13c", 0x00000, 0x08000, CRC(3692f6e5) SHA1(61b8438d60a39b4cf5062dff0a53228e8a4e4b5f) )
|
||||
ROM_CONTINUE( 0x10000, 0x08000 )
|
||||
|
||||
ROM_REGION( 0x8000, REGION_GFX2, 0 )
|
||||
ROM_COPY( REGION_GFX1, 0x000000, 0x000000, 0x8000 ) /* stars */
|
||||
ROM_END
|
||||
|
||||
ROM_START( strider )
|
||||
ROM_REGION( CODE_SIZE, REGION_CPU1, 0 ) /* 68000 code */
|
||||
ROM_LOAD16_BYTE( "strider.30", 0x00000, 0x20000, CRC(da997474) SHA1(3e4ac98f9a6967d61899281b31c7de779723397b) )
|
||||
@@ -7804,24 +8081,28 @@ static DRIVER_INIT( wof )
|
||||
{
|
||||
wof_decode();
|
||||
init_cps1();
|
||||
cps_qsound_state_register();
|
||||
}
|
||||
|
||||
static DRIVER_INIT( dino )
|
||||
{
|
||||
dino_decode();
|
||||
init_cps1();
|
||||
cps_qsound_state_register();
|
||||
}
|
||||
|
||||
static DRIVER_INIT( punisher )
|
||||
{
|
||||
punisher_decode();
|
||||
init_cps1();
|
||||
cps_qsound_state_register();
|
||||
}
|
||||
|
||||
static DRIVER_INIT( slammast )
|
||||
{
|
||||
slammast_decode();
|
||||
init_cps1();
|
||||
cps_qsound_state_register();
|
||||
}
|
||||
|
||||
static DRIVER_INIT( pang3 )
|
||||
@@ -7854,6 +8135,12 @@ GAME( 1988, lostwrld, forgottn, forgottn, forgottn, cps1, ROT0, "
|
||||
GAME( 1988, ghouls, 0, cps1, ghouls, cps1, ROT0, "Capcom", "Ghouls'n Ghosts (World)" ) /* Wed.26.10.1988 in the ROMS*/
|
||||
GAME( 1988, ghoulsu, ghouls, cps1, ghoulsu, cps1, ROT0, "Capcom", "Ghouls'n Ghosts (US)" ) /* Wed.26.10.1988 in the ROMS*/
|
||||
GAME( 1988, daimakai, ghouls, cps1_12mhz, daimakai, cps1, ROT0, "Capcom", "Dai Makai-Mura (Japan)" ) /* Wed.26.10.1988 in the ROMS*/
|
||||
GAME( 2026, ghoulsmaiden, ghouls, cps1, ghouls, cps1, ROT0, "hack (GoodLuckTrying)", "Ghouls'n Ghosts - Maiden Artoria Edition (World)" )
|
||||
GAME( 2026, ghoulsknight, ghouls, cps1, ghouls, cps1, ROT0, "hack (GoodLuckTrying)", "Ghouls'n Ghosts - Knight Artoria Edition (World)" )
|
||||
GAME( 2026, ghoulsumaiden, ghoulsu, cps1, ghoulsu, cps1, ROT0, "hack (GoodLuckTrying)", "Ghouls'n Ghosts - Maiden Artoria Edition (USA)" )
|
||||
GAME( 2026, ghoulsuknight, ghoulsu, cps1, ghoulsu, cps1, ROT0, "hack (GoodLuckTrying)", "Ghouls'n Ghosts - Knight Artoria Edition (USA)" )
|
||||
GAME( 2026, daimakaimaiden, ghouls, cps1_12mhz, daimakai, cps1, ROT0, "hack (GoodLuckTrying)", "Daimakaimura - Maiden Artoria Edition (Japan)" )
|
||||
GAME( 2026, daimakaiknight, ghouls, cps1_12mhz, daimakai, cps1, ROT0, "hack (GoodLuckTrying)", "Daimakaimura - Knight Artoria Edition (Japan)" )
|
||||
GAME( 1989, strider, 0, cps1, strider, cps1, ROT0, "Capcom", "Strider (US set 1)" )
|
||||
GAME( 1989, stridrua, strider, cps1, stridrua, cps1, ROT0, "Capcom", "Strider (US set 2)" )
|
||||
GAME( 1989, striderj, strider, cps1_12mhz, strider, cps1, ROT0, "Capcom", "Strider Hiryu (Japan set 1)" )
|
||||
|
||||
+1341
-1341
File diff suppressed because it is too large.
Load diff
+1
-1
@@ -1221,7 +1221,7 @@ static struct GfxDecodeInfo gfxdecodeinfo[] =
|
||||
|
||||
static struct GfxDecodeInfo spyhunt_gfxdecodeinfo[] =
|
||||
{
|
||||
{ REGION_GFX1, 0, &spyhunt_charlayout, 1*16, 1 },
|
||||
{ REGION_GFX1, 0, &spyhunt_charlayout, 3*16, 1 },
|
||||
{ REGION_GFX2, 0, &mcr_sprite_layout, 0*16, 4 },
|
||||
{ REGION_GFX3, 0, &spyhunt_alphalayout, 4*16, 1 },
|
||||
{ -1 } /* end of array */
|
||||
|
||||
+269
-6
@@ -247,6 +247,12 @@ extern UINT16 scanbase;
|
||||
|
||||
******************************************************************************/
|
||||
|
||||
/* Mega Play: H-INT/V-INT are cleared by the 68000 interrupt acknowledge
|
||||
(see genesis_irq_ack_callback) instead of timing out; also selects the
|
||||
corrected HBLANK status bit in vidhrdw/segac2_vidhrdw.c */
|
||||
int genesis_vdp_iack;
|
||||
void segac2_vdp_set_vblank(void);
|
||||
|
||||
/* call this whenever the interrupt state has changed */
|
||||
static void update_interrupts(void)
|
||||
{
|
||||
@@ -254,8 +260,20 @@ static void update_interrupts(void)
|
||||
|
||||
/* determine which interrupt is active */
|
||||
if (ym3438_int) level = 2;
|
||||
if (scanline_int) level = 4;
|
||||
if (vblank_int) level = 6;
|
||||
if (genesis_vdp_iack)
|
||||
{
|
||||
/* Mega Play: a pending H-INT/V-INT only drives the line while it is
|
||||
enabled in VDP register 0/1, as on the real 315-5313 (Mazin Wars masks
|
||||
H-INT this way while its V-INT handler borrows a5/a6, which its H-INT
|
||||
handler jumps through) */
|
||||
if (scanline_int && (segac2_vdp_regs[0] & 0x10)) level = 4;
|
||||
if (vblank_int && (segac2_vdp_regs[1] & 0x20)) level = 6;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (scanline_int) level = 4;
|
||||
if (vblank_int) level = 6;
|
||||
}
|
||||
|
||||
/* either set or clear the appropriate lines */
|
||||
if (level)
|
||||
@@ -282,7 +300,9 @@ static void vdp_reload_counter(int scanline)
|
||||
{
|
||||
scanline_int = 1;
|
||||
update_interrupts();
|
||||
timer_set(cpu_getscanlinetime(scanline + 1), 0, vdp_int4_off);
|
||||
/* with IACK emulation the line stays asserted until the 68000 takes it */
|
||||
if (!genesis_vdp_iack)
|
||||
timer_set(cpu_getscanlinetime(scanline + 1), 0, vdp_int4_off);
|
||||
}
|
||||
|
||||
/* advance to the next scanline */
|
||||
@@ -307,8 +327,38 @@ static void vdp_int6_off(int param)
|
||||
|
||||
|
||||
/* interrupt callback to generate the VBLANK interrupt */
|
||||
/* Mega Play: V-INT raised shortly after the VBLANK status bit */
|
||||
static void genesis_vint_delayed(int param)
|
||||
{
|
||||
/* the pending flag is always set; update_interrupts() gates it with R1 */
|
||||
vblank_int = 1;
|
||||
update_interrupts();
|
||||
}
|
||||
|
||||
/* called by the VDP after a write to R0/R1 (Mega Play only) */
|
||||
void segac2_vdp_irq_update(void)
|
||||
{
|
||||
if (genesis_vdp_iack)
|
||||
update_interrupts();
|
||||
}
|
||||
|
||||
static INTERRUPT_GEN( vblank_interrupt )
|
||||
{
|
||||
/* with IACK emulation V-INT stays pending until the 68000 takes it, so it
|
||||
is not lost while an H-INT handler has the interrupts masked; as on the
|
||||
real 315-5313 it only drives the 68000 while enabled in VDP register 1 */
|
||||
if (genesis_vdp_iack)
|
||||
{
|
||||
/* the VBLANK status bit rises first and V-INT follows about 788 master
|
||||
clocks later (~112 68000 cycles): code polling the status bit gets to
|
||||
see VBLANK before the interrupt takes over. Mazin Wars depends on it:
|
||||
its V-INT handler outlasts the blanking period, so without the gap its
|
||||
main loop never sees VBLANK and hangs in a fade loop after coin-up. */
|
||||
segac2_vdp_set_vblank();
|
||||
timer_set(TIME_IN_USEC(788.0 * 1000000.0 / 53693100.0), 0, genesis_vint_delayed);
|
||||
return;
|
||||
}
|
||||
|
||||
/* generate the interrupt */
|
||||
vblank_int = 1;
|
||||
update_interrupts();
|
||||
@@ -354,6 +404,8 @@ static MACHINE_INIT( segac2 )
|
||||
|
||||
static MACHINE_INIT( genesis )
|
||||
{
|
||||
genesis_vdp_iack = 0;
|
||||
|
||||
/* the following ensures that the Z80 begins without running away from 0 */
|
||||
/* 0x76 is just a forced 'halt' as soon as the CPU is initially run */
|
||||
genesis_z80_ram[0] = 0x76;
|
||||
@@ -380,6 +432,36 @@ static MACHINE_INIT( megatech )
|
||||
machine_init_genesis();
|
||||
}
|
||||
|
||||
/* On the real 315-5313 VDP the H-INT (level 4) and V-INT (level 6) pending
|
||||
flags are cleared when the 68000 acknowledges the interrupt.
|
||||
The old timed pulses break games that use H-INT on every line:
|
||||
- IRQ4 held for a whole scanline re-enters a short H-INT handler over and
|
||||
over and the main program starves;
|
||||
- IRQ6 dropped after 22 pixels is lost when the H-INT handler of line 223
|
||||
still has the interrupts masked, so the game never sees V-INT again.
|
||||
Gunstar Heroes hits both (68000 stuck at $FFEE04, its H-INT handler in RAM). */
|
||||
static int genesis_irq_ack_callback(int irqline)
|
||||
{
|
||||
int level = 0;
|
||||
|
||||
if (irqline == 4)
|
||||
scanline_int = 0;
|
||||
else if (irqline == 6)
|
||||
vblank_int = 0;
|
||||
|
||||
if (ym3438_int) level = 2;
|
||||
if (scanline_int && (segac2_vdp_regs[0] & 0x10)) level = 4;
|
||||
if (vblank_int && (segac2_vdp_regs[1] & 0x20)) level = 6;
|
||||
|
||||
/* drop the line now (an immediate clear cannot re-enter the CPU core),
|
||||
then re-assert whatever is still pending */
|
||||
activecpu_set_irq_line(7, INTERNAL_CLEAR_LINE);
|
||||
if (level)
|
||||
cpu_set_irq_line(0, level, ASSERT_LINE);
|
||||
|
||||
return MC68000_INT_ACK_AUTOVECTOR;
|
||||
}
|
||||
|
||||
static MACHINE_INIT( megaplay )
|
||||
{
|
||||
/* unsigned char* ram = memory_region(REGION_CPU3); */
|
||||
@@ -390,6 +472,10 @@ static MACHINE_INIT( megaplay )
|
||||
cpu_setbank(3, &genesis_68k_ram[0]);
|
||||
|
||||
machine_init_genesis();
|
||||
|
||||
genesis_vdp_iack = 1;
|
||||
scanline_int = vblank_int = 0;
|
||||
cpu_set_irq_callback(0, genesis_irq_ack_callback);
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
@@ -1606,7 +1692,12 @@ READ16_HANDLER ( megaplay_genesis_io_r )
|
||||
return_value = readinputport(1) & (genesis_io_ram[4]^0xff);
|
||||
else
|
||||
{
|
||||
return_value = readinputport(2) & (genesis_io_ram[4]^0xff);
|
||||
/* the pad's Start line is driven by the BIOS (bit 4 of $6203,
|
||||
active low), not by the Start button: the BIOS reads the button
|
||||
on its own port and passes it on only when the game may start
|
||||
(Mazin Wars expects exactly this). Same as current MAME. */
|
||||
return_value = (readinputport(2) & ~0x20 & 0xff) | ((bios_bank & 0x10) ? 0x20 : 0x00);
|
||||
return_value &= (genesis_io_ram[4]^0xff);
|
||||
return_value |= readinputport(1) & 0x03;
|
||||
}
|
||||
return_value = (genesis_io_ram[offset] & 0x80) | return_value;
|
||||
@@ -1619,7 +1710,9 @@ READ16_HANDLER ( megaplay_genesis_io_r )
|
||||
return_value = readinputport(3) & (genesis_io_ram[5]^0xff);
|
||||
else
|
||||
{
|
||||
return_value = readinputport(4) & (genesis_io_ram[5]^0xff);
|
||||
/* P2 Start from the BIOS too (bit 5 of $6203) */
|
||||
return_value = (readinputport(4) & ~0x20 & 0xff) | ((bios_bank & 0x20) ? 0x20 : 0x00);
|
||||
return_value &= (genesis_io_ram[5]^0xff);
|
||||
return_value |= readinputport(3) & 0x03;
|
||||
}
|
||||
return_value = (genesis_io_ram[offset] & 0x80) | return_value;
|
||||
@@ -4239,6 +4332,97 @@ INPUT_PORTS_START ( mp_shnb3 )
|
||||
PORT_DIPSETTING( 0x0c, "Normal" )
|
||||
INPUT_PORTS_END
|
||||
|
||||
INPUT_PORTS_START ( mp_gunhe )
|
||||
GENESIS_PORTS
|
||||
MEGAPLAY_TEST
|
||||
MEGAPLAY_COIN
|
||||
MEGAPLAY_DSWA
|
||||
MEGAPLAY_DSWB
|
||||
|
||||
PORT_START
|
||||
/* DSW C (per game settings) */
|
||||
PORT_DIPNAME( 0x03, 0x01, "Initial Players" )
|
||||
PORT_DIPSETTING( 0x00, "4" )
|
||||
PORT_DIPSETTING( 0x01, "3" )
|
||||
PORT_DIPSETTING( 0x02, "2" )
|
||||
PORT_DIPSETTING( 0x03, "1" )
|
||||
|
||||
PORT_DIPNAME( 0xc, 0x0c, DEF_STR ( Difficulty ) )
|
||||
PORT_DIPSETTING( 0x00, "Expert" )
|
||||
PORT_DIPSETTING( 0x04, "Hard" )
|
||||
PORT_DIPSETTING( 0x08, "Easy" )
|
||||
PORT_DIPSETTING( 0x0c, "Normal" )
|
||||
INPUT_PORTS_END
|
||||
|
||||
INPUT_PORTS_START ( mp_gslam )
|
||||
GENESIS_PORTS
|
||||
MEGAPLAY_TEST
|
||||
MEGAPLAY_COIN
|
||||
MEGAPLAY_DSWA
|
||||
MEGAPLAY_DSWB
|
||||
|
||||
PORT_START
|
||||
/* DSW C (per game settings) */
|
||||
PORT_DIPNAME( 0x07, 0x04, "Game Time" )
|
||||
PORT_DIPSETTING( 0x07, "1:30" )
|
||||
PORT_DIPSETTING( 0x06, "2:00" )
|
||||
PORT_DIPSETTING( 0x05, "2:30" )
|
||||
PORT_DIPSETTING( 0x04, "3:00" )
|
||||
PORT_DIPSETTING( 0x03, "3:30" )
|
||||
PORT_DIPSETTING( 0x02, "4:00" )
|
||||
PORT_DIPSETTING( 0x01, "4:30" )
|
||||
PORT_DIPSETTING( 0x00, "5:00" )
|
||||
|
||||
PORT_DIPNAME( 0x08, 0x08, "2P-Play Continue" )
|
||||
PORT_DIPSETTING( 0x00, "1 Credit" )
|
||||
PORT_DIPSETTING( 0x08, "2 Credits" )
|
||||
INPUT_PORTS_END
|
||||
|
||||
INPUT_PORTS_START ( mp_mazin )
|
||||
GENESIS_PORTS
|
||||
MEGAPLAY_TEST
|
||||
MEGAPLAY_COIN
|
||||
MEGAPLAY_DSWA
|
||||
MEGAPLAY_DSWB
|
||||
|
||||
PORT_START
|
||||
/* DSW C (per game settings) */
|
||||
PORT_DIPNAME( 0x03, 0x01, "Initial Player" )
|
||||
PORT_DIPSETTING( 0x02, "1" )
|
||||
PORT_DIPSETTING( 0x03, "2" )
|
||||
PORT_DIPSETTING( 0x01, "3" )
|
||||
PORT_DIPSETTING( 0x00, "4" )
|
||||
|
||||
PORT_DIPNAME( 0x04, 0x04, DEF_STR ( Difficulty ) )
|
||||
PORT_DIPSETTING( 0x04, "Normal" )
|
||||
PORT_DIPSETTING( 0x00, "Hard" )
|
||||
|
||||
PORT_DIPNAME( 0x08, 0x08, "Title" )
|
||||
PORT_DIPSETTING( 0x08, "EUROPE" )
|
||||
PORT_DIPSETTING( 0x00, "U.S.A" )
|
||||
INPUT_PORTS_END
|
||||
|
||||
INPUT_PORTS_START ( mp_addams )
|
||||
GENESIS_PORTS
|
||||
MEGAPLAY_TEST
|
||||
MEGAPLAY_COIN
|
||||
MEGAPLAY_DSWA
|
||||
MEGAPLAY_DSWB
|
||||
|
||||
PORT_START
|
||||
/* DSW C (per game settings) */
|
||||
PORT_DIPNAME( 0x03, 0x03, "1UP Every" )
|
||||
PORT_DIPSETTING( 0x03, "3 Pickups" )
|
||||
PORT_DIPSETTING( 0x02, "2 Pickups" )
|
||||
PORT_DIPSETTING( 0x01, "1 Pickup" )
|
||||
|
||||
PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) )
|
||||
PORT_DIPSETTING( 0x0c, "3" )
|
||||
PORT_DIPSETTING( 0x08, "5" )
|
||||
PORT_DIPSETTING( 0x04, "7" )
|
||||
PORT_DIPSETTING( 0x00, "99" )
|
||||
INPUT_PORTS_END
|
||||
|
||||
INPUT_PORTS_START( aladbl )
|
||||
PORT_START /* Joypad 1 (3 button + start) NOT READ DIRECTLY */
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_8WAY | IPF_PLAYER1)
|
||||
@@ -4852,6 +5036,7 @@ static MACHINE_DRIVER_START( megaplay )
|
||||
/* MDRV_CPU_PROGRAM_MAP(megaplay_genesis_readmem, genesis_writemem) */
|
||||
|
||||
MDRV_VIDEO_START(megaplay)
|
||||
MDRV_VIDEO_EOF(segac2) /* VBLANK tracking: without it there are no mid-screen partial updates */
|
||||
MDRV_VIDEO_UPDATE(megaplay)
|
||||
MDRV_MACHINE_INIT(megaplay)
|
||||
|
||||
@@ -4862,6 +5047,23 @@ static MACHINE_DRIVER_START( megaplay )
|
||||
MDRV_CPU_VBLANK_INT(megatech_irq, 262)
|
||||
MACHINE_DRIVER_END
|
||||
|
||||
/* The BIOS keeps its credits, bookkeeping and each slot's 256-byte game
|
||||
area (high scores) in battery-backed RAM at Z80 0x6800-0x77ff. */
|
||||
static NVRAM_HANDLER( megaplay )
|
||||
{
|
||||
if (read_or_write)
|
||||
mame_fwrite(file, ic3_ram, 0x1000);
|
||||
else if (file)
|
||||
mame_fread(file, ic3_ram, 0x1000);
|
||||
else
|
||||
memset(ic3_ram, 0, 0x1000);
|
||||
}
|
||||
|
||||
static MACHINE_DRIVER_START( megaplay_nvram )
|
||||
MDRV_IMPORT_FROM(megaplay)
|
||||
MDRV_NVRAM_HANDLER(megaplay)
|
||||
MACHINE_DRIVER_END
|
||||
|
||||
/******************************************************************************
|
||||
Rom Definitions
|
||||
*******************************************************************************
|
||||
@@ -5912,6 +6114,63 @@ ROM_START( mp_sor2 ) /* Streets of Rage 2 */
|
||||
MEGAPLAY_BIOS
|
||||
ROM_END
|
||||
|
||||
ROM_START( mp_gunhe ) /* Gunstar Heroes */
|
||||
ROM_REGION( 0x400000, REGION_CPU1, 0 )
|
||||
ROM_LOAD16_WORD_SWAP( "mpr-16390.ic1", 0x000000, 0x100000, CRC(d963a748) SHA1(adf231c5180a9307fd6675fe77fffd4c5bfa3d6a) )
|
||||
/* Game Instruction rom copied to 0x300000 - 0x310000 (odd / even bytes equal) */
|
||||
|
||||
ROM_REGION( 0x10000, REGION_CPU2, 0 ) /* z80 */
|
||||
|
||||
ROM_REGION( 0x8000, REGION_USER1, 0 ) /* Game Instructions */
|
||||
ROM_LOAD( "epr-15175-10.ic2", 0x000000, 0x08000, CRC(e4f08233) SHA1(b7e0ad3f6ae1c56df6ec76375842050f08afcbef) )
|
||||
|
||||
ROM_REGION( 0x28000, REGION_CPU3, 0 ) /* Bios */
|
||||
MEGAPLAY_BIOS
|
||||
ROM_END
|
||||
|
||||
ROM_START( mp_gslam ) /* Grand Slam */
|
||||
ROM_REGION( 0x400000, REGION_CPU1, 0 )
|
||||
ROM_LOAD16_BYTE( "epr-15181.ic2", 0x000000, 0x040000, CRC(642437c1) SHA1(cbf88e196c04b6d886bf9642b69bf165045510fe) )
|
||||
ROM_LOAD16_BYTE( "epr-15180.ic1", 0x000001, 0x040000, CRC(73bb48f1) SHA1(981b64f834d5618599352f5fad683bf232390ba3) )
|
||||
/* Game Instruction rom copied to 0x300000 - 0x310000 (odd / even bytes equal) */
|
||||
|
||||
ROM_REGION( 0x10000, REGION_CPU2, 0 ) /* z80 */
|
||||
|
||||
ROM_REGION( 0x8000, REGION_USER1, 0 ) /* Game Instructions */
|
||||
ROM_LOAD( "epr-15175-03.ic3", 0x000000, 0x08000, CRC(70ea1aec) SHA1(0d9d82a1f8aa51d02707f7b343e7cfb6591efccd) )
|
||||
|
||||
ROM_REGION( 0x28000, REGION_CPU3, 0 ) /* Bios */
|
||||
MEGAPLAY_BIOS
|
||||
ROM_END
|
||||
|
||||
ROM_START( mp_mazin ) /* Mazin Wars */
|
||||
ROM_REGION( 0x400000, REGION_CPU1, 0 )
|
||||
ROM_LOAD16_WORD_SWAP( "mpr-16460.ic1", 0x000000, 0x100000, CRC(e9635a83) SHA1(ab3afa11656f0ae3a50c957dce012fb15d3992e0) )
|
||||
/* Game Instruction rom copied to 0x300000 - 0x310000 (odd / even bytes equal) */
|
||||
|
||||
ROM_REGION( 0x10000, REGION_CPU2, 0 ) /* z80 */
|
||||
|
||||
ROM_REGION( 0x8000, REGION_USER1, 0 ) /* Game Instructions */
|
||||
ROM_LOAD( "epr-15175-11.ic2", 0x000000, 0x08000, CRC(bb651120) SHA1(81cb736f2732373e260dde162249c1d29a3489c3) )
|
||||
|
||||
ROM_REGION( 0x28000, REGION_CPU3, 0 ) /* Bios */
|
||||
MEGAPLAY_BIOS
|
||||
ROM_END
|
||||
|
||||
ROM_START( mp_addams ) /* The Addams Family ARCADE (homebrew conversion of the Mega Drive game) */
|
||||
ROM_REGION( 0x400000, REGION_CPU1, 0 )
|
||||
ROM_LOAD16_WORD_SWAP( "epr-26013.ic1", 0x000000, 0x200000, CRC(87ecace1) SHA1(d6529b4b692a9515ccf6722f26c011660154ae7a) )
|
||||
/* Game Instruction rom copied to 0x300000 - 0x310000 (odd / even bytes equal) */
|
||||
|
||||
ROM_REGION( 0x10000, REGION_CPU2, 0 ) /* z80 */
|
||||
|
||||
ROM_REGION( 0x8000, REGION_USER1, 0 ) /* Game Instructions */
|
||||
ROM_LOAD( "epr-15175-20.ic2", 0x000000, 0x08000, CRC(dcfde4e7) SHA1(3f5a1b4de94fad4ccd404b95a53fdb2e1c4773e6) )
|
||||
|
||||
ROM_REGION( 0x28000, REGION_CPU3, 0 ) /* Bios */
|
||||
MEGAPLAY_BIOS
|
||||
ROM_END
|
||||
|
||||
ROM_START( mp_twc ) /* Tecmo World Cup */
|
||||
ROM_REGION( 0x400000, REGION_CPU1, 0 )
|
||||
ROM_LOAD16_BYTE( "ep15183.ic2", 0x000000, 0x040000, CRC(8b79b861) SHA1(c72af72840513b82f2562409eccdf13b031bf3c0) )
|
||||
@@ -6771,9 +7030,13 @@ static DRIVER_INIT (megaplay)
|
||||
/* -- */ GAMEBX(1993, megaplay, 0, megaplay, megaplay, megaplay, megaplay, ROT0, "Sega", "MegaPlay: BIOS", NOT_A_DRIVER, &generic_ctrl, NULL )
|
||||
/* 01 */ GAMEB( 1993, mp_sonic, megaplay, megaplay, megaplay, mp_sonic, megaplay, ROT0, "Sega", "Sonic The Hedgehog", &megaplay_ctrl, NULL )
|
||||
/* 02 */ GAMEB( 1993, mp_gaxe2, megaplay, megaplay, megaplay, mp_gaxe2, megaplay, ROT0, "Sega", "Golden Axe II", &megaplay_ctrl, NULL )
|
||||
/* 03 */ GAMEB( 1993, mp_gslam, megaplay, megaplay, megaplay, mp_gslam, megaplay, ROT0, "Sega", "Grand Slam", &megaplay_ctrl, NULL )
|
||||
/* 03 */ GAMEB( 1993, mp_sor2, megaplay, megaplay, megaplay, mp_sor2, megaplay, ROT0, "Sega", "Streets Of Rage II", &megaplay_ctrl, NULL )
|
||||
/* 04 */ GAMEB( 1993, mp_twc, megaplay, megaplay, megaplay, mp_twc, megaplay, ROT0, "Sega", "Tecmo World Cup", &megaplay_ctrl, NULL )
|
||||
/* 05 */ GAMEB( 1993, mp_soni2, megaplay, megaplay, megaplay, mp_soni2, megaplay, ROT0, "Sega", "Sonic The Hedgehog 2", &megaplay_ctrl, NULL )
|
||||
/* 06 */ GAMEB( 1993, mp_bio, megaplay, megaplay, megaplay, mp_bio, megaplay, ROT0, "Sega", "Bio-Hazard Battle", &megaplay_ctrl, NULL )
|
||||
/* 07 */ GAMEB( 1993, mp_shnb3, megaplay, megaplay, megaplay, mp_shnb3, megaplay, ROT0, "Sega", "Shinobi III", &megaplay_ctrl, NULL )
|
||||
/* 10 */ GAMEB( 1993, mp_col3, megaplay, megaplay, megaplay, megaplay, megaplay, ROT0, "Sega", "Columns III", &megaplay_ctrl, NULL )
|
||||
/* 10 */ GAMEB( 1993, mp_gunhe, megaplay, megaplay, megaplay, mp_gunhe, megaplay, ROT0, "Sega", "Gunstar Heroes", &megaplay_ctrl, NULL )
|
||||
/* 11 */ GAMEB( 1993, mp_mazin, megaplay, megaplay, megaplay, mp_mazin, megaplay, ROT0, "Sega", "Mazin Wars / Mazin Saga", &megaplay_ctrl, NULL )
|
||||
/* ?? */ GAMEB( 1993, mp_col3, megaplay, megaplay, megaplay, megaplay, megaplay, ROT0, "Sega", "Columns III", &megaplay_ctrl, NULL )
|
||||
/* -- */ GAMEB( 2026, mp_addams, megaplay, megaplay, megaplay_nvram, mp_addams, megaplay, ROT0, "hack", "The Addams Family ARCADE (Mega Play)", &megaplay_ctrl, NULL )
|
||||
@@ -1736,7 +1736,8 @@ INPUT_PORTS_START( f1lap )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* EEPROM data*/
|
||||
|
||||
PORT_START /* 0xc00000 - port 1 */
|
||||
PORT_BITX(0x01, IP_ACTIVE_LOW, IPT_BUTTON1, "Gear Up", IP_KEY_DEFAULT, IP_JOY_DEFAULT )
|
||||
@@ -3538,7 +3539,7 @@ static READ16_HANDLER( dual_pcb_masterslave )
|
||||
return 0; /* 0/1 master/slave */
|
||||
}
|
||||
|
||||
static DRIVER_INIT ( f1sl )
|
||||
static DRIVER_INIT ( f1lap )
|
||||
{
|
||||
install_io_analog();
|
||||
|
||||
@@ -3547,6 +3548,8 @@ static DRIVER_INIT ( f1sl )
|
||||
install_mem_write16_handler(0, 0x800000, 0x800fff, dual_pcb_comms_w);
|
||||
install_mem_read16_handler (0, 0x801000, 0x801003, dual_pcb_masterslave);
|
||||
system32_prot_vblank = f1lap_fd1149_vblank;
|
||||
|
||||
f1lap_kludge = true;
|
||||
}
|
||||
|
||||
static DRIVER_INIT ( arf )
|
||||
@@ -3675,6 +3678,7 @@ static DRIVER_INIT( titlef )
|
||||
{
|
||||
install_port_write_handler(1, 0xb0, 0xbf, scross_bank_w);
|
||||
titlef_kludge = true;
|
||||
opaquey_hack = true;
|
||||
}
|
||||
|
||||
static DRIVER_INIT( scross )
|
||||
@@ -3703,8 +3707,8 @@ GAMEX(1994, jpark, 0, system32, jpark, jpark, ROT0, "Sega",
|
||||
GAMEX(1994, svf, 0, system32, svf, 0, ROT0, "Sega", "Super Visual Football - European Sega Cup", GAME_IMPERFECT_GRAPHICS )
|
||||
GAMEX(1994, svs, svf, system32, svf, 0, ROT0, "Sega", "Super Visual Soccer - Sega Cup (US)", GAME_IMPERFECT_GRAPHICS )
|
||||
GAMEX(1994, jleague, svf, system32, svf, jleague, ROT0, "Sega", "The J.League 1994 (Japan)", GAME_IMPERFECT_GRAPHICS )
|
||||
GAMEX(1993, f1lap, 0, system32, f1lap, f1sl, ROT0, "Sega", "F1 Super Lap (World)", GAME_IMPERFECT_GRAPHICS )
|
||||
GAMEX(1993, f1lapj, f1lap, system32, f1lap, f1sl, ROT0, "Sega", "F1 Super Lap (Japan)", GAME_IMPERFECT_GRAPHICS )
|
||||
GAMEX(1993, f1lap, 0, system32, f1lap, f1lap, ROT0, "Sega", "F1 Super Lap (World)", GAME_IMPERFECT_GRAPHICS )
|
||||
GAMEX(1993, f1lapj, f1lap, system32, f1lap, f1lap, ROT0, "Sega", "F1 Super Lap (Japan)", GAME_IMPERFECT_GRAPHICS )
|
||||
GAMEX(1993, darkedge, 0, system32, darkedge, darkedge, ROT0, "Sega", "Dark Edge", GAME_IMPERFECT_GRAPHICS )
|
||||
GAMEX(1994, dbzvrvs, 0, system32, system32, dbzvrvs, ROT0, "Sega / Banpresto", "Dragon Ball Z V.R.V.S.", GAME_IMPERFECT_GRAPHICS )
|
||||
GAMEX(1995, slipstrm, 0, system32, slipstrm, slipstrm, ROT0, "Capcom", "Slipstream (Brazil)", GAME_IMPERFECT_GRAPHICS )
|
||||
|
||||
+18
-3
@@ -9,6 +9,7 @@ [email protected]
|
||||
***************************************************************************/
|
||||
|
||||
#include "driver.h"
|
||||
#include "state.h"
|
||||
#include "vidhrdw/generic.h"
|
||||
#include "cpu/konami/konami.h" /* for the callback and the firq irq definition */
|
||||
#include "cpu/z80/z80.h"
|
||||
@@ -29,6 +30,7 @@ READ_HANDLER( simpsons_speedup1_r );
|
||||
READ_HANDLER( simpsons_speedup2_r );
|
||||
MACHINE_INIT( simpsons );
|
||||
NVRAM_HANDLER( simpsons );
|
||||
void simpsons_state_register(void);
|
||||
extern int simpsons_firq_enabled;
|
||||
|
||||
/***************************************************************************
|
||||
@@ -72,15 +74,22 @@ static MEMORY_WRITE_START( writemem )
|
||||
{ 0x8000, 0xffff, MWA_ROM },
|
||||
MEMORY_END
|
||||
|
||||
static WRITE_HANDLER( z80_bankswitch_w )
|
||||
int simpsons_z80_bank = 2; /* sound CPU bank register, kept for save states */
|
||||
|
||||
static void z80_bank_set(void)
|
||||
{
|
||||
unsigned char *RAM = memory_region(REGION_CPU2);
|
||||
|
||||
offset = 0x10000 + ( ( ( data & 7 ) - 2 ) * 0x4000 );
|
||||
int offset = 0x10000 + ( ( ( simpsons_z80_bank & 7 ) - 2 ) * 0x4000 );
|
||||
|
||||
cpu_setbank( 2, &RAM[ offset ] );
|
||||
}
|
||||
|
||||
static WRITE_HANDLER( z80_bankswitch_w )
|
||||
{
|
||||
simpsons_z80_bank = data;
|
||||
z80_bank_set();
|
||||
}
|
||||
|
||||
#if 0
|
||||
static int nmi_enabled;
|
||||
|
||||
@@ -468,6 +477,12 @@ static DRIVER_INIT( simpsons )
|
||||
{
|
||||
konami_rom_deinterleave_2(REGION_GFX1);
|
||||
konami_rom_deinterleave_4(REGION_GFX2);
|
||||
|
||||
/* Save the bank selections so a loaded save state runs the right code */
|
||||
simpsons_z80_bank = 2;
|
||||
state_save_register_int("simpsons_z80", 0, "bank", &simpsons_z80_bank);
|
||||
state_save_register_func_postload(z80_bank_set);
|
||||
simpsons_state_register();
|
||||
}
|
||||
|
||||
GAME( 1991, simpsons, 0, simpsons, simpsons, simpsons, ROT0, "Konami", "The Simpsons (4 Players)" )
|
||||
|
||||
+4
-1
@@ -3100,6 +3100,7 @@ static MEMORY_WRITE32_START( stv_master_writemem )
|
||||
{ 0x00200000, 0x002fffff, MWA32_BANK4 }, /* workram low*/
|
||||
{ 0x00400000, 0x0040001f, stv_io_w32 ,&ioga },
|
||||
{ 0x01000000, 0x01000003, minit_w },
|
||||
{ 0x01406f40, 0x01406f43, minit_w }, /* needed by prikura */
|
||||
{ 0x02000000, 0x04ffffff, MWA32_ROM },
|
||||
/* { 0x05000000, 0x058fffff, MWA32_RAM },*/
|
||||
{ 0x05800000, 0x0589ffff, cdregister_w },
|
||||
@@ -4169,6 +4170,8 @@ ROM_START( rsgun )
|
||||
ROM_LOAD16_WORD_SWAP( "mpr20960.3", 0x0800000, 0x0400000, CRC(b5ab9053) SHA1(87c5d077eb1219c35fa65b4e11d5b62e826f5236) ) /* good (was .13)*/
|
||||
ROM_LOAD16_WORD_SWAP( "mpr20961.4", 0x0c00000, 0x0400000, CRC(0e06295c) SHA1(0ec2842622f3e9dc5689abd58aeddc7e5603b97a) ) /* good (was .14)*/
|
||||
ROM_LOAD16_WORD_SWAP( "mpr20962.5", 0x1000000, 0x0400000, CRC(f1e6c7fc) SHA1(0ba0972f1bc7c56f4e0589d3e363523cea988bb0) ) /* good (was .15)*/
|
||||
/*Without the following the game crashes,maybe we need to mirror the previous roms in this location?*/
|
||||
ROM_FILL( 0x1400000, 0x0c00000, 0x00 )
|
||||
ROM_END
|
||||
|
||||
ROM_START( sandor )
|
||||
@@ -4565,6 +4568,7 @@ GAMEBX( 1996, vfkids, stvbios, stvbios, stv, stv, ic13, ROT0, "Sega",
|
||||
GAMEBX( 1995, ejihon, stvbios, stvbios, stv, stv, ic13, ROT0, "Sega", "Ejihon Tantei Jimusyo", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS, &generic_ctrl, NULL )
|
||||
GAMEBX( 1996, colmns97, stvbios, stvbios, stv, stv, ic13, ROT0, "Sega", "Columns 97", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS, &generic_ctrl, NULL )
|
||||
GAMEBX( 1996, dnmtdeka, diehard, stvbios, stv, stv, dnmtdeka, ROT0, "Sega", "Dynamite Deka (Japan)", GAME_NO_SOUND | GAME_IMPERFECT_GRAPHICS , &generic_ctrl, NULL )
|
||||
GAMEBX( 1996, prikura, stvbios, stvbios, stv, stv, prikura, ROT0, "Atlus", "Princess Clara Daisakusen", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS, &generic_ctrl, NULL )
|
||||
GAMEBX( 1997, winterht, stvbios, stvbios, stv, stv, ic13, ROT0, "Sega", "Winter Heat", GAME_NO_SOUND | GAME_IMPERFECT_GRAPHICS , &generic_ctrl, NULL )
|
||||
|
||||
/* Almost */
|
||||
@@ -4573,7 +4577,6 @@ GAMEBX( 1998, othellos, stvbios, stvbios, stv, stv, stv, ROT0, "Succes
|
||||
GAMEBX( 1995, kiwames, stvbios, stvbios, stv, stvmp,ic13, ROT0, "Athena", "Pro Mahjong Kiwame S", GAME_NO_SOUND | GAME_NOT_WORKING, &generic_ctrl, NULL )
|
||||
|
||||
/* Doing Something.. but not enough yet */
|
||||
GAMEBX( 1996, prikura, stvbios, stvbios, stv, stv, prikura, ROT0, "Atlus", "Princess Clara Daisakusen", GAME_IMPERFECT_SOUND | GAME_NOT_WORKING, &generic_ctrl, NULL )
|
||||
GAMEBX( 1995, shanhigw, stvbios, stvbios, stv, stv, stv, ROT0, "Sunsoft / Activision", "Shanghai - The Great Wall - Shanghai Triple Threat", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS, &generic_ctrl, NULL )
|
||||
GAMEBX( 1996, groovef, stvbios, stvbios, stv, stv, stv, ROT0, "Atlus", "Power Instinct 3 - Groove On Fight", GAME_IMPERFECT_SOUND | GAME_NOT_WORKING, &generic_ctrl, NULL )
|
||||
GAMEBX( 1999, danchih, stvbios, stvbios, stv, stvmp,stv, ROT0, "Altron (Tecmo license)", "Danchi de Hanafuda", GAME_NO_SOUND | GAME_NOT_WORKING, &generic_ctrl, NULL )
|
||||
|
||||
@@ -691,6 +691,18 @@ ROM_END
|
||||
|
||||
static DRIVER_INIT( toki )
|
||||
{
|
||||
UINT8 *ROM = memory_region(REGION_SOUND1);
|
||||
UINT8 *buffer = malloc(0x20000);
|
||||
int i;
|
||||
|
||||
memcpy(buffer,ROM,0x20000);
|
||||
for( i = 0; i < 0x20000; i++ )
|
||||
{
|
||||
ROM[i] = buffer[BITSWAP24(i,23,22,21,20,19,18,17,16,13,14,15,12,11,10,9,8,7,6,5,4,3,2,1,0)];
|
||||
}
|
||||
|
||||
free(buffer);
|
||||
|
||||
seibu_sound_decrypt(REGION_CPU2,0x2000);
|
||||
}
|
||||
|
||||
|
||||
@@ -707,6 +707,11 @@ static DRIVER_INIT( xmen )
|
||||
|
||||
state_save_register_UINT8("main", 0, "sound bank", &sound_curbank, 1);
|
||||
state_save_register_func_postload(sound_reset_bank);
|
||||
|
||||
/* the EEPROM reads left that hold the service switch down on a board
|
||||
that starts without a saved EEPROM */
|
||||
state_save_register_int("main", 0, "init eeprom count", &init_eeprom_count);
|
||||
state_save_register_int("main", 0, "tilemap select", &xmen6p_tilemap_select);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -38,4 +38,7 @@ extern struct QSound_interface qsound_interface;
|
||||
|
||||
extern int scanline;
|
||||
|
||||
/* cps1.c: the QSound Z80 bank, saved for save states */
|
||||
void cps_qsound_state_register(void);
|
||||
|
||||
#endif
|
||||
@@ -21,6 +21,7 @@ extern UINT16 system32_tilebank_external;
|
||||
|
||||
extern bool opaquey_hack;
|
||||
extern bool titlef_kludge;
|
||||
extern bool f1lap_kludge;
|
||||
|
||||
extern void system32_set_vblank(int state);
|
||||
|
||||
|
||||
@@ -43,6 +43,7 @@ be specified by a CODE_NOT (for example, ALT-TAB on a windows machine).
|
||||
#include "driver.h"
|
||||
#include "config.h"
|
||||
#include "cpuexec.h"
|
||||
#include "state.h"
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
@@ -703,6 +704,11 @@ getout:
|
||||
|
||||
init_analog_seq();
|
||||
|
||||
/* the values the board latched at the last VBLANK: the game reads them
|
||||
until the next one, so a loaded state must bring them back */
|
||||
state_save_register_UINT16("input", 0, "port values", input_port_value, MAX_INPUT_PORTS);
|
||||
state_save_register_UINT16("input", 0, "vblank", input_vblank, MAX_INPUT_PORTS);
|
||||
|
||||
update_input_ports();
|
||||
|
||||
/* if we didn't find a saved config, return 0 so the main core knows that it */
|
||||
|
||||
@@ -748,6 +748,8 @@ DRIVER_INIT( my_cps2 )
|
||||
/* data16_t *decrypted_opcodes = (data16_t *)memory_region(REGION_USER1); */
|
||||
data16_t *decrypted_opcodes = (data16_t *)auto_malloc(0x0400000);
|
||||
|
||||
cps_qsound_state_register();
|
||||
|
||||
if (m_region_key)
|
||||
{
|
||||
uint32_t key[2];
|
||||
|
||||
@@ -141,6 +141,7 @@ TODO:
|
||||
|
||||
#include "driver.h"
|
||||
#include "machine/namcoio.h"
|
||||
#include "state.h"
|
||||
|
||||
#define VERBOSE 0
|
||||
|
||||
@@ -1199,6 +1200,67 @@ void nmi_generate(int param)
|
||||
|
||||
int customio_command[MAX_06XX];
|
||||
|
||||
/* Save states: each I/O chip's coins, credits and counters, the 50XX's
|
||||
scores, and each 06XX's command with the time to its next NMI. Without
|
||||
them a loaded game talks to chips that kept the state they had when the
|
||||
save was loaded, and its NMIs come at another time. */
|
||||
static double nmi_left[MAX_06XX];
|
||||
|
||||
static void namcoio_presave(void)
|
||||
{
|
||||
int chip;
|
||||
|
||||
for (chip = 0; chip < MAX_06XX; chip++)
|
||||
nmi_left[chip] = (nmi_timer[chip] && (customio_command[chip] & 0x0f)) ? timer_timeleft(nmi_timer[chip]) : -1;
|
||||
}
|
||||
|
||||
static void namcoio_postload(void)
|
||||
{
|
||||
int chip;
|
||||
|
||||
for (chip = 0; chip < MAX_06XX; chip++)
|
||||
{
|
||||
if (!nmi_timer[chip])
|
||||
continue;
|
||||
if ((customio_command[chip] & 0x0f) && nmi_left[chip] >= 0)
|
||||
timer_adjust(nmi_timer[chip], nmi_left[chip], chip, TIME_IN_USEC(200));
|
||||
else
|
||||
timer_adjust(nmi_timer[chip], TIME_NEVER, chip, 0);
|
||||
}
|
||||
}
|
||||
|
||||
static void namcoio_register_state(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
state_save_set_current_tag(0);
|
||||
for (i = 0; i < MAX_NAMCOIO; i++)
|
||||
{
|
||||
state_save_register_int("namcoio", i, "reset", &io[i].reset);
|
||||
state_save_register_int("namcoio", i, "lastcoins", &io[i].lastcoins);
|
||||
state_save_register_int("namcoio", i, "lastbuttons", &io[i].lastbuttons);
|
||||
state_save_register_int("namcoio", i, "credits", &io[i].credits);
|
||||
state_save_register_INT32("namcoio", i, "coins", io[i].coins, 2);
|
||||
state_save_register_INT32("namcoio", i, "coins per credit", io[i].coins_per_cred, 2);
|
||||
state_save_register_INT32("namcoio", i, "credits per coin", io[i].creds_per_coin, 2);
|
||||
state_save_register_int("namcoio", i, "in_count", &io[i].in_count);
|
||||
state_save_register_int("namcoio", i, "mode", &io[i].mode);
|
||||
state_save_register_int("namcoio", i, "coincred_mode", &io[i].coincred_mode);
|
||||
state_save_register_int("namcoio", i, "remap_joy", &io[i].remap_joy);
|
||||
}
|
||||
state_save_register_INT32("namco06xx", 0, "command", customio_command, MAX_06XX);
|
||||
state_save_register_double("namco06xx", 0, "nmi left", nmi_left, MAX_06XX);
|
||||
state_save_register_INT32("namco50xx", 0, "hiscore", HiScore, MAX_50XX);
|
||||
state_save_register_INT32("namco50xx", 0, "score", &Score[0][0], 2 * MAX_50XX);
|
||||
state_save_register_INT32("namco50xx", 0, "next bonus", &NextBonus[0][0], 2 * MAX_50XX);
|
||||
state_save_register_INT32("namco50xx", 0, "first bonus", FirstBonus, MAX_50XX);
|
||||
state_save_register_INT32("namco50xx", 0, "interval bonus", IntervalBonus, MAX_50XX);
|
||||
state_save_register_INT32("namco50xx", 0, "player", Player, MAX_50XX);
|
||||
state_save_register_INT32("namco50xx", 0, "in_count", in_count_50XX, MAX_50XX);
|
||||
state_save_register_func_presave(namcoio_presave);
|
||||
state_save_register_func_postload(namcoio_postload);
|
||||
}
|
||||
|
||||
|
||||
void namco_06xx_init(int chipnum, int cpu,
|
||||
int type0, const struct namcoio_interface *intf0,
|
||||
@@ -1214,6 +1276,8 @@ void namco_06xx_init(int chipnum, int cpu,
|
||||
namcoio_init(4*chipnum + 3, type3, intf3);
|
||||
nmi_cpu[chipnum] = cpu;
|
||||
nmi_timer[chipnum] = timer_alloc(nmi_generate);
|
||||
/* registering again on a reset is ignored */
|
||||
namcoio_register_state();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -269,7 +269,7 @@ READ16_HANDLER( namcos2_68k_key_r )
|
||||
switch(offset)
|
||||
{
|
||||
case 1: return 0xBD;
|
||||
case 7: return 0xBD;
|
||||
/* case 7: return 0xBD; */
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "driver.h"
|
||||
#include "state.h"
|
||||
#include "vidhrdw/generic.h"
|
||||
#include "vidhrdw/konamiic.h"
|
||||
#include "cpu/konami/konami.h"
|
||||
@@ -8,8 +9,15 @@
|
||||
extern void simpsons_video_banking( int select );
|
||||
extern unsigned char *simpsons_xtraram;
|
||||
|
||||
/* from drivers */
|
||||
extern int simpsons_z80_bank;
|
||||
|
||||
int simpsons_firq_enabled;
|
||||
|
||||
/* Bank selections, kept for save states (see simpsons_state_register) */
|
||||
static int simpsons_rombank;
|
||||
static int simpsons_videobank;
|
||||
|
||||
/***************************************************************************
|
||||
|
||||
EEPROM
|
||||
@@ -75,7 +83,8 @@ WRITE_HANDLER( simpsons_eeprom_w )
|
||||
EEPROM_set_cs_line((data & 0x08) ? CLEAR_LINE : ASSERT_LINE);
|
||||
EEPROM_set_clock_line((data & 0x10) ? ASSERT_LINE : CLEAR_LINE);
|
||||
|
||||
simpsons_video_banking( data & 3 );
|
||||
simpsons_videobank = data & 3;
|
||||
simpsons_video_banking( simpsons_videobank );
|
||||
|
||||
simpsons_firq_enabled = data & 0x04;
|
||||
}
|
||||
@@ -170,9 +179,10 @@ READ_HANDLER( simpsons_speedup2_r )
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
static void simpsons_banking( int lines )
|
||||
static void simpsons_rombank_set(void)
|
||||
{
|
||||
unsigned char *RAM = memory_region(REGION_CPU1);
|
||||
int lines = simpsons_rombank;
|
||||
int offs = 0;
|
||||
|
||||
switch ( lines & 0xf0 )
|
||||
@@ -201,6 +211,37 @@ static void simpsons_banking( int lines )
|
||||
cpu_setbank( 1, &RAM[offs] );
|
||||
}
|
||||
|
||||
static void simpsons_banking( int lines )
|
||||
{
|
||||
simpsons_rombank = lines;
|
||||
simpsons_rombank_set();
|
||||
}
|
||||
|
||||
/* After loading a save state, map the saved banks again: the CPU ROM bank
|
||||
(0x6000-0x7fff) and the video banks (0x0000-0x0fff and 0x2000-0x3fff). */
|
||||
static void simpsons_postload(void)
|
||||
{
|
||||
simpsons_rombank_set();
|
||||
simpsons_video_banking( simpsons_videobank );
|
||||
}
|
||||
|
||||
/* Called once from the driver init: saves the bank selections, the FIRQ
|
||||
enable and the banked RAM (palette, extra RAM and sprite RAM live in
|
||||
the CPU region at 0x88000-0x8afff, outside the saved address space). */
|
||||
void simpsons_state_register(void)
|
||||
{
|
||||
unsigned char *RAM = memory_region(REGION_CPU1);
|
||||
|
||||
state_save_register_int("simpsons", 0, "rombank", &simpsons_rombank);
|
||||
state_save_register_int("simpsons", 0, "videobank", &simpsons_videobank);
|
||||
state_save_register_int("simpsons", 0, "firq_enabled", &simpsons_firq_enabled);
|
||||
/* reads left that fake the test switch on a board without NVRAM: a board
|
||||
that boots without it must not enter the service mode after loading */
|
||||
state_save_register_int("simpsons", 0, "init_eeprom_count", &init_eeprom_count);
|
||||
state_save_register_UINT8("simpsons", 0, "banked_ram", &RAM[0x88000], 0x3000);
|
||||
state_save_register_func_postload(simpsons_postload);
|
||||
}
|
||||
|
||||
MACHINE_INIT( simpsons )
|
||||
{
|
||||
unsigned char *RAM = memory_region(REGION_CPU1);
|
||||
@@ -214,11 +255,14 @@ MACHINE_INIT( simpsons )
|
||||
simpsons_firq_enabled = 0;
|
||||
|
||||
/* init the default banks */
|
||||
simpsons_rombank = 0;
|
||||
cpu_setbank( 1, &RAM[0x10000] );
|
||||
|
||||
RAM = memory_region(REGION_CPU2);
|
||||
|
||||
simpsons_z80_bank = 2;
|
||||
cpu_setbank( 2, &RAM[0x10000] );
|
||||
|
||||
simpsons_videobank = 0;
|
||||
simpsons_video_banking( 0 );
|
||||
}
|
||||
+34
-10
@@ -34,6 +34,7 @@
|
||||
|
||||
#include "driver.h"
|
||||
#include "sndhrdw/seibu.h"
|
||||
#include "state.h"
|
||||
|
||||
|
||||
|
||||
@@ -202,6 +203,8 @@ WRITE_HANDLER( seibu_adpcm_ctl_2_w )
|
||||
/***************************************************************************/
|
||||
|
||||
static int sound_cpu;
|
||||
static int seibu_irq1, seibu_irq2;
|
||||
static int seibu_bank_latch;
|
||||
|
||||
enum
|
||||
{
|
||||
@@ -214,35 +217,33 @@ enum
|
||||
|
||||
static void update_irq_lines(int param)
|
||||
{
|
||||
static int irq1,irq2;
|
||||
|
||||
switch(param)
|
||||
{
|
||||
case VECTOR_INIT:
|
||||
irq1 = irq2 = 0xff;
|
||||
seibu_irq1 = seibu_irq2 = 0xff;
|
||||
break;
|
||||
|
||||
case RST10_ASSERT:
|
||||
irq1 = 0xd7;
|
||||
seibu_irq1 = 0xd7;
|
||||
break;
|
||||
|
||||
case RST10_CLEAR:
|
||||
irq1 = 0xff;
|
||||
seibu_irq1 = 0xff;
|
||||
break;
|
||||
|
||||
case RST18_ASSERT:
|
||||
irq2 = 0xdf;
|
||||
seibu_irq2 = 0xdf;
|
||||
break;
|
||||
|
||||
case RST18_CLEAR:
|
||||
irq2 = 0xff;
|
||||
seibu_irq2 = 0xff;
|
||||
break;
|
||||
}
|
||||
|
||||
if ((irq1 & irq2) == 0xff) /* no IRQs pending */
|
||||
if ((seibu_irq1 & seibu_irq2) == 0xff) /* no IRQs pending */
|
||||
cpu_set_irq_line(sound_cpu,0,CLEAR_LINE);
|
||||
else /* IRQ pending */
|
||||
cpu_set_irq_line_and_vector(sound_cpu,0,ASSERT_LINE,irq1 & irq2);
|
||||
cpu_set_irq_line_and_vector(sound_cpu,0,ASSERT_LINE,seibu_irq1 & seibu_irq2);
|
||||
}
|
||||
|
||||
WRITE_HANDLER( seibu_irq_clear_w )
|
||||
@@ -306,8 +307,31 @@ static int main2sub_pending,sub2main_pending;
|
||||
WRITE_HANDLER( seibu_bank_w )
|
||||
{
|
||||
UINT8 *rom = memory_region(REGION_CPU1+sound_cpu);
|
||||
seibu_bank_latch = data & 1;
|
||||
cpu_setbank(1,rom + 0x10000 + 0x8000 * seibu_bank_latch);
|
||||
}
|
||||
|
||||
cpu_setbank(1,rom + 0x10000 + 0x8000 * (data & 1));
|
||||
static void seibu_sound_state_postload(void)
|
||||
{
|
||||
UINT8 *rom = memory_region(REGION_CPU1 + sound_cpu);
|
||||
cpu_setbank(1, rom + 0x10000 + 0x8000 * (seibu_bank_latch & 1));
|
||||
if ((seibu_irq1 & seibu_irq2) == 0xff)
|
||||
cpu_set_irq_line(sound_cpu, 0, CLEAR_LINE);
|
||||
else
|
||||
cpu_set_irq_line_and_vector(sound_cpu, 0, ASSERT_LINE,
|
||||
seibu_irq1 & seibu_irq2);
|
||||
}
|
||||
|
||||
void seibu_sound_state_save_register(void)
|
||||
{
|
||||
state_save_register_UINT8("seibu", 0, "main2sub", main2sub, 2);
|
||||
state_save_register_UINT8("seibu", 0, "sub2main", sub2main, 2);
|
||||
state_save_register_int("seibu", 0, "main2sub_pending", &main2sub_pending);
|
||||
state_save_register_int("seibu", 0, "sub2main_pending", &sub2main_pending);
|
||||
state_save_register_int("seibu", 0, "bank", &seibu_bank_latch);
|
||||
state_save_register_int("seibu", 0, "irq1", &seibu_irq1);
|
||||
state_save_register_int("seibu", 0, "irq2", &seibu_irq2);
|
||||
state_save_register_func_postload(seibu_sound_state_postload);
|
||||
}
|
||||
|
||||
WRITE_HANDLER( seibu_coin_w )
|
||||
|
||||
@@ -145,7 +145,7 @@ WRITE_HANDLER( zaxxon_sound_w )
|
||||
sample_stop(sa[21].channel);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
/* break; */
|
||||
case 1:
|
||||
case 2:
|
||||
for (line = 0;line < 8;line++)
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "driver.h"
|
||||
#include "state.h"
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
@@ -1234,6 +1235,13 @@ log_cb(RETRO_LOG_ERROR, LOGPRE "Sound #%d wrong ID %d: check enum SOUND_... in s
|
||||
/* samples will be read later if needed */
|
||||
Machine->samples = 0;
|
||||
|
||||
/* Save the sound latches: a command the main CPU wrote and the sound
|
||||
CPU has not read yet must still be there after loading */
|
||||
state_save_register_int("soundlatch", 0, "latch", &latch);
|
||||
state_save_register_int("soundlatch", 0, "latch2", &latch2);
|
||||
state_save_register_int("soundlatch", 0, "latch3", &latch3);
|
||||
state_save_register_int("soundlatch", 0, "latch4", &latch4);
|
||||
|
||||
refresh_period = TIME_IN_HZ(Machine->drv->frames_per_second);
|
||||
refresh_period_inv = 1.0 / refresh_period;
|
||||
sound_update_timer = timer_alloc(NULL);
|
||||
@@ -1252,6 +1260,7 @@ log_cb(RETRO_LOG_ERROR, LOGPRE "Sound #%d wrong ID %d: check enum SOUND_... in s
|
||||
totalsound++;
|
||||
}
|
||||
|
||||
mixer_register_state();
|
||||
return 0;
|
||||
|
||||
|
||||
|
||||
+11
-2
@@ -7,6 +7,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
#include "driver.h"
|
||||
#include "state.h"
|
||||
#include "fm.h"
|
||||
#include "ym2151.h"
|
||||
|
||||
@@ -17,6 +18,11 @@ static int stream[MAX_2151];
|
||||
static const struct YM2151interface *intf;
|
||||
|
||||
static int FMMode;
|
||||
|
||||
/* the register each chip's data port writes to: the CPU selects it once and
|
||||
may write the data port many frames later, so save states keep it */
|
||||
static int lastreg0,lastreg1,lastreg2;
|
||||
|
||||
#define CHIP_YM2151_DAC 4 /* use Tatsuyuki's FM.C */
|
||||
#define CHIP_YM2151_ALT 5 /* use Jarek's YM2151.C */
|
||||
|
||||
@@ -76,6 +82,11 @@ static int my_YM2151_sh_start(const struct MachineSound *msound,int mode)
|
||||
|
||||
intf = msound->sound_interface;
|
||||
|
||||
lastreg0 = lastreg1 = lastreg2 = 0;
|
||||
if (intf->num > 0) state_save_register_int("YM2151intf", 0, "lastreg", &lastreg0);
|
||||
if (intf->num > 1) state_save_register_int("YM2151intf", 1, "lastreg", &lastreg1);
|
||||
if (intf->num > 2) state_save_register_int("YM2151intf", 2, "lastreg", &lastreg2);
|
||||
|
||||
if( mode ) FMMode = CHIP_YM2151_ALT;
|
||||
else FMMode = CHIP_YM2151_DAC;
|
||||
|
||||
@@ -201,8 +212,6 @@ void YM2151_sh_reset(void)
|
||||
|
||||
}
|
||||
|
||||
static int lastreg0,lastreg1,lastreg2;
|
||||
|
||||
READ_HANDLER( YM2151_status_port_0_r )
|
||||
{
|
||||
switch(FMMode)
|
||||
|
||||
+47
-4
@@ -18,6 +18,7 @@
|
||||
******************************************************************************/
|
||||
#include "driver.h"
|
||||
#include "3812intf.h"
|
||||
#include "state.h"
|
||||
#include "fm.h"
|
||||
#include "sound/fmopl.h"
|
||||
|
||||
@@ -27,6 +28,42 @@
|
||||
static int stream_3812[MAX_3812];
|
||||
static void *Timer_3812[MAX_3812*2];
|
||||
static const struct YM3812interface *intf_3812 = NULL;
|
||||
|
||||
/* The OPL core keeps no save state: the interface keeps a copy of every
|
||||
register written (and the address register), saves it, and writes it all
|
||||
back on load. That restores the channels and starts the timers again, which
|
||||
sound CPUs that wait on the timer flag or take its interrupt need. */
|
||||
static UINT8 regs_3812[MAX_3812][256];
|
||||
static UINT8 addr_3812[MAX_3812];
|
||||
|
||||
static void YM3812_postload(void)
|
||||
{
|
||||
int i, r;
|
||||
for (i = 0; i < intf_3812->num; i++)
|
||||
{
|
||||
YM3812ResetChip(i);
|
||||
for (r = 0x01; r < 0x100; r++)
|
||||
{
|
||||
if (r == 0x04)
|
||||
continue;
|
||||
YM3812Write(i, 0, r);
|
||||
YM3812Write(i, 1, regs_3812[i][r]);
|
||||
}
|
||||
/* the timers last: their load values are in place, start them (bit 7, the IRQ reset, is an action) */
|
||||
YM3812Write(i, 0, 0x04);
|
||||
YM3812Write(i, 1, regs_3812[i][0x04] & 0x63);
|
||||
YM3812Write(i, 0, addr_3812[i]);
|
||||
}
|
||||
}
|
||||
|
||||
static void YM3812_write_shadow(int n, int a, int data)
|
||||
{
|
||||
if (a == 0)
|
||||
addr_3812[n] = data;
|
||||
else
|
||||
regs_3812[n][addr_3812[n]] = data;
|
||||
YM3812Write(n, a, data);
|
||||
}
|
||||
static void IRQHandler_3812(int n,int irq)
|
||||
{
|
||||
if (intf_3812->handler[n]) (intf_3812->handler[n])(irq ? ASSERT_LINE : CLEAR_LINE);
|
||||
@@ -86,7 +123,13 @@ int YM3812_sh_start(const struct MachineSound *msound)
|
||||
|
||||
Timer_3812[i*2+0] = timer_alloc(timer_callback_3812);
|
||||
Timer_3812[i*2+1] = timer_alloc(timer_callback_3812);
|
||||
|
||||
memset(regs_3812[i], 0, sizeof(regs_3812[i]));
|
||||
addr_3812[i] = 0;
|
||||
state_save_register_UINT8("YM3812", i, "regs", regs_3812[i], 256);
|
||||
state_save_register_UINT8("YM3812", i, "address", &addr_3812[i], 1);
|
||||
}
|
||||
state_save_register_func_postload(YM3812_postload);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -105,10 +148,10 @@ void YM3812_sh_reset(void)
|
||||
}
|
||||
|
||||
WRITE_HANDLER( YM3812_control_port_0_w ) {
|
||||
YM3812Write(0, 0, data);
|
||||
YM3812_write_shadow(0, 0, data);
|
||||
}
|
||||
WRITE_HANDLER( YM3812_write_port_0_w ) {
|
||||
YM3812Write(0, 1, data);
|
||||
YM3812_write_shadow(0, 1, data);
|
||||
}
|
||||
READ_HANDLER( YM3812_status_port_0_r ) {
|
||||
return YM3812Read(0, 0);
|
||||
@@ -119,10 +162,10 @@ READ_HANDLER( YM3812_read_port_0_r ) {
|
||||
|
||||
|
||||
WRITE_HANDLER( YM3812_control_port_1_w ) {
|
||||
YM3812Write(1, 0, data);
|
||||
YM3812_write_shadow(1, 0, data);
|
||||
}
|
||||
WRITE_HANDLER( YM3812_write_port_1_w ) {
|
||||
YM3812Write(1, 1, data);
|
||||
YM3812_write_shadow(1, 1, data);
|
||||
}
|
||||
READ_HANDLER( YM3812_status_port_1_r ) {
|
||||
return YM3812Read(1, 0);
|
||||
|
||||
@@ -24,6 +24,7 @@ added external port callback, and functions to set the volume of the channels
|
||||
|
||||
|
||||
#include "driver.h"
|
||||
#include "state.h"
|
||||
#include <math.h>
|
||||
|
||||
|
||||
@@ -339,6 +340,16 @@ int K007232_sh_start(const struct MachineSound *msound)
|
||||
|
||||
pcm_chan[j] = stream_init_multi(2,name,vol,Machine->sample_rate,
|
||||
j,KDAC_A_update);
|
||||
|
||||
/* Save the channels and the registers, so a loaded save state keeps
|
||||
its sound (the sample ROM pointers do not change) */
|
||||
state_save_register_UINT8 ("K007232", j, "vol", &kpcm[j].vol[0][0], KDAC_A_PCM_MAX * 2);
|
||||
state_save_register_UINT32("K007232", j, "addr", kpcm[j].addr, KDAC_A_PCM_MAX);
|
||||
state_save_register_UINT32("K007232", j, "start", kpcm[j].start, KDAC_A_PCM_MAX);
|
||||
state_save_register_UINT32("K007232", j, "step", kpcm[j].step, KDAC_A_PCM_MAX);
|
||||
state_save_register_UINT32("K007232", j, "bank", kpcm[j].bank, KDAC_A_PCM_MAX);
|
||||
state_save_register_INT32 ("K007232", j, "play", kpcm[j].play, KDAC_A_PCM_MAX);
|
||||
state_save_register_UINT8 ("K007232", j, "wreg", kpcm[j].wreg, 0x10);
|
||||
}
|
||||
|
||||
KDAC_A_make_fncode();
|
||||
|
||||
+31
-8
@@ -5,6 +5,7 @@
|
||||
*********************************************************/
|
||||
|
||||
#include "driver.h"
|
||||
#include "state.h"
|
||||
#include "k053260.h"
|
||||
|
||||
/* 2004-02-28: Fixed ppcm decoding. Games sound much better now.*/
|
||||
@@ -14,14 +15,14 @@
|
||||
#define BASE_SHIFT 16
|
||||
|
||||
struct K053260_channel_def {
|
||||
unsigned long rate;
|
||||
unsigned long size;
|
||||
unsigned long start;
|
||||
unsigned long bank;
|
||||
unsigned long volume;
|
||||
UINT32 rate;
|
||||
UINT32 size;
|
||||
UINT32 start;
|
||||
UINT32 bank;
|
||||
UINT32 volume;
|
||||
int play;
|
||||
unsigned long pan;
|
||||
unsigned long pos;
|
||||
UINT32 pan;
|
||||
UINT32 pos;
|
||||
int loop;
|
||||
int ppcm; /* packed PCM ( 4 bit signed ) */
|
||||
int ppcm_data;
|
||||
@@ -229,6 +230,28 @@ int K053260_sh_start(const struct MachineSound *msound) {
|
||||
|
||||
InitDeltaTable( ics );
|
||||
|
||||
/* Save the registers (the first 8 are the latches between the main
|
||||
and the sound CPU) and the channels, so a loaded save state keeps
|
||||
its sound and the two CPUs keep talking */
|
||||
state_save_register_int("K053260", ics, "mode", &ic->mode);
|
||||
state_save_register_INT32("K053260", ics, "regs", (INT32 *)ic->regs, 0x30);
|
||||
for ( i = 0; i < 4; i++ ) {
|
||||
struct K053260_channel_def *ch = &ic->channels[i];
|
||||
char name[32];
|
||||
|
||||
sprintf(name, "ch%d rate", i); state_save_register_UINT32("K053260", ics, name, &ch->rate, 1);
|
||||
sprintf(name, "ch%d size", i); state_save_register_UINT32("K053260", ics, name, &ch->size, 1);
|
||||
sprintf(name, "ch%d start", i); state_save_register_UINT32("K053260", ics, name, &ch->start, 1);
|
||||
sprintf(name, "ch%d bank", i); state_save_register_UINT32("K053260", ics, name, &ch->bank, 1);
|
||||
sprintf(name, "ch%d volume", i); state_save_register_UINT32("K053260", ics, name, &ch->volume, 1);
|
||||
sprintf(name, "ch%d play", i); state_save_register_int("K053260", ics, name, &ch->play);
|
||||
sprintf(name, "ch%d pan", i); state_save_register_UINT32("K053260", ics, name, &ch->pan, 1);
|
||||
sprintf(name, "ch%d pos", i); state_save_register_UINT32("K053260", ics, name, &ch->pos, 1);
|
||||
sprintf(name, "ch%d loop", i); state_save_register_int("K053260", ics, name, &ch->loop);
|
||||
sprintf(name, "ch%d ppcm", i); state_save_register_int("K053260", ics, name, &ch->ppcm);
|
||||
sprintf(name, "ch%d ppcm_data", i); state_save_register_int("K053260", ics, name, &ch->ppcm_data);
|
||||
}
|
||||
|
||||
/* setup SH1 timer if necessary */
|
||||
if ( intf->irq[ics] )
|
||||
timer_pulse( TIME_IN_HZ( ( intf->clock[ics] / 32 ) ), 0, intf->irq[ics] );
|
||||
@@ -275,7 +298,7 @@ static INLINE void check_bounds( int chip, int channel ) {
|
||||
|
||||
ic->channels[channel].size = ic->rom_size - channel_start;
|
||||
}
|
||||
log_cb(RETRO_LOG_DEBUG, LOGPRE "K053260: Sample Start = %06x, Sample End = %06x, Sample rate = %04lx, PPCM = %s\n", channel_start, channel_end, ic->channels[channel].rate, ic->channels[channel].ppcm ? "yes" : "no" );
|
||||
log_cb(RETRO_LOG_DEBUG, LOGPRE "K053260: Sample Start = %06x, Sample End = %06x, Sample rate = %04x, PPCM = %s\n", channel_start, channel_end, ic->channels[channel].rate, ic->channels[channel].ppcm ? "yes" : "no" );
|
||||
}
|
||||
|
||||
void K053260_write( int chip, offs_t offset, data8_t data )
|
||||
|
||||
@@ -503,6 +503,19 @@ static void K054539_init_chip(int chip, const struct MachineSound *msound)
|
||||
state_save_register_UINT8("K054539", chip, "registers", K054539_chips.chip[chip].regs, 0x230);
|
||||
state_save_register_UINT8("K054539", chip, "ram", K054539_chips.chip[chip].ram, 0x4000);
|
||||
state_save_register_int ("K054539", chip, "cur_ptr", &K054539_chips.chip[chip].cur_ptr);
|
||||
/* where each channel plays and the echo buffer's position: without them
|
||||
every sound restarts from where the chip stood when the save was loaded */
|
||||
state_save_register_int ("K054539", chip, "reverb_pos", &K054539_chips.chip[chip].reverb_pos);
|
||||
{
|
||||
int ch;
|
||||
for (ch = 0; ch < 8; ch++)
|
||||
{
|
||||
state_save_register_UINT32("K054539", chip * 8 + ch, "ch pos", &K054539_chips.chip[chip].channels[ch].pos, 1);
|
||||
state_save_register_UINT32("K054539", chip * 8 + ch, "ch pfrac", &K054539_chips.chip[chip].channels[ch].pfrac, 1);
|
||||
state_save_register_INT32 ("K054539", chip * 8 + ch, "ch val", &K054539_chips.chip[chip].channels[ch].val, 1);
|
||||
state_save_register_INT32 ("K054539", chip * 8 + ch, "ch pval", &K054539_chips.chip[chip].channels[ch].pval, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void K054539_stop_chip(int chip)
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
|
||||
#include "driver.h"
|
||||
#include "filter.h"
|
||||
#include "state.h"
|
||||
|
||||
#include <math.h>
|
||||
#include <limits.h>
|
||||
@@ -107,6 +108,104 @@ static INT16 mix_buffer[ACCUMULATOR_SAMPLES*2]; /* *2 for stereo */
|
||||
/* global sample tracking */
|
||||
static unsigned samples_this_frame;
|
||||
|
||||
/***************************************************************************
|
||||
save states
|
||||
|
||||
The channels' playback positions (samples ready but not played yet),
|
||||
resample phase and filter history, and the accumulators, kept with a
|
||||
save. Without them a loaded game renders a few samples more or less in
|
||||
its first frame, and every sound chip stays that far off the run it was
|
||||
saved from. Non-streamed sample playback (data pointers) is not saved.
|
||||
***************************************************************************/
|
||||
|
||||
static int ss_channels;
|
||||
static UINT32 ss_accum_base;
|
||||
static UINT32 ss_samples_available[MIXER_MAX_CHANNELS];
|
||||
static INT32 ss_frac[MIXER_MAX_CHANNELS], ss_pivot[MIXER_MAX_CHANNELS];
|
||||
static INT32 ss_from_frequency[MIXER_MAX_CHANNELS], ss_lowpass_frequency[MIXER_MAX_CHANNELS];
|
||||
static INT32 ss_volume[MIXER_MAX_CHANNELS][2];
|
||||
static UINT32 ss_prev_mac[MIXER_MAX_CHANNELS][2];
|
||||
static INT32 ss_xprev[MIXER_MAX_CHANNELS][2][FILTER_ORDER_MAX];
|
||||
|
||||
static void mixer_channel_resample_set(struct mixer_channel_data *channel, unsigned from_frequency, unsigned lowpass_frequency, int restart);
|
||||
|
||||
static void mixer_presave(void)
|
||||
{
|
||||
int ch, side, i;
|
||||
|
||||
ss_accum_base = accum_base;
|
||||
for (ch = 0; ch < ss_channels; ch++)
|
||||
{
|
||||
struct mixer_channel_data *channel = &mixer_channel[ch];
|
||||
ss_samples_available[ch] = channel->samples_available;
|
||||
ss_frac[ch] = channel->frac;
|
||||
ss_pivot[ch] = channel->pivot;
|
||||
ss_from_frequency[ch] = channel->from_frequency;
|
||||
ss_lowpass_frequency[ch] = channel->lowpass_frequency;
|
||||
ss_volume[ch][0] = channel->left_volume;
|
||||
ss_volume[ch][1] = channel->right_volume;
|
||||
for (side = 0; side < 2; side++)
|
||||
{
|
||||
filter_state *state = side ? channel->right : channel->left;
|
||||
ss_prev_mac[ch][side] = state ? state->prev_mac : 0;
|
||||
for (i = 0; i < FILTER_ORDER_MAX; i++)
|
||||
ss_xprev[ch][side][i] = state ? state->xprev[i] : 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void mixer_postload(void)
|
||||
{
|
||||
int ch, side, i;
|
||||
|
||||
accum_base = ss_accum_base & ACCUMULATOR_MASK;
|
||||
for (ch = 0; ch < ss_channels; ch++)
|
||||
{
|
||||
struct mixer_channel_data *channel = &mixer_channel[ch];
|
||||
if ((unsigned)ss_from_frequency[ch] != channel->from_frequency || (unsigned)ss_lowpass_frequency[ch] != channel->lowpass_frequency)
|
||||
mixer_channel_resample_set(channel, ss_from_frequency[ch], ss_lowpass_frequency[ch], 0);
|
||||
channel->samples_available = ss_samples_available[ch];
|
||||
channel->frac = ss_frac[ch];
|
||||
channel->pivot = ss_pivot[ch];
|
||||
channel->left_volume = ss_volume[ch][0];
|
||||
channel->right_volume = ss_volume[ch][1];
|
||||
channel->is_reset_requested = 0;
|
||||
for (side = 0; side < 2; side++)
|
||||
{
|
||||
filter_state *state = side ? channel->right : channel->left;
|
||||
if (!state)
|
||||
continue;
|
||||
state->prev_mac = ss_prev_mac[ch][side];
|
||||
for (i = 0; i < FILTER_ORDER_MAX; i++)
|
||||
state->xprev[i] = ss_xprev[ch][side][i];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Called once every sound chip has its channels. */
|
||||
void mixer_register_state(void)
|
||||
{
|
||||
int ch;
|
||||
|
||||
ss_channels = first_free_channel;
|
||||
state_save_register_UINT32("mixer", 0, "accum base", &ss_accum_base, 1);
|
||||
state_save_register_INT32("mixer", 0, "left accum", left_accum, ACCUMULATOR_SAMPLES);
|
||||
state_save_register_INT32("mixer", 0, "right accum", right_accum, ACCUMULATOR_SAMPLES);
|
||||
for (ch = 0; ch < ss_channels; ch++)
|
||||
{
|
||||
state_save_register_UINT32("mixer", ch, "available", &ss_samples_available[ch], 1);
|
||||
state_save_register_INT32("mixer", ch, "frac", &ss_frac[ch], 1);
|
||||
state_save_register_INT32("mixer", ch, "pivot", &ss_pivot[ch], 1);
|
||||
state_save_register_INT32("mixer", ch, "from", &ss_from_frequency[ch], 1);
|
||||
state_save_register_INT32("mixer", ch, "lowpass", &ss_lowpass_frequency[ch], 1);
|
||||
state_save_register_INT32("mixer", ch, "volume", ss_volume[ch], 2);
|
||||
state_save_register_UINT32("mixer", ch, "filter mac", ss_prev_mac[ch], 2);
|
||||
state_save_register_INT32("mixer", ch, "filter history", &ss_xprev[ch][0][0], 2 * FILTER_ORDER_MAX);
|
||||
}
|
||||
state_save_register_func_presave(mixer_presave);
|
||||
state_save_register_func_postload(mixer_postload);
|
||||
}
|
||||
|
||||
/***************************************************************************
|
||||
mixer_channel_resample
|
||||
***************************************************************************/
|
||||
|
||||
@@ -72,6 +72,7 @@
|
||||
int mixer_sh_start(void);
|
||||
void mixer_sh_stop(void);
|
||||
void mixer_sh_update(void);
|
||||
void mixer_register_state(void);
|
||||
int mixer_allocate_channel(int default_mixing_level);
|
||||
int mixer_allocate_channels(int channels,const int *default_mixing_levels);
|
||||
void mixer_set_name(int channel,const char *name);
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
#include "driver.h"
|
||||
#include "namco.h"
|
||||
#include "state.h"
|
||||
|
||||
|
||||
/* 8 voices max */
|
||||
@@ -397,6 +398,23 @@ int namco_sh_start(const struct MachineSound *msound)
|
||||
voice->noise_counter = 0;
|
||||
}
|
||||
|
||||
/* Save the voices and the enable: many games write the enable once, at boot,
|
||||
so a save loaded later kept the sound off */
|
||||
state_save_register_int("namco", 0, "sound_enable", &sound_enable);
|
||||
for (voice = channel_list; voice < last_channel; voice++)
|
||||
{
|
||||
int v = voice - channel_list;
|
||||
state_save_register_UINT32("namco", v, "frequency", &voice->frequency, 1);
|
||||
state_save_register_UINT32("namco", v, "counter", &voice->counter, 1);
|
||||
state_save_register_int("namco", v, "volume_l", &voice->volume[0]);
|
||||
state_save_register_int("namco", v, "volume_r", &voice->volume[1]);
|
||||
state_save_register_int("namco", v, "noise_sw", &voice->noise_sw);
|
||||
state_save_register_int("namco", v, "noise_state", &voice->noise_state);
|
||||
state_save_register_int("namco", v, "noise_seed", &voice->noise_seed);
|
||||
state_save_register_UINT32("namco", v, "noise_counter", &voice->noise_counter, 1);
|
||||
state_save_register_int("namco", v, "waveform_select", &voice->waveform_select);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -72,6 +72,7 @@ TODO:
|
||||
|
||||
#include "driver.h"
|
||||
#include "filter.h"
|
||||
#include "state.h"
|
||||
|
||||
|
||||
static int fetch;
|
||||
@@ -699,6 +700,33 @@ int namco_54xx_sh_start(const struct MachineSound *msound)
|
||||
|
||||
stream = stream_init_multi(NAMCO54xx_NUMBUF, name, vol, chip_sampfreq, 0, NAMCO54xxUpdateOne);
|
||||
|
||||
/* the explosions' envelopes, noise generator and filters, kept with a save */
|
||||
{
|
||||
static int *const ints[] = {
|
||||
&fetch, &fetchmode, &type_A_active, &type_B_active, &type_C_active,
|
||||
&type_A_state, &type_B_state, &type_C_state,
|
||||
&type_A_pos, &type_A_add, &type_A_curr_vol, &type_A_rel_pos,
|
||||
&type_B_pos, &type_B_add, &type_B_curr_vol, &type_B_rel_pos,
|
||||
&RNG, &RNG_p, &RNG_f_0, &RNG_f_1, &RNG_delay, &out_prev,
|
||||
&noise_out_A, &noise_out_B, &noise_B_will_change, &RNG_p_delay_B };
|
||||
static const char *const names[] = {
|
||||
"fetch", "fetchmode", "A active", "B active", "C active",
|
||||
"A state", "B state", "C state",
|
||||
"A pos", "A add", "A vol", "A rel", "B pos", "B add", "B vol", "B rel",
|
||||
"RNG", "RNG p", "RNG f0", "RNG f1", "RNG delay", "out prev",
|
||||
"noise A", "noise B", "noise B changes", "RNG p delay B" };
|
||||
for (i = 0; i < sizeof(ints) / sizeof(ints[0]); i++)
|
||||
state_save_register_int("namco54", 0, names[i], ints[i]);
|
||||
state_save_register_UINT8("namco54", 0, "A par", type_A_par, 4);
|
||||
state_save_register_UINT8("namco54", 0, "B par", type_B_par, 4);
|
||||
state_save_register_UINT8("namco54", 0, "C par", type_C_par, 5);
|
||||
for (i = 0; i < 3; i++)
|
||||
{
|
||||
state_save_register_double("namco54", i, "filter x", &filter54[i].x0, 3);
|
||||
state_save_register_double("namco54", i, "filter y", &filter54[i].y0, 3);
|
||||
}
|
||||
}
|
||||
|
||||
logerror("Namco 54xx clock=%f sample rate=%f\n", chip_clock, chip_sampfreq);
|
||||
|
||||
/* calculate emulation tables */
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
|
||||
#include <math.h>
|
||||
#include "driver.h"
|
||||
#include "state.h"
|
||||
|
||||
/*
|
||||
Two Q sound drivers:
|
||||
@@ -157,6 +158,28 @@ int qsound_sh_start(const struct MachineSound *msound)
|
||||
i=0;
|
||||
#endif
|
||||
|
||||
/* Save the channels, so a loaded save state keeps its sound */
|
||||
for (i = 0; i < QSOUND_CHANNELS; i++)
|
||||
{
|
||||
state_save_register_int("QSound", i, "bank", &qsound_channel[i].bank);
|
||||
state_save_register_int("QSound", i, "address", &qsound_channel[i].address);
|
||||
state_save_register_int("QSound", i, "pitch", &qsound_channel[i].pitch);
|
||||
state_save_register_int("QSound", i, "reg3", &qsound_channel[i].reg3);
|
||||
state_save_register_int("QSound", i, "loop", &qsound_channel[i].loop);
|
||||
state_save_register_int("QSound", i, "end", &qsound_channel[i].end);
|
||||
state_save_register_int("QSound", i, "vol", &qsound_channel[i].vol);
|
||||
state_save_register_int("QSound", i, "pan", &qsound_channel[i].pan);
|
||||
state_save_register_int("QSound", i, "reg9", &qsound_channel[i].reg9);
|
||||
state_save_register_int("QSound", i, "key", &qsound_channel[i].key);
|
||||
#if QSOUND_DRIVER1
|
||||
state_save_register_int("QSound", i, "lvol", &qsound_channel[i].lvol);
|
||||
state_save_register_int("QSound", i, "rvol", &qsound_channel[i].rvol);
|
||||
state_save_register_int("QSound", i, "lastdt", &qsound_channel[i].lastdt);
|
||||
state_save_register_int("QSound", i, "offset", &qsound_channel[i].offset);
|
||||
#endif
|
||||
}
|
||||
state_save_register_int("QSound", 0, "data", &qsound_data);
|
||||
|
||||
#if LOG_QSOUND
|
||||
log_cb(RETRO_LOG_DEBUG, LOGPRE "Pan table\n");
|
||||
for (i=0; i<33; i++)
|
||||
|
||||
+48
-1
@@ -130,6 +130,8 @@ typedef struct
|
||||
double timer_A_time[1024]; /* timer A times for MAME */
|
||||
double timer_B_time[256]; /* timer B times for MAME */
|
||||
int irqlinestate;
|
||||
double timer_A_left; /* save states: time to the next timer A overflow (-1 = stopped) */
|
||||
double timer_B_left; /* save states: time to the next timer B overflow (-1 = stopped) */
|
||||
#else
|
||||
UINT8 tim_A; /* timer A enable (0-disabled) */
|
||||
UINT8 tim_B; /* timer B enable (0-disabled) */
|
||||
@@ -1388,6 +1390,35 @@ int YM2151ReadStatus( int n )
|
||||
/*
|
||||
* state save support for MAME
|
||||
*/
|
||||
/* The timers are MAME timers, which a save state does not keep: save the
|
||||
time left to each overflow, and start them again after loading. Without
|
||||
this a loaded game whose sound CPU waits for a timer flag, or takes its
|
||||
interrupt from a timer, stays silent. */
|
||||
#ifdef USE_MAME_TIMERS
|
||||
static double ym2151_timer_left(void *timer)
|
||||
{
|
||||
int enabled = timer_enable(timer, 1);
|
||||
double left;
|
||||
|
||||
timer_enable(timer, enabled);
|
||||
if (!enabled)
|
||||
return -1.0;
|
||||
left = timer_timeleft(timer);
|
||||
return left > 0 ? left : 0;
|
||||
}
|
||||
|
||||
static void ym2151_presave(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i=0; i<YMNumChips; i++)
|
||||
{
|
||||
YMPSG[i].timer_A_left = ym2151_timer_left(YMPSG[i].timer_A);
|
||||
YMPSG[i].timer_B_left = ym2151_timer_left(YMPSG[i].timer_B);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
static void ym2151_postload_refresh(void)
|
||||
{
|
||||
int i,j;
|
||||
@@ -1396,8 +1427,19 @@ static void ym2151_postload_refresh(void)
|
||||
{
|
||||
for (j=0; j<8; j++)
|
||||
{
|
||||
set_connect(&YMPSG[i].oper[j*4], YMPSG[i].connect[j], j);
|
||||
set_connect(&YMPSG[i].oper[j*4], j, YMPSG[i].connect[j]);
|
||||
}
|
||||
|
||||
#ifdef USE_MAME_TIMERS
|
||||
if (YMPSG[i].timer_A_left >= 0)
|
||||
timer_adjust(YMPSG[i].timer_A, YMPSG[i].timer_A_left, i, 0);
|
||||
else
|
||||
timer_enable(YMPSG[i].timer_A, 0);
|
||||
if (YMPSG[i].timer_B_left >= 0)
|
||||
timer_adjust(YMPSG[i].timer_B, YMPSG[i].timer_B_left, i, 0);
|
||||
else
|
||||
timer_enable(YMPSG[i].timer_B, 0);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1498,11 +1540,16 @@ static void ym2151_state_save_register( int numchips )
|
||||
|
||||
#ifdef USE_MAME_TIMERS
|
||||
state_save_register_int (buf1, i, "sndindex", &YMPSG[i].irqlinestate);
|
||||
state_save_register_double (buf1, i, "TimAleft", &YMPSG[i].timer_A_left, 1);
|
||||
state_save_register_double (buf1, i, "TimBleft", &YMPSG[i].timer_B_left, 1);
|
||||
#endif
|
||||
|
||||
state_save_register_UINT8 (buf1, i, "connect" , &YMPSG[i].connect[0], 8);
|
||||
}
|
||||
|
||||
#ifdef USE_MAME_TIMERS
|
||||
state_save_register_func_presave(ym2151_presave);
|
||||
#endif
|
||||
state_save_register_func_postload(ym2151_postload_refresh);
|
||||
}
|
||||
#else
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "driver.h"
|
||||
#include "state.h"
|
||||
#include "vidhrdw/konamiic.h"
|
||||
|
||||
|
||||
@@ -56,6 +57,7 @@ VIDEO_START( aliens )
|
||||
paletteram = auto_malloc(0x400);
|
||||
if (!paletteram)
|
||||
return 1;
|
||||
state_save_register_UINT8("aliens", 0, "paletteram", paletteram, 0x400);
|
||||
|
||||
layer_colorbase[0] = 0;
|
||||
layer_colorbase[1] = 4;
|
||||
|
||||
@@ -271,6 +271,12 @@ static struct CPS1config cps1_config_table[]=
|
||||
{"ghouls", CPS_B_01, 0,0,0, 0x0000,0xffff,0x0000,0xffff, 1 },
|
||||
{"ghoulsu", CPS_B_01, 0,0,0, 0x0000,0xffff,0x0000,0xffff, 1 },
|
||||
{"daimakai",CPS_B_01, 0,0,0, 0x0000,0xffff,0x0000,0xffff, 1 },
|
||||
{"ghoulsmaiden",CPS_B_01, 0,0,0, 0x0000,0xffff,0x0000,0xffff, 1 },
|
||||
{"ghoulsknight",CPS_B_01, 0,0,0, 0x0000,0xffff,0x0000,0xffff, 1 },
|
||||
{"ghoulsumaiden",CPS_B_01, 0,0,0, 0x0000,0xffff,0x0000,0xffff, 1 },
|
||||
{"ghoulsuknight",CPS_B_01, 0,0,0, 0x0000,0xffff,0x0000,0xffff, 1 },
|
||||
{"daimakaimaiden",CPS_B_01, 0,0,0, 0x0000,0xffff,0x0000,0xffff, 1 },
|
||||
{"daimakaiknight",CPS_B_01, 0,0,0, 0x0000,0xffff,0x0000,0xffff, 1 },
|
||||
{"strider", CPS_B_01, 1,0,1, 0x0000,0xffff,0x0000,0xffff },
|
||||
{"stridrua",CPS_B_01, 1,0,1, 0x0000,0xffff,0x0000,0xffff },
|
||||
{"striderj",CPS_B_01, 1,0,1, 0x0000,0xffff,0x0000,0xffff },
|
||||
@@ -780,6 +786,8 @@ DRIVER_INIT( cps2 )
|
||||
data16_t *xor = (data16_t *)memory_region(REGION_USER1);
|
||||
int i;
|
||||
|
||||
cps_qsound_state_register();
|
||||
|
||||
|
||||
for (i = 0;i < memory_region_length(REGION_CPU1)/2;i++)
|
||||
xor[i] ^= rom[i];
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
|
||||
#include "driver.h"
|
||||
#include "vidhrdw/generic.h"
|
||||
#include "state.h"
|
||||
|
||||
|
||||
|
||||
@@ -250,6 +251,10 @@ VIDEO_START( galaga )
|
||||
}
|
||||
}
|
||||
|
||||
/* the star field's scroll, kept with a save (or the stars jump on load) */
|
||||
state_save_register_UINT32("galaga", 0, "stars scroll x", &stars_scrollx, 1);
|
||||
state_save_register_UINT32("galaga", 0, "stars scroll y", &stars_scrolly, 1);
|
||||
state_save_register_int("galaga", 0, "gfx bank", &galaga_gfxbank);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
+11
-3
@@ -2413,6 +2413,7 @@ static int K051960_spriteflip,K051960_readroms;
|
||||
static unsigned char K051960_spriterombank[3];
|
||||
static unsigned char *K051960_ram;
|
||||
static int K051960_irq_enabled, K051960_nmi_enabled;
|
||||
static int K051937_counter;
|
||||
|
||||
|
||||
int K051960_vh_start(int gfx_memory_region,int plane0,int plane1,int plane2,int plane3,
|
||||
@@ -2480,6 +2481,15 @@ int K051960_vh_start(int gfx_memory_region,int plane0,int plane1,int plane2,int
|
||||
if (!K051960_ram) return 1;
|
||||
memset(K051960_ram,0,0x400);
|
||||
|
||||
state_save_register_UINT8("K051960", 0, "memory", K051960_ram, 0x400);
|
||||
state_save_register_int ("K051960", 0, "romoffset", &K051960_romoffset);
|
||||
state_save_register_int ("K051960", 0, "flip", &K051960_spriteflip);
|
||||
state_save_register_int ("K051960", 0, "readroms", &K051960_readroms);
|
||||
state_save_register_UINT8("K051960", 0, "rombank", K051960_spriterombank, 3);
|
||||
state_save_register_int ("K051960", 0, "irqen", &K051960_irq_enabled);
|
||||
state_save_register_int ("K051960", 0, "nmien", &K051960_nmi_enabled);
|
||||
state_save_register_int ("K051960", 0, "counter", &K051937_counter);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -2546,10 +2556,8 @@ READ_HANDLER( K051937_r )
|
||||
{
|
||||
if (offset == 0)
|
||||
{
|
||||
static int counter;
|
||||
|
||||
/* some games need bit 0 to pulse */
|
||||
return (counter++) & 1;
|
||||
return (K051937_counter++) & 1;
|
||||
}
|
||||
/*logerror("%04x: read unknown 051937 address %x\n",activecpu_get_pc(),offset);*/
|
||||
return 0;
|
||||
|
||||
@@ -261,9 +261,9 @@ WRITE_HANDLER( pleiads_videoreg_w )
|
||||
Four palette changes by level. The palette selection is
|
||||
wrong, but the same paletter is used for both layers. */
|
||||
|
||||
if (palette_bank != ((~data >> 1) & 3))
|
||||
if (palette_bank != ((data >> 1) & 3))
|
||||
{
|
||||
palette_bank = ((~data >> 1) & 3);
|
||||
palette_bank = ((data >> 1) & 3);
|
||||
|
||||
tilemap_mark_all_tiles_dirty(ALL_TILEMAPS);
|
||||
|
||||
|
||||
@@ -300,6 +300,13 @@ static void vblank_end(int param)
|
||||
}
|
||||
|
||||
|
||||
/* Mega Play: raise the VBLANK status bit at the start of blanking, ahead of
|
||||
V-INT (VIDEO_EOF only runs after the screen update) */
|
||||
void segac2_vdp_set_vblank(void)
|
||||
{
|
||||
internal_vblank = 1;
|
||||
}
|
||||
|
||||
/* end-of-frame callback to mark the start of VBLANK */
|
||||
VIDEO_EOF( segac2 )
|
||||
{
|
||||
@@ -686,8 +693,21 @@ static int vdp_control_r(void)
|
||||
status |= 0x0008;
|
||||
|
||||
/* set the HBLANK bit */
|
||||
if (beampos < Machine->visible_area.min_x || beampos > Machine->visible_area.max_x)
|
||||
status |= 0x0004;
|
||||
{
|
||||
extern int genesis_vdp_iack;
|
||||
if (genesis_vdp_iack)
|
||||
{
|
||||
/* cpu_gethorzbeampos() runs 0..screen_width-1 over the whole line, so in
|
||||
H40 mode (visible area 0-319) the old test below was never true and
|
||||
HBLANK never appeared. Mega Play: HBLANK for the last fifth of the line
|
||||
(the same window the old test gave in H32 mode). Grand Slam waits on
|
||||
HBLANK edges to send one long per line and hung forever. */
|
||||
if (beampos >= (Machine->drv->screen_width * 4) / 5)
|
||||
status |= 0x0004;
|
||||
}
|
||||
else if (beampos < Machine->visible_area.min_x || beampos > Machine->visible_area.max_x)
|
||||
status |= 0x0004;
|
||||
}
|
||||
|
||||
return (status);
|
||||
}
|
||||
@@ -725,17 +745,28 @@ static void vdp_control_w(int data)
|
||||
static void vdp_register_w(int data)
|
||||
{
|
||||
int scrwidth = 0;
|
||||
static const UINT8 is_important[32] = { 0,0,1,1,1,1,0,1,0,0,0,1,0,1,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0 };
|
||||
/* R1 (display enable) and R12 (shadow/highlight) are read directly by the
|
||||
renderer, so a mid-screen write must flush the lines above too
|
||||
(Gunstar Heroes switches the display on/off from H-INT for its letterbox) */
|
||||
static const UINT8 is_important[32] = { 0,1,1,1,1,1,0,1,0,0,0,1,1,1,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0 };
|
||||
|
||||
UINT8 regnum = (data & 0x1f00) >> 8; /* ---R RRRR ---- ---- */
|
||||
UINT8 regdat = (data & 0x00ff); /* ---- ---- DDDD DDDD */
|
||||
|
||||
/* these are mostly important writes; force an update if they */
|
||||
/* are written during a screen refresh. This must happen BEFORE the
|
||||
store, otherwise the lines already displayed get the new value */
|
||||
if (!internal_vblank && is_important[regnum] && segac2_vdp_regs[regnum] != regdat)
|
||||
force_partial_update((cpu_getscanline())+ scanbase);
|
||||
|
||||
segac2_vdp_regs[regnum] = regdat;
|
||||
|
||||
/* these are mostly important writes; force an update if they */
|
||||
/* are written during a screen refresh */
|
||||
if (!internal_vblank && is_important[regnum])
|
||||
force_partial_update((cpu_getscanline())+ scanbase);
|
||||
/* interrupt enables changed: re-evaluate the 68000 IRQ line (Mega Play) */
|
||||
if (regnum <= 1)
|
||||
{
|
||||
extern void segac2_vdp_irq_update(void);
|
||||
segac2_vdp_irq_update();
|
||||
}
|
||||
|
||||
/* For quite a few of the registers its a good idea to set a couple of variable based
|
||||
upon the writes here */
|
||||
|
||||
+177
-64
@@ -21,15 +21,9 @@
|
||||
- Sonic while globally flipped via the service menu, fails to flip
|
||||
the "SEGA" and "SEGASONIC" sprite based logos on the title screen.
|
||||
|
||||
- titlef NBG0 and NBG2 layers are currently hidden during gameplay.
|
||||
It sets $31ff02 with either $7be0 and $2960 (and $31ff8e is $c00).
|
||||
Game actually uses the "rowscroll/rowselect" tables for a line window
|
||||
effect to draw the boxing ring over NBG0.
|
||||
Same deal for ga2 when in stage 2 cave a wall torch is lit.
|
||||
|
||||
- Wrong priority cases (parenthesis for the level setup):
|
||||
dbzvrvs: draws text layer ($e) behind sprite-based gauges ($f).
|
||||
dbzvrvs: Sheng-Long speech balloon during Piccoro ending (fixme: check levels).
|
||||
dbzvrvs: Shen-Long speech balloon during Piccolo ending (fixme: check levels).
|
||||
f1lap: attract mode ranking sprite-based text ($a) vs. road ($d)
|
||||
f1lap: attract mode map display (after aforementioned), sprite-based turn names
|
||||
($a) are hidden by map ($d) again;
|
||||
@@ -87,6 +81,8 @@
|
||||
-------- ------d- Disable tilemap layer 1
|
||||
-------- -------d Disable tilemap layer 0
|
||||
F04 tttttttt -------- Rowscroll/select table page number
|
||||
-------- --l----- Enable per-line clipping window 3 (overrides rowscroll/select table)
|
||||
-------- ---l---- Enable per-line clipping window 2 (overrides rowscroll/select table)
|
||||
-------- ----s--- Enable rowselect for tilemap layer 3
|
||||
-------- -----s-- Enable rowselect for tilemap layer 2
|
||||
-------- ------c- Enable rowscroll for tilemap layer 3
|
||||
@@ -245,7 +241,7 @@ struct layer_info
|
||||
struct extents_list
|
||||
{
|
||||
UINT8 scan_extent[256];
|
||||
UINT16 extent[32][16];
|
||||
UINT16 extent[256][16];
|
||||
};
|
||||
|
||||
|
||||
@@ -273,6 +269,7 @@ UINT16 system32_tilebank_external;
|
||||
|
||||
bool opaquey_hack = false; /* dink */
|
||||
bool titlef_kludge = false;
|
||||
bool f1lap_kludge = false;
|
||||
|
||||
|
||||
|
||||
@@ -297,7 +294,7 @@ static int32_t *prev_bgendx;
|
||||
static int32_t *bgcolor_line;
|
||||
|
||||
/* sprite data */
|
||||
static UINT8 sprite_render_count;
|
||||
static UINT8 sprite_render_count = 0;
|
||||
static UINT8 sprite_control_latched[8];
|
||||
static UINT8 sprite_control[8];
|
||||
static UINT32 *spriteram_32bit;
|
||||
@@ -595,7 +592,7 @@ WRITE16_HANDLER( system32_videoram_w )
|
||||
int page = offset >> 9;
|
||||
offset &= 0x1ff;
|
||||
|
||||
/* scan the cache for a matching pages */
|
||||
/* scan the cache for a matching page */
|
||||
for (entry = cache_head; entry != NULL; entry = entry->next)
|
||||
if (entry->page == page)
|
||||
tilemap_mark_tile_dirty(entry->tmap, offset);
|
||||
@@ -871,12 +868,14 @@ static void get_tile_info(int tile_index)
|
||||
static bool compute_clipping_extents(bool enable, bool clipout, int clipmask, const struct rectangle *cliprect, struct extents_list *list)
|
||||
{
|
||||
bool flip = BIT(system32_videoram[0x1ff00 / 2], 9);
|
||||
bool perlineclip2 = BIT(system32_videoram[0x1ff04 / 2], 4);
|
||||
bool perlineclip3 = BIT(system32_videoram[0x1ff04 / 2], 5);
|
||||
struct rectangle tempclip;
|
||||
struct rectangle clips[5];
|
||||
int sorted[5];
|
||||
int i, j, y;
|
||||
|
||||
/* expand our cliprect to exclude the bottom-right */
|
||||
/* expand our cliprect to include the bottom-right */
|
||||
tempclip = *cliprect;
|
||||
tempclip.max_x++;
|
||||
tempclip.max_y++;
|
||||
@@ -892,7 +891,7 @@ static bool compute_clipping_extents(bool enable, bool clipout, int clipmask, co
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* extract the from videoram into locals, and apply the cliprect */
|
||||
/* extract the clips from videoram into locals, and apply the cliprect */
|
||||
for (i = 0; i < 5; i++)
|
||||
{
|
||||
if (!flip)
|
||||
@@ -913,10 +912,19 @@ static bool compute_clipping_extents(bool enable, bool clipout, int clipmask, co
|
||||
sorted[i] = i;
|
||||
}
|
||||
|
||||
/* bubble sort them by min_x */
|
||||
for (i = 0; i < 5; i++)
|
||||
for (j = i + 1; j < 5; j++)
|
||||
if (clips[sorted[i]].min_x > clips[sorted[j]].min_x) { int temp = sorted[i]; sorted[i] = sorted[j]; sorted[j] = temp; }
|
||||
/* insertion sort them by min_x */
|
||||
for (i = 1; i < 5; i++)
|
||||
{
|
||||
int j = i - 1;
|
||||
int key = sorted[i];
|
||||
|
||||
while (j >= 0 && clips[sorted[j]].min_x > clips[key].min_x)
|
||||
{
|
||||
sorted[j + 1] = sorted[j];
|
||||
j--;
|
||||
}
|
||||
sorted[j + 1] = key;
|
||||
}
|
||||
|
||||
/* create all valid extent combinations */
|
||||
for (i = 1; i < 32; i++)
|
||||
@@ -964,7 +972,136 @@ static bool compute_clipping_extents(bool enable, bool clipout, int clipmask, co
|
||||
for (i = 0; i < 5; i++)
|
||||
if ((BIT(clipmask, i)) && y >= clips[i].min_y && y < clips[i].max_y)
|
||||
sect |= 1 << i;
|
||||
list->scan_extent[y] = sect;
|
||||
|
||||
/*
|
||||
* $1FF04 bits 4/5 enable per-line clip windows.
|
||||
*
|
||||
* clip 2:
|
||||
* +000 = min X
|
||||
* +200 = max X
|
||||
*
|
||||
* clip 3:
|
||||
* +100 = min X
|
||||
* +300 = max X
|
||||
*/
|
||||
if (perlineclip2 || perlineclip3)
|
||||
{
|
||||
struct rectangle lineclips[5];
|
||||
int linesorted[5];
|
||||
int line = flip ? (cliprect->max_y - y) : y;
|
||||
UINT16 *table = &system32_videoram[(system32_videoram[0x1ff04/2] >> 10) * 0x400];
|
||||
|
||||
for (i = 0; i < 5; i++)
|
||||
{
|
||||
lineclips[i] = clips[i];
|
||||
linesorted[i] = i;
|
||||
}
|
||||
|
||||
/* clip window 2 */
|
||||
if (perlineclip2 && BIT(clipmask, 2))
|
||||
{
|
||||
UINT16 minx = table[0x000 + line];
|
||||
UINT16 maxx = table[0x200 + line];
|
||||
|
||||
if (minx == 0xffff || maxx == 0xffff)
|
||||
{
|
||||
sect &= ~(1 << 2);
|
||||
}
|
||||
else if (!flip)
|
||||
{
|
||||
lineclips[2].min_x = minx & 0x1ff;
|
||||
lineclips[2].max_x = (maxx & 0x1ff) + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
lineclips[2].min_x = tempclip.max_x - ((maxx & 0x1ff) + 1);
|
||||
lineclips[2].max_x = tempclip.max_x - (minx & 0x1ff);
|
||||
}
|
||||
|
||||
sect_rect(&lineclips[2], &tempclip);
|
||||
|
||||
if (lineclips[2].min_x >= lineclips[2].max_x)
|
||||
sect &= ~(1 << 2);
|
||||
}
|
||||
|
||||
/* clip window 3 */
|
||||
if (perlineclip3 && BIT(clipmask, 3))
|
||||
{
|
||||
UINT16 minx = table[0x100 + line];
|
||||
UINT16 maxx = table[0x300 + line];
|
||||
|
||||
if (minx == 0xffff || maxx == 0xffff)
|
||||
{
|
||||
sect &= ~(1 << 3);
|
||||
}
|
||||
else if (!flip)
|
||||
{
|
||||
lineclips[3].min_x = minx & 0x1ff;
|
||||
lineclips[3].max_x = (maxx & 0x1ff) + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
lineclips[3].min_x = tempclip.max_x - ((maxx & 0x1ff) + 1);
|
||||
lineclips[3].max_x = tempclip.max_x - (minx & 0x1ff);
|
||||
}
|
||||
|
||||
sect_rect(&lineclips[3], &tempclip);
|
||||
|
||||
if (lineclips[3].min_x >= lineclips[3].max_x)
|
||||
sect &= ~(1 << 3);
|
||||
}
|
||||
|
||||
/*
|
||||
* Build the extent for this individual scanline.
|
||||
* 0-31 remain the normal combinations.
|
||||
* 32+y is the per-line extent.
|
||||
*/
|
||||
{
|
||||
UINT16 *extent = &list->extent[32 + y][0];
|
||||
|
||||
for (i = 1; i < 5; i++)
|
||||
{
|
||||
int j = i - 1;
|
||||
int key = linesorted[i];
|
||||
|
||||
while (j >= 0 && lineclips[linesorted[j]].min_x > lineclips[key].min_x)
|
||||
{
|
||||
linesorted[j + 1] = linesorted[j];
|
||||
j--;
|
||||
}
|
||||
linesorted[j + 1] = key;
|
||||
}
|
||||
|
||||
*extent++ = tempclip.min_x;
|
||||
|
||||
for (j = 0; j < 5; j++)
|
||||
{
|
||||
if (BIT(sect, linesorted[j]))
|
||||
{
|
||||
const struct rectangle *cur = &lineclips[linesorted[j]];
|
||||
|
||||
if (extent != &list->extent[32 + y][1] && cur->min_x <= extent[-1])
|
||||
{
|
||||
if (cur->max_x > extent[-1])
|
||||
extent[-1] = cur->max_x;
|
||||
}
|
||||
else
|
||||
{
|
||||
*extent++ = cur->min_x;
|
||||
*extent++ = cur->max_x;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
*extent++ = tempclip.max_x;
|
||||
}
|
||||
|
||||
list->scan_extent[y] = 32 + y;
|
||||
}
|
||||
else
|
||||
{
|
||||
list->scan_extent[y] = sect;
|
||||
}
|
||||
}
|
||||
|
||||
return clipout;
|
||||
@@ -1011,28 +1148,6 @@ static INLINE void get_tilemaps(int bgnum, struct tilemap **tilemaps)
|
||||
}
|
||||
|
||||
|
||||
static bool patch_enable(bool in, int bgnum)
|
||||
{
|
||||
if (!titlef_kludge) return in;
|
||||
|
||||
switch (system32_videoram[0x1ff02/2])
|
||||
{
|
||||
case 0x7be0:
|
||||
case 0x52a0:
|
||||
case 0x2960:
|
||||
return false;
|
||||
|
||||
case 0x5be0:
|
||||
return (bgnum%2 == 0) ? in : false;
|
||||
|
||||
case 0x3be0:
|
||||
return (bgnum%2 == 1) ? in : false;
|
||||
|
||||
default: return in;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void update_tilemap_zoom(struct layer_info *layer, const struct rectangle *cliprect, int bgnum)
|
||||
{
|
||||
bool clipenable, clipout, clipdraw_start;
|
||||
@@ -1051,16 +1166,13 @@ static void update_tilemap_zoom(struct layer_info *layer, const struct rectangle
|
||||
get_tilemaps(bgnum, tilemaps);
|
||||
|
||||
/* configure the layer */
|
||||
opaque = (opaquey_hack) ? ((system32_videoram[0x1ff8e/2] >> (8 + bgnum)) & 1) : 0;
|
||||
//opaque = (system32_videoram[0x1ff8e/2] >> (8 + bgnum)) & 1;
|
||||
//if (code_pressed(KEYCODE_Z) && bgnum == 0) opaque = 1;
|
||||
//if (code_pressed(KEYCODE_X) && bgnum == 1) opaque = 1;
|
||||
opaque = (opaquey_hack) ? BIT(system32_videoram[0x1ff8e/2], (8 + bgnum)) : 0;
|
||||
|
||||
/* determine flipping */
|
||||
compute_tilemap_flips(bgnum, &flipx, &flipy);
|
||||
|
||||
/* determine the clipping */
|
||||
clipenable = patch_enable(BIT(system32_videoram[0x1ff02/2], (11 + bgnum)), bgnum);
|
||||
clipenable = BIT(system32_videoram[0x1ff02/2], (11 + bgnum));
|
||||
clipout = BIT(system32_videoram[0x1ff02/2], (6 + bgnum));
|
||||
clips = (system32_videoram[0x1ff06/2] >> (4 * bgnum)) & 0x0f;
|
||||
clipdraw_start = compute_clipping_extents(clipenable, clipout, clips, cliprect, &clip_extents);
|
||||
@@ -1148,6 +1260,8 @@ static void update_tilemap_zoom(struct layer_info *layer, const struct rectangle
|
||||
srcx += srcxstep;
|
||||
if ((pix & 0x0f) == 0 && !opaque)
|
||||
pix = 0, transparent++;
|
||||
else if ((pix & 0x0f) == 0 && titlef_kludge)
|
||||
pix |= 0x2000;
|
||||
dst[x] = pix;
|
||||
}
|
||||
}
|
||||
@@ -1216,16 +1330,13 @@ static void update_tilemap_rowscroll(struct layer_info *layer, const struct rect
|
||||
get_tilemaps(bgnum, tilemaps);
|
||||
|
||||
/* configure the layer */
|
||||
opaque = (opaquey_hack) ? ((system32_videoram[0x1ff8e/2] >> (8 + bgnum)) & 1) : 0;
|
||||
//opaque = (system32_videoram[0x1ff8e/2] >> (8 + bgnum)) & 1;
|
||||
//if (code_pressed(KEYCODE_C) && bgnum == 2) opaque = 1;
|
||||
//if (code_pressed(KEYCODE_V) && bgnum == 3) opaque = 1;
|
||||
opaque = (opaquey_hack) ? BIT(system32_videoram[0x1ff8e/2], (8 + bgnum)) : 0;
|
||||
|
||||
/* determine flipping */
|
||||
compute_tilemap_flips(bgnum, &flipx, &flipy);
|
||||
|
||||
/* determine the clipping */
|
||||
clipenable = patch_enable(BIT(system32_videoram[0x1ff02/2], (11 + bgnum)), bgnum);
|
||||
clipenable = BIT(system32_videoram[0x1ff02/2], (11 + bgnum));
|
||||
clipout = BIT(system32_videoram[0x1ff02/2], (6 + bgnum));
|
||||
clips = (system32_videoram[0x1ff06/2] >> (4 * bgnum)) & 0x0f;
|
||||
clipdraw_start = compute_clipping_extents(clipenable, clipout, clips, cliprect, &clip_extents);
|
||||
@@ -1307,6 +1418,8 @@ static void update_tilemap_rowscroll(struct layer_info *layer, const struct rect
|
||||
UINT16 pix = src[(srcx >> 9) & 1][srcx & 0x1ff];
|
||||
if ((pix & 0x0f) == 0 && !opaque)
|
||||
pix = 0, transparent++;
|
||||
else if ((pix & 0x0f) == 0 && titlef_kludge)
|
||||
pix |= 0x2000;
|
||||
dst[x] = pix;
|
||||
}
|
||||
}
|
||||
@@ -1619,11 +1732,14 @@ static void update_bitmap(struct layer_info *layer, const struct rectangle *clip
|
||||
static void update_background(struct layer_info *layer, const struct rectangle *cliprect)
|
||||
{
|
||||
struct mame_bitmap *bitmap = layer->bitmap;
|
||||
int x, y;
|
||||
int y;
|
||||
|
||||
/* determine if we're flipped */
|
||||
bool flip = BIT(system32_videoram[0x1ff00 / 2], 9);
|
||||
|
||||
for (y = cliprect->min_y; y <= cliprect->max_y; y++)
|
||||
{
|
||||
UINT16 *dst = (UINT16 *)bitmap->line[y];
|
||||
UINT16 *dst = (UINT16 *)bitmap->line[flip ? (cliprect->max_y - y) : y];
|
||||
int color;
|
||||
|
||||
/* determine the color */
|
||||
@@ -1660,16 +1776,6 @@ static UINT8 update_tilemaps(const struct rectangle *cliprect)
|
||||
int enablet = !BIT(system32_videoram[0x1ff02/2], 4) && !BIT(system32_videoram[0x1ff8e/2], 0);
|
||||
int enableb = !BIT(system32_videoram[0x1ff02/2], 5) && !BIT(system32_videoram[0x1ff8e/2], 5);
|
||||
|
||||
if (titlef_kludge) /* patch ending credits */
|
||||
{
|
||||
UINT16 *src1 = (UINT16 *)layer_data[MIXER_LAYER_NBG0].bitmap->line[0];
|
||||
UINT16 *src2 = (UINT16 *)layer_data[MIXER_LAYER_NBG1].bitmap->line[0];
|
||||
if (src1[0]==0x1902 && src1[8]==0x1901 && src1[16]==0x1902 && src1[24]==0x1901)
|
||||
enable2 = 0;
|
||||
if (src2[0]==0x1902 && src2[8]==0x1901 && src2[16]==0x1902 && src2[24]==0x1901)
|
||||
enable3 = 0;
|
||||
}
|
||||
|
||||
/* update any tilemaps */
|
||||
if (enable0)
|
||||
update_tilemap_zoom(&layer_data[MIXER_LAYER_NBG0], cliprect, 0);
|
||||
@@ -1683,8 +1789,7 @@ static UINT8 update_tilemaps(const struct rectangle *cliprect)
|
||||
update_tilemap_text(&layer_data[MIXER_LAYER_TEXT], cliprect);
|
||||
if (enableb)
|
||||
update_bitmap(&layer_data[MIXER_LAYER_BITMAP], cliprect);
|
||||
if (!titlef_kludge)
|
||||
update_background(&layer_data[MIXER_LAYER_BACKGROUND], cliprect);
|
||||
update_background(&layer_data[MIXER_LAYER_BACKGROUND], cliprect);
|
||||
|
||||
return (enablet << 0) | (enable0 << 1) | (enable1 << 2) | (enable2 << 3) | (enable3 << 4) | (enableb << 5);
|
||||
}
|
||||
@@ -1977,7 +2082,7 @@ static int draw_one_sprite(UINT16 *data, int xoffs, int yoffs, const struct rect
|
||||
UINT32 pixels = spritedata[++curaddr & addrmask];
|
||||
|
||||
/* draw four pixels */
|
||||
pix = (pixels >> 28) & 0xf; while (xacc < 0x10000 && x != xtarget) { sprite_draw_pixel_16(transp) x += xdelta; xacc += hzoom; } xacc -= 0x10000;
|
||||
pix = (pixels >> 28) & 0xf; while (xacc < 0x10000 && x != xtarget) { sprite_draw_pixel_16(transp); x += xdelta; xacc += hzoom; } xacc -= 0x10000;
|
||||
pix = (pixels >> 24) & 0xf; while (xacc < 0x10000 && x != xtarget) { sprite_draw_pixel_16(0); x += xdelta; xacc += hzoom; } xacc -= 0x10000;
|
||||
pix = (pixels >> 20) & 0xf; while (xacc < 0x10000 && x != xtarget) { sprite_draw_pixel_16(0); x += xdelta; xacc += hzoom; } xacc -= 0x10000;
|
||||
pix = (pixels >> 16) & 0xf; while (xacc < 0x10000 && x != xtarget) { sprite_draw_pixel_16(0); x += xdelta; xacc += hzoom; } xacc -= 0x10000;
|
||||
@@ -2276,6 +2381,10 @@ static void mix_all_layers(int which, int xoffs, struct mame_bitmap *bitmap, con
|
||||
int sprindex = numlayers;
|
||||
int dstnum = 0;
|
||||
|
||||
/* f1lap priority hack */
|
||||
if (f1lap_kludge && priority == 0x0a)
|
||||
effpri = (0x0d << 3) | 7;
|
||||
|
||||
/* make a copy of the sorted list, finding a location for the sprite entry */
|
||||
for (laynum = 0; laynum < numlayers; laynum++)
|
||||
{
|
||||
@@ -2373,6 +2482,8 @@ static void mix_all_layers(int which, int xoffs, struct mame_bitmap *bitmap, con
|
||||
firstpix = layerbase[laynum][x] & 0x1fff;
|
||||
if (firstpix != 0 || laynum == MIXER_LAYER_BACKGROUND)
|
||||
break;
|
||||
else if ((layerbase[laynum][x] & 0x2000) && titlef_kludge)
|
||||
break;
|
||||
}
|
||||
|
||||
/* sprite layers are special */
|
||||
@@ -2416,6 +2527,8 @@ static void mix_all_layers(int which, int xoffs, struct mame_bitmap *bitmap, con
|
||||
secondpix = layerbase[laynum][x] & 0x1fff;
|
||||
if (secondpix != 0 || laynum == MIXER_LAYER_BACKGROUND)
|
||||
break;
|
||||
else if ((layerbase[laynum][x] & 0x2000) && titlef_kludge)
|
||||
break;
|
||||
}
|
||||
|
||||
/* sprite layers are special */
|
||||
|
||||
@@ -135,11 +135,33 @@ void update_megaplay_video_normal(struct mame_bitmap *bitmap, const struct recta
|
||||
|
||||
/*- Draw from cache_bitmap to screen -*/
|
||||
|
||||
/* The overlay is stretched over the whole Genesis picture, as on the real
|
||||
board (and in current MAME): its 256 active pixels map onto the visible
|
||||
width, 320 in H40 mode and 256 in H32. Pen 0 is transparent.
|
||||
Only the lines inside cliprect are drawn: with partial updates the game
|
||||
layer is rendered in slices, and a full-height overlay would be
|
||||
overwritten by the slices that follow. */
|
||||
int width = Machine->visible_area.max_x - Machine->visible_area.min_x + 1;
|
||||
|
||||
for (i = 0; i < 192;i++)
|
||||
{
|
||||
const UINT8 *src;
|
||||
UINT16 *dst;
|
||||
int x;
|
||||
|
||||
if (i + 16 < cliprect->min_y || i + 16 > cliprect->max_y)
|
||||
continue;
|
||||
segae_drawscanline(i,0,0);
|
||||
|
||||
for (i = 0;i < 192;i++)
|
||||
draw_scanline8(bitmap,32,i+16,256,&cache_bitmap[i * (16+256+16) +24],&Machine->pens[segasyse_palettebase],0);
|
||||
src = &cache_bitmap[i * (16+256+16) + 16];
|
||||
dst = (UINT16 *)bitmap->line[i + 16] + Machine->visible_area.min_x;
|
||||
for (x = 0; x < width; x++)
|
||||
{
|
||||
UINT8 pix = src[(x * 256) / width];
|
||||
if (pix)
|
||||
dst[x] = Machine->pens[segasyse_palettebase + pix];
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -709,8 +709,10 @@ void stv_vpd1_draw_scaled_sprite(struct mame_bitmap *bitmap, const struct rectan
|
||||
|
||||
xsize = (stv2_current_sprite.CMDSIZE & 0x3f00) >> 8;
|
||||
xsize = xsize * 8;
|
||||
if (xsize == 0) return; /* setting prohibited */
|
||||
|
||||
ysize = (stv2_current_sprite.CMDSIZE & 0x00ff);
|
||||
if (ysize == 0) return; /* setting prohibited */
|
||||
|
||||
patterndata = (stv2_current_sprite.CMDSRCA) & 0xffff;
|
||||
patterndata = patterndata * 0x8;
|
||||
|
||||
@@ -2072,7 +2072,7 @@ static void stv_vdp2_draw_basic_tilemap(struct mame_bitmap *bitmap, const struct
|
||||
else
|
||||
scaley = 0xffff;
|
||||
|
||||
usrintf_showmessage("%04x %04x",STV_VDP2_HCNT,stv2_current_tilemap.scalex_f);
|
||||
/* usrintf_showmessage("%04x %04x",STV_VDP2_HCNT,stv2_current_tilemap.scalex_f); */
|
||||
|
||||
if (stv2_current_tilemap.tile_size==1)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user