mirror of
https://github.com/ekeeke/Genesis-Plus-GX.git
synced 2024-11-14 06:45:09 +01:00
[Core/Misc] code cleanup
This commit is contained in:
parent
ede474acbe
commit
406ee5e6bc
@ -353,9 +353,6 @@ void system_frame_gen(int do_skip)
|
|||||||
/* line counters */
|
/* line counters */
|
||||||
int start, end, line;
|
int start, end, line;
|
||||||
|
|
||||||
/* Z80 interrupt flag */
|
|
||||||
int zirq = 1;
|
|
||||||
|
|
||||||
/* reset frame cycle counter */
|
/* reset frame cycle counter */
|
||||||
mcycles_vdp = 0;
|
mcycles_vdp = 0;
|
||||||
|
|
||||||
@ -551,9 +548,9 @@ void system_frame_gen(int do_skip)
|
|||||||
/* update 6-Buttons & Lightguns */
|
/* update 6-Buttons & Lightguns */
|
||||||
input_refresh();
|
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);
|
m68k_run(mcycles_vdp + 788);
|
||||||
if (zstate == 1)
|
if (zstate == 1)
|
||||||
{
|
{
|
||||||
@ -566,7 +563,6 @@ void system_frame_gen(int do_skip)
|
|||||||
|
|
||||||
/* clear Z80 interrupt */
|
/* clear Z80 interrupt */
|
||||||
Z80.irq_state = CLEAR_LINE;
|
Z80.irq_state = CLEAR_LINE;
|
||||||
zirq = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* run 68k & Z80 until end of line */
|
/* run 68k & Z80 until end of line */
|
||||||
@ -724,9 +720,6 @@ void system_frame_scd(int do_skip)
|
|||||||
/* line counters */
|
/* line counters */
|
||||||
int start, end, line;
|
int start, end, line;
|
||||||
|
|
||||||
/* Z80 interrupt flag */
|
|
||||||
int zirq = 1;
|
|
||||||
|
|
||||||
/* reset frame cycle counter */
|
/* reset frame cycle counter */
|
||||||
mcycles_vdp = 0;
|
mcycles_vdp = 0;
|
||||||
scd.cycles = 0;
|
scd.cycles = 0;
|
||||||
@ -881,7 +874,7 @@ void system_frame_scd(int do_skip)
|
|||||||
/* assert Z80 interrupt */
|
/* assert Z80 interrupt */
|
||||||
Z80.irq_state = ASSERT_LINE;
|
Z80.irq_state = ASSERT_LINE;
|
||||||
|
|
||||||
/* run both 68k & CD hardware */
|
/* run both 68k & CD hardware until end of line */
|
||||||
scd_update(MCYCLES_PER_LINE);
|
scd_update(MCYCLES_PER_LINE);
|
||||||
|
|
||||||
/* run Z80 until end of line */
|
/* run Z80 until end of line */
|
||||||
@ -919,9 +912,9 @@ void system_frame_scd(int do_skip)
|
|||||||
/* update 6-Buttons & Lightguns */
|
/* update 6-Buttons & Lightguns */
|
||||||
input_refresh();
|
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);
|
m68k_run(mcycles_vdp + 788);
|
||||||
if (zstate == 1)
|
if (zstate == 1)
|
||||||
{
|
{
|
||||||
@ -934,10 +927,9 @@ void system_frame_scd(int do_skip)
|
|||||||
|
|
||||||
/* clear Z80 interrupt */
|
/* clear Z80 interrupt */
|
||||||
Z80.irq_state = CLEAR_LINE;
|
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);
|
scd_update(mcycles_vdp + MCYCLES_PER_LINE);
|
||||||
|
|
||||||
/* run Z80 until end of line */
|
/* run Z80 until end of line */
|
||||||
@ -985,7 +977,7 @@ void system_frame_scd(int do_skip)
|
|||||||
/* update 6-Buttons & Lightguns */
|
/* update 6-Buttons & Lightguns */
|
||||||
input_refresh();
|
input_refresh();
|
||||||
|
|
||||||
/* run both 68k & CD hardware */
|
/* run both 68k & CD hardware until end of line */
|
||||||
scd_update(mcycles_vdp + MCYCLES_PER_LINE);
|
scd_update(mcycles_vdp + MCYCLES_PER_LINE);
|
||||||
|
|
||||||
/* run Z80 until end of line */
|
/* run Z80 until end of line */
|
||||||
@ -1045,7 +1037,7 @@ void system_frame_scd(int do_skip)
|
|||||||
h_counter--;
|
h_counter--;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* run both 68k & CD hardware */
|
/* run both 68k & CD hardware until end of line */
|
||||||
scd_update(mcycles_vdp + MCYCLES_PER_LINE);
|
scd_update(mcycles_vdp + MCYCLES_PER_LINE);
|
||||||
|
|
||||||
/* run Z80 until end of line */
|
/* run Z80 until end of line */
|
||||||
|
@ -62,6 +62,7 @@
|
|||||||
#define GET_G(pixel) (((pixel) & 0x03e0) >> 5)
|
#define GET_G(pixel) (((pixel) & 0x03e0) >> 5)
|
||||||
#define GET_B(pixel) (((pixel) & 0x001f) >> 0)
|
#define GET_B(pixel) (((pixel) & 0x001f) >> 0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* 5:6:5 RGB */
|
/* 5:6:5 RGB */
|
||||||
#elif defined(USE_16BPP_RENDERING)
|
#elif defined(USE_16BPP_RENDERING)
|
||||||
#define PIXEL(r,g,b) (((r) << 11) | ((g) << 5) | (b))
|
#define PIXEL(r,g,b) (((r) << 11) | ((g) << 5) | (b))
|
||||||
|
Loading…
Reference in New Issue
Block a user