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) //(we should move the code in the win driver that does this to the shared area)
void FCEUD_TraceInstruction(); 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_ */ #endif /* __DRIVER_H_ */

View File

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

View File

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

View File

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

View File

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

View File

@ -19,7 +19,7 @@
*/ */
#include "common.h" #include "common.h"
#include "..\..\ntview.h" #include "ntview.h"
#include "..\..\fceu.h" #include "..\..\fceu.h"
#include "..\..\debug.h" #include "..\..\debug.h"
#define INESPRIV #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; //uint8 *pbitmap = ppuv_palette;
if (!hNTView) return; if (!hNTView) return;
@ -594,7 +596,7 @@ void DoNTView() {
if (!hNTView) hNTView = CreateDialog(fceu_hInstance,"NTVIEW",NULL,NTViewCallB); if (!hNTView) hNTView = CreateDialog(fceu_hInstance,"NTVIEW",NULL,NTViewCallB);
if (hNTView) { if (hNTView) {
SetWindowPos(hNTView,HWND_TOP,0,0,0,0,SWP_NOSIZE|SWP_NOMOVE|SWP_NOOWNERZORDER); SetWindowPos(hNTView,HWND_TOP,0,0,0,0,SWP_NOSIZE|SWP_NOMOVE|SWP_NOOWNERZORDER);
UpdateNTView(1); FCEUD_UpdateNTView(-1,1);
NTViewDoBlit(1); NTViewDoBlit(1);
} }
} }

View File

@ -4,6 +4,5 @@ extern int chrchanged;
extern int horzscroll, vertscroll; extern int horzscroll, vertscroll;
void NTViewDoBlit(int autorefresh); void NTViewDoBlit(int autorefresh);
void UpdateNTView(int drawall);
void KillNTView(); void KillNTView();
void DoNTView(); 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; int x,y,i;
uint8 *pbitmap = ppuv_palette; uint8 *pbitmap = ppuv_palette;
@ -274,7 +277,7 @@ BOOL CALLBACK PPUViewCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam
if(pindex1 == 7) pindex1 = 0; if(pindex1 == 7) pindex1 = 0;
else pindex1++; else pindex1++;
} }
UpdatePPUView(0); FCEUD_UpdatePPUView(-1, 0);
PPUViewDoBlit(); PPUViewDoBlit();
break; break;
case WM_MOUSEMOVE: case WM_MOUSEMOVE:
@ -346,7 +349,7 @@ void DoPPUView() {
if(!hPPUView) hPPUView = CreateDialog(fceu_hInstance,"PPUVIEW",NULL,PPUViewCallB); if(!hPPUView) hPPUView = CreateDialog(fceu_hInstance,"PPUVIEW",NULL,PPUViewCallB);
if(hPPUView) { if(hPPUView) {
SetWindowPos(hPPUView,HWND_TOP,0,0,0,0,SWP_NOSIZE|SWP_NOMOVE|SWP_NOOWNERZORDER); SetWindowPos(hPPUView,HWND_TOP,0,0,0,0,SWP_NOSIZE|SWP_NOMOVE|SWP_NOOWNERZORDER);
UpdatePPUView(1); FCEUD_UpdatePPUView(-1,1);
PPUViewDoBlit(); 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 "..\..\file.h"
#include "..\..\debug.h" #include "..\..\debug.h"
#include "tracer.h" #include "tracer.h"
#include "..\..\memview.h" #include "memview.h"
//#define LOG_SKIP_UNMAPPED 4 //#define LOG_SKIP_UNMAPPED 4
//#define LOG_ADD_PERIODS 8 //#define LOG_ADD_PERIODS 8

11
ppu.cpp
View File

@ -32,17 +32,12 @@
#include "general.h" #include "general.h"
#include "endian.h" #include "endian.h"
#include "memory.h" #include "memory.h"
#ifdef WIN32
#include "ppuview.h"
#endif
#include "cart.h" #include "cart.h"
#include "palette.h" #include "palette.h"
#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 */
@ -813,7 +808,7 @@ static void DoLine(void)
GameHBIRQHook(); GameHBIRQHook();
} }
if ((NTViewer) && (scanline == NTViewScanline)) UpdateNTView(0); //bbit edited:this line added DEBUG(FCEUD_UpdateNTView(scanline,0));
if(SpriteON) if(SpriteON)
RefreshSprites(); RefreshSprites();
@ -1364,9 +1359,7 @@ 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 //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 DEBUG(FCEUD_UpdatePPUView(scanline, 1));
if((PPUViewer) && (scanline == PPUViewScanline)) UpdatePPUView(1);
//#endif
DoLine(); DoLine();
} }
if(MMC5Hack && (ScreenON || SpriteON)) MMC5_hb(scanline); 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 FCEUXD_VERSION_STRING "1.0a"
//#define FCEUXDSP_VERSION_STRING "1.07" //#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 #ifdef MSVC
typedef unsigned char uint8; typedef unsigned char uint8;
typedef unsigned short uint16; typedef unsigned short uint16;

View File

@ -382,13 +382,6 @@ void X6502_Power(void)
X6502_Reset(); 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) void X6502_Run(int32 cycles)
{ {
if(PAL) if(PAL)