[Core/Misc] code cleanup

This commit is contained in:
EkeEke 2015-10-17 19:12:32 +02:00
parent ede474acbe
commit 406ee5e6bc
3 changed files with 10 additions and 17 deletions

View File

@ -293,7 +293,7 @@ void m68k_run(unsigned int cycles)
REG_IR = m68ki_read_imm_16();
/* Execute instruction */
m68ki_instruction_jump_table[REG_IR]();
m68ki_instruction_jump_table[REG_IR]();
USE_CYCLES(CYC_INSTRUCTION[REG_IR]);
/* Trace m68k_exception, if necessary */

View File

@ -353,9 +353,6 @@ void system_frame_gen(int do_skip)
/* line counters */
int start, end, line;
/* Z80 interrupt flag */
int zirq = 1;
/* reset frame cycle counter */
mcycles_vdp = 0;
@ -551,9 +548,9 @@ void system_frame_gen(int do_skip)
/* update 6-Buttons & Lightguns */
input_refresh();
if (zirq)
if (Z80.irq_state)
{
/* Z80 interrupt is asserted exactly for one line */
/* Z80 interrupt is asserted for exactly one line */
m68k_run(mcycles_vdp + 788);
if (zstate == 1)
{
@ -566,7 +563,6 @@ void system_frame_gen(int do_skip)
/* clear Z80 interrupt */
Z80.irq_state = CLEAR_LINE;
zirq = 0;
}
/* run 68k & Z80 until end of line */
@ -724,9 +720,6 @@ void system_frame_scd(int do_skip)
/* line counters */
int start, end, line;
/* Z80 interrupt flag */
int zirq = 1;
/* reset frame cycle counter */
mcycles_vdp = 0;
scd.cycles = 0;
@ -881,7 +874,7 @@ void system_frame_scd(int do_skip)
/* assert Z80 interrupt */
Z80.irq_state = ASSERT_LINE;
/* run both 68k & CD hardware */
/* run both 68k & CD hardware until end of line */
scd_update(MCYCLES_PER_LINE);
/* run Z80 until end of line */
@ -919,9 +912,9 @@ void system_frame_scd(int do_skip)
/* update 6-Buttons & Lightguns */
input_refresh();
if (zirq)
if (Z80.irq_state)
{
/* Z80 interrupt is asserted exactly for one line */
/* Z80 interrupt is asserted for exactly one line */
m68k_run(mcycles_vdp + 788);
if (zstate == 1)
{
@ -934,10 +927,9 @@ void system_frame_scd(int do_skip)
/* clear Z80 interrupt */
Z80.irq_state = CLEAR_LINE;
zirq = 0;
}
/* run both 68k & CD hardware */
/* run both 68k & CD hardware until end of line */
scd_update(mcycles_vdp + MCYCLES_PER_LINE);
/* run Z80 until end of line */
@ -985,7 +977,7 @@ void system_frame_scd(int do_skip)
/* update 6-Buttons & Lightguns */
input_refresh();
/* run both 68k & CD hardware */
/* run both 68k & CD hardware until end of line */
scd_update(mcycles_vdp + MCYCLES_PER_LINE);
/* run Z80 until end of line */
@ -1045,7 +1037,7 @@ void system_frame_scd(int do_skip)
h_counter--;
}
/* run both 68k & CD hardware */
/* run both 68k & CD hardware until end of line */
scd_update(mcycles_vdp + MCYCLES_PER_LINE);
/* run Z80 until end of line */

View File

@ -62,6 +62,7 @@
#define GET_G(pixel) (((pixel) & 0x03e0) >> 5)
#define GET_B(pixel) (((pixel) & 0x001f) >> 0)
#endif
/* 5:6:5 RGB */
#elif defined(USE_16BPP_RENDERING)
#define PIXEL(r,g,b) (((r) << 11) | ((g) << 5) | (b))