summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/cpu/mcs51
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2008-11-09 01:04:37 +0000
committer Aaron Giles <aaron@aarongiles.com>2008-11-09 01:04:37 +0000
commit1e16c452121de8429e05b38d5a0306ebe15fcdd4 (patch)
treed84961b587774ad4e0c68078eaf5ffb0f9b02e56 /src/emu/cpu/mcs51
parentac7689264ec37623f67d18ca09ecd6ed88557672 (diff)
Cleanups/version bump.mame0128u3
Diffstat (limited to 'src/emu/cpu/mcs51')
-rw-r--r--src/emu/cpu/mcs51/mcs51.c28
-rw-r--r--src/emu/cpu/mcs51/mcs51.h4
-rw-r--r--src/emu/cpu/mcs51/mcs51dasm.c74
3 files changed, 53 insertions, 53 deletions
diff --git a/src/emu/cpu/mcs51/mcs51.c b/src/emu/cpu/mcs51/mcs51.c
index 642710f3059..96599d8b53f 100644
--- a/src/emu/cpu/mcs51/mcs51.c
+++ b/src/emu/cpu/mcs51/mcs51.c
@@ -32,7 +32,7 @@
/*****************************************************************************
* DS5002FP emulator by Manuel Abadia
- *
+ *
* October 2008, couriersud: Merged back in mcs51
*
* What has been added?
@@ -74,7 +74,7 @@
/******************************************************************************
* Notes:
- *
+ *
* The term cycles is used here to really refer to clock oscilations, because 1 machine cycle
* actually takes 12 oscilations.
*
@@ -267,7 +267,7 @@ struct _mcs51_regs
int cur_irq_prio; /* Holds value of the current IRQ Priority Level; -1 if no irq */
UINT8 irq_active; /* mask which irq levels are serviced */
UINT8 irq_prio[8]; /* interrupt priority */
-
+
int icount;
mcs51_uart uart; /* internal uart */
@@ -1906,7 +1906,7 @@ static void mcs51_set_irq_line(mcs51_regs *mcs51, int irqline, int state)
/* Execute cycles - returns number of cycles actually run */
static CPU_EXECUTE( mcs51 )
{
- mcs51_regs *mcs51 = device->token;
+ mcs51_regs *mcs51 = device->token;
UINT8 op;
mcs51->icount = cycles;
@@ -2058,7 +2058,7 @@ static CPU_INIT( mcs51 )
mcs51_regs *mcs51 = device->token;
token = device->token; // temporary
-
+
mcs51->irq_callback = irqcallback;
mcs51->device = device;
@@ -2225,7 +2225,7 @@ static CPU_INIT( i8052 )
{
mcs51_regs *mcs51 = device->token;
CPU_INIT_CALL(mcs51);
-
+
mcs51->ram_mask = 0xFF; /* 256 bytes of ram */
mcs51->num_interrupts = 6; /* 6 interrupts */
@@ -2278,7 +2278,7 @@ static CPU_INIT( i80c52 )
{
mcs51_regs *mcs51 = device->token;
CPU_INIT_CALL(i8052);
-
+
mcs51->features |= (FEATURE_I80C52 | FEATURE_CMOS);
mcs51->sfr_read = i80c52_sfr_read;
mcs51->sfr_write = i80c52_sfr_write;
@@ -2358,7 +2358,7 @@ static UINT8 ds5002fp_sfr_read(mcs51_regs *mcs51, size_t offset)
case ADDR_RPS: DS5_LOGR(RPS, data); break;
case ADDR_PCON:
SET_PFW(0); /* reset PFW flag */
- return mcs51_sfr_read(mcs51, offset);
+ return mcs51_sfr_read(mcs51, offset);
default:
return mcs51_sfr_read(mcs51, offset);
}
@@ -2371,9 +2371,9 @@ static CPU_INIT( ds5002fp )
static const ds5002fp_config default_config = { 0x00, 0x00, 0x00 };
const ds5002fp_config *sconfig = config ? config : &default_config;
mcs51_regs *mcs51 = device->token;
-
+
CPU_INIT_CALL( mcs51 );
-
+
mcs51->ds5002fp.config = sconfig;
mcs51->features |= (FEATURE_DS5002FP | FEATURE_CMOS);
mcs51->sfr_read = ds5002fp_sfr_read;
@@ -2420,10 +2420,10 @@ static CPU_GET_CONTEXT( mcs51 )
static CPU_SET_CONTEXT( mcs51 )
{
mcs51_regs *mcs51;
-
+
if( src )
token = src;
-
+
mcs51 = token;
change_pc(PC);
update_ptrs(mcs51);
@@ -2436,7 +2436,7 @@ static CPU_SET_CONTEXT( mcs51 )
static CPU_SET_INFO( mcs51 )
{
mcs51_regs *mcs51 = token;
-
+
switch (state)
{
/* --- the following bits of info are set as 64-bit signed integers --- */
@@ -2502,7 +2502,7 @@ static CPU_GET_INFO( mcs51 )
case CPUINFO_INT_DATABUS_WIDTH + ADDRESS_SPACE_IO: info->i = 8; break;
case CPUINFO_INT_ADDRBUS_WIDTH + ADDRESS_SPACE_IO: info->i = 18; /* 128k for ds5002fp */ break;
case CPUINFO_INT_ADDRBUS_SHIFT + ADDRESS_SPACE_IO: info->i = 0; break;
-
+
case CPUINFO_INT_PREVIOUSPC: info->i = PPC; break;
case CPUINFO_INT_PC: info->i = PC; break;
case CPUINFO_INT_SP: info->i = SP; break;
diff --git a/src/emu/cpu/mcs51/mcs51.h b/src/emu/cpu/mcs51/mcs51.h
index 252bacc5750..9c33d76984b 100644
--- a/src/emu/cpu/mcs51/mcs51.h
+++ b/src/emu/cpu/mcs51/mcs51.h
@@ -122,7 +122,7 @@ CPU_GET_INFO( at89c4051 );
/*
* The DS5002FP has 2 16 bits data address buses (the byte-wide bus and the expanded bus). The exact memory position accessed depends on the
* partition mode, the memory range and the expanded bus select. The partition mode and the expanded bus select can be changed at any time.
- *
+ *
* In order to simplify memory mapping to the data address bus, the following address map is assumed for partitioned mode:
* 0x00000-0x0ffff -> data memory on the expanded bus
@@ -131,7 +131,7 @@ CPU_GET_INFO( at89c4051 );
* For non-partitioned mode the following memory map is assumed:
* 0x0000-0xffff -> data memory (the bus used to access it does not matter)
- *
+ *
* Internal ram 128k and security features
*/
diff --git a/src/emu/cpu/mcs51/mcs51dasm.c b/src/emu/cpu/mcs51/mcs51dasm.c
index b7f1e01df70..020321f9b04 100644
--- a/src/emu/cpu/mcs51/mcs51dasm.c
+++ b/src/emu/cpu/mcs51/mcs51dasm.c
@@ -59,7 +59,7 @@ static struct {
int feature;
int addr;
const char *name;
-} mem_name_feature[] =
+} mem_name_feature[] =
{
{ FEATURE_NONE, 0x00, "rb0r0" },
{ FEATURE_NONE, 0x01, "rb0r1" },
@@ -93,7 +93,7 @@ static struct {
{ FEATURE_NONE, 0x1d, "rb3r5" },
{ FEATURE_NONE, 0x1e, "rb3r6" },
{ FEATURE_NONE, 0x1f, "rb3r7" },
-
+
{ FEATURE_NONE, 0x80, "p0" },
{ FEATURE_NONE, 0x81, "sp" },
{ FEATURE_NONE, 0x82, "dpl" },
@@ -115,13 +115,13 @@ static struct {
{ FEATURE_NONE, 0xd0, "psw" },
{ FEATURE_NONE, 0xe0, "acc" },
{ FEATURE_NONE, 0xf0, "b" },
-
+
{ FEATURE_I8052, 0xc8, "t2con" },
{ FEATURE_I8052, 0xca, "rcap2l" },
{ FEATURE_I8052, 0xcb, "rcap2h" },
{ FEATURE_I8052, 0xcc, "tl2" },
{ FEATURE_I8052, 0xcd, "th2" },
-
+
{ FEATURE_I80C52, 0xb7, "iph" },
{ FEATURE_I80C52, 0xa9, "saddr" },
{ FEATURE_I80C52, 0xb9, "saden" },
@@ -143,7 +143,7 @@ static struct {
{ FEATURE_I83C751, 0xf8, "i2sta" }, /* read only */
/* bit addresses */
-
+
{ FEATURE_NONE, 0x188, "it0" },
{ FEATURE_NONE, 0x189, "ie0" },
{ FEATURE_NONE, 0x18a, "it1" },
@@ -184,7 +184,7 @@ static struct {
{ FEATURE_I8052, 0x1ad, "et2" },
/* FIXME: port 3 - depends on external circuits and not really
- * implemented in the core. TBD */
+ * implemented in the core. TBD */
{ FEATURE_NONE, 0x1b0, "rxd" },
{ FEATURE_NONE, 0x1b1, "txd" },
{ FEATURE_NONE, 0x1b2, "int0" },
@@ -224,37 +224,37 @@ static struct {
{ FEATURE_NONE, 0x1d6, "ac" },
{ FEATURE_NONE, 0x1d7, "cy" },
- { FEATURE_DS5002FP, 0x1d8, "rg0" },
- { FEATURE_DS5002FP, 0x1d9, "rpc" },
- { FEATURE_DS5002FP, 0x1da, "dma" },
- { FEATURE_DS5002FP, 0x1db, "ibi" },
- { FEATURE_DS5002FP, 0x1dc, "ae" },
- { FEATURE_DS5002FP, 0x1dd, "exbs" },
- { FEATURE_DS5002FP, 0x1de, "d8.6" },
+ { FEATURE_DS5002FP, 0x1d8, "rg0" },
+ { FEATURE_DS5002FP, 0x1d9, "rpc" },
+ { FEATURE_DS5002FP, 0x1da, "dma" },
+ { FEATURE_DS5002FP, 0x1db, "ibi" },
+ { FEATURE_DS5002FP, 0x1dc, "ae" },
+ { FEATURE_DS5002FP, 0x1dd, "exbs" },
+ { FEATURE_DS5002FP, 0x1de, "d8.6" },
{ FEATURE_DS5002FP, 0x1df, "rnr" },
- { FEATURE_I83C751, 0x1d8, "ct0" },
- { FEATURE_I83C751, 0x1d9, "ct1" },
- { FEATURE_I83C751, 0x1da, "i2cfg.2" },
- { FEATURE_I83C751, 0x1db, "i2cfg.3" },
- { FEATURE_I83C751, 0x1dc, "tirun" },
- { FEATURE_I83C751, 0x1dd, "clrti" },
- { FEATURE_I83C751, 0x1de, "masterq" },
+ { FEATURE_I83C751, 0x1d8, "ct0" },
+ { FEATURE_I83C751, 0x1d9, "ct1" },
+ { FEATURE_I83C751, 0x1da, "i2cfg.2" },
+ { FEATURE_I83C751, 0x1db, "i2cfg.3" },
+ { FEATURE_I83C751, 0x1dc, "tirun" },
+ { FEATURE_I83C751, 0x1dd, "clrti" },
+ { FEATURE_I83C751, 0x1de, "masterq" },
{ FEATURE_I83C751, 0x1df, "slaven" },
- { FEATURE_I83C751, 0x1f8, "xstp" },
- { FEATURE_I83C751, 0x1f9, "xstr" },
- { FEATURE_I83C751, 0x1fa, "makstp" },
- { FEATURE_I83C751, 0x1fb, "makstr" },
- { FEATURE_I83C751, 0x1fc, "xactv" },
- { FEATURE_I83C751, 0x1fd, "xdata" },
- { FEATURE_I83C751, 0x1fe, "idle" },
+ { FEATURE_I83C751, 0x1f8, "xstp" },
+ { FEATURE_I83C751, 0x1f9, "xstr" },
+ { FEATURE_I83C751, 0x1fa, "makstp" },
+ { FEATURE_I83C751, 0x1fb, "makstr" },
+ { FEATURE_I83C751, 0x1fc, "xactv" },
+ { FEATURE_I83C751, 0x1fd, "xdata" },
+ { FEATURE_I83C751, 0x1fe, "idle" },
{ FEATURE_I83C751, 0x1ff, "i2sta.7" },
- /* unkown
- * "ibf", "obf", "idsm", "obfc", e8 - eb
- * "ma0", "ma1", "mb0", "mb1", ec - ef
- */
+ /* unkown
+ * "ibf", "obf", "idsm", "obfc", e8 - eb
+ * "ma0", "ma1", "mb0", "mb1", ec - ef
+ */
{ -1 }
};
@@ -263,7 +263,7 @@ static void init_mem_names(int feature_set, const char **mem_names)
{
int i;
int feature;
-
+
/* Set defaults / i8051 */
for (i = 0; feature = mem_name_feature[i].feature, feature >= 0; i++)
{
@@ -1158,7 +1158,7 @@ CPU_DISASSEMBLE( i8051 )
{
static const char *mem_names[0x200];
static int mem_names_initialized = 0;
-
+
if (!mem_names_initialized)
{
init_mem_names( FEATURE_NONE, mem_names);
@@ -1171,7 +1171,7 @@ CPU_DISASSEMBLE( i8052 )
{
static const char *mem_names[0x200];
static int mem_names_initialized = 0;
-
+
if (!mem_names_initialized)
{
init_mem_names( FEATURE_I8052, mem_names);
@@ -1184,7 +1184,7 @@ CPU_DISASSEMBLE( i80c51 )
{
static const char *mem_names[0x200];
static int mem_names_initialized = 0;
-
+
if (!mem_names_initialized)
{
init_mem_names( FEATURE_CMOS, mem_names);
@@ -1197,7 +1197,7 @@ CPU_DISASSEMBLE( i80c52 )
{
static const char *mem_names[0x200];
static int mem_names_initialized = 0;
-
+
if (!mem_names_initialized)
{
init_mem_names( FEATURE_I8052 | FEATURE_CMOS | FEATURE_I80C52, mem_names);
@@ -1210,7 +1210,7 @@ CPU_DISASSEMBLE( ds5002fp )
{
static const char *mem_names[0x200];
static int mem_names_initialized = 0;
-
+
if (!mem_names_initialized)
{
init_mem_names( FEATURE_DS5002FP | FEATURE_CMOS, mem_names);