summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2008-08-07 16:02:05 +0000
committer Aaron Giles <aaron@aarongiles.com>2008-08-07 16:02:05 +0000
commitb40a4f5531d840be9d9838702cce658fcb11f194 (patch)
tree03affa9799c5f25b176f97edde011df913bb59c4 /src/emu
parent9df01a28965b68eededf472e609bb2615ab11dcb (diff)
Cleanups and version bump.mame0126u4
Diffstat (limited to 'src/emu')
-rw-r--r--src/emu/cheat.c152
-rw-r--r--src/emu/cpu/dsp56k/dsp56k.c2
-rw-r--r--src/emu/cpu/dsp56k/dsp56pcu.c8
-rw-r--r--src/emu/debug/debugcpu.c2
-rw-r--r--src/emu/debug/express.c8
-rw-r--r--src/emu/inptport.c2
-rw-r--r--src/emu/machine/laserdsc.c42
-rw-r--r--src/emu/machine/laserdsc.h2
-rw-r--r--src/emu/romload.c2
-rw-r--r--src/emu/sound/disc_mth.c16
-rw-r--r--src/emu/sound/disc_wav.c2
-rw-r--r--src/emu/sound/discrete.c4
-rw-r--r--src/emu/sound/fm.c8
-rw-r--r--src/emu/ui.c2
-rw-r--r--src/emu/uimenu.c16
15 files changed, 134 insertions, 134 deletions
diff --git a/src/emu/cheat.c b/src/emu/cheat.c
index 2f43fcb8814..7bb295a45f6 100644
--- a/src/emu/cheat.c
+++ b/src/emu/cheat.c
@@ -34,21 +34,21 @@
</mamecheat>
**********************************************************************
-
+
Expressions are standard debugger expressions. Note that & and
< must be escaped per XML rules. Within attributes you must use
&amp; and &lt;. For tags, you can also use <![CDATA[ ... ]]>.
-
+
Each cheat has its own context-specific variables:
-
+
temp0-temp9 -- 10 temporary variables for any use
param -- the current value of the cheat parameter
frame -- the current frame index
argindex -- for arguments with multiple iterations, this is the index
-
+
By default, each cheat has 10 temporary variables that are
persistent while executing its scripts. Additional temporary
- variables may be requested via the 'tempvariables' attribute
+ variables may be requested via the 'tempvariables' attribute
on the cheat.
*********************************************************************/
@@ -285,13 +285,13 @@ void cheat_render_text(running_machine *machine)
if (cheatinfo != NULL)
{
int linenum;
-
+
/* render any text and free it along the way */
for (linenum = 0; linenum < ARRAY_LENGTH(cheatinfo->output); linenum++)
if (cheatinfo->output[linenum] != NULL)
{
/* output the text */
- ui_draw_text_full(astring_c(cheatinfo->output[linenum]),
+ ui_draw_text_full(astring_c(cheatinfo->output[linenum]),
0.0f, (float)linenum * ui_get_line_height(), 1.0f,
cheatinfo->justify[linenum], WRAP_NEVER, DRAW_OPAQUE,
ARGB_WHITE, ARGB_BLACK, NULL, NULL);
@@ -320,7 +320,7 @@ void *cheat_get_next_menu_entry(running_machine *machine, void *previous, const
/* description is standard */
if (description != NULL)
*description = astring_c(cheat->description);
-
+
/* if we have no parameter and no run or off script, it's a oneshot cheat */
if (cheat->parameter == NULL && cheat->script[SCRIPT_STATE_RUN] == NULL && cheat->script[SCRIPT_STATE_OFF] == NULL)
{
@@ -329,7 +329,7 @@ void *cheat_get_next_menu_entry(running_machine *machine, void *previous, const
if (flags != NULL)
*flags = 0;
}
-
+
/* if we have no parameter, it's just on/off */
else if (cheat->parameter == NULL)
{
@@ -338,7 +338,7 @@ void *cheat_get_next_menu_entry(running_machine *machine, void *previous, const
if (flags != NULL)
*flags = cheat->state ? MENU_FLAG_LEFT_ARROW : MENU_FLAG_RIGHT_ARROW;
}
-
+
/* if we have a value parameter, compute it */
else if (cheat->parameter->itemlist == NULL)
{
@@ -356,12 +356,12 @@ void *cheat_get_next_menu_entry(running_machine *machine, void *previous, const
*flags |= MENU_FLAG_RIGHT_ARROW;
}
}
-
+
/* if we have an item list, pick the index */
else
{
parameter_item *item, *prev = NULL;
-
+
for (item = cheat->parameter->itemlist; item != NULL; prev = item, item = item->next)
if (item->value == cheat->parameter->value)
break;
@@ -376,14 +376,14 @@ void *cheat_get_next_menu_entry(running_machine *machine, void *previous, const
*flags |= MENU_FLAG_RIGHT_ARROW;
}
}
-
+
/* return a pointer to this item */
return cheat;
}
/*-------------------------------------------------
- cheat_activate - activate a oneshot cheat
+ cheat_activate - activate a oneshot cheat
-------------------------------------------------*/
int cheat_activate(running_machine *machine, void *entry)
@@ -391,7 +391,7 @@ int cheat_activate(running_machine *machine, void *entry)
cheat_private *cheatinfo = machine->cheat_data;
cheat_entry *cheat = entry;
int changed = FALSE;
-
+
/* if we have no parameter and no run or off script, it's a oneshot cheat */
if (cheat->parameter == NULL && cheat->script[SCRIPT_STATE_RUN] == NULL && cheat->script[SCRIPT_STATE_OFF] == NULL)
{
@@ -404,9 +404,9 @@ int cheat_activate(running_machine *machine, void *entry)
/*-------------------------------------------------
- cheat_select_default_state - select the
- default state for a cheat, or activate a
- oneshot cheat
+ cheat_select_default_state - select the
+ default state for a cheat, or activate a
+ oneshot cheat
-------------------------------------------------*/
int cheat_select_default_state(running_machine *machine, void *entry)
@@ -414,11 +414,11 @@ int cheat_select_default_state(running_machine *machine, void *entry)
cheat_private *cheatinfo = machine->cheat_data;
cheat_entry *cheat = entry;
int changed = FALSE;
-
+
/* if we have no parameter and no run or off script, it's a oneshot cheat */
if (cheat->parameter == NULL && cheat->script[SCRIPT_STATE_RUN] == NULL && cheat->script[SCRIPT_STATE_OFF] == NULL)
;
-
+
/* if we have no parameter, it's just on/off; default to off */
else if (cheat->parameter == NULL)
{
@@ -429,7 +429,7 @@ int cheat_select_default_state(running_machine *machine, void *entry)
changed = TRUE;
}
}
-
+
/* if we have a value parameter, fall back to the default */
else
{
@@ -444,8 +444,8 @@ int cheat_select_default_state(running_machine *machine, void *entry)
/*-------------------------------------------------
- cheat_select_previous_state - select the
- previous state for a cheat
+ cheat_select_previous_state - select the
+ previous state for a cheat
-------------------------------------------------*/
int cheat_select_previous_state(running_machine *machine, void *entry)
@@ -453,11 +453,11 @@ int cheat_select_previous_state(running_machine *machine, void *entry)
cheat_private *cheatinfo = machine->cheat_data;
cheat_entry *cheat = entry;
int changed = FALSE;
-
+
/* if we have no parameter and no run or off script, it's a oneshot cheat */
if (cheat->parameter == NULL && cheat->script[SCRIPT_STATE_RUN] == NULL && cheat->script[SCRIPT_STATE_OFF] == NULL)
;
-
+
/* if we have no parameter, it's just on/off */
else if (cheat->parameter == NULL)
{
@@ -468,7 +468,7 @@ int cheat_select_previous_state(running_machine *machine, void *entry)
changed = TRUE;
}
}
-
+
/* if we have a value parameter, compute it */
else if (cheat->parameter->itemlist == NULL)
{
@@ -482,12 +482,12 @@ int cheat_select_previous_state(running_machine *machine, void *entry)
changed = TRUE;
}
}
-
+
/* if we have an item list, pick the index */
else
{
parameter_item *item, *prev = NULL;
-
+
for (item = cheat->parameter->itemlist; item != NULL; prev = item, item = item->next)
if (item->value == cheat->parameter->value)
break;
@@ -503,8 +503,8 @@ int cheat_select_previous_state(running_machine *machine, void *entry)
/*-------------------------------------------------
- cheat_select_next_state - select the
- next state for a cheat
+ cheat_select_next_state - select the
+ next state for a cheat
-------------------------------------------------*/
int cheat_select_next_state(running_machine *machine, void *entry)
@@ -512,11 +512,11 @@ int cheat_select_next_state(running_machine *machine, void *entry)
cheat_private *cheatinfo = machine->cheat_data;
cheat_entry *cheat = entry;
int changed = FALSE;
-
+
/* if we have no parameter and no run or off script, it's a oneshot cheat */
if (cheat->parameter == NULL && cheat->script[SCRIPT_STATE_RUN] == NULL && cheat->script[SCRIPT_STATE_OFF] == NULL)
;
-
+
/* if we have no parameter, it's just on/off */
else if (cheat->parameter == NULL)
{
@@ -527,7 +527,7 @@ int cheat_select_next_state(running_machine *machine, void *entry)
changed = TRUE;
}
}
-
+
/* if we have a value parameter, compute it */
else if (cheat->parameter->itemlist == NULL)
{
@@ -541,12 +541,12 @@ int cheat_select_next_state(running_machine *machine, void *entry)
changed = TRUE;
}
}
-
+
/* if we have an item list, pick the index */
else
{
parameter_item *item;
-
+
for (item = cheat->parameter->itemlist; item != NULL; item = item->next)
if (item->value == cheat->parameter->value)
break;
@@ -575,7 +575,7 @@ static void cheat_frame(running_machine *machine)
cheat_private *cheatinfo = machine->cheat_data;
cheat_entry *cheat;
int linenum;
-
+
/* set up for accumulating output */
cheatinfo->lastline = 0;
cheatinfo->numlines = floor(1.0f / ui_get_line_height());
@@ -586,36 +586,36 @@ static void cheat_frame(running_machine *machine)
astring_free(cheatinfo->output[linenum]);
cheatinfo->output[linenum] = NULL;
}
-
+
/* iterate over running cheats and execute them */
for (cheat = cheatinfo->cheatlist; cheat != NULL; cheat = cheat->next)
if (cheat->state == SCRIPT_STATE_RUN)
cheat_execute_script(cheatinfo, cheat, SCRIPT_STATE_RUN);
-
+
/* increment the frame counter */
cheatinfo->framecount++;
}
/*-------------------------------------------------
- cheat_execute_script - execute the
+ cheat_execute_script - execute the
appropriate script
-------------------------------------------------*/
static void cheat_execute_script(cheat_private *cheatinfo, cheat_entry *cheat, script_state state)
{
script_entry *entry;
-
+
/* if no script, bail */
if (cheat->script[state] == NULL)
return;
-
+
/* iterate over entries */
for (entry = cheat->script[state]->entrylist; entry != NULL; entry = entry->next)
{
EXPRERR error;
UINT64 result;
-
+
/* evaluate the condition */
if (entry->condition != NULL)
{
@@ -627,7 +627,7 @@ static void cheat_execute_script(cheat_private *cheatinfo, cheat_entry *cheat, s
if (error != EXPRERR_NONE || result == 0)
continue;
}
-
+
/* if there is an action, execute it */
if (entry->expression != NULL)
{
@@ -635,7 +635,7 @@ static void cheat_execute_script(cheat_private *cheatinfo, cheat_entry *cheat, s
if (error != EXPRERR_NONE)
mame_printf_warning("Error executing expression \"%s\": %s\n", expression_original_string(entry->expression), exprerr_to_string(error));
}
-
+
/* if there is a string to display, compute it */
if (entry->format != NULL)
{
@@ -644,7 +644,7 @@ static void cheat_execute_script(cheat_private *cheatinfo, cheat_entry *cheat, s
astring *string;
int curarg = 0;
int row;
-
+
/* iterate over arguments and evaluate them */
for (arg = entry->arglist; arg != NULL; arg = arg->next)
for (cheat->argindex = 0; cheat->argindex < arg->count; cheat->argindex++)
@@ -653,7 +653,7 @@ static void cheat_execute_script(cheat_private *cheatinfo, cheat_entry *cheat, s
if (error != EXPRERR_NONE)
mame_printf_warning("Error executing argument expression \"%s\": %s\n", expression_original_string(arg->expression), exprerr_to_string(error));
}
-
+
/* determine which row we belong to */
row = entry->line;
if (row == 0)
@@ -662,22 +662,22 @@ static void cheat_execute_script(cheat_private *cheatinfo, cheat_entry *cheat, s
row = (row < 0) ? cheatinfo->numlines + row : row - 1;
row = MAX(row, 0);
row = MIN(row, cheatinfo->numlines - 1);
-
+
/* either re-use or allocate a string */
string = cheatinfo->output[row];
if (string == NULL)
string = cheatinfo->output[row] = astring_alloc();
cheatinfo->justify[row] = entry->justify;
-
+
/* generate the astring */
astring_printf(string, astring_c(entry->format),
- (UINT32)params[0], (UINT32)params[1], (UINT32)params[2], (UINT32)params[3],
- (UINT32)params[4], (UINT32)params[5], (UINT32)params[6], (UINT32)params[7],
- (UINT32)params[8], (UINT32)params[9], (UINT32)params[10], (UINT32)params[11],
- (UINT32)params[12], (UINT32)params[13], (UINT32)params[14], (UINT32)params[15],
- (UINT32)params[16], (UINT32)params[17], (UINT32)params[18], (UINT32)params[19],
- (UINT32)params[20], (UINT32)params[21], (UINT32)params[22], (UINT32)params[23],
- (UINT32)params[24], (UINT32)params[25], (UINT32)params[26], (UINT32)params[27],
+ (UINT32)params[0], (UINT32)params[1], (UINT32)params[2], (UINT32)params[3],
+ (UINT32)params[4], (UINT32)params[5], (UINT32)params[6], (UINT32)params[7],
+ (UINT32)params[8], (UINT32)params[9], (UINT32)params[10], (UINT32)params[11],
+ (UINT32)params[12], (UINT32)params[13], (UINT32)params[14], (UINT32)params[15],
+ (UINT32)params[16], (UINT32)params[17], (UINT32)params[18], (UINT32)params[19],
+ (UINT32)params[20], (UINT32)params[21], (UINT32)params[22], (UINT32)params[23],
+ (UINT32)params[24], (UINT32)params[25], (UINT32)params[26], (UINT32)params[27],
(UINT32)params[28], (UINT32)params[29], (UINT32)params[30], (UINT32)params[31]);
}
}
@@ -916,7 +916,7 @@ static cheat_entry *cheat_entry_load(running_machine *machine, const char *filen
else
cheat->script[curscript->state] = curscript;
}
-
+
/* set the initial state */
cheat->state = (cheat->parameter != NULL) ? SCRIPT_STATE_RUN : SCRIPT_STATE_OFF;
return cheat;
@@ -928,8 +928,8 @@ error:
/*-------------------------------------------------
- cheat_entry_save - save a single cheat
- entry
+ cheat_entry_save - save a single cheat
+ entry
-------------------------------------------------*/
static void cheat_entry_save(mame_file *cheatfile, const cheat_entry *cheat)
@@ -941,7 +941,7 @@ static void cheat_entry_save(mame_file *cheatfile, const cheat_entry *cheat)
if (cheat->numtemp != DEFAULT_TEMP_VARIABLES)
mame_fprintf(cheatfile, " tempvariables=\"%d\"", cheat->numtemp);
mame_fprintf(cheatfile, ">\n");
-
+
/* save the comment */
if (cheat->comment != NULL)
mame_fprintf(cheatfile, "\t\t<comment><![CDATA[\n%s\n\t\t]]></comment>\n", astring_c(cheat->comment));
@@ -961,7 +961,7 @@ static void cheat_entry_save(mame_file *cheatfile, const cheat_entry *cheat)
/*-------------------------------------------------
- cheat_entry_free - free a single cheat entry
+ cheat_entry_free - free a single cheat entry
-------------------------------------------------*/
static void cheat_entry_free(cheat_entry *cheat)
@@ -989,9 +989,9 @@ static void cheat_entry_free(cheat_entry *cheat)
/*-------------------------------------------------
- cheat_parameter_load - load a single cheat
- parameter and create the underlying data
- structures
+ cheat_parameter_load - load a single cheat
+ parameter and create the underlying data
+ structures
-------------------------------------------------*/
static cheat_parameter *cheat_parameter_load(const char *filename, xml_data_node *paramnode)
@@ -1035,7 +1035,7 @@ static cheat_parameter *cheat_parameter_load(const char *filename, xml_data_node
goto error;
}
curitem->value = xml_get_attribute_int(itemnode, "value", 0);
-
+
/* ensure the maximum expands to suit */
param->maxval = MAX(param->maxval, curitem->value);
@@ -1043,12 +1043,12 @@ static cheat_parameter *cheat_parameter_load(const char *filename, xml_data_node
*itemtailptr = curitem;
itemtailptr = &curitem->next;
}
-
+
/* if no default, pick the minimum */
if (xml_get_attribute_string(paramnode, "default", NULL) == NULL)
param->defval = (param->itemlist != NULL) ? param->itemlist->value : param->minval;
param->value = param->defval;
-
+
return param;
error:
@@ -1338,7 +1338,7 @@ static script_entry *script_entry_load(const char *filename, xml_data_node *entr
*argtailptr = curarg;
argtailptr = &curarg->next;
}
-
+
/* max out on arguments */
if (totalargs > MAX_ARGUMENTS)
{
@@ -1359,8 +1359,8 @@ error:
/*-------------------------------------------------
- script_entry_save - save a single action
- or output
+ script_entry_save - save a single action
+ or output
-------------------------------------------------*/
static void script_entry_save(mame_file *cheatfile, const script_entry *entry)
@@ -1421,8 +1421,8 @@ static void script_entry_save(mame_file *cheatfile, const script_entry *entry)
/*-------------------------------------------------
- script_entry_free - free a single script
- entry
+ script_entry_free - free a single script
+ entry
-------------------------------------------------*/
static void script_entry_free(script_entry *entry)
@@ -1454,9 +1454,9 @@ static void script_entry_free(script_entry *entry)
***************************************************************************/
/*-------------------------------------------------
- quote_astring_expression - quote an expression
- string so that it is valid to embed in an XML
- document
+ quote_astring_expression - quote an expression
+ string so that it is valid to embed in an XML
+ document
-------------------------------------------------*/
static astring *quote_astring_expression(astring *string, int isattribute)
@@ -1486,8 +1486,8 @@ static astring *quote_astring_expression(astring *string, int isattribute)
/*-------------------------------------------------
- validate_format - check that a format string
- has the correct number and type of arguments
+ validate_format - check that a format string
+ has the correct number and type of arguments
-------------------------------------------------*/
static int validate_format(const char *filename, int line, const script_entry *entry)
diff --git a/src/emu/cpu/dsp56k/dsp56k.c b/src/emu/cpu/dsp56k/dsp56k.c
index d4a2befab0a..15bfa4e8bb1 100644
--- a/src/emu/cpu/dsp56k/dsp56k.c
+++ b/src/emu/cpu/dsp56k/dsp56k.c
@@ -345,7 +345,7 @@ static void set_irq_line(int irqline, int state)
// If the reset line isn't asserted, service interrupts
// TODO: Is it right to immediately service interrupts?
//if (core.reset_state != TRUE)
- // pcu_service_interrupts();
+ // pcu_service_interrupts();
}
diff --git a/src/emu/cpu/dsp56k/dsp56pcu.c b/src/emu/cpu/dsp56k/dsp56pcu.c
index 81e84020321..85f1e3cd173 100644
--- a/src/emu/cpu/dsp56k/dsp56pcu.c
+++ b/src/emu/cpu/dsp56k/dsp56pcu.c
@@ -188,7 +188,7 @@ static void pcu_service_interrupts(void)
// Count list of pending interrupts
int num_servicable = dsp56k_count_pending_interrupts();
- if (num_servicable == 0)
+ if (num_servicable == 0)
return;
// Sort list according to priority
@@ -199,7 +199,7 @@ static void pcu_service_interrupts(void)
for (i = 0; i < num_servicable; i++)
{
const int interrupt_index = core.PCU.pending_interrupts[i];
-
+
// Get the priority of the interrupt - a return value of -1 means disabled!
INT8 priority = dsp56k_get_irq_priority(interrupt_index);
@@ -217,13 +217,13 @@ static void pcu_service_interrupts(void)
// The host command input has a floating vector.
const UINT16 irq_vector = HV_bits() << 1;
PC = irq_vector;
-
+
// TODO: 5-9 5-11 Gotta' Clear HC (HCP gets it too) when taking this exception!
HC_bit_set(0);
}
}
}
-
+
dsp56k_clear_pending_interrupts();
}
diff --git a/src/emu/debug/debugcpu.c b/src/emu/debug/debugcpu.c
index c1b3ec97b4f..6454d73fe7f 100644
--- a/src/emu/debug/debugcpu.c
+++ b/src/emu/debug/debugcpu.c
@@ -2576,7 +2576,7 @@ static void expression_write_eeprom(offs_t address, int size, UINT64 data)
/*-------------------------------------------------
expression_validate - validate that the
- provided expression references an
+ provided expression references an
appropriate name
-------------------------------------------------*/
diff --git a/src/emu/debug/express.c b/src/emu/debug/express.c
index e2d69b2093a..f9a71152d7e 100644
--- a/src/emu/debug/express.c
+++ b/src/emu/debug/express.c
@@ -533,7 +533,7 @@ static EXPRERR parse_memory_operator(parsed_expression *expr, int offset, const
if (dot != NULL)
{
UINT16 index;
-
+
namestring = add_expression_string(expr, buffer, dot - buffer, &index);
if (namestring == NULL)
return MAKE_EXPRERR_OUT_OF_MEMORY(offset);
@@ -579,7 +579,7 @@ static EXPRERR parse_memory_operator(parsed_expression *expr, int offset, const
case 'q': *flags |= TIN_MEMORY_QWORD; break;
default: return MAKE_EXPRERR_INVALID_MEMORY_SIZE(offset + (buffer - startbuffer) + length - 1);
}
-
+
/* validate the name */
if (expr->callbacks.valid != NULL)
{
@@ -589,7 +589,7 @@ static EXPRERR parse_memory_operator(parsed_expression *expr, int offset, const
else if (err != EXPRERR_NONE)
return MAKE_EXPRERR(err, offset);
}
-
+
return EXPRERR_NONE;
}
@@ -843,7 +843,7 @@ static EXPRERR parse_string_into_tokens(const char *stringstart, parsed_expressi
SET_TOKEN_INFO(1, TOK_OPERATOR, TVL_MEMORYAT, TIN_PRECEDENCE_2 | info);
break;
}
-
+
/* empty string is automatically invalid */
if (buffer[0] == 0)
return MAKE_EXPRERR_INVALID_TOKEN(token->offset);
diff --git a/src/emu/inptport.c b/src/emu/inptport.c
index 858d0e97f1c..caa2799b151 100644
--- a/src/emu/inptport.c
+++ b/src/emu/inptport.c
@@ -2869,7 +2869,7 @@ static input_port_config *port_config_detokenize(input_port_config *listhead, co
temptoken.i = INPUT_STRING_On;
cursetting = setting_config_alloc(curfield, ~defval & mask, input_port_string_from_token(temptoken));
-
+
/* reset cursetting to NULL to allow subsequent conditions to apply to the field */
cursetting = NULL;
break;
diff --git a/src/emu/machine/laserdsc.c b/src/emu/machine/laserdsc.c
index 300cbc7213c..6c186e4fc4f 100644
--- a/src/emu/machine/laserdsc.c
+++ b/src/emu/machine/laserdsc.c
@@ -652,7 +652,7 @@ INLINE void set_hold_state(laserdisc_state *ld, attotime holdtime, playstate sta
/*-------------------------------------------------
reset_tracknum - reset the current track
- number to 1 and clear out other state
+ number to 1 and clear out other state
-------------------------------------------------*/
INLINE void reset_tracknum(laserdisc_state *ld)
@@ -790,7 +790,7 @@ void laserdisc_vsync(const device_config *device)
UINT8 origstate = ld->state;
UINT8 hittarget;
int backslash;
-
+
/* allow the backslash key to toggle the frame display */
backslash = input_code_pressed(KEYCODE_BACKSLASH);
if (!ld->lastbackslash && backslash)
@@ -1140,7 +1140,7 @@ static int update_position(laserdisc_state *ld)
/* if we have no target, don't do anything */
if (ld->targetframe == 0)
return TRUE;
-
+
LOG_POSITION(("%d:track=%5d frame=%5d target=%5d ... ", fieldnum, tracknum, frame, ld->targetframe));
/* if we hit the first field of our frame, we're done */
@@ -1265,18 +1265,18 @@ static void read_track_data(laserdisc_state *ld)
ld->avconfig.decode_mask = AVCOMP_DECODE_VIDEO;
ld->avconfig.video_xor = BYTE_XOR_LE(0);
ld->avconfig.audio_xor = BYTE_XOR_BE(0);
-
+
/* if the previous field had the white flag, force the new field to pair with it */
if (ld->metadata[fieldnum ^ 1].white)
ld->videofields[ld->videoindex] = 1;
-
+
/* if we already have both fields on the current videoindex, advance */
if (ld->videofields[ld->videoindex] >= 2)
{
ld->videoindex = (ld->videoindex + 1) % ARRAY_LENGTH(ld->videofields);
ld->videofields[ld->videoindex] = 0;
}
-
+
/* set the video buffer information */
ld->avconfig.video_buffer = (UINT8 *)BITMAP_ADDR16(ld->videoframe[ld->videoindex], fieldnum, 0);
ld->avconfig.video_stride = 4 * ld->videoframe[ld->videoindex]->rowpixels;
@@ -1331,7 +1331,7 @@ static void process_track_data(const device_config *device)
vbi_parse_all((const UINT16 *)ld->avconfig.video_buffer, ld->avconfig.video_stride / 2, ld->videoframe[0]->width, 8, &ld->metadata[fieldnum]);
else
fake_metadata(tracknum, fieldnum, &ld->metadata[fieldnum]);
-// printf("Track %5d: Metadata = %d %08X %08X %08X %08X\n", tracknum, ld->metadata[fieldnum].white, ld->metadata[fieldnum].line16, ld->metadata[fieldnum].line17, ld->metadata[fieldnum].line18, ld->metadata[fieldnum].line1718);
+// printf("Track %5d: Metadata = %d %08X %08X %08X %08X\n", tracknum, ld->metadata[fieldnum].white, ld->metadata[fieldnum].line16, ld->metadata[fieldnum].line17, ld->metadata[fieldnum].line18, ld->metadata[fieldnum].line1718);
/* update the last seen frame and chapter */
frame = frame_from_metadata(&ld->metadata[fieldnum]);
@@ -1358,7 +1358,7 @@ static void process_track_data(const device_config *device)
samples = (rawdata[6] << 8) + rawdata[7];
sampsource[0] = (const INT16 *)(rawdata + 12 + rawdata[4]) + 0 * samples;
sampsource[1] = sampsource[0] + samples;
-
+
/* let the audio callback at it first */
if (ld->audiocallback != NULL)
(*ld->audiocallback)(device, ld->samplerate, samples, sampsource[0], sampsource[1]);
@@ -1401,7 +1401,7 @@ static void process_track_data(const device_config *device)
/*-------------------------------------------------
fake_metadata - fake metadata when there's
- no disc present
+ no disc present
-------------------------------------------------*/
static void fake_metadata(UINT32 track, UINT8 which, vbi_metadata *metadata)
@@ -1410,7 +1410,7 @@ static void fake_metadata(UINT32 track, UINT8 which, vbi_metadata *metadata)
{
metadata->white = 1;
metadata->line16 = 0;
- metadata->line17 = metadata->line18 = 0xf80000 |
+ metadata->line17 = metadata->line18 = 0xf80000 |
(((track / 10000) % 10) << 16) |
(((track / 1000) % 10) << 12) |
(((track / 100) % 10) << 8) |
@@ -1434,14 +1434,14 @@ static void render_display(UINT16 *videodata, UINT32 rowpixels, UINT32 width, in
int y = 50;
int ch;
int delta;
-
+
/* do nothing if no data */
if (videodata == NULL)
return;
/* convert to a character string and render */
sprintf(buffer, "%5d", frame);
-
+
/* iterate over 5 positions: (-1,-1), (-1,1), (1,-1), (1,1) and (0,0) */
/* render all in black except the last one */
for (delta = 0; delta < 5; delta++)
@@ -1449,25 +1449,25 @@ static void render_display(UINT16 *videodata, UINT32 rowpixels, UINT32 width, in
int color = (delta < 4) ? 0x0080 : 0xff80;
int dx = (delta < 4) ? ((delta & 1) ? -1 : 1) : 0;
int dy = (delta < 4) ? ((delta & 2) ? -1 : 1) : 0;
-
+
/* iterate over 5 characters */
for (ch = 0; ch < 5; ch++)
if (buffer[ch] >= '0' && buffer[ch] <= '9')
{
const UINT8 *fontdata = &numberfont[buffer[ch] - '0'][0];
int cy, cx;
-
+
/* iterate over the rows of the character */
for (cy = 0; cy < 8; cy++)
{
UINT8 bits = *fontdata++;
-
+
/* and over the columns */
for (cx = 0; cx < 8; cx++)
if (bits & (0x80 >> cx))
{
int ix, iy;
-
+
/* fill in an xscale x yscale pixel */
for (iy = 0; iy < yscale; iy++)
for (ix = 0; ix < xscale; ix++)
@@ -2393,16 +2393,16 @@ static void pr8210_control_w(laserdisc_state *ld, UINT8 data)
attotime curtime = timer_get_time();
attotime delta;
int longpulse;
-
+
/* if we timed out, reset the accumulator */
delta = attotime_sub(curtime, pr8210->firstbittime);
if (delta.attoseconds > ATTOTIME_IN_USEC(25320).attoseconds)
{
pr8210->firstbittime = curtime;
pr8210->accumulator = 0x5555;
-// printf("Reset accumulator\n");
+// printf("Reset accumulator\n");
}
-
+
/* get the time difference from the last assert */
/* and update our internal command time */
delta = attotime_sub(curtime, pr8210->lastbittime);
@@ -2411,7 +2411,7 @@ static void pr8210_control_w(laserdisc_state *ld, UINT8 data)
/* 0 bit delta is 1.05 msec, 1 bit delta is 2.11 msec */
longpulse = (delta.attoseconds < ATTOTIME_IN_USEC(1500).attoseconds) ? 0 : 1;
pr8210->accumulator = (pr8210->accumulator << 1) | longpulse;
-
+
#if 0
{
int usecdiff = (int)(delta.attoseconds / ATTOSECONDS_IN_USEC(1));
@@ -2426,7 +2426,7 @@ static void pr8210_control_w(laserdisc_state *ld, UINT8 data)
UINT8 newcommand = (pr8210->accumulator >> 2) & 0x1f;
//printf("New command = %02X (last=%02X)\n", newcommand, pr8210->lastcommand);
-
+
/* if we got a double command, act on it */
if (newcommand == pr8210->lastcommand)
{
diff --git a/src/emu/machine/laserdsc.h b/src/emu/machine/laserdsc.h
index 31bf2fa1a69..211bc022fef 100644
--- a/src/emu/machine/laserdsc.h
+++ b/src/emu/machine/laserdsc.h
@@ -82,7 +82,7 @@ struct _laserdisc_config
#define MDRV_LASERDISC_AUDIO(_func) \
MDRV_DEVICE_CONFIG_DATAPTR(laserdisc_config, audio, _func)
-
+
#define MDRV_LASERDISC_REMOVE(_tag, _type) \
MDRV_DEVICE_REMOVE(_tag, _type)
diff --git a/src/emu/romload.c b/src/emu/romload.c
index 0dea5f9ce4a..b53918c3866 100644
--- a/src/emu/romload.c
+++ b/src/emu/romload.c
@@ -977,7 +977,7 @@ static void process_disk_entries(rom_load_data *romdata, const char *regiontag,
open_chd chd = { 0 };
chd_header header;
chd_error err;
-
+
/* note the region we are in */
chd.region = regiontag;
diff --git a/src/emu/sound/disc_mth.c b/src/emu/sound/disc_mth.c
index 9e3769b8981..0c039f5008f 100644
--- a/src/emu/sound/disc_mth.c
+++ b/src/emu/sound/disc_mth.c
@@ -986,7 +986,7 @@ static void dst_mixer_step(node_description *node)
rTemp = info->r[bit];
connected = 1;
vTemp = DST_MIXER__IN(bit);
-
+
if (info->rNode[bit])
{
/* a node has the posibility of being disconnected from the circuit. */
@@ -1021,7 +1021,7 @@ static void dst_mixer_step(node_description *node)
}
}
}
-
+
if (connected)
{
if (info->c[bit] != 0)
@@ -1040,7 +1040,7 @@ static void dst_mixer_step(node_description *node)
{
rTemp = info->r[bit];
vTemp = DST_MIXER__IN(bit);
-
+
if (info->c[bit] != 0)
{
/* do input high pass filtering if needed. */
@@ -1050,10 +1050,10 @@ static void dst_mixer_step(node_description *node)
i += (((context->type & DISC_MIXER_TYPE_MASK) == DISC_MIXER_IS_OP_AMP) ? info->vRef - vTemp : vTemp) / rTemp;
}
}
-
- if ((context->type & DISC_MIXER_TYPE_MASK) == DISC_MIXER_IS_OP_AMP_WITH_RI)
+
+ if ((context->type & DISC_MIXER_TYPE_MASK) == DISC_MIXER_IS_OP_AMP_WITH_RI)
i += info->vRef / info->rI;
-
+
rTotal = 1.0 / rTotal;
/* If resistor network or has rI then Millman is used.
@@ -1540,7 +1540,7 @@ INLINE double dst_transform_pop(double *stack,int *pointer)
INLINE void dst_transform_push(double *stack,int *pointer,double value)
{
//Store THEN increment
- assert(*pointer < MAX_TRANS_STACK);
+ assert(*pointer < MAX_TRANS_STACK);
stack[(*pointer)++]=value;
}
@@ -1556,7 +1556,7 @@ static void dst_transform_step(node_description *node)
node->output[0]=0;
top = HUGE_VAL;
-
+
while(*fPTR!=0)
{
switch (*fPTR++)
diff --git a/src/emu/sound/disc_wav.c b/src/emu/sound/disc_wav.c
index d29f887ff90..0dcac6fb81a 100644
--- a/src/emu/sound/disc_wav.c
+++ b/src/emu/sound/disc_wav.c
@@ -1501,7 +1501,7 @@ INLINE double dss_inverter_tf(node_description *node, double x)
return info->vB;
else if (x <= info->vB)
return context->tf_tab[(int)((double)(DSS_INV_TAB_SIZE-1) * x / info->vB)];
- else
+ else
return context->tf_tab[DSS_INV_TAB_SIZE-1];
}
diff --git a/src/emu/sound/discrete.c b/src/emu/sound/discrete.c
index 94c70c1387d..1c026f7ab63 100644
--- a/src/emu/sound/discrete.c
+++ b/src/emu/sound/discrete.c
@@ -378,7 +378,7 @@ static void discrete_stop(void *chip)
int nodenum;
osd_ticks_t total = 0;
osd_ticks_t tresh;
-
+
/* calculate total time */
for (nodenum = 0; nodenum < info->node_count; nodenum++)
{
@@ -400,7 +400,7 @@ static void discrete_stop(void *chip)
}
}
#endif
-
+
/* close any csv files */
for (log_num = 0; log_num < info->num_csvlogs; log_num++)
if (info->disc_csv_file[log_num])
diff --git a/src/emu/sound/fm.c b/src/emu/sound/fm.c
index fa5641024b2..486d4651509 100644
--- a/src/emu/sound/fm.c
+++ b/src/emu/sound/fm.c
@@ -684,7 +684,7 @@ static INT32 out_delta[4]; /* channel output NONE,LEFT,RIGHT or CENTER for YM260
static UINT32 LFO_AM; /* runtime LFO calculations helper */
static INT32 LFO_PM; /* runtime LFO calculations helper */
-static int fn_max; /* maximal phase increment (used for phase overflow) */
+static int fn_max; /* maximal phase increment (used for phase overflow) */
/* log output level */
#define LOG_ERR 3 /* ERROR */
@@ -1297,7 +1297,7 @@ INLINE void update_phase_lfo_slot(FM_OPN *OPN, FM_SLOT *SLOT, INT32 pms, UINT32
/* phase increment counter */
fc = (OPN->fn_table[fn]>>(7-blk)) + SLOT->DT[kc];
-
+
/* detects frequency overflow (credits to Nemesis) */
if (fc < 0) fc += fn_max;
@@ -1327,7 +1327,7 @@ INLINE void update_phase_lfo_channel(FM_OPN *OPN, FM_CH *CH)
blk = (block_fnum&0x7000) >> 12;
fn = block_fnum & 0xfff;
-
+
/* keyscale code */
kc = (blk<<2) | opn_fktable[fn >> 8];
@@ -1771,7 +1771,7 @@ static void OPNSetPres(FM_OPN *OPN, int pres, int timer_prescaler, int SSGpres)
}
/* maximal frequency, used for overflow, best setting with BLOCK=5 (notaz) */
- fn_max = ((UINT32)((double)OPN->fn_table[0x7ff*2] / OPN->ST.freqbase) >> 2);
+ fn_max = ((UINT32)((double)OPN->fn_table[0x7ff*2] / OPN->ST.freqbase) >> 2);
/* LFO freq. table */
for(i = 0; i < 8; i++)
diff --git a/src/emu/ui.c b/src/emu/ui.c
index e10b854d3d2..975c7818426 100644
--- a/src/emu/ui.c
+++ b/src/emu/ui.c
@@ -429,7 +429,7 @@ void ui_update_and_render(running_machine *machine)
if (alpha >= 0)
render_ui_add_rect(0.0f, 0.0f, 1.0f, 1.0f, MAKE_ARGB(alpha,0x00,0x00,0x00), PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA));
}
-
+
/* render any cheat stuff at the bottom */
cheat_render_text(machine);
diff --git a/src/emu/uimenu.c b/src/emu/uimenu.c
index f70b50cff44..55b4184f932 100644
--- a/src/emu/uimenu.c
+++ b/src/emu/uimenu.c
@@ -2436,19 +2436,19 @@ static void menu_cheat(running_machine *machine, ui_menu *menu, void *parameter,
if (event != NULL && event->itemref != NULL)
{
int changed = FALSE;
-
+
/* handle reset all */
if ((FPTR)event->itemref == 1 && event->iptkey == IPT_UI_SELECT)
{
void *curcheat;
- for (curcheat = cheat_get_next_menu_entry(machine, NULL, NULL, NULL, NULL);
- curcheat != NULL;
+ for (curcheat = cheat_get_next_menu_entry(machine, NULL, NULL, NULL, NULL);
+ curcheat != NULL;
curcheat = cheat_get_next_menu_entry(machine, curcheat, NULL, NULL, NULL))
{
changed |= cheat_select_default_state(machine, curcheat);
}
}
-
+
/* handle individual cheats */
else if ((FPTR)event->itemref > 1)
{
@@ -2488,15 +2488,15 @@ static void menu_cheat_populate(running_machine *machine, ui_menu *menu)
const char *text, *subtext;
void *curcheat;
UINT32 flags;
-
+
/* iterate over cheats */
- for (curcheat = cheat_get_next_menu_entry(machine, NULL, &text, &subtext, &flags);
- curcheat != NULL;
+ for (curcheat = cheat_get_next_menu_entry(machine, NULL, &text, &subtext, &flags);
+ curcheat != NULL;
curcheat = cheat_get_next_menu_entry(machine, curcheat, &text, &subtext, &flags))
{
ui_menu_item_append(menu, text, subtext, flags, curcheat);
}
-
+
/* add a reset all option */
ui_menu_item_append(menu, "Reset All", NULL, 0, (void *)1);
}