mirror of
https://github.com/holub/mame
synced 2025-05-18 19:49:35 +03:00
Cleanups and version bump.
This commit is contained in:
parent
717a11337e
commit
1390af8fa4
@ -1837,7 +1837,7 @@ static void d68040_fpu(void)
|
|||||||
|
|
||||||
case 0x5: // control to ea
|
case 0x5: // control to ea
|
||||||
{
|
{
|
||||||
|
|
||||||
strcpy(g_dasm_str, "fmovem.l ");
|
strcpy(g_dasm_str, "fmovem.l ");
|
||||||
if (w2 & 0x1000) strcat(g_dasm_str, "fpcr");
|
if (w2 & 0x1000) strcat(g_dasm_str, "fpcr");
|
||||||
if (w2 & 0x0800) strcat(g_dasm_str, "/fpsr");
|
if (w2 & 0x0800) strcat(g_dasm_str, "/fpsr");
|
||||||
|
@ -12,19 +12,19 @@
|
|||||||
extern flag floatx80_is_nan( floatx80 a );
|
extern flag floatx80_is_nan( floatx80 a );
|
||||||
|
|
||||||
// masks for packed dwords, positive k-factor
|
// masks for packed dwords, positive k-factor
|
||||||
static UINT32 pkmask2[18] =
|
static UINT32 pkmask2[18] =
|
||||||
{
|
{
|
||||||
0xffffffff, 0, 0xf0000000, 0xff000000, 0xfff00000, 0xffff0000,
|
0xffffffff, 0, 0xf0000000, 0xff000000, 0xfff00000, 0xffff0000,
|
||||||
0xfffff000, 0xffffff00, 0xfffffff0, 0xffffffff,
|
0xfffff000, 0xffffff00, 0xfffffff0, 0xffffffff,
|
||||||
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
|
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
|
||||||
0xffffffff, 0xffffffff, 0xffffffff
|
0xffffffff, 0xffffffff, 0xffffffff
|
||||||
};
|
};
|
||||||
|
|
||||||
static UINT32 pkmask3[18] =
|
static UINT32 pkmask3[18] =
|
||||||
{
|
{
|
||||||
0xffffffff, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
0xffffffff, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
0xf0000000, 0xff000000, 0xfff00000, 0xffff0000,
|
0xf0000000, 0xff000000, 0xfff00000, 0xffff0000,
|
||||||
0xfffff000, 0xffffff00, 0xfffffff0, 0xffffffff,
|
0xfffff000, 0xffffff00, 0xfffffff0, 0xffffffff,
|
||||||
};
|
};
|
||||||
|
|
||||||
INLINE double fx80_to_double(floatx80 fx)
|
INLINE double fx80_to_double(floatx80 fx)
|
||||||
@ -132,8 +132,8 @@ INLINE void store_pack_float80(m68ki_cpu_core *m68k, UINT32 ea, int k, floatx80
|
|||||||
dw1 = dw2 = dw3 = 0;
|
dw1 = dw2 = dw3 = 0;
|
||||||
ch = &str[0];
|
ch = &str[0];
|
||||||
|
|
||||||
sprintf(str, "%.16e", fx80_to_double(fpr));
|
sprintf(str, "%.16e", fx80_to_double(fpr));
|
||||||
|
|
||||||
if (*ch == '-')
|
if (*ch == '-')
|
||||||
{
|
{
|
||||||
ch++;
|
ch++;
|
||||||
@ -185,7 +185,7 @@ INLINE void store_pack_float80(m68ki_cpu_core *m68k, UINT32 ea, int k, floatx80
|
|||||||
ch[j] = '0';
|
ch[j] = '0';
|
||||||
}
|
}
|
||||||
|
|
||||||
// now zero out K to avoid tripping the positive K detection below
|
// now zero out K to avoid tripping the positive K detection below
|
||||||
k = 0;
|
k = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -219,7 +219,7 @@ INLINE void store_pack_float80(m68ki_cpu_core *m68k, UINT32 ea, int k, floatx80
|
|||||||
{
|
{
|
||||||
dw2 &= pkmask2[17];
|
dw2 &= pkmask2[17];
|
||||||
dw3 &= pkmask3[17];
|
dw3 &= pkmask3[17];
|
||||||
// m68k->fpcr |= (need to set OPERR bit)
|
// m68k->fpcr |= (need to set OPERR bit)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -227,12 +227,12 @@ INLINE void store_pack_float80(m68ki_cpu_core *m68k, UINT32 ea, int k, floatx80
|
|||||||
if (*ch == 'e' || *ch == 'E')
|
if (*ch == 'e' || *ch == 'E')
|
||||||
{
|
{
|
||||||
ch++;
|
ch++;
|
||||||
if (*ch == '-')
|
if (*ch == '-')
|
||||||
{
|
{
|
||||||
ch++;
|
ch++;
|
||||||
dw1 |= 0x40000000;
|
dw1 |= 0x40000000;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (*ch == '+')
|
if (*ch == '+')
|
||||||
{
|
{
|
||||||
ch++;
|
ch++;
|
||||||
@ -604,7 +604,7 @@ static floatx80 READ_EA_FPE(m68ki_cpu_core *m68k, int ea)
|
|||||||
case 2: // (d16, PC)
|
case 2: // (d16, PC)
|
||||||
{
|
{
|
||||||
UINT32 ea = EA_PCDI_32(m68k);
|
UINT32 ea = EA_PCDI_32(m68k);
|
||||||
fpr = load_extended_float80(m68k, ea);
|
fpr = load_extended_float80(m68k, ea);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -1204,7 +1204,7 @@ static void fpgen_rm_reg(m68ki_cpu_core *m68k, UINT16 w2)
|
|||||||
}
|
}
|
||||||
case 0x25: // FREM
|
case 0x25: // FREM
|
||||||
{
|
{
|
||||||
REG_FP[dst] = floatx80_rem(REG_FP[dst], source);
|
REG_FP[dst] = floatx80_rem(REG_FP[dst], source);
|
||||||
SET_CONDITION_CODES(m68k, REG_FP[dst]);
|
SET_CONDITION_CODES(m68k, REG_FP[dst]);
|
||||||
m68k->remaining_cycles -= 43; // guess
|
m68k->remaining_cycles -= 43; // guess
|
||||||
break;
|
break;
|
||||||
@ -1496,7 +1496,7 @@ static void do_frestore_null(m68ki_cpu_core *m68k)
|
|||||||
|
|
||||||
REG_FPCR = 0;
|
REG_FPCR = 0;
|
||||||
REG_FPSR = 0;
|
REG_FPSR = 0;
|
||||||
REG_FPIAR = 0;
|
REG_FPIAR = 0;
|
||||||
for (i = 0; i < 8; i++)
|
for (i = 0; i < 8; i++)
|
||||||
{
|
{
|
||||||
REG_FP[i].high = 0x7fff;
|
REG_FP[i].high = 0x7fff;
|
||||||
@ -1564,7 +1564,7 @@ void m68040_fpu_op1(m68ki_cpu_core *m68k)
|
|||||||
{
|
{
|
||||||
case 2: // (An)
|
case 2: // (An)
|
||||||
addr = REG_A[reg];
|
addr = REG_A[reg];
|
||||||
temp = m68ki_read_32(m68k, addr);
|
temp = m68ki_read_32(m68k, addr);
|
||||||
|
|
||||||
// check for NULL frame
|
// check for NULL frame
|
||||||
if (temp & 0xff000000)
|
if (temp & 0xff000000)
|
||||||
@ -1580,7 +1580,7 @@ void m68040_fpu_op1(m68ki_cpu_core *m68k)
|
|||||||
|
|
||||||
case 3: // (An)+
|
case 3: // (An)+
|
||||||
addr = EA_AY_PI_32(m68k);
|
addr = EA_AY_PI_32(m68k);
|
||||||
temp = m68ki_read_32(m68k, addr);
|
temp = m68ki_read_32(m68k, addr);
|
||||||
|
|
||||||
// check for NULL frame
|
// check for NULL frame
|
||||||
if (temp & 0xff000000)
|
if (temp & 0xff000000)
|
||||||
|
@ -261,7 +261,7 @@ int mame_execute(core_options *options)
|
|||||||
firstgame = FALSE;
|
firstgame = FALSE;
|
||||||
|
|
||||||
/* parse any INI files as the first thing */
|
/* parse any INI files as the first thing */
|
||||||
if (options_get_bool(options, OPTION_READCONFIG))
|
if (options_get_bool(options, OPTION_READCONFIG))
|
||||||
{
|
{
|
||||||
options_revert(mame_options(), OPTION_PRIORITY_INI);
|
options_revert(mame_options(), OPTION_PRIORITY_INI);
|
||||||
mame_parse_ini_files(mame_options(), driver);
|
mame_parse_ini_files(mame_options(), driver);
|
||||||
|
@ -41,7 +41,7 @@
|
|||||||
#define SUBTYPE_TMS5220 16
|
#define SUBTYPE_TMS5220 16
|
||||||
#define SUBTYPE_TMS5220C 32
|
#define SUBTYPE_TMS5220C 32
|
||||||
|
|
||||||
/* coefficient defines */
|
/* coefficient defines */
|
||||||
#define MAX_K 10
|
#define MAX_K 10
|
||||||
#define MAX_SCALE_BITS 6
|
#define MAX_SCALE_BITS 6
|
||||||
#define MAX_SCALE (1<<MAX_SCALE_BITS)
|
#define MAX_SCALE (1<<MAX_SCALE_BITS)
|
||||||
@ -61,10 +61,10 @@ struct tms5100_coeffs
|
|||||||
INT8 chirptable[MAX_CHIRP_SIZE];
|
INT8 chirptable[MAX_CHIRP_SIZE];
|
||||||
INT8 interp_coeff[8];
|
INT8 interp_coeff[8];
|
||||||
};
|
};
|
||||||
|
|
||||||
/* The following TMS5100/TMC0280/CD2801 coefficients come from US Patent 4,209,836 and several others, and have been verified using derivative analysis to show which values were bad (due to poor quality images or badly typed copies of the tables in the patents, depending on which patent you look at) which were then corrected by figuring out what the tiny remaining marks on the photocopied version of the coefficient sheet COULD have been which would make the derivatives play nice.
|
/* The following TMS5100/TMC0280/CD2801 coefficients come from US Patent 4,209,836 and several others, and have been verified using derivative analysis to show which values were bad (due to poor quality images or badly typed copies of the tables in the patents, depending on which patent you look at) which were then corrected by figuring out what the tiny remaining marks on the photocopied version of the coefficient sheet COULD have been which would make the derivatives play nice.
|
||||||
***These values have not yet been verified against a real TMS5100 or TMC0280 or CD2801 (from speak & spell, etc)***
|
***These values have not yet been verified against a real TMS5100 or TMC0280 or CD2801 (from speak & spell, etc)***
|
||||||
*/
|
*/
|
||||||
static const struct tms5100_coeffs pat4209836_coeff =
|
static const struct tms5100_coeffs pat4209836_coeff =
|
||||||
{
|
{
|
||||||
/* subtype */
|
/* subtype */
|
||||||
|
@ -634,8 +634,8 @@ UINT32 poly_render_triangle(poly_manager *poly, void *dest, const rectangle *cli
|
|||||||
for (int paramnum = 0; paramnum < paramcount; paramnum++)
|
for (int paramnum = 0; paramnum < paramcount; paramnum++)
|
||||||
{
|
{
|
||||||
poly_param *params = &polygon->param[paramnum];
|
poly_param *params = &polygon->param[paramnum];
|
||||||
params->dpdx = idet*(v1->p[paramnum]*a00 + v2->p[paramnum]*a10 + v3->p[paramnum]*a20);
|
params->dpdx = idet*(v1->p[paramnum]*a00 + v2->p[paramnum]*a10 + v3->p[paramnum]*a20);
|
||||||
params->dpdy = idet*(v1->p[paramnum]*a01 + v2->p[paramnum]*a11 + v3->p[paramnum]*a21);
|
params->dpdy = idet*(v1->p[paramnum]*a01 + v2->p[paramnum]*a11 + v3->p[paramnum]*a21);
|
||||||
params->start = idet*(v1->p[paramnum]*a02 + v2->p[paramnum]*a12 + v3->p[paramnum]*a22);
|
params->start = idet*(v1->p[paramnum]*a02 + v2->p[paramnum]*a12 + v3->p[paramnum]*a22);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -118,7 +118,7 @@ READ8_HANDLER( wow_speech_r )
|
|||||||
totalword_ptr = totalword;
|
totalword_ptr = totalword;
|
||||||
|
|
||||||
Phoneme = data & 0x3F;
|
Phoneme = data & 0x3F;
|
||||||
// Intonation = data >> 6;
|
// Intonation = data >> 6;
|
||||||
|
|
||||||
// logerror("Data : %d Speech : %s at intonation %d\n",Phoneme, PhonemeTable[Phoneme],Intonation);
|
// logerror("Data : %d Speech : %s at intonation %d\n",Phoneme, PhonemeTable[Phoneme],Intonation);
|
||||||
|
|
||||||
|
@ -414,7 +414,7 @@ ROM_START( champbwl )
|
|||||||
ROM_LOAD( "ab003003.3-3", 0xc0000, 0x40000, CRC(ad40ad10) SHA1(db0e5744ea3fcda87345b545031f82fcb3fec175) ) // 'spare' speech etc.
|
ROM_LOAD( "ab003003.3-3", 0xc0000, 0x40000, CRC(ad40ad10) SHA1(db0e5744ea3fcda87345b545031f82fcb3fec175) ) // 'spare' speech etc.
|
||||||
|
|
||||||
ROM_REGION( 0x800, "nvram", 0 ) /* default settings, allows game to boot first time without having to reset it */
|
ROM_REGION( 0x800, "nvram", 0 ) /* default settings, allows game to boot first time without having to reset it */
|
||||||
ROM_LOAD( "champbwl.nv", 0x000, 0x800, CRC(1d46aa8e) SHA1(a733cf86cfb26d98fb4c491d7f779a7a1c8ff228) )
|
ROM_LOAD( "champbwl.nv", 0x000, 0x800, CRC(1d46aa8e) SHA1(a733cf86cfb26d98fb4c491d7f779a7a1c8ff228) )
|
||||||
ROM_END
|
ROM_END
|
||||||
|
|
||||||
GAME( 1989, champbwl, 0, champbwl, champbwl, 0, ROT270, "Seta / Romstar Inc.", "Championship Bowling", GAME_SUPPORTS_SAVE )
|
GAME( 1989, champbwl, 0, champbwl, champbwl, 0, ROT270, "Seta / Romstar Inc.", "Championship Bowling", GAME_SUPPORTS_SAVE )
|
||||||
|
@ -39,19 +39,19 @@ Thanks to Alex, Mr Mudkips, and Philip Burke for this info.
|
|||||||
#include "includes/naomibd.h"
|
#include "includes/naomibd.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
St. Instr. Comment
|
St. Instr. Comment
|
||||||
0x02 PEEK ACC := MEM[OP1]
|
0x02 PEEK ACC := MEM[OP1]
|
||||||
0x03 POKE MEM[OP1] := OP2
|
0x03 POKE MEM[OP1] := OP2
|
||||||
0x04 POKEPCI PCICONF[OP1] := OP2
|
0x04 POKEPCI PCICONF[OP1] := OP2
|
||||||
0x05 PEEKPCI ACC := PCICONF[OP1]
|
0x05 PEEKPCI ACC := PCICONF[OP1]
|
||||||
0x06 AND/OR ACC := (ACC & OP1) | OP2
|
0x06 AND/OR ACC := (ACC & OP1) | OP2
|
||||||
0x07 (prefix) execute the instruction code in OP1 with OP1 := OP2, OP2 := ACC
|
0x07 (prefix) execute the instruction code in OP1 with OP1 := OP2, OP2 := ACC
|
||||||
0x08 BNE IF ACC = OP1 THEN PC := PC + OP2
|
0x08 BNE IF ACC = OP1 THEN PC := PC + OP2
|
||||||
0x09 BRA PC := PC + OP2
|
0x09 BRA PC := PC + OP2
|
||||||
0x10 AND/OR ACC2 (unused/defunct) ACC2 := (ACC2 & OP1) | OP2
|
0x10 AND/OR ACC2 (unused/defunct) ACC2 := (ACC2 & OP1) | OP2
|
||||||
0x11 OUTB PORT[OP1] := OP2
|
0x11 OUTB PORT[OP1] := OP2
|
||||||
0x12 INB ACC := PORT(OP1)
|
0x12 INB ACC := PORT(OP1)
|
||||||
0xEE END
|
0xEE END
|
||||||
*/
|
*/
|
||||||
static READ32_HANDLER( chihiro_jamtable )
|
static READ32_HANDLER( chihiro_jamtable )
|
||||||
{
|
{
|
||||||
|
@ -197,11 +197,11 @@ Stephh's notes (based on the games Z80 code and some tests) for games based on '
|
|||||||
when "Coinage" is set to "99 Credits", credits are always set to 99 when pressing COIN1 (code at 0x037d).
|
when "Coinage" is set to "99 Credits", credits are always set to 99 when pressing COIN1 (code at 0x037d).
|
||||||
- There is an unused coinage routine at 0x0159 with the following settings :
|
- There is an unused coinage routine at 0x0159 with the following settings :
|
||||||
|
|
||||||
PORT_DIPNAME( 0x06, 0x00, DEF_STR( Coinage ) )
|
PORT_DIPNAME( 0x06, 0x00, DEF_STR( Coinage ) )
|
||||||
PORT_DIPSETTING( 0x00, "A 2/1 B 99" )
|
PORT_DIPSETTING( 0x00, "A 2/1 B 99" )
|
||||||
PORT_DIPSETTING( 0x06, "A 1/2 B 1/1" )
|
PORT_DIPSETTING( 0x06, "A 1/2 B 1/1" )
|
||||||
PORT_DIPSETTING( 0x04, "A 1/5 B 1/1" )
|
PORT_DIPSETTING( 0x04, "A 1/5 B 1/1" )
|
||||||
PORT_DIPSETTING( 0x02, "A 1/7 B 1/1" )
|
PORT_DIPSETTING( 0x02, "A 1/7 B 1/1" )
|
||||||
|
|
||||||
I can't tell at the moment if it's a leftover from another Konami game on similar hardware.
|
I can't tell at the moment if it's a leftover from another Konami game on similar hardware.
|
||||||
- You can have 3 or 4 lives at start, and you can only continue 4 times (code at 0x0ebf).
|
- You can have 3 or 4 lives at start, and you can only continue 4 times (code at 0x0ebf).
|
||||||
|
@ -2359,7 +2359,7 @@ static CUSTOM_INPUT( moonwar_dial_r )
|
|||||||
|
|
||||||
// see http://www.cityofberwyn.com/schematics/stern/MoonWar_opto.tiff for schematic
|
// see http://www.cityofberwyn.com/schematics/stern/MoonWar_opto.tiff for schematic
|
||||||
// I.e. a 74ls161 counts from 0 to 15 which is the absolute number of bars passed on the quadrature
|
// I.e. a 74ls161 counts from 0 to 15 which is the absolute number of bars passed on the quadrature
|
||||||
|
|
||||||
static int counter_74ls161[2] = {0, 0};
|
static int counter_74ls161[2] = {0, 0};
|
||||||
static int direction[2] = {0, 0};
|
static int direction[2] = {0, 0};
|
||||||
signed char dialread = input_port_read(field->port->machine, dialname[p]);
|
signed char dialread = input_port_read(field->port->machine, dialname[p]);
|
||||||
@ -2368,10 +2368,10 @@ static CUSTOM_INPUT( moonwar_dial_r )
|
|||||||
|
|
||||||
if (dialread < 0) direction[p] = 0x00;
|
if (dialread < 0) direction[p] = 0x00;
|
||||||
else if (dialread > 0) direction[p] = 0x10;
|
else if (dialread > 0) direction[p] = 0x10;
|
||||||
|
|
||||||
counter_74ls161[p] += abs(dialread);
|
counter_74ls161[p] += abs(dialread);
|
||||||
counter_74ls161[p] &= 0xf;
|
counter_74ls161[p] &= 0xf;
|
||||||
|
|
||||||
ret = counter_74ls161[p] | direction[p];
|
ret = counter_74ls161[p] | direction[p];
|
||||||
//fprintf(stderr, "dialread1: %02x, counter_74ls161: %02x, spinner ret is %02x\n", dialread, counter_74ls161[p], ret);
|
//fprintf(stderr, "dialread1: %02x, counter_74ls161: %02x, spinner ret is %02x\n", dialread, counter_74ls161[p], ret);
|
||||||
|
|
||||||
@ -2568,11 +2568,11 @@ static INPUT_PORTS_START( anteater )
|
|||||||
PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) )
|
PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) )
|
||||||
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
|
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
|
||||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||||
// PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY PORT_COCKTAIL
|
// PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY PORT_COCKTAIL
|
||||||
// PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_COCKTAIL
|
// PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_COCKTAIL
|
||||||
// PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL
|
// PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL
|
||||||
// PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_COCKTAIL
|
// PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_COCKTAIL
|
||||||
// PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL
|
// PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL
|
||||||
PORT_BIT( 0x7c, IP_ACTIVE_LOW, IPT_UNUSED ) /* see notes */
|
PORT_BIT( 0x7c, IP_ACTIVE_LOW, IPT_UNUSED ) /* see notes */
|
||||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
|
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||||
|
|
||||||
@ -2583,9 +2583,9 @@ static INPUT_PORTS_START( anteater )
|
|||||||
PORT_DIPSETTING( 0x00, "A 1/2 B 2/1" )
|
PORT_DIPSETTING( 0x00, "A 1/2 B 2/1" )
|
||||||
PORT_DIPSETTING( 0x04, "A 1/3 B 3/1" )
|
PORT_DIPSETTING( 0x04, "A 1/3 B 3/1" )
|
||||||
PORT_DIPSETTING( 0x06, "A 1/4 B 4/1" )
|
PORT_DIPSETTING( 0x06, "A 1/4 B 4/1" )
|
||||||
// PORT_DIPNAME( 0x08, 0x08, DEF_STR( Cabinet ) )
|
// PORT_DIPNAME( 0x08, 0x08, DEF_STR( Cabinet ) )
|
||||||
// PORT_DIPSETTING( 0x08, DEF_STR( Upright ) )
|
// PORT_DIPSETTING( 0x08, DEF_STR( Upright ) )
|
||||||
// PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) )
|
// PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) )
|
||||||
PORT_DIPUNUSED( 0x08, IP_ACTIVE_LOW ) /* see notes */
|
PORT_DIPUNUSED( 0x08, IP_ACTIVE_LOW ) /* see notes */
|
||||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START2 )
|
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START2 )
|
||||||
PORT_BIT( 0xb0, IP_ACTIVE_LOW, IPT_UNUSED )
|
PORT_BIT( 0xb0, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||||
@ -2628,9 +2628,9 @@ static INPUT_PORTS_START( calipso )
|
|||||||
PORT_DIPSETTING( 0x00, "A 1/2 B 2/1" )
|
PORT_DIPSETTING( 0x00, "A 1/2 B 2/1" )
|
||||||
PORT_DIPSETTING( 0x04, "A 1/3 B 3/1" )
|
PORT_DIPSETTING( 0x04, "A 1/3 B 3/1" )
|
||||||
PORT_DIPSETTING( 0x06, "A 1/4 B 4/1" )
|
PORT_DIPSETTING( 0x06, "A 1/4 B 4/1" )
|
||||||
// PORT_DIPNAME( 0x08, 0x08, DEF_STR( Cabinet ) )
|
// PORT_DIPNAME( 0x08, 0x08, DEF_STR( Cabinet ) )
|
||||||
// PORT_DIPSETTING( 0x08, DEF_STR( Upright ) )
|
// PORT_DIPSETTING( 0x08, DEF_STR( Upright ) )
|
||||||
// PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) )
|
// PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) )
|
||||||
PORT_DIPUNUSED( 0x08, IP_ACTIVE_LOW ) /* see notes */
|
PORT_DIPUNUSED( 0x08, IP_ACTIVE_LOW ) /* see notes */
|
||||||
PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
|
PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||||
|
|
||||||
|
@ -555,8 +555,8 @@ static READ32_HANDLER( hng64_sysregs_r )
|
|||||||
mame_system_time systime;
|
mame_system_time systime;
|
||||||
mame_get_base_datetime(space->machine, &systime);
|
mame_get_base_datetime(space->machine, &systime);
|
||||||
|
|
||||||
// if((offset*4) != 0x1084)
|
// if((offset*4) != 0x1084)
|
||||||
// printf("HNG64 port read (PC=%08x) 0x%08x\n", cpu_get_pc(space->cpu),offset*4);
|
// printf("HNG64 port read (PC=%08x) 0x%08x\n", cpu_get_pc(space->cpu),offset*4);
|
||||||
|
|
||||||
switch(offset*4)
|
switch(offset*4)
|
||||||
{
|
{
|
||||||
@ -587,9 +587,9 @@ static READ32_HANDLER( hng64_sysregs_r )
|
|||||||
case 0x217c: return 0; //RTC status?
|
case 0x217c: return 0; //RTC status?
|
||||||
}
|
}
|
||||||
|
|
||||||
// printf("%08x\n",offset*4);
|
// printf("%08x\n",offset*4);
|
||||||
|
|
||||||
// return mame_rand(space->machine)&0xffffffff;
|
// return mame_rand(space->machine)&0xffffffff;
|
||||||
return hng64_sysregs[offset];
|
return hng64_sysregs[offset];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -598,7 +598,7 @@ static INT32 hng_dma_start,hng_dma_dst,hng_dma_len;
|
|||||||
|
|
||||||
static void hng64_do_dma(const address_space *space)
|
static void hng64_do_dma(const address_space *space)
|
||||||
{
|
{
|
||||||
// printf("Performing DMA Start %08x Len %08x Dst %08x\n",hng_dma_start, hng_dma_len, hng_dma_dst);
|
// printf("Performing DMA Start %08x Len %08x Dst %08x\n",hng_dma_start, hng_dma_len, hng_dma_dst);
|
||||||
|
|
||||||
while (hng_dma_len>=0)
|
while (hng_dma_len>=0)
|
||||||
{
|
{
|
||||||
@ -628,8 +628,8 @@ static WRITE32_HANDLER( hng64_sysregs_w )
|
|||||||
{
|
{
|
||||||
COMBINE_DATA (&hng64_sysregs[offset]);
|
COMBINE_DATA (&hng64_sysregs[offset]);
|
||||||
|
|
||||||
// if(((offset*4) & 0x1200) == 0x1200)
|
// if(((offset*4) & 0x1200) == 0x1200)
|
||||||
// printf("HNG64 writing to SYSTEM Registers 0x%08x == 0x%08x. (PC=%08x)\n", offset*4, hng64_sysregs[offset], cpu_get_pc(space->cpu));
|
// printf("HNG64 writing to SYSTEM Registers 0x%08x == 0x%08x. (PC=%08x)\n", offset*4, hng64_sysregs[offset], cpu_get_pc(space->cpu));
|
||||||
|
|
||||||
switch(offset*4)
|
switch(offset*4)
|
||||||
{
|
{
|
||||||
@ -888,7 +888,7 @@ static READ32_HANDLER( dl_r )
|
|||||||
// Some kind of buffering of the display lists, or 'render current buffer' write?
|
// Some kind of buffering of the display lists, or 'render current buffer' write?
|
||||||
static WRITE32_HANDLER( dl_control_w )
|
static WRITE32_HANDLER( dl_control_w )
|
||||||
{
|
{
|
||||||
// printf("\n"); // Debug - ajg
|
// printf("\n"); // Debug - ajg
|
||||||
// TODO: put this back in.
|
// TODO: put this back in.
|
||||||
/*
|
/*
|
||||||
if (activeBuffer==0 || activeBuffer==1)
|
if (activeBuffer==0 || activeBuffer==1)
|
||||||
@ -899,7 +899,7 @@ static WRITE32_HANDLER( dl_control_w )
|
|||||||
activeBuffer = 0;
|
activeBuffer = 0;
|
||||||
if (data & 2)
|
if (data & 2)
|
||||||
activeBuffer = 1;
|
activeBuffer = 1;
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef UNUSED_FUNCTION
|
#ifdef UNUSED_FUNCTION
|
||||||
@ -943,7 +943,7 @@ static WRITE32_HANDLER( tcram_w )
|
|||||||
|
|
||||||
static READ32_HANDLER( tcram_r )
|
static READ32_HANDLER( tcram_r )
|
||||||
{
|
{
|
||||||
// printf("Q1 R : %.8x %.8x\n", offset, hng64_tcram[offset]);
|
// printf("Q1 R : %.8x %.8x\n", offset, hng64_tcram[offset]);
|
||||||
if(offset == 0x12)
|
if(offset == 0x12)
|
||||||
return input_port_read(space->machine, "VBLANK");
|
return input_port_read(space->machine, "VBLANK");
|
||||||
|
|
||||||
@ -1422,7 +1422,7 @@ static const gfx_layout hng64_8x8x8_tilelayout =
|
|||||||
RGN_FRAC(1,1),
|
RGN_FRAC(1,1),
|
||||||
8,
|
8,
|
||||||
{ 0,1,2,3,4,5,6,7 },
|
{ 0,1,2,3,4,5,6,7 },
|
||||||
{ 24, 8, 16, 0,
|
{ 24, 8, 16, 0,
|
||||||
256+24, 256+8, 256+16, 256+0 },
|
256+24, 256+8, 256+16, 256+0 },
|
||||||
{ 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32 },
|
{ 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32 },
|
||||||
16*32
|
16*32
|
||||||
@ -1434,9 +1434,9 @@ static const gfx_layout hng64_16x16x4_tilelayout =
|
|||||||
RGN_FRAC(1,1),
|
RGN_FRAC(1,1),
|
||||||
4,
|
4,
|
||||||
{ 0,1,2,3 },
|
{ 0,1,2,3 },
|
||||||
{ 24, 28, 8, 12, 16, 20, 0, 4,
|
{ 24, 28, 8, 12, 16, 20, 0, 4,
|
||||||
256+24, 256+28, 256+8, 256+12, 256+16, 256+20, 256+0, 256+4 },
|
256+24, 256+28, 256+8, 256+12, 256+16, 256+20, 256+0, 256+4 },
|
||||||
{ 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32,
|
{ 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32,
|
||||||
16*32, 17*32, 18*32, 19*32, 20*32, 21*32, 22*32, 23*32 },
|
16*32, 17*32, 18*32, 19*32, 20*32, 21*32, 22*32, 23*32 },
|
||||||
32*32
|
32*32
|
||||||
};
|
};
|
||||||
|
@ -829,8 +829,8 @@ static READ32_HANDLER( sound020_r )
|
|||||||
case 0x203960: rv = 0; break;
|
case 0x203960: rv = 0; break;
|
||||||
case 0x2039f2: rv = 0x0100ff00; break;
|
case 0x2039f2: rv = 0x0100ff00; break;
|
||||||
//default:
|
//default:
|
||||||
// if(cur_pc != 0x20358a && cur_pc != 0x2038aa && cur_pc != 0x2038d4)
|
// if(cur_pc != 0x20358a && cur_pc != 0x2038aa && cur_pc != 0x2038d4)
|
||||||
// printf("Read 68k @ %x (PC=%x)\n", reg, cur_pc);
|
// printf("Read 68k @ %x (PC=%x)\n", reg, cur_pc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -4652,7 +4652,7 @@ ROM_START( gollygho )
|
|||||||
ROM_LOAD( "gl1voi1.3m", 0x000000, 0x080000, CRC(0eca0efb) SHA1(4e8e1b3118ee0b76c34dd6631047080ba1fcf576) )
|
ROM_LOAD( "gl1voi1.3m", 0x000000, 0x080000, CRC(0eca0efb) SHA1(4e8e1b3118ee0b76c34dd6631047080ba1fcf576) )
|
||||||
|
|
||||||
ROM_REGION( 0x2000, "nvram", 0 ) /* default settings, including calibration */
|
ROM_REGION( 0x2000, "nvram", 0 ) /* default settings, including calibration */
|
||||||
ROM_LOAD( "gollygho.nv", 0x000000, 0x2000, CRC(b7e67b9d) SHA1(bb6e2d2cac1a2f3c26fa1327db0eb53b521005a3) )
|
ROM_LOAD( "gollygho.nv", 0x000000, 0x2000, CRC(b7e67b9d) SHA1(bb6e2d2cac1a2f3c26fa1327db0eb53b521005a3) )
|
||||||
ROM_END
|
ROM_END
|
||||||
|
|
||||||
/* BUBBLE TROUBLE */
|
/* BUBBLE TROUBLE */
|
||||||
@ -4702,7 +4702,7 @@ ROM_START( bubbletr )
|
|||||||
ROM_LOAD( "bt1-voi1.bin", 0x000000, 0x080000, CRC(08b3a089) SHA1(5023c2c0d0a94f0a2f98605d9b93d2d6ce626aa8) )
|
ROM_LOAD( "bt1-voi1.bin", 0x000000, 0x080000, CRC(08b3a089) SHA1(5023c2c0d0a94f0a2f98605d9b93d2d6ce626aa8) )
|
||||||
|
|
||||||
ROM_REGION( 0x2000, "nvram", 0 ) /* default settings, including calibration */
|
ROM_REGION( 0x2000, "nvram", 0 ) /* default settings, including calibration */
|
||||||
ROM_LOAD( "bubbletr.nv", 0x000000, 0x2000, CRC(75ace624) SHA1(1acd2af0c825e50c542db975e1fbda8cbb009f1d) )
|
ROM_LOAD( "bubbletr.nv", 0x000000, 0x2000, CRC(75ace624) SHA1(1acd2af0c825e50c542db975e1fbda8cbb009f1d) )
|
||||||
ROM_END
|
ROM_END
|
||||||
|
|
||||||
|
|
||||||
|
@ -1486,7 +1486,7 @@ static TIMER_CALLBACK( c361_timer_cb )
|
|||||||
if (c361_scanline != 511)
|
if (c361_scanline != 511)
|
||||||
{
|
{
|
||||||
cputag_set_input_line(machine, "maincpu", MIPS3_IRQ1, ASSERT_LINE);
|
cputag_set_input_line(machine, "maincpu", MIPS3_IRQ1, ASSERT_LINE);
|
||||||
timer_adjust_oneshot(c361_timer, attotime_never, 0);
|
timer_adjust_oneshot(c361_timer, attotime_never, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1826,7 +1826,7 @@ static void p3d_matrix_matrix_mul(const UINT16 *p, int size)
|
|||||||
INT16 *t = p3d_getm(p[0]);
|
INT16 *t = p3d_getm(p[0]);
|
||||||
const INT16 *m1 = p3d_getm(p[1]);
|
const INT16 *m1 = p3d_getm(p[1]);
|
||||||
const INT16 *m2 = p3d_getm(p[3]);
|
const INT16 *m2 = p3d_getm(p[3]);
|
||||||
|
|
||||||
t[0] = INT16((m1[0]*m2[0] + m1[1]*m2[3] + m1[2]*m2[6]) >> 14);
|
t[0] = INT16((m1[0]*m2[0] + m1[1]*m2[3] + m1[2]*m2[6]) >> 14);
|
||||||
t[1] = INT16((m1[0]*m2[1] + m1[1]*m2[4] + m1[2]*m2[7]) >> 14);
|
t[1] = INT16((m1[0]*m2[1] + m1[1]*m2[4] + m1[2]*m2[7]) >> 14);
|
||||||
t[2] = INT16((m1[0]*m2[2] + m1[1]*m2[5] + m1[2]*m2[8]) >> 14);
|
t[2] = INT16((m1[0]*m2[2] + m1[1]*m2[5] + m1[2]*m2[8]) >> 14);
|
||||||
@ -2037,7 +2037,7 @@ static void render_one_model(running_machine *machine, const namcos23_render_ent
|
|||||||
UINT32 v1 = ptrom[adr++];
|
UINT32 v1 = ptrom[adr++];
|
||||||
UINT32 v2 = ptrom[adr++];
|
UINT32 v2 = ptrom[adr++];
|
||||||
UINT32 v3 = ptrom[adr++];
|
UINT32 v3 = ptrom[adr++];
|
||||||
|
|
||||||
render_apply_transform(u32_to_s24(v1), u32_to_s24(v2), u32_to_s24(v3), re, pv[i]);
|
render_apply_transform(u32_to_s24(v1), u32_to_s24(v2), u32_to_s24(v3), re, pv[i]);
|
||||||
pv[i].p[1] = (((v1 >> 20) & 0xf00) | ((v2 >> 24 & 0xff))) + 0.5;
|
pv[i].p[1] = (((v1 >> 20) & 0xf00) | ((v2 >> 24 & 0xff))) + 0.5;
|
||||||
pv[i].p[2] = (((v1 >> 16) & 0xf00) | ((v3 >> 24 & 0xff))) + 0.5 + tbase;
|
pv[i].p[2] = (((v1 >> 16) & 0xf00) | ((v3 >> 24 & 0xff))) + 0.5 + tbase;
|
||||||
@ -2061,7 +2061,7 @@ static void render_one_model(running_machine *machine, const namcos23_render_ent
|
|||||||
INT32 nz = u32_to_s10(norm);
|
INT32 nz = u32_to_s10(norm);
|
||||||
INT32 nrx, nry, nrz;
|
INT32 nrx, nry, nrz;
|
||||||
render_apply_matrot(nx, ny, nz, re, nrx, nry, nrz);
|
render_apply_matrot(nx, ny, nz, re, nrx, nry, nrz);
|
||||||
|
|
||||||
float lsi = float(nrx*light_vector[0] + nry*light_vector[1] + nrz*light_vector[2])/4194304.0;
|
float lsi = float(nrx*light_vector[0] + nry*light_vector[1] + nrz*light_vector[2])/4194304.0;
|
||||||
if(lsi < 0)
|
if(lsi < 0)
|
||||||
lsi = 0;
|
lsi = 0;
|
||||||
@ -2076,7 +2076,7 @@ static void render_one_model(running_machine *machine, const namcos23_render_ent
|
|||||||
namcos23_poly_entry *p = render_polys + render_poly_count;
|
namcos23_poly_entry *p = render_polys + render_poly_count;
|
||||||
|
|
||||||
p->vertex_count = poly_zclip_if_less(ne, pv, p->pv, 4, 0.001);
|
p->vertex_count = poly_zclip_if_less(ne, pv, p->pv, 4, 0.001);
|
||||||
|
|
||||||
if(p->vertex_count >= 3) {
|
if(p->vertex_count >= 3) {
|
||||||
for(int i=0; i<p->vertex_count; i++) {
|
for(int i=0; i<p->vertex_count; i++) {
|
||||||
render_project(p->pv[i]);
|
render_project(p->pv[i]);
|
||||||
|
@ -66,9 +66,9 @@ static WRITE8_HANDLER( output_w )
|
|||||||
|
|
||||||
printf("%02x\n",data);
|
printf("%02x\n",data);
|
||||||
|
|
||||||
/* if((data & 0xc) == 0xc)
|
/* if((data & 0xc) == 0xc)
|
||||||
memory_set_bankptr(space->machine, "bank1", &ROM[0x10000]);
|
memory_set_bankptr(space->machine, "bank1", &ROM[0x10000]);
|
||||||
else*/
|
else*/
|
||||||
if(data & 8)
|
if(data & 8)
|
||||||
memory_set_bankptr(space->machine, "bank1", &ROM[0x08000]);
|
memory_set_bankptr(space->machine, "bank1", &ROM[0x08000]);
|
||||||
else
|
else
|
||||||
|
@ -1890,7 +1890,7 @@ static WRITE16_HANDLER( zombraid_gun_w )
|
|||||||
/* Gun Recoils */
|
/* Gun Recoils */
|
||||||
/* Note: In debug menu recoil solenoids strobe when held down. Is this correct?? */
|
/* Note: In debug menu recoil solenoids strobe when held down. Is this correct?? */
|
||||||
output_set_value("Player1_Gun_Recoil", (data & 0x10)>>4 );
|
output_set_value("Player1_Gun_Recoil", (data & 0x10)>>4 );
|
||||||
output_set_value("Player2_Gun_Recoil", (data & 0x8)>>3 );
|
output_set_value("Player2_Gun_Recoil", (data & 0x8)>>3 );
|
||||||
|
|
||||||
gun_input_bit = bit_count - 4;
|
gun_input_bit = bit_count - 4;
|
||||||
gun_input_bit = 8 - gun_input_bit; // Reverse order
|
gun_input_bit = 8 - gun_input_bit; // Reverse order
|
||||||
|
@ -7,9 +7,9 @@
|
|||||||
TODO:
|
TODO:
|
||||||
- is there a third coin input?
|
- is there a third coin input?
|
||||||
|
|
||||||
- Is sfj confirmed to have a 68705?, sfua has an i8751 and the actual
|
- Is sfj confirmed to have a 68705?, sfua has an i8751 and the actual
|
||||||
gamecode is closer to sfua than the other sets. The protection
|
gamecode is closer to sfua than the other sets. The protection
|
||||||
appears to be the same on both.
|
appears to be the same on both.
|
||||||
|
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
@ -206,7 +206,7 @@ static ADDRESS_MAP_START( sf_map, ADDRESS_SPACE_PROGRAM, 16 )
|
|||||||
AM_RANGE(0xc00018, 0xc00019) AM_WRITE(sf_bg_scroll_w)
|
AM_RANGE(0xc00018, 0xc00019) AM_WRITE(sf_bg_scroll_w)
|
||||||
AM_RANGE(0xc0001a, 0xc0001b) AM_WRITE(sf_gfxctrl_w)
|
AM_RANGE(0xc0001a, 0xc0001b) AM_WRITE(sf_gfxctrl_w)
|
||||||
AM_RANGE(0xc0001c, 0xc0001d) AM_WRITE(soundcmd_w)
|
AM_RANGE(0xc0001c, 0xc0001d) AM_WRITE(soundcmd_w)
|
||||||
// AM_RANGE(0xc0001e, 0xc0001f) AM_WRITE(protection_w)
|
// AM_RANGE(0xc0001e, 0xc0001f) AM_WRITE(protection_w)
|
||||||
AM_RANGE(0xff8000, 0xffdfff) AM_RAM
|
AM_RANGE(0xff8000, 0xffdfff) AM_RAM
|
||||||
AM_RANGE(0xffe000, 0xffffff) AM_RAM AM_BASE_MEMBER(sf_state, objectram)
|
AM_RANGE(0xffe000, 0xffffff) AM_RAM AM_BASE_MEMBER(sf_state, objectram)
|
||||||
ADDRESS_MAP_END
|
ADDRESS_MAP_END
|
||||||
@ -228,7 +228,7 @@ static ADDRESS_MAP_START( sfus_map, ADDRESS_SPACE_PROGRAM, 16 )
|
|||||||
AM_RANGE(0xc00018, 0xc00019) AM_WRITE(sf_bg_scroll_w)
|
AM_RANGE(0xc00018, 0xc00019) AM_WRITE(sf_bg_scroll_w)
|
||||||
AM_RANGE(0xc0001a, 0xc0001b) AM_WRITE(sf_gfxctrl_w)
|
AM_RANGE(0xc0001a, 0xc0001b) AM_WRITE(sf_gfxctrl_w)
|
||||||
AM_RANGE(0xc0001c, 0xc0001d) AM_WRITE(soundcmd_w)
|
AM_RANGE(0xc0001c, 0xc0001d) AM_WRITE(soundcmd_w)
|
||||||
// AM_RANGE(0xc0001e, 0xc0001f) AM_WRITE(protection_w)
|
// AM_RANGE(0xc0001e, 0xc0001f) AM_WRITE(protection_w)
|
||||||
AM_RANGE(0xff8000, 0xffdfff) AM_RAM
|
AM_RANGE(0xff8000, 0xffdfff) AM_RAM
|
||||||
AM_RANGE(0xffe000, 0xffffff) AM_RAM AM_BASE_MEMBER(sf_state, objectram)
|
AM_RANGE(0xffe000, 0xffffff) AM_RAM AM_BASE_MEMBER(sf_state, objectram)
|
||||||
ADDRESS_MAP_END
|
ADDRESS_MAP_END
|
||||||
@ -943,7 +943,7 @@ ROM_START( sf )
|
|||||||
|
|
||||||
ROM_REGION( 0x1c0000, "gfx3", 0 )
|
ROM_REGION( 0x1c0000, "gfx3", 0 )
|
||||||
/* Sprites planes 1-2 */
|
/* Sprites planes 1-2 */
|
||||||
ROM_LOAD( "sf-15.bin", 0x000000, 0x020000, CRC(fc0113db) SHA1(7c19603129be5f6e1ccd07fd8b7ee1cbf86468db) )
|
ROM_LOAD( "sf-15.bin", 0x000000, 0x020000, CRC(fc0113db) SHA1(7c19603129be5f6e1ccd07fd8b7ee1cbf86468db) )
|
||||||
ROM_LOAD( "sf-16.bin", 0x020000, 0x020000, CRC(82e4a6d3) SHA1(5ec519c2740c66f5da27ced1db99e19fe38fdad7) )
|
ROM_LOAD( "sf-16.bin", 0x020000, 0x020000, CRC(82e4a6d3) SHA1(5ec519c2740c66f5da27ced1db99e19fe38fdad7) )
|
||||||
ROM_LOAD( "sf-11.bin", 0x040000, 0x020000, CRC(e112df1b) SHA1(3f9856f69b457d79fe085bf51dfb2efcd98f883d) )
|
ROM_LOAD( "sf-11.bin", 0x040000, 0x020000, CRC(e112df1b) SHA1(3f9856f69b457d79fe085bf51dfb2efcd98f883d) )
|
||||||
ROM_LOAD( "sf-12.bin", 0x060000, 0x020000, CRC(42d52299) SHA1(6560c38f5fd5a47db7728cc7df83d2169157174f) )
|
ROM_LOAD( "sf-12.bin", 0x060000, 0x020000, CRC(42d52299) SHA1(6560c38f5fd5a47db7728cc7df83d2169157174f) )
|
||||||
@ -1017,7 +1017,7 @@ ROM_START( sfu )
|
|||||||
ROM_LOAD( "sf-08.bin", 0x0a0000, 0x020000, CRC(95ece9b1) SHA1(f0a15fce5cd9617fa5d4dd43bd5b6ea190dace85) )
|
ROM_LOAD( "sf-08.bin", 0x0a0000, 0x020000, CRC(95ece9b1) SHA1(f0a15fce5cd9617fa5d4dd43bd5b6ea190dace85) )
|
||||||
ROM_LOAD( "sf-03.bin", 0x0c0000, 0x020000, CRC(5ca05781) SHA1(004f5ad34798471b39bd4612c797f0913ed0fb4a) )
|
ROM_LOAD( "sf-03.bin", 0x0c0000, 0x020000, CRC(5ca05781) SHA1(004f5ad34798471b39bd4612c797f0913ed0fb4a) )
|
||||||
/* Sprites planes 2-3 */
|
/* Sprites planes 2-3 */
|
||||||
ROM_LOAD( "sf-17.bin", 0x0e0000, 0x020000, CRC(69fac48e) SHA1(c9272217256c73cb8ddb4fbbfb5905ce1122c746) )
|
ROM_LOAD( "sf-17.bin", 0x0e0000, 0x020000, CRC(69fac48e) SHA1(c9272217256c73cb8ddb4fbbfb5905ce1122c746) )
|
||||||
ROM_LOAD( "sf-18.bin", 0x100000, 0x020000, CRC(71cfd18d) SHA1(4c17e2124f3456d6b13ede8ad3ae916b53f9bb7e) )
|
ROM_LOAD( "sf-18.bin", 0x100000, 0x020000, CRC(71cfd18d) SHA1(4c17e2124f3456d6b13ede8ad3ae916b53f9bb7e) )
|
||||||
ROM_LOAD( "sf-13.bin", 0x120000, 0x020000, CRC(fa2eb24b) SHA1(96f3bd54c340771577cc232ebde93965421f2557) )
|
ROM_LOAD( "sf-13.bin", 0x120000, 0x020000, CRC(fa2eb24b) SHA1(96f3bd54c340771577cc232ebde93965421f2557) )
|
||||||
ROM_LOAD( "sf-14.bin", 0x140000, 0x020000, CRC(ad955c95) SHA1(549d6a5125432aa45d03f15e76f6c2c8ab2e05a3) )
|
ROM_LOAD( "sf-14.bin", 0x140000, 0x020000, CRC(ad955c95) SHA1(549d6a5125432aa45d03f15e76f6c2c8ab2e05a3) )
|
||||||
@ -1087,7 +1087,7 @@ ROM_START( sfua )
|
|||||||
ROM_LOAD( "sf-08.bin", 0x0a0000, 0x020000, CRC(95ece9b1) SHA1(f0a15fce5cd9617fa5d4dd43bd5b6ea190dace85) )
|
ROM_LOAD( "sf-08.bin", 0x0a0000, 0x020000, CRC(95ece9b1) SHA1(f0a15fce5cd9617fa5d4dd43bd5b6ea190dace85) )
|
||||||
ROM_LOAD( "sf-03.bin", 0x0c0000, 0x020000, CRC(5ca05781) SHA1(004f5ad34798471b39bd4612c797f0913ed0fb4a) )
|
ROM_LOAD( "sf-03.bin", 0x0c0000, 0x020000, CRC(5ca05781) SHA1(004f5ad34798471b39bd4612c797f0913ed0fb4a) )
|
||||||
/* Sprites planes 2-3 */
|
/* Sprites planes 2-3 */
|
||||||
ROM_LOAD( "sf-17.bin", 0x0e0000, 0x020000, CRC(69fac48e) SHA1(c9272217256c73cb8ddb4fbbfb5905ce1122c746) )
|
ROM_LOAD( "sf-17.bin", 0x0e0000, 0x020000, CRC(69fac48e) SHA1(c9272217256c73cb8ddb4fbbfb5905ce1122c746) )
|
||||||
ROM_LOAD( "sf-18.bin", 0x100000, 0x020000, CRC(71cfd18d) SHA1(4c17e2124f3456d6b13ede8ad3ae916b53f9bb7e) )
|
ROM_LOAD( "sf-18.bin", 0x100000, 0x020000, CRC(71cfd18d) SHA1(4c17e2124f3456d6b13ede8ad3ae916b53f9bb7e) )
|
||||||
ROM_LOAD( "sf-13.bin", 0x120000, 0x020000, CRC(fa2eb24b) SHA1(96f3bd54c340771577cc232ebde93965421f2557) )
|
ROM_LOAD( "sf-13.bin", 0x120000, 0x020000, CRC(fa2eb24b) SHA1(96f3bd54c340771577cc232ebde93965421f2557) )
|
||||||
ROM_LOAD( "sf-14.bin", 0x140000, 0x020000, CRC(ad955c95) SHA1(549d6a5125432aa45d03f15e76f6c2c8ab2e05a3) )
|
ROM_LOAD( "sf-14.bin", 0x140000, 0x020000, CRC(ad955c95) SHA1(549d6a5125432aa45d03f15e76f6c2c8ab2e05a3) )
|
||||||
@ -1149,7 +1149,7 @@ ROM_START( sfj )
|
|||||||
|
|
||||||
ROM_REGION( 0x1c0000, "gfx3", 0 )
|
ROM_REGION( 0x1c0000, "gfx3", 0 )
|
||||||
/* Sprites planes 1-2 */
|
/* Sprites planes 1-2 */
|
||||||
ROM_LOAD( "sf-15.bin", 0x000000, 0x020000, CRC(fc0113db) SHA1(7c19603129be5f6e1ccd07fd8b7ee1cbf86468db) )
|
ROM_LOAD( "sf-15.bin", 0x000000, 0x020000, CRC(fc0113db) SHA1(7c19603129be5f6e1ccd07fd8b7ee1cbf86468db) )
|
||||||
ROM_LOAD( "sf-16.bin", 0x020000, 0x020000, CRC(82e4a6d3) SHA1(5ec519c2740c66f5da27ced1db99e19fe38fdad7) )
|
ROM_LOAD( "sf-16.bin", 0x020000, 0x020000, CRC(82e4a6d3) SHA1(5ec519c2740c66f5da27ced1db99e19fe38fdad7) )
|
||||||
ROM_LOAD( "sf-11.bin", 0x040000, 0x020000, CRC(e112df1b) SHA1(3f9856f69b457d79fe085bf51dfb2efcd98f883d) )
|
ROM_LOAD( "sf-11.bin", 0x040000, 0x020000, CRC(e112df1b) SHA1(3f9856f69b457d79fe085bf51dfb2efcd98f883d) )
|
||||||
ROM_LOAD( "sf-12.bin", 0x060000, 0x020000, CRC(42d52299) SHA1(6560c38f5fd5a47db7728cc7df83d2169157174f) )
|
ROM_LOAD( "sf-12.bin", 0x060000, 0x020000, CRC(42d52299) SHA1(6560c38f5fd5a47db7728cc7df83d2169157174f) )
|
||||||
@ -1157,7 +1157,7 @@ ROM_START( sfj )
|
|||||||
ROM_LOAD( "sf-08.bin", 0x0a0000, 0x020000, CRC(95ece9b1) SHA1(f0a15fce5cd9617fa5d4dd43bd5b6ea190dace85) )
|
ROM_LOAD( "sf-08.bin", 0x0a0000, 0x020000, CRC(95ece9b1) SHA1(f0a15fce5cd9617fa5d4dd43bd5b6ea190dace85) )
|
||||||
ROM_LOAD( "sf-03.bin", 0x0c0000, 0x020000, CRC(5ca05781) SHA1(004f5ad34798471b39bd4612c797f0913ed0fb4a) )
|
ROM_LOAD( "sf-03.bin", 0x0c0000, 0x020000, CRC(5ca05781) SHA1(004f5ad34798471b39bd4612c797f0913ed0fb4a) )
|
||||||
/* Sprites planes 2-3 */
|
/* Sprites planes 2-3 */
|
||||||
ROM_LOAD( "sf-17.bin", 0x0e0000, 0x020000, CRC(69fac48e) SHA1(c9272217256c73cb8ddb4fbbfb5905ce1122c746) )
|
ROM_LOAD( "sf-17.bin", 0x0e0000, 0x020000, CRC(69fac48e) SHA1(c9272217256c73cb8ddb4fbbfb5905ce1122c746) )
|
||||||
ROM_LOAD( "sf-18.bin", 0x100000, 0x020000, CRC(71cfd18d) SHA1(4c17e2124f3456d6b13ede8ad3ae916b53f9bb7e) )
|
ROM_LOAD( "sf-18.bin", 0x100000, 0x020000, CRC(71cfd18d) SHA1(4c17e2124f3456d6b13ede8ad3ae916b53f9bb7e) )
|
||||||
ROM_LOAD( "sf-13.bin", 0x120000, 0x020000, CRC(fa2eb24b) SHA1(96f3bd54c340771577cc232ebde93965421f2557) )
|
ROM_LOAD( "sf-13.bin", 0x120000, 0x020000, CRC(fa2eb24b) SHA1(96f3bd54c340771577cc232ebde93965421f2557) )
|
||||||
ROM_LOAD( "sf-14.bin", 0x140000, 0x020000, CRC(ad955c95) SHA1(549d6a5125432aa45d03f15e76f6c2c8ab2e05a3) )
|
ROM_LOAD( "sf-14.bin", 0x140000, 0x020000, CRC(ad955c95) SHA1(549d6a5125432aa45d03f15e76f6c2c8ab2e05a3) )
|
||||||
@ -1210,10 +1210,10 @@ ROM_START( sfp )
|
|||||||
ROM_LOAD( "mchr.2h", 0x0e0000, 0x020000, CRC(cc6bf05c) SHA1(4e83dd55c88d5b539ab1dcae5bfd16195bcd2565) )
|
ROM_LOAD( "mchr.2h", 0x0e0000, 0x020000, CRC(cc6bf05c) SHA1(4e83dd55c88d5b539ab1dcae5bfd16195bcd2565) )
|
||||||
|
|
||||||
/* these graphic roms seem mismatched with this version of the prototype, they don't contain the graphics needed
|
/* these graphic roms seem mismatched with this version of the prototype, they don't contain the graphics needed
|
||||||
for the bonus round, or have complete tile sets graphic set for 2 of the characters which are used by the prototype
|
for the bonus round, or have complete tile sets graphic set for 2 of the characters which are used by the prototype
|
||||||
(all of Joe is missing, many of Mike's poses are missing) If you use the original ROMs instead the graphics are
|
(all of Joe is missing, many of Mike's poses are missing) If you use the original ROMs instead the graphics are
|
||||||
correct, so the prototype is clearly already referencing the final tile arrangement for them. The glitches
|
correct, so the prototype is clearly already referencing the final tile arrangement for them. The glitches
|
||||||
therefore are not emulation bugs, if the PCB contained the same mismatched ROMs it would exhibit the same glitches. */
|
therefore are not emulation bugs, if the PCB contained the same mismatched ROMs it would exhibit the same glitches. */
|
||||||
ROM_REGION( 0x1c0000, "gfx3", ROMREGION_ERASE00 )
|
ROM_REGION( 0x1c0000, "gfx3", ROMREGION_ERASE00 )
|
||||||
/* Sprites planes 1-2 */
|
/* Sprites planes 1-2 */
|
||||||
ROM_LOAD( "b1m.bin", 0x000000, 0x010000, CRC(64758232) SHA1(20d21677b791a7f96afed54b286ee92adb80456d) )
|
ROM_LOAD( "b1m.bin", 0x000000, 0x010000, CRC(64758232) SHA1(20d21677b791a7f96afed54b286ee92adb80456d) )
|
||||||
|
@ -156,8 +156,8 @@ static READ8_HANDLER( sdpoker_rng_r )
|
|||||||
static WRITE8_HANDLER( wdog8000_w )
|
static WRITE8_HANDLER( wdog8000_w )
|
||||||
{
|
{
|
||||||
/* Kind of state watchdog alternating 0x00 & 0x01 writes.
|
/* Kind of state watchdog alternating 0x00 & 0x01 writes.
|
||||||
Used when exit the test mode (writes 2 consecutive 0's).
|
Used when exit the test mode (writes 2 consecutive 0's).
|
||||||
Seems to be intended to reset some external device.
|
Seems to be intended to reset some external device.
|
||||||
|
|
||||||
Watchdog: 01
|
Watchdog: 01
|
||||||
Watchdog: 00
|
Watchdog: 00
|
||||||
@ -186,7 +186,7 @@ static WRITE8_HANDLER( wdog8000_w )
|
|||||||
}
|
}
|
||||||
|
|
||||||
wdog = data;
|
wdog = data;
|
||||||
// logerror("Watchdog: %02X\n", data);
|
// logerror("Watchdog: %02X\n", data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -195,7 +195,7 @@ static WRITE8_HANDLER( debug8004_w )
|
|||||||
/* Writes 0x00 each time the machine is initialized */
|
/* Writes 0x00 each time the machine is initialized */
|
||||||
|
|
||||||
logerror("debug8004: %02X\n", data);
|
logerror("debug8004: %02X\n", data);
|
||||||
// popmessage("written : %02X", data);
|
// popmessage("written : %02X", data);
|
||||||
}
|
}
|
||||||
|
|
||||||
static WRITE8_HANDLER( debug7c00_w )
|
static WRITE8_HANDLER( debug7c00_w )
|
||||||
@ -405,12 +405,12 @@ GFXDECODE_END
|
|||||||
|
|
||||||
static WRITE8_DEVICE_HANDLER( ay8910_outputa_w )
|
static WRITE8_DEVICE_HANDLER( ay8910_outputa_w )
|
||||||
{
|
{
|
||||||
// popmessage("ay8910_outputa_w %02x",data);
|
// popmessage("ay8910_outputa_w %02x",data);
|
||||||
}
|
}
|
||||||
|
|
||||||
static WRITE8_DEVICE_HANDLER( ay8910_outputb_w )
|
static WRITE8_DEVICE_HANDLER( ay8910_outputb_w )
|
||||||
{
|
{
|
||||||
// popmessage("ay8910_outputb_w %02x",data);
|
// popmessage("ay8910_outputb_w %02x",data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -157,7 +157,7 @@ WRITE16_HANDLER( midxunit_io_w )
|
|||||||
output_set_value("Player3_Gun_Recoil", (data & 0x4) >> 2 );
|
output_set_value("Player3_Gun_Recoil", (data & 0x4) >> 2 );
|
||||||
output_set_value("Player1_Gun_LED", (~data & 0x10) >> 4 );
|
output_set_value("Player1_Gun_LED", (~data & 0x10) >> 4 );
|
||||||
output_set_value("Player2_Gun_LED", (~data & 0x20) >> 5 );
|
output_set_value("Player2_Gun_LED", (~data & 0x20) >> 5 );
|
||||||
output_set_value("Player3_Gun_LED", (~data & 0x40) >> 6 );
|
output_set_value("Player3_Gun_LED", (~data & 0x40) >> 6 );
|
||||||
|
|
||||||
logerror("%08X:I/O write to %d = %04X\n", cpu_get_pc(space->cpu), offset, data);
|
logerror("%08X:I/O write to %d = %04X\n", cpu_get_pc(space->cpu), offset, data);
|
||||||
// logerror("%08X:Unknown I/O write to %d = %04X\n", cpu_get_pc(space->cpu), offset, data);
|
// logerror("%08X:Unknown I/O write to %d = %04X\n", cpu_get_pc(space->cpu), offset, data);
|
||||||
|
@ -194,7 +194,7 @@ static WRITE16_HANDLER( term2_sound_w )
|
|||||||
output_set_value("Left_Gun_Red_Led", (~data & 0x10) >> 4);
|
output_set_value("Left_Gun_Red_Led", (~data & 0x10) >> 4);
|
||||||
output_set_value("Right_Gun_Green_Led", (~data & 0x80) >> 7);
|
output_set_value("Right_Gun_Green_Led", (~data & 0x80) >> 7);
|
||||||
output_set_value("Right_Gun_Red_Led", (~data & 0x40) >> 6);
|
output_set_value("Right_Gun_Red_Led", (~data & 0x40) >> 6);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (offset == 0)
|
if (offset == 0)
|
||||||
term2_analog_select = (data >> 12) & 3;
|
term2_analog_select = (data >> 12) & 3;
|
||||||
|
@ -976,8 +976,8 @@ static void spc7110_set_data_adjust(UINT32 addr)
|
|||||||
snes_spc7110.r4815 = addr >> 8;
|
snes_spc7110.r4815 = addr >> 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME: SPC7110 RTC is capable of rounding/adding/zero-ing seconds, so
|
// FIXME: SPC7110 RTC is capable of rounding/adding/zero-ing seconds, so
|
||||||
// we should probably keep track internally of the time rather than updating
|
// we should probably keep track internally of the time rather than updating
|
||||||
// to the system time at each call with a "offset" tracking as we do now...
|
// to the system time at each call with a "offset" tracking as we do now...
|
||||||
// (and indeed current code fails to pass Tengai Makyou Zero tests)
|
// (and indeed current code fails to pass Tengai Makyou Zero tests)
|
||||||
static void spc7110_update_time(running_machine *machine, UINT8 offset)
|
static void spc7110_update_time(running_machine *machine, UINT8 offset)
|
||||||
@ -1221,10 +1221,10 @@ static UINT8 spc7110_mmio_read(const address_space *space, UINT32 addr)
|
|||||||
//real-time clock unit
|
//real-time clock unit
|
||||||
//====================
|
//====================
|
||||||
case 0x4840: return snes_spc7110.r4840;
|
case 0x4840: return snes_spc7110.r4840;
|
||||||
case 0x4841:
|
case 0x4841:
|
||||||
{
|
{
|
||||||
UINT8 data = 0;
|
UINT8 data = 0;
|
||||||
if (snes_spc7110.rtc_state == RTCS_Inactive || snes_spc7110.rtc_state == RTCS_ModeSelect)
|
if (snes_spc7110.rtc_state == RTCS_Inactive || snes_spc7110.rtc_state == RTCS_ModeSelect)
|
||||||
return 0x00;
|
return 0x00;
|
||||||
|
|
||||||
snes_spc7110.r4842 = 0x80;
|
snes_spc7110.r4842 = 0x80;
|
||||||
@ -1232,7 +1232,7 @@ static UINT8 spc7110_mmio_read(const address_space *space, UINT32 addr)
|
|||||||
snes_spc7110.rtc_index = (snes_spc7110.rtc_index + 1) & 15;
|
snes_spc7110.rtc_index = (snes_spc7110.rtc_index + 1) & 15;
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
case 0x4842:
|
case 0x4842:
|
||||||
{
|
{
|
||||||
UINT8 status = snes_spc7110.r4842;
|
UINT8 status = snes_spc7110.r4842;
|
||||||
snes_spc7110.r4842 &= 0x7f;
|
snes_spc7110.r4842 &= 0x7f;
|
||||||
@ -1372,7 +1372,7 @@ static void spc7110_mmio_write(running_machine *machine, UINT32 addr, UINT8 data
|
|||||||
case 0x4817: snes_spc7110.r4817 = data; break;
|
case 0x4817: snes_spc7110.r4817 = data; break;
|
||||||
case 0x4818:
|
case 0x4818:
|
||||||
{
|
{
|
||||||
if(snes_spc7110.r481x != 0x07)
|
if(snes_spc7110.r481x != 0x07)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
snes_spc7110.r4818 = data;
|
snes_spc7110.r4818 = data;
|
||||||
@ -1393,7 +1393,7 @@ static void spc7110_mmio_write(running_machine *machine, UINT32 addr, UINT8 data
|
|||||||
{
|
{
|
||||||
snes_spc7110.r4825 = data;
|
snes_spc7110.r4825 = data;
|
||||||
|
|
||||||
if(snes_spc7110.r482e & 1)
|
if(snes_spc7110.r482e & 1)
|
||||||
{
|
{
|
||||||
//signed 16-bit x 16-bit multiplication
|
//signed 16-bit x 16-bit multiplication
|
||||||
INT16 r0 = (INT16)(snes_spc7110.r4824 + (snes_spc7110.r4825 << 8));
|
INT16 r0 = (INT16)(snes_spc7110.r4824 + (snes_spc7110.r4825 << 8));
|
||||||
@ -1404,8 +1404,8 @@ static void spc7110_mmio_write(running_machine *machine, UINT32 addr, UINT8 data
|
|||||||
snes_spc7110.r4829 = result >> 8;
|
snes_spc7110.r4829 = result >> 8;
|
||||||
snes_spc7110.r482a = result >> 16;
|
snes_spc7110.r482a = result >> 16;
|
||||||
snes_spc7110.r482b = result >> 24;
|
snes_spc7110.r482b = result >> 24;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//unsigned 16-bit x 16-bit multiplication
|
//unsigned 16-bit x 16-bit multiplication
|
||||||
UINT16 r0 = (UINT16)(snes_spc7110.r4824 + (snes_spc7110.r4825 << 8));
|
UINT16 r0 = (UINT16)(snes_spc7110.r4824 + (snes_spc7110.r4825 << 8));
|
||||||
@ -1535,32 +1535,32 @@ static void spc7110_mmio_write(running_machine *machine, UINT32 addr, UINT8 data
|
|||||||
//real-time clock unit
|
//real-time clock unit
|
||||||
//====================
|
//====================
|
||||||
|
|
||||||
case 0x4840:
|
case 0x4840:
|
||||||
{
|
{
|
||||||
snes_spc7110.r4840 = data;
|
snes_spc7110.r4840 = data;
|
||||||
|
|
||||||
if (!(snes_spc7110.r4840 & 1))
|
if (!(snes_spc7110.r4840 & 1))
|
||||||
{
|
{
|
||||||
//disable RTC
|
//disable RTC
|
||||||
snes_spc7110.rtc_state = RTCS_Inactive;
|
snes_spc7110.rtc_state = RTCS_Inactive;
|
||||||
spc7110_update_time(machine, 0);
|
spc7110_update_time(machine, 0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//enable RTC
|
//enable RTC
|
||||||
snes_spc7110.r4842 = 0x80;
|
snes_spc7110.r4842 = 0x80;
|
||||||
snes_spc7110.rtc_state = RTCS_ModeSelect;
|
snes_spc7110.rtc_state = RTCS_ModeSelect;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x4841:
|
case 0x4841:
|
||||||
{
|
{
|
||||||
snes_spc7110.r4841 = data;
|
snes_spc7110.r4841 = data;
|
||||||
|
|
||||||
switch (snes_spc7110.rtc_state)
|
switch (snes_spc7110.rtc_state)
|
||||||
{
|
{
|
||||||
case RTCS_ModeSelect:
|
case RTCS_ModeSelect:
|
||||||
if (data == RTCM_Linear || data == RTCM_Indexed)
|
if (data == RTCM_Linear || data == RTCM_Indexed)
|
||||||
{
|
{
|
||||||
snes_spc7110.r4842 = 0x80;
|
snes_spc7110.r4842 = 0x80;
|
||||||
@ -1573,7 +1573,7 @@ static void spc7110_mmio_write(running_machine *machine, UINT32 addr, UINT8 data
|
|||||||
case RTCS_IndexSelect:
|
case RTCS_IndexSelect:
|
||||||
snes_spc7110.r4842 = 0x80;
|
snes_spc7110.r4842 = 0x80;
|
||||||
snes_spc7110.rtc_index = data & 15;
|
snes_spc7110.rtc_index = data & 15;
|
||||||
if (snes_spc7110.rtc_mode == RTCM_Linear)
|
if (snes_spc7110.rtc_mode == RTCM_Linear)
|
||||||
snes_spc7110.rtc_state = RTCS_Write;
|
snes_spc7110.rtc_state = RTCS_Write;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -1581,14 +1581,14 @@ static void spc7110_mmio_write(running_machine *machine, UINT32 addr, UINT8 data
|
|||||||
snes_spc7110.r4842 = 0x80;
|
snes_spc7110.r4842 = 0x80;
|
||||||
|
|
||||||
//control register 0
|
//control register 0
|
||||||
if (snes_spc7110.rtc_index == 13)
|
if (snes_spc7110.rtc_index == 13)
|
||||||
{
|
{
|
||||||
//increment second counter
|
//increment second counter
|
||||||
if (data & 2)
|
if (data & 2)
|
||||||
spc7110_update_time(machine, 1);
|
spc7110_update_time(machine, 1);
|
||||||
|
|
||||||
//round minute counter
|
//round minute counter
|
||||||
if (data & 8)
|
if (data & 8)
|
||||||
{
|
{
|
||||||
spc7110_update_time(machine, 0);
|
spc7110_update_time(machine, 0);
|
||||||
|
|
||||||
@ -1597,16 +1597,16 @@ static void spc7110_mmio_write(running_machine *machine, UINT32 addr, UINT8 data
|
|||||||
snes_spc7110.rtc_ram[0] = 0;
|
snes_spc7110.rtc_ram[0] = 0;
|
||||||
snes_spc7110.rtc_ram[1] = 0;
|
snes_spc7110.rtc_ram[1] = 0;
|
||||||
|
|
||||||
if (second >= 30)
|
if (second >= 30)
|
||||||
spc7110_update_time(machine, 60);
|
spc7110_update_time(machine, 60);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//control register 2
|
//control register 2
|
||||||
if (snes_spc7110.rtc_index == 15)
|
if (snes_spc7110.rtc_index == 15)
|
||||||
{
|
{
|
||||||
//disable timer and clear second counter
|
//disable timer and clear second counter
|
||||||
if ((data & 1) && !(snes_spc7110.rtc_ram[15] & 1))
|
if ((data & 1) && !(snes_spc7110.rtc_ram[15] & 1))
|
||||||
{
|
{
|
||||||
spc7110_update_time(machine, 0);
|
spc7110_update_time(machine, 0);
|
||||||
|
|
||||||
@ -1624,7 +1624,7 @@ static void spc7110_mmio_write(running_machine *machine, UINT32 addr, UINT8 data
|
|||||||
snes_spc7110.rtc_index = (snes_spc7110.rtc_index + 1) & 15;
|
snes_spc7110.rtc_index = (snes_spc7110.rtc_index + 1) & 15;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -141,7 +141,7 @@ WRITE16_HANDLER( lemmings_pixel_1_w )
|
|||||||
lemmings_state *state = (lemmings_state *)space->machine->driver_data;
|
lemmings_state *state = (lemmings_state *)space->machine->driver_data;
|
||||||
int sx, sy, src, /*old,*/ tile;
|
int sx, sy, src, /*old,*/ tile;
|
||||||
|
|
||||||
// old = state->pixel_1_data[offset];
|
// old = state->pixel_1_data[offset];
|
||||||
COMBINE_DATA(&state->pixel_1_data[offset]);
|
COMBINE_DATA(&state->pixel_1_data[offset]);
|
||||||
src = state->pixel_1_data[offset];
|
src = state->pixel_1_data[offset];
|
||||||
// if (old == src)
|
// if (old == src)
|
||||||
|
@ -424,7 +424,7 @@ void Processor::SetMulInputRGB(UINT8 **input_r, UINT8 **input_g, UINT8 **input_b
|
|||||||
case 11: *input_r = &m_shade_color.i.a; *input_g = &m_shade_color.i.a; *input_b = &m_shade_color.i.a; break;
|
case 11: *input_r = &m_shade_color.i.a; *input_g = &m_shade_color.i.a; *input_b = &m_shade_color.i.a; break;
|
||||||
case 12: *input_r = &m_env_color.i.a; *input_g = &m_env_color.i.a; *input_b = &m_env_color.i.a; break;
|
case 12: *input_r = &m_env_color.i.a; *input_g = &m_env_color.i.a; *input_b = &m_env_color.i.a; break;
|
||||||
case 13: *input_r = &m_lod_frac; *input_g = &m_lod_frac; *input_b = &m_lod_frac; break;
|
case 13: *input_r = &m_lod_frac; *input_g = &m_lod_frac; *input_b = &m_lod_frac; break;
|
||||||
case 14: *input_r = &m_prim_lod_frac; *input_g = &m_prim_lod_frac; *input_b = &m_prim_lod_frac; break;
|
case 14: *input_r = &m_prim_lod_frac; *input_g = &m_prim_lod_frac; *input_b = &m_prim_lod_frac; break;
|
||||||
case 15: *input_r = (UINT8*)&m_k5; *input_g = (UINT8*)&m_k5; *input_b = (UINT8*)&m_k5; break;
|
case 15: *input_r = (UINT8*)&m_k5; *input_g = (UINT8*)&m_k5; *input_b = (UINT8*)&m_k5; break;
|
||||||
case 16: case 17: case 18: case 19: case 20: case 21: case 22: case 23:
|
case 16: case 17: case 18: case 19: case 20: case 21: case 22: case 23:
|
||||||
case 24: case 25: case 26: case 27: case 28: case 29: case 30: case 31:
|
case 24: case 25: case 26: case 27: case 28: case 29: case 30: case 31:
|
||||||
@ -1984,10 +1984,10 @@ void N64::RDP::Processor::CmdLoadBlock(UINT32 w1, UINT32 w2)
|
|||||||
|
|
||||||
switch (m_misc_state.m_ti_size) // slindwords Neededby Vigilante 8
|
switch (m_misc_state.m_ti_size) // slindwords Neededby Vigilante 8
|
||||||
{
|
{
|
||||||
case PIXEL_SIZE_4BIT: ti_width2 >>= 1; slindwords >>= 3; width >>= 1; break;
|
case PIXEL_SIZE_4BIT: ti_width2 >>= 1; slindwords >>= 3; width >>= 1; break;
|
||||||
case PIXEL_SIZE_8BIT: slindwords >>= 2; break;
|
case PIXEL_SIZE_8BIT: slindwords >>= 2; break;
|
||||||
case PIXEL_SIZE_16BIT: ti_width2 <<= 1; slindwords >>= 1; width <<= 1; break;
|
case PIXEL_SIZE_16BIT: ti_width2 <<= 1; slindwords >>= 1; width <<= 1; break;
|
||||||
case PIXEL_SIZE_32BIT: ti_width2 <<= 2; width <<= 2; break;
|
case PIXEL_SIZE_32BIT: ti_width2 <<= 2; width <<= 2; break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((tb + (width >> 2)) > 0x400)
|
if ((tb + (width >> 2)) > 0x400)
|
||||||
|
@ -347,12 +347,12 @@ class Processor
|
|||||||
|
|
||||||
~Processor() { }
|
~Processor() { }
|
||||||
|
|
||||||
void Dasm(char *buffer);
|
void Dasm(char *buffer);
|
||||||
|
|
||||||
void ProcessList();
|
void ProcessList();
|
||||||
UINT32 ReadData(UINT32 address);
|
UINT32 ReadData(UINT32 address);
|
||||||
|
|
||||||
void InitInternalState()
|
void InitInternalState()
|
||||||
{
|
{
|
||||||
if(m_machine)
|
if(m_machine)
|
||||||
{
|
{
|
||||||
@ -449,12 +449,12 @@ class Processor
|
|||||||
void SetPrimLODFrac(UINT8 prim_lod_frac) { m_prim_lod_frac = prim_lod_frac; }
|
void SetPrimLODFrac(UINT8 prim_lod_frac) { m_prim_lod_frac = prim_lod_frac; }
|
||||||
|
|
||||||
// Color Combiner
|
// Color Combiner
|
||||||
void SetSubAInputRGB(UINT8 **input_r, UINT8 **input_g, UINT8 **input_b, int code);
|
void SetSubAInputRGB(UINT8 **input_r, UINT8 **input_g, UINT8 **input_b, int code);
|
||||||
void SetSubBInputRGB(UINT8 **input_r, UINT8 **input_g, UINT8 **input_b, int code);
|
void SetSubBInputRGB(UINT8 **input_r, UINT8 **input_g, UINT8 **input_b, int code);
|
||||||
void SetMulInputRGB(UINT8 **input_r, UINT8 **input_g, UINT8 **input_b, int code);
|
void SetMulInputRGB(UINT8 **input_r, UINT8 **input_g, UINT8 **input_b, int code);
|
||||||
void SetAddInputRGB(UINT8 **input_r, UINT8 **input_g, UINT8 **input_b, int code);
|
void SetAddInputRGB(UINT8 **input_r, UINT8 **input_g, UINT8 **input_b, int code);
|
||||||
void SetSubInputAlpha(UINT8 **input, int code);
|
void SetSubInputAlpha(UINT8 **input, int code);
|
||||||
void SetMulInputAlpha(UINT8 **input, int code);
|
void SetMulInputAlpha(UINT8 **input, int code);
|
||||||
|
|
||||||
// Texture memory
|
// Texture memory
|
||||||
UINT8* GetTMEM() { return m_tmem; }
|
UINT8* GetTMEM() { return m_tmem; }
|
||||||
@ -480,13 +480,13 @@ class Processor
|
|||||||
INT32* GetK5() { return &m_k5; }
|
INT32* GetK5() { return &m_k5; }
|
||||||
|
|
||||||
// Blender-related (move into RDP::Blender)
|
// Blender-related (move into RDP::Blender)
|
||||||
void SetBlenderInput(int cycle, int which, UINT8 **input_r, UINT8 **input_g, UINT8 **input_b, UINT8 **input_a, int a, int b);
|
void SetBlenderInput(int cycle, int which, UINT8 **input_r, UINT8 **input_g, UINT8 **input_b, UINT8 **input_a, int a, int b);
|
||||||
|
|
||||||
// Render-related (move into eventual drawing-related classes?)
|
// Render-related (move into eventual drawing-related classes?)
|
||||||
Rectangle* GetScissor() { return &m_scissor; }
|
Rectangle* GetScissor() { return &m_scissor; }
|
||||||
void TCDiv(INT32 ss, INT32 st, INT32 sw, INT32* sss, INT32* sst);
|
void TCDiv(INT32 ss, INT32 st, INT32 sw, INT32* sss, INT32* sst);
|
||||||
UINT32 GetLog2(UINT32 lod_clamp);
|
UINT32 GetLog2(UINT32 lod_clamp);
|
||||||
void RenderSpans(int start, int end, int tilenum, bool shade, bool texture, bool zbuffer, bool flip);
|
void RenderSpans(int start, int end, int tilenum, bool shade, bool texture, bool zbuffer, bool flip);
|
||||||
UINT8* GetHiddenBits() { return m_hidden_bits; }
|
UINT8* GetHiddenBits() { return m_hidden_bits; }
|
||||||
void GetAlphaCvg(UINT8 *comb_alpha);
|
void GetAlphaCvg(UINT8 *comb_alpha);
|
||||||
const UINT8* GetBayerMatrix() const { return s_bayer_matrix; }
|
const UINT8* GetBayerMatrix() const { return s_bayer_matrix; }
|
||||||
@ -496,16 +496,16 @@ class Processor
|
|||||||
UINT32 GetFillColor32() const { return m_fill_color; }
|
UINT32 GetFillColor32() const { return m_fill_color; }
|
||||||
|
|
||||||
void ZStore(UINT16* zb, UINT8* zhb, UINT32 z, UINT32 deltaz);
|
void ZStore(UINT16* zb, UINT8* zhb, UINT32 z, UINT32 deltaz);
|
||||||
UINT32 DecompressZ(UINT16 *zb);
|
UINT32 DecompressZ(UINT16 *zb);
|
||||||
UINT16 DecompressDZ(UINT16* zb, UINT8* zhb);
|
UINT16 DecompressDZ(UINT16* zb, UINT8* zhb);
|
||||||
INT32 NormalizeDZPix(INT32 sum);
|
INT32 NormalizeDZPix(INT32 sum);
|
||||||
bool ZCompare(void* fb, UINT8* hb, UINT16* zb, UINT8* zhb, UINT32 sz, UINT16 dzpix);
|
bool ZCompare(void* fb, UINT8* hb, UINT16* zb, UINT8* zhb, UINT32 sz, UINT16 dzpix);
|
||||||
|
|
||||||
// Fullscreen update-related
|
// Fullscreen update-related
|
||||||
void VideoUpdate(bitmap_t *bitmap);
|
void VideoUpdate(bitmap_t *bitmap);
|
||||||
|
|
||||||
// Commands
|
// Commands
|
||||||
void CmdInvalid(UINT32 w1, UINT32 w2);
|
void CmdInvalid(UINT32 w1, UINT32 w2);
|
||||||
void CmdNoOp(UINT32 w1, UINT32 w2);
|
void CmdNoOp(UINT32 w1, UINT32 w2);
|
||||||
void CmdTriangle(UINT32 w1, UINT32 w2);
|
void CmdTriangle(UINT32 w1, UINT32 w2);
|
||||||
void CmdTriangleZ(UINT32 w1, UINT32 w2);
|
void CmdTriangleZ(UINT32 w1, UINT32 w2);
|
||||||
@ -515,37 +515,37 @@ class Processor
|
|||||||
void CmdTriangleSZ(UINT32 w1, UINT32 w2);
|
void CmdTriangleSZ(UINT32 w1, UINT32 w2);
|
||||||
void CmdTriangleST(UINT32 w1, UINT32 w2);
|
void CmdTriangleST(UINT32 w1, UINT32 w2);
|
||||||
void CmdTriangleSTZ(UINT32 w1, UINT32 w2);
|
void CmdTriangleSTZ(UINT32 w1, UINT32 w2);
|
||||||
void CmdTexRect(UINT32 w1, UINT32 w2);
|
void CmdTexRect(UINT32 w1, UINT32 w2);
|
||||||
void CmdTexRectFlip(UINT32 w1, UINT32 w2);
|
void CmdTexRectFlip(UINT32 w1, UINT32 w2);
|
||||||
void CmdSyncLoad(UINT32 w1, UINT32 w2);
|
void CmdSyncLoad(UINT32 w1, UINT32 w2);
|
||||||
void CmdSyncPipe(UINT32 w1, UINT32 w2);
|
void CmdSyncPipe(UINT32 w1, UINT32 w2);
|
||||||
void CmdSyncTile(UINT32 w1, UINT32 w2);
|
void CmdSyncTile(UINT32 w1, UINT32 w2);
|
||||||
void CmdSyncFull(UINT32 w1, UINT32 w2);
|
void CmdSyncFull(UINT32 w1, UINT32 w2);
|
||||||
void CmdSetKeyGB(UINT32 w1, UINT32 w2);
|
void CmdSetKeyGB(UINT32 w1, UINT32 w2);
|
||||||
void CmdSetKeyR(UINT32 w1, UINT32 w2);
|
void CmdSetKeyR(UINT32 w1, UINT32 w2);
|
||||||
void CmdSetFillColor32(UINT32 w1, UINT32 w2);
|
void CmdSetFillColor32(UINT32 w1, UINT32 w2);
|
||||||
void CmdSetConvert(UINT32 w1, UINT32 w2);
|
void CmdSetConvert(UINT32 w1, UINT32 w2);
|
||||||
void CmdSetScissor(UINT32 w1, UINT32 w2);
|
void CmdSetScissor(UINT32 w1, UINT32 w2);
|
||||||
void CmdSetPrimDepth(UINT32 w1, UINT32 w2);
|
void CmdSetPrimDepth(UINT32 w1, UINT32 w2);
|
||||||
void CmdSetOtherModes(UINT32 w1, UINT32 w2);
|
void CmdSetOtherModes(UINT32 w1, UINT32 w2);
|
||||||
void CmdLoadTLUT(UINT32 w1, UINT32 w2);
|
void CmdLoadTLUT(UINT32 w1, UINT32 w2);
|
||||||
void CmdSetTileSize(UINT32 w1, UINT32 w2);
|
void CmdSetTileSize(UINT32 w1, UINT32 w2);
|
||||||
void CmdLoadBlock(UINT32 w1, UINT32 w2);
|
void CmdLoadBlock(UINT32 w1, UINT32 w2);
|
||||||
void CmdLoadTile(UINT32 w1, UINT32 w2);
|
void CmdLoadTile(UINT32 w1, UINT32 w2);
|
||||||
void CmdFillRect(UINT32 w1, UINT32 w2);
|
void CmdFillRect(UINT32 w1, UINT32 w2);
|
||||||
void CmdSetTile(UINT32 w1, UINT32 w2);
|
void CmdSetTile(UINT32 w1, UINT32 w2);
|
||||||
void CmdSetFogColor(UINT32 w1, UINT32 w2);
|
void CmdSetFogColor(UINT32 w1, UINT32 w2);
|
||||||
void CmdSetBlendColor(UINT32 w1, UINT32 w2);
|
void CmdSetBlendColor(UINT32 w1, UINT32 w2);
|
||||||
void CmdSetPrimColor(UINT32 w1, UINT32 w2);
|
void CmdSetPrimColor(UINT32 w1, UINT32 w2);
|
||||||
void CmdSetEnvColor(UINT32 w1, UINT32 w2);
|
void CmdSetEnvColor(UINT32 w1, UINT32 w2);
|
||||||
void CmdSetCombine(UINT32 w1, UINT32 w2);
|
void CmdSetCombine(UINT32 w1, UINT32 w2);
|
||||||
void CmdSetTextureImage(UINT32 w1, UINT32 w2);
|
void CmdSetTextureImage(UINT32 w1, UINT32 w2);
|
||||||
void CmdSetMaskImage(UINT32 w1, UINT32 w2);
|
void CmdSetMaskImage(UINT32 w1, UINT32 w2);
|
||||||
void CmdSetColorImage(UINT32 w1, UINT32 w2);
|
void CmdSetColorImage(UINT32 w1, UINT32 w2);
|
||||||
|
|
||||||
void Triangle(bool shade, bool texture, bool zbuffer);
|
void Triangle(bool shade, bool texture, bool zbuffer);
|
||||||
UINT32 AddRightCvg(UINT32 x, UINT32 k);
|
UINT32 AddRightCvg(UINT32 x, UINT32 k);
|
||||||
UINT32 AddLeftCvg(UINT32 x, UINT32 k);
|
UINT32 AddLeftCvg(UINT32 x, UINT32 k);
|
||||||
|
|
||||||
UINT32* GetCommandData() { return m_cmd_data; }
|
UINT32* GetCommandData() { return m_cmd_data; }
|
||||||
|
|
||||||
@ -554,15 +554,15 @@ class Processor
|
|||||||
Framebuffer m_framebuffer;
|
Framebuffer m_framebuffer;
|
||||||
TexturePipe m_tex_pipe;
|
TexturePipe m_tex_pipe;
|
||||||
|
|
||||||
OtherModes m_other_modes;
|
OtherModes m_other_modes;
|
||||||
MiscState m_misc_state;
|
MiscState m_misc_state;
|
||||||
ColorInputs m_color_inputs;
|
ColorInputs m_color_inputs;
|
||||||
CombineModes m_combine;
|
CombineModes m_combine;
|
||||||
|
|
||||||
Color m_pixel_color;
|
Color m_pixel_color;
|
||||||
Color m_inv_pixel_color;
|
Color m_inv_pixel_color;
|
||||||
Color m_blended_pixel_color;
|
Color m_blended_pixel_color;
|
||||||
Color m_memory_color;
|
Color m_memory_color;
|
||||||
Color m_blend_color;
|
Color m_blend_color;
|
||||||
|
|
||||||
Color m_prim_color;
|
Color m_prim_color;
|
||||||
@ -577,14 +577,14 @@ class Processor
|
|||||||
UINT8 m_lod_frac;
|
UINT8 m_lod_frac;
|
||||||
UINT8 m_prim_lod_frac;
|
UINT8 m_prim_lod_frac;
|
||||||
|
|
||||||
Color m_one_color;
|
Color m_one_color;
|
||||||
Color m_zero_color;
|
Color m_zero_color;
|
||||||
|
|
||||||
UINT32 m_fill_color;
|
UINT32 m_fill_color;
|
||||||
|
|
||||||
UINT16 m_cc_lut1[(1<<24)];
|
UINT16 m_cc_lut1[(1<<24)];
|
||||||
UINT8 m_cc_lut2[(1<<24)];
|
UINT8 m_cc_lut2[(1<<24)];
|
||||||
UINT32 m_rgb16_to_rgb32_lut[(1 << 16)];
|
UINT32 m_rgb16_to_rgb32_lut[(1 << 16)];
|
||||||
UINT32 m_ia8_to_rgb32_lut[(1 << 16)];
|
UINT32 m_ia8_to_rgb32_lut[(1 << 16)];
|
||||||
|
|
||||||
UINT32 m_cmd_data[0x1000];
|
UINT32 m_cmd_data[0x1000];
|
||||||
|
@ -75,7 +75,7 @@ WRITE16_HANDLER( opwolf_spritectrl_w )
|
|||||||
/* other bits unknown */
|
/* other bits unknown */
|
||||||
|
|
||||||
pc090oj_set_sprite_ctrl(state->pc090oj, (data & 0xe0) >> 5);
|
pc090oj_set_sprite_ctrl(state->pc090oj, (data & 0xe0) >> 5);
|
||||||
|
|
||||||
/* If data = 4, the Piston Motor is off, otherwise it's on. */
|
/* If data = 4, the Piston Motor is off, otherwise it's on. */
|
||||||
if (data == 4)
|
if (data == 4)
|
||||||
{
|
{
|
||||||
|
@ -32,20 +32,20 @@ class Blender
|
|||||||
MiscState* m_misc_state;
|
MiscState* m_misc_state;
|
||||||
Processor* m_rdp;
|
Processor* m_rdp;
|
||||||
|
|
||||||
bool Blend16Bit(UINT16* fb, UINT8* hb, RDP::Color c1, RDP::Color c2, int dith);
|
bool Blend16Bit(UINT16* fb, UINT8* hb, RDP::Color c1, RDP::Color c2, int dith);
|
||||||
bool Blend16Bit1Cycle(UINT16* fb, UINT8* hb, RDP::Color c, int dith);
|
bool Blend16Bit1Cycle(UINT16* fb, UINT8* hb, RDP::Color c, int dith);
|
||||||
bool Blend16Bit2Cycle(UINT16* fb, UINT8* hb, RDP::Color c1, RDP::Color c2, int dith);
|
bool Blend16Bit2Cycle(UINT16* fb, UINT8* hb, RDP::Color c1, RDP::Color c2, int dith);
|
||||||
bool Blend32Bit(UINT32* fb, RDP::Color c1, RDP::Color c2);
|
bool Blend32Bit(UINT32* fb, RDP::Color c1, RDP::Color c2);
|
||||||
bool Blend32Bit1Cycle(UINT32* fb, RDP::Color c);
|
bool Blend32Bit1Cycle(UINT32* fb, RDP::Color c);
|
||||||
bool Blend32Bit2Cycle(UINT32* fb, RDP::Color c1, RDP::Color c2);
|
bool Blend32Bit2Cycle(UINT32* fb, RDP::Color c1, RDP::Color c2);
|
||||||
bool AlphaCompare(UINT8 alpha);
|
bool AlphaCompare(UINT8 alpha);
|
||||||
|
|
||||||
void BlendEquation0Force(INT32* r, INT32* g, INT32* b, int bsel_special);
|
void BlendEquation0Force(INT32* r, INT32* g, INT32* b, int bsel_special);
|
||||||
void BlendEquation0NoForce(INT32* r, INT32* g, INT32* b, int bsel_special);
|
void BlendEquation0NoForce(INT32* r, INT32* g, INT32* b, int bsel_special);
|
||||||
void BlendEquation1Force(INT32* r, INT32* g, INT32* b, int bsel_special);
|
void BlendEquation1Force(INT32* r, INT32* g, INT32* b, int bsel_special);
|
||||||
void BlendEquation1NoForce(INT32* r, INT32* g, INT32* b, int bsel_special);
|
void BlendEquation1NoForce(INT32* r, INT32* g, INT32* b, int bsel_special);
|
||||||
|
|
||||||
void DitherRGB(INT32* r, INT32* g, INT32* b, int dith);
|
void DitherRGB(INT32* r, INT32* g, INT32* b, int dith);
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace RDP
|
} // namespace RDP
|
||||||
|
@ -36,9 +36,9 @@ class Rectangle
|
|||||||
UINT16 m_yh; // 10.2 fixed-point
|
UINT16 m_yh; // 10.2 fixed-point
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void Draw1Cycle();
|
void Draw1Cycle();
|
||||||
void Draw2Cycle();
|
void Draw2Cycle();
|
||||||
void DrawFill();
|
void DrawFill();
|
||||||
|
|
||||||
running_machine* m_machine;
|
running_machine* m_machine;
|
||||||
Processor* m_rdp;
|
Processor* m_rdp;
|
||||||
|
@ -8,7 +8,7 @@ namespace N64
|
|||||||
namespace RDP
|
namespace RDP
|
||||||
{
|
{
|
||||||
|
|
||||||
#define RELATIVE(x, y) ((((x) >> 3) - (y)) << 3) | (x & 7);
|
#define RELATIVE(x, y) ((((x) >> 3) - (y)) << 3) | (x & 7);
|
||||||
|
|
||||||
void TexturePipe::SetMachine(running_machine *machine)
|
void TexturePipe::SetMachine(running_machine *machine)
|
||||||
{
|
{
|
||||||
|
@ -28,24 +28,24 @@ class TexturePipe
|
|||||||
}
|
}
|
||||||
|
|
||||||
UINT32 Fetch(INT32 SSS, INT32 SST, Tile* tile);
|
UINT32 Fetch(INT32 SSS, INT32 SST, Tile* tile);
|
||||||
void CalculateClampDiffs(UINT32 prim_tile);
|
void CalculateClampDiffs(UINT32 prim_tile);
|
||||||
|
|
||||||
void SetMachine(running_machine* machine);
|
void SetMachine(running_machine* machine);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void Mask(INT32* S, INT32* T, Tile* tile);
|
void Mask(INT32* S, INT32* T, Tile* tile);
|
||||||
void TexShift(INT32* S, INT32* T, bool* maxs, bool* maxt, Tile *tile);
|
void TexShift(INT32* S, INT32* T, bool* maxs, bool* maxt, Tile *tile);
|
||||||
void Clamp(INT32* S, INT32* T, INT32* SFRAC, INT32* TFRAC, bool maxs, bool maxt, Tile* tile);
|
void Clamp(INT32* S, INT32* T, INT32* SFRAC, INT32* TFRAC, bool maxs, bool maxt, Tile* tile);
|
||||||
void ClampLight(INT32* S, INT32* T, bool maxs, bool maxt, Tile* tile);
|
void ClampLight(INT32* S, INT32* T, bool maxs, bool maxt, Tile* tile);
|
||||||
|
|
||||||
running_machine* m_machine;
|
running_machine* m_machine;
|
||||||
OtherModes* m_other_modes;
|
OtherModes* m_other_modes;
|
||||||
Processor* m_rdp;
|
Processor* m_rdp;
|
||||||
TexFetch m_tex_fetch;
|
TexFetch m_tex_fetch;
|
||||||
|
|
||||||
INT32 m_maskbits_table[16];
|
INT32 m_maskbits_table[16];
|
||||||
INT32 m_clamp_t_diff[8];
|
INT32 m_clamp_t_diff[8];
|
||||||
INT32 m_clamp_s_diff[8];
|
INT32 m_clamp_s_diff[8];
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace RDP
|
} // namespace RDP
|
||||||
|
@ -41,8 +41,8 @@ class TexRectangle
|
|||||||
int m_flip;
|
int m_flip;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void DrawDefault();
|
void DrawDefault();
|
||||||
void DrawCopy();
|
void DrawCopy();
|
||||||
|
|
||||||
running_machine* m_machine;
|
running_machine* m_machine;
|
||||||
Processor* m_rdp;
|
Processor* m_rdp;
|
||||||
|
@ -157,7 +157,7 @@ INLINE UINT16 snes_get_bgcolor( UINT8 direct_colors, UINT16 palette, UINT8 color
|
|||||||
* snes_set_scanline_pixel()
|
* snes_set_scanline_pixel()
|
||||||
*
|
*
|
||||||
* Store pixel color, priority, layer and
|
* Store pixel color, priority, layer and
|
||||||
* color math exception (for OAM) in the
|
* color math exception (for OAM) in the
|
||||||
* proper scanline
|
* proper scanline
|
||||||
*****************************************/
|
*****************************************/
|
||||||
|
|
||||||
@ -188,7 +188,7 @@ INLINE void snes_set_scanline_pixel( int screen, INT16 x, UINT16 color, UINT8 pr
|
|||||||
* copy it to the scanline buffer when
|
* copy it to the scanline buffer when
|
||||||
* appropriate. The actual way to perform
|
* appropriate. The actual way to perform
|
||||||
* such operations depends on the source
|
* such operations depends on the source
|
||||||
* (BG or OAM) and on the resolution (hires
|
* (BG or OAM) and on the resolution (hires
|
||||||
* or lores)
|
* or lores)
|
||||||
*****************************************/
|
*****************************************/
|
||||||
|
|
||||||
@ -341,7 +341,7 @@ INLINE void snes_draw_tile( UINT8 planes, UINT8 layer, UINT32 tileaddr, INT16 x,
|
|||||||
snes_draw_oamtile(ii, colour, pal, priority);
|
snes_draw_oamtile(ii, colour, pal, priority);
|
||||||
else if (!hires)
|
else if (!hires)
|
||||||
{
|
{
|
||||||
if (mosaic)
|
if (mosaic)
|
||||||
{
|
{
|
||||||
for (x_mos = 0; x_mos < (snes_ppu.mosaic_size + 1); x_mos++)
|
for (x_mos = 0; x_mos < (snes_ppu.mosaic_size + 1); x_mos++)
|
||||||
snes_draw_bgtile_lores(layer, ii + x_mos, colour, pal, direct_colors, priority);
|
snes_draw_bgtile_lores(layer, ii + x_mos, colour, pal, direct_colors, priority);
|
||||||
@ -352,7 +352,7 @@ INLINE void snes_draw_tile( UINT8 planes, UINT8 layer, UINT32 tileaddr, INT16 x,
|
|||||||
}
|
}
|
||||||
else /* hires */
|
else /* hires */
|
||||||
{
|
{
|
||||||
if (mosaic)
|
if (mosaic)
|
||||||
{
|
{
|
||||||
for (x_mos = 0; x_mos < (snes_ppu.mosaic_size + 1); x_mos++)
|
for (x_mos = 0; x_mos < (snes_ppu.mosaic_size + 1); x_mos++)
|
||||||
snes_draw_bgtile_hires(layer, ii + x_mos, colour, pal, direct_colors, priority);
|
snes_draw_bgtile_hires(layer, ii + x_mos, colour, pal, direct_colors, priority);
|
||||||
@ -748,7 +748,7 @@ static void snes_update_line_mode7( UINT16 curline, UINT8 layer, UINT8 priority_
|
|||||||
if (scanlines[screen].priority[xpos] <= priority && clr > 0)
|
if (scanlines[screen].priority[xpos] <= priority && clr > 0)
|
||||||
{
|
{
|
||||||
/* Direct select, but only outside EXTBG! */
|
/* Direct select, but only outside EXTBG! */
|
||||||
// Direct color format is: 0 | BB000 | GGG00 | RRR00, HW confirms that the data is zero padded.
|
// Direct color format is: 0 | BB000 | GGG00 | RRR00, HW confirms that the data is zero padded.
|
||||||
// In other words, like normal direct color, with pal = 0
|
// In other words, like normal direct color, with pal = 0
|
||||||
c = snes_get_bgcolor(snes_ppu.direct_color && layer == SNES_BG1, 0, clr);
|
c = snes_get_bgcolor(snes_ppu.direct_color && layer == SNES_BG1, 0, clr);
|
||||||
snes_set_scanline_pixel(screen, xpos, c, priority, layer, 0);
|
snes_set_scanline_pixel(screen, xpos, c, priority, layer, 0);
|
||||||
@ -1726,13 +1726,13 @@ static void snes_dynamic_res_change( running_machine *machine )
|
|||||||
|
|
||||||
SNES VRAM accesses:
|
SNES VRAM accesses:
|
||||||
|
|
||||||
VRAM accesses during active display are invalid.
|
VRAM accesses during active display are invalid.
|
||||||
Unlike OAM and CGRAM, they will not be written
|
Unlike OAM and CGRAM, they will not be written
|
||||||
anywhere at all. Thanks to byuu's researches,
|
anywhere at all. Thanks to byuu's researches,
|
||||||
the ranges where writes are invalid have been
|
the ranges where writes are invalid have been
|
||||||
validated on hardware, as has the edge case where
|
validated on hardware, as has the edge case where
|
||||||
the S-CPU open bus can be written if the write
|
the S-CPU open bus can be written if the write
|
||||||
occurs during the very last clock cycle of
|
occurs during the very last clock cycle of
|
||||||
vblank.
|
vblank.
|
||||||
Our implementation could be not 100% accurate
|
Our implementation could be not 100% accurate
|
||||||
when interlace is active.
|
when interlace is active.
|
||||||
@ -1755,7 +1755,7 @@ INLINE UINT32 snes_get_vram_address( running_machine *machine )
|
|||||||
|
|
||||||
static READ8_HANDLER( snes_vram_read )
|
static READ8_HANDLER( snes_vram_read )
|
||||||
{
|
{
|
||||||
UINT8 res = 0;
|
UINT8 res = 0;
|
||||||
offset &= 0x1ffff;
|
offset &= 0x1ffff;
|
||||||
|
|
||||||
if (snes_ppu.screen_disabled)
|
if (snes_ppu.screen_disabled)
|
||||||
@ -1769,18 +1769,18 @@ static READ8_HANDLER( snes_vram_read )
|
|||||||
if (snes_ppu.interlace == 2)
|
if (snes_ppu.interlace == 2)
|
||||||
ls++;
|
ls++;
|
||||||
|
|
||||||
if (v == ls && h == 1362)
|
if (v == ls && h == 1362)
|
||||||
res = 0;
|
res = 0;
|
||||||
else if (v < snes_ppu.beam.last_visible_line - 1)
|
else if (v < snes_ppu.beam.last_visible_line - 1)
|
||||||
res = 0;
|
res = 0;
|
||||||
else if (v == snes_ppu.beam.last_visible_line - 1)
|
else if (v == snes_ppu.beam.last_visible_line - 1)
|
||||||
{
|
{
|
||||||
if (h == 1362)
|
if (h == 1362)
|
||||||
res = snes_vram[offset];
|
res = snes_vram[offset];
|
||||||
else
|
else
|
||||||
res = 0;
|
res = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
res = snes_vram[offset];
|
res = snes_vram[offset];
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
@ -1796,31 +1796,31 @@ static WRITE8_HANDLER( snes_vram_write )
|
|||||||
{
|
{
|
||||||
UINT16 v = video_screen_get_vpos(space->machine->primary_screen);
|
UINT16 v = video_screen_get_vpos(space->machine->primary_screen);
|
||||||
UINT16 h = video_screen_get_hpos(space->machine->primary_screen);
|
UINT16 h = video_screen_get_hpos(space->machine->primary_screen);
|
||||||
if (v == 0)
|
if (v == 0)
|
||||||
{
|
{
|
||||||
if (h <= 4)
|
if (h <= 4)
|
||||||
snes_vram[offset] = data;
|
snes_vram[offset] = data;
|
||||||
else if (h == 6)
|
else if (h == 6)
|
||||||
snes_vram[offset] = snes_open_bus_r(space, 0);
|
snes_vram[offset] = snes_open_bus_r(space, 0);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//no write
|
//no write
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (v < snes_ppu.beam.last_visible_line)
|
else if (v < snes_ppu.beam.last_visible_line)
|
||||||
{
|
{
|
||||||
//no write
|
//no write
|
||||||
}
|
}
|
||||||
else if (v == snes_ppu.beam.last_visible_line)
|
else if (v == snes_ppu.beam.last_visible_line)
|
||||||
{
|
{
|
||||||
if (h <= 4)
|
if (h <= 4)
|
||||||
{
|
{
|
||||||
//no write
|
//no write
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
snes_vram[offset] = data;
|
snes_vram[offset] = data;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
snes_vram[offset] = data;
|
snes_vram[offset] = data;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1830,17 +1830,17 @@ static WRITE8_HANDLER( snes_vram_write )
|
|||||||
SNES OAM accesses:
|
SNES OAM accesses:
|
||||||
|
|
||||||
OAM accesses during active display are allowed.
|
OAM accesses during active display are allowed.
|
||||||
The actual address varies during rendering, as the
|
The actual address varies during rendering, as the
|
||||||
PPU reads in data itself for processing.
|
PPU reads in data itself for processing.
|
||||||
Unfortunately, no one has been able (yet) to
|
Unfortunately, no one has been able (yet) to
|
||||||
determine how this works. The only known game to
|
determine how this works. The only known game to
|
||||||
actually access OAM during active display is
|
actually access OAM during active display is
|
||||||
Uniracers and it expects accesses to map to
|
Uniracers and it expects accesses to map to
|
||||||
offset 0x0218. Hence, following byuu's choice
|
offset 0x0218. Hence, following byuu's choice
|
||||||
we rerouted OAM accesses during active display
|
we rerouted OAM accesses during active display
|
||||||
to 0x0218 (0x010c in our snes_oam).
|
to 0x0218 (0x010c in our snes_oam).
|
||||||
This is a hack, but it is more accurate than
|
This is a hack, but it is more accurate than
|
||||||
writing to the 'expected' address set by
|
writing to the 'expected' address set by
|
||||||
$2102,$2103.
|
$2102,$2103.
|
||||||
|
|
||||||
Notice that, since snes_ram[OAMDATA] is never
|
Notice that, since snes_ram[OAMDATA] is never
|
||||||
@ -1859,7 +1859,7 @@ static READ8_HANDLER( snes_oam_read )
|
|||||||
{
|
{
|
||||||
UINT16 v = video_screen_get_vpos(space->machine->primary_screen);
|
UINT16 v = video_screen_get_vpos(space->machine->primary_screen);
|
||||||
|
|
||||||
if (v < snes_ppu.beam.last_visible_line)
|
if (v < snes_ppu.beam.last_visible_line)
|
||||||
offset = 0x010c;
|
offset = 0x010c;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1877,7 +1877,7 @@ static WRITE8_HANDLER( snes_oam_write )
|
|||||||
{
|
{
|
||||||
UINT16 v = video_screen_get_vpos(space->machine->primary_screen);
|
UINT16 v = video_screen_get_vpos(space->machine->primary_screen);
|
||||||
|
|
||||||
if (v < snes_ppu.beam.last_visible_line)
|
if (v < snes_ppu.beam.last_visible_line)
|
||||||
offset = 0x010c;
|
offset = 0x010c;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1889,28 +1889,28 @@ static WRITE8_HANDLER( snes_oam_write )
|
|||||||
|
|
||||||
/*************************************************
|
/*************************************************
|
||||||
|
|
||||||
SNES CGRAM accesses:
|
SNES CGRAM accesses:
|
||||||
|
|
||||||
CGRAM writes during hblank are valid. During
|
CGRAM writes during hblank are valid. During
|
||||||
active display, the actual address the data
|
active display, the actual address the data
|
||||||
is written to varies, as the PPU itself changes
|
is written to varies, as the PPU itself changes
|
||||||
the address. Like OAM, it is not known the exact
|
the address. Like OAM, it is not known the exact
|
||||||
algorithm used, but no commercial software seems
|
algorithm used, but no commercial software seems
|
||||||
to attempt this. While byuu, in his emu, maps
|
to attempt this. While byuu, in his emu, maps
|
||||||
those accesses to 0x01ff, because it is more
|
those accesses to 0x01ff, because it is more
|
||||||
accurate to invalidate the 'expected' address
|
accurate to invalidate the 'expected' address
|
||||||
than not, MESS has issues if we don't write to
|
than not, MESS has issues if we don't write to
|
||||||
the expected address (see e.g. Tokimeki Memorial).
|
the expected address (see e.g. Tokimeki Memorial).
|
||||||
This is because writes should work during hblank
|
This is because writes should work during hblank
|
||||||
(so that the game can produce color fading), but
|
(so that the game can produce color fading), but
|
||||||
ends up not working with the conditions below.
|
ends up not working with the conditions below.
|
||||||
Hence, for the moment, we only document the
|
Hence, for the moment, we only document the
|
||||||
solution adopted by BSNES without enabling it.
|
solution adopted by BSNES without enabling it.
|
||||||
*************************************************/
|
*************************************************/
|
||||||
|
|
||||||
static READ8_HANDLER( snes_cgram_read )
|
static READ8_HANDLER( snes_cgram_read )
|
||||||
{
|
{
|
||||||
UINT8 res = 0;
|
UINT8 res = 0;
|
||||||
offset &= 0x1ff;
|
offset &= 0x1ff;
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
@ -1919,14 +1919,14 @@ static READ8_HANDLER( snes_cgram_read )
|
|||||||
UINT16 v = video_screen_get_vpos(space->machine->primary_screen);
|
UINT16 v = video_screen_get_vpos(space->machine->primary_screen);
|
||||||
UINT16 h = video_screen_get_hpos(space->machine->primary_screen);
|
UINT16 h = video_screen_get_hpos(space->machine->primary_screen);
|
||||||
|
|
||||||
if (v < snes_ppu.beam.last_visible_line && h >= 128 && h < 1096)
|
if (v < snes_ppu.beam.last_visible_line && h >= 128 && h < 1096)
|
||||||
offset = 0x1ff;
|
offset = 0x1ff;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
res = ((UINT8 *)snes_cgram)[offset];
|
res = ((UINT8 *)snes_cgram)[offset];
|
||||||
|
|
||||||
// CGRAM palette data format is 15-bits (0,bbbbb,ggggg,rrrrr).
|
// CGRAM palette data format is 15-bits (0,bbbbb,ggggg,rrrrr).
|
||||||
// Highest bit is simply ignored.
|
// Highest bit is simply ignored.
|
||||||
if (offset & 0x01)
|
if (offset & 0x01)
|
||||||
res &= 0x7f;
|
res &= 0x7f;
|
||||||
@ -1947,12 +1947,12 @@ static WRITE8_HANDLER( snes_cgram_write )
|
|||||||
UINT16 v = video_screen_get_vpos(space->machine->primary_screen);
|
UINT16 v = video_screen_get_vpos(space->machine->primary_screen);
|
||||||
UINT16 h = video_screen_get_hpos(space->machine->primary_screen);
|
UINT16 h = video_screen_get_hpos(space->machine->primary_screen);
|
||||||
|
|
||||||
if (v < snes_ppu.beam.last_visible_line && h >= 128 && h < 1096)
|
if (v < snes_ppu.beam.last_visible_line && h >= 128 && h < 1096)
|
||||||
offset = 0x1ff;
|
offset = 0x1ff;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// CGRAM palette data format is 15-bits (0,bbbbb,ggggg,rrrrr).
|
// CGRAM palette data format is 15-bits (0,bbbbb,ggggg,rrrrr).
|
||||||
// Highest bit is simply ignored.
|
// Highest bit is simply ignored.
|
||||||
if (offset & 0x01)
|
if (offset & 0x01)
|
||||||
data &= 0x7f;
|
data &= 0x7f;
|
||||||
@ -2152,7 +2152,7 @@ WRITE8_HANDLER( snes_ppu_write )
|
|||||||
snes_ppu.oam.write_latch = data;
|
snes_ppu.oam.write_latch = data;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// in this case, we not only write data to the upper byte of the word,
|
// in this case, we not only write data to the upper byte of the word,
|
||||||
// but also snes_ppu.oam.write_latch to the lower byte (recall that
|
// but also snes_ppu.oam.write_latch to the lower byte (recall that
|
||||||
// snes_ram[OAMDATA] is used to select high/low byte)
|
// snes_ram[OAMDATA] is used to select high/low byte)
|
||||||
snes_oam_write(space, snes_ppu.oam.address, data);
|
snes_oam_write(space, snes_ppu.oam.address, data);
|
||||||
|
@ -10,4 +10,4 @@
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
extern const char build_version[];
|
extern const char build_version[];
|
||||||
const char build_version[] = "0.137u1 ("__DATE__")";
|
const char build_version[] = "0.137u2 ("__DATE__")";
|
||||||
|
Loading…
Reference in New Issue
Block a user