Bumped version to 0.122u2. Spacing cleanups.

This commit is contained in:
Aaron Giles 2007-12-31 02:22:13 +00:00
parent 460437f8d1
commit 0e20c80517
20 changed files with 319 additions and 319 deletions

View File

@ -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);

View File

@ -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;

View File

@ -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;
}
/******************************************************************************

View File

@ -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);
}

View File

@ -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

View File

@ -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
******************************************************************************************/

View File

@ -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.
*/

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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

View File

@ -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)

View File

@ -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)

View File

@ -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

View File

@ -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.

View File

@ -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 ) )

View File

@ -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);

View File

@ -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

View File

@ -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 = &regdata[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;
}
}

View File

@ -9,4 +9,4 @@
***************************************************************************/
const char build_version[] = "0.122u1 ("__DATE__")";
const char build_version[] = "0.122u2 ("__DATE__")";