last checkin zlib stuff was wrong--fixed. removed some more windows stuff from the core code.

[[Split portion of a mixed commit.]]
This commit is contained in:
zeromus 2006-07-24 05:34:50 +00:00
parent 634c4a5e23
commit d5d8c48b2a
15 changed files with 42 additions and 45 deletions

View File

@ -325,5 +325,10 @@ void FCEUD_DebugBreakpoint();
//(we should move the code in the win driver that does this to the shared area)
void FCEUD_TraceInstruction();
//the driver might should update its NTView
void FCEUD_UpdateNTView(int scanline, int drawall);
//the driver might should update its PPUView
void FCEUD_UpdatePPUView(int scanline, int drawall);
#endif /* __DRIVER_H_ */

View File

@ -20,7 +20,7 @@
#include "common.h"
#include "cheat.h"
#include "..\..\memview.h"
#include "memview.h"
#include "debugger.h"
#include "..\..\fceu.h"
#include "..\..\cart.h"

View File

@ -28,7 +28,7 @@
#include "..\..\cart.h"
#include "..\..\ines.h"
#include "tracer.h"
#include "..\..\memview.h"
#include "memview.h"
#include "cheat.h"
#include <assert.h>

View File

@ -33,25 +33,21 @@
#include <shlobj.h> // For directories configuration dialog.
#undef uint8
#include "../../ppuview.h" //mbg merge 7/19/06 added
#include "../../types.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 "../../types.h"
#include "../../fceu.h"
#include "ppuview.h"
#include "debugger.h"
#include "input.h"
#include "netplay.h"
#include "joystick.h"
#include "keyboard.h"
#include "cheat.h"
#include "debug.h"
//------
//mbg merge 7/19/06 added
#include "..\..\ppuview.h"
#include "..\..\ntview.h"
#include "..\..\memview.h"
#include "ppuview.h"
#include "ntview.h"
#include "memview.h"
#include "tracer.h"
#include "cdlogger.h"
//-----
//#include "memwatch.h" //mbg merge 7/19/06 removed-memwatch is gone
#include "basicbot.h"

View File

@ -20,7 +20,7 @@
#include "common.h"
#include "..\..\types.h"
#include "..\..\memview.h"
#include "memview.h"
#include "..\..\debug.h"
#include "debugger.h"
#include "cdlogger.h"

View File

@ -19,7 +19,7 @@
*/
#include "common.h"
#include "..\..\ntview.h"
#include "ntview.h"
#include "..\..\fceu.h"
#include "..\..\debug.h"
#define INESPRIV
@ -313,7 +313,9 @@ void DrawNameTable(uint8 *bitmap, uint8 *table, uint8 *tablecache) {
}
}
void UpdateNTView(int drawall) {
void FCEUD_UpdateNTView(int scanline, int drawall) {
if(!NTViewer) return;
if(scanline != -1 && scanline != NTViewScanline) return;
//uint8 *pbitmap = ppuv_palette;
if (!hNTView) return;
@ -594,7 +596,7 @@ void DoNTView() {
if (!hNTView) hNTView = CreateDialog(fceu_hInstance,"NTVIEW",NULL,NTViewCallB);
if (hNTView) {
SetWindowPos(hNTView,HWND_TOP,0,0,0,0,SWP_NOSIZE|SWP_NOMOVE|SWP_NOOWNERZORDER);
UpdateNTView(1);
FCEUD_UpdateNTView(-1,1);
NTViewDoBlit(1);
}
}

View File

@ -4,6 +4,5 @@ extern int chrchanged;
extern int horzscroll, vertscroll;
void NTViewDoBlit(int autorefresh);
void UpdateNTView(int drawall);
void KillNTView();
void DoNTView();

View File

@ -113,7 +113,10 @@ void DrawPatternTable(uint8 *bitmap, uint8 *table, uint8 pal) {
}
void UpdatePPUView(int refreshchr) {
void FCEUD_UpdatePPUView(int scanline, int refreshchr) {
if(!PPUViewer) return;
if(scanline != -1 && scanline != PPUViewScanline) return;
int x,y,i;
uint8 *pbitmap = ppuv_palette;
@ -274,7 +277,7 @@ BOOL CALLBACK PPUViewCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam
if(pindex1 == 7) pindex1 = 0;
else pindex1++;
}
UpdatePPUView(0);
FCEUD_UpdatePPUView(-1, 0);
PPUViewDoBlit();
break;
case WM_MOUSEMOVE:
@ -346,7 +349,7 @@ void DoPPUView() {
if(!hPPUView) hPPUView = CreateDialog(fceu_hInstance,"PPUVIEW",NULL,PPUViewCallB);
if(hPPUView) {
SetWindowPos(hPPUView,HWND_TOP,0,0,0,0,SWP_NOSIZE|SWP_NOMOVE|SWP_NOOWNERZORDER);
UpdatePPUView(1);
FCEUD_UpdatePPUView(-1,1);
PPUViewDoBlit();
}
}

View File

@ -0,0 +1,6 @@
extern int PPUViewScanline;
extern int PPUViewer;
extern int scanline;
void PPUViewDoBlit();

View File

@ -27,7 +27,7 @@
#include "..\..\file.h"
#include "..\..\debug.h"
#include "tracer.h"
#include "..\..\memview.h"
#include "memview.h"
//#define LOG_SKIP_UNMAPPED 4
//#define LOG_ADD_PERIODS 8

11
ppu.cpp
View File

@ -32,17 +32,12 @@
#include "general.h"
#include "endian.h"
#include "memory.h"
#ifdef WIN32
#include "ppuview.h"
#endif
#include "cart.h"
#include "palette.h"
#include "state.h"
#include "video.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 Sprite16 (PPU[0]&0x20) /* Sprites 8x16/8x8 */
@ -813,7 +808,7 @@ static void DoLine(void)
GameHBIRQHook();
}
if ((NTViewer) && (scanline == NTViewScanline)) UpdateNTView(0); //bbit edited:this line added
DEBUG(FCEUD_UpdateNTView(scanline,0));
if(SpriteON)
RefreshSprites();
@ -1364,9 +1359,7 @@ int FCEUPPU_Loop(int skip)
for(scanline=0;scanline<240;) //scanline is incremented in DoLine. Evil. :/
{
deempcnt[deemp]++;
//#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);
//#endif
DEBUG(FCEUD_UpdatePPUView(scanline, 1));
DoLine();
}
if(MMC5Hack && (ScreenON || SpriteON)) MMC5_hb(scanline);

View File

@ -1,7 +0,0 @@
extern int PPUViewScanline;
extern int PPUViewer;
extern int scanline;
void PPUViewDoBlit(); //mbg merge 7/19/06
void UpdatePPUView(int refreshchr);

View File

@ -33,6 +33,13 @@
//#define FCEUXD_VERSION_STRING "1.0a"
//#define FCEUXDSP_VERSION_STRING "1.07"
//causes the code fragment argument to be compiled in if the build includes debugging
#ifdef FCEUDEF_DEBUGGER
#define DEBUG(X) X;
#else
#define DEBUG(X)
#endif
#ifdef MSVC
typedef unsigned char uint8;
typedef unsigned short uint16;

View File

@ -382,13 +382,6 @@ void X6502_Power(void)
X6502_Reset();
}
//causes the code fragment argument to be compiled in if the build includes debugging
#ifdef FCEUDEF_DEBUGGER
#define DEBUG(X) X;
#else
#define DEBUG(X)
#endif
void X6502_Run(int32 cycles)
{
if(PAL)