summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2008-02-21 17:43:00 +0000
committer Aaron Giles <aaron@aarongiles.com>2008-02-21 17:43:00 +0000
commit8436bec1e396a8fc0804542ea12535c8cfde583b (patch)
treea9b95a92a2650dc7b585290151f74621578f7118 /src/emu
parente619861862dea975c7e4ef70d9737ff0b92e06d2 (diff)
Cleanups and version bump for 0.123u2.mame0123u2
Diffstat (limited to 'src/emu')
-rw-r--r--src/emu/cpu/sh4/sh4.c50
-rw-r--r--src/emu/devintrf.c144
-rw-r--r--src/emu/devintrf.h6
-rw-r--r--src/emu/info.c34
-rw-r--r--src/emu/mame.c2
-rw-r--r--src/emu/mconfig.c4
-rw-r--r--src/emu/mconfig.h2
-rw-r--r--src/emu/rendlay.c2
-rw-r--r--src/emu/sound/aica.c52
-rw-r--r--src/emu/sound/aica.h4
-rw-r--r--src/emu/sound/aicadsp.c4
-rw-r--r--src/emu/sound/aicalfo.c30
-rw-r--r--src/emu/ui.c2
-rw-r--r--src/emu/validity.c12
14 files changed, 174 insertions, 174 deletions
diff --git a/src/emu/cpu/sh4/sh4.c b/src/emu/cpu/sh4/sh4.c
index cb641af5bb7..13f12b6ca59 100644
--- a/src/emu/cpu/sh4/sh4.c
+++ b/src/emu/cpu/sh4/sh4.c
@@ -166,11 +166,11 @@ int sign_of(int n)
void zero(int n,int sign)
{
-if (sign == 0)
+if (sign == 0)
sh4.fr[n] = 0x00000000;
-else
+else
sh4.fr[n] = 0x80000000;
-if ((sh4.fpscr & PR) == 1)
+if ((sh4.fpscr & PR) == 1)
sh4.fr[n+1] = 0x00000000;
}
@@ -183,53 +183,53 @@ UINT32 abs;
if (abs < 0x00800000) {
if (((sh4.fpscr & DN) == 1) || (abs == 0x00000000)) {
if (sign_of(n) == 0) {
- zero(n, 0);
+ zero(n, 0);
return(SH4_FPU_PZERO);
} else {
- zero(n, 1);
+ zero(n, 1);
return(SH4_FPU_NZERO);
}
- } else
+ } else
return(SH4_FPU_DENORM);
- } else
- if (abs < 0x7f800000)
+ } else
+ if (abs < 0x7f800000)
return(SH4_FPU_NORM);
- else
+ else
if (abs == 0x7f800000) {
- if (sign_of(n) == 0)
+ if (sign_of(n) == 0)
return(SH4_FPU_PINF);
- else
+ else
return(SH4_FPU_NINF);
- } else
- if (abs < 0x7fc00000)
+ } else
+ if (abs < 0x7fc00000)
return(SH4_FPU_qNaN);
- else
+ else
return(SH4_FPU_sNaN);
} else { /* Double-precision */
if (abs < 0x00100000) {
if (((sh4.fpscr & DN) == 1) || ((abs == 0x00000000) && (sh4.fr[n+1] == 0x00000000))) {
if(sign_of(n) == 0) {
- zero(n, 0);
+ zero(n, 0);
return(SH4_FPU_PZERO);
} else {
- zero(n, 1);
+ zero(n, 1);
return(SH4_FPU_NZERO);
}
- } else
+ } else
return(SH4_FPU_DENORM);
} else
- if (abs < 0x7ff00000)
+ if (abs < 0x7ff00000)
return(SH4_FPU_NORM);
- else
+ else
if ((abs == 0x7ff00000) && (sh4.fr[n+1] == 0x00000000)) {
- if (sign_of(n) == 0)
+ if (sign_of(n) == 0)
return(SH4_FPU_PINF);
- else
+ else
return(SH4_FPU_NINF);
- } else
- if (abs < 0x7ff80000)
+ } else
+ if (abs < 0x7ff80000)
return(SH4_FPU_qNaN);
- else
+ else
return(SH4_FPU_sNaN);
}
return(SH4_FPU_NORM);
@@ -3383,7 +3383,7 @@ INLINE void FSRRA(UINT32 n)
INLINE void FSSCA(UINT32 n)
{
float angle;
-
+
angle = (((float)(sh4.fpul & 0xFFFF)) / 65536.0) * 2.0 * M_PI;
FP_RFS(n) = sinf(angle);
FP_RFS(n+1) = cosf(angle);
diff --git a/src/emu/devintrf.c b/src/emu/devintrf.c
index be9f3e8e10b..18037e3e8be 100644
--- a/src/emu/devintrf.c
+++ b/src/emu/devintrf.c
@@ -84,23 +84,23 @@ device_config *device_list_add(device_config **listheadptr, device_type type, co
device_config **devptr;
device_config *device;
deviceinfo info;
-
+
assert(listheadptr != NULL);
assert(type != NULL);
assert(tag != NULL);
-
+
/* find the end of the list, and ensure no duplicates along the way */
for (devptr = listheadptr; *devptr != NULL; devptr = &(*devptr)->next)
if (type == (*devptr)->type && strcmp(tag, (*devptr)->tag) == 0)
fatalerror("Attempted to add duplicate device: type=%s tag=%s\n", devtype_name(type), tag);
-
+
/* get the size of the inline config */
info.i = 0;
(*type)(NULL, NULL, DEVINFO_INT_INLINE_CONFIG_BYTES, &info);
-
+
/* allocate a new device */
device = malloc_or_die(sizeof(*device) + strlen(tag) + info.i);
-
+
/* populate all fields */
device->next = NULL;
device->type = type;
@@ -108,7 +108,7 @@ device_config *device_list_add(device_config **listheadptr, device_type type, co
device->inline_config = (info.i == 0) ? NULL : (device->tag + strlen(tag) + 1);
device->token = NULL;
strcpy(device->tag, tag);
-
+
/* reset the inline_config to 0 */
if (info.i > 0)
memset(device->inline_config, 0, info.i);
@@ -117,19 +117,19 @@ device_config *device_list_add(device_config **listheadptr, device_type type, co
info.set_info = NULL;
(*type)(NULL, NULL, DEVINFO_FCT_SET_INFO, &info);
device->set_info = info.set_info;
-
+
info.start = NULL;
(*type)(NULL, NULL, DEVINFO_FCT_START, &info);
device->start = info.start;
-
+
info.stop = NULL;
(*type)(NULL, NULL, DEVINFO_FCT_STOP, &info);
device->stop = info.stop;
-
+
info.reset = NULL;
(*type)(NULL, NULL, DEVINFO_FCT_RESET, &info);
device->reset = info.reset;
-
+
/* link us to the end and return */
*devptr = device;
return device;
@@ -156,7 +156,7 @@ void device_list_remove(device_config **listheadptr, device_type type, const cha
break;
if (*devptr == NULL)
fatalerror("Attempted to remove non-existant device: type=%s tag=%s\n", devtype_name(type), tag);
-
+
/* remove the device from the list */
device = *devptr;
*devptr = device->next;
@@ -167,8 +167,8 @@ void device_list_remove(device_config **listheadptr, device_type type, const cha
/*-------------------------------------------------
- device_list_items - return the number of
- items of a given type; DEVICE_TYPE_WILDCARD
+ device_list_items - return the number of
+ items of a given type; DEVICE_TYPE_WILDCARD
is allowed
-------------------------------------------------*/
@@ -176,51 +176,51 @@ int device_list_items(const device_config *listhead, device_type type)
{
const device_config *curdev;
int count = 0;
-
+
/* locate all devices */
for (curdev = listhead; curdev != NULL; curdev = curdev->next)
count += device_matches_type(curdev, type);
-
+
return count;
}
/*-------------------------------------------------
- device_list_first - return the first device
- in the list of a given type;
+ device_list_first - return the first device
+ in the list of a given type;
DEVICE_TYPE_WILDCARD is allowed
-------------------------------------------------*/
const device_config *device_list_first(const device_config *listhead, device_type type)
{
const device_config *curdev;
-
+
/* scan forward starting with the list head */
for (curdev = listhead; curdev != NULL; curdev = curdev->next)
if (device_matches_type(curdev, type))
return curdev;
-
+
return NULL;
}
/*-------------------------------------------------
- device_list_next - return the next device
- in the list of a given type;
+ device_list_next - return the next device
+ in the list of a given type;
DEVICE_TYPE_WILDCARD is allowed
-------------------------------------------------*/
const device_config *device_list_next(const device_config *prevdevice, device_type type)
{
const device_config *curdev;
-
+
assert(prevdevice != NULL);
/* scan forward starting with the item after the previous one */
for (curdev = prevdevice->next; curdev != NULL; curdev = curdev->next)
if (device_matches_type(curdev, type))
return curdev;
-
+
return NULL;
}
@@ -240,7 +240,7 @@ const device_config *device_list_find_by_tag(const device_config *listhead, devi
for (curdev = listhead; curdev != NULL; curdev = curdev->next)
if (device_matches_type(curdev, type) && strcmp(tag, curdev->tag) == 0)
return curdev;
-
+
/* fail */
return NULL;
}
@@ -253,8 +253,8 @@ const device_config *device_list_find_by_tag(const device_config *listhead, devi
/*-------------------------------------------------
- device_list_index - return the index of a
- device based on its type and tag;
+ device_list_index - return the index of a
+ device based on its type and tag;
DEVICE_TYPE_WILDCARD is allowed
-------------------------------------------------*/
@@ -262,7 +262,7 @@ int device_list_index(const device_config *listhead, device_type type, const cha
{
const device_config *curdev;
int index = 0;
-
+
/* locate all devices */
for (curdev = listhead; curdev != NULL; curdev = curdev->next)
if (device_matches_type(curdev, type))
@@ -271,7 +271,7 @@ int device_list_index(const device_config *listhead, device_type type, const cha
return index;
index++;
}
-
+
return -1;
}
@@ -291,7 +291,7 @@ const device_config *device_list_find_by_index(const device_config *listhead, de
for (curdev = listhead; curdev != NULL; curdev = curdev->next)
if (device_matches_type(curdev, type) && index-- == 0)
return curdev;
-
+
/* fail */
return NULL;
}
@@ -303,18 +303,18 @@ const device_config *device_list_find_by_index(const device_config *listhead, de
***************************************************************************/
/*-------------------------------------------------
- device_list_start - start the configured list
+ device_list_start - start the configured list
of devices for a machine
-------------------------------------------------*/
void device_list_start(running_machine *machine)
{
device_config *config;
-
+
/* add an exit callback for cleanup */
add_reset_callback(machine, device_list_reset);
add_exit_callback(machine, device_list_stop);
-
+
/* iterate over devices and start them */
for (config = (device_config *)machine->config->devicelist; config != NULL; config = config->next)
{
@@ -322,10 +322,10 @@ void device_list_start(running_machine *machine)
assert(config->type != NULL);
assert(config->start != NULL);
- /* call the start function */
+ /* call the start function */
config->token = (*config->start)(machine, config->tag, config->static_config, config->inline_config);
assert(config->token != NULL);
-
+
/* fatal error if this fails */
if (config->token == NULL)
fatalerror("Error starting device: type=%s tag=%s\n", devtype_name(config->type), config->tag);
@@ -334,24 +334,24 @@ void device_list_start(running_machine *machine)
/*-------------------------------------------------
- device_list_stop - stop the configured list
+ device_list_stop - stop the configured list
of devices for a machine
-------------------------------------------------*/
static void device_list_stop(running_machine *machine)
{
device_config *config;
-
+
/* iterate over devices and stop them */
for (config = (device_config *)machine->config->devicelist; config != NULL; config = config->next)
{
assert(config->token != NULL);
assert(config->type != NULL);
-
+
/* if we have a stop function, call it */
if (config->stop != NULL)
(*config->stop)(machine, config->token);
-
+
/* clear the token to indicate we are finished */
config->token = NULL;
}
@@ -359,14 +359,14 @@ static void device_list_stop(running_machine *machine)
/*-------------------------------------------------
- device_list_reset - reset the configured list
+ device_list_reset - reset the configured list
of devices for a machine
-------------------------------------------------*/
static void device_list_reset(running_machine *machine)
{
const device_config *config;
-
+
/* iterate over devices and stop them */
for (config = (device_config *)machine->config->devicelist; config != NULL; config = config->next)
device_reset(machine, config);
@@ -374,7 +374,7 @@ static void device_list_reset(running_machine *machine)
/*-------------------------------------------------
- device_reset - reset a device based on an
+ device_reset - reset a device based on an
allocated device_config
-------------------------------------------------*/
@@ -382,7 +382,7 @@ void device_reset(running_machine *machine, const device_config *config)
{
assert(config->token != NULL);
assert(config->type != NULL);
-
+
/* if we have a reset function, call it */
if (config->reset != NULL)
(*config->reset)(machine, config->token);
@@ -404,7 +404,7 @@ void devtag_reset(running_machine *machine, device_type type, const char *tag)
***************************************************************************/
/*-------------------------------------------------
- devtag_get_token - return the token associated
+ devtag_get_token - return the token associated
with an allocated device
-------------------------------------------------*/
@@ -418,8 +418,8 @@ void *devtag_get_token(running_machine *machine, device_type type, const char *t
/*-------------------------------------------------
- devtag_get_static_config - return a pointer to
- the static configuration for a device based on
+ devtag_get_static_config - return a pointer to
+ the static configuration for a device based on
type and tag
-------------------------------------------------*/
@@ -433,8 +433,8 @@ const void *devtag_get_static_config(running_machine *machine, device_type type,
/*-------------------------------------------------
- devtag_get_inline_config - return a pointer to
- the inline configuration for a device based on
+ devtag_get_inline_config - return a pointer to
+ the inline configuration for a device based on
type and tag
-------------------------------------------------*/
@@ -448,18 +448,18 @@ const void *devtag_get_inline_config(running_machine *machine, device_type type,
/*-------------------------------------------------
- device_get_info_int - return an integer state
+ device_get_info_int - return an integer state
value from an allocated device
-------------------------------------------------*/
INT64 device_get_info_int(running_machine *machine, const device_config *config, UINT32 state)
{
deviceinfo info;
-
+
assert(config->token != NULL);
assert(config->type != NULL);
assert(state >= DEVINFO_INT_FIRST && state <= DEVINFO_INT_LAST);
-
+
/* retrieve the value */
info.i = 0;
(*config->type)(machine, config->token, state, &info);
@@ -477,18 +477,18 @@ INT64 devtag_get_info_int(running_machine *machine, device_type type, const char
/*-------------------------------------------------
- device_get_info_ptr - return a pointer state
+ device_get_info_ptr - return a pointer state
value from an allocated device
-------------------------------------------------*/
void *device_get_info_ptr(running_machine *machine, const device_config *config, UINT32 state)
{
deviceinfo info;
-
+
assert(config->token != NULL);
assert(config->type != NULL);
assert(state >= DEVINFO_PTR_FIRST && state <= DEVINFO_PTR_LAST);
-
+
/* retrieve the value */
info.p = NULL;
(*config->type)(machine, config->token, state, &info);
@@ -506,18 +506,18 @@ void *devtag_get_info_ptr(running_machine *machine, device_type type, const char
/*-------------------------------------------------
- device_get_info_fct - return a function
+ device_get_info_fct - return a function
pointer state value from an allocated device
-------------------------------------------------*/
genf *device_get_info_fct(running_machine *machine, const device_config *config, UINT32 state)
{
deviceinfo info;
-
+
assert(config->token != NULL);
assert(config->type != NULL);
assert(state >= DEVINFO_FCT_FIRST && state <= DEVINFO_FCT_LAST);
-
+
/* retrieve the value */
info.f = 0;
(*config->type)(machine, config->token, state, &info);
@@ -535,18 +535,18 @@ genf *devtag_get_info_fct(running_machine *machine, device_type type, const char
/*-------------------------------------------------
- device_get_info_string - return a string value
+ device_get_info_string - return a string value
from an allocated device
-------------------------------------------------*/
const char *device_get_info_string(running_machine *machine, const device_config *config, UINT32 state)
{
deviceinfo info;
-
+
assert(config->token != NULL);
assert(config->type != NULL);
assert(state >= DEVINFO_STR_FIRST && state <= DEVINFO_STR_LAST);
-
+
/* retrieve the value */
info.s = get_temp_string_buffer();
(*config->type)(machine, config->token, state, &info);
@@ -564,18 +564,18 @@ const char *devtag_get_info_string(running_machine *machine, device_type type, c
/*-------------------------------------------------
- devtype_get_info_string - return a string value
- from a device type (does not need to be
+ devtype_get_info_string - return a string value
+ from a device type (does not need to be
allocated)
-------------------------------------------------*/
const char *devtype_get_info_string(device_type type, UINT32 state)
{
deviceinfo info;
-
+
assert(type != NULL);
assert(state >= DEVINFO_STR_FIRST && state <= DEVINFO_STR_LAST);
-
+
/* retrieve the value */
info.s = get_temp_string_buffer();
(*type)(NULL, NULL, state, &info);
@@ -589,18 +589,18 @@ const char *devtype_get_info_string(device_type type, UINT32 state)
***************************************************************************/
/*-------------------------------------------------
- device_set_info_int - set an integer state
+ device_set_info_int - set an integer state
value for an allocated device
-------------------------------------------------*/
void device_set_info_int(running_machine *machine, const device_config *config, UINT32 state, INT64 data)
{
deviceinfo info;
-
+
assert(config->token != NULL);
assert(config->type != NULL);
assert(state >= DEVINFO_INT_FIRST && state <= DEVINFO_INT_LAST);
-
+
/* set the value */
info.i = data;
(*config->set_info)(machine, config->token, state, &info);
@@ -617,18 +617,18 @@ void devtag_set_info_int(running_machine *machine, device_type type, const char
/*-------------------------------------------------
- device_set_info_ptr - set a pointer state
+ device_set_info_ptr - set a pointer state
value for an allocated device
-------------------------------------------------*/
void device_set_info_ptr(running_machine *machine, const device_config *config, UINT32 state, void *data)
{
deviceinfo info;
-
+
assert(config->token != NULL);
assert(config->type != NULL);
assert(state >= DEVINFO_PTR_FIRST && state <= DEVINFO_PTR_LAST);
-
+
/* set the value */
info.p = data;
(*config->set_info)(machine, config->token, state, &info);
@@ -645,18 +645,18 @@ void devtag_set_info_ptr(running_machine *machine, device_type type, const char
/*-------------------------------------------------
- device_set_info_fct - set a function pointer
+ device_set_info_fct - set a function pointer
state value for an allocated device
-------------------------------------------------*/
void device_set_info_fct(running_machine *machine, const device_config *config, UINT32 state, genf *data)
{
deviceinfo info;
-
+
assert(config->token != NULL);
assert(config->type != NULL);
assert(state >= DEVINFO_FCT_FIRST && state <= DEVINFO_FCT_LAST);
-
+
/* set the value */
info.f = data;
(*config->set_info)(machine, config->token, state, &info);
diff --git a/src/emu/devintrf.h b/src/emu/devintrf.h
index 5bb49d6b414..9b08ddced6e 100644
--- a/src/emu/devintrf.h
+++ b/src/emu/devintrf.h
@@ -39,14 +39,14 @@ enum
/* --- the following bits of info are returned as pointers --- */
DEVINFO_PTR_FIRST = 0x10000,
-
+
DEVINFO_PTR_DEVICE_SPECIFIC = 0x18000, /* R/W: device-specific values start here */
DEVINFO_PTR_LAST = 0x1ffff,
/* --- the following bits of info are returned as pointers to functions --- */
DEVINFO_FCT_FIRST = 0x20000,
-
+
DEVINFO_FCT_SET_INFO = DEVINFO_FCT_FIRST, /* R/O: device_set_info_func */
DEVINFO_FCT_START, /* R/O: device_start_func */
DEVINFO_FCT_STOP, /* R/O: device_stop_func */
@@ -99,7 +99,7 @@ union _deviceinfo
void * p; /* generic pointers */
genf * f; /* generic function pointers */
const char * s; /* generic strings */
-
+
device_set_info_func set_info; /* DEVINFO_FCT_SET_INFO */
device_start_func start; /* DEVINFO_FCT_START */
device_stop_func stop; /* DEVINFO_FCT_STOP */
diff --git a/src/emu/info.c b/src/emu/info.c
index 40c4f0232cc..671a94354c1 100644
--- a/src/emu/info.c
+++ b/src/emu/info.c
@@ -359,7 +359,7 @@ static void print_game_bios(FILE *out, const game_driver *game)
/* skip if no ROMs */
if (game->rom == NULL)
return;
-
+
/* iterate over ROM entries and look for BIOSes */
for (rom = game->rom; !ROMENTRY_ISEND(rom); rom++)
if (ROMENTRY_ISSYSTEM_BIOS(rom))
@@ -407,7 +407,7 @@ static void print_game_rom(FILE *out, const game_driver *game)
if ((is_disk && rom_type != 2) || (!is_disk && rom_type == 2))
continue;
- /* iterate through ROM entries */
+ /* iterate through ROM entries */
for (rom = rom_first_file(region); rom != NULL; rom = rom_next_file(rom))
{
int is_bios = ROM_GETBIOSFLAGS(rom);
@@ -417,7 +417,7 @@ static void print_game_rom(FILE *out, const game_driver *game)
const rom_entry *chunk;
char bios_name[100];
int length;
-
+
/* BIOS ROMs only apply to bioses */
if ((is_bios && rom_type != 0) || (!is_bios && rom_type == 0))
continue;
@@ -431,7 +431,7 @@ static void print_game_rom(FILE *out, const game_driver *game)
if (!ROM_NOGOODDUMP(rom) && clone_of != NULL)
{
const rom_entry *pregion, *prom;
-
+
/* scan the clone_of ROM for a matching ROM entry */
for (pregion = rom_first_region(clone_of); pregion != NULL; pregion = rom_next_region(pregion))
for (prom = rom_first_file(pregion); prom != NULL; prom = rom_next_file(prom))
@@ -478,7 +478,7 @@ static void print_game_rom(FILE *out, const game_driver *game)
{
char checksum[HASH_BUF_SIZE];
int hashtype;
-
+
/* iterate over hash function types and print out their values */
for (hashtype = 0; hashtype < HASH_NUM_FUNCTIONS; hashtype++)
if (hash_data_extract_printable_checksum(ROM_GETHASHDATA(rom), 1 << hashtype, checksum))
@@ -551,7 +551,7 @@ static void print_game_rom(FILE *out, const game_driver *game)
fprintf(out, " dispose=\"yes\"");
fprintf(out, " offset=\"%x\"", offset);
}
-
+
/* for disk entries, add the disk index */
else
fprintf(out, " index=\"%x\"", DISK_GETINDEX(rom));
@@ -579,12 +579,12 @@ static void print_game_sampleof(FILE *out, const game_driver *game, const machin
if (samplenames != NULL)
{
int sampnum;
-
+
/* iterate over sample names */
for (sampnum = 0; samplenames[sampnum] != NULL; sampnum++)
{
const char *cursampname = samplenames[sampnum];
-
+
/* only output sampleof if different from the game name */
if (cursampname[0] == '*' && strcmp(cursampname + 1, game->name) != 0)
fprintf(out, " sampleof=\"%s\"", xml_normalize_string(cursampname + 1));
@@ -596,7 +596,7 @@ static void print_game_sampleof(FILE *out, const game_driver *game, const machin
/*-------------------------------------------------
- print_game_sample - print a list of all
+ print_game_sample - print a list of all
samples referenced by a game_driver
-------------------------------------------------*/
@@ -613,17 +613,17 @@ static void print_game_sample(FILE *out, const game_driver *game, const machine_
if (samplenames != NULL)
{
int sampnum;
-
+
/* iterate over sample names */
for (sampnum = 0; samplenames[sampnum] != NULL; sampnum++)
{
const char *cursampname = samplenames[sampnum];
int dupnum;
-
+
/* ignore the special '*' samplename */
if (sampnum == 0 && cursampname[0] == '*')
continue;
-
+
/* filter out duplicates */
for (dupnum = 0; dupnum < sampnum; dupnum++)
if (strcmp(samplenames[dupnum], cursampname) == 0)
@@ -682,14 +682,14 @@ static void print_game_chips(FILE *out, const game_driver *game, const machine_c
static void print_game_display(FILE *out, const game_driver *game, const machine_config *config)
{
const device_config *screen;
-
+
/* iterate over screens */
for (screen = video_screen_first(config); screen != NULL; screen = video_screen_next(screen))
{
const screen_config *scrconfig = screen->inline_config;
-
+
fprintf(out, "\t\t<display");
-
+
switch (scrconfig->type)
{
case SCREEN_TYPE_RASTER: fprintf(out, " type=\"raster\""); break;
@@ -915,7 +915,7 @@ static void print_game_info(FILE *out, const game_driver *game)
/* close the topmost tag */
fprintf(out, "\t</" XML_TOP ">\n");
-
+
/* release resources */
end_resource_tracking();
machine_config_free(config);
@@ -930,7 +930,7 @@ static void print_game_info(FILE *out, const game_driver *game)
void print_mame_xml(FILE *out, const game_driver *const games[], const char *gamename)
{
int drvnum;
-
+
fprintf(out,
"<?xml version=\"1.0\"?>\n"
"<!DOCTYPE " XML_ROOT " [\n"
diff --git a/src/emu/mame.c b/src/emu/mame.c
index b06348652bd..10f8e3916ef 100644
--- a/src/emu/mame.c
+++ b/src/emu/mame.c
@@ -1585,7 +1585,7 @@ static void init_machine(running_machine *machine)
ui_set_startup_text(machine, "Initializing...", TRUE);
if (machine->gamedrv->driver_init != NULL)
(*machine->gamedrv->driver_init)(machine);
-
+
/* start the video and audio hardware */
video_init(machine);
sound_init(machine);
diff --git a/src/emu/mconfig.c b/src/emu/mconfig.c
index 20b5b988af8..5c9be8162be 100644
--- a/src/emu/mconfig.c
+++ b/src/emu/mconfig.c
@@ -26,13 +26,13 @@
machine_config *machine_config_alloc(void (*constructor)(machine_config *))
{
machine_config *config;
-
+
/* allocate a new configuration object */
config = malloc_or_die(sizeof(*config));
if (config == NULL)
return NULL;
memset(config, 0, sizeof(*config));
-
+
/* call the function to construct the data */
(*constructor)(config);
return config;
diff --git a/src/emu/mconfig.h b/src/emu/mconfig.h
index 089d1c6fc5d..b8a8b3ede7d 100644
--- a/src/emu/mconfig.h
+++ b/src/emu/mconfig.h
@@ -88,7 +88,7 @@ struct _machine_config
void (*sound_start)(running_machine *machine); /* one-time sound start callback */
void (*sound_reset)(running_machine *machine); /* sound reset callback */
-
+
device_config * devicelist; /* list head for devices */
};
diff --git a/src/emu/rendlay.c b/src/emu/rendlay.c
index 69572d99899..d23e8b29dbb 100644
--- a/src/emu/rendlay.c
+++ b/src/emu/rendlay.c
@@ -1355,7 +1355,7 @@ static int get_variable_value(const char *string, char **outputptr)
{
int scrnum = device_list_index(Machine->config->devicelist, VIDEO_SCREEN, device->tag);
const screen_config *scrconfig = device->inline_config;
-
+
/* native X aspect factor */
sprintf(temp, "~scr%dnativexaspect~", scrnum);
if (!strncmp(string, temp, strlen(temp)))
diff --git a/src/emu/sound/aica.c b/src/emu/sound/aica.c
index 7e0b3ce835d..79a86951c9b 100644
--- a/src/emu/sound/aica.c
+++ b/src/emu/sound/aica.c
@@ -71,7 +71,7 @@
#define DIPAN(slot) ((slot->udata.data[0x24/2]>>0x0)&0x001F)
#define EFSDL(slot) ((AICA->EFSPAN[slot*4]>>8)&0x000f)
-#define EFPAN(slot) ((AICA->EFSPAN[slot*4]>>0)&0x001f)
+#define EFPAN(slot) ((AICA->EFSPAN[slot*4]>>0)&0x001f)
//Envelope times in ms
static const double ARTimes[64]={100000/*infinity*/,100000/*infinity*/,8100.0,6900.0,6000.0,4800.0,4000.0,3400.0,3000.0,2400.0,2000.0,1700.0,1500.0,
@@ -356,7 +356,7 @@ static int EG_Update(struct _SLOT *slot)
slot->EG.volume+=slot->EG.AR;
if(slot->EG.volume>=(0x3ff<<EG_SHIFT))
{
- if (!LPSLNK(slot))
+ if (!LPSLNK(slot))
{
slot->EG.state=DECAY1;
if(slot->EG.D1R>=(1024<<EG_SHIFT)) //Skip DECAY1, go directly to DECAY2
@@ -386,8 +386,8 @@ static int EG_Update(struct _SLOT *slot)
{
slot->EG.volume=0;
AICA_StopSlot(slot,0);
-// slot->EG.volume=0x17f<<EG_SHIFT;
-// slot->EG.state=ATTACK;
+// slot->EG.volume=0x17f<<EG_SHIFT;
+// slot->EG.state=ATTACK;
}
break;
default:
@@ -529,7 +529,7 @@ static void AICA_Init(struct _AICA *AICA, const struct AICAinterface *intf, int
{
AICA->AICARAM = memory_region(intf->region);
AICA->AICARAM += intf->roffset;
- AICA->AICARAM_LENGTH = memory_region_length(intf->region);
+ AICA->AICARAM_LENGTH = memory_region_length(intf->region);
AICA->RAM_MASK = AICA->AICARAM_LENGTH-1;
AICA->RAM_MASK16 = AICA->RAM_MASK & 0x7ffffe;
AICA->DSP.AICARAM = (UINT16 *)AICA->AICARAM;
@@ -700,7 +700,7 @@ static void AICA_UpdateSlotReg(struct _AICA *AICA,int s,int r)
Compute_LFO(slot);
break;
case 0x24:
-// printf("[%02d]: %x to DISDL/DIPAN (PC=%x)\n", s, slot->udata.data[0x24/2], arm7_get_register(15));
+// printf("[%02d]: %x to DISDL/DIPAN (PC=%x)\n", s, slot->udata.data[0x24/2], arm7_get_register(15));
break;
}
}
@@ -728,13 +728,13 @@ static void AICA_UpdateReg(struct _AICA *AICA, int reg)
case 0x9:
AICA_MidiIn(0, AICA->udata.data[0x8/2]&0xff, 0);
break;
-/* case 0x12:
- case 0x13:
- case 0x14:
- case 0x15:
- case 0x16:
- case 0x17:
- break;*/
+/* case 0x12:
+ case 0x13:
+ case 0x14:
+ case 0x15:
+ case 0x16:
+ case 0x17:
+ break;*/
case 0x90:
case 0x91:
if(AICA->Master)
@@ -795,7 +795,7 @@ static void AICA_UpdateReg(struct _AICA *AICA, int reg)
case 0xa4: //SCIRE
case 0xa5:
- if(AICA->Master)
+ if(AICA->Master)
{
AICA->udata.data[0xa0/2] &= ~AICA->udata.data[0xa4/2];
ResetInterrupts(AICA);
@@ -860,9 +860,9 @@ static void AICA_UpdateRegR(struct _AICA *AICA, int reg)
case 0x10: // LP check
case 0x11:
{
-// int MSLC = (AICA->udata.data[0xc/2]>>8) & 0x3f; // which slot are we monitoring?
+// int MSLC = (AICA->udata.data[0xc/2]>>8) & 0x3f; // which slot are we monitoring?
-// AICA->udata.data[0x10/2] |= 0x8000; // set LP if necessary
+// AICA->udata.data[0x10/2] |= 0x8000; // set LP if necessary
}
break;
@@ -885,7 +885,7 @@ static void AICA_w16(struct _AICA *AICA,unsigned int addr,unsigned short val)
{
int slot=addr/0x80;
addr&=0x7f;
-// printf("%x to slot %d offset %x\n", val, slot, addr);
+// printf("%x to slot %d offset %x\n", val, slot, addr);
*((unsigned short *) (AICA->Slots[slot].udata.datab+(addr))) = val;
AICA_UpdateSlotReg(AICA,slot,addr&0x7f);
}
@@ -893,7 +893,7 @@ static void AICA_w16(struct _AICA *AICA,unsigned int addr,unsigned short val)
{
if (addr <= 0x2044)
{
-// printf("%x to EFSxx slot %d (addr %x)\n", val, (addr-0x2000)/4, addr&0x7f);
+// printf("%x to EFSxx slot %d (addr %x)\n", val, (addr-0x2000)/4, addr&0x7f);
AICA->EFSPAN[addr&0x7f] = val;
}
}
@@ -901,7 +901,7 @@ static void AICA_w16(struct _AICA *AICA,unsigned int addr,unsigned short val)
{
if (addr < 0x28be)
{
-// printf("%x to AICA global @ %x\n", val, addr & 0xff);
+// printf("%x to AICA global @ %x\n", val, addr & 0xff);
*((unsigned short *) (AICA->udata.datab+((addr&0xff)))) = val;
AICA_UpdateReg(AICA, addr&0xff);
}
@@ -969,8 +969,8 @@ static unsigned short AICA_r16(struct _AICA *AICA, unsigned int addr)
return AICA->IRQR;
}
}
-// else if (addr<0x700)
-// v=AICA->RINGBUF[(addr-0x600)/2];
+// else if (addr<0x700)
+// v=AICA->RINGBUF[(addr-0x600)/2];
return v;
}
@@ -1038,7 +1038,7 @@ INLINE INT32 AICA_UpdateSlot(struct _AICA *AICA, struct _SLOT *slot)
addr1=slot->cur_addr>>SHIFT;
addr2=slot->nxt_addr>>SHIFT;
}
- else if(PCMS(slot) == 0)
+ else if(PCMS(slot) == 0)
{
addr1=(slot->cur_addr>>(SHIFT-1))&AICA->RAM_MASK16;
addr2=(slot->nxt_addr>>(SHIFT-1))&AICA->RAM_MASK16;
@@ -1123,7 +1123,7 @@ INLINE INT32 AICA_UpdateSlot(struct _AICA *AICA, struct _SLOT *slot)
sample=(s>>SHIFT);
}
-
+
slot->prv_addr=slot->cur_addr;
slot->cur_addr+=step;
slot->nxt_addr=slot->cur_addr+(1<<SHIFT);
@@ -1166,7 +1166,7 @@ INLINE INT32 AICA_UpdateSlot(struct _AICA *AICA, struct _SLOT *slot)
slot->cur_quant = slot->cur_lpquant;
}
-// printf("Looping: slot_addr %x LSA %x LEA %x step %x base %x\n", *slot_addr[addr_select]>>SHIFT, LSA(slot), LEA(slot), slot->curstep, slot->adbase);
+// printf("Looping: slot_addr %x LSA %x LEA %x step %x base %x\n", *slot_addr[addr_select]>>SHIFT, LSA(slot), LEA(slot), slot->curstep, slot->adbase);
}
else if(PCMS(slot)>=2 && addr_select==1)
{
@@ -1231,7 +1231,7 @@ static void AICA_DoMasterSamples(struct _AICA *AICA, int nsamples)
smpr+=(sample*AICA->RPANTABLE[Enc])>>SHIFT;
}
}
-
+
AICA->BUFPTR&=63;
}
@@ -1299,7 +1299,7 @@ void aica_stop(void)
void AICA_set_ram_base(int which, void *base, int size)
{
- struct _AICA *AICA = sndti_token(SOUND_AICA, which);
+ struct _AICA *AICA = sndti_token(SOUND_AICA, which);
if (AICA)
{
AICA->AICARAM = base;
diff --git a/src/emu/sound/aica.h b/src/emu/sound/aica.h
index d4bdfe9c7dd..52a4c8a5037 100644
--- a/src/emu/sound/aica.h
+++ b/src/emu/sound/aica.h
@@ -1,6 +1,6 @@
/*
- Sega/Yamaha AICA emulation
+ Sega/Yamaha AICA emulation
*/
#ifndef _AICA_H_
@@ -8,7 +8,7 @@
#define MAX_AICA (2)
-struct AICAinterface
+struct AICAinterface
{
int region; /* region of 2M/8M RAM */
int roffset; /* offset in the region */
diff --git a/src/emu/sound/aicadsp.c b/src/emu/sound/aicadsp.c
index a9930dc759b..1879ea89ff8 100644
--- a/src/emu/sound/aicadsp.c
+++ b/src/emu/sound/aicadsp.c
@@ -86,7 +86,7 @@ void AICADSP_Step(struct _AICADSP *DSP)
for(step=0;step</*128*/DSP->LastStep;++step)
{
UINT16 *IPtr=DSP->MPRO+step*8;
-
+
// if(IPtr[0]==0 && IPtr[1]==0 && IPtr[2]==0 && IPtr[3]==0)
// break;
@@ -119,7 +119,7 @@ void AICADSP_Step(struct _AICADSP *DSP)
UINT32 MASA=(IPtr[6]>>9)&0x1f; //???
UINT32 ADREB=(IPtr[6]>>8)&0x1;
UINT32 NXADR=(IPtr[6]>>7)&0x1;
-
+
INT64 v;
//operations are done at 24 bit precision
diff --git a/src/emu/sound/aicalfo.c b/src/emu/sound/aicalfo.c
index 784dfa9cbde..a48db07969e 100644
--- a/src/emu/sound/aicalfo.c
+++ b/src/emu/sound/aicalfo.c
@@ -1,10 +1,10 @@
/*
- AICA LFO handling
+ AICA LFO handling
- Part of the AICA emulator package.
- (not compiled directly, #included from aica.c)
+ Part of the AICA emulator package.
+ (not compiled directly, #included from aica.c)
- By ElSemi, kingshriek, Deunan Knute, and R. Belmont
+ By ElSemi, kingshriek, Deunan Knute, and R. Belmont
*/
#define LFO_SHIFT 8
@@ -40,16 +40,16 @@ void AICALFO_Init(void)
for(i=0;i<256;++i)
{
int a,p;
-// float TL;
+// float TL;
//Saw
a=255-i;
if(i<128)
p=i;
else
- p=i-256;
+ p=i-256;
ALFO_SAW[i]=a;
PLFO_SAW[i]=p;
-
+
//Square
if(i<128)
{
@@ -63,7 +63,7 @@ void AICALFO_Init(void)
}
ALFO_SQR[i]=a;
PLFO_SQR[i]=p;
-
+
//Tri
if(i<128)
a=255-(i*2);
@@ -79,7 +79,7 @@ void AICALFO_Init(void)
p=i*2-511;
ALFO_TRI[i]=a;
PLFO_TRI[i]=p;
-
+
//noise
//a=lfo_noise[i];
a=mame_rand(Machine)&0xff;
@@ -107,10 +107,10 @@ signed int INLINE AICAPLFO_Step(struct _LFO *LFO)
{
int p;
- LFO->phase+=LFO->phase_step;
-#if LFO_SHIFT!=8
+ LFO->phase+=LFO->phase_step;
+#if LFO_SHIFT!=8
LFO->phase&=(1<<(LFO_SHIFT+8))-1;
-#endif
+#endif
p=LFO->table[LFO->phase>>LFO_SHIFT];
p=LFO->scale[p+128];
return p<<(SHIFT-LFO_SHIFT);
@@ -119,10 +119,10 @@ signed int INLINE AICAPLFO_Step(struct _LFO *LFO)
signed int INLINE AICAALFO_Step(struct _LFO *LFO)
{
int p;
- LFO->phase+=LFO->phase_step;
-#if LFO_SHIFT!=8
+ LFO->phase+=LFO->phase_step;
+#if LFO_SHIFT!=8
LFO->phase&=(1<<(LFO_SHIFT+8))-1;
-#endif
+#endif
p=LFO->table[LFO->phase>>LFO_SHIFT];
p=LFO->scale[p];
return p<<(SHIFT-LFO_SHIFT);
diff --git a/src/emu/ui.c b/src/emu/ui.c
index 417435587fd..7165b6f9c4e 100644
--- a/src/emu/ui.c
+++ b/src/emu/ui.c
@@ -1112,7 +1112,7 @@ int sprintf_game_info(char *buffer)
{
int index = device_list_index(Machine->config->devicelist, VIDEO_SCREEN, device->tag);
const screen_config *scrconfig = device->inline_config;
-
+
if (scrcount > 1)
bufptr += sprintf(bufptr, "Screen %d: ", index + 1);
diff --git a/src/emu/validity.c b/src/emu/validity.c
index dab6ecc2665..9e5100c59a7 100644
--- a/src/emu/validity.c
+++ b/src/emu/validity.c
@@ -100,7 +100,7 @@ INLINE UINT32 quark_string_crc(const char *string)
/*-------------------------------------------------
quark_add - add a quark to the table and
- connect it to the hash tables
+ connect it to the hash tables
-------------------------------------------------*/
INLINE void quark_add(quark_table *table, int index, UINT32 crc)
@@ -114,7 +114,7 @@ INLINE void quark_add(quark_table *table, int index, UINT32 crc)
/*-------------------------------------------------
- quark_table_get_first - return a pointer to the
+ quark_table_get_first - return a pointer to the
first hash entry connected to a CRC
-------------------------------------------------*/
@@ -130,7 +130,7 @@ INLINE quark_entry *quark_table_get_first(quark_table *table, UINT32 crc)
***************************************************************************/
/*-------------------------------------------------
- quark_table_alloc - allocate an array of
+ quark_table_alloc - allocate an array of
quark entries and a hash table
-------------------------------------------------*/
@@ -158,7 +158,7 @@ static quark_table *quark_table_alloc(UINT32 entries, UINT32 hashsize)
/*-------------------------------------------------
- quark_tables_create - build "quarks" for fast
+ quark_tables_create - build "quarks" for fast
string operations
-------------------------------------------------*/
@@ -782,7 +782,7 @@ static int validate_display(int drivnum, const machine_config *drv)
for (device = video_screen_first(drv); device != NULL; device = video_screen_next(device))
{
const screen_config *scrconfig = device->inline_config;
-
+
/* sanity check dimensions */
if ((scrconfig->defstate.width <= 0) || (scrconfig->defstate.height <= 0))
{
@@ -1450,7 +1450,7 @@ int mame_validitychecks(const game_driver *curdriver)
sound_checks -= osd_profiling_ticks();
error = validate_sound(drivnum, config) || error;
sound_checks += osd_profiling_ticks();
-
+
machine_config_free(config);
}