From 0e20c8051703bf8745ed47a6f44983c9c94355cf Mon Sep 17 00:00:00 2001 From: Aaron Giles Date: Mon, 31 Dec 2007 02:22:13 +0000 Subject: [PATCH] Bumped version to 0.122u2. Spacing cleanups. --- src/emu/cpu/sh4/sh4.c | 12 +- src/emu/cpu/tms32031/tms32031.c | 12 +- src/emu/sound/5110intf.c | 4 +- src/emu/sound/disc_dev.c | 4 +- src/emu/sound/discrete.h | 24 ++-- src/emu/sound/tms5110.c | 154 +++++++++++------------ src/emu/sound/tms5110r.c | 8 +- src/mame/audio/dkong.c | 142 ++++++++++----------- src/mame/drivers/cabal.c | 2 +- src/mame/drivers/dec0.c | 2 +- src/mame/drivers/dkong.c | 30 ++--- src/mame/drivers/midzeus.c | 10 +- src/mame/drivers/rohga.c | 2 +- src/mame/drivers/seibuspi.c | 6 +- src/mame/drivers/seta.c | 2 +- src/mame/drivers/tx1.c | 2 +- src/mame/video/midvunit.c | 2 +- src/mame/video/midzeus.c | 8 +- src/mame/video/midzeus2.c | 210 ++++++++++++++++---------------- src/version.c | 2 +- 20 files changed, 319 insertions(+), 319 deletions(-) diff --git a/src/emu/cpu/sh4/sh4.c b/src/emu/cpu/sh4/sh4.c index aeae6d7a924..4f0d501f403 100644 --- a/src/emu/cpu/sh4/sh4.c +++ b/src/emu/cpu/sh4/sh4.c @@ -48,9 +48,9 @@ #define FP_XFD(r) *( (double *)(sh4.xf+(r)) ) // double precision extended floating point register r #ifdef LSB_FIRST #define FP_RS2(r) sh4.fr[(r) ^ sh4.fpu_pr] -#define FP_RFS2(r) *( (float *)(sh4.fr+((r) ^ sh4.fpu_pr)) ) +#define FP_RFS2(r) *( (float *)(sh4.fr+((r) ^ sh4.fpu_pr)) ) #define FP_XS2(r) sh4.xf[(r) ^ sh4.fpu_pr] -#define FP_XFS2(r) *( (float *)(sh4.xf+((r) ^ sh4.fpu_pr)) ) +#define FP_XFS2(r) *( (float *)(sh4.xf+((r) ^ sh4.fpu_pr)) ) #endif typedef struct @@ -3094,13 +3094,13 @@ INLINE void FMOVFR(UINT32 m,UINT32 n) /* FLDI1 FRn 1111nnnn10011101 */ INLINE void FLDI1(UINT32 n) { - sh4.fr[n] = 0x3F800000; + sh4.fr[n] = 0x3F800000; } /* FLDI0 FRn 1111nnnn10001101 */ INLINE void FLDI0(UINT32 n) { - sh4.fr[n] = 0; + sh4.fr[n] = 0; } /* FLDS FRm,FPUL 1111mmmm00011101 */ @@ -3233,10 +3233,10 @@ INLINE void FCNVDS(UINT32 n) if (sh4.fpu_pr) { /* PR = 1 */ n = n & 14; #ifdef LSB_FIRST - if (sh4.fpscr & RM) + if (sh4.fpscr & RM) sh4.fr[n] &= 0xe0000000; /* round toward zero*/ #else - if (sh4.fpscr & RM) + if (sh4.fpscr & RM) sh4.fr[n | 1] &= 0xe0000000; /* round toward zero*/ #endif *((float *)&sh4.fpul) = (float)FP_RFD(n); diff --git a/src/emu/cpu/tms32031/tms32031.c b/src/emu/cpu/tms32031/tms32031.c index 8e31ba8840c..a3979dfa4c9 100644 --- a/src/emu/cpu/tms32031/tms32031.c +++ b/src/emu/cpu/tms32031/tms32031.c @@ -318,8 +318,8 @@ static void check_irqs(void) int i; /* external interrupts are level-sensitive on the '31 and can be - configured as such on the '32; in that case, if the external - signal is high, we need to update the value in IF accordingly */ + configured as such on the '32; in that case, if the external + signal is high, we need to update the value in IF accordingly */ if (!tms32031.is_32032 || (IREG(TMR_ST) & 0x4000) == 0) IREG(TMR_IF) |= tms32031.irq_state & 0x0f; @@ -341,13 +341,13 @@ static void check_irqs(void) if (!tms32031.delayed) { UINT16 intmask = 1 << (whichtrap - 1); - + /* bit in IF is cleared when interrupt is taken */ IREG(TMR_IF) &= ~intmask; trap(whichtrap); - + /* after auto-clearing the interrupt bit, we need to re-trigger - level-sensitive interrupts */ + level-sensitive interrupts */ if (!tms32031.is_32032 || (IREG(TMR_ST) & 0x4000) == 0) IREG(TMR_IF) |= tms32031.irq_state & 0x0f; } @@ -359,7 +359,7 @@ static void check_irqs(void) static void set_irq_line(int irqline, int state) { UINT16 intmask = 1 << irqline; - + /* ignore anything out of range */ if (irqline >= 12) return; diff --git a/src/emu/sound/5110intf.c b/src/emu/sound/5110intf.c index 472a5ef02c8..6cb4641c293 100644 --- a/src/emu/sound/5110intf.c +++ b/src/emu/sound/5110intf.c @@ -40,7 +40,7 @@ static int speech_rom_read_bit(void) const UINT8 *table = memory_region(info->intf->rom_region); int r; - + if (info->speech_rom_bitnum<0) r = 0; else @@ -55,7 +55,7 @@ static void speech_rom_set_addr(int addr) { struct tms5110_info *info = sndti_token(SOUND_TMS5110, 0); - info->speech_rom_bitnum = addr * 8 - 1; + info->speech_rom_bitnum = addr * 8 - 1; } /****************************************************************************** diff --git a/src/emu/sound/disc_dev.c b/src/emu/sound/disc_dev.c index f86b7da66c0..83531d86ea8 100644 --- a/src/emu/sound/disc_dev.c +++ b/src/emu/sound/disc_dev.c @@ -1395,7 +1395,7 @@ void dsd_566_reset(node_description *node) #define DSD_LS624__C (*(node->input[3])) #define DSD_LS624__OUTTYPE (*(node->input[4])) -/* +/* * These formulas are derived from diagrams in the datasheet! * They are not based on any law. The function is not * described anywhere. @@ -1459,7 +1459,7 @@ void dsd_ls624_reset(node_description *node) context->remain = 0; context->state = 0; context->outtype = DSD_LS624__OUTTYPE; - + /* Step the output */ dsd_ls624_step(node); } diff --git a/src/emu/sound/discrete.h b/src/emu/sound/discrete.h index 753d8e5fd29..01fcac9598b 100644 --- a/src/emu/sound/discrete.h +++ b/src/emu/sound/discrete.h @@ -2932,13 +2932,13 @@ * DISCRETE_74LS624 - VCO. * * Simplified 74LS624 - calculated frequencies should match datasheet - * for C > 1nF. Output is Logic (1/0) - * + * for C > 1nF. Output is Logic (1/0) + * * The datasheet gives no formulae. The implementation therefore is - * a rough model of the diagrams given. - * + * a rough model of the diagrams given. + * * For a LS628, use VRng = 3.2 - * + * * V+ * | * .---------. @@ -2953,7 +2953,7 @@ * | | | * '---|CX2 | * '---------' - * | + * | * GND * * Declaration syntax @@ -2963,14 +2963,14 @@ * vMod node or static value, * vRng node or static value, * C node or static value in Farads, - * Type of output static value) - * + * Type of output static value) + * * Type of Output - * DISC_LS624_OUT_ENERGY Energy - use for audio output + * DISC_LS624_OUT_ENERGY Energy - use for audio output * DISC_LS624_OUT_LOGIC Logic ( 0 or 1) - * DISC_LS624_OUT_COUNT_F Number of Falling edges - * DISC_LS624_OUT_COUNT_R Number of Rising edges - * + * DISC_LS624_OUT_COUNT_F Number of Falling edges + * DISC_LS624_OUT_COUNT_R Number of Rising edges + * *********************************************************************** * * DISCRETE_CUSTOMx - Link to custom code diff --git a/src/emu/sound/tms5110.c b/src/emu/sound/tms5110.c index 8d012cc09a8..fac34537080 100644 --- a/src/emu/sound/tms5110.c +++ b/src/emu/sound/tms5110.c @@ -1,57 +1,57 @@ /********************************************************************************************** - TMS5110 simulator (modified from TMS5220 by Jarek Burczynski) + TMS5110 simulator (modified from TMS5220 by Jarek Burczynski) - Written for MAME by Frank Palazzolo - With help from Neill Corlett - Additional tweaking by Aaron Giles - Various fixes by Lord Nightmare - Additional enhancements by Couriersud - - Todo: - - implement CS - - implement missing commands - - TMS5100: - - +-----------------+ - TST | 1 28 | CS - PDC | 2 27 | CTL8 - ROM CK | 3 26 | ADD8 - CPU CK | 4 25 | CTL1 - VDD | 5 24 | ADD1 - CR OSC | 6 23 | CTL2 - RC OSC | 7 22 | ADD2 - T11 | 8 21 | ADD4 - NC | 9 20 | CTL4 - I/O | 10 19 | M1 - SPK1 | 11 18 | NC - SPK2 | 12 17 | NC - PROM OUT | 13 16 | NC - VSS | 14 15 | M0 - +-----------------+ + Written for MAME by Frank Palazzolo + With help from Neill Corlett + Additional tweaking by Aaron Giles + Various fixes by Lord Nightmare + Additional enhancements by Couriersud - M58817 + Todo: + - implement CS + - implement missing commands - The following connections could be derived from radar scope schematics. - The M58817 is not 100% pin compatible to the 5100, but really close. + TMS5100: - +-----------------+ - (NC) | 1 28 | CS - PDC | 2 27 | CTL8 - ROM CK | 3 26 | ADD8 (to 58819) - (NC) | 4 25 | CTL1 - (VDD,-5) | 5 24 | ADD1 (to 58819) - (GND) | 6 23 | CTL2 - Xin | 7 22 | ADD2 (to 58819) - Xout | 8 21 | ADD4 (to 58819) - (NC) | 9 20 | CTL4 - (VDD,-5) | 10 19 | Status back to CPU - (NC) | 11 18 | C1 (to 58819) - SPKR | 12 17 | (NC) - SPKR | 13 16 | C0 (to 58819) - (NC) | 14 15 | (5V) - +-----------------+ + +-----------------+ + TST | 1 28 | CS + PDC | 2 27 | CTL8 + ROM CK | 3 26 | ADD8 + CPU CK | 4 25 | CTL1 + VDD | 5 24 | ADD1 + CR OSC | 6 23 | CTL2 + RC OSC | 7 22 | ADD2 + T11 | 8 21 | ADD4 + NC | 9 20 | CTL4 + I/O | 10 19 | M1 + SPK1 | 11 18 | NC + SPK2 | 12 17 | NC + PROM OUT | 13 16 | NC + VSS | 14 15 | M0 + +-----------------+ + + M58817 + + The following connections could be derived from radar scope schematics. + The M58817 is not 100% pin compatible to the 5100, but really close. + + +-----------------+ + (NC) | 1 28 | CS + PDC | 2 27 | CTL8 + ROM CK | 3 26 | ADD8 (to 58819) + (NC) | 4 25 | CTL1 + (VDD,-5) | 5 24 | ADD1 (to 58819) + (GND) | 6 23 | CTL2 + Xin | 7 22 | ADD2 (to 58819) + Xout | 8 21 | ADD4 (to 58819) + (NC) | 9 20 | CTL4 + (VDD,-5) | 10 19 | Status back to CPU + (NC) | 11 18 | C1 (to 58819) + SPKR | 12 17 | (NC) + SPKR | 13 16 | C0 (to 58819) + (NC) | 14 15 | (5V) + +-----------------+ ***********************************************************************************************/ @@ -263,7 +263,7 @@ void tms5110_reset_chip(void *chip) /****************************************************************************************** - tms5110_set_M0_callback -- set M0 callback for the TMS5110 + tms5110_set_M0_callback -- set M0 callback for the TMS5110 ******************************************************************************************/ @@ -275,7 +275,7 @@ void tms5110_set_M0_callback(void *chip, int (*func)(void)) /****************************************************************************************** - tms5110_set_load_address -- set M0 callback for the TMS5110 + tms5110_set_load_address -- set M0 callback for the TMS5110 ******************************************************************************************/ @@ -287,7 +287,7 @@ void tms5110_set_load_address(void *chip, void (*func)(int)) /****************************************************************************************** - FIFO_data_write -- handle bit data write to the TMS5110 (as a result of toggling M0 pin) + FIFO_data_write -- handle bit data write to the TMS5110 (as a result of toggling M0 pin) ******************************************************************************************/ static void FIFO_data_write(struct tms5110 *tms, int data) @@ -310,7 +310,7 @@ static void FIFO_data_write(struct tms5110 *tms, int data) /****************************************************************************************** - extract_bits -- extract a specific number of bits from the FIFO + extract_bits -- extract a specific number of bits from the FIFO ******************************************************************************************/ @@ -359,14 +359,14 @@ static void perform_dummy_read(struct tms5110 *tms) /********************************************************************************************** - tms5110_status_read -- read status from the TMS5110 + tms5110_status_read -- read status from the TMS5110 - bit 0 = TS - Talk Status is active (high) when the VSP is processing speech data. - Talk Status goes active at the initiation of a SPEAK command. - It goes inactive (low) when the stop code (Energy=1111) is processed, or - immediately(?????? not TMS5110) by a RESET command. - TMS5110 datasheets mention this is only available as a result of executing - TEST TALK command. + bit 0 = TS - Talk Status is active (high) when the VSP is processing speech data. + Talk Status goes active at the initiation of a SPEAK command. + It goes inactive (low) when the stop code (Energy=1111) is processed, or + immediately(?????? not TMS5110) by a RESET command. + TMS5110 datasheets mention this is only available as a result of executing + TEST TALK command. ***********************************************************************************************/ @@ -383,7 +383,7 @@ int tms5110_status_read(void *chip) /********************************************************************************************** - tms5110_ready_read -- returns the ready state of the TMS5110 + tms5110_ready_read -- returns the ready state of the TMS5110 ***********************************************************************************************/ @@ -397,7 +397,7 @@ int tms5110_ready_read(void *chip) /********************************************************************************************** - tms5110_process -- fill the buffer with a specific number of samples + tms5110_process -- fill the buffer with a specific number of samples ***********************************************************************************************/ @@ -418,12 +418,12 @@ void tms5110_process(void *chip, INT16 *buffer, unsigned int size) /* a "dummy read" is mentioned in the tms5200 datasheet */ /* The Bagman speech roms data are organized in such a way that - ** the bit at address 0 is NOT a speech data. The bit at address 1 - ** is the speech data. It seems that the tms5110 performs a dummy read - ** just before it executes a SPEAK command. - ** This has been moved to command logic ... - ** perform_dummy_read(tms); - */ + ** the bit at address 0 is NOT a speech data. The bit at address 1 + ** is the speech data. It seems that the tms5110 performs a dummy read + ** just before it executes a SPEAK command. + ** This has been moved to command logic ... + ** perform_dummy_read(tms); + */ /* clear out the new frame parameters (it will become old frame just before the first call to parse_frame() ) */ tms->new_energy = 0; @@ -486,9 +486,9 @@ void tms5110_process(void *chip, INT16 *buffer, unsigned int size) else if ((tms->old_energy == 0) && (tms->new_energy != 0)) /* was the old frame a zero-energy frame? */ { /* if so, and if the new frame is non-zero energy frame then the new parameters - should become our current and target parameters immediately, - i.e. we should NOT interpolate them slowly in. - */ + should become our current and target parameters immediately, + i.e. we should NOT interpolate them slowly in. + */ /*logerror("processing non-zero energy frame after zero-energy frame\n");*/ tms->target_energy = tms->new_energy; @@ -499,8 +499,8 @@ void tms5110_process(void *chip, INT16 *buffer, unsigned int size) else if ((tms->old_pitch == 0) && (tms->new_pitch != 0)) /* is this a change from unvoiced to voiced frame ? */ { /* if so, then the new parameters should become our current and target parameters immediately, - i.e. we should NOT interpolate them slowly in. - */ + i.e. we should NOT interpolate them slowly in. + */ /*if (DEBUG_5110) logerror("processing frame: UNVOICED->VOICED frame change\n");*/ tms->target_energy = tms->new_energy; tms->target_pitch = tms->current_pitch = tms->new_pitch; @@ -510,8 +510,8 @@ void tms5110_process(void *chip, INT16 *buffer, unsigned int size) else if ((tms->old_pitch != 0) && (tms->new_pitch == 0)) /* is this a change from voiced to unvoiced frame ? */ { /* if so, then the new parameters should become our current and target parameters immediately, - i.e. we should NOT interpolate them slowly in. - */ + i.e. we should NOT interpolate them slowly in. + */ /*if (DEBUG_5110) logerror("processing frame: VOICED->UNVOICED frame change\n");*/ tms->target_energy = tms->new_energy; tms->target_pitch = tms->current_pitch = tms->new_pitch; @@ -662,7 +662,7 @@ empty: /****************************************************************************************** - CTL_set -- set CTL pins named CTL1, CTL2, CTL4 and CTL8 + CTL_set -- set CTL pins named CTL1, CTL2, CTL4 and CTL8 ******************************************************************************************/ @@ -674,7 +674,7 @@ void tms5110_CTL_set(void *chip, int data) /****************************************************************************************** - PDC_set -- set Processor Data Clock. Execute CTL_pins command on hi-lo transition. + PDC_set -- set Processor Data Clock. Execute CTL_pins command on hi-lo transition. ******************************************************************************************/ @@ -740,7 +740,7 @@ void tms5110_PDC_set(void *chip, int data) /****************************************************************************************** - parse_frame -- parse a new frame's worth of data; returns 0 if not enough bits in buffer + parse_frame -- parse a new frame's worth of data; returns 0 if not enough bits in buffer ******************************************************************************************/ diff --git a/src/emu/sound/tms5110r.c b/src/emu/sound/tms5110r.c index 58f8bace789..6dbcf709807 100644 --- a/src/emu/sound/tms5110r.c +++ b/src/emu/sound/tms5110r.c @@ -10,10 +10,10 @@ * 4234761 * 4189779 * 4449233 - * + * * All patents give interpolation coefficients - * { 8, 8, 8, 4, 4, 2, 2, 1 } - * This sequence will not calculate the published + * { 8, 8, 8, 4, 4, 2, 2, 1 } + * This sequence will not calculate the published * fractions: * 1 8 0.125 * 2 8 0.234 @@ -23,7 +23,7 @@ * 6 2 0.717 * 7 2 0.859 * 0 1 1.000 - * + * * Instead, { 8, 8, 8, 4, 4, 4, 2, 1 } * will calculate those coefficients and this has been used below. */ diff --git a/src/mame/audio/dkong.c b/src/mame/audio/dkong.c index 2fa86a92a48..1da73dbef7a 100644 --- a/src/mame/audio/dkong.c +++ b/src/mame/audio/dkong.c @@ -650,7 +650,7 @@ DISCRETE_SOUND_END #define JR_C15 CAP_U(22) #define JR_C16 CAP_U(3.3) #define JR_C17 CAP_U(3.3) // ??? illegible -#define JR_C18 CAP_N(22) +#define JR_C18 CAP_N(22) #define JR_C19 CAP_N(4.7) #define JR_C20 CAP_U(0.12) #define JR_C21 CAP_N(56) @@ -680,7 +680,7 @@ DISCRETE_SOUND_END DISCRETE_ONESHOTR(_N, 0, _T, TTL_HIGH, (0.33 * (_R) * (_C) * (1.0+700./(_R))), DISC_ONESHOT_RETRIG | DISC_ONESHOT_REDGE | DISC_OUT_ACTIVE_LOW) #define DISCRETE_BITSET(_N, _N1, _B) DISCRETE_TRANSFORM3(_N, 1, _N1, 1 << ((_B)-1), 0, "01&2>") -#define DISCRETE_ENERGY_NAND(_N, _E, _N1, _N2) DISCRETE_TRANSFORM3(_N, _E, _N1, _N2, 1, "201*-") +#define DISCRETE_ENERGY_NAND(_N, _E, _N1, _N2) DISCRETE_TRANSFORM3(_N, _E, _N1, _N2, 1, "201*-") static const discrete_mixer_desc dkongjr_mixer_desc = {DISC_MIXER_IS_RESISTOR, @@ -743,34 +743,34 @@ static DISCRETE_SOUND_START(dkongjr) DISCRETE_LOGIC_INVERT(DS_SOUND7,1,DS_SOUND7_INV) DISCRETE_LOGIC_INVERT(DS_SOUND9,1,DS_SOUND9_INV) - + /************************************************/ /* SOUND1 */ /************************************************/ - - DISCRETE_LS123(NODE_10, DS_SOUND1_INV, JR_R9, JR_C15) + + DISCRETE_LS123(NODE_10, DS_SOUND1_INV, JR_R9, JR_C15) DISCRETE_TRANSFORM2(NODE_11,1,NODE_104,TTL_HIGH,"0!1*") DISCRETE_LOGIC_INVERT(NODE_12,1,NODE_10) DISCRETE_MIXER2(NODE_13, 1, NODE_10, NODE_11, &dkongjr_s1_mixer_desc) DISCRETE_74LS624( NODE_14, 1, NODE_13, 0.98*DK_SUP_V, JR_C22, DISC_LS624_OUT_ENERGY) DISCRETE_RCDISC_MODULATED(NODE_15, 1, NODE_12, NODE_14, 120, JR_R27, RES_K(0.001), JR_R28, JR_C28, DK_SUP_V) /* The following circuit does not match 100%, however works. - * To be exact, we need a C-R-C-R circuit, we actually do not have. - */ + * To be exact, we need a C-R-C-R circuit, we actually do not have. + */ DISCRETE_CRFILTER_VREF(NODE_16, 1, NODE_15, JR_R4, JR_C23, 2.5) DISCRETE_RCFILTER(DS_OUT_SOUND1, 1, NODE_16, JR_R19, JR_C21) - + /************************************************/ /* SOUND2 */ /************************************************/ DISCRETE_74LS624( NODE_20, 1, 0, 0.98*DK_SUP_V, JR_C20, DISC_LS624_OUT_COUNT_F) DISCRETE_LFSR_NOISE(NODE_21, 1, 1, NODE_20, 1.0, 0, 0.5, &dkongjr_lfsr) - DISCRETE_LS123_INV(NODE_25, DS_SOUND2_INV, JR_R17, JR_C27) + DISCRETE_LS123_INV(NODE_25, DS_SOUND2_INV, JR_R17, JR_C27) DISCRETE_RCDISC_MODULATED(NODE_26, 1, NODE_25, NODE_21, 120, JR_R24, RES_K(0.001), JR_R18, JR_C29, DK_SUP_V) /* The following circuit does not match 100%, however works. - * To be exact, we need a C-R-C-R circuit, we actually do not have. - */ + * To be exact, we need a C-R-C-R circuit, we actually do not have. + */ DISCRETE_CRFILTER_VREF(NODE_27, 1, NODE_26, JR_R6, JR_C30, 2.5) DISCRETE_RCFILTER(DS_OUT_SOUND2, 1, NODE_27, JR_R2, JR_C25) @@ -783,37 +783,37 @@ static DISCRETE_SOUND_START(dkongjr) DISCRETE_74LS624( NODE_92, 1, NODE_91, DK_SUP_V, JR_C37, DISC_LS624_OUT_ENERGY) DISCRETE_ENERGY_NAND(NODE_93, 1, NODE_92, DS_SOUND9) DISCRETE_MULTIPLY(DS_OUT_SOUND9, 1, NODE_93, TTL_HIGH) - + /************************************************/ /* SOUND0 / SOUND7 */ /************************************************/ - DISCRETE_COUNTER(NODE_100,1,0,NODE_118,0xFFFF,DISC_COUNT_UP,0,DISC_CLK_BY_COUNT) - + DISCRETE_COUNTER(NODE_100,1,0,NODE_118,0xFFFF,DISC_COUNT_UP,0,DISC_CLK_BY_COUNT) + DISCRETE_BITSET(NODE_101, NODE_100, 7) //LS157 2A DISCRETE_BITSET(NODE_102, NODE_100, 4) //LS157 2B DISCRETE_BITSET(NODE_103, NODE_100, 13) //LS157 3A DISCRETE_BITSET(NODE_104, NODE_100, 12) //LS157 3B /* LS157 Switches */ - DISCRETE_SWITCH(NODE_105, 1, DS_SOUND7_INV, GND, NODE_113) // Switch 1 from LS624 - DISCRETE_SWITCH(NODE_106, 1, DS_SOUND7_INV, NODE_101, NODE_102) // Switch 2 - DISCRETE_SWITCH(NODE_107, 1, DS_SOUND7_INV, NODE_103, NODE_104) // Switch 3 + DISCRETE_SWITCH(NODE_105, 1, DS_SOUND7_INV, GND, NODE_113) // Switch 1 from LS624 + DISCRETE_SWITCH(NODE_106, 1, DS_SOUND7_INV, NODE_101, NODE_102) // Switch 2 + DISCRETE_SWITCH(NODE_107, 1, DS_SOUND7_INV, NODE_103, NODE_104) // Switch 3 - DISCRETE_LS123(NODE_110, DS_SOUND0_INV, JR_R8, JR_C14) + DISCRETE_LS123(NODE_110, DS_SOUND0_INV, JR_R8, JR_C14) DISCRETE_TRANSFORM2(NODE_111, 1, TTL_HIGH, NODE_110, "01-") DISCRETE_RCFILTER(NODE_112, 1, NODE_111, JR_R10, JR_C17) - DISCRETE_74LS624(NODE_113, 1, NODE_112, DK_SUP_V, JR_C18, DISC_LS624_OUT_ENERGY) + DISCRETE_74LS624(NODE_113, 1, NODE_112, DK_SUP_V, JR_C18, DISC_LS624_OUT_ENERGY) DISCRETE_LOGIC_XOR(NODE_115, 1, NODE_105, NODE_106) DISCRETE_TRANSFORM2(NODE_116,1, NODE_107, TTL_HIGH, "0!1*") DISCRETE_RCFILTER(NODE_117, 1, NODE_116, JR_R11, JR_C16) DISCRETE_74LS624(NODE_118, 1, NODE_117, DK_SUP_V, JR_C19, DISC_LS624_OUT_COUNT_F) - + DISCRETE_LOGIC_NAND(NODE_120, 1, NODE_115, NODE_110) DISCRETE_MULTIPLY(DS_OUT_SOUND0, 1, NODE_120, TTL_HIGH) - + /************************************************/ /* DAC */ /************************************************/ @@ -838,12 +838,12 @@ static DISCRETE_SOUND_START(dkongjr) DISCRETE_MIXER5(NODE_288, 1, DS_OUT_SOUND9, DS_OUT_SOUND0, DS_OUT_SOUND2, DS_OUT_SOUND1, DS_OUT_DAC, &dkongjr_mixer_desc) - /* Amplifier: internal amplifier - * Just a 1:n amplifier without filters - just the output filter - */ + /* Amplifier: internal amplifier + * Just a 1:n amplifier without filters - just the output filter + */ DISCRETE_CRFILTER(NODE_295,1,NODE_288, 1000, JR_C13) DISCRETE_OUTPUT(NODE_295, 32767.0/5.0 * 10) - + DISCRETE_SOUND_END /**************************************************************** @@ -918,15 +918,15 @@ Addresses found at @0x510, cpu2 5: 10 10 10 trouble, trouble, trouble 6: 12 12 all pilots climb up 7: 20 engine trouble - - PA5 ==> CS 28 - PA4 ==> PDC 2 - PA0 ==> CTL1 25 - PA1 ==> CTL2 23 - PA2 ==> CTL4 20 - PA3 ==> CTL8 27 - M1 19 ==> PA6 M1 on TMS5100 - + + PA5 ==> CS 28 + PA4 ==> PDC 2 + PA0 ==> CTL1 25 + PA1 ==> CTL2 23 + PA2 ==> CTL4 20 + PA3 ==> CTL8 27 + M1 19 ==> PA6 M1 on TMS5100 + 12,13 Speaker 7,8 Xin, Xout (5100: RC-OSC, T11) 24 A0 (5100: ADD1) @@ -936,33 +936,33 @@ Addresses found at @0x510, cpu2 16 C0 (5100: NC) 18 C1 (5100: NC) 3 CLK (5100: ROM-CK) - - For documentation purposes: - - Addresses - { 0x0000, 0x007a, 0x018b, 0x0320, 0x036c, 0x03c4, 0x041c, 0x0520, 0x063e } - and related samples interface - - static const char *const radarsc1_sample_names[] = - { - "*radarsc1", - "10.wav", - "12.wav", - "14.wav", - "16.wav", - "18.wav", - "1A.wav", - "1C.wav", - "1E.wav", - "20.wav", - 0 - }; - - static const struct Samplesinterface radarsc1_samples_interface = - { - 8, - radarsc1_sample_names - }; + + For documentation purposes: + + Addresses + { 0x0000, 0x007a, 0x018b, 0x0320, 0x036c, 0x03c4, 0x041c, 0x0520, 0x063e } + and related samples interface + + static const char *const radarsc1_sample_names[] = + { + "*radarsc1", + "10.wav", + "12.wav", + "14.wav", + "16.wav", + "18.wav", + "1A.wav", + "1C.wav", + "1E.wav", + "20.wav", + 0 + }; + + static const struct Samplesinterface radarsc1_samples_interface = + { + 8, + radarsc1_sample_names + }; */ @@ -971,7 +971,7 @@ static WRITE8_HANDLER( M58817_command_w ) logerror("PA Write %x\n", data); tms5110_CTL_w(0, data & 0x0f); - tms5110_PDC_w(0, (data>>4) & 0x01); + tms5110_PDC_w(0, (data>>4) & 0x01); // FIXME 0x20 is CS } @@ -1004,16 +1004,16 @@ static READ8_HANDLER( dkong_sh_t1_r ) static WRITE8_HANDLER( dkong_voice_w ) { /* only provided for documentation purposes - * not actually used - */ + * not actually used + */ logerror("dkong_speech_w: 0x%02x\n", data); } static READ8_HANDLER( dkong_voice_status_r ) { /* only provided for documentation purposes - * not actually used - */ + * not actually used + */ return 0; } @@ -1022,7 +1022,7 @@ static READ8_HANDLER( dkong_sh_tune_r ) dkong_state *state = Machine->driver_data; UINT8 *SND = memory_region(REGION_CPU2); - if ( state->page & 0x40 ) + if ( state->page & 0x40 ) { return (soundlatch_r(0) & 0x0F) | (dkong_voice_status_r(0)<<4); } @@ -1166,10 +1166,10 @@ WRITE8_HANDLER( dkongjr_snd_w1 ) I8035_P2_W_AL(5,data & 1); break; case 4: /* Port 4 write */ - I8035_T_W_AL(1, data & 1); + I8035_T_W_AL(1, data & 1); break; case 5: /* Port 5 write */ - I8035_T_W_AL(0, data & 1); + I8035_T_W_AL(0, data & 1); break; case 6: /* Port 6 write ==> PB 4 */ I8035_P2_W_AL(4,data & 1); @@ -1201,7 +1201,7 @@ static ADDRESS_MAP_START( dkong_sound_map, ADDRESS_SPACE_PROGRAM, 8 ) ADDRESS_MAP_END static ADDRESS_MAP_START( dkong_sound_io_map, ADDRESS_SPACE_IO, 8 ) - AM_RANGE(0x00, 0xff) AM_READWRITE(dkong_sh_tune_r, dkong_voice_w) + AM_RANGE(0x00, 0xff) AM_READWRITE(dkong_sh_tune_r, dkong_voice_w) AM_RANGE(I8039_bus, I8039_bus) AM_READWRITE(dkong_sh_tune_r, dkong_voice_w) AM_RANGE(I8039_p1, I8039_p1) AM_READWRITE(dkong_sh_p1_r, dkong_sh_p1_w) AM_RANGE(I8039_p2, I8039_p2) AM_READWRITE(dkong_sh_p2_r, dkong_sh_p2_w) @@ -1314,7 +1314,7 @@ MACHINE_DRIVER_START( dkongjr_audio ) MDRV_SOUND_RESET(dkong) MDRV_SPEAKER_STANDARD_MONO("mono") - + MDRV_SOUND_ADD_TAG("discrete", DISCRETE, 0) MDRV_SOUND_CONFIG_DISCRETE(dkongjr) MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) diff --git a/src/mame/drivers/cabal.c b/src/mame/drivers/cabal.c index e9a8924d342..d69a2ec45bd 100644 --- a/src/mame/drivers/cabal.c +++ b/src/mame/drivers/cabal.c @@ -550,7 +550,7 @@ static MACHINE_DRIVER_START( cabal ) MDRV_CPU_VBLANK_INT(irq1_line_hold,1) MDRV_CPU_ADD(Z80, 3579580) /* verified on pcb */ - /* audio CPU */ + /* audio CPU */ MDRV_CPU_PROGRAM_MAP(readmem_sound,writemem_sound) MDRV_SCREEN_REFRESH_RATE(60) diff --git a/src/mame/drivers/dec0.c b/src/mame/drivers/dec0.c index 10949f68923..7cf6aa13286 100644 --- a/src/mame/drivers/dec0.c +++ b/src/mame/drivers/dec0.c @@ -1240,7 +1240,7 @@ static MACHINE_DRIVER_START( midres ) MDRV_CPU_PROGRAM_MAP(midres_readmem,midres_writemem) MDRV_CPU_VBLANK_INT(irq6_line_hold,1)/* VBL */ - MDRV_CPU_ADD(H6280, 24000000/4/3) + MDRV_CPU_ADD(H6280, 24000000/4/3) /* audio CPU */ /* verified on pcb (6Mhz is XIN on pin 10 of H6280, pin 14 (HSM) is high so XIN/3 */ MDRV_CPU_PROGRAM_MAP(midres_s_readmem,midres_s_writemem) diff --git a/src/mame/drivers/dkong.c b/src/mame/drivers/dkong.c index 128f9dfa827..ab9b41cff91 100644 --- a/src/mame/drivers/dkong.c +++ b/src/mame/drivers/dkong.c @@ -4,18 +4,18 @@ TODO: - write a shootgal palette_init - Pestplce colors and origin -- Shooting Gallery: Shootgal.txt mentions speech pcb, +- Shooting Gallery: Shootgal.txt mentions speech pcb, mikesarcade.com dk conversion - Clarify - 8ballact: read 1507 no mapped - dkong3 dma (Z80 dma) -- implement 74LS259 (8bit addressable latches), +- implement 74LS259 (8bit addressable latches), 74LS175 (QUAD D FlipFlop), 74LS373 (Octal transparent latch) Done: - dkongjr discrete interface - when i am retired: implement 8257 DMA controller - drakton - add dkongjr conversion -- for documentation: hook up speech interface still present on radarscp (TRS02) +- for documentation: hook up speech interface still present on radarscp (TRS02) and early dkong (TKG02/TKG03) pcbs. - radarscp_grid_color_w() is wrong, it probably isn't supposed to change the grid color. There are reports of the grid being constantly blue in @@ -59,12 +59,12 @@ Done: Couriersud: 12/2007 - - Cosmetic changes - - Fixed regression in radarscp sound - - Added dipswitch locations to dkong3b - - Added dkongjr discrete sound - - Proper interface Z80 - I8035 for dkongjr - - Changed discrete sound output factors + - Cosmetic changes + - Fixed regression in radarscp sound + - Added dipswitch locations to dkong3b + - Added dkongjr discrete sound + - Proper interface Z80 - I8035 for dkongjr + - Changed discrete sound output factors - changed dkong/radarscp based games to use hardware-conformant I8035 memory maps - Added drakton clone drktnjr on dkongjr hardware - wrote M58817 sound driver and hooked it up @@ -505,7 +505,7 @@ static READ8_HANDLER( dkong_in2_r ) { UINT8 r; -#if DEBUG_DISC_SOUND +#if DEBUG_DISC_SOUND static UINT8 ui_snd = 0; static UINT8 lst = 0; if (!lst && (readinputportbytag("TST") & 0x01)) @@ -519,7 +519,7 @@ static READ8_HANDLER( dkong_in2_r ) else dkongjr_snd_w2(ui_snd-8, (readinputportbytag("TST") & 0x02)>>1); #endif - + r = (readinputportbytag("IN2") & 0xBF) | (dkong_audio_status_r(0) << 6); coin_counter_w(offset, r >> 7); if (r & 0x10) @@ -1054,11 +1054,11 @@ static INPUT_PORTS_START( dkongjr ) PORT_INCLUDE( dkong_in1_4 ) PORT_INCLUDE( dkong_in2 ) PORT_INCLUDE( dkong_dsw0 ) - -#if DEBUG_DISC_SOUND + +#if DEBUG_DISC_SOUND PORT_START_TAG("TST") /* TST */ - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CODE(KEYCODE_A) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CODE(KEYCODE_B) + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CODE(KEYCODE_A) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CODE(KEYCODE_B) #endif INPUT_PORTS_END diff --git a/src/mame/drivers/midzeus.c b/src/mame/drivers/midzeus.c index bd4b888aa91..d7d03063b1c 100644 --- a/src/mame/drivers/midzeus.c +++ b/src/mame/drivers/midzeus.c @@ -62,7 +62,7 @@ static MACHINE_START( midzeus ) gun_timer[0] = timer_alloc(invasn_gun_callback, NULL); gun_timer[1] = timer_alloc(invasn_gun_callback, NULL); - + state_save_register_global(gun_control); state_save_register_global(gun_irq_state); state_save_register_global_array(gun_x); @@ -142,7 +142,7 @@ static WRITE32_HANDLER( cmos_protect_w ) static READ32_HANDLER( timekeeper_r ) { UINT8 result = timekeeper_0_r(offset); -// logerror("%06X:cmos_time_r(%X) = %02X\n", activecpu_get_pc(), offset, result); +// logerror("%06X:cmos_time_r(%X) = %02X\n", activecpu_get_pc(), offset, result); return result; } @@ -151,7 +151,7 @@ static WRITE32_HANDLER( timekeeper_w ) { if (!cmos_protected) { -// logerror("%06X:cmos_time_w(%X) = %02X\n", activecpu_get_pc(), offset, data); +// logerror("%06X:cmos_time_w(%X) = %02X\n", activecpu_get_pc(), offset, data); timekeeper_0_w(offset, data); } cmos_protected = TRUE; @@ -190,7 +190,7 @@ static READ32_HANDLER( zpram_r ) static NVRAM_HANDLER( midzeus2 ) { nvram_handler_timekeeper_0(machine, file, read_or_write); - + if (read_or_write) mame_fwrite(file, zpram, zpram_size); else if (file) @@ -882,7 +882,7 @@ static INPUT_PORTS_START( thegrid ) PORT_START PORT_BIT( 0x00ff, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(custom_49way_r, "49WAYX\0" "49WAYY") PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED ) - + PORT_START_TAG("49WAYX") PORT_BIT( 0xff, 0x38, IPT_AD_STICK_X ) PORT_MINMAX(0x00,0x6f) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) diff --git a/src/mame/drivers/rohga.c b/src/mame/drivers/rohga.c index 1a49f1b1927..7bdccf7d50b 100644 --- a/src/mame/drivers/rohga.c +++ b/src/mame/drivers/rohga.c @@ -861,7 +861,7 @@ static MACHINE_DRIVER_START( wizdfire ) MDRV_CPU_PROGRAM_MAP(wizdfire_readmem,wizdfire_writemem) MDRV_CPU_VBLANK_INT(irq6_line_hold,1) - MDRV_CPU_ADD(H6280,32220000/4/3) + MDRV_CPU_ADD(H6280,32220000/4/3) MDRV_CPU_PROGRAM_MAP(sound_readmem,sound_writemem) MDRV_SCREEN_REFRESH_RATE(58) diff --git a/src/mame/drivers/seibuspi.c b/src/mame/drivers/seibuspi.c index 55bb0d14c66..746dc96414f 100644 --- a/src/mame/drivers/seibuspi.c +++ b/src/mame/drivers/seibuspi.c @@ -26,9 +26,9 @@ NOTES: - rjetus: - - If you get a blank screen on startup you need to press F2 and choose "Reset settings", - followed by "Exit". This will create a proper NVRAM + rjetus: + - If you get a blank screen on startup you need to press F2 and choose "Reset settings", + followed by "Exit". This will create a proper NVRAM TODO: - Alpha blending. Screen shot on www.system16.com show that during attract mode diff --git a/src/mame/drivers/seta.c b/src/mame/drivers/seta.c index c4c7cd7cf2e..ff41b9e60ab 100644 --- a/src/mame/drivers/seta.c +++ b/src/mame/drivers/seta.c @@ -175,7 +175,7 @@ Notes: ROMs - UA0-6 to AU0-13 DIP42 maskROM, read as MX27C2100 (2 Meg) - UA0-2 DIP32 27C1000 EPROM + UA0-2 DIP32 27C1000 EPROM All other ROMs DIP32 read as 27C1000 All ROMs have IC locations, but the PCB also has IC locations so components can be referenced with IC# or location. See above diagram for info. diff --git a/src/mame/drivers/tx1.c b/src/mame/drivers/tx1.c index 91afb8d54e2..7ba385ad19e 100644 --- a/src/mame/drivers/tx1.c +++ b/src/mame/drivers/tx1.c @@ -110,7 +110,7 @@ static WRITE16_HANDLER( z80_shared_w ) *************************************/ static INPUT_PORTS_START( tx1 ) -PORT_START_TAG("DSW") +PORT_START_TAG("DSW") PORT_DIPNAME( 0x001c, 0x0000, DEF_STR( Coin_A ) ) PORT_DIPSETTING( 0x0008, DEF_STR( 3C_1C ) ) PORT_DIPSETTING( 0x0004, DEF_STR( 2C_1C ) ) diff --git a/src/mame/video/midvunit.c b/src/mame/video/midvunit.c index 606d377feb6..293993f9588 100644 --- a/src/mame/video/midvunit.c +++ b/src/mame/video/midvunit.c @@ -56,7 +56,7 @@ struct _poly_extra_data static TIMER_CALLBACK( scanline_timer_cb ) { int scanline = param; - + if (scanline != -1) { cpunum_set_input_line(0, 0, ASSERT_LINE); diff --git a/src/mame/video/midzeus.c b/src/mame/video/midzeus.c index dd7b54b1750..315fde13b83 100644 --- a/src/mame/video/midzeus.c +++ b/src/mame/video/midzeus.c @@ -288,8 +288,8 @@ static void exit_handler(running_machine *machine) { if (i % 4 == 0) fprintf(f, "%03X%03X: ", i / WAVERAM0_WIDTH, i % WAVERAM0_WIDTH); fprintf(f, " %08X %08X ", - WAVERAM_READ32(waveram[0], i*2+0), - WAVERAM_READ32(waveram[0], i*2+1)); + WAVERAM_READ32(waveram[0], i*2+0), + WAVERAM_READ32(waveram[0], i*2+1)); if (i % 4 == 3) fprintf(f, "\n"); } fclose(f); @@ -673,7 +673,7 @@ static void zeus_register_update(offs_t offset) (offset == 0xb2 && (zeusbase[0xb6] & 0x02000000) != 0)) { void *dest; - + if (zeusbase[0xb6] & 0x80000000) dest = waveram1_ptr_from_expanded_addr(zeusbase[0xb4]); else @@ -697,7 +697,7 @@ static void zeus_register_update(offs_t offset) if (zeusbase[0xb6] & 0x00010000) { const UINT32 *src; - + if (zeusbase[0xb6] & 0x80000000) src = waveram1_ptr_from_expanded_addr(zeusbase[0xb4]); else diff --git a/src/mame/video/midzeus2.c b/src/mame/video/midzeus2.c index 2a0ade616e7..844ced0a3c5 100644 --- a/src/mame/video/midzeus2.c +++ b/src/mame/video/midzeus2.c @@ -249,7 +249,7 @@ INLINE UINT8 get_texel_4bit(const void *base, int y, int x, int width) * Video startup * *************************************/ - + static TIMER_CALLBACK( int_timer_callback ) { cpunum_set_input_line(0, 2, ASSERT_LINE); @@ -269,9 +269,9 @@ VIDEO_START( midzeus2 ) add_exit_callback(machine, exit_handler); zeus_renderbase = waveram[1]; - + int_timer = timer_alloc(int_timer_callback, NULL); - + /* save states */ state_save_register_global_pointer(waveram[0], WAVERAM0_WIDTH * WAVERAM0_HEIGHT * 8 / sizeof(waveram[0][0])); state_save_register_global_pointer(waveram[1], WAVERAM1_WIDTH * WAVERAM1_HEIGHT * 12 / sizeof(waveram[1][0])); @@ -296,9 +296,9 @@ static void exit_handler(running_machine *machine) for (i = 0; i < WAVERAM0_WIDTH * WAVERAM0_HEIGHT; i++) { if (i % 4 == 0) fprintf(f, "%03X%03X: ", i / WAVERAM0_WIDTH, i % WAVERAM0_WIDTH); - fprintf(f, " %08X %08X ", - WAVERAM_READ32(waveram[0], i*2+0), - WAVERAM_READ32(waveram[0], i*2+1)); + fprintf(f, " %08X %08X ", + WAVERAM_READ32(waveram[0], i*2+0), + WAVERAM_READ32(waveram[0], i*2+1)); if (i % 4 == 3) fprintf(f, "\n"); } fclose(f); @@ -308,7 +308,7 @@ static void exit_handler(running_machine *machine) { reg_info *info; int regnum; - + for (regnum = 0; regnum < 0x80; regnum++) { printf("Register %02X\n", regnum); @@ -326,7 +326,7 @@ static void exit_handler(running_machine *machine) printf("\t%08X\n", info->value); } } - + for (regnum = 0; regnum < 0x100; regnum++) if (subregwrite_count[regnum] != 0) { @@ -487,7 +487,7 @@ regwrite_count[offset]++; if (regdata_count[offset] < 256) { reg_info **tailptr; - + for (tailptr = ®data[offset]; *tailptr != NULL; tailptr = &(*tailptr)->next) if ((*tailptr)->value == data) break; @@ -633,7 +633,7 @@ static void zeus_register_update(offs_t offset, UINT32 oldval, int logit) else if (logit) logerror("\t[40]=%08X [4E]=%08X\n", zeusbase[0x40], zeusbase[0x4e]); break; - + case 0x51: /* in this mode, crusnexo expects the reads to immediately latch */ @@ -731,7 +731,7 @@ subregwrite_count[which]++; if (subregdata_count[which] < 256) { reg_info **tailptr; - + for (tailptr = &subregdata[which]; *tailptr != NULL; tailptr = &(*tailptr)->next) if ((*tailptr)->value == value) break; @@ -750,11 +750,11 @@ if (subregdata_count[which] < 256) case 0x04: zeus_renderbase = waveram1_ptr_from_expanded_addr(value << 16); break; - + case 0x05: zeus_texbase = value % (WAVERAM0_HEIGHT * WAVERAM0_WIDTH); break; - + case 0x40: zeus_unknown_40 = value & 0xffffff; zeus_quad_size = (zeus_unknown_40 == 0) ? 10 : 14; @@ -773,7 +773,7 @@ if (subregdata_count[which] < 256) static int zeus_fifo_process(const UINT32 *data, int numwords) { int dataoffs = 0; - + /* handle logging */ switch (data[0] >> 24) { @@ -786,28 +786,28 @@ static int zeus_fifo_process(const UINT32 *data, int numwords) if (((data[0] >> 16) & 0x7f) != 0x08) zeus_register32_w((data[0] >> 16) & 0x7f, data[1], log_fifo); break; - + /* 0x08: set matrix and point (thegrid) */ case 0x08: if (numwords < 14) return FALSE; dataoffs = 1; - + /* 0x07: set matrix and point (crusnexo) */ case 0x07: if (numwords < 13) return FALSE; /* extract the matrix from the raw data */ - zeus_matrix[0][0] = convert_tms3203x_fp_to_float(data[dataoffs + 1]); - zeus_matrix[0][1] = convert_tms3203x_fp_to_float(data[dataoffs + 2]); - zeus_matrix[0][2] = convert_tms3203x_fp_to_float(data[dataoffs + 3]); - zeus_matrix[1][0] = convert_tms3203x_fp_to_float(data[dataoffs + 4]); - zeus_matrix[1][1] = convert_tms3203x_fp_to_float(data[dataoffs + 5]); - zeus_matrix[1][2] = convert_tms3203x_fp_to_float(data[dataoffs + 6]); - zeus_matrix[2][0] = convert_tms3203x_fp_to_float(data[dataoffs + 7]); - zeus_matrix[2][1] = convert_tms3203x_fp_to_float(data[dataoffs + 8]); - zeus_matrix[2][2] = convert_tms3203x_fp_to_float(data[dataoffs + 9]); + zeus_matrix[0][0] = convert_tms3203x_fp_to_float(data[dataoffs + 1]); + zeus_matrix[0][1] = convert_tms3203x_fp_to_float(data[dataoffs + 2]); + zeus_matrix[0][2] = convert_tms3203x_fp_to_float(data[dataoffs + 3]); + zeus_matrix[1][0] = convert_tms3203x_fp_to_float(data[dataoffs + 4]); + zeus_matrix[1][1] = convert_tms3203x_fp_to_float(data[dataoffs + 5]); + zeus_matrix[1][2] = convert_tms3203x_fp_to_float(data[dataoffs + 6]); + zeus_matrix[2][0] = convert_tms3203x_fp_to_float(data[dataoffs + 7]); + zeus_matrix[2][1] = convert_tms3203x_fp_to_float(data[dataoffs + 8]); + zeus_matrix[2][2] = convert_tms3203x_fp_to_float(data[dataoffs + 9]); /* extract the translation point from the raw data */ zeus_point[0] = convert_tms3203x_fp_to_float(data[dataoffs + 10]); @@ -826,7 +826,7 @@ static int zeus_fifo_process(const UINT32 *data, int numwords) zeus_point[2]); } break; - + /* 0x15: set point only (thegrid) */ /* 0x16: set point only (crusnexo) */ case 0x15: @@ -838,7 +838,7 @@ static int zeus_fifo_process(const UINT32 *data, int numwords) zeus_point[0] = convert_tms3203x_fp_to_float(data[1]); zeus_point[1] = convert_tms3203x_fp_to_float(data[2]); zeus_point[2] = convert_tms3203x_fp_to_float(data[3]); - + if (log_fifo) { log_fifo_command(data, numwords, ""); @@ -848,7 +848,7 @@ static int zeus_fifo_process(const UINT32 *data, int numwords) zeus_point[2]); } break; - + /* 0x1c: */ case 0x1c: if (numwords < 4) @@ -874,7 +874,7 @@ static int zeus_fifo_process(const UINT32 *data, int numwords) waveram_plot_depth(y, x, 0, 0x7fff); } break; - + /* 0x23: render model in waveram (thegrid) */ /* 0x24: render model in waveram (crusnexo) */ case 0x23: @@ -885,7 +885,7 @@ static int zeus_fifo_process(const UINT32 *data, int numwords) log_fifo_command(data, numwords, ""); zeus_draw_model(data[1], data[0] & 0xffff, log_fifo); break; - + /* 0x31: sync pipeline? (thegrid) */ /* 0x32: sync pipeline? (crusnexo) */ case 0x31: @@ -894,7 +894,7 @@ static int zeus_fifo_process(const UINT32 *data, int numwords) log_fifo_command(data, numwords, "\n"); zeus_quad_size = 10; break; - + /* 0x38: direct render quad (crusnexo) */ case 0x38: if (numwords < 12) @@ -991,7 +991,7 @@ static void zeus_draw_model(UINT32 baseaddr, UINT16 count, int logit) else if (logit) logerror("unknown offset\n"); break; - + case 0x31: /* thegrid */ if (logit) logerror("sync?\n"); @@ -1003,7 +1003,7 @@ static void zeus_draw_model(UINT32 baseaddr, UINT16 count, int logit) logerror("reg32"); zeus_register32_w((databuffer[0] >> 16) & 0x7f, databuffer[1], logit); break; - + case 0x38: /* crusnexo/thegrid */ zeus_draw_quad(databuffer, texoffs, logit); break; @@ -1040,13 +1040,13 @@ static void zeus_draw_quad(const UINT32 *databuffer, UINT32 texoffs, int logit) poly_extra_data *extra; poly_vertex clipvert[8]; poly_vertex vert[4]; -// float uscale, vscale; +// float uscale, vscale; float maxy, maxx; -// int val1, val2, texwshift; +// int val1, val2, texwshift; int numverts; int i; -// INT16 normal[3]; -// INT32 rotnormal[3]; +// INT16 normal[3]; +// INT32 rotnormal[3]; int texmode = texoffs & 0xffff; if (logit) @@ -1065,43 +1065,43 @@ if (input_code_pressed(KEYCODE_Y) && (texoffs & 0xffff) == 0x0dd) return; callback = render_poly_8bit; /* -0 38800000 -1 x2 | x1 -2 v1 | u1 -3 y2 | y1 -4 v2 | u2 -5 z2 | z1 -6 v3 | u3 -7 v4 | u4 -8 ??? -9 x4 | x3 -10 y4 | y3 -11 z4 | z3 +0 38800000 +1 x2 | x1 +2 v1 | u1 +3 y2 | y1 +4 v2 | u2 +5 z2 | z1 +6 v3 | u3 +7 v4 | u4 +8 ??? +9 x4 | x3 +10 y4 | y3 +11 z4 | z3 In memory: - +0 = ??? - +1 = set via $05410000/value - +2 = x1 - +3 = y1 - +4 = z1 - +5 = x2 - +6 = y2 - +7 = z2 - +8 = x3 - +9 = y3 - +10= z3 - +11= x4 - +12= y4 - +13= z4 - +14= uv1 - +15= uv2 - +16= uv3 - +17= uv4 - +18= set via $05200000/$05000000 | (value << 10) (uvoffset?) - +19= ??? - + +0 = ??? + +1 = set via $05410000/value + +2 = x1 + +3 = y1 + +4 = z1 + +5 = x2 + +6 = y2 + +7 = z2 + +8 = x3 + +9 = y3 + +10= z3 + +11= x4 + +12= y4 + +13= z4 + +14= uv1 + +15= uv2 + +16= uv3 + +17= uv4 + +18= set via $05200000/$05000000 | (value << 10) (uvoffset?) + +19= ??? - 38810000 00000000 00C7|FF38 FF5E|FF5E 15400154 11400114 00000000 00000000 FF38|00C7 00A3|00A3 -- quad + + 38810000 00000000 00C7|FF38 FF5E|FF5E 15400154 11400114 00000000 00000000 FF38|00C7 00A3|00A3 -- quad xxxx|xxxx yyyy|yyyy xxxx|xxxx yyyy|yyyy */ @@ -1111,7 +1111,7 @@ In memory: vert[0].p[0] = (INT16)databuffer[6]; vert[0].p[1] = (databuffer[1] >> 2) & 0xff; vert[0].p[2] = (databuffer[1] >> 18) & 0xff; - + vert[1].x = (INT16)(databuffer[2] >> 16); vert[1].y = (INT16)(databuffer[3] >> 16); vert[1].p[0] = (INT16)(databuffer[6] >> 16); @@ -1123,7 +1123,7 @@ In memory: vert[2].p[0] = (INT16)databuffer[7]; vert[2].p[1] = (databuffer[4] >> 22) & 0xff; vert[2].p[2] = (databuffer[5] >> 2) & 0xff; - + vert[3].x = (INT16)(databuffer[8] >> 16); vert[3].y = (INT16)(databuffer[9] >> 16); vert[3].p[0] = (INT16)(databuffer[7] >> 16); @@ -1131,36 +1131,36 @@ In memory: vert[3].p[2] = (databuffer[5] >> 22) & 0xff; /* - vert[0].x = (INT16)databuffer[1]; - vert[0].y = (INT16)databuffer[3]; - vert[0].p[0] = (INT16)databuffer[5]; - vert[0].p[1] = (UINT16)databuffer[2]; - vert[0].p[2] = (UINT16)(databuffer[2] >> 16); - - vert[1].x = (INT16)(databuffer[1] >> 16); - vert[1].y = (INT16)(databuffer[3] >> 16); - vert[1].p[0] = (INT16)(databuffer[5] >> 16); - vert[1].p[1] = (UINT16)databuffer[4]; - vert[1].p[2] = (UINT16)(databuffer[4] >> 16); + vert[0].x = (INT16)databuffer[1]; + vert[0].y = (INT16)databuffer[3]; + vert[0].p[0] = (INT16)databuffer[5]; + vert[0].p[1] = (UINT16)databuffer[2]; + vert[0].p[2] = (UINT16)(databuffer[2] >> 16); - vert[2].x = (INT16)databuffer[9]; - vert[2].y = (INT16)databuffer[10]; - vert[2].p[0] = (INT16)databuffer[11]; - vert[2].p[1] = (UINT16)databuffer[6]; - vert[2].p[2] = (UINT16)(databuffer[6] >> 16); - - vert[3].x = (INT16)(databuffer[9] >> 16); - vert[3].y = (INT16)(databuffer[10] >> 16); - vert[3].p[0] = (INT16)(databuffer[11] >> 16); - vert[3].p[1] = (UINT16)databuffer[7]; - vert[3].p[2] = (UINT16)(databuffer[7] >> 16); + vert[1].x = (INT16)(databuffer[1] >> 16); + vert[1].y = (INT16)(databuffer[3] >> 16); + vert[1].p[0] = (INT16)(databuffer[5] >> 16); + vert[1].p[1] = (UINT16)databuffer[4]; + vert[1].p[2] = (UINT16)(databuffer[4] >> 16); + + vert[2].x = (INT16)databuffer[9]; + vert[2].y = (INT16)databuffer[10]; + vert[2].p[0] = (INT16)databuffer[11]; + vert[2].p[1] = (UINT16)databuffer[6]; + vert[2].p[2] = (UINT16)(databuffer[6] >> 16); + + vert[3].x = (INT16)(databuffer[9] >> 16); + vert[3].y = (INT16)(databuffer[10] >> 16); + vert[3].p[0] = (INT16)(databuffer[11] >> 16); + vert[3].p[1] = (UINT16)databuffer[7]; + vert[3].p[2] = (UINT16)(databuffer[7] >> 16); */ for (i = 0; i < 4; i++) { float x = vert[i].x; float y = vert[i].y; float z = vert[i].p[0]; - + vert[i].x = x * zeus_matrix[0][0] + y * zeus_matrix[0][1] + z * zeus_matrix[0][2] + zeus_point[0]; vert[i].y = x * zeus_matrix[1][0] + y * zeus_matrix[1][1] + z * zeus_matrix[1][2] + zeus_point[1]; vert[i].p[0] = x * zeus_matrix[2][0] + y * zeus_matrix[2][1] + z * zeus_matrix[2][2] + zeus_point[2]; @@ -1168,7 +1168,7 @@ vert[i].p[0] += zbase; vert[i].p[2] += texoffs >> 16; vert[i].p[1] *= 256.0f; vert[i].p[2] *= 256.0f; - + if (logit) { logerror("\t\t(%f,%f,%f) (%02X,%02X)\n", @@ -1186,8 +1186,8 @@ vert[i].p[0] += zbase; { // 412.0f here works for crusnexo float ooz = 512.0f / clipvert[i].p[0]; - -// ooz *= 1.0f / (512.0f * 512.0f); + +// ooz *= 1.0f / (512.0f * 512.0f); clipvert[i].x *= ooz; clipvert[i].y *= ooz; @@ -1207,7 +1207,7 @@ vert[i].p[0] += zbase; if (clipvert[i].y == maxy) clipvert[i].y += 0.0005f; } - + extra = poly_get_extra_data(poly); switch (texmode) { @@ -1222,7 +1222,7 @@ vert[i].p[0] += zbase; case 0xc5d: /* crusnexo */ extra->texwidth = 256; break; - + case 0x059: /* crusnexo */ case 0x0d9: /* crusnexo */ case 0x119: /* crusnexo: license plates */ @@ -1234,7 +1234,7 @@ vert[i].p[0] += zbase; case 0x155: /* crusnexo */ extra->texwidth = 64; break; - + default: { static UINT8 hits[0x10000]; @@ -1271,11 +1271,11 @@ static void render_poly_8bit(void *dest, INT32 scanline, const poly_extent *exte INT32 curz = extent->param[0].start; INT32 curu = extent->param[1].start; INT32 curv = extent->param[2].start; -// INT32 curi = extent->param[3].start; +// INT32 curi = extent->param[3].start; INT32 dzdx = extent->param[0].dpdx; INT32 dudx = extent->param[1].dpdx; INT32 dvdx = extent->param[2].dpdx; -// INT32 didx = extent->param[3].dpdx; +// INT32 didx = extent->param[3].dpdx; const void *texbase = extra->texbase; const void *palbase = extra->palbase; UINT16 transcolor = extra->transcolor; @@ -1317,7 +1317,7 @@ static void render_poly_8bit(void *dest, INT32 scanline, const poly_extent *exte curz += dzdx; curu += dudx; curv += dvdx; -// curi += didx; +// curi += didx; } } diff --git a/src/version.c b/src/version.c index dae7193137d..55eaf5870db 100644 --- a/src/version.c +++ b/src/version.c @@ -9,4 +9,4 @@ ***************************************************************************/ -const char build_version[] = "0.122u1 ("__DATE__")"; +const char build_version[] = "0.122u2 ("__DATE__")";