try to give more granular accounting of scanline and dot for debugger
This commit is contained in:
parent
8efa68b7af
commit
0708f60a7c
|
@ -26,6 +26,7 @@
|
|||
#include "../../fceu.h"
|
||||
#include "../../debug.h"
|
||||
#include "../../nsf.h"
|
||||
#include "../../ppu.h"
|
||||
#include "../../cart.h"
|
||||
#include "../../ines.h"
|
||||
#include "../../asm.h"
|
||||
|
@ -891,6 +892,13 @@ void UpdateDebugger(bool jump_to_pc)
|
|||
sprintf(str, "%d", scanline);
|
||||
sprintf(str2, "%d", ppupixel);
|
||||
}
|
||||
|
||||
if(newppu)
|
||||
{
|
||||
sprintf(str,"%d",newppu_get_scanline());
|
||||
sprintf(str2,"%d",newppu_get_dot());
|
||||
}
|
||||
|
||||
SetDlgItemText(hDebug, IDC_DEBUGGER_VAL_SLINE, str);
|
||||
SetDlgItemText(hDebug, IDC_DEBUGGER_VAL_PPUPIXEL, str2);
|
||||
|
||||
|
|
|
@ -276,6 +276,9 @@ struct PPUREGS {
|
|||
}
|
||||
} ppur;
|
||||
|
||||
int newppu_get_scanline() { return ppur.status.sl; }
|
||||
int newppu_get_dot() { return ppur.status.cycle; }
|
||||
|
||||
static void makeppulut(void) {
|
||||
int x;
|
||||
int y;
|
||||
|
@ -2024,12 +2027,20 @@ int FCEUX_PPU_Loop(int skip) {
|
|||
|
||||
ppur.status.sl = 241; //for sprite reads
|
||||
|
||||
runppu(delay); //X6502_Run(12);
|
||||
//formerly: runppu(delay);
|
||||
for(int dot=0;dot<delay;dot++)
|
||||
runppu(1);
|
||||
|
||||
if (VBlankON) TriggerNMI();
|
||||
if (PAL)
|
||||
runppu(70 * (kLineTime) - delay);
|
||||
else
|
||||
runppu(20 * (kLineTime) - delay);
|
||||
int sltodo = PAL?70:20;
|
||||
|
||||
//formerly: runppu(20 * (kLineTime) - delay);
|
||||
for(int S=0;S<sltodo;S++)
|
||||
{
|
||||
for(int dot=(S==0?delay:0);dot<kLineTime;dot++)
|
||||
runppu(1);
|
||||
ppur.status.sl++;
|
||||
}
|
||||
|
||||
//this seems to run just before the dummy scanline begins
|
||||
PPU_status = 0;
|
||||
|
|
|
@ -9,6 +9,9 @@ void FCEUPPU_SetVideoSystem(int w);
|
|||
extern void (*PPU_hook)(uint32 A);
|
||||
extern void (*GameHBIRQHook)(void), (*GameHBIRQHook2)(void);
|
||||
|
||||
int newppu_get_scanline();
|
||||
int newppu_get_dot();
|
||||
|
||||
/* For cart.c and banksw.h, mostly */
|
||||
extern uint8 NTARAM[0x800], *vnapage[4];
|
||||
extern uint8 PPUNTARAM;
|
||||
|
|
Loading…
Reference in New Issue