mirror of
https://github.com/ekeeke/Genesis-Plus-GX.git
synced 2024-12-27 03:31:49 +01:00
[Core/Misc] code cleanup
This commit is contained in:
parent
ede474acbe
commit
406ee5e6bc
@ -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 */
|
||||
|
@ -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 */
|
||||
|
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user