summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatarGravatar Aaron Giles <aaron@aarongiles.com>2009-12-23 18:10:25 +0000
committerGravatarGravatar Aaron Giles <aaron@aarongiles.com>2009-12-23 18:10:25 +0000
commitc285eb9bcd3505c14a338e29f251ba00776cc75c (patch)
tree9387be1ac019ec1aadb83b22715651bd8b173d4b
parent79b8f09ad84aa2b0010562c6afac4ae1f6983759 (diff)
downloadmame-c285eb9bcd3505c14a338e29f251ba00776cc75c.tar.xz
mame-c285eb9bcd3505c14a338e29f251ba00776cc75c.zip
Cleanups and version bump.mame0135u4
-rw-r--r--src/emu/clifront.c6
-rw-r--r--src/emu/cpu/drcbex86.c12
-rw-r--r--src/emu/cpu/i386/i386op16.c2
-rw-r--r--src/emu/cpu/pic16c62x/16c62xdsm.c6
-rw-r--r--src/emu/cpu/pic16c62x/pic16c62x.c12
-rw-r--r--src/emu/cpu/pic16c62x/pic16c62x.h2
-rw-r--r--src/emu/cpu/rsp/rspdrc.c90
-rw-r--r--src/emu/cpu/x86emit.h2
-rw-r--r--src/emu/debug/debugvw.c2
-rw-r--r--src/emu/machine/eepromdev.c8
-rw-r--r--src/emu/sound/ics2115.c58
-rw-r--r--src/emu/sound/k056800.c2
-rw-r--r--src/emu/tilemap.c2
-rw-r--r--src/emu/video/saa5050.c14
-rw-r--r--src/mame/audio/dcs.c4
-rw-r--r--src/mame/audio/taito_en.c2
-rw-r--r--src/mame/drivers/88games.c8
-rw-r--r--src/mame/drivers/airbustr.c4
-rw-r--r--src/mame/drivers/ajax.c2
-rw-r--r--src/mame/drivers/aliens.c2
-rw-r--r--src/mame/drivers/atarisy1.c4
-rw-r--r--src/mame/drivers/atarisy2.c2
-rw-r--r--src/mame/drivers/badlands.c2
-rw-r--r--src/mame/drivers/balsente.c2
-rw-r--r--src/mame/drivers/battlnts.c4
-rw-r--r--src/mame/drivers/beathead.c2
-rw-r--r--src/mame/drivers/blockhl.c2
-rw-r--r--src/mame/drivers/bottom9.c22
-rw-r--r--src/mame/drivers/capbowl.c2
-rw-r--r--src/mame/drivers/carpolo.c2
-rw-r--r--src/mame/drivers/cb2001.c10
-rw-r--r--src/mame/drivers/cbasebal.c2
-rw-r--r--src/mame/drivers/chqflag.c4
-rw-r--r--src/mame/drivers/cninja.c4
-rw-r--r--src/mame/drivers/cojag.c2
-rw-r--r--src/mame/drivers/contra.c4
-rw-r--r--src/mame/drivers/coolridr.c6
-rw-r--r--src/mame/drivers/cps1.c2
-rw-r--r--src/mame/drivers/cps2.c12
-rw-r--r--src/mame/drivers/crimfght.c2
-rw-r--r--src/mame/drivers/cyberbal.c2
-rw-r--r--src/mame/drivers/dambustr.c2
-rw-r--r--src/mame/drivers/deco32.c2
-rw-r--r--src/mame/drivers/deco_mlc.c2
-rw-r--r--src/mame/drivers/djboy.c24
-rw-r--r--src/mame/drivers/dragrace.c2
-rw-r--r--src/mame/drivers/fcrash.c14
-rw-r--r--src/mame/drivers/firebeat.c2
-rw-r--r--src/mame/drivers/foodf.c2
-rw-r--r--src/mame/drivers/galaga.c2
-rw-r--r--src/mame/drivers/galaxold.c2
-rw-r--r--src/mame/drivers/gauntlet.c2
-rw-r--r--src/mame/drivers/gbusters.c2
-rw-r--r--src/mame/drivers/gei.c2
-rw-r--r--src/mame/drivers/gijoe.c6
-rw-r--r--src/mame/drivers/gticlub.c2
-rw-r--r--src/mame/drivers/harddriv.c6
-rw-r--r--src/mame/drivers/hcastle.c4
-rw-r--r--src/mame/drivers/hng64.c26
-rw-r--r--src/mame/drivers/hornet.c2
-rw-r--r--src/mame/drivers/irobot.c2
-rw-r--r--src/mame/drivers/itech32.c2
-rw-r--r--src/mame/drivers/itech8.c2
-rw-r--r--src/mame/drivers/jpmimpct.c2
-rw-r--r--src/mame/drivers/lethal.c2
-rw-r--r--src/mame/drivers/lethalj.c2
-rw-r--r--src/mame/drivers/m72.c2
-rw-r--r--src/mame/drivers/mainevt.c2
-rw-r--r--src/mame/drivers/megadriv.c2
-rw-r--r--src/mame/drivers/merit.c2
-rw-r--r--src/mame/drivers/midvunit.c2
-rw-r--r--src/mame/drivers/mitchell.c24
-rw-r--r--src/mame/drivers/model2.c2
-rw-r--r--src/mame/drivers/moo.c14
-rw-r--r--src/mame/drivers/mw8080bw.c12
-rw-r--r--src/mame/drivers/neogeo.c6
-rw-r--r--src/mame/drivers/nitedrvr.c2
-rw-r--r--src/mame/drivers/nwk-tr.c2
-rw-r--r--src/mame/drivers/overdriv.c8
-rw-r--r--src/mame/drivers/parodius.c2
-rw-r--r--src/mame/drivers/pgm.c44
-rw-r--r--src/mame/drivers/pkscram.c2
-rw-r--r--src/mame/drivers/polyplay.c2
-rw-r--r--src/mame/drivers/psikyo.c20
-rw-r--r--src/mame/drivers/psikyo4.c28
-rw-r--r--src/mame/drivers/rollerg.c6
-rw-r--r--src/mame/drivers/segaorun.c2
-rw-r--r--src/mame/drivers/seibuspi.c2
-rw-r--r--src/mame/drivers/seta2.c2
-rw-r--r--src/mame/drivers/sf.c10
-rw-r--r--src/mame/drivers/simpsons.c2
-rw-r--r--src/mame/drivers/snk6502.c2
-rw-r--r--src/mame/drivers/spy.c2
-rw-r--r--src/mame/drivers/sspeedr.c2
-rw-r--r--src/mame/drivers/subsino.c28
-rw-r--r--src/mame/drivers/suna8.c2
-rw-r--r--src/mame/drivers/suprslam.c2
-rw-r--r--src/mame/drivers/surpratk.c2
-rw-r--r--src/mame/drivers/tail2nos.c2
-rw-r--r--src/mame/drivers/thunderj.c2
-rw-r--r--src/mame/drivers/thunderx.c2
-rw-r--r--src/mame/drivers/tickee.c2
-rw-r--r--src/mame/drivers/tmnt.c12
-rw-r--r--src/mame/drivers/toratora.c2
-rw-r--r--src/mame/drivers/trvmadns.c6
-rw-r--r--src/mame/drivers/ultraman.c6
-rw-r--r--src/mame/drivers/ultrsprt.c2
-rw-r--r--src/mame/drivers/vertigo.c2
-rw-r--r--src/mame/drivers/wecleman.c4
-rw-r--r--src/mame/drivers/williams.c2
-rw-r--r--src/mame/drivers/xexex.c18
-rw-r--r--src/mame/drivers/xtheball.c2
-rw-r--r--src/mame/drivers/zr107.c2
-rw-r--r--src/mame/includes/88games.h4
-rw-r--r--src/mame/includes/balsente.h2
-rw-r--r--src/mame/includes/battlnts.h2
-rw-r--r--src/mame/includes/cbasebal.h2
-rw-r--r--src/mame/includes/crshrace.h6
-rw-r--r--src/mame/includes/f1gp.h2
-rw-r--r--src/mame/includes/flkatck.h2
-rw-r--r--src/mame/includes/hcastle.h4
-rw-r--r--src/mame/includes/malzak.h4
-rw-r--r--src/mame/includes/neogeo.h4
-rw-r--r--src/mame/includes/pgm.h4
-rw-r--r--src/mame/includes/psikyo.h6
-rw-r--r--src/mame/includes/psikyosh.h6
-rw-r--r--src/mame/includes/sf.h2
-rw-r--r--src/mame/includes/suprslam.h2
-rw-r--r--src/mame/machine/atarigen.c4
-rw-r--r--src/mame/machine/balsente.c2
-rw-r--r--src/mame/machine/carpolo.c4
-rw-r--r--src/mame/machine/cps2crpt.c2
-rw-r--r--src/mame/machine/harddriv.c2
-rw-r--r--src/mame/machine/neoprot.c4
-rw-r--r--src/mame/machine/pgmprot.c18
-rw-r--r--src/mame/machine/ticket.h2
-rw-r--r--src/mame/mamedriv.c1
-rw-r--r--src/mame/video/atarig42.c2
-rw-r--r--src/mame/video/atarigt.c2
-rw-r--r--src/mame/video/atarigx2.c2
-rw-r--r--src/mame/video/badlands.c2
-rw-r--r--src/mame/video/combatsc.c42
-rw-r--r--src/mame/video/contra.c4
-rw-r--r--src/mame/video/cps1.c14
-rw-r--r--src/mame/video/cvs.c2
-rw-r--r--src/mame/video/eprom.c4
-rw-r--r--src/mame/video/f1gp.c6
-rw-r--r--src/mame/video/fastlane.c2
-rw-r--r--src/mame/video/gauntlet.c2
-rw-r--r--src/mame/video/gijoe.c24
-rw-r--r--src/mame/video/hcastle.c4
-rw-r--r--src/mame/video/hng64.c388
-rw-r--r--src/mame/video/konicdev.c454
-rw-r--r--src/mame/video/konicdev.h12
-rw-r--r--src/mame/video/labyrunr.c4
-rw-r--r--src/mame/video/metro.c2
-rw-r--r--src/mame/video/mitchell.c16
-rw-r--r--src/mame/video/moo.c2
-rw-r--r--src/mame/video/n64.c894
-rw-r--r--src/mame/video/overdriv.c18
-rw-r--r--src/mame/video/pgm.c40
-rw-r--r--src/mame/video/psikyo.c54
-rw-r--r--src/mame/video/psikyo4.c8
-rw-r--r--src/mame/video/psikyosh.c26
-rw-r--r--src/mame/video/psx.c2
-rw-r--r--src/mame/video/rdpupd16.c62
-rw-r--r--src/mame/video/rungun.c6
-rw-r--r--src/mame/video/wecleman.c8
-rw-r--r--src/version.c2
169 files changed, 1481 insertions, 1480 deletions
diff --git a/src/emu/clifront.c b/src/emu/clifront.c
index 37355ab0b42..a8ab2ea61ef 100644
--- a/src/emu/clifront.c
+++ b/src/emu/clifront.c
@@ -636,7 +636,7 @@ int cli_info_listsamples(core_options *options, const char *gamename)
/*-------------------------------------------------
cli_info_listdevices - output the list of
- devices referenced by a given game or set of
+ devices referenced by a given game or set of
games
-------------------------------------------------*/
@@ -654,11 +654,11 @@ int cli_info_listdevices(core_options *options, const char *gamename)
{
machine_config *config = machine_config_alloc(drivers[drvindex]->machine_config);
const device_config *device;
-
+
if (count != 0)
printf("\n");
printf("Driver %s (%s):\n", drivers[drvindex]->name, drivers[drvindex]->description);
-
+
/* iterate through devices */
for (device = config->devicelist.head; device != NULL; device = device->next)
{
diff --git a/src/emu/cpu/drcbex86.c b/src/emu/cpu/drcbex86.c
index beafe283055..d35c5132b82 100644
--- a/src/emu/cpu/drcbex86.c
+++ b/src/emu/cpu/drcbex86.c
@@ -528,7 +528,7 @@ INLINE void emit_combine_z_shl_flags(x86code **dst)
/*-------------------------------------------------
- reset_last_upper_lower_reg - reset the last
+ reset_last_upper_lower_reg - reset the last
upper/lower register state
-------------------------------------------------*/
@@ -575,7 +575,7 @@ INLINE void set_last_upper_reg(drcbe_state *drcbe, x86code *dst, const drcuml_pa
INLINE int can_skip_lower_load(drcbe_state *drcbe, x86code *dst, UINT32 *memptr, UINT8 reglo)
{
-// return FALSE;
+// return FALSE;
return (dst == drcbe->last_lower_pc && memptr == drcbe->last_lower_addr && reglo == drcbe->last_lower_reg);
}
@@ -587,7 +587,7 @@ INLINE int can_skip_lower_load(drcbe_state *drcbe, x86code *dst, UINT32 *memptr,
INLINE int can_skip_upper_load(drcbe_state *drcbe, x86code *dst, UINT32 *memptr, UINT8 reghi)
{
-// return FALSE;
+// return FALSE;
return (dst == drcbe->last_upper_pc && memptr == drcbe->last_upper_addr && reghi == drcbe->last_upper_reg);
}
@@ -5658,7 +5658,7 @@ static x86code *op_and(drcbe_state *drcbe, x86code *dst, const drcuml_instructio
else if (dstp.type == DRCUML_PTYPE_MEMORY)
emit_mov_m32_imm(&dst, MABS(dstp.value + 4), 0); // mov dsthi,0
}
-
+
/* AND with immediate 0xffffffff00000000 */
else if (src2p.type == DRCUML_PTYPE_IMMEDIATE && src2p.value == U64(0xffffffff00000000) && inst->flags == 0)
{
@@ -5672,7 +5672,7 @@ static x86code *op_and(drcbe_state *drcbe, x86code *dst, const drcuml_instructio
else if (dstp.type == DRCUML_PTYPE_MEMORY)
emit_mov_m32_imm(&dst, MABS(dstp.value), 0); // mov dstlo,0
}
-
+
/* AND with immediate <= 0xffffffff */
else if (src2p.type == DRCUML_PTYPE_IMMEDIATE && src2p.value <= 0xffffffff && inst->flags == 0)
{
@@ -5684,7 +5684,7 @@ static x86code *op_and(drcbe_state *drcbe, x86code *dst, const drcuml_instructio
else if (dstp.type == DRCUML_PTYPE_MEMORY)
emit_mov_m32_imm(&dst, MABS(dstp.value + 4), 0); // mov dsthi,0
}
-
+
/* general case */
else
{
diff --git a/src/emu/cpu/i386/i386op16.c b/src/emu/cpu/i386/i386op16.c
index 66bc15587d9..1d32a623410 100644
--- a/src/emu/cpu/i386/i386op16.c
+++ b/src/emu/cpu/i386/i386op16.c
@@ -3110,7 +3110,7 @@ static void I386OP(lsl_r16_rm16)(i386_state *cpustate) // Opcode 0x0f 0x03
UINT8 modrm = FETCH(cpustate);
UINT32 limit;
I386_SREG seg;
-
+
if(PROTECTED_MODE)
{
memset(&seg, 0, sizeof(seg));
diff --git a/src/emu/cpu/pic16c62x/16c62xdsm.c b/src/emu/cpu/pic16c62x/16c62xdsm.c
index 6f18d73e60f..0ef3fe1351f 100644
--- a/src/emu/cpu/pic16c62x/16c62xdsm.c
+++ b/src/emu/cpu/pic16c62x/16c62xdsm.c
@@ -52,9 +52,9 @@ static const char *const regfile[32] = { "Reg$00 (INDF)", "Reg$01 (TMR0/OPTIO
"Reg$18", "Reg$19", "Reg$1A", "Reg$1B", "Reg$1C", "Reg$1D", "Reg$1E", "Reg$1F (CMCON/VRCON)" };
/* Registers bank 1 */
/*static const char *const regfile1[32] = { "Reg$00 (INDF)", "Reg$01 (OPTION)", "Reg$02 (PCL)", "Reg$03 (STATUS)", "Reg$04 (FSR)", "Reg$05 (TRISA)", "Reg$06 (TRISB)", "Reg$07",
- "Reg$08", "Reg$09", "Reg$0A (PCLATH)", "Reg$0B (INTCON)", "Reg$0C (PIE1)", "Reg$0D", "Reg$0E (PCON)", "Reg$0F",
- "Reg$10", "Reg$11", "Reg$12", "Reg$13", "Reg$14", "Reg$15", "Reg$16", "Reg$17",
- "Reg$18", "Reg$19", "Reg$1A", "Reg$1B", "Reg$1C", "Reg$1D", "Reg$1E", "Reg$1F (VRCON)" };
+ "Reg$08", "Reg$09", "Reg$0A (PCLATH)", "Reg$0B (INTCON)", "Reg$0C (PIE1)", "Reg$0D", "Reg$0E (PCON)", "Reg$0F",
+ "Reg$10", "Reg$11", "Reg$12", "Reg$13", "Reg$14", "Reg$15", "Reg$16", "Reg$17",
+ "Reg$18", "Reg$19", "Reg$1A", "Reg$1B", "Reg$1C", "Reg$1D", "Reg$1E", "Reg$1F (VRCON)" };
static const char **regfile[2] = { regfile0, regfile1 };*/
static const char *const dest[2] = { "W", "Reg" };
diff --git a/src/emu/cpu/pic16c62x/pic16c62x.c b/src/emu/cpu/pic16c62x/pic16c62x.c
index 24c7a2c3eb8..ec3d986d5b7 100644
--- a/src/emu/cpu/pic16c62x/pic16c62x.c
+++ b/src/emu/cpu/pic16c62x/pic16c62x.c
@@ -99,7 +99,7 @@ INLINE pic16c62x_state *get_safe_token(const device_config *device)
assert(device->type == CPU);
assert(cpu_get_type(device) == CPU_PIC16C620 ||
cpu_get_type(device) == CPU_PIC16C620A ||
-// cpu_get_type(device) == CPU_PIC16CR620A ||
+// cpu_get_type(device) == CPU_PIC16CR620A ||
cpu_get_type(device) == CPU_PIC16C621 ||
cpu_get_type(device) == CPU_PIC16C621A ||
cpu_get_type(device) == CPU_PIC16C622 ||
@@ -391,7 +391,7 @@ INLINE void STORE_REGFILE(pic16c62x_state *cpustate, offs_t addr, UINT8 data) /*
M_WRTRAM(0x81, data);
break;
case 0x85: if (cpustate->TRISA != data)
- {
+ {
cpustate->TRISA = data | 0xf0;
P_OUT(2,cpustate->TRISA);
P_OUT(0,cpustate->PORTA & (UINT8)(~cpustate->TRISA) & 0x0f);
@@ -399,11 +399,11 @@ INLINE void STORE_REGFILE(pic16c62x_state *cpustate, offs_t addr, UINT8 data) /*
}
break;
case 0x86: if (cpustate->TRISB != data)
- {
- cpustate->TRISB = data;
+ {
+ cpustate->TRISB = data;
P_OUT(3,cpustate->TRISB);
- P_OUT(1,cpustate->PORTB & (UINT8)(~cpustate->TRISB));
- M_WRTRAM(addr, data);
+ P_OUT(1,cpustate->PORTB & (UINT8)(~cpustate->TRISB));
+ M_WRTRAM(addr, data);
}
break;
default: M_WRTRAM(addr, data);
diff --git a/src/emu/cpu/pic16c62x/pic16c62x.h b/src/emu/cpu/pic16c62x/pic16c62x.h
index 712ff9c1452..1b591e28df3 100644
--- a/src/emu/cpu/pic16c62x/pic16c62x.h
+++ b/src/emu/cpu/pic16c62x/pic16c62x.h
@@ -34,7 +34,7 @@ enum
PIC16C62x_STK3, PIC16C62x_STK4, PIC16C62x_STK5, PIC16C62x_STK6,
PIC16C62x_STK7, PIC16C62x_FSR, PIC16C62x_W, PIC16C62x_ALU,
PIC16C62x_STR, PIC16C62x_OPT, PIC16C62x_TMR0, PIC16C62x_PRTA,
- PIC16C62x_PRTB, PIC16C62x_WDT, PIC16C62x_TRSA, PIC16C62x_TRSB,
+ PIC16C62x_PRTB, PIC16C62x_WDT, PIC16C62x_TRSA, PIC16C62x_TRSB,
PIC16C62x_PSCL
};
diff --git a/src/emu/cpu/rsp/rspdrc.c b/src/emu/cpu/rsp/rspdrc.c
index 5a65a76c2fa..c3dd4ac1c7d 100644
--- a/src/emu/cpu/rsp/rspdrc.c
+++ b/src/emu/cpu/rsp/rspdrc.c
@@ -2,8 +2,8 @@
rspdrc.c
- Universal machine language-based Nintendo/SGI RSP emulator.
- Written by Harmony of the MESS team.
+ Universal machine language-based Nintendo/SGI RSP emulator.
+ Written by Harmony of the MESS team.
Copyright the MESS team.
Released for general non-commercial use under the MAME license
@@ -2394,41 +2394,41 @@ INLINE void rsp_vcr(rsp_state *rsp, UINT32 op, INT16 *vres)
WRITEBACK_RESULT();
}
-// switch(EL)
-// {
-// case 0: /* 0, 1, 2, 3, 4, 5, 6, 7 - none */ /* 0, 1, 2, 3, 4, 5, 6, 7 - none */
-// break;
-// case 1: /* 0, 1, 2, 3, 4, 5, 6, 7 - ??? */ /* 0, 1, 2, 3, 4, 5, 6, 7 - ??? */
-// break;
-// case 2: /* 1, 3, 5, 7, 0, 2, 4, 6 - 0q */ /* 0, 0, 2, 2, 4, 4, 6, 6 - 0q */
-// break;
-// case 3: /* 0, 2, 4, 6, 1, 3, 5, 7 - 1q */ /* 1, 1, 3, 3, 5, 5, 7, 7 - 1q */
-// break;
-// case 4: /* 1, 2, 3, 5, 6, 7, 0, 4 - 0h */ /* 0, 0, 0, 0, 4, 4, 4, 4 - 0h */
-// break;
-// case 5: /* 0, 2, 3, 4, 6, 7, 1, 5 - 1h */ /* 1, 1, 1, 1, 5, 5, 5, 5 - 1h */
-// break;
-// case 6: /* 0, 1, 3, 4, 5, 7, 2, 6 - 2h */ /* 2, 2, 2, 2, 6, 6, 6, 6 - 2h */
-// break;
-// case 7: /* 0, 1, 2, 4, 5, 6, 3, 7 - 3h */ /* 3, 3, 3, 3, 7, 7, 7, 7 - 3h */
-// break;
-// case 8: /* 1, 2, 3, 4, 5, 6, 7, 0 - 0 */ /* 0, 0, 0, 0, 0, 0, 0, 0 - 0 */
-// break;
-// case 9: /* 0, 2, 3, 4, 5, 6, 7, 1 - 1 */ /* 1, 1, 1, 1, 1, 1, 1, 1 - 0 */
-// break;
-// case 10:/* 0, 1, 3, 4, 5, 6, 7, 2 - 2 */ /* 2, 2, 2, 2, 2, 2, 2, 2 - 0 */
-// break;
-// case 11:/* 0, 1, 2, 4, 5, 6, 7, 3 - 3 */ /* 3, 3, 3, 3, 3, 3, 3, 3 - 0 */
-// break;
-// case 12:/* 0, 1, 2, 3, 5, 6, 7, 4 - 4 */ /* 4, 4, 4, 4, 4, 4, 4, 4 - 0 */
-// break;
-// case 13:/* 0, 1, 2, 3, 4, 6, 7, 5 - 5 */ /* 5, 5, 5, 5, 5, 5, 5, 5 - 0 */
-// break;
-// case 14:/* 0, 1, 2, 3, 4, 5, 7, 6 - 6 */ /* 6, 6, 6, 6, 6, 6, 6, 6 - 0 */
-// break;
-// case 15:/* 0, 1, 2, 3, 4, 5, 6, 7 - 7 */ /* 7, 7, 7, 7, 7, 7, 7, 7 - 0 */
-// break;
-// }
+// switch(EL)
+// {
+// case 0: /* 0, 1, 2, 3, 4, 5, 6, 7 - none */ /* 0, 1, 2, 3, 4, 5, 6, 7 - none */
+// break;
+// case 1: /* 0, 1, 2, 3, 4, 5, 6, 7 - ??? */ /* 0, 1, 2, 3, 4, 5, 6, 7 - ??? */
+// break;
+// case 2: /* 1, 3, 5, 7, 0, 2, 4, 6 - 0q */ /* 0, 0, 2, 2, 4, 4, 6, 6 - 0q */
+// break;
+// case 3: /* 0, 2, 4, 6, 1, 3, 5, 7 - 1q */ /* 1, 1, 3, 3, 5, 5, 7, 7 - 1q */
+// break;
+// case 4: /* 1, 2, 3, 5, 6, 7, 0, 4 - 0h */ /* 0, 0, 0, 0, 4, 4, 4, 4 - 0h */
+// break;
+// case 5: /* 0, 2, 3, 4, 6, 7, 1, 5 - 1h */ /* 1, 1, 1, 1, 5, 5, 5, 5 - 1h */
+// break;
+// case 6: /* 0, 1, 3, 4, 5, 7, 2, 6 - 2h */ /* 2, 2, 2, 2, 6, 6, 6, 6 - 2h */
+// break;
+// case 7: /* 0, 1, 2, 4, 5, 6, 3, 7 - 3h */ /* 3, 3, 3, 3, 7, 7, 7, 7 - 3h */
+// break;
+// case 8: /* 1, 2, 3, 4, 5, 6, 7, 0 - 0 */ /* 0, 0, 0, 0, 0, 0, 0, 0 - 0 */
+// break;
+// case 9: /* 0, 2, 3, 4, 5, 6, 7, 1 - 1 */ /* 1, 1, 1, 1, 1, 1, 1, 1 - 0 */
+// break;
+// case 10:/* 0, 1, 3, 4, 5, 6, 7, 2 - 2 */ /* 2, 2, 2, 2, 2, 2, 2, 2 - 0 */
+// break;
+// case 11:/* 0, 1, 2, 4, 5, 6, 7, 3 - 3 */ /* 3, 3, 3, 3, 3, 3, 3, 3 - 0 */
+// break;
+// case 12:/* 0, 1, 2, 3, 5, 6, 7, 4 - 4 */ /* 4, 4, 4, 4, 4, 4, 4, 4 - 0 */
+// break;
+// case 13:/* 0, 1, 2, 3, 4, 6, 7, 5 - 5 */ /* 5, 5, 5, 5, 5, 5, 5, 5 - 0 */
+// break;
+// case 14:/* 0, 1, 2, 3, 4, 5, 7, 6 - 6 */ /* 6, 6, 6, 6, 6, 6, 6, 6 - 0 */
+// break;
+// case 15:/* 0, 1, 2, 3, 4, 5, 6, 7 - 7 */ /* 7, 7, 7, 7, 7, 7, 7, 7 - 0 */
+// break;
+// }
#define RSP_VMRG(E10, E11, E12, E13, E14, E15, E16, E17, E20, E21, E22, E23, E24, E25, E26, E27) \
if (COMPARE_FLAG(E10)) \
@@ -3622,7 +3622,7 @@ static void code_compile_block(rsp_state *rsp, offs_t pc)
int override = FALSE;
drcuml_block *block;
jmp_buf errorbuf;
-
+
profiler_mark_start(PROFILER_DRC_COMPILE);
/* get a description of this sequence */
@@ -3893,7 +3893,7 @@ static void static_generate_memory_accessor(rsp_state *rsp, int size, int iswrit
UML_DLOAD(block, IREG(3), rsp->impstate->dmem, IREG(0), QWORD_x1); // dload i3,dmem,i0,qword_x1
UML_DROL(block, IREG(3), IREG(3), IREG(2)); // drol i3,i3,i2
UML_DAND(block, IREG(1), IREG(1), IMM(0xffff)); // dand i1,i1,0xffff
- UML_DAND(block, IREG(3), IREG(3), IMM(U64(0xffffffffffff0000))); // dand i3,i3,~0xffff
+ UML_DAND(block, IREG(3), IREG(3), IMM(U64(0xffffffffffff0000))); // dand i3,i3,~0xffff
UML_DOR(block, IREG(1), IREG(1), IREG(3)); // dor i1,i1,i3
UML_DROR(block, IREG(1), IREG(1), IREG(2)); // dror i1,i1,i2
UML_DSTORE(block, rsp->impstate->dmem, IREG(0), IREG(1), QWORD_x1); // dstore dmem,i0,i1,qword_x1
@@ -3915,7 +3915,7 @@ static void static_generate_memory_accessor(rsp_state *rsp, int size, int iswrit
UML_DLOAD(block, IREG(3), rsp->impstate->dmem, IREG(0), QWORD_x1); // dload i3,dmem,i0,qword_x1
UML_DROL(block, IREG(3), IREG(3), IREG(2)); // drol i3,i3,i2
UML_DAND(block, IREG(1), IREG(1), IMM(0xffffffff)); // dand i1,i1,0xffffffff
- UML_DAND(block, IREG(3), IREG(3), IMM(U64(0xffffffff00000000))); // dand i3,i3,~0xffffffff
+ UML_DAND(block, IREG(3), IREG(3), IMM(U64(0xffffffff00000000))); // dand i3,i3,~0xffffffff
UML_DOR(block, IREG(1), IREG(1), IREG(3)); // dor i1,i1,i3
UML_DROR(block, IREG(1), IREG(1), IREG(2)); // dror i1,i1,i2
UML_DSTORE(block, rsp->impstate->dmem, IREG(0), IREG(1), QWORD_x1); // dstore dmem,i0,i1,qword_x1
@@ -4076,9 +4076,9 @@ static void generate_sequence_instruction(rsp_state *rsp, drcuml_block *block, c
/* if we hit an unmapped address, fatal error */
//if (desc->flags & OPFLAG_COMPILER_UNMAPPED)
//{
- // UML_MOV(block, MEM(&rsp->pc), IMM(desc->pc)); // mov [pc],desc->pc
- // save_fast_iregs(rsp, block);
- // UML_EXIT(block, IMM(EXECUTE_UNMAPPED_CODE)); // exit EXECUTE_UNMAPPED_CODE
+ // UML_MOV(block, MEM(&rsp->pc), IMM(desc->pc)); // mov [pc],desc->pc
+ // save_fast_iregs(rsp, block);
+ // UML_EXIT(block, IMM(EXECUTE_UNMAPPED_CODE)); // exit EXECUTE_UNMAPPED_CODE
//}
/* otherwise, unless this is a virtual no-op, it's a regular instruction */
@@ -4587,7 +4587,7 @@ static int generate_cop2(rsp_state *rsp, drcuml_block *block, compiler_state *co
{
UML_MOV(block, MEM(&rsp->impstate->arg0), IMM(desc->opptr.l[0])); // mov [arg0],desc->opptr.l
UML_CALLC(block, cfunc_mfc2, rsp); // callc cfunc_mfc2
- //UML_SEXT(block, R32(RTREG), IREG(0), DWORD); // dsext <rtreg>,i0,dword
+ //UML_SEXT(block, R32(RTREG), IREG(0), DWORD); // dsext <rtreg>,i0,dword
}
return TRUE;
@@ -4596,7 +4596,7 @@ static int generate_cop2(rsp_state *rsp, drcuml_block *block, compiler_state *co
{
UML_MOV(block, MEM(&rsp->impstate->arg0), IMM(desc->opptr.l[0])); // mov [arg0],desc->opptr.l
UML_CALLC(block, cfunc_cfc2, rsp); // callc cfunc_cfc2
- //UML_SEXT(block, R32(RTREG), IREG(0), DWORD); // dsext <rtreg>,i0,dword
+ //UML_SEXT(block, R32(RTREG), IREG(0), DWORD); // dsext <rtreg>,i0,dword
}
return TRUE;
diff --git a/src/emu/cpu/x86emit.h b/src/emu/cpu/x86emit.h
index 10395c52d4a..007d3600c1a 100644
--- a/src/emu/cpu/x86emit.h
+++ b/src/emu/cpu/x86emit.h
@@ -1900,7 +1900,7 @@ INLINE void emit_movsx_r32_r8(x86code **emitptr, UINT8 dreg, UINT8 sreg) {
INLINE void emit_movsx_r32_m8(x86code **emitptr, UINT8 dreg, DECLARE_MEMPARAMS) { emit_op_modrm_mem(emitptr, OP_MOVSX_Gv_Eb, OP_32BIT, dreg, MEMPARAMS); }
INLINE void emit_movsx_r32_r16(x86code **emitptr, UINT8 dreg, UINT8 sreg) { emit_op_modrm_reg(emitptr, OP_MOVSX_Gv_Ew, OP_32BIT, dreg, sreg); }
INLINE void emit_movsx_r32_m16(x86code **emitptr, UINT8 dreg, DECLARE_MEMPARAMS) { emit_op_modrm_mem(emitptr, OP_MOVSX_Gv_Ew, OP_32BIT, dreg, MEMPARAMS); }
-INLINE void emit_movzx_r32_r8(x86code **emitptr, UINT8 dreg, UINT8 sreg)
+INLINE void emit_movzx_r32_r8(x86code **emitptr, UINT8 dreg, UINT8 sreg)
{
#ifndef PTR64
if (sreg >= 4)
diff --git a/src/emu/debug/debugvw.c b/src/emu/debug/debugvw.c
index bd10dbe0afc..a2900c76c05 100644
--- a/src/emu/debug/debugvw.c
+++ b/src/emu/debug/debugvw.c
@@ -2518,7 +2518,7 @@ static int memory_view_alloc(debug_view *view)
/* allocate memory */
memdata = alloc_clear_or_die(debug_view_memory);
memdata->subviewlist = subviews;
-
+
/* allocate the expression data */
debug_view_expression_alloc(&memdata->expression);
diff --git a/src/emu/machine/eepromdev.c b/src/emu/machine/eepromdev.c
index a8a5ac06191..77a9b8bab5a 100644
--- a/src/emu/machine/eepromdev.c
+++ b/src/emu/machine/eepromdev.c
@@ -343,7 +343,7 @@ void eepromdev_set_data(const device_config *device, const UINT8 *data, int leng
assert(length <= ((1 << eestate->intf->address_bits) * eestate->intf->data_bits / 8));
memcpy(eestate->data, data, length);
-/* temporary: write data to eeprom.bin when this happens so we capture it
+/* temporary: write data to eeprom.bin when this happens so we capture it
for adding to a region */
{
FILE *f = fopen("eeprom.bin", "wb");
@@ -402,13 +402,13 @@ static DEVICE_START(eeprom)
memset(eestate->data, 0xff, (1 << eestate->intf->address_bits) * eestate->intf->data_bits / 8);
if ((config->default_data != NULL) && (config->default_data_size != 0))
eepromdev_set_data(device, config->default_data, config->default_data_size);
-
+
region_base = memory_region(device->machine, device->tag);
if (region_base != NULL)
{
UINT32 region_length = memory_region_length(device->machine, device->tag);
UINT32 region_flags = memory_region_flags(device->machine, device->tag);
-
+
if (region_length != (1 << eestate->intf->address_bits) * eestate->intf->data_bits / 8)
fatalerror("eeprom region '%s' wrong size (expected size = 0x%X)", device->tag, (1 << eestate->intf->address_bits) * eestate->intf->data_bits / 8);
if (eestate->intf->data_bits == 8 && (region_flags & ROMREGION_WIDTHMASK) != ROMREGION_8BIT)
@@ -417,7 +417,7 @@ static DEVICE_START(eeprom)
fatalerror("eeprom region '%s' needs to be a 16-bit big-endian region (flags=%08x)", device->tag, region_flags);
memcpy(eestate->data, region_base, region_length);
}
-
+
eestate->serial_count = 0;
eestate->latch = 0;
eestate->reset_line = ASSERT_LINE;
diff --git a/src/emu/sound/ics2115.c b/src/emu/sound/ics2115.c
index 175017945c6..7e90da435e7 100644
--- a/src/emu/sound/ics2115.c
+++ b/src/emu/sound/ics2115.c
@@ -86,7 +86,7 @@ static void recalc_irq(ics2115_state *chip)
for (i = 0; !irq && i<32; i++)
if (chip->voice[i].state & V_DONE)
irq = 1;
- if (irq != chip->irq_on)
+ if (irq != chip->irq_on)
{
chip->irq_on = irq;
if (chip->intf->irq_cb)
@@ -105,7 +105,7 @@ static STREAM_UPDATE( update )
memset(outputs[1], 0, samples*sizeof(*outputs[0]));
for (osc = 0; osc < 32; osc++)
- if (chip->voice[osc].state & V_ON)
+ if (chip->voice[osc].state & V_ON)
{
UINT32 adr = (chip->voice[osc].addrh << 16) | chip->voice[osc].addrl;
UINT32 end = (chip->voice[osc].endh << 16) | (chip->voice[osc].endl << 8);
@@ -119,7 +119,7 @@ static STREAM_UPDATE( update )
if (ICS2115LOGERROR) logerror("ICS2115: KEYRUN %02d adr=%08x end=%08x delta=%08x\n",
osc, adr, end, delta);
- for (i = 0; i < samples; i++)
+ for (i = 0; i < samples; i++)
{
INT32 v = chip->rom[badr|(adr >> 12)];
if (conf & 1)
@@ -131,7 +131,7 @@ static STREAM_UPDATE( update )
outputs[0][i] += v;
outputs[1][i] += v;
adr += delta;
- if (adr >= end)
+ if (adr >= end)
{
if (ICS2115LOGERROR) logerror("ICS2115: KEYDONE %2d\n", osc);
adr -= (end-loop);
@@ -195,7 +195,7 @@ static void recalc_timer(ics2115_state *chip, int timer)
if (ICS2115LOGERROR) logerror("ICS2115: timer %d off\n", timer);
}
- if (chip->timer[timer].period != period)
+ if (chip->timer[timer].period != period)
{
chip->timer[timer].period = period;
if (period)
@@ -210,10 +210,10 @@ static void ics2115_reg_w(ics2115_state *chip, UINT8 reg, UINT8 data, int msb)
{
running_machine *machine = chip->device->machine;
- switch (reg)
+ switch (reg)
{
case 0x00: // [osc] Oscillator Configuration
- if (msb)
+ if (msb)
{
chip->voice[chip->osc].conf = data;
if (ICS2115LOGERROR) logerror("%s:ICS2115: %2d: conf = %02x\n", cpuexec_describe_context(machine), chip->osc,
@@ -241,7 +241,7 @@ static void ics2115_reg_w(ics2115_state *chip, UINT8 reg, UINT8 data, int msb)
break;
case 0x03: // [osc] Wavesample loop start address 3-0.3-0
- if (msb)
+ if (msb)
{
chip->voice[chip->osc].strtl = data;
if (ICS2115LOGERROR) logerror("%s:ICS2115: %2d: strtl = %02x\n", cpuexec_describe_context(machine), chip->osc,
@@ -259,7 +259,7 @@ static void ics2115_reg_w(ics2115_state *chip, UINT8 reg, UINT8 data, int msb)
break;
case 0x05: // [osc] Wavesample loop end address 3-0.3-0
- if (msb)
+ if (msb)
{
chip->voice[chip->osc].endl = data;
if (ICS2115LOGERROR) logerror("%s:ICS2115: %2d: endl = %02x\n", cpuexec_describe_context(machine), chip->osc,
@@ -268,7 +268,7 @@ static void ics2115_reg_w(ics2115_state *chip, UINT8 reg, UINT8 data, int msb)
break;
case 0x07: // [osc] Volume Start
- if (msb)
+ if (msb)
{
chip->voice[chip->osc].vstart = data;
if (ICS2115LOGERROR) logerror("%s:ICS2115: %2d: vstart = %02x\n", cpuexec_describe_context(machine), chip->osc,
@@ -277,7 +277,7 @@ static void ics2115_reg_w(ics2115_state *chip, UINT8 reg, UINT8 data, int msb)
break;
case 0x08: // [osc] Volume End
- if (msb)
+ if (msb)
{
chip->voice[chip->osc].vend = data;
if (ICS2115LOGERROR) logerror("%s:ICS2115: %2d: vend = %02x\n", cpuexec_describe_context(machine), chip->osc,
@@ -314,7 +314,7 @@ static void ics2115_reg_w(ics2115_state *chip, UINT8 reg, UINT8 data, int msb)
case 0x0c: // [osc] Pan
- if (msb)
+ if (msb)
{
chip->voice[chip->osc].pan = data;
if (ICS2115LOGERROR) logerror("%s:ICS2115: %2d: pan = %02x\n", cpuexec_describe_context(machine), chip->osc,
@@ -323,7 +323,7 @@ static void ics2115_reg_w(ics2115_state *chip, UINT8 reg, UINT8 data, int msb)
break;
case 0x0d: // [osc] Volume Enveloppe Control
- if (msb)
+ if (msb)
{
chip->voice[chip->osc].vctl = data;
if (ICS2115LOGERROR) logerror("%s:ICS2115: %2d: vctl = %02x\n", cpuexec_describe_context(machine), chip->osc,
@@ -332,7 +332,7 @@ static void ics2115_reg_w(ics2115_state *chip, UINT8 reg, UINT8 data, int msb)
break;
case 0x10: // [osc] Oscillator Control
- if (msb)
+ if (msb)
{
chip->voice[chip->osc].ctl = data;
if (ICS2115LOGERROR) logerror("%s:ICS2115: %2d: ctl = %02x\n", cpuexec_describe_context(machine), chip->osc,
@@ -343,7 +343,7 @@ static void ics2115_reg_w(ics2115_state *chip, UINT8 reg, UINT8 data, int msb)
break;
case 0x11: // [osc] Wavesample static address 27-20
- if (msb)
+ if (msb)
{
chip->voice[chip->osc].saddr = data;
if (ICS2115LOGERROR) logerror("%s:ICS2115: %2d: saddr = %02x\n", cpuexec_describe_context(machine), chip->osc,
@@ -352,7 +352,7 @@ static void ics2115_reg_w(ics2115_state *chip, UINT8 reg, UINT8 data, int msb)
break;
case 0x40: // Timer 1 Preset
- if (!msb)
+ if (!msb)
{
chip->timer[0].preset = data;
if (ICS2115LOGERROR) logerror("%s:ICS2115: t1preset = %d\n", cpuexec_describe_context(machine), chip->timer[0].preset);
@@ -361,7 +361,7 @@ static void ics2115_reg_w(ics2115_state *chip, UINT8 reg, UINT8 data, int msb)
break;
case 0x41: // Timer 2 Preset
- if (!msb)
+ if (!msb)
{
chip->timer[1].preset = data;
if (ICS2115LOGERROR) logerror("%s:ICS2115: t2preset = %d\n", cpuexec_describe_context(machine), chip->timer[1].preset);
@@ -370,7 +370,7 @@ static void ics2115_reg_w(ics2115_state *chip, UINT8 reg, UINT8 data, int msb)
break;
case 0x42: // Timer 1 Prescaler
- if (!msb)
+ if (!msb)
{
chip->timer[0].scale = data;
if (ICS2115LOGERROR) logerror("%s:ICS2115: t1scale = %d\n", cpuexec_describe_context(machine), chip->timer[0].scale);
@@ -379,7 +379,7 @@ static void ics2115_reg_w(ics2115_state *chip, UINT8 reg, UINT8 data, int msb)
break;
case 0x43: // Timer 2 Prescaler
- if (!msb)
+ if (!msb)
{
chip->timer[1].scale = data;
if (ICS2115LOGERROR) logerror("%s:ICS2115: t2scale = %d\n", cpuexec_describe_context(machine), chip->timer[1].scale);
@@ -388,7 +388,7 @@ static void ics2115_reg_w(ics2115_state *chip, UINT8 reg, UINT8 data, int msb)
break;
case 0x4a: // IRQ Enable
- if (!msb)
+ if (!msb)
{
chip->irq_en = data;
if (ICS2115LOGERROR) logerror("%s:ICS2115: irq_en = %02x\n", cpuexec_describe_context(machine), chip->irq_en);
@@ -397,7 +397,7 @@ static void ics2115_reg_w(ics2115_state *chip, UINT8 reg, UINT8 data, int msb)
break;
case 0x4f: // Oscillator Address being Programmed
- if (!msb)
+ if (!msb)
{
chip->osc = data & 31;
if (ICS2115LOGERROR) logerror("%s:ICS2115: oscnumber = %d\n", cpuexec_describe_context(machine), chip->osc);
@@ -413,7 +413,7 @@ static UINT16 ics2115_reg_r(ics2115_state *chip, UINT8 reg)
{
running_machine *machine = chip->device->machine;
- switch (reg)
+ switch (reg)
{
case 0x0d: // [osc] Volume Enveloppe Control
if (ICS2115LOGERROR) logerror("%s:ICS2115: %2d: read vctl\n", cpuexec_describe_context(machine), chip->osc);
@@ -426,7 +426,7 @@ static UINT16 ics2115_reg_r(ics2115_state *chip, UINT8 reg)
int osc;
UINT8 res = 0xff;
for (osc = 0; osc < 32; osc++)
- if (chip->voice[osc].state & V_DONE)
+ if (chip->voice[osc].state & V_DONE)
{
chip->voice[osc].state &= ~V_DONE;
if (ICS2115LOGERROR) logerror("ICS2115: KEYOFF %2d\n", osc);
@@ -486,7 +486,7 @@ static DEVICE_START( ics2115 )
chip->ulaw = auto_alloc_array(device->machine, INT16, 256);
chip->stream = stream_create(device, 0, 2, 33075, chip, update);
- for (i = 0; i < 256; i++)
+ for (i = 0; i < 256; i++)
{
UINT8 c = ~i;
int v;
@@ -534,19 +534,19 @@ static DEVICE_START( ics2115 )
READ8_DEVICE_HANDLER( ics2115_r )
{
ics2115_state *chip = get_safe_token(device);
- switch (offset)
+ switch (offset)
{
- case 0:
+ case 0:
{
UINT8 res = 0;
- if (chip->irq_on)
+ if (chip->irq_on)
{
int i;
res |= 0x80;
if (chip->irq_en & chip->irq_pend & 3)
res |= 1; // Timer irq
for (i = 0; i < 32; i++)
- if (chip->voice[i].state & V_DONE)
+ if (chip->voice[i].state & V_DONE)
{
res |= 2;
break;
@@ -569,7 +569,7 @@ READ8_DEVICE_HANDLER( ics2115_r )
WRITE8_DEVICE_HANDLER( ics2115_w )
{
ics2115_state *chip = get_safe_token(device);
- switch (offset)
+ switch (offset)
{
case 1:
chip->reg = data;
diff --git a/src/emu/sound/k056800.c b/src/emu/sound/k056800.c
index 235b33f21e9..8bb57570024 100644
--- a/src/emu/sound/k056800.c
+++ b/src/emu/sound/k056800.c
@@ -49,7 +49,7 @@ static UINT8 k056800_host_reg_r( const device_config *device, int reg )
{
k056800_state *k056800 = k056800_get_safe_token(device);
UINT8 value = k056800->host_reg[reg];
- if (reg == 2)
+ if (reg == 2)
value &= ~3; // suppress VOLWR busy flags
return value;
diff --git a/src/emu/tilemap.c b/src/emu/tilemap.c
index 3077069e2d6..dbafd80414b 100644
--- a/src/emu/tilemap.c
+++ b/src/emu/tilemap.c
@@ -291,7 +291,7 @@ void tilemap_init(running_machine *machine)
if (machine->primary_screen == NULL)
return;
-
+
screen_width = video_screen_get_width(machine->primary_screen);
screen_height = video_screen_get_height(machine->primary_screen);
diff --git a/src/emu/video/saa5050.c b/src/emu/video/saa5050.c
index d8d39328267..d84a148ba02 100644
--- a/src/emu/video/saa5050.c
+++ b/src/emu/video/saa5050.c
@@ -9,7 +9,7 @@
- Implement BOX and dirtybuffer
- Add support for non-English version (SAA505x), possibly merging
src/mess/video/saa505x.c unsed by bbc.c in MESS
- - Investigate why supporting code 0 behavior breaks p2000t vscroll
+ - Investigate why supporting code 0 behavior breaks p2000t vscroll
in MESS (but not supporting breaks malzak title background)
- x,y sizes should probably be calculated from the screen parameters
rather than passed in the device interface
@@ -40,7 +40,7 @@ struct _saa5050_state
int size;
int rev;
- UINT8 * videoram;
+ UINT8 * videoram;
UINT16 flags;
UINT8 forecol;
UINT8 backcol;
@@ -159,8 +159,8 @@ PALETTE_INIT( saa5050 )
for ( i = 0; i < 8; i++ )
{
- r = saa5050_colors[i * 3];
- g = saa5050_colors[i * 3 + 1];
+ r = saa5050_colors[i * 3];
+ g = saa5050_colors[i * 3 + 1];
b = saa5050_colors[i * 3 + 2];
colortable_palette_set_color(machine->colortable, i, MAKE_RGB(r, g, b));
}
@@ -195,8 +195,8 @@ READ8_DEVICE_HANDLER( saa5050_videoram_r )
*************************************/
-/* this should probably be put at the end of saa5050 update,
-but p2000t in MESS does not seem to currently support it.
+/* this should probably be put at the end of saa5050 update,
+but p2000t in MESS does not seem to currently support it.
Hence, we leave it independent for the moment */
void saa5050_frame_advance( const device_config *device )
{
@@ -231,7 +231,7 @@ void saa5050_update( const device_config *device, bitmap_t *bitmap, const rectan
code = saa5050->videoram[ssy * saa5050->size + sx];
if (code < 32)
{
- switch (code)
+ switch (code)
{
case 0x00:
#ifndef MESS
diff --git a/src/mame/audio/dcs.c b/src/mame/audio/dcs.c
index f8e67dbb5f8..da620b64275 100644
--- a/src/mame/audio/dcs.c
+++ b/src/mame/audio/dcs.c
@@ -613,7 +613,7 @@ MACHINE_DRIVER_START( dcs_audio_2k )
MDRV_CPU_CONFIG(adsp_config)
MDRV_CPU_PROGRAM_MAP(dcs_2k_program_map)
MDRV_CPU_DATA_MAP(dcs_2k_data_map)
-
+
MDRV_TIMER_ADD("dcs_reg_timer", dcs_irq)
MDRV_TIMER_ADD("dcs_int_timer", internal_timer_callback)
@@ -655,7 +655,7 @@ MACHINE_DRIVER_START( dcs2_audio_2115 )
MDRV_CPU_CONFIG(adsp_config)
MDRV_CPU_PROGRAM_MAP(dcs2_2115_program_map)
MDRV_CPU_DATA_MAP(dcs2_2115_data_map)
-
+
MDRV_TIMER_ADD("dcs_reg_timer", dcs_irq)
MDRV_TIMER_ADD("dcs_sport_timer", sport0_irq)
MDRV_TIMER_ADD("dcs_int_timer", internal_timer_callback)
diff --git a/src/mame/audio/taito_en.c b/src/mame/audio/taito_en.c
index 18da5101241..78f48519767 100644
--- a/src/mame/audio/taito_en.c
+++ b/src/mame/audio/taito_en.c
@@ -270,7 +270,7 @@ static const es5505_interface es5505_taito_f3_config =
MACHINE_DRIVER_START( taito_f3_sound )
MDRV_TIMER_ADD("timer_68681", taito_en_timer_callback)
-
+
MDRV_SOUND_RESET( taito_f3_soundsystem_reset )
MDRV_CPU_ADD("audiocpu", M68000, 16000000)
diff --git a/src/mame/drivers/88games.c b/src/mame/drivers/88games.c
index c49b31f3ebe..b999c60040d 100644
--- a/src/mame/drivers/88games.c
+++ b/src/mame/drivers/88games.c
@@ -34,7 +34,7 @@ static READ8_HANDLER( bankedram_r )
{
_88games_state *state = (_88games_state *)space->machine->driver_data;
- if (state->videobank)
+ if (state->videobank)
return state->ram[offset];
else
{
@@ -49,9 +49,9 @@ static WRITE8_HANDLER( bankedram_w )
{
_88games_state *state = (_88games_state *)space->machine->driver_data;
- if (state->videobank)
+ if (state->videobank)
state->ram[offset] = data;
- else
+ else
k051316_w(state->k051316, offset, data);
}
@@ -112,7 +112,7 @@ static READ8_HANDLER( k052109_051960_r )
else
return k051960_r(state->k051960, offset - 0x3c00);
}
- else
+ else
return k052109_r(state->k052109, offset);
}
diff --git a/src/mame/drivers/airbustr.c b/src/mame/drivers/airbustr.c
index a0cc9bfc821..7feea43e00f 100644
--- a/src/mame/drivers/airbustr.c
+++ b/src/mame/drivers/airbustr.c
@@ -245,9 +245,9 @@ static READ8_HANDLER( devram_r )
case 0xff3:
{
int x = (state->devram[0xff0] + state->devram[0xff1] * 256) * (state->devram[0xff2] + state->devram[0xff3] * 256);
- if (offset == 0xff2)
+ if (offset == 0xff2)
return (x & 0x00ff) >> 0;
- else
+ else
return (x & 0xff00) >> 8;
} break;
diff --git a/src/mame/drivers/ajax.c b/src/mame/drivers/ajax.c
index d45fb094ec8..f191ea95d3b 100644
--- a/src/mame/drivers/ajax.c
+++ b/src/mame/drivers/ajax.c
@@ -204,7 +204,7 @@ static const k051960_interface ajax_k051960_intf =
static const k051316_interface ajax_k051316_intf =
{
"gfx3", 2,
- 7, FALSE, 0,
+ 7, FALSE, 0,
0, 0, 0,
ajax_zoom_callback
};
diff --git a/src/mame/drivers/aliens.c b/src/mame/drivers/aliens.c
index 56610382178..13a98635050 100644
--- a/src/mame/drivers/aliens.c
+++ b/src/mame/drivers/aliens.c
@@ -110,7 +110,7 @@ static READ8_HANDLER( k052109_051960_r )
else
return k051960_r(k051960, offset - 0x3c00);
}
- else
+ else
return k052109_r(k052109, offset);
}
diff --git a/src/mame/drivers/atarisy1.c b/src/mame/drivers/atarisy1.c
index 0ef6c2e568c..053bc6d9336 100644
--- a/src/mame/drivers/atarisy1.c
+++ b/src/mame/drivers/atarisy1.c
@@ -200,7 +200,7 @@ static MACHINE_START( atarisy1 )
{
atarisy1_state *state = (atarisy1_state *)machine->driver_data;
atarigen_init(machine);
-
+
state_save_register_global(machine, state->joystick_int);
state_save_register_global(machine, state->joystick_int_enable);
state_save_register_global(machine, state->joystick_value);
@@ -766,7 +766,7 @@ static MACHINE_DRIVER_START( atarisy1 )
MDRV_MACHINE_START(atarisy1)
MDRV_MACHINE_RESET(atarisy1)
MDRV_NVRAM_HANDLER(atarigen)
-
+
MDRV_TIMER_ADD("joystick_timer", delayed_joystick_int)
MDRV_TIMER_ADD("scan_timer", atarisy1_int3_callback)
MDRV_TIMER_ADD("int3off_timer", atarisy1_int3off_callback)
diff --git a/src/mame/drivers/atarisy2.c b/src/mame/drivers/atarisy2.c
index 1affe4514e8..23c25096e22 100644
--- a/src/mame/drivers/atarisy2.c
+++ b/src/mame/drivers/atarisy2.c
@@ -226,7 +226,7 @@ static MACHINE_START( atarisy2 )
{
atarisy2_state *state = (atarisy2_state *)machine->driver_data;
atarigen_init(machine);
-
+
state_save_register_global(machine, state->interrupt_enable);
state_save_register_global(machine, state->tms5220_data);
state_save_register_global(machine, state->tms5220_data_strobe);
diff --git a/src/mame/drivers/badlands.c b/src/mame/drivers/badlands.c
index 7ec11acca23..d24cb1a8e5a 100644
--- a/src/mame/drivers/badlands.c
+++ b/src/mame/drivers/badlands.c
@@ -201,7 +201,7 @@ static MACHINE_START( badlands )
badlands_state *state = (badlands_state *)machine->driver_data;
atarigen_init(machine);
-
+
state_save_register_global_array(machine, state->pedal_value);
}
diff --git a/src/mame/drivers/balsente.c b/src/mame/drivers/balsente.c
index de690955ab1..d8a7b16a520 100644
--- a/src/mame/drivers/balsente.c
+++ b/src/mame/drivers/balsente.c
@@ -1207,7 +1207,7 @@ static MACHINE_DRIVER_START( balsente )
MDRV_MACHINE_START(balsente)
MDRV_MACHINE_RESET(balsente)
MDRV_NVRAM_HANDLER(generic_0fill)
-
+
MDRV_TIMER_ADD("scan_timer", balsente_interrupt_timer)
MDRV_TIMER_ADD("8253_0_timer", balsente_clock_counter_0_ff)
MDRV_TIMER_ADD("8253_1_timer", balsente_counter_callback)
diff --git a/src/mame/drivers/battlnts.c b/src/mame/drivers/battlnts.c
index b7d8f876b3e..0c80902b5e2 100644
--- a/src/mame/drivers/battlnts.c
+++ b/src/mame/drivers/battlnts.c
@@ -382,10 +382,10 @@ static void shuffle( UINT8 *buf, int len )
int i;
UINT8 t;
- if (len == 2)
+ if (len == 2)
return;
- if (len % 4)
+ if (len % 4)
fatalerror("shuffle() - not modulo 4"); /* must not happen */
len /= 2;
diff --git a/src/mame/drivers/beathead.c b/src/mame/drivers/beathead.c
index a0eeb367313..4447a1322b4 100644
--- a/src/mame/drivers/beathead.c
+++ b/src/mame/drivers/beathead.c
@@ -425,7 +425,7 @@ static MACHINE_DRIVER_START( beathead )
MDRV_MACHINE_START(beathead)
MDRV_MACHINE_RESET(beathead)
MDRV_NVRAM_HANDLER(generic_1fill)
-
+
MDRV_TIMER_ADD("scan_timer", scanline_callback)
/* video hardware */
diff --git a/src/mame/drivers/blockhl.c b/src/mame/drivers/blockhl.c
index 1f481b584be..123c67718df 100644
--- a/src/mame/drivers/blockhl.c
+++ b/src/mame/drivers/blockhl.c
@@ -85,7 +85,7 @@ static READ8_HANDLER( k052109_051960_r )
else
return k051960_r(k051960, offset - 0x3c00);
}
- else
+ else
return k052109_r(k052109, offset);
}
diff --git a/src/mame/drivers/bottom9.c b/src/mame/drivers/bottom9.c
index 5429f6a1df9..d80c8527037 100644
--- a/src/mame/drivers/bottom9.c
+++ b/src/mame/drivers/bottom9.c
@@ -54,7 +54,7 @@ static READ8_HANDLER( k052109_051960_r )
else
return k051960_r(k051960, offset - 0x3c00);
}
- else
+ else
return k052109_r(k052109, offset);
}
@@ -90,25 +90,25 @@ static WRITE8_HANDLER( bottom9_bankedram1_w )
{
const device_config *k051316 = devtag_get_device(space->machine, "k051316");
- if (k052109_selected)
+ if (k052109_selected)
k052109_051960_w(space, offset, data);
- else
+ else
k051316_w(k051316, offset, data);
}
static READ8_HANDLER( bottom9_bankedram2_r )
{
- if (k052109_selected)
+ if (k052109_selected)
return k052109_051960_r(space, offset + 0x2000);
- else
+ else
return space->machine->generic.paletteram.u8[offset];
}
static WRITE8_HANDLER( bottom9_bankedram2_w )
{
- if (k052109_selected)
+ if (k052109_selected)
k052109_051960_w(space, offset + 0x2000, data);
- else
+ else
paletteram_xBBBBBGGGGGRRRRR_be_w(space, offset, data);
}
@@ -118,13 +118,13 @@ static WRITE8_HANDLER( bankswitch_w )
int offs;
/* bit 0 = RAM bank */
- if ((data & 1) == 0)
+ if ((data & 1) == 0)
popmessage("bankswitch RAM bank 0");
/* bit 1-4 = ROM bank */
- if (data & 0x10)
+ if (data & 0x10)
offs = 0x20000 + (data & 0x06) * 0x1000;
- else
+ else
offs = 0x10000 + (data & 0x0e) * 0x1000;
memory_set_bankptr(space->machine, "bank1",&RAM[offs]);
@@ -326,7 +326,7 @@ static const k051960_interface bottom9_k051960_intf =
static const k051316_interface bottom9_k051316_intf =
{
"gfx3", 2,
- 4, FALSE, 0,
+ 4, FALSE, 0,
0, 0, 0,
bottom9_zoom_callback
};
diff --git a/src/mame/drivers/capbowl.c b/src/mame/drivers/capbowl.c
index f36dd27e5a2..a0a144f60ed 100644
--- a/src/mame/drivers/capbowl.c
+++ b/src/mame/drivers/capbowl.c
@@ -385,7 +385,7 @@ static MACHINE_DRIVER_START( capbowl )
MDRV_MACHINE_START(capbowl)
MDRV_MACHINE_RESET(capbowl)
MDRV_NVRAM_HANDLER(capbowl)
-
+
MDRV_TICKET_DISPENSER_ADD("ticket", 100, TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_LOW)
/* video hardware */
diff --git a/src/mame/drivers/carpolo.c b/src/mame/drivers/carpolo.c
index c0bd7a31507..aa65eef11ca 100644
--- a/src/mame/drivers/carpolo.c
+++ b/src/mame/drivers/carpolo.c
@@ -256,7 +256,7 @@ static MACHINE_DRIVER_START( carpolo )
MDRV_7474_ADD("7474_1c_2", NULL)
MDRV_7474_ADD("7474_1a_1", NULL)
MDRV_7474_ADD("7474_1a_2", NULL)
-
+
MDRV_74148_ADD("74148_3s", carpolo_74148_3s_cb)
MDRV_74153_ADD("74153_1k", NULL)
diff --git a/src/mame/drivers/cb2001.c b/src/mame/drivers/cb2001.c
index d3bdfa1b880..790ed33443a 100644
--- a/src/mame/drivers/cb2001.c
+++ b/src/mame/drivers/cb2001.c
@@ -111,10 +111,10 @@ cmv4 cb2001 (en -> de)
02b9 bit 7,a e0270 test1 al,7h
02bb jp z,$41e2 e0274 be e0279
02be call $0ab2 .
-. e0276 br e6120
+. e0276 br e6120
02c1 ld bc,$8000 e0279 mov cw,8000h
-029f ld b,$fc
+029f ld b,$fc
02a1 call $0c38 e0239 call 0e30b8h
02a4 ld hl,$d023 e023d mov ix,90h (36 -> be)
02a7 call $2b2d e0240 call 0e32a6h
@@ -133,7 +133,7 @@ cmv4 cb2001 (en -> de)
2b3c djnz $2b36 e32bb dbnz e32b3h (c5 -> e2)
2b3e pop bc e32bd pop cw (8a -> 59)
2b3f ret e32be ret
-
+
2b40-2b4b e32bf-e32d1 (06 -> 12) (d7 -> 4f dec iy or 47 inc iy)
2b4c-2b57 e32d2-e32e4 (af -> 1a)
. e32e5- (8e -> 2a) (14 -> 1c)
@@ -161,7 +161,7 @@ cmv4 cb2001 (en -> de)
4aa8 ld d,$00 e66eb mov ah,00h (b2 -> b4)
4aaa ld hl,$4b62 e66ed mov bw,67cbh (6d -> bb)
4aad add lh,de e66f0 add bw,aw (ba -> 03)
- 4aae ld e,(hl) .
+ 4aae ld e,(hl) .
4aaf inc hl .
4abo ld d,(hl) .
4ab1 ex de,hl e66f2 mov bw,w ptr ss[bw](df -> 8b)prefix not sure about prefix
@@ -285,7 +285,7 @@ static ADDRESS_MAP_START( cb2001_map, ADDRESS_SPACE_PROGRAM, 16 )
ADDRESS_MAP_END
static ADDRESS_MAP_START( cb2001_io, ADDRESS_SPACE_IO, 16 )
-// ADDRESS_MAP_GLOBAL_MASK(0x00ff)
+// ADDRESS_MAP_GLOBAL_MASK(0x00ff)
AM_RANGE(0x00, 0x03) AM_DEVREADWRITE8("ppi8255_0", ppi8255_r, ppi8255_w, 0xffff) /* Input Ports */
AM_RANGE(0x10, 0x13) AM_DEVREADWRITE8("ppi8255_1", ppi8255_r, ppi8255_w, 0xffff) /* DIP switches */
AM_RANGE(0x20, 0x21) AM_DEVREAD8("aysnd", ay8910_r, 0x00ff)
diff --git a/src/mame/drivers/cbasebal.c b/src/mame/drivers/cbasebal.c
index fa7f2a677ac..b9314b7b724 100644
--- a/src/mame/drivers/cbasebal.c
+++ b/src/mame/drivers/cbasebal.c
@@ -54,7 +54,7 @@ static READ8_HANDLER( bankedram_r )
case 1:
if (offset < 0x800)
return space->machine->generic.paletteram.u8[offset];
- else
+ else
return 0;
break;
default:
diff --git a/src/mame/drivers/chqflag.c b/src/mame/drivers/chqflag.c
index ad41f851b3d..daebe5cdf46 100644
--- a/src/mame/drivers/chqflag.c
+++ b/src/mame/drivers/chqflag.c
@@ -343,7 +343,7 @@ static const k051960_interface chqflag_k051960_intf =
static const k051316_interface chqflag_k051316_intf_1 =
{
"gfx2", 1,
- 4, FALSE, 0,
+ 4, FALSE, 0,
0, 7, 0,
chqflag_zoom_callback_0
};
@@ -351,7 +351,7 @@ static const k051316_interface chqflag_k051316_intf_1 =
static const k051316_interface chqflag_k051316_intf_2 =
{
"gfx3", 2,
- 8, TRUE, 0xc0,
+ 8, TRUE, 0xc0,
1, 0, 0,
chqflag_zoom_callback_1
};
diff --git a/src/mame/drivers/cninja.c b/src/mame/drivers/cninja.c
index 3610ce1ea52..d32b4027759 100644
--- a/src/mame/drivers/cninja.c
+++ b/src/mame/drivers/cninja.c
@@ -753,7 +753,7 @@ static MACHINE_DRIVER_START( cninja )
MDRV_CPU_PROGRAM_MAP(sound_map)
MDRV_MACHINE_RESET(cninja)
-
+
MDRV_TIMER_ADD("raster_timer", interrupt_gen)
/* video hardware */
@@ -1243,7 +1243,7 @@ ROM_START( cninjabl )
ROM_LOAD16_WORD_SWAP( "joe mac 3.68k", 0x00000, 0x80000, CRC(dc931d80) SHA1(78103f74fb428c4735e77d99a143cdf28915ef26) )
ROM_LOAD16_WORD_SWAP( "joe mac 4.68k", 0x80000, 0x40000, CRC(e8dfe0b5) SHA1(f7f883c19023bc68146aea5eaf98d2fdd606d5e3) )
ROM_IGNORE(0x40000) // 1xxxxxxxxxxxxxxxxxx = 0xFF
-
+
ROM_REGION( 0x10000, "audiocpu", 0 ) /* Z80 Sound CPU */
ROM_LOAD( "joe mac 5.z80", 0x00000, 0x10000, CRC(d791b9d7) SHA1(7842ab7e960b692bdbcadf5c64f09ddd1a3fb861) ) // 1ST AND 2ND HALF IDENTICAL
diff --git a/src/mame/drivers/cojag.c b/src/mame/drivers/cojag.c
index d3d2497be58..45821f0f554 100644
--- a/src/mame/drivers/cojag.c
+++ b/src/mame/drivers/cojag.c
@@ -1116,7 +1116,7 @@ static MACHINE_DRIVER_START( cojagr3k )
MDRV_NVRAM_HANDLER(generic_1fill)
MDRV_IDE_CONTROLLER_ADD("ide", jaguar_external_int)
-
+
MDRV_TIMER_ADD("serial_timer", jaguar_serial_callback)
/* video hardware */
diff --git a/src/mame/drivers/contra.c b/src/mame/drivers/contra.c
index e793b657acf..c6b069375a6 100644
--- a/src/mame/drivers/contra.c
+++ b/src/mame/drivers/contra.c
@@ -38,10 +38,10 @@ static WRITE8_HANDLER( contra_sh_irqtrigger_w )
static WRITE8_HANDLER( contra_coin_counter_w )
{
- if (data & 0x01)
+ if (data & 0x01)
coin_counter_w(space->machine, 0, data & 0x01);
- if (data & 0x02)
+ if (data & 0x02)
coin_counter_w(space->machine, 1, (data & 0x02) >> 1);
}
diff --git a/src/mame/drivers/coolridr.c b/src/mame/drivers/coolridr.c
index 2e2bb389bad..ddf8b1906f4 100644
--- a/src/mame/drivers/coolridr.c
+++ b/src/mame/drivers/coolridr.c
@@ -213,9 +213,9 @@ Notes:
*******************************************************************************************************
-Note: This hardware appears to have been designed as a test-bed for a new RLE based compression system
- used by the zooming sprites. It is possible that Sega planned on using this for ST-V, but
- decided against it. Video/CPU part numbers give an interesting insight, since video hardware #
+Note: This hardware appears to have been designed as a test-bed for a new RLE based compression system
+ used by the zooming sprites. It is possible that Sega planned on using this for ST-V, but
+ decided against it. Video/CPU part numbers give an interesting insight, since video hardware #
sits between Model 1 & Model 2.
Year on
diff --git a/src/mame/drivers/cps1.c b/src/mame/drivers/cps1.c
index 3fe66547bd5..fb30ab4f924 100644
--- a/src/mame/drivers/cps1.c
+++ b/src/mame/drivers/cps1.c
@@ -353,7 +353,7 @@ static READ16_HANDLER( qsound_rom_r )
{
UINT8 *rom = memory_region(space->machine, "user1");
- if (rom)
+ if (rom)
return rom[offset] | 0xff00;
else
{
diff --git a/src/mame/drivers/cps2.c b/src/mame/drivers/cps2.c
index 5c725133e27..32b6ed8bf53 100644
--- a/src/mame/drivers/cps2.c
+++ b/src/mame/drivers/cps2.c
@@ -7626,16 +7626,16 @@ static DRIVER_INIT ( pzloop2 )
memory_install_read16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x804000, 0x804001, 0, 0, joy_or_paddle_r);
}
-static READ16_HANDLER( gigamn2_dummyqsound_r )
-{
+static READ16_HANDLER( gigamn2_dummyqsound_r )
+{
cps_state *state = (cps_state *)space->machine->driver_data;
- return state->gigamn2_dummyqsound_ram[offset];
+ return state->gigamn2_dummyqsound_ram[offset];
};
-static WRITE16_HANDLER( gigamn2_dummyqsound_w )
-{
+static WRITE16_HANDLER( gigamn2_dummyqsound_w )
+{
cps_state *state = (cps_state *)space->machine->driver_data;
- state->gigamn2_dummyqsound_ram[offset] = data;
+ state->gigamn2_dummyqsound_ram[offset] = data;
};
static DRIVER_INIT( gigamn2 )
diff --git a/src/mame/drivers/crimfght.c b/src/mame/drivers/crimfght.c
index 702a9685d3a..0e61d974534 100644
--- a/src/mame/drivers/crimfght.c
+++ b/src/mame/drivers/crimfght.c
@@ -66,7 +66,7 @@ static READ8_HANDLER( k052109_051960_r )
else
return k051960_r(k051960, offset - 0x3c00);
}
- else
+ else
return k052109_r(k052109, offset);
}
diff --git a/src/mame/drivers/cyberbal.c b/src/mame/drivers/cyberbal.c
index cd434c4a576..3bc62f09ead 100644
--- a/src/mame/drivers/cyberbal.c
+++ b/src/mame/drivers/cyberbal.c
@@ -47,7 +47,7 @@ static MACHINE_START( cyberbal )
{
cyberbal_state *state = (cyberbal_state *)machine->driver_data;
atarigen_init(machine);
-
+
state_save_register_global(machine, state->fast_68k_int);
state_save_register_global(machine, state->io_68k_int);
state_save_register_global(machine, state->sound_data_from_68k);
diff --git a/src/mame/drivers/dambustr.c b/src/mame/drivers/dambustr.c
index adf4a49bbfd..7a49cef355d 100644
--- a/src/mame/drivers/dambustr.c
+++ b/src/mame/drivers/dambustr.c
@@ -190,7 +190,7 @@ static MACHINE_DRIVER_START( dambustr )
MDRV_7474_ADD("7474_9m_1", galaxold_7474_9m_1_callback)
MDRV_7474_ADD("7474_9m_2", galaxold_7474_9m_2_callback)
-
+
MDRV_TIMER_ADD("int_timer", galaxold_interrupt_timer)
/* video hardware */
diff --git a/src/mame/drivers/deco32.c b/src/mame/drivers/deco32.c
index f4426460c61..7bf70a9cb89 100644
--- a/src/mame/drivers/deco32.c
+++ b/src/mame/drivers/deco32.c
@@ -1681,7 +1681,7 @@ static MACHINE_DRIVER_START( captaven )
MDRV_CPU_PROGRAM_MAP(sound_map)
MDRV_MACHINE_RESET(deco32)
-
+
MDRV_TIMER_ADD("int_timer", interrupt_gen)
/* video hardware */
diff --git a/src/mame/drivers/deco_mlc.c b/src/mame/drivers/deco_mlc.c
index e9547dfeb80..de8cf8b6d62 100644
--- a/src/mame/drivers/deco_mlc.c
+++ b/src/mame/drivers/deco_mlc.c
@@ -409,7 +409,7 @@ static MACHINE_DRIVER_START( avengrgs )
MDRV_MACHINE_RESET(mlc)
MDRV_NVRAM_HANDLER(mlc) /* Actually 93c45 */
-
+
MDRV_TIMER_ADD("int_timer", interrupt_gen)
/* video hardware */
diff --git a/src/mame/drivers/djboy.c b/src/mame/drivers/djboy.c
index 0314b8eac96..12d4159c61c 100644
--- a/src/mame/drivers/djboy.c
+++ b/src/mame/drivers/djboy.c
@@ -629,22 +629,22 @@ static WRITE8_HANDLER( cpu1_bankswitch_w )
switch (data & 0xf)
{
/* bs65.5y */
- case 0x00:
- case 0x01:
- case 0x02:
- case 0x03:
+ case 0x00:
+ case 0x01:
+ case 0x02:
+ case 0x03:
memory_set_bank(space->machine, "bank2", (data & 0xf));
break;
/* bs101.6w */
- case 0x08:
- case 0x09:
- case 0x0a:
- case 0x0b:
- case 0x0c:
- case 0x0d:
- case 0x0e:
- case 0x0f:
+ case 0x08:
+ case 0x09:
+ case 0x0a:
+ case 0x0b:
+ case 0x0c:
+ case 0x0d:
+ case 0x0e:
+ case 0x0f:
memory_set_bank(space->machine, "bank2", (data & 0xf) - 4);
break;
diff --git a/src/mame/drivers/dragrace.c b/src/mame/drivers/dragrace.c
index 59f6512439f..bffdcf12669 100644
--- a/src/mame/drivers/dragrace.c
+++ b/src/mame/drivers/dragrace.c
@@ -346,7 +346,7 @@ static MACHINE_DRIVER_START( dragrace )
MDRV_MACHINE_START(dragrace)
MDRV_MACHINE_RESET(dragrace)
-
+
MDRV_TIMER_ADD_PERIODIC("frame_timer", dragrace_frame_callback, HZ(60))
/* video hardware */
diff --git a/src/mame/drivers/fcrash.c b/src/mame/drivers/fcrash.c
index cb847d4e977..6b769934c6d 100644
--- a/src/mame/drivers/fcrash.c
+++ b/src/mame/drivers/fcrash.c
@@ -117,7 +117,7 @@ static void fcrash_update_transmasks( running_machine *machine )
/* Get transparency registers */
if (priority[i])
mask = state->cps_b_regs[priority[i] / 2] ^ 0xffff;
- else
+ else
mask = 0xffff; /* completely transparent if priority masks not defined (mercs, qad) */
tilemap_set_transmask(state->bg_tilemap[0], i, mask, 0x8000);
@@ -278,17 +278,17 @@ static VIDEO_UPDATE( fcrash )
fcrash_render_layer(screen->machine, bitmap, cliprect, l0, 0);
- if (l1 == 0)
+ if (l1 == 0)
fcrash_render_high_layer(screen->machine, bitmap, cliprect, l0);
fcrash_render_layer(screen->machine, bitmap, cliprect, l1, 0);
- if (l2 == 0)
+ if (l2 == 0)
fcrash_render_high_layer(screen->machine, bitmap, cliprect, l1);
fcrash_render_layer(screen->machine, bitmap, cliprect, l2, 0);
- if (l3 == 0)
+ if (l3 == 0)
fcrash_render_high_layer(screen->machine, bitmap, cliprect, l2);
fcrash_render_layer(screen->machine, bitmap, cliprect, l3, 0);
@@ -359,17 +359,17 @@ static VIDEO_UPDATE( kodb )
fcrash_render_layer(screen->machine, bitmap, cliprect, l0, 0);
- if (l1 == 0)
+ if (l1 == 0)
fcrash_render_high_layer(screen->machine, bitmap, cliprect, l0);
fcrash_render_layer(screen->machine, bitmap, cliprect, l1, 0);
- if (l2 == 0)
+ if (l2 == 0)
fcrash_render_high_layer(screen->machine, bitmap, cliprect, l1);
fcrash_render_layer(screen->machine, bitmap, cliprect, l2, 0);
- if (l3 == 0)
+ if (l3 == 0)
fcrash_render_high_layer(screen->machine, bitmap, cliprect, l2);
fcrash_render_layer(screen->machine, bitmap, cliprect, l3, 0);
diff --git a/src/mame/drivers/firebeat.c b/src/mame/drivers/firebeat.c
index 60fc916e6dc..5bfd7727506 100644
--- a/src/mame/drivers/firebeat.c
+++ b/src/mame/drivers/firebeat.c
@@ -1922,7 +1922,7 @@ static MACHINE_DRIVER_START(firebeat)
MDRV_MACHINE_START(firebeat)
MDRV_MACHINE_RESET(firebeat)
MDRV_NVRAM_HANDLER(firebeat)
-
+
MDRV_RTC65271_ADD("rtc", NULL)
/* video hardware */
diff --git a/src/mame/drivers/foodf.c b/src/mame/drivers/foodf.c
index 9fa689247b7..319652a48f9 100644
--- a/src/mame/drivers/foodf.c
+++ b/src/mame/drivers/foodf.c
@@ -364,7 +364,7 @@ static MACHINE_DRIVER_START( foodf )
MDRV_MACHINE_RESET(foodf)
MDRV_NVRAM_HANDLER(generic_1fill)
MDRV_WATCHDOG_VBLANK_INIT(8)
-
+
MDRV_TIMER_ADD("scan_timer", scanline_update)
/* video hardware */
diff --git a/src/mame/drivers/galaga.c b/src/mame/drivers/galaga.c
index b21290d6835..65c13cd15c3 100644
--- a/src/mame/drivers/galaga.c
+++ b/src/mame/drivers/galaga.c
@@ -1771,7 +1771,7 @@ static MACHINE_DRIVER_START( battles )
MDRV_CPU_ADD("sub3", Z80, MASTER_CLOCK/6) /* 3.072 MHz */
MDRV_CPU_PROGRAM_MAP(battles_mem4)
MDRV_CPU_VBLANK_INT("screen", battles_interrupt_4)
-
+
MDRV_TIMER_ADD("battles_nmi", battles_nmi_generate)
MDRV_MACHINE_RESET(battles)
diff --git a/src/mame/drivers/galaxold.c b/src/mame/drivers/galaxold.c
index 0f435a7ab59..36defed7ce6 100644
--- a/src/mame/drivers/galaxold.c
+++ b/src/mame/drivers/galaxold.c
@@ -2108,7 +2108,7 @@ static MACHINE_DRIVER_START( galaxold_base )
MDRV_CPU_PROGRAM_MAP(galaxold_map)
MDRV_MACHINE_RESET(galaxold)
-
+
MDRV_7474_ADD("7474_9m_1", galaxold_7474_9m_1_callback)
MDRV_7474_ADD("7474_9m_2", galaxold_7474_9m_2_callback)
diff --git a/src/mame/drivers/gauntlet.c b/src/mame/drivers/gauntlet.c
index a7fea6fd63a..a9d7ef93efe 100644
--- a/src/mame/drivers/gauntlet.c
+++ b/src/mame/drivers/gauntlet.c
@@ -158,7 +158,7 @@ static MACHINE_START( gauntlet )
{
gauntlet_state *state = (gauntlet_state *)machine->driver_data;
atarigen_init(machine);
-
+
state_save_register_global(machine, state->sound_reset_val);
}
diff --git a/src/mame/drivers/gbusters.c b/src/mame/drivers/gbusters.c
index 03f0f279cc6..3e9a1f6310b 100644
--- a/src/mame/drivers/gbusters.c
+++ b/src/mame/drivers/gbusters.c
@@ -142,7 +142,7 @@ static READ8_HANDLER( k052109_051960_r )
else
return k051960_r(k051960, offset - 0x3c00);
}
- else
+ else
return k052109_r(k052109, offset);
}
diff --git a/src/mame/drivers/gei.c b/src/mame/drivers/gei.c
index 4e06f3ce16a..bf265fcfe5b 100644
--- a/src/mame/drivers/gei.c
+++ b/src/mame/drivers/gei.c
@@ -1038,7 +1038,7 @@ static MACHINE_DRIVER_START( gselect )
/* basic machine hardware */
MDRV_IMPORT_FROM(getrivia)
-
+
MDRV_DEVICE_REMOVE("ticket")
MDRV_CPU_MODIFY("maincpu")
diff --git a/src/mame/drivers/gijoe.c b/src/mame/drivers/gijoe.c
index 460e3d1ac94..ddba19d3ad6 100644
--- a/src/mame/drivers/gijoe.c
+++ b/src/mame/drivers/gijoe.c
@@ -74,7 +74,7 @@ static READ16_HANDLER( control2_r )
static WRITE16_HANDLER( control2_w )
{
const device_config *k053246 = devtag_get_device(space->machine, "k053246");
- if(ACCESSING_BITS_0_7)
+ if(ACCESSING_BITS_0_7)
{
/* bit 0 is data */
/* bit 1 is cs (active low) */
@@ -128,7 +128,7 @@ static INTERRUPT_GEN( gijoe_interrupt )
const device_config *k056832 = devtag_get_device(device->machine, "k056832");
// global interrupt masking (*this game only)
- if (!k056832_is_irq_enabled(k056832, 0))
+ if (!k056832_is_irq_enabled(k056832, 0))
return;
if (k053246_is_irq_enabled(k053246))
@@ -146,7 +146,7 @@ static INTERRUPT_GEN( gijoe_interrupt )
static WRITE16_HANDLER( sound_cmd_w )
{
- if(ACCESSING_BITS_0_7)
+ if(ACCESSING_BITS_0_7)
{
data &= 0xff;
soundlatch_w(space, 0, data);
diff --git a/src/mame/drivers/gticlub.c b/src/mame/drivers/gticlub.c
index 72a04da2362..956356655fa 100644
--- a/src/mame/drivers/gticlub.c
+++ b/src/mame/drivers/gticlub.c
@@ -911,7 +911,7 @@ static void sound_irq_callback( running_machine *machine, int irq )
timer_set(machine, ATTOTIME_IN_USEC(1), NULL, line, irq_off);
}
-static const k056800_interface gticlub_k056800_interface =
+static const k056800_interface gticlub_k056800_interface =
{
sound_irq_callback
};
diff --git a/src/mame/drivers/harddriv.c b/src/mame/drivers/harddriv.c
index 1ced611f933..fd9151a78c7 100644
--- a/src/mame/drivers/harddriv.c
+++ b/src/mame/drivers/harddriv.c
@@ -264,8 +264,8 @@ A047046-01
-MULTISYNC
-A046901
+MULTISYNC
+A046901
|------------------------------------------------------------------------------------------------------|
| |---------------------| 136078-4001.210R 136078-4009.210V |
| |---------------------| 136078-4003.210S 136078-1011.210W |
@@ -1137,7 +1137,7 @@ static MACHINE_DRIVER_START( driver_nomsp )
MDRV_MACHINE_START(harddriv)
MDRV_MACHINE_RESET(harddriv)
MDRV_NVRAM_HANDLER(atarigen)
-
+
MDRV_TIMER_ADD("duart_timer", hd68k_duart_callback)
/* video hardware */
diff --git a/src/mame/drivers/hcastle.c b/src/mame/drivers/hcastle.c
index b960cab1956..d2aca33b9db 100644
--- a/src/mame/drivers/hcastle.c
+++ b/src/mame/drivers/hcastle.c
@@ -190,7 +190,7 @@ static MACHINE_START( hcastle )
state_save_register_global(machine, state->pf2_bankbase);
state_save_register_global(machine, state->pf1_bankbase);
state_save_register_global(machine, state->gfx_bank);
- state_save_register_global(machine, state->old_pf1);
+ state_save_register_global(machine, state->old_pf1);
state_save_register_global(machine, state->old_pf2);
}
@@ -201,7 +201,7 @@ static MACHINE_RESET( hcastle )
state->pf2_bankbase = 0;
state->pf1_bankbase = 0;
state->gfx_bank = 0;
- state->old_pf1 = -1;
+ state->old_pf1 = -1;
state->old_pf2 = -1;
}
diff --git a/src/mame/drivers/hng64.c b/src/mame/drivers/hng64.c
index f4bfd8a374e..177927af309 100644
--- a/src/mame/drivers/hng64.c
+++ b/src/mame/drivers/hng64.c
@@ -659,8 +659,8 @@ static WRITE32_HANDLER( hng64_sysregs_w )
switch(offset*4)
{
- //case 0x100c: Extremely likely to be involved with the ROZ groundplane.
- // Probably tells the groundplane which scanline to start drawing at.
+ //case 0x100c: Extremely likely to be involved with the ROZ groundplane.
+ // Probably tells the groundplane which scanline to start drawing at.
case 0x1084: //MIPS->MCU latch port
hng_mcu_en = (data & 0xff); //command-based, i.e. doesn't control halt line and such?
@@ -877,7 +877,7 @@ static WRITE32_HANDLER( hng64_3d_2_w )
static WRITE32_HANDLER( dl_w )
{
int i;
- UINT16 packet3d[16];
+ UINT16 packet3d[16];
COMBINE_DATA(&hng64_dl[offset]);
@@ -923,15 +923,15 @@ static WRITE32_HANDLER( dl_control_w )
//printf("\n"); // Debug - ajg
// TODO: put this back in.
/*
- if (activeBuffer==0 || activeBuffer==1)
- memcpy(&hng64_dls[activeBuffer][0],&hng64_dl[0],0x200);
-
- // Only if it's VALID (hack)
- if (data & 1)
- activeBuffer = 0;
- if (data & 2)
- activeBuffer = 1;
- */
+ if (activeBuffer==0 || activeBuffer==1)
+ memcpy(&hng64_dls[activeBuffer][0],&hng64_dl[0],0x200);
+
+ // Only if it's VALID (hack)
+ if (data & 1)
+ activeBuffer = 0;
+ if (data & 2)
+ activeBuffer = 1;
+ */
}
#ifdef UNUSED_FUNCTION
@@ -1105,7 +1105,7 @@ static ADDRESS_MAP_START( hng_map, ADDRESS_SPACE_PROGRAM, 32 )
AM_RANGE(0x20200000, 0x20203fff) AM_RAM_WRITE(hng64_pal_w) AM_BASE_GENERIC(paletteram)
AM_RANGE(0x20208000, 0x2020805f) AM_READWRITE(tcram_r, tcram_w) AM_BASE(&hng64_tcram) // Transition Control
AM_RANGE(0x20300000, 0x203001ff) AM_RAM_WRITE(dl_w) AM_BASE(&hng64_dl) // 3d Display List
-// AM_RANGE(0x20300200, 0x20300213) AM_RAM_WRITE(xxxx) AM_BASE(&xxxxxxxx) // 3d Display List Upload?
+// AM_RANGE(0x20300200, 0x20300213) AM_RAM_WRITE(xxxx) AM_BASE(&xxxxxxxx) // 3d Display List Upload?
AM_RANGE(0x20300214, 0x20300217) AM_WRITE(dl_control_w)
AM_RANGE(0x20300218, 0x2030021b) AM_READ(unk_vreg_r)
diff --git a/src/mame/drivers/hornet.c b/src/mame/drivers/hornet.c
index 56f6be43a06..e6373c4ac20 100644
--- a/src/mame/drivers/hornet.c
+++ b/src/mame/drivers/hornet.c
@@ -1095,7 +1095,7 @@ static void sound_irq_callback( running_machine *machine, int irq )
timer_set(machine, ATTOTIME_IN_USEC(1), NULL, line, irq_off);
}
-static const k056800_interface hornet_k056800_interface =
+static const k056800_interface hornet_k056800_interface =
{
sound_irq_callback
};
diff --git a/src/mame/drivers/irobot.c b/src/mame/drivers/irobot.c
index 77b6df1944e..ff7e0796187 100644
--- a/src/mame/drivers/irobot.c
+++ b/src/mame/drivers/irobot.c
@@ -305,7 +305,7 @@ static MACHINE_DRIVER_START( irobot )
MDRV_PALETTE_INIT(irobot)
MDRV_VIDEO_START(irobot)
MDRV_VIDEO_UPDATE(irobot)
-
+
MDRV_TIMER_ADD("irvg_timer", irobot_irvg_done_callback)
MDRV_TIMER_ADD("irmb_timer", irobot_irmb_done_callback)
diff --git a/src/mame/drivers/itech32.c b/src/mame/drivers/itech32.c
index 2d42f1c5c49..5b48e37e14e 100644
--- a/src/mame/drivers/itech32.c
+++ b/src/mame/drivers/itech32.c
@@ -1734,7 +1734,7 @@ static MACHINE_DRIVER_START( timekill )
MDRV_MACHINE_RESET(itech32)
MDRV_NVRAM_HANDLER(itech32)
-
+
MDRV_TICKET_DISPENSER_ADD("ticket", 200, TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_HIGH)
/* video hardware */
diff --git a/src/mame/drivers/itech8.c b/src/mame/drivers/itech8.c
index 7bc3582a028..8583e00e260 100644
--- a/src/mame/drivers/itech8.c
+++ b/src/mame/drivers/itech8.c
@@ -1726,7 +1726,7 @@ static MACHINE_DRIVER_START( itech8_core_lo )
MDRV_MACHINE_RESET(itech8)
MDRV_NVRAM_HANDLER(itech8)
-
+
MDRV_TICKET_DISPENSER_ADD("ticket", 200, TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_LOW)
/* video hardware */
diff --git a/src/mame/drivers/jpmimpct.c b/src/mame/drivers/jpmimpct.c
index de3787d9e88..23de54f10b2 100644
--- a/src/mame/drivers/jpmimpct.c
+++ b/src/mame/drivers/jpmimpct.c
@@ -1331,7 +1331,7 @@ static MACHINE_DRIVER_START( impctawp )
MDRV_NVRAM_HANDLER(generic_0fill)
MDRV_PPI8255_ADD( "ppi8255_0", ppi8255_intf[0] )
-
+
MDRV_TIMER_ADD( "duart_1_timer", duart_1_timer_event)
MDRV_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/lethal.c b/src/mame/drivers/lethal.c
index cc645fc3b74..8b0f2cebe4b 100644
--- a/src/mame/drivers/lethal.c
+++ b/src/mame/drivers/lethal.c
@@ -229,7 +229,7 @@ static INTERRUPT_GEN(lethalen_interrupt)
{
const device_config *k056832 = devtag_get_device(device->machine, "k056832");
- if (k056832_is_irq_enabled(k056832, 0))
+ if (k056832_is_irq_enabled(k056832, 0))
cpu_set_input_line(device, HD6309_IRQ_LINE, HOLD_LINE);
}
diff --git a/src/mame/drivers/lethalj.c b/src/mame/drivers/lethalj.c
index 4e513b01c7b..df162741f79 100644
--- a/src/mame/drivers/lethalj.c
+++ b/src/mame/drivers/lethalj.c
@@ -597,7 +597,7 @@ static MACHINE_DRIVER_START( gameroom )
MDRV_CPU_ADD("maincpu", TMS34010, MASTER_CLOCK)
MDRV_CPU_CONFIG(tms_config)
MDRV_CPU_PROGRAM_MAP(lethalj_map)
-
+
MDRV_TICKET_DISPENSER_ADD("ticket", 200, TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_HIGH)
/* video hardware */
diff --git a/src/mame/drivers/m72.c b/src/mame/drivers/m72.c
index c61f40d2fe3..60b234ecd9a 100644
--- a/src/mame/drivers/m72.c
+++ b/src/mame/drivers/m72.c
@@ -1791,7 +1791,7 @@ static MACHINE_DRIVER_START( rtype )
MDRV_MACHINE_START(m72)
MDRV_MACHINE_RESET(m72)
-
+
MDRV_SOUND_START(m72)
MDRV_SOUND_RESET(m72)
diff --git a/src/mame/drivers/mainevt.c b/src/mame/drivers/mainevt.c
index b2d751d17cc..7b1319317c8 100644
--- a/src/mame/drivers/mainevt.c
+++ b/src/mame/drivers/mainevt.c
@@ -160,7 +160,7 @@ static READ8_HANDLER( k052109_051960_r )
else
return k051960_r(k051960, offset - 0x3c00);
}
- else
+ else
return k052109_r(k052109, offset);
}
diff --git a/src/mame/drivers/megadriv.c b/src/mame/drivers/megadriv.c
index 2cc13629dbd..254bee99eea 100644
--- a/src/mame/drivers/megadriv.c
+++ b/src/mame/drivers/megadriv.c
@@ -6089,7 +6089,7 @@ MACHINE_DRIVER_START( megadriv )
MDRV_MACHINE_START(megadriv)
MDRV_MACHINE_RESET(megadriv)
-
+
MDRV_IMPORT_FROM(megadriv_timers)
MDRV_SCREEN_ADD("megadriv", RASTER)
diff --git a/src/mame/drivers/merit.c b/src/mame/drivers/merit.c
index 683ec77b315..46d497b3780 100644
--- a/src/mame/drivers/merit.c
+++ b/src/mame/drivers/merit.c
@@ -1548,7 +1548,7 @@ ROM_START( trvwz3h )
ROM_REGION( 0x8000, "misc", 0 )
ROM_LOAD( "dec002.u13", 0x00000, 0x01f3, CRC(686d2ad0) SHA1(7aad0a1ed09942528eceaf4d7a5e1fd7601aeac7) ) /* PAL10L8CN */
- ROM_LOAD( "sex-001_01", 0x00000, 0x8000, CRC(77a2a734) SHA1(7ba662d275b7914c9dcc9532116086e091e6cf88) ) /* These seem to be misplaced? Verfied good dumps, not */
+ ROM_LOAD( "sex-001_01", 0x00000, 0x8000, CRC(77a2a734) SHA1(7ba662d275b7914c9dcc9532116086e091e6cf88) ) /* These seem to be misplaced? Verfied good dumps, not */
ROM_LOAD( "sex-001_02", 0x00000, 0x8000, CRC(b064876b) SHA1(588300fb6603f334de41a9685b1fcf8c642b5c16) ) /* sure which set they actually belong to, maybe trvwzv */
ROM_END
diff --git a/src/mame/drivers/midvunit.c b/src/mame/drivers/midvunit.c
index d0e44f894c4..e14257b2142 100644
--- a/src/mame/drivers/midvunit.c
+++ b/src/mame/drivers/midvunit.c
@@ -1027,7 +1027,7 @@ static MACHINE_DRIVER_START( midvcommon )
MDRV_MACHINE_START(midvunit)
MDRV_MACHINE_RESET(midvunit)
MDRV_NVRAM_HANDLER(generic_1fill)
-
+
MDRV_TIMER_ADD("timer0", NULL)
MDRV_TIMER_ADD("timer1", NULL)
diff --git a/src/mame/drivers/mitchell.c b/src/mame/drivers/mitchell.c
index 4d4a7642c65..bc681428349 100644
--- a/src/mame/drivers/mitchell.c
+++ b/src/mame/drivers/mitchell.c
@@ -142,9 +142,9 @@ static READ8_HANDLER( pang_port5_r )
/* bit 3 is checked before updating the palette so it really seems to be vblank. */
/* Many games require two interrupts per frame and for these bits to toggle, */
/* otherwise music doesn't work. */
- if (cpu_getiloops(space->cpu) & 1)
+ if (cpu_getiloops(space->cpu) & 1)
bit |= 0x01;
- else
+ else
bit |= 0x08;
if (state->port5_kludge) /* hack... music doesn't work otherwise */
@@ -215,7 +215,7 @@ static READ8_HANDLER( block_input_r )
delta = 0;
}
}
- if (delta > 0x3f)
+ if (delta > 0x3f)
delta = 0x3f;
return delta << 2;
@@ -224,7 +224,7 @@ static READ8_HANDLER( block_input_r )
{
int res = input_port_read(space->machine, portnames[offset]) & 0xf7;
- if (state->dir[offset])
+ if (state->dir[offset])
res |= 0x08;
return res;
@@ -260,7 +260,7 @@ static READ8_HANDLER( mahjong_input_r )
for (i = 0; i < 5; i++)
{
- if (state->keymatrix & (0x80 >> i))
+ if (state->keymatrix & (0x80 >> i))
return input_port_read(space->machine, keynames[offset][i]);
}
@@ -285,19 +285,19 @@ static READ8_HANDLER( input_r )
default:
return input_port_read(space->machine, portnames[offset]);
case 1: /* Mahjong games */
- if (offset)
+ if (offset)
return mahjong_input_r(space, offset - 1);
- else
+ else
return input_port_read(space->machine, "IN0");
break;
case 2: /* Block Block - dial control */
- if (offset)
+ if (offset)
return block_input_r(space, offset - 1);
- else
+ else
return input_port_read(space->machine, "IN0");
break;
case 3: /* Super Pang - simulate START 1 press to initialize EEPROM */
- if (offset || init_eeprom_count == 0)
+ if (offset || init_eeprom_count == 0)
return input_port_read(space->machine, portnames[offset]);
else
{
@@ -1100,8 +1100,8 @@ static MACHINE_START( mitchell )
state_save_register_global(machine, state->dial_selected);
state_save_register_global(machine, state->keymatrix);
state_save_register_global_array(machine, state->dir);
- state_save_register_global_array(machine, state->dial);
-// state_save_register_global(machine, init_eeprom_count);
+ state_save_register_global_array(machine, state->dial);
+// state_save_register_global(machine, init_eeprom_count);
}
static MACHINE_RESET( mitchell )
diff --git a/src/mame/drivers/model2.c b/src/mame/drivers/model2.c
index 6eb3f5ae3f6..d3f5a79e8de 100644
--- a/src/mame/drivers/model2.c
+++ b/src/mame/drivers/model2.c
@@ -1843,7 +1843,7 @@ static MACHINE_DRIVER_START( model2o )
MDRV_MACHINE_RESET(model2o)
MDRV_NVRAM_HANDLER( model2 )
-
+
MDRV_TIMER_ADD("timer0", model2_timer_cb)
MDRV_TIMER_PTR((FPTR)0)
MDRV_TIMER_ADD("timer1", model2_timer_cb)
diff --git a/src/mame/drivers/moo.c b/src/mame/drivers/moo.c
index eecda0cbbb1..02458a2fe5e 100644
--- a/src/mame/drivers/moo.c
+++ b/src/mame/drivers/moo.c
@@ -459,19 +459,19 @@ static const k056832_interface moo_k056832_intf =
static const k053247_interface moo_k053247_intf =
{
- "screen",
+ "screen",
"gfx2", 1,
- NORMAL_PLANE_ORDER,
- -48+1, 23,
+ NORMAL_PLANE_ORDER,
+ -48+1, 23,
KONAMI_ROM_DEINTERLEAVE_4,
moo_sprite_callback
};
static const k053247_interface bucky_k053247_intf =
{
- "screen",
+ "screen",
"gfx2", 1,
- NORMAL_PLANE_ORDER,
+ NORMAL_PLANE_ORDER,
-48, 23,
KONAMI_ROM_DEINTERLEAVE_4,
moo_sprite_callback
@@ -479,8 +479,8 @@ static const k053247_interface bucky_k053247_intf =
static const k054338_interface moo_k054338_intf =
{
- "screen",
- 0,
+ "screen",
+ 0,
"none"
};
diff --git a/src/mame/drivers/mw8080bw.c b/src/mame/drivers/mw8080bw.c
index 48f31189581..849caf94c2a 100644
--- a/src/mame/drivers/mw8080bw.c
+++ b/src/mame/drivers/mw8080bw.c
@@ -432,13 +432,13 @@ static WRITE8_HANDLER( gunfight_io_w )
{
mw8080bw_state *state = (mw8080bw_state *)space->machine->driver_data;
- if (offset & 0x01)
+ if (offset & 0x01)
gunfight_audio_w(space, 0, data);
- if (offset & 0x02)
+ if (offset & 0x02)
mb14241_shift_count_w(state->mb14241, 0, data);
- if (offset & 0x04)
+ if (offset & 0x04)
mb14241_shift_data_w(state->mb14241, 0, data);
}
@@ -629,13 +629,13 @@ static WRITE8_HANDLER( tornbase_io_w )
{
mw8080bw_state *state = (mw8080bw_state *)space->machine->driver_data;
- if (offset & 0x01)
+ if (offset & 0x01)
tornbase_audio_w(devtag_get_device(space->machine, "discrete"), 0, data);
- if (offset & 0x02)
+ if (offset & 0x02)
mb14241_shift_count_w(state->mb14241, 0, data);
- if (offset & 0x04)
+ if (offset & 0x04)
mb14241_shift_data_w(state->mb14241, 0, data);
}
diff --git a/src/mame/drivers/neogeo.c b/src/mame/drivers/neogeo.c
index 63aade4559c..e9f1210e95e 100644
--- a/src/mame/drivers/neogeo.c
+++ b/src/mame/drivers/neogeo.c
@@ -300,11 +300,11 @@ void neogeo_acknowledge_interrupt( running_machine *machine, UINT16 data )
{
neogeo_state *state = (neogeo_state *)machine->driver_data;
- if (data & 0x01)
+ if (data & 0x01)
state->irq3_pending = 0;
- if (data & 0x02)
+ if (data & 0x02)
state->display_position_interrupt_pending = 0;
- if (data & 0x04)
+ if (data & 0x04)
state->vblank_interrupt_pending = 0;
update_interrupts(machine);
diff --git a/src/mame/drivers/nitedrvr.c b/src/mame/drivers/nitedrvr.c
index 1fe636422fa..11eb80da622 100644
--- a/src/mame/drivers/nitedrvr.c
+++ b/src/mame/drivers/nitedrvr.c
@@ -143,7 +143,7 @@ static MACHINE_DRIVER_START( nitedrvr )
MDRV_MACHINE_START(nitedrvr)
MDRV_MACHINE_RESET(nitedrvr)
-
+
MDRV_TIMER_ADD_PERIODIC("crash_timer", nitedrvr_crash_toggle_callback, NSEC(PERIOD_OF_555_ASTABLE_NSEC(RES_K(180), 330, CAP_U(1))))
// video hardware
diff --git a/src/mame/drivers/nwk-tr.c b/src/mame/drivers/nwk-tr.c
index 84b34f8b91f..a2d9e0c58e7 100644
--- a/src/mame/drivers/nwk-tr.c
+++ b/src/mame/drivers/nwk-tr.c
@@ -1037,7 +1037,7 @@ static void sound_irq_callback(running_machine *machine, int irq)
generic_pulse_irq_line(cputag_get_cpu(machine, "audiocpu"), INPUT_LINE_IRQ2);
}
-static const k056800_interface nwktr_k056800_interface =
+static const k056800_interface nwktr_k056800_interface =
{
sound_irq_callback
};
diff --git a/src/mame/drivers/overdriv.c b/src/mame/drivers/overdriv.c
index dfb7c3c9d7b..a2ff70b24b4 100644
--- a/src/mame/drivers/overdriv.c
+++ b/src/mame/drivers/overdriv.c
@@ -80,9 +80,9 @@ static WRITE16_HANDLER( eeprom_w )
static INTERRUPT_GEN( cpuA_interrupt )
{
- if (cpu_getiloops(device))
+ if (cpu_getiloops(device))
cpu_set_input_line(device, 5, HOLD_LINE);
- else
+ else
cpu_set_input_line(device, 4, HOLD_LINE);
}
@@ -90,7 +90,7 @@ static INTERRUPT_GEN( cpuB_interrupt )
{
const device_config *k053246 = devtag_get_device(device->machine, "k053246");
- if (k053246_is_irq_enabled(k053246))
+ if (k053246_is_irq_enabled(k053246))
cpu_set_input_line(device, 4, HOLD_LINE);
}
@@ -337,7 +337,7 @@ static MACHINE_DRIVER_START( overdriv )
MDRV_SCREEN_SIZE(64*8, 32*8)
MDRV_SCREEN_VISIBLE_AREA(13*8, (64-13)*8-1, 0*8, 32*8-1 )
-// MDRV_GFXDECODE(overdriv)
+// MDRV_GFXDECODE(overdriv)
MDRV_PALETTE_LENGTH(2048)
MDRV_VIDEO_START(overdriv)
diff --git a/src/mame/drivers/parodius.c b/src/mame/drivers/parodius.c
index 580e628ba98..a00c2c252cc 100644
--- a/src/mame/drivers/parodius.c
+++ b/src/mame/drivers/parodius.c
@@ -28,7 +28,7 @@ static UINT8 *ram;
static INTERRUPT_GEN( parodius_interrupt )
{
const device_config *k052109 = devtag_get_device(device->machine, "k052109");
- if (k052109_is_irq_enabled(k052109))
+ if (k052109_is_irq_enabled(k052109))
cpu_set_input_line(device, 0, HOLD_LINE);
}
diff --git a/src/mame/drivers/pgm.c b/src/mame/drivers/pgm.c
index 38721c0585c..5c0003c89e0 100644
--- a/src/mame/drivers/pgm.c
+++ b/src/mame/drivers/pgm.c
@@ -301,7 +301,7 @@ static WRITE16_HANDLER( pgm_videoram_w )
pgm_bg_videoram_w(space, offset, data, mem_mask);
else if (offset < 0x7000 / 2)
pgm_tx_videoram_w(space, offset - 0x4000 / 2, data, mem_mask);
- else
+ else
COMBINE_DATA(&state->videoram[offset / 2]);
}
@@ -315,7 +315,7 @@ static READ32_HANDLER( arm7_latch_arm_r )
{
pgm_state *state = (pgm_state *)space->machine->driver_data;
- if (PGMARM7LOGERROR)
+ if (PGMARM7LOGERROR)
logerror("ARM7: Latch read: %08x (%08x) (%06x)\n", state->kov2_latchdata_68k_w, mem_mask, cpu_get_pc(space->cpu));
return state->kov2_latchdata_68k_w;
}
@@ -324,7 +324,7 @@ static WRITE32_HANDLER( arm7_latch_arm_w )
{
pgm_state *state = (pgm_state *)space->machine->driver_data;
- if (PGMARM7LOGERROR)
+ if (PGMARM7LOGERROR)
logerror("ARM7: Latch write: %08x (%08x) (%06x)\n", data, mem_mask, cpu_get_pc(space->cpu));
COMBINE_DATA(&state->kov2_latchdata_arm_w);
@@ -334,7 +334,7 @@ static READ32_HANDLER( arm7_shareram_r )
{
pgm_state *state = (pgm_state *)space->machine->driver_data;
- if (PGMARM7LOGERROR)
+ if (PGMARM7LOGERROR)
logerror("ARM7: ARM7 Shared RAM Read: %04x = %08x (%08x) (%06x)\n", offset << 2, state->arm7_shareram[offset], mem_mask, cpu_get_pc(space->cpu));
return state->arm7_shareram[offset];
}
@@ -343,7 +343,7 @@ static WRITE32_HANDLER( arm7_shareram_w )
{
pgm_state *state = (pgm_state *)space->machine->driver_data;
- if (PGMARM7LOGERROR)
+ if (PGMARM7LOGERROR)
logerror("ARM7: ARM7 Shared RAM Write: %04x = %08x (%08x) (%06x)\n", offset << 2, data, mem_mask, cpu_get_pc(space->cpu));
COMBINE_DATA(&state->arm7_shareram[offset]);
}
@@ -352,7 +352,7 @@ static READ16_HANDLER( arm7_latch_68k_r )
{
pgm_state *state = (pgm_state *)space->machine->driver_data;
- if (PGMARM7LOGERROR)
+ if (PGMARM7LOGERROR)
logerror("M68K: Latch read: %04x (%04x) (%06x)\n", state->kov2_latchdata_arm_w & 0x0000ffff, mem_mask, cpu_get_pc(space->cpu));
return state->kov2_latchdata_arm_w;
}
@@ -361,7 +361,7 @@ static WRITE16_HANDLER( arm7_latch_68k_w )
{
pgm_state *state = (pgm_state *)space->machine->driver_data;
- if (PGMARM7LOGERROR)
+ if (PGMARM7LOGERROR)
logerror("M68K: Latch write: %04x (%04x) (%06x)\n", data & 0x0000ffff, mem_mask, cpu_get_pc(space->cpu));
COMBINE_DATA(&state->kov2_latchdata_68k_w);
@@ -375,7 +375,7 @@ static READ16_HANDLER( arm7_ram_r )
pgm_state *state = (pgm_state *)space->machine->driver_data;
UINT16 *share16 = (UINT16 *)state->arm7_shareram;
- if (PGMARM7LOGERROR)
+ if (PGMARM7LOGERROR)
logerror("M68K: ARM7 Shared RAM Read: %04x = %04x (%08x) (%06x)\n", BYTE_XOR_LE(offset), share16[BYTE_XOR_LE(offset)], mem_mask, cpu_get_pc(space->cpu));
return share16[BYTE_XOR_LE(offset)];
}
@@ -385,7 +385,7 @@ static WRITE16_HANDLER( arm7_ram_w )
pgm_state *state = (pgm_state *)space->machine->driver_data;
UINT16 *share16 = (UINT16 *)state->arm7_shareram;
- if (PGMARM7LOGERROR)
+ if (PGMARM7LOGERROR)
logerror("M68K: ARM7 Shared RAM Write: %04x = %04x (%04x) (%06x)\n", BYTE_XOR_LE(offset), data, mem_mask, cpu_get_pc(space->cpu));
COMBINE_DATA(&share16[BYTE_XOR_LE(offset)]);
}
@@ -401,7 +401,7 @@ static WRITE16_HANDLER ( z80_ram_w )
state->z80_mainram[offset * 2 + 1] = data;
if (pc != 0xf12 && pc != 0xde2 && pc != 0x100c50 && pc != 0x100b20)
- if (PGMLOGERROR)
+ if (PGMLOGERROR)
logerror("Z80: write %04x, %04x @ %04x (%06x)\n", offset * 2, data, mem_mask, cpu_get_pc(space->cpu));
}
@@ -409,7 +409,7 @@ static WRITE16_HANDLER ( z80_reset_w )
{
pgm_state *state = (pgm_state *)space->machine->driver_data;
- if (PGMLOGERROR)
+ if (PGMLOGERROR)
logerror("Z80: reset %04x @ %04x (%06x)\n", data, mem_mask, cpu_get_pc(space->cpu));
if (data == 0x5050)
@@ -435,7 +435,7 @@ static WRITE16_HANDLER ( z80_reset_w )
static WRITE16_HANDLER ( z80_ctrl_w )
{
- if (PGMLOGERROR)
+ if (PGMLOGERROR)
logerror("Z80: ctrl %04x @ %04x (%06x)\n", data, mem_mask, cpu_get_pc(space->cpu));
}
@@ -445,7 +445,7 @@ static WRITE16_HANDLER ( m68k_l1_w )
if(ACCESSING_BITS_0_7)
{
- if (PGMLOGERROR)
+ if (PGMLOGERROR)
logerror("SL 1 m68.w %02x (%06x) IRQ\n", data & 0xff, cpu_get_pc(space->cpu));
soundlatch_w(space, 0, data);
cpu_set_input_line(state->soundcpu, INPUT_LINE_NMI, PULSE_LINE );
@@ -454,7 +454,7 @@ static WRITE16_HANDLER ( m68k_l1_w )
static WRITE8_HANDLER( z80_l3_w )
{
- if (PGMLOGERROR)
+ if (PGMLOGERROR)
logerror("SL 3 z80.w %02x (%04x)\n", data, cpu_get_pc(space->cpu));
soundlatch3_w(space, 0, data);
}
@@ -465,7 +465,7 @@ static void sound_irq( const device_config *device, int level )
cpu_set_input_line(state->soundcpu, 0, level);
}
-static const ics2115_interface pgm_ics2115_interface =
+static const ics2115_interface pgm_ics2115_interface =
{
sound_irq
};
@@ -809,7 +809,7 @@ static READ16_HANDLER( kovsh_arm7_ram_r )
pgm_state *state = (pgm_state *)space->machine->driver_data;
UINT16 *share16 = (UINT16 *)state->arm7_shareram;
- if (PGMARM7LOGERROR)
+ if (PGMARM7LOGERROR)
logerror("M68K: ARM7 Shared RAM Read: %04x = %04x (%08x) (%06x)\n", BYTE_XOR_LE(offset), share16[BYTE_XOR_LE(offset)], mem_mask, cpu_get_pc(space->cpu));
return share16[BYTE_XOR_LE(offset << 1)];
}
@@ -819,7 +819,7 @@ static WRITE16_HANDLER( kovsh_arm7_ram_w )
pgm_state *state = (pgm_state *)space->machine->driver_data;
UINT16 *share16 = (UINT16 *)state->arm7_shareram;
- if (PGMARM7LOGERROR)
+ if (PGMARM7LOGERROR)
logerror("M68K: ARM7 Shared RAM Write: %04x = %04x (%04x) (%06x)\n", BYTE_XOR_LE(offset), data, mem_mask, cpu_get_pc(space->cpu));
COMBINE_DATA(&share16[BYTE_XOR_LE(offset << 1)]);
}
@@ -934,7 +934,7 @@ static WRITE16_HANDLER( svg_68k_nmi_w )
static WRITE16_HANDLER( svg_latch_68k_w )
{
pgm_state *state = (pgm_state *)space->machine->driver_data;
- if (PGMARM7LOGERROR)
+ if (PGMARM7LOGERROR)
logerror("M68K: Latch write: %04x (%04x) (%06x)\n", data & 0x0000ffff, mem_mask, cpu_get_pc(space->cpu));
COMBINE_DATA(&state->kov2_latchdata_68k_w);
}
@@ -3560,21 +3560,21 @@ static void expand_32x32x5bpp(running_machine *machine)
for (cnt = 0; cnt < srcsize/5 ; cnt ++)
{
- pix = ((src[0 + 5 * cnt] >> 0)& 0x1f );
+ pix = ((src[0 + 5 * cnt] >> 0)& 0x1f );
dst[0 + 8 * cnt]=pix;
pix = ((src[0 + 5 * cnt] >> 5)& 0x07) | ((src[1 + 5 * cnt] << 3) & 0x18);
dst[1 + 8 * cnt]=pix;
- pix = ((src[1 + 5 * cnt] >> 2)& 0x1f );
+ pix = ((src[1 + 5 * cnt] >> 2)& 0x1f );
dst[2 + 8 * cnt]=pix;
pix = ((src[1 + 5 * cnt] >> 7)& 0x01) | ((src[2 + 5 * cnt] << 1) & 0x1e);
dst[3 + 8 * cnt]=pix;
pix = ((src[2 + 5 * cnt] >> 4)& 0x0f) | ((src[3 + 5 * cnt] << 4) & 0x10);
dst[4 + 8 * cnt]=pix;
- pix = ((src[3 + 5 * cnt] >> 1)& 0x1f );
+ pix = ((src[3 + 5 * cnt] >> 1)& 0x1f );
dst[5 + 8 * cnt]=pix;
pix = ((src[3 + 5 * cnt] >> 6)& 0x03) | ((src[4 + 5 * cnt] << 2) & 0x1c);
dst[6 + 8 * cnt]=pix;
- pix = ((src[4 + 5 * cnt] >> 3)& 0x1f );
+ pix = ((src[4 + 5 * cnt] >> 3)& 0x1f );
dst[7 + 8 * cnt]=pix;
}
}
diff --git a/src/mame/drivers/pkscram.c b/src/mame/drivers/pkscram.c
index 3ad0e0a6dc4..26872770338 100644
--- a/src/mame/drivers/pkscram.c
+++ b/src/mame/drivers/pkscram.c
@@ -283,7 +283,7 @@ static MACHINE_DRIVER_START( pkscramble )
MDRV_MACHINE_START(pkscramble)
MDRV_MACHINE_RESET(pkscramble)
-
+
MDRV_TIMER_ADD("scan_timer", scanline_callback)
/* video hardware */
diff --git a/src/mame/drivers/polyplay.c b/src/mame/drivers/polyplay.c
index 4668c430a95..26c499c7a7d 100644
--- a/src/mame/drivers/polyplay.c
+++ b/src/mame/drivers/polyplay.c
@@ -286,7 +286,7 @@ static MACHINE_DRIVER_START( polyplay )
MDRV_CPU_VBLANK_INT("screen", coin_interrupt)
MDRV_MACHINE_RESET(polyplay)
-
+
MDRV_TIMER_ADD("timer", polyplay_timer_callback)
diff --git a/src/mame/drivers/psikyo.c b/src/mame/drivers/psikyo.c
index 5631e54f3a0..45db8a9f827 100644
--- a/src/mame/drivers/psikyo.c
+++ b/src/mame/drivers/psikyo.c
@@ -201,7 +201,7 @@ static WRITE32_HANDLER( s1945_mcu_w )
data >>= 8 * suboff;
offset = offset * 4 + 4 + (3 - suboff);
- switch (offset)
+ switch (offset)
{
case 0x06:
state->s1945_mcu_inlatch = data;
@@ -218,7 +218,7 @@ static WRITE32_HANDLER( s1945_mcu_w )
state->s1945_mcu_bctrl = data;
break;
case 0x0b:
- switch (data | (state->s1945_mcu_direction ? 0x100 : 0))
+ switch (data | (state->s1945_mcu_direction ? 0x100 : 0))
{
case 0x11c:
state->s1945_mcu_latching = 5;
@@ -231,12 +231,12 @@ static WRITE32_HANDLER( s1945_mcu_w )
break;
case 0x113:
state->s1945_mcu_mode = state->s1945_mcu_inlatch;
- if (state->s1945_mcu_mode == 1)
+ if (state->s1945_mcu_mode == 1)
{
state->s1945_mcu_latching &= ~1;
state->s1945_mcu_latch2 = 0x55;
- }
- else
+ }
+ else
{
// Go figure.
state->s1945_mcu_latching &= ~1;
@@ -264,17 +264,17 @@ static READ32_HANDLER( s1945_mcu_r )
{
psikyo_state *state = (psikyo_state *)space->machine->driver_data;
- switch (offset)
+ switch (offset)
{
- case 0:
+ case 0:
{
UINT32 res;
- if (state->s1945_mcu_control & 16)
+ if (state->s1945_mcu_control & 16)
{
res = state->s1945_mcu_latching & 4 ? 0x0000ff00 : state->s1945_mcu_latch1 << 8;
state->s1945_mcu_latching |= 4;
- }
- else
+ }
+ else
{
res = state->s1945_mcu_latching & 1 ? 0x0000ff00 : state->s1945_mcu_latch2 << 8;
state->s1945_mcu_latching |= 1;
diff --git a/src/mame/drivers/psikyo4.c b/src/mame/drivers/psikyo4.c
index fb3b47d5fcb..539d2507206 100644
--- a/src/mame/drivers/psikyo4.c
+++ b/src/mame/drivers/psikyo4.c
@@ -284,12 +284,12 @@ static WRITE32_HANDLER( ps4_screen1_brt_w )
{
psikyo4_state *state = (psikyo4_state *)space->machine->driver_data;
- if (ACCESSING_BITS_0_7)
+ if (ACCESSING_BITS_0_7)
{
/* Need seperate brightness for both screens if displaying together */
double brt1 = data & 0xff;
- if (brt1 > 0x7f)
+ if (brt1 > 0x7f)
brt1 = 0x7f; /* I reckon values must be clamped to 0x7f */
brt1 = (0x7f - brt1) / 127.0;
@@ -302,8 +302,8 @@ static WRITE32_HANDLER( ps4_screen1_brt_w )
state->oldbrt1 = brt1;
}
- }
- else
+ }
+ else
{
/* I believe this to be seperate rgb brightness due to strings in hotdebut, unused in 4 dumped games */
if((data & mem_mask) != 0)
@@ -315,12 +315,12 @@ static WRITE32_HANDLER( ps4_screen2_brt_w )
{
psikyo4_state *state = (psikyo4_state *)space->machine->driver_data;
- if (ACCESSING_BITS_0_7)
+ if (ACCESSING_BITS_0_7)
{
/* Need seperate brightness for both screens if displaying together */
double brt2 = data & 0xff;
- if (brt2 > 0x7f)
+ if (brt2 > 0x7f)
brt2 = 0x7f; /* I reckon values must be clamped to 0x7f */
brt2 = (0x7f - brt2) / 127.0;
@@ -334,8 +334,8 @@ static WRITE32_HANDLER( ps4_screen2_brt_w )
state->oldbrt2 = brt2;
}
- }
- else
+ }
+ else
{
/* I believe this to be seperate rgb brightness due to strings in hotdebut, unused in 4 dumped games */
if((data & mem_mask) != 0)
@@ -353,7 +353,7 @@ static WRITE32_HANDLER( ps4_vidregs_w )
{
if (ACCESSING_BITS_0_15) // Bank
{
-// memory_set_bank(space->machine, "bank2", state->vidregs[offset] & 0x1fff); /* Bank comes from vidregs */
+// memory_set_bank(space->machine, "bank2", state->vidregs[offset] & 0x1fff); /* Bank comes from vidregs */
memory_set_bankptr(space->machine, "bank2", memory_region(space->machine, "gfx1") + 0x2000 * (state->vidregs[offset] & 0x1fff)); /* Bank comes from vidregs */ }
}
#endif
@@ -728,8 +728,8 @@ static MACHINE_START( psikyo4 )
state->maincpu = devtag_get_device(machine, "maincpu");
#if ROMTEST
-// FIXME: Too many banks! it cannot be handled in this way, currently
-// memory_configure_bank(machine, "bank2", 0, 0x2000, memory_region(machine, "gfx1"), 0x2000);
+// FIXME: Too many banks! it cannot be handled in this way, currently
+// memory_configure_bank(machine, "bank2", 0, 0x2000, memory_region(machine, "gfx1"), 0x2000);
state->sample_offs = 0;
state_save_register_global(machine, state->sample_offs);
@@ -1036,7 +1036,7 @@ PC :00001B48: BT $00001B3C
*/
psikyo4_state *state = (psikyo4_state *)space->machine->driver_data;
- if (cpu_get_pc(space->cpu) == 0x00001b3e)
+ if (cpu_get_pc(space->cpu) == 0x00001b3e)
cpu_spinuntil_int(space->cpu);
return state->ram[0x000020 / 4];
@@ -1055,7 +1055,7 @@ PC :00001B54: BT $00001B48
*/
psikyo4_state *state = (psikyo4_state *)space->machine->driver_data;
- if (cpu_get_pc(space->cpu) == 0x00001b4a)
+ if (cpu_get_pc(space->cpu) == 0x00001b4a)
cpu_spinuntil_int(space->cpu);
return state->ram[0x000020 / 4];
@@ -1074,7 +1074,7 @@ PC :000029F8: BT $000029EC
*/
psikyo4_state *state = (psikyo4_state *)space->machine->driver_data;
- if (cpu_get_pc(space->cpu) == 0x000029ee)
+ if (cpu_get_pc(space->cpu) == 0x000029ee)
cpu_spinuntil_int(space->cpu);
return state->ram[0x00001c / 4];
diff --git a/src/mame/drivers/rollerg.c b/src/mame/drivers/rollerg.c
index 70a26ba05ae..21754f9013e 100644
--- a/src/mame/drivers/rollerg.c
+++ b/src/mame/drivers/rollerg.c
@@ -50,9 +50,9 @@ static WRITE8_HANDLER( rollerg_0010_w )
static READ8_HANDLER( rollerg_K051316_r )
{
const device_config *k051316 = devtag_get_device(space->machine, "k051316");
- if (readzoomroms)
+ if (readzoomroms)
return k051316_rom_r(k051316, offset);
- else
+ else
return k051316_r(k051316, offset);
}
@@ -233,7 +233,7 @@ static const k05324x_interface rollerg_k05324x_intf =
static const k051316_interface rollerg_k051316_intf =
{
"gfx2", 1,
- 4, FALSE, 0,
+ 4, FALSE, 0,
0, 22, 1,
rollerg_zoom_callback
};
diff --git a/src/mame/drivers/segaorun.c b/src/mame/drivers/segaorun.c
index 783b8a66f65..da4b643a5ab 100644
--- a/src/mame/drivers/segaorun.c
+++ b/src/mame/drivers/segaorun.c
@@ -156,7 +156,7 @@ Notes:
D42832 - NEC D42832 32kx8 SRAM (DIP28)
TMM2018 - Toshiba TMM2018 2kx8 SRAM (NDIP24)
TMM2115 - Toshiba TMM2115 2kx8 SRAM (NDIP24)
- TLP521-4 - Toshiba TLP521-4 Photocoupler Gallium Arsenide Infrared Diode & Photo−Transistor (DIP16)
+ TLP521-4 - Toshiba TLP521-4 Photocoupler Gallium Arsenide Infrared Diode & Photo???Transistor (DIP16)
ADC0804 - National Semiconductor ADC0804 8-Bit Microprocessor Compatible A/D Converter (DIP20)
ULN2003 - NEC uPA2003 7 High-Voltage, High-Current Darlington Transistor Arrays (DIP16)
D4051 - NEC D4051 Single 8-Channel, Dual 4-Channel, Triple 2-Channel Analog Multiplexer/Demultiplexer with Logic Level Conversion (DIP16)
diff --git a/src/mame/drivers/seibuspi.c b/src/mame/drivers/seibuspi.c
index cda1d90f97a..918d3aea8f5 100644
--- a/src/mame/drivers/seibuspi.c
+++ b/src/mame/drivers/seibuspi.c
@@ -2213,7 +2213,7 @@ static MACHINE_DRIVER_START( seibu386 )
MDRV_NVRAM_HANDLER(sxx2f)
MDRV_MACHINE_RESET(seibu386)
-
+
/* video hardware */
MDRV_SCREEN_ADD("screen", RASTER)
MDRV_SCREEN_REFRESH_RATE(54)
diff --git a/src/mame/drivers/seta2.c b/src/mame/drivers/seta2.c
index 64af01655e7..65e3f8be170 100644
--- a/src/mame/drivers/seta2.c
+++ b/src/mame/drivers/seta2.c
@@ -2307,7 +2307,7 @@ static MACHINE_DRIVER_START( gundamex )
MDRV_IMPORT_FROM(mj4simai)
MDRV_CPU_MODIFY("maincpu")
MDRV_CPU_PROGRAM_MAP(gundamex_map)
-
+
MDRV_EEPROM_93C46_NODEFAULT_ADD("eeprom")
/* video hardware */
diff --git a/src/mame/drivers/sf.c b/src/mame/drivers/sf.c
index 4a1cf8d977f..272b4e776b4 100644
--- a/src/mame/drivers/sf.c
+++ b/src/mame/drivers/sf.c
@@ -70,7 +70,7 @@ static WRITE16_HANDLER( protection_w )
[memory_read_byte(space, 0xffc006)]
[(memory_read_byte(space, 0xffc003) << 1) + (memory_read_word(space, 0xffc004) >> 8)];
- switch (memory_read_byte(space, 0xffc684))
+ switch (memory_read_byte(space, 0xffc684))
{
case 1:
{
@@ -121,16 +121,16 @@ static WRITE16_HANDLER( protection_w )
int pos = memory_read_byte(space, 0xffc010);
pos = (pos + 1) & 3;
memory_write_byte(space, 0xffc010, pos);
- if(!pos)
+ if(!pos)
{
int d1 = memory_read_word(space, 0xffc682);
int off = memory_read_word(space, 0xffc00e);
- if (off!=512)
+ if (off!=512)
{
off++;
d1++;
- }
- else
+ }
+ else
{
off = 0;
d1 -= 512;
diff --git a/src/mame/drivers/simpsons.c b/src/mame/drivers/simpsons.c
index 81b78c837ef..a9150b8ed1b 100644
--- a/src/mame/drivers/simpsons.c
+++ b/src/mame/drivers/simpsons.c
@@ -318,7 +318,7 @@ static MACHINE_DRIVER_START( simpsons )
/* NMIs are generated by the 053260 */
MDRV_MACHINE_RESET(simpsons)
-
+
MDRV_EEPROM_NODEFAULT_ADD("eeprom", eeprom_intf)
/* video hardware */
diff --git a/src/mame/drivers/snk6502.c b/src/mame/drivers/snk6502.c
index d4271a4d70e..76070e9d640 100644
--- a/src/mame/drivers/snk6502.c
+++ b/src/mame/drivers/snk6502.c
@@ -842,7 +842,7 @@ static MACHINE_DRIVER_START( sasuke )
MDRV_VIDEO_UPDATE(snk6502)
MDRV_MC6845_ADD("crtc", MC6845, MASTER_CLOCK / 16, mc6845_intf)
-
+
MDRV_TIMER_ADD_PERIODIC("sasuke_timer", sasuke_update_counter, HZ(MASTER_CLOCK / 8)) // 1.4 MHz
// sound hardware
diff --git a/src/mame/drivers/spy.c b/src/mame/drivers/spy.c
index b19abf08f4a..d0044b82384 100644
--- a/src/mame/drivers/spy.c
+++ b/src/mame/drivers/spy.c
@@ -370,7 +370,7 @@ static READ8_HANDLER( k052109_051960_r )
else
return k051960_r(k051960, offset - 0x3c00);
}
- else
+ else
return k052109_r(k052109, offset);
}
diff --git a/src/mame/drivers/sspeedr.c b/src/mame/drivers/sspeedr.c
index ca01f2a993d..35cb02554df 100644
--- a/src/mame/drivers/sspeedr.c
+++ b/src/mame/drivers/sspeedr.c
@@ -144,7 +144,7 @@ static INPUT_PORTS_START( sspeedr )
PORT_DIPSETTING( 0x04, "70 seconds")
PORT_DIPSETTING( 0x08, "80 seconds")
PORT_DIPSETTING( 0x0C, "90 seconds")
- PORT_DIPNAME( 0x10, 0x00, "Extended Play" ) PORT_DIPLOCATION("SW1:5")
+ PORT_DIPNAME( 0x10, 0x00, "Extended Play" ) PORT_DIPLOCATION("SW1:5")
PORT_DIPSETTING( 0x00, "20 seconds" )
PORT_DIPSETTING( 0x10, "30 seconds" )
PORT_DIPNAME( 0xE0, 0x20, DEF_STR( Service_Mode ) ) PORT_DIPLOCATION("SW1:6,7,8")
diff --git a/src/mame/drivers/subsino.c b/src/mame/drivers/subsino.c
index 3ddefcff6df..f36b89438e9 100644
--- a/src/mame/drivers/subsino.c
+++ b/src/mame/drivers/subsino.c
@@ -209,15 +209,15 @@ static ADDRESS_MAP_START( victor21_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE( 0x09007, 0x09007 ) AM_READ_PORT( "DSW2" )
AM_RANGE( 0x09008, 0x09008 ) AM_READ_PORT( "DSW3" )
-// AM_RANGE( 0x09009, 0x09009 ) AM_WRITE( subsino_out_b_w )
-// AM_RANGE( 0x0900a, 0x0900a ) AM_WRITE( subsino_out_a_w )
+// AM_RANGE( 0x09009, 0x09009 ) AM_WRITE( subsino_out_b_w )
+// AM_RANGE( 0x0900a, 0x0900a ) AM_WRITE( subsino_out_a_w )
-// AM_RANGE( 0x0900b, 0x0900b ) //"flash" status, bit 0
-// AM_RANGE( 0x0900c, 0x0900c ) AM_READ_PORT( "INC" )
+// AM_RANGE( 0x0900b, 0x0900b ) //"flash" status, bit 0
+// AM_RANGE( 0x0900c, 0x0900c ) AM_READ_PORT( "INC" )
AM_RANGE( 0x0900e, 0x0900f ) AM_DEVWRITE( "ymsnd", ym2413_w )
-// AM_RANGE( 0x09018, 0x09018 ) AM_DEVWRITE( "oki", okim6295_w )
+// AM_RANGE( 0x09018, 0x09018 ) AM_DEVWRITE( "oki", okim6295_w )
AM_RANGE( 0x0900d, 0x0900d ) AM_WRITE( subsino_tiles_offset_w )
@@ -251,7 +251,7 @@ static UINT8 flash_val,flash_packet,flash_packet_start;
static READ8_HANDLER( flash_r )
{
-// printf("R %02x\n",flash_val);
+// printf("R %02x\n",flash_val);
if(flash_val == 0xff)
return 0xd9;
@@ -308,13 +308,13 @@ static ADDRESS_MAP_START( crsbingo_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE( 0x0900a, 0x0900a ) AM_READ( hwcheck_r )
AM_RANGE( 0x09010, 0x09010 ) AM_READWRITE( flash_r, flash_w )
-// AM_RANGE( 0x09011, 0x09011 ) //"flash" status, bit 0
-// AM_RANGE( 0x0900c, 0x0900c ) AM_READ_PORT( "INC" )
+// AM_RANGE( 0x09011, 0x09011 ) //"flash" status, bit 0
+// AM_RANGE( 0x0900c, 0x0900c ) AM_READ_PORT( "INC" )
AM_RANGE( 0x0900c, 0x0900d ) AM_DEVWRITE( "ymsnd", ym2413_w )
-// AM_RANGE( 0x09018, 0x09018 ) AM_DEVWRITE( "oki", okim6295_w )
+// AM_RANGE( 0x09018, 0x09018 ) AM_DEVWRITE( "oki", okim6295_w )
-// AM_RANGE( 0x0900d, 0x0900d ) AM_WRITE( subsino_tiles_offset_w )
+// AM_RANGE( 0x0900d, 0x0900d ) AM_WRITE( subsino_tiles_offset_w )
AM_RANGE( 0x07800, 0x07fff ) AM_RAM
AM_RANGE( 0x08000, 0x087ff ) AM_RAM_WRITE( subsino_videoram_w ) AM_BASE( &videoram )
@@ -1486,7 +1486,7 @@ static DRIVER_INIT( victor5 )
}
}
-// dump_decrypted(machine, decrypt);
+// dump_decrypted(machine, decrypt);
memcpy(region, decrypt, 0x10000);
}
@@ -1523,7 +1523,7 @@ static DRIVER_INIT( victor21 )
}
}
-// dump_decrypted(machine, decrypt);
+// dump_decrypted(machine, decrypt);
memcpy(region, decrypt, 0x10000);
}
@@ -1556,7 +1556,7 @@ static DRIVER_INIT( crsbingo )
}
}
-// dump_decrypted(machine, decrypt);
+// dump_decrypted(machine, decrypt);
memcpy(region, decrypt, 0x10000);
}
@@ -1588,7 +1588,7 @@ static DRIVER_INIT( sharkpy )
}
}
-// dump_decrypted(machine, decrypt);
+// dump_decrypted(machine, decrypt);
memcpy(region, decrypt, 0x10000);
}
diff --git a/src/mame/drivers/suna8.c b/src/mame/drivers/suna8.c
index 356070273f2..bce347951d4 100644
--- a/src/mame/drivers/suna8.c
+++ b/src/mame/drivers/suna8.c
@@ -572,7 +572,7 @@ static READ8_HANDLER( rranger_soundstatus_r )
static WRITE8_HANDLER( sranger_prot_w )
{
/* check code at 0x2ce2 (in sranger), protection is so dire that I can't even exactly
- estabilish if what I'm doing can be considered or not a kludge... -AS */
+ estabilish if what I'm doing can be considered or not a kludge... -AS */
memory_write_byte(space,0xcd99,0xff);
}
diff --git a/src/mame/drivers/suprslam.c b/src/mame/drivers/suprslam.c
index 120727fdb22..187ff1d833c 100644
--- a/src/mame/drivers/suprslam.c
+++ b/src/mame/drivers/suprslam.c
@@ -134,7 +134,7 @@ static ADDRESS_MAP_START( suprslam_map, ADDRESS_SPACE_PROGRAM, 16 )
AM_RANGE(0xfe0000, 0xfe0fff) AM_RAM_WRITE(suprslam_screen_videoram_w) AM_BASE_MEMBER(suprslam_state, screen_videoram)
AM_RANGE(0xff0000, 0xff1fff) AM_RAM_WRITE(suprslam_bg_videoram_w) AM_BASE_MEMBER(suprslam_state, bg_videoram)
AM_RANGE(0xff2000, 0xff203f) AM_RAM AM_BASE_MEMBER(suprslam_state,screen_vregs)
-// AM_RANGE(0xff3000, 0xff3001) AM_WRITENOP // sprite buffer trigger?
+// AM_RANGE(0xff3000, 0xff3001) AM_WRITENOP // sprite buffer trigger?
AM_RANGE(0xff8000, 0xff8fff) AM_DEVREADWRITE("k053936", k053936_linectrl_r, k053936_linectrl_w)
AM_RANGE(0xff9000, 0xff9001) AM_WRITE(sound_command_w)
AM_RANGE(0xffa000, 0xffafff) AM_RAM_WRITE(paletteram16_xGGGGGBBBBBRRRRR_word_w) AM_BASE_GENERIC(paletteram)
diff --git a/src/mame/drivers/surpratk.c b/src/mame/drivers/surpratk.c
index c4d3dbc9571..e28722851c6 100644
--- a/src/mame/drivers/surpratk.c
+++ b/src/mame/drivers/surpratk.c
@@ -29,7 +29,7 @@ static UINT8 *ram;
static INTERRUPT_GEN( surpratk_interrupt )
{
const device_config *k052109 = devtag_get_device(device->machine, "k052109");
- if (k052109_is_irq_enabled(k052109))
+ if (k052109_is_irq_enabled(k052109))
cpu_set_input_line(device,0,HOLD_LINE);
}
diff --git a/src/mame/drivers/tail2nos.c b/src/mame/drivers/tail2nos.c
index 412833320cc..a00a814a675 100644
--- a/src/mame/drivers/tail2nos.c
+++ b/src/mame/drivers/tail2nos.c
@@ -238,7 +238,7 @@ static const ym2608_interface ym2608_config =
static const k051316_interface tail2nos_k051316_intf =
{
"gfx3", 2,
- -4, TRUE, 0,
+ -4, TRUE, 0,
1, -89, -14,
tail2nos_zoom_callback
};
diff --git a/src/mame/drivers/thunderj.c b/src/mame/drivers/thunderj.c
index a5aed1d6589..519441f1804 100644
--- a/src/mame/drivers/thunderj.c
+++ b/src/mame/drivers/thunderj.c
@@ -44,7 +44,7 @@ static MACHINE_START( thunderj )
{
thunderj_state *state = (thunderj_state *)machine->driver_data;
atarigen_init(machine);
-
+
state_save_register_global(machine, state->alpha_tile_bank);
}
diff --git a/src/mame/drivers/thunderx.c b/src/mame/drivers/thunderx.c
index a12754331d9..f8449a007e9 100644
--- a/src/mame/drivers/thunderx.c
+++ b/src/mame/drivers/thunderx.c
@@ -391,7 +391,7 @@ static READ8_HANDLER( k052109_051960_r )
else
return k051960_r(k051960, offset - 0x3c00);
}
- else
+ else
return k052109_r(k052109, offset);
}
diff --git a/src/mame/drivers/tickee.c b/src/mame/drivers/tickee.c
index e09dbab1c6b..a19265968f5 100644
--- a/src/mame/drivers/tickee.c
+++ b/src/mame/drivers/tickee.c
@@ -671,7 +671,7 @@ static MACHINE_DRIVER_START( tickee )
MDRV_MACHINE_RESET(tickee)
MDRV_NVRAM_HANDLER(generic_1fill)
-
+
MDRV_TICKET_DISPENSER_ADD("ticket1", 100, TICKET_MOTOR_ACTIVE_LOW, TICKET_STATUS_ACTIVE_HIGH)
MDRV_TICKET_DISPENSER_ADD("ticket2", 100, TICKET_MOTOR_ACTIVE_LOW, TICKET_STATUS_ACTIVE_HIGH)
diff --git a/src/mame/drivers/tmnt.c b/src/mame/drivers/tmnt.c
index ebbd71caa61..428699ef3c7 100644
--- a/src/mame/drivers/tmnt.c
+++ b/src/mame/drivers/tmnt.c
@@ -213,7 +213,7 @@ static INTERRUPT_GEN( punkshot_interrupt )
{
const device_config *k052109 = devtag_get_device(device->machine, "k052109");
- if (k052109_is_irq_enabled(k052109))
+ if (k052109_is_irq_enabled(k052109))
irq4_line_hold(device);
}
@@ -221,7 +221,7 @@ static INTERRUPT_GEN( lgtnfght_interrupt )
{
const device_config *k052109 = devtag_get_device(device->machine, "k052109");
- if (k052109_is_irq_enabled(k052109))
+ if (k052109_is_irq_enabled(k052109))
irq5_line_hold(device);
}
@@ -721,7 +721,7 @@ static ADDRESS_MAP_START( blswhstl_main_map, ADDRESS_SPACE_PROGRAM, 16 )
AM_RANGE(0x700006, 0x700007) AM_READ_PORT("EEPROM")
AM_RANGE(0x700200, 0x700201) AM_WRITE(blswhstl_eeprom_w)
AM_RANGE(0x700300, 0x700301) AM_WRITE(blswhstl_700300_w)
- AM_RANGE(0x700400, 0x700401) AM_WRITE(watchdog_reset16_w)
+ AM_RANGE(0x700400, 0x700401) AM_WRITE(watchdog_reset16_w)
AM_RANGE(0x780600, 0x780603) AM_DEVREAD8("konami", punkshot_sound_r, 0x00ff) /* K053260 */
AM_RANGE(0x780600, 0x780601) AM_DEVWRITE8("konami", k053260_w, 0x00ff)
AM_RANGE(0x780604, 0x780605) AM_WRITE(ssriders_soundkludge_w)
@@ -739,8 +739,8 @@ static WRITE16_HANDLER( K053251_glfgreat_w )
{
k053251_w(k053251, offset, (data >> 8) & 0xff);
- /* FIXME: in the old code k052109 tilemaps were tilemaps 2,3,4 for k053251
- and got marked as dirty in the write above... how was the original hardware working?!? */
+ /* FIXME: in the old code k052109 tilemaps were tilemaps 2,3,4 for k053251
+ and got marked as dirty in the write above... how was the original hardware working?!? */
for (i = 0; i < 3; i++)
{
if (k053251_get_tmap_dirty(k053251, 2 + i))
@@ -781,7 +781,7 @@ static ADDRESS_MAP_START( prmrsocr_main_map, ADDRESS_SPACE_PROGRAM, 16 )
AM_RANGE(0x100000, 0x103fff) AM_RAM /* main RAM */
AM_RANGE(0x104000, 0x107fff) AM_READWRITE(K053245_scattered_word_r, K053245_scattered_word_w) AM_BASE_GENERIC(spriteram)
AM_RANGE(0x108000, 0x108fff) AM_RAM_WRITE(paletteram16_xBBBBBGGGGGRRRRR_word_w) AM_BASE_GENERIC(paletteram)
- AM_RANGE(0x10c000, 0x10cfff) AM_DEVREADWRITE("k053936", k053936_linectrl_r, k053936_linectrl_w)
+ AM_RANGE(0x10c000, 0x10cfff) AM_DEVREADWRITE("k053936", k053936_linectrl_r, k053936_linectrl_w)
AM_RANGE(0x110000, 0x11001f) AM_WRITE(K053244_word_noA1_w) /* duplicate! */
AM_RANGE(0x114000, 0x11401f) AM_DEVREADWRITE("k053245", k053244_lsb_r, k053244_lsb_w) /* duplicate! */
AM_RANGE(0x118000, 0x11801f) AM_DEVWRITE("k053936", k053936_ctrl_w)
diff --git a/src/mame/drivers/toratora.c b/src/mame/drivers/toratora.c
index c6169866aa2..e46930fdd40 100644
--- a/src/mame/drivers/toratora.c
+++ b/src/mame/drivers/toratora.c
@@ -139,7 +139,7 @@ static INTERRUPT_GEN( toratora_timer )
state->timer++; /* timer counting at 16 Hz */
/* also, when the timer overflows (16 seconds) watchdog would kick in */
- if (state->timer & 0x100)
+ if (state->timer & 0x100)
popmessage("watchdog!");
if (state->last != (input_port_read(device->machine, "INPUT") & 0x0f))
diff --git a/src/mame/drivers/trvmadns.c b/src/mame/drivers/trvmadns.c
index 4b1dac233ef..85389df40bf 100644
--- a/src/mame/drivers/trvmadns.c
+++ b/src/mame/drivers/trvmadns.c
@@ -251,8 +251,8 @@ static TILE_GET_INFO( get_bg_tile_info )
color = (attr & 0x18) >> 3;
flag = TILE_FLIPXY((attr & 0x06) >> 1);
-// if((~attr & 0x20) || (~attr & 0x40))
-// flag |= TILE_FORCE_LAYER0;
+// if((~attr & 0x20) || (~attr & 0x40))
+// flag |= TILE_FORCE_LAYER0;
//0x20? tile transparent pen 1?
//0x40? tile transparent pen 1?
@@ -266,7 +266,7 @@ static VIDEO_START( trvmadns )
{
bg_tilemap = tilemap_create(machine, get_bg_tile_info, tilemap_scan_rows, 8, 8, 32, 32);
-// tilemap_set_transparent_pen(fg_tilemap,1);
+// tilemap_set_transparent_pen(fg_tilemap,1);
gfx_element_set_source(machine->gfx[0], trvmadns_gfxram);
}
diff --git a/src/mame/drivers/ultraman.c b/src/mame/drivers/ultraman.c
index 0c494d2e853..be3a7fc482d 100644
--- a/src/mame/drivers/ultraman.c
+++ b/src/mame/drivers/ultraman.c
@@ -179,7 +179,7 @@ static const k051960_interface ultraman_k051960_intf =
static const k051316_interface ultraman_k051316_intf_0 =
{
"gfx2", 1,
- 4, FALSE, 0,
+ 4, FALSE, 0,
0, 8, 0,
ultraman_zoom_callback_0
};
@@ -187,7 +187,7 @@ static const k051316_interface ultraman_k051316_intf_0 =
static const k051316_interface ultraman_k051316_intf_1 =
{
"gfx3", 2,
- 4, FALSE, 0,
+ 4, FALSE, 0,
0, 8, 0,
ultraman_zoom_callback_1
};
@@ -195,7 +195,7 @@ static const k051316_interface ultraman_k051316_intf_1 =
static const k051316_interface ultraman_k051316_intf_2 =
{
"gfx4", 3,
- 4, TRUE, 0,
+ 4, TRUE, 0,
0, 8, 0,
ultraman_zoom_callback_2
};
diff --git a/src/mame/drivers/ultrsprt.c b/src/mame/drivers/ultrsprt.c
index ef9fea3c2b3..68d937ea6c2 100644
--- a/src/mame/drivers/ultrsprt.c
+++ b/src/mame/drivers/ultrsprt.c
@@ -195,7 +195,7 @@ static void sound_irq_callback(running_machine *machine, int irq)
cputag_set_input_line(machine, "audiocpu", INPUT_LINE_IRQ6, HOLD_LINE);
}
-static const k056800_interface ultrsprt_k056800_interface =
+static const k056800_interface ultrsprt_k056800_interface =
{
sound_irq_callback
};
diff --git a/src/mame/drivers/vertigo.c b/src/mame/drivers/vertigo.c
index 28a51ccf114..7b7246444f4 100644
--- a/src/mame/drivers/vertigo.c
+++ b/src/mame/drivers/vertigo.c
@@ -114,7 +114,7 @@ static MACHINE_DRIVER_START( vertigo )
MDRV_IMPORT_FROM(exidy440_audio)
MDRV_PIT8254_ADD( "pit8254", vertigo_pit8254_config )
-
+
MDRV_74148_ADD( "74148", vertigo_update_irq )
/* motor controller */
diff --git a/src/mame/drivers/wecleman.c b/src/mame/drivers/wecleman.c
index 809e912c271..6eadd87bd13 100644
--- a/src/mame/drivers/wecleman.c
+++ b/src/mame/drivers/wecleman.c
@@ -1110,7 +1110,7 @@ static INTERRUPT_GEN( hotchase_sound_timer )
static const k051316_interface hotchase_k051316_intf_0 =
{
"gfx2", 1,
- 4, FALSE, 0,
+ 4, FALSE, 0,
1, -0xb0 / 2, -16,
hotchase_zoom_callback_0
};
@@ -1118,7 +1118,7 @@ static const k051316_interface hotchase_k051316_intf_0 =
static const k051316_interface hotchase_k051316_intf_1 =
{
"gfx3", 2,
- 4, FALSE, 0,
+ 4, FALSE, 0,
0, -0xb0 / 2, -16,
hotchase_zoom_callback_1
};
diff --git a/src/mame/drivers/williams.c b/src/mame/drivers/williams.c
index 65813151620..2b94e3972eb 100644
--- a/src/mame/drivers/williams.c
+++ b/src/mame/drivers/williams.c
@@ -1240,7 +1240,7 @@ static INPUT_PORTS_START( lottofun )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT )
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_START1 )
PORT_BIT( 0x60, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE("ticket", ticket_dispenser_line_r)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE("ticket", ticket_dispenser_line_r)
PORT_START("IN1")
PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNKNOWN )
diff --git a/src/mame/drivers/xexex.c b/src/mame/drivers/xexex.c
index 771a94b471c..c937716d525 100644
--- a/src/mame/drivers/xexex.c
+++ b/src/mame/drivers/xexex.c
@@ -143,7 +143,7 @@ static void xexex_objdma(running_machine *machine, int limiter)
counter = frame;
frame = video_screen_get_frame_number(machine->primary_screen);
- if (limiter && counter == frame)
+ if (limiter && counter == frame)
return; // make sure we only do DMA transfer once per frame
k053247_get_ram(k053246, &dst);
@@ -276,10 +276,10 @@ static TIMER_CALLBACK( dmaend_callback )
if (cur_control2 & 0x0040)
{
// foul-proof (CPU0 could be deactivated while we wait)
- if (suspension_active)
- {
- suspension_active = 0;
- cpuexec_trigger(machine, resume_trigger);
+ if (suspension_active)
+ {
+ suspension_active = 0;
+ cpuexec_trigger(machine, resume_trigger);
}
// IRQ 5 is the "object DMA end interrupt" and shouldn't be triggered
@@ -292,10 +292,10 @@ static INTERRUPT_GEN( xexex_interrupt )
{
const device_config *k053246 = devtag_get_device(device->machine, "k053246");
- if (suspension_active)
- {
- suspension_active = 0;
- cpuexec_trigger(device->machine, resume_trigger);
+ if (suspension_active)
+ {
+ suspension_active = 0;
+ cpuexec_trigger(device->machine, resume_trigger);
}
switch (cpu_getiloops(device))
diff --git a/src/mame/drivers/xtheball.c b/src/mame/drivers/xtheball.c
index 9fc0b6d3bef..f33e4cae354 100644
--- a/src/mame/drivers/xtheball.c
+++ b/src/mame/drivers/xtheball.c
@@ -342,7 +342,7 @@ static MACHINE_DRIVER_START( xtheball )
MDRV_MACHINE_RESET(xtheball)
MDRV_NVRAM_HANDLER(generic_1fill)
-
+
MDRV_TICKET_DISPENSER_ADD("ticket", 100, TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_HIGH)
/* video hardware */
diff --git a/src/mame/drivers/zr107.c b/src/mame/drivers/zr107.c
index e6a4ff3caea..1606199d22b 100644
--- a/src/mame/drivers/zr107.c
+++ b/src/mame/drivers/zr107.c
@@ -691,7 +691,7 @@ static void sound_irq_callback( running_machine *machine, int irq )
timer_set(machine, ATTOTIME_IN_USEC(1), NULL, line, irq_off);
}
-static const k056800_interface zr107_k056800_interface =
+static const k056800_interface zr107_k056800_interface =
{
sound_irq_callback
};
diff --git a/src/mame/includes/88games.h b/src/mame/includes/88games.h
index c3cad7fbb1f..a443cf72475 100644
--- a/src/mame/includes/88games.h
+++ b/src/mame/includes/88games.h
@@ -10,8 +10,8 @@ struct __88games_state
/* memory pointers */
UINT8 * ram;
UINT8 * banked_rom;
-// UINT8 * paletteram_1000; // this currently uses generic palette handling
-// UINT8 * nvram; // this currently uses generic nvram handling
+// UINT8 * paletteram_1000; // this currently uses generic palette handling
+// UINT8 * nvram; // this currently uses generic nvram handling
/* video-related */
int k88games_priority;
diff --git a/src/mame/includes/balsente.h b/src/mame/includes/balsente.h
index 18605ae5c28..67f8fcf48c7 100644
--- a/src/mame/includes/balsente.h
+++ b/src/mame/includes/balsente.h
@@ -37,7 +37,7 @@ struct _balsente_state
UINT16 *shrike_io;
/* 8253 counter state */
- struct
+ struct
{
const device_config *timer;
UINT8 timer_active;
diff --git a/src/mame/includes/battlnts.h b/src/mame/includes/battlnts.h
index e575003bac1..9fcdcc6088d 100644
--- a/src/mame/includes/battlnts.h
+++ b/src/mame/includes/battlnts.h
@@ -8,7 +8,7 @@ typedef struct _battlnts_state battlnts_state;
struct _battlnts_state
{
/* memory pointers */
-// UINT8 * paletteram; // this currently uses generic palette handling
+// UINT8 * paletteram; // this currently uses generic palette handling
/* video-related */
int spritebank;
diff --git a/src/mame/includes/cbasebal.h b/src/mame/includes/cbasebal.h
index d5e94e29486..7950308e1d0 100644
--- a/src/mame/includes/cbasebal.h
+++ b/src/mame/includes/cbasebal.h
@@ -9,7 +9,7 @@ struct _cbasebal_state
{
/* memory pointers */
UINT8 * spriteram;
-// UINT8 * paletteram; // currently this uses generic palette handling
+// UINT8 * paletteram; // currently this uses generic palette handling
size_t spriteram_size;
/* video-related */
diff --git a/src/mame/includes/crshrace.h b/src/mame/includes/crshrace.h
index 5e145f9d80e..c7998954d9f 100644
--- a/src/mame/includes/crshrace.h
+++ b/src/mame/includes/crshrace.h
@@ -5,9 +5,9 @@ struct _crshrace_state
/* memory pointers */
UINT16 * videoram1;
UINT16 * videoram2;
-// UINT16 * spriteram1; // currently this uses generic buffered spriteram
-// UINT16 * spriteram2; // currently this uses generic buffered spriteram
-// UINT16 * paletteram; // currently this uses generic palette handling
+// UINT16 * spriteram1; // currently this uses generic buffered spriteram
+// UINT16 * spriteram2; // currently this uses generic buffered spriteram
+// UINT16 * paletteram; // currently this uses generic palette handling
/* video-related */
tilemap *tilemap1, *tilemap2;
diff --git a/src/mame/includes/f1gp.h b/src/mame/includes/f1gp.h
index 9218bdb6535..4cf97116760 100644
--- a/src/mame/includes/f1gp.h
+++ b/src/mame/includes/f1gp.h
@@ -16,7 +16,7 @@ struct _f1gp_state
UINT16 * fgregs;
UINT16 * rozregs;
UINT16 * zoomdata;
-// UINT16 * paletteram; // currently this uses generic palette handling
+// UINT16 * paletteram; // currently this uses generic palette handling
size_t spr1cgram_size, spr2cgram_size;
size_t spriteram_size;
diff --git a/src/mame/includes/flkatck.h b/src/mame/includes/flkatck.h
index 76c79d7c3e8..d1eda8ba78d 100644
--- a/src/mame/includes/flkatck.h
+++ b/src/mame/includes/flkatck.h
@@ -9,7 +9,7 @@ struct _flkatck_state
{
/* memory pointers */
UINT8 * k007121_ram;
-// UINT8 * paletteram; // this currently uses generic palette handling
+// UINT8 * paletteram; // this currently uses generic palette handling
/* video-related */
tilemap *k007121_tilemap[2];
diff --git a/src/mame/includes/hcastle.h b/src/mame/includes/hcastle.h
index 9d02ac9f6b1..55ea9ea732f 100644
--- a/src/mame/includes/hcastle.h
+++ b/src/mame/includes/hcastle.h
@@ -11,8 +11,8 @@ struct _hcastle_state
UINT8 * pf1_videoram;
UINT8 * pf2_videoram;
UINT8 * paletteram;
-// UINT8 * spriteram;
-// UINT8 * spriteram2;
+// UINT8 * spriteram;
+// UINT8 * spriteram2;
/* video-related */
tilemap *fg_tilemap, *bg_tilemap;
diff --git a/src/mame/includes/malzak.h b/src/mame/includes/malzak.h
index baf65a2d6ed..0a702f58ea0 100644
--- a/src/mame/includes/malzak.h
+++ b/src/mame/includes/malzak.h
@@ -9,8 +9,8 @@ typedef struct _malzak_state malzak_state;
struct _malzak_state
{
/* misc */
-// int playfield_x[256];
-// int playfield_y[256];
+// int playfield_x[256];
+// int playfield_y[256];
int playfield_code[256];
int malzak_x;
int malzak_y;
diff --git a/src/mame/includes/neogeo.h b/src/mame/includes/neogeo.h
index 6bc7b7ad237..51bc9fe9fbb 100644
--- a/src/mame/includes/neogeo.h
+++ b/src/mame/includes/neogeo.h
@@ -32,8 +32,8 @@ typedef struct _neogeo_state neogeo_state;
struct _neogeo_state
{
/* memory pointers */
-// UINT8 *memcard_data; // this currently uses generic handlers
-// UINT16 *save_ram; // this currently uses generic handlers
+// UINT8 *memcard_data; // this currently uses generic handlers
+// UINT16 *save_ram; // this currently uses generic handlers
/* video-related */
UINT8 *sprite_gfx;
diff --git a/src/mame/includes/pgm.h b/src/mame/includes/pgm.h
index f3370b509e7..a06858776a4 100644
--- a/src/mame/includes/pgm.h
+++ b/src/mame/includes/pgm.h
@@ -3,7 +3,7 @@ typedef struct _pgm_state pgm_state;
struct _pgm_state
{
/* memory pointers */
-// UINT16 * mainram; // currently this is also used by nvram handler
+// UINT16 * mainram; // currently this is also used by nvram handler
UINT16 * bg_videoram;
UINT16 * tx_videoram;
UINT16 * videoregs;
@@ -16,7 +16,7 @@ struct _pgm_state
UINT8 * sprite_a_region;
size_t sprite_a_region_size;
UINT16 * spritebufferram; // buffered spriteram
-// UINT16 * paletteram; // currently this uses generic palette handling
+// UINT16 * paletteram; // currently this uses generic palette handling
/* video-related */
tilemap *bg_tilemap, *tx_tilemap;
diff --git a/src/mame/includes/psikyo.h b/src/mame/includes/psikyo.h
index 45052566af7..fec8268722f 100644
--- a/src/mame/includes/psikyo.h
+++ b/src/mame/includes/psikyo.h
@@ -14,9 +14,9 @@ struct _psikyo_state
UINT32 * spritebuf1;
UINT32 * spritebuf2;
UINT32 * bootleg_spritebuffer;
-// UINT32 * paletteram; // currently this uses generic palette handling
-// UINT32 * spriteram; // currently this uses generic buffered spriteram
-// size_t spriteram_size;
+// UINT32 * paletteram; // currently this uses generic palette handling
+// UINT32 * spriteram; // currently this uses generic buffered spriteram
+// size_t spriteram_size;
/* video-related */
tilemap *tilemap_0_size0, *tilemap_0_size1, *tilemap_0_size2, *tilemap_0_size3;
diff --git a/src/mame/includes/psikyosh.h b/src/mame/includes/psikyosh.h
index 7b400547f40..d71946d3f35 100644
--- a/src/mame/includes/psikyosh.h
+++ b/src/mame/includes/psikyosh.h
@@ -29,12 +29,12 @@ struct _psikyosh_state
UINT32 * vidregs;
UINT32 * ram;
UINT32 * paletteram;
-// UINT32 * spriteram; // currently this uses generic buffered spriteram
-// size_t spriteram_size;
+// UINT32 * spriteram; // currently this uses generic buffered spriteram
+// size_t spriteram_size;
/* video-related */
bitmap_t *zoom_bitmap, *z_bitmap;
-// UINT8 alphatable[256];
+// UINT8 alphatable[256];
/* misc */
UINT32 sample_offs; // only used if ROMTEST = 1
diff --git a/src/mame/includes/sf.h b/src/mame/includes/sf.h
index c4229e11552..124f7fbb023 100644
--- a/src/mame/includes/sf.h
+++ b/src/mame/includes/sf.h
@@ -10,7 +10,7 @@ struct _sf_state
/* memory pointers */
UINT16 * videoram;
UINT16 * objectram;
-// UINT16 * paletteram; // currently this uses generic palette handling
+// UINT16 * paletteram; // currently this uses generic palette handling
size_t videoram_size;
/* video-related */
diff --git a/src/mame/includes/suprslam.h b/src/mame/includes/suprslam.h
index 7fdffe063e2..cd2cbb81bda 100644
--- a/src/mame/includes/suprslam.h
+++ b/src/mame/includes/suprslam.h
@@ -12,7 +12,7 @@ struct _suprslam_state
UINT16 * bg_videoram;
UINT16 * sp_videoram;
UINT16 * spriteram;
-// UINT16 * paletteram; // this currently uses generic palette handling
+// UINT16 * paletteram; // this currently uses generic palette handling
/* video-related */
tilemap *screen_tilemap, *bg_tilemap;
diff --git a/src/mame/machine/atarigen.c b/src/mame/machine/atarigen.c
index 22660ac2c46..d13527dd026 100644
--- a/src/mame/machine/atarigen.c
+++ b/src/mame/machine/atarigen.c
@@ -69,7 +69,7 @@ INLINE const atarigen_screen_timer *get_screen_timer(const device_config *screen
for (i = 0; i < ARRAY_LENGTH(state->screen_timer); i++)
if (state->screen_timer[i].screen == screen)
return &state->screen_timer[i];
-
+
fatalerror("Unexpected: no atarivc_eof_update_timer for screen '%s'\n", screen->tag);
return NULL;
}
@@ -85,7 +85,7 @@ void atarigen_init(running_machine *machine)
atarigen_state *state = (atarigen_state *)machine->driver_data;
const device_config *screen;
int i;
-
+
/* allocate timers for all screens */
assert(video_screen_count(machine->config) <= ARRAY_LENGTH(state->screen_timer));
for (i = 0, screen = video_screen_first(machine->config); screen != NULL; i++, screen = video_screen_next(screen))
diff --git a/src/mame/machine/balsente.c b/src/mame/machine/balsente.c
index 0e707081932..86c7537a651 100644
--- a/src/mame/machine/balsente.c
+++ b/src/mame/machine/balsente.c
@@ -80,7 +80,7 @@ MACHINE_START( balsente )
{
balsente_state *state = (balsente_state *)machine->driver_data;
int i;
-
+
/* create the polynomial tables */
poly17_init(machine);
diff --git a/src/mame/machine/carpolo.c b/src/mame/machine/carpolo.c
index 5d1fd8b7c38..16633be81fb 100644
--- a/src/mame/machine/carpolo.c
+++ b/src/mame/machine/carpolo.c
@@ -259,7 +259,7 @@ INTERRUPT_GEN( carpolo_timer_interrupt )
static const char *const portnames[] = { "DIAL0", "DIAL1", "DIAL2", "DIAL3" };
const device_config *movement_flip_flop;
const device_config *dir_flip_flop;
-
+
switch (player)
{
default:
@@ -526,7 +526,7 @@ MACHINE_START( carpolo )
ttl7474_1c_2 = devtag_get_device(machine, "7474_1c_2");
ttl7474_1a_1 = devtag_get_device(machine, "7474_1a_1");
ttl7474_1a_2 = devtag_get_device(machine, "7474_1a_2");
-
+
ttl74148_3s = devtag_get_device(machine, "74148_3s");
ttl74153_1k = devtag_get_device(machine, "74153_1k");
diff --git a/src/mame/machine/cps2crpt.c b/src/mame/machine/cps2crpt.c
index 95c1aee2e96..92683b5d457 100644
--- a/src/mame/machine/cps2crpt.c
+++ b/src/mame/machine/cps2crpt.c
@@ -943,7 +943,7 @@ static const struct game_keys keys_table[] =
{ "sfz3a", { 0x990b9301,0xa4e42c7e }, 0x100000 }, // 0C80 1C62 F5A8 cmpi.l #$1C62F5A8,D0
{ "sfz3ar1", { 0x990b9301,0xa4e42c7e }, 0x100000 }, // 0C80 1C62 F5A8 cmpi.l #$1C62F5A8,D0
{ "jyangoku", { 0x6ca42ae6,0x92f63f59 }, /*?*/ }, // 0C80 3652 1573 cmpi.l #$36521573,D0
- { "hsf2", { 0x5a369ddd,0xfea3189c }, 0x100000 }, // 0838 0007 2000 btst #7,$2000
+ { "hsf2", { 0x5a369ddd,0xfea3189c }, 0x100000 }, // 0838 0007 2000 btst #7,$2000
{ "hsf2a", { 0xb8ed3630,0xaae30a3d }, 0x100000 }, // 0838 0007 2000 btst #7,$2000
{ "hsf2j", { 0x65d82fe0,0xdbb83e47 }, 0x100000 }, // 0838 0007 2000 btst #7,$2000
{ "gigawing", { 0xe52de290,0x1b60d780 }, 0x100000 }, // 0C81 1972 1027 cmpi.l #$19721027,D1
diff --git a/src/mame/machine/harddriv.c b/src/mame/machine/harddriv.c
index b82bc5ace2a..091abdab1c5 100644
--- a/src/mame/machine/harddriv.c
+++ b/src/mame/machine/harddriv.c
@@ -55,7 +55,7 @@ static void hd68k_update_interrupts(running_machine *machine);
MACHINE_START( harddriv )
{
harddriv_state *state = (harddriv_state *)machine->driver_data;
-
+
atarigen_init(machine);
/* predetermine memory regions */
diff --git a/src/mame/machine/neoprot.c b/src/mame/machine/neoprot.c
index fca2e47ce14..5b8b3308ecb 100644
--- a/src/mame/machine/neoprot.c
+++ b/src/mame/machine/neoprot.c
@@ -125,13 +125,13 @@ static WRITE16_HANDLER ( kof98_prot_w )
{
case 0x0090:
logerror ("%06x kof98 - protection 0x0090 old %04x %04x\n", cpu_get_pc(space->cpu), mem16[0x100/2], mem16[0x102/2]);
- mem16[0x100/2] = 0x00c2;
+ mem16[0x100/2] = 0x00c2;
mem16[0x102/2] = 0x00fd;
break;
case 0x00f0:
logerror ("%06x kof98 - protection 0x00f0 old %04x %04x\n", cpu_get_pc(space->cpu), mem16[0x100/2], mem16[0x102/2]);
- mem16[0x100/2] = 0x4e45;
+ mem16[0x100/2] = 0x4e45;
mem16[0x102/2] = 0x4f2d;
break;
diff --git a/src/mame/machine/pgmprot.c b/src/mame/machine/pgmprot.c
index 1b3613c02ba..96963ccbfca 100644
--- a/src/mame/machine/pgmprot.c
+++ b/src/mame/machine/pgmprot.c
@@ -282,7 +282,7 @@ static void asic3_compute_hold(running_machine *machine)
static const int modes[4] = { 1, 1, 3, 2 };
int mode = modes[input_port_read(machine, "Region") & 3];
- switch (mode)
+ switch (mode)
{
case 1:
state->asic3_hold =
@@ -317,7 +317,7 @@ READ16_HANDLER( pgm_asic3_r )
UINT8 res = 0;
/* region is supplied by the protection device */
- switch (state->asic3_reg)
+ switch (state->asic3_reg)
{
case 0x00: res = (state->asic3_latch[0] & 0xf7) | ((input_port_read(space->machine, "Region") << 3) & 0x08); break;
case 0x01: res = state->asic3_latch[1]; break;
@@ -363,14 +363,14 @@ WRITE16_HANDLER( pgm_asic3_w )
{
if (state->asic3_reg < 3)
state->asic3_latch[state->asic3_reg] = data << 1;
- else if (state->asic3_reg == 0xa0)
+ else if (state->asic3_reg == 0xa0)
state->asic3_hold = 0;
- else if (state->asic3_reg == 0x40)
+ else if (state->asic3_reg == 0x40)
{
state->asic3_h2 = state->asic3_h1;
state->asic3_h1 = data;
- }
- else if (state->asic3_reg == 0x48)
+ }
+ else if (state->asic3_reg == 0x48)
{
state->asic3_x = 0;
if (!(state->asic3_h2 & 0x0a))
@@ -381,8 +381,8 @@ WRITE16_HANDLER( pgm_asic3_w )
state->asic3_x |= 2;
if (!(state->asic3_h1 & 0x90))
state->asic3_x |= 1;
- }
- else if(state->asic3_reg >= 0x80 && state->asic3_reg <= 0x87)
+ }
+ else if(state->asic3_reg >= 0x80 && state->asic3_reg <= 0x87)
{
state->asic3_y = state->asic3_reg & 7;
state->asic3_z = data;
@@ -429,7 +429,7 @@ READ16_HANDLER( sango_protram_r )
// 4 = hong kong
// 5 = world
- if (offset == 4)
+ if (offset == 4)
return input_port_read(space->machine, "Region");
// otherwise it doesn't seem to use the ram for anything important, we return 0 to avoid test mode corruption
diff --git a/src/mame/machine/ticket.h b/src/mame/machine/ticket.h
index 128d2258533..6cdcd5416ed 100644
--- a/src/mame/machine/ticket.h
+++ b/src/mame/machine/ticket.h
@@ -24,7 +24,7 @@ struct _ticket_config
MDRV_DEVICE_ADD(_tag, TICKET_DISPENSER, _clock) \
MDRV_DEVICE_CONFIG_DATA32(ticket_config, motorhigh, _motorhigh) \
MDRV_DEVICE_CONFIG_DATA32(ticket_config, statushigh, _statushigh)
-
+
READ8_DEVICE_HANDLER( ticket_dispenser_r );
WRITE8_DEVICE_HANDLER( ticket_dispenser_w );
diff --git a/src/mame/mamedriv.c b/src/mame/mamedriv.c
index 4de75134d14..e9019fdce11 100644
--- a/src/mame/mamedriv.c
+++ b/src/mame/mamedriv.c
@@ -8284,6 +8284,7 @@ Other Sun games
DRIVER( kovshp )
DRIVER( oldsplus )
DRIVER( killbldp )
+ DRIVER( happy6 )
DRIVER( svg )
/* Spirit Tech. Corp. */
diff --git a/src/mame/video/atarig42.c b/src/mame/video/atarig42.c
index 22683b16e55..a14140fb2a0 100644
--- a/src/mame/video/atarig42.c
+++ b/src/mame/video/atarig42.c
@@ -108,7 +108,7 @@ VIDEO_START( atarig42 )
/* initialize the alphanumerics */
state->atarigen.alpha_tilemap = tilemap_create(machine, get_alpha_tile_info, tilemap_scan_rows, 8,8, 64,32);
tilemap_set_transparent_pen(state->atarigen.alpha_tilemap, 0);
-
+
/* save states */
state_save_register_global(machine, state->current_control);
state_save_register_global(machine, state->playfield_tile_bank);
diff --git a/src/mame/video/atarigt.c b/src/mame/video/atarigt.c
index f989bc2fb05..006574a1773 100644
--- a/src/mame/video/atarigt.c
+++ b/src/mame/video/atarigt.c
@@ -130,7 +130,7 @@ VIDEO_START( atarigt )
/* reset statics */
memset(state->colorram, 0, 0x80000);
-
+
/* save states */
state_save_register_global(machine, state->playfield_tile_bank);
state_save_register_global(machine, state->playfield_color_bank);
diff --git a/src/mame/video/atarigx2.c b/src/mame/video/atarigx2.c
index 88835503911..ff0e209933c 100644
--- a/src/mame/video/atarigx2.c
+++ b/src/mame/video/atarigx2.c
@@ -108,7 +108,7 @@ VIDEO_START( atarigx2 )
/* initialize the alphanumerics */
state->atarigen.alpha_tilemap = tilemap_create(machine, get_alpha_tile_info, tilemap_scan_rows, 8,8, 64,32);
tilemap_set_transparent_pen(state->atarigen.alpha_tilemap, 0);
-
+
/* save states */
state_save_register_global(machine, state->current_control);
state_save_register_global(machine, state->playfield_tile_bank);
diff --git a/src/mame/video/badlands.c b/src/mame/video/badlands.c
index fd2d0346fff..a0d5856f320 100644
--- a/src/mame/video/badlands.c
+++ b/src/mame/video/badlands.c
@@ -77,7 +77,7 @@ VIDEO_START( badlands )
/* initialize the motion objects */
atarimo_init(machine, 0, &modesc);
-
+
/* save states */
state_save_register_global(machine, state->playfield_tile_bank);
}
diff --git a/src/mame/video/combatsc.c b/src/mame/video/combatsc.c
index 5934f3e8a8b..aa4f8a0d0fc 100644
--- a/src/mame/video/combatsc.c
+++ b/src/mame/video/combatsc.c
@@ -119,19 +119,19 @@ static TILE_GET_INFO( get_tile_info0 )
int bank = 4 * ((state->vreg & 0x0f) - 1);
int number, color;
- if (bank < 0)
+ if (bank < 0)
bank = 0;
- if ((attributes & 0xb0) == 0)
+ if ((attributes & 0xb0) == 0)
bank = 0; /* text bank */
- if (attributes & 0x80)
+ if (attributes & 0x80)
bank += 1;
- if (attributes & 0x10)
+ if (attributes & 0x10)
bank += 2;
- if (attributes & 0x20)
+ if (attributes & 0x20)
bank += 4;
color = ((ctrl_6 & 0x10) * 2 + 16) + (attributes & 0x0f);
@@ -154,19 +154,19 @@ static TILE_GET_INFO( get_tile_info1 )
int bank = 4 * ((state->vreg >> 4) - 1);
int number, color;
- if (bank < 0)
+ if (bank < 0)
bank = 0;
- if ((attributes & 0xb0) == 0)
+ if ((attributes & 0xb0) == 0)
bank = 0; /* text bank */
- if (attributes & 0x80)
+ if (attributes & 0x80)
bank += 1;
- if (attributes & 0x10)
+ if (attributes & 0x10)
bank += 2;
- if (attributes & 0x20)
+ if (attributes & 0x20)
bank += 4;
color = ((ctrl_6 & 0x10) * 2 + 16 + 4 * 16) + (attributes & 0x0f);
@@ -203,19 +203,19 @@ static TILE_GET_INFO( get_tile_info0_bootleg )
int bank = 4 * ((state->vreg & 0x0f) - 1);
int number, pal, color;
- if (bank < 0)
+ if (bank < 0)
bank = 0;
- if ((attributes & 0xb0) == 0)
+ if ((attributes & 0xb0) == 0)
bank = 0; /* text bank */
- if (attributes & 0x80)
+ if (attributes & 0x80)
bank += 1;
- if (attributes & 0x10)
+ if (attributes & 0x10)
bank += 2;
- if (attributes & 0x20)
+ if (attributes & 0x20)
bank += 4;
pal = (bank == 0 || bank >= 0x1c || (attributes & 0x40)) ? 1 : 3;
@@ -236,19 +236,19 @@ static TILE_GET_INFO( get_tile_info1_bootleg )
int bank = 4*((state->vreg >> 4) - 1);
int number, pal, color;
- if (bank < 0)
+ if (bank < 0)
bank = 0;
- if ((attributes & 0xb0) == 0)
+ if ((attributes & 0xb0) == 0)
bank = 0; /* text bank */
- if (attributes & 0x80)
+ if (attributes & 0x80)
bank += 1;
- if (attributes & 0x10)
+ if (attributes & 0x10)
bank += 2;
- if (attributes & 0x20)
+ if (attributes & 0x20)
bank += 4;
pal = (bank == 0 || bank >= 0x1c || (attributes & 0x40)) ? 5 : 7;
@@ -527,7 +527,7 @@ static void bootleg_draw_sprites( running_machine *machine, bitmap_t *bitmap, co
finish = source;
source += 0x400;
limit = (0x3400 - limit) / 8;
- if (limit >= 0)
+ if (limit >= 0)
finish = source - limit * 8;
source -= 8;
diff --git a/src/mame/video/contra.c b/src/mame/video/contra.c
index 216edd61a9c..f6a32578c0a 100644
--- a/src/mame/video/contra.c
+++ b/src/mame/video/contra.c
@@ -308,9 +308,9 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta
int base_color = (k007121_ctrlram_r(k007121, 6) & 0x30) * 2;
const UINT8 *source;
- if (bank == 0)
+ if (bank == 0)
source = state->spriteram;
- else
+ else
source = state->spriteram_2;
k007121_sprites_draw(k007121, bitmap, cliprect, machine->gfx[bank], machine->colortable, source, base_color, 40, 0, -1);
diff --git a/src/mame/video/cps1.c b/src/mame/video/cps1.c
index 2a84df75375..13c8683de98 100644
--- a/src/mame/video/cps1.c
+++ b/src/mame/video/cps1.c
@@ -1629,7 +1629,7 @@ static void unshuffle( UINT64 *buf, int len )
int i;
UINT64 t;
- if (len == 2)
+ if (len == 2)
return;
assert(len % 4 == 0); /* must not happen */
@@ -1953,7 +1953,7 @@ static void cps1_update_transmasks( running_machine *machine )
/* Get transparency registers */
if (state->game_config->priority[i] != -1)
mask = state->cps_b_regs[state->game_config->priority[i] / 2] ^ 0xffff;
- else
+ else
mask = 0xffff; /* completely transparent if priority masks not defined (qad) */
tilemap_set_transmask(state->bg_tilemap[0], i, mask, 0x8000);
@@ -2038,7 +2038,7 @@ static VIDEO_START( cps )
state_save_register_global(machine, state->scanline1);
state_save_register_global(machine, state->scanline2);
state_save_register_global(machine, state->scancalls);
-#if 0
+#if 0
/* these do not need to be saved, because they are recovered from cps_a_regs in cps1_postload */
state_save_register_global(machine, state->scroll1x);
state_save_register_global(machine, state->scroll1y);
@@ -2399,7 +2399,7 @@ static UINT16 *cps2_objbase( running_machine *machine )
int baseptr;
baseptr = 0x7000;
- if (state->objram_bank & 1)
+ if (state->objram_bank & 1)
baseptr ^= 0x0080;
//popmessage("%04x %d", cps2_port(machine, CPS2_OBJ_BASE), state->objram_bank & 1);
@@ -2768,17 +2768,17 @@ VIDEO_UPDATE( cps1 )
{
cps1_render_layer(screen->machine, bitmap, cliprect, l0, 0);
- if (l1 == 0)
+ if (l1 == 0)
cps1_render_high_layer(screen->machine, bitmap, cliprect, l0); /* prepare mask for sprites */
cps1_render_layer(screen->machine, bitmap, cliprect, l1, 0);
- if (l2 == 0)
+ if (l2 == 0)
cps1_render_high_layer(screen->machine, bitmap, cliprect, l1); /* prepare mask for sprites */
cps1_render_layer(screen->machine, bitmap, cliprect, l2, 0);
- if (l3 == 0)
+ if (l3 == 0)
cps1_render_high_layer(screen->machine, bitmap, cliprect, l2); /* prepare mask for sprites */
cps1_render_layer(screen->machine, bitmap, cliprect, l3, 0);
diff --git a/src/mame/video/cvs.c b/src/mame/video/cvs.c
index 47508648d02..92014643bee 100644
--- a/src/mame/video/cvs.c
+++ b/src/mame/video/cvs.c
@@ -148,7 +148,7 @@ VIDEO_START( cvs )
bit1 = (~generator >> 17) & 1;
bit2 = (generator >> 5) & 1;
- if (bit1 ^ bit2)
+ if (bit1 ^ bit2)
generator |= 1;
if (((~generator >> 16) & 1) && (generator & 0xfe) == 0xfe)
diff --git a/src/mame/video/eprom.c b/src/mame/video/eprom.c
index 3ba214f3e3c..815ae5557d0 100644
--- a/src/mame/video/eprom.c
+++ b/src/mame/video/eprom.c
@@ -140,7 +140,7 @@ VIDEO_START( eprom )
/* initialize the alphanumerics */
state->atarigen.alpha_tilemap = tilemap_create(machine, get_alpha_tile_info, tilemap_scan_rows, 8,8, 64,32);
tilemap_set_transparent_pen(state->atarigen.alpha_tilemap, 0);
-
+
/* save states */
state_save_register_global(machine, state->screen_intensity);
state_save_register_global(machine, state->video_disable);
@@ -196,7 +196,7 @@ VIDEO_START( guts )
/* initialize the alphanumerics */
state->atarigen.alpha_tilemap = tilemap_create(machine, get_alpha_tile_info, tilemap_scan_rows, 8,8, 64,32);
tilemap_set_transparent_pen(state->atarigen.alpha_tilemap, 0);
-
+
/* save states */
state_save_register_global(machine, state->screen_intensity);
state_save_register_global(machine, state->video_disable);
diff --git a/src/mame/video/f1gp.c b/src/mame/video/f1gp.c
index a7eb6d89c0e..258dc98f763 100644
--- a/src/mame/video/f1gp.c
+++ b/src/mame/video/f1gp.c
@@ -55,7 +55,7 @@ VIDEO_START( f1gp )
state->zoomdata = (UINT16 *)memory_region(machine, "gfx4");
gfx_element_set_source(machine->gfx[3], (UINT8 *)state->zoomdata);
-// state_save_register_global_pointer(machine, state->zoomdata, memory_region_length(machine, "gfx4"));
+// state_save_register_global_pointer(machine, state->zoomdata, memory_region_length(machine, "gfx4"));
}
@@ -71,7 +71,7 @@ VIDEO_START( f1gpb )
state->zoomdata = (UINT16 *)memory_region(machine, "gfx4");
gfx_element_set_source(machine->gfx[3], (UINT8 *)state->zoomdata);
-// state_save_register_global_pointer(machine, state->zoomdata, memory_region_length(machine, "gfx4"));
+// state_save_register_global_pointer(machine, state->zoomdata, memory_region_length(machine, "gfx4"));
}
VIDEO_START( f1gp2 )
@@ -404,7 +404,7 @@ static void f1gp2_draw_sprites( running_machine *machine, bitmap_t *bitmap, cons
zoomx = 32 - zoomx;
zoomy = 32 - zoomy;
- if (state->spritelist[attr_start + 2] & 0x20ff)
+ if (state->spritelist[attr_start + 2] & 0x20ff)
color = mame_rand(machine);
for (y = 0; y <= ysize; y++)
diff --git a/src/mame/video/fastlane.c b/src/mame/video/fastlane.c
index 601238c0e39..291119bc6e9 100644
--- a/src/mame/video/fastlane.c
+++ b/src/mame/video/fastlane.c
@@ -37,7 +37,7 @@ static void set_pens( running_machine *machine )
colortable_palette_set_color(machine->colortable, i >> 1, color);
}
}
-
+
/***************************************************************************
diff --git a/src/mame/video/gauntlet.c b/src/mame/video/gauntlet.c
index 41a8760b343..8a1544a9307 100644
--- a/src/mame/video/gauntlet.c
+++ b/src/mame/video/gauntlet.c
@@ -104,7 +104,7 @@ VIDEO_START( gauntlet )
/* set up the base color for the playfield */
state->playfield_color_bank = state->vindctr2_screen_refresh ? 0 : 1;
-
+
/* save states */
state_save_register_global(machine, state->playfield_tile_bank);
state_save_register_global(machine, state->playfield_color_bank);
diff --git a/src/mame/video/gijoe.c b/src/mame/video/gijoe.c
index 425fc83c370..91df46b25c9 100644
--- a/src/mame/video/gijoe.c
+++ b/src/mame/video/gijoe.c
@@ -44,7 +44,7 @@ VIDEO_START( gijoe )
k056832_linemap_enable(k056832, 1);
- for (i = 0; i < 4; i++)
+ for (i = 0; i < 4; i++)
AVAC_occupancy[i] = 0;
AVAC_vrc = 0xffff;
@@ -84,8 +84,8 @@ VIDEO_UPDATE( gijoe )
if (vrc_mode)
{
- for (dirty = 0xf000; dirty; dirty >>= 4)
- if ((AVAC_vrc & dirty) != (vrc_new & dirty))
+ for (dirty = 0xf000; dirty; dirty >>= 4)
+ if ((AVAC_vrc & dirty) != (vrc_new & dirty))
mask |= dirty;
AVAC_vrc = vrc_new;
@@ -105,18 +105,18 @@ VIDEO_UPDATE( gijoe )
dirty = 0;
colorbase_new = k053251_get_palette_index(k053251, K053251_CI[i]);
- if (layer_colorbase[i] != colorbase_new)
- {
- layer_colorbase[i] = colorbase_new;
- dirty = 1;
+ if (layer_colorbase[i] != colorbase_new)
+ {
+ layer_colorbase[i] = colorbase_new;
+ dirty = 1;
}
- if (AVAC_occupancy[i] & mask)
+ if (AVAC_occupancy[i] & mask)
dirty = 1;
- if (dirty)
- {
- AVAC_occupancy[i] = 0;
- k056832_mark_plane_dirty(k056832, i);
+ if (dirty)
+ {
+ AVAC_occupancy[i] = 0;
+ k056832_mark_plane_dirty(k056832, i);
}
}
diff --git a/src/mame/video/hcastle.c b/src/mame/video/hcastle.c
index e4b53aba629..9d963f885f3 100644
--- a/src/mame/video/hcastle.c
+++ b/src/mame/video/hcastle.c
@@ -240,9 +240,9 @@ VIDEO_UPDATE( hcastle )
state->pf1_bankbase = 0x0000;
state->pf2_bankbase = 0x4000 * ((state->gfx_bank & 2) >> 1);
- if (ctrl_1_3 & 0x01)
+ if (ctrl_1_3 & 0x01)
state->pf1_bankbase += 0x2000;
- if (ctrl_2_3 & 0x01)
+ if (ctrl_2_3 & 0x01)
state->pf2_bankbase += 0x2000;
if (state->pf1_bankbase != state->old_pf1)
diff --git a/src/mame/video/hng64.c b/src/mame/video/hng64.c
index 667c01c62a6..9ba7a23ae42 100644
--- a/src/mame/video/hng64.c
+++ b/src/mame/video/hng64.c
@@ -33,7 +33,7 @@ UINT32 *hng64_tcram;
UINT8 hng64_screen_dis;
-// 3d display buffers
+// 3d display buffers
// (Temporarily global - someday they will live with the proper bit-depth in the memory map)
static float* depthBuffer3d;
static UINT32* colorBuffer3d;
@@ -1705,24 +1705,24 @@ static float uToF(UINT16 input);
static void setCameraTransformation(const UINT16* packet)
{
/*//////////////
- // PACKET FORMAT
- // [0] - 0001 ... ID
- // [1] - xxxx ... Extrinsic camera matrix
- // [2] - xxxx ... Extrinsic camera matrix
- // [3] - xxxx ... Extrinsic camera matrix
- // [4] - xxxx ... Extrinsic camera matrix
- // [5] - xxxx ... Extrinsic camera matrix
- // [6] - xxxx ... Extrinsic camera matrix
- // [7] - xxxx ... Extrinsic camera matrix
- // [8] - xxxx ... Extrinsic camera matrix
- // [9] - xxxx ... Extrinsic camera matrix
- // [10] - xxxx ... Extrinsic camera matrix
- // [11] - xxxx ... Extrinsic camera matrix
- // [12] - xxxx ... Extrinsic camera matrix
- // [13] - ???? ... ? Flips per-frame during fatfurwa 'HNG64'
- // [14] - ???? ... ? Could be some floating-point values during buriki 'door run'
- // [15] - ???? ... ? Same as 13 & 14
- ////////////*/
+ // PACKET FORMAT
+ // [0] - 0001 ... ID
+ // [1] - xxxx ... Extrinsic camera matrix
+ // [2] - xxxx ... Extrinsic camera matrix
+ // [3] - xxxx ... Extrinsic camera matrix
+ // [4] - xxxx ... Extrinsic camera matrix
+ // [5] - xxxx ... Extrinsic camera matrix
+ // [6] - xxxx ... Extrinsic camera matrix
+ // [7] - xxxx ... Extrinsic camera matrix
+ // [8] - xxxx ... Extrinsic camera matrix
+ // [9] - xxxx ... Extrinsic camera matrix
+ // [10] - xxxx ... Extrinsic camera matrix
+ // [11] - xxxx ... Extrinsic camera matrix
+ // [12] - xxxx ... Extrinsic camera matrix
+ // [13] - ???? ... ? Flips per-frame during fatfurwa 'HNG64'
+ // [14] - ???? ... ? Could be some floating-point values during buriki 'door run'
+ // [15] - ???? ... ? Same as 13 & 14
+ ////////////*/
// CAMERA TRANSFORMATION MATRIX
cameraMatrix[0] = uToF(packet[1]);
cameraMatrix[4] = uToF(packet[2]);
@@ -1743,31 +1743,31 @@ static void setCameraTransformation(const UINT16* packet)
cameraMatrix[13] = uToF(packet[11]);
cameraMatrix[14] = uToF(packet[12]);
cameraMatrix[15] = 1.0f;
-}
+}
// Operation 0011
// Palette / Model flags?
static void set3dFlags(const UINT16* packet)
{
/*//////////////
- // PACKET FORMAT
- // [0] - 0011 ... ID
- // [1] - ???? ...
- // [2] - ???? ...
- // [3] - ???? ...
- // [4] - ???? ...
- // [5] - ???? ...
- // [6] - ???? ... ? Flip & flop around like mad during fatfurwa intro
- // [7] - ???? ... ? Flip & flop around like mad during fatfurwa intro
- // [8] - xx?? ... Palette offset & ??
- // [9] - ???? ... ? Very much used - seem to bounce around when characters are on screen
- // [10] - ???? ... ? '' ''
- // [11] - ???? ... ? '' ''
- // [12] - ???? ... ? '' ''
- // [13] - ???? ... ? '' ''
- // [14] - ???? ... ? '' ''
- // [15] - ???? ... ? '' ''
- ////////////*/
+ // PACKET FORMAT
+ // [0] - 0011 ... ID
+ // [1] - ???? ...
+ // [2] - ???? ...
+ // [3] - ???? ...
+ // [4] - ???? ...
+ // [5] - ???? ...
+ // [6] - ???? ... ? Flip & flop around like mad during fatfurwa intro
+ // [7] - ???? ... ? Flip & flop around like mad during fatfurwa intro
+ // [8] - xx?? ... Palette offset & ??
+ // [9] - ???? ... ? Very much used - seem to bounce around when characters are on screen
+ // [10] - ???? ... ? '' ''
+ // [11] - ???? ... ? '' ''
+ // [12] - ???? ... ? '' ''
+ // [13] - ???? ... ? '' ''
+ // [14] - ???? ... ? '' ''
+ // [15] - ???? ... ? '' ''
+ ////////////*/
paletteState3d = (packet[8] & 0xff00) >> 8;
paletteState3d += ((hng64_3dregs[0x00/4] & 0x2000) >> 9); /* Palette is + 0x0800 in buriki. */
/* FIXME: Buriki One door colors in attract mode still aren't quite right, investigate... */
@@ -1778,24 +1778,24 @@ static void set3dFlags(const UINT16* packet)
static void setCameraProjectionMatrix(const UINT16* packet)
{
/*//////////////
- // PACKET FORMAT
- // [0] - 0012 ... ID
- // [1] - ???? ... ? Contains a value in buriki's 'how to play' - probably a projection window/offset.
- // [2] - ???? ... ? Contains a value in buriki's 'how to play' - probably a projection window/offset.
- // [3] - ???? ... ? Contains a value
- // [4] - ???? ... ? Contains a value in buriki
- // [5] - ???? ... ? Contains a value
- // [6] - xxxx ... camera projection near
- // [7] - xxxx ... camera projection far
- // [8] - ???? ... ? Contains a value
- // [9] - ???? ... ? Contains a value
- // [10] - xxxx ... camera projection right
- // [11] - xxxx ... camera projection left
- // [12] - xxxx ... camera projection top
- // [13] - xxxx ... camera projection bottom
- // [14] - ???? ... ? Gets data during buriki door-run
- // [15] - ???? ... ? Gets data during buriki door-run
- ////////////*/
+ // PACKET FORMAT
+ // [0] - 0012 ... ID
+ // [1] - ???? ... ? Contains a value in buriki's 'how to play' - probably a projection window/offset.
+ // [2] - ???? ... ? Contains a value in buriki's 'how to play' - probably a projection window/offset.
+ // [3] - ???? ... ? Contains a value
+ // [4] - ???? ... ? Contains a value in buriki
+ // [5] - ???? ... ? Contains a value
+ // [6] - xxxx ... camera projection near
+ // [7] - xxxx ... camera projection far
+ // [8] - ???? ... ? Contains a value
+ // [9] - ???? ... ? Contains a value
+ // [10] - xxxx ... camera projection right
+ // [11] - xxxx ... camera projection left
+ // [12] - xxxx ... camera projection top
+ // [13] - xxxx ... camera projection bottom
+ // [14] - ???? ... ? Gets data during buriki door-run
+ // [15] - ???? ... ? Gets data during buriki door-run
+ ////////////*/
// This packet changes when fatfurwa 'How to play' is on the screen.
// Not too much, but if this is right, the aspect ratio is different...
@@ -1836,31 +1836,31 @@ static void setCameraProjectionMatrix(const UINT16* packet)
void recoverPolygonBlock(running_machine* machine, const UINT16* packet, struct polygon* polys, int* numPolys)
{
/*//////////////
- // PACKET FORMAT
- // [0] - 0100 ... ID
- // [1] - xxxx ... Flags for sure (0118 for buriki characters,
- // 0010 for buriki door,
- // 0110 for fatfurwa hng64,
- // 0118|0108 for fatfurwa building intro,
- // 0118|0108 for fatfurwa fighters infight,
- // 0108->0118 for fatfurwa globe (transitions when players are selected,
- // 00d8 for segfaulting geo in xrally & roadedge)
- // (00!0 is thought to be for lighting maybe?)
- // [2] - xxxx ... offset into ROM
- // [3] - xxxx ... offset into ROM
- // [4] - xxxx ... Transformation matrix
- // [5] - xxxx ... Transformation matrix
- // [6] - xxxx ... Transformation matrix
- // [7] - xxxx ... Transformation matrix
- // [8] - xxxx ... Transformation matrix
- // [9] - xxxx ... Transformation matrix
- // [10] - xxxx ... Transformation matrix
- // [11] - xxxx ... Transformation matrix
- // [12] - xxxx ... Transformation matrix
- // [13] - ???? ... Transformation matrix
- // [14] - ???? ... Transformation matrix
- // [15] - ???? ... Transformation matrix
- ////////////*/
+ // PACKET FORMAT
+ // [0] - 0100 ... ID
+ // [1] - xxxx ... Flags for sure (0118 for buriki characters,
+ // 0010 for buriki door,
+ // 0110 for fatfurwa hng64,
+ // 0118|0108 for fatfurwa building intro,
+ // 0118|0108 for fatfurwa fighters infight,
+ // 0108->0118 for fatfurwa globe (transitions when players are selected,
+ // 00d8 for segfaulting geo in xrally & roadedge)
+ // (00!0 is thought to be for lighting maybe?)
+ // [2] - xxxx ... offset into ROM
+ // [3] - xxxx ... offset into ROM
+ // [4] - xxxx ... Transformation matrix
+ // [5] - xxxx ... Transformation matrix
+ // [6] - xxxx ... Transformation matrix
+ // [7] - xxxx ... Transformation matrix
+ // [8] - xxxx ... Transformation matrix
+ // [9] - xxxx ... Transformation matrix
+ // [10] - xxxx ... Transformation matrix
+ // [11] - xxxx ... Transformation matrix
+ // [12] - xxxx ... Transformation matrix
+ // [13] - ???? ... Transformation matrix
+ // [14] - ???? ... Transformation matrix
+ // [15] - ???? ... Transformation matrix
+ ////////////*/
int k, l, m;
UINT32 tempDWord;
@@ -1872,7 +1872,7 @@ void recoverPolygonBlock(running_machine* machine, const UINT16* packet, struct
UINT32 address[4];
UINT32 megaOffset;
float eyeCoords[4]; // ObjectCoords transformed by the modelViewMatrix
- // float clipCoords[4]; // EyeCoords transformed by the projectionMatrix
+ // float clipCoords[4]; // EyeCoords transformed by the projectionMatrix
float ndCoords[4]; // Normalized device coordinates/clipCoordinates (x/w, y/w, z/w)
float windowCoords[4]; // Mapped ndCoordinates to screen space
float cullRay[4];
@@ -1898,14 +1898,14 @@ void recoverPolygonBlock(running_machine* machine, const UINT16* packet, struct
// Debug - ajg
/*
- printf("%08x : ", tempDWord*3*2);
- for (k = 0; k < 7*3; k++)
- {
- printf("%04x ", threeDPointer[k]);
- if ((k % 3) == 2) printf(" ");
- }
- printf("\n");
- */
+ printf("%08x : ", tempDWord*3*2);
+ for (k = 0; k < 7*3; k++)
+ {
+ printf("%04x ", threeDPointer[k]);
+ if ((k % 3) == 2) printf(" ");
+ }
+ printf("\n");
+ */
//////////////////////////////////////
// THE OBJECT TRANSFORMATION MATRIX //
@@ -1935,30 +1935,30 @@ void recoverPolygonBlock(running_machine* machine, const UINT16* packet, struct
// EXTRACT DATA FROM THE ADDRESS POINTED TO IN THE FILE //
//////////////////////////////////////////////////////////
/*//////////////////////////////////////////////
- // DIRECTLY-POINTED-TO FORMAT (7 words x 3 ROMs)
- // [0] - lower word of sub-address 1
- // [1] - lower word of sub-address 2
- // [2] - upper word of all sub-addresses
- // [3] - lower word of sub-address 3
- // [4] - lower word of sub-address 4
- // [5] - ???? always 0 ????
- // [6] - number of triangles in sub-address 1 block
- // [7] - number of triangles in sub-address 2 block
- // [8] - ???? always 0 ????
- // [9] - number of triangles in sub-address 3 block
- // [10] - number of triangles in sub-address 4 block
- // [11] - ? definitely used.
- // [12] - ? definitely used.
- // [13] - ? definitely used.
- // [14] - ? definitely used.
- // [15] - ???? always 0 ????
- // [16] - ???? always 0 ????
- // [17] - ???? always 0 ????
- // [18] - ???? always 0 ????
- // [19] - ???? always 0 ????
- // [20] - ???? always 0 ????
- //////////////////////////////////////////////*/
-
+ // DIRECTLY-POINTED-TO FORMAT (7 words x 3 ROMs)
+ // [0] - lower word of sub-address 1
+ // [1] - lower word of sub-address 2
+ // [2] - upper word of all sub-addresses
+ // [3] - lower word of sub-address 3
+ // [4] - lower word of sub-address 4
+ // [5] - ???? always 0 ????
+ // [6] - number of triangles in sub-address 1 block
+ // [7] - number of triangles in sub-address 2 block
+ // [8] - ???? always 0 ????
+ // [9] - number of triangles in sub-address 3 block
+ // [10] - number of triangles in sub-address 4 block
+ // [11] - ? definitely used.
+ // [12] - ? definitely used.
+ // [13] - ? definitely used.
+ // [14] - ? definitely used.
+ // [15] - ???? always 0 ????
+ // [16] - ???? always 0 ????
+ // [17] - ???? always 0 ????
+ // [18] - ???? always 0 ????
+ // [19] - ???? always 0 ????
+ // [20] - ???? always 0 ????
+ //////////////////////////////////////////////*/
+
// There are 4 hunks per address.
address[0] = threeDPointer[0];
address[1] = threeDPointer[1];
@@ -2004,14 +2004,14 @@ void recoverPolygonBlock(running_machine* machine, const UINT16* packet, struct
// GATHER A SINGLE TRIANGLE'S INFORMATION //
////////////////////////////////////////////
/*/////////////////////////
- // SINGLE POLY CHUNK FORMAT
- // [0] ??-- - ???? unused ????
- // [0] --xx - chunk type
- // [1] x--- - 'texture type' (or UV-mapping style)?
- // [1] -??- - ???? '18' for untextured buildings in fatfurwa ????
- // [1] ---x - texture index
- // [2] ???? - used in fatfurwa 'hng64' & everywhere in roadedge
- /////////////////////////*/
+ // SINGLE POLY CHUNK FORMAT
+ // [0] ??-- - ???? unused ????
+ // [0] --xx - chunk type
+ // [1] x--- - 'texture type' (or UV-mapping style)?
+ // [1] -??- - ???? '18' for untextured buildings in fatfurwa ????
+ // [1] ---x - texture index
+ // [2] ???? - used in fatfurwa 'hng64' & everywhere in roadedge
+ /////////////////////////*/
UINT8 chunkLength = 0;
UINT8 chunkType = threeDPointer[0] & 0x00ff;
@@ -2022,8 +2022,8 @@ void recoverPolygonBlock(running_machine* machine, const UINT16* packet, struct
// Debug - ajg
//if ((threeDPointer[0] & 0xff00) != 0x0000)
//{
- // printf("!!! Doesn't appear to be a valid chunk !!!\n");
- // continue;
+ // printf("!!! Doesn't appear to be a valid chunk !!!\n");
+ // continue;
//}
// Get which texture this polygon refers to...
@@ -2049,16 +2049,16 @@ void recoverPolygonBlock(running_machine* machine, const UINT16* packet, struct
switch(chunkType)
{
/*/////////////////////////
- // CHUNK TYPE BITS - These are very likely incorrect.
- // x--- ---- - 1 = Has only 1 vertex (part of a triangle fan/strip)
- // -x-- ---- -
- // --x- ---- -
- // ---x ---- -
- // ---- x--- -
- // ---- -x-- - 1 = Has per-vert UVs
- // ---- --x- -
- // ---- ---x - 1 = Has per-vert normals
- /////////////////////////*/
+ // CHUNK TYPE BITS - These are very likely incorrect.
+ // x--- ---- - 1 = Has only 1 vertex (part of a triangle fan/strip)
+ // -x-- ---- -
+ // --x- ---- -
+ // ---x ---- -
+ // ---- x--- -
+ // ---- -x-- - 1 = Has per-vert UVs
+ // ---- --x- -
+ // ---- ---x - 1 = Has per-vert normals
+ /////////////////////////*/
// 33 word chunk, 3 vertices, per-vertex UVs & normals
case 0x05: // 0000 0101
@@ -2125,7 +2125,7 @@ void recoverPolygonBlock(running_machine* machine, const UINT16* packet, struct
polys[*numPolys].vert[m].light[1] = polys[*numPolys].vert[m].texCoords[1] * 255.0f;
polys[*numPolys].vert[m].light[2] = polys[*numPolys].vert[m].texCoords[2] * 255.0f;
}
-
+
// Redundantly called, but it works...
polys[*numPolys].faceNormal[0] = polys[*numPolys].vert[m].normal[0];
polys[*numPolys].faceNormal[1] = polys[*numPolys].vert[m].normal[1];
@@ -2219,79 +2219,79 @@ void recoverPolygonBlock(running_machine* machine, const UINT16* packet, struct
case 0x2e: // 0010 1110
/* There's something fishy about this guy - see 0x7a below. Very likely not fixed-length */
/*
- printf("0x2e : %08x\n", address[k]*3*2);
- for (m = 0; m < 37; m++)
+ printf("0x2e : %08x\n", address[k]*3*2);
+ for (m = 0; m < 37; m++)
printf("%04x ", threeDPointer[m]);
- printf("\n\n");
- */
+ printf("\n\n");
+ */
chunkLength = 36;
break;
/* This shouldn't exist. */
/* There's something funky going on with 0x2e - it's often well-behaved, except for
- when it "ends" with e67a. Maybe this chunkLength thing isn't where it's at?
- Luckily the 0x7a is always at the end of a series of 2 chunks (2e,7a) so ignoring
- it won't kill us for now. */
+ when it "ends" with e67a. Maybe this chunkLength thing isn't where it's at?
+ Luckily the 0x7a is always at the end of a series of 2 chunks (2e,7a) so ignoring
+ it won't kill us for now. */
case 0x7a: // 0111 1010
/*
- printf("0x7a : %08x (%d/%d)\n", mame_rand(machine), l, size[k]);
- for (m = 0; m < 100; m++)
+ printf("0x7a : %08x (%d/%d)\n", mame_rand(machine), l, size[k]);
+ for (m = 0; m < 100; m++)
printf("%04x ", threeDPointer[m]);
- printf("\n\n");
- */
+ printf("\n\n");
+ */
chunkLength = 0;
break;
case 0x24: // 0010 0100
/*
- printf("0x24 : %08x\n", address[k]*3*2);
- for (m = 0; m < 49; m++)
+ printf("0x24 : %08x\n", address[k]*3*2);
+ for (m = 0; m < 49; m++)
printf("%04x ", threeDPointer[m]);
- printf("\n\n");
- */
+ printf("\n\n");
+ */
chunkLength = 48;
break;
case 0xb6: // 1011 0110
/*
- printf("0xb6 : %08x\n", address[k]*3*2);
- for (m = 0; m < 13; m++)
+ printf("0xb6 : %08x\n", address[k]*3*2);
+ for (m = 0; m < 13; m++)
printf("%04x ", threeDPointer[m]);
- printf("\n\n");
- */
+ printf("\n\n");
+ */
chunkLength = 12;
break;
case 0x86: // 1000 0110
/* Very likely not fixed-length since it leads into c6 & d6 */
/*
- printf("0x86 : %08x\n", address[k]*3*2);
- for (m = 0; m < 13; m++)
+ printf("0x86 : %08x\n", address[k]*3*2);
+ for (m = 0; m < 13; m++)
printf("%04x ", threeDPointer[m]);
- printf("\n\n");
- */
+ printf("\n\n");
+ */
chunkLength = 12;
break;
/* Are c6 and d6 just insanely long? They aren't at the end of the numTris like 0x7a */
case 0xc6: // 1100 0110
/*
- printf("0xc6 : %08x (%d/%d)\n", address[k]*3*2, l, size[k]);
- for (m = 0; m < 100; m++)
+ printf("0xc6 : %08x (%d/%d)\n", address[k]*3*2, l, size[k]);
+ for (m = 0; m < 100; m++)
printf("%04x ", threeDPointer[m]);
- printf("\n\n");
- */
+ printf("\n\n");
+ */
chunkLength = 0;
break;
/* Are c6 and d6 just insanely long? They aren't at the end of numTris like 0x7a */
case 0xd6: // 1101 0110
/*
- printf("0xd6 : %08x (%d/%d)\n", address[k]*3*2, l, size[k]);
- for (m = 0; m < 100; m++)
+ printf("0xd6 : %08x (%d/%d)\n", address[k]*3*2, l, size[k]);
+ for (m = 0; m < 100; m++)
printf("%04x ", threeDPointer[m]);
- printf("\n\n");
- */
+ printf("\n\n");
+ */
chunkLength = 0;
break;
#endif
@@ -2323,22 +2323,22 @@ void recoverPolygonBlock(running_machine* machine, const UINT16* packet, struct
// BACKFACE CULL //
// EMPIRICAL EVIDENCE SEEMS TO SHOW THE HNG64 HARDWARE DOES NOT BACKFACE CULL //
/*
- float cullRay[4];
- float cullNorm[4];
+ float cullRay[4];
+ float cullNorm[4];
- // Cast a ray out of the camera towards the polygon's point in eyespace.
- vecmatmul4(cullRay, modelViewMatrix, polys[*numPolys].vert[0].worldCoords);
- normalize(cullRay);
- // Dot product that with the normal to see if you're negative...
- vecmatmul4(cullNorm, modelViewMatrix, polys[*numPolys].faceNormal);
+ // Cast a ray out of the camera towards the polygon's point in eyespace.
+ vecmatmul4(cullRay, modelViewMatrix, polys[*numPolys].vert[0].worldCoords);
+ normalize(cullRay);
+ // Dot product that with the normal to see if you're negative...
+ vecmatmul4(cullNorm, modelViewMatrix, polys[*numPolys].faceNormal);
- float result = vecDotProduct(cullRay, cullNorm);
+ float result = vecDotProduct(cullRay, cullNorm);
- if (result < 0.0f)
- polys[*numPolys].visible = 1;
- else
- polys[*numPolys].visible = 0;
- */
+ if (result < 0.0f)
+ polys[*numPolys].visible = 1;
+ else
+ polys[*numPolys].visible = 0;
+ */
// BEHIND-THE-CAMERA CULL //
vecmatmul4(cullRay, modelViewMatrix, polys[*numPolys].vert[0].worldCoords);
@@ -2388,16 +2388,16 @@ void recoverPolygonBlock(running_machine* machine, const UINT16* packet, struct
}
/*
- // DEBUG
- if (chunkLength == (9 << 1))
- {
- mame_printf_debug("Chunk : ");
- for (int a = 0; a < chunkLength; a+=2)
- mame_printf_debug("%.2x%.2x ", threeDPointer[a], threeDPointer[a+1]);
- mame_printf_debug("\n");
- }
- // END DEBUG
- */
+ // DEBUG
+ if (chunkLength == (9 << 1))
+ {
+ mame_printf_debug("Chunk : ");
+ for (int a = 0; a < chunkLength; a+=2)
+ mame_printf_debug("%.2x%.2x ", threeDPointer[a], threeDPointer[a+1]);
+ mame_printf_debug("\n");
+ }
+ // END DEBUG
+ */
// Advance to the next polygon chunk...
threeDPointer += chunkLength;
@@ -2529,7 +2529,7 @@ static void clear3d(running_machine *machine)
setIdentity(cameraMatrix);
}
-/* 3D/framebuffer video registers
+/* 3D/framebuffer video registers
* ------------------------------
*
* UINT32 | Bits | Use
@@ -2605,10 +2605,10 @@ static float uToF(UINT16 input)
return retVal;
/*
- if ((INT16)input < 0)
- retVal = (float)((INT16)input) / 32768.0f;
- else
- retVal = (float)((INT16)input) / 32767.0f;
+ if ((INT16)input < 0)
+ retVal = (float)((INT16)input) / 32768.0f;
+ else
+ retVal = (float)((INT16)input) / 32767.0f;
*/
}
diff --git a/src/mame/video/konicdev.c b/src/mame/video/konicdev.c
index 4df7e724025..62270862be6 100644
--- a/src/mame/video/konicdev.c
+++ b/src/mame/video/konicdev.c
@@ -1269,7 +1269,7 @@ static void deinterleave_gfx(running_machine *machine, const char *gfx_memory_re
/***************************************************************************/
typedef struct _k007121_state k007121_state ;
-struct _k007121_state
+struct _k007121_state
{
UINT8 ctrlram[8];
@@ -1374,7 +1374,7 @@ void k007121_sprites_draw( const device_config *device, bitmap_t *bitmap, const
const UINT8 *source, int base_color, int global_x_offset, int bank_base, UINT32 pri_mask )
{
k007121_state *k007121 = k007121_get_safe_token(device);
-// const gfx_element *gfx = gfxs[chip];
+// const gfx_element *gfx = gfxs[chip];
bitmap_t *priority_bitmap = gfx->machine->priority_bitmap;
int flipscreen = k007121->flipscreen;
int i, num, inc, offs[5];
@@ -1758,16 +1758,16 @@ INLINE void k007342_get_tile_info( const device_config *device, tile_data *tilei
flags);
}
-static TILE_GET_INFO_DEVICE( k007342_get_tile_info0 )
-{
+static TILE_GET_INFO_DEVICE( k007342_get_tile_info0 )
+{
k007342_state *k007342 = k007342_get_safe_token(device);
- k007342_get_tile_info(device, tileinfo, tile_index, 0, k007342->colorram_0, k007342->videoram_0);
+ k007342_get_tile_info(device, tileinfo, tile_index, 0, k007342->colorram_0, k007342->videoram_0);
}
-static TILE_GET_INFO_DEVICE( k007342_get_tile_info1 )
-{
+static TILE_GET_INFO_DEVICE( k007342_get_tile_info1 )
+{
k007342_state *k007342 = k007342_get_safe_token(device);
- k007342_get_tile_info(device, tileinfo, tile_index, 1, k007342->colorram_1, k007342->videoram_1);
+ k007342_get_tile_info(device, tileinfo, tile_index, 1, k007342->colorram_1, k007342->videoram_1);
}
@@ -1835,7 +1835,7 @@ struct _k007420_state
UINT8 *ram;
int banklimit;
- int flipscreen; // current code uses the 7342 flipscreen!!
+ int flipscreen; // current code uses the 7342 flipscreen!!
UINT8 regs[8]; // current code uses the 7342 regs!! (only [2])
k007420_callback callback;
@@ -1924,7 +1924,7 @@ void k007420_sprites_draw( const device_config *device, bitmap_t *bitmap, const
/* 0x080 = normal scale, 0x040 = double size, 0x100 half size */
zoom = k007420->ram[offs + 5] | ((k007420->ram[offs + 4] & 0x03) << 8);
- if (!zoom)
+ if (!zoom)
continue;
zoom = 0x10000 * 128 / zoom;
@@ -1960,19 +1960,19 @@ void k007420_sprites_draw( const device_config *device, bitmap_t *bitmap, const
int c = code;
sx = ox + 8 * x;
- if (flipx)
+ if (flipx)
c += xoffset[(w - 1 - x)];
- else
+ else
c += xoffset[x];
- if (flipy)
+ if (flipy)
c += yoffset[(h - 1 - y)];
- else
+ else
c += yoffset[y];
- if (c & bankmask)
- continue;
- else
+ if (c & bankmask)
+ continue;
+ else
c += bank;
drawgfx_transpen(bitmap,cliprect,gfx,
@@ -2004,19 +2004,19 @@ void k007420_sprites_draw( const device_config *device, bitmap_t *bitmap, const
sx = ox + ((zoom * x + (1<<12)) >> 13);
zw = (ox + ((zoom * (x + 1) + (1 << 12)) >> 13)) - sx;
- if (flipx)
+ if (flipx)
c += xoffset[(w - 1 - x)];
- else
+ else
c += xoffset[x];
- if (flipy)
+ if (flipy)
c += yoffset[(h - 1 - y)];
- else
+ else
c += yoffset[y];
- if (c & bankmask)
- continue;
- else
+ if (c & bankmask)
+ continue;
+ else
c += bank;
drawgfxzoom_transpen(bitmap,cliprect,gfx,
@@ -2178,7 +2178,7 @@ READ8_DEVICE_HANDLER( k052109_r )
bank |= (k052109->charrombank_2[(color & 0x0c) >> 2] >> 2); // Surprise Attack uses this 2nd bank in the rom test
- if (k052109->has_extra_video_ram)
+ if (k052109->has_extra_video_ram)
code |= color << 8; /* kludge for X-Men */
else
k052109->callback(device->machine, 0, bank, &code, &color, &flags, &priority);
@@ -2198,7 +2198,7 @@ WRITE8_DEVICE_HANDLER( k052109_w )
if ((offset & 0x1fff) < 0x1800) /* tilemap RAM */
{
- if (offset >= 0x4000)
+ if (offset >= 0x4000)
k052109->has_extra_video_ram = 1; /* kludge for X-Men */
k052109->ram[offset] = data;
@@ -2232,9 +2232,9 @@ WRITE8_DEVICE_HANDLER( k052109_w )
{
int dirty = 0;
- if (k052109->charrombank[0] != (data & 0x0f))
+ if (k052109->charrombank[0] != (data & 0x0f))
dirty |= 1;
- if (k052109->charrombank[1] != ((data >> 4) & 0x0f))
+ if (k052109->charrombank[1] != ((data >> 4) & 0x0f))
dirty |= 2;
if (dirty)
@@ -2278,10 +2278,10 @@ WRITE8_DEVICE_HANDLER( k052109_w )
{
int dirty = 0;
- if (k052109->charrombank[2] != (data & 0x0f))
+ if (k052109->charrombank[2] != (data & 0x0f))
dirty |= 1;
- if (k052109->charrombank[3] != ((data >> 4) & 0x0f))
+ if (k052109->charrombank[3] != ((data >> 4) & 0x0f))
dirty |= 2;
if (dirty)
@@ -2565,7 +2565,7 @@ INLINE void k052109_get_tile_info( const device_config *device, tile_data *tilei
int flags = 0;
int priority = 0;
int bank = k052109->charrombank[(color & 0x0c) >> 2];
- if (k052109->has_extra_video_ram)
+ if (k052109->has_extra_video_ram)
bank = (color & 0x0c) >> 2; /* kludge for X-Men */
color = (color & 0xf3) | ((bank & 0x03) << 2);
@@ -2576,11 +2576,11 @@ INLINE void k052109_get_tile_info( const device_config *device, tile_data *tilei
k052109->callback(device->machine, layer, bank, &code, &color, &flags, &priority);
/* if the callback set flip X but it is not enabled, turn it off */
- if (!(k052109->tileflip_enable & 1))
+ if (!(k052109->tileflip_enable & 1))
flags &= ~TILE_FLIPX;
/* if flip Y is enabled and the attribute but is set, turn it on */
- if (flipy && (k052109->tileflip_enable & 2))
+ if (flipy && (k052109->tileflip_enable & 2))
flags |= TILE_FLIPY;
SET_TILE_INFO_DEVICE(
@@ -2592,22 +2592,22 @@ INLINE void k052109_get_tile_info( const device_config *device, tile_data *tilei
tileinfo->category = priority;
}
-static TILE_GET_INFO_DEVICE( k052109_get_tile_info0 )
-{
+static TILE_GET_INFO_DEVICE( k052109_get_tile_info0 )
+{
k052109_state *k052109 = k052109_get_safe_token(device);
- k052109_get_tile_info(device, tileinfo, tile_index, 0, k052109->colorram_F, k052109->videoram_F, k052109->videoram2_F);
+ k052109_get_tile_info(device, tileinfo, tile_index, 0, k052109->colorram_F, k052109->videoram_F, k052109->videoram2_F);
}
-static TILE_GET_INFO_DEVICE( k052109_get_tile_info1 )
-{
+static TILE_GET_INFO_DEVICE( k052109_get_tile_info1 )
+{
k052109_state *k052109 = k052109_get_safe_token(device);
- k052109_get_tile_info(device, tileinfo, tile_index, 1, k052109->colorram_A, k052109->videoram_A, k052109->videoram2_A);
+ k052109_get_tile_info(device, tileinfo, tile_index, 1, k052109->colorram_A, k052109->videoram_A, k052109->videoram2_A);
}
-static TILE_GET_INFO_DEVICE( k052109_get_tile_info2 )
-{
+static TILE_GET_INFO_DEVICE( k052109_get_tile_info2 )
+{
k052109_state *k052109 = k052109_get_safe_token(device);
- k052109_get_tile_info(device, tileinfo, tile_index, 2, k052109->colorram_B, k052109->videoram_B, k052109->videoram2_B);
+ k052109_get_tile_info(device, tileinfo, tile_index, 2, k052109->colorram_B, k052109->videoram_B, k052109->videoram2_B);
}
@@ -2705,7 +2705,7 @@ static DEVICE_START( k052109 )
state_save_register_device_item_array(device, 0, k052109->dy);
state_save_register_device_item(device, 0, k052109->has_extra_video_ram);
-// state_save_register_postload(machine, k052109_tileflip_reset, NULL); // to be moved into the drivers
+// state_save_register_postload(machine, k052109_tileflip_reset, NULL); // to be moved into the drivers
}
static DEVICE_RESET( k052109 )
@@ -3000,7 +3000,7 @@ void k051960_sprites_draw( const device_config *device, bitmap_t *bitmap, const
static const int height[8] = { 1, 1, 2, 2, 2, 4, 4, 8 };
offs = sortedlist[pri_code];
- if (offs == -1)
+ if (offs == -1)
continue;
code = k051960->ram[offs + 2] + ((k051960->ram[offs + 1] & 0x1f) << 8);
@@ -3010,7 +3010,7 @@ void k051960_sprites_draw( const device_config *device, bitmap_t *bitmap, const
k051960->callback(device->machine, &code, &color, &pri, &shadow);
if (max_priority != -1)
- if (pri < min_priority || pri > max_priority)
+ if (pri < min_priority || pri > max_priority)
continue;
size = (k051960->ram[offs + 1] & 0xe0) >> 5;
@@ -3058,14 +3058,14 @@ void k051960_sprites_draw( const device_config *device, bitmap_t *bitmap, const
int c = code;
sx = ox + 16 * x;
- if (flipx)
+ if (flipx)
c += xoffset[(w - 1 - x)];
- else
+ else
c += xoffset[x];
- if (flipy)
+ if (flipy)
c += yoffset[(h - 1 - y)];
- else
+ else
c += yoffset[y];
if (max_priority == -1)
@@ -3101,14 +3101,14 @@ void k051960_sprites_draw( const device_config *device, bitmap_t *bitmap, const
sx = ox + ((zoomx * x + (1 << 11)) >> 12);
zw = (ox + ((zoomx * (x+1) + (1 << 11)) >> 12)) - sx;
- if (flipx)
+ if (flipx)
c += xoffset[(w - 1 - x)];
- else
+ else
c += xoffset[x];
- if (flipy)
+ if (flipy)
c += yoffset[(h - 1 - y)];
- else
+ else
c += yoffset[y];
if (max_priority == -1)
@@ -3299,7 +3299,7 @@ struct _k05324x_state
UINT8 regs[0x10]; // 053244
int dx, dy;
- int rombank; // 053244
+ int rombank; // 053244
int ramsize;
int z_rejection;
@@ -3378,7 +3378,7 @@ void k053245_clear_buffer( const device_config *device )
k05324x_state *k053245 = k05324x_get_safe_token(device);
int i, e;
- for (e = k053245->ramsize / 2, i = 0; i < e; i += 8)
+ for (e = k053245->ramsize / 2, i = 0; i < e; i += 8)
k053245->buffer[i] = 0;
}
@@ -3424,7 +3424,7 @@ WRITE8_DEVICE_HANDLER( k053244_w )
k053244->regs[offset] = data;
- switch(offset)
+ switch(offset)
{
case 0x05:
// if (data & 0xc8)
@@ -3433,7 +3433,7 @@ WRITE8_DEVICE_HANDLER( k053244_w )
/* bit 5 = unknown, Rollergames uses it */
// logerror("%s: write %02x to 053244 address 5\n", cpuexec_describe_context(device->machine), data);
break;
-
+
case 0x06:
k053245_update_buffer(device);
break;
@@ -3528,10 +3528,10 @@ void k053245_sprites_draw( const device_config *device, bitmap_t *bitmap, const
{
pri_code &= 0x007f;
- if (offs && pri_code == k053245->z_rejection)
+ if (offs && pri_code == k053245->z_rejection)
continue;
- if (sortedlist[pri_code] == -1)
+ if (sortedlist[pri_code] == -1)
sortedlist[pri_code] = offs;
}
}
@@ -3541,7 +3541,7 @@ void k053245_sprites_draw( const device_config *device, bitmap_t *bitmap, const
int ox, oy, color, code, size, w, h, x, y, flipx, flipy, mirrorx, mirrory, shadow, zoomx, zoomy, pri;
offs = sortedlist[pri_code];
- if (offs == -1)
+ if (offs == -1)
continue;
/* the following changes the sprite draw order from
@@ -3590,25 +3590,25 @@ void k053245_sprites_draw( const device_config *device, bitmap_t *bitmap, const
>0x40 reduce (0x80 = half size)
*/
zoomy = k053245->buffer[offs + 4];
- if (zoomy > 0x2000)
+ if (zoomy > 0x2000)
continue;
- if (zoomy)
+ if (zoomy)
zoomy = (0x400000 + zoomy / 2) / zoomy;
- else
+ else
zoomy = 2 * 0x400000;
if ((k053245->buffer[offs] & 0x4000) == 0)
{
zoomx = k053245->buffer[offs + 5];
- if (zoomx > 0x2000)
+ if (zoomx > 0x2000)
continue;
- if (zoomx)
+ if (zoomx)
zoomx = (0x400000 + zoomx / 2) / zoomx;
- else
+ else
zoomx = 2 * 0x400000;
// else zoomx = zoomy; /* workaround for TMNT2 */
}
- else
+ else
zoomx = zoomy;
ox = k053245->buffer[offs+3] + spriteoffsX;
@@ -3620,7 +3620,7 @@ void k053245_sprites_draw( const device_config *device, bitmap_t *bitmap, const
flipx = k053245->buffer[offs] & 0x1000;
flipy = k053245->buffer[offs] & 0x2000;
mirrorx = k053245->buffer[offs + 6] & 0x0100;
- if (mirrorx)
+ if (mirrorx)
flipx = 0; // documented and confirmed
mirrory = k053245->buffer[offs + 6] & 0x0200;
@@ -3629,13 +3629,13 @@ void k053245_sprites_draw( const device_config *device, bitmap_t *bitmap, const
if (flipscreenX)
{
ox = 512 - ox;
- if (!mirrorx)
+ if (!mirrorx)
flipx = !flipx;
}
if (flipscreenY)
{
oy = -oy;
- if (!mirrory)
+ if (!mirrory)
flipy = !flipy;
}
@@ -3782,10 +3782,10 @@ void k053245_sprites_draw_lethal( const device_config *device, bitmap_t *bitmap,
{
pri_code &= 0x007f;
- if (offs && pri_code == k053245->z_rejection)
+ if (offs && pri_code == k053245->z_rejection)
continue;
- if (sortedlist[pri_code] == -1)
+ if (sortedlist[pri_code] == -1)
sortedlist[pri_code] = offs;
}
}
@@ -3795,7 +3795,7 @@ void k053245_sprites_draw_lethal( const device_config *device, bitmap_t *bitmap,
int ox, oy, color, code, size, w, h, x, y, flipx, flipy, mirrorx, mirrory, shadow, zoomx, zoomy, pri;
offs = sortedlist[pri_code];
- if (offs == -1)
+ if (offs == -1)
continue;
/* the following changes the sprite draw order from
@@ -3844,24 +3844,24 @@ void k053245_sprites_draw_lethal( const device_config *device, bitmap_t *bitmap,
>0x40 reduce (0x80 = half size)
*/
zoomy = k053245->buffer[offs + 4];
- if (zoomy > 0x2000)
+ if (zoomy > 0x2000)
continue;
- if (zoomy)
+ if (zoomy)
zoomy = (0x400000 + zoomy / 2) / zoomy;
- else
+ else
zoomy = 2 * 0x400000;
if ((k053245->buffer[offs] & 0x4000) == 0)
{
zoomx = k053245->buffer[offs + 5];
- if (zoomx > 0x2000)
+ if (zoomx > 0x2000)
continue;
- if (zoomx)
+ if (zoomx)
zoomx = (0x400000 + zoomx / 2) / zoomx;
- else
+ else
zoomx = 2 * 0x400000;
// else zoomx = zoomy; /* workaround for TMNT2 */
}
- else
+ else
zoomx = zoomy;
ox = k053245->buffer[offs + 3] + spriteoffsX;
@@ -3873,7 +3873,7 @@ void k053245_sprites_draw_lethal( const device_config *device, bitmap_t *bitmap,
flipx = k053245->buffer[offs] & 0x1000;
flipy = k053245->buffer[offs] & 0x2000;
mirrorx = k053245->buffer[offs + 6] & 0x0100;
- if (mirrorx)
+ if (mirrorx)
flipx = 0; // documented and confirmed
mirrory = k053245->buffer[offs + 6] & 0x0200;
shadow = k053245->buffer[offs + 6] & 0x0080;
@@ -4157,16 +4157,16 @@ int k053247_get_dy( const device_config *device )
return k053247->dy;
}
-int k053246_read_register( const device_config *device, int regnum )
-{
+int k053246_read_register( const device_config *device, int regnum )
+{
k053247_state *k053247 = k053247_get_safe_token(device);
- return(k053247->Kx46_regs[regnum]);
+ return(k053247->Kx46_regs[regnum]);
}
-int k053247_read_register( const device_config *device, int regnum )
-{
+int k053247_read_register( const device_config *device, int regnum )
+{
k053247_state *k053247 = k053247_get_safe_token(device);
- return(k053247->Kx47_regs[regnum]);
+ return(k053247->Kx47_regs[regnum]);
}
void k053247_set_sprite_offs( const device_config *device, int offsx, int offsy )
@@ -4319,7 +4319,7 @@ READ16_DEVICE_HANDLER( k055673_GX6bpp_rom_word_r )
case 7:
return ROM[romofs + 2];
default:
-// LOG(("55673_rom_word_r: Unknown read offset %x (PC=%x)\n", offset, cpu_get_pc(space->cpu)));
+// LOG(("55673_rom_word_r: Unknown read offset %x (PC=%x)\n", offset, cpu_get_pc(space->cpu)));
break;
}
@@ -4335,13 +4335,13 @@ READ8_DEVICE_HANDLER( k053246_r )
addr = (k053246->Kx46_regs[6] << 17) | (k053246->Kx46_regs[7] << 9) | (k053246->Kx46_regs[4] << 1) | ((offset & 1) ^ 1);
addr &= memory_region_length(device->machine, k053246->memory_region) - 1;
-// if (VERBOSE)
-// popmessage("%04x: offset %02x addr %06x", cpu_get_pc(space->cpu), offset, addr);
+// if (VERBOSE)
+// popmessage("%04x: offset %02x addr %06x", cpu_get_pc(space->cpu), offset, addr);
return memory_region(device->machine, k053246->memory_region)[addr];
}
else
{
-// LOG(("%04x: read from unknown 053246 address %x\n", cpu_get_pc(space->cpu), offset));
+// LOG(("%04x: read from unknown 053246 address %x\n", cpu_get_pc(space->cpu), offset));
return 0;
}
}
@@ -4507,13 +4507,13 @@ void k053247_sprites_draw( const device_config *device, bitmap_t *bitmap, const
if (zcode == -1)
{
for (; offs < 0x800; offs += 8)
- if (k053246->ram[offs] & 0x8000)
+ if (k053246->ram[offs] & 0x8000)
sortedlist[count++] = offs;
}
else
{
for (; offs < 0x800; offs += 8)
- if ((k053246->ram[offs] & 0x8000) && ((k053246->ram[offs] & 0xff) != zcode))
+ if ((k053246->ram[offs] & 0x8000) && ((k053246->ram[offs] & 0xff) != zcode))
sortedlist[count++] = offs;
}
@@ -4532,11 +4532,11 @@ void k053247_sprites_draw( const device_config *device, bitmap_t *bitmap, const
{
temp = sortedlist[x];
code = k053246->ram[temp] & 0xff;
- if (zcode <= code)
- {
- zcode = code;
- sortedlist[x] = offs;
- sortedlist[y] = offs = temp;
+ if (zcode <= code)
+ {
+ zcode = code;
+ sortedlist[x] = offs;
+ sortedlist[y] = offs = temp;
}
}
}
@@ -4552,11 +4552,11 @@ void k053247_sprites_draw( const device_config *device, bitmap_t *bitmap, const
{
temp = sortedlist[x];
code = k053246->ram[temp] & 0xff;
- if (zcode >= code)
- {
- zcode = code;
- sortedlist[x] = offs;
- sortedlist[y] = offs = temp;
+ if (zcode >= code)
+ {
+ zcode = code;
+ sortedlist[x] = offs;
+ sortedlist[y] = offs = temp;
}
}
}
@@ -4607,23 +4607,23 @@ void k053247_sprites_draw( const device_config *device, bitmap_t *bitmap, const
>0x40 reduce (0x80 = half size)
*/
y = zoomy = k053246->ram[offs + 4] & 0x3ff;
- if (zoomy)
- zoomy = (0x400000 + (zoomy >> 1)) / zoomy;
- else
+ if (zoomy)
+ zoomy = (0x400000 + (zoomy >> 1)) / zoomy;
+ else
zoomy = 0x800000;
if (!(temp & 0x4000))
{
x = zoomx = k053246->ram[offs + 5] & 0x3ff;
- if (zoomx)
+ if (zoomx)
zoomx = (0x400000 + (zoomx >> 1)) / zoomx;
- else
+ else
zoomx = 0x800000;
}
- else
- {
- zoomx = zoomy;
- x = y;
+ else
+ {
+ zoomx = zoomy;
+ x = y;
}
// ************************************************************************************
@@ -4639,7 +4639,7 @@ void k053247_sprites_draw( const device_config *device, bitmap_t *bitmap, const
{
zoomx >>= 1; // Fix sprite width to HALF size
ox = (ox >> 1) + 1; // Fix sprite draw position
- if (flipscreenx)
+ if (flipscreenx)
ox += screen_width;
nozoom = 0;
}
@@ -4649,7 +4649,7 @@ void k053247_sprites_draw( const device_config *device, bitmap_t *bitmap, const
flipx = temp & 0x1000;
flipy = temp & 0x2000;
mirrorx = shadow & 0x4000;
- if (mirrorx)
+ if (mirrorx)
flipx = 0; // documented and confirmed
mirrory = shadow & 0x8000;
@@ -5123,7 +5123,7 @@ READ8_DEVICE_HANDLER( k051316_rom_r )
if ((k051316->ctrlram[0x0e] & 0x01) == 0)
{
int addr = offset + (k051316->ctrlram[0x0c] << 11) + (k051316->ctrlram[0x0d] << 19);
- if (k051316->bpp <= 4)
+ if (k051316->bpp <= 4)
addr /= 2;
addr &= memory_region_length(device->machine, k051316->memory_region) - 1;
@@ -5307,7 +5307,7 @@ static DEVICE_START( k051316 )
total = memory_region_length(machine, intf->gfx_memory_region) / 256;
decode_gfx(machine, intf->gfx_num, memory_region(machine, intf->gfx_memory_region), total, &charlayout7, 7);
break;
-
+
case 8:
total = memory_region_length(machine, intf->gfx_memory_region) / 256;
decode_gfx(machine, intf->gfx_num, memory_region(machine, intf->gfx_memory_region), total, &charlayout8, 8);
@@ -5474,10 +5474,10 @@ void k053936_zoom_draw( const device_config *device, bitmap_t *bitmap, const rec
incxx = (INT16)(lineaddr[2]);
incxy = (INT16)(lineaddr[3]);
- if (k053936->ctrl[0x06] & 0x8000)
+ if (k053936->ctrl[0x06] & 0x8000)
incxx *= 256;
- if (k053936->ctrl[0x06] & 0x0080)
+ if (k053936->ctrl[0x06] & 0x0080)
incxy *= 256;
startx -= k053936->offset[0] * incxx;
@@ -5503,16 +5503,16 @@ void k053936_zoom_draw( const device_config *device, bitmap_t *bitmap, const rec
incxx = (INT16)(k053936->ctrl[0x04]);
incxy = (INT16)(k053936->ctrl[0x05]);
- if (k053936->ctrl[0x06] & 0x4000)
- {
- incyx *= 256;
- incyy *= 256;
+ if (k053936->ctrl[0x06] & 0x4000)
+ {
+ incyx *= 256;
+ incyy *= 256;
}
- if (k053936->ctrl[0x06] & 0x0040)
- {
- incxx *= 256;
- incxy *= 256;
+ if (k053936->ctrl[0x06] & 0x0040)
+ {
+ incxx *= 256;
+ incxy *= 256;
}
startx -= k053936->offset[1] * incyx;
@@ -5775,16 +5775,16 @@ READ8_DEVICE_HANDLER( k054000_r )
//logerror("%04x: read 054000 address %02x\n", cpu_get_pc(space->cpu), offset);
- if (offset != 0x18)
+ if (offset != 0x18)
return 0;
Acx = (k054000->regs[0x01] << 16) | (k054000->regs[0x02] << 8) | k054000->regs[0x03];
Acy = (k054000->regs[0x09] << 16) | (k054000->regs[0x0a] << 8) | k054000->regs[0x0b];
/* TODO: this is a hack to make thndrx2 pass the startup check. It is certainly wrong. */
- if (k054000->regs[0x04] == 0xff)
+ if (k054000->regs[0x04] == 0xff)
Acx+=3;
- if (k054000->regs[0x0c] == 0xff)
+ if (k054000->regs[0x0c] == 0xff)
Acy+=3;
Aax = k054000->regs[0x06] + 1;
@@ -5887,11 +5887,11 @@ static int k051733_int_sqrt( UINT32 op )
while (step)
{
- if (i * i == op)
+ if (i * i == op)
return i;
- else if (i * i > op)
+ else if (i * i > op)
i -= step;
- else
+ else
i += step;
step >>= 1;
}
@@ -5917,26 +5917,26 @@ READ8_DEVICE_HANDLER( k051733_r )
switch (offset)
{
case 0x00:
- if (op2)
+ if (op2)
return (op1 / op2) >> 8;
- else
+ else
return 0xff;
case 0x01:
- if (op2)
+ if (op2)
return (op1 / op2) & 0xff;
- else
+ else
return 0xff;
/* this is completely unverified */
case 0x02:
- if (op2)
+ if (op2)
return (op1 % op2) >> 8;
- else
+ else
return 0xff;
case 0x03:
- if (op2)
+ if (op2)
return (op1 % op2) & 0xff;
- else
+ else
return 0xff;
case 0x04:
@@ -6213,7 +6213,7 @@ INLINE void k056832_get_tile_info( const device_config *device, tile_data *tilei
if (k056832->layer_association)
{
layer = k056832->layer_assoc_with_page[pageIndex];
- if (layer == -1)
+ if (layer == -1)
layer = 0; // use layer 0's palette info for unmapped pages
}
else
@@ -6913,7 +6913,7 @@ static int k056832_update_linemap( const device_config *device, bitmap_t *bitmap
{
k056832_state *k056832 = k056832_get_safe_token(device);
- if (k056832->page_tile_mode[page])
+ if (k056832->page_tile_mode[page])
return(0);
if (!k056832->linemap_enabled)
return(1);
@@ -6947,7 +6947,7 @@ static int k056832_update_linemap( const device_config *device, bitmap_t *bitmap
}
else
{
- if (!(dirty[0] | dirty[1] | dirty[2] | dirty[3] | dirty[4] | dirty[5] | dirty[6] | dirty[7]))
+ if (!(dirty[0] | dirty[1] | dirty[2] | dirty[3] | dirty[4] | dirty[5] | dirty[6] | dirty[7]))
return 0;
}
@@ -7078,8 +7078,8 @@ void k056832_tilemap_draw( const device_config *device, bitmap_t *bitmap, const
corr = k056832->regs[0x3c/2];
if (corr & 0x400)
corr |= 0xfffff800;
- }
- else
+ }
+ else
corr = 0;
dy += corr;
@@ -7091,8 +7091,8 @@ void k056832_tilemap_draw( const device_config *device, bitmap_t *bitmap, const
corr = k056832->regs[0x3a/2];
if (corr & 0x800)
corr |= 0xfffff000;
- }
- else
+ }
+ else
corr = 0;
corr -= k056832->layer_offs[layer][0];
@@ -7126,7 +7126,7 @@ void k056832_tilemap_draw( const device_config *device, bitmap_t *bitmap, const
ram16[0] = 0;
ram16[1] = dx;
}
- if (flipy)
+ if (flipy)
sdat_adv = -sdat_adv;
last_active = k056832->active_layer;
@@ -7186,10 +7186,10 @@ void k056832_tilemap_draw( const device_config *device, bitmap_t *bitmap, const
clipy = line_starty = 0;
line_endy = cliph;
sdat_start = cliph - 1;
- if (scrollmode == 2)
- {
- sdat_start &= ~7;
- line_starty -= ty & 7;
+ if (scrollmode == 2)
+ {
+ sdat_start &= ~7;
+ line_starty -= ty & 7;
}
}
}
@@ -7224,12 +7224,12 @@ void k056832_tilemap_draw( const device_config *device, bitmap_t *bitmap, const
if (k056832->layer_association)
{
- if (k056832->layer_assoc_with_page[pageIndex] != layer)
+ if (k056832->layer_assoc_with_page[pageIndex] != layer)
continue;
}
else
{
- if (k056832->layer_assoc_with_page[pageIndex] == -1)
+ if (k056832->layer_assoc_with_page[pageIndex] == -1)
continue;
k056832->active_layer = layer;
@@ -7245,11 +7245,11 @@ void k056832_tilemap_draw( const device_config *device, bitmap_t *bitmap, const
}
else
{
- if (!pageIndex)
+ if (!pageIndex)
k056832->active_layer = 0;
}
- if (k056832_update_linemap(device, bitmap, pageIndex, flags))
+ if (k056832_update_linemap(device, bitmap, pageIndex, flags))
continue;
tmap = k056832->tilemap[pageIndex];
@@ -7324,7 +7324,7 @@ void k056832_tilemap_draw( const device_config *device, bitmap_t *bitmap, const
// the tilemaps are 512 pixels across. Assume that if the limits were set as below that we
// want the tilemap to be drawn on the right hand side.. this is probably not the correct
// logic, but it works.
- if ((drawrect.min_x>0) && (drawrect.max_x==511))
+ if ((drawrect.min_x>0) && (drawrect.max_x==511))
drawrect.max_x=cliprect->max_x;
tilemap_set_scrollx(tmap, 0, dx);
@@ -7381,8 +7381,8 @@ void k056832_tilemap_draw_dj( const device_config *device, bitmap_t *bitmap, con
corr = k056832->regs[0x3c/2];
if (corr & 0x400)
corr |= 0xfffff800;
- }
- else
+ }
+ else
corr = 0;
dy += corr;
ay = (unsigned)(dy - k056832->layer_offs[layer][1]) % height;
@@ -7393,8 +7393,8 @@ void k056832_tilemap_draw_dj( const device_config *device, bitmap_t *bitmap, con
corr = k056832->regs[0x3a/2];
if (corr & 0x800)
corr |= 0xfffff000;
- }
- else
+ }
+ else
corr = 0;
corr -= k056832->layer_offs[layer][0];
@@ -7427,7 +7427,7 @@ void k056832_tilemap_draw_dj( const device_config *device, bitmap_t *bitmap, con
ram16[0] = 0;
ram16[1] = dx;
}
- if (flipy)
+ if (flipy)
sdat_adv = -sdat_adv;
last_active = k056832->active_layer;
@@ -7449,7 +7449,7 @@ void k056832_tilemap_draw_dj( const device_config *device, bitmap_t *bitmap, con
}
// cull off-screen tilemaps
- if ((sy + height <= ty) || (sy - height >= ty))
+ if ((sy + height <= ty) || (sy - height >= ty))
continue;
// switch frame of reference
@@ -7500,17 +7500,17 @@ void k056832_tilemap_draw_dj( const device_config *device, bitmap_t *bitmap, con
pageIndex = (((rowstart + need_wrap) & 3) << 2) + ((colstart + c) & 3);
else
pageIndex = (((rowstart + r) & 3) << 2) + ((colstart + c) & 3);
-
+
if (k056832->layer_association)
{
- if (k056832->layer_assoc_with_page[pageIndex] != layer)
+ if (k056832->layer_assoc_with_page[pageIndex] != layer)
continue;
}
else
{
if (k056832->layer_assoc_with_page[pageIndex] == -1) continue;
k056832->active_layer = layer;
- }
+ }
if (k056832->k055555 != NULL) // are we using k055555 palette?
{
@@ -7522,19 +7522,19 @@ void k056832_tilemap_draw_dj( const device_config *device, bitmap_t *bitmap, con
}
else
{
- if (!pageIndex)
+ if (!pageIndex)
k056832->active_layer = 0;
}
-
- if (k056832_update_linemap(device, bitmap, pageIndex, flags))
+
+ if (k056832_update_linemap(device, bitmap, pageIndex, flags))
continue;
-
+
tmap = k056832->tilemap[pageIndex];
tilemap_set_scrolly(tmap, 0, ay);
-
+
last_dx = 0x100000;
last_visible = 0;
-
+
for (sdat_walk = sdat_start, line_y = line_starty; line_y < line_endy; sdat_walk += sdat_adv, line_y += line_height)
{
dminy = line_y;
@@ -7549,7 +7549,7 @@ void k056832_tilemap_draw_dj( const device_config *device, bitmap_t *bitmap, con
drawrect.min_y = (dminy < cminy ) ? cminy : dminy;
drawrect.max_y = (dmaxy > cmaxy ) ? cmaxy : dmaxy;
- dx = ((int)p_scroll_data[sdat_offs] << 16 | (int)p_scroll_data[sdat_offs + 1]) + corr;
+ dx = ((int)p_scroll_data[sdat_offs] << 16 | (int)p_scroll_data[sdat_offs + 1]) + corr;
if (last_dx == dx) { if (last_visible) goto LINE_SHORTCIRCUIT; continue; }
last_dx = dx;
@@ -7558,7 +7558,7 @@ void k056832_tilemap_draw_dj( const device_config *device, bitmap_t *bitmap, con
{
//sx = (unsigned)dx % width;
sx = (unsigned)dx & (width-1);
-
+
//tx = c * K056832_PAGE_WIDTH;
tx = c << 9;
@@ -7587,11 +7587,11 @@ void k056832_tilemap_draw_dj( const device_config *device, bitmap_t *bitmap, con
else { clipw = K056832_PAGE_WIDTH + tx; clipx = -tx; }
}
}
- else
- {
- clipw = K056832_PAGE_WIDTH;
- clipx = 0;
- }
+ else
+ {
+ clipw = K056832_PAGE_WIDTH;
+ clipx = 0;
+ }
last_visible = 1;
@@ -7601,7 +7601,7 @@ void k056832_tilemap_draw_dj( const device_config *device, bitmap_t *bitmap, con
drawrect.min_x = (dminx < cminx ) ? cminx : dminx;
drawrect.max_x = (dmaxx > cmaxx ) ? cmaxx : dmaxx;
- tilemap_set_scrollx(tmap, 0, dx);
+ tilemap_set_scrollx(tmap, 0, dx);
LINE_SHORTCIRCUIT:
tilemap_draw(bitmap, &drawrect, tmap, flags, priority);
@@ -7678,7 +7678,7 @@ void k056832_postload( const device_config *device )
DEVICE INTERFACE
*****************************************************************************/
-/* TODO: understand which elements MUST be init here (to keep correct layer
+/* TODO: understand which elements MUST be init here (to keep correct layer
associations) and which ones can can be init at RESET, if any */
static DEVICE_START( k056832 )
{
@@ -7910,7 +7910,7 @@ static DEVICE_START( k056832 )
state_save_register_device_item(device, i, k056832->last_colorbase[i]);
}
-// state_save_register_postload(device->machine, k056832_postload, NULL);
+// state_save_register_postload(device->machine, k056832_postload, NULL);
}
/***************************************************************************/
@@ -8110,7 +8110,7 @@ void k054338_update_all_shadows( const device_config *device, int rushingheroes_
for (i = 0; i < 9; i++)
{
d = k054338->regs[K338_REG_SHAD1R + i] & 0x1ff;
- if (d >= 0x100)
+ if (d >= 0x100)
d -= 0x200;
k054338->shd_rgb[i] = d;
}
@@ -8184,11 +8184,11 @@ void k054338_fill_backcolor( const device_config *device, bitmap_t *bitmap, int
pal_ptr += BGC_CBLK << 9;
// single color output from PCU2
- if (!(BGC_SET & 2))
- {
- bgcolor = *pal_ptr;
- mode = 0;
- }
+ if (!(BGC_SET & 2))
+ {
+ bgcolor = *pal_ptr;
+ mode = 0;
+ }
else bgcolor = 0;
}
@@ -8199,10 +8199,10 @@ void k054338_fill_backcolor( const device_config *device, bitmap_t *bitmap, int
i = clipw = -clipw;
do
{
- do
- {
- dst_ptr[i] = dst_ptr[i+1] = dst_ptr[i+2] = dst_ptr[i+3] = bgcolor;
- }
+ do
+ {
+ dst_ptr[i] = dst_ptr[i+1] = dst_ptr[i+2] = dst_ptr[i+3] = bgcolor;
+ }
while (i += 4);
dst_ptr += dst_pitch;
@@ -8221,10 +8221,10 @@ void k054338_fill_backcolor( const device_config *device, bitmap_t *bitmap, int
i = clipw = -clipw;
do
{
- do
- {
- dst_ptr[i] = dst_ptr[i+1] = dst_ptr[i+2] = dst_ptr[i+3] = bgcolor;
- }
+ do
+ {
+ dst_ptr[i] = dst_ptr[i+1] = dst_ptr[i+2] = dst_ptr[i+3] = bgcolor;
+ }
while (i += 4);
dst_ptr += dst_pitch;
@@ -8266,7 +8266,7 @@ int k054338_set_alpha_level( const device_config *device, int pblend )
mixset = regs[K338_REG_PBLEND + (pblend >> 1 & 1)] >> (~pblend << 3 & 8);
mixlv = mixset & 0x1f;
- if (k054338->alphainverted)
+ if (k054338->alphainverted)
mixlv = 0x1f - mixlv;
if (!(mixset & 0x20))
@@ -8285,7 +8285,7 @@ int k054338_set_alpha_level( const device_config *device, int pblend )
}
// DUMMY
- if (mixlv && mixlv < 0x1f)
+ if (mixlv && mixlv < 0x1f)
mixlv = 0x10;
mixlv = (mixlv << 3) | (mixlv >> 2);
@@ -8395,7 +8395,7 @@ void k053250_dma( const device_config *device, int limiter )
current_frame = video_screen_get_frame_number(k053250->screen);
last_frame = k053250->frame;
- if (limiter && current_frame == last_frame)
+ if (limiter && current_frame == last_frame)
return; // make sure we only do DMA transfer once per frame
k053250->frame = current_frame;
@@ -8410,7 +8410,7 @@ WRITE16_DEVICE_HANDLER( k053250_w )
if (ACCESSING_BITS_0_7)
{
// start LVC DMA transfer at the falling edge of control register's bit1
- if (offset == 4 && !(data & 2) && (k053250->regs[4] & 2))
+ if (offset == 4 && !(data & 2) && (k053250->regs[4] & 2))
k053250_dma(device, 1);
k053250->regs[offset] = data;
@@ -8962,52 +8962,52 @@ static DEVICE_RESET( k053252 )
// debug handlers
-READ16_DEVICE_HANDLER( k056832_word_r )
-{
+READ16_DEVICE_HANDLER( k056832_word_r )
+{
k056832_state *k056832 = k056832_get_safe_token(device);
- return (k056832->regs[offset]);
+ return (k056832->regs[offset]);
} // VACSET
-READ16_DEVICE_HANDLER( k056832_b_word_r )
-{
+READ16_DEVICE_HANDLER( k056832_b_word_r )
+{
k056832_state *k056832 = k056832_get_safe_token(device);
- return (k056832->regsb[offset]);
+ return (k056832->regsb[offset]);
} // VSCCS (board dependent)
-READ16_DEVICE_HANDLER( k053246_reg_word_r )
-{
+READ16_DEVICE_HANDLER( k053246_reg_word_r )
+{
k053247_state *k053247 = k053247_get_safe_token(device);
- return(k053247->Kx46_regs[offset * 2] << 8 | k053247->Kx46_regs[offset * 2 + 1]);
+ return(k053247->Kx46_regs[offset * 2] << 8 | k053247->Kx46_regs[offset * 2 + 1]);
} // OBJSET1
-READ16_DEVICE_HANDLER( k053247_reg_word_r )
-{
+READ16_DEVICE_HANDLER( k053247_reg_word_r )
+{
k053247_state *k053247 = k053247_get_safe_token(device);
- return(k053247->Kx47_regs[offset]);
+ return(k053247->Kx47_regs[offset]);
} // OBJSET2
-READ16_DEVICE_HANDLER( k054338_word_r )
-{
+READ16_DEVICE_HANDLER( k054338_word_r )
+{
k054338_state *k054338 = k054338_get_safe_token(device);
- return(k054338->regs[offset]);
+ return(k054338->regs[offset]);
} // CLTC
-READ16_DEVICE_HANDLER( k053251_lsb_r )
-{
+READ16_DEVICE_HANDLER( k053251_lsb_r )
+{
k053251_state *k053251 = k053251_get_safe_token(device);
- return(k053251->ram[offset]);
+ return(k053251->ram[offset]);
} // PCU1
-READ16_DEVICE_HANDLER( k053251_msb_r )
-{
+READ16_DEVICE_HANDLER( k053251_msb_r )
+{
k053251_state *k053251 = k053251_get_safe_token(device);
- return(k053251->ram[offset] << 8);
+ return(k053251->ram[offset] << 8);
} // PCU1
-READ16_DEVICE_HANDLER( k055555_word_r )
-{
+READ16_DEVICE_HANDLER( k055555_word_r )
+{
k055555_state *k055555 = k055555_get_safe_token(device);
- return(k055555->regs[offset] << 8);
+ return(k055555->regs[offset] << 8);
} // PCU2
READ32_DEVICE_HANDLER( k056832_long_r )
@@ -9028,10 +9028,10 @@ READ32_DEVICE_HANDLER( k055555_long_r )
return (k055555_word_r(device, offset + 1, 0xffff) | k055555_word_r(device, offset, 0xffff) << 16);
}
-READ16_DEVICE_HANDLER( k053244_reg_word_r )
-{
+READ16_DEVICE_HANDLER( k053244_reg_word_r )
+{
k05324x_state *k053244 = k05324x_get_safe_token(device);
- return(k053244->regs[offset * 2] << 8 | k053244->regs[offset * 2 + 1]);
+ return(k053244->regs[offset * 2] << 8 | k053244->regs[offset * 2 + 1]);
}
/*************************************************************************/
diff --git a/src/mame/video/konicdev.h b/src/mame/video/konicdev.h
index e5a5065b3df..3c0b16628a4 100644
--- a/src/mame/video/konicdev.h
+++ b/src/mame/video/konicdev.h
@@ -100,7 +100,7 @@ struct _k056832_interface
{
const char *gfx_memory_region;
int gfx_num;
- int bpp;
+ int bpp;
int big;
int djmain_hack;
int deinterleave;
@@ -271,8 +271,8 @@ DEVICE_GET_INFO( k053252 );
HELPERS FOR DRIVERS
***************************************************************************/
-enum
-{
+enum
+{
KONAMI_ROM_DEINTERLEAVE_NONE = 0,
KONAMI_ROM_DEINTERLEAVE_2,
KONAMI_ROM_DEINTERLEAVE_2_HALF,
@@ -520,13 +520,13 @@ int k053251_get_tmap_dirty(const device_config *device, int tmap_num);
void k053251_set_tmap_dirty(const device_config *device, int tmap_num, int data);
void k053251_postload_reset_indexes(const device_config *device);
-enum
-{
+enum
+{
K053251_CI0 = 0,
K053251_CI1,
K053251_CI2,
K053251_CI3,
- K053251_CI4
+ K053251_CI4
};
/** Konami 054000 **/
diff --git a/src/mame/video/labyrunr.c b/src/mame/video/labyrunr.c
index 3877ac3e7e5..39e3ccaa47d 100644
--- a/src/mame/video/labyrunr.c
+++ b/src/mame/video/labyrunr.c
@@ -277,11 +277,11 @@ VIDEO_UPDATE( labyrunr )
tilemap_set_scrollx(state->layer1, 0, ctrl_0 - 40);
tilemap_draw(bitmap, &finalclip0, state->layer0, 0, 1);
- if(use_clip3[0])
+ if(use_clip3[0])
tilemap_draw(bitmap, &finalclip3, state->layer0, 0, 1);
tilemap_draw(bitmap, &finalclip1, state->layer1, 0, 1);
- if(use_clip3[1])
+ if(use_clip3[1])
tilemap_draw(bitmap, &finalclip3, state->layer1, 0, 1);
k007121_sprites_draw(state->k007121, bitmap, cliprect, screen->machine->gfx[0], screen->machine->colortable, state->spriteram, (k007121_ctrlram_r(state->k007121, 6) & 0x30) * 2,40,0,(k007121_ctrlram_r(state->k007121, 3) & 0x40) >> 5);
diff --git a/src/mame/video/metro.c b/src/mame/video/metro.c
index 84c3eb73c90..0de0b902b06 100644
--- a/src/mame/video/metro.c
+++ b/src/mame/video/metro.c
@@ -934,7 +934,7 @@ if (input_code_pressed(screen->machine, KEYCODE_Z))
}
#endif
- if (has_zoom)
+ if (has_zoom)
k053936_zoom_draw(k053936, bitmap, cliprect, metro_K053936_tilemap, 0, 0, 1);
for (pri = 3; pri >= 0; pri--)
diff --git a/src/mame/video/mitchell.c b/src/mame/video/mitchell.c
index f9137bfbb9a..c2a4dae3e2b 100644
--- a/src/mame/video/mitchell.c
+++ b/src/mame/video/mitchell.c
@@ -110,9 +110,9 @@ WRITE8_HANDLER( pang_videoram_w )
{
mitchell_state *state = (mitchell_state *)space->machine->driver_data;
- if (state->video_bank)
+ if (state->video_bank)
mgakuen_objram_w(space, offset, data);
- else
+ else
mgakuen_videoram_w(space, offset, data);
}
@@ -120,9 +120,9 @@ READ8_HANDLER( pang_videoram_r )
{
mitchell_state *state = (mitchell_state *)space->machine->driver_data;
- if (state->video_bank)
+ if (state->video_bank)
return mgakuen_objram_r(space, offset);
- else
+ else
return mgakuen_videoram_r(space, offset);
}
@@ -176,7 +176,7 @@ logerror("PC %04x: pang_gfxctrl_w %02x\n",cpu_get_pc(space->cpu),data);
/* bit 3 is unknown (used, e.g. marukin pulses it on the title screen) */
/* bit 4 selects OKI M6295 bank */
- if (state->oki != NULL && sound_get_type(state->oki) == SOUND_OKIM6295)
+ if (state->oki != NULL && sound_get_type(state->oki) == SOUND_OKIM6295)
okim6295_set_bank_base(state->oki, (data & 0x10) ? 0x40000 : 0x00000);
/* bit 5 is palette RAM bank selector (doesn't apply to mgakuen) */
@@ -228,9 +228,9 @@ WRITE8_HANDLER( pang_paletteram_w )
{
mitchell_state *state = (mitchell_state *)space->machine->driver_data;
- if (state->paletteram_bank)
+ if (state->paletteram_bank)
paletteram_xxxxRRRRGGGGBBBB_le_w(space, offset + 0x800, data);
- else
+ else
paletteram_xxxxRRRRGGGGBBBB_le_w(space, offset, data);
}
@@ -238,7 +238,7 @@ READ8_HANDLER( pang_paletteram_r )
{
mitchell_state *state = (mitchell_state *)space->machine->driver_data;
- if (state->paletteram_bank)
+ if (state->paletteram_bank)
return space->machine->generic.paletteram.u8[offset + 0x800];
return space->machine->generic.paletteram.u8[offset];
diff --git a/src/mame/video/moo.c b/src/mame/video/moo.c
index 3d1cfa94845..1a5efd8f140 100644
--- a/src/mame/video/moo.c
+++ b/src/mame/video/moo.c
@@ -119,7 +119,7 @@ VIDEO_UPDATE(moo)
dirty = 1;
}
}
- if (dirty)
+ if (dirty)
k056832_mark_all_tmaps_dirty(k056832);
}
diff --git a/src/mame/video/n64.c b/src/mame/video/n64.c
index 7ad3ce6c100..5f892628437 100644
--- a/src/mame/video/n64.c
+++ b/src/mame/video/n64.c
@@ -783,36 +783,36 @@ VIDEO_UPDATE(n64)
//vibuffering = 0; // Disabled for now
/*
- if (vibuffering && ((n64_vi_control & 3) == 2))
- {
- if (frame_buffer)
- {
- for (j=0; j < vres; j++)
- {
- for (i=0; i < hres; i++)
- {
- UINT16 pix;
- pix = frame_buffer[pixels ^ WORD_ADDR_XOR];
- curpixel_cvg = ((pix & 1) << 2) | (hidden_buffer[pixels ^ BYTE_ADDR_XOR] & 3); // Reuse of this variable
- if (curpixel_cvg < 7 && i > 1 && j > 1 && i < (hres - 2) && j < (vres - 2) && fsaa)
- {
- newc = video_filter16(&frame_buffer[pixels ^ WORD_ADDR_XOR], &hidden_buffer[pixels ^ BYTE_ADDR_XOR], n64_vi_width);
- ViBuffer[i][j] = newc;
- }
- else
- {
- newc.i.r = ((pix >> 8) & 0xf8) | (pix >> 13);
- newc.i.g = ((pix >> 3) & 0xf8) | ((pix >> 8) & 0x07);
- newc.i.b = ((pix << 2) & 0xf8) | ((pix >> 3) & 0x07);
- ViBuffer[i][j] = newc;
- }
- pixels++;
- }
- pixels += invisiblewidth;
- }
- }
- }
- */
+ if (vibuffering && ((n64_vi_control & 3) == 2))
+ {
+ if (frame_buffer)
+ {
+ for (j=0; j < vres; j++)
+ {
+ for (i=0; i < hres; i++)
+ {
+ UINT16 pix;
+ pix = frame_buffer[pixels ^ WORD_ADDR_XOR];
+ curpixel_cvg = ((pix & 1) << 2) | (hidden_buffer[pixels ^ BYTE_ADDR_XOR] & 3); // Reuse of this variable
+ if (curpixel_cvg < 7 && i > 1 && j > 1 && i < (hres - 2) && j < (vres - 2) && fsaa)
+ {
+ newc = video_filter16(&frame_buffer[pixels ^ WORD_ADDR_XOR], &hidden_buffer[pixels ^ BYTE_ADDR_XOR], n64_vi_width);
+ ViBuffer[i][j] = newc;
+ }
+ else
+ {
+ newc.i.r = ((pix >> 8) & 0xf8) | (pix >> 13);
+ newc.i.g = ((pix >> 3) & 0xf8) | ((pix >> 8) & 0x07);
+ newc.i.b = ((pix << 2) & 0xf8) | ((pix >> 3) & 0x07);
+ ViBuffer[i][j] = newc;
+ }
+ pixels++;
+ }
+ pixels += invisiblewidth;
+ }
+ }
+ }
+ */
if (n64_vi_blank)
{
@@ -1301,12 +1301,12 @@ static void fill_rectangle_16bit(RECTANGLE *rect)
#define XOR_SWAP_DWORD 1
/*
- UINT32 twidth = tile[tilenum].line;
- UINT32 tbase = tile[tilenum].tmem;
- UINT32 tpal = tile[tilenum].palette & 0xf;
+ UINT32 twidth = tile[tilenum].line;
+ UINT32 tbase = tile[tilenum].tmem;
+ UINT32 tpal = tile[tilenum].palette & 0xf;
- if (t < 0) t = 0;
- if (s < 0) s = 0;
+ if (t < 0) t = 0;
+ if (s < 0) s = 0;
*/
static INT32 tbase;
@@ -2848,454 +2848,454 @@ static void render_spans_32(int start, int end, TILE* tex_tile, int shade, int t
/*
static void triangle(UINT32 w1, UINT32 w2, int shade, int texture, int zbuffer)
{
- int j;
- int xleft, xright, xleft_inc, xright_inc;
- int xstart, xend;
- int r = 0, g = 0, b = 0, a = 0, z = 0, s = 0, t = 0, w = 0;
- int dr, dg, db, da;
- int drdx = 0, dgdx = 0, dbdx = 0, dadx = 0, dzdx = 0, dsdx = 0, dtdx = 0, dwdx = 0;
- int drdy = 0, dgdy = 0, dbdy = 0, dady = 0, dzdy = 0, dsdy = 0, dtdy = 0, dwdy = 0;
- int drde = 0, dgde = 0, dbde = 0, dade = 0, dzde = 0, dsde = 0, dtde = 0, dwde = 0;
- int tilenum;
- int flip = (w1 & 0x800000) ? 1 : 0;
-
- INT32 yl, ym, yh;
- INT32 xl, xm, xh;
- INT32 dxldy, dxhdy, dxmdy;
- int dzdy_dz, dzdx_dz;
- int dsdylod, dtdylod;
- UINT32 w3, w4, w5, w6, w7, w8;
-
- int k = 0;
-
- INT32 limcvg = 0;
- INT32 startcvg = 0;
+ int j;
+ int xleft, xright, xleft_inc, xright_inc;
+ int xstart, xend;
+ int r = 0, g = 0, b = 0, a = 0, z = 0, s = 0, t = 0, w = 0;
+ int dr, dg, db, da;
+ int drdx = 0, dgdx = 0, dbdx = 0, dadx = 0, dzdx = 0, dsdx = 0, dtdx = 0, dwdx = 0;
+ int drdy = 0, dgdy = 0, dbdy = 0, dady = 0, dzdy = 0, dsdy = 0, dtdy = 0, dwdy = 0;
+ int drde = 0, dgde = 0, dbde = 0, dade = 0, dzde = 0, dsde = 0, dtde = 0, dwde = 0;
+ int tilenum;
+ int flip = (w1 & 0x800000) ? 1 : 0;
+
+ INT32 yl, ym, yh;
+ INT32 xl, xm, xh;
+ INT32 dxldy, dxhdy, dxmdy;
+ int dzdy_dz, dzdx_dz;
+ int dsdylod, dtdylod;
+ UINT32 w3, w4, w5, w6, w7, w8;
+
+ int k = 0;
+
+ INT32 limcvg = 0;
+ INT32 startcvg = 0;
+
+ int sign_dxldy = 0;
+ int sign_dxmdy = 0;
+ int samesign = 0;
+
+ int dsdiff = 0, dtdiff = 0, dwdiff = 0, drdiff = 0, dgdiff = 0, dbdiff = 0, dadiff = 0, dzdiff = 0;
+ int sign_dxhdy = 0;
+
+ int dsdeh = 0, dtdeh = 0, dwdeh = 0, drdeh = 0, dgdeh = 0, dbdeh = 0, dadeh = 0, dzdeh = 0, dsdyh = 0, dtdyh = 0, dwdyh = 0, drdyh = 0, dgdyh = 0, dbdyh = 0, dadyh = 0, dzdyh = 0;
+ int do_offset = 0;
+
+ int xfrac = 0;
+ int dseoff = 0, dteoff = 0, dweoff = 0, dreoff = 0, dgeoff = 0, dbeoff = 0, daeoff = 0, dzeoff = 0;
+
+ int dsdxh = 0, dtdxh = 0, dwdxh = 0, drdxh = 0, dgdxh = 0, dbdxh = 0, dadxh = 0, dzdxh = 0;
+
+ int m_inc;
+ UINT32 min=0, max=3;
+ INT32 maxxmx = 0, minxmx = 0, maxxhx = 0, minxhx = 0;
+
+ int spix = 0; // Current subpixel
+ int ycur;
+ int ylfar;
+ int ldflag;
+ int yhpix;
+ int ympix;
+ int ylpix;
+
+ int shade_base = rdp_cmd_cur + 8;
+ int texture_base = rdp_cmd_cur + 8;
+ int zbuffer_base = rdp_cmd_cur + 8;
+
+ if (shade)
+ {
+ texture_base += 16;
+ zbuffer_base += 16;
+ }
+ if (texture)
+ {
+ zbuffer_base += 16;
+ }
- int sign_dxldy = 0;
- int sign_dxmdy = 0;
- int samesign = 0;
+ w3 = rdp_cmd_data[rdp_cmd_cur+2];
+ w4 = rdp_cmd_data[rdp_cmd_cur+3];
+ w5 = rdp_cmd_data[rdp_cmd_cur+4];
+ w6 = rdp_cmd_data[rdp_cmd_cur+5];
+ w7 = rdp_cmd_data[rdp_cmd_cur+6];
+ w8 = rdp_cmd_data[rdp_cmd_cur+7];
+
+ yl = (w1 & 0x3fff);
+ ym = ((w2 >> 16) & 0x3fff);
+ yh = ((w2 >> 0) & 0x3fff);
+ xl = (INT32)(w3 & 0x3fffffff);
+ xh = (INT32)(w5 & 0x3fffffff);
+ xm = (INT32)(w7 & 0x3fffffff);
+ // Inverse slopes in 16.16 format
+ dxldy = (INT32)(w4);
+ dxhdy = (INT32)(w6);
+ dxmdy = (INT32)(w8);
+
+ max_level = ((w1 >> 19) & 7);
+ tilenum = (w1 >> 16) & 0x7;
+
+ if (yl & 0x2000) yl |= 0xffffc000;
+ if (ym & 0x2000) ym |= 0xffffc000;
+ if (yh & 0x2000) yh |= 0xffffc000;
+
+ if (xl & 0x20000000) xl |= 0xc0000000;
+ if (xm & 0x20000000) xm |= 0xc0000000;
+ if (xh & 0x20000000) xh |= 0xc0000000;
+
+ z = 0;
+ s = 0; t = 0; w = 0;
+ dr = 0; dg = 0; db = 0; da = 0;
+
+ if (shade)
+ {
+ r = (rdp_cmd_data[shade_base+0 ] & 0xffff0000) | ((rdp_cmd_data[shade_base+4 ] >> 16) & 0x0000ffff);
+ g = ((rdp_cmd_data[shade_base+0 ] << 16) & 0xffff0000) | (rdp_cmd_data[shade_base+4 ] & 0x0000ffff);
+ b = (rdp_cmd_data[shade_base+1 ] & 0xffff0000) | ((rdp_cmd_data[shade_base+5 ] >> 16) & 0x0000ffff);
+ a = ((rdp_cmd_data[shade_base+1 ] << 16) & 0xffff0000) | (rdp_cmd_data[shade_base+5 ] & 0x0000ffff);
+ drdx = (rdp_cmd_data[shade_base+2 ] & 0xffff0000) | ((rdp_cmd_data[shade_base+6 ] >> 16) & 0x0000ffff);
+ dgdx = ((rdp_cmd_data[shade_base+2 ] << 16) & 0xffff0000) | (rdp_cmd_data[shade_base+6 ] & 0x0000ffff);
+ dbdx = (rdp_cmd_data[shade_base+3 ] & 0xffff0000) | ((rdp_cmd_data[shade_base+7 ] >> 16) & 0x0000ffff);
+ dadx = ((rdp_cmd_data[shade_base+3 ] << 16) & 0xffff0000) | (rdp_cmd_data[shade_base+7 ] & 0x0000ffff);
+ drde = (rdp_cmd_data[shade_base+8 ] & 0xffff0000) | ((rdp_cmd_data[shade_base+12] >> 16) & 0x0000ffff);
+ dgde = ((rdp_cmd_data[shade_base+8 ] << 16) & 0xffff0000) | (rdp_cmd_data[shade_base+12] & 0x0000ffff);
+ dbde = (rdp_cmd_data[shade_base+9 ] & 0xffff0000) | ((rdp_cmd_data[shade_base+13] >> 16) & 0x0000ffff);
+ dade = ((rdp_cmd_data[shade_base+9 ] << 16) & 0xffff0000) | (rdp_cmd_data[shade_base+13] & 0x0000ffff);
+ drdy = (rdp_cmd_data[shade_base+10] & 0xffff0000) | ((rdp_cmd_data[shade_base+14] >> 16) & 0x0000ffff);
+ dgdy = ((rdp_cmd_data[shade_base+10] << 16) & 0xffff0000) | (rdp_cmd_data[shade_base+14] & 0x0000ffff);
+ dbdy = (rdp_cmd_data[shade_base+11] & 0xffff0000) | ((rdp_cmd_data[shade_base+15] >> 16) & 0x0000ffff);
+ dady = ((rdp_cmd_data[shade_base+11] << 16) & 0xffff0000) | (rdp_cmd_data[shade_base+15] & 0x0000ffff);
+ }
+ if (texture)
+ {
+ s = (rdp_cmd_data[texture_base+0 ] & 0xffff0000) | ((rdp_cmd_data[texture_base+4 ] >> 16) & 0x0000ffff);
+ t = ((rdp_cmd_data[texture_base+0 ] << 16) & 0xffff0000) | (rdp_cmd_data[texture_base+4 ] & 0x0000ffff);
+ w = (rdp_cmd_data[texture_base+1 ] & 0xffff0000) | ((rdp_cmd_data[texture_base+5 ] >> 16) & 0x0000ffff);
+ dsdx = (rdp_cmd_data[texture_base+2 ] & 0xffff0000) | ((rdp_cmd_data[texture_base+6 ] >> 16) & 0x0000ffff);
+ dtdx = ((rdp_cmd_data[texture_base+2 ] << 16) & 0xffff0000) | (rdp_cmd_data[texture_base+6 ] & 0x0000ffff);
+ dwdx = (rdp_cmd_data[texture_base+3 ] & 0xffff0000) | ((rdp_cmd_data[texture_base+7 ] >> 16) & 0x0000ffff);
+ dsde = (rdp_cmd_data[texture_base+8 ] & 0xffff0000) | ((rdp_cmd_data[texture_base+12] >> 16) & 0x0000ffff);
+ dtde = ((rdp_cmd_data[texture_base+8 ] << 16) & 0xffff0000) | (rdp_cmd_data[texture_base+12] & 0x0000ffff);
+ dwde = (rdp_cmd_data[texture_base+9 ] & 0xffff0000) | ((rdp_cmd_data[texture_base+13] >> 16) & 0x0000ffff);
+ dsdy = (rdp_cmd_data[texture_base+10] & 0xffff0000) | ((rdp_cmd_data[texture_base+14] >> 16) & 0x0000ffff);
+ dtdy = ((rdp_cmd_data[texture_base+10] << 16) & 0xffff0000) | (rdp_cmd_data[texture_base+14] & 0x0000ffff);
+ dwdy = (rdp_cmd_data[texture_base+11] & 0xffff0000) | ((rdp_cmd_data[texture_base+15] >> 16) & 0x0000ffff);
+ }
+ if (zbuffer)
+ {
+ z = rdp_cmd_data[zbuffer_base+0];
+ dzdx = rdp_cmd_data[zbuffer_base+1];
+ dzde = rdp_cmd_data[zbuffer_base+2];
+ dzdy = rdp_cmd_data[zbuffer_base+3];
+ }
- int dsdiff = 0, dtdiff = 0, dwdiff = 0, drdiff = 0, dgdiff = 0, dbdiff = 0, dadiff = 0, dzdiff = 0;
- int sign_dxhdy = 0;
+ span[0].ds.w = dsdx;
+ span[0].dt.w = dtdx;
+ span[0].dw.w = dwdx;
+ span[0].dr.w = drdx & ~0x1f;
+ span[0].dg.w = dgdx & ~0x1f;
+ span[0].db.w = dbdx & ~0x1f;
+ span[0].da.w = dadx & ~0x1f;
+ span[0].dz.w = dzdx;
+ dzdy_dz = (dzdy >> 16) & 0xffff;
+ dzdx_dz = (dzdx >> 16) & 0xffff;
+ span[0].dzpix = ((dzdy_dz & 0x8000) ? ((~dzdy_dz) & 0x7fff) : dzdy_dz) + ((dzdx_dz & 0x8000) ? ((~dzdx_dz) & 0x7fff) : dzdx_dz);
+ span[0].dzpix = normalize_dzpix(span[0].dzpix);
+ dsdylod = dsdy >> 16;
+ dtdylod = dtdy >> 16;
+ if (dsdylod & 0x20000)
+ {
+ dsdylod = ~dsdylod & 0x1ffff;
+ }
+ if (dtdylod & 0x20000)
+ {
+ dtdylod = ~dtdylod & 0x1ffff;
+ }
+ span[0].dymax = (dsdylod > dtdylod)? dsdylod : dtdylod;
- int dsdeh = 0, dtdeh = 0, dwdeh = 0, drdeh = 0, dgdeh = 0, dbdeh = 0, dadeh = 0, dzdeh = 0, dsdyh = 0, dtdyh = 0, dwdyh = 0, drdyh = 0, dgdyh = 0, dbdyh = 0, dadyh = 0, dzdyh = 0;
- int do_offset = 0;
+ xleft_inc = dxmdy >> 2;
+ xright_inc = dxhdy >> 2;
- int xfrac = 0;
- int dseoff = 0, dteoff = 0, dweoff = 0, dreoff = 0, dgeoff = 0, dbeoff = 0, daeoff = 0, dzeoff = 0;
+ xright = xh;
+ xleft = xm;
- int dsdxh = 0, dtdxh = 0, dwdxh = 0, drdxh = 0, dgdxh = 0, dbdxh = 0, dadxh = 0, dzdxh = 0;
+ limcvg = ((yl>>2) <= 1023) ? (yl>>2) : 1023; // Needed by 40 Winks
+ if (limcvg < 0)
+ {
+ limcvg = 0;
+ }
- int m_inc;
- UINT32 min=0, max=3;
- INT32 maxxmx = 0, minxmx = 0, maxxhx = 0, minxhx = 0;
+ startcvg = ((yh>>2)>=0) ? (yh>>2) : 0;
+ for (k = startcvg; k <= limcvg; k++)
+ {
+ memset((void*)&span[k].cvg[0],0,640);
+ }
- int spix = 0; // Current subpixel
- int ycur;
- int ylfar;
- int ldflag;
- int yhpix;
- int ympix;
- int ylpix;
+ sign_dxldy = (dxldy & 0x80000000) ? 1 : 0;
+ sign_dxmdy = (dxmdy & 0x80000000) ? 1 : 0;
+ samesign = !(sign_dxldy ^ sign_dxmdy);
- int shade_base = rdp_cmd_cur + 8;
- int texture_base = rdp_cmd_cur + 8;
- int zbuffer_base = rdp_cmd_cur + 8;
+ sign_dxhdy = (dxhdy & 0x80000000) ? 1 : 0;
- if (shade)
- {
- texture_base += 16;
- zbuffer_base += 16;
- }
- if (texture)
- {
- zbuffer_base += 16;
- }
+ do_offset = !(sign_dxhdy ^ (flip));
- w3 = rdp_cmd_data[rdp_cmd_cur+2];
- w4 = rdp_cmd_data[rdp_cmd_cur+3];
- w5 = rdp_cmd_data[rdp_cmd_cur+4];
- w6 = rdp_cmd_data[rdp_cmd_cur+5];
- w7 = rdp_cmd_data[rdp_cmd_cur+6];
- w8 = rdp_cmd_data[rdp_cmd_cur+7];
-
- yl = (w1 & 0x3fff);
- ym = ((w2 >> 16) & 0x3fff);
- yh = ((w2 >> 0) & 0x3fff);
- xl = (INT32)(w3 & 0x3fffffff);
- xh = (INT32)(w5 & 0x3fffffff);
- xm = (INT32)(w7 & 0x3fffffff);
- // Inverse slopes in 16.16 format
- dxldy = (INT32)(w4);
- dxhdy = (INT32)(w6);
- dxmdy = (INT32)(w8);
-
- max_level = ((w1 >> 19) & 7);
- tilenum = (w1 >> 16) & 0x7;
-
- if (yl & 0x2000) yl |= 0xffffc000;
- if (ym & 0x2000) ym |= 0xffffc000;
- if (yh & 0x2000) yh |= 0xffffc000;
-
- if (xl & 0x20000000) xl |= 0xc0000000;
- if (xm & 0x20000000) xm |= 0xc0000000;
- if (xh & 0x20000000) xh |= 0xc0000000;
-
- z = 0;
- s = 0; t = 0; w = 0;
- dr = 0; dg = 0; db = 0; da = 0;
-
- if (shade)
- {
- r = (rdp_cmd_data[shade_base+0 ] & 0xffff0000) | ((rdp_cmd_data[shade_base+4 ] >> 16) & 0x0000ffff);
- g = ((rdp_cmd_data[shade_base+0 ] << 16) & 0xffff0000) | (rdp_cmd_data[shade_base+4 ] & 0x0000ffff);
- b = (rdp_cmd_data[shade_base+1 ] & 0xffff0000) | ((rdp_cmd_data[shade_base+5 ] >> 16) & 0x0000ffff);
- a = ((rdp_cmd_data[shade_base+1 ] << 16) & 0xffff0000) | (rdp_cmd_data[shade_base+5 ] & 0x0000ffff);
- drdx = (rdp_cmd_data[shade_base+2 ] & 0xffff0000) | ((rdp_cmd_data[shade_base+6 ] >> 16) & 0x0000ffff);
- dgdx = ((rdp_cmd_data[shade_base+2 ] << 16) & 0xffff0000) | (rdp_cmd_data[shade_base+6 ] & 0x0000ffff);
- dbdx = (rdp_cmd_data[shade_base+3 ] & 0xffff0000) | ((rdp_cmd_data[shade_base+7 ] >> 16) & 0x0000ffff);
- dadx = ((rdp_cmd_data[shade_base+3 ] << 16) & 0xffff0000) | (rdp_cmd_data[shade_base+7 ] & 0x0000ffff);
- drde = (rdp_cmd_data[shade_base+8 ] & 0xffff0000) | ((rdp_cmd_data[shade_base+12] >> 16) & 0x0000ffff);
- dgde = ((rdp_cmd_data[shade_base+8 ] << 16) & 0xffff0000) | (rdp_cmd_data[shade_base+12] & 0x0000ffff);
- dbde = (rdp_cmd_data[shade_base+9 ] & 0xffff0000) | ((rdp_cmd_data[shade_base+13] >> 16) & 0x0000ffff);
- dade = ((rdp_cmd_data[shade_base+9 ] << 16) & 0xffff0000) | (rdp_cmd_data[shade_base+13] & 0x0000ffff);
- drdy = (rdp_cmd_data[shade_base+10] & 0xffff0000) | ((rdp_cmd_data[shade_base+14] >> 16) & 0x0000ffff);
- dgdy = ((rdp_cmd_data[shade_base+10] << 16) & 0xffff0000) | (rdp_cmd_data[shade_base+14] & 0x0000ffff);
- dbdy = (rdp_cmd_data[shade_base+11] & 0xffff0000) | ((rdp_cmd_data[shade_base+15] >> 16) & 0x0000ffff);
- dady = ((rdp_cmd_data[shade_base+11] << 16) & 0xffff0000) | (rdp_cmd_data[shade_base+15] & 0x0000ffff);
- }
- if (texture)
- {
- s = (rdp_cmd_data[texture_base+0 ] & 0xffff0000) | ((rdp_cmd_data[texture_base+4 ] >> 16) & 0x0000ffff);
- t = ((rdp_cmd_data[texture_base+0 ] << 16) & 0xffff0000) | (rdp_cmd_data[texture_base+4 ] & 0x0000ffff);
- w = (rdp_cmd_data[texture_base+1 ] & 0xffff0000) | ((rdp_cmd_data[texture_base+5 ] >> 16) & 0x0000ffff);
- dsdx = (rdp_cmd_data[texture_base+2 ] & 0xffff0000) | ((rdp_cmd_data[texture_base+6 ] >> 16) & 0x0000ffff);
- dtdx = ((rdp_cmd_data[texture_base+2 ] << 16) & 0xffff0000) | (rdp_cmd_data[texture_base+6 ] & 0x0000ffff);
- dwdx = (rdp_cmd_data[texture_base+3 ] & 0xffff0000) | ((rdp_cmd_data[texture_base+7 ] >> 16) & 0x0000ffff);
- dsde = (rdp_cmd_data[texture_base+8 ] & 0xffff0000) | ((rdp_cmd_data[texture_base+12] >> 16) & 0x0000ffff);
- dtde = ((rdp_cmd_data[texture_base+8 ] << 16) & 0xffff0000) | (rdp_cmd_data[texture_base+12] & 0x0000ffff);
- dwde = (rdp_cmd_data[texture_base+9 ] & 0xffff0000) | ((rdp_cmd_data[texture_base+13] >> 16) & 0x0000ffff);
- dsdy = (rdp_cmd_data[texture_base+10] & 0xffff0000) | ((rdp_cmd_data[texture_base+14] >> 16) & 0x0000ffff);
- dtdy = ((rdp_cmd_data[texture_base+10] << 16) & 0xffff0000) | (rdp_cmd_data[texture_base+14] & 0x0000ffff);
- dwdy = (rdp_cmd_data[texture_base+11] & 0xffff0000) | ((rdp_cmd_data[texture_base+15] >> 16) & 0x0000ffff);
- }
- if (zbuffer)
- {
- z = rdp_cmd_data[zbuffer_base+0];
- dzdx = rdp_cmd_data[zbuffer_base+1];
- dzde = rdp_cmd_data[zbuffer_base+2];
- dzdy = rdp_cmd_data[zbuffer_base+3];
- }
-
- span[0].ds.w = dsdx;
- span[0].dt.w = dtdx;
- span[0].dw.w = dwdx;
- span[0].dr.w = drdx & ~0x1f;
- span[0].dg.w = dgdx & ~0x1f;
- span[0].db.w = dbdx & ~0x1f;
- span[0].da.w = dadx & ~0x1f;
- span[0].dz.w = dzdx;
- dzdy_dz = (dzdy >> 16) & 0xffff;
- dzdx_dz = (dzdx >> 16) & 0xffff;
- span[0].dzpix = ((dzdy_dz & 0x8000) ? ((~dzdy_dz) & 0x7fff) : dzdy_dz) + ((dzdx_dz & 0x8000) ? ((~dzdx_dz) & 0x7fff) : dzdx_dz);
- span[0].dzpix = normalize_dzpix(span[0].dzpix);
- dsdylod = dsdy >> 16;
- dtdylod = dtdy >> 16;
- if (dsdylod & 0x20000)
- {
- dsdylod = ~dsdylod & 0x1ffff;
- }
- if (dtdylod & 0x20000)
- {
- dtdylod = ~dtdylod & 0x1ffff;
- }
- span[0].dymax = (dsdylod > dtdylod)? dsdylod : dtdylod;
-
- xleft_inc = dxmdy >> 2;
- xright_inc = dxhdy >> 2;
-
- xright = xh;
- xleft = xm;
-
- limcvg = ((yl>>2) <= 1023) ? (yl>>2) : 1023; // Needed by 40 Winks
- if (limcvg < 0)
- {
- limcvg = 0;
- }
-
- startcvg = ((yh>>2)>=0) ? (yh>>2) : 0;
- for (k = startcvg; k <= limcvg; k++)
- {
- memset((void*)&span[k].cvg[0],0,640);
- }
-
- sign_dxldy = (dxldy & 0x80000000) ? 1 : 0;
- sign_dxmdy = (dxmdy & 0x80000000) ? 1 : 0;
- samesign = !(sign_dxldy ^ sign_dxmdy);
-
- sign_dxhdy = (dxhdy & 0x80000000) ? 1 : 0;
-
- do_offset = !(sign_dxhdy ^ (flip));
-
- if (do_offset)
- {
- dsdeh = dsde >> 9; dsdyh = dsdy >> 9;
- dtdeh = dtde >> 9; dtdyh = dtdy >> 9;
- dwdeh = dwde >> 9; dwdyh = dwdy >> 9;
- drdeh = drde >> 9; drdyh = drdy >> 9;
- dgdeh = dgde >> 9; dgdyh = dgdy >> 9;
- dbdeh = dbde >> 9; dbdyh = dbdy >> 9;
- dadeh = dade >> 9; dadyh = dady >> 9;
- dzdeh = dzde >> 9; dzdyh = dzdy >> 9;
-
- dsdiff = (dsdeh*3 - dsdyh*3) << 7;
- dtdiff = (dtdeh*3 - dtdyh*3) << 7;
- dwdiff = (dwdeh*3 - dwdyh*3) << 7;
- drdiff = (drdeh*3 - drdyh*3) << 7;
- dgdiff = (dgdeh*3 - dgdyh*3) << 7;
- dbdiff = (dbdeh*3 - dbdyh*3) << 7;
- dadiff = (dadeh*3 - dadyh*3) << 7;
- dzdiff = (dzdeh*3 - dzdyh*3) << 7;
- }
- else
- {
- dsdiff = dtdiff = dwdiff = drdiff = dgdiff = dbdiff = dadiff = dzdiff = 0;
- }
+ if (do_offset)
+ {
+ dsdeh = dsde >> 9; dsdyh = dsdy >> 9;
+ dtdeh = dtde >> 9; dtdyh = dtdy >> 9;
+ dwdeh = dwde >> 9; dwdyh = dwdy >> 9;
+ drdeh = drde >> 9; drdyh = drdy >> 9;
+ dgdeh = dgde >> 9; dgdyh = dgdy >> 9;
+ dbdeh = dbde >> 9; dbdyh = dbdy >> 9;
+ dadeh = dade >> 9; dadyh = dady >> 9;
+ dzdeh = dzde >> 9; dzdyh = dzdy >> 9;
+
+ dsdiff = (dsdeh*3 - dsdyh*3) << 7;
+ dtdiff = (dtdeh*3 - dtdyh*3) << 7;
+ dwdiff = (dwdeh*3 - dwdyh*3) << 7;
+ drdiff = (drdeh*3 - drdyh*3) << 7;
+ dgdiff = (dgdeh*3 - dgdyh*3) << 7;
+ dbdiff = (dbdeh*3 - dbdyh*3) << 7;
+ dadiff = (dadeh*3 - dadyh*3) << 7;
+ dzdiff = (dzdeh*3 - dzdyh*3) << 7;
+ }
+ else
+ {
+ dsdiff = dtdiff = dwdiff = drdiff = dgdiff = dbdiff = dadiff = dzdiff = 0;
+ }
- if (do_offset)
- {
- dseoff = (dsdeh*3) << 7;
- dteoff = (dtdeh*3) << 7;
- dweoff = (dwdeh*3) << 7;
- dreoff = (drdeh*3) << 7;
- dgeoff = (dgdeh*3) << 7;
- dbeoff = (dbdeh*3) << 7;
- daeoff = (dadeh*3) << 7;
- dzeoff = (dzdeh*3) << 7;
- }
- else
- {
- dseoff = dteoff = dweoff = dreoff = dgeoff = dbeoff = daeoff = dzeoff = 0;
- }
-#define adjust_deoff_only() \
-{ \
- span[j].s = s + dseoff; \
- span[j].t = t + dteoff; \
- span[j].w = w + dweoff; \
- span[j].r = r + dreoff; \
- span[j].g = g + dgeoff; \
- span[j].b = b + dbeoff; \
- span[j].a = a + daeoff; \
- span[j].z = z + dzeoff; \
+ if (do_offset)
+ {
+ dseoff = (dsdeh*3) << 7;
+ dteoff = (dtdeh*3) << 7;
+ dweoff = (dwdeh*3) << 7;
+ dreoff = (drdeh*3) << 7;
+ dgeoff = (dgdeh*3) << 7;
+ dbeoff = (dbdeh*3) << 7;
+ daeoff = (dadeh*3) << 7;
+ dzeoff = (dzdeh*3) << 7;
+ }
+ else
+ {
+ dseoff = dteoff = dweoff = dreoff = dgeoff = dbeoff = daeoff = dzeoff = 0;
+ }
+#define adjust_deoff_only() \
+{ \
+ span[j].s = s + dseoff; \
+ span[j].t = t + dteoff; \
+ span[j].w = w + dweoff; \
+ span[j].r = r + dreoff; \
+ span[j].g = g + dgeoff; \
+ span[j].b = b + dbeoff; \
+ span[j].a = a + daeoff; \
+ span[j].z = z + dzeoff; \
}
#define addleft(x) addleftcvg(x,k)
#define addright(x) addrightcvg(x,k)
-#define setvalues() { \
- addvalues(); \
- adjust_attr(); \
+#define setvalues() { \
+ addvalues(); \
+ adjust_attr(); \
}
- dsdxh = dsdx >> 8;
- dtdxh = dtdx >> 8;
- dwdxh = dwdx >> 8;
- drdxh = drdx >> 8;
- dgdxh = dgdx >> 8;
- dbdxh = dbdx >> 8;
- dadxh = dadx >> 8;
- dzdxh = dzdx >> 8;
-
-#define adjust_attr() \
-{ \
- span[j].s.w = (s + dsdiff - (xfrac * dsdxh)) & ~0x1f; \
- span[j].t.w = (t + dtdiff - (xfrac * dtdxh)) & ~0x1f; \
- span[j].w.w = (w + dwdiff - (xfrac * dwdxh)) & ~0x1f; \
- span[j].r.w = r + drdiff - (xfrac * drdxh); \
- span[j].g.w = g + dgdiff - (xfrac * dgdxh); \
- span[j].b.w = b + dbdiff - (xfrac * dbdxh); \
- span[j].a.w = a + dadiff - (xfrac * dadxh); \
- span[j].z.w = z + dzdiff - (xfrac * dzdxh); \
+ dsdxh = dsdx >> 8;
+ dtdxh = dtdx >> 8;
+ dwdxh = dwdx >> 8;
+ drdxh = drdx >> 8;
+ dgdxh = dgdx >> 8;
+ dbdxh = dbdx >> 8;
+ dadxh = dadx >> 8;
+ dzdxh = dzdx >> 8;
+
+#define adjust_attr() \
+{ \
+ span[j].s.w = (s + dsdiff - (xfrac * dsdxh)) & ~0x1f; \
+ span[j].t.w = (t + dtdiff - (xfrac * dtdxh)) & ~0x1f; \
+ span[j].w.w = (w + dwdiff - (xfrac * dwdxh)) & ~0x1f; \
+ span[j].r.w = r + drdiff - (xfrac * drdxh); \
+ span[j].g.w = g + dgdiff - (xfrac * dgdxh); \
+ span[j].b.w = b + dbdiff - (xfrac * dbdxh); \
+ span[j].a.w = a + dadiff - (xfrac * dadxh); \
+ span[j].z.w = z + dzdiff - (xfrac * dzdxh); \
}
-#define adjust_diffonly() \
-{ \
- span[j].s = s + dsdiff; \
- span[j].t = t + dtdiff; \
- span[j].w = w + dwdiff; \
- span[j].r = r + drdiff; \
- span[j].g = g + dgdiff; \
- span[j].b = b + dbdiff; \
- span[j].a = a + dadiff; \
- span[j].z = z + dzdiff; \
+#define adjust_diffonly() \
+{ \
+ span[j].s = s + dsdiff; \
+ span[j].t = t + dtdiff; \
+ span[j].w = w + dwdiff; \
+ span[j].r = r + drdiff; \
+ span[j].g = g + dgdiff; \
+ span[j].b = b + dbdiff; \
+ span[j].a = a + dadiff; \
+ span[j].z = z + dzdiff; \
}
-#define addvalues() { \
- s += dsde; \
- t += dtde; \
- w += dwde; \
- r += drde; \
- g += dgde; \
- b += dbde; \
- a += dade; \
- z += dzde; \
+#define addvalues() { \
+ s += dsde; \
+ t += dtde; \
+ w += dwde; \
+ r += drde; \
+ g += dgde; \
+ b += dbde; \
+ a += dade; \
+ z += dzde; \
}
-#define justassign() \
-{ \
- span[j].s = s & ~0x1f; \
- span[j].t = t & ~0x1f; \
- span[j].w = w & ~0x1f; \
- span[j].r = r; \
- span[j].g = g; \
- span[j].b = b; \
- span[j].a = a; \
- span[j].z = z; \
+#define justassign() \
+{ \
+ span[j].s = s & ~0x1f; \
+ span[j].t = t & ~0x1f; \
+ span[j].w = w & ~0x1f; \
+ span[j].r = r; \
+ span[j].g = g; \
+ span[j].b = b; \
+ span[j].a = a; \
+ span[j].z = z; \
}
- m_inc = flip ? 1 : -1;
-
- ycur = yh & ~3;
- ylfar = yl | 3;
- ldflag = (sign_dxhdy ^ flip) ? 0 : 3;
- yhpix = yh >> 2;
- ympix = ym >> 2;
- ylpix = yl >> 2;
+ m_inc = flip ? 1 : -1;
- for (k = ycur; k <= ylfar; k++)
- {
- if (k == ym)
- {
- xleft = xl;
- xleft_inc = dxldy >> 2;
- }
+ ycur = yh & ~3;
+ ylfar = yl | 3;
+ ldflag = (sign_dxhdy ^ flip) ? 0 : 3;
+ yhpix = yh >> 2;
+ ympix = ym >> 2;
+ ylpix = yl >> 2;
- xstart = xleft >> 16;
- xend = xright >> 16;
- j = k >> 2;
- spix = k & 3;
+ for (k = ycur; k <= ylfar; k++)
+ {
+ if (k == ym)
+ {
+ xleft = xl;
+ xleft_inc = dxldy >> 2;
+ }
- if (k >= 0 && k < 0x1000)
- {
- int m = 0;
- int n = 0;
- int length = 0;
- min = 0; max = 3;
- if (j == yhpix)
- {
- min = yh & 3;
- }
- if (j == ylpix)
- {
- max = yl & 3;
- }
- if (spix >= min && spix <= max)
- {
- if (spix == min)
- {
- minxmx = maxxmx = xstart;
- minxhx = maxxhx = xend;
- }
- else
- {
- minxmx = (xstart < minxmx) ? xstart : minxmx;
- maxxmx = (xstart > maxxmx) ? xstart : maxxmx;
- minxhx = (xend < minxhx) ? xend : minxhx;
- maxxhx = (xend > maxxhx) ? xend : maxxhx;
- }
- }
+ xstart = xleft >> 16;
+ xend = xright >> 16;
+ j = k >> 2;
+ spix = k & 3;
- if (spix == max)
- {
- if (flip)
- {
- span[j].lx = maxxmx;
- span[j].rx = minxhx;
- }
- else
- {
- span[j].lx = minxmx;
- span[j].rx = maxxhx;
- }
- }
+ if (k >= 0 && k < 0x1000)
+ {
+ int m = 0;
+ int n = 0;
+ int length = 0;
+ min = 0; max = 3;
+ if (j == yhpix)
+ {
+ min = yh & 3;
+ }
+ if (j == ylpix)
+ {
+ max = yl & 3;
+ }
+ if (spix >= min && spix <= max)
+ {
+ if (spix == min)
+ {
+ minxmx = maxxmx = xstart;
+ minxhx = maxxhx = xend;
+ }
+ else
+ {
+ minxmx = (xstart < minxmx) ? xstart : minxmx;
+ maxxmx = (xstart > maxxmx) ? xstart : maxxmx;
+ minxhx = (xend < minxhx) ? xend : minxhx;
+ maxxhx = (xend > maxxhx) ? xend : maxxhx;
+ }
+ }
- length = flip ? (xstart - xend) : (xend - xstart);
+ if (spix == max)
+ {
+ if (flip)
+ {
+ span[j].lx = maxxmx;
+ span[j].rx = minxhx;
+ }
+ else
+ {
+ span[j].lx = minxmx;
+ span[j].rx = maxxhx;
+ }
+ }
- if (spix == ldflag)
- {
- xfrac = ((xright >> 8) & 0xff);
- adjust_attr();
- }
+ length = flip ? (xstart - xend) : (xend - xstart);
- m = flip ? (xend+1) : (xend-1);
+ if (spix == ldflag)
+ {
+ xfrac = ((xright >> 8) & 0xff);
+ adjust_attr();
+ }
- if (k >= yh && length >= 0 && k <= yl)
- {
- if (xstart>=0 && xstart <1024)
- {
- if (!flip)
- {
- span[j].cvg[xstart] += addleft(xleft);
- }
- else
- {
- span[j].cvg[xstart] += addright(xleft);
- }
- }
- if (xend>=0 && xend<1024)
- {
- if (xstart != xend)
- {
- if (!flip)
- {
- span[j].cvg[xend] += addright(xright);
- }
- else
- {
- span[j].cvg[xend] += addleft(xright);
- }
- }
- else
- {
- if (!flip)
- {
- span[j].cvg[xend] -= (2 - addright(xright));
- }
- else
- {
- span[j].cvg[xend] -= (2 - addleft(xright));
- }
- if (span[j].cvg[xend] > 200)
- {
- span[j].cvg[xend] = 0;
- }
- }
- }
- for (n = 0; n < (length - 1); n++)
- {
- if (m>=0 && m < 640)
- {
- span[j].cvg[m] += 2;
- }
+ m = flip ? (xend+1) : (xend-1);
- m += m_inc;
- }
- }
- }
+ if (k >= yh && length >= 0 && k <= yl)
+ {
+ if (xstart>=0 && xstart <1024)
+ {
+ if (!flip)
+ {
+ span[j].cvg[xstart] += addleft(xleft);
+ }
+ else
+ {
+ span[j].cvg[xstart] += addright(xleft);
+ }
+ }
+ if (xend>=0 && xend<1024)
+ {
+ if (xstart != xend)
+ {
+ if (!flip)
+ {
+ span[j].cvg[xend] += addright(xright);
+ }
+ else
+ {
+ span[j].cvg[xend] += addleft(xright);
+ }
+ }
+ else
+ {
+ if (!flip)
+ {
+ span[j].cvg[xend] -= (2 - addright(xright));
+ }
+ else
+ {
+ span[j].cvg[xend] -= (2 - addleft(xright));
+ }
+ if (span[j].cvg[xend] > 200)
+ {
+ span[j].cvg[xend] = 0;
+ }
+ }
+ }
+ for (n = 0; n < (length - 1); n++)
+ {
+ if (m>=0 && m < 640)
+ {
+ span[j].cvg[m] += 2;
+ }
+
+ m += m_inc;
+ }
+ }
+ }
- if (spix == 3)
- {
- addvalues();
- }
- xleft += xleft_inc;
- xright += xright_inc;
- }
+ if (spix == 3)
+ {
+ addvalues();
+ }
+ xleft += xleft_inc;
+ xright += xright_inc;
+ }
- switch (fb_size) // 8bpp needs to be implemented
- {
- case PIXEL_SIZE_16BIT: render_spans_16(yh>>2, yl>>2, &tile[tilenum], shade, texture, zbuffer, flip); break;
- case PIXEL_SIZE_32BIT: render_spans_32(yh>>2, yl>>2, &tile[tilenum], shade, texture, zbuffer, flip); break;
- default: break; // V-Rally2 does this, fb_size=0
- }
+ switch (fb_size) // 8bpp needs to be implemented
+ {
+ case PIXEL_SIZE_16BIT: render_spans_16(yh>>2, yl>>2, &tile[tilenum], shade, texture, zbuffer, flip); break;
+ case PIXEL_SIZE_32BIT: render_spans_32(yh>>2, yl>>2, &tile[tilenum], shade, texture, zbuffer, flip); break;
+ default: break; // V-Rally2 does this, fb_size=0
+ }
}
*/
diff --git a/src/mame/video/overdriv.c b/src/mame/video/overdriv.c
index c004103c809..0aad165f3c0 100644
--- a/src/mame/video/overdriv.c
+++ b/src/mame/video/overdriv.c
@@ -51,17 +51,17 @@ void overdriv_zoom_callback_1(running_machine *machine, int *code,int *color,int
VIDEO_START( overdriv )
{
-// const device_config *k051316_1 = devtag_get_device(machine, "k051316_1");
-// const device_config *k051316_2 = devtag_get_device(machine, "k051316_2");
+// const device_config *k051316_1 = devtag_get_device(machine, "k051316_1");
+// const device_config *k051316_2 = devtag_get_device(machine, "k051316_2");
-// K053251_vh_start(machine);
-// K051316_vh_start_0(machine,"gfx2",4,TRUE,0,zoom_callback_0);
-// K051316_vh_start_1(machine,"gfx3",4,FALSE,0,zoom_callback_1);
-// K053247_vh_start(machine,"gfx1",77,22,NORMAL_PLANE_ORDER,overdriv_sprite_callback);
+// K053251_vh_start(machine);
+// K051316_vh_start_0(machine,"gfx2",4,TRUE,0,zoom_callback_0);
+// K051316_vh_start_1(machine,"gfx3",4,FALSE,0,zoom_callback_1);
+// K053247_vh_start(machine,"gfx1",77,22,NORMAL_PLANE_ORDER,overdriv_sprite_callback);
-// k051316_wraparound_enable(k051316_1, 1);
-// k051316_set_offset(k051316_1, 14, -1);
-// k051316_set_offset(k051316_2, 15, 0);
+// k051316_wraparound_enable(k051316_1, 1);
+// k051316_set_offset(k051316_1, 14, -1);
+// k051316_set_offset(k051316_2, 15, 0);
}
diff --git a/src/mame/video/pgm.c b/src/mame/video/pgm.c
index 8b05939387b..70fe2420fce 100644
--- a/src/mame/video/pgm.c
+++ b/src/mame/video/pgm.c
@@ -19,15 +19,15 @@ static void pgm_prepare_sprite( running_machine *machine, int wide, int high, in
UINT32 aoffset;
UINT16 msk;
- aoffset = (bdata[(boffset + 3) & bdatasize] << 24) | (bdata[(boffset + 2) & bdatasize] << 16) |
+ aoffset = (bdata[(boffset + 3) & bdatasize] << 24) | (bdata[(boffset + 2) & bdatasize] << 16) |
(bdata[(boffset + 1) & bdatasize] << 8) | (bdata[(boffset + 0) & bdatasize] << 0);
aoffset = aoffset >> 2; aoffset *= 3;
boffset += 4; /* because the first dword is the a data offset */
- for (ycnt = 0 ; ycnt < high ; ycnt++)
+ for (ycnt = 0 ; ycnt < high ; ycnt++)
{
- for (xcnt = 0 ; xcnt < wide ; xcnt++)
+ for (xcnt = 0 ; xcnt < wide ; xcnt++)
{
int x;
@@ -67,9 +67,9 @@ static void draw_sprite_line( running_machine *machine, int wide, UINT32* dest,
while (xcnt < wide * 16)
{
UINT32 srcdat;
- if (!(flip & 0x01))
+ if (!(flip & 0x01))
xoffset = xcnt;
- else
+ else
xoffset = (wide * 16) - xcnt - 1;
srcdat = state->sprite_temp_render[yoffset + xoffset];
@@ -82,9 +82,9 @@ static void draw_sprite_line( running_machine *machine, int wide, UINT32* dest,
{
if ((xdrawpos >= 0) && (xdrawpos < 448))
{
- if (pri)
+ if (pri)
dest[xdrawpos] = srcdat | 0x8000 | 0x10000;
- else
+ else
dest[xdrawpos] = srcdat | 0x10000;
}
}
@@ -96,9 +96,9 @@ static void draw_sprite_line( running_machine *machine, int wide, UINT32* dest,
{
if ((xdrawpos >= 0) && (xdrawpos < 448))
{
- if (pri)
+ if (pri)
dest[xdrawpos] = srcdat | 0x8000 | 0x10000;
- else
+ else
dest[xdrawpos] = srcdat | 0x10000;
}
}
@@ -115,9 +115,9 @@ static void draw_sprite_line( running_machine *machine, int wide, UINT32* dest,
{
if ((xdrawpos >= 0) && (xdrawpos < 448))
{
- if (pri)
+ if (pri)
dest[xdrawpos] = srcdat | 0x8000 | 0x10000;
- else
+ else
dest[xdrawpos] = srcdat | 0x10000;
}
}
@@ -152,9 +152,9 @@ static void draw_sprite_new_zoomed( running_machine *machine, int wide, int high
{
ydrawpos = ypos + ycntdraw;
- if (!(flip & 0x02))
+ if (!(flip & 0x02))
yoffset = (ycnt * (wide * 16));
- else
+ else
yoffset = ((high - ycnt - 1) * (wide * 16));
if ((ydrawpos >= 0) && (ydrawpos < 224))
@@ -165,9 +165,9 @@ static void draw_sprite_new_zoomed( running_machine *machine, int wide, int high
ycntdraw++;
ydrawpos = ypos + ycntdraw;
- if (!(flip & 0x02))
+ if (!(flip & 0x02))
yoffset = (ycnt * (wide * 16));
- else
+ else
yoffset = ((high - ycnt - 1) * (wide * 16));
if ((ydrawpos >= 0) && (ydrawpos < 224))
@@ -177,7 +177,7 @@ static void draw_sprite_new_zoomed( running_machine *machine, int wide, int high
}
ycntdraw++;
- if (ydrawpos ==224)
+ if (ydrawpos ==224)
ycnt = high;
}
else if (yzoombit == 1 && ygrow == 0)
@@ -189,9 +189,9 @@ static void draw_sprite_new_zoomed( running_machine *machine, int wide, int high
{
ydrawpos = ypos + ycntdraw;
- if (!(flip & 0x02))
+ if (!(flip & 0x02))
yoffset = (ycnt * (wide * 16));
- else
+ else
yoffset = ((high - ycnt - 1) * (wide * 16));
if ((ydrawpos >= 0) && (ydrawpos < 224))
@@ -201,7 +201,7 @@ static void draw_sprite_new_zoomed( running_machine *machine, int wide, int high
}
ycntdraw++;
- if (ydrawpos == 224)
+ if (ydrawpos == 224)
ycnt = high;
}
@@ -325,7 +325,7 @@ static TILE_GET_INFO( get_pgm_bg_tilemap_tile_info )
int tileno, colour, flipyx;
tileno = state->bg_videoram[tile_index *2] & 0xffff;
- if (tileno > 0x7ff)
+ if (tileno > 0x7ff)
tileno += 0x1000; /* Tiles 0x800+ come from the GAME Roms */
colour = (state->bg_videoram[tile_index * 2 + 1] & 0x3e) >> 1;
flipyx = (state->bg_videoram[tile_index * 2 + 1] & 0xc0) >> 6;
diff --git a/src/mame/video/psikyo.c b/src/mame/video/psikyo.c
index bc06a287a02..2c9feb45a6b 100644
--- a/src/mame/video/psikyo.c
+++ b/src/mame/video/psikyo.c
@@ -284,7 +284,7 @@ static void draw_sprites( running_machine *machine, bitmap_t *bitmap, const rect
for (offs = 0/2 ; offs < (0x800 - 2)/2 ; offs += 2/2) // skip last "sprite"
{
UINT16 sprite = spritelist[BYTE_XOR_BE(offs)];
- if (sprite == 0xffff)
+ if (sprite == 0xffff)
break;
}
@@ -325,7 +325,7 @@ static void draw_sprites( running_machine *machine, bitmap_t *bitmap, const rect
/* 180-1ff are negative coordinates. Note that $80 pixels is
the maximum extent of a sprite, which can therefore be moved
out of screen without problems */
- if (x >= 0x180)
+ if (x >= 0x180)
x -= 0x200;
x += (nx * zoomx + 2) / 4;
@@ -400,14 +400,14 @@ static void draw_sprites_bootleg( running_machine *machine, bitmap_t *bitmap, co
int height = video_screen_get_height(machine->primary_screen);
/* Exit if sprites are disabled */
- if (spritelist[BYTE_XOR_BE((0x800 - 2) / 2)] & 1)
+ if (spritelist[BYTE_XOR_BE((0x800 - 2) / 2)] & 1)
return;
/* Look for "end of sprites" marker in the sprites list */
for (offs = 0/2 ; offs < (0x800 - 2)/2 ; offs += 2/2) // skip last "sprite"
{
UINT16 sprite = spritelist[BYTE_XOR_BE(offs)];
- if (sprite == 0xffff)
+ if (sprite == 0xffff)
break;
}
@@ -514,13 +514,13 @@ static void draw_sprites_bootleg( running_machine *machine, bitmap_t *bitmap, co
static int tilemap_width( int size )
{
- if (size == 0)
+ if (size == 0)
return 0x80 * 16;
else if(size == 1)
return 0x40 * 16;
- else if(size == 2)
+ else if(size == 2)
return 0x20 * 16;
- else
+ else
return 0x10 * 16;
}
@@ -578,7 +578,7 @@ VIDEO_UPDATE( psikyo )
psikyo_switch_banks(screen->machine, 1, (layer1_ctrl & 0x400) >> 10);
}
- switch ((layer0_ctrl & 0x00c0) >> 6)
+ switch ((layer0_ctrl & 0x00c0) >> 6)
{
case 0: tm0size = 1; break;
case 1: tm0size = 2; break;
@@ -586,7 +586,7 @@ VIDEO_UPDATE( psikyo )
default: tm0size = 0; break;
}
- switch ((layer1_ctrl & 0x00c0) >> 6)
+ switch ((layer1_ctrl & 0x00c0) >> 6)
{
case 0: tm1size = 1; break;
case 1: tm1size = 2; break;
@@ -594,22 +594,22 @@ VIDEO_UPDATE( psikyo )
default: tm1size = 0; break;
}
- if (tm0size == 0)
+ if (tm0size == 0)
tmptilemap0 = state->tilemap_0_size0;
- else if (tm0size == 1)
+ else if (tm0size == 1)
tmptilemap0 = state->tilemap_0_size1;
- else if (tm0size == 2)
+ else if (tm0size == 2)
tmptilemap0 = state->tilemap_0_size2;
- else
+ else
tmptilemap0 = state->tilemap_0_size3;
- if (tm1size == 0)
+ if (tm1size == 0)
tmptilemap1 = state->tilemap_1_size0;
- else if (tm1size == 1)
+ else if (tm1size == 1)
tmptilemap1 = state->tilemap_1_size1;
- else if (tm1size == 2)
+ else if (tm1size == 2)
tmptilemap1 = state->tilemap_1_size2;
- else
+ else
tmptilemap1 = state->tilemap_1_size3;
tilemap_set_enable(tmptilemap0, ~layer0_ctrl & 1);
@@ -752,7 +752,7 @@ VIDEO_UPDATE( psikyo_bootleg )
psikyo_switch_banks(screen->machine, 1, (layer1_ctrl & 0x400) >> 10);
}
- switch ((layer0_ctrl & 0x00c0) >> 6)
+ switch ((layer0_ctrl & 0x00c0) >> 6)
{
case 0: tm0size = 1; break;
case 1: tm0size = 2; break;
@@ -760,7 +760,7 @@ VIDEO_UPDATE( psikyo_bootleg )
default: tm0size = 0; break;
}
- switch ((layer1_ctrl & 0x00c0) >> 6)
+ switch ((layer1_ctrl & 0x00c0) >> 6)
{
case 0: tm1size = 1; break;
case 1: tm1size = 2; break;
@@ -768,22 +768,22 @@ VIDEO_UPDATE( psikyo_bootleg )
default: tm1size = 0; break;
}
- if (tm0size == 0)
+ if (tm0size == 0)
tmptilemap0 = state->tilemap_0_size0;
- else if (tm0size == 1)
+ else if (tm0size == 1)
tmptilemap0 = state->tilemap_0_size1;
- else if (tm0size == 2)
+ else if (tm0size == 2)
tmptilemap0 = state->tilemap_0_size2;
- else
+ else
tmptilemap0 = state->tilemap_0_size3;
- if (tm1size == 0)
+ if (tm1size == 0)
tmptilemap1 = state->tilemap_1_size0;
- else if (tm1size == 1)
+ else if (tm1size == 1)
tmptilemap1 = state->tilemap_1_size1;
- else if (tm1size == 2)
+ else if (tm1size == 2)
tmptilemap1 = state->tilemap_1_size2;
- else
+ else
tmptilemap1 = state->tilemap_1_size3;
tilemap_set_enable(tmptilemap0, ~layer0_ctrl & 1);
diff --git a/src/mame/video/psikyo4.c b/src/mame/video/psikyo4.c
index 0de9f7feb34..5339755cd6c 100644
--- a/src/mame/video/psikyo4.c
+++ b/src/mame/video/psikyo4.c
@@ -88,7 +88,7 @@ static void draw_sprites( running_machine *machine, bitmap_t *bitmap, const rect
tnum = (source[sprnum + 1] & 0x0007ffff) >> 00;
colr = (source[sprnum + 1] & 0x3f000000) >> 24;
- if (scr)
+ if (scr)
colr += 0x40; /* Use second copy of palette which is dimmed appropriately */
flipx = (source[sprnum + 1] & 0x40000000);
@@ -111,9 +111,9 @@ static void draw_sprites( running_machine *machine, bitmap_t *bitmap, const rect
if (flipy) { ystart = high - 1; yend = -1; yinc = -1; }
else { ystart = 0; yend = high; yinc = +1; }
- for (j = ystart; j != yend; j += yinc)
+ for (j = ystart; j != yend; j += yinc)
{
- for (i = xstart; i != xend; i += xinc)
+ for (i = xstart; i != xend; i += xinc)
{
drawgfx_transpen(bitmap, cliprect, gfx, tnum + loopnum, colr, flipx, flipy, xpos + 16 * i, ypos + 16 * j, 0);
loopnum++;
@@ -122,7 +122,7 @@ static void draw_sprites( running_machine *machine, bitmap_t *bitmap, const rect
}
/* end drawing */
listcntr++;
- if (listdat & 0x4000)
+ if (listdat & 0x4000)
break;
}
}
diff --git a/src/mame/video/psikyosh.c b/src/mame/video/psikyosh.c
index 49e496fc202..d4f573ae4d6 100644
--- a/src/mame/video/psikyosh.c
+++ b/src/mame/video/psikyosh.c
@@ -167,7 +167,7 @@ static void draw_bglayer( running_machine *machine, int layer, bitmap_t *bitmap,
scrolly = (state->bgram[0x13f0 / 4 + (layer * 0x04) / 4] & 0x03ff0000) >> 16;
}
- if (BG_TYPE(layer) == BG_SCROLL_0D)
+ if (BG_TYPE(layer) == BG_SCROLL_0D)
scrollx += 0x08; /* quick kludge until using rowscroll */
gfx = BG_DEPTH_8BPP(layer) ? machine->gfx[1] : machine->gfx[0];
@@ -236,7 +236,7 @@ static void draw_bglayertext( running_machine *machine, int layer, bitmap_t *bit
if ((bank >= 0x0c) && (bank <= 0x1f)) /* shouldn't happen, 20 banks of 0x800 bytes */
{
offs = 0;
- for (sy = 0; sy < size; sy++)
+ for (sy = 0; sy < size; sy++)
{
for (sx = 0; sx < 32; sx++)
{
@@ -274,9 +274,9 @@ static void draw_bglayertext( running_machine *machine, int layer, bitmap_t *bit
if ((bank >= 0x0c) && (bank <= 0x1f)) /* shouldn't happen, 20 banks of 0x800 bytes */
{
offs = 0;
- for (sy = 0; sy < size; sy++)
+ for (sy = 0; sy < size; sy++)
{
- for (sx = 0; sx < 32; sx++)
+ for (sx = 0; sx < 32; sx++)
{
int tileno, colour;
@@ -445,7 +445,7 @@ static void psikyosh_drawgfxzoom( running_machine *machine,
int code_offset = 0;
int xtile, ytile, xpixel, ypixel;
- if (!zoomx || !zoomy)
+ if (!zoomx || !zoomy)
return;
profiler_mark_start(PROFILER_DRAWGFX);
@@ -583,7 +583,7 @@ static void psikyosh_drawgfxzoom( running_machine *machine,
for (x = sx; x < ex; x++)
{
int c = *source;
- if (c != 0)
+ if (c != 0)
*dest = pal[c];
dest++;
@@ -642,7 +642,7 @@ static void psikyosh_drawgfxzoom( running_machine *machine,
for (x = sx; x < ex; x++)
{
int c = *source;
- if (c != 0)
+ if (c != 0)
*dest = alpha_blend_r32(*dest, pal[c], alpha);
dest++;
@@ -850,7 +850,7 @@ static void psikyosh_drawgfxzoom( running_machine *machine,
for (x = sx; x < ex; x++)
{
int c = source[x_index >> 10];
- if (c != 0)
+ if (c != 0)
dest[x] = pal[c];
x_index += dx;
}
@@ -1075,12 +1075,12 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta
int x, y;
sprintf(buf, "%X",xdim/16); /* Display Zoom in 16.16 */
- if (machine->gamedrv->flags & ORIENTATION_SWAP_XY)
+ if (machine->gamedrv->flags & ORIENTATION_SWAP_XY)
{
x = ypos;
y = video_screen_get_visible_area(machine->primary_screen)->max_x - xpos; /* ORIENTATION_FLIP_Y */
}
- else
+ else
{
x = xpos;
y = ypos;
@@ -1113,7 +1113,7 @@ VIDEO_START( psikyosh )
int i;
for (i = 0; i < 0xc0; i++)
alphatable[i] = 0xff;
- for (i = 0; i < 0x40; i++)
+ for (i = 0; i < 0x40; i++)
{
int alpha = ((0x3f - i) * 0xff) / 0x3f;
alphatable[i + 0xc0] = alpha;
@@ -1188,11 +1188,11 @@ VIDEO_UPDATE( psikyosh ) /* Note the z-buffer on each sprite to get correct prio
psikyosh_prelineblend(screen->machine, bitmap, cliprect);
- for (i = 0; i <= 7; i++)
+ for (i = 0; i <= 7; i++)
{
draw_sprites(screen->machine, bitmap, cliprect, i); // When same priority bg's have higher pri
draw_background(screen->machine, bitmap, cliprect, i);
- if ((state->vidregs[2] & 0xf) == i)
+ if ((state->vidregs[2] & 0xf) == i)
psikyosh_postlineblend(screen->machine, bitmap, cliprect);
}
return 0;
diff --git a/src/mame/video/psx.c b/src/mame/video/psx.c
index 8727f9a25e7..4500160d542 100644
--- a/src/mame/video/psx.c
+++ b/src/mame/video/psx.c
@@ -1159,7 +1159,7 @@ INLINE void decode_tpage( running_machine *machine, struct PSXGPU *p_psxgpu, UIN
{
#define TEXTURE_ENDLOOP \
- }
+ }
#define TEXTURE4BIT( TXV, TXU ) \
TEXTURE_LOOP \
diff --git a/src/mame/video/rdpupd16.c b/src/mame/video/rdpupd16.c
index 7ce3a4dc91b..8e0214de200 100644
--- a/src/mame/video/rdpupd16.c
+++ b/src/mame/video/rdpupd16.c
@@ -87,7 +87,7 @@
//{
//if (vibuffering)
//{
- // restore_filter16_buffer(&r, &g, &b, &ViBuffer[i][j], n64_vi_width);
+ // restore_filter16_buffer(&r, &g, &b, &ViBuffer[i][j], n64_vi_width);
//}
//else
//{
@@ -99,7 +99,7 @@
{
//if (vibuffering)
//{
- // divot_filter16_buffer(&r, &g, &b, &ViBuffer[i][j]);
+ // divot_filter16_buffer(&r, &g, &b, &ViBuffer[i][j]);
//}
//else
//{
@@ -109,35 +109,35 @@
#endif
/*
- if (gamma_dither)
- {
- dith = mame_rand(screen->machine) & 0x3f;
- }
- if (gamma)
- {
- if (gamma_dither)
- {
- r = gamma_dither_table[(r << 6)|dith];
- g = gamma_dither_table[(g << 6)|dith];
- b = gamma_dither_table[(b << 6)|dith];
- }
- else
- {
- r = gamma_table[r];
- g = gamma_table[g];
- b = gamma_table[b];
- }
- }
- else if (gamma_dither)
- {
- if (r < 255)
- r += (dith & 1);
- if (g < 255)
- g += (dith & 1);
- if (b < 255)
- b += (dith & 1);
- }
- */
+ if (gamma_dither)
+ {
+ dith = mame_rand(screen->machine) & 0x3f;
+ }
+ if (gamma)
+ {
+ if (gamma_dither)
+ {
+ r = gamma_dither_table[(r << 6)|dith];
+ g = gamma_dither_table[(g << 6)|dith];
+ b = gamma_dither_table[(b << 6)|dith];
+ }
+ else
+ {
+ r = gamma_table[r];
+ g = gamma_table[g];
+ b = gamma_table[b];
+ }
+ }
+ else if (gamma_dither)
+ {
+ if (r < 255)
+ r += (dith & 1);
+ if (g < 255)
+ g += (dith & 1);
+ if (b < 255)
+ b += (dith & 1);
+ }
+ */
pixels++;
final = (r << 16) | (g << 8) | b;
diff --git a/src/mame/video/rungun.c b/src/mame/video/rungun.c
index 065b023cd3a..b12603494a7 100644
--- a/src/mame/video/rungun.c
+++ b/src/mame/video/rungun.c
@@ -81,10 +81,10 @@ VIDEO_START(rng)
8*8*4
};
-// K055673_vh_start(machine, "gfx2", 1, -8, 15, rng_sprite_callback);
+// K055673_vh_start(machine, "gfx2", 1, -8, 15, rng_sprite_callback);
-// K053936_wraparound_enable(0, 0);
-// K053936_set_offset(0, 34, 9);
+// K053936_wraparound_enable(0, 0);
+// K053936_set_offset(0, 34, 9);
rng_936_tilemap = tilemap_create(machine, get_rng_936_tile_info, tilemap_scan_rows, 16, 16, 128, 128);
tilemap_set_transparent_pen(rng_936_tilemap, 0);
diff --git a/src/mame/video/wecleman.c b/src/mame/video/wecleman.c
index 1a57145c2b6..85f65896d73 100644
--- a/src/mame/video/wecleman.c
+++ b/src/mame/video/wecleman.c
@@ -1138,19 +1138,19 @@ VIDEO_UPDATE( hotchase )
bitmap_fill(bitmap, cliprect, black_pen);
/* Draw the background */
- if (video_on)
+ if (video_on)
k051316_zoom_draw(k051316_1, bitmap, cliprect, 0, 0);
/* Draw the road */
- if (video_on)
+ if (video_on)
hotchase_draw_road(screen->machine, bitmap, cliprect);
/* Draw the sprites */
- if (video_on)
+ if (video_on)
sprite_draw(bitmap,cliprect);
/* Draw the foreground (text) */
- if (video_on)
+ if (video_on)
k051316_zoom_draw(k051316_2, bitmap, cliprect, 0, 0);
return 0;
}
diff --git a/src/version.c b/src/version.c
index 3dcf49f0a4b..3f0f91a8282 100644
--- a/src/version.c
+++ b/src/version.c
@@ -10,4 +10,4 @@
***************************************************************************/
extern const char build_version[];
-const char build_version[] = "0.135u3 ("__DATE__")";
+const char build_version[] = "0.135u4 ("__DATE__")";