summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2010-06-17 06:55:54 +0000
committer Aaron Giles <aaron@aarongiles.com>2010-06-17 06:55:54 +0000
commit861db1eb49e7d1734d07ae8aafce2b6fdd88fece (patch)
tree051335a6f01bdd53ceed852c93bae1558b67ebcb /src/emu
parentf935e05a10192675f06f4d684747d5b3036ed568 (diff)
Cleanups and version bump.
Diffstat (limited to 'src/emu')
-rw-r--r--src/emu/clifront.c8
-rw-r--r--src/emu/cpu/cdp1802/cdp1802.c4
-rw-r--r--src/emu/cpu/cop400/cop400.c16
-rw-r--r--src/emu/cpu/i4004/i4004.c2
-rw-r--r--src/emu/cpu/i8008/i8008.c2
-rw-r--r--src/emu/cpu/i86/i86.c2
-rw-r--r--src/emu/cpu/m68000/m68kcpu.c4
-rw-r--r--src/emu/cpu/mcs48/mcs48.c2
-rw-r--r--src/emu/cpu/sm8500/sm8500.c4
-rw-r--r--src/emu/cpu/z180/z180.c6
-rw-r--r--src/emu/cpu/z8/z8.c2
-rw-r--r--src/emu/cpu/z80/z80daisy.c2
-rw-r--r--src/emu/cpu/z80/z80daisy.h2
-rw-r--r--src/emu/debug/debugvw.c2
-rw-r--r--src/emu/devcpu.c28
-rw-r--r--src/emu/devcpu.h40
-rw-r--r--src/emu/devintrf.c48
-rw-r--r--src/emu/devintrf.h62
-rw-r--r--src/emu/devlegcy.c68
-rw-r--r--src/emu/devlegcy.h160
-rw-r--r--src/emu/didisasm.h4
-rw-r--r--src/emu/diexec.c52
-rw-r--r--src/emu/diexec.h28
-rw-r--r--src/emu/diimage.h2
-rw-r--r--src/emu/dimemory.c54
-rw-r--r--src/emu/dimemory.h36
-rw-r--r--src/emu/dinvram.h2
-rw-r--r--src/emu/disound.c10
-rw-r--r--src/emu/disound.h8
-rw-r--r--src/emu/distate.c74
-rw-r--r--src/emu/distate.h14
-rw-r--r--src/emu/emucore.h10
-rw-r--r--src/emu/emuopts.c10
-rw-r--r--src/emu/info.c4
-rw-r--r--src/emu/inptport.h6
-rw-r--r--src/emu/inpttype.h2
-rw-r--r--src/emu/machine/6526cia.c2
-rw-r--r--src/emu/machine/eeprom.c10
-rw-r--r--src/emu/machine/eeprom.h28
-rw-r--r--src/emu/machine/generic.c2
-rw-r--r--src/emu/machine/intelfsh.c8
-rw-r--r--src/emu/machine/z80ctc.c8
-rw-r--r--src/emu/machine/z80ctc.h14
-rw-r--r--src/emu/machine/z80dart.c8
-rw-r--r--src/emu/machine/z80dart.h26
-rw-r--r--src/emu/machine/z80dma.c22
-rw-r--r--src/emu/machine/z80dma.h14
-rw-r--r--src/emu/machine/z80pio.c14
-rw-r--r--src/emu/machine/z80pio.h24
-rw-r--r--src/emu/machine/z80sio.c14
-rw-r--r--src/emu/machine/z80sio.h20
-rw-r--r--src/emu/machine/z80sti.c4
-rw-r--r--src/emu/machine/z80sti.h14
-rw-r--r--src/emu/mame.c4
-rw-r--r--src/emu/mame.h4
-rw-r--r--src/emu/mconfig.c2
-rw-r--r--src/emu/mconfig.h4
-rw-r--r--src/emu/schedule.c22
-rw-r--r--src/emu/schedule.h10
-rw-r--r--src/emu/sound.c10
-rw-r--r--src/emu/sound.h8
-rw-r--r--src/emu/sound/fm.c2
-rw-r--r--src/emu/sound/okim6295.c40
-rw-r--r--src/emu/sound/okim6295.h40
-rw-r--r--src/emu/sound/s14001a.h2
-rw-r--r--src/emu/sound/tms5110.c20
-rw-r--r--src/emu/sound/tms5220.c18
-rw-r--r--src/emu/timer.c6
-rw-r--r--src/emu/timer.h12
-rw-r--r--src/emu/validity.c2
-rw-r--r--src/emu/video.c12
-rw-r--r--src/emu/video.h14
-rw-r--r--src/emu/video/mc6845.c2
-rw-r--r--src/emu/video/pc_video.c2
-rw-r--r--src/emu/video/pc_video.h2
75 files changed, 625 insertions, 625 deletions
diff --git a/src/emu/clifront.c b/src/emu/clifront.c
index b6d08fcc021..6a08cb7de1a 100644
--- a/src/emu/clifront.c
+++ b/src/emu/clifront.c
@@ -671,7 +671,7 @@ int cli_info_listdevices(core_options *options, const char *gamename)
for (devconfig = config->devicelist.first(); devconfig != NULL; devconfig = devconfig->next())
{
printf(" %s ('%s')", devconfig->name(), devconfig->tag());
-
+
UINT32 clock = devconfig->clock();
if (clock >= 1000000000)
printf(" @ %d.%02d GHz\n", clock / 1000000000, (clock / 10000000) % 100);
@@ -813,8 +813,8 @@ static int info_listmedia(core_options *options, const char *gamename)
{
src = downcast<const legacy_image_device_config_base *>(dev)->file_extensions();
name = downcast<const legacy_image_device_config_base *>(dev)->instance_name();
- shortname = downcast<const legacy_image_device_config_base *>(dev)->brief_instance_name();
-
+ shortname = downcast<const legacy_image_device_config_base *>(dev)->brief_instance_name();
+
sprintf(paren_shortname, "(%s)", shortname);
printf("%-13s%-12s%-8s ", driver_name, name, paren_shortname);
@@ -829,7 +829,7 @@ static int info_listmedia(core_options *options, const char *gamename)
}
printf("\n");
}
- if (!devcount)
+ if (!devcount)
printf("%-13s(none)\n",driver_name);
count++;
diff --git a/src/emu/cpu/cdp1802/cdp1802.c b/src/emu/cpu/cdp1802/cdp1802.c
index a218e5ee38e..e6c8c1f0a3e 100644
--- a/src/emu/cpu/cdp1802/cdp1802.c
+++ b/src/emu/cpu/cdp1802/cdp1802.c
@@ -1090,8 +1090,8 @@ CPU_GET_INFO( cdp1802 )
case CPUINFO_FCT_RESET: info->reset = CPU_RESET_NAME(cdp1802); break;
case CPUINFO_FCT_EXECUTE: info->execute = CPU_EXECUTE_NAME(cdp1802); break;
case CPUINFO_FCT_DISASSEMBLE: info->disassemble = CPU_DISASSEMBLE_NAME(cdp1802); break;
- case CPUINFO_FCT_IMPORT_STATE: info->import_state = CPU_IMPORT_STATE_NAME(cdp1802); break;
- case CPUINFO_FCT_EXPORT_STATE: info->export_state = CPU_EXPORT_STATE_NAME(cdp1802); break;
+ case CPUINFO_FCT_IMPORT_STATE: info->import_state = CPU_IMPORT_STATE_NAME(cdp1802); break;
+ case CPUINFO_FCT_EXPORT_STATE: info->export_state = CPU_EXPORT_STATE_NAME(cdp1802); break;
case CPUINFO_FCT_EXPORT_STRING: info->export_string = CPU_EXPORT_STRING_NAME(cdp1802); break;
/* --- the following bits of info are returned as pointers --- */
diff --git a/src/emu/cpu/cop400/cop400.c b/src/emu/cpu/cop400/cop400.c
index 6ecf2b90a56..68dc8fe1ebd 100644
--- a/src/emu/cpu/cop400/cop400.c
+++ b/src/emu/cpu/cop400/cop400.c
@@ -92,7 +92,7 @@ struct _cop400_state
const address_space *program;
const address_space *data;
const address_space *io;
-
+
UINT8 featuremask;
/* registers */
@@ -1409,9 +1409,9 @@ static CPU_GET_INFO( cop400 )
case CPUINFO_FCT_RESET: info->reset = CPU_RESET_NAME(cop400); break;
case CPUINFO_FCT_EXECUTE: info->execute = CPU_EXECUTE_NAME(cop400); break;
case CPUINFO_FCT_DISASSEMBLE: /* set per-core */ break;
-// case CPUINFO_FCT_VALIDITY_CHECK: /* set per-core */ break;
- case CPUINFO_FCT_IMPORT_STATE: info->import_state = CPU_IMPORT_STATE_NAME(cop400); break;
- case CPUINFO_FCT_EXPORT_STATE: info->export_state = CPU_EXPORT_STATE_NAME(cop400); break;
+// case CPUINFO_FCT_VALIDITY_CHECK: /* set per-core */ break;
+ case CPUINFO_FCT_IMPORT_STATE: info->import_state = CPU_IMPORT_STATE_NAME(cop400); break;
+ case CPUINFO_FCT_EXPORT_STATE: info->export_state = CPU_EXPORT_STATE_NAME(cop400); break;
case CPUINFO_FCT_EXPORT_STRING: info->export_string = CPU_EXPORT_STRING_NAME(cop400); break;
/* --- the following bits of info are returned as pointers --- */
@@ -1443,7 +1443,7 @@ CPU_GET_INFO( cop410 )
/* --- the following bits of info are returned as pointers to functions --- */
case CPUINFO_FCT_INIT: info->init = CPU_INIT_NAME(cop410); break;
case CPUINFO_FCT_DISASSEMBLE: info->disassemble = CPU_DISASSEMBLE_NAME(cop410); break;
-// case CPUINFO_FCT_VALIDITY_CHECK: info->validity_check = CPU_VALIDITY_CHECK_NAME(cop410); break;
+// case CPUINFO_FCT_VALIDITY_CHECK: info->validity_check = CPU_VALIDITY_CHECK_NAME(cop410); break;
/* --- the following bits of info are returned as pointers --- */
case DEVINFO_PTR_INTERNAL_MEMORY_MAP + ADDRESS_SPACE_PROGRAM: info->internal_map8 = ADDRESS_MAP_NAME(program_512b); break;
@@ -1501,7 +1501,7 @@ CPU_GET_INFO( cop420 )
/* --- the following bits of info are returned as pointers to functions --- */
case CPUINFO_FCT_INIT: info->init = CPU_INIT_NAME(cop420); break;
case CPUINFO_FCT_DISASSEMBLE: info->disassemble = CPU_DISASSEMBLE_NAME(cop420); break;
-// case CPUINFO_FCT_VALIDITY_CHECK: info->validity_check = CPU_VALIDITY_CHECK_NAME(cop420); break;
+// case CPUINFO_FCT_VALIDITY_CHECK: info->validity_check = CPU_VALIDITY_CHECK_NAME(cop420); break;
/* --- the following bits of info are returned as pointers --- */
case DEVINFO_PTR_INTERNAL_MEMORY_MAP + ADDRESS_SPACE_PROGRAM: info->internal_map8 = ADDRESS_MAP_NAME(program_1kb); break;
@@ -1528,7 +1528,7 @@ CPU_GET_INFO( cop421 )
{
/* --- the following bits of info are returned as pointers to data or functions --- */
case CPUINFO_FCT_INIT: info->init = CPU_INIT_NAME(cop421); break;
-// case CPUINFO_FCT_VALIDITY_CHECK: info->validity_check = CPU_VALIDITY_CHECK_NAME(cop421); break;
+// case CPUINFO_FCT_VALIDITY_CHECK: info->validity_check = CPU_VALIDITY_CHECK_NAME(cop421); break;
/* --- the following bits of info are returned as NULL-terminated strings --- */
case DEVINFO_STR_NAME: strcpy(info->s, "COP421"); break;
@@ -1582,7 +1582,7 @@ CPU_GET_INFO( cop444 )
/* --- the following bits of info are returned as pointers to functions --- */
case CPUINFO_FCT_INIT: info->init = CPU_INIT_NAME(cop444); break;
case CPUINFO_FCT_DISASSEMBLE: info->disassemble = CPU_DISASSEMBLE_NAME(cop444); break;
-// case CPUINFO_FCT_VALIDITY_CHECK: info->validity_check = CPU_VALIDITY_CHECK_NAME(cop444); break;
+// case CPUINFO_FCT_VALIDITY_CHECK: info->validity_check = CPU_VALIDITY_CHECK_NAME(cop444); break;
/* --- the following bits of info are returned as pointers --- */
case DEVINFO_PTR_INTERNAL_MEMORY_MAP + ADDRESS_SPACE_PROGRAM: info->internal_map8 = ADDRESS_MAP_NAME(program_2kb); break;
diff --git a/src/emu/cpu/i4004/i4004.c b/src/emu/cpu/i4004/i4004.c
index b82ad9517ad..81595372e27 100644
--- a/src/emu/cpu/i4004/i4004.c
+++ b/src/emu/cpu/i4004/i4004.c
@@ -450,7 +450,7 @@ static CPU_INIT( i4004 )
state->state_add(STATE_GENPC, "GENPC", cpustate->PC.w.l).mask(0x0fff).noshow();
state->state_add(STATE_GENFLAGS, "GENFLAGS", cpustate->flags).mask(0x0f).callimport().callexport().noshow().formatstr("%4s");
state->state_add(I4004_A, "A", cpustate->A).mask(0x0f);
-
+
astring tempstr;
for (int regnum = 0; regnum < 8; regnum++)
state->state_add(I4004_R01 + regnum, tempstr.format("R%X%X", regnum*2, regnum*2+1), cpustate->R[regnum]);
diff --git a/src/emu/cpu/i8008/i8008.c b/src/emu/cpu/i8008/i8008.c
index cb23f8eb96b..a63c089029a 100644
--- a/src/emu/cpu/i8008/i8008.c
+++ b/src/emu/cpu/i8008/i8008.c
@@ -535,7 +535,7 @@ static CPU_INIT( i8008 )
state->state_add(I8008_E, "E", cpustate->E);
state->state_add(I8008_H, "H", cpustate->H);
state->state_add(I8008_L, "L", cpustate->L);
-
+
astring tempstr;
for (int addrnum = 0; addrnum < 8; addrnum++)
state->state_add(I8008_ADDR1 + addrnum, tempstr.format("ADDR%d", addrnum + 1), cpustate->ADDR[addrnum].w.l).mask(0xfff);
diff --git a/src/emu/cpu/i86/i86.c b/src/emu/cpu/i86/i86.c
index 45277efee8e..103fdba4d11 100644
--- a/src/emu/cpu/i86/i86.c
+++ b/src/emu/cpu/i86/i86.c
@@ -466,7 +466,7 @@ static CPU_EXPORT_STRING( i8086 )
case I8086_GENSP:
string.printf("%04X:%04X", cpustate->sregs[SS] & 0xffff, cpustate->regs.w[SP] & 0xffff);
break;
-
+
case STATE_GENFLAGS:
cpustate->flags = CompressFlags();
string.printf("%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c",
diff --git a/src/emu/cpu/m68000/m68kcpu.c b/src/emu/cpu/m68000/m68kcpu.c
index 3ca4ea72011..247c5646d8e 100644
--- a/src/emu/cpu/m68000/m68kcpu.c
+++ b/src/emu/cpu/m68000/m68kcpu.c
@@ -853,7 +853,7 @@ static CPU_EXPORT_STRING( m68k )
case M68K_FP7:
string.printf("%f", fx80_to_double(REG_FP[7]));
break;
-
+
case STATE_GENFLAGS:
sr = m68ki_get_sr(m68k);
string.printf("%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c",
@@ -1309,7 +1309,7 @@ static CPU_INIT( m68000 )
m68k->cyc_shift = 1;
m68k->cyc_reset = 132;
m68k->has_pmmu = 0;
-
+
define_state(device);
}
diff --git a/src/emu/cpu/mcs48/mcs48.c b/src/emu/cpu/mcs48/mcs48.c
index f9aee62af00..9aa50c377a4 100644
--- a/src/emu/cpu/mcs48/mcs48.c
+++ b/src/emu/cpu/mcs48/mcs48.c
@@ -875,7 +875,7 @@ static void mcs48_init(legacy_cpu_device *device, device_irq_callback irqcallbac
state->state_add(MCS48_TPRE, "TPRE", cpustate->prescaler).mask(0x1f);
state->state_add(MCS48_P1, "P1", cpustate->p1);
state->state_add(MCS48_P2, "P2", cpustate->p2);
-
+
astring tempstr;
for (int regnum = 0; regnum < 8; regnum++)
state->state_add(MCS48_R0 + regnum, tempstr.format("R%d", regnum), cpustate->rtemp).callimport().callexport();
diff --git a/src/emu/cpu/sm8500/sm8500.c b/src/emu/cpu/sm8500/sm8500.c
index 5b1fa3b9c34..379aba6bd37 100644
--- a/src/emu/cpu/sm8500/sm8500.c
+++ b/src/emu/cpu/sm8500/sm8500.c
@@ -387,7 +387,7 @@ static void sm8500_set_irq_line( sm8500_state *cpustate, int irqline, int state
UINT8 *sm8500_get_internal_ram(legacy_cpu_device *device)
{
sm8500_state *cpustate = get_safe_token(device);
- return cpustate->internal_ram;
+ return cpustate->internal_ram;
}
static CPU_SET_INFO( sm8500 )
@@ -520,7 +520,7 @@ CPU_GET_INFO( sm8500 )
case CPUINFO_FCT_EXECUTE: info->execute = CPU_EXECUTE_NAME(sm8500); break;
case CPUINFO_FCT_BURN: info->burn = CPU_BURN_NAME(sm8500); break;
case CPUINFO_FCT_DISASSEMBLE: info->disassemble = CPU_DISASSEMBLE_NAME(sm8500); break;
- case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &cpustate->icount; break;
+ case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &cpustate->icount; break;
case DEVINFO_STR_NAME: strcpy( info->s, "sm8500" ); break;
case DEVINFO_STR_FAMILY: strcpy( info->s, "Sharp SM8500" ); break;
diff --git a/src/emu/cpu/z180/z180.c b/src/emu/cpu/z180/z180.c
index 81698c2d9b7..8bf80c1cf75 100644
--- a/src/emu/cpu/z180/z180.c
+++ b/src/emu/cpu/z180/z180.c
@@ -796,7 +796,7 @@ static void set_irq_line(z180_state *cpustate, int irqline, int state);
/***************************************************************************
CPU PREFIXES
-
+
order is important here - see z180tbl.h
***************************************************************************/
@@ -1981,9 +1981,9 @@ static CPU_INIT( z180 )
state->state_add(Z180_IFF1, "IFF1", cpustate->IFF1).mask(0x1);
state->state_add(Z180_IFF2, "IFF2", cpustate->IFF2).mask(0x1);
state->state_add(Z180_HALT, "HALT", cpustate->HALT).mask(0x1);
-
+
state->state_add(Z180_IOLINES, "IOLINES", cpustate->ioltemp).mask(0xffffff).callimport();
-
+
state->state_add(Z180_CNTLA0, "CNTLA0", cpustate->IO_CNTLA0);
state->state_add(Z180_CNTLA1, "CNTLA1", cpustate->IO_CNTLA1);
state->state_add(Z180_CNTLB0, "CNTLB0", cpustate->IO_CNTLB0);
diff --git a/src/emu/cpu/z8/z8.c b/src/emu/cpu/z8/z8.c
index a903e91b591..d96e9b74ca5 100644
--- a/src/emu/cpu/z8/z8.c
+++ b/src/emu/cpu/z8/z8.c
@@ -654,7 +654,7 @@ static CPU_INIT( z8 )
state->state_add(Z8_T0, "T0", cpustate->t0);
state->state_add(Z8_T1, "T1", cpustate->t1);
state->state_add(STATE_GENFLAGS, "GENFLAGS", cpustate->r[Z8_REGISTER_FLAGS]).noshow().formatstr("%6s");
-
+
astring tempstr;
for (int regnum = 0; regnum < 16; regnum++)
state->state_add(Z8_R0 + regnum, tempstr.format("R%d", regnum), cpustate->fake_r[regnum]).callimport().callexport();
diff --git a/src/emu/cpu/z80/z80daisy.c b/src/emu/cpu/z80/z80daisy.c
index 185a47bc829..c24c117b84a 100644
--- a/src/emu/cpu/z80/z80daisy.c
+++ b/src/emu/cpu/z80/z80daisy.c
@@ -88,7 +88,7 @@ void z80_daisy_chain::init(device_t *cpudevice, const z80_daisy_config *daisy)
device_t *target = cpudevice->siblingdevice(daisy->devname);
if (target == NULL)
fatalerror("Unable to locate device '%s'", daisy->devname);
-
+
// make sure it has an interface
device_z80daisy_interface *intf;
if (!target->interface(intf))
diff --git a/src/emu/cpu/z80/z80daisy.h b/src/emu/cpu/z80/z80daisy.h
index dee7525f44d..f3e41b54b2d 100644
--- a/src/emu/cpu/z80/z80daisy.h
+++ b/src/emu/cpu/z80/z80daisy.h
@@ -90,7 +90,7 @@ protected:
{
public:
daisy_entry(device_t *device);
-
+
daisy_entry * m_next; // next device
device_t * m_device; // associated device
device_z80daisy_interface * m_interface; // associated device's daisy interface
diff --git a/src/emu/debug/debugvw.c b/src/emu/debug/debugvw.c
index 1f934fb0090..c99f590d4e9 100644
--- a/src/emu/debug/debugvw.c
+++ b/src/emu/debug/debugvw.c
@@ -1595,7 +1595,7 @@ static offs_t disasm_view_find_pc_backwards(const address_space *space, offs_t t
{
cpu_device *cpudevice = downcast<cpu_device *>(space->cpu);
assert(cpudevice != NULL);
-
+
int minlen = memory_byte_to_address(space, cpudevice->min_opcode_bytes());
int maxlen = memory_byte_to_address(space, cpudevice->max_opcode_bytes());
offs_t targetpcbyte = memory_address_to_byte(space, targetpc) & space->logbytemask;
diff --git a/src/emu/devcpu.c b/src/emu/devcpu.c
index b6bf588f690..7e7fe565d80 100644
--- a/src/emu/devcpu.c
+++ b/src/emu/devcpu.c
@@ -121,14 +121,14 @@ bool legacy_cpu_device_config::device_process_token(UINT32 entrytype, const mach
}
return true;
}
-
+
// everything else goes to our parent
return device_config::device_process_token(entrytype, tokens);
}
//-------------------------------------------------
-// execute_clocks_to_cycles - convert the raw
+// execute_clocks_to_cycles - convert the raw
// clock into cycles per second
//-------------------------------------------------
@@ -136,16 +136,16 @@ UINT32 legacy_cpu_device_config::execute_clocks_to_cycles(UINT32 clocks) const
{
UINT32 multiplier = get_legacy_config_int(CPUINFO_INT_CLOCK_MULTIPLIER);
UINT32 divider = get_legacy_config_int(CPUINFO_INT_CLOCK_DIVIDER);
-
+
if (multiplier == 0) multiplier = 1;
if (divider == 0) divider = 1;
-
+
return (clocks * multiplier + divider - 1) / divider;
}
//-------------------------------------------------
-// execute_cycles_to_clocks - convert a cycle
+// execute_cycles_to_clocks - convert a cycle
// count back to raw clocks
//-------------------------------------------------
@@ -153,10 +153,10 @@ UINT32 legacy_cpu_device_config::execute_cycles_to_clocks(UINT32 cycles) const
{
UINT32 multiplier = get_legacy_config_int(CPUINFO_INT_CLOCK_MULTIPLIER);
UINT32 divider = get_legacy_config_int(CPUINFO_INT_CLOCK_DIVIDER);
-
+
if (multiplier == 0) multiplier = 1;
if (divider == 0) divider = 1;
-
+
return (cycles * divider + multiplier - 1) / multiplier;
}
@@ -315,7 +315,7 @@ void legacy_cpu_device::device_start()
int colon = tempstr.chr(0, ':');
int length = tempstr.len() - colon - 1;
tempstr.substr(0, colon);
-
+
astring formatstr;
formatstr.printf("%%%ds", length);
device_state_entry &entry = state_add(index, tempstr, m_state_io).callimport().callexport().formatstr(formatstr);
@@ -325,7 +325,7 @@ void legacy_cpu_device::device_start()
}
state_add(STATE_GENPC, "curpc", m_state_io).callimport().callexport().formatstr("%8s").noshow();
state_add(STATE_GENPCBASE, "curpcbase", m_state_io).callimport().callexport().formatstr("%8s").noshow();
-
+
const char *string = get_legacy_runtime_string(CPUINFO_STR_FLAGS);
if (string != NULL && string[0] != 0)
{
@@ -377,7 +377,7 @@ void legacy_cpu_device::execute_burn(INT32 cycles)
//-------------------------------------------------
-// memory_translate - perform address translation
+// memory_translate - perform address translation
// on the provided address
//-------------------------------------------------
@@ -390,7 +390,7 @@ bool legacy_cpu_device::memory_translate(int spacenum, int intention, offs_t &ad
//-------------------------------------------------
-// memory_read - read device memory, allowing for
+// memory_read - read device memory, allowing for
// device specific overrides
//-------------------------------------------------
@@ -403,7 +403,7 @@ bool legacy_cpu_device::memory_read(int spacenum, offs_t offset, int size, UINT6
//-------------------------------------------------
-// memory_write - write device memory, allowing
+// memory_write - write device memory, allowing
// for device specific overrides
//-------------------------------------------------
@@ -416,7 +416,7 @@ bool legacy_cpu_device::memory_write(int spacenum, offs_t offset, int size, UINT
//-------------------------------------------------
-// memory_read - read device opcode memory,
+// memory_read - read device opcode memory,
// allowing for device specific overrides
//-------------------------------------------------
@@ -429,7 +429,7 @@ bool legacy_cpu_device::memory_readop(offs_t offset, int size, UINT64 &value)
//-------------------------------------------------
-// debug_setup - set up any device-specific
+// debug_setup - set up any device-specific
// debugging commands or state
//-------------------------------------------------
diff --git a/src/emu/devcpu.h b/src/emu/devcpu.h
index 81bd1d3ea3f..c5a4f8e46ef 100644
--- a/src/emu/devcpu.h
+++ b/src/emu/devcpu.h
@@ -281,12 +281,12 @@ enum
#define cpu_adjust_icount device_adjust_icount
#define cpu_abort_timeslice device_abort_timeslice
-#define cpu_triggerint device_triggerint
-#define cpu_set_input_line device_set_input_line
-#define cpu_set_input_line_vector device_set_input_line_vector
-#define cpu_set_input_line_and_vector device_set_input_line_and_vector
-#define cpu_set_irq_callback device_set_irq_callback
-#define cpu_spin_until_int device_spin_until_int
+#define cpu_triggerint device_triggerint
+#define cpu_set_input_line device_set_input_line
+#define cpu_set_input_line_vector device_set_input_line_vector
+#define cpu_set_input_line_and_vector device_set_input_line_and_vector
+#define cpu_set_irq_callback device_set_irq_callback
+#define cpu_spin_until_int device_spin_until_int
#define cpu_get_address_space device_get_space
@@ -403,9 +403,9 @@ union cpuinfo
// ======================> cpu_device_config
-class cpu_device_config : public device_config,
- public device_config_execute_interface,
- public device_config_memory_interface,
+class cpu_device_config : public device_config,
+ public device_config_execute_interface,
+ public device_config_memory_interface,
public device_config_state_interface,
public device_config_disasm_interface
{
@@ -431,7 +431,7 @@ public:
// allocators
static device_config *static_alloc_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock);
virtual device_t *alloc_device(running_machine &machine) const;
-
+
// basic information getters
virtual const char *name() const { return get_legacy_config_string(DEVINFO_STR_NAME); }
virtual const rom_entry *rom_region() const { return reinterpret_cast<const rom_entry *>(get_legacy_config_ptr(DEVINFO_PTR_ROM_REGION)); }
@@ -473,9 +473,9 @@ const device_type CPU = legacy_cpu_device_config::static_alloc_device_config;
// ======================> cpu_device
-class cpu_device : public device_t,
- public device_execute_interface,
- public device_memory_interface,
+class cpu_device : public device_t,
+ public device_execute_interface,
+ public device_memory_interface,
public device_state_interface,
public device_disasm_interface
{
@@ -509,29 +509,29 @@ public:
cpu_type cputype() const { return m_cpu_config.m_cputype; }
void *token() const { return m_token; }
-
+
protected:
// device-level overrides
virtual void device_start();
virtual void device_reset();
virtual void device_debug_setup();
-
+
// device_execute_interface overrides
virtual void execute_run();
virtual void execute_burn(INT32 cycles);
virtual void execute_set_input(int inputnum, int state) { set_legacy_runtime_int(CPUINFO_INT_INPUT_STATE + inputnum, state); }
-
+
// device_memory_interface overrides
virtual bool memory_translate(int spacenum, int intention, offs_t &address);
virtual bool memory_read(int spacenum, offs_t offset, int size, UINT64 &value);
virtual bool memory_write(int spacenum, offs_t offset, int size, UINT64 value);
virtual bool memory_readop(offs_t offset, int size, UINT64 &value);
-
+
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry);
virtual void state_export(const device_state_entry &entry);
virtual void state_string_export(const device_state_entry &entry, astring &string);
-
+
// device_disasm_interface overrides
virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options);
@@ -545,9 +545,9 @@ protected:
// internal state
const legacy_cpu_device_config &m_cpu_config; // reference to the config
void * m_token; // pointer to our state
-
+
cpu_set_info_func m_set_info; // extracted legacy function pointers
- cpu_execute_func m_execute; //
+ cpu_execute_func m_execute; //
cpu_burn_func m_burn; //
cpu_translate_func m_translate; //
cpu_read_func m_read; //
diff --git a/src/emu/devintrf.c b/src/emu/devintrf.c
index 3565f7169ff..91b4fccaaa0 100644
--- a/src/emu/devintrf.c
+++ b/src/emu/devintrf.c
@@ -109,7 +109,7 @@ void device_list::import_config_list(const device_config_list &list, running_mac
{
// remember the machine for later use
m_machine = &machine;
-
+
// append each device from the configuration list
for (const device_config *devconfig = list.first(); devconfig != NULL; devconfig = devconfig->next())
append(devconfig->tag(), devconfig->alloc_device(*m_machine));
@@ -137,7 +137,7 @@ void device_list::start_all()
int numstarted = 0;
while (numstarted < devcount)
{
- // iterate over devices and start them
+ // iterate over devices and start them
int prevstarted = numstarted;
for (device_t *device = first(); device != NULL; device = device->next())
if (!device->started())
@@ -257,7 +257,7 @@ device_config_interface::~device_config_interface()
//-------------------------------------------------
-// interface_config_complete - perform any
+// interface_config_complete - perform any
// operations now that the configuration is
// complete
//-------------------------------------------------
@@ -281,7 +281,7 @@ bool device_config_interface::interface_process_token(UINT32 entrytype, const ma
//-------------------------------------------------
// interface_validity_check - default validation
-// for a device after the configuration has been
+// for a device after the configuration has been
// constructed
//-------------------------------------------------
@@ -332,7 +332,7 @@ device_config::~device_config()
//-------------------------------------------------
-// config_complete - called when the
+// config_complete - called when the
// configuration of a device is complete
//-------------------------------------------------
@@ -341,7 +341,7 @@ void device_config::config_complete()
// first notify the interfaces
for (device_config_interface *intf = m_interface_list; intf != NULL; intf = intf->interface_next())
intf->interface_config_complete();
-
+
// then notify the device itself
device_config_complete();
}
@@ -373,7 +373,7 @@ void device_config::process_token(UINT32 entrytype, const machine_config_token *
m_static_config = TOKEN_GET_PTR(tokens, voidptr);
processed = true;
break;
-
+
// provide inline device data packed into a 16-bit space
case MCONFIG_TOKEN_DEVICE_INLINE_DATA16:
TOKEN_UNGET_UINT32(tokens);
@@ -451,14 +451,14 @@ void device_config::process_token(UINT32 entrytype, const machine_config_token *
assert(!processed);
processed = true;
}
-
+
// or it might be processed by the device itself
if (device_process_token(entrytype, tokens))
{
assert(!processed);
processed = true;
}
-
+
// regardless, *somebody* must handle it
if (!processed)
throw emu_fatalerror("Unhandled token %d for device '%s'", entrytype, tag());
@@ -478,17 +478,17 @@ bool device_config::validity_check(const game_driver &driver) const
for (device_config_interface *intf = m_interface_list; intf != NULL; intf = intf->interface_next())
if (intf->interface_validity_check(driver))
error = true;
-
+
// let the device itself validate
if (device_validity_check(driver))
error = true;
-
+
return error;
}
//-------------------------------------------------
-// device_config_complete - perform any
+// device_config_complete - perform any
// operations now that the configuration is
// complete
//-------------------------------------------------
@@ -512,7 +512,7 @@ bool device_config::device_process_token(UINT32 entrytype, const machine_config_
//-------------------------------------------------
-// device_validity_check - validate a device after
+// device_validity_check - validate a device after
// the configuration has been constructed
//-------------------------------------------------
@@ -536,7 +536,7 @@ const rom_entry *device_config::rom_region() const
//-------------------------------------------------
// machine_config_tokens - return a pointer to
-// a set of machine configuration tokens
+// a set of machine configuration tokens
// describing sub-devices for this device
//-------------------------------------------------
@@ -819,17 +819,17 @@ void device_t::start()
{
// populate the region field
m_region = m_machine.region(tag());
-
+
// let the interfaces do their pre-work
for (device_interface *intf = m_interface_list; intf != NULL; intf = intf->interface_next())
intf->interface_pre_start();
-
+
// remember the number of state registrations
int state_registrations = state_save_get_reg_count(machine);
-
+
// start the device
device_start();
-
+
// complain if nothing was registered by the device
state_registrations = state_save_get_reg_count(machine) - state_registrations;
device_execute_interface *exec;
@@ -844,11 +844,11 @@ void device_t::start()
// let the interfaces do their post-work
for (device_interface *intf = m_interface_list; intf != NULL; intf = intf->interface_next())
intf->interface_post_start();
-
+
// force an update of the clock
notify_clock_changed();
- // register our save states
+ // register our save states
state_save_register_device_item(this, 0, m_clock);
state_save_register_device_item(this, 0, m_unscaled_clock);
state_save_register_device_item(this, 0, m_clock_scale);
@@ -867,7 +867,7 @@ void device_t::debug_setup()
// notify the interface
for (device_interface *intf = m_interface_list; intf != NULL; intf = intf->interface_next())
intf->interface_debug_setup();
-
+
// notify the device
device_debug_setup();
}
@@ -882,7 +882,7 @@ void device_t::reset()
// let the interfaces do their pre-work
for (device_interface *intf = m_interface_list; intf != NULL; intf = intf->interface_next())
intf->interface_pre_reset();
-
+
// reset the device
device_reset();
@@ -902,7 +902,7 @@ void device_t::pre_save()
// notify the interface
for (device_interface *intf = m_interface_list; intf != NULL; intf = intf->interface_next())
intf->interface_pre_save();
-
+
// notify the device
device_pre_save();
}
@@ -918,7 +918,7 @@ void device_t::post_load()
// notify the interface
for (device_interface *intf = m_interface_list; intf != NULL; intf = intf->interface_next())
intf->interface_post_load();
-
+
// notify the device
device_post_load();
}
diff --git a/src/emu/devintrf.h b/src/emu/devintrf.h
index fa41f383c54..52d51c4ef95 100644
--- a/src/emu/devintrf.h
+++ b/src/emu/devintrf.h
@@ -52,10 +52,10 @@
// MACROS
//**************************************************************************
-// macro for specifying a clock derived from an owning device
+// macro for specifying a clock derived from an owning device
#define DERIVED_CLOCK(num, den) (0xff000000 | ((num) << 12) | ((den) << 0))
-// shorthand for accessing devices by machine/type/tag
+// shorthand for accessing devices by machine/type/tag
#define devtag_get_device(mach,tag) (mach)->device(tag)
#define devtag_reset(mach,tag) (mach)->device(tag)->reset()
@@ -123,11 +123,11 @@ typedef device_config *(*device_type)(const machine_config &mconfig, const char
// ======================> tagged_device_list
// tagged_device_list is a tagged_list with additional searching based on type
-template<class T>
+template<class T>
class tagged_device_list : public tagged_list<T>
{
typedef tagged_list<T> super;
-
+
public:
tagged_device_list(resource_pool &pool = global_resource_pool)
: tagged_list<T>(pool) { }
@@ -137,7 +137,7 @@ public:
using super::count;
using super::index;
using super::find;
-
+
// provide type-specific overrides
T *first(device_type type) const
{
@@ -145,14 +145,14 @@ public:
for (cur = super::first(); cur != NULL && cur->type() != type; cur = cur->next()) ;
return cur;
}
-
+
int count(device_type type) const
{
int num = 0;
for (const T *curdev = first(type); curdev != NULL; curdev = curdev->typenext()) num++;
return num;
}
-
+
int index(device_type type, T *object) const
{
int num = 0;
@@ -160,13 +160,13 @@ public:
if (cur == object) return num;
return -1;
}
-
+
int index(device_type type, const char *tag) const
{
T *object = find(tag);
return (object != NULL && object->type() == type) ? index(type, object) : -1;
}
-
+
T *find(device_type type, int index) const
{
for (T *cur = first(type); cur != NULL; cur = cur->typenext())
@@ -200,12 +200,12 @@ typedef tagged_device_list<device_config> device_config_list;
class device_list : public tagged_device_list<device_t>
{
running_machine *m_machine;
-
+
static void static_reset(running_machine *machine);
static void static_exit(running_machine *machine);
static void static_pre_save(running_machine *machine, void *param);
static void static_post_load(running_machine *machine, void *param);
-
+
public:
device_list(resource_pool &pool = global_resource_pool);
void import_config_list(const device_config_list &list, running_machine &machine);
@@ -223,11 +223,11 @@ public:
class device_config
{
DISABLE_COPYING(device_config);
-
+
friend class device_t;
friend class device_config_interface;
template<class T> friend class tagged_list;
-
+
protected:
// construction/destruction
device_config(const machine_config &mconfig, device_type type, const char *tag, const device_config *owner, UINT32 clock);
@@ -263,7 +263,7 @@ public:
void process_token(UINT32 entrytype, const machine_config_token *&tokens);
void config_complete();
bool validity_check(const game_driver &driver) const;
-
+
//------------------- begin derived class overrides
// required operation overrides
@@ -278,24 +278,24 @@ protected:
// required information overrides
public:
virtual const char *name() const = 0;
-
+
// optional information overrides
virtual const rom_entry *rom_region() const;
virtual const machine_config_token *machine_config_tokens() const;
-
+
//------------------- end derived class overrides
protected:
// device relationships
- device_config * m_next; // next device (of any type/class)
+ device_config * m_next; // next device (of any type/class)
device_config * m_owner; // device that owns us, or NULL if nobody
device_config_interface *m_interface_list; // head of interface list
- const device_type m_type; // device type
- UINT32 m_clock; // device clock
+ const device_type m_type; // device type
+ UINT32 m_clock; // device clock
const machine_config & m_machine_config; // reference to the machine's configuration
- const void * m_static_config; // static device configuration
+ const void * m_static_config; // static device configuration
UINT64 m_inline_data[16]; // array of inline configuration values
private:
@@ -322,7 +322,7 @@ public:
operator const device_config &() const { return m_device_config; }
operator const device_config *() const { return &m_device_config; }
- // iteration helpers
+ // iteration helpers
device_config_interface *interface_next() const { return m_interface_next; }
template<class T> bool next(T *&intf) const { return m_device_config.next(intf); }
@@ -360,7 +360,7 @@ public:
device_t *next() const { return m_next; }
device_t *typenext() const;
device_t *owner() const { return m_owner; }
-
+
// interface helpers
template<class T> bool interface(T *&intf) { intf = dynamic_cast<T *>(this); return (intf != NULL); }
template<class T> bool next(T *&intf) const
@@ -426,15 +426,15 @@ protected:
virtual void device_debug_setup();
//------------------- end derived class overrides
-
+
running_machine & m_machine;
-
- // device relationships
- device_t * m_next; // next device (of any type/class)
- device_t * m_owner; // device that owns us, or NULL if nobody
+
+ // device relationships
+ device_t * m_next; // next device (of any type/class)
+ device_t * m_owner; // device that owns us, or NULL if nobody
device_interface * m_interface_list; // head of interface list
- bool m_started; // true if the start function has succeeded
+ bool m_started; // true if the start function has succeeded
UINT32 m_clock; // device clock
const region_info * m_region; // our device-local region
@@ -461,13 +461,13 @@ protected:
// construction/destruction
device_interface(running_machine &machine, const device_config &config, device_t &device);
virtual ~device_interface();
-
+
public:
// casting helpers
device_t &device() { return m_device; }
operator device_t &() { return m_device; }
operator device_t *() { return &m_device; }
-
+
// iteration helpers
device_interface *interface_next() const { return m_interface_next; }
template<class T> bool next(T *&intf) const { return m_device.next(intf); }
@@ -481,7 +481,7 @@ public:
virtual void interface_post_load();
virtual void interface_clock_changed();
virtual void interface_debug_setup();
-
+
protected:
device_interface * m_interface_next;
device_t & m_device;
diff --git a/src/emu/devlegcy.c b/src/emu/devlegcy.c
index f01ae1ec09e..b8433ab4d57 100644
--- a/src/emu/devlegcy.c
+++ b/src/emu/devlegcy.c
@@ -73,7 +73,7 @@ legacy_device_config_base::~legacy_device_config_base()
//-------------------------------------------------
// get_legacy_config_int - return a legacy
-// configuration parameter as an integer
+// configuration parameter as an integer
//-------------------------------------------------
INT64 legacy_device_config_base::get_legacy_config_int(UINT32 state) const
@@ -86,7 +86,7 @@ INT64 legacy_device_config_base::get_legacy_config_int(UINT32 state) const
//-------------------------------------------------
// get_legacy_config_ptr - return a legacy
-// configuration parameter as a pointer
+// configuration parameter as a pointer
//-------------------------------------------------
void *legacy_device_config_base::get_legacy_config_ptr(UINT32 state) const
@@ -99,7 +99,7 @@ void *legacy_device_config_base::get_legacy_config_ptr(UINT32 state) const
//-------------------------------------------------
// get_legacy_config_fct - return a legacy
-// configuration parameter as a function pointer
+// configuration parameter as a function pointer
//-------------------------------------------------
genf *legacy_device_config_base::get_legacy_config_fct(UINT32 state) const
@@ -112,7 +112,7 @@ genf *legacy_device_config_base::get_legacy_config_fct(UINT32 state) const
//-------------------------------------------------
// get_legacy_config_string - return a legacy
-// configuration parameter as a string pointer
+// configuration parameter as a string pointer
//-------------------------------------------------
const char *legacy_device_config_base::get_legacy_config_string(UINT32 state) const
@@ -248,7 +248,7 @@ legacy_memory_device_config_base::legacy_memory_device_config_base(const machine
//-------------------------------------------------
// device_config_complete - update configuration
-// based on completed device setup
+// based on completed device setup
//-------------------------------------------------
void legacy_memory_device_config_base::device_config_complete()
@@ -365,8 +365,8 @@ const image_device_type_info legacy_image_device_config_base::m_device_info_arra
{ IO_MEMCARD, "memcard", "memc" }, /* 12 */
{ IO_CDROM, "cdrom", "cdrm" }, /* 13 */
{ IO_MAGTAPE, "magtape", "magt" }, /* 14 */
- };
-
+ };
+
//-------------------------------------------------
// legacy_image_device_config_base - constructor
//-------------------------------------------------
@@ -381,7 +381,7 @@ legacy_image_device_config_base::legacy_image_device_config_base(const machine_c
//-------------------------------------------------
// device_config_complete - update configuration
-// based on completed device setup
+// based on completed device setup
//-------------------------------------------------
void legacy_image_device_config_base::device_config_complete()
@@ -390,10 +390,10 @@ void legacy_image_device_config_base::device_config_complete()
int count = 0;
int index = -1;
image_device_format **formatptr;
- image_device_format *format;
+ image_device_format *format;
formatptr = &m_formatlist;
int cnt = 0;
-
+
m_type = static_cast<iodevice_t>(get_legacy_config_int(DEVINFO_INT_IMAGE_TYPE));
m_readable = get_legacy_config_int(DEVINFO_INT_IMAGE_READABLE)!=0;
m_writeable = get_legacy_config_int(DEVINFO_INT_IMAGE_WRITEABLE)!=0;
@@ -401,37 +401,37 @@ void legacy_image_device_config_base::device_config_complete()
m_must_be_loaded = get_legacy_config_int(DEVINFO_INT_IMAGE_MUST_BE_LOADED)!=0;
m_reset_on_load = get_legacy_config_int(DEVINFO_INT_IMAGE_RESET_ON_LOAD)!=0;
m_has_partial_hash = get_legacy_config_int(DEVINFO_FCT_IMAGE_PARTIAL_HASH)!=0;
-
+
m_interface_name = get_legacy_config_string(DEVINFO_STR_IMAGE_INTERFACE);
-
- m_file_extensions = get_legacy_config_string(DEVINFO_STR_IMAGE_FILE_EXTENSIONS);
-
+
+ m_file_extensions = get_legacy_config_string(DEVINFO_STR_IMAGE_FILE_EXTENSIONS);
+
load = reinterpret_cast<device_image_load_func>(get_legacy_config_fct(DEVINFO_FCT_IMAGE_LOAD));
create = reinterpret_cast<device_image_create_func>(get_legacy_config_fct(DEVINFO_FCT_IMAGE_CREATE));
unload = reinterpret_cast<device_image_unload_func>(get_legacy_config_fct(DEVINFO_FCT_IMAGE_UNLOAD));
display = reinterpret_cast<device_image_display_func>(get_legacy_config_fct(DEVINFO_FCT_IMAGE_DISPLAY));
partialhash = reinterpret_cast<device_image_partialhash_func>(get_legacy_config_fct(DEVINFO_FCT_IMAGE_PARTIAL_HASH));
get_devices = reinterpret_cast<device_image_get_devices_func>(get_legacy_config_fct(DEVINFO_FCT_IMAGE_GET_DEVICES));
-
+
m_create_option_guide = reinterpret_cast<const option_guide *>(get_legacy_config_ptr(DEVINFO_PTR_IMAGE_CREATE_OPTGUIDE));
-
+
int format_count = get_legacy_config_int(DEVINFO_INT_IMAGE_CREATE_OPTCOUNT);
-
+
for (int i = 0; i < format_count; i++)
{
// only add if creatable
if (get_legacy_config_string(DEVINFO_PTR_IMAGE_CREATE_OPTSPEC + i)) {
- // allocate a new format
+ // allocate a new format
format = global_alloc_clear(image_device_format);
- // populate it
+ // populate it
format->m_index = cnt;
format->m_name = get_legacy_config_string(DEVINFO_STR_IMAGE_CREATE_OPTNAME + i);
format->m_description = get_legacy_config_string(DEVINFO_STR_IMAGE_CREATE_OPTDESC + i);
format->m_extensions = get_legacy_config_string(DEVINFO_STR_IMAGE_CREATE_OPTEXTS + i);
format->m_optspec = get_legacy_config_string(DEVINFO_PTR_IMAGE_CREATE_OPTSPEC + i);
- // and append it to the list
+ // and append it to the list
*formatptr = format;
formatptr = &format->m_next;
cnt++;
@@ -442,14 +442,14 @@ void legacy_image_device_config_base::device_config_complete()
{
if (this == image)
index = count;
- if (image->image_type_direct() == m_type)
+ if (image->image_type_direct() == m_type)
count++;
- }
+ }
if (count > 1) {
m_instance_name.printf("%s%d", device_typename(m_type), index + 1);
m_brief_instance_name.printf("%s%d", device_brieftypename(m_type), index + 1);
}
- else
+ else
{
m_instance_name = device_typename(m_type);
m_brief_instance_name = device_brieftypename(m_type);
@@ -465,7 +465,7 @@ void legacy_image_device_config_base::device_config_complete()
//-------------------------------------------------
// find_device_type - search trough list of
-// device types to extact data
+// device types to extact data
//-------------------------------------------------
const image_device_type_info *legacy_image_device_config_base::find_device_type(iodevice_t type)
@@ -474,7 +474,7 @@ const image_device_type_info *legacy_image_device_config_base::find_device_type(
for (i = 0; i < ARRAY_LENGTH(legacy_image_device_config_base::m_device_info_array); i++)
{
if (m_device_info_array[i].m_type == type)
- return &m_device_info_array[i];
+ return &m_device_info_array[i];
}
return NULL;
}
@@ -491,7 +491,7 @@ const char *legacy_image_device_config_base::device_typename(iodevice_t type)
//-------------------------------------------------
// device_brieftypename - retrieves device
-// brief type name
+// brief type name
//-------------------------------------------------
const char *legacy_image_device_config_base::device_brieftypename(iodevice_t type)
@@ -502,17 +502,17 @@ const char *legacy_image_device_config_base::device_brieftypename(iodevice_t typ
//-------------------------------------------------
// uses_file_extension - update configuration
-// based on completed device setup
+// based on completed device setup
//-------------------------------------------------
bool legacy_image_device_config_base::uses_file_extension(const char *file_extension) const
{
bool result = FALSE;
-
+
if (file_extension[0] == '.')
file_extension++;
- /* find the extensions */
+ /* find the extensions */
char *ext = strtok((char*)m_file_extensions.cstr(),",");
while (ext != NULL)
{
@@ -522,7 +522,7 @@ bool legacy_image_device_config_base::uses_file_extension(const char *file_exten
break;
}
ext = strtok (NULL, ",");
- }
+ }
return result;
}
@@ -532,18 +532,18 @@ bool legacy_image_device_config_base::uses_file_extension(const char *file_exten
legacy_image_device_config_base::~legacy_image_device_config_base()
{
- image_device_format **formatptr = &m_formatlist;
-
+ image_device_format **formatptr = &m_formatlist;
+
/* free all entries */
while (*formatptr != NULL)
{
image_device_format *entry = *formatptr;
*formatptr = entry->m_next;
- global_free(entry);
+ global_free(entry);
}
}
-
+
//**************************************************************************
// LIVE LEGACY IMAGE DEVICE
//**************************************************************************
diff --git a/src/emu/devlegcy.h b/src/emu/devlegcy.h
index c4305f44d96..84efeb00675 100644
--- a/src/emu/devlegcy.h
+++ b/src/emu/devlegcy.h
@@ -53,87 +53,87 @@
// state constants passed to the device_get_config_func
enum
{
- // --- the following bits of info are returned as 64-bit signed integers ---
+ // --- the following bits of info are returned as 64-bit signed integers ---
DEVINFO_INT_FIRST = 0x00000,
- DEVINFO_INT_TOKEN_BYTES = DEVINFO_INT_FIRST, // R/O: bytes to allocate for the token
- DEVINFO_INT_INLINE_CONFIG_BYTES, // R/O: bytes to allocate for the inline configuration
+ DEVINFO_INT_TOKEN_BYTES = DEVINFO_INT_FIRST, // R/O: bytes to allocate for the token
+ DEVINFO_INT_INLINE_CONFIG_BYTES, // R/O: bytes to allocate for the inline configuration
- DEVINFO_INT_ENDIANNESS, // R/O: either ENDIANNESS_BIG or ENDIANNESS_LITTLE
- DEVINFO_INT_DATABUS_WIDTH, // R/O: data bus size for each address space (8,16,32,64)
+ DEVINFO_INT_ENDIANNESS, // R/O: either ENDIANNESS_BIG or ENDIANNESS_LITTLE
+ DEVINFO_INT_DATABUS_WIDTH, // R/O: data bus size for each address space (8,16,32,64)
DEVINFO_INT_DATABUS_WIDTH_0 = DEVINFO_INT_DATABUS_WIDTH + 0,
DEVINFO_INT_DATABUS_WIDTH_1 = DEVINFO_INT_DATABUS_WIDTH + 1,
DEVINFO_INT_DATABUS_WIDTH_2 = DEVINFO_INT_DATABUS_WIDTH + 2,
DEVINFO_INT_DATABUS_WIDTH_3 = DEVINFO_INT_DATABUS_WIDTH + 3,
DEVINFO_INT_DATABUS_WIDTH_LAST = DEVINFO_INT_DATABUS_WIDTH + ADDRESS_SPACES - 1,
- DEVINFO_INT_ADDRBUS_WIDTH, // R/O: address bus size for each address space (12-32)
+ DEVINFO_INT_ADDRBUS_WIDTH, // R/O: address bus size for each address space (12-32)
DEVINFO_INT_ADDRBUS_WIDTH_0 = DEVINFO_INT_ADDRBUS_WIDTH + 0,
DEVINFO_INT_ADDRBUS_WIDTH_1 = DEVINFO_INT_ADDRBUS_WIDTH + 1,
DEVINFO_INT_ADDRBUS_WIDTH_2 = DEVINFO_INT_ADDRBUS_WIDTH + 2,
DEVINFO_INT_ADDRBUS_WIDTH_3 = DEVINFO_INT_ADDRBUS_WIDTH + 3,
DEVINFO_INT_ADDRBUS_WIDTH_LAST = DEVINFO_INT_ADDRBUS_WIDTH + ADDRESS_SPACES - 1,
- DEVINFO_INT_ADDRBUS_SHIFT, // R/O: shift applied to addresses each address space (+3 means >>3, -1 means <<1)
+ DEVINFO_INT_ADDRBUS_SHIFT, // R/O: shift applied to addresses each address space (+3 means >>3, -1 means <<1)
DEVINFO_INT_ADDRBUS_SHIFT_0 = DEVINFO_INT_ADDRBUS_SHIFT + 0,
DEVINFO_INT_ADDRBUS_SHIFT_1 = DEVINFO_INT_ADDRBUS_SHIFT + 1,
DEVINFO_INT_ADDRBUS_SHIFT_2 = DEVINFO_INT_ADDRBUS_SHIFT + 2,
DEVINFO_INT_ADDRBUS_SHIFT_3 = DEVINFO_INT_ADDRBUS_SHIFT + 3,
DEVINFO_INT_ADDRBUS_SHIFT_LAST = DEVINFO_INT_ADDRBUS_SHIFT + ADDRESS_SPACES - 1,
- DEVINFO_INT_CLASS_SPECIFIC = 0x04000, // R/W: device-specific values start here
- DEVINFO_INT_DEVICE_SPECIFIC = 0x08000, // R/W: device-specific values start here
+ DEVINFO_INT_CLASS_SPECIFIC = 0x04000, // R/W: device-specific values start here
+ DEVINFO_INT_DEVICE_SPECIFIC = 0x08000, // R/W: device-specific values start here
DEVINFO_INT_LAST = 0x0ffff,
- // --- the following bits of info are returned as pointers ---
+ // --- the following bits of info are returned as pointers ---
DEVINFO_PTR_FIRST = 0x10000,
- DEVINFO_PTR_ROM_REGION = DEVINFO_PTR_FIRST, // R/O: pointer to device-specific ROM region
- DEVINFO_PTR_MACHINE_CONFIG, // R/O: pointer to device-specific machine config
+ DEVINFO_PTR_ROM_REGION = DEVINFO_PTR_FIRST, // R/O: pointer to device-specific ROM region
+ DEVINFO_PTR_MACHINE_CONFIG, // R/O: pointer to device-specific machine config
- DEVINFO_PTR_INTERNAL_MEMORY_MAP, // R/O: const addrmap_token *map
+ DEVINFO_PTR_INTERNAL_MEMORY_MAP, // R/O: const addrmap_token *map
DEVINFO_PTR_INTERNAL_MEMORY_MAP_0 = DEVINFO_PTR_INTERNAL_MEMORY_MAP + 0,
DEVINFO_PTR_INTERNAL_MEMORY_MAP_1 = DEVINFO_PTR_INTERNAL_MEMORY_MAP + 1,
DEVINFO_PTR_INTERNAL_MEMORY_MAP_2 = DEVINFO_PTR_INTERNAL_MEMORY_MAP + 2,
DEVINFO_PTR_INTERNAL_MEMORY_MAP_3 = DEVINFO_PTR_INTERNAL_MEMORY_MAP + 3,
DEVINFO_PTR_INTERNAL_MEMORY_MAP_LAST = DEVINFO_PTR_INTERNAL_MEMORY_MAP + ADDRESS_SPACES - 1,
- DEVINFO_PTR_DEFAULT_MEMORY_MAP, // R/O: const addrmap_token *map
+ DEVINFO_PTR_DEFAULT_MEMORY_MAP, // R/O: const addrmap_token *map
DEVINFO_PTR_DEFAULT_MEMORY_MAP_0 = DEVINFO_PTR_DEFAULT_MEMORY_MAP + 0,
DEVINFO_PTR_DEFAULT_MEMORY_MAP_1 = DEVINFO_PTR_DEFAULT_MEMORY_MAP + 1,
DEVINFO_PTR_DEFAULT_MEMORY_MAP_2 = DEVINFO_PTR_DEFAULT_MEMORY_MAP + 2,
DEVINFO_PTR_DEFAULT_MEMORY_MAP_3 = DEVINFO_PTR_DEFAULT_MEMORY_MAP + 3,
DEVINFO_PTR_DEFAULT_MEMORY_MAP_LAST = DEVINFO_PTR_DEFAULT_MEMORY_MAP + ADDRESS_SPACES - 1,
- DEVINFO_PTR_CLASS_SPECIFIC = 0x14000, // R/W: device-specific values start here
- DEVINFO_PTR_DEVICE_SPECIFIC = 0x18000, // R/W: device-specific values start here
+ DEVINFO_PTR_CLASS_SPECIFIC = 0x14000, // R/W: device-specific values start here
+ 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 ---
+ // --- the following bits of info are returned as pointers to functions ---
DEVINFO_FCT_FIRST = 0x20000,
- DEVINFO_FCT_START = DEVINFO_FCT_FIRST, // R/O: device_start_func
- DEVINFO_FCT_STOP, // R/O: device_stop_func
- DEVINFO_FCT_RESET, // R/O: device_reset_func
- DEVINFO_FCT_EXECUTE, // R/O: device_execute_func
- DEVINFO_FCT_NVRAM, // R/O: device_nvram_func
+ DEVINFO_FCT_START = DEVINFO_FCT_FIRST, // R/O: device_start_func
+ DEVINFO_FCT_STOP, // R/O: device_stop_func
+ DEVINFO_FCT_RESET, // R/O: device_reset_func
+ DEVINFO_FCT_EXECUTE, // R/O: device_execute_func
+ DEVINFO_FCT_NVRAM, // R/O: device_nvram_func
DEVINFO_FCT_VALIDITY_CHECK, // R/O: device_validity_check_func
- DEVINFO_FCT_CLASS_SPECIFIC = 0x24000, // R/W: device-specific values start here
- DEVINFO_FCT_DEVICE_SPECIFIC = 0x28000, // R/W: device-specific values start here
+ DEVINFO_FCT_CLASS_SPECIFIC = 0x24000, // R/W: device-specific values start here
+ DEVINFO_FCT_DEVICE_SPECIFIC = 0x28000, // R/W: device-specific values start here
DEVINFO_FCT_LAST = 0x2ffff,
- // --- the following bits of info are returned as NULL-terminated strings ---
+ // --- the following bits of info are returned as NULL-terminated strings ---
DEVINFO_STR_FIRST = 0x30000,
- DEVINFO_STR_NAME = DEVINFO_STR_FIRST, // R/O: name of the device
- DEVINFO_STR_FAMILY, // R/O: family of the device
- DEVINFO_STR_VERSION, // R/O: version of the device
- DEVINFO_STR_SOURCE_FILE, // R/O: file containing the device implementation
- DEVINFO_STR_CREDITS, // R/O: credits for the device implementation
+ DEVINFO_STR_NAME = DEVINFO_STR_FIRST, // R/O: name of the device
+ DEVINFO_STR_FAMILY, // R/O: family of the device
+ DEVINFO_STR_VERSION, // R/O: version of the device
+ DEVINFO_STR_SOURCE_FILE, // R/O: file containing the device implementation
+ DEVINFO_STR_CREDITS, // R/O: credits for the device implementation
- DEVINFO_STR_CLASS_SPECIFIC = 0x34000, // R/W: device-specific values start here
- DEVINFO_STR_DEVICE_SPECIFIC = 0x38000, // R/W: device-specific values start here
+ DEVINFO_STR_CLASS_SPECIFIC = 0x34000, // R/W: device-specific values start here
+ DEVINFO_STR_DEVICE_SPECIFIC = 0x38000, // R/W: device-specific values start here
DEVINFO_STR_LAST = 0x3ffff,
-
+
/* --- image device related --- */
/* --- the following bits of info are returned as integers --- */
DEVINFO_INT_IMAGE_FIRST = DEVINFO_INT_FIRST + 0x7000,
@@ -178,16 +178,16 @@ enum
//**************************************************************************
// macro for declaring the configuration and device classes of a legacy device
-#define _DECLARE_LEGACY_DEVICE(name, basename, configclass, deviceclass, baseconfigclass, basedeviceclass) \
+#define _DECLARE_LEGACY_DEVICE(name, basename, configclass, deviceclass, baseconfigclass, basedeviceclass) \
\
-DEVICE_GET_INFO( basename ); \
+DEVICE_GET_INFO( basename ); \
\
class configclass; \
\
class deviceclass : public basedeviceclass \
{ \
friend class configclass; \
- deviceclass(running_machine &_machine, const configclass &config); \
+ deviceclass(running_machine &_machine, const configclass &config); \
}; \
\
class configclass : public baseconfigclass \
@@ -202,9 +202,9 @@ public: \
const device_type name = configclass::static_alloc_device_config
// macro for defining the implementation needed for configuration and device classes
-#define _DEFINE_LEGACY_DEVICE(name, basename, configclass, deviceclass, baseconfigclass, basedeviceclass) \
+#define _DEFINE_LEGACY_DEVICE(name, basename, configclass, deviceclass, baseconfigclass, basedeviceclass) \
\
-deviceclass::deviceclass(running_machine &_machine, const configclass &config) \
+deviceclass::deviceclass(running_machine &_machine, const configclass &config) \
: basedeviceclass(_machine, config) \
{ \
} \
@@ -221,7 +221,7 @@ device_config *configclass::static_alloc_device_config(const machine_config &mco
\
device_t *configclass::alloc_device(running_machine &machine) const \
{ \
- return pool_alloc(machine_get_pool(machine), deviceclass(machine, *this)); \
+ return pool_alloc(machine_get_pool(machine), deviceclass(machine, *this)); \
}
// reduced macros that are easier to use, and map to the above two macros
@@ -394,29 +394,29 @@ typedef void (*device_image_display_func)(device_t *image);
typedef void (*device_image_partialhash_func)(char *, const unsigned char *, unsigned long, unsigned int);
typedef void (*device_image_get_devices_func)(device_t *device);
-// the actual deviceinfo union
+// the actual deviceinfo union
union deviceinfo
{
- INT64 i; // generic integers
- void * p; // generic pointers
- genf * f; // generic function pointers
- char * s; // generic strings
-
- device_start_func start; // DEVINFO_FCT_START
- device_stop_func stop; // DEVINFO_FCT_STOP
- device_reset_func reset; // DEVINFO_FCT_RESET
- device_execute_func execute; // DEVINFO_FCT_EXECUTE
- device_nvram_func nvram; // DEVINFO_FCT_NVRAM
- const rom_entry * romregion; // DEVINFO_PTR_ROM_REGION
- const machine_config_token *machine_config; // DEVINFO_PTR_MACHINE_CONFIG
- const addrmap8_token * internal_map8; // DEVINFO_PTR_INTERNAL_MEMORY_MAP
- const addrmap16_token * internal_map16; // DEVINFO_PTR_INTERNAL_MEMORY_MAP
- const addrmap32_token * internal_map32; // DEVINFO_PTR_INTERNAL_MEMORY_MAP
- const addrmap64_token * internal_map64; // DEVINFO_PTR_INTERNAL_MEMORY_MAP
- const addrmap8_token * default_map8; // DEVINFO_PTR_DEFAULT_MEMORY_MAP
- const addrmap16_token * default_map16; // DEVINFO_PTR_DEFAULT_MEMORY_MAP
- const addrmap32_token * default_map32; // DEVINFO_PTR_DEFAULT_MEMORY_MAP
- const addrmap64_token * default_map64; // DEVINFO_PTR_DEFAULT_MEMORY_MAP
+ INT64 i; // generic integers
+ void * p; // generic pointers
+ genf * f; // generic function pointers
+ char * s; // generic strings
+
+ device_start_func start; // DEVINFO_FCT_START
+ device_stop_func stop; // DEVINFO_FCT_STOP
+ device_reset_func reset; // DEVINFO_FCT_RESET
+ device_execute_func execute; // DEVINFO_FCT_EXECUTE
+ device_nvram_func nvram; // DEVINFO_FCT_NVRAM
+ const rom_entry * romregion; // DEVINFO_PTR_ROM_REGION
+ const machine_config_token *machine_config; // DEVINFO_PTR_MACHINE_CONFIG
+ const addrmap8_token * internal_map8; // DEVINFO_PTR_INTERNAL_MEMORY_MAP
+ const addrmap16_token * internal_map16; // DEVINFO_PTR_INTERNAL_MEMORY_MAP
+ const addrmap32_token * internal_map32; // DEVINFO_PTR_INTERNAL_MEMORY_MAP
+ const addrmap64_token * internal_map64; // DEVINFO_PTR_INTERNAL_MEMORY_MAP
+ const addrmap8_token * default_map8; // DEVINFO_PTR_DEFAULT_MEMORY_MAP
+ const addrmap16_token * default_map16; // DEVINFO_PTR_DEFAULT_MEMORY_MAP
+ const addrmap32_token * default_map32; // DEVINFO_PTR_DEFAULT_MEMORY_MAP
+ const addrmap64_token * default_map64; // DEVINFO_PTR_DEFAULT_MEMORY_MAP
};
@@ -479,7 +479,7 @@ protected:
// device-level overrides
virtual void device_start();
virtual void device_reset();
-
+
// internal state
const legacy_device_config_base & m_config;
void * m_token;
@@ -490,7 +490,7 @@ protected:
// ======================> legacy_sound_device_config_base
// legacy_sound_device_config is a device_config with a sound interface
-class legacy_sound_device_config_base : public legacy_device_config_base,
+class legacy_sound_device_config_base : public legacy_device_config_base,
public device_config_sound_interface
{
protected:
@@ -503,7 +503,7 @@ protected:
// ======================> legacy_sound_device_base
// legacy_sound_device is a legacy_device_base with a sound interface
-class legacy_sound_device_base : public legacy_device_base,
+class legacy_sound_device_base : public legacy_device_base,
public device_sound_interface
{
protected:
@@ -516,7 +516,7 @@ protected:
// ======================> legacy_memory_device_config_base
// legacy_memory_device_config is a device_config with a memory interface
-class legacy_memory_device_config_base : public legacy_device_config_base,
+class legacy_memory_device_config_base : public legacy_device_config_base,
public device_config_memory_interface
{
protected:
@@ -538,7 +538,7 @@ protected:
// ======================> legacy_memory_device_base
// legacy_memory_device is a legacy_device_base with a memory interface
-class legacy_memory_device_base : public legacy_device_base,
+class legacy_memory_device_base : public legacy_device_base,
public device_memory_interface
{
protected:
@@ -551,7 +551,7 @@ protected:
// ======================> legacy_nvram_device_config
// legacy_nvram_device_config is a device_config with a nvram interface
-class legacy_nvram_device_config_base : public legacy_device_config_base,
+class legacy_nvram_device_config_base : public legacy_device_config_base,
public device_config_nvram_interface
{
protected:
@@ -564,7 +564,7 @@ protected:
// ======================> legacy_nvram_device
// legacy_nvram_device is a legacy_device_base with a nvram interface
-class legacy_nvram_device_base : public legacy_device_base,
+class legacy_nvram_device_base : public legacy_device_base,
public device_nvram_interface
{
protected:
@@ -596,13 +596,13 @@ struct image_device_type_info
};
// legacy_image_device_config is a device_config with a image interface
-class legacy_image_device_config_base : public legacy_device_config_base,
+class legacy_image_device_config_base : public legacy_device_config_base,
public device_config_image_interface
{
-public:
+public:
virtual iodevice_t image_type() const { return m_type; }
virtual const char *image_type_name() const { return device_typename(m_type); }
- virtual iodevice_t image_type_direct() const { return static_cast<iodevice_t>(get_legacy_config_int(DEVINFO_INT_IMAGE_TYPE)); }
+ virtual iodevice_t image_type_direct() const { return static_cast<iodevice_t>(get_legacy_config_int(DEVINFO_INT_IMAGE_TYPE)); }
virtual bool is_readable() const { return m_readable; }
virtual bool is_writeable() const { return m_writeable; }
virtual bool is_creatable() const { return m_creatable; }
@@ -612,22 +612,22 @@ public:
virtual const char *image_interface() const { return m_interface_name; }
virtual const char *file_extensions() const { return m_file_extensions; }
virtual const char *instance_name() const { return m_instance_name; }
- virtual const char *brief_instance_name() const { return m_brief_instance_name; }
+ virtual const char *brief_instance_name() const { return m_brief_instance_name; }
virtual bool uses_file_extension(const char *file_extension) const;
static const char *device_typename(iodevice_t type);
static const char *device_brieftypename(iodevice_t type);
protected:
// construction/destruction
legacy_image_device_config_base(const machine_config &mconfig, device_type type, const char *tag, const device_config *owner, UINT32 clock, device_get_config_func get_config);
- virtual ~legacy_image_device_config_base();
-
+ virtual ~legacy_image_device_config_base();
+
// device_config overrides
virtual void device_config_complete();
-
+
static const image_device_type_info *find_device_type(iodevice_t type);
-
- static const image_device_type_info m_device_info_array[];
-
+
+ static const image_device_type_info m_device_info_array[];
+
iodevice_t m_type;
bool m_readable;
bool m_writeable;
@@ -646,17 +646,17 @@ protected:
device_image_display_func display;
device_image_partialhash_func partialhash;
device_image_get_devices_func get_devices;
-
+
/* creation info */
const option_guide *m_create_option_guide;
- image_device_format *m_formatlist;
+ image_device_format *m_formatlist;
};
// ======================> legacy_image_device
// legacy_image_device is a legacy_device_base with a image interface
-class legacy_image_device_base : public legacy_device_base,
+class legacy_image_device_base : public legacy_device_base,
public device_image_interface
{
protected:
diff --git a/src/emu/didisasm.h b/src/emu/didisasm.h
index 8f53eebe9b9..30ca1e389ad 100644
--- a/src/emu/didisasm.h
+++ b/src/emu/didisasm.h
@@ -57,7 +57,7 @@ const UINT32 DASMFLAG_STEP_OUT = 0x40000000; // this instruction should be the
const UINT32 DASMFLAG_STEP_OVER = 0x20000000; // this instruction should be stepped over by setting a breakpoint afterwards
const UINT32 DASMFLAG_OVERINSTMASK = 0x18000000; // number of extra instructions to skip when stepping over
const UINT32 DASMFLAG_OVERINSTSHIFT = 27; // bits to shift after masking to get the value
-const UINT32 DASMFLAG_LENGTHMASK = 0x0000ffff; // the low 16-bits contain the actual length
+const UINT32 DASMFLAG_LENGTHMASK = 0x0000ffff; // the low 16-bits contain the actual length
@@ -106,7 +106,7 @@ public:
device_disasm_interface(running_machine &machine, const device_config &config, device_t &device);
virtual ~device_disasm_interface();
- // configuration access
+ // configuration access
const device_config_disasm_interface &disasm_config() const { return m_disasm_config; }
UINT32 min_opcode_bytes() const { return m_disasm_config.min_opcode_bytes(); }
UINT32 max_opcode_bytes() const { return m_disasm_config.max_opcode_bytes(); }
diff --git a/src/emu/diexec.c b/src/emu/diexec.c
index c8367e55ff5..03d40e2a96c 100644
--- a/src/emu/diexec.c
+++ b/src/emu/diexec.c
@@ -59,7 +59,7 @@
//**************************************************************************
const int TRIGGER_INT = -2000;
-const int TRIGGER_SUSPENDTIME = -4000;
+const int TRIGGER_SUSPENDTIME = -4000;
@@ -93,7 +93,7 @@ device_config_execute_interface::~device_config_execute_interface()
//-------------------------------------------------
-// execute_clocks_to_cycles - convert the number
+// execute_clocks_to_cycles - convert the number
// of clocks to cycles, rounding down if necessary
//-------------------------------------------------
@@ -104,19 +104,19 @@ UINT32 device_config_execute_interface::execute_clocks_to_cycles(UINT32 clocks)
//-------------------------------------------------
-// execute_cycles_to_clocks - convert the number
+// execute_cycles_to_clocks - convert the number
// of cycles to clocks, rounding down if necessary
//-------------------------------------------------
-UINT32 device_config_execute_interface::execute_cycles_to_clocks(UINT32 cycles) const
+UINT32 device_config_execute_interface::execute_cycles_to_clocks(UINT32 cycles) const
{
return cycles;
}
//-------------------------------------------------
-// execute_min_cycles - return the smallest number
-// of cycles that a single instruction or
+// execute_min_cycles - return the smallest number
+// of cycles that a single instruction or
// operation can take
//-------------------------------------------------
@@ -127,8 +127,8 @@ UINT32 device_config_execute_interface::execute_min_cycles() const
//-------------------------------------------------
-// execute_max_cycles - return the maximum number
-// of cycles that a single instruction or
+// execute_max_cycles - return the maximum number
+// of cycles that a single instruction or
// operation can take
//-------------------------------------------------
@@ -139,7 +139,7 @@ UINT32 device_config_execute_interface::execute_max_cycles() const
//-------------------------------------------------
-// execute_input_lines - return the total number
+// execute_input_lines - return the total number
// of input lines for the device
//-------------------------------------------------
@@ -150,7 +150,7 @@ UINT32 device_config_execute_interface::execute_input_lines() const
//-------------------------------------------------
-// execute_default_irq_vector - return the default
+// execute_default_irq_vector - return the default
// IRQ vector when an acknowledge is processed
//-------------------------------------------------
@@ -173,7 +173,7 @@ bool device_config_execute_interface::interface_process_token(UINT32 entrytype,
case MCONFIG_TOKEN_DIEXEC_DISABLE:
m_disabled = true;
return true;
-
+
// VBLANK interrupt
case MCONFIG_TOKEN_DIEXEC_VBLANK_INT:
TOKEN_UNGET_UINT32(tokens);
@@ -188,14 +188,14 @@ bool device_config_execute_interface::interface_process_token(UINT32 entrytype,
TOKEN_EXTRACT_UINT64(tokens, m_timed_interrupt_period);
return true;
}
-
+
return false;
}
//-------------------------------------------------
// interface_validity_check - validation for a
-// device after the configuration has been
+// device after the configuration has been
// constructed
//-------------------------------------------------
@@ -319,7 +319,7 @@ INT32 device_execute_interface::cycles_remaining() const
//-------------------------------------------------
-// eat_cycles - safely eats cycles so we don't
+// eat_cycles - safely eats cycles so we don't
// cross a timeslice boundary
//-------------------------------------------------
@@ -403,7 +403,7 @@ if (TEMPLOG) printf("suspend %s (%X)\n", device().tag(), reason);
//-------------------------------------------------
-// resume - clear a suspend reason for this
+// resume - clear a suspend reason for this
// device
//-------------------------------------------------
@@ -419,7 +419,7 @@ if (TEMPLOG) printf("resume %s (%X)\n", device().tag(), reason);
//-------------------------------------------------
-// spinuntil_time - burn cycles for a specific
+// spinuntil_time - burn cycles for a specific
// period of time
//-------------------------------------------------
@@ -489,7 +489,7 @@ attotime device_execute_interface::local_time() const
//-------------------------------------------------
-// total_cycles - return the total number of
+// total_cycles - return the total number of
// cycles executed on this device
//-------------------------------------------------
@@ -506,8 +506,8 @@ UINT64 device_execute_interface::total_cycles() const
//-------------------------------------------------
-// execute_burn - called after we consume a bunch
-// of cycles for artifical reasons (such as
+// execute_burn - called after we consume a bunch
+// of cycles for artifical reasons (such as
// spinning devices for performance optimization)
//-------------------------------------------------
@@ -585,7 +585,7 @@ void device_execute_interface::interface_pre_reset()
{
// reset the total number of cycles
m_totalcycles = 0;
-
+
// enable all devices (except for disabled devices)
if (!m_execute_config.disabled())
resume(SUSPEND_ANY_REASON);
@@ -703,7 +703,7 @@ void device_execute_interface::static_on_vblank(screen_device &screen, void *par
exec->on_vblank_start(screen);
}
}
-
+
void device_execute_interface::on_vblank_start(screen_device &screen)
{
// start the interrupt counter
@@ -738,7 +738,7 @@ void device_execute_interface::on_vblank_start(screen_device &screen)
//-------------------------------------------------
-// static_trigger_partial_frame_interrupt -
+// static_trigger_partial_frame_interrupt -
// called to trigger a partial frame interrupt
//-------------------------------------------------
@@ -767,7 +767,7 @@ void device_execute_interface::trigger_partial_frame_interrupt()
//-------------------------------------------------
-// static_trigger_periodic_interrupt - timer
+// static_trigger_periodic_interrupt - timer
// callback for timed interrupts
//-------------------------------------------------
@@ -843,7 +843,7 @@ void device_execute_interface::device_input::start(device_execute_interface *exe
m_execute = execute;
m_device = &m_execute->m_device;
m_linenum = linenum;
-
+
reset();
state_save_register_device_item(m_device, m_linenum, m_stored_vector);
@@ -994,14 +994,14 @@ if (TEMPLOG) printf(" (%d,%d)\n", m_curstate, m_curvector);
//-------------------------------------------------
-// default_irq_callback - the default IRQ
+// default_irq_callback - the default IRQ
// callback for this input line
//-------------------------------------------------
int device_execute_interface::device_input::default_irq_callback()
{
int vector = m_curvector;
-
+
// if the IRQ state is HOLD_LINE, clear it
if (m_curstate == HOLD_LINE)
{
diff --git a/src/emu/diexec.h b/src/emu/diexec.h
index 176fc57b066..8e191eb76ba 100644
--- a/src/emu/diexec.h
+++ b/src/emu/diexec.h
@@ -52,12 +52,12 @@
//**************************************************************************
// suspension reasons for executing devices
-const UINT32 SUSPEND_REASON_HALT = 0x0001; // HALT line set (or equivalent)
-const UINT32 SUSPEND_REASON_RESET = 0x0002; // RESET line set (or equivalent)
-const UINT32 SUSPEND_REASON_SPIN = 0x0004; // currently spinning
+const UINT32 SUSPEND_REASON_HALT = 0x0001; // HALT line set (or equivalent)
+const UINT32 SUSPEND_REASON_RESET = 0x0002; // RESET line set (or equivalent)
+const UINT32 SUSPEND_REASON_SPIN = 0x0004; // currently spinning
const UINT32 SUSPEND_REASON_TRIGGER = 0x0008; // waiting for a trigger
const UINT32 SUSPEND_REASON_DISABLE = 0x0010; // disabled (due to disable flag)
-const UINT32 SUSPEND_REASON_TIMESLICE = 0x0020; // waiting for the next timeslice
+const UINT32 SUSPEND_REASON_TIMESLICE = 0x0020; // waiting for the next timeslice
const UINT32 SUSPEND_ANY_REASON = ~0; // all of the above
@@ -194,7 +194,7 @@ protected:
class device_execute_interface : public device_interface
{
friend class device_scheduler;
-
+
public:
// construction/destruction
device_execute_interface(running_machine &machine, const device_config &config, device_t &device);
@@ -247,7 +247,7 @@ public:
UINT32 cycles_to_clocks(UINT32 cycles) const { return m_execute_config.cycles_to_clocks(cycles); }
UINT32 min_cycles() const { return m_execute_config.min_cycles(); }
UINT32 max_cycles() const { return m_execute_config.max_cycles(); }
-
+
// input line information getters
UINT32 input_lines() const { return m_execute_config.input_lines(); }
UINT32 default_irq_vector() const { return m_execute_config.default_irq_vector(); }
@@ -276,13 +276,13 @@ protected:
class device_input
{
static const int USE_STORED_VECTOR = 0xff000000;
-
+
public:
device_input();
-
+
void start(device_execute_interface *execute, int linenum);
void reset();
-
+
void set_state_synced(int state, int vector = USE_STORED_VECTOR);
void set_vector(int vector) { m_stored_vector = vector; }
int default_irq_callback();
@@ -290,11 +290,11 @@ protected:
device_execute_interface *m_execute;// pointer to the execute interface
device_t * m_device; // pointer to our device
int m_linenum; // which input line we are
-
+
INT32 m_stored_vector; // most recently written vector
INT32 m_curvector; // most recently processed vector
UINT8 m_curstate; // most recently processed state
- INT32 m_queue[32]; // queue of pending events
+ INT32 m_queue[32]; // queue of pending events
int m_qindex; // index within the queue
private:
@@ -311,11 +311,11 @@ protected:
// input states and IRQ callbacks
device_irq_callback m_driver_irq; // driver-specific IRQ callback
- device_input m_input[MAX_INPUT_LINES]; // data about inputs
+ device_input m_input[MAX_INPUT_LINES]; // data about inputs
emu_timer * m_timedint_timer; // reference to this device's periodic interrupt timer
// these below are hacks to support multiple interrupts per frame
- INT32 m_iloops; // number of interrupts remaining this frame
+ INT32 m_iloops; // number of interrupts remaining this frame
emu_timer * m_partial_frame_timer; // the timer that triggers partial frame interrupts
attotime m_partial_frame_period; // the length of one partial frame for interrupt purposes
@@ -340,7 +340,7 @@ protected:
UINT8 m_divshift; // right shift amount to fit the divisor into 32 bits
UINT32 m_cycles_per_second; // cycles per second, adjusted for multipliers
attoseconds_t m_attoseconds_per_cycle; // attoseconds per adjusted clock cycle
-
+
private:
// callbacks
static void static_timed_trigger_callback(running_machine *machine, void *ptr, int param);
diff --git a/src/emu/diimage.h b/src/emu/diimage.h
index dee31d9fb66..8473a3554ea 100644
--- a/src/emu/diimage.h
+++ b/src/emu/diimage.h
@@ -113,7 +113,7 @@ public:
device_image_interface(running_machine &machine, const device_config &config, device_t &device);
virtual ~device_image_interface();
- // configuration access
+ // configuration access
const device_config_image_interface &image_config() const { return m_image_config; }
protected:
diff --git a/src/emu/dimemory.c b/src/emu/dimemory.c
index e0e6f32549e..09e45de7915 100644
--- a/src/emu/dimemory.c
+++ b/src/emu/dimemory.c
@@ -83,7 +83,7 @@ device_config_memory_interface::~device_config_memory_interface()
//-------------------------------------------------
-// memory_space_config - return configuration for
+// memory_space_config - return configuration for
// the given space by index, or NULL if the space
// does not exist
//-------------------------------------------------
@@ -102,7 +102,7 @@ const address_space_config *device_config_memory_interface::memory_space_config(
bool device_config_memory_interface::interface_process_token(UINT32 entrytype, const machine_config_token *&tokens)
{
UINT32 data32;
-
+
switch (entrytype)
{
// specify device address map
@@ -113,13 +113,13 @@ bool device_config_memory_interface::interface_process_token(UINT32 entrytype, c
m_address_map[data32] = TOKEN_GET_PTR(tokens, addrmap);
return true;
}
-
+
return false;
}
//-------------------------------------------------
-// interface_validity_check - perform validity
+// interface_validity_check - perform validity
// checks on the memory configuration
//-------------------------------------------------
@@ -128,7 +128,7 @@ bool device_config_memory_interface::interface_validity_check(const game_driver
const device_config *devconfig = crosscast<const device_config *>(this);
bool detected_overlap = DETECT_OVERLAPPING_MEMORY ? false : true;
bool error = false;
-
+
// loop over all address spaces
for (int spacenum = 0; spacenum < ADDRESS_SPACES; spacenum++)
{
@@ -246,12 +246,12 @@ bool device_config_memory_interface::interface_validity_check(const game_driver
}
// make sure ports exist
-// if ((entry->read.type == AMH_PORT && entry->read.tag != NULL && portlist.find(entry->read.tag) == NULL) ||
-// (entry->write.type == AMH_PORT && entry->write.tag != NULL && portlist.find(entry->write.tag) == NULL))
-// {
-// mame_printf_error("%s: %s device '%s' %s space memory map entry references nonexistant port tag '%s'\n", driver.source_file, driver.name, devconfig->tag(), spaceconfig->m_name, entry->read.tag);
-// error = true;
-// }
+// if ((entry->read.type == AMH_PORT && entry->read.tag != NULL && portlist.find(entry->read.tag) == NULL) ||
+// (entry->write.type == AMH_PORT && entry->write.tag != NULL && portlist.find(entry->write.tag) == NULL))
+// {
+// mame_printf_error("%s: %s device '%s' %s space memory map entry references nonexistant port tag '%s'\n", driver.source_file, driver.name, devconfig->tag(), spaceconfig->m_name, entry->read.tag);
+// error = true;
+// }
// validate bank and share tags
if (entry->read.type == AMH_BANK && !validate_tag(&driver, "bank", entry->read.tag))
@@ -309,9 +309,9 @@ void device_memory_interface::set_address_space(int spacenum, const address_spac
//-------------------------------------------------
-// memory_translate - translate from logical to
-// phyiscal addresses; designed to be overridden
-// by the actual device implementation if address
+// memory_translate - translate from logical to
+// phyiscal addresses; designed to be overridden
+// by the actual device implementation if address
// translation is supported
//-------------------------------------------------
@@ -323,10 +323,10 @@ bool device_memory_interface::memory_translate(int spacenum, int intention, offs
//-------------------------------------------------
-// memory_read - perform internal memory
-// operations that bypass the memory system;
-// designed to be overridden by the actual device
-// implementation if internal read operations are
+// memory_read - perform internal memory
+// operations that bypass the memory system;
+// designed to be overridden by the actual device
+// implementation if internal read operations are
// handled by bypassing the memory system
//-------------------------------------------------
@@ -338,10 +338,10 @@ bool device_memory_interface::memory_read(int spacenum, offs_t offset, int size,
//-------------------------------------------------
-// memory_write - perform internal memory
-// operations that bypass the memory system;
-// designed to be overridden by the actual device
-// implementation if internal write operations are
+// memory_write - perform internal memory
+// operations that bypass the memory system;
+// designed to be overridden by the actual device
+// implementation if internal write operations are
// handled by bypassing the memory system
//-------------------------------------------------
@@ -353,11 +353,11 @@ bool device_memory_interface::memory_write(int spacenum, offs_t offset, int size
//-------------------------------------------------
-// memory_readop - perform internal memory
-// operations that bypass the memory system;
-// designed to be overridden by the actual device
-// implementation if internal opcode fetching
-// operations are handled by bypassing the memory
+// memory_readop - perform internal memory
+// operations that bypass the memory system;
+// designed to be overridden by the actual device
+// implementation if internal opcode fetching
+// operations are handled by bypassing the memory
// system
//-------------------------------------------------
diff --git a/src/emu/dimemory.h b/src/emu/dimemory.h
index 013f813dcac..8dab6f0ef34 100644
--- a/src/emu/dimemory.h
+++ b/src/emu/dimemory.h
@@ -51,7 +51,7 @@
// CONSTANTS
//**************************************************************************
-// the configuration for a general device
+// the configuration for a general device
enum device_space
{
AS_PROGRAM = 0,
@@ -126,7 +126,7 @@ public:
m_page_shift(0),
m_internal_map(internal),
m_default_map(defmap) { }
-
+
address_space_config(const char *name, endianness_t endian, UINT8 datawidth, UINT8 addrwidth, INT8 addrshift, UINT8 logwidth, UINT8 pageshift, const addrmap_token *internal = NULL, const addrmap_token *defmap = NULL)
: m_name(name),
m_endianness(endian),
@@ -142,29 +142,29 @@ public:
{
return (m_addrbus_shift < 0) ? (address << -m_addrbus_shift) : (address >> m_addrbus_shift);
}
-
+
inline offs_t addr2byte_end(offs_t address) const
{
return (m_addrbus_shift < 0) ? ((address << -m_addrbus_shift) | ((1 << -m_addrbus_shift) - 1)) : (address >> m_addrbus_shift);
}
-
+
inline offs_t byte2addr(offs_t address) const
{
return (m_addrbus_shift > 0) ? (address << m_addrbus_shift) : (address >> -m_addrbus_shift);
}
-
+
inline offs_t byte2addr_end(offs_t address) const
{
return (m_addrbus_shift > 0) ? ((address << m_addrbus_shift) | ((1 << -m_addrbus_shift) - 1)) : (address >> -m_addrbus_shift);
}
-
- const char * m_name;
- endianness_t m_endianness;
- UINT8 m_databus_width;
- UINT8 m_addrbus_width;
- INT8 m_addrbus_shift;
- UINT8 m_logaddr_width;
- UINT8 m_page_shift;
+
+ const char * m_name;
+ endianness_t m_endianness;
+ UINT8 m_databus_width;
+ UINT8 m_addrbus_width;
+ INT8 m_addrbus_shift;
+ UINT8 m_logaddr_width;
+ UINT8 m_page_shift;
const addrmap_token *m_internal_map;
const addrmap_token *m_default_map;
};
@@ -195,7 +195,7 @@ protected:
virtual bool interface_process_token(UINT32 entrytype, const machine_config_token *&tokens);
virtual bool interface_validity_check(const game_driver &driver) const;
- const addrmap_token * m_address_map[ADDRESS_SPACES]; // address maps for each address space
+ const addrmap_token * m_address_map[ADDRESS_SPACES]; // address maps for each address space
};
@@ -205,7 +205,7 @@ protected:
class device_memory_interface : public device_interface
{
friend class device_scheduler;
-
+
public:
// construction/destruction
device_memory_interface(running_machine &machine, const device_config &config, device_t &device);
@@ -241,7 +241,7 @@ protected:
// configuration
const device_config_memory_interface &m_memory_config; // reference to our device_config_execute_interface
- const address_space * m_addrspace[ADDRESS_SPACES]; // reported address spaces
+ const address_space * m_addrspace[ADDRESS_SPACES]; // reported address spaces
};
@@ -265,7 +265,7 @@ inline device_memory_interface *device_memory(device_t *device)
//-------------------------------------------------
-// device_get_space - return a pointer to the
+// device_get_space - return a pointer to the
// given address space on this device
//-------------------------------------------------
@@ -276,7 +276,7 @@ inline const address_space *device_get_space(device_t *device, int spacenum = 0)
//-------------------------------------------------
-// devconfig_get_space_config - return a pointer
+// devconfig_get_space_config - return a pointer
// to sthe given address space's configuration
//-------------------------------------------------
diff --git a/src/emu/dinvram.h b/src/emu/dinvram.h
index b31edd4eda8..ec7babd3bad 100644
--- a/src/emu/dinvram.h
+++ b/src/emu/dinvram.h
@@ -75,7 +75,7 @@ public:
device_nvram_interface(running_machine &machine, const device_config &config, device_t &device);
virtual ~device_nvram_interface();
- // configuration access
+ // configuration access
const device_config_nvram_interface &nvram_config() const { return m_nvram_config; }
// public accessors... for now
diff --git a/src/emu/disound.c b/src/emu/disound.c
index c34523eae4d..276cef295e8 100644
--- a/src/emu/disound.c
+++ b/src/emu/disound.c
@@ -101,21 +101,21 @@ bool device_config_sound_interface::interface_process_token(UINT32 entrytype, co
reset_routes();
return true;
}
-
+
return false;
}
//-------------------------------------------------
// interface_validity_check - validation for a
-// device after the configuration has been
+// device after the configuration has been
// constructed
//-------------------------------------------------
bool device_config_sound_interface::interface_validity_check(const game_driver &driver) const
{
bool error = false;
-
+
// loop over all the routes
for (const sound_route *route = m_route_list; route != NULL; route = route->m_next)
{
@@ -126,7 +126,7 @@ bool device_config_sound_interface::interface_validity_check(const game_driver &
mame_printf_error("%s: %s attempting to route sound to non-existant device '%s'\n", driver.source_file, driver.name, route->m_target);
error = true;
}
-
+
// if it's not a speaker or a sound device, error
const device_config_sound_interface *sound;
if (target->type() != SPEAKER && !target->interface(sound))
@@ -194,7 +194,7 @@ device_sound_interface::device_sound_interface(running_machine &machine, const d
device_sound_interface::~device_sound_interface()
{
}
-
+
//-------------------------------------------------
// interface_post_start - verify that state was
diff --git a/src/emu/disound.h b/src/emu/disound.h
index 5f5a41eba60..b14cc7fcd7c 100644
--- a/src/emu/disound.h
+++ b/src/emu/disound.h
@@ -52,7 +52,7 @@
//**************************************************************************
const int MAX_OUTPUTS = 4095; // maximum number of outputs a sound chip can support
-const int ALL_OUTPUTS = MAX_OUTPUTS; // special value indicating all outputs for the current chip
+const int ALL_OUTPUTS = MAX_OUTPUTS; // special value indicating all outputs for the current chip
@@ -108,7 +108,7 @@ public:
{
public:
sound_route(int output, int input, float gain, const char *target);
-
+
sound_route * m_next; // pointer to next route
UINT32 m_output; // output index, or ALL_OUTPUTS
UINT32 m_input; // target input index
@@ -137,7 +137,7 @@ public:
device_sound_interface(running_machine &machine, const device_config &config, device_t &device);
virtual ~device_sound_interface();
- // configuration access
+ // configuration access
const device_config_sound_interface &sound_config() const { return m_sound_config; }
protected:
@@ -152,7 +152,7 @@ protected:
int m_outputs; // number of outputs from this instance
sound_output m_output[MAX_OUTPUTS]; // array of output information
-
+
const device_config_sound_interface &m_sound_config;
};
diff --git a/src/emu/distate.c b/src/emu/distate.c
index b9493e9523e..e0458cc7eef 100644
--- a/src/emu/distate.c
+++ b/src/emu/distate.c
@@ -44,26 +44,26 @@
// GLOBAL VARIABLES
//**************************************************************************
-const UINT64 device_state_entry::k_decimal_divisor[] =
+const UINT64 device_state_entry::k_decimal_divisor[] =
{
- 1,
- 10,
- 100,
- 1000,
- 10000,
- 100000,
- 1000000,
- 10000000,
- 100000000,
+ 1,
+ 10,
+ 100,
+ 1000,
+ 10000,
+ 100000,
+ 1000000,
+ 10000000,
+ 100000000,
1000000000,
- U64(10000000000),
- U64(100000000000),
+ U64(10000000000),
+ U64(100000000000),
U64(1000000000000),
- U64(10000000000000),
- U64(100000000000000),
+ U64(10000000000000),
+ U64(100000000000000),
U64(1000000000000000),
- U64(10000000000000000),
- U64(100000000000000000),
+ U64(10000000000000000),
+ U64(100000000000000000),
U64(1000000000000000000),
U64(10000000000000000000)
};
@@ -88,7 +88,7 @@ device_state_entry::device_state_entry(int index, const char *symbol, void *data
m_default_format(true),
m_sizemask(0)
{
- // set the data pointer
+ // set the data pointer
m_dataptr.v = dataptr;
// convert the size to a mask
@@ -101,11 +101,11 @@ device_state_entry::device_state_entry(int index, const char *symbol, void *data
m_sizemask = 0xffffffff;
else
m_sizemask = ~U64(0);
-
+
// default the data mask to the same
m_datamask = m_sizemask;
format_from_mask();
-
+
// override well-known symbols
if (index == STATE_GENPC)
m_symbol.cpy("CURPC");
@@ -158,13 +158,13 @@ UINT64 device_state_entry::value() const
//-------------------------------------------------
// format - return the value of the given
-// pieces of indexed state as a string
+// pieces of indexed state as a string
//-------------------------------------------------
astring &device_state_entry::format(astring &dest, const char *string, bool maxout) const
{
UINT64 result = value();
-
+
// parse the format
bool leadzero = false;
bool percent = false;
@@ -356,7 +356,7 @@ void device_state_entry::set_value(const char *string) const
//-------------------------------------------------
-// format_from_mask - make a format based on
+// format_from_mask - make a format based on
// the data mask
//-------------------------------------------------
@@ -372,7 +372,7 @@ void device_state_entry::format_from_mask()
width++;
m_format.printf("%%0%dX", width);
}
-
+
//**************************************************************************
@@ -428,7 +428,7 @@ device_state_interface::~device_state_interface()
//-------------------------------------------------
// state_value - return the value of the given
-// pieces of indexed state as a UINT64
+// pieces of indexed state as a UINT64
//-------------------------------------------------
UINT64 device_state_interface::state_value(int index)
@@ -437,7 +437,7 @@ UINT64 device_state_interface::state_value(int index)
const device_state_entry *entry = state_find_entry(index);
if (entry == NULL)
return 0;
-
+
// call the exporter before we do anything
if (entry->needs_export())
state_export(*entry);
@@ -449,7 +449,7 @@ UINT64 device_state_interface::state_value(int index)
//-------------------------------------------------
// state_string - return the value of the given
-// pieces of indexed state as a string
+// pieces of indexed state as a string
//-------------------------------------------------
astring &device_state_interface::state_string(int index, astring &dest)
@@ -458,7 +458,7 @@ astring &device_state_interface::state_string(int index, astring &dest)
const device_state_entry *entry = state_find_entry(index);
if (entry == NULL)
return dest.cpy("???");
-
+
// get the custom string if needed
astring custom;
if (entry->needs_custom_string())
@@ -489,7 +489,7 @@ int device_state_interface::state_string_max_length(int index)
//-------------------------------------------------
// state_set_value - set the value of the given
-// pieces of indexed state from a UINT64
+// pieces of indexed state from a UINT64
//-------------------------------------------------
void device_state_interface::state_set_value(int index, UINT64 value)
@@ -498,7 +498,7 @@ void device_state_interface::state_set_value(int index, UINT64 value)
const device_state_entry *entry = state_find_entry(index);
if (entry == NULL)
return;
-
+
// set the value
entry->set_value(value);
@@ -510,7 +510,7 @@ void device_state_interface::state_set_value(int index, UINT64 value)
//-------------------------------------------------
// state_set_value - set the value of the given
-// pieces of indexed state from a string
+// pieces of indexed state from a string
//-------------------------------------------------
void device_state_interface::state_set_value(int index, const char *string)
@@ -519,7 +519,7 @@ void device_state_interface::state_set_value(int index, const char *string)
const device_state_entry *entry = state_find_entry(index);
if (entry == NULL)
return;
-
+
// set the value
entry->set_value(string);
@@ -571,7 +571,7 @@ void device_state_interface::state_string_export(const device_state_entry &entry
//-------------------------------------------------
// state_add - return the value of the given
-// pieces of indexed state as a UINT64
+// pieces of indexed state as a UINT64
//-------------------------------------------------
device_state_entry &device_state_interface::state_add(int index, const char *symbol, void *data, UINT8 size)
@@ -579,7 +579,7 @@ device_state_entry &device_state_interface::state_add(int index, const char *sym
// assert validity of incoming parameters
assert(size == 1 || size == 2 || size == 4 || size == 8);
assert(symbol != NULL);
-
+
// allocate new entry
device_state_entry *entry = auto_alloc(&m_machine, device_state_entry(index, symbol, data, size));
@@ -587,11 +587,11 @@ device_state_entry &device_state_interface::state_add(int index, const char *sym
device_state_entry **tailptr;
for (tailptr = &m_state_list; *tailptr != NULL; tailptr = &(*tailptr)->m_next) ;
*tailptr = entry;
-
+
// set the fast entry if applicable
if (index >= k_fast_state_min && index <= k_fast_state_max)
m_fast_state[index - k_fast_state_min] = entry;
-
+
return *entry;
}
@@ -606,12 +606,12 @@ const device_state_entry *device_state_interface::state_find_entry(int index)
// use fast lookup if possible
if (index >= k_fast_state_min && index <= k_fast_state_max)
return m_fast_state[index - k_fast_state_min];
-
+
// otherwise, scan the first
for (const device_state_entry *entry = m_state_list; entry != NULL; entry = entry->m_next)
if (entry->m_index == index)
return entry;
-
+
// handle failure by returning NULL
return NULL;
}
diff --git a/src/emu/distate.h b/src/emu/distate.h
index 2377d78fd88..cde6e194ccb 100644
--- a/src/emu/distate.h
+++ b/src/emu/distate.h
@@ -73,7 +73,7 @@ enum
class device_state_entry
{
friend class device_state_interface;
-
+
private:
// construction/destruction
device_state_entry(int index, const char *symbol, void *dataptr, UINT8 size);
@@ -86,7 +86,7 @@ public:
device_state_entry &callimport() { m_flags |= DSF_IMPORT; return *this; }
device_state_entry &callexport() { m_flags |= DSF_EXPORT; return *this; }
device_state_entry &noshow() { m_flags |= DSF_NOSHOW; return *this; }
-
+
// iteration helpers
const device_state_entry *next() const { return m_next; }
@@ -118,7 +118,7 @@ protected:
void set_value(UINT64 value) const;
void set_value(const char *string) const;
- // statics
+ // statics
static const UINT64 k_decimal_divisor[20]; // divisors for outputting decimal values
// public state description
@@ -159,7 +159,7 @@ public:
device_state_interface(running_machine &machine, const device_config &config, device_t &device);
virtual ~device_state_interface();
- // configuration access
+ // configuration access
const device_config_state_interface &state_config() const { return m_state_config; }
const device_state_entry *state_first() const { return m_state_list; }
@@ -190,8 +190,8 @@ protected:
// internal operation overrides
virtual void interface_post_start();
-
- // find the entry for a given index
+
+ // find the entry for a given index
const device_state_entry *state_find_entry(int index);
// constants
@@ -202,7 +202,7 @@ protected:
running_machine & m_machine; // reference to owning machine
const device_config_state_interface & m_state_config; // reference to configuration data
device_state_entry * m_state_list; // head of state list
- device_state_entry * m_fast_state[k_fast_state_max + 1 - k_fast_state_min];
+ device_state_entry * m_fast_state[k_fast_state_max + 1 - k_fast_state_min];
// fast access to common entries
};
diff --git a/src/emu/emucore.h b/src/emu/emucore.h
index b7f5c0b40c7..23cebabd16c 100644
--- a/src/emu/emucore.h
+++ b/src/emu/emucore.h
@@ -320,16 +320,16 @@ private:
// CASTING TEMPLATES
//**************************************************************************
-// template function for casting from a base class to a derived class that is checked
+// template function for casting from a base class to a derived class that is checked
// in debug builds and fast in release builds
-template<class _Dest, class _Source>
+template<class _Dest, class _Source>
inline _Dest downcast(_Source *src)
{
assert(dynamic_cast<_Dest>(src) == src);
return static_cast<_Dest>(src);
}
-template<class _Dest, class _Source>
+template<class _Dest, class _Source>
inline _Dest downcast(_Source &src)
{
assert(&dynamic_cast<_Dest>(src) == &src);
@@ -339,7 +339,7 @@ inline _Dest downcast(_Source &src)
// template function for cross-casting from one class to another that throws a bad_cast
// exception instead of returning NULL
-template<class _Dest, class _Source>
+template<class _Dest, class _Source>
inline _Dest crosscast(_Source *src)
{
_Dest result = dynamic_cast<_Dest>(src);
@@ -355,7 +355,7 @@ inline _Dest crosscast(_Source *src)
// COMMON TEMPLATES
//**************************************************************************
-template<class T>
+template<class T>
class tagged_list
{
DISABLE_COPYING(tagged_list);
diff --git a/src/emu/emuopts.c b/src/emu/emuopts.c
index 9e4f47d7453..94a7c81e3e7 100644
--- a/src/emu/emuopts.c
+++ b/src/emu/emuopts.c
@@ -160,7 +160,7 @@ const options_entry mame_core_options[] =
{ "skip_gameinfo", "0", OPTION_BOOLEAN, "skip displaying the information screen at startup" },
/* image device options */
- { OPTION_ADDED_DEVICE_OPTIONS, "0", OPTION_BOOLEAN | OPTION_INTERNAL, "image device-specific options have been added" },
+ { OPTION_ADDED_DEVICE_OPTIONS, "0", OPTION_BOOLEAN | OPTION_INTERNAL, "image device-specific options have been added" },
{ NULL }
};
@@ -201,7 +201,7 @@ static void mame_puts_error(const char *s)
{
mame_printf_error("%s", s);
}
-
+
/*-------------------------------------------------
image_get_device_option - accesses a device
option
@@ -249,14 +249,14 @@ void image_add_device_options(core_options *opts, const game_driver *driver)
options_add_entries(opts, entry);
}
- /* retrieve info about the device instance */
+ /* retrieve info about the device instance */
dev_full_name.printf("%s;%s", image->instance_name(), image->brief_instance_name());
/* add the option */
memset(entry, 0, sizeof(entry));
entry[0].name = dev_full_name;
options_add_entries(opts, entry);
-
+
index++;
}
@@ -309,7 +309,7 @@ core_options *mame_options_init(const options_entry *entries)
/* we need to dynamically add options when the device name is parsed */
options_set_option_callback(opts, OPTION_GAMENAME, image_driver_name_callback);
-
+
#ifdef MESS
mess_options_init(opts);
#endif /* MESS */
diff --git a/src/emu/info.c b/src/emu/info.c
index 51818ae4a6f..b7a91a484dd 100644
--- a/src/emu/info.c
+++ b/src/emu/info.c
@@ -904,7 +904,7 @@ static void print_game_images(FILE *out, const game_driver *game, const machine_
fprintf(out, " name=\"%s\"", xml_normalize_string(name));
fprintf(out, " briefname=\"%s\"", xml_normalize_string(shortname));
fprintf(out, "/>\n");
-
+
char *ext = strtok((char*)dev->file_extensions(),",");
while (ext != NULL)
{
@@ -912,7 +912,7 @@ static void print_game_images(FILE *out, const game_driver *game, const machine_
fprintf(out, " name=\"%s\"", xml_normalize_string(ext));
fprintf(out, "/>\n");
ext = strtok (NULL, ",");
- }
+ }
fprintf(out, "\t\t</device>\n");
}
diff --git a/src/emu/inptport.h b/src/emu/inptport.h
index 38a4dd4c10f..85c8e7e4222 100644
--- a/src/emu/inptport.h
+++ b/src/emu/inptport.h
@@ -150,11 +150,11 @@ enum
IPT_TILT1,
IPT_TILT2,
IPT_TILT3,
- IPT_TILT4,
+ IPT_TILT4,
/* misc other digital inputs */
IPT_SERVICE,
- IPT_TILT,
+ IPT_TILT,
IPT_INTERLOCK,
IPT_VOLUME_UP,
IPT_VOLUME_DOWN,
@@ -732,7 +732,7 @@ class input_port_config
public:
input_port_config(const char *tag);
~input_port_config();
-
+
input_port_config *next() const { return m_next; }
input_port_config * m_next; /* pointer to next port */
diff --git a/src/emu/inpttype.h b/src/emu/inpttype.h
index 8b027ca4e06..a7d8ab3b606 100644
--- a/src/emu/inpttype.h
+++ b/src/emu/inpttype.h
@@ -396,7 +396,7 @@ static const input_type_desc core_types[] =
INPUT_PORT_DIGITAL_TYPE( 0, OTHER, COIN9, "Coin 9", SEQ_DEF_0 )
INPUT_PORT_DIGITAL_TYPE( 0, OTHER, COIN10, "Coin 10", SEQ_DEF_0 )
INPUT_PORT_DIGITAL_TYPE( 0, OTHER, COIN11, "Coin 11", SEQ_DEF_0 )
- INPUT_PORT_DIGITAL_TYPE( 0, OTHER, COIN12, "Coin 12", SEQ_DEF_0 )
+ INPUT_PORT_DIGITAL_TYPE( 0, OTHER, COIN12, "Coin 12", SEQ_DEF_0 )
INPUT_PORT_DIGITAL_TYPE( 0, OTHER, BILL1, "Bill 1", SEQ_DEF_1(KEYCODE_BACKSPACE) )
INPUT_PORT_DIGITAL_TYPE( 0, OTHER, SERVICE1, "Service 1", SEQ_DEF_1(KEYCODE_9) )
diff --git a/src/emu/machine/6526cia.c b/src/emu/machine/6526cia.c
index a972aad0ab7..3f6ac725476 100644
--- a/src/emu/machine/6526cia.c
+++ b/src/emu/machine/6526cia.c
@@ -963,7 +963,7 @@ DEVICE_GET_INFO(cia6526r1)
case DEVINFO_FCT_START: info->start = DEVICE_START_NAME(cia); break;
case DEVINFO_FCT_STOP: /* Nothing */ break;
case DEVINFO_FCT_RESET: info->reset = DEVICE_RESET_NAME(cia); break;
-// case DEVINFO_FCT_VALIDITY_CHECK: info->validity_check = DEVICE_VALIDITY_CHECK_NAME(cia); break;
+// case DEVINFO_FCT_VALIDITY_CHECK: info->validity_check = DEVICE_VALIDITY_CHECK_NAME(cia); break;
/* --- the following bits of info are returned as NULL-terminated strings --- */
case DEVINFO_STR_NAME: strcpy(info->s, "MOS6526 rev1"); break;
diff --git a/src/emu/machine/eeprom.c b/src/emu/machine/eeprom.c
index 703a90be1a4..8c763fd0db6 100644
--- a/src/emu/machine/eeprom.c
+++ b/src/emu/machine/eeprom.c
@@ -107,7 +107,7 @@ device_t *eeprom_device_config::alloc_device(running_machine &machine) const
//-------------------------------------------------
-// device_config_complete - perform any
+// device_config_complete - perform any
// operations now that the configuration is
// complete
//-------------------------------------------------
@@ -119,11 +119,11 @@ void eeprom_device_config::device_config_complete()
m_default_data = reinterpret_cast<const UINT8 *>(m_inline_data[INLINE_DATAPTR]);
m_default_data_size = m_inline_data[INLINE_DATASIZE];
m_default_value = m_inline_data[INLINE_DEFVALUE];
-
+
// inherit a copy of the static data
if (intf != NULL)
*static_cast<eeprom_interface *>(this) = *intf;
-
+
// now describe our address space
if (m_data_bits == 8)
m_space_config = address_space_config("eeprom", ENDIANNESS_BIG, 8, m_address_bits, 0, *ADDRESS_MAP_NAME(eeprom_map8));
@@ -133,7 +133,7 @@ void eeprom_device_config::device_config_complete()
//-------------------------------------------------
-// device_validity_check - perform validity checks
+// device_validity_check - perform validity checks
// on this device
//-------------------------------------------------
@@ -157,7 +157,7 @@ bool eeprom_device_config::device_validity_check(const game_driver &driver) cons
//-------------------------------------------------
-// memory_space_config - return a description of
+// memory_space_config - return a description of
// any address spaces owned by this device
//-------------------------------------------------
diff --git a/src/emu/machine/eeprom.h b/src/emu/machine/eeprom.h
index ffc8066cd95..319b0ea943c 100644
--- a/src/emu/machine/eeprom.h
+++ b/src/emu/machine/eeprom.h
@@ -45,14 +45,14 @@
struct eeprom_interface
{
- UINT8 m_address_bits; // EEPROM has 2^address_bits cells
- UINT8 m_data_bits; // every cell has this many bits (8 or 16)
+ UINT8 m_address_bits; // EEPROM has 2^address_bits cells
+ UINT8 m_data_bits; // every cell has this many bits (8 or 16)
const char *m_cmd_read; // read command string, e.g. "0110"
const char *m_cmd_write; // write command string, e.g. "0111"
const char *m_cmd_erase; // erase command string, or 0 if n/a
const char *m_cmd_lock; // lock command string, or 0 if n/a
const char *m_cmd_unlock; // unlock command string, or 0 if n/a
- bool m_enable_multi_read; // set to 1 to enable multiple values to be read from one read command
+ bool m_enable_multi_read; // set to 1 to enable multiple values to be read from one read command
int m_reset_delay; // number of times eeprom_read_bit() should return 0 after a reset,
// before starting to return 1.
};
@@ -61,13 +61,13 @@ struct eeprom_interface
// ======================> eeprom_device_config
-class eeprom_device_config : public device_config,
- public device_config_memory_interface,
- public device_config_nvram_interface,
+class eeprom_device_config : public device_config,
+ public device_config_memory_interface,
+ public device_config_nvram_interface,
public eeprom_interface
{
friend class eeprom_device;
-
+
// construction/destruction
eeprom_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock);
@@ -92,21 +92,21 @@ protected:
// device_config overrides
virtual void device_config_complete();
virtual bool device_validity_check(const game_driver &driver) const;
-
+
// device_config_memory_interface overrides
virtual const address_space_config *memory_space_config(int spacenum = 0) const;
// device-specific configuration
const UINT8 * m_default_data;
int m_default_data_size;
- UINT32 m_default_value;
- address_space_config m_space_config;
+ UINT32 m_default_value;
+ address_space_config m_space_config;
};
// ======================> eeprom_device
-class eeprom_device : public device_t,
+class eeprom_device : public device_t,
public device_memory_interface,
public device_nvram_interface
{
@@ -114,7 +114,7 @@ class eeprom_device : public device_t,
// construction/destruction
eeprom_device(running_machine &_machine, const eeprom_device_config &config);
-
+
public:
// I/O operations
void write_bit(int state);
@@ -126,7 +126,7 @@ protected:
// device-level overrides
virtual void device_start();
virtual void device_reset();
-
+
// device_nvram_interface overrides
virtual void nvram_default();
virtual void nvram_read(mame_file &file);
@@ -142,7 +142,7 @@ protected:
const eeprom_device_config &m_config;
int m_serial_count;
- UINT8 m_serial_buffer[SERIAL_BUFFER_LENGTH];
+ UINT8 m_serial_buffer[SERIAL_BUFFER_LENGTH];
int m_data_bits;
int m_read_address;
int m_clock_count;
diff --git a/src/emu/machine/generic.c b/src/emu/machine/generic.c
index 25cfd8f37ab..eea222fdf38 100644
--- a/src/emu/machine/generic.c
+++ b/src/emu/machine/generic.c
@@ -347,7 +347,7 @@ void nvram_load(running_machine *machine)
// close the file
mame_fclose(nvram_file);
}
-
+
// otherwise, tell everyone to initialize their NVRAM areas
else
{
diff --git a/src/emu/machine/intelfsh.c b/src/emu/machine/intelfsh.c
index 1291e73acc0..a2c81c03f36 100644
--- a/src/emu/machine/intelfsh.c
+++ b/src/emu/machine/intelfsh.c
@@ -266,7 +266,7 @@ UINT32 intelflash_read(int chip, UINT32 address)
break;
}
-// logerror( "intelflash_read( %d, %08x ) %08x\n", chip, address, data );
+// logerror( "intelflash_read( %d, %08x ) %08x\n", chip, address, data );
return data;
}
@@ -281,7 +281,7 @@ void intelflash_write(int chip, UINT32 address, UINT32 data)
}
c = &chips[ chip ];
-// logerror( "intelflash_write( %d, %08x, %08x )\n", chip, address, data );
+// logerror( "intelflash_write( %d, %08x, %08x )\n", chip, address, data );
switch( c->flash_mode )
{
@@ -443,13 +443,13 @@ void intelflash_write(int chip, UINT32 address, UINT32 data)
UINT16 *flash_memory = (UINT16 *)c->flash_memory;
if (c->sector_is_4k)
{
- memset( &flash_memory[ address & ~0x7ff ], 0xff, 4 * 1024 );
+ memset( &flash_memory[ address & ~0x7ff ], 0xff, 4 * 1024 );
c->erase_sector = address & ~0x7ff;
timer_adjust_oneshot( c->timer, ATTOTIME_IN_MSEC( 125 ), 0 );
}
else
{
- memset( &flash_memory[ address & ~0x7fff ], 0xff, 64 * 1024 );
+ memset( &flash_memory[ address & ~0x7fff ], 0xff, 64 * 1024 );
c->erase_sector = address & ~0x7fff;
timer_adjust_oneshot( c->timer, ATTOTIME_IN_SEC( 1 ), 0 );
}
diff --git a/src/emu/machine/z80ctc.c b/src/emu/machine/z80ctc.c
index dcaeee1e7e2..d3af85e92e8 100644
--- a/src/emu/machine/z80ctc.c
+++ b/src/emu/machine/z80ctc.c
@@ -105,7 +105,7 @@ device_t *z80ctc_device_config::alloc_device(running_machine &machine) const
//-------------------------------------------------
-// device_config_complete - perform any
+// device_config_complete - perform any
// operations now that the configuration is
// complete
//-------------------------------------------------
@@ -116,7 +116,7 @@ void z80ctc_device_config::device_config_complete()
const z80ctc_interface *intf = reinterpret_cast<const z80ctc_interface *>(static_config());
if (intf != NULL)
*static_cast<z80ctc_interface *>(this) = *intf;
-
+
// or initialize to defaults if none provided
else
{
@@ -154,7 +154,7 @@ void z80ctc_device::device_start()
{
m_period16 = attotime_mul(ATTOTIME_IN_HZ(m_clock), 16);
m_period256 = attotime_mul(ATTOTIME_IN_HZ(m_clock), 256);
-
+
// resolve callbacks
devcb_resolve_write_line(&m_intr, &m_config.m_intr, this);
@@ -250,7 +250,7 @@ int z80ctc_device::z80daisy_irq_ack()
//-------------------------------------------------
-// z80daisy_irq_reti - clear the interrupt
+// z80daisy_irq_reti - clear the interrupt
// pending state to allow other interrupts through
//-------------------------------------------------
diff --git a/src/emu/machine/z80ctc.h b/src/emu/machine/z80ctc.h
index 5c9e1434e00..d11d518859d 100644
--- a/src/emu/machine/z80ctc.h
+++ b/src/emu/machine/z80ctc.h
@@ -47,18 +47,18 @@ const int NOTIMER_3 = (1<<3);
struct z80ctc_interface
{
- UINT8 m_notimer; // timer disabler mask
- devcb_write_line m_intr; // callback when change interrupt status
- devcb_write_line m_zc0; // ZC/TO0 callback
- devcb_write_line m_zc1; // ZC/TO1 callback
- devcb_write_line m_zc2; // ZC/TO2 callback
+ UINT8 m_notimer; // timer disabler mask
+ devcb_write_line m_intr; // callback when change interrupt status
+ devcb_write_line m_zc0; // ZC/TO0 callback
+ devcb_write_line m_zc1; // ZC/TO1 callback
+ devcb_write_line m_zc2; // ZC/TO2 callback
};
// ======================> z80ctc_device_config
-class z80ctc_device_config : public device_config,
+class z80ctc_device_config : public device_config,
public device_config_z80daisy_interface,
public z80ctc_interface
{
@@ -84,7 +84,7 @@ protected:
// ======================> z80ctc_device
-class z80ctc_device : public device_t,
+class z80ctc_device : public device_t,
public device_z80daisy_interface
{
friend class z80ctc_device_config;
diff --git a/src/emu/machine/z80dart.c b/src/emu/machine/z80dart.c
index c15193823fa..57be03af0bf 100644
--- a/src/emu/machine/z80dart.c
+++ b/src/emu/machine/z80dart.c
@@ -178,7 +178,7 @@ device_t *z80dart_device_config::alloc_device(running_machine &machine) const
//-------------------------------------------------
-// device_config_complete - perform any
+// device_config_complete - perform any
// operations now that the configuration is
// complete
//-------------------------------------------------
@@ -189,7 +189,7 @@ void z80dart_device_config::device_config_complete()
const z80dart_interface *intf = reinterpret_cast<const z80dart_interface *>(static_config());
if (intf != NULL)
*static_cast<z80dart_interface *>(this) = *intf;
-
+
// or initialize to defaults if none provided
else
{
@@ -234,7 +234,7 @@ void z80dart_device::device_start()
{
// resolve callbacks
devcb_resolve_write_line(&m_out_int_func, &m_config.m_out_int_func, this);
-
+
m_channel[Z80DART_CH_A].start(this, Z80DART_CH_A, m_config.m_in_rxda_func, m_config.m_out_txda_func, m_config.m_out_dtra_func, m_config.m_out_rtsa_func, m_config.m_out_wrdya_func);
m_channel[Z80DART_CH_B].start(this, Z80DART_CH_B, m_config.m_in_rxdb_func, m_config.m_out_txdb_func, m_config.m_out_dtrb_func, m_config.m_out_rtsb_func, m_config.m_out_wrdyb_func);
@@ -457,7 +457,7 @@ z80dart_device::dart_channel::dart_channel()
void z80dart_device::dart_channel::start(z80dart_device *device, int index, const devcb_read_line &in_rxd, const devcb_write_line &out_txd, const devcb_write_line &out_dtr, const devcb_write_line &out_rts, const devcb_write_line &out_wrdy)
{
m_index = index;
-
+
devcb_resolve_read_line(&m_in_rxd_func, &in_rxd, m_device);
devcb_resolve_write_line(&m_out_txd_func, &out_txd, m_device);
devcb_resolve_write_line(&m_out_dtr_func, &out_dtr, m_device);
diff --git a/src/emu/machine/z80dart.h b/src/emu/machine/z80dart.h
index 9a03dd3907e..ac67c0a12dd 100644
--- a/src/emu/machine/z80dart.h
+++ b/src/emu/machine/z80dart.h
@@ -97,7 +97,7 @@ struct z80dart_interface
// ======================> z80dart_device_config
-class z80dart_device_config : public device_config,
+class z80dart_device_config : public device_config,
public device_config_z80daisy_interface,
public z80dart_interface
{
@@ -123,7 +123,7 @@ protected:
// ======================> z80dart_device
-class z80dart_device : public device_t,
+class z80dart_device : public device_t,
public device_z80daisy_interface
{
friend class z80dart_device_config;
@@ -140,10 +140,10 @@ public:
// data register access
UINT8 data_read(int which) { return m_channel[which].data_read(); }
void data_write(int which, UINT8 data) { return m_channel[which].data_write(data); }
-
+
// put data on the input lines
void receive_data(int which, UINT8 data) { m_channel[which].receive_data(data); }
-
+
// control line access
void cts_w(int which, int state) { m_channel[which].cts_w(state); }
void dcd_w(int which, int state) { m_channel[which].dcd_w(state); }
@@ -164,26 +164,26 @@ private:
// internal interrupt management
void check_interrupts();
void take_interrupt(int priority);
-
+
// a single channel on the DART
class dart_channel
{
friend class z80dart_device;
-
+
public:
dart_channel();
-
+
void start(z80dart_device *device, int index, const devcb_read_line &in_rxd, const devcb_write_line &out_txd, const devcb_write_line &out_dtr, const devcb_write_line &out_rts, const devcb_write_line &out_wrdy);
void reset();
-
+
UINT8 control_read();
void control_write(UINT8 data);
UINT8 data_read();
void data_write(UINT8 data);
-
+
void receive_data(UINT8 data);
-
+
void cts_w(int state);
void dcd_w(int state);
void ri_w(int state);
@@ -207,10 +207,10 @@ private:
static TIMER_CALLBACK( static_rxca_tick ) { reinterpret_cast<dart_channel *>(ptr)->rx_w(1); }
static TIMER_CALLBACK( static_txca_tick ) { reinterpret_cast<dart_channel *>(ptr)->tx_w(1); }
static TIMER_CALLBACK( static_rxtxcb_tick ) { reinterpret_cast<dart_channel *>(ptr)->rx_w(1); reinterpret_cast<dart_channel *>(ptr)->tx_w(1); }
-
+
z80dart_device *m_device;
int m_index;
-
+
devcb_resolved_read_line m_in_rxd_func;
devcb_resolved_write_line m_out_txd_func;
devcb_resolved_write_line m_out_dtr_func;
@@ -256,7 +256,7 @@ private:
// internal state
const z80dart_device_config & m_config;
devcb_resolved_write_line m_out_int_func;
- dart_channel m_channel[2]; // channels
+ dart_channel m_channel[2]; // channels
int m_int_state[8]; // interrupt state
// timers
diff --git a/src/emu/machine/z80dma.c b/src/emu/machine/z80dma.c
index 2073c7dbe5e..7d42a9ca565 100644
--- a/src/emu/machine/z80dma.c
+++ b/src/emu/machine/z80dma.c
@@ -67,8 +67,8 @@ const int TM_SEARCH_TRANSFER = 0x03;
#define LOG 0
-#define REGNUM(_m, _s) (((_m)<<3) + (_s))
-#define GET_REGNUM(_r) (&(_r) - &(WR0))
+#define REGNUM(_m, _s) (((_m)<<3) + (_s))
+#define GET_REGNUM(_r) (&(_r) - &(WR0))
#define REG(_m, _s) m_regs[REGNUM(_m,_s)]
#define WR0 REG(0, 0)
#define WR1 REG(1, 0)
@@ -123,7 +123,7 @@ const int TM_SEARCH_TRANSFER = 0x03;
#define EOB_F_SET (m_status &= ~0x20)
#define EOB_F_CLEAR (m_status |= 0x20)
-#define READY_ACTIVE_HIGH ((WR5>>3) & 0x01)
+#define READY_ACTIVE_HIGH ((WR5>>3) & 0x01)
#define INTERRUPT_ENABLE (WR3 & 0x20)
#define INT_ON_MATCH (INTERRUPT_CTRL & 0x01)
@@ -170,7 +170,7 @@ device_t *z80dma_device_config::alloc_device(running_machine &machine) const
//-------------------------------------------------
-// device_config_complete - perform any
+// device_config_complete - perform any
// operations now that the configuration is
// complete
//-------------------------------------------------
@@ -317,14 +317,14 @@ int z80dma_device::z80daisy_irq_ack()
if (m_ip)
{
if (LOG) logerror("Z80DMA '%s' Interrupt Acknowledge\n", tag());
-
+
// clear interrupt pending flag
m_ip = 0;
interrupt_check();
// set interrupt under service flag
m_ius = 1;
-
+
// disable DMA
m_dma_enabled = 0;
@@ -338,7 +338,7 @@ int z80dma_device::z80daisy_irq_ack()
//-------------------------------------------------
-// z80daisy_irq_reti - clear the interrupt
+// z80daisy_irq_reti - clear the interrupt
// pending state to allow other interrupts through
//-------------------------------------------------
@@ -563,14 +563,14 @@ void z80dma_device::timerproc()
{
m_dma_enabled = 0; //FIXME: Correct?
m_status = 0x19;
-
+
m_status |= !is_ready() << 1; // ready line status
-
+
if(TRANSFER_MODE == TM_TRANSFER) m_status |= 0x10; // no match found
update_status();
if (LOG) logerror("Z80DMA '%s' End of Block\n", tag());
-
+
if (INT_ON_END_OF_BLOCK)
{
trigger_interrupt(INT_END_OF_BLOCK);
@@ -698,7 +698,7 @@ void z80dma_device::write(UINT8 data)
m_dma_enabled = 0;
WR6 = data;
-
+
switch (data)
{
diff --git a/src/emu/machine/z80dma.h b/src/emu/machine/z80dma.h
index 9f47ac02996..b44516ad9d2 100644
--- a/src/emu/machine/z80dma.h
+++ b/src/emu/machine/z80dma.h
@@ -75,7 +75,7 @@ struct z80dma_interface
// ======================> z80dma_device_config
-class z80dma_device_config : public device_config,
+class z80dma_device_config : public device_config,
public device_config_z80daisy_interface,
public z80dma_interface
{
@@ -83,7 +83,7 @@ class z80dma_device_config : public device_config,
// construction/destruction
z80dma_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock);
-
+
public:
// allocators
static device_config *static_alloc_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock);
@@ -101,18 +101,18 @@ protected:
// ======================> z80dma_device
-class z80dma_device : public device_t,
+class z80dma_device : public device_t,
public device_z80daisy_interface
{
friend class z80dma_device_config;
// construction/destruction
z80dma_device(running_machine &_machine, const z80dma_device_config &_config);
-
+
public:
UINT8 read();
void write(UINT8 data);
-
+
void rdy_w(int state);
void wait_w(int state);
void bai_w(int state);
@@ -138,7 +138,7 @@ private:
void timerproc();
void update_status();
-
+
static TIMER_CALLBACK( static_rdy_write_callback ) { reinterpret_cast<z80dma_device *>(ptr)->rdy_write_callback(param); }
void rdy_write_callback(int state);
@@ -164,7 +164,7 @@ private:
UINT8 m_read_regs_follow[7];
UINT8 m_status;
UINT8 m_dma_enabled;
-
+
UINT16 m_addressA;
UINT16 m_addressB;
UINT16 m_count;
diff --git a/src/emu/machine/z80pio.c b/src/emu/machine/z80pio.c
index 4e179255d54..5c3a23c96f8 100644
--- a/src/emu/machine/z80pio.c
+++ b/src/emu/machine/z80pio.c
@@ -82,7 +82,7 @@ device_t *z80pio_device_config::alloc_device(running_machine &machine) const
//-------------------------------------------------
-// device_config_complete - perform any
+// device_config_complete - perform any
// operations now that the configuration is
// complete
//-------------------------------------------------
@@ -93,7 +93,7 @@ void z80pio_device_config::device_config_complete()
const z80pio_interface *intf = reinterpret_cast<const z80pio_interface *>(static_config());
if (intf != NULL)
*static_cast<z80pio_interface *>(this) = *intf;
-
+
// or initialize to defaults if none provided
else
{
@@ -164,7 +164,7 @@ void z80pio_device::device_reset()
int z80pio_device::z80daisy_irq_state()
{
int state = 0;
-
+
for (int index = PORT_A; index < PORT_COUNT; index++)
{
pio_port &port = m_port[index];
@@ -219,7 +219,7 @@ int z80pio_device::z80daisy_irq_ack()
//-------------------------------------------------
-// z80daisy_irq_reti - clear the interrupt
+// z80daisy_irq_reti - clear the interrupt
// pending state to allow other interrupts through
//-------------------------------------------------
@@ -268,7 +268,7 @@ UINT8 z80pio_device::control_read()
void z80pio_device::check_interrupts()
{
int state = CLEAR_LINE;
-
+
for (int index = PORT_A; index < PORT_COUNT; index++)
if (m_port[index].interrupt_signalled())
state = ASSERT_LINE;
@@ -318,7 +318,7 @@ void z80pio_device::pio_port::start(z80pio_device *device, int index, const devc
{
m_device = device;
m_index = index;
-
+
// resolve callbacks
devcb_resolve_read8(&m_in_p_func, &infunc, m_device);
devcb_resolve_write8(&m_out_p_func, &outfunc, m_device);
@@ -693,7 +693,7 @@ void z80pio_device::pio_port::control_write(UINT8 data)
case MASK: // interrupt mask
m_mask = data;
if (LOG) logerror("Z80PIO '%s' Port %c Mask: %02x\n", m_device->tag(), 'A' + m_index, data);
-
+
// set interrupt enable
m_ie = BIT(m_icw, 7) ? true : false;
check_interrupts();
diff --git a/src/emu/machine/z80pio.h b/src/emu/machine/z80pio.h
index f97f7397e32..83e7225e081 100644
--- a/src/emu/machine/z80pio.h
+++ b/src/emu/machine/z80pio.h
@@ -73,7 +73,7 @@ struct z80pio_interface
// ======================> z80pio_device_config
-class z80pio_device_config : public device_config,
+class z80pio_device_config : public device_config,
public device_config_z80daisy_interface,
public z80pio_interface
{
@@ -99,7 +99,7 @@ protected:
// ======================> z80pio_device
-class z80pio_device : public device_t,
+class z80pio_device : public device_t,
public device_z80daisy_interface
{
friend class z80pio_device_config;
@@ -115,7 +115,7 @@ public:
PORT_COUNT
};
- // I/O line access
+ // I/O line access
int rdy(int which) { return m_port[which].rdy(); }
void strobe(int which, bool state) { m_port[which].strobe(state); }
@@ -140,7 +140,7 @@ private:
virtual int z80daisy_irq_state();
virtual int z80daisy_irq_ack();
virtual void z80daisy_irq_reti();
-
+
// internal helpers
void check_interrupts();
@@ -148,10 +148,10 @@ private:
class pio_port
{
friend class z80pio_device;
-
+
public:
pio_port();
-
+
void start(z80pio_device *device, int index, const devcb_read8 &infunc, const devcb_write8 &outfunc, const devcb_write_line &rdyfunc);
void reset();
@@ -162,21 +162,21 @@ private:
void set_rdy(bool state);
void set_mode(int mode);
void strobe(bool state);
-
+
UINT8 read();
void write(UINT8 data);
-
+
void control_write(UINT8 data);
-
+
UINT8 data_read();
void data_write(UINT8 data);
- private:
+ private:
void check_interrupts() { m_device->check_interrupts(); }
z80pio_device * m_device;
int m_index;
-
+
devcb_resolved_read8 m_in_p_func;
devcb_resolved_write8 m_out_p_func;
devcb_resolved_write_line m_out_rdy_func;
@@ -201,7 +201,7 @@ private:
// internal state
const z80pio_device_config &m_config;
- pio_port m_port[2];
+ pio_port m_port[2];
devcb_resolved_write_line m_out_int_func;
};
diff --git a/src/emu/machine/z80sio.c b/src/emu/machine/z80sio.c
index c791507c42c..b6935265e17 100644
--- a/src/emu/machine/z80sio.c
+++ b/src/emu/machine/z80sio.c
@@ -98,7 +98,7 @@ const int SIO_WR4_CLOCK_MODE_x64 = 0xc0; // 11 = x64 clock mode
const int SIO_WR4_SYNC_MODE_MASK = 0x30; // D5-D4 = Sync mode
const int SIO_WR4_SYNC_MODE_8BIT = 0x00; // 00 = 8 bit sync character
const int SIO_WR4_SYNC_MODE_16BIT = 0x10; // 01 = 16 bit sync character
-const int SIO_WR4_SYNC_MODE_SDLC = 0x20; // 10 = SDLC mode (01111110 flag)
+const int SIO_WR4_SYNC_MODE_SDLC = 0x20; // 10 = SDLC mode (01111110 flag)
const int SIO_WR4_SYNC_MODE_EXTERNAL = 0x30; // 11 = External sync mode
const int SIO_WR4_STOPBITS_MASK = 0x0c; // D3-D2 = Stop bits
const int SIO_WR4_STOPBITS_SYNC = 0x00; // 00 = Sync modes enable
@@ -121,7 +121,7 @@ const int SIO_WR5_CRC16_SDLC = 0x04; // D2 = CRC-16/SDLC
const int SIO_WR5_RTS = 0x02; // D1 = RTS
const int SIO_WR5_TX_CRC_ENABLE = 0x01; // D0 = Tx CRC enable
-// SIO write register 6
+// SIO write register 6
const int SIO_WR6_SYNC_7_0_MASK = 0xff; // D7-D0 = Sync bits 7-0
// SIO write register 7
@@ -260,8 +260,8 @@ inline void z80sio_device::sio_channel::set_interrupt(int type)
//-------------------------------------------------
-// clear_interrupt - clear the given interrupt
-// state on this channel and update the overall
+// clear_interrupt - clear the given interrupt
+// state on this channel and update the overall
// device state
//-------------------------------------------------
@@ -323,7 +323,7 @@ device_t *z80sio_device_config::alloc_device(running_machine &machine) const
//-------------------------------------------------
-// device_config_complete - perform any
+// device_config_complete - perform any
// operations now that the configuration is
// complete
//-------------------------------------------------
@@ -334,7 +334,7 @@ void z80sio_device_config::device_config_complete()
const z80sio_interface *intf = reinterpret_cast<const z80sio_interface *>(static_config());
if (intf != NULL)
*static_cast<z80sio_interface *>(this) = *intf;
-
+
// or initialize to defaults if none provided
else
{
@@ -454,7 +454,7 @@ int z80sio_device::z80daisy_irq_ack()
//-------------------------------------------------
-// z80daisy_irq_reti - clear the interrupt
+// z80daisy_irq_reti - clear the interrupt
// pending state to allow other interrupts through
//-------------------------------------------------
diff --git a/src/emu/machine/z80sio.h b/src/emu/machine/z80sio.h
index 34e3d3903c5..811e6b30c00 100644
--- a/src/emu/machine/z80sio.h
+++ b/src/emu/machine/z80sio.h
@@ -44,7 +44,7 @@ struct z80sio_interface
// ======================> z80sio_device_config
-class z80sio_device_config : public device_config,
+class z80sio_device_config : public device_config,
public device_config_z80daisy_interface,
public z80sio_interface
{
@@ -57,7 +57,7 @@ public:
// allocators
static device_config *static_alloc_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock);
virtual device_t *alloc_device(running_machine &machine) const;
-
+
// basic information getters
virtual const char *name() const { return "Zilog Z80 SIO"; }
@@ -70,16 +70,16 @@ protected:
// ======================> z80sio_device
-class z80sio_device : public device_t,
+class z80sio_device : public device_t,
public device_z80daisy_interface
{
friend class z80sio_device_config;
-
+
// construction/destruction
z80sio_device(running_machine &_machine, const z80sio_device_config &config);
public:
- // control register I/O
+ // control register I/O
UINT8 control_read(int ch) { return m_channel[ch].control_read(); }
void control_write(int ch, UINT8 data) { m_channel[ch].control_write(data); }
@@ -112,21 +112,21 @@ private:
{
public:
sio_channel();
-
+
void start(z80sio_device *device, int index);
void reset();
-
+
UINT8 control_read();
UINT8 data_read();
void control_write(UINT8 data);
void data_write(UINT8 data);
-
+
int dtr();
int rts();
void set_cts(int state);
void set_dcd(int state);
void receive_data(int data);
-
+
private:
void set_interrupt(int type);
void clear_interrupt(int type);
@@ -153,7 +153,7 @@ private:
UINT8 m_receive_inptr; // index of data coming in
UINT8 m_receive_outptr; // index of data going out
};
-
+
// internal state
const z80sio_device_config &m_config;
sio_channel m_channel[2]; // 2 channels
diff --git a/src/emu/machine/z80sti.c b/src/emu/machine/z80sti.c
index 9692636ecf6..944e75e878a 100644
--- a/src/emu/machine/z80sti.c
+++ b/src/emu/machine/z80sti.c
@@ -172,7 +172,7 @@ device_t *z80sti_device_config::alloc_device(running_machine &machine) const
//-------------------------------------------------
-// device_config_complete - perform any
+// device_config_complete - perform any
// operations now that the configuration is
// complete
//-------------------------------------------------
@@ -183,7 +183,7 @@ void z80sti_device_config::device_config_complete()
const z80sti_interface *intf = reinterpret_cast<const z80sti_interface *>(static_config());
if (intf != NULL)
*static_cast<z80sti_interface *>(this) = *intf;
-
+
// or initialize to defaults if none provided
else
{
diff --git a/src/emu/machine/z80sti.h b/src/emu/machine/z80sti.h
index a8933d743bc..586fc2e13d7 100644
--- a/src/emu/machine/z80sti.h
+++ b/src/emu/machine/z80sti.h
@@ -92,7 +92,7 @@ struct z80sti_interface
// ======================> z80sti_device_config
-class z80sti_device_config : public device_config,
+class z80sti_device_config : public device_config,
public device_config_z80daisy_interface,
public z80sti_interface
{
@@ -105,7 +105,7 @@ public:
// allocators
static device_config *static_alloc_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock);
virtual device_t *alloc_device(running_machine &machine) const;
-
+
// basic information getters
virtual const char *name() const { return "Mostek MK3801"; }
@@ -118,24 +118,24 @@ protected:
// ======================> z80sti_device
-class z80sti_device : public device_t,
+class z80sti_device : public device_t,
public device_z80daisy_interface
{
friend class z80sti_device_config;
// construction/destruction
z80sti_device(running_machine &_machine, const z80sti_device_config &config);
-
+
public:
// I/O accessors
UINT8 read(offs_t offset);
void write(offs_t offset, UINT8 data);
-
+
// communication I/O
void serial_receive();
void serial_transmit();
void gpip_input(int bit, int state);
-
+
private:
// device-level overrides
virtual void device_start();
@@ -159,7 +159,7 @@ private:
// internal state
const z80sti_device_config &m_config;
-
+
// device callbacks
devcb_resolved_read8 m_in_gpio_func;
devcb_resolved_write8 m_out_gpio_func;
diff --git a/src/emu/mame.c b/src/emu/mame.c
index de617792f5c..188d29ad765 100644
--- a/src/emu/mame.c
+++ b/src/emu/mame.c
@@ -280,7 +280,7 @@ int mame_execute(core_options *options)
/* load the configuration settings and NVRAM */
settingsloaded = config_load_settings(machine);
nvram_load(machine);
- sound_mute(machine, FALSE);
+ sound_mute(machine, FALSE);
/* display the startup screens */
ui_display_startup_screens(machine, firstrun, !settingsloaded);
@@ -1335,7 +1335,7 @@ running_machine::~running_machine()
//-------------------------------------------------
// describe_context - return a string describing
-// which device is currently executing and its
+// which device is currently executing and its
// PC
//-------------------------------------------------
diff --git a/src/emu/mame.h b/src/emu/mame.h
index 1329b7beb1b..b7f8c873978 100644
--- a/src/emu/mame.h
+++ b/src/emu/mame.h
@@ -164,7 +164,7 @@ typedef void (*output_callback_func)(void *param, const char *format, va_list ar
class region_info
{
DISABLE_COPYING(region_info);
-
+
running_machine * machine;
public:
@@ -267,7 +267,7 @@ public:
/* UI-related */
bool ui_active; /* ui active or not (useful for games / systems with keyboard inputs) */
-
+
/* generic pointers */
generic_pointers generic; /* generic pointers */
diff --git a/src/emu/mconfig.c b/src/emu/mconfig.c
index 219eca623ff..22a8240faa3 100644
--- a/src/emu/mconfig.c
+++ b/src/emu/mconfig.c
@@ -48,7 +48,7 @@ machine_config *machine_config_alloc(const machine_config_token *tokens)
if (tokens != NULL)
machine_config_detokenize(config, tokens, device);
}
-
+
// then notify all devices that their configuration is complete
for (device_config *device = config->devicelist.first(); device != NULL; device = device->next())
device->config_complete();
diff --git a/src/emu/mconfig.h b/src/emu/mconfig.h
index b16e30813f4..7d57dd14ae4 100644
--- a/src/emu/mconfig.h
+++ b/src/emu/mconfig.h
@@ -133,7 +133,7 @@ enum
MCONFIG_TOKEN_SOUND_START,
MCONFIG_TOKEN_SOUND_RESET,
-
+
MCONFIG_TOKEN_DEVICE_ADD,
MCONFIG_TOKEN_DEVICE_REPLACE,
MCONFIG_TOKEN_DEVICE_REMOVE,
@@ -145,7 +145,7 @@ enum
MCONFIG_TOKEN_DEVICE_INLINE_DATA16,
MCONFIG_TOKEN_DEVICE_INLINE_DATA32,
MCONFIG_TOKEN_DEVICE_INLINE_DATA64,
-
+
// execute interface-specific tokens
MCONFIG_TOKEN_DIEXEC_DISABLE,
MCONFIG_TOKEN_DIEXEC_VBLANK_INT,
diff --git a/src/emu/schedule.c b/src/emu/schedule.c
index a0e0765c5b4..53d68be72e6 100644
--- a/src/emu/schedule.c
+++ b/src/emu/schedule.c
@@ -128,8 +128,8 @@ if (TEMPLOG)
printf("Timeslice loop: basetime=%15.6f\n", attotime_to_double(timerexec->basetime));
timer_print_first_timer(&m_machine);
}
-
-
+
+
// by default, assume our target is the end of the next quantum
attotime target;
target.seconds = timerexec->basetime.seconds;
@@ -297,11 +297,11 @@ void device_scheduler::trigger(int trigid, attotime after)
// ensure we have a list of executing devices
if (m_execute_list == NULL)
rebuild_execute_list();
-
+
// if we have a non-zero time, schedule a timer
if (after.attoseconds != 0 || after.seconds != 0)
timer_set(&m_machine, after, (void *)this, trigid, static_timed_trigger);
-
+
// send the trigger to everyone who cares
else
for (device_execute_interface *exec = m_execute_list; exec != NULL; exec = exec->m_nextexec)
@@ -310,7 +310,7 @@ void device_scheduler::trigger(int trigid, attotime after)
//-------------------------------------------------
-// static_timed_trigger - generate a trigger
+// static_timed_trigger - generate a trigger
// after a given amount of time
//-------------------------------------------------
@@ -331,7 +331,7 @@ void device_scheduler::compute_perfect_interleave()
if (m_execute_list == NULL)
rebuild_execute_list();
- // start with the first one
+ // start with the first one
device_execute_interface *first = m_execute_list;
if (first != NULL)
{
@@ -374,7 +374,7 @@ void device_scheduler::rebuild_execute_list()
{
// set the core scheduling quantum
attotime min_quantum = m_machine.config->minimum_quantum;
-
+
// if none specified default to 60Hz
if (attotime_compare(min_quantum, attotime_zero) == 0)
min_quantum = ATTOTIME_IN_HZ(60);
@@ -385,7 +385,7 @@ void device_scheduler::rebuild_execute_list()
device_t *device = m_machine.device(m_machine.config->perfect_cpu_quantum);
if (device == NULL)
fatalerror("Device '%s' specified for perfect interleave is not present!", m_machine.config->perfect_cpu_quantum);
-
+
device_execute_interface *exec;
if (!device->interface(exec))
fatalerror("Device '%s' specified for perfect interleave is not an executing device!", m_machine.config->perfect_cpu_quantum);
@@ -393,7 +393,7 @@ void device_scheduler::rebuild_execute_list()
attotime cpu_quantum = attotime_make(0, exec->minimum_quantum());
min_quantum = attotime_min(cpu_quantum, min_quantum);
}
-
+
// inform the timer system of our decision
assert(min_quantum.seconds == 0);
timer_add_scheduling_quantum(&m_machine, min_quantum.attoseconds, attotime_never);
@@ -404,7 +404,7 @@ if (TEMPLOG) printf("Setting quantum: %08X%08X\n", (UINT32)(min_quantum.attoseco
// start with an empty list
device_execute_interface **active_tailptr = &m_execute_list;
*active_tailptr = NULL;
-
+
// also make an empty list of suspended devices
device_execute_interface *suspend_list = NULL;
device_execute_interface **suspend_tailptr = &suspend_list;
@@ -426,7 +426,7 @@ if (TEMPLOG) printf("Setting quantum: %08X%08X\n", (UINT32)(min_quantum.attoseco
suspend_tailptr = &exec->m_nextexec;
}
}
-
+
// append the suspend list to the end of the active list
*active_tailptr = suspend_list;
if (TEMPLOG)
diff --git a/src/emu/schedule.h b/src/emu/schedule.h
index df347a90518..526218f8f93 100644
--- a/src/emu/schedule.h
+++ b/src/emu/schedule.h
@@ -68,15 +68,15 @@
class device_scheduler
{
friend class device_execute_interface;
-
+
public:
device_scheduler(running_machine &machine);
~device_scheduler();
-
+
void timeslice();
-
+
void trigger(int trigid, attotime after = attotime_zero);
-
+
void boost_interleave(attotime timeslice_time, attotime boost_duration);
void abort_timeslice();
@@ -84,7 +84,7 @@ public:
// for timer system only!
attotime override_local_time(attotime default_time);
-
+
// for emergencies only!
void eat_all_cycles();
diff --git a/src/emu/sound.c b/src/emu/sound.c
index ffac7d75c9b..9d05edf12a6 100644
--- a/src/emu/sound.c
+++ b/src/emu/sound.c
@@ -200,7 +200,7 @@ static void route_sound(running_machine *machine)
device_t *target_device = machine->device(route->m_target);
if (target_device->type() == SPEAKER)
continue;
-
+
int inputnum = route->m_input;
/* iterate over all outputs, matching any that apply */
@@ -491,7 +491,7 @@ device_t *speaker_device_config::alloc_device(running_machine &machine) const
//-------------------------------------------------
-// device_config_complete - perform any
+// device_config_complete - perform any
// operations now that the configuration is
// complete
//-------------------------------------------------
@@ -566,20 +566,20 @@ void speaker_device::device_start()
// if the sound device is not yet started, bail however -- we need the its stream
if (!sound->device().started())
throw device_missing_dependencies();
-
+
// accumulate inputs
inputs += (route->m_output == ALL_OUTPUTS) ? stream_get_device_outputs(*sound) : 1;
}
}
}
-
+
// no inputs? that's weird
if (inputs == 0)
{
logerror("Warning: speaker \"%s\" has no inputs\n", tag());
return;
}
-
+
// now we know how many inputs; allocate the mixers and input data
m_mixer_stream = stream_create(this, inputs, 1, machine->sample_rate, NULL, static_mixer_update);
m_input = auto_alloc_array(machine, speaker_input, inputs);
diff --git a/src/emu/sound.h b/src/emu/sound.h
index 0fddfc5a286..136cdce1bee 100644
--- a/src/emu/sound.h
+++ b/src/emu/sound.h
@@ -51,7 +51,7 @@ public:
// basic information getters
virtual const char *name() const { return "Speaker"; }
-
+
// indexes to inline data
enum
{
@@ -59,7 +59,7 @@ public:
INLINE_Y,
INLINE_Z
};
-
+
protected:
// device_config overrides
virtual void device_config_complete();
@@ -78,13 +78,13 @@ class speaker_device : public device_t
{
friend class speaker_device_config;
friend resource_pool_object<speaker_device>::~resource_pool_object();
-
+
// construction/destruction
speaker_device(running_machine &_machine, const speaker_device_config &config);
virtual ~speaker_device();
public:
- // input properties
+ // input properties
int inputs() const { return m_inputs; }
float input_gain(int index = 0) const { return m_input[index].m_gain; }
float input_default_gain(int index = 0) const { return m_input[index].m_default_gain; }
diff --git a/src/emu/sound/fm.c b/src/emu/sound/fm.c
index ba84e4a7fcb..3adcaf82a48 100644
--- a/src/emu/sound/fm.c
+++ b/src/emu/sound/fm.c
@@ -4212,7 +4212,7 @@ void ym2610_reset_chip(void *chip)
astring name;
running_device* dev = F2610->OPN.ST.device;
-
+
/* setup PCM buffers again */
name.printf("%s",dev->tag());
F2610->pcmbuf = (const UINT8 *)memory_region(dev->machine,name);
diff --git a/src/emu/sound/okim6295.c b/src/emu/sound/okim6295.c
index b80fe419b51..aec9a688f69 100644
--- a/src/emu/sound/okim6295.c
+++ b/src/emu/sound/okim6295.c
@@ -6,32 +6,32 @@
****************************************************************************
- Library to transcode from an ADPCM source to raw PCM.
- Written by Buffoni Mirko in 08/06/97
- References: various sources and documents.
+ Library to transcode from an ADPCM source to raw PCM.
+ Written by Buffoni Mirko in 08/06/97
+ References: various sources and documents.
- R. Belmont 31/10/2003
- Updated to allow a driver to use both MSM6295s and "raw" ADPCM voices
- (gcpinbal). Also added some error trapping for MAME_DEBUG builds
+ R. Belmont 31/10/2003
+ Updated to allow a driver to use both MSM6295s and "raw" ADPCM voices
+ (gcpinbal). Also added some error trapping for MAME_DEBUG builds
****************************************************************************
- OKIM 6295 ADPCM chip:
+ OKIM 6295 ADPCM chip:
- Command bytes are sent:
+ Command bytes are sent:
- 1xxx xxxx = start of 2-byte command sequence, xxxxxxx is the sample
- number to trigger
- abcd vvvv = second half of command; one of the abcd bits is set to
- indicate which voice the v bits seem to be volumed
+ 1xxx xxxx = start of 2-byte command sequence, xxxxxxx is the sample
+ number to trigger
+ abcd vvvv = second half of command; one of the abcd bits is set to
+ indicate which voice the v bits seem to be volumed
- 0abc d000 = stop playing; one or more of the abcd bits is set to
- indicate which voice(s)
+ 0abc d000 = stop playing; one or more of the abcd bits is set to
+ indicate which voice(s)
- Status is read:
+ Status is read:
- ???? abcd = one bit per voice, set to 0 if nothing is playing, or
- 1 if it is active
+ ???? abcd = one bit per voice, set to 0 if nothing is playing, or
+ 1 if it is active
***************************************************************************/
@@ -118,7 +118,7 @@ device_t *okim6295_device_config::alloc_device(running_machine &machine) const
//-------------------------------------------------
-// device_config_complete - perform any
+// device_config_complete - perform any
// operations now that the configuration is
// complete
//-------------------------------------------------
@@ -131,7 +131,7 @@ void okim6295_device_config::device_config_complete()
//-------------------------------------------------
-// memory_space_config - return a description of
+// memory_space_config - return a description of
// any address spaces owned by this device
//-------------------------------------------------
@@ -364,7 +364,7 @@ void okim6295_device::data_write(UINT8 data)
else
logerror("OKIM6295:'%s' requested to play sample %02x on non-stopped voice\n",tag(),m_command);
}
-
+
// invalid samples go here
else
{
diff --git a/src/emu/sound/okim6295.h b/src/emu/sound/okim6295.h
index b0ead224399..86611ecee42 100644
--- a/src/emu/sound/okim6295.h
+++ b/src/emu/sound/okim6295.h
@@ -56,7 +56,7 @@ class adpcm_state
{
public:
adpcm_state() { compute_tables(); reset(); }
-
+
void reset();
INT16 clock(UINT8 nibble);
@@ -75,15 +75,15 @@ private:
// ======================> okim6295_device_config
-class okim6295_device_config : public device_config,
- public device_config_sound_interface,
+class okim6295_device_config : public device_config,
+ public device_config_sound_interface,
public device_config_memory_interface
{
friend class okim6295_device;
-
+
// construction/destruction
okim6295_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock);
-
+
public:
// allocators
static device_config *static_alloc_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock);
@@ -91,7 +91,7 @@ public:
// basic information getters
virtual const char *name() const { return "OKI6295"; }
-
+
// inline configuration indexes
enum
{
@@ -105,29 +105,29 @@ protected:
// internal state
const address_space_config m_space_config;
- UINT8 m_pin7;
+ UINT8 m_pin7;
};
// ======================> okim6295_device
-class okim6295_device : public device_t,
+class okim6295_device : public device_t,
public device_sound_interface,
public device_memory_interface
{
friend class okim6295_device_config;
-
+
// construction/destruction
okim6295_device(running_machine &_machine, const okim6295_device_config &config);
public:
void set_bank_base(offs_t base);
void set_pin7(int pin7);
-
+
UINT8 status_read();
void data_write(UINT8 data);
-
+
protected:
// device-level overrides
virtual void device_start();
@@ -147,11 +147,11 @@ protected:
void generate_adpcm(const address_space *space, stream_sample_t *buffer, int samples);
adpcm_state m_adpcm; // current ADPCM state
- bool m_playing;
- offs_t m_base_offset; // pointer to the base memory location
- UINT32 m_sample; // current sample number
- UINT32 m_count; // total samples to play
- INT8 m_volume; // output volume
+ bool m_playing;
+ offs_t m_base_offset; // pointer to the base memory location
+ UINT32 m_sample; // current sample number
+ UINT32 m_count; // total samples to play
+ INT8 m_volume; // output volume
};
// internal state
@@ -159,10 +159,10 @@ protected:
const okim6295_device_config &m_config;
- okim_voice m_voice[OKIM6295_VOICES];
- INT32 m_command;
- bool m_bank_installed;
- offs_t m_bank_offs;
+ okim_voice m_voice[OKIM6295_VOICES];
+ INT32 m_command;
+ bool m_bank_installed;
+ offs_t m_bank_offs;
sound_stream * m_stream;
UINT8 m_pin7_state;
diff --git a/src/emu/sound/s14001a.h b/src/emu/sound/s14001a.h
index 6e003c66b79..db64da9b609 100644
--- a/src/emu/sound/s14001a.h
+++ b/src/emu/sound/s14001a.h
@@ -5,7 +5,7 @@
#include "devlegcy.h"
-int s14001a_bsy_r(running_device *device); /* read BUSY pin */
+int s14001a_bsy_r(running_device *device); /* read BUSY pin */
void s14001a_reg_w(running_device *device, int data); /* write to input latch */
void s14001a_rst_w(running_device *device, int data); /* write to RESET pin */
void s14001a_set_clock(running_device *device, int clock); /* set VSU-1000 clock */
diff --git a/src/emu/sound/tms5110.c b/src/emu/sound/tms5110.c
index 55d98c1a77e..9a275fbabc1 100644
--- a/src/emu/sound/tms5110.c
+++ b/src/emu/sound/tms5110.c
@@ -1132,8 +1132,8 @@ static DEVICE_RESET( tms5110 )
else
{
/* no dummy read! This makes bagman and ad2083 speech fail
- * with the new cycle and transition exact interfaces
- */
+ * with the new cycle and transition exact interfaces
+ */
tms->schedule_dummy_read = FALSE;
}
tms->addr_bit = 0;
@@ -1480,14 +1480,14 @@ WRITE_LINE_DEVICE_HANDLER( tmsprom_enable_w )
update_prom_cnt(tms);
/* the following is needed for ad2084.
- * It is difficult to derive the actual connections from
- * pcb pictures but the reset pin of the LS393 driving
- * the prom address line is connected somewhere.
- *
- * This does not affect bagman. It just simulates that a
- * write to ads3 is always happening when the four lower
- * counter bits are 0!
- */
+ * It is difficult to derive the actual connections from
+ * pcb pictures but the reset pin of the LS393 driving
+ * the prom address line is connected somewhere.
+ *
+ * This does not affect bagman. It just simulates that a
+ * write to ads3 is always happening when the four lower
+ * counter bits are 0!
+ */
if (state)
tms->prom_cnt &= 0x10;
}
diff --git a/src/emu/sound/tms5220.c b/src/emu/sound/tms5220.c
index a04c47eeee7..d9419754140 100644
--- a/src/emu/sound/tms5220.c
+++ b/src/emu/sound/tms5220.c
@@ -1652,15 +1652,15 @@ WRITE_LINE_DEVICE_HANDLER( tms5220_wsq_w )
tms->io_ready = 0;
update_ready_state(tms);
/* Now comes the complicated part: long does /READY stay inactive, when /WS is pulled low? This depends ENTIRELY on the command written, or whether the chip is in speak external mode or not...
- Speak external mode: ~16 cycles
- Command Mode:
- SPK: ? cycles
- SPKEXT: ? cycles
- RDBY: between 60 and 140 cycles
- RB: ? cycles (80?)
- RST: between 60 and 140 cycles
- SET RATE (5220C only): ? cycles (probably ~16)
- */
+ Speak external mode: ~16 cycles
+ Command Mode:
+ SPK: ? cycles
+ SPKEXT: ? cycles
+ RDBY: between 60 and 140 cycles
+ RB: ? cycles (80?)
+ RST: between 60 and 140 cycles
+ SET RATE (5220C only): ? cycles (probably ~16)
+ */
// TODO: actually HANDLE the timing differences! currently just assuming always 16 cycles
timer_set(tms->device->machine, ATTOTIME_IN_HZ(device->clock()/16), tms, 1, io_ready_cb); // this should take around 10-16 (closer to ~15) cycles to complete for fifo writes, TODO: but actually depends on what command is written if in command mode
}
diff --git a/src/emu/timer.c b/src/emu/timer.c
index 3c8c81f608a..f10259d46cf 100644
--- a/src/emu/timer.c
+++ b/src/emu/timer.c
@@ -975,7 +975,7 @@ device_t *timer_device_config::alloc_device(running_machine &machine) const
//-------------------------------------------------
-// device_config_complete - perform any
+// device_config_complete - perform any
// operations now that the configuration is
// complete
//-------------------------------------------------
@@ -1046,7 +1046,7 @@ bool timer_device_config::device_validity_check(const game_driver &driver) const
error = true;
break;
}
-
+
return error;
}
@@ -1122,7 +1122,7 @@ void timer_device::device_reset()
case timer_device_config::TIMER_TYPE_SCANLINE:
if (m_screen == NULL)
fatalerror("timer '%s': unable to find screen '%s'\n", tag(), m_config.m_screen);
-
+
// set the timer to to fire immediately
m_first_time = true;
timer_adjust_oneshot(m_timer, attotime_zero, m_config.m_param);
diff --git a/src/emu/timer.h b/src/emu/timer.h
index af56bf054b4..4c4bc9a442a 100644
--- a/src/emu/timer.h
+++ b/src/emu/timer.h
@@ -224,7 +224,7 @@ attotime timer_firetime(emu_timer *which);
class timer_device_config : public device_config
{
friend class timer_device;
-
+
// construction/destruction
timer_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock);
@@ -235,7 +235,7 @@ public:
// basic information getters
virtual const char *name() const { return "Timer"; }
-
+
// indexes to inline data
enum
{
@@ -264,7 +264,7 @@ private:
virtual bool device_validity_check(const game_driver &driver) const;
// configuration data
- timer_type m_type; // type of timer
+ timer_type m_type; // type of timer
timer_device_fired_func m_callback; // the timer's callback function
void * m_ptr; // the pointer parameter passed to the timer callback
@@ -286,7 +286,7 @@ private:
class timer_device : public device_t
{
friend class timer_device_config;
-
+
// construction/destruction
timer_device(running_machine &_machine, const timer_device_config &config);
@@ -297,7 +297,7 @@ public:
bool enabled() const { return (timer_enabled(m_timer) != 0); }
// property setters
- void set_param(int param) { assert(m_config.m_type == timer_device_config::TIMER_TYPE_GENERIC); timer_set_param(m_timer, param); }
+ void set_param(int param) { assert(m_config.m_type == timer_device_config::TIMER_TYPE_GENERIC); timer_set_param(m_timer, param); }
void set_ptr(void *ptr) { m_ptr = ptr; }
void enable(bool enable = true) { timer_enable(m_timer, enable); }
@@ -323,7 +323,7 @@ private:
static TIMER_CALLBACK( static_scanline_timer_callback ) { reinterpret_cast<timer_device *>(ptr)->scanline_timer_callback(param); }
void scanline_timer_callback(int scanline);
- // internal state
+ // internal state
const timer_device_config &m_config;
emu_timer * m_timer; // the backing timer
void * m_ptr; // the pointer parameter passed to the timer callback
diff --git a/src/emu/validity.c b/src/emu/validity.c
index 598fcc506f2..76f81929fa7 100644
--- a/src/emu/validity.c
+++ b/src/emu/validity.c
@@ -596,7 +596,7 @@ static bool validate_display(int drivnum, const machine_config *config)
const game_driver *driver = drivers[drivnum];
bool palette_modes = false;
bool error = false;
-
+
for (const screen_device_config *scrconfig = screen_first(*config); scrconfig != NULL; scrconfig = screen_next(scrconfig))
if (scrconfig->format() == BITMAP_FORMAT_INDEXED16)
palette_modes = true;
diff --git a/src/emu/video.c b/src/emu/video.c
index 3df2301f2a7..2bf11d9a89f 100644
--- a/src/emu/video.c
+++ b/src/emu/video.c
@@ -1726,7 +1726,7 @@ device_t *screen_device_config::alloc_device(running_machine &machine) const
//-------------------------------------------------
-// device_config_complete - perform any
+// device_config_complete - perform any
// operations now that the configuration is
// complete
//-------------------------------------------------
@@ -1754,13 +1754,13 @@ void screen_device_config::device_config_complete()
//-------------------------------------------------
// device_validity_check - verify device
-// configuration
+// configuration
//-------------------------------------------------
bool screen_device_config::device_validity_check(const game_driver &driver) const
{
bool error = false;
-
+
// sanity check dimensions
if (m_width <= 0 || m_height <= 0)
{
@@ -2212,7 +2212,7 @@ int screen_device::hpos() const
//-------------------------------------------------
// time_until_pos - returns the amount of time
-// remaining until the beam is at the given
+// remaining until the beam is at the given
// hpos,vpos
//-------------------------------------------------
@@ -2273,7 +2273,7 @@ void screen_device::register_vblank_callback(vblank_state_changed_func vblank_ca
for (itemptr = &m_callback_list; *itemptr != NULL; itemptr = &(*itemptr)->m_next)
if ((*itemptr)->m_callback == vblank_callback)
break;
-
+
// if not found, register
if (*itemptr == NULL)
{
@@ -2387,7 +2387,7 @@ bool screen_device::update_quads()
rectangle fixedvis = m_visarea;
fixedvis.max_x++;
fixedvis.max_y++;
-
+
palette_t *palette = (m_texture_format == TEXFORMAT_PALETTE16) ? machine->palette : NULL;
render_texture_set_bitmap(m_texture[m_curbitmap], m_bitmap[m_curbitmap], &fixedvis, m_texture_format, palette);
diff --git a/src/emu/video.h b/src/emu/video.h
index ef66e2a0309..615fc9ef889 100644
--- a/src/emu/video.h
+++ b/src/emu/video.h
@@ -85,19 +85,19 @@ typedef void (*vblank_state_changed_func)(screen_device &device, void *param, bo
class screen_device_config : public device_config
{
friend class screen_device;
-
+
// construction/destruction
screen_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock);
public:
- // allocators
+ // allocators
static device_config *static_alloc_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock);
virtual device_t *alloc_device(running_machine &machine) const;
// basic information getters
virtual const char *name() const { return "Video Screen"; }
- // configuration readers
+ // configuration readers
screen_type_enum screen_type() const { return m_type; }
int width() const { return m_width; }
int height() const { return m_height; }
@@ -137,7 +137,7 @@ private:
virtual bool device_validity_check(const game_driver &driver) const;
// configuration data
- screen_type_enum m_type; // type of screen
+ screen_type_enum m_type; // type of screen
int m_width, m_height; // default total width/height (HTOTAL, VTOTAL)
rectangle m_visarea; // default visible area (HBLANK end/start, VBLANK end/start)
bool m_oldstyle_vblank_supplied; // MDRV_SCREEN_VBLANK_TIME macro used
@@ -169,7 +169,7 @@ public:
int height() const { return m_height; }
const rectangle &visible_area() const { return m_visarea; }
bitmap_format format() const { return m_config.m_format; }
-
+
// dynamic configuration
void configure(int width, int height, const rectangle &visarea, attoseconds_t frame_period);
void set_visible_area(int min_x, int max_x, int min_y, int max_y);
@@ -197,7 +197,7 @@ public:
void save_snapshot(mame_file *fp);
void register_vblank_callback(vblank_state_changed_func vblank_callback, void *param);
bitmap_t *alloc_compatible_bitmap(int width = 0, int height = 0) { return auto_bitmap_alloc(machine, (width == 0) ? m_width : width, (height == 0) ? m_height : height, m_config.m_format); }
-
+
// internal to the video system
bool update_quads();
void update_burnin();
@@ -264,7 +264,7 @@ private:
struct callback_item
{
callback_item * m_next;
- vblank_state_changed_func m_callback;
+ vblank_state_changed_func m_callback;
void * m_param;
};
callback_item * m_callback_list; // list of VBLANK callbacks
diff --git a/src/emu/video/mc6845.c b/src/emu/video/mc6845.c
index 3a259f0b183..405c213c015 100644
--- a/src/emu/video/mc6845.c
+++ b/src/emu/video/mc6845.c
@@ -1032,7 +1032,7 @@ DEVICE_GET_INFO( mc6845 )
case DEVINFO_FCT_START: info->start = DEVICE_START_NAME(mc6845); break;
case DEVINFO_FCT_STOP: /* Nothing */ break;
case DEVINFO_FCT_RESET: info->reset = DEVICE_RESET_NAME(mc6845); break;
-// case DEVINFO_FCT_VALIDITY_CHECK: info->validity_check = DEVICE_VALIDITY_CHECK_NAME(mc6845); break;
+// case DEVINFO_FCT_VALIDITY_CHECK: info->validity_check = DEVICE_VALIDITY_CHECK_NAME(mc6845); break;
/* --- the following bits of info are returned as NULL-terminated strings --- */
case DEVINFO_STR_NAME: strcpy(info->s, "Motorola 6845"); break;
diff --git a/src/emu/video/pc_video.c b/src/emu/video/pc_video.c
index 48736b58720..de69ca583a2 100644
--- a/src/emu/video/pc_video.c
+++ b/src/emu/video/pc_video.c
@@ -38,7 +38,7 @@ static STATE_POSTLOAD( pc_video_postload )
-void pc_video_start(running_machine *machine,
+void pc_video_start(running_machine *machine,
pc_video_update_proc (*choosevideomode)(running_machine *machine, int *width, int *height),
size_t vramsize)
{
diff --git a/src/emu/video/pc_video.h b/src/emu/video/pc_video.h
index 08212e09681..b8f0532bdab 100644
--- a/src/emu/video/pc_video.h
+++ b/src/emu/video/pc_video.h
@@ -11,7 +11,7 @@
typedef void (*pc_video_update_proc)(bitmap_t *bitmap);
-void pc_video_start(running_machine *machine,
+void pc_video_start(running_machine *machine,
pc_video_update_proc (*choosevideomode)(running_machine *machine, int *width, int *height),
size_t vramsize);