several cleanups based on cppcheck and VS2008 Code Analysis [Oliver Stöneberg]
split.c: made the "split" return the actual result instead of just 0. [Oliver Stöneberg] clifront.c: made the identation of the CPU device in -listdevices the same like the others [Oliver Stöneberg] i386.c: gave some fatalerror() calls in the i386 proper messages [Oliver Stöneberg] ssem.c: fixed compilation of SSEM core with SSEM_DISASM_ON_UNIMPL [Oliver Stöneberg] srcclean.c: small wording change in the srcclean summary [Oliver Stöneberg] sdl/window.c: fixed a potential memory leak in sdlwindow_video_window_create() [Oliver Stöneberg]
This commit is contained in:
parent
0bc5acacbc
commit
c02b195ede
@ -669,12 +669,12 @@ int cli_info_listdevices(core_options *options, const char *gamename)
|
||||
{
|
||||
switch (devconfig->devclass)
|
||||
{
|
||||
case DEVICE_CLASS_AUDIO: printf(" Audio: "); break;
|
||||
case DEVICE_CLASS_VIDEO: printf(" Video: "); break;
|
||||
case DEVICE_CLASS_CPU_CHIP: printf(" CPU: "); break;
|
||||
case DEVICE_CLASS_SOUND_CHIP: printf(" Sound: "); break;
|
||||
case DEVICE_CLASS_TIMER: printf(" Timer: "); break;
|
||||
default: printf(" Other: "); break;
|
||||
case DEVICE_CLASS_AUDIO: printf(" Audio: "); break;
|
||||
case DEVICE_CLASS_VIDEO: printf(" Video: "); break;
|
||||
case DEVICE_CLASS_CPU_CHIP: printf(" CPU: "); break;
|
||||
case DEVICE_CLASS_SOUND_CHIP: printf(" Sound: "); break;
|
||||
case DEVICE_CLASS_TIMER: printf(" Timer: "); break;
|
||||
default: printf(" Other: "); break;
|
||||
}
|
||||
printf("%s ('%s')", devconfig->name(), devconfig->tag());
|
||||
if (devconfig->clock >= 1000000000)
|
||||
|
@ -528,12 +528,10 @@ static READ8_HANDLER( h8330_itu_r )
|
||||
frc = cpu_get_total_cycles(h8->device) / divider[h8->per_regs[0x96]];
|
||||
frc %= 65536;
|
||||
return frc>>8;
|
||||
break;
|
||||
case 0x93: // FRC L
|
||||
frc = cpu_get_total_cycles(h8->device) / divider[h8->per_regs[0x96]];
|
||||
frc %= 65536;
|
||||
return frc&0xff;
|
||||
break;
|
||||
case 0xb2: // port 1 data
|
||||
val = memory_read_byte(h8->io, H8_PORT_1);
|
||||
break;
|
||||
|
@ -2738,7 +2738,7 @@ static void I386OP(groupFF_16)(i386_state *cpustate) // Opcode 0xff
|
||||
{
|
||||
UINT16 address, selector;
|
||||
if( modrm >= 0xc0 ) {
|
||||
fatalerror("NYI");
|
||||
fatalerror("i386: groupFF_16 /%d NYI", (modrm >> 3) & 0x7);
|
||||
} else {
|
||||
UINT32 ea = GetEA(cpustate,modrm);
|
||||
address = READ16(cpustate,ea + 0);
|
||||
@ -2773,7 +2773,7 @@ static void I386OP(groupFF_16)(i386_state *cpustate) // Opcode 0xff
|
||||
{
|
||||
UINT16 address, selector;
|
||||
if( modrm >= 0xc0 ) {
|
||||
fatalerror("NYI");
|
||||
fatalerror("i386: groupFF_16 /%d NYI", (modrm >> 3) & 0x7);
|
||||
} else {
|
||||
UINT32 ea = GetEA(cpustate,modrm);
|
||||
address = READ16(cpustate,ea + 0);
|
||||
@ -3216,7 +3216,7 @@ static void I386OP(load_far_pointer16)(i386_state *cpustate, int s)
|
||||
UINT8 modrm = FETCH(cpustate);
|
||||
|
||||
if( modrm >= 0xc0 ) {
|
||||
fatalerror("NYI");
|
||||
fatalerror("i386: load_far_pointer16 NYI");
|
||||
} else {
|
||||
UINT32 ea = GetEA(cpustate,modrm);
|
||||
STORE_REG16(modrm, READ16(cpustate,ea + 0));
|
||||
|
@ -2579,7 +2579,7 @@ static void I386OP(groupFF_32)(i386_state *cpustate) // Opcode 0xff
|
||||
UINT16 selector;
|
||||
UINT32 address;
|
||||
if( modrm >= 0xc0 ) {
|
||||
fatalerror("NYI");
|
||||
fatalerror("i386: groupFF_32 /%d: NYI", (modrm >> 3) & 0x7);
|
||||
} else {
|
||||
UINT32 ea = GetEA(cpustate,modrm);
|
||||
address = READ32(cpustate,ea + 0);
|
||||
@ -2615,7 +2615,7 @@ static void I386OP(groupFF_32)(i386_state *cpustate) // Opcode 0xff
|
||||
UINT16 selector;
|
||||
UINT32 address;
|
||||
if( modrm >= 0xc0 ) {
|
||||
fatalerror("NYI");
|
||||
fatalerror("i386: groupFF_32 /%d: NYI", (modrm >> 3) & 0x7);
|
||||
} else {
|
||||
UINT32 ea = GetEA(cpustate,modrm);
|
||||
address = READ32(cpustate,ea + 0);
|
||||
@ -3026,7 +3026,7 @@ static void I386OP(load_far_pointer32)(i386_state *cpustate, int s)
|
||||
UINT8 modrm = FETCH(cpustate);
|
||||
|
||||
if( modrm >= 0xc0 ) {
|
||||
fatalerror("NYI");
|
||||
fatalerror("i386: load_far_pointer32 NYI");
|
||||
} else {
|
||||
UINT32 ea = GetEA(cpustate,modrm);
|
||||
STORE_REG32(modrm, READ32(cpustate,ea + 0));
|
||||
|
@ -30,7 +30,7 @@ static void PENTIUMOP(cmpxchg8b_m64)(i386_state *cpustate) // Opcode 0x0f c7
|
||||
{
|
||||
UINT8 modm = FETCH(cpustate);
|
||||
if( modm >= 0xc0 ) {
|
||||
fatalerror("invalid modm");
|
||||
fatalerror("pentium: cmpxchg8b_m64 - invalid modm");
|
||||
} else {
|
||||
UINT32 ea = GetEA(cpustate,modm);
|
||||
UINT64 value = READ64(cpustate,ea);
|
||||
|
@ -61,55 +61,6 @@ INLINE UINT32 reverse(UINT32 v)
|
||||
return v;
|
||||
}
|
||||
|
||||
static void unimplemented_opcode(ssem_state *cpustate, UINT32 op)
|
||||
{
|
||||
if((cpustate->device->machine->debug_flags & DEBUG_FLAG_ENABLED) != 0)
|
||||
{
|
||||
char string[200];
|
||||
ssem_dasm_one(string, cpustate->pc-1, op);
|
||||
mame_printf_debug("%08X: %s\n", cpustate->pc-1, string);
|
||||
}
|
||||
|
||||
#if SSEM_DISASM_ON_UNIMPL
|
||||
{
|
||||
char string[200] = { 0 };
|
||||
UINT32 i = 0;
|
||||
FILE *disasm = fopen("ssemdasm.txt", "wt");
|
||||
|
||||
if(disasm)
|
||||
{
|
||||
for(i = 0; i < 0x20; i++)
|
||||
{
|
||||
UINT32 opcode = reverse(READ32(i));
|
||||
ssem_dasm_one(string, i, opcode);
|
||||
fprintf(dasm, "%02X: %08X %s\n", i, opcode, string);
|
||||
}
|
||||
|
||||
fclose(disasm);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#if SSEM_DUMP_MEM_ON_UNIMPL
|
||||
{
|
||||
UINT32 i = 0;
|
||||
FILE *store = fopen("ssemmem.bin", "wb");
|
||||
|
||||
if(store)
|
||||
{
|
||||
for( i = 0; i < 0x80; i++ )
|
||||
{
|
||||
fputc(memory_read_byte_32be(cpustate->program, i), store);
|
||||
}
|
||||
fclose(store);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
fatalerror("SSEM: unknown opcode %d (%08X) at %d\n", reverse(op) & 7, reverse(op), cpustate->pc);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
INLINE UINT32 READ32(ssem_state *cpustate, UINT32 address)
|
||||
{
|
||||
UINT32 v = 0;
|
||||
@ -144,6 +95,55 @@ INLINE void WRITE32(ssem_state *cpustate, UINT32 address, UINT32 data)
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
static void unimplemented_opcode(ssem_state *cpustate, UINT32 op)
|
||||
{
|
||||
if((cpustate->device->machine->debug_flags & DEBUG_FLAG_ENABLED) != 0)
|
||||
{
|
||||
char string[200];
|
||||
ssem_dasm_one(string, cpustate->pc-1, op);
|
||||
mame_printf_debug("%08X: %s\n", cpustate->pc-1, string);
|
||||
}
|
||||
|
||||
#if SSEM_DISASM_ON_UNIMPL
|
||||
{
|
||||
char string[200] = { 0 };
|
||||
UINT32 i = 0;
|
||||
FILE *disasm = fopen("ssemdasm.txt", "wt");
|
||||
|
||||
if(disasm)
|
||||
{
|
||||
for(i = 0; i < 0x20; i++)
|
||||
{
|
||||
UINT32 opcode = reverse(READ32(cpustate, i));
|
||||
ssem_dasm_one(string, i, opcode);
|
||||
fprintf(disasm, "%02X: %08X %s\n", i, opcode, string);
|
||||
}
|
||||
|
||||
fclose(disasm);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#if SSEM_DUMP_MEM_ON_UNIMPL
|
||||
{
|
||||
UINT32 i = 0;
|
||||
FILE *store = fopen("ssemmem.bin", "wb");
|
||||
|
||||
if(store)
|
||||
{
|
||||
for( i = 0; i < 0x80; i++ )
|
||||
{
|
||||
fputc(memory_read_byte_32be(cpustate->program, i), store);
|
||||
}
|
||||
fclose(store);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
fatalerror("SSEM: unknown opcode %d (%08X) at %d\n", reverse(op) & 7, reverse(op), cpustate->pc);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
static CPU_INIT( ssem )
|
||||
{
|
||||
ssem_state *cpustate = get_safe_token(device);
|
||||
|
@ -8,7 +8,7 @@ int dab[0x800];
|
||||
|
||||
int main(int ac, char **av)
|
||||
{
|
||||
int i, result;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < DF; i++) {
|
||||
if (i & CF) {
|
||||
|
@ -1115,7 +1115,7 @@ static EXPRERR infix_to_postfix(parsed_expression *expr)
|
||||
/* If this is an operator, process it */
|
||||
else if (token->type == TOK_OPERATOR)
|
||||
{
|
||||
int exprerr = normalize_operator(expr, tokindex);
|
||||
exprerr = normalize_operator(expr, tokindex);
|
||||
if (exprerr != 0)
|
||||
return exprerr;
|
||||
|
||||
|
@ -186,9 +186,9 @@ static void output_exit(running_machine *machine)
|
||||
/* remove all notifiers */
|
||||
for (notify = item->notifylist; notify != NULL; )
|
||||
{
|
||||
output_notify *next = notify->next;
|
||||
output_notify *next_notify = notify->next;
|
||||
global_free(notify);
|
||||
notify = next;
|
||||
notify = next_notify;
|
||||
}
|
||||
|
||||
/* free the name and the item */
|
||||
|
@ -562,14 +562,14 @@ static void layout_element_draw_text(bitmap_t *dest, const rectangle *bounds, co
|
||||
int effy = bounds->min_y + y;
|
||||
if (effy >= bounds->min_y && effy <= bounds->max_y)
|
||||
{
|
||||
UINT32 *s = BITMAP_ADDR32(tempbitmap, y, 0);
|
||||
UINT32 *src = BITMAP_ADDR32(tempbitmap, y, 0);
|
||||
UINT32 *d = BITMAP_ADDR32(dest, effy, 0);
|
||||
for (x = 0; x < chbounds.max_x - chbounds.min_x; x++)
|
||||
{
|
||||
int effx = curx + x + chbounds.min_x;
|
||||
if (effx >= bounds->min_x && effx <= bounds->max_x)
|
||||
{
|
||||
UINT32 spix = RGB_ALPHA(s[x]);
|
||||
UINT32 spix = RGB_ALPHA(src[x]);
|
||||
if (spix != 0)
|
||||
{
|
||||
UINT32 dpix = d[effx];
|
||||
@ -1595,31 +1595,31 @@ static layout_element *load_layout_element(const machine_config *config, xml_dat
|
||||
for (compnode = elemnode->child; compnode; compnode = compnode->next)
|
||||
{
|
||||
/* allocate a new component */
|
||||
element_component *component = load_element_component(config, compnode, dirname);
|
||||
if (component == NULL)
|
||||
element_component *new_component = load_element_component(config, compnode, dirname);
|
||||
if (new_component == NULL)
|
||||
goto error;
|
||||
|
||||
/* link it into the list */
|
||||
*nextcomp = component;
|
||||
nextcomp = &component->next;
|
||||
*nextcomp = new_component;
|
||||
nextcomp = &new_component->next;
|
||||
|
||||
/* accumulate bounds */
|
||||
if (first)
|
||||
bounds = component->bounds;
|
||||
bounds = new_component->bounds;
|
||||
else
|
||||
union_render_bounds(&bounds, &component->bounds);
|
||||
union_render_bounds(&bounds, &new_component->bounds);
|
||||
first = FALSE;
|
||||
|
||||
/* determine the maximum state */
|
||||
if (component->state > element->maxstate)
|
||||
element->maxstate = component->state;
|
||||
if (component->type == COMPONENT_TYPE_LED7SEG)
|
||||
if (new_component->state > element->maxstate)
|
||||
element->maxstate = new_component->state;
|
||||
if (new_component->type == COMPONENT_TYPE_LED7SEG)
|
||||
element->maxstate = 255;
|
||||
if (component->type == COMPONENT_TYPE_LED14SEG)
|
||||
if (new_component->type == COMPONENT_TYPE_LED14SEG)
|
||||
element->maxstate = 16383;
|
||||
if (component->type == COMPONENT_TYPE_LED14SEGSC || component->type == COMPONENT_TYPE_LED16SEG)
|
||||
if (new_component->type == COMPONENT_TYPE_LED14SEGSC || new_component->type == COMPONENT_TYPE_LED16SEG)
|
||||
element->maxstate = 65535;
|
||||
if (component->type == COMPONENT_TYPE_LED16SEGSC)
|
||||
if (new_component->type == COMPONENT_TYPE_LED16SEGSC)
|
||||
element->maxstate = 262143;
|
||||
}
|
||||
|
||||
|
@ -1060,14 +1060,16 @@ WRITE8_DEVICE_HANDLER( ay8910_address_w )
|
||||
{
|
||||
#if ENABLE_REGISTER_TEST
|
||||
return;
|
||||
#endif
|
||||
#else
|
||||
ay8910_data_address_w(device, 1, data);
|
||||
#endif
|
||||
}
|
||||
|
||||
WRITE8_DEVICE_HANDLER( ay8910_data_w )
|
||||
{
|
||||
#if ENABLE_REGISTER_TEST
|
||||
return;
|
||||
#endif
|
||||
#else
|
||||
ay8910_data_address_w(device, 0, data);
|
||||
#endif
|
||||
}
|
||||
|
@ -763,8 +763,10 @@ void tms5110_PDC_set(tms5110_state *tms, int data)
|
||||
|
||||
static void parse_frame(tms5110_state *tms)
|
||||
{
|
||||
int bits, indx, i, rep_flag, ene;
|
||||
|
||||
int bits, indx, i, rep_flag;
|
||||
#if (DEBUG_5110)
|
||||
int ene;
|
||||
#endif
|
||||
|
||||
/* count the total number of bits available */
|
||||
bits = tms->fifo_count;
|
||||
@ -779,7 +781,9 @@ static void parse_frame(tms5110_state *tms)
|
||||
}
|
||||
indx = extract_bits(tms,tms->coeff->energy_bits);
|
||||
tms->new_energy = tms->coeff->energytable[indx];
|
||||
#if (DEBUG_5110)
|
||||
ene = indx;
|
||||
#endif
|
||||
|
||||
/* if the energy index is 0 or 15, we're done */
|
||||
|
||||
|
@ -50,7 +50,6 @@ static READ8_HANDLER( bankedram_r )
|
||||
{
|
||||
case 2:
|
||||
return cbasebal_textram_r(space, offset); /* VRAM */
|
||||
break;
|
||||
case 1:
|
||||
if (offset < 0x800)
|
||||
return space->machine->generic.paletteram.u8[offset];
|
||||
@ -59,7 +58,6 @@ static READ8_HANDLER( bankedram_r )
|
||||
break;
|
||||
default:
|
||||
return cbasebal_scrollram_r(space, offset); /* SCROLL */
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -154,7 +154,6 @@ static int planes_enabled[4] = {1,1,1,1}; //all enabled
|
||||
VIDEO_UPDATE( test_vcu )
|
||||
{
|
||||
mazerbla_state *state = (mazerbla_state *)screen->machine->driver_data;
|
||||
int j;
|
||||
char buf[128];
|
||||
|
||||
UINT32 color_base = 0;
|
||||
|
@ -2040,11 +2040,14 @@ DRIVER_INIT(calc3_scantables)
|
||||
for (x=0;x<numregions;x++)
|
||||
{
|
||||
UINT8* tmpdstram = auto_alloc_array(machine, UINT8, 0x2000);
|
||||
int length;
|
||||
#if CALC3_VERBOSE_OUTPUT
|
||||
int length;
|
||||
#endif
|
||||
|
||||
memset(tmpdstram, 0x00,0x2000);
|
||||
length = calc3_decompress_table(machine, x, tmpdstram, 0);
|
||||
|
||||
#if CALC3_VERBOSE_OUTPUT
|
||||
length = calc3_decompress_table(machine, x, tmpdstram, 0);
|
||||
// dump to file
|
||||
if (length)
|
||||
{
|
||||
|
@ -1666,7 +1666,6 @@ static int pif_channel_handle_command(running_machine *machine, int channel, int
|
||||
case 0x03:
|
||||
{
|
||||
UINT32 address, checksum;
|
||||
int i;
|
||||
/*mame_printf_debug("Write to mempack, rlength = %d, slength = %d\n", rlength, slength);
|
||||
for (i=0; i < slength; i++)
|
||||
{
|
||||
|
@ -582,16 +582,12 @@ static UINT8 sdd1_mmio_read(const address_space *space, UINT32 addr)
|
||||
{
|
||||
case 0x4804:
|
||||
return (snes_sdd1.mmc[0] >> 20) & 7;
|
||||
break;
|
||||
case 0x4805:
|
||||
return (snes_sdd1.mmc[1] >> 20) & 7;
|
||||
break;
|
||||
case 0x4806:
|
||||
return (snes_sdd1.mmc[2] >> 20) & 7;
|
||||
break;
|
||||
case 0x4807:
|
||||
return (snes_sdd1.mmc[3] >> 20) & 7;
|
||||
break;
|
||||
}
|
||||
|
||||
return 0xff;
|
||||
|
@ -623,7 +623,7 @@ void amiga_render_scanline(running_machine *machine, bitmap_t *bitmap, int scanl
|
||||
int ecolmask = 0, ocolmask = 0;
|
||||
int edelay = 0, odelay = 0;
|
||||
int next_copper_x;
|
||||
int p;
|
||||
int pl;
|
||||
|
||||
last_scanline = scanline;
|
||||
|
||||
@ -723,8 +723,8 @@ void amiga_render_scanline(running_machine *machine, bitmap_t *bitmap, int scanl
|
||||
ebitoffs = 15 + edelay;
|
||||
}
|
||||
|
||||
for (p = 0; p < 6; p++)
|
||||
CUSTOM_REG(REG_BPL1DAT + p) = 0;
|
||||
for (pl = 0; pl < 6; pl++)
|
||||
CUSTOM_REG(REG_BPL1DAT + pl) = 0;
|
||||
}
|
||||
|
||||
/* need to run the sprite engine every pixel to ensure display */
|
||||
@ -742,10 +742,10 @@ void amiga_render_scanline(running_machine *machine, bitmap_t *bitmap, int scanl
|
||||
{
|
||||
/* if we need to fetch more data, do it now */
|
||||
if (obitoffs == 15)
|
||||
for (p = 0; p < planes; p += 2)
|
||||
for (pl = 0; pl < planes; pl += 2)
|
||||
{
|
||||
CUSTOM_REG(REG_BPL1DAT + p) = amiga_chip_ram_r(CUSTOM_REG_LONG(REG_BPL1PTH + p * 2));
|
||||
CUSTOM_REG_LONG(REG_BPL1PTH + p * 2) += 2;
|
||||
CUSTOM_REG(REG_BPL1DAT + pl) = amiga_chip_ram_r(CUSTOM_REG_LONG(REG_BPL1PTH + pl * 2));
|
||||
CUSTOM_REG_LONG(REG_BPL1PTH + pl * 2) += 2;
|
||||
}
|
||||
|
||||
/* now assemble the bits */
|
||||
@ -760,10 +760,10 @@ void amiga_render_scanline(running_machine *machine, bitmap_t *bitmap, int scanl
|
||||
{
|
||||
obitoffs = 15;
|
||||
|
||||
for (p = 0; p < planes; p += 2)
|
||||
for (pl = 0; pl < planes; pl += 2)
|
||||
{
|
||||
CUSTOM_REG(REG_BPL1DAT + p) = amiga_chip_ram_r(CUSTOM_REG_LONG(REG_BPL1PTH + p * 2));
|
||||
CUSTOM_REG_LONG(REG_BPL1PTH + p * 2) += 2;
|
||||
CUSTOM_REG(REG_BPL1DAT + pl) = amiga_chip_ram_r(CUSTOM_REG_LONG(REG_BPL1PTH + pl * 2));
|
||||
CUSTOM_REG_LONG(REG_BPL1PTH + pl * 2) += 2;
|
||||
}
|
||||
}
|
||||
|
||||
@ -783,10 +783,10 @@ void amiga_render_scanline(running_machine *machine, bitmap_t *bitmap, int scanl
|
||||
{
|
||||
/* if we need to fetch more data, do it now */
|
||||
if (ebitoffs == 15)
|
||||
for (p = 1; p < planes; p += 2)
|
||||
for (pl = 1; pl < planes; pl += 2)
|
||||
{
|
||||
CUSTOM_REG(REG_BPL1DAT + p) = amiga_chip_ram_r(CUSTOM_REG_LONG(REG_BPL1PTH + p * 2));
|
||||
CUSTOM_REG_LONG(REG_BPL1PTH + p * 2) += 2;
|
||||
CUSTOM_REG(REG_BPL1DAT + pl) = amiga_chip_ram_r(CUSTOM_REG_LONG(REG_BPL1PTH + pl * 2));
|
||||
CUSTOM_REG_LONG(REG_BPL1PTH + pl * 2) += 2;
|
||||
}
|
||||
|
||||
/* now assemble the bits */
|
||||
@ -801,10 +801,10 @@ void amiga_render_scanline(running_machine *machine, bitmap_t *bitmap, int scanl
|
||||
{
|
||||
ebitoffs = 15;
|
||||
|
||||
for (p = 1; p < planes; p += 2)
|
||||
for (pl = 1; pl < planes; pl += 2)
|
||||
{
|
||||
CUSTOM_REG(REG_BPL1DAT + p) = amiga_chip_ram_r(CUSTOM_REG_LONG(REG_BPL1PTH + p * 2));
|
||||
CUSTOM_REG_LONG(REG_BPL1PTH + p * 2) += 2;
|
||||
CUSTOM_REG(REG_BPL1DAT + pl) = amiga_chip_ram_r(CUSTOM_REG_LONG(REG_BPL1PTH + pl * 2));
|
||||
CUSTOM_REG_LONG(REG_BPL1PTH + pl * 2) += 2;
|
||||
}
|
||||
}
|
||||
|
||||
@ -945,15 +945,13 @@ void amiga_render_scanline(running_machine *machine, bitmap_t *bitmap, int scanl
|
||||
/* end of the line: time to add the modulos */
|
||||
if (scanline >= vstart && scanline < vstop)
|
||||
{
|
||||
int p;
|
||||
|
||||
/* update odd planes */
|
||||
for (p = 0; p < planes; p += 2)
|
||||
CUSTOM_REG_LONG(REG_BPL1PTH + p * 2) += CUSTOM_REG_SIGNED(REG_BPL1MOD);
|
||||
for (pl = 0; pl < planes; pl += 2)
|
||||
CUSTOM_REG_LONG(REG_BPL1PTH + pl * 2) += CUSTOM_REG_SIGNED(REG_BPL1MOD);
|
||||
|
||||
/* update even planes */
|
||||
for (p = 1; p < planes; p += 2)
|
||||
CUSTOM_REG_LONG(REG_BPL1PTH + p * 2) += CUSTOM_REG_SIGNED(REG_BPL2MOD);
|
||||
for (pl = 1; pl < planes; pl += 2)
|
||||
CUSTOM_REG_LONG(REG_BPL1PTH + pl * 2) += CUSTOM_REG_SIGNED(REG_BPL2MOD);
|
||||
}
|
||||
|
||||
/* restore color00 */
|
||||
|
@ -781,7 +781,7 @@ void amiga_aga_render_scanline(running_machine *machine, bitmap_t *bitmap, int s
|
||||
int ecolmask = 0, ocolmask = 0;
|
||||
int edelay = 0, odelay = 0;
|
||||
int next_copper_x;
|
||||
int p;
|
||||
int pl;
|
||||
pen_t ham_pix;
|
||||
int defbitoffs = 0;
|
||||
|
||||
@ -921,8 +921,8 @@ void amiga_aga_render_scanline(running_machine *machine, bitmap_t *bitmap, int s
|
||||
ebitoffs = defbitoffs + edelay;
|
||||
}
|
||||
|
||||
for (p = 0; p < 8; p++)
|
||||
aga_bpldat[p] = 0;
|
||||
for (pl = 0; pl < 8; pl++)
|
||||
aga_bpldat[pl] = 0;
|
||||
}
|
||||
|
||||
/* need to run the sprite engine every pixel to ensure display */
|
||||
@ -941,9 +941,9 @@ void amiga_aga_render_scanline(running_machine *machine, bitmap_t *bitmap, int s
|
||||
/* if we need to fetch more data, do it now */
|
||||
if (obitoffs == defbitoffs)
|
||||
{
|
||||
for (p = 0; p < planes; p += 2)
|
||||
for (pl = 0; pl < planes; pl += 2)
|
||||
{
|
||||
fetch_bitplane_data(p);
|
||||
fetch_bitplane_data(pl);
|
||||
}
|
||||
}
|
||||
|
||||
@ -959,9 +959,9 @@ void amiga_aga_render_scanline(running_machine *machine, bitmap_t *bitmap, int s
|
||||
{
|
||||
obitoffs = defbitoffs;
|
||||
|
||||
for (p = 0; p < planes; p += 2)
|
||||
for (pl = 0; pl < planes; pl += 2)
|
||||
{
|
||||
fetch_bitplane_data(p);
|
||||
fetch_bitplane_data(pl);
|
||||
}
|
||||
}
|
||||
|
||||
@ -982,9 +982,9 @@ void amiga_aga_render_scanline(running_machine *machine, bitmap_t *bitmap, int s
|
||||
/* if we need to fetch more data, do it now */
|
||||
if (ebitoffs == defbitoffs)
|
||||
{
|
||||
for (p = 1; p < planes; p += 2)
|
||||
for (pl = 1; pl < planes; pl += 2)
|
||||
{
|
||||
fetch_bitplane_data(p);
|
||||
fetch_bitplane_data(pl);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1000,9 +1000,9 @@ void amiga_aga_render_scanline(running_machine *machine, bitmap_t *bitmap, int s
|
||||
{
|
||||
ebitoffs = defbitoffs;
|
||||
|
||||
for (p = 1; p < planes; p += 2)
|
||||
for (pl = 1; pl < planes; pl += 2)
|
||||
{
|
||||
fetch_bitplane_data(p);
|
||||
fetch_bitplane_data(pl);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1144,15 +1144,13 @@ void amiga_aga_render_scanline(running_machine *machine, bitmap_t *bitmap, int s
|
||||
/* end of the line: time to add the modulos */
|
||||
if (scanline >= vstart && scanline < vstop)
|
||||
{
|
||||
int p;
|
||||
|
||||
/* update odd planes */
|
||||
for (p = 0; p < planes; p += 2)
|
||||
CUSTOM_REG_LONG(REG_BPL1PTH + p * 2) += CUSTOM_REG_SIGNED(REG_BPL1MOD);
|
||||
for (pl = 0; pl < planes; pl += 2)
|
||||
CUSTOM_REG_LONG(REG_BPL1PTH + pl * 2) += CUSTOM_REG_SIGNED(REG_BPL1MOD);
|
||||
|
||||
/* update even planes */
|
||||
for (p = 1; p < planes; p += 2)
|
||||
CUSTOM_REG_LONG(REG_BPL1PTH + p * 2) += CUSTOM_REG_SIGNED(REG_BPL2MOD);
|
||||
for (pl = 1; pl < planes; pl += 2)
|
||||
CUSTOM_REG_LONG(REG_BPL1PTH + pl * 2) += CUSTOM_REG_SIGNED(REG_BPL2MOD);
|
||||
}
|
||||
|
||||
/* restore color00 */
|
||||
|
@ -9794,8 +9794,9 @@ static void k001005_render_polygons( running_device *device )
|
||||
while ((k001005->_3d_fifo[index] & 0xffffff00) != 0x80000000 && index < k001005->_3d_fifo_ptr)
|
||||
{
|
||||
poly_extra_data *extra = (poly_extra_data *)poly_get_extra_data(k001005->poly);
|
||||
#if POLY_DEVICE
|
||||
int new_verts = 0;
|
||||
|
||||
#endif
|
||||
if (poly_type)
|
||||
{
|
||||
memcpy(&v[0], &k001005->prev_v[2], sizeof(poly_vertex));
|
||||
@ -9848,7 +9849,9 @@ static void k001005_render_polygons( running_device *device )
|
||||
v[j].p[1] = u2 * v[j].p[3];
|
||||
v[j].p[2] = v2 * v[j].p[3];
|
||||
|
||||
#if POLY_DEVICE
|
||||
++new_verts;
|
||||
#endif
|
||||
|
||||
if (end)
|
||||
break;
|
||||
|
@ -487,6 +487,7 @@ static void draw_background( running_machine *machine, bitmap_t *bitmap, const r
|
||||
psikyosh_state *state = (psikyosh_state *)machine->driver_data;
|
||||
int i;
|
||||
|
||||
#ifdef DEBUG_KEYS
|
||||
const int lay_keys[8] = {KEYCODE_Q, KEYCODE_W, KEYCODE_E, KEYCODE_R};
|
||||
bool lay_debug = false;
|
||||
for (i = 0; i <= 3; i++)
|
||||
@ -495,14 +496,14 @@ static void draw_background( running_machine *machine, bitmap_t *bitmap, const r
|
||||
lay_debug = true;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/* 1st-4th layers */
|
||||
for (i = 0; i <= 3; i++)
|
||||
{
|
||||
#ifdef DEBUG_KEYS
|
||||
if(lay_debug && !input_code_pressed(machine, lay_keys[i])) {
|
||||
if(lay_debug && !input_code_pressed(machine, lay_keys[i]))
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!BG_LAYER_ENABLE(i))
|
||||
|
@ -5282,10 +5282,10 @@ static int get_hblank_duration(running_machine *machine)
|
||||
{
|
||||
switch( STV_VDP2_HRES & 3 )
|
||||
{
|
||||
case 0: return 80; //400-320
|
||||
case 1: return 104; break; //456-352
|
||||
case 2: return 160; break; //(400-320)*2
|
||||
case 3: return 208; break; //(456-352)*2
|
||||
case 0: return 80; //400-320
|
||||
case 1: return 104; //456-352
|
||||
case 2: return 160; //(400-320)*2
|
||||
case 3: return 208; //(456-352)*2
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -3998,8 +3998,9 @@ void tc0150rod_draw( running_device *device, bitmap_t *bitmap, const rectangle *
|
||||
int screen_width = max_x - min_x + 1;
|
||||
|
||||
int y = min_y;
|
||||
|
||||
#if 0
|
||||
int twin_road = 0;
|
||||
#endif
|
||||
|
||||
int road_A_address = y_offs * 4 + ((road_ctrl & 0x0300) << 2); /* Index into roadram for road A */
|
||||
int road_B_address = y_offs * 4 + ((road_ctrl & 0x0c00) << 0); /* Index into roadram for road B */
|
||||
@ -4093,8 +4094,10 @@ void tc0150rod_draw( running_device *device, bitmap_t *bitmap, const rectangle *
|
||||
|
||||
if (priorities[4] == 0) priorities[4]++; /* Fixes Aquajack LH edge dropping below background */
|
||||
|
||||
#if 0
|
||||
if ((roada_bodyctrl & 0x8000) || (roadb_bodyctrl & 0x8000))
|
||||
twin_road ++;
|
||||
twin_road++;
|
||||
#endif
|
||||
|
||||
/********************************************************/
|
||||
/* ROAD A */
|
||||
|
@ -345,7 +345,7 @@ static int delete_shader_tool( GLhandleARB *program, GLhandleARB *vertex_shader,
|
||||
*fragment_shader=0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return res;
|
||||
}
|
||||
|
||||
int gl_compile_shader_source( GLhandleARB *shader, GLenum type, const char * shader_source, int verbose )
|
||||
|
@ -967,7 +967,7 @@ static kt_table * sdlinput_read_keymap(running_machine *machine)
|
||||
buf[i-1] = 0;
|
||||
mks[0]=0;
|
||||
sks[0]=0;
|
||||
memset(kns, 0, 21);
|
||||
memset(kns, 0, ARRAY_LENGTH(kns));
|
||||
sscanf(buf, "%20s %20s %x %x %20c\n",
|
||||
mks, sks, &vk, &ak, kns);
|
||||
|
||||
|
@ -507,7 +507,7 @@ static void sdl_kill(running_machine *machine)
|
||||
{
|
||||
if (initialized_audio)
|
||||
{
|
||||
mame_printf_debug("sdl_kill: closing audio\n");
|
||||
mame_printf_verbose("sdl_kill: closing audio\n");
|
||||
|
||||
SDL_CloseAudio();
|
||||
}
|
||||
|
@ -146,7 +146,7 @@ int main(int argc, char *argv[])
|
||||
quit=1;
|
||||
else
|
||||
{
|
||||
memset(buf, 0, 19);
|
||||
memset(buf, 0, ARRAY_LENGTH(buf));
|
||||
utf8_from_uchar(buf, sizeof(buf), event.key.keysym.unicode);
|
||||
printf("ITEM_ID_XY %s 0x%x 0x%x %s \n",
|
||||
#if (SDL_VERSION_ATLEAST(1,3,0))
|
||||
|
@ -738,7 +738,10 @@ int sdlwindow_video_window_create(running_machine *machine, int index, sdl_monit
|
||||
// load the layout
|
||||
window->target = render_target_alloc(machine, NULL, FALSE);
|
||||
if (window->target == NULL)
|
||||
{
|
||||
osd_free(wp);
|
||||
goto error;
|
||||
}
|
||||
|
||||
// set the specific view
|
||||
sprintf(option, SDLOPTION_VIEW("%d"), index);
|
||||
|
@ -759,15 +759,15 @@ static LRESULT CALLBACK debugwin_window_proc(HWND wnd, UINT message, WPARAM wpar
|
||||
// send the appropriate message to this view's scrollbar
|
||||
if (info->view[viewnum].wnd && info->view[viewnum].vscroll)
|
||||
{
|
||||
int message = SB_LINELEFT;
|
||||
int message_type = SB_LINELEFT;
|
||||
if (delta < 0)
|
||||
{
|
||||
message = SB_LINERIGHT;
|
||||
message_type = SB_LINERIGHT;
|
||||
delta = -delta;
|
||||
}
|
||||
while (delta > 0)
|
||||
{
|
||||
SendMessage(info->view[viewnum].wnd, WM_VSCROLL, message, (LPARAM)info->view[viewnum].vscroll);
|
||||
SendMessage(info->view[viewnum].wnd, WM_VSCROLL, message_type, (LPARAM)info->view[viewnum].vscroll);
|
||||
delta--;
|
||||
}
|
||||
}
|
||||
|
@ -170,7 +170,7 @@ static void winvideo_exit(running_machine *machine)
|
||||
|
||||
void winvideo_monitor_refresh(win_monitor_info *monitor)
|
||||
{
|
||||
HRESULT result;
|
||||
BOOL result;
|
||||
|
||||
// fetch the latest info about the monitor
|
||||
monitor->info.cbSize = sizeof(monitor->info);
|
||||
|
@ -450,7 +450,7 @@ int main(int argc, char *argv[])
|
||||
else
|
||||
goto usage;
|
||||
|
||||
return 0;
|
||||
return result;
|
||||
|
||||
usage:
|
||||
fprintf(stderr,
|
||||
|
@ -237,9 +237,9 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
/* explain what we did */
|
||||
printf("Cleaned up %s:", argv[1]);
|
||||
if (removed_spaces) printf(" removed %d spaces", removed_spaces);
|
||||
if (removed_tabs) printf(" removed %d tabs", removed_tabs);
|
||||
if (hichars) printf(" fixed %d high-ASCII chars", hichars);
|
||||
if (removed_spaces) printf(" removed %d space(s)", removed_spaces);
|
||||
if (removed_tabs) printf(" removed %d tab(s)", removed_tabs);
|
||||
if (hichars) printf(" fixed %d high-ASCII char(s)", hichars);
|
||||
if (fixed_nix_style) printf(" fixed *nix-style line-ends");
|
||||
if (fixed_mac_style) printf(" fixed Mac-style line-ends");
|
||||
printf("\n");
|
||||
|
Loading…
Reference in New Issue
Block a user