Cleanups and version bump.

This commit is contained in:
Aaron Giles 2009-09-07 01:34:34 +00:00
parent 10b6e7e106
commit 8fbe10c91f
41 changed files with 514 additions and 514 deletions

View File

@ -381,7 +381,7 @@ void cheat_init(running_machine *machine)
/* allocate memory */
cheatinfo = auto_alloc_clear(machine, cheat_private);
machine->cheat_data = cheatinfo;
/* load the cheats */
cheat_reload(machine);
@ -403,7 +403,7 @@ void cheat_reload(running_machine *machine)
/* free everything */
cheat_exit(machine);
/* reset our memory */
memset(cheatinfo, 0, sizeof(*cheatinfo));
@ -972,7 +972,7 @@ static cheat_entry *cheat_list_load(running_machine *machine, const char *filena
/* open the file with the proper name */
fname = astring_assemble_2(astring_alloc(), filename, ".xml");
filerr = mame_fopen(SEARCHPATH_CHEAT, astring_c(fname), OPEN_FLAG_READ, &cheatfile);
/* loop over all instrances of the files found in our search paths */
while (filerr == FILERR_NONE)
{
@ -983,7 +983,7 @@ static cheat_entry *cheat_list_load(running_machine *machine, const char *filena
int version;
mame_printf_verbose("Loading cheats file from %s\n", mame_file_full_name(cheatfile));
/* read the XML file into internal data structures */
memset(&options, 0, sizeof(options));
options.error = &error;
@ -1019,7 +1019,7 @@ static cheat_entry *cheat_list_load(running_machine *machine, const char *filena
cheat_entry *curcheat = cheat_entry_load(machine, filename, cheatnode);
if (curcheat == NULL)
goto error;
/* make sure we're not a duplicate */
scannode = NULL;
if (REMOVE_DUPLICATE_CHEATS)
@ -1040,7 +1040,7 @@ static cheat_entry *cheat_list_load(running_machine *machine, const char *filena
/* free the file and loop for the next one */
xml_file_free(rootnode);
/* open the next file in sequence */
filerr = mame_fclose_and_open_next(&cheatfile, astring_c(fname), OPEN_FLAG_READ);
}

View File

@ -287,7 +287,7 @@ INLINE void PUSH_STACK(pic16c5x_state *cpustate, UINT16 data)
INLINE UINT8 GET_REGFILE(pic16c5x_state *cpustate, offs_t addr) /* Read from internal memory */
{
UINT8 data;
if (addr == 0) { /* Indirect addressing */
addr = (cpustate->FSR & cpustate->picRAMmask);
}

View File

@ -9,15 +9,15 @@
/*
TODO:
TODO:
- strobed I/O
- interrupts
- expose register file to disassembler
- decimal adjust instruction
- timer Tin/Tout modes
- serial
- instruction pipeline
- strobed I/O
- interrupts
- expose register file to disassembler
- decimal adjust instruction
- timer Tin/Tout modes
- serial
- instruction pipeline
*/
@ -241,7 +241,7 @@ INLINE z8_state *get_safe_token(const device_config *device)
assert(device != NULL);
assert(device->token != NULL);
assert(device->type == CPU);
assert((cpu_get_type(device) == CPU_Z8601) ||
assert((cpu_get_type(device) == CPU_Z8601) ||
(cpu_get_type(device) == CPU_UB8830D) ||
(cpu_get_type(device) == CPU_Z8611));
return (z8_state *)device->token;
@ -341,7 +341,7 @@ INLINE UINT8 register_read(z8_state *cpustate, UINT8 offset)
case Z8_REGISTER_IPR:
/* write only */
break;
default:
data = cpustate->r[offset];
break;
@ -382,7 +382,7 @@ INLINE void register_write(z8_state *cpustate, UINT8 offset, UINT8 data)
case Z8_REGISTER_P3:
cpustate->output[offset] = data;
// TODO: special port 3 modes
if (!(P3M & 0x7c))
{
@ -394,10 +394,10 @@ INLINE void register_write(z8_state *cpustate, UINT8 offset, UINT8 data)
case Z8_REGISTER_SIO:
break;
case Z8_REGISTER_TMR:
if (data & Z8_TMR_LOAD_T0)
{
{
cpustate->t0 = T0;
timer_adjust_periodic(cpustate->t0_timer, attotime_zero, 0, ATTOTIME_IN_HZ(cpustate->clock / 2 / 4 / ((PRE0 >> 2) + 1)));
}
@ -405,7 +405,7 @@ INLINE void register_write(z8_state *cpustate, UINT8 offset, UINT8 data)
timer_enable(cpustate->t0_timer, data & Z8_TMR_ENABLE_T0);
if (data & Z8_TMR_LOAD_T1)
{
{
cpustate->t1 = T1;
timer_adjust_periodic(cpustate->t1_timer, attotime_zero, 0, ATTOTIME_IN_HZ(cpustate->clock / 2 / 4 / ((PRE1 >> 2) + 1)));
}
@ -597,53 +597,53 @@ struct _z8_opcode_map
static const z8_opcode_map Z8601_OPCODE_MAP[] =
{
{ dec_R1, 6, 5 }, { dec_IR1, 6, 5 }, { add_r1_r2, 10, 5 }, { add_r1_Ir2, 10, 5 }, { add_R2_R1, 10, 5 }, { add_IR2_R1, 10, 5 }, { add_R1_IM, 10, 5 }, { add_IR1_IM, 10, 5 },
{ ld_r1_R2, 6, 5 }, { ld_r2_R1, 6, 5 }, { djnz_r1_RA, 10, 5 }, { jr_cc_RA, 10, 0 }, { ld_r1_IM, 6, 5 }, { jp_cc_DA, 10, 0 }, { inc_r1, 6, 5 }, { illegal, 0, 0 },
{ dec_R1, 6, 5 }, { dec_IR1, 6, 5 }, { add_r1_r2, 10, 5 }, { add_r1_Ir2, 10, 5 }, { add_R2_R1, 10, 5 }, { add_IR2_R1, 10, 5 }, { add_R1_IM, 10, 5 }, { add_IR1_IM, 10, 5 },
{ ld_r1_R2, 6, 5 }, { ld_r2_R1, 6, 5 }, { djnz_r1_RA, 10, 5 }, { jr_cc_RA, 10, 0 }, { ld_r1_IM, 6, 5 }, { jp_cc_DA, 10, 0 }, { inc_r1, 6, 5 }, { illegal, 0, 0 },
{ rlc_R1, 6, 5 }, { rlc_IR1, 6, 5 }, { adc_r1_r2, 6, 5 }, { adc_r1_Ir2, 6, 5 }, { adc_R2_R1, 10, 5 }, { adc_IR2_R1, 10, 5 }, { adc_R1_IM, 10, 5 }, { adc_IR1_IM, 10, 5 },
{ ld_r1_R2, 6, 5 }, { ld_r2_R1, 6, 5 }, { djnz_r1_RA, 10, 5 }, { jr_cc_RA, 10, 0 }, { ld_r1_IM, 6, 5 }, { jp_cc_DA, 10, 0 }, { inc_r1, 6, 5 }, { illegal, 0, 0 },
{ rlc_R1, 6, 5 }, { rlc_IR1, 6, 5 }, { adc_r1_r2, 6, 5 }, { adc_r1_Ir2, 6, 5 }, { adc_R2_R1, 10, 5 }, { adc_IR2_R1, 10, 5 }, { adc_R1_IM, 10, 5 }, { adc_IR1_IM, 10, 5 },
{ ld_r1_R2, 6, 5 }, { ld_r2_R1, 6, 5 }, { djnz_r1_RA, 10, 5 }, { jr_cc_RA, 10, 0 }, { ld_r1_IM, 6, 5 }, { jp_cc_DA, 10, 0 }, { inc_r1, 6, 5 }, { illegal, 0, 0 },
{ inc_R1, 6, 5 }, { inc_IR1, 6, 5 }, { sub_r1_r2, 6, 5 }, { sub_r1_Ir2, 6, 5 }, { sub_R2_R1, 10, 5 }, { sub_IR2_R1, 10, 5 }, { sub_R1_IM, 10, 5 }, { sub_IR1_IM, 10, 5 },
{ ld_r1_R2, 6, 5 }, { ld_r2_R1, 6, 5 }, { djnz_r1_RA, 10, 5 }, { jr_cc_RA, 10, 0 }, { ld_r1_IM, 6, 5 }, { jp_cc_DA, 10, 0 }, { inc_r1, 6, 5 }, { illegal, 0, 0 },
{ inc_R1, 6, 5 }, { inc_IR1, 6, 5 }, { sub_r1_r2, 6, 5 }, { sub_r1_Ir2, 6, 5 }, { sub_R2_R1, 10, 5 }, { sub_IR2_R1, 10, 5 }, { sub_R1_IM, 10, 5 }, { sub_IR1_IM, 10, 5 },
{ ld_r1_R2, 6, 5 }, { ld_r2_R1, 6, 5 }, { djnz_r1_RA, 10, 5 }, { jr_cc_RA, 10, 0 }, { ld_r1_IM, 6, 5 }, { jp_cc_DA, 10, 0 }, { inc_r1, 6, 5 }, { illegal, 0, 0 },
{ jp_IRR1, 8, 0 }, { srp_IM, 6, 1 }, { sbc_r1_r2, 6, 5 }, { sbc_r1_Ir2, 6, 5 }, { sbc_R2_R1, 10, 5 }, { sbc_IR2_R1, 10, 5 }, { sbc_R1_IM, 10, 5 }, { sbc_IR1_IM, 10, 5 },
{ ld_r1_R2, 6, 5 }, { ld_r2_R1, 6, 5 }, { djnz_r1_RA, 10, 5 }, { jr_cc_RA, 10, 0 }, { ld_r1_IM, 6, 5 }, { jp_cc_DA, 10, 0 }, { inc_r1, 6, 5 }, { illegal, 0, 0 },
{ jp_IRR1, 8, 0 }, { srp_IM, 6, 1 }, { sbc_r1_r2, 6, 5 }, { sbc_r1_Ir2, 6, 5 }, { sbc_R2_R1, 10, 5 }, { sbc_IR2_R1, 10, 5 }, { sbc_R1_IM, 10, 5 }, { sbc_IR1_IM, 10, 5 },
{ ld_r1_R2, 6, 5 }, { ld_r2_R1, 6, 5 }, { djnz_r1_RA, 10, 5 }, { jr_cc_RA, 10, 0 }, { ld_r1_IM, 6, 5 }, { jp_cc_DA, 10, 0 }, { inc_r1, 6, 5 }, { illegal, 0, 0 },
{ da_R1, 8, 5 }, { da_IR1, 8, 5 }, { or_r1_r2, 6, 5 }, { or_r1_Ir2, 6, 5 }, { or_R2_R1, 10, 5 }, { or_IR2_R1, 10, 5 }, { or_R1_IM, 10, 5 }, { or_IR1_IM, 10, 5 },
{ ld_r1_R2, 6, 5 }, { ld_r2_R1, 6, 5 }, { djnz_r1_RA, 10, 5 }, { jr_cc_RA, 10, 0 }, { ld_r1_IM, 6, 5 }, { jp_cc_DA, 10, 0 }, { inc_r1, 6, 5 }, { illegal, 0, 0 },
{ da_R1, 8, 5 }, { da_IR1, 8, 5 }, { or_r1_r2, 6, 5 }, { or_r1_Ir2, 6, 5 }, { or_R2_R1, 10, 5 }, { or_IR2_R1, 10, 5 }, { or_R1_IM, 10, 5 }, { or_IR1_IM, 10, 5 },
{ ld_r1_R2, 6, 5 }, { ld_r2_R1, 6, 5 }, { djnz_r1_RA, 10, 5 }, { jr_cc_RA, 10, 0 }, { ld_r1_IM, 6, 5 }, { jp_cc_DA, 10, 0 }, { inc_r1, 6, 5 }, { illegal, 0, 0 },
{ pop_R1, 10, 5 }, { pop_IR1, 10, 5 }, { and_r1_r2, 6, 5 }, { and_r1_Ir2, 6, 5 }, { and_R2_R1, 10, 5 }, { and_IR2_R1, 10, 5 }, { and_R1_IM, 10, 5 }, { and_IR1_IM, 10, 5 },
{ ld_r1_R2, 6, 5 }, { ld_r2_R1, 6, 5 }, { djnz_r1_RA, 10, 5 }, { jr_cc_RA, 10, 0 }, { ld_r1_IM, 6, 5 }, { jp_cc_DA, 10, 0 }, { inc_r1, 6, 5 }, { illegal, 0, 0 },
{ pop_R1, 10, 5 }, { pop_IR1, 10, 5 }, { and_r1_r2, 6, 5 }, { and_r1_Ir2, 6, 5 }, { and_R2_R1, 10, 5 }, { and_IR2_R1, 10, 5 }, { and_R1_IM, 10, 5 }, { and_IR1_IM, 10, 5 },
{ ld_r1_R2, 6, 5 }, { ld_r2_R1, 6, 5 }, { djnz_r1_RA, 10, 5 }, { jr_cc_RA, 10, 0 }, { ld_r1_IM, 6, 5 }, { jp_cc_DA, 10, 0 }, { inc_r1, 6, 5 }, { illegal, 0, 0 },
{ com_R1, 6, 5 }, { com_IR1, 6, 5 }, { tcm_r1_r2, 6, 5 }, { tcm_r1_Ir2, 6, 5 }, { tcm_R2_R1, 10, 5 }, { tcm_IR2_R1, 10, 5 }, { tcm_R1_IM, 10, 5 }, { tcm_IR1_IM, 10, 5 },
{ ld_r1_R2, 6, 5 }, { ld_r2_R1, 6, 5 }, { djnz_r1_RA, 10, 5 }, { jr_cc_RA, 10, 0 }, { ld_r1_IM, 6, 5 }, { jp_cc_DA, 10, 0 }, { inc_r1, 6, 5 }, { illegal, 0, 0 },
{ com_R1, 6, 5 }, { com_IR1, 6, 5 }, { tcm_r1_r2, 6, 5 }, { tcm_r1_Ir2, 6, 5 }, { tcm_R2_R1, 10, 5 }, { tcm_IR2_R1, 10, 5 }, { tcm_R1_IM, 10, 5 }, { tcm_IR1_IM, 10, 5 },
{ ld_r1_R2, 6, 5 }, { ld_r2_R1, 6, 5 }, { djnz_r1_RA, 10, 5 }, { jr_cc_RA, 10, 0 }, { ld_r1_IM, 6, 5 }, { jp_cc_DA, 10, 0 }, { inc_r1, 6, 5 }, { illegal, 0, 0 },
{ push_R2, 10, 1 }, { push_IR2, 12, 1 },{ tm_r1_r2, 6, 5 }, { tm_r1_Ir2, 6, 5 }, { tm_R2_R1, 10, 5 }, { tm_IR2_R1, 10, 5 }, { tm_R1_IM, 10, 5 }, { tm_IR1_IM, 10, 5 },
{ ld_r1_R2, 6, 5 }, { ld_r2_R1, 6, 5 }, { djnz_r1_RA, 10, 5 }, { jr_cc_RA, 10, 0 }, { ld_r1_IM, 6, 5 }, { jp_cc_DA, 10, 0 }, { inc_r1, 6, 5 }, { illegal, 0, 0 },
{ push_R2, 10, 1 }, { push_IR2, 12, 1 },{ tm_r1_r2, 6, 5 }, { tm_r1_Ir2, 6, 5 }, { tm_R2_R1, 10, 5 }, { tm_IR2_R1, 10, 5 }, { tm_R1_IM, 10, 5 }, { tm_IR1_IM, 10, 5 },
{ ld_r1_R2, 6, 5 }, { ld_r2_R1, 6, 5 }, { djnz_r1_RA, 10, 5 }, { jr_cc_RA, 10, 0 }, { ld_r1_IM, 6, 5 }, { jp_cc_DA, 10, 0 }, { inc_r1, 6, 5 }, { illegal, 0, 0 },
{ decw_RR1, 10, 5 },{ decw_IR1, 10, 5 },{ lde_r1_Irr2, 12, 0 }, { ldei_Ir1_Irr2, 18, 0 },{ illegal, 0, 0 }, { illegal, 0, 0 }, { illegal, 0, 0 }, { illegal, 0, 0 },
{ ld_r1_R2, 6, 5 }, { ld_r2_R1, 6, 5 }, { djnz_r1_RA, 10, 5 }, { jr_cc_RA, 10, 0 }, { ld_r1_IM, 6, 5 }, { jp_cc_DA, 10, 0 }, { inc_r1, 6, 5 }, { di, 6, 1 },
{ decw_RR1, 10, 5 },{ decw_IR1, 10, 5 },{ lde_r1_Irr2, 12, 0 }, { ldei_Ir1_Irr2, 18, 0 },{ illegal, 0, 0 }, { illegal, 0, 0 }, { illegal, 0, 0 }, { illegal, 0, 0 },
{ ld_r1_R2, 6, 5 }, { ld_r2_R1, 6, 5 }, { djnz_r1_RA, 10, 5 }, { jr_cc_RA, 10, 0 }, { ld_r1_IM, 6, 5 }, { jp_cc_DA, 10, 0 }, { inc_r1, 6, 5 }, { di, 6, 1 },
{ rl_R1, 6, 5 }, { rl_IR1, 6, 5 }, { lde_r2_Irr1, 12, 0 }, { ldei_Ir2_Irr1, 18, 0 },{ illegal, 0, 0 }, { illegal, 0, 0 }, { illegal, 0, 0 }, { illegal, 0, 0 },
{ ld_r1_R2, 6, 5 }, { ld_r2_R1, 6, 5 }, { djnz_r1_RA, 10, 5 }, { jr_cc_RA, 10, 0 }, { ld_r1_IM, 6, 5 }, { jp_cc_DA, 10, 0 }, { inc_r1, 6, 5 }, { ei, 6, 1 },
{ rl_R1, 6, 5 }, { rl_IR1, 6, 5 }, { lde_r2_Irr1, 12, 0 }, { ldei_Ir2_Irr1, 18, 0 },{ illegal, 0, 0 }, { illegal, 0, 0 }, { illegal, 0, 0 }, { illegal, 0, 0 },
{ ld_r1_R2, 6, 5 }, { ld_r2_R1, 6, 5 }, { djnz_r1_RA, 10, 5 }, { jr_cc_RA, 10, 0 }, { ld_r1_IM, 6, 5 }, { jp_cc_DA, 10, 0 }, { inc_r1, 6, 5 }, { ei, 6, 1 },
{ incw_RR1, 10, 5 },{ incw_IR1, 10, 5 },{ cp_r1_r2, 6, 5 }, { cp_r1_Ir2, 6, 5 }, { cp_R2_R1, 10, 5 }, { cp_IR2_R1, 10, 5 }, { cp_R1_IM, 10, 5 }, { cp_IR1_IM, 10, 5 },
{ ld_r1_R2, 6, 5 }, { ld_r2_R1, 6, 5 }, { djnz_r1_RA, 10, 5 }, { jr_cc_RA, 10, 0 }, { ld_r1_IM, 6, 5 }, { jp_cc_DA, 10, 0 }, { inc_r1, 6, 5 }, { ret, 14, 0 },
{ incw_RR1, 10, 5 },{ incw_IR1, 10, 5 },{ cp_r1_r2, 6, 5 }, { cp_r1_Ir2, 6, 5 }, { cp_R2_R1, 10, 5 }, { cp_IR2_R1, 10, 5 }, { cp_R1_IM, 10, 5 }, { cp_IR1_IM, 10, 5 },
{ ld_r1_R2, 6, 5 }, { ld_r2_R1, 6, 5 }, { djnz_r1_RA, 10, 5 }, { jr_cc_RA, 10, 0 }, { ld_r1_IM, 6, 5 }, { jp_cc_DA, 10, 0 }, { inc_r1, 6, 5 }, { ret, 14, 0 },
{ clr_R1, 6, 5 }, { clr_IR1, 6, 5 }, { xor_r1_r2, 6, 5 }, { xor_r1_Ir2, 6, 5 }, { xor_R2_R1, 10, 5 }, { xor_IR2_R1, 10, 5 }, { xor_R1_IM, 10, 5 }, { xor_IR1_IM, 10, 5 },
{ ld_r1_R2, 6, 5 }, { ld_r2_R1, 6, 5 }, { djnz_r1_RA, 10, 5 }, { jr_cc_RA, 10, 0 }, { ld_r1_IM, 6, 5 }, { jp_cc_DA, 10, 0 }, { inc_r1, 6, 5 }, { iret, 16, 0 },
{ clr_R1, 6, 5 }, { clr_IR1, 6, 5 }, { xor_r1_r2, 6, 5 }, { xor_r1_Ir2, 6, 5 }, { xor_R2_R1, 10, 5 }, { xor_IR2_R1, 10, 5 }, { xor_R1_IM, 10, 5 }, { xor_IR1_IM, 10, 5 },
{ ld_r1_R2, 6, 5 }, { ld_r2_R1, 6, 5 }, { djnz_r1_RA, 10, 5 }, { jr_cc_RA, 10, 0 }, { ld_r1_IM, 6, 5 }, { jp_cc_DA, 10, 0 }, { inc_r1, 6, 5 }, { iret, 16, 0 },
{ rrc_R1, 6, 5 }, { rrc_IR1, 6, 5 }, { ldc_r1_Irr2, 12, 0 }, { ldci_Ir1_Irr2, 18, 0 },{ illegal, 0, 0 }, { illegal, 0, 0 }, { illegal, 0, 0 }, { ld_r1_x_R2, 10, 5 },
{ ld_r1_R2, 6, 5 }, { ld_r2_R1, 6, 5 }, { djnz_r1_RA, 10, 5 }, { jr_cc_RA, 10, 0 }, { ld_r1_IM, 6, 5 }, { jp_cc_DA, 10, 0 }, { inc_r1, 6, 5 }, { rcf, 6, 5 },
{ rrc_R1, 6, 5 }, { rrc_IR1, 6, 5 }, { ldc_r1_Irr2, 12, 0 }, { ldci_Ir1_Irr2, 18, 0 },{ illegal, 0, 0 }, { illegal, 0, 0 }, { illegal, 0, 0 }, { ld_r1_x_R2, 10, 5 },
{ ld_r1_R2, 6, 5 }, { ld_r2_R1, 6, 5 }, { djnz_r1_RA, 10, 5 }, { jr_cc_RA, 10, 0 }, { ld_r1_IM, 6, 5 }, { jp_cc_DA, 10, 0 }, { inc_r1, 6, 5 }, { rcf, 6, 5 },
{ sra_R1, 6, 5 }, { sra_IR1, 6, 5 }, { ldc_r2_Irr1, 12, 0 }, { ldci_Ir2_Irr1, 18, 0 },{ call_IRR1, 20, 0 }, { illegal, 0, 0 }, { call_DA, 20, 0 }, { ld_r2_x_R1, 10, 5 },
{ ld_r1_R2, 6, 5 }, { ld_r2_R1, 6, 5 }, { djnz_r1_RA, 10, 5 }, { jr_cc_RA, 10, 0 }, { ld_r1_IM, 6, 5 }, { jp_cc_DA, 10, 0 }, { inc_r1, 6, 5 }, { scf, 6, 5 },
{ sra_R1, 6, 5 }, { sra_IR1, 6, 5 }, { ldc_r2_Irr1, 12, 0 }, { ldci_Ir2_Irr1, 18, 0 },{ call_IRR1, 20, 0 }, { illegal, 0, 0 }, { call_DA, 20, 0 }, { ld_r2_x_R1, 10, 5 },
{ ld_r1_R2, 6, 5 }, { ld_r2_R1, 6, 5 }, { djnz_r1_RA, 10, 5 }, { jr_cc_RA, 10, 0 }, { ld_r1_IM, 6, 5 }, { jp_cc_DA, 10, 0 }, { inc_r1, 6, 5 }, { scf, 6, 5 },
{ rr_R1, 6, 5 }, { rr_IR1, 6, 5 }, { illegal, 0, 0 }, { ld_r1_Ir2, 6, 5 }, { ld_R2_R1, 10, 5 }, { ld_IR2_R1, 10, 5 }, { ld_R1_IM, 10, 5 }, { ld_IR1_IM, 10, 5 },
{ ld_r1_R2, 6, 5 }, { ld_r2_R1, 6, 5 }, { djnz_r1_RA, 10, 5 }, { jr_cc_RA, 10, 0 }, { ld_r1_IM, 6, 5 }, { jp_cc_DA, 10, 0 }, { inc_r1, 6, 5 }, { ccf, 6, 5 },
{ rr_R1, 6, 5 }, { rr_IR1, 6, 5 }, { illegal, 0, 0 }, { ld_r1_Ir2, 6, 5 }, { ld_R2_R1, 10, 5 }, { ld_IR2_R1, 10, 5 }, { ld_R1_IM, 10, 5 }, { ld_IR1_IM, 10, 5 },
{ ld_r1_R2, 6, 5 }, { ld_r2_R1, 6, 5 }, { djnz_r1_RA, 10, 5 }, { jr_cc_RA, 10, 0 }, { ld_r1_IM, 6, 5 }, { jp_cc_DA, 10, 0 }, { inc_r1, 6, 5 }, { ccf, 6, 5 },
{ swap_R1, 8, 5 }, { swap_IR1, 8, 5 }, { illegal, 0, 0 }, { ld_Ir1_r2, 6, 5 }, { illegal, 0, 0 }, { ld_R2_IR1, 10, 5 }, { illegal, 0, 0 }, { illegal, 0, 0 },
{ ld_r1_R2, 6, 5 }, { ld_r2_R1, 6, 5 }, { djnz_r1_RA, 10, 5 }, { jr_cc_RA, 10, 0 }, { ld_r1_IM, 6, 5 }, { jp_cc_DA, 10, 0 }, { inc_r1, 6, 5 }, { nop, 6, 0 },
{ ld_r1_R2, 6, 5 }, { ld_r2_R1, 6, 5 }, { djnz_r1_RA, 10, 5 }, { jr_cc_RA, 10, 0 }, { ld_r1_IM, 6, 5 }, { jp_cc_DA, 10, 0 }, { inc_r1, 6, 5 }, { nop, 6, 0 },
};
/***************************************************************************
@ -728,17 +728,17 @@ static CPU_EXECUTE( z8 )
int cycles;
debugger_instruction_hook(device, cpustate->pc);
/* TODO: sample interrupts */
cpustate->input[3] = memory_read_byte_8be(cpustate->io, 3);
/* fetch opcode */
opcode = fetch(cpustate);
cycles = Z8601_OPCODE_MAP[opcode].execution_cycles;
/* execute instruction */
(*(Z8601_OPCODE_MAP[opcode].function))(cpustate, opcode, &cycles);
cpustate->icount -= cycles;
}
while (cpustate->icount > 0);
@ -793,7 +793,7 @@ static CPU_IMPORT_STATE( z8 )
cpustate->r[Z8_REGISTER_SPH] = cpustate->fake_sp >> 8;
cpustate->r[Z8_REGISTER_SPL] = cpustate->fake_sp & 0xff;
break;
case Z8_R0: case Z8_R1: case Z8_R2: case Z8_R3: case Z8_R4: case Z8_R5: case Z8_R6: case Z8_R7: case Z8_R8: case Z8_R9: case Z8_R10: case Z8_R11: case Z8_R12: case Z8_R13: case Z8_R14: case Z8_R15:
cpustate->r[cpustate->r[Z8_REGISTER_RP] + (entry->index - Z8_R0)] = cpustate->fake_r[entry->index - Z8_R0];
break;

View File

@ -18,7 +18,7 @@ enum
{
Z8_PC, Z8_SP, Z8_RP, Z8_T0, Z8_T1,
Z8_R0, Z8_R1, Z8_R2, Z8_R3, Z8_R4, Z8_R5, Z8_R6, Z8_R7, Z8_R8, Z8_R9, Z8_R10, Z8_R11, Z8_R12, Z8_R13, Z8_R14, Z8_R15,
Z8_R0, Z8_R1, Z8_R2, Z8_R3, Z8_R4, Z8_R5, Z8_R6, Z8_R7, Z8_R8, Z8_R9, Z8_R10, Z8_R11, Z8_R12, Z8_R13, Z8_R14, Z8_R15,
Z8_GENPC = REG_GENPC,
Z8_GENSP = REG_GENSP

View File

@ -9,27 +9,27 @@
static const char* REGISTER_NAME[256] =
{
"P0", "P1", "P2", "P3", "", "", "", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
"SIO", "TMR", "T1", "PRE1", "T0", "PRE0", "P2M", "P3M", "P01M", "IPR", "IRQ", "IMR", "FLAGS", "RP", "SPH", "SPL"
};
static const char* CONDITION_CODE[16] =
{
"F", "LT", "LE", "ULE", "OV", "MI", "Z", "C",
"", "GE", "GT", "UGT", "NOV", "PL", "NZ", "NC"
"F", "LT", "LE", "ULE", "OV", "MI", "Z", "C",
"", "GE", "GT", "UGT", "NOV", "PL", "NZ", "NC"
};
/***************************************************************************
@ -90,7 +90,7 @@ CPU_DISASSEMBLE( z8 )
switch (pc)
{
case 0x0000:
case 0x0000:
case 0x0002:
case 0x0004:
case 0x0006:
@ -235,7 +235,7 @@ CPU_DISASSEMBLE( z8 )
case 0x7d: mnemonic("JP"); arg_cc; arg_DA; bytes(3); break;
case 0x7e: mnemonic("INC"); arg_r(OPH); break;
case 0x7f: illegal; /* mnemonic("HALT"); */ break;
case 0x80: mnemonic("DECW"); arg_RR(*oprom++); break;
case 0x81: mnemonic("DECW"); arg_IR(B0); bytes(2); break;
case 0x82: mnemonic("LDE"); arg_r(B0H); arg_Irr(B0L); bytes(2); break;
@ -252,7 +252,7 @@ CPU_DISASSEMBLE( z8 )
case 0x8d: mnemonic("JP"); arg_DA; bytes(3); break;
case 0x8e: mnemonic("INC"); arg_r(OPH); break;
case 0x8f: mnemonic("DI"); break;
case 0x90: mnemonic("RL"); arg_R(B0); bytes(2); break;
case 0x91: mnemonic("RL"); arg_IR(B0); bytes(2); break;
case 0x92: mnemonic("LDE"); arg_r(B0L); arg_Irr(B0H); bytes(2); break;
@ -269,7 +269,7 @@ CPU_DISASSEMBLE( z8 )
case 0x9d: mnemonic("JP"); arg_cc; arg_DA; bytes(3); break;
case 0x9e: mnemonic("INC"); arg_r(OPH); break;
case 0x9f: mnemonic("EI"); break;
case 0xa0: mnemonic("INCW"); arg_RR(B0); bytes(2); break;
case 0xa1: mnemonic("INCW"); arg_IR(B0); bytes(2); break;
case 0xa2: mnemonic("CP"); arg_r(B0H); arg_r(B0L); bytes(2); break;
@ -286,7 +286,7 @@ CPU_DISASSEMBLE( z8 )
case 0xad: mnemonic("JP"); arg_cc; arg_DA; bytes(3); break;
case 0xae: mnemonic("INC"); arg_r(OPH); break;
case 0xaf: mnemonic("RET"); step_out; break;
case 0xb0: mnemonic("CLR"); arg_R(B0); bytes(2); break;
case 0xb1: mnemonic("XOR"); arg_IR(B0); bytes(2); break;
case 0xb2: mnemonic("XOR"); arg_r(B0H); arg_r(B0L); bytes(2); break;
@ -303,7 +303,7 @@ CPU_DISASSEMBLE( z8 )
case 0xbd: mnemonic("JP"); arg_cc; arg_DA; bytes(3); break;
case 0xbe: mnemonic("INC"); arg_r(OPH); break;
case 0xbf: mnemonic("IRET"); step_out; break;
case 0xc0: mnemonic("RRC"); arg_R(B0); bytes(2); break;
case 0xc1: mnemonic("RRC"); arg_IR(B0); bytes(2); break;
case 0xc2: mnemonic("LDC"); arg_r(B0H); arg_Irr(B0L); bytes(2); break;
@ -320,7 +320,7 @@ CPU_DISASSEMBLE( z8 )
case 0xcd: mnemonic("JP"); arg_cc; arg_DA; bytes(3); break;
case 0xce: mnemonic("INC"); arg_r(OPH); break;
case 0xcf: mnemonic("RCF"); break;
case 0xd0: mnemonic("SRA"); arg_R(B0); bytes(2); break;
case 0xd1: mnemonic("SRA"); arg_IR(B0); bytes(2); break;
case 0xd2: mnemonic("LDC"); arg_Irr(B0L); arg_r(B0H); bytes(2); break;
@ -337,7 +337,7 @@ CPU_DISASSEMBLE( z8 )
case 0xdd: mnemonic("JP"); arg_cc; arg_DA; bytes(3); break;
case 0xde: mnemonic("INC"); arg_r(OPH); break;
case 0xdf: mnemonic("SCF"); break;
case 0xe0: mnemonic("RR"); arg_R(B0); bytes(2); break;
case 0xe1: mnemonic("RR"); arg_IR(B0); bytes(2); break;
case 0xe2: illegal; break;
@ -354,7 +354,7 @@ CPU_DISASSEMBLE( z8 )
case 0xed: mnemonic("JP"); arg_cc; arg_DA; bytes(3); break;
case 0xee: mnemonic("INC"); arg_r(OPH); break;
case 0xef: mnemonic("CCF"); break;
case 0xf0: mnemonic("SWAP"); arg_R(B0); bytes(2); break;
case 0xf1: mnemonic("SWAP"); arg_IR(B0); bytes(2); break;
case 0xf2: illegal; break;

View File

@ -148,7 +148,7 @@ static void load_from_memory(z8_state *cpustate, const address_space *space)
UINT16 address = register_pair_read(cpustate, src);
UINT8 data = memory_decrypted_read_byte(cpustate->program, address);
register_write(cpustate, dst, data);
}
@ -173,9 +173,9 @@ static void load_from_memory_autoinc(z8_state *cpustate, const address_space *sp
UINT16 address = register_pair_read(cpustate, src);
UINT8 data = memory_decrypted_read_byte(cpustate->program, address);
register_write(cpustate, real_dst, data);
register_write(cpustate, dst, real_dst + 1);
register_pair_write(cpustate, src, address + 1);
}
@ -191,7 +191,7 @@ static void load_to_memory_autoinc(z8_state *cpustate, const address_space *spac
UINT8 data = register_read(cpustate, real_src);
memory_write_byte(cpustate->program, address, data);
register_pair_write(cpustate, dst, address + 1);
register_write(cpustate, src, real_src + 1);
}
@ -208,7 +208,7 @@ INSTRUCTION( ldei_Ir2_Irr1 ) { load_to_memory_autoinc(cpustate, cpustate->data);
static void pop(z8_state *cpustate, UINT8 dst)
{
/* dst <- @SP
SP <- SP + 1 */
SP <- SP + 1 */
register_write(cpustate, dst, stack_pop_byte(cpustate));
}
@ -218,7 +218,7 @@ INSTRUCTION( pop_IR1 ) { mode_IR1(pop) }
static void push(z8_state *cpustate, UINT8 src)
{
/* SP <- SP - 1
@SP <- src */
@SP <- src */
stack_push_byte(cpustate, read(src));
}
@ -495,7 +495,7 @@ INSTRUCTION( call_DA ) { UINT16 dst = (fetch(cpustate) << 8) | fetch(cpustate)
INSTRUCTION( djnz_r1_RA )
{
INT8 ra = (INT8)fetch(cpustate);
INT8 ra = (INT8)fetch(cpustate);
/* r <- r - 1 */
int r = get_working_register(cpustate, opcode >> 4);
@ -513,13 +513,13 @@ INSTRUCTION( djnz_r1_RA )
INSTRUCTION( iret )
{
/* FLAGS <- @SP
SP <- SP + 1 */
SP <- SP + 1 */
register_write(cpustate, Z8_REGISTER_FLAGS, stack_pop_byte(cpustate));
/* PC <- @SP
SP <- SP + 2 */
SP <- SP + 2 */
cpustate->pc = stack_pop_word(cpustate);
/* IMR (7) <- 1 */
cpustate->r[Z8_REGISTER_IMR] |= Z8_IMR_ENABLE;
}
@ -527,7 +527,7 @@ INSTRUCTION( iret )
INSTRUCTION( ret )
{
/* PC <- @SP
SP <- SP + 2 */
SP <- SP + 2 */
cpustate->pc = stack_pop_word(cpustate);
}
@ -562,14 +562,14 @@ static int check_condition_code(z8_state *cpustate, int cc)
case CC_NZ: truth = !flag(Z); break;
case CC_NC: truth = !flag(C); break;
}
return truth;
}
INSTRUCTION( jp_cc_DA )
{
UINT16 dst = (fetch(cpustate) << 8) | fetch(cpustate);
UINT16 dst = (fetch(cpustate) << 8) | fetch(cpustate);
/* if cc is true, then PC <- dst */
if (check_condition_code(cpustate, opcode >> 4))
{
@ -581,7 +581,7 @@ INSTRUCTION( jp_cc_DA )
INSTRUCTION( jr_cc_RA )
{
INT8 ra = (INT8)fetch(cpustate);
UINT16 dst = cpustate->pc + ra;
UINT16 dst = cpustate->pc + ra;
/* if cc is true, then PC <- dst */
if (check_condition_code(cpustate, opcode >> 4))
@ -599,7 +599,7 @@ static void test_complement_under_mask(z8_state *cpustate, UINT8 dst, UINT8 src)
{
/* NOT(dst) AND src */
UINT8 data = (register_read(cpustate, dst) ^ 0xff) & src;
set_flag_z(data == 0);
set_flag_s(data & 0x80);
set_flag_v(0);
@ -616,7 +616,7 @@ static void test_under_mask(z8_state *cpustate, UINT8 dst, UINT8 src)
{
/* dst AND src */
UINT8 data = register_read(cpustate, dst) & src;
set_flag_z(data == 0);
set_flag_s(data & 0x80);
set_flag_v(0);
@ -727,7 +727,7 @@ static void swap(z8_state *cpustate, UINT8 dst)
set_flag_z(data == 0);
set_flag_s(data & 0x80);
// set_flag_v(0); undefined
// set_flag_v(0); undefined
}
INSTRUCTION( swap_R1 ) { mode_R1(swap) }

View File

@ -332,7 +332,7 @@ void crosshair_set_user_settings(running_machine *machine, UINT8 player, crossha
static void animate(const device_config *device, void *param, int vblank_state)
{
int player;
/* only animate once per frame, when vblank_state is 1 */
if (!vblank_state)
return;

View File

@ -1825,7 +1825,7 @@ static void execute_cheatinit(running_machine *machine, int ref, int params, con
if (!debug_command_parameter_number(machine, param[(ref == 0) ? 1 : 0], &offset))
return;
if (!debug_command_parameter_number(machine, param[(ref == 0) ? 2 : 1], &length))
return;
return;
}
else
{
@ -1847,7 +1847,7 @@ static void execute_cheatinit(running_machine *machine, int ref, int params, con
debug_console_printf(machine, "No writable bytes found in this area\n");
return;
}
if (ref == 0)
{
/* initialize new cheat system */
@ -1917,8 +1917,8 @@ static void execute_cheatnext(running_machine *machine, int ref, int params, con
UINT32 active_cheat = 0;
UINT8 condition;
UINT64 comp_value = 0;
enum
enum
{
CHEAT_ALL = 0,
CHEAT_EQUAL,
@ -1960,7 +1960,7 @@ static void execute_cheatnext(running_machine *machine, int ref, int params, con
else if (!strcmp(param[0], "smallerof") || !strcmp(param[0], "lt") || !strcmp(param[0], "<"))
condition = CHEAT_SMALLEROF;
else if (!strcmp(param[0], "greaterof") || !strcmp(param[0], "gt") || !strcmp(param[0], ">"))
condition = CHEAT_GREATEROF;
condition = CHEAT_GREATEROF;
else
{
debug_console_printf(machine, "Invalid condition type\n");
@ -1976,7 +1976,7 @@ static void execute_cheatnext(running_machine *machine, int ref, int params, con
UINT64 cheat_value = cheat_read_extended(&cheat, space, cheat.cheatmap[cheatindex].offset);
UINT64 comp_byte = (ref == 0) ? cheat.cheatmap[cheatindex].previous_value : cheat.cheatmap[cheatindex].first_value;
UINT8 disable_byte = FALSE;
switch (condition)
{
case CHEAT_ALL:
@ -2069,10 +2069,10 @@ static void execute_cheatlist(running_machine *machine, int ref, int params, con
if (!debug_command_parameter_cpu_space(machine, &cheat.cpu, ADDRESS_SPACE_PROGRAM, &space))
return;
if (params > 0)
f = fopen(param[0], "w");
switch (space->spacenum)
{
default:
@ -2080,7 +2080,7 @@ static void execute_cheatlist(running_machine *machine, int ref, int params, con
case ADDRESS_SPACE_DATA: spaceletter = 'd'; break;
case ADDRESS_SPACE_IO: spaceletter = 'i'; break;
}
switch (cheat.width)
{
default:
@ -2097,14 +2097,14 @@ static void execute_cheatlist(running_machine *machine, int ref, int params, con
{
UINT64 value = cheat_read_extended(&cheat, space, cheat.cheatmap[cheatindex].offset) & sizemask;
offs_t address = memory_byte_to_address(space, cheat.cheatmap[cheatindex].offset);
if (params > 0)
{
active_cheat++;
fprintf(f, " <cheat desc=\"Possibility %d : %0*X (%0*" I64FMT "X)\">\n", active_cheat, space->logaddrchars, address, cheat.width * 2, value);
fprintf(f, " <script state=\"run\">\n");
fprintf(f, " <script state=\"run\">\n");
fprintf(f, " <action>maincpu.%c%c@%0*X=%0*" I64FMT "X</action>\n", spaceletter, sizeletter, space->logaddrchars, address, cheat.width * 2, cheat.cheatmap[cheatindex].first_value & sizemask);
fprintf(f, " </script>\n");
fprintf(f, " </script>\n");
fprintf(f, " </cheat>\n\n");
}
else
@ -2135,7 +2135,7 @@ static void execute_cheatundo(running_machine *machine, int ref, int params, con
cheat.cheatmap[cheatindex].undo = 0;
undo_count++;
}
}
}
cheat.undo--;
debug_console_printf(machine, "%u cheat reactivated\n", undo_count);

View File

@ -1531,7 +1531,7 @@ UINT64 debug_read_qword(const address_space *space, offs_t address, int apply_tr
/*-------------------------------------------------
debug_read_memory - return 1,2,4 or 8 bytes
debug_read_memory - return 1,2,4 or 8 bytes
from the specified memory space
-------------------------------------------------*/
@ -1746,7 +1746,7 @@ void debug_write_qword(const address_space *space, offs_t address, UINT64 data,
/*-------------------------------------------------
debug_write_memory - write 1,2,4 or 8 bytes
debug_write_memory - write 1,2,4 or 8 bytes
to the specified memory space
-------------------------------------------------*/

View File

@ -1083,7 +1083,7 @@ static const help_item static_help_list[] =
" cheatrange <address>,<length>\n"
"\n"
"The cheatrange command adds the selected memory area to the cheat search.\n"
"Before using cheatrange it is necessary to initialize the cheat search with cheatinit.\n"
"Before using cheatrange it is necessary to initialize the cheat search with cheatinit.\n"
"\n"
"Examples:\n"
"\n"

View File

@ -263,7 +263,7 @@ static file_error fopen_internal(core_options *opts, path_iterator *iterator, co
break;
}
}
/* if we succeeded, save the iterator */
if (filerr == FILERR_NONE)
(*file)->iterator = *iterator;
@ -394,8 +394,8 @@ void mame_fclose(mame_file *file)
/*-------------------------------------------------
mame_fclose_and_open_next - close an open
file, and open the next entry in the original
mame_fclose_and_open_next - close an open
file, and open the next entry in the original
searchpath
-------------------------------------------------*/

View File

@ -1320,7 +1320,7 @@ int input_port_get_crosshair_position(running_machine *machine, int player, floa
else
value *= field->crossscale;
value += field->crossoffset;
/* apply custom mapping if necessary */
if (field->crossmapper != NULL)
value = (*field->crossmapper)(field, value);

View File

@ -111,20 +111,20 @@ INLINE duart68681_state *get_safe_token(const device_config *device)
static void duart68681_update_interrupts(duart68681_state *duart68681)
{
/* update SR state and update interrupt ISR state for the following bits:
SRn: bits 7-4: handled elsewhere.
SRn: bit 3 (TxEMTn) (we can assume since we're not actually emulating the delay/timing of sending bits, that as long as TxRDYn is set, TxEMTn is also set since the transmit byte has 'already happened', therefore TxEMTn is always 1 assuming tx is enabled on channel n and the MSR2n mode is 0 or 2; in mode 1 it is explicitly zeroed, and mode 3 is undefined)
SRn: bit 2 (TxRDYn) (we COULD assume since we're not emulating delay and timing output, that as long as tx is enabled on channel n, TxRDY is 1 for channel n and the MSR2n mode is 0 or 2; in mode 1 it is explicitly zeroed, and mode 3 is undefined; however, tx_ready is already nicely handled for us elsewhere, so we can use that instead for now, though we may need to retool that code as well)
SRn: bit 1 (FFULLn) (this bit we actually emulate; if the recieve fifo for channel n is full, this bit is 1, otherwise it is 0. the recieve fifo should be three words long.)
SRn: bit 0 (RxRDYn) (this bit we also emulate; the bit is always asserted if the recieve fifo is not empty)
ISR: bit 7: Input Port change; this should be handled elsewhere, on the input port handler
ISR: bit 6: Delta Break B; this should be handled elsewhere, on the data recieve handler
ISR: bit 5: RxRDYB/FFULLB: this is handled here; depending on whether MSR1B bit 6 is 0 or 1, this bit holds the state of SRB bit 0 or bit 1 respectively
ISR: bit 4: TxRDYB: this is handled here; it mirrors SRB bit 2
ISR: bit 3: Counter ready; this should be handled by the timer generator
ISR: bit 2: Delta Break A; this should be handled elsewhere, on the data recieve handler
ISR: bit 1: RxRDYA/FFULLA: this is handled here; depending on whether MSR1A bit 6 is 0 or 1, this bit holds the state of SRA bit 0 or bit 1 respectively
ISR: bit 0: TxRDYA: this is handled here; it mirrors SRA bit 2
*/
SRn: bits 7-4: handled elsewhere.
SRn: bit 3 (TxEMTn) (we can assume since we're not actually emulating the delay/timing of sending bits, that as long as TxRDYn is set, TxEMTn is also set since the transmit byte has 'already happened', therefore TxEMTn is always 1 assuming tx is enabled on channel n and the MSR2n mode is 0 or 2; in mode 1 it is explicitly zeroed, and mode 3 is undefined)
SRn: bit 2 (TxRDYn) (we COULD assume since we're not emulating delay and timing output, that as long as tx is enabled on channel n, TxRDY is 1 for channel n and the MSR2n mode is 0 or 2; in mode 1 it is explicitly zeroed, and mode 3 is undefined; however, tx_ready is already nicely handled for us elsewhere, so we can use that instead for now, though we may need to retool that code as well)
SRn: bit 1 (FFULLn) (this bit we actually emulate; if the recieve fifo for channel n is full, this bit is 1, otherwise it is 0. the recieve fifo should be three words long.)
SRn: bit 0 (RxRDYn) (this bit we also emulate; the bit is always asserted if the recieve fifo is not empty)
ISR: bit 7: Input Port change; this should be handled elsewhere, on the input port handler
ISR: bit 6: Delta Break B; this should be handled elsewhere, on the data recieve handler
ISR: bit 5: RxRDYB/FFULLB: this is handled here; depending on whether MSR1B bit 6 is 0 or 1, this bit holds the state of SRB bit 0 or bit 1 respectively
ISR: bit 4: TxRDYB: this is handled here; it mirrors SRB bit 2
ISR: bit 3: Counter ready; this should be handled by the timer generator
ISR: bit 2: Delta Break A; this should be handled elsewhere, on the data recieve handler
ISR: bit 1: RxRDYA/FFULLA: this is handled here; depending on whether MSR1A bit 6 is 0 or 1, this bit holds the state of SRA bit 0 or bit 1 respectively
ISR: bit 0: TxRDYA: this is handled here; it mirrors SRA bit 2
*/
UINT8 ch = 0;
//logerror("DEBUG: 68681 int check: upon func call, SRA is %02X, SRB is %02X, ISR is %02X\n", duart68681->channel[0].SR, duart68681->channel[1].SR, duart68681->ISR);
for (ch = 0; ch < 2; ch++)
@ -156,7 +156,7 @@ static void duart68681_update_interrupts(duart68681_state *duart68681)
// Handle the TxEMT and TxRDY bits based on mode
switch( duart68681->channel[ch].MR2&0xC0) // what mode are we in?
{
case 0x00: // normal mode
case 0x00: // normal mode
if ( duart68681->channel[ch].tx_enabled )
{
duart68681->channel[ch].SR |= STATUS_TRANSMITTER_EMPTY;

View File

@ -681,7 +681,7 @@ static DISCRETE_STEP(dst_rcdisc3)
if (diff > 0)
{
diff = diff * context->exponent0;
}
}
else if (diff < -context->v_diode)
{
diff = diff * context->exponent1;
@ -696,7 +696,7 @@ static DISCRETE_STEP(dst_rcdisc3)
if (diff < 0)
{
diff = diff * context->exponent0;
}
}
else if (diff > -context->v_diode)
{
diff = diff * context->exponent1;
@ -1069,7 +1069,7 @@ static DISCRETE_RESET(dst_rcfilter)
* 74VHC4066 : 15
* UTC4066 : 270 @ 5VCC, 80 @ 15VCC
* CD4066BC : 270 (Fairchild)
*
*
* The choice below makes scramble sound about "right". For future error reports,
* we need the exact type of switch and at which voltage (5, 12?) it is operated.
*/
@ -1134,7 +1134,7 @@ static DISCRETE_RESET(dst_rcfilter_sw)
for (bits=0; bits < 15; bits++)
{
double rs = 0;
for (i = 0; i < 4; i++)
{
if (( bits & (1 << i)) != 0)
@ -1144,12 +1144,12 @@ static DISCRETE_RESET(dst_rcfilter_sw)
context->f2[bits] = DST_RCFILTER_SW__R / (CD4066_ON_RES + rs);
}
/* fast cases */
context->exp0 = RC_CHARGE_EXP(node, (CD4066_ON_RES + DST_RCFILTER_SW__R) * DST_RCFILTER_SW__C(0));
context->exp1 = RC_CHARGE_EXP(node, (CD4066_ON_RES + DST_RCFILTER_SW__R) * DST_RCFILTER_SW__C(1));
context->factor = RES_VOLTAGE_DIVIDER(DST_RCFILTER_SW__R, CD4066_ON_RES);
node->output[0] = 0;
}

View File

@ -315,7 +315,7 @@ static DISCRETE_START(dss_input_stream)
struct dss_input_context *context = (struct dss_input_context *)node->context;
assert(DSS_INPUT_STREAM__STREAM < linked_list_count(node->info->input_list));
context->is_stream = TRUE;
/* Stream out number is set during start */
context->stream_in_number = DSS_INPUT_STREAM__STREAM;
@ -323,13 +323,13 @@ static DISCRETE_START(dss_input_stream)
context->offset = DSS_INPUT_STREAM__OFFSET;
context->ptr = NULL;
//context->data = 0;
if (node->block->type == DSS_INPUT_BUFFER)
{
context->is_buffered = TRUE;
context->buffer_stream = stream_create(node->info->device, 0, 1, node->info->sample_rate, (void *) node, buffer_stream_update);
stream_set_input(node->info->discrete_stream, context->stream_in_number,
stream_set_input(node->info->discrete_stream, context->stream_in_number,
context->buffer_stream, 0, 1.0);
}
else

View File

@ -13,7 +13,7 @@
* DSO_TASK - Task node
*
* Task and list routines
*
*
************************************************************************/
struct dso_csvlog_context
@ -44,8 +44,8 @@ static DISCRETE_START( dso_task )
const linked_list_entry *step_entry;
/* Determine, which nodes in the task are referenced in the main task
* and add them to the list of nodes to be buffered for further processing
*/
* and add them to the list of nodes to be buffered for further processing
*/
for (node_entry = task->list; node_entry != NULL; node_entry = node_entry->next)
{
node_description *node = (node_description *) node_entry->ptr;
@ -54,7 +54,7 @@ static DISCRETE_START( dso_task )
for (step_entry = node->info->step_list; step_entry != NULL; step_entry = step_entry->next)
{
node_description *snode = (node_description *) step_entry->ptr;
/* loop over all active inputs */
for (inputnum = 0; inputnum < snode->active_inputs; inputnum++)
{
@ -90,7 +90,7 @@ static DISCRETE_STEP( dso_task )
{
discrete_task_context *task = (discrete_task_context *) node->context;
int i;
for (i = 0; i < task->numbuffered; i++)
*(task->ptr[i]++) = **task->dest[i]; //DISCRETE_INPUT(i);
}
@ -143,7 +143,7 @@ static DISCRETE_START( dso_csvlog )
static DISCRETE_STOP( dso_csvlog )
{
struct dso_csvlog_context *context = (struct dso_csvlog_context *) node->context;
/* close any csv files */
if (context->csv_file)
fclose(context->csv_file);
@ -179,7 +179,7 @@ static DISCRETE_STOP( dso_wavelog )
/* close any wave files */
if (context->wav_file)
wav_close(context->wav_file);
wav_close(context->wav_file);
}
static DISCRETE_STEP( dso_wavelog )

View File

@ -294,11 +294,11 @@ INLINE void step_nodes_in_list(const linked_list_entry *list)
if (DISCRETE_PROFILING)
{
osd_ticks_t last = get_profile_ticks();
for (entry = list; entry != NULL; entry = entry->next)
{
node_description *node = (node_description *) entry->ptr;
node->run_time -= last;
(*node->module->step)(node);
last = get_profile_ticks();
@ -310,7 +310,7 @@ INLINE void step_nodes_in_list(const linked_list_entry *list)
for (entry = list; entry != NULL; entry = entry->next)
{
node_description *node = (node_description *) entry->ptr;
/* Now step the node */
(*node->module->step)(node);
}
@ -497,21 +497,21 @@ static DEVICE_START( discrete )
/* initialize the stream(s) */
info->discrete_stream = stream_create(device,linked_list_count(info->input_list), linked_list_count(info->output_list), info->sample_rate, info, discrete_stream_update);
/* allocate a queue */
info->queue = osd_work_queue_alloc(WORK_QUEUE_FLAG_MULTI | WORK_QUEUE_FLAG_HIGH_FREQ);
/* Process nodes which have a start func */
for (entry = info->node_list; entry != NULL; entry = entry->next)
{
node_description *node = (node_description *) entry->ptr;
if (node->module->start)
(*node->module->start)(node);
}
}
@ -526,7 +526,7 @@ static UINT64 list_run_time(const linked_list_entry *list)
{
const linked_list_entry *entry;
UINT64 total = 0;
for (entry = list; entry != NULL; entry = entry->next)
{
node_description *node = (node_description *) entry->ptr;
@ -570,7 +570,7 @@ static void display_profiling(const discrete_info *info)
tt = list_run_time(info->step_list);
printf("Main: %8.2f %15.2f\n", tt / (double) total * 100.0, tt / (double) info->total_samples);
printf("Average samples/stream_update: %8.2f\n", (double) info->total_samples / (double) info->total_stream_updates);
}
@ -578,20 +578,20 @@ static DEVICE_STOP( discrete )
{
discrete_info *info = get_safe_token(device);
linked_list_entry *entry;
osd_work_queue_free(info->queue);
if (DISCRETE_PROFILING)
{
display_profiling(info);
}
/* Process nodes which have a stop func */
for (entry = info->node_list; entry != NULL; entry = entry->next)
{
node_description *node = (node_description *) entry->ptr;
if (node->module->stop)
(*node->module->stop)(node);
}
@ -649,7 +649,7 @@ static void *task_callback(void *param, int threadid)
/* set up task buffers */
for (i = 0; i < ti->context->numbuffered; i++)
ti->context->ptr[i] = &ti->context->node_buf[i][0];
samples = ti->samples;
while (samples-- > 0)
{
@ -675,7 +675,7 @@ INLINE void discrete_stream_update_nodes(discrete_info *info)
{
discrete_task_context *task = (discrete_task_context *) entry->ptr;
int i;
for (i = task->numbuffered - 1; i >= 0 ; i--)
**task->dest[i] = *task->ptr[i]++;
}
@ -737,7 +737,7 @@ static STREAM_UPDATE( discrete_stream_update )
/* Now we must do samples iterations of the node list, one output for each step */
for (samplenum = 0; samplenum < samples; samplenum++)
discrete_stream_update_nodes(info);
if (DISCRETE_PROFILING)
info->total_stream_updates++;
@ -764,7 +764,7 @@ static void init_nodes(discrete_info *info, linked_list_entry *block_list, const
linked_list_entry **task_list_ptr = &info->task_list;
linked_list_entry **output_list_ptr = &info->output_list;
linked_list_entry **input_list_ptr = &info->input_list;
/* loop over all nodes */
for (entry = block_list; entry != NULL; entry = entry->next)
{
@ -902,7 +902,7 @@ static void find_input_nodes(discrete_info *info)
{
int inputnum;
linked_list_entry *entry;
/* loop over all nodes */
for (entry = info->node_list; entry != NULL; entry = entry->next)
{

View File

@ -3682,7 +3682,7 @@ struct _discrete_task_context
double *node_buf[DISCRETE_MAX_TASK_OUTPUTS];
node_description *nodes[DISCRETE_MAX_TASK_OUTPUTS];
double **dest[DISCRETE_MAX_TASK_OUTPUTS];
};
struct _discrete_info

View File

@ -2493,7 +2493,7 @@ static void menu_cheat(running_machine *machine, ui_menu *menu, void *parameter,
if (event != NULL && event->itemref != NULL)
{
int changed = FALSE;
/* clear cheat comment on any movement or keypress */
popmessage(NULL);
@ -2508,7 +2508,7 @@ static void menu_cheat(running_machine *machine, ui_menu *menu, void *parameter,
changed |= cheat_select_default_state(machine, curcheat);
}
}
/* handle individual cheats */
else if ((FPTR)event->itemref > 2)
@ -2534,24 +2534,24 @@ static void menu_cheat(running_machine *machine, ui_menu *menu, void *parameter,
case IPT_UI_RIGHT:
changed = cheat_select_next_state(machine, event->itemref);
break;
/* bring up display comment if one exists */
case IPT_UI_DISPLAY_COMMENT:
case IPT_UI_UP:
case IPT_UI_DOWN:
if (cheat_get_comment(event->itemref) != NULL)
popmessage("Cheat Comment:\n%s", astring_c(cheat_get_comment(event->itemref)));
break;
break;
}
}
/* handle reload all */
if ((FPTR)event->itemref == 2 && event->iptkey == IPT_UI_SELECT)
{
/* re-init cheat engine and thus reload cheats/cheats have already been turned off by here */
cheat_reload(machine);
/* display the reloaded cheats */
/* display the reloaded cheats */
ui_menu_reset(menu, UI_MENU_RESET_REMEMBER_REF);
popmessage("All cheats reloaded");
}
@ -2586,7 +2586,7 @@ static void menu_cheat_populate(running_machine *machine, ui_menu *menu)
/* add a reset all option */
ui_menu_item_append(menu, "Reset All", NULL, 0, (void *)1);
/* add a reload all cheats option */
ui_menu_item_append(menu, "Reload All", NULL, 0, (void *)2);
}

View File

@ -270,11 +270,11 @@ static DISCRETE_SOUND_START(galaxian)
/* Group Background and pitch */
DISCRETE_TASK_START()
/************************************************/
/* Background */
/************************************************/
DISCRETE_DAC_R1(NODE_100, 1, GAL_INP_BG_DAC, TTL_OUT, &galaxian_bck_dac)
DISCRETE_555_CC(NODE_105, 1, NODE_100, GAL_R21, GAL_C15, 0, 0, 0, &galaxian_bck_vco)
// Next is mult/add opamp circuit
@ -285,31 +285,31 @@ static DISCRETE_SOUND_START(galaxian)
DISCRETE_555_ASTABLE_CV(NODE_115, GAL_INP_FS1, GAL_R22, GAL_R23, GAL_C17, NODE_111, &galaxian_555_vco_desc)
DISCRETE_555_ASTABLE_CV(NODE_116, GAL_INP_FS2, GAL_R25, GAL_R26, GAL_C18, NODE_111, &galaxian_555_vco_desc)
DISCRETE_555_ASTABLE_CV(NODE_117, GAL_INP_FS3, GAL_R28, GAL_R29, GAL_C19, NODE_111, &galaxian_555_vco_desc)
DISCRETE_MIXER3(NODE_120, 1, NODE_115, NODE_116, NODE_117, &galaxian_bck_mixer_desc)
/************************************************/
/* PITCH */
/************************************************/
/* two cascaded LS164 which are reset to pitch latch value,
* thus generating SOUND_CLOCK / (256 - pitch_clock) signal
*
* One possibility to implement this is
* DISCRETE_TRANSFORM3(NODE_130, SOUND_CLOCK, 256, GAL_INP_PITCH, "012-/")
* DISCRETE_COUNTER(NODE_132, 1, 0, NODE_130, 15, DISC_COUNT_UP, 0, DISC_CLK_IS_FREQ)
* but there is a native choice:
*/
* thus generating SOUND_CLOCK / (256 - pitch_clock) signal
*
* One possibility to implement this is
* DISCRETE_TRANSFORM3(NODE_130, SOUND_CLOCK, 256, GAL_INP_PITCH, "012-/")
* DISCRETE_COUNTER(NODE_132, 1, 0, NODE_130, 15, DISC_COUNT_UP, 0, DISC_CLK_IS_FREQ)
* but there is a native choice:
*/
DISCRETE_NOTE(NODE_132, 1, SOUND_CLOCK, GAL_INP_PITCH, 255, 15, DISC_CLK_IS_FREQ)
/* from the 74393 (counter 2 above) only QA, QC, QD are used.
* We decode three here and use SUB_NODE(133,x) below to access.
*/
* We decode three here and use SUB_NODE(133,x) below to access.
*/
DISCRETE_BITS_DECODE(NODE_133, NODE_132, 0, 3, TTL_OUT) /* QA-QD 74393 */
/* End of this task */
DISCRETE_TASK_END()
/* Group Hit and Fire */
DISCRETE_TASK_START()
@ -320,22 +320,22 @@ static DISCRETE_SOUND_START(galaxian)
/* NOISE */
/* since only a sample of the LFSR is latched @V2 we let the lfsr
* run at a lower speed
*/
* run at a lower speed
*/
DISCRETE_LFSR_NOISE(NODE_150, 1, 1, RNG_RATE/100, 1.0, 0, 0.5, &galaxian_lfsr)
DISCRETE_SQUAREWFIX(NODE_151,1,60*264/2,1.0,50,0.5,0) /* 2V signal */
DISCRETE_LOGIC_DFLIPFLOP(NODE_152,1,1,1,NODE_151,NODE_150)
/* Not 100% correct - switching causes high impedance input for node_157
* this is not emulated */
* this is not emulated */
DISCRETE_RCDISC5(NODE_155, NODE_152, GAL_INP_HIT, (GAL_R35 + GAL_R36), GAL_C21)
DISCRETE_OP_AMP_FILTER(NODE_157, 1, NODE_155, 0, DISC_OP_AMP_FILTER_IS_BAND_PASS_1M, &galaxian_bandpass_desc)
/************************************************/
/* FIRE */
/************************************************/
DISCRETE_LOGIC_INVERT(NODE_170, 1, GAL_INP_FIRE)
DISCRETE_MULTIPLY(NODE_171, 1, TTL_OUT, GAL_INP_FIRE)
DISCRETE_MULTIPLY(NODE_172, 1, TTL_OUT, NODE_170) // inverted
@ -348,9 +348,9 @@ static DISCRETE_SOUND_START(galaxian)
//DISCRETE_MULTIPLY(NODE_176, 1, 1.0/GAL_R48, NODE_173)
//DISCRETE_ADDER2(NODE_177, 1, NODE_175, NODE_176)
DISCRETE_MULTIPLY(NODE_178, 1, RES_2_PARALLEL(GAL_R46, GAL_R48), NODE_177)
DISCRETE_555_ASTABLE_CV(NODE_181, 1, GAL_R44, GAL_R45, GAL_C27, NODE_178, &galaxian_555_fire_vco_desc)
/* 555 toggles discharge on rc discharge module */
DISCRETE_RCDISC5(NODE_182, NODE_181, NODE_171, (GAL_R41), GAL_C25)

View File

@ -68,7 +68,7 @@ static void draw_strip(running_machine *machine, bitmap_t *bitmap, const rectang
int base = stripnum;
int count = 0;
int y;
for (y=0;y<32;y++)
{
UINT16 tile = (blackt96_tilemapram2[count*2 + (base/2)+1]&0x3fff);
@ -83,17 +83,17 @@ static void draw_strip(running_machine *machine, bitmap_t *bitmap, const rectang
{
if (!bg) drawgfx_transpen(bitmap,cliprect,gfxspr,tile&0x1fff,colour,flipx,0,xbase,ybase+y*16,0);
}
count++;
}
}
static void draw_main(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect, int bg)
{
int x;
for (x=(0x1000/2)-2;x>=0;x-=2)
{
@ -103,11 +103,11 @@ static void draw_main(running_machine *machine, bitmap_t *bitmap, const rectangl
xx= ((blackt96_tilemapram2[x+0]&0x001f)<<4) | (blackt96_tilemapram2[x+1]&0xf000)>>12;
yy = ((blackt96_tilemapram2[x+1]&0x1ff));
if (xx&0x100) xx-=0x200;
yy = 0x1ff-yy;
if (yy&0x100) yy-=0x200;
s = x*2;
s &=0xfff;
s += (x&7)*0x800;
@ -123,7 +123,7 @@ static VIDEO_UPDATE( blackt96 )
int count;
int x,y;
const gfx_element *gfx = screen->machine->gfx[2];
bitmap_fill(bitmap, cliprect, get_black_pen(screen->machine));
draw_main(screen->machine,bitmap,cliprect,1);

View File

@ -516,7 +516,7 @@ static INPUT_PORTS_START( bradley )
PORT_START("AN2") /* analog 2 = shell firing range hack removed, now uses Z */
PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Z ) PORT_MINMAX(0x10,0xf0) PORT_SENSITIVITY(25) PORT_KEYDELTA(10) PORT_CENTERDELTA(0) PORT_REVERSE
BZONEADJ
INPUT_PORTS_END

View File

@ -188,14 +188,14 @@ static PALETTE_INIT(cb2001)
UINT8*proms = memory_region(machine, "proms");
UINT16 dat;
dat = (proms[0x000+i] << 8) | proms[0x200+i];
b = ((dat >> 1) & 0x1f)<<3;
r = ((dat >> 6 )& 0x1f)<<3;
g = ((dat >> 11 ) & 0x1f)<<3;
palette_set_color(machine, i, MAKE_RGB(r, g, b));
}
}
@ -210,9 +210,9 @@ static MACHINE_DRIVER_START( cb2001 )
MDRV_CPU_VBLANK_INT("screen", vblank_irq)
MDRV_GFXDECODE(cb2001)
MDRV_PALETTE_INIT( cb2001 )
MDRV_SCREEN_ADD("screen", RASTER)
MDRV_SCREEN_REFRESH_RATE(60)
MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))

View File

@ -949,45 +949,45 @@ Master Ninja
CPUs
QTY Type position function
1x MC68000P10 68000 main PCB main
1x Z8400HB1 ic36 main PCB sound
2x YM2203C ic31,ic32 main PCB sound
2x Y3014B c16,ic17 main PCB sound
2x LM324N ic2,ic6 main PCB sound
1x TDA2002 ic1 main PCB sound
QTY Type position function
1x MC68000P10 68000 main PCB main
1x Z8400HB1 ic36 main PCB sound
2x YM2203C ic31,ic32 main PCB sound
2x Y3014B c16,ic17 main PCB sound
2x LM324N ic2,ic6 main PCB sound
1x TDA2002 ic1 main PCB sound
Oscillators
1x oscillator 20.000 (xl2 main PCB)
1x blu resonator 400K (xl1 main PCB)
1x oscillator 20.000 (xl2 main PCB)
1x blu resonator 400K (xl1 main PCB)
ROMs
QTY Type position status
6x AM27C512 1-6 main PCB dumped
32x AM27C512 8-39 ROMs PCB dumped
QTY Type position status
6x AM27C512 1-6 main PCB dumped
32x AM27C512 8-39 ROMs PCB dumped
RAMs
QTY Type position
4x HY6264LP-10 ic25,ic28,ic61,ic62 main PCB
3x HY6116ALP-10 ic33,ic123,ic124 main PCB
1x HM6148P ic80 main PCB
1x MCM2018AN45 ic81 main PCB
4x HM6148P ic63-66 ROMs PCB
1x HY6116ALP-10 ic85 ROMs PCB
QTY Type position
4x HY6264LP-10 ic25,ic28,ic61,ic62 main PCB
3x HY6116ALP-10 ic33,ic123,ic124 main PCB
1x HM6148P ic80 main PCB
1x MCM2018AN45 ic81 main PCB
4x HM6148P ic63-66 ROMs PCB
1x HY6116ALP-10 ic85 ROMs PCB
PLDs
QTY Type position status
2x TIBPAL16L8 ic15,ic54 main PCB read protected
1x GAL16L8 ic42 ROMs PCB read protected
QTY Type position status
2x TIBPAL16L8 ic15,ic54 main PCB read protected
1x GAL16L8 ic42 ROMs PCB read protected
Others
1x JAMMA edge connector
1x trimmer (volume)
2x 8x2 switches DIP
1x JAMMA edge connector
1x trimmer (volume)
2x 8x2 switches DIP
*/
static ADDRESS_MAP_START( mastninj_sound_map, ADDRESS_SPACE_PROGRAM, 8 )
@ -995,8 +995,8 @@ static ADDRESS_MAP_START( mastninj_sound_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0xf000, 0xf7ff) AM_RAM
AM_RANGE(0xc400, 0xc401) AM_DEVWRITE("ym1", ym2203_w)
AM_RANGE(0xc800, 0xc801) AM_DEVWRITE("ym2", ym2203_w)
// AM_RANGE(0xfc00, 0xfc00) AM_NOP /* ?? */
// AM_RANGE(0xfc20, 0xfc20) AM_READ(soundlatch_r)
// AM_RANGE(0xfc00, 0xfc00) AM_NOP /* ?? */
// AM_RANGE(0xfc20, 0xfc20) AM_READ(soundlatch_r)
ADDRESS_MAP_END
static ADDRESS_MAP_START( mastninj_map, ADDRESS_SPACE_PROGRAM, 16 )
@ -1007,20 +1007,20 @@ static ADDRESS_MAP_START( mastninj_map, ADDRESS_SPACE_PROGRAM, 16 )
AM_RANGE(0x074000, 0x075fff) AM_READWRITE(gaiden_videoram3_r, gaiden_videoram3_w) AM_BASE(&gaiden_videoram3)
AM_RANGE(0x076000, 0x077fff) AM_RAM AM_BASE(&spriteram16) AM_SIZE(&spriteram_size)
AM_RANGE(0x078000, 0x079fff) AM_RAM_WRITE(paletteram16_xxxxBBBBGGGGRRRR_word_w) AM_BASE(&paletteram16)
// AM_RANGE(0x078800, 0x079fff) AM_RAM
// AM_RANGE(0x078800, 0x079fff) AM_RAM
AM_RANGE(0x07a000, 0x07a001) AM_READ_PORT("SYSTEM")
AM_RANGE(0x07a002, 0x07a003) AM_READ_PORT("P1_P2")
AM_RANGE(0x07a004, 0x07a005) AM_READ_PORT("DSW")
// AM_RANGE(0x07a104, 0x07a105) AM_WRITE(gaiden_txscrolly_w)
// AM_RANGE(0x07a10c, 0x07a10d) AM_WRITE(gaiden_txscrollx_w)
// AM_RANGE(0x07a104, 0x07a105) AM_WRITE(gaiden_txscrolly_w)
// AM_RANGE(0x07a10c, 0x07a10d) AM_WRITE(gaiden_txscrollx_w)
AM_RANGE(0x07f000, 0x07f001) AM_WRITE(gaiden_bgscrolly_w)
AM_RANGE(0x07f002, 0x07f003) AM_WRITE(gaiden_bgscrollx_w)
AM_RANGE(0x07f004, 0x07f005) AM_WRITE(gaiden_fgscrolly_w)
AM_RANGE(0x07f006, 0x07f007) AM_WRITE(gaiden_fgscrollx_w)
AM_RANGE(0x07a800, 0x07a801) AM_WRITE(watchdog_reset16_w)
AM_RANGE(0x07e000, 0x07e001) AM_WRITE(gaiden_sound_command_w)
// AM_RANGE(0x07a806, 0x07a807) AM_WRITENOP
// AM_RANGE(0x07a808, 0x07a809) AM_WRITE(gaiden_flip_w)
// AM_RANGE(0x07a806, 0x07a807) AM_WRITENOP
// AM_RANGE(0x07a808, 0x07a809) AM_WRITE(gaiden_flip_w)
ADDRESS_MAP_END
static MACHINE_DRIVER_START( mastninj )
@ -1067,9 +1067,9 @@ static MACHINE_DRIVER_START( mastninj )
MDRV_SOUND_ROUTE(3, "mono", 0.60)
/* no OKI on the bootleg */
// MDRV_SOUND_ADD("oki", OKIM6295, 1000000)
// MDRV_SOUND_CONFIG(okim6295_interface_pin7high)
// MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.20)
// MDRV_SOUND_ADD("oki", OKIM6295, 1000000)
// MDRV_SOUND_CONFIG(okim6295_interface_pin7high)
// MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.20)
MACHINE_DRIVER_END
/***************************************************************************
@ -1627,7 +1627,7 @@ static void descramble_mastninj_gfx(UINT8* src)
memcpy(src,buffer,len);
free(buffer);
}
buffer = alloc_array_or_die(UINT8, len);
{
int i;

View File

@ -221,8 +221,8 @@ TO DO :
- kingbalj : full Dip Switches and Inputs
- frogg : fix read/writes at/to unmapped/wrong memory
- scprpng : fix read/writes at/to unmapped/wrong memory
- scorpion : check whether konami filters are used
- explorer : check whether konami filters are used
- scorpion : check whether konami filters are used
- explorer : check whether konami filters are used
***************************************************************************/

View File

@ -1531,7 +1531,7 @@ static INPUT_PORTS_START( witchcdd )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED )
/* even when the following one is forced to OFF,
turned ON behaves like "Jacks and Better" */
turned ON behaves like "Jacks and Better" */
PORT_DIPNAME( 0x10, 0x10, "SW 1 (always to OFF)")
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
@ -1618,16 +1618,16 @@ static INPUT_PORTS_START( witchcde )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
/* DIP Switches (as shown in the epoxy block)
Schalter 1 2 3 4 5 6 7 8
--------------------------------------------
--------------------------------------------
Bet > 10 OFF OFF
Bet > 20 ON OFF
Bet > 50 OFF ON
Bet > 100 ON ON
--------------------------------------------
Jolli-Witch OFF
Witch-Card ON
Witch-Card ON
--------------------------------------------
6 Taster ON
12 Taster OFF
@ -1635,8 +1635,8 @@ static INPUT_PORTS_START( witchcde )
Hohes Paar ON
2 Paar OFF
--------------------------------------------
1 DM - 1 PKT OFF OFF
1 DM - 10 PKT OFF ON
1 DM - 1 PKT OFF OFF
1 DM - 10 PKT OFF ON
--------------------------------------------
RF ON
RF NO OFF
@ -2635,7 +2635,7 @@ ROM_END
TV GAME ELEKTRONIK 1994
PROVA
CASINOVERSION WC3050
*/
*/
ROM_START( witchcdd )
ROM_REGION( 0x10000, "maincpu", 0 )
ROM_LOAD( "12a.bin", 0x0000, 0x8000, CRC(a5c1186a) SHA1(b6c662bf489fbcccc3063ce55c957e630ba96ccb) )
@ -2658,7 +2658,7 @@ ROM_END
Code jumps into a zero-filled zone.
Addressing seems to be scrambled in some way
maybe through a PLD.
maybe through a PLD.
*/
ROM_START( witchcde )
ROM_REGION( 0x10000, "maincpu", 0 ) /* inside epoxy block with the CPU */

View File

@ -301,14 +301,14 @@ static DRIVER_INIT(hshavoc)
}
/* Uncommented until actively worked on
{
FILE*FP;
{
FILE*FP;
FP=fopen("hshavoc.dump","wb");
FP=fopen("hshavoc.dump","wb");
fwrite(src, rom_size/2, 2, FP);
fclose(FP);
}
fwrite(src, rom_size/2, 2, FP);
fclose(FP);
}
*/

View File

@ -3377,11 +3377,11 @@ ROM_START( shogwarr )
ROM_REGION( 0x300000, "samples", 0 )
ROM_LOAD( "fb001e.u43", 0x000000, 0x080000, CRC(f524aaa1) SHA1(006a886f9df2e57c51b61c6cea70a6574fc20304) )
ROM_LOAD( "fb000e.u42", 0x080000, 0x080000, CRC(969f1465) SHA1(4f56d1ad341b08f4db41b7ab2498740612ff7c3d) )
/* Sound data is copied here during driver init */
ROM_REGION( 0x400000*16, "oki1", 0 )
ROM_FILL( 0x00000, 0x400000*16, 0x00 )
ROM_REGION( 0x200000, "oki2", 0 )
ROM_LOAD( "fb-002.u45", 0x000000, 0x100000, CRC(010acc17) SHA1(2dc0897c7778eacf6bce12ff0adbadb307ea6c17) )
ROM_LOAD( "fb-003.u44", 0x100000, 0x100000, CRC(0aea4ac5) SHA1(8f3b30e505b0ba51c140a0a2c071680d4fa05db9) )
@ -3436,11 +3436,11 @@ ROM_START( shogwarre )
ROM_REGION( 0x400000, "gfx2", 0 ) /* Tiles (scrambled) */
ROM_LOAD( "fb010.u65", 0x000000, 0x100000, CRC(296ffd92) SHA1(183a28e4594c428deb4726ed22d5166592b94b60) ) // 42 pin mask rom
ROM_LOAD( "fb011.u66", 0x100000, 0x080000, CRC(500a0367) SHA1(6dc5190f81b21f59ee56a3b2332c8d86d6599782) ) // 40 pin mask rom (verified correct)
ROM_REGION( 0x300000, "samples", 0 )
ROM_LOAD( "fb001e.u43", 0x000000, 0x080000, CRC(f524aaa1) SHA1(006a886f9df2e57c51b61c6cea70a6574fc20304) )
ROM_LOAD( "fb000e.u42", 0x080000, 0x080000, CRC(969f1465) SHA1(4f56d1ad341b08f4db41b7ab2498740612ff7c3d) )
/* Sound data is copied here during driver init */
ROM_REGION( 0x400000*16, "oki1", 0 )
ROM_FILL( 0x00000, 0x400000*16, 0x00 )
@ -3509,11 +3509,11 @@ ROM_START( fjbuster ) // Fujiyama Buster - Japan version of Shogun Warriors
ROM_LOAD( "fb010.u65", 0x000000, 0x100000, CRC(296ffd92) SHA1(183a28e4594c428deb4726ed22d5166592b94b60) ) // 42 pin mask rom
ROM_LOAD( "fb011.u66", 0x100000, 0x080000, CRC(500a0367) SHA1(6dc5190f81b21f59ee56a3b2332c8d86d6599782) ) // 40 pin mask rom (verified correct)
ROM_REGION( 0x300000, "samples", 0 )
ROM_LOAD( "fb000j.u43", 0x000000, 0x080000, CRC(a7522555) SHA1(ea88d90dda20bc309f98a1924c41551e7708e6af) )
ROM_LOAD( "fb001j_u.101", 0x080000, 0x080000, CRC(07d4e8e2) SHA1(0de911f452ddeb54b0b435b9c1cf5d5881175d44) )
/* Sound data is copied here during driver init */
ROM_REGION( 0x400000*16, "oki1", 0 )
ROM_FILL( 0x00000, 0x400000*16, 0x00 )
@ -3849,13 +3849,13 @@ static void expand_shogwarr_samples(running_machine* machine)
static void expand_brapboys_music(running_machine* machine)
{
/*
Expand the OKI sample data
Expand the OKI sample data
OKI 2:
Address space 0x00000-0x1ffff is fixed
Address space 0x20000-0x3ffff is banked (15 banks)
*/
*/
int bank;
UINT8 *src = memory_region(machine, "samples");
UINT8 *dst2 = memory_region(machine, "oki2");

View File

@ -713,7 +713,7 @@ static UINT8 *decrypt_code(running_machine *machine)
for (A = 0;A < 0x10000;A++)
decrypted[A] = (rom[A] & 0x55) | ((rom[A] & 0x88) >> 2) | ((rom[A] & 0x22) << 2);
return decrypted;
}
@ -723,7 +723,7 @@ static DRIVER_INIT( kchampvs )
UINT8 *rom = memory_region(machine, "maincpu");
UINT8 *decrypted = decrypt_code(machine);
int A;
/*
Note that the first 4 opcodes that the program
executes aren't encrypted for some obscure reason.

View File

@ -165,7 +165,7 @@ int type2_writes = 0;
UINT32 lasttype2pc = 0;
static WRITE16_HANDLER( littlerb_vdp_w )
{
if (offset!=2)
{
if (type2_writes)
@ -174,11 +174,11 @@ static WRITE16_HANDLER( littlerb_vdp_w )
{
logerror("******************************* BIG WRITE OCCURRED BEFORE THIS!!! ****************************\n");
}
logerror("~%06x previously wrote %08x data bytes\n", lasttype2pc, type2_writes*2);
type2_writes = 0;
}
logerror("%06x littlerb_vdp_w offs %04x data %04x mask %04x\n", cpu_get_pc(space->cpu), offset, data, mem_mask);
}
else
@ -189,7 +189,7 @@ static WRITE16_HANDLER( littlerb_vdp_w )
{
logerror("data write started %06x %04x data %04x mask %04x\n", cpu_get_pc(space->cpu), offset, data, mem_mask);
}
type2_writes++;
lasttype2pc = cpu_get_pc(space->cpu);
}

View File

@ -183,13 +183,13 @@
HOLD buttons = red.
BET, DEAL, HI & LO = yellow.
HALF GAMBLE & CHANGE CARD = orange.
HALF GAMBLE & CHANGE CARD = orange.
* The alternate one (12 button-lamps) for systems with CANCEL button.
.-------------------------------------------------------------.
| .------. .------. .------. .------. .------. .----------. |
| .------. .------. .------. .------. .------. .----------. |
| | HOLD | | HOLD | | HOLD | | HOLD | | HOLD | | HIGH | |
| '------' '------' '------' '------' '------' '----------' |
| .------. .------. .------. .------. .------. .----------. |
@ -391,8 +391,8 @@
- norautjp:
At the first start-up, the game will give you a very clever
At the first start-up, the game will give you a very clever
"FU" screen. Press the following buttons *together* on different times
to get rid of it (and actually initialize the machine):
@ -687,7 +687,7 @@ static READ8_DEVICE_HANDLER( ppi2_portc_r )
UINT8 ppi2_pcmix = 0;
UINT8 hndshk = 0x80; /* simulating the handshake lines (bits 3-7) */
ppi2_pcmix = (hndshk | (input_port_read(device->machine, "IN2") & 0x07));
// popmessage("portc read: %02x", ppi2_pcmix);
// popmessage("portc read: %02x", ppi2_pcmix);
return ppi2_pcmix;
}
@ -695,7 +695,7 @@ static READ8_DEVICE_HANDLER( ppi2_portc_r )
static WRITE8_DEVICE_HANDLER( ppi2_portc_w )
{
/* PC0-PC2 don't seems to be connected to any output */
// popmessage("portc write: %02x", data);
// popmessage("portc write: %02x", data);
}
static READ8_DEVICE_HANDLER( vram_data_r )
@ -753,9 +753,9 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( norautxp_portmap, ADDRESS_SPACE_IO, 8 )
ADDRESS_MAP_GLOBAL_MASK(0xff)
// AM_RANGE(0x60, 0x63) AM_DEVREADWRITE("ppi8255_0", ppi8255_r, ppi8255_w)
// AM_RANGE(0xa0, 0xa3) AM_DEVREADWRITE("ppi8255_1", ppi8255_r, ppi8255_w)
// AM_RANGE(0xc0, 0xc3) AM_DEVREADWRITE("ppi8255_2", ppi8255_r, ppi8255_w)
// AM_RANGE(0x60, 0x63) AM_DEVREADWRITE("ppi8255_0", ppi8255_r, ppi8255_w)
// AM_RANGE(0xa0, 0xa3) AM_DEVREADWRITE("ppi8255_1", ppi8255_r, ppi8255_w)
// AM_RANGE(0xc0, 0xc3) AM_DEVREADWRITE("ppi8255_2", ppi8255_r, ppi8255_w)
ADDRESS_MAP_END
static ADDRESS_MAP_START( gtipoker_map, ADDRESS_SPACE_PROGRAM, 8 )
@ -1008,7 +1008,7 @@ static const ppi8255_interface ppi8255_intf[3] =
DEVCB_HANDLER(soundlamps_w) /* Port C write */
},
{ /* (c0-c3) Group A Mode 2 (5-handshacked bidirectional port)
Group B Mode 0, output; (see below for lines PC0-PC2) */
Group B Mode 0, output; (see below for lines PC0-PC2) */
DEVCB_HANDLER(vram_data_r), /* Port A read */
DEVCB_NULL, /* Port B read */
DEVCB_HANDLER(ppi2_portc_r), /* Port C read */
@ -1017,9 +1017,9 @@ static const ppi8255_interface ppi8255_intf[3] =
DEVCB_HANDLER(ppi2_portc_w) /* Port C write */
}
/* PPI-2 is configured as mixed mode2 and mode0 output.
It means that port A should be bidirectional and port B just as output.
Port C as hshk regs, and P0-P2 as output (noraut11) or input (noraut12).
*/
It means that port A should be bidirectional and port B just as output.
Port C as hshk regs, and P0-P2 as output (noraut11) or input (noraut12).
*/
};
@ -1305,9 +1305,9 @@ static DRIVER_INIT( norautpn )
static DRIVER_INIT( gtipoker )
{
// UINT8 *ROM = memory_region(machine, "maincpu");
// ROM[0x0cc6] = 0x00;
// ROM[0x0cc7] = 0x00;
// UINT8 *ROM = memory_region(machine, "maincpu");
// ROM[0x0cc6] = 0x00;
// ROM[0x0cc7] = 0x00;
}

View File

@ -198,7 +198,7 @@ static WRITE8_HANDLER( playmark_oki_w )
static WRITE8_DEVICE_HANDLER( playmark_snd_control_w )
{
// const address_space *space = cputag_get_address_space(device->machine, "audiocpu", ADDRESS_SPACE_PROGRAM);
// const address_space *space = cputag_get_address_space(device->machine, "audiocpu", ADDRESS_SPACE_PROGRAM);
/* This port controls communications to and from the 68K, and the OKI
device.
@ -395,7 +395,7 @@ static INPUT_PORTS_START( bigtwin )
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x30, 0x00, DEF_STR( Difficulty ) )
// PORT_DIPSETTING( 0x20, DEF_STR( Easy ) ) /* Seems same as Medium */
// PORT_DIPSETTING( 0x20, DEF_STR( Easy ) ) /* Seems same as Medium */
PORT_DIPSETTING( 0x30, DEF_STR( Medium ) )
PORT_DIPSETTING( 0x10, DEF_STR( Hard ) )
PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) )

View File

@ -206,7 +206,7 @@ Notes:
This seems to be a genuine error on Atari's part, since they replaced it with
136014-231 which matches Namco's PP1-27. The bad bit should cause a tiny gfx
glitch, though it's difficult to notice.
- topracra: Use Service1 to start game
Todo:

View File

@ -2003,15 +2003,15 @@ static WRITE16_HANDLER( mcu_prog_w2 )
mcu_prog[mcu_prog_offs*2+1] = data;
/* Uncommented until actively worked on
{
FILE *fp;
fp=fopen("rdx_v33.dmp", "w+b");
if (fp)
{
fwrite(mcu_prog, 0x400, 2, fp);
fclose(fp);
}
}
{
FILE *fp;
fp=fopen("rdx_v33.dmp", "w+b");
if (fp)
{
fwrite(mcu_prog, 0x400, 2, fp);
fclose(fp);
}
}
*/
}

View File

@ -237,7 +237,7 @@ static MACHINE_DRIVER_START( speedbal )
MDRV_CPU_PROGRAM_MAP(sound_cpu_map)
MDRV_CPU_IO_MAP(sound_cpu_io_map)
MDRV_CPU_VBLANK_INT_HACK(irq0_line_hold,8)
MDRV_NVRAM_HANDLER(generic_1fill)
/* video hardware */

View File

@ -133,7 +133,7 @@ WRITE16_HANDLER(bloodwar_calc_w)
shogwarr_calc_w(space,offset,data,mem_mask);
return;
}
switch (offset)
{
// p is position, s is size
@ -206,7 +206,7 @@ READ16_HANDLER(bloodwar_calc_r)
{
return shogwarr_calc_r(space,offset,mem_mask);
}
x_coll = calc_compute_x();
y_coll = calc_compute_y();
@ -263,8 +263,8 @@ READ16_HANDLER(bloodwar_calc_r)
}
/*
B Rap Boys
Shogun Warriors
B Rap Boys
Shogun Warriors
*/
@ -272,21 +272,21 @@ READ16_HANDLER(bloodwar_calc_r)
static struct {
int x1p, y1p, z1p, x1s, y1s, z1s;
int x2p, y2p, z2p, x2s, y2s, z2s;
int x1po, y1po, z1po, x1so, y1so, z1so;
int x2po, y2po, z2po, x2so, y2so, z2so;
int x12, y12, z12, x21, y21, z21;
int x_coll, y_coll, z_coll;
int x1tox2, y1toy2, z1toz2;
UINT16 mult_a, mult_b;
UINT16 flags;
UINT16 mode;
} shogwarr_hit;
@ -295,32 +295,32 @@ static struct {
static int shogwarr_calc_compute(int x1, int w1, int x2, int w2)
{
int dist;
if(x2>=x1 && x2+w2<=(x1+w1))
{
//x2 inside x1
dist=w2;
dist=w2;
}
else
{
if(x1>=x2 && x1+w1<=(x2+w2))
{
//x1 inside x2
dist=w1;
dist=w1;
}
else
{
if(x2<x1)
{
//swap
//swap
int tmp=x1;
x1=x2;
x2=tmp;
tmp=w1;
w1=w2;
w2=tmp;
}
dist=x1+w1-x2;
}
dist=x1+w1-x2;
}
}
return dist;
@ -337,42 +337,42 @@ static void shogwarr_calc_org(int mode, int x0, int s0, int* x1, int* s1)
case 2: *x1=x0-s0; *s1=s0; break;
case 3: *x1=x0-s0; *s1=2*s0; break;
}
//x1 is the left most coord, s1 = width
//x1 is the left most coord, s1 = width
}
static void shogwarr_recalc_collisions(void)
{
//calculate positions and sizes
int mode=shogwarr_hit.mode;
shogwarr_hit.flags=0;
shogwarr_calc_org(mode&3, shogwarr_hit.x1po, shogwarr_hit.x1so, &shogwarr_hit.x1p, &shogwarr_hit.x1s);
mode>>=2;
shogwarr_calc_org(mode&3, shogwarr_hit.y1po, shogwarr_hit.y1so, &shogwarr_hit.y1p, &shogwarr_hit.y1s);
mode>>=2;
shogwarr_calc_org(mode&3, shogwarr_hit.z1po, shogwarr_hit.z1so, &shogwarr_hit.z1p, &shogwarr_hit.z1s);
mode>>=4;
shogwarr_calc_org(mode&3, shogwarr_hit.x2po, shogwarr_hit.x2so, &shogwarr_hit.x2p, &shogwarr_hit.x2s);
mode>>=2;
shogwarr_calc_org(mode&3, shogwarr_hit.y2po, shogwarr_hit.y2so, &shogwarr_hit.y2p, &shogwarr_hit.y2s);
mode>>=2;
shogwarr_calc_org(mode&3, shogwarr_hit.z2po, shogwarr_hit.z2so, &shogwarr_hit.z2p, &shogwarr_hit.z2s);
shogwarr_hit.x1tox2=abs(shogwarr_hit.x2po-shogwarr_hit.x1po);
shogwarr_hit.y1toy2=abs(shogwarr_hit.y2po-shogwarr_hit.y1po);
shogwarr_hit.z1toz2=abs(shogwarr_hit.z2po-shogwarr_hit.z1po);
shogwarr_hit.x_coll = shogwarr_calc_compute(shogwarr_hit.x1p, shogwarr_hit.x1s, shogwarr_hit.x2p, shogwarr_hit.x2s);
shogwarr_hit.y_coll = shogwarr_calc_compute(shogwarr_hit.y1p, shogwarr_hit.y1s, shogwarr_hit.y2p, shogwarr_hit.y2s);
shogwarr_hit.z_coll = shogwarr_calc_compute(shogwarr_hit.z1p, shogwarr_hit.z1s, shogwarr_hit.z2p, shogwarr_hit.z2s);
// 4th nibble: Y Absolute Collision -> possible values = 9,8,4,3,2
if (shogwarr_hit.y1p > shogwarr_hit.y2p) shogwarr_hit.flags |= 0x2000;
else if (shogwarr_hit.y1p == shogwarr_hit.y2p) shogwarr_hit.flags |= 0x4000;
@ -391,7 +391,7 @@ static void shogwarr_recalc_collisions(void)
else if (shogwarr_hit.z1p < shogwarr_hit.z2p) shogwarr_hit.flags |= 0x0080;
if (shogwarr_hit.z_coll<0) shogwarr_hit.flags |= 0x0010;
// 1st nibble: XYZ Overlap Collision
// 1st nibble: XYZ Overlap Collision
if ((shogwarr_hit.x_coll>=0)&&(shogwarr_hit.y_coll>=0)&&(shogwarr_hit.z_coll>=0)) shogwarr_hit.flags |= 0x0008;
if ((shogwarr_hit.x_coll>=0)&&(shogwarr_hit.z_coll>=0)) shogwarr_hit.flags |= 0x0004;
if ((shogwarr_hit.y_coll>=0)&&(shogwarr_hit.z_coll>=0)) shogwarr_hit.flags |= 0x0002;
@ -407,66 +407,66 @@ WRITE16_HANDLER(shogwarr_calc_w)
// p is position, s is size
case 0x00:
case 0x28:
shogwarr_hit.x1po = data; break;
case 0x04:
case 0x2c:
shogwarr_hit.x1so = data; break;
case 0x08:
case 0x08:
case 0x30:
shogwarr_hit.y1po = data; break;
case 0x0c:
case 0x0c:
case 0x34:
shogwarr_hit.y1so = data; break;
case 0x10:
case 0x10:
case 0x58:
shogwarr_hit.x2po = data; break;
case 0x14:
case 0x14:
case 0x5c:
shogwarr_hit.x2so = data; break;
case 0x18:
case 0x18:
case 0x60:
shogwarr_hit.y2po = data; break;
case 0x1c:
case 0x1c:
case 0x64:
shogwarr_hit.y2so = data; break;
case 0x38:
case 0x50:
shogwarr_hit.z1po = data; break;
case 0x3c:
case 0x3c:
case 0x54:
shogwarr_hit.z1so = data; break;
case 0x20:
case 0x20:
case 0x68:
shogwarr_hit.z2po = data; break;
case 0x24:
case 0x24:
case 0x6c:
shogwarr_hit.z2so = data; break;
case 0x70:
shogwarr_hit.mode=data;break;
default:
logerror("CPU #0 PC %06x: warning - write unmapped hit address %06x [ %06x] = %06x\n",cpu_get_pc(space->cpu),offset<<1, idx, data);
}
shogwarr_recalc_collisions();
}
READ16_HANDLER(shogwarr_calc_r)
{
int idx=offset*4;
switch (idx)
@ -478,11 +478,11 @@ READ16_HANDLER(shogwarr_calc_r)
case 0x04: // Y distance
case 0x14:
return shogwarr_hit.y_coll;
case 0x18: // Z distance
return shogwarr_hit.z_coll;
case 0x08:
case 0x08:
case 0x1c:
return shogwarr_hit.flags;
@ -503,7 +503,7 @@ READ16_HANDLER(shogwarr_calc_r)
case 0x64: return shogwarr_hit.y2so;
case 0x68: return shogwarr_hit.z2po;
case 0x6c: return shogwarr_hit.z2so;
case 0x80: return shogwarr_hit.x1tox2;
case 0x84: return shogwarr_hit.y1toy2;
case 0x88: return shogwarr_hit.z1toz2;
@ -616,7 +616,7 @@ OFFSET 1 - a 'mode' register of some sort, usually 0,1,2 or 3 for used data, sho
OFFSET 2 - unknown, might be some kind of 'step' register
- 4 bits are 'shift' used in the decryption
- the other 4 bits probably control if the odd/even bytes are inverted, and if an alt shift is applied every other byte
- the other 4 bits probably control if the odd/even bytes are inverted, and if an alt shift is applied every other byte
OFFSET 3 - decryption key - specifies which decryption table to use (ignored for inline tables, see offset 0), key 00 is blank
@ -638,11 +638,11 @@ UINT16 calc3_mcu_crc;
/* decryption tables */
/* this should probably be derived from the final block at the end of the MCU rom somehow ...
/* this should probably be derived from the final block at the end of the MCU rom somehow ...
(see 'finalblock' debug output when verbose = 1)
for now just putting it in a bit table, only used keys are filled in as nothing else was
extracted when getting the tables, unknown values are filled in as -1
key 0 means no decryption, this could be done in logic rather than expecting the first
part of the table to be 0
*/
@ -1705,7 +1705,7 @@ static UINT8 shift_bits(UINT8 dat, int bits)
if (bits==5) return BITSWAP8(dat, 2,1,0,7,6,5,4,3);
if (bits==6) return BITSWAP8(dat, 1,0,7,6,5,4,3,2);
if (bits==7) return BITSWAP8(dat, 0,7,6,5,4,3,2,1);
return dat;
}
@ -1713,7 +1713,7 @@ static UINT8 shift_bits(UINT8 dat, int bits)
int calc3_decompress_table(running_machine* machine, int tabnum, UINT8* dstram, int dstoffset)
{
const address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM);
@ -1742,7 +1742,7 @@ int calc3_decompress_table(running_machine* machine, int tabnum, UINT8* dstram,
length = rom[offset+0] | (rom[offset+1]<<8);
offset+=length+2;
}
// we're at the start of the block, get the info about it
{
UINT16 inline_table_base = 0;
@ -1755,7 +1755,7 @@ int calc3_decompress_table(running_machine* machine, int tabnum, UINT8* dstram,
calc3_subtracttype = (calc3_alternateswaps &0x03);
calc3_alternateswaps &= 0x0c;
calc3_alternateswaps >>=2;
calc3_decryption_key_byte = rom[offset+3];
@ -1770,7 +1770,7 @@ int calc3_decompress_table(running_machine* machine, int tabnum, UINT8* dstram,
offset+= calc3_blocksize_offset+1;
length = rom[offset+0] | (rom[offset+1]<<8);
offset+=2;
#if CALC3_VERBOSE_OUTPUT
if (inline_table_size)
{
@ -1791,16 +1791,16 @@ int calc3_decompress_table(running_machine* machine, int tabnum, UINT8* dstram,
// shogwarr does this with 'mode' as 0x08, which probably has some special meaning
//printf("CALC3: requested 0 length table!\n");
// -- seems to be 'reset stack' to default for the protection table writes
// except this will break shogun going into game, must be specific conditions for
// except this will break shogun going into game, must be specific conditions for
// this, or it can remember addresses and restore those
// hack, set it to a known address instead of trying to restore to anywhere specific..
// hack, set it to a known address instead of trying to restore to anywhere specific..
// might break at some point tho, eg if it doesn't write command 06 often enough because it trys to use another one like 07...
// need to understand the meaning of this (test hw?)
// !dstram is used because we don't want to process these during our initial table scan, only when the game asks!
if (calc3_mode==0x06)
{
calc3_writeaddress_current = 0x202000; // this is reasoanble for brapboys, not sure about shogun, needs emulating properly!
@ -1809,7 +1809,7 @@ int calc3_decompress_table(running_machine* machine, int tabnum, UINT8* dstram,
else if (calc3_mode==0x07)
{
// also calls empty table with Mode? 07
// maybe they reset to different points?
// maybe they reset to different points?
}
else if (calc3_mode==0x08 && !dstram)
{
@ -1820,12 +1820,12 @@ int calc3_decompress_table(running_machine* machine, int tabnum, UINT8* dstram,
UINT8 *dat;
dat = (UINT8 *)eeprom_get_data_pointer(&length, &size);
for (i=0;i<0x80;i++)
{
dat[i] = memory_read_byte(space, calc3_eeprom_addr+0x200000+i);
}
}
}
}
@ -1833,7 +1833,7 @@ int calc3_decompress_table(running_machine* machine, int tabnum, UINT8* dstram,
{
printf("unknown blank table command\n");
}
return 0;
}
@ -1842,19 +1842,19 @@ int calc3_decompress_table(running_machine* machine, int tabnum, UINT8* dstram,
// these should be derived from the inline table somehow, probably just a +/- swap like the normal stuff.. maybe
UINT8 extra[] = { 0x14,0xf0,0xf8,0xd2,0xbe,0xfc,0xac,0x86,0x64,0x08,0x0c,0x74,0xd6,0x6a,0x24,0x12,0x1a,0x72,0xba,0x48,0x76,0x66,0x4a,0x7c,0x5c,0x82,0x0a,0x86,0x82,0x02,0xe6 };
UINT8 extra2[] = { 0x2f,0x04,0xd1,0x69,0xad,0xeb,0x10,0x95,0xb0,0x2f,0x0a,0x83,0x7d,0x4e,0x2a,0x07,0x89,0x52,0xca,0x41,0xf1,0x4f,0xaf,0x1c,0x01,0xe9,0x89,0xd2,0xaf,0xcd };
for (i=0;i<length;i++)
{
UINT8 dat=0;
UINT8 dat=0;
/* special case for Shogun Warriors table 0x40 */
if (calc3_subtracttype==3 && calc3_alternateswaps ==0)
{
UINT8 inlinet = rom[inline_table_base + (i%inline_table_size)];
dat = rom[offset+i];
dat -= inlinet;
if (((i%inline_table_size)&1)==0)
@ -1875,10 +1875,10 @@ int calc3_decompress_table(running_machine* machine, int tabnum, UINT8* dstram,
}
else
{
UINT8 inlinet = rom[inline_table_base + (i%inline_table_size)];
dat = rom[offset+i];
if (calc3_subtracttype!=0x02)
{
dat -= inlinet;
@ -1887,9 +1887,9 @@ int calc3_decompress_table(running_machine* machine, int tabnum, UINT8* dstram,
else
{
dat += inlinet;
dat += extra[(i%inline_table_size)>>1];
dat += extra[(i%inline_table_size)>>1];
}
dat = shift_bits(dat, 8-calc3_shift);
}
}
@ -1900,12 +1900,12 @@ int calc3_decompress_table(running_machine* machine, int tabnum, UINT8* dstram,
UINT8 inlinet = rom[inline_table_base + (i%inline_table_size)];
dat = rom[offset+i];
dat -= inlinet;
dat = shift_bits(dat, calc3_shift);
dat = shift_bits(dat, calc3_shift);
}
else
{
dat = rom[offset+i];
if (calc3_subtracttype!=0x02)
{
dat -= extra2[(i%inline_table_size)>>1];
@ -1916,7 +1916,7 @@ int calc3_decompress_table(running_machine* machine, int tabnum, UINT8* dstram,
}
dat = shift_bits(dat, 8-calc3_shift);
}
}
}
}
if(local_counter>1)
@ -1925,7 +1925,7 @@ int calc3_decompress_table(running_machine* machine, int tabnum, UINT8* dstram,
{
memory_write_byte(space, dstoffset+i, dat);
}
// debug, used to output tables at the start
if (dstram)
{
@ -1934,31 +1934,31 @@ int calc3_decompress_table(running_machine* machine, int tabnum, UINT8* dstram,
}
else
data_header[local_counter]=dat;
++local_counter;
}
}
else
{
INT16* key = calc3_keydata+(calc3_decryption_key_byte*0x40);
if (key[0] == -1)
{
fatalerror("attempting to use invalid decryption data\n");
}
for (i=0;i<length;i++)
{
UINT8 dat = rom[offset+i];
UINT8 keydat = (UINT8)key[i&0x3f];
{
{
if (calc3_subtracttype==0)
{
//dat = dat;
}
else if (calc3_subtracttype==1)
{
{
if ((i&1)==1) dat += keydat;
else dat -= keydat;
}
@ -1970,8 +1970,8 @@ int calc3_decompress_table(running_machine* machine, int tabnum, UINT8* dstram,
else if (calc3_subtracttype==3)
{
dat -= keydat;
}
}
if (calc3_alternateswaps == 0)
{
if ((i&1)==0) dat = shift_bits(dat, 8-calc3_shift);
@ -1992,14 +1992,14 @@ int calc3_decompress_table(running_machine* machine, int tabnum, UINT8* dstram,
else dat = shift_bits(dat, calc3_shift);
}
}
if(local_counter>1)
{
if (space)
{
memory_write_byte(space, dstoffset+i, dat);
}
// debug, used to output tables at the start
if (dstram)
{
@ -2008,7 +2008,7 @@ int calc3_decompress_table(running_machine* machine, int tabnum, UINT8* dstram,
}
else
data_header[local_counter]=dat;
++local_counter;
//dstram[(dstoffset+i)^1] = dat;
@ -2085,7 +2085,7 @@ DRIVER_INIT(calc3_scantables)
// to that extra block of data
// dump out the 0x1000 sized block at the end
#if CALC3_VERBOSE_OUTPUT
#if CALC3_VERBOSE_OUTPUT
{
FILE *fp;
char filename[256];
@ -2117,7 +2117,7 @@ void calc3_mcu_run(running_machine *machine)
if (calc3_dsw_addr) memory_write_byte(space, calc3_dsw_addr+0x200000, ( ~input_port_read(machine, "DSW1"))&0xff); // // DSW // dsw actually updates in realtime - mcu reads+writes it every frame
//calc3_mcu_status = 0;
mcu_command = kaneko16_mcu_ram[calc3_mcu_command_offset/2 + 0];
@ -2145,7 +2145,7 @@ void calc3_mcu_run(running_machine *machine)
cakc3_checkumaddress = kaneko16_mcu_ram[(0>>1) + 5];
calc3_writeaddress = (kaneko16_mcu_ram[(0>>1) + 6] << 16) |
(kaneko16_mcu_ram[(0>>1) + 7]);
// set our current write / stack pointer to the address specified
calc3_writeaddress_current = calc3_writeaddress;
#if CALC3_VERBOSE_OUTPUT
@ -2156,30 +2156,30 @@ void calc3_mcu_run(running_machine *machine)
printf("Calc 3 Init Command - %04x ROM Checksum Address\n", cakc3_checkumaddress);
printf("Calc 3 Init Command - %08x Data Write Address\n", calc3_writeaddress);
#endif
// memory_write_byte(space, calc3_dsw_addr+0x200000, ( ~input_port_read(machine, "DSW1"))&0xff); // // DSW // dsw actually updates in realtime - mcu reads+writes it every frame
// memory_write_byte(space, calc3_dsw_addr+0x200000, ( ~input_port_read(machine, "DSW1"))&0xff); // // DSW // dsw actually updates in realtime - mcu reads+writes it every frame
kaneko16_mcu_ram[cakc3_checkumaddress / 2] = calc3_mcu_crc; // MCU Rom Checksum!
/*
for (i=0;i<0x40;i++)
{
kaneko16_mcu_ram[(calc3_eeprom_addr / 2)+i] = kaneko16_eeprom_data[i];//((eepromData[i]&0xff00)>>8) | ((eepromData[i]&0x00ff)<<8);
}
*/
for (i=0;i<0x40;i++)
{
kaneko16_mcu_ram[(calc3_eeprom_addr / 2)+i] = kaneko16_eeprom_data[i];//((eepromData[i]&0xff00)>>8) | ((eepromData[i]&0x00ff)<<8);
}
*/
{
UINT32 length, size;
UINT8 *dat;
dat = (UINT8 *)eeprom_get_data_pointer(&length, &size);
for (i=0;i<0x80;i++)
{
memory_write_byte(space, calc3_eeprom_addr+0x200000+i, dat[i]);
}
}
}
}
/* otherwise the command number is the number of transfer operations to perform */
else
@ -2204,15 +2204,15 @@ void calc3_mcu_run(running_machine *machine)
#endif
{
int length;
length = calc3_decompress_table(machine, commandtabl, 0, calc3_writeaddress_current-2);
if (length)
{
int write=commandaddr;
#if CALC3_VERBOSE_OUTPUT
#if CALC3_VERBOSE_OUTPUT
printf("writing back address %08x to %08x %08x\n", calc3_writeaddress_current, commandaddr,write);
#endif
#endif
memory_write_byte(space,write+0x200000, data_header[0]);
memory_write_byte(space,write+0x200001, data_header[1]);
@ -2220,7 +2220,7 @@ void calc3_mcu_run(running_machine *machine)
write=commandaddr+(char)commandunk;
memory_write_word(space,write+0x200000, (calc3_writeaddress_current>>16)&0xffff);
memory_write_word(space,write+0x200002, (calc3_writeaddress_current&0xffff));
calc3_writeaddress_current += ((length+3)&(~1));
}

View File

@ -87,39 +87,39 @@ static void copd2_set_tableoffset(running_machine *machine, UINT16 data)
copd2_table_4[copd2_offs/8] = cop_43c;
/* Uncommented until actively worked on
{
FILE *fp;
char filename[256];
sprintf(filename,"copdat_%s.table2", machine->gamedrv->name);
fp=fopen(filename, "w+b");
if (fp)
{
fwrite(copd2_table_2, 0x200/8, 1, fp);
fclose(fp);
}
}
{
FILE *fp;
char filename[256];
sprintf(filename,"copdat_%s.table3", machine->gamedrv->name);
fp=fopen(filename, "w+b");
if (fp)
{
fwrite(copd2_table_3, 0x200/8, 1, fp);
fclose(fp);
}
}
{
FILE *fp;
char filename[256];
sprintf(filename,"copdat_%s.table4", machine->gamedrv->name);
fp=fopen(filename, "w+b");
if (fp)
{
fwrite(copd2_table_4, 0x200/8, 1, fp);
fclose(fp);
}
}
{
FILE *fp;
char filename[256];
sprintf(filename,"copdat_%s.table2", machine->gamedrv->name);
fp=fopen(filename, "w+b");
if (fp)
{
fwrite(copd2_table_2, 0x200/8, 1, fp);
fclose(fp);
}
}
{
FILE *fp;
char filename[256];
sprintf(filename,"copdat_%s.table3", machine->gamedrv->name);
fp=fopen(filename, "w+b");
if (fp)
{
fwrite(copd2_table_3, 0x200/8, 1, fp);
fclose(fp);
}
}
{
FILE *fp;
char filename[256];
sprintf(filename,"copdat_%s.table4", machine->gamedrv->name);
fp=fopen(filename, "w+b");
if (fp)
{
fwrite(copd2_table_4, 0x200/8, 1, fp);
fclose(fp);
}
}
*/
}
@ -130,17 +130,17 @@ static void copd2_set_tabledata(running_machine *machine, UINT16 data)
logerror("mcu_data %04x\n", data);
/* Uncommented until actively worked on
{
FILE *fp;
char filename[256];
sprintf(filename,"copdat_%s.data", machine->gamedrv->name);
fp=fopen(filename, "w+b");
if (fp)
{
fwrite(copd2_table, 0x200, 1, fp);
fclose(fp);
}
}
{
FILE *fp;
char filename[256];
sprintf(filename,"copdat_%s.data", machine->gamedrv->name);
fp=fopen(filename, "w+b");
if (fp)
{
fwrite(copd2_table, 0x200, 1, fp);
fclose(fp);
}
}
*/
}

View File

@ -1087,9 +1087,9 @@ WRITE64_HANDLER( pvr_ta_w )
else
sizera=5;
offsetra=pvrta_regs[REGION_BASE];
//printf("base is %08x\n", offsetra);
// sanity
sanitycount = 0;
for (;;)
@ -1101,7 +1101,7 @@ WRITE64_HANDLER( pvr_ta_w )
st[2]=memory_read_dword(space,(0x05000008+offsetra)); // Opaque Modifier Volume List Pointer
st[3]=memory_read_dword(space,(0x0500000c+offsetra)); // Translucent List Pointer
st[4]=memory_read_dword(space,(0x05000010+offsetra)); // Translucent Modifier Volume List Pointer
if (sizera == 6)
{
st[5] = memory_read_dword(space,(0x05000014+offsetra)); // Punch Through List Pointer
@ -1112,31 +1112,31 @@ WRITE64_HANDLER( pvr_ta_w )
st[5] = 0;
offsetra+=0x14;
}
{
int x = ((st[0]&0x000000fc)>>2)*32;
int y = ((st[0]&0x00003f00)>>8)*32;
//printf("tiledata %08x %d %d - %08x %08x %08x %08x %08x\n",st[0],x,y,st[1],st[2],st[3],st[4],st[5]);
// should render to the accumulation buffer here using pointers we filled in when processing the data
// sent to the TA. HOWEVER, we don't process the TA data and create the real format object lists, so
// instead just use these co-ordinates to copy data from our fake full-screnen accumnulation buffer into
// the framebuffer
pvr_accumulationbuffer_to_framebuffer(space, x,y);
}
if (st[0] & 0x80000000)
break;
// prevent infinite loop if asked to process invalid data
if(sanitycount>2000)
break;
}
break;
}
}
@ -1901,7 +1901,7 @@ static void render_to_accumulation_buffer(running_machine *machine,bitmap_t *bit
c=memory_read_dword(space,0x05000000+((c&0xfffff8)>>1)+(3+3)*4);
bitmap_fill(bitmap,cliprect,c);
ns=state_ta.grab[rs].strips_size;
if(ns)
memset(wbuffer, 0x00, sizeof(wbuffer));
@ -1957,12 +1957,12 @@ static void pvr_accumulationbuffer_to_framebuffer(const address_space *space, in
UINT32 wc = pvrta_regs[FB_W_CTRL];
UINT32 stride = pvrta_regs[FB_W_LINESTRIDE];
UINT32 writeoffs = pvrta_regs[FB_W_SOF1];
UINT32* src;
UINT8 packmode = wc & 0x7;
switch (packmode)
{
case 0x01: //565 RGB 16 bit
@ -1972,8 +1972,8 @@ static void pvr_accumulationbuffer_to_framebuffer(const address_space *space, in
{
UINT32 realwriteoffs = 0x05000000 + writeoffs + (y+ycnt) * (stride<<3) + (x*2);
src = BITMAP_ADDR32(fake_accumulationbuffer_bitmap, y+ycnt, x);
for (xcnt=0;xcnt<32;xcnt++)
{
// data is 8888 format
@ -1981,14 +1981,14 @@ static void pvr_accumulationbuffer_to_framebuffer(const address_space *space, in
UINT16 newdat = ((((data & 0x000000f8) >> 3)) << 0) |
((((data & 0x0000fc00) >> 10)) << 5) |
((((data & 0x00f80000) >> 19)) << 11);
memory_write_word(space,realwriteoffs+xcnt*2, newdat);
memory_write_word(space,realwriteoffs+xcnt*2, newdat);
}
}
}
break;
case 0x00:
case 0x02:
@ -1998,7 +1998,7 @@ static void pvr_accumulationbuffer_to_framebuffer(const address_space *space, in
case 0x06:
case 0x07:
default:
printf("pvr_accumulationbuffer_to_framebuffer buffer to tile at %d,%d - unsupported pack mode %02x\n",x,y,packmode);
}
@ -2017,10 +2017,10 @@ static void pvr_drawframebuffer(bitmap_t *bitmap,const rectangle *cliprect)
// only for rgb565 framebuffer
xi=((pvrta_regs[FB_R_SIZE] & 0x3ff)+1) << 1;
dy=((pvrta_regs[FB_R_SIZE] >> 10) & 0x3ff)+1;
dy*=2; // probably depends on interlace mode, fields etc...
for (y=0;y < dy;y++)
{
addrp=pvrta_regs[FB_R_SOF1]+y*xi*2;
@ -2028,12 +2028,12 @@ static void pvr_drawframebuffer(bitmap_t *bitmap,const rectangle *cliprect)
{
fbaddr=BITMAP_ADDR32(bitmap,y,x);
c=*(((UINT16 *)dc_framebuffer_ram) + (WORD2_XOR_LE(addrp) >> 1));
b = (c & 0x001f) << 3;
g = (c & 0x07e0) >> 3;
r = (c & 0xf800) >> 8;
if (y<cliprect->max_y)
if (y<cliprect->max_y)
*fbaddr = b | (g<<8) | (r<<16);
addrp+=2;
}
@ -2240,8 +2240,8 @@ VIDEO_UPDATE(dc)
******************/
// static int useframebuffer=1;
// const rectangle *visarea = video_screen_get_visible_area(screen);
// int y,x;
// const rectangle *visarea = video_screen_get_visible_area(screen);
// int y,x;
//printf("videoupdate\n");
#if DEBUG_PALRAM
@ -2262,7 +2262,7 @@ VIDEO_UPDATE(dc)
#endif
pvr_drawframebuffer(bitmap,cliprect);
// update this here so we only do string lookup once per frame
debug_dip_status = input_port_read(screen->machine, "MAMEDEBUG");

View File

@ -93,10 +93,10 @@ VIDEO_START( mastninj )
foreground = tilemap_create(machine, get_fg_tile_info, tilemap_scan_rows, 16, 16, 64, 32);
text_layer = tilemap_create(machine, get_tx_tile_info, tilemap_scan_rows, 8, 8, 32, 32);
// tilemap_set_transparent_pen(background, 15);
// tilemap_set_transparent_pen(background, 15);
tilemap_set_transparent_pen(foreground, 15);
tilemap_set_transparent_pen(text_layer, 15);
tilemap_set_scrolldx(background, -248, 248);
tilemap_set_scrolldx(foreground, -252, 252);
}

View File

@ -656,15 +656,15 @@ static TIMER_CALLBACK( jaguar_pit )
if (gpu_regs[PIT0])
{
sample_period = ATTOTIME_IN_NSEC(cpu_get_clock(cputag_get_cpu(machine,"gpu")) / (1+gpu_regs[PIT0]) / (1+gpu_regs[PIT1]));
// timer_set(machine, sample_period, NULL, 0, jaguar_pit);
// timer_set(machine, sample_period, NULL, 0, jaguar_pit);
}
}
#endif
WRITE16_HANDLER( jaguar_tom_regs_w )
{
UINT32 reg_store = gpu_regs[offset];
// attotime sample_period;
// attotime sample_period;
if (offset < GPU_REGS)
{
COMBINE_DATA(&gpu_regs[offset]);
@ -825,7 +825,7 @@ static TIMER_CALLBACK( cojag_scanline_update )
{
UINT8 r = pen_table[(scanline[x]&0xff)|256];
UINT8 g = pen_table[(scanline[x]>>8)|512];
UINT8 b = pen_table[scanline[x+1]&0xff];
UINT8 b = pen_table[scanline[x+1]&0xff];
dest[hdb++] = MAKE_RGB(r, g, b);
}
}

View File

@ -10,4 +10,4 @@
***************************************************************************/
extern const char build_version[];
const char build_version[] = "0.133u4 ("__DATE__")";
const char build_version[] = "0.133u5 ("__DATE__")";