gcc 6.1.1 warning fixes (nw)

This commit is contained in:
Olivier Galibert 2016-06-16 14:16:28 +02:00 committed by Olivier Galibert
parent 8c87ea208c
commit 7099d6eaa2
40 changed files with 303 additions and 208 deletions

View File

@ -1415,9 +1415,9 @@ void ImGui::ShowTestWindow(bool* p_open)
ImGui::InputFloat("blue", &bar, 0.05f, 0, 3);
ImGui::NextColumn();
if (ImGui::CollapsingHeader("Category A")) ImGui::Text("Blah blah blah"); ImGui::NextColumn();
if (ImGui::CollapsingHeader("Category B")) ImGui::Text("Blah blah blah"); ImGui::NextColumn();
if (ImGui::CollapsingHeader("Category C")) ImGui::Text("Blah blah blah"); ImGui::NextColumn();
if (ImGui::CollapsingHeader("Category A")) { ImGui::Text("Blah blah blah"); } ImGui::NextColumn();
if (ImGui::CollapsingHeader("Category B")) { ImGui::Text("Blah blah blah"); } ImGui::NextColumn();
if (ImGui::CollapsingHeader("Category C")) { ImGui::Text("Blah blah blah"); } ImGui::NextColumn();
ImGui::Columns(1);
ImGui::Separator();
ImGui::TreePop();
@ -1873,9 +1873,9 @@ static void ShowExampleAppConstrainedResize(bool* p_open)
"Custom: Fixed Steps (100)",
};
ImGui::Combo("Constraint", &type, desc, IM_ARRAYSIZE(desc));
if (ImGui::Button("200x200")) ImGui::SetWindowSize(ImVec2(200,200)); ImGui::SameLine();
if (ImGui::Button("500x500")) ImGui::SetWindowSize(ImVec2(500,500)); ImGui::SameLine();
if (ImGui::Button("800x200")) ImGui::SetWindowSize(ImVec2(800,200));
if (ImGui::Button("200x200")) { ImGui::SetWindowSize(ImVec2(200,200)); } ImGui::SameLine();
if (ImGui::Button("500x500")) { ImGui::SetWindowSize(ImVec2(500,500)); } ImGui::SameLine();
if (ImGui::Button("800x200")) { ImGui::SetWindowSize(ImVec2(800,200)); }
for (int i = 0; i < 10; i++)
ImGui::Text("Hello, sailor! Making this line long enough for the example.");
}
@ -2088,8 +2088,8 @@ struct ExampleAppConsole
// TODO: display items starting from the bottom
if (ImGui::SmallButton("Add Dummy Text")) { AddLog("%d some text", Items.Size); AddLog("some more text"); AddLog("display very important message here!"); } ImGui::SameLine();
if (ImGui::SmallButton("Add Dummy Error")) AddLog("[error] something went wrong"); ImGui::SameLine();
if (ImGui::SmallButton("Clear")) ClearLog(); ImGui::SameLine();
if (ImGui::SmallButton("Add Dummy Error")) { AddLog("[error] something went wrong"); } ImGui::SameLine();
if (ImGui::SmallButton("Clear")) { ClearLog(); } ImGui::SameLine();
if (ImGui::SmallButton("Scroll to bottom")) ScrollToBottom = true;
//static float t = 0.0f; if (ImGui::GetTime() - t > 0.02f) { t = ImGui::GetTime(); AddLog("Spam %f", t); }
@ -2143,7 +2143,7 @@ struct ExampleAppConsole
if (ImGui::InputText("Input", InputBuf, IM_ARRAYSIZE(InputBuf), ImGuiInputTextFlags_EnterReturnsTrue|ImGuiInputTextFlags_CallbackCompletion|ImGuiInputTextFlags_CallbackHistory, &TextEditCallbackStub, (void*)this))
{
char* input_end = InputBuf+strlen(InputBuf);
while (input_end > InputBuf && input_end[-1] == ' ') input_end--; *input_end = 0;
while (input_end > InputBuf && input_end[-1] == ' ') { input_end--; } *input_end = 0;
if (InputBuf[0])
ExecCommand(InputBuf);
strcpy(InputBuf, "");

View File

@ -1375,18 +1375,18 @@ static unsigned char *stbi__convert_format(unsigned char *data, int img_n, int r
// convert source image with img_n components to one with req_comp components;
// avoid switch per pixel, so use switch per scanline and massive macros
switch (COMBO(img_n, req_comp)) {
CASE(1,2) dest[0]=src[0], dest[1]=255; break;
CASE(1,3) dest[0]=dest[1]=dest[2]=src[0]; break;
CASE(1,4) dest[0]=dest[1]=dest[2]=src[0], dest[3]=255; break;
CASE(2,1) dest[0]=src[0]; break;
CASE(2,3) dest[0]=dest[1]=dest[2]=src[0]; break;
CASE(2,4) dest[0]=dest[1]=dest[2]=src[0], dest[3]=src[1]; break;
CASE(3,4) dest[0]=src[0],dest[1]=src[1],dest[2]=src[2],dest[3]=255; break;
CASE(3,1) dest[0]=stbi__compute_y(src[0],src[1],src[2]); break;
CASE(3,2) dest[0]=stbi__compute_y(src[0],src[1],src[2]), dest[1] = 255; break;
CASE(4,1) dest[0]=stbi__compute_y(src[0],src[1],src[2]); break;
CASE(4,2) dest[0]=stbi__compute_y(src[0],src[1],src[2]), dest[1] = src[3]; break;
CASE(4,3) dest[0]=src[0],dest[1]=src[1],dest[2]=src[2]; break;
CASE(1,2) { dest[0]=src[0]; dest[1]=255; } break;
CASE(1,3) { dest[0]=dest[1]=dest[2]=src[0]; } break;
CASE(1,4) { dest[0]=dest[1]=dest[2]=src[0]; dest[3]=255; } break;
CASE(2,1) { dest[0]=src[0]; } break;
CASE(2,3) { dest[0]=dest[1]=dest[2]=src[0]; } break;
CASE(2,4) { dest[0]=dest[1]=dest[2]=src[0]; dest[3]=src[1]; } break;
CASE(3,4) { dest[0]=src[0]; dest[1]=src[1]; dest[2]=src[2]; dest[3]=255; } break;
CASE(3,1) { dest[0]=stbi__compute_y(src[0],src[1],src[2]); } break;
CASE(3,2) { dest[0]=stbi__compute_y(src[0],src[1],src[2]); dest[1] = 255; } break;
CASE(4,1) { dest[0]=stbi__compute_y(src[0],src[1],src[2]); } break;
CASE(4,2) { dest[0]=stbi__compute_y(src[0],src[1],src[2]); dest[1] = src[3]; } break;
CASE(4,3) { dest[0]=src[0]; dest[1]=src[1]; dest[2]=src[2]; } break;
default: STBI_ASSERT(0);
}
#undef CASE
@ -4101,12 +4101,12 @@ static int stbi__create_png_image_raw(stbi__png *a, stbi_uc *raw, stbi__uint32 r
switch (filter) {
// "none" filter turns into a memcpy here; make that explicit.
case STBI__F_none: memcpy(cur, raw, nk); break;
CASE(STBI__F_sub) cur[k] = STBI__BYTECAST(raw[k] + cur[k-filter_bytes]); break;
CASE(STBI__F_up) cur[k] = STBI__BYTECAST(raw[k] + prior[k]); break;
CASE(STBI__F_avg) cur[k] = STBI__BYTECAST(raw[k] + ((prior[k] + cur[k-filter_bytes])>>1)); break;
CASE(STBI__F_paeth) cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k-filter_bytes],prior[k],prior[k-filter_bytes])); break;
CASE(STBI__F_avg_first) cur[k] = STBI__BYTECAST(raw[k] + (cur[k-filter_bytes] >> 1)); break;
CASE(STBI__F_paeth_first) cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k-filter_bytes],0,0)); break;
CASE(STBI__F_sub) { cur[k] = STBI__BYTECAST(raw[k] + cur[k-filter_bytes]); } break;
CASE(STBI__F_up) { cur[k] = STBI__BYTECAST(raw[k] + prior[k]); } break;
CASE(STBI__F_avg) { cur[k] = STBI__BYTECAST(raw[k] + ((prior[k] + cur[k-filter_bytes])>>1)); } break;
CASE(STBI__F_paeth) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k-filter_bytes],prior[k],prior[k-filter_bytes])); } break;
CASE(STBI__F_avg_first) { cur[k] = STBI__BYTECAST(raw[k] + (cur[k-filter_bytes] >> 1)); } break;
CASE(STBI__F_paeth_first) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k-filter_bytes],0,0)); } break;
}
#undef CASE
raw += nk;
@ -4117,13 +4117,13 @@ static int stbi__create_png_image_raw(stbi__png *a, stbi_uc *raw, stbi__uint32 r
for (i=x-1; i >= 1; --i, cur[filter_bytes]=255,raw+=filter_bytes,cur+=output_bytes,prior+=output_bytes) \
for (k=0; k < filter_bytes; ++k)
switch (filter) {
CASE(STBI__F_none) cur[k] = raw[k]; break;
CASE(STBI__F_sub) cur[k] = STBI__BYTECAST(raw[k] + cur[k- output_bytes]); break;
CASE(STBI__F_up) cur[k] = STBI__BYTECAST(raw[k] + prior[k]); break;
CASE(STBI__F_avg) cur[k] = STBI__BYTECAST(raw[k] + ((prior[k] + cur[k- output_bytes])>>1)); break;
CASE(STBI__F_paeth) cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k- output_bytes],prior[k],prior[k- output_bytes])); break;
CASE(STBI__F_avg_first) cur[k] = STBI__BYTECAST(raw[k] + (cur[k- output_bytes] >> 1)); break;
CASE(STBI__F_paeth_first) cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k- output_bytes],0,0)); break;
CASE(STBI__F_none) { cur[k] = raw[k]; } break;
CASE(STBI__F_sub) { cur[k] = STBI__BYTECAST(raw[k] + cur[k- output_bytes]); } break;
CASE(STBI__F_up) { cur[k] = STBI__BYTECAST(raw[k] + prior[k]); } break;
CASE(STBI__F_avg) { cur[k] = STBI__BYTECAST(raw[k] + ((prior[k] + cur[k- output_bytes])>>1)); } break;
CASE(STBI__F_paeth) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k- output_bytes],prior[k],prior[k- output_bytes])); } break;
CASE(STBI__F_avg_first) { cur[k] = STBI__BYTECAST(raw[k] + (cur[k- output_bytes] >> 1)); } break;
CASE(STBI__F_paeth_first) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k- output_bytes],0,0)); } break;
}
#undef CASE

View File

@ -90,7 +90,8 @@ CPU_DISASSEMBLE( asap )
else if (rsrc2_iszero)
sprintf(buffer, "mov%s %s,%s", setcond[cond], reg[rsrc1], reg[rdst]);
else
sprintf(buffer, "add%s %s,%s,%s", setcond[cond], reg[rsrc1], src2(op,0), reg[rdst]); break;
sprintf(buffer, "add%s %s,%s,%s", setcond[cond], reg[rsrc1], src2(op,0), reg[rdst]);
break;
case 0x09: sprintf(buffer, "sub%s %s,%s,%s", setcond[cond], reg[rsrc1], src2(op,0), reg[rdst]); break;
case 0x0a: sprintf(buffer, "addc%s %s,%s,%s", setcond[cond], reg[rsrc1], src2(op,0), reg[rdst]); break;
case 0x0b: sprintf(buffer, "subc%s %s,%s,%s", setcond[cond], reg[rsrc1], src2(op,0), reg[rdst]); break;
@ -103,7 +104,8 @@ CPU_DISASSEMBLE( asap )
else if (rsrc2_iszero)
sprintf(buffer, "mov%s %s,%s", setcond[cond], reg[rsrc1], reg[rdst]);
else
sprintf(buffer, "or%s %s,%s,%s", setcond[cond], reg[rsrc1], src2(op,0), reg[rdst]); break;
sprintf(buffer, "or%s %s,%s,%s", setcond[cond], reg[rsrc1], src2(op,0), reg[rdst]);
break;
case 0x0f: sprintf(buffer, "orn%s %s,%s,%s", setcond[cond], reg[rsrc1], src2(op,0), reg[rdst]); break;
case 0x10: sprintf(buffer, "ld%s %s[%s],%s", setcond[cond], reg[rsrc1], src2(op,2), reg[rdst]); break;
case 0x11: sprintf(buffer, "ldh%s %s[%s],%s", setcond[cond], reg[rsrc1], src2(op,1), reg[rdst]); break;
@ -137,7 +139,7 @@ CPU_DISASSEMBLE( asap )
}
else
sprintf(buffer, "jmp%s %s[%s]", setcond[cond], reg[rsrc1], src2(op,2));
break;
break;
case 0x1f: sprintf(buffer, "trap $1f"); flags = DASMFLAG_STEP_OVER; break;
}
return 4 | flags | DASMFLAG_SUPPORTED;

View File

@ -57,7 +57,7 @@ def save_full_one(f, t, name, source):
print(line, file=f)
substate += 1
elif has_eat(line):
print("\tif(icount) icount = bcount; inst_substate = %d; return;" % substate, file=f)
print("\tif(icount) { icount = bcount; } inst_substate = %d; return;" % substate, file=f)
substate += 1
else:
print(line, file=f)
@ -77,7 +77,7 @@ def save_partial_one(f, t, name, source):
print(line, file=f)
substate += 1
elif has_eat(line):
print("\tif(icount) icount = bcount; inst_substate = %d; return;" % substate, file=f)
print("\tif(icount) { icount = bcount; } inst_substate = %d; return;" % substate, file=f)
print("case %d:;" % substate, file=f)
substate += 1
else:

View File

@ -24,7 +24,8 @@ static UINT32 common_dasm(device_t *device, char *buffer, offs_t pc, const UINT8
case 0x02: if (!upi41)
sprintf(buffer, "out bus,a");
else
sprintf(buffer, "out dbb,a"); break;
sprintf(buffer, "out dbb,a");
break;
case 0x03: sprintf(buffer, "add a,#$%02X", *opram++); break;
case 0x04: sprintf(buffer, "jmp $0%02X", *opram++); break;
case 0x05: sprintf(buffer, "en i"); break;
@ -32,7 +33,8 @@ static UINT32 common_dasm(device_t *device, char *buffer, offs_t pc, const UINT8
case 0x08: if (!upi41)
sprintf(buffer, "in a,bus");
else
sprintf(buffer, "illegal"); break;
sprintf(buffer, "illegal");
break;
case 0x09: sprintf(buffer, "in a,p1"); break;
case 0x0a: sprintf(buffer, "in a,p2"); break;
case 0x0c: sprintf(buffer, "movd a,p4"); break;
@ -60,7 +62,8 @@ static UINT32 common_dasm(device_t *device, char *buffer, offs_t pc, const UINT8
case 0x22: if (!upi41)
sprintf(buffer, "illegal");
else
sprintf(buffer, "in a,dbb"); break;
sprintf(buffer, "in a,dbb");
break;
case 0x23: sprintf(buffer, "mov a,#$%02X", *opram++); break;
case 0x24: sprintf(buffer, "jmp $1%02X", *opram++); break;
case 0x25: sprintf(buffer, "en tcnti"); break;
@ -140,7 +143,8 @@ static UINT32 common_dasm(device_t *device, char *buffer, offs_t pc, const UINT8
case 0x75: if (!upi41)
sprintf(buffer, "ent0 clk");
else
sprintf(buffer, "illegal"); break;
sprintf(buffer, "illegal");
break;
case 0x76: sprintf(buffer, "jf1 $%03X", (pc & 0xf00) | *opram++); break;
case 0x77: sprintf(buffer, "rr a"); break;
case 0x78: sprintf(buffer, "addc a,r0"); break;
@ -154,22 +158,26 @@ static UINT32 common_dasm(device_t *device, char *buffer, offs_t pc, const UINT8
case 0x80: if (!upi41)
sprintf(buffer, "movx a,@r0");
else
sprintf(buffer, "illegal"); break;
sprintf(buffer, "illegal");
break;
case 0x81: if (!upi41)
sprintf(buffer, "movx a,@r1");
else
sprintf(buffer, "illegal"); break;
sprintf(buffer, "illegal");
break;
case 0x83: sprintf(buffer, "ret"); flags = DASMFLAG_STEP_OUT; break;
case 0x84: sprintf(buffer, "jmp $4%02X", *opram++); break;
case 0x85: sprintf(buffer, "clr f0"); break;
case 0x86: if (!upi41)
sprintf(buffer, "jni $%03X", (pc & 0xf00) | *opram++);
else
sprintf(buffer, "jobf $%03X", (pc & 0xf00) | *opram++); break;
sprintf(buffer, "jobf $%03X", (pc & 0xf00) | *opram++);
break;
case 0x88: if (!upi41)
sprintf(buffer, "orl bus,#$%02X", *opram++);
else
sprintf(buffer, "illegal"); break;
sprintf(buffer, "illegal");
break;
case 0x89: sprintf(buffer, "orl p1,#$%02X", *opram++); break;
case 0x8a: sprintf(buffer, "orl p2,#$%02X", *opram++); break;
case 0x8c: sprintf(buffer, "orld p4,a"); break;
@ -179,11 +187,13 @@ static UINT32 common_dasm(device_t *device, char *buffer, offs_t pc, const UINT8
case 0x90: if (!upi41)
sprintf(buffer, "movx @r0,a");
else
sprintf(buffer, "mov sts,a"); break;
sprintf(buffer, "mov sts,a");
break;
case 0x91: if (!upi41)
sprintf(buffer, "movx @r1,a");
else
sprintf(buffer, "illegal"); break;
sprintf(buffer, "illegal");
break;
case 0x92: sprintf(buffer, "jb4 $%03X", (pc & 0xf00) | *opram++); break;
case 0x93: sprintf(buffer, "retr"); flags = DASMFLAG_STEP_OUT; break;
case 0x94: sprintf(buffer, "call $4%02X", *opram++); flags = DASMFLAG_STEP_OVER; break;
@ -193,7 +203,8 @@ static UINT32 common_dasm(device_t *device, char *buffer, offs_t pc, const UINT8
case 0x98: if (!upi41)
sprintf(buffer, "anl bus,#$%02X", *opram++);
else
sprintf(buffer, "illegal"); break;
sprintf(buffer, "illegal");
break;
case 0x99: sprintf(buffer, "anl p1,#$%02X", *opram++); break;
case 0x9a: sprintf(buffer, "anl p2,#$%02X", *opram++); break;
case 0x9c: sprintf(buffer, "anld p4,a"); break;
@ -250,7 +261,8 @@ static UINT32 common_dasm(device_t *device, char *buffer, offs_t pc, const UINT8
case 0xd6: if (!upi41)
sprintf(buffer, "illegal");
else
sprintf(buffer, "jnibf $%03X", (pc & 0xf00) | *opram++); break;
sprintf(buffer, "jnibf $%03X", (pc & 0xf00) | *opram++);
break;
case 0xd7: sprintf(buffer, "mov psw,a"); break;
case 0xd8: sprintf(buffer, "xrl a,r0"); break;
case 0xd9: sprintf(buffer, "xrl a,r1"); break;
@ -265,7 +277,8 @@ static UINT32 common_dasm(device_t *device, char *buffer, offs_t pc, const UINT8
case 0xe5: if (!upi41)
sprintf(buffer, "sel mb0");
else
sprintf(buffer, "en dma"); break;
sprintf(buffer, "en dma");
break;
case 0xe6: sprintf(buffer, "jnc $%03X", (pc & 0xf00) | *opram++); break;
case 0xe7: sprintf(buffer, "rl a"); break;
case 0xe8: sprintf(buffer, "djnz r0,$%03X", (pc & 0xf00) | *opram++); flags = DASMFLAG_STEP_OVER; break;
@ -283,7 +296,8 @@ static UINT32 common_dasm(device_t *device, char *buffer, offs_t pc, const UINT8
case 0xf5: if (!upi41)
sprintf(buffer, "sel mb1");
else
sprintf(buffer, "en flags"); break;
sprintf(buffer, "en flags");
break;
case 0xf6: sprintf(buffer, "jc $%03X", (pc & 0xf00) | *opram++); break;
case 0xf7: sprintf(buffer, "rlc a"); break;
case 0xf8: sprintf(buffer, "mov a,r0"); break;

View File

@ -373,7 +373,8 @@ unsigned dasmmips3(char *buffer, unsigned pc, UINT32 op)
case 0x00: if (op == 0)
sprintf(buffer, "nop");
else
sprintf(buffer, "sll %s,%s,%d", reg[rd], reg[rt], shift); break;
sprintf(buffer, "sll %s,%s,%d", reg[rd], reg[rt], shift);
break;
case 0x01: sprintf(buffer, "mov%c %s,%s,%d", ((op >> 16) & 1) ? 't' : 'f', reg[rd], reg[rs], (op >> 18) & 7); break;
case 0x02: sprintf(buffer, "srl %s,%s,%d", reg[rd], reg[rt], shift); break;
case 0x03: sprintf(buffer, "sra %s,%s,%d", reg[rd], reg[rt], shift); break;
@ -384,7 +385,9 @@ unsigned dasmmips3(char *buffer, unsigned pc, UINT32 op)
case 0x09: if (rd == 31)
sprintf(buffer, "jalr %s", reg[rs]);
else
sprintf(buffer, "jalr %s,%s", reg[rs], reg[rd]); flags = DASMFLAG_STEP_OVER | DASMFLAG_STEP_OVER_EXTRA(1); break;
sprintf(buffer, "jalr %s,%s", reg[rs], reg[rd]);
flags = DASMFLAG_STEP_OVER | DASMFLAG_STEP_OVER_EXTRA(1);
break;
case 0x0a: sprintf(buffer, "movz %s,%s,%s", reg[rd], reg[rs], reg[rt]); break;
case 0x0b: sprintf(buffer, "movn %s,%s,%s", reg[rd], reg[rs], reg[rt]); break;
case 0x0c: sprintf(buffer, "syscall"); flags = DASMFLAG_STEP_OVER; break;
@ -461,7 +464,8 @@ unsigned dasmmips3(char *buffer, unsigned pc, UINT32 op)
case 0x04: if (rs == 0 && rt == 0)
sprintf(buffer, "b $%08x", pc + 4 + ((INT16)op << 2));
else
sprintf(buffer, "beq %s,%s,$%08x", reg[rs], reg[rt], pc + 4 + ((INT16)op << 2));break;
sprintf(buffer, "beq %s,%s,$%08x", reg[rs], reg[rt], pc + 4 + ((INT16)op << 2));
break;
case 0x05: sprintf(buffer, "bne %s,%s,$%08x", reg[rs], reg[rt], pc + 4 + ((INT16)op << 2));break;
case 0x06: sprintf(buffer, "blez %s,$%08x", reg[rs], pc + 4 + ((INT16)op << 2)); break;
case 0x07: sprintf(buffer, "bgtz %s,$%08x", reg[rs], pc + 4 + ((INT16)op << 2)); break;

View File

@ -144,7 +144,8 @@ static UINT32 dasm_cop(UINT32 pc, int cop, UINT32 op, char *buffer)
}
}
else
sprintf(buffer, "cop%d $%07x", cop, op & 0x01ffffff); break;
sprintf(buffer, "cop%d $%07x", cop, op & 0x01ffffff);
break;
default: sprintf(buffer, "dc.l $%08x [invalid]", op); break;
}
@ -250,7 +251,8 @@ static unsigned dasmr3k(char *buffer, unsigned pc, UINT32 op)
case 0x00: if (op == 0)
sprintf(buffer, "nop");
else
sprintf(buffer, "sll %s,%s,%d", reg[rd], reg[rt], shift); break;
sprintf(buffer, "sll %s,%s,%d", reg[rd], reg[rt], shift);
break;
case 0x02: sprintf(buffer, "srl %s,%s,%d", reg[rd], reg[rt], shift); break;
case 0x03: sprintf(buffer, "sra %s,%s,%d", reg[rd], reg[rt], shift); break;
case 0x04: sprintf(buffer, "sllv %s,%s,%s", reg[rd], reg[rt], reg[rs]); break;
@ -260,7 +262,9 @@ static unsigned dasmr3k(char *buffer, unsigned pc, UINT32 op)
case 0x09: if (rd == 31)
sprintf(buffer, "jalr %s", reg[rs]);
else
sprintf(buffer, "jalr %s,%s", reg[rs], reg[rd]); flags = DASMFLAG_STEP_OVER | DASMFLAG_STEP_OVER_EXTRA(1); break;
sprintf(buffer, "jalr %s,%s", reg[rs], reg[rd]);
flags = DASMFLAG_STEP_OVER | DASMFLAG_STEP_OVER_EXTRA(1);
break;
case 0x0c: sprintf(buffer, "syscall"); flags = DASMFLAG_STEP_OVER; break;
case 0x0d: sprintf(buffer, "break"); flags = DASMFLAG_STEP_OVER; break;
case 0x0f: sprintf(buffer, "sync [invalid]"); break;
@ -318,7 +322,8 @@ static unsigned dasmr3k(char *buffer, unsigned pc, UINT32 op)
case 0x04: if (rs == 0 && rt == 0)
sprintf(buffer, "b $%08x", pc + 4 + ((INT16)op << 2));
else
sprintf(buffer, "beq %s,%s,$%08x", reg[rs], reg[rt], pc + 4 + ((INT16)op << 2));break;
sprintf(buffer, "beq %s,%s,$%08x", reg[rs], reg[rt], pc + 4 + ((INT16)op << 2));
break;
case 0x05: sprintf(buffer, "bne %s,%s,$%08x", reg[rs], reg[rt], pc + 4 + ((INT16)op << 2));break;
case 0x06: sprintf(buffer, "blez %s,$%08x", reg[rs], pc + 4 + ((INT16)op << 2)); break;
case 0x07: sprintf(buffer, "bgtz %s,$%08x", reg[rs], pc + 4 + ((INT16)op << 2)); break;

View File

@ -444,7 +444,7 @@ unsigned Dasm9900 (char *buffer, unsigned pc, int model_id, const UINT8 *oprom,
case 1:
/* opcode is dcs */
opc = _dcs;
break;
break;
case 2:
case 3: /* should be 2, but instruction decoding is incomplete */
@ -458,11 +458,11 @@ unsigned Dasm9900 (char *buffer, unsigned pc, int model_id, const UINT8 *oprom,
instead of the immediate. Since I do not know, I handle this
as an illegal instruction. */
opc = _ill;
break;
break;
default:
/* this is still a software xop */
break;
break;
}
}

View File

@ -438,10 +438,10 @@ bool floppy_image_device::call_load()
if (!cur_load_cb.isnull())
return cur_load_cb(this);
if (motor_always_on) {
// When disk is inserted, start motor
mon_w(0);
} else if(!mon)
if (motor_always_on) {
// When disk is inserted, start motor
mon_w(0);
} else if(!mon)
ready_counter = 2;
return IMAGE_INIT_PASS;
@ -469,10 +469,10 @@ void floppy_image_device::call_unload()
if (!cur_unload_cb.isnull())
cur_unload_cb(this);
if (motor_always_on) {
// When disk is removed, stop motor
mon_w(1);
} else if(!ready) {
if (motor_always_on) {
// When disk is removed, stop motor
mon_w(1);
} else if(!ready) {
ready = true;
if(!cur_ready_cb.isnull())
cur_ready_cb(this, ready);

View File

@ -205,21 +205,20 @@ void i8251_device::transmit_clock()
else
return;
if (is_transmit_register_empty()) {
if ((m_status & I8251_STATUS_TX_READY) == 0 && (is_tx_enabled() || (m_flags & I8251_DELAYED_TX_EN) != 0)) {
start_tx();
} else {
m_status |= I8251_STATUS_TX_EMPTY;
}
update_tx_ready();
update_tx_empty();
if (is_transmit_register_empty()) {
if ((m_status & I8251_STATUS_TX_READY) == 0 && (is_tx_enabled() || (m_flags & I8251_DELAYED_TX_EN) != 0)) {
start_tx();
} else {
m_status |= I8251_STATUS_TX_EMPTY;
}
/* if diserial has bits to send, make them so */
if (!is_transmit_register_empty())
{
UINT8 data = transmit_register_get_data_bit();
m_txd_handler(data);
}
update_tx_ready();
update_tx_empty();
}
/* if diserial has bits to send, make them so */
if (!is_transmit_register_empty()) {
UINT8 data = transmit_register_get_data_bit();
m_txd_handler(data);
}
#if 0
/* hunt mode? */

View File

@ -411,37 +411,53 @@ WRITE8_MEMBER ( tms9901_device::write )
switch (offset)
{
case 0x10:
if (!m_write_p0.isnull()) m_write_p0(data); break;
if (!m_write_p0.isnull()) m_write_p0(data);
break;
case 0x11:
if (!m_write_p1.isnull()) m_write_p1(data); break;
if (!m_write_p1.isnull()) m_write_p1(data);
break;
case 0x12:
if (!m_write_p2.isnull()) m_write_p2(data); break;
if (!m_write_p2.isnull()) m_write_p2(data);
break;
case 0x13:
if (!m_write_p3.isnull()) m_write_p3(data); break;
if (!m_write_p3.isnull()) m_write_p3(data);
break;
case 0x14:
if (!m_write_p4.isnull()) m_write_p4(data); break;
if (!m_write_p4.isnull()) m_write_p4(data);
break;
case 0x15:
if (!m_write_p5.isnull()) m_write_p5(data); break;
if (!m_write_p5.isnull()) m_write_p5(data);
break;
case 0x16:
if (!m_write_p6.isnull()) m_write_p6(data); break;
if (!m_write_p6.isnull()) m_write_p6(data);
break;
case 0x17:
if (!m_write_p7.isnull()) m_write_p7(data); break;
if (!m_write_p7.isnull()) m_write_p7(data);
break;
case 0x18:
if (!m_write_p8.isnull()) m_write_p8(data); break;
if (!m_write_p8.isnull()) m_write_p8(data);
break;
case 0x19:
if (!m_write_p9.isnull()) m_write_p9(data); break;
if (!m_write_p9.isnull()) m_write_p9(data);
break;
case 0x1A:
if (!m_write_p10.isnull()) m_write_p10(data); break;
if (!m_write_p10.isnull()) m_write_p10(data);
break;
case 0x1B:
if (!m_write_p11.isnull()) m_write_p11(data); break;
if (!m_write_p11.isnull()) m_write_p11(data);
break;
case 0x1C:
if (!m_write_p12.isnull()) m_write_p12(data); break;
if (!m_write_p12.isnull()) m_write_p12(data);
break;
case 0x1D:
if (!m_write_p13.isnull()) m_write_p13(data); break;
if (!m_write_p13.isnull()) m_write_p13(data);
break;
case 0x1E:
if (!m_write_p14.isnull()) m_write_p14(data); break;
if (!m_write_p14.isnull()) m_write_p14(data);
break;
case 0x1F:
if (!m_write_p15.isnull()) m_write_p15(data); break;
if (!m_write_p15.isnull()) m_write_p15(data);
break;
}
return;

View File

@ -1390,13 +1390,10 @@ int IRQCB(void *param)
void scsp_device::set_ram_base(void *base)
{
if (this)
{
m_SCSPRAM = (unsigned char *)base;
m_DSP.SCSPRAM = (UINT16 *)base;
m_SCSPRAM_LENGTH = 0x80000;
m_DSP.SCSPRAM_LENGTH = 0x80000/2;
}
m_SCSPRAM = (unsigned char *)base;
m_DSP.SCSPRAM = (UINT16 *)base;
m_SCSPRAM_LENGTH = 0x80000;
m_DSP.SCSPRAM_LENGTH = 0x80000/2;
}

View File

@ -716,7 +716,7 @@ void upd7759_device::device_timer(emu_timer &timer, device_timer_id id, int para
/* set a timer to go off when that is done */
if (m_state != STATE_IDLE)
m_timer->adjust(m_clock_period * m_clocks_left);
break;
break;
default:
assert_always(FALSE, "Unknown id in upd7759_device::device_timer");

View File

@ -428,7 +428,7 @@ void ef9345_device::bichrome40(UINT8 type, UINT16 address, UINT8 dial, UINT16 ib
case 0x70: //11 = flash underlined
if (m_blink)
underline = 1;
break;
break;
}
}

View File

@ -74,7 +74,7 @@ public:
device_delegate(const thistype &src, device_t &search_root) : basetype(src), device_delegate_helper(src.m_device_name) { bind_relative_to(search_root); }
// perform the binding
void bind_relative_to(device_t &search_root) { assert(&search_root != nullptr); if (!basetype::isnull()) basetype::late_bind(bound_object(search_root)); }
void bind_relative_to(device_t &search_root) { if (!basetype::isnull()) basetype::late_bind(bound_object(search_root)); }
// getter (for validation purposes)
const char *device_name() const { return m_device_name; }

View File

@ -894,7 +894,11 @@ menu_plugins_configure::~menu_plugins_configure()
{
emu_file file_plugin(OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS);
if (file_plugin.open("plugin.ini") != osd_file::error::NONE)
throw emu_fatalerror("Unable to create file plugin.ini\n");
// Can't throw in a destructor, so let's ignore silently for
// now. We shouldn't write files in a destructor in any case.
//
// throw emu_fatalerror("Unable to create file plugin.ini\n");
return;
// generate the updated INI
file_plugin.puts(mame_machine_manager::instance()->plugins().output_ini().c_str());
}
@ -977,4 +981,4 @@ void menu_plugins_configure::custom_render(void *selectedref, float top, float b
DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
}
} // namespace ui
} // namespace ui

View File

@ -1245,12 +1245,12 @@ void menu_select_software::build_list(std::vector<ui_software_info *> &s_drivers
case UI_SW_AVAILABLE:
if (s_driver->available)
m_displaylist.push_back(s_driver);
break;
break;
case UI_SW_UNAVAILABLE:
if (!s_driver->available)
m_displaylist.push_back(s_driver);
break;
break;
case UI_SW_SUPPORTED:
if (s_driver->supported == SOFTWARE_SUPPORTED_YES)

View File

@ -93,9 +93,9 @@ static floperr_t get_offset(floppy_image_legacy *floppy, int head, int track, in
|| (sector < 0) || (sector >= 16))
return FLOPPY_ERROR_SEEKERROR;
offs = tag->sector_pos[track][sector];
if (offs <= 0 )
return FLOPPY_ERROR_SEEKERROR;
offs = tag->sector_pos[track][sector];
if (offs <= 0 )
return FLOPPY_ERROR_SEEKERROR;
if (offset)
*offset = offs;

View File

@ -372,8 +372,10 @@ void vboysnd_device::sound_stream_update(sound_stream &stream, stream_sample_t *
// scale to 16 bits
note_left = (note_left << 5) | ((note_left >> 6) & 0x1f);
note_right = (note_right << 5) | ((note_right >> 6) & 0x1f);
if (note_left < -32767) note_left = -32767; if (note_left > 32767) note_left = 32767;
if (note_right < -32767) note_right = -32767; if (note_right > 32767) note_right = 32767;
if (note_left < -32767) note_left = -32767;
if (note_left > 32767) note_left = 32767;
if (note_right < -32767) note_right = -32767;
if (note_right > 32767) note_right = 32767;
*(outL++) = ((INT16)note_left);
*(outR++) = ((INT16)note_right);

View File

@ -578,7 +578,9 @@ bool cobra_jvs::coin_counters(UINT8 *&buf, UINT8 count)
*buf++ = m_coin_counter[0] >> 8; *buf++ = m_coin_counter[0];
if(count > 1)
{
*buf++ = m_coin_counter[1] >> 8; *buf++ = m_coin_counter[1];
}
return true;
}

View File

@ -212,55 +212,61 @@ WRITE8_MEMBER(cosmic_state::cosmica_sound_output_w)
if (m_samples->playing(2))
{
m_samples->stop(2);
m_samples->start(2, 3); break;
m_samples->start(2, 3);
}
else
m_samples->start(2, 3); break;
m_samples->start(2, 3);
break;
case 3:
if (m_samples->playing(3))
{
m_samples->stop(3);
m_samples->start(3, 4); break;
m_samples->start(3, 4);
}
else
m_samples->start(3, 4); break;
m_samples->start(3, 4);
break;
case 4:
if (m_samples->playing(4))
{
m_samples->stop(4);
m_samples->start(4, 5); break;
m_samples->start(4, 5);
}
else
m_samples->start(4, 5); break;
m_samples->start(4, 5);
break;
case 5:
if (m_samples->playing(5))
{
m_samples->stop(5);
m_samples->start(5, 6); break;
m_samples->start(5, 6);
}
else
m_samples->start(5, 6); break;
m_samples->start(5, 6);
break;
case 6:
if (m_samples->playing(6))
{
m_samples->stop(6);
m_samples->start(6, 7); break;
m_samples->start(6, 7);
}
else
m_samples->start(6, 7); break;
m_samples->start(6, 7);
break;
case 7:
if (m_samples->playing(7))
{
m_samples->stop(7);
m_samples->start(7, 8); break;
m_samples->start(7, 8);
}
else
m_samples->start(7, 8); break;
m_samples->start(7, 8);
break;
}
}

View File

@ -335,7 +335,7 @@ void cyclemb_state::skydest_draw_sprites(screen_device &screen, bitmap_ind16 &bi
if(m_obj3_ram[i+1] & 1)
x |= 0x100;
x = 0x138 - x;
x = 0x138 - x;
spr_offs = (m_obj1_ram[i+0]);
spr_offs += ((m_obj3_ram[i+0] & 3) << 8);

View File

@ -486,7 +486,7 @@ WRITE16_MEMBER(gaelco3d_state::tms_reset_w)
/* it does not ever appear to be touched after that */
if (LOG)
logerror("%06X:tms_reset_w(%02X) = %08X & %08X\n", space.device().safe_pc(), offset, data, mem_mask);
m_tms->set_input_line(INPUT_LINE_RESET, (data == 0xffff) ? CLEAR_LINE : ASSERT_LINE);
m_tms->set_input_line(INPUT_LINE_RESET, (data == 0xffff) ? CLEAR_LINE : ASSERT_LINE);
}

View File

@ -937,13 +937,20 @@ COMMAND_MODE:
ax = (UINT16)src1_ptr[edx];
al = src1_ptr[edx+0x10000];
ax |= BG_RGB;
if (al & 0x01) dst_ptr[ecx] = ax; ecx++; ecx &= WARPMASK;
if (al & 0x02) dst_ptr[ecx] = ax; ecx++; ecx &= WARPMASK;
if (al & 0x04) dst_ptr[ecx] = ax; ecx++; ecx &= WARPMASK;
if (al & 0x08) dst_ptr[ecx] = ax; ecx++; ecx &= WARPMASK;
if (al & 0x10) dst_ptr[ecx] = ax; ecx++; ecx &= WARPMASK;
if (al & 0x20) dst_ptr[ecx] = ax; ecx++; ecx &= WARPMASK;
if (al & 0x40) dst_ptr[ecx] = ax; ecx++; ecx &= WARPMASK;
if (al & 0x01) dst_ptr[ecx] = ax;
ecx++; ecx &= WARPMASK;
if (al & 0x02) dst_ptr[ecx] = ax;
ecx++; ecx &= WARPMASK;
if (al & 0x04) dst_ptr[ecx] = ax;
ecx++; ecx &= WARPMASK;
if (al & 0x08) dst_ptr[ecx] = ax;
ecx++; ecx &= WARPMASK;
if (al & 0x10) dst_ptr[ecx] = ax;
ecx++; ecx &= WARPMASK;
if (al & 0x20) dst_ptr[ecx] = ax;
ecx++; ecx &= WARPMASK;
if (al & 0x40) dst_ptr[ecx] = ax;
ecx++; ecx &= WARPMASK;
if (al & 0x80) dst_ptr[ecx] = ax;
dst_ptr += SCREEN_WIDTH;
} while (++edx);
@ -1404,12 +1411,18 @@ void halleys_state::copy_fixed_xp(bitmap_ind16 &bitmap, UINT16 *source)
do {
ax = esi[ecx];
bx = esi[ecx+1];
if (ax) edi[ecx ] = ax; ax = esi[ecx+2];
if (bx) edi[ecx+1] = bx; bx = esi[ecx+3];
if (ax) edi[ecx+2] = ax; ax = esi[ecx+4];
if (bx) edi[ecx+3] = bx; bx = esi[ecx+5];
if (ax) edi[ecx+4] = ax; ax = esi[ecx+6];
if (bx) edi[ecx+5] = bx; bx = esi[ecx+7];
if (ax) edi[ecx ] = ax;
ax = esi[ecx+2];
if (bx) edi[ecx+1] = bx;
bx = esi[ecx+3];
if (ax) edi[ecx+2] = ax;
ax = esi[ecx+4];
if (bx) edi[ecx+3] = bx;
bx = esi[ecx+5];
if (ax) edi[ecx+4] = ax;
ax = esi[ecx+6];
if (bx) edi[ecx+5] = bx;
bx = esi[ecx+7];
if (ax) edi[ecx+6] = ax;
if (bx) edi[ecx+7] = bx;
}
@ -1440,24 +1453,40 @@ void halleys_state::copy_fixed_2b(bitmap_ind16 &bitmap, UINT16 *source)
ax = esi[ecx];
bx = esi[ecx+1];
if (!(ax)) goto SKIP0; if (!(ax&SP_2BACK)) goto DRAW0; if (edi[ecx ]) goto SKIP0;
if (!(ax)) goto SKIP0;
if (!(ax&SP_2BACK)) goto DRAW0;
if (edi[ecx ]) goto SKIP0;
DRAW0: edi[ecx ] = ax; SKIP0: ax = esi[ecx+2];
if (!(bx)) goto SKIP1; if (!(bx&SP_2BACK)) goto DRAW1; if (edi[ecx+1]) goto SKIP1;
if (!(bx)) goto SKIP1;
if (!(bx&SP_2BACK)) goto DRAW1;
if (edi[ecx+1]) goto SKIP1;
DRAW1: edi[ecx+1] = bx; SKIP1: bx = esi[ecx+3];
if (!(ax)) goto SKIP2; if (!(ax&SP_2BACK)) goto DRAW2; if (edi[ecx+2]) goto SKIP2;
if (!(ax)) goto SKIP2;
if (!(ax&SP_2BACK)) goto DRAW2;
if (edi[ecx+2]) goto SKIP2;
DRAW2: edi[ecx+2] = ax; SKIP2: ax = esi[ecx+4];
if (!(bx)) goto SKIP3; if (!(bx&SP_2BACK)) goto DRAW3; if (edi[ecx+3]) goto SKIP3;
if (!(bx)) goto SKIP3;
if (!(bx&SP_2BACK)) goto DRAW3;
if (edi[ecx+3]) goto SKIP3;
DRAW3: edi[ecx+3] = bx; SKIP3: bx = esi[ecx+5];
if (!(ax)) goto SKIP4; if (!(ax&SP_2BACK)) goto DRAW4; if (edi[ecx+4]) goto SKIP4;
if (!(ax)) goto SKIP4;
if (!(ax&SP_2BACK)) goto DRAW4;
if (edi[ecx+4]) goto SKIP4;
DRAW4: edi[ecx+4] = ax; SKIP4: ax = esi[ecx+6];
if (!(bx)) goto SKIP5; if (!(bx&SP_2BACK)) goto DRAW5; if (edi[ecx+5]) goto SKIP5;
if (!(bx)) goto SKIP5;
if (!(bx&SP_2BACK)) goto DRAW5;
if (edi[ecx+5]) goto SKIP5;
DRAW5: edi[ecx+5] = bx; SKIP5: bx = esi[ecx+7];
if (!(ax)) goto SKIP6; if (!(ax&SP_2BACK)) goto DRAW6; if (edi[ecx+6]) goto SKIP6;
if (!(ax)) goto SKIP6;
if (!(ax&SP_2BACK)) goto DRAW6;
if (edi[ecx+6]) goto SKIP6;
DRAW6: edi[ecx+6] = ax; SKIP6:
if (!(bx)) continue; if (!(bx&SP_2BACK)) goto DRAW7; if (edi[ecx+7]) continue;
if (!(bx)) continue;
if (!(bx&SP_2BACK)) goto DRAW7;
if (edi[ecx+7]) continue;
DRAW7: edi[ecx+7] = bx;
}
while (ecx += 8);

View File

@ -1021,7 +1021,7 @@ WRITE8_MEMBER(pc9801_state::pc9801_video_ff_w)
m_gfx_ff = 1;
if(data & 1)
logerror("Graphic f/f actually enabled!\n");
break;
break;
case 4:
if(m_gfx_ff)
{

View File

@ -771,8 +771,8 @@ READ32_MEMBER(_3do_state::_3do_clio_r)
return m_clio.uncle_rom;
default:
if (!space.debugger_access())
logerror( "%08X: unhandled CLIO read offset = %08X\n", m_maincpu->pc(), offset * 4 );
if (!space.debugger_access())
logerror( "%08X: unhandled CLIO read offset = %08X\n", m_maincpu->pc(), offset * 4 );
break;
}
return 0;

View File

@ -301,7 +301,7 @@ READ16_MEMBER(aw_rom_board::pio_r)
UINT32 roffset = epr_offset & 0x3ffffff;
if (roffset >= (mpr_offset / 2))
roffset += mpr_bank * 0x4000000;
UINT16 retval = (m_region->bytes() > (roffset * 2)) ? m_region->u16(roffset) : 0; // not endian-safe?
UINT16 retval = (m_region->bytes() > (roffset * 2)) ? m_region->u16(roffset) : 0; // not endian-safe?
return retval;
}

View File

@ -816,7 +816,7 @@ UINT16 fd1094_device::decrypt_one(offs_t address, UINT16 val, const UINT8 *main_
val = BITSWAP16(val, 15, 9,10,13, 3,12, 0,14, 6, 5, 2,11, 8, 1, 4, 7);
if (!global_xor1) if (~val & 0x0800) val ^= 0x3002; // 1,12,13
if (~val & 0x0020) val ^= 0x0044; // 2,6
if (true) if (~val & 0x0020) val ^= 0x0044; // 2,6
if (!key_1b) if (~val & 0x0400) val ^= 0x0890; // 4,7,11
if (!global_swap2) if (!key_0c) val ^= 0x0308; // 3,8,9
val ^= 0x6561;

View File

@ -123,8 +123,9 @@ bool sega_837_13551::coin_counters(UINT8 *&buf, UINT8 count)
*buf++ = coin_counter[0] >> 8; *buf++ = coin_counter[0];
if(count > 1)
if(count > 1) {
*buf++ = coin_counter[1] >> 8; *buf++ = coin_counter[1];
}
return true;
}

View File

@ -123,19 +123,19 @@ void cheekyms_state::draw_sprites( bitmap_ind16 &bitmap, const rectangle &clipre
if (!flip)
code++;
gfx->transpen(bitmap,cliprect, code, color, 0, 0, x, y, 0);
gfx->transpen(bitmap,cliprect, code, color, 0, 0, x, y, 0);
}
else
{
if (m_spriteram[offs + 0] & 0x02)
{
gfx->transpen(bitmap,cliprect, code | 0x20, color, 0, 0, x, y, 0);
gfx->transpen(bitmap,cliprect, code | 0x21, color, 0, 0, 0x10 + x, y, 0);
gfx->transpen(bitmap,cliprect, code | 0x20, color, 0, 0, x, y, 0);
gfx->transpen(bitmap,cliprect, code | 0x21, color, 0, 0, 0x10 + x, y, 0);
}
else
{
gfx->transpen(bitmap,cliprect, code | 0x20, color, 0, 0, x, y, 0);
gfx->transpen(bitmap,cliprect, code | 0x21, color, 0, 0, x, 0x10 + y, 0);
gfx->transpen(bitmap,cliprect, code | 0x20, color, 0, 0, x, y, 0);
gfx->transpen(bitmap,cliprect, code | 0x21, color, 0, 0, x, 0x10 + y, 0);
}
}
}

View File

@ -388,12 +388,12 @@ UINT32 exerion_state::screen_update_exerion(screen_device &screen, bitmap_ind16
else
code &= ~0x10, code2 |= 0x10;
gfx->transmask(bitmap,cliprect, code2, color, xflip, yflip, x, y + gfx->height(),
m_palette->transpen_mask(*gfx, color, 0x10));
gfx->transmask(bitmap,cliprect, code2, color, xflip, yflip, x, y + gfx->height(),
m_palette->transpen_mask(*gfx, color, 0x10));
}
gfx->transmask(bitmap,cliprect, code, color, xflip, yflip, x, y,
m_palette->transpen_mask(*gfx, color, 0x10));
gfx->transmask(bitmap,cliprect, code, color, xflip, yflip, x, y,
m_palette->transpen_mask(*gfx, color, 0x10));
if (doubled) i += 4;
}

View File

@ -176,18 +176,18 @@ UINT32 fcombat_state::screen_update_fcombat(screen_device &screen, bitmap_ind16
else
code &= ~0x10, code2 |= 0x10;
gfx->transpen(bitmap,cliprect, code2, color, xflip, yflip, x, y + gfx->height(), 0);
gfx->transpen(bitmap,cliprect, code2, color, xflip, yflip, x, y + gfx->height(), 0);
}
if(flags&0x10)
{
gfx->transpen(bitmap,cliprect, code2 + 16, color, xflip, yflip, x, y + gfx->height(), 0);
gfx->transpen(bitmap,cliprect, code2 + 16 * 2, color, xflip, yflip, x, y + 2 * gfx->height(), 0);
gfx->transpen(bitmap,cliprect, code2 + 16 * 3, color, xflip, yflip, x, y + 3 * gfx->height(), 0);
gfx->transpen(bitmap,cliprect, code2 + 16, color, xflip, yflip, x, y + gfx->height(), 0);
gfx->transpen(bitmap,cliprect, code2 + 16 * 2, color, xflip, yflip, x, y + 2 * gfx->height(), 0);
gfx->transpen(bitmap,cliprect, code2 + 16 * 3, color, xflip, yflip, x, y + 3 * gfx->height(), 0);
}
gfx->transpen(bitmap,cliprect, code, color, xflip, yflip, x, y, 0);
gfx->transpen(bitmap,cliprect, code, color, xflip, yflip, x, y, 0);
if (doubled) i += 4;
}

View File

@ -128,11 +128,11 @@ void gotya_state::draw_status_row( bitmap_ind16 &bitmap, const rectangle &clipre
sy = 31 - row;
m_gfxdecode->gfx(0)->opaque(bitmap,cliprect,
m_videoram2[row * 32 + col],
m_videoram2[row * 32 + col + 0x10] & 0x0f,
flip_screen_x(), flip_screen_y(),
8 * sx, 8 * sy);
m_gfxdecode->gfx(0)->opaque(bitmap,cliprect,
m_videoram2[row * 32 + col],
m_videoram2[row * 32 + col + 0x10] & 0x0f,
flip_screen_x(), flip_screen_y(),
8 * sx, 8 * sy);
}
}
@ -152,10 +152,10 @@ void gotya_state::draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect
sy = 240 - sy;
m_gfxdecode->gfx(1)->transpen(bitmap,cliprect,
code, color,
flip_screen_x(), flip_screen_y(),
sx, sy, 0);
m_gfxdecode->gfx(1)->transpen(bitmap,cliprect,
code, color,
flip_screen_x(), flip_screen_y(),
sx, sy, 0);
}
}

View File

@ -969,8 +969,10 @@ void k001005_renderer::draw_scanline(INT32 scanline, const extent_t &extent, con
int ibri = (int)(bri);
int ifog = (int)(fog);
if (ibri < 0) ibri = 0; if (ibri > 255) ibri = 255;
if (ifog < 0) ifog = 0; if (ifog > 65536) ifog = 65536;
if (ibri < 0) ibri = 0;
if (ibri > 255) ibri = 255;
if (ifog < 0) ifog = 0;
if (ifog > 65536) ifog = 65536;
if (z <= zb[x])
{
@ -984,9 +986,12 @@ void k001005_renderer::draw_scanline(INT32 scanline, const extent_t &extent, con
g = ((((g * poly_light_g * ibri) >> 16) * ifog) + (poly_fog_g * (65536 - ifog))) >> 16;
b = ((((b * poly_light_b * ibri) >> 16) * ifog) + (poly_fog_b * (65536 - ifog))) >> 16;
if (r < 0) r = 0; if (r > 255) r = 255;
if (g < 0) g = 0; if (g > 255) g = 255;
if (b < 0) b = 0; if (b > 255) b = 255;
if (r < 0) r = 0;
if (r > 255) r = 255;
if (g < 0) g = 0;
if (g > 255) g = 255;
if (b < 0) b = 0;
if (b > 255) b = 255;
fb[x] = (color & 0xff000000) | (r << 16) | (g << 8) | b;
zb[x] = z;
@ -1046,8 +1051,10 @@ void k001005_renderer::draw_scanline_tex(INT32 scanline, const extent_t &extent,
int ibri = (int)(bri);
int ifog = (int)(fog);
if (ibri < 0) ibri = 0; if (ibri > 255) ibri = 255;
if (ifog < 0) ifog = 0; if (ifog > 65536) ifog = 65536;
if (ibri < 0) ibri = 0;
if (ibri > 255) ibri = 255;
if (ifog < 0) ifog = 0;
if (ifog > 65536) ifog = 65536;
if (z <= zb[x])
{
@ -1074,9 +1081,12 @@ void k001005_renderer::draw_scanline_tex(INT32 scanline, const extent_t &extent,
g = ((((g * poly_light_g * ibri) >> 16) * ifog) + (poly_fog_g * (65536 - ifog))) >> 16;
b = ((((b * poly_light_b * ibri) >> 16) * ifog) + (poly_fog_b * (65536 - ifog))) >> 16;
if (r < 0) r = 0; if (r > 255) r = 255;
if (g < 0) g = 0; if (g > 255) g = 255;
if (b < 0) b = 0; if (b > 255) b = 255;
if (r < 0) r = 0;
if (r > 255) r = 255;
if (g < 0) g = 0;
if (g > 255) g = 255;
if (b < 0) b = 0;
if (b > 255) b = 255;
fb[x] = 0xff000000 | (r << 16) | (g << 8) | b;
zb[x] = z;
@ -1129,9 +1139,12 @@ void k001005_renderer::draw_scanline_gouraud_blend(INT32 scanline, const extent_
ib = ((ib * ia) >> 8) + ((sb * (0xff-ia)) >> 8);
}
if (ir < 0) ir = 0; if (ir > 255) ir = 255;
if (ig < 0) ig = 0; if (ig > 255) ig = 255;
if (ib < 0) ib = 0; if (ib > 255) ib = 255;
if (ir < 0) ir = 0;
if (ir > 255) ir = 255;
if (ig < 0) ig = 0;
if (ig > 255) ig = 255;
if (ib < 0) ib = 0;
if (ib > 255) ib = 255;
fb[x] = 0xff000000 | (ir << 16) | (ig << 8) | ib;
zb[x] = z;

View File

@ -337,8 +337,8 @@ READ8_MEMBER( k052109_device::read )
else
m_k052109_cb(0, bank, &code, &color, &flags, &priority);
addr = (code << 5) + (offset & 0x1f);
addr &= m_char_rom.mask();
addr = (code << 5) + (offset & 0x1f);
addr &= m_char_rom.mask();
// logerror("%04x: off = %04x sub = %02x (bnk = %x) adr = %06x\n", space.device().safe_pc(), offset, m_romsubbank, bank, addr);

View File

@ -585,10 +585,10 @@ WRITE8_MEMBER(snk_state::ikari_unknown_video_w)
Changing palette bank is necessary to fix colors in test mode. */
if (data != 0x20 && // normal
data != 0x31 && // ikari test
data != 0xaa) // victroad spurious during boot
popmessage("attrs %02x contact MAMEDEV", data);
if (data != 0x20 && // normal
data != 0x31 && // ikari test
data != 0xaa) // victroad spurious during boot
popmessage("attrs %02x contact MAMEDEV", data);
m_tx_tilemap->set_palette_offset((data & 0x01) << 4);
if (m_tx_tile_offset != ((data & 0x10) << 4))

View File

@ -107,7 +107,7 @@ void strnskil_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprec
sx = sx - 256;
m_gfxdecode->gfx(1)->transmask(bitmap,cliprect,
m_gfxdecode->gfx(1)->transmask(bitmap,cliprect,
code, color,
flipx, flipy,
px, py,

View File

@ -49,7 +49,7 @@ WRITE16_MEMBER(taotaido_state::tileregs_w)
m_video_bank_select[(offset-4)*2] = data >> 8;
if(ACCESSING_BITS_0_7)
m_video_bank_select[(offset-4)*2+1] = data &0xff;
m_bg_tilemap->mark_all_dirty();
m_bg_tilemap->mark_all_dirty();
break;
}
}

View File

@ -542,7 +542,8 @@ inline void vc4000_state::vc4000_draw_grid(UINT8 *collision)
}
switch (i&3) {
case 0:
if (k&1) w=8;break;
if (k&1) w=8;
break;
case 1:
if ((line%40)<=10) {
if (k&2) w=8;

View File

@ -196,7 +196,7 @@ void wolfpack_state::draw_pt(bitmap_ind16 &bitmap, const rectangle &cliprect)
rect.max_x = 255;
m_gfxdecode->gfx(2)->transpen(bitmap,rect,
m_gfxdecode->gfx(2)->transpen(bitmap,rect,
m_pt_pic,
0,
0, 0,
@ -204,7 +204,7 @@ void wolfpack_state::draw_pt(bitmap_ind16 &bitmap, const rectangle &cliprect)
m_pt_pos_select ? 0x70 : 0xA0, 0);
m_gfxdecode->gfx(2)->transpen(bitmap,rect,
m_gfxdecode->gfx(2)->transpen(bitmap,rect,
m_pt_pic,
0,
0, 0,