diff options
| author | 2008-07-24 09:07:49 +0000 | |
|---|---|---|
| committer | 2008-07-24 09:07:49 +0000 | |
| commit | 7a14f21c1512a716aa5dd4096c5c4544523706f6 (patch) | |
| tree | 53e525aca08ccb6363c209e47cf8e212a84c72c6 /src/emu | |
| parent | 4900606a620983609f34f90d6c85d1372948100f (diff) | |
Cleanups and version bump.mame0126u2
Diffstat (limited to 'src/emu')
| -rw-r--r-- | src/emu/attotime.c | 4 | ||||
| -rw-r--r-- | src/emu/cpu/dsp56k/dsp56dsm.c | 84 | ||||
| -rw-r--r-- | src/emu/cpu/mb86233/mb86233.c | 2 | ||||
| -rw-r--r-- | src/emu/debug/debugcpu.c | 2 | ||||
| -rw-r--r-- | src/emu/machine/6532riot.c | 48 | ||||
| -rw-r--r-- | src/emu/machine/8257dma.c | 4 |
6 files changed, 72 insertions, 72 deletions
diff --git a/src/emu/attotime.c b/src/emu/attotime.c index 9783dfe2ba0..335a3f832a7 100644 --- a/src/emu/attotime.c +++ b/src/emu/attotime.c @@ -54,7 +54,7 @@ attoseconds_t attotime_to_attoseconds(attotime _time) /*------------------------------------------------- - attotime_to_ticks - convert an attotime to + attotime_to_ticks - convert an attotime to clock ticks at the given frequency -------------------------------------------------*/ @@ -66,7 +66,7 @@ INT64 attotime_to_ticks(attotime _time, INT32 frequency) /*------------------------------------------------- - ticks_to_attotime - convert clock ticks at + ticks_to_attotime - convert clock ticks at the given frequency to an attotime -------------------------------------------------*/ diff --git a/src/emu/cpu/dsp56k/dsp56dsm.c b/src/emu/cpu/dsp56k/dsp56dsm.c index fa8d09cf68a..363b15155be 100644 --- a/src/emu/cpu/dsp56k/dsp56dsm.c +++ b/src/emu/cpu/dsp56k/dsp56dsm.c @@ -146,13 +146,13 @@ offs_t dsp56k_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opr sprintf(buffer, "Parallel x memory data write and register data move unimplemented."); size = 1; } - + /* Tcc is a unique critter */ if (BITS(op,0xfc00) == 0x4) { size = assemble_TCC_opcode(buffer, op, op2, pc); } - + /* Operations that do not allow a parallel move */ if (BITS(op,0xff00) == 0x14) { @@ -174,7 +174,7 @@ offs_t dsp56k_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opr { size = assemble_misc_opcode(buffer, op, op2, pc); } - + if (BITS(op,0xf000) == 0x0) { size = assemble_unique_opcode(buffer, op, op2, pc); @@ -200,19 +200,19 @@ static unsigned assemble_x_memory_data_move_ALU_opcode(char* buffer, const UINT1 char arg_str[128] = ""; char opcode_str[128] = ""; char parallel_move_str[128] = ""; - + /* Init */ sprintf(buffer, " "); /* First, decode the Data ALU opcode */ decode_data_ALU_opcode(BITS(op,0x00ff), opcode_str, arg_str); - + /* Next, decode the X Memory Data Move */ decode_x_memory_data_move(BITS(op,0xff00), parallel_move_str); - + /* Finally, assemble the full opcode */ sprintf(buffer, "%s %s %s", opcode_str, arg_str, parallel_move_str); - + return opSize; } @@ -221,22 +221,22 @@ static unsigned assemble_dual_x_memory_data_read_ALU_opcode(char* buffer, const { /* All operations are of length 1 */ unsigned opSize = 1; - + /* Recovered strings */ char arg_str[128] = ""; char opcode_str[128] = ""; char parallel_move_str[128] = ""; char parallel_move_str2[128] = ""; - + /* Init */ sprintf(buffer, " "); /* First, decode the Data ALU opcode */ decode_data_ALU_opcode_dual_move(BITS(op,0x00ff), opcode_str, arg_str); - + /* Next, decode the Dual X Memory Data Read */ decode_dual_x_memory_data_read(op, parallel_move_str, parallel_move_str2); - + /* Finally, assemble the full opcode */ sprintf(buffer, "%s %s %s %s", opcode_str, arg_str, parallel_move_str, parallel_move_str2); @@ -247,17 +247,17 @@ static unsigned assemble_TCC_opcode(char* buffer, const UINT16 op, const UINT16 { /* TCC is of length 1 */ unsigned opSize = 1; - + /* Recovered strings */ char arg_str[128] = ""; char opcode_str[128] = ""; - + /* Init */ sprintf(buffer, " "); /* Simply decode the opcode and its arguments */ opSize = decode_TCC_opcode(op, opcode_str, arg_str); - + /* Finally, assemble the full opcode */ sprintf(buffer, "%s %s", opcode_str, arg_str); @@ -268,17 +268,17 @@ static unsigned assemble_bitfield_opcode(char* buffer, const UINT16 op, const UI { /* All bitfield ops are length 2 */ unsigned opSize = 2; - + /* Recovered strings */ char arg_str[128] = ""; char opcode_str[128] = ""; - + /* Init */ sprintf(buffer, " "); /* Simply decode the opcode and its arguments */ opSize = decode_bitfield_opcode(op, op2, opcode_str, arg_str); - + /* Finally, assemble the full opcode */ sprintf(buffer, "%s %s", opcode_str, arg_str); @@ -302,7 +302,7 @@ static unsigned assemble_no_parallel_move_opcode(char* buffer, const UINT16 op, /* Finally, assemble the full opcode */ sprintf(buffer, "%s %s", opcode_str, arg_str); - + return opSize; } @@ -344,7 +344,7 @@ static unsigned assemble_movec_opcodes(char* buffer, const UINT16 op, const UINT /* Finally, assemble the full opcode */ sprintf(buffer, "%s %s", opcode_str, arg_str); - + return opSize; } @@ -365,7 +365,7 @@ static unsigned assemble_misc_opcode(char* buffer, const UINT16 op, const UINT16 /* Finally, assemble the full opcode */ sprintf(buffer, "%s %s", opcode_str, arg_str); - + return opSize; } @@ -387,7 +387,7 @@ static unsigned assemble_unique_opcode(char* buffer, const UINT16 op, const UINT /* Finally, assemble the full opcode */ sprintf(buffer, "%s %s", opcode_str, arg_str); - + return opSize; } @@ -519,7 +519,7 @@ static void decode_data_ALU_opcode(const UINT16 op_byte, char* opcode_str, char* { /* SUBL - 1mRR HHHW 0100 F001 */ sprintf(opcode_str, "subl"); - + /* Only one option for the F table */ if (!BITS(op_byte,0x08)) sprintf(arg_str, "B,A"); @@ -652,7 +652,7 @@ static void decode_data_ALU_opcode(const UINT16 op_byte, char* opcode_str, char* sprintf(opcode_str, "mpyr"); sprintf(arg_str, "(%s)%s,%s,%s", SIGN, S2, S1, D); break; - + /* MAC - 1mRR HHHH 1k10 FQQQ */ case 0x2: sprintf(opcode_str, "mac"); @@ -660,7 +660,7 @@ static void decode_data_ALU_opcode(const UINT16 op_byte, char* opcode_str, char* break; /* MACR - 1mRR HHHH 1k11 FQQQ */ - case 0x3: + case 0x3: sprintf(opcode_str, "macr"); /* TODO: It's a little odd that macr is S1,S2 while everyone else is S2,S1. Check! */ sprintf(arg_str, "(%s)%s,%s,%s", SIGN, S1, S2, D); @@ -734,7 +734,7 @@ static unsigned decode_TCC_opcode(const UINT16 op, char* opcode_str, char* arg_s char M[32]; char D[32]; char S[32]; - + decode_cccc_table(BITS(op,0x03c0), M); sprintf(opcode_str, "t.%s", M); @@ -743,12 +743,12 @@ static unsigned decode_TCC_opcode(const UINT16 op, char* opcode_str, char* arg_s sprintf(arg_str, "%s,%s R0,R%d", S, D, Rnum); /* TODO: Investigate - if (S1[0] == D[0] && D[0] == 'A') - sprintf(buffer, "t.%s %s,%s", M, S1, D); - else - sprintf(buffer, "t.%s %s,%s R0,R%d", M, S1, D, Rnum); - */ - + if (S1[0] == D[0] && D[0] == 'A') + sprintf(buffer, "t.%s %s,%s", M, S1, D); + else + sprintf(buffer, "t.%s %s,%s R0,R%d", M, S1, D, Rnum); + */ + return 1; } @@ -803,13 +803,13 @@ static unsigned decode_bitfield_opcode(const UINT16 op, const UINT16 op2, char* static unsigned decode_no_parallel_move_opcode(const UINT16 op, const UINT16 op2, const UINT16 pc, char* opcode_str, char* arg_str) { unsigned retSize = 1; - + int Rnum = -1; char A[32]; char D[32]; char S1[32]; char S2[32]; - + switch(BITS(op,0x0074)) { case 0x0: @@ -1005,7 +1005,7 @@ static unsigned decode_immediate_opcode(const UINT16 op, const UINT16 pc, char* sprintf(arg_str, "%s", args); } } - + return retSize; } @@ -1017,7 +1017,7 @@ static unsigned decode_movec_opcodes(const UINT16 op, const UINT16 op2, const UI char ea[32]; char args[64]; int Rnum = -1; - + if (BITS(op,0x0010) == 0x0) { /* MOVE(C) - 0011 1WDD DDD0 MMRR */ @@ -1076,7 +1076,7 @@ static unsigned decode_movec_opcodes(const UINT16 op, const UINT16 op2, const UI static unsigned decode_misc_opcode(const UINT16 op, const UINT16 pc, char* opcode_str, char* arg_str) { unsigned retSize = 1; - + char M[32]; char S1[32]; char SD[32]; @@ -1085,7 +1085,7 @@ static unsigned decode_misc_opcode(const UINT16 op, const UINT16 pc, char* opcod char args[64]; int Rnum = -1; int relativeInt = 666; - + switch(BITS(op,0x0c00)) { /* MOVE(I) - 0010 00DD BBBB BBBB */ @@ -1122,7 +1122,7 @@ static unsigned decode_misc_opcode(const UINT16 op, const UINT16 pc, char* opcod sprintf(arg_str, "%04x (%d)", (int)pc + relativeInt, relativeInt); break; } - + return retSize; } @@ -1221,7 +1221,7 @@ static unsigned decode_unique_opcode(const UINT16 op, const UINT16 op2, const UI { int Rnum = -1; char M[32] = ""; - + switch(BITS(op,0x00e0)) { case 0x2: @@ -1330,7 +1330,7 @@ static unsigned decode_unique_opcode(const UINT16 op, const UINT16 op2, const UI else if (BITS(op,0x00f0) == 0x5) { char M[32] = ""; - + /* REP.cc - 0000 0001 0101 cccc */ decode_cccc_table(BITS(op,0x000f), M); sprintf(opcode_str, "rep.%s", M); @@ -1353,7 +1353,7 @@ static unsigned decode_unique_opcode(const UINT16 op, const UINT16 op2, const UI else if (BITS(op,0x0e00) == 0x1) { sprintf(opcode_str, "move(m)"); - + if (BITS(op,0x0020) == 0x0) { /* MOVE(M) - 0000 001W RR0M MHHH */ @@ -2166,7 +2166,7 @@ static INT8 get_6_bit_relative_value(UINT16 bits) UINT16 fullAddy = bits; if (fullAddy & 0x0020) fullAddy |= 0xffc0; - + return (INT8)fullAddy; } diff --git a/src/emu/cpu/mb86233/mb86233.c b/src/emu/cpu/mb86233/mb86233.c index f724c228826..f87b78719bd 100644 --- a/src/emu/cpu/mb86233/mb86233.c +++ b/src/emu/cpu/mb86233/mb86233.c @@ -157,7 +157,7 @@ static void mb86233_reset(void) #define ZERO_FLAG (1 << 0) #define SIGN_FLAG (1 << 1) -#define EXTERNAL_FLAG (1 << 2) //This seems to be a flag coming from some external circuit¿? +#define EXTERNAL_FLAG (1 << 2) //This seems to be a flag coming from some external circuit?? static void FLAGSF( float v ) { diff --git a/src/emu/debug/debugcpu.c b/src/emu/debug/debugcpu.c index cc011a0c197..20733e88ed6 100644 --- a/src/emu/debug/debugcpu.c +++ b/src/emu/debug/debugcpu.c @@ -585,7 +585,7 @@ void debug_cpu_instruction_hook(running_machine *machine, offs_t curpc) if (global.execution_state == EXECUTION_STATE_STOPPED) { int firststop = TRUE; - + /* reset any transient state */ reset_transient_flags(machine); diff --git a/src/emu/machine/6532riot.c b/src/emu/machine/6532riot.c index b911c5d9ac7..bc7032047b7 100644 --- a/src/emu/machine/6532riot.c +++ b/src/emu/machine/6532riot.c @@ -53,7 +53,7 @@ struct _riot6532_state int index; riot6532_port port[2]; - + UINT8 irqstate; UINT8 irqenable; @@ -144,11 +144,11 @@ INLINE UINT8 get_timer(riot6532_state *riot) /* if idle, return 0 */ if (riot->timerstate == TIMER_IDLE) return 0; - + /* if counting, return the number of ticks remaining */ else if (riot->timerstate == TIMER_COUNTING) return attotime_to_ticks(timer_timeleft(riot->timer), riot->clock) >> riot->timershift; - + /* if finishing, return the number of ticks without the shift */ else return attotime_to_ticks(timer_timeleft(riot->timer), riot->clock); @@ -177,12 +177,12 @@ static TIMER_CALLBACK( timer_end_callback ) { riot->timerstate = TIMER_FINISHING; timer_adjust_oneshot(riot->timer, ticks_to_attotime(256, riot->clock), 0); - + /* signal timer IRQ as well */ riot->irqstate |= TIMER_FLAG; update_irqstate(device); } - + /* if we finished finishing, switch to the idle state */ else if (riot->timerstate == TIMER_FINISHING) { @@ -211,27 +211,27 @@ WRITE8_DEVICE_HANDLER( riot6532_w ) static const UINT8 timershift[4] = { 0, 3, 6, 10 }; attotime curtime = timer_get_time(); INT64 target; - + /* A0-A1 contain the timer divisor */ riot->timershift = timershift[offset & 3]; - + /* A3 contains the timer IRQ enable */ if (offset & 8) riot->irqenable |= TIMER_FLAG; else riot->irqenable &= ~TIMER_FLAG; - + /* writes here clear the timer flag */ if (riot->timerstate != TIMER_FINISHING || get_timer(riot) != 0xff) riot->irqstate &= ~TIMER_FLAG; update_irqstate(device); - + /* update the timer */ riot->timerstate = TIMER_COUNTING; target = attotime_to_ticks(curtime, riot->clock) + 1 + (data << riot->timershift); timer_adjust_oneshot(riot->timer, attotime_sub(ticks_to_attotime(target, riot->clock), curtime), 0); } - + /* if A4 == 0 and A2 == 1, we are writing to the edge detect control */ else if ((offset & 0x14) == 0x04) { @@ -240,21 +240,21 @@ WRITE8_DEVICE_HANDLER( riot6532_w ) riot->irqenable |= PA7_FLAG; else riot->irqenable &= ~PA7_FLAG; - + /* A0 specifies the edge detect direction: 0=negative, 1=positive */ riot->pa7dir = (offset & 1) << 7; } - + /* if A4 == anything and A2 == 0, we are writing to the I/O section */ else { /* A1 selects the port */ riot6532_port *port = &riot->port[(offset >> 1) & 1]; - + /* if A0 == 1, we are writing to the port's DDR */ if (offset & 1) port->ddr = data; - + /* if A0 == 0, we are writing to the port's output */ else { @@ -265,7 +265,7 @@ WRITE8_DEVICE_HANDLER( riot6532_w ) else logerror("6532RIOT chip %s: Port %c is being written to but has no handler. PC: %08X - %02X\n", device->tag, 'A' + (offset & 1), safe_activecpu_get_pc(), data); } - + /* writes to port A need to update the PA7 state */ if (port == &riot->port[0]) update_pa7_state(device); @@ -281,7 +281,7 @@ READ8_DEVICE_HANDLER( riot6532_r ) { riot6532_state *riot = get_safe_token(device); UINT8 val = 0; - + /* if A2 == 1 and A0 == 1, we are reading interrupt flags */ if ((offset & 0x05) == 0x05) { @@ -291,7 +291,7 @@ READ8_DEVICE_HANDLER( riot6532_r ) riot->irqstate &= ~PA7_FLAG; update_irqstate(device); } - + /* if A2 == 1 and A0 == 0, we are reading the timer */ else if ((offset & 0x05) == 0x04) { @@ -302,23 +302,23 @@ READ8_DEVICE_HANDLER( riot6532_r ) riot->irqenable |= TIMER_FLAG; else riot->irqenable &= ~TIMER_FLAG; - + /* implicitly clears the timer flag */ if (riot->timerstate != TIMER_FINISHING || val != 0xff) riot->irqstate &= ~TIMER_FLAG; update_irqstate(device); } - + /* if A2 == 0 and A0 == anything, we are reading from ports */ else { /* A1 selects the port */ riot6532_port *port = &riot->port[(offset >> 1) & 1]; - + /* if A0 == 1, we are reading the port's DDR */ if (offset & 1) val = port->ddr; - + /* if A0 == 0, we are reading the port as an input */ else { @@ -439,7 +439,7 @@ static DEVICE_START( riot6532 ) riot->intf = device->static_config; riot->index = device_list_index(device->machine->config->devicelist, RIOT6532, device->tag); riot->clock = config->clock; - + /* configure the ports */ riot->port[0].in_func = riot->intf->in_a_func; riot->port[0].out_func = riot->intf->out_a_func; @@ -461,7 +461,7 @@ static DEVICE_START( riot6532 ) state_save_register_item(unique_tag, 0, riot->irqstate); state_save_register_item(unique_tag, 0, riot->irqenable); - + state_save_register_item(unique_tag, 0, riot->pa7dir); state_save_register_item(unique_tag, 0, riot->pa7prev); @@ -479,7 +479,7 @@ static DEVICE_RESET( riot6532 ) riot->port[0].ddr = 0; riot->port[1].out = 0; riot->port[1].ddr = 0; - + /* reset IRQ states */ riot->irqenable = 0; riot->irqstate = 0; diff --git a/src/emu/machine/8257dma.c b/src/emu/machine/8257dma.c index 639a62ffbc1..f47c3e4019e 100644 --- a/src/emu/machine/8257dma.c +++ b/src/emu/machine/8257dma.c @@ -115,7 +115,7 @@ static int dma8257_do_operation(running_machine *machine, dma8257_t *dma8257, in data = 0; logerror("8257: No channel read function for channel %d defined.\n",channel); } - + if (dma8257->intf->memory_write!=NULL) { dma8257->intf->memory_write(machine, dma8257->address[channel], data); } else { @@ -172,7 +172,7 @@ static TIMER_CALLBACK( dma8257_timerproc ) { dma8257->drq &= ~(0x01 << channel); dma8257_update_status(machine, dma8257); - if (!(DMA_MODE_AUTOLOAD(dma8257->mode) && channel==2)) { + if (!(DMA_MODE_AUTOLOAD(dma8257->mode) && channel==2)) { if (DMA_MODE_TCSTOP(dma8257->mode)) { dma8257->mode &= ~(0x01 << channel); } |
