Skip to content

Commit

Permalink
Cleanups and version bump.
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronsgiles committed Aug 19, 2008
1 parent e959018 commit 0523e9f
Show file tree
Hide file tree
Showing 30 changed files with 297 additions and 296 deletions.
4 changes: 2 additions & 2 deletions src/emu/cheat.c
Original file line number Diff line number Diff line change
Expand Up @@ -1645,7 +1645,7 @@ static UINT64 execute_frombcd(void *ref, UINT32 params, const UINT64 *param)
UINT64 value = param[0];
UINT64 multiplier = 1;
UINT64 result = 0;

while (value != 0)
{
result += (value & 0x0f) * multiplier;
Expand All @@ -1665,7 +1665,7 @@ static UINT64 execute_tobcd(void *ref, UINT32 params, const UINT64 *param)
UINT64 value = param[0];
UINT64 result = 0;
UINT8 shift = 0;

while (value != 0)
{
result += (value % 10) << shift;
Expand Down
2 changes: 1 addition & 1 deletion src/emu/cpu/cpu.mak
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ $(CPUOBJ)/jaguar/jaguar.o: $(CPUSRC)/jaguar/jaguar.c \
#-------------------------------------------------

CPUDEFS += -DHAS_CUBEQCPU=$(if $(filter CUBEQCPU,$(CPUS)),1,0)

ifneq ($(filter CUBEQCPU,$(CPUS)),)
OBJDIRS += $(CPUOBJ)/cubeqcpu
CPUOBJS += $(CPUOBJ)/cubeqcpu/cubeqcpu.o
Expand Down
38 changes: 19 additions & 19 deletions src/emu/cpu/cubeqcpu/cubeqcpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Implementation of the Cube Quest AM2901-based CPUs
TODO:
TODO:
* Tidy up diassembly (split into different files?)
Expand All @@ -19,7 +19,7 @@
***************************************************************************/

/* Am2901 Instruction Fields */
static const char* ins[] =
static const char* ins[] =
{
"ADD ",
"SUBR ",
Expand All @@ -43,7 +43,7 @@ static const char* src[] =
"D,0",
};

static const char* dst[] =
static const char* dst[] =
{
"QREG ",
"NOP ",
Expand Down Expand Up @@ -409,7 +409,7 @@ static void cquestrot_init(int index, int clock, const void *_config, int (*irqc
cquestrot_state_register(index, "cquestrot");

/* Allocate RAM */
cquestrot.dram = malloc(16384 * sizeof(UINT16)); /* Shared with 68000 */
cquestrot.dram = malloc(16384 * sizeof(UINT16)); /* Shared with 68000 */
cquestrot.sram = malloc(2048 * sizeof(UINT16)); /* Private */
}

Expand Down Expand Up @@ -748,7 +748,7 @@ static int cquestsnd_execute(int cycles)

static offs_t cquestsnd_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram)
{
static const char* jmps[] =
static const char* jmps[] =
{
"JUMP ",
" ",
Expand All @@ -761,7 +761,7 @@ static offs_t cquestsnd_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const
};


static const char* latches[] =
static const char* latches[] =
{
"PLTCH ",
"DAC ",
Expand Down Expand Up @@ -880,7 +880,7 @@ static int cquestrot_execute(int cycles)

/* Core execution loop */
do
{
{
/* Decode the instruction */
UINT64 inst = cpu_readop64(ROT_PC << 3);

Expand Down Expand Up @@ -1084,7 +1084,7 @@ static int cquestrot_execute(int cycles)
r15 = (cquestrot.vflag ^ BIT(cquestrot.f, 15)) << 15;
break;
}

cquestrot.ram[b] = r15 | (cquestrot.f >> 1);
cquestrot.y = cquestrot.f;
break;
Expand Down Expand Up @@ -1201,7 +1201,7 @@ static int cquestrot_execute(int cycles)

static offs_t cquestrot_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram)
{
static const char* jmps[] =
static const char* jmps[] =
{
" ",
"JSEQ ",
Expand Down Expand Up @@ -1234,7 +1234,7 @@ static offs_t cquestrot_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const
"Y2D ",
};

static const char* spfs[] =
static const char* spfs[] =
{
" ",
" ",
Expand Down Expand Up @@ -1262,16 +1262,16 @@ static offs_t cquestrot_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const
int t = (inshig >> 20) & 0xfff;
int jmp = (inshig >> 16) & 0xf;
int spf = (inshig >> 12) & 0xf;
// int rsrc = (inshig >> 11) & 0x1;
// int rsrc = (inshig >> 11) & 0x1;
int yout = (inshig >> 8) & 0x7;
int sel = (inshig >> 6) & 0x3;
// int dsrc = (inshig >> 4) & 0x3;
// int dsrc = (inshig >> 4) & 0x3;
int b = (inshig >> 0) & 0xf;
int a = (inslow >> 28) & 0xf;
int i8_6 = (inslow >> 24) & 0x7;
int ci = (inslow >> 23) & 0x1;
int i5_3 = (inslow >> 20) & 0x7;
// int _sex = (inslow >> 19) & 0x1;
// int _sex = (inslow >> 19) & 0x1;
int i2_0 = (inslow >> 16) & 0x7;

sprintf(buffer, "%s %s,%s %x,%x,%c %d %s %s %s %.2x\n",
Expand Down Expand Up @@ -1613,7 +1613,7 @@ static int cquestlin_execute(int cycles)
cquestlin.pc[prog] = (cquestlin.pc[prog] + 1) & 0x7f;

if (prog == BACKGROUND)
cquestlin.pc[prog] |= 0x80;
cquestlin.pc[prog] |= 0x80;
else
{
/* Handle events that happen during FG execution */
Expand Down Expand Up @@ -1643,7 +1643,7 @@ static int cquestlin_execute(int cycles)
{
int _ycet;
int mux_sel = (BIT(cquestlin.sreg, SREG_DX_DY) << 1) | (BIT(cquestlin.sreg, SREG_DX) ^ BIT(cquestlin.sreg, SREG_DY));

if (mux_sel == 0)
_ycet = !(cquestlin.gt0reg && (spf == LSPF_BRES));
else if (mux_sel == 1)
Expand Down Expand Up @@ -1712,7 +1712,7 @@ static int cquestlin_execute(int cycles)
{
int _lpwrt = BIT(cquestlin.bglatch, 5);

cquestlin.bglatch =
cquestlin.bglatch =
(!(spf == LSPF_PWRT) << 5)
| (_lpwrt << 4)
| ((!_lpwrt || (!(spf == LSPF_PWRT) && (latch == LLATCH_BADLATCH))) << 2);
Expand Down Expand Up @@ -1759,7 +1759,7 @@ static int cquestlin_execute(int cycles)

static offs_t cquestlin_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram)
{
static const char* jmps[] =
static const char* jmps[] =
{
" ",
"JMSB ",
Expand All @@ -1780,7 +1780,7 @@ static offs_t cquestlin_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const
"?????",
};

static const char* latches[] =
static const char* latches[] =
{
" ",
"SEQLTCH",
Expand All @@ -1792,7 +1792,7 @@ static offs_t cquestlin_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const
"ZLTCH ",
};

static const char* spfs[] =
static const char* spfs[] =
{
" ",
"FSTOP ",
Expand Down
4 changes: 2 additions & 2 deletions src/emu/cpu/sh2/sh2drc.c
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ static void cfunc_checkirqs(void *param)
-------------------------------------------------*/
static void cfunc_fastirq(void *param)
{
sh2_exception("fastirq",sh2->irqline);
sh2_exception("fastirq",sh2->irqline);
}

/*-------------------------------------------------
Expand Down Expand Up @@ -1422,7 +1422,7 @@ static void generate_update_cycles(drcuml_block *block, compiler_state *compiler

UML_MOV(block, MEM(&sh2->pending_nmi), IMM(0)); // zap pending_nmi
UML_JMP(block, skip+1); // and then go take it (evec is already set)

UML_LABEL(block, skip+2); // skip+2:
UML_MOV(block, MEM(&sh2->evec), IMM(0xffffffff)); // mov evec, -1
UML_MOV(block, IREG(0), IMM(0xffffffff)); // mov r0, -1 (r0 = irq)
Expand Down
18 changes: 9 additions & 9 deletions src/emu/machine/68681.c
Original file line number Diff line number Diff line change
Expand Up @@ -383,15 +383,15 @@ READ8_DEVICE_HANDLER(duart68681_r)
{
r = 0xff;
/*
if (input_code_pressed(KEYCODE_1)) r ^= 0x0001;
if (input_code_pressed(KEYCODE_2)) r ^= 0x0002;
if (input_code_pressed(KEYCODE_3)) r ^= 0x0004;
if (input_code_pressed(KEYCODE_4)) r ^= 0x0008;
if (input_code_pressed(KEYCODE_5)) r ^= 0x0010;
if (input_code_pressed(KEYCODE_6)) r ^= 0x0020;
if (input_code_pressed(KEYCODE_7)) r ^= 0x0040;
if (input_code_pressed(KEYCODE_8)) r ^= 0x0080;
*/
if (input_code_pressed(KEYCODE_1)) r ^= 0x0001;
if (input_code_pressed(KEYCODE_2)) r ^= 0x0002;
if (input_code_pressed(KEYCODE_3)) r ^= 0x0004;
if (input_code_pressed(KEYCODE_4)) r ^= 0x0008;
if (input_code_pressed(KEYCODE_5)) r ^= 0x0010;
if (input_code_pressed(KEYCODE_6)) r ^= 0x0020;
if (input_code_pressed(KEYCODE_7)) r ^= 0x0040;
if (input_code_pressed(KEYCODE_8)) r ^= 0x0080;
*/
}
break;
case 0x0e: /* Start counter command */
Expand Down
Loading

0 comments on commit 0523e9f

Please sign in to comment.