Unverified Commit c9fe65d1 authored by Libretro-Admin's avatar Libretro-Admin Committed by GitHub
Browse files

Merge pull request #73 from trioan/fixes

mikie irq + superclip fixes
parents 10f51516 552e619e
......@@ -3670,6 +3670,11 @@ inline void CMikie::Update(void)
// if(gSystemCycleCount==gNextTimerEvent) gError->Warning("CMikie::Update() - gSystemCycleCount==gNextTimerEvent, system lock likely");
// TRACE_MIKIE1("Update() - NextTimerEvent = %012d",gNextTimerEvent);
// Update system IRQ status as a result of timer activity
gSystemIRQ=(mTimerStatusFlags)?true:false;
if(gSystemIRQ && gSystemCPUSleep) { ClearCPUSleep(); /*puts("ARLARM"); */ }
//else if(gSuzieDoneTime) SetCPUSleep();
// Now all the timer updates are done we can increment the system
// counter for any work done within the Update() function, gSystemCycleCounter
// cannot be updated until this point otherwise it screws up the counters.
......
......@@ -649,8 +649,8 @@ ULONG CSusie::PaintSprites(void)
int screen_v_start=(SWORD)mVOFF.Word;
int screen_v_end=(SWORD)mVOFF.Word+SCREEN_HEIGHT;
int world_h_mid=screen_h_start+0x8000+(SCREEN_WIDTH/2);
int world_v_mid=screen_v_start+0x8000+(SCREEN_HEIGHT/2);
int world_h_mid=screen_h_start+(SCREEN_WIDTH/2);
int world_v_mid=screen_v_start+(SCREEN_HEIGHT/2);
TRACE_SUSIE2("PaintSprites() screen_h_start $%04x screen_h_end $%04x",screen_h_start,screen_h_end);
TRACE_SUSIE2("PaintSprites() screen_v_start $%04x screen_v_end $%04x",screen_v_start,screen_v_end);
......@@ -672,7 +672,7 @@ ULONG CSusie::PaintSprites(void)
// Check ref is inside screen area
if((SWORD)mHPOSSTRT.Word<screen_h_start || (SWORD)mHPOSSTRT.Word>=screen_h_end ||
(SWORD)mVPOSSTRT.Word<screen_v_start || (SWORD)mVPOSSTRT.Word>=screen_v_end) superclip=TRUE;
(SWORD)mVPOSSTRT.Word<screen_v_start || (SWORD)mVPOSSTRT.Word>=screen_v_end) superclip=TRUE;
TRACE_SUSIE1("PaintSprites() Superclip=%d",superclip);
......@@ -719,7 +719,7 @@ ULONG CSusie::PaintSprites(void)
// line, BUT on superclip we draw all the way to the end of any
// given line checking each pixel is on screen.
if(superclip & 0) {
if(superclip) {
// Check on the basis of each quad, we only render the quad
// IF the screen is in the quad, relative to the centre of
// the screen which is calculated below.
......@@ -749,16 +749,16 @@ ULONG CSusie::PaintSprites(void)
switch(modquad) {
case 3:
if((sprite_h>=screen_h_start || sprite_h<world_h_mid) && (sprite_v<screen_v_end || sprite_v>world_v_mid)) render=TRUE;
if((sprite_h>=screen_h_start || sprite_h<=world_h_mid) && (sprite_v<screen_v_end || sprite_v>=world_v_mid)) render=TRUE;
break;
case 2:
if((sprite_h>=screen_h_start || sprite_h<world_h_mid) && (sprite_v>=screen_v_start || sprite_v<world_v_mid)) render=TRUE;
if((sprite_h>=screen_h_start || sprite_h<=world_h_mid) && (sprite_v>=screen_v_start || sprite_v<=world_v_mid)) render=TRUE;
break;
case 1:
if((sprite_h<screen_h_end || sprite_h>world_h_mid) && (sprite_v>=screen_v_start || sprite_v<world_v_mid)) render=TRUE;
if((sprite_h<screen_h_end || sprite_h>=world_h_mid) && (sprite_v>=screen_v_start || sprite_v<=world_v_mid)) render=TRUE;
break;
default:
if((sprite_h<screen_h_end || sprite_h>world_h_mid) && (sprite_v<screen_v_end || sprite_v>world_v_mid)) render=TRUE;
if((sprite_h<screen_h_end || sprite_h>=world_h_mid) && (sprite_v<screen_v_end || sprite_v>=world_v_mid)) render=TRUE;
break;
}
} else {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment