Spacing fixes and a version bump to 0.122u3.

This commit is contained in:
Aaron Giles 2008-01-03 16:11:57 +00:00
parent a893708c3d
commit f97d37b7e0
18 changed files with 190 additions and 190 deletions

View File

@ -2,44 +2,44 @@
xtal.h
Documentation and consistent naming for known existing crystals.
Documentation and consistent naming for known existing crystals.
Copyright (c) 1996-2007, Nicola Salmoria and the MAME Team.
Visit http://mamedev.org for licensing and usage restrictions.
***************************************************************************
PCB Crystal Reference
----------------------
_____ ________
|16 | |o |
|MHZ| |16.0MHZ |
|___| |________|
| |
PCB Crystal Reference
----------------------
_____ ________
|16 | |o |
|MHZ| |16.0MHZ |
|___| |________|
| |
There is a finite list of _manufactured_ crystals. This file aims
to document all of the known speeds that crystals were available in.
Feel free to add to the list if you find another speed crystal on
a PCB, but please DON'T GUESS!
Remember that some very high frequencies (typically above 100MHz) are
generated by a frequency multiplying IC from a lower frequency
crystal.
This is intended as a reference of existing parts to prevent incorrect
clock speed measurements with digital frequency counters being used
in drivers. When measuring clocks, remember that most parts have a
tolerance so be sure to reference existing parts only and not just
accept direct readings as 100% true.
(Thanks to Guru for starting this documentation.)
There is a finite list of _manufactured_ crystals. This file aims
to document all of the known speeds that crystals were available in.
Feel free to add to the list if you find another speed crystal on
a PCB, but please DON'T GUESS!
Remember that some very high frequencies (typically above 100MHz) are
generated by a frequency multiplying IC from a lower frequency
crystal.
This is intended as a reference of existing parts to prevent incorrect
clock speed measurements with digital frequency counters being used
in drivers. When measuring clocks, remember that most parts have a
tolerance so be sure to reference existing parts only and not just
accept direct readings as 100% true.
(Thanks to Guru for starting this documentation.)
**************************************************************************/
enum
{
/*
Name = Frequency Examples
Name = Frequency Examples
------------------ ------------ ------------------------------------------------------------ */
XTAL_32_768kHz = 327680, /* 32.768kHz, used to drive RTC chips */
XTAL_1MHz = 1000000,

View File

@ -1158,13 +1158,13 @@ void CLIB_DECL popmessage(const char *format, ...)
/* if the format is NULL, it is a signal to clear the popmessage */
if (format == NULL)
ui_popup_time(0, " ");
/* otherwise, generate the buffer and call the UI to display the message */
else
{
extern void CLIB_DECL ui_popup(const char *format, ...) ATTR_PRINTF(1,2);
va_list arg;
/* dump to the buffer */
va_start(arg, format);
vsnprintf(giant_string_buffer, GIANT_STRING_BUFFER_SIZE, format, arg);

View File

@ -870,7 +870,7 @@ void memory_set_bank(int banknum, int entrynum)
/*-------------------------------------------------
memory_get_bank - return the currently
memory_get_bank - return the currently
selected bank
-------------------------------------------------*/

View File

@ -259,14 +259,14 @@ MACHINE_DRIVER_START( mario_audio )
MDRV_CPU_ADD(I8039, I8035_CLOCK) /* audio CPU */ /* 730 kHz */
MDRV_CPU_PROGRAM_MAP(mario_sound_map, 0)
MDRV_CPU_IO_MAP(mario_sound_io_map, 0)
MDRV_SOUND_START(mario)
MDRV_SPEAKER_STANDARD_MONO("mono")
MDRV_SOUND_ADD(DAC, 0)
MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MDRV_SOUND_ADD(SAMPLES, 0)
MDRV_SOUND_CONFIG(samples_interface)
MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
@ -277,11 +277,11 @@ MACHINE_DRIVER_START( masao_audio )
MDRV_CPU_ADD(Z80,24576000/16) /* audio CPU */ /* ???? */
MDRV_CPU_PROGRAM_MAP(masao_sound_map,0)
MDRV_SOUND_START(mario)
MDRV_SPEAKER_STANDARD_MONO("mono")
MDRV_SOUND_ADD(AY8910, 14318000/6)
MDRV_SOUND_CONFIG(ay8910_interface)
MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)

View File

@ -1,19 +1,19 @@
/***************************************************************************
TODO:
- combine memory maps
- discrete sound
- combine sh_* writes into one routine
- combine memory maps
- discrete sound
- combine sh_* writes into one routine
Done:
- fixed mario0110u1gre
- rewrote driver, separate MACHINE_DRIVER(mario_audio)
- palette from schematics
- video timing from schematics
- driver configuration switch Nintendo/Std Monitor
- got rid of COLORTABLE
- clocks as defines in .h
- use XTAL_*
Done:
- fixed mario0110u1gre
- rewrote driver, separate MACHINE_DRIVER(mario_audio)
- palette from schematics
- video timing from schematics
- driver configuration switch Nintendo/Std Monitor
- got rid of COLORTABLE
- clocks as defines in .h
- use XTAL_*
Mario Bros memory map (preliminary):
@ -202,7 +202,7 @@ static INPUT_PORTS_START( mario )
PORT_CONFNAME( 0x01, 0x00, "Monitor" )
PORT_CONFSETTING( 0x00, "Nintendo" )
PORT_CONFSETTING( 0x01, "Std 15.72Khz" )
INPUT_PORTS_END
static INPUT_PORTS_START( marioo )

View File

@ -148,8 +148,8 @@ static WRITE32_HANDLER( cmos_protect_w )
/*************************************
*
* Timekeeper and ZPRAM access
* (Zeus 2 only)
* Timekeeper and ZPRAM access
* (Zeus 2 only)
*
*************************************/
@ -218,16 +218,16 @@ static READ32_HANDLER( bitlatches_r )
/* unknown purpose; two bits are apparently used */
case 1:
return bitlatch[offset] | ~3;
/* CMOS/ZPRAM extra enable latch; only low bit is used */
case 2:
return bitlatch[offset] | ~1;
/* unknown purpose; mk4/invasn/thegrid read at startup; invasn freaks if it is 1 at startup */
/* only low bit is used */
case 3:
return bitlatch[offset] | ~1;
/* ROM bank selection on Zeus 2; two bits are used */
case 5:
return bitlatch[offset] | ~3;
@ -238,7 +238,7 @@ static READ32_HANDLER( bitlatches_r )
/* this is the value reported as DISK JR ASIC version in thegrid startup test */
case 6:
return 0xa0 | ~0xff;
/* unknown purpose */
default:
logerror("%06X:bitlatches_r(%X)\n", activecpu_get_pc(), offset);
@ -260,7 +260,7 @@ static WRITE32_HANDLER( bitlatches_w )
if (oldval ^ data)
logerror("%06X:bitlatches_w(%X) = %X\n", activecpu_get_pc(), offset, data);
break;
/* unknown purpose; crusnexo toggles this between 0 and 1 every 20 frames; thegrid writes 1 */
case 0:
if (data != 0 && data != 1)
@ -276,13 +276,13 @@ static WRITE32_HANDLER( bitlatches_w )
/* CMOS/ZPRAM extra enable latch; only low bit is used */
case 2:
break;
/* unknown purpose; invasn writes 2 here at startup */
case 4:
if (data != 2)
logerror("%06X:bitlatches_w(%X) = %X (unexpected)\n", activecpu_get_pc(), offset, data);
break;
/* ROM bank selection on Zeus 2 */
case 5:
memory_set_bank(1, bitlatch[offset] & 3);
@ -326,31 +326,31 @@ static READ32_HANDLER( crusnexo_leds_r )
static WRITE32_HANDLER( crusnexo_leds_w )
{
int bit, led;
switch (offset)
{
case 0: /* unknown purpose */
break;
case 1: /* controls lamps */
for (bit = 0; bit < 8; bit++)
output_set_lamp_value(bit, (data >> bit) & 1);
break;
case 2: /* sets state of selected LEDs */
/* selection bits 4-6 select the 3 7-segment LEDs */
for (bit = 4; bit < 7; bit++)
if ((crusnexo_leds_select & (1 << bit)) == 0)
output_set_digit_value(bit, ~data & 0xff);
/* selection bits 0-2 select the tachometer LEDs */
for (bit = 0; bit < 3; bit++)
if ((crusnexo_leds_select & (1 << bit)) == 0)
for (led = 0; led < 8; led++)
output_set_led_value(bit * 8 + led, (~data >> led) & 1);
break;
case 3: /* selects which set of LEDs we are addressing */
crusnexo_leds_select = data;
break;
@ -612,40 +612,40 @@ ADDRESS_MAP_END
/*
mk4:
mk4:
writes to 9D0000: 00000009, FFFFFFFF
reads from 9D0000
writes to 9D0001: 00000000
writes to 9D0003: 00000374
writes to 9D0005: 00000000
writes to 9D0000: 00000009, FFFFFFFF
reads from 9D0000
writes to 9D0001: 00000000
writes to 9D0003: 00000374
writes to 9D0005: 00000000
crusnexo:
reads from 8A0000
writes to 9D0000: 00000000, 00000008, 00000009, FFFFFFFF
reads from 9D0000
writes to 9D0001: 00000000, 00000004, 00000204
writes to 9D0003: 00000374
-- hard coded to $374 at startup
writes to 9D0004: 0000000F
-- hard coded to $F at startup
crusnexo:
writes to 9E0008: 00000000
writes to 9E8000: 00810081
thegrid:
writes to 9D0000: 00000008, 00000009, 0000008D
writes to 9D0001: 00000000, 00000004, 00000204
writes to 9D0003: 00000354
reads from 9D0003
writes to 9D0004: FFFFFFFF
writes to 9D0005: 00000000
writes to 9E8000: 00810081
reads from 8A0000
writes to 9D0000: 00000000, 00000008, 00000009, FFFFFFFF
reads from 9D0000
writes to 9D0001: 00000000, 00000004, 00000204
writes to 9D0003: 00000374
-- hard coded to $374 at startup
writes to 9D0004: 0000000F
-- hard coded to $F at startup
writes to 9E0008: 00000000
writes to 9E8000: 00810081
thegrid:
writes to 9D0000: 00000008, 00000009, 0000008D
writes to 9D0001: 00000000, 00000004, 00000204
writes to 9D0003: 00000354
reads from 9D0003
writes to 9D0004: FFFFFFFF
writes to 9D0005: 00000000
writes to 9E8000: 00810081
*/
@ -950,7 +950,7 @@ static INPUT_PORTS_START( crusnexo )
PORT_START
PORT_BIT( 0x0007, IP_ACTIVE_HIGH, IPT_SPECIAL) PORT_CUSTOM( keypad_r, "KEYPAD" )
PORT_BIT( 0xfff8, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START_TAG("KEYPAD")
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(3) /* keypad 3 */
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(3) /* keypad 1 */

View File

@ -12,21 +12,21 @@
****************************************************************************
To do:
* Merge with Sprint 1
To do:
* Merge with Sprint 1
****************************************************************************
Stephh's notes (based on the games M6502 code and some tests) :
Stephh's notes (based on the games M6502 code and some tests) :
- Each time the game is reset, it is set to "Cavity".
I can't remember if it's the correct behaviour or not,
but the VBLANK interruption is not called in "demo mode".
- You can only select the game after 1st coin is inserted
and before you press BUTTON1 to launch the first ball,
then the VBLANK interruption is no more called.
This means that player 2 plays the same game as player 1.
- Each time the game is reset, it is set to "Cavity".
I can't remember if it's the correct behaviour or not,
but the VBLANK interruption is not called in "demo mode".
- You can only select the game after 1st coin is inserted
and before you press BUTTON1 to launch the first ball,
then the VBLANK interruption is no more called.
This means that player 2 plays the same game as player 1.
***************************************************************************/
@ -87,7 +87,7 @@ static MACHINE_START( sbrkout )
memory_set_bankptr(1, &videoram[0x380]);
scanline_timer = timer_alloc(scanline_callback, NULL);
pot_timer = timer_alloc(pot_trigger_callback, NULL);
state_save_register_global(sync2_value);
state_save_register_global_array(pot_mask);
state_save_register_global_array(pot_trigger);
@ -110,17 +110,17 @@ static MACHINE_RESET( sbrkout )
static TIMER_CALLBACK( scanline_callback )
{
int scanline = param;
/* force a partial update before anything happens */
video_screen_update_partial(0, scanline);
/* if this is a rising edge of 16V, assert the CPU interrupt */
if (scanline % 32 == 16)
cpunum_set_input_line(0, 0, ASSERT_LINE);
/* update the DAC state */
DAC_data_w(0, (videoram[0x380 + 0x11] & (scanline >> 2)) ? 255 : 0);
/* on the VBLANK, read the pot and schedule an interrupt time for it */
if (scanline == machine->screen[0].visarea.max_y + 1)
{
@ -152,7 +152,7 @@ static WRITE8_HANDLER( irq_ack_w )
static READ8_HANDLER( switches_r )
{
UINT8 result = 0xff;
/* DIP switches are selected by ADR0+ADR1 if ADR3 == 0 */
if ((offset & 0x0b) == 0x00)
result &= (readinputportbytag("DIPS") << 6) | 0x3f;
@ -174,7 +174,7 @@ static READ8_HANDLER( switches_r )
result &= readinputportbytag("SERVE");
if ((offset & 0x17) == 0x07)
result &= (readinputportbytag("SELECT") << 6) | 0x7f;
return result;
}
@ -219,9 +219,9 @@ static WRITE8_HANDLER( pot_mask2_w )
*************************************/
/*
The LEDs are turned on and off by two consecutive memory addresses. The
first address turns them off, the second address turns them on. This is
reversed for the Serve LED, which has a NOT on the signal.
The LEDs are turned on and off by two consecutive memory addresses. The
first address turns them off, the second address turns them on. This is
reversed for the Serve LED, which has a NOT on the signal.
*/
static WRITE8_HANDLER( start_1_led_w )

View File

@ -9,7 +9,7 @@ Coin inputs are handled by the sound CPU, so they don't work with sound
disabled. Use the service switch instead.
--
Mametesters bug tokiu056gre - "tokiu: "0000000" is always displayed as the top hiscore during gameplay,
Mametesters bug tokiu056gre - "tokiu: "0000000" is always displayed as the top hiscore during gameplay,
regardless of what it actually is. This does not happen in the other Toki sets."
Notes by bmcphail@vcmame.net, 1/1/2008
@ -18,8 +18,8 @@ Toki stores high score at $60008 in main ram (init code at $ADA, compared with p
Tokiu stores high score at $60010 instead (init code at $B16, equivalent compare code at $1a204), $60008
is used for different purposes in many parts of the code.
Both games feature a common routine ($1cba2 in toki, $1cbfa in tokiu) that prints the high score to screen,
the problem is that the version in Tokiu has not been adjusted for the different high score location and
Both games feature a common routine ($1cba2 in toki, $1cbfa in tokiu) that prints the high score to screen,
the problem is that the version in Tokiu has not been adjusted for the different high score location and
it reads from the $68008 location instead of $680010. From analysing the code I'm certain this is a bug
in the original USA version code and not an emulation bug.

View File

@ -4,7 +4,7 @@
/*
* From the schematics:
*
* Video generation like dkong/dkongjr. However, clock is 24MHZ
* Video generation like dkong/dkongjr. However, clock is 24MHZ
* 7C -> 100 => 256 - 124 = 132 ==> 264 Scanlines
*/

View File

@ -93,7 +93,7 @@ static const char *maple_names[] =
"5f6cb0", "5f6cb4", "5f6cb8", "5f6cbc",
"5f6cc0", "5f6cc4", "5f6cc8", "5f6ccc",
"5f6cd0", "5f6cd4", "5f6cd8", "5f6cdc",
"5f6ce0", "5f6ce4",
"5f6ce0", "5f6ce4",
"MSB select", "5f6cec", "5f6cf0",
"Txd address counter",
"Rxd address counter",
@ -141,7 +141,7 @@ READ64_HANDLER( dc_sysctrl_r )
{
int reg;
UINT64 shift;
reg = decode_reg_64(offset, mem_mask, &shift);
#if DEBUG_SYSCTRL
@ -155,7 +155,7 @@ WRITE64_HANDLER( dc_sysctrl_w )
{
int reg;
UINT64 shift;
reg = decode_reg_64(offset, mem_mask, &shift);
#if DEBUG_SYSCTRL
@ -169,7 +169,7 @@ READ64_HANDLER( dc_maple_r )
{
int reg;
UINT64 shift;
reg = decode_reg_64(offset, mem_mask, &shift);
return (UINT64)maple_regs[reg] << shift;
@ -179,7 +179,7 @@ WRITE64_HANDLER( dc_maple_w )
{
int reg;
UINT64 shift;
reg = decode_reg_64(offset, mem_mask, &shift);
#if DEBUG_MAPLE

View File

@ -701,9 +701,9 @@ READ16_HANDLER( deco16_146_funkyjet_prot_r )
return deco16_prot_ram[0x104>>1];
case 0x3a8 >> 1: /* See 93e4/9376 */
return deco16_prot_ram[0x500>>1];
// The top byte of 0x50c is used as a bitmask of completed levels,
// checked at end of each (0x0100 = level 1 completed,
// The top byte of 0x50c is used as a bitmask of completed levels,
// checked at end of each (0x0100 = level 1 completed,
// 0x3000 = levels 5 & 6 completed, 0x3f00 = levels 1-6 completed, etc)
case 0x56c >> 1:
return deco16_prot_ram[0x50c>>1];

View File

@ -630,10 +630,10 @@ WRITE8_HANDLER( snes_w_bank2 )
else if( address >= 0x2000 && address <= 0x5fff ) /* I/O */
snes_w_io( address, data );
else if( address >= 0x6000 && address <= 0x7fff )
{
{
if( snes_cart.mode == SNES_MODE_20 ) /* Reserved */
logerror( "Attempt to write to reserved address: %X\n", offset );
else /* MODE_21 */
else /* MODE_21 */
{
int mask;
@ -658,7 +658,7 @@ WRITE8_HANDLER( snes_w_bank6 )
{
DSP1_setDr(data);
return;
}
}
}
/* 0x800000 - 0xffffff */

View File

@ -6,7 +6,7 @@
Original C++ "dsp1emul.cpp" by Andreas Naive
Based on research by Overload, The Dumper, Neviksti and Andreas Naive
MAME/MESS C conversion by R. Belmont
MAME/MESS C conversion by R. Belmont
This is up to date with the source version dated June 2006.
@ -62,7 +62,7 @@ static struct SharedData { // some RAM variables shared between commands
INT16 Nx, Ny, Nz; // normal vector to the screen (norm 1, points toward the center of projection)
INT16 Gx, Gy, Gz; // center of the screen (global coordinates)
INT16 Hx, Hy; // horizontal vector of the screen (Hz=0, norm 1, points toward the right of the screen)
INT16 Vx, Vy, Vz; // vertical vector of the screen (norm 1, points toward the top of the screen)
INT16 Vx, Vy, Vz; // vertical vector of the screen (norm 1, points toward the top of the screen)
} shared;
@ -296,7 +296,7 @@ static void DSP1_fsmStep(UINT8 read, UINT8 *data)
// The info on this table follows Overload's docs.
static const struct DSP1_Command mCommandTable[0x40] =
static const struct DSP1_Command mCommandTable[0x40] =
{
{&DSP1_multiply, 2, 1}, //0x00
{&DSP1_attitudeA, 4, 0}, //0x01
@ -523,7 +523,7 @@ static void DSP1_distance(INT16 *input, INT16 *output)
INT32 Radius = X * X + Y * Y + Z * Z;
if (Radius == 0) Distance = 0;
else
{
@ -540,7 +540,7 @@ static void DSP1_distance(INT16 *input, INT16 *output)
#if DSP1_VERSION < 0x0102
if (Pos & 1) *Distance -= (Node2 - Node1);
#endif
#endif
*Distance >>= (E >> 1);
}
}
@ -606,7 +606,7 @@ static void DSP1_polar(INT16 *input, INT16 *output)
X = (X1 * DSP1_cos(Ay) >> 15) - (Z1 * DSP1_sin(Ay) >> 15);
*X2 = X; Z1 = Z;
// Rotate Around X
// Rotate Around X
Y = (Z1 * DSP1_sin(Ax) >> 15) + (Y1 * DSP1_cos(Ax) >> 15);
Z = (Z1 * DSP1_cos(Ax) >> 15) - (Y1 * DSP1_sin(Ax) >> 15);
*Y2 = Y; *Z2 = Z;
@ -971,9 +971,9 @@ static void DSP1_gyrate(INT16 *input, INT16 *output)
//////////////////////////////////////////////////////////////////
static const INT16 DSP1_MaxAZS_Exp[16] = {
0x38b4, 0x38b7, 0x38ba, 0x38be, 0x38c0, 0x38c4, 0x38c7, 0x38ca,
0x38b4, 0x38b7, 0x38ba, 0x38be, 0x38c0, 0x38c4, 0x38c7, 0x38ca,
0x38ce, 0x38d0, 0x38d4, 0x38d7, 0x38da, 0x38dd, 0x38e0, 0x38e4
};
};
//////////////////////////////////////////////////////////////////
@ -1033,14 +1033,14 @@ static void DSP1_parameter(INT16 *input, INT16 *output)
shared.Hx = shared.CosAas*0x7fff>>15;
shared.Hy = shared.SinAas*0x7fff>>15;
// vertical vector of the screen (norm 1, points toward the top of the screen)
// vertical vector of the screen (norm 1, points toward the top of the screen)
shared.Vx = shared.CosAzs*-shared.SinAas>>15;
shared.Vy = shared.CosAzs*shared.CosAas>>15;
shared.Vz = -shared.SinAzs*0x7fff>>15;
LfeNx = Lfe*shared.Nx>>15;
LfeNy = Lfe*shared.Ny>>15;
LfeNz = Lfe*shared.Nz>>15;
LfeNz = Lfe*shared.Nz>>15;
// Center of Projection
shared.CentreX = Fx+LfeNx;
@ -1080,7 +1080,7 @@ static void DSP1_parameter(INT16 *input, INT16 *output)
// calculate the separation of (cx, cy) from the projection of
// the 'centre of projection' over the ground... (CentreZ*tg(AZS))
inverse(shared.CosAZS, 0, &shared.SecAZS_C1, &shared.SecAZS_E1);
inverse(shared.CosAZS, 0, &shared.SecAZS_C1, &shared.SecAZS_E1);
normalize(C * shared.SecAZS_C1 >> 15, &C, &E);
E += shared.SecAZS_E1;
C = denormalizeAndClip(C, E) * shared.SinAZS >> 15;
@ -1104,7 +1104,7 @@ static void DSP1_parameter(INT16 *input, INT16 *output)
// we have only some few Taylor coefficients, so we cannot guess which ones
// are the approximated functions and, what is worse, we don't know why
// the own clipping stuff (and, particularly, this correction) is done
if (Azs == -32768) Azs = -32767;
if (Azs == -32768) Azs = -32767;
C = Azs - MaxAZS;
if (C >= 0) C--;
@ -1139,7 +1139,7 @@ static void DSP1_parameter(INT16 *input, INT16 *output)
*Vva = denormalizeAndClip(-C, E);
// Store Secant of clipped Zenith angle
inverse(shared.CosAZS, 0, &shared.SecAZS_C2, &shared.SecAZS_E2);
inverse(shared.CosAZS, 0, &shared.SecAZS_C2, &shared.SecAZS_E2);
}
//////////////////////////////////////////////////////////////////
@ -1207,7 +1207,7 @@ static void DSP1_raster(INT16 *input, INT16 *output)
// the centre of projection.
// The only special point to take into account is the directions on the screen:
// H is positive rightward, but V is positive downward; this is why
// the signs take that configuration
// the signs take that configuration
static void DSP1_target(INT16 *input, INT16 *output)
{
@ -1446,13 +1446,13 @@ static void normalize(INT16 m, INT16 *Coefficient, INT16 *Exponent)
INT16 e = 0;
if (m < 0)
while ((m & i) && i)
while ((m & i) && i)
{
i >>= 1;
e++;
}
else
while (!(m & i) && i)
while (!(m & i) && i)
{
i >>= 1;
e++;
@ -1478,13 +1478,13 @@ static void normalizeDouble(INT32 Product, INT16 *Coefficient, INT16 *Exponent)
INT16 e = 0;
if (m < 0)
while ((m & i) && i)
while ((m & i) && i)
{
i >>= 1;
e++;
}
else
while (!(m & i) && i)
while (!(m & i) && i)
{
i >>= 1;
e++;
@ -1501,13 +1501,13 @@ static void normalizeDouble(INT32 Product, INT16 *Coefficient, INT16 *Exponent)
i = 0x4000;
if (m < 0)
while ((n & i) && i)
while ((n & i) && i)
{
i >>= 1;
e++;
}
else
while (!(n & i) && i)
while (!(n & i) && i)
{
i >>= 1;
e++;

View File

@ -52,7 +52,7 @@ VIDEO_START( btoads )
/* initialize the swapped pointers */
vram_fg_draw = (UINT8 *)btoads_vram_fg0;
vram_fg_display = (UINT8 *)btoads_vram_fg1;
state_save_register_global(xscroll0);
state_save_register_global(xscroll1);
state_save_register_global(yscroll0);
@ -350,7 +350,7 @@ void btoads_scanline_update(running_machine *machine, int screen, mame_bitmap *b
UINT16 *dst = BITMAP_ADDR16(bitmap, scanline, 0);
int coladdr = fulladdr & 0x3ff;
int x;
if (BT_DEBUG)
popmessage("screen_control = %02X", screen_control);
@ -359,11 +359,11 @@ void btoads_scanline_update(running_machine *machine, int screen, mame_bitmap *b
{
/* mode 0: used in ship level, snake boss, title screen (free play) */
/* priority is:
1. BG1 pixels with the high bit set
2. Sprites
3. BG1
4. BG0
*/
1. BG1 pixels with the high bit set
2. Sprites
3. BG1
4. BG0
*/
case 0:
for (x = params->heblnk; x < params->hsblnk; x += 2, coladdr++)
{
@ -393,12 +393,12 @@ void btoads_scanline_update(running_machine *machine, int screen, mame_bitmap *b
/* mode 1: used in snow level, title screen (free play), top part of rolling ball level */
/* priority is:
1. Sprite pixels with high bit clear
2. BG0
3. BG1 pixels with high bit set
4. Sprite pixels with high bit set
5. BG1
*/
1. Sprite pixels with high bit clear
2. BG0
3. BG1 pixels with high bit set
4. Sprite pixels with high bit set
5. BG1
*/
case 1:
for (x = params->heblnk; x < params->hsblnk; x += 2, coladdr++)
{
@ -437,10 +437,10 @@ void btoads_scanline_update(running_machine *machine, int screen, mame_bitmap *b
/* mode 2: used in EOA screen, jetpack level, first level, high score screen */
/* priority is:
1. Sprites
2. BG1
3. BG0
*/
1. Sprites
2. BG1
3. BG0
*/
case 2:
for (x = params->heblnk; x < params->hsblnk; x += 2, coladdr++)
{
@ -471,12 +471,12 @@ void btoads_scanline_update(running_machine *machine, int screen, mame_bitmap *b
/* mode 3: used in toilet level, toad intros, bottom of rolling ball level */
/* priority is:
1. BG1 pixels with the high bit set
2. Sprite pixels with the high bit set
3. BG1
4. Sprites
5. BG0
*/
1. BG1 pixels with the high bit set
2. Sprite pixels with the high bit set
3. BG1
4. Sprites
5. BG0
*/
case 3:
for (x = params->heblnk; x < params->hsblnk; x += 2, coladdr++)
{

View File

@ -49,7 +49,7 @@ READ64_HANDLER( pvr_ctrl_r )
{
int reg;
UINT64 shift;
reg = decode_reg_64(offset, mem_mask, &shift);
#if DEBUG_PVRCTRL
@ -63,7 +63,7 @@ WRITE64_HANDLER( pvr_ctrl_w )
{
int reg;
UINT64 shift;
reg = decode_reg_64(offset, mem_mask, &shift);
#if DEBUG_PVRCTRL
@ -77,7 +77,7 @@ READ64_HANDLER( pvr_ta_r )
{
int reg;
UINT64 shift;
reg = decode_reg_64(offset, mem_mask, &shift);
#if DEBUG_PVRTA
@ -91,7 +91,7 @@ WRITE64_HANDLER( pvr_ta_w )
{
int reg;
UINT64 shift;
reg = decode_reg_64(offset, mem_mask, &shift);
#if DEBUG_PVRTA

View File

@ -191,17 +191,17 @@ static void liberate_draw_sprites(running_machine *machine, mame_bitmap *bitmap,
int multi,fx,fy,sx,sy,sy2,code,color;
/*
Byte 0: 0x01 - ?
0x02 - Y flip
0x04 - X flip
0x08 - Colour?
0x10 - Multi sprite set
0x60 - Tile (high bits)
0x80 - ?
Byte 1: 0xff - Tile (low bits)
Byte 2: 0xff - Y position
Byte 3: 0xff - X position
*/
Byte 0: 0x01 - ?
0x02 - Y flip
0x04 - X flip
0x08 - Colour?
0x10 - Multi sprite set
0x60 - Tile (high bits)
0x80 - ?
Byte 1: 0xff - Tile (low bits)
Byte 2: 0xff - Y position
Byte 3: 0xff - X position
*/
code = spriteram[offs+1] + ((spriteram[offs+0] & 0x60) << 3);
sx = 240 - spriteram[offs+3];
@ -209,7 +209,7 @@ static void liberate_draw_sprites(running_machine *machine, mame_bitmap *bitmap,
color = ((spriteram[offs+1] & 0x08) >> 3); // ?
fx = spriteram[offs+0] & 0x04;
fy = spriteram[offs+0] & 0x02;
fy = spriteram[offs+0] & 0x02;
multi = spriteram[offs+0] & 0x10;
if (multi && fy==0) sy-=16;

View File

@ -77,7 +77,7 @@ PALETTE_INIT( mario )
rgb = compute_res_net_all(color_prom+256, &mario_decode_info, &mario_net_info_std);
palette_set_colors(machine, 256, rgb, 256);
free(rgb);
palette_normalize_range(machine->palette, 0, 255, 0, 255);
palette_normalize_range(machine->palette, 256, 511, 0, 255);
}

View File

@ -9,4 +9,4 @@
***************************************************************************/
const char build_version[] = "0.122u2 ("__DATE__")";
const char build_version[] = "0.122u3 ("__DATE__")";