fixing ntview and ppuview
[[Split portion of a mixed commit.]]
This commit is contained in:
parent
013e56ced3
commit
6d115a081a
|
@ -33,6 +33,7 @@
|
||||||
#include <shlobj.h> // For directories configuration dialog.
|
#include <shlobj.h> // For directories configuration dialog.
|
||||||
#undef uint8
|
#undef uint8
|
||||||
|
|
||||||
|
#include "../../ppuview.h" //mbg merge 7/19/06 added
|
||||||
#include "../../types.h" //mbg merge 7/17/06 added
|
#include "../../types.h" //mbg merge 7/17/06 added
|
||||||
#include "../../fceu.h" //mbg merge 7/17/06 added
|
#include "../../fceu.h" //mbg merge 7/17/06 added
|
||||||
#include "../../debugger.h" //mbg merge 7/18/06 added
|
#include "../../debugger.h" //mbg merge 7/18/06 added
|
||||||
|
@ -363,6 +364,7 @@ void FCEUD_Update(uint8 *XBuf, int32 *Buffer, int Count);
|
||||||
|
|
||||||
void ApplyDefaultCommandMapping(void);
|
void ApplyDefaultCommandMapping(void);
|
||||||
|
|
||||||
|
|
||||||
//mbg merge 7/18/06 - the function that contains the code that used to just be UpdateMemWatch()
|
//mbg merge 7/18/06 - the function that contains the code that used to just be UpdateMemWatch()
|
||||||
void _updateMemWatch() {
|
void _updateMemWatch() {
|
||||||
//UpdateMemWatch()
|
//UpdateMemWatch()
|
||||||
|
@ -449,7 +451,12 @@ doloopy:
|
||||||
FCEUI_Emulate(&gfx, &sound, &ssize, 0);
|
FCEUI_Emulate(&gfx, &sound, &ssize, 0);
|
||||||
xbsave = gfx;
|
xbsave = gfx;
|
||||||
FCEUD_Update(gfx, sound, ssize);
|
FCEUD_Update(gfx, sound, ssize);
|
||||||
static int stopCount=0;
|
|
||||||
|
|
||||||
|
//mbg merge 7/19/06
|
||||||
|
//--------this code was added by tasbuild
|
||||||
|
//it catches a paused condition and
|
||||||
|
/*static int stopCount=0;
|
||||||
if(FCEUI_EmulationPaused() & 1)
|
if(FCEUI_EmulationPaused() & 1)
|
||||||
{
|
{
|
||||||
if(stopCount==0)
|
if(stopCount==0)
|
||||||
|
@ -461,7 +468,9 @@ doloopy:
|
||||||
StopSound();
|
StopSound();
|
||||||
stopCount = 0;
|
stopCount = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
//if in bot mode, don't idle. eat the CPU up :)
|
//if in bot mode, don't idle. eat the CPU up :)
|
||||||
|
//mbg - why should we do this? does bot mode set the paused flag? that doesnt seem right...
|
||||||
if(!FCEU_BotMode())
|
if(!FCEU_BotMode())
|
||||||
{
|
{
|
||||||
int notAlternateThrottle = !(soundoptions&SO_OLDUP) && soundo && ((NoWaiting&1)?(256*16):fps_scale) >= 64;
|
int notAlternateThrottle = !(soundoptions&SO_OLDUP) && soundo && ((NoWaiting&1)?(256*16):fps_scale) >= 64;
|
||||||
|
@ -479,7 +488,8 @@ doloopy:
|
||||||
{
|
{
|
||||||
//_updateMemWatch();
|
//_updateMemWatch();
|
||||||
stopCount=0;
|
stopCount=0;
|
||||||
}
|
}*/
|
||||||
|
//-----------------------------------
|
||||||
}
|
}
|
||||||
xbsave = NULL;
|
xbsave = NULL;
|
||||||
RedrawWindow(hAppWnd,0,0,RDW_ERASE|RDW_INVALIDATE);
|
RedrawWindow(hAppWnd,0,0,RDW_ERASE|RDW_INVALIDATE);
|
||||||
|
@ -496,6 +506,17 @@ doloopy:
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//mbg merge 7/19/06 - the function that contains the code that used to just be UpdateFCEUWindow() and FCEUD_UpdateInput()
|
||||||
|
void _updateWindow() {
|
||||||
|
UpdateFCEUWindow();
|
||||||
|
FCEUD_UpdateInput();
|
||||||
|
PPUViewDoBlit();
|
||||||
|
UpdateMemoryView(0);
|
||||||
|
UpdateCDLogger();
|
||||||
|
UpdateLogWindow();
|
||||||
|
NTViewDoBlit(0);
|
||||||
|
}
|
||||||
|
|
||||||
void FCEUD_Update(uint8 *XBuf, int32 *Buffer, int Count)
|
void FCEUD_Update(uint8 *XBuf, int32 *Buffer, int Count)
|
||||||
{
|
{
|
||||||
static int skipcount = 0;
|
static int skipcount = 0;
|
||||||
|
@ -547,8 +568,7 @@ void FCEUD_Update(uint8 *XBuf, int32 *Buffer, int Count)
|
||||||
else
|
else
|
||||||
skipcount++;
|
skipcount++;
|
||||||
|
|
||||||
UpdateFCEUWindow();
|
_updateWindow();
|
||||||
FCEUD_UpdateInput();
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -614,8 +634,11 @@ void FCEUD_Update(uint8 *XBuf, int32 *Buffer, int Count)
|
||||||
}
|
}
|
||||||
Count -= ocount;
|
Count -= ocount;
|
||||||
// prevent long updates from interfering with gui responsiveness:
|
// prevent long updates from interfering with gui responsiveness:
|
||||||
UpdateFCEUWindow();
|
|
||||||
FCEUD_UpdateInput();
|
//mbg merge 7/19/06
|
||||||
|
//UpdateFCEUWindow();
|
||||||
|
//FCEUD_UpdateInput();
|
||||||
|
_updateWindow();
|
||||||
}
|
}
|
||||||
silencer=0;
|
silencer=0;
|
||||||
}
|
}
|
||||||
|
@ -653,6 +676,9 @@ void FCEUD_Update(uint8 *XBuf, int32 *Buffer, int Count)
|
||||||
writing to a secondary buffer, so we won't throttle when a secondary
|
writing to a secondary buffer, so we won't throttle when a secondary
|
||||||
buffer is used.
|
buffer is used.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
//doagain: //mbg merge 6/30/06
|
||||||
|
|
||||||
int skipthis = 0;
|
int skipthis = 0;
|
||||||
|
|
||||||
if(!(eoptions&EO_NOTHROTTLE) || fps_scale != 256)
|
if(!(eoptions&EO_NOTHROTTLE) || fps_scale != 256)
|
||||||
|
@ -673,9 +699,22 @@ void FCEUD_Update(uint8 *XBuf, int32 *Buffer, int Count)
|
||||||
skipcount++;
|
skipcount++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//mbg merge 7/19/06 - since tasbuild we have code in main that attempts to do stuff like this
|
||||||
|
//mbg merge 6/30/06
|
||||||
|
//if(FCEUI_EmulationPaused())
|
||||||
|
//{
|
||||||
|
// StopSound();
|
||||||
|
// Sleep(50);
|
||||||
|
// BlockingCheck();
|
||||||
|
// goto doagain;
|
||||||
|
//}
|
||||||
}
|
}
|
||||||
UpdateFCEUWindow();
|
|
||||||
FCEUD_UpdateInput();
|
//mbg merge 7/19/06
|
||||||
|
//UpdateFCEUWindow();
|
||||||
|
//FCEUD_UpdateInput();
|
||||||
|
_updateWindow();
|
||||||
|
|
||||||
} // end of !(old sound code) block
|
} // end of !(old sound code) block
|
||||||
}
|
}
|
||||||
|
|
|
@ -514,7 +514,7 @@ LRESULT FAR PASCAL AppWndProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam)
|
||||||
case ID_DEBUG_NAMETABLEVIEWER: DoNTView(); break;
|
case ID_DEBUG_NAMETABLEVIEWER: DoNTView(); break;
|
||||||
case ID_DEBUG_HEXEDITOR: DoMemView(); break;
|
case ID_DEBUG_HEXEDITOR: DoMemView(); break;
|
||||||
case ID_DEBUG_TRACELOGGER: DoTracer(); break;
|
case ID_DEBUG_TRACELOGGER: DoTracer(); break;
|
||||||
case ID_TOOLS_GAMEGENIEDECODER: DoGGConv(); break;
|
case ID_DEBUG_GAMEGENIEDECODER: DoGGConv(); break;
|
||||||
case ID_DEBUG_CDLOGGER: DoCDLogger(); break;
|
case ID_DEBUG_CDLOGGER: DoCDLogger(); break;
|
||||||
|
|
||||||
case 40004:
|
case 40004:
|
||||||
|
@ -894,9 +894,11 @@ void UpdateFCEUWindow(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
BlockingCheck();
|
BlockingCheck();
|
||||||
#ifdef FCEUDEF_DEBUGGER
|
|
||||||
//UpdateDebugger(); //mbg merge 7/18/06 removed as part of old debugger
|
//mbg merge 7/18/06 removed as part of old debugger
|
||||||
#endif
|
//#ifdef FCEUDEF_DEBUGGER
|
||||||
|
//UpdateDebugger();
|
||||||
|
//#endif
|
||||||
|
|
||||||
if(!(eoptions&EO_BGRUN))
|
if(!(eoptions&EO_BGRUN))
|
||||||
while(nofocus)
|
while(nofocus)
|
||||||
|
@ -905,15 +907,17 @@ void UpdateFCEUWindow(void)
|
||||||
Sleep(75);
|
Sleep(75);
|
||||||
BlockingCheck();
|
BlockingCheck();
|
||||||
}
|
}
|
||||||
if(_userpause) //mbg merge 7/18/06 this changed. even though theres nothing setting this..
|
|
||||||
{
|
//mbg merge 7/19/06 removing this since I think its not used
|
||||||
StopSound();
|
//if(_userpause) //mbg merge 7/18/06 this changed. even though theres nothing setting this..
|
||||||
while(_userpause) //mbg merge 7/18/06 this changed. even though theres nothing setting this..
|
//{
|
||||||
{
|
// StopSound();
|
||||||
Sleep(50);
|
// while(_userpause) //mbg merge 7/18/06 this changed. even though theres nothing setting this..
|
||||||
BlockingCheck();
|
// {
|
||||||
}
|
// Sleep(50);
|
||||||
}
|
// BlockingCheck();
|
||||||
|
// }
|
||||||
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ByebyeWindow(void)
|
void ByebyeWindow(void)
|
||||||
|
|
8
ppu.c
8
ppu.c
|
@ -41,6 +41,8 @@
|
||||||
#include "state.h"
|
#include "state.h"
|
||||||
#include "video.h"
|
#include "video.h"
|
||||||
#include "input.h"
|
#include "input.h"
|
||||||
|
#include "ppuview.h" //bbit edited: this line added
|
||||||
|
#include "ntview.h" //bbit edited: this line added
|
||||||
|
|
||||||
#define VBlankON (PPU[0]&0x80) /* Generate VBlank NMI */
|
#define VBlankON (PPU[0]&0x80) /* Generate VBlank NMI */
|
||||||
#define Sprite16 (PPU[0]&0x20) /* Sprites 8x16/8x8 */
|
#define Sprite16 (PPU[0]&0x20) /* Sprites 8x16/8x8 */
|
||||||
|
@ -811,6 +813,8 @@ static void DoLine(void)
|
||||||
GameHBIRQHook();
|
GameHBIRQHook();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((NTViewer) && (scanline == NTViewScanline)) UpdateNTView(0); //bbit edited:this line added
|
||||||
|
|
||||||
if(SpriteON)
|
if(SpriteON)
|
||||||
RefreshSprites();
|
RefreshSprites();
|
||||||
if(GameHBIRQHook2 && (ScreenON || SpriteON))
|
if(GameHBIRQHook2 && (ScreenON || SpriteON))
|
||||||
|
@ -1360,9 +1364,9 @@ int FCEUPPU_Loop(int skip)
|
||||||
for(scanline=0;scanline<240;) //scanline is incremented in DoLine. Evil. :/
|
for(scanline=0;scanline<240;) //scanline is incremented in DoLine. Evil. :/
|
||||||
{
|
{
|
||||||
deempcnt[deemp]++;
|
deempcnt[deemp]++;
|
||||||
#ifdef WIN32
|
//#ifdef WIN32 //mbg merge 7/19/06 ideally this kind of code should work in every driver and just eval to nothing in drivers that dont support it
|
||||||
if((PPUViewer) && (scanline == PPUViewScanline)) UpdatePPUView(1);
|
if((PPUViewer) && (scanline == PPUViewScanline)) UpdatePPUView(1);
|
||||||
#endif
|
//#endif
|
||||||
DoLine();
|
DoLine();
|
||||||
}
|
}
|
||||||
if(MMC5Hack && (ScreenON || SpriteON)) MMC5_hb(scanline);
|
if(MMC5Hack && (ScreenON || SpriteON)) MMC5_hb(scanline);
|
||||||
|
|
Loading…
Reference in New Issue