voxel: merging changing from trunk
This commit is contained in:
parent
86d663102e
commit
d0a7716ba4
|
@ -18,42 +18,44 @@
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*
|
*
|
||||||
* 7-in-1 Darkwing Duck, Snake, MagicBlock (PCB marked as "12 in 1")
|
* 7-in-1 Darkwing Duck, Snake, MagicBlock (PCB marked as "12 in 1")
|
||||||
|
* 12-in-1 1991 New Star Co. Ltd.
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "mapinc.h"
|
#include "mapinc.h"
|
||||||
|
|
||||||
static uint8 reg[4];
|
static uint8 prgchr[2], ctrl;
|
||||||
static SFORMAT StateRegs[] =
|
static SFORMAT StateRegs[] =
|
||||||
{
|
{
|
||||||
{ reg, 4, "REGS" },
|
{ prgchr, 2, "REGS" },
|
||||||
|
{ &ctrl, 1, "CTRL" },
|
||||||
{ 0 }
|
{ 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
static void Sync(void) {
|
static void Sync(void) {
|
||||||
uint8 bank = (reg[3] & 3) << 3;
|
uint8 bank = (ctrl & 3) << 3;
|
||||||
setchr4(0x0000, (reg[1] >> 3) | (bank << 2));
|
setchr4(0x0000, (prgchr[0] >> 3) | (bank << 2));
|
||||||
setchr4(0x1000, (reg[2] >> 3) | (bank << 2));
|
setchr4(0x1000, (prgchr[1] >> 3) | (bank << 2));
|
||||||
if (reg[3] & 8) {
|
if (ctrl & 8) {
|
||||||
setprg32(0x8000, ((reg[2] & 7) >> 1) | bank);
|
setprg16(0x8000, bank | (prgchr[0] & 6) | 0); // actually, both 0 and 1 registers used, but they will switch each PA12 transition
|
||||||
|
setprg16(0xc000, bank | (prgchr[0] & 6) | 1); // if bits are different for both registers, so they must be programmed strongly the same!
|
||||||
} else {
|
} else {
|
||||||
setprg16(0x8000, (reg[1] & 7) | bank);
|
setprg16(0x8000, bank | (prgchr[0] & 7));
|
||||||
setprg16(0xc000, 7 | bank);
|
setprg16(0xc000, bank | 7 );
|
||||||
}
|
}
|
||||||
setmirror(((reg[3] & 4) >> 2) ^ 1);
|
setmirror(((ctrl & 4) >> 2) ^ 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
static DECLFW(BMC12IN1Write) {
|
static DECLFW(BMC12IN1Write) {
|
||||||
switch (A) {
|
switch (A & 0xE000) {
|
||||||
case 0xafff: reg[0] = V; break;
|
case 0xA000: prgchr[0] = V; Sync(); break;
|
||||||
case 0xbfff: reg[1] = V; break;
|
case 0xC000: prgchr[1] = V; Sync(); break;
|
||||||
case 0xdfff: reg[2] = V; break;
|
case 0xE000: ctrl = V & 0x0F; Sync(); break;
|
||||||
case 0xefff: reg[3] = V; break;
|
|
||||||
}
|
}
|
||||||
Sync();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void BMC12IN1Power(void) {
|
static void BMC12IN1Power(void) {
|
||||||
reg[0] = reg[1] = reg[2] = reg[3] = 0;
|
prgchr[0] = prgchr[1] = ctrl = 0;
|
||||||
Sync();
|
Sync();
|
||||||
SetReadHandler(0x8000, 0xFFFF, CartBR);
|
SetReadHandler(0x8000, 0xFFFF, CartBR);
|
||||||
SetWriteHandler(0x8000, 0xFFFF, BMC12IN1Write);
|
SetWriteHandler(0x8000, 0xFFFF, BMC12IN1Write);
|
||||||
|
@ -68,3 +70,4 @@ void BMC12IN1_Init(CartInfo *info) {
|
||||||
GameStateRestore = StateRestore;
|
GameStateRestore = StateRestore;
|
||||||
AddExState(&StateRegs, ~0, 0, 0);
|
AddExState(&StateRegs, ~0, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@ static void Sync(void) {
|
||||||
} else
|
} else
|
||||||
setprg32(0x8000, prg >> 1);
|
setprg32(0x8000, prg >> 1);
|
||||||
setchr8(chr);
|
setchr8(chr);
|
||||||
setmirror(mirr);
|
setmirror(mirr ^ 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
static DECLFW(M225Write) {
|
static DECLFW(M225Write) {
|
||||||
|
|
|
@ -201,6 +201,20 @@ void CPROM_Init(CartInfo *info) {
|
||||||
Latch_Init(info, CPROMSync, 0, 0x8000, 0xFFFF, 0, 0);
|
Latch_Init(info, CPROMSync, 0, 0x8000, 0xFFFF, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//------------------ Map 29 --------------------------- //Used by Glider, http://www.retrousb.com/product_info.php?cPath=30&products_id=58
|
||||||
|
|
||||||
|
static void M29Sync() {
|
||||||
|
setprg16(0x8000, (latche & 0x1C) >> 2);
|
||||||
|
setprg16(0xc000, ~0);
|
||||||
|
setchr8r(0, latche & 3);
|
||||||
|
setprg8r(0x10, 0x6000, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Mapper29_Init(CartInfo *info) {
|
||||||
|
Latch_Init(info, M29Sync, 0, 0x8000, 0xFFFF, 1, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//------------------ Map 38 ---------------------------
|
//------------------ Map 38 ---------------------------
|
||||||
|
|
||||||
static void M38Sync(void) {
|
static void M38Sync(void) {
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
||||||
|
unsigned int debuggerPageSize = 14;
|
||||||
int vblankScanLines = 0; //Used to calculate scanlines 240-261 (vblank)
|
int vblankScanLines = 0; //Used to calculate scanlines 240-261 (vblank)
|
||||||
int vblankPixel = 0; //Used to calculate the pixels in vblank
|
int vblankPixel = 0; //Used to calculate the pixels in vblank
|
||||||
|
|
||||||
|
@ -232,7 +232,7 @@ int getBank(int offs)
|
||||||
|
|
||||||
if (GameInfo && GameInfo->type==GIT_NSF)
|
if (GameInfo && GameInfo->type==GIT_NSF)
|
||||||
return addr != -1 ? addr / 0x1000 : -1;
|
return addr != -1 ? addr / 0x1000 : -1;
|
||||||
return addr != -1 ? addr / 0x4000 : -1;
|
return addr != -1 ? addr / (1<<debuggerPageSize) : -1; //formerly, dividing by 0x4000
|
||||||
}
|
}
|
||||||
|
|
||||||
int GetNesFileAddress(int A){
|
int GetNesFileAddress(int A){
|
||||||
|
|
|
@ -25,6 +25,9 @@ void FCEU_printf(char *format, ...);
|
||||||
#define FCEUI_printf FCEU_printf
|
#define FCEUI_printf FCEU_printf
|
||||||
|
|
||||||
//Video interface
|
//Video interface
|
||||||
|
// FIXME: these functions are declared in windows video driver header, but not in linux video driver header;
|
||||||
|
// eventually both platform video drivers should be brought to same set of functions and single shared header,
|
||||||
|
// which then can be included where access to video driver functions is needed instead of driver.h
|
||||||
void FCEUD_SetPalette(uint8 index, uint8 r, uint8 g, uint8 b);
|
void FCEUD_SetPalette(uint8 index, uint8 r, uint8 g, uint8 b);
|
||||||
void FCEUD_GetPalette(uint8 i,uint8 *r, uint8 *g, uint8 *b);
|
void FCEUD_GetPalette(uint8 i,uint8 *r, uint8 *g, uint8 *b);
|
||||||
|
|
||||||
|
@ -259,6 +262,9 @@ void FCEUI_SetEmulationPaused(int val);
|
||||||
void FCEUI_ToggleEmulationPause();
|
void FCEUI_ToggleEmulationPause();
|
||||||
|
|
||||||
//indicates whether input aids should be drawn (such as crosshairs, etc; usually in fullscreen mode)
|
//indicates whether input aids should be drawn (such as crosshairs, etc; usually in fullscreen mode)
|
||||||
|
// FIXME: this function is already declared in both platform video driver headers;
|
||||||
|
// eventually both platform video drivers should be brought to same set of functions and single shared header,
|
||||||
|
// which then can be included where access to video driver functions is needed instead of driver.h
|
||||||
bool FCEUD_ShouldDrawInputAids();
|
bool FCEUD_ShouldDrawInputAids();
|
||||||
|
|
||||||
///called when the emulator closes a game
|
///called when the emulator closes a game
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
/res.aps
|
|
@ -4,8 +4,8 @@
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "fceu.h"
|
#include "fceu.h"
|
||||||
|
#include "drivers/win/video.h"
|
||||||
|
|
||||||
extern PALETTEENTRY *color_palette;
|
|
||||||
//extern WAVEFORMATEX wf;
|
//extern WAVEFORMATEX wf;
|
||||||
//extern int soundo;
|
//extern int soundo;
|
||||||
|
|
||||||
|
@ -292,6 +292,7 @@ static void do_video_conversion(const unsigned char* buffer)
|
||||||
// memset(avi_file->convert_buffer, 0, VIDEO_WIDTH*(avi_file->end_scanline-avi_file->start_scanline)*3);
|
// memset(avi_file->convert_buffer, 0, VIDEO_WIDTH*(avi_file->end_scanline-avi_file->start_scanline)*3);
|
||||||
|
|
||||||
buffer += avi_file->start_scanline * VIDEO_WIDTH;
|
buffer += avi_file->start_scanline * VIDEO_WIDTH;
|
||||||
|
PALETTEENTRY* color_palette = GetPalette();
|
||||||
|
|
||||||
for(int y=avi_file->start_scanline; y<avi_file->end_scanline; ++y)
|
for(int y=avi_file->start_scanline; y<avi_file->end_scanline; ++y)
|
||||||
{
|
{
|
||||||
|
|
|
@ -414,6 +414,11 @@ void SaveStrippedROM(int invert)
|
||||||
if(!GetSaveFileName(&ofn))return;
|
if(!GetSaveFileName(&ofn))return;
|
||||||
|
|
||||||
fp = fopen(sromfilename,"wb");
|
fp = fopen(sromfilename,"wb");
|
||||||
|
if(!fp)
|
||||||
|
{
|
||||||
|
FCEUD_PrintError("Error opening target stripped rom file!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if(GameInfo->type==GIT_NSF)
|
if(GameInfo->type==GIT_NSF)
|
||||||
{
|
{
|
||||||
|
|
|
@ -185,8 +185,8 @@ static CFGSTRUCT fceuconfig[] =
|
||||||
|
|
||||||
NAC("palyo",pal_emulation),
|
NAC("palyo",pal_emulation),
|
||||||
NAC("genie",genie),
|
NAC("genie",genie),
|
||||||
NAC("fs",fullscreen),
|
NAC("fs",_FIXME_getFullscreenVar()),
|
||||||
NAC("vgamode",vmod),
|
NAC("vgamode",_FIXME_getVModeIdxVar()),
|
||||||
NAC("sound",soundo),
|
NAC("sound",soundo),
|
||||||
NAC("sicon",status_icon),
|
NAC("sicon",status_icon),
|
||||||
|
|
||||||
|
@ -206,8 +206,8 @@ static CFGSTRUCT fceuconfig[] =
|
||||||
NACS("odavi",directory_names[12]),
|
NACS("odavi",directory_names[12]),
|
||||||
NACS("odbase",directory_names[13]),
|
NACS("odbase",directory_names[13]),
|
||||||
|
|
||||||
AC(winspecial),
|
NAC("winspecial", _FIXME_getFilterModeWindowedIdxVar()),
|
||||||
AC(NTSCwinspecial),
|
NAC("NTSCwinspecial", _FIXME_getFilterOptionVar()),
|
||||||
AC(winsizemulx),
|
AC(winsizemulx),
|
||||||
AC(winsizemuly),
|
AC(winsizemuly),
|
||||||
AC(tvAspectX),
|
AC(tvAspectX),
|
||||||
|
@ -231,23 +231,23 @@ static CFGSTRUCT fceuconfig[] =
|
||||||
|
|
||||||
NACA("InputType",InputType),
|
NACA("InputType",InputType),
|
||||||
|
|
||||||
NAC("vmcx",vmodes[0].x),
|
NAC("vmcx",_FIXME_getCustomVideoModeVar().width),
|
||||||
NAC("vmcy",vmodes[0].y),
|
NAC("vmcy",_FIXME_getCustomVideoModeVar().height),
|
||||||
NAC("vmcb",vmodes[0].bpp),
|
NAC("vmcb",_FIXME_getCustomVideoModeVar().bpp),
|
||||||
NAC("vmcf",vmodes[0].flags),
|
NAC("vmcf",_FIXME_getCustomVideoModeVar().flags),
|
||||||
NAC("vmcxs",vmodes[0].xscale),
|
NAC("vmcxs",_FIXME_getCustomVideoModeVar().xscale),
|
||||||
NAC("vmcys",vmodes[0].yscale),
|
NAC("vmcys",_FIXME_getCustomVideoModeVar().yscale),
|
||||||
NAC("vmspecial",vmodes[0].special),
|
NAC("vmspecial",_FIXME_getCustomVideoModeVar().filter),
|
||||||
|
|
||||||
NAC("srendline",srendlinen),
|
NAC("srendline",srendlinen),
|
||||||
NAC("erendline",erendlinen),
|
NAC("erendline",erendlinen),
|
||||||
NAC("srendlinep",srendlinep),
|
NAC("srendlinep",srendlinep),
|
||||||
NAC("erendlinep",erendlinep),
|
NAC("erendlinep",erendlinep),
|
||||||
|
|
||||||
AC(directDrawModeWindowed),
|
NAC("directDrawModeWindowed", _FIXME_getDDrawModeWindowedVar()),
|
||||||
AC(directDrawModeFullscreen),
|
NAC("directDrawModeFullscreen", _FIXME_getDDrawModeFullscreenVar()),
|
||||||
AC(winsync),
|
NAC("winsync", _FIXME_getWindowedSyncModeIdxVar()),
|
||||||
NAC("988fssync",fssync),
|
NAC("988fssync",_FIXME_getFullscreenSyncModeIdxVar()),
|
||||||
|
|
||||||
AC(ismaximized),
|
AC(ismaximized),
|
||||||
AC(maxconbskip),
|
AC(maxconbskip),
|
||||||
|
@ -279,7 +279,10 @@ static CFGSTRUCT fceuconfig[] =
|
||||||
AC(debuggerSaveLoadDEBFiles),
|
AC(debuggerSaveLoadDEBFiles),
|
||||||
AC(debuggerDisplayROMoffsets),
|
AC(debuggerDisplayROMoffsets),
|
||||||
AC(debuggerFontSize),
|
AC(debuggerFontSize),
|
||||||
AC(hexeditorFontSize),
|
AC(debuggerPageSize),
|
||||||
|
AC(hexeditorFontWidth),
|
||||||
|
AC(hexeditorFontHeight),
|
||||||
|
ACS(hexeditorFontName),
|
||||||
AC(fullSaveStateLoads),
|
AC(fullSaveStateLoads),
|
||||||
AC(frameSkipAmt),
|
AC(frameSkipAmt),
|
||||||
AC(fps_scale_frameadvance),
|
AC(fps_scale_frameadvance),
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
// FIXME for Windows, make use of Config class the way linux version does
|
||||||
|
// old config registers variables by placing their addresses into static array, which makes
|
||||||
|
// many modules expose their internal vars and pollute globals; there is also no way to know when a
|
||||||
|
// setting was changed by it, which spawns auxillary functions intended to push new values through
|
||||||
void SaveConfig(const char *filename);
|
void SaveConfig(const char *filename);
|
||||||
void LoadConfig(const char *filename);
|
void LoadConfig(const char *filename);
|
||||||
|
|
||||||
|
|
|
@ -41,12 +41,10 @@
|
||||||
|
|
||||||
#include "debuggersp.h"
|
#include "debuggersp.h"
|
||||||
|
|
||||||
extern Name* lastBankNames;
|
extern Name* pageNames[32];
|
||||||
extern Name* loadedBankNames;
|
|
||||||
extern Name* ramBankNames;
|
extern Name* ramBankNames;
|
||||||
extern bool ramBankNamesLoaded;
|
extern bool ramBankNamesLoaded;
|
||||||
extern int lastBank;
|
extern int pageNumbersLoaded[32];
|
||||||
extern int loadedBank;
|
|
||||||
extern int myNumWPs;
|
extern int myNumWPs;
|
||||||
|
|
||||||
// ################################## End of SP CODE ###########################
|
// ################################## End of SP CODE ###########################
|
||||||
|
@ -525,8 +523,9 @@ void Disassemble(HWND hWnd, int id, int scrollid, unsigned int addr)
|
||||||
if (symbDebugEnabled)
|
if (symbDebugEnabled)
|
||||||
{
|
{
|
||||||
replaceNames(ramBankNames, a, &disassembly_operands[i]);
|
replaceNames(ramBankNames, a, &disassembly_operands[i]);
|
||||||
replaceNames(loadedBankNames, a, &disassembly_operands[i]);
|
for(int p=0;p<ARRAY_SIZE(pageNames);p++)
|
||||||
replaceNames(lastBankNames, a, &disassembly_operands[i]);
|
if(pageNames[p] != NULL)
|
||||||
|
replaceNames(pageNames[p], a, &disassembly_operands[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// special case: an RTS opcode
|
// special case: an RTS opcode
|
||||||
|
@ -2152,7 +2151,8 @@ BOOL CALLBACK DebuggerCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPara
|
||||||
case IDC_DEBUGGER_RELOAD_SYMS:
|
case IDC_DEBUGGER_RELOAD_SYMS:
|
||||||
{
|
{
|
||||||
ramBankNamesLoaded = false;
|
ramBankNamesLoaded = false;
|
||||||
lastBank = loadedBank = -1;
|
for(int i=0;i<ARRAYSIZE(pageNumbersLoaded);i++)
|
||||||
|
pageNumbersLoaded[i] = -1;
|
||||||
loadNameFiles();
|
loadNameFiles();
|
||||||
UpdateDebugger(false);
|
UpdateDebugger(false);
|
||||||
break;
|
break;
|
||||||
|
@ -2307,7 +2307,9 @@ void DoDebug(uint8 halt)
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
DebugSystem* debugSystem;
|
DebugSystem* debugSystem;
|
||||||
unsigned int debuggerFontSize = 15;
|
unsigned int debuggerFontSize = 15;
|
||||||
unsigned int hexeditorFontSize = 15;
|
unsigned int hexeditorFontHeight = 15;
|
||||||
|
unsigned int hexeditorFontWidth = 7;
|
||||||
|
char* hexeditorFontName = 0;
|
||||||
|
|
||||||
DebugSystem::DebugSystem()
|
DebugSystem::DebugSystem()
|
||||||
{
|
{
|
||||||
|
@ -2322,12 +2324,20 @@ void DebugSystem::init()
|
||||||
DEFAULT_QUALITY, DEFAULT_PITCH, /*quality, and pitch*/
|
DEFAULT_QUALITY, DEFAULT_PITCH, /*quality, and pitch*/
|
||||||
"Courier New"); /*font name*/
|
"Courier New"); /*font name*/
|
||||||
|
|
||||||
hHexeditorFont = CreateFont(hexeditorFontSize, hexeditorFontSize / 2, /*Height,Width*/
|
//if the user provided his own courier font, use that
|
||||||
|
extern std::string BaseDirectory;
|
||||||
|
std::string courefon_path = BaseDirectory + "\\coure.fon";
|
||||||
|
AddFontResourceEx(courefon_path.c_str(), FR_PRIVATE, NULL);
|
||||||
|
|
||||||
|
char* hexfn = hexeditorFontName;
|
||||||
|
if(!hexfn) hexfn = "Courier";
|
||||||
|
|
||||||
|
hHexeditorFont = CreateFont(hexeditorFontHeight, hexeditorFontWidth, /*Height,Width*/
|
||||||
0,0, /*escapement,orientation*/
|
0,0, /*escapement,orientation*/
|
||||||
FW_REGULAR,FALSE,FALSE,FALSE, /*weight, italic, underline, strikeout*/
|
FW_REGULAR,FALSE,FALSE,FALSE, /*weight, italic, underline, strikeout*/
|
||||||
ANSI_CHARSET,OUT_DEVICE_PRECIS,CLIP_MASK, /*charset, precision, clipping*/
|
ANSI_CHARSET,OUT_DEVICE_PRECIS,CLIP_MASK, /*charset, precision, clipping*/
|
||||||
DEFAULT_QUALITY, DEFAULT_PITCH, /*quality, and pitch*/
|
DEFAULT_QUALITY, DEFAULT_PITCH, /*quality, and pitch*/
|
||||||
"Courier"); /*font name*/
|
hexfn); /*font name*/
|
||||||
|
|
||||||
HDC hdc = GetDC(GetDesktopWindow());
|
HDC hdc = GetDC(GetDesktopWindow());
|
||||||
HGDIOBJ old = SelectObject(hdc,hFixedFont);
|
HGDIOBJ old = SelectObject(hdc,hFixedFont);
|
||||||
|
|
|
@ -22,8 +22,11 @@ extern bool debuggerAutoload;
|
||||||
extern bool debuggerSaveLoadDEBFiles;
|
extern bool debuggerSaveLoadDEBFiles;
|
||||||
extern bool debuggerDisplayROMoffsets;
|
extern bool debuggerDisplayROMoffsets;
|
||||||
|
|
||||||
|
extern unsigned int debuggerPageSize;
|
||||||
extern unsigned int debuggerFontSize;
|
extern unsigned int debuggerFontSize;
|
||||||
extern unsigned int hexeditorFontSize;
|
extern unsigned int hexeditorFontWidth;
|
||||||
|
extern unsigned int hexeditorFontHeight;
|
||||||
|
extern char* hexeditorFontName;
|
||||||
|
|
||||||
void CenterWindow(HWND hwndDlg);
|
void CenterWindow(HWND hwndDlg);
|
||||||
void DoPatcher(int address,HWND hParent);
|
void DoPatcher(int address,HWND hParent);
|
||||||
|
|
|
@ -32,12 +32,25 @@
|
||||||
|
|
||||||
int GetNesFileAddress(int A);
|
int GetNesFileAddress(int A);
|
||||||
|
|
||||||
Name* lastBankNames = 0;
|
inline int RomPageIndexForAddress(int addr) { return (addr-0x8000)>>(debuggerPageSize); }
|
||||||
Name* loadedBankNames = 0;
|
|
||||||
|
//old
|
||||||
|
//Name* lastBankNames = 0;
|
||||||
|
//Name* loadedBankNames = 0;
|
||||||
|
|
||||||
|
//new
|
||||||
|
Name* pageNames[32] = {0}; //the maximum number of pages we could have is 32, based on 1KB debuggerPageSize
|
||||||
|
|
||||||
|
//old
|
||||||
|
//int lastBank = -1;
|
||||||
|
//int loadedBank = -1;
|
||||||
|
|
||||||
|
//new
|
||||||
|
int pageNumbersLoaded[32]; //TODO - need to initialize these to -1 somehow
|
||||||
|
|
||||||
Name* ramBankNames = 0;
|
Name* ramBankNames = 0;
|
||||||
bool ramBankNamesLoaded = false;
|
bool ramBankNamesLoaded = false;
|
||||||
int lastBank = -1;
|
|
||||||
int loadedBank = -1;
|
|
||||||
extern char LoadedRomFName[2048];
|
extern char LoadedRomFName[2048];
|
||||||
char NLfilename[2048];
|
char NLfilename[2048];
|
||||||
bool symbDebugEnabled = true;
|
bool symbDebugEnabled = true;
|
||||||
|
@ -547,29 +560,24 @@ char* generateNLFilenameForAddress(uint16 address)
|
||||||
}
|
}
|
||||||
Name* getNamesPointerForAddress(uint16 address)
|
Name* getNamesPointerForAddress(uint16 address)
|
||||||
{
|
{
|
||||||
// this function is called very often (when using "Symbolic trace"), so this is sorted by frequency
|
if(address >= 0x8000)
|
||||||
if (address >= 0xC000)
|
|
||||||
{
|
{
|
||||||
return lastBankNames;
|
return pageNames[RomPageIndexForAddress(address)];
|
||||||
} else if (address >= 0x8000)
|
}
|
||||||
{
|
else
|
||||||
return loadedBankNames;
|
|
||||||
} else
|
|
||||||
{
|
{
|
||||||
return ramBankNames;
|
return ramBankNames;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void setNamesPointerForAddress(uint16 address, Name* newNode)
|
void setNamesPointerForAddress(uint16 address, Name* newNode)
|
||||||
{
|
{
|
||||||
if (address < 0x8000)
|
if (address >= 0x8000)
|
||||||
|
{
|
||||||
|
pageNames[RomPageIndexForAddress(address)] = newNode;
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
ramBankNames = newNode;
|
ramBankNames = newNode;
|
||||||
} else if (address < 0xC000)
|
|
||||||
{
|
|
||||||
loadedBankNames = newNode;
|
|
||||||
} else
|
|
||||||
{
|
|
||||||
lastBankNames = newNode;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -592,44 +600,32 @@ void loadNameFiles()
|
||||||
ramBankNames = parseNameFile(generateNLFilenameForAddress(0x0000));
|
ramBankNames = parseNameFile(generateNLFilenameForAddress(0x0000));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Find out which bank is loaded at 0xC000
|
int nPages = 1<<(15-debuggerPageSize);
|
||||||
cb = getBank(0xC000);
|
|
||||||
|
for(int i=0;i<nPages;i++)
|
||||||
|
{
|
||||||
|
int pageIndexAddress = 0x8000 + (1<<debuggerPageSize)*i;
|
||||||
|
|
||||||
|
// Find out which bank is loaded at the page index
|
||||||
|
cb = getBank(pageIndexAddress);
|
||||||
if (cb == -1) // No bank was loaded at that offset
|
if (cb == -1) // No bank was loaded at that offset
|
||||||
{
|
{
|
||||||
free(lastBankNames);
|
free(pageNames[i]);
|
||||||
lastBankNames = 0;
|
pageNames[i] = 0;
|
||||||
} else if (cb != lastBank)
|
}
|
||||||
|
else if (cb != pageNumbersLoaded[i])
|
||||||
{
|
{
|
||||||
// If the bank changed since loading the NL files the last time it's necessary
|
// If the bank changed since loading the NL files the last time it's necessary
|
||||||
// to load the address descriptions of the new bank.
|
// to load the address descriptions of the new bank.
|
||||||
lastBank = cb;
|
pageNumbersLoaded[i] = cb;
|
||||||
|
|
||||||
if (lastBankNames)
|
if (pageNames[i])
|
||||||
freeList(lastBankNames);
|
freeList(pageNames[i]);
|
||||||
|
|
||||||
// Load new address definitions
|
// Load new address definitions
|
||||||
lastBankNames = parseNameFile(generateNLFilenameForAddress(0xC000));
|
pageNames[i] = parseNameFile(generateNLFilenameForAddress(pageIndexAddress));
|
||||||
}
|
|
||||||
|
|
||||||
// Find out which bank is loaded at 0x8000
|
|
||||||
cb = getBank(0x8000);
|
|
||||||
if (cb == -1) // No bank is loaded at that offset
|
|
||||||
{
|
|
||||||
free(loadedBankNames);
|
|
||||||
loadedBankNames = 0;
|
|
||||||
} else if (cb != loadedBank)
|
|
||||||
{
|
|
||||||
// If the bank changed since loading the NL files the last time it's necessary
|
|
||||||
// to load the address descriptions of the new bank.
|
|
||||||
|
|
||||||
loadedBank = cb;
|
|
||||||
|
|
||||||
if (loadedBankNames)
|
|
||||||
freeList(loadedBankNames);
|
|
||||||
|
|
||||||
// Load new address definitions
|
|
||||||
loadedBankNames = parseNameFile(generateNLFilenameForAddress(0x8000));
|
|
||||||
}
|
}
|
||||||
|
} //loop across pages
|
||||||
}
|
}
|
||||||
|
|
||||||
// bookmarks
|
// bookmarks
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <commctrl.h>
|
#include <commctrl.h>
|
||||||
|
|
||||||
|
#include "video.h"
|
||||||
#include "input.h"
|
#include "input.h"
|
||||||
#include "keyboard.h"
|
#include "keyboard.h"
|
||||||
#include "joystick.h"
|
#include "joystick.h"
|
||||||
|
@ -42,9 +43,8 @@ LPDIRECTINPUT7 lpDI=0;
|
||||||
|
|
||||||
void InitInputPorts(bool fourscore);
|
void InitInputPorts(bool fourscore);
|
||||||
|
|
||||||
int tempwinsync = 0; //Temp variable used by turbo to turn of sync settings
|
VSYNCMODE tempwinsync = SYNCMODE_NONE; //Temp variable used by turbo to turn of sync settings
|
||||||
int tempsoundquality = 0; //Temp variable used by turbo to turn of sound quality settings
|
int tempsoundquality = 0; //Temp variable used by turbo to turn of sound quality settings
|
||||||
extern int winsync;
|
|
||||||
extern int soundquality;
|
extern int soundquality;
|
||||||
extern bool replaceP2StartWithMicrophone;
|
extern bool replaceP2StartWithMicrophone;
|
||||||
//UsrInputType[] is user-specified. InputType[] is current
|
//UsrInputType[] is user-specified. InputType[] is current
|
||||||
|
@ -376,7 +376,7 @@ static uint32 UpdatePPadData(int w)
|
||||||
|
|
||||||
|
|
||||||
static uint8 fkbkeys[0x48];
|
static uint8 fkbkeys[0x48];
|
||||||
static uint8 suborkbkeys[0x60];
|
static uint8 suborkbkeys[0x65];
|
||||||
|
|
||||||
void KeyboardUpdateState(void); //mbg merge 7/17/06 yech had to add this
|
void KeyboardUpdateState(void); //mbg merge 7/17/06 yech had to add this
|
||||||
|
|
||||||
|
@ -421,6 +421,7 @@ void FCEUD_UpdateInput()
|
||||||
if(cidisabled)
|
if(cidisabled)
|
||||||
UpdateFKB();
|
UpdateFKB();
|
||||||
break;
|
break;
|
||||||
|
case SIFC_PEC586KB:
|
||||||
case SIFC_SUBORKB:
|
case SIFC_SUBORKB:
|
||||||
if(cidisabled)
|
if(cidisabled)
|
||||||
UpdateSuborKB();
|
UpdateSuborKB();
|
||||||
|
@ -510,6 +511,7 @@ void InitInputPorts(bool fourscore)
|
||||||
case SIFC_FKB:
|
case SIFC_FKB:
|
||||||
InputDPtr=fkbkeys;
|
InputDPtr=fkbkeys;
|
||||||
break;
|
break;
|
||||||
|
case SIFC_PEC586KB:
|
||||||
case SIFC_SUBORKB:
|
case SIFC_SUBORKB:
|
||||||
InputDPtr=suborkbkeys;
|
InputDPtr=suborkbkeys;
|
||||||
break;
|
break;
|
||||||
|
@ -554,7 +556,7 @@ ButtConfig fkbmap[0x48]=
|
||||||
MK(BL_CURSORUP),MK(BL_CURSORLEFT),MK(BL_CURSORRIGHT),MK(BL_CURSORDOWN)
|
MK(BL_CURSORUP),MK(BL_CURSORLEFT),MK(BL_CURSORRIGHT),MK(BL_CURSORDOWN)
|
||||||
};
|
};
|
||||||
|
|
||||||
ButtConfig suborkbmap[0x60]=
|
ButtConfig suborkbmap[0x65]=
|
||||||
{
|
{
|
||||||
MC(0x01),MC(0x3b),MC(0x3c),MC(0x3d),MC(0x3e),MC(0x3f),MC(0x40),MC(0x41),MC(0x42),MC(0x43),
|
MC(0x01),MC(0x3b),MC(0x3c),MC(0x3d),MC(0x3e),MC(0x3f),MC(0x40),MC(0x41),MC(0x42),MC(0x43),
|
||||||
MC(0x44),MC(0x57),MC(0x58),MC(0x45),MC(0x29),MC(0x02),MC(0x03),MC(0x04),MC(0x05),MC(0x06),
|
MC(0x44),MC(0x57),MC(0x58),MC(0x45),MC(0x29),MC(0x02),MC(0x03),MC(0x04),MC(0x05),MC(0x06),
|
||||||
|
@ -565,7 +567,8 @@ ButtConfig suborkbmap[0x60]=
|
||||||
MC(0x21),MC(0x22),MC(0x23),MC(0x24),MC(0x25),MC(0x26),MC(0x27),MC(0x28),MC(0x4b),MC(0x4c),
|
MC(0x21),MC(0x22),MC(0x23),MC(0x24),MC(0x25),MC(0x26),MC(0x27),MC(0x28),MC(0x4b),MC(0x4c),
|
||||||
MC(0x4d),MC(0x2a),MC(0x2c),MC(0x2d),MC(0x2e),MC(0x2f),MC(0x30),MC(0x31),MC(0x32),MC(0x33),
|
MC(0x4d),MC(0x2a),MC(0x2c),MC(0x2d),MC(0x2e),MC(0x2f),MC(0x30),MC(0x31),MC(0x32),MC(0x33),
|
||||||
MC(0x34),MC(0x35),MC(0x2b),MC(0xc8),MC(0x4f),MC(0x50),MC(0x51),MC(0x1d),MC(0x38),MC(0x39),
|
MC(0x34),MC(0x35),MC(0x2b),MC(0xc8),MC(0x4f),MC(0x50),MC(0x51),MC(0x1d),MC(0x38),MC(0x39),
|
||||||
MC(0xcb),MC(0xd0),MC(0xcd),MC(0x52),MC(0x53)
|
MC(0xcb),MC(0xd0),MC(0xcd),MC(0x52),MC(0x53),MC(0x00),MC(0x00),MC(0x00),MC(0x00),MC(0x00),
|
||||||
|
MC(0x00),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -573,7 +576,7 @@ static void UpdateFKB(void)
|
||||||
{
|
{
|
||||||
int x;
|
int x;
|
||||||
|
|
||||||
for(x=0;x<0x48;x++)
|
for(x=0;x<sizeof(fkbkeys);x++)
|
||||||
{
|
{
|
||||||
fkbkeys[x]=0;
|
fkbkeys[x]=0;
|
||||||
|
|
||||||
|
@ -586,7 +589,7 @@ static void UpdateSuborKB(void)
|
||||||
{
|
{
|
||||||
int x;
|
int x;
|
||||||
|
|
||||||
for(x=0;x<0x60;x++)
|
for(x=0;x<sizeof(suborkbkeys);x++)
|
||||||
{
|
{
|
||||||
suborkbkeys[x]=0;
|
suborkbkeys[x]=0;
|
||||||
|
|
||||||
|
@ -718,9 +721,9 @@ void InitInputStuff(void)
|
||||||
for(y=0; y<12; y++)
|
for(y=0; y<12; y++)
|
||||||
JoyClearBC(&powerpadsc[x][y]);
|
JoyClearBC(&powerpadsc[x][y]);
|
||||||
|
|
||||||
for(x=0; x<0x48; x++)
|
for(x=0; x<sizeof(fkbkeys); x++)
|
||||||
JoyClearBC(&fkbmap[x]);
|
JoyClearBC(&fkbmap[x]);
|
||||||
for(x=0; x<0x60; x++)
|
for(x=0; x<sizeof(suborkbkeys); x++)
|
||||||
JoyClearBC(&suborkbmap[x]);
|
JoyClearBC(&suborkbmap[x]);
|
||||||
|
|
||||||
for(x=0; x<6; x++)
|
for(x=0; x<6; x++)
|
||||||
|
@ -1062,7 +1065,7 @@ const unsigned int NUMBER_OF_NES_DEVICES = SI_COUNT + 1;
|
||||||
const static unsigned int NUMBER_OF_FAMICOM_DEVICES = SIFC_COUNT + 1;
|
const static unsigned int NUMBER_OF_FAMICOM_DEVICES = SIFC_COUNT + 1;
|
||||||
//these are unfortunate lists. they match the ESI and ESIFC enums
|
//these are unfortunate lists. they match the ESI and ESIFC enums
|
||||||
static const int configurable_nes[NUMBER_OF_NES_DEVICES]= { 0, 1, 0, 1, 1, 0 };
|
static const int configurable_nes[NUMBER_OF_NES_DEVICES]= { 0, 1, 0, 1, 1, 0 };
|
||||||
static const int configurable_fam[NUMBER_OF_FAMICOM_DEVICES]= { 0,0,0,0, 1,1,0,1, 1,1,1,0, 0,0 };
|
static const int configurable_fam[NUMBER_OF_FAMICOM_DEVICES]= { 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0 };
|
||||||
const unsigned int FAMICOM_POSITION = 2;
|
const unsigned int FAMICOM_POSITION = 2;
|
||||||
|
|
||||||
static void UpdateComboPad(HWND hwndDlg, WORD id)
|
static void UpdateComboPad(HWND hwndDlg, WORD id)
|
||||||
|
@ -1336,10 +1339,11 @@ BOOL CALLBACK InputConCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPara
|
||||||
DoTBConfig(hwndDlg, text, "POWERPADDIALOG", FTrainerButtons, 12);
|
DoTBConfig(hwndDlg, text, "POWERPADDIALOG", FTrainerButtons, 12);
|
||||||
break;
|
break;
|
||||||
case SIFC_FKB:
|
case SIFC_FKB:
|
||||||
DoTBConfig(hwndDlg, text, "FKBDIALOG", fkbmap, 0x48);
|
DoTBConfig(hwndDlg, text, "FKBDIALOG", fkbmap, sizeof(fkbkeys));
|
||||||
break;
|
break;
|
||||||
|
case SIFC_PEC586KB:
|
||||||
case SIFC_SUBORKB:
|
case SIFC_SUBORKB:
|
||||||
DoTBConfig(hwndDlg, text, "SUBORKBDIALOG", suborkbmap, 0x60);
|
DoTBConfig(hwndDlg, text, "SUBORKBDIALOG", suborkbmap, sizeof(suborkbkeys));
|
||||||
break;
|
break;
|
||||||
case SIFC_MAHJONG:
|
case SIFC_MAHJONG:
|
||||||
DoTBConfig(hwndDlg, text, "MAHJONGDIALOG", MahjongButtons, 21);
|
DoTBConfig(hwndDlg, text, "MAHJONGDIALOG", MahjongButtons, 21);
|
||||||
|
@ -1571,8 +1575,8 @@ int FCEUD_TestCommandState(int c)
|
||||||
|
|
||||||
void FCEUD_TurboOn (void)
|
void FCEUD_TurboOn (void)
|
||||||
{
|
{
|
||||||
tempwinsync = winsync; //Store winsync setting
|
tempwinsync = GetWindowedSyncModeIdx(); //Store wndSyncMode setting
|
||||||
winsync = 0; //turn off winsync for turbo (so that turbo can function even with VBlank sync methods
|
SetWindowedSyncModeIdx(SYNCMODE_NONE); //turn off wndSyncMode for turbo (so that turbo can function even with VBlank sync methods
|
||||||
tempsoundquality = soundquality; //Store sound quality settings
|
tempsoundquality = soundquality; //Store sound quality settings
|
||||||
FCEUI_SetSoundQuality(0); //Turn sound quality to low
|
FCEUI_SetSoundQuality(0); //Turn sound quality to low
|
||||||
turbo = true;
|
turbo = true;
|
||||||
|
@ -1580,7 +1584,7 @@ void FCEUD_TurboOn (void)
|
||||||
}
|
}
|
||||||
void FCEUD_TurboOff (void)
|
void FCEUD_TurboOff (void)
|
||||||
{
|
{
|
||||||
winsync = tempwinsync; //Restore winsync setting
|
SetWindowedSyncModeIdx(tempwinsync); //Restore wndSyncMode setting
|
||||||
soundquality = tempsoundquality; //Restore sound quality settings
|
soundquality = tempsoundquality; //Restore sound quality settings
|
||||||
FCEUI_SetSoundQuality(soundquality);
|
FCEUI_SetSoundQuality(soundquality);
|
||||||
turbo = false;
|
turbo = false;
|
||||||
|
@ -1589,15 +1593,15 @@ void FCEUD_TurboOff (void)
|
||||||
void FCEUD_TurboToggle(void)
|
void FCEUD_TurboToggle(void)
|
||||||
{
|
{
|
||||||
if (turbo) {
|
if (turbo) {
|
||||||
winsync = tempwinsync; //If turbo was on, restore winsync
|
SetWindowedSyncModeIdx(tempwinsync); //If turbo was on, restore wndSyncMode
|
||||||
soundquality = tempsoundquality; //and restore sound quality setting
|
soundquality = tempsoundquality; //and restore sound quality setting
|
||||||
FCEUI_SetSoundQuality(soundquality);
|
FCEUI_SetSoundQuality(soundquality);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
tempwinsync = winsync; //Store video sync settings
|
tempwinsync = GetWindowedSyncModeIdx(); //Store video sync settings
|
||||||
tempsoundquality = soundquality; //Store sound quality settings
|
tempsoundquality = soundquality; //Store sound quality settings
|
||||||
winsync = 0; //If turbo was off, turn off winsync (so that turbo can function even with VBlank sync methods
|
SetWindowedSyncModeIdx(SYNCMODE_NONE); //If turbo was off, turn off wndSyncMode (so that turbo can function even with VBlank sync methods
|
||||||
FCEUI_SetSoundQuality(0); //Set sound quality to low
|
FCEUI_SetSoundQuality(0); //Set sound quality to low
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ int InitDInput(void);
|
||||||
void CreateInputStuff(void);
|
void CreateInputStuff(void);
|
||||||
void InitInputStuff(void);
|
void InitInputStuff(void);
|
||||||
void DestroyInput(void);
|
void DestroyInput(void);
|
||||||
void InputScreenChanged(int fs);
|
void InputScreenChanged(int fs); // FIXME defined nowhere used nowhere
|
||||||
void SetAutoFireDesynch(int DesynchOn);
|
void SetAutoFireDesynch(int DesynchOn);
|
||||||
int GetAutoFireDesynch();
|
int GetAutoFireDesynch();
|
||||||
uint32 GetGamepadPressedImmediate();
|
uint32 GetGamepadPressedImmediate();
|
||||||
|
|
|
@ -43,6 +43,7 @@
|
||||||
#include "../../movie.h"
|
#include "../../movie.h"
|
||||||
#include "../../fceulua.h"
|
#include "../../fceulua.h"
|
||||||
|
|
||||||
|
#include "window.h"
|
||||||
#include "archive.h"
|
#include "archive.h"
|
||||||
#include "input.h"
|
#include "input.h"
|
||||||
#include "netplay.h"
|
#include "netplay.h"
|
||||||
|
@ -109,7 +110,6 @@ extern bool taseditorEnableAcceleratorKeys;
|
||||||
// External functions
|
// External functions
|
||||||
extern std::string cfgFile; //Contains the filename of the config file used.
|
extern std::string cfgFile; //Contains the filename of the config file used.
|
||||||
extern bool turbo; //Is game in turbo mode?
|
extern bool turbo; //Is game in turbo mode?
|
||||||
void ResetVideo(void);
|
|
||||||
void ShowCursorAbs(int w);
|
void ShowCursorAbs(int w);
|
||||||
void HideFWindow(int h);
|
void HideFWindow(int h);
|
||||||
void FixWXY(int pref, bool shift_held);
|
void FixWXY(int pref, bool shift_held);
|
||||||
|
@ -167,15 +167,12 @@ int ffbskip = 32; //Blit skips per blit when FF-ing
|
||||||
HINSTANCE fceu_hInstance;
|
HINSTANCE fceu_hInstance;
|
||||||
HACCEL fceu_hAccel;
|
HACCEL fceu_hAccel;
|
||||||
|
|
||||||
HRESULT ddrval;
|
|
||||||
|
|
||||||
static char TempArray[2048];
|
static char TempArray[2048];
|
||||||
|
|
||||||
static int exiting = 0;
|
static int exiting = 0;
|
||||||
static volatile int moocow = 0;
|
static volatile int moocow = 0;
|
||||||
|
|
||||||
int windowedfailed = 0;
|
int windowedfailed = 0;
|
||||||
int fullscreen = 0; //Windows files only, variable that keeps track of fullscreen status
|
|
||||||
|
|
||||||
static volatile int _userpause = 0; //mbg merge 7/18/06 changed tasbuild was using this only in a couple of places
|
static volatile int _userpause = 0; //mbg merge 7/18/06 changed tasbuild was using this only in a couple of places
|
||||||
|
|
||||||
|
@ -390,12 +387,12 @@ void FCEUD_PrintError(const char *errormsg)
|
||||||
{
|
{
|
||||||
AddLogText(errormsg, 1);
|
AddLogText(errormsg, 1);
|
||||||
|
|
||||||
if (fullscreen && (eoptions & EO_HIDEMOUSE))
|
if (GetIsFullscreen() && (eoptions & EO_HIDEMOUSE))
|
||||||
ShowCursorAbs(1);
|
ShowCursorAbs(1);
|
||||||
|
|
||||||
MessageBox(0, errormsg, FCEU_NAME" Error", MB_ICONERROR | MB_OK | MB_SETFOREGROUND | MB_TOPMOST);
|
MessageBox(0, errormsg, FCEU_NAME" Error", MB_ICONERROR | MB_OK | MB_SETFOREGROUND | MB_TOPMOST);
|
||||||
|
|
||||||
if (fullscreen && (eoptions & EO_HIDEMOUSE))
|
if (GetIsFullscreen() && (eoptions & EO_HIDEMOUSE))
|
||||||
ShowCursorAbs(0);
|
ShowCursorAbs(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -491,7 +488,7 @@ int DriverInitialize()
|
||||||
if(soundo)
|
if(soundo)
|
||||||
soundo = InitSound();
|
soundo = InitSound();
|
||||||
|
|
||||||
SetVideoMode(fullscreen);
|
InitVideoDriver();
|
||||||
InitInputStuff(); /* Initialize DInput interfaces. */
|
InitInputStuff(); /* Initialize DInput interfaces. */
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -506,7 +503,7 @@ static void DriverKill(void)
|
||||||
|
|
||||||
DestroyInput();
|
DestroyInput();
|
||||||
|
|
||||||
ResetVideo();
|
ShutdownVideoDriver();
|
||||||
|
|
||||||
if(soundo)
|
if(soundo)
|
||||||
{
|
{
|
||||||
|
@ -649,7 +646,6 @@ int main(int argc,char *argv[])
|
||||||
{
|
{
|
||||||
FCEUI_SetGameGenie(genie!=0);
|
FCEUI_SetGameGenie(genie!=0);
|
||||||
|
|
||||||
fullscreen = !!fullscreen;
|
|
||||||
soundo = !!soundo;
|
soundo = !!soundo;
|
||||||
frame_display = !!frame_display;
|
frame_display = !!frame_display;
|
||||||
allowUDLR = !!allowUDLR;
|
allowUDLR = !!allowUDLR;
|
||||||
|
@ -687,7 +683,7 @@ int main(int argc,char *argv[])
|
||||||
|
|
||||||
if(!t)
|
if(!t)
|
||||||
{
|
{
|
||||||
fullscreen=0;
|
SetIsFullscreen(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
CreateMainWindow();
|
CreateMainWindow();
|
||||||
|
@ -919,8 +915,10 @@ void FCEUD_Update(uint8 *XBuf, int32 *Buffer, int Count)
|
||||||
}
|
}
|
||||||
|
|
||||||
//blit the framebuffer
|
//blit the framebuffer
|
||||||
if(XBuf)
|
if(XBuf) {
|
||||||
|
xbsave = XBuf;
|
||||||
FCEUD_BlitScreen(XBuf);
|
FCEUD_BlitScreen(XBuf);
|
||||||
|
}
|
||||||
|
|
||||||
//update debugging displays
|
//update debugging displays
|
||||||
_updateWindow();
|
_updateWindow();
|
||||||
|
|
|
@ -34,7 +34,6 @@ extern int maxconbskip;
|
||||||
extern int ffbskip;
|
extern int ffbskip;
|
||||||
extern void LoadNewGamey(HWND hParent, const char *initialdir);
|
extern void LoadNewGamey(HWND hParent, const char *initialdir);
|
||||||
extern void CloseGame();
|
extern void CloseGame();
|
||||||
extern int fullscreen; //Windows files only, keeps track of fullscreen status
|
|
||||||
|
|
||||||
// Flag that indicates whether Game Genie is enabled or not.
|
// Flag that indicates whether Game Genie is enabled or not.
|
||||||
extern int genie;
|
extern int genie;
|
||||||
|
@ -55,8 +54,6 @@ extern int AFon;
|
||||||
extern int AFoff;
|
extern int AFoff;
|
||||||
extern int AutoFireOffset;
|
extern int AutoFireOffset;
|
||||||
|
|
||||||
extern int vmod;
|
|
||||||
|
|
||||||
extern char* directory_names[14];
|
extern char* directory_names[14];
|
||||||
|
|
||||||
char *GetRomName(); //Checks if rom is loaded, if so, outputs the Rom name with no directory path or file extension
|
char *GetRomName(); //Checks if rom is loaded, if so, outputs the Rom name with no directory path or file extension
|
||||||
|
@ -123,13 +120,13 @@ extern int soundo;
|
||||||
extern int eoptions;
|
extern int eoptions;
|
||||||
extern int soundoptions;
|
extern int soundoptions;
|
||||||
extern uint8 *xbsave;
|
extern uint8 *xbsave;
|
||||||
extern HRESULT ddrval;
|
|
||||||
extern int windowedfailed;
|
extern int windowedfailed;
|
||||||
extern uint32 goptions;
|
extern uint32 goptions;
|
||||||
|
|
||||||
void DoFCEUExit();
|
void DoFCEUExit();
|
||||||
void ShowAboutBox();
|
void ShowAboutBox();
|
||||||
int BlockingCheck();
|
int BlockingCheck();
|
||||||
|
void UpdateRendBounds(void);
|
||||||
void DoPriority();
|
void DoPriority();
|
||||||
void RemoveDirs();
|
void RemoveDirs();
|
||||||
void CreateDirs();
|
void CreateDirs();
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
#undef APSTUDIO_READONLY_SYMBOLS
|
#undef APSTUDIO_READONLY_SYMBOLS
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Íåéòðàëüíûé resources
|
// Neutral resources
|
||||||
|
|
||||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEU)
|
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEU)
|
||||||
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
|
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
|
||||||
|
@ -950,6 +950,117 @@ BEGIN
|
||||||
LTEXT "",ID_SOUND_QUALITYNOTIFY,170,133,144,8
|
LTEXT "",ID_SOUND_QUALITYNOTIFY,170,133,144,8
|
||||||
END
|
END
|
||||||
|
|
||||||
|
SUBORKBDIALOG DIALOGEX 13, 72, 478, 171
|
||||||
|
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||||
|
CAPTION "Subor Keyboard Configuration"
|
||||||
|
FONT 8, "MS Sans Serif", 0, 0, 0x0
|
||||||
|
BEGIN
|
||||||
|
DEFPUSHBUTTON "Close",1,405,151,56,14
|
||||||
|
LTEXT "Remember to push the ""Scroll Lock"" key during emulation to enable Keyboard input.",-1,18,6,370,12
|
||||||
|
GROUPBOX "",-1,9,22,461,123,WS_GROUP
|
||||||
|
PUSHBUTTON "Esc",300,20,36,16,12
|
||||||
|
PUSHBUTTON "F1",301,58,37,16,12
|
||||||
|
PUSHBUTTON "F2",302,78,37,16,12
|
||||||
|
PUSHBUTTON "F3",303,98,37,16,12
|
||||||
|
PUSHBUTTON "F4",304,118,37,16,12
|
||||||
|
PUSHBUTTON "F5",305,143,37,16,12
|
||||||
|
PUSHBUTTON "F6",306,163,37,16,12
|
||||||
|
PUSHBUTTON "F7",307,183,37,16,12
|
||||||
|
PUSHBUTTON "F8",308,203,37,16,12
|
||||||
|
PUSHBUTTON "F9",309,229,37,16,12
|
||||||
|
PUSHBUTTON "F10",310,249,37,16,12
|
||||||
|
PUSHBUTTON "F11",311,268,37,16,12
|
||||||
|
PUSHBUTTON "F12",312,288,37,16,12
|
||||||
|
PUSHBUTTON "Pause",313,318,36,16,12
|
||||||
|
PUSHBUTTON "`",314,20,60,16,12
|
||||||
|
PUSHBUTTON "1",315,39,60,16,12
|
||||||
|
PUSHBUTTON "2",316,58,60,16,12
|
||||||
|
PUSHBUTTON "3",317,77,60,16,12
|
||||||
|
PUSHBUTTON "4",318,96,60,16,12
|
||||||
|
PUSHBUTTON "5",319,115,60,16,12
|
||||||
|
PUSHBUTTON "6",320,134,60,16,12
|
||||||
|
PUSHBUTTON "7",321,153,60,16,12
|
||||||
|
PUSHBUTTON "8",322,172,60,16,12
|
||||||
|
PUSHBUTTON "9",323,191,60,16,12
|
||||||
|
PUSHBUTTON "0",324,210,60,16,12
|
||||||
|
PUSHBUTTON "-",325,229,60,16,12
|
||||||
|
PUSHBUTTON "=",326,248,60,16,12
|
||||||
|
PUSHBUTTON "BS",327,286,60,16,12
|
||||||
|
PUSHBUTTON "Ins",328,318,59,16,12
|
||||||
|
PUSHBUTTON "Home",329,337,59,16,12
|
||||||
|
PUSHBUTTON "NL",330,385,59,16,12
|
||||||
|
PUSHBUTTON "/",331,405,59,16,12
|
||||||
|
PUSHBUTTON "*",332,425,59,16,12
|
||||||
|
PUSHBUTTON "-",333,444,59,16,12
|
||||||
|
PUSHBUTTON "PUp",334,357,59,16,12
|
||||||
|
PUSHBUTTON "TAB",335,20,76,24,12
|
||||||
|
PUSHBUTTON "Q",336,47,76,16,12
|
||||||
|
PUSHBUTTON "W",337,66,76,16,12
|
||||||
|
PUSHBUTTON "E",338,85,76,16,12
|
||||||
|
PUSHBUTTON "R",339,104,76,16,12
|
||||||
|
PUSHBUTTON "T",340,123,76,16,12
|
||||||
|
PUSHBUTTON "Y",341,142,76,16,12
|
||||||
|
PUSHBUTTON "U",342,161,76,16,12
|
||||||
|
PUSHBUTTON "I",343,180,76,16,12
|
||||||
|
PUSHBUTTON "O",344,199,76,16,12
|
||||||
|
PUSHBUTTON "P",345,218,76,16,12
|
||||||
|
PUSHBUTTON "[",346,237,76,16,12
|
||||||
|
PUSHBUTTON "]",347,256,76,16,12
|
||||||
|
PUSHBUTTON "Enter",348,274,76,28,29
|
||||||
|
PUSHBUTTON "Del",349,318,75,16,12
|
||||||
|
PUSHBUTTON "End",350,338,75,16,12
|
||||||
|
PUSHBUTTON "PDn",351,357,75,16,12
|
||||||
|
PUSHBUTTON "7",352,385,75,16,12
|
||||||
|
PUSHBUTTON "8",353,405,75,16,12
|
||||||
|
PUSHBUTTON "9",354,425,75,16,12
|
||||||
|
PUSHBUTTON "+",355,444,75,16,28
|
||||||
|
PUSHBUTTON "CL",356,20,92,27,12
|
||||||
|
PUSHBUTTON "A",357,52,92,16,12
|
||||||
|
PUSHBUTTON "S",358,71,92,16,12
|
||||||
|
PUSHBUTTON "D",359,90,92,16,12
|
||||||
|
PUSHBUTTON "F",360,109,92,16,12
|
||||||
|
PUSHBUTTON "G",361,128,92,16,12
|
||||||
|
PUSHBUTTON "H",362,147,92,16,12
|
||||||
|
PUSHBUTTON "J",363,166,92,16,12
|
||||||
|
PUSHBUTTON "K",364,185,92,16,12
|
||||||
|
PUSHBUTTON "L",365,204,92,16,12
|
||||||
|
PUSHBUTTON ";",366,223,92,16,12
|
||||||
|
PUSHBUTTON "'",367,242,92,16,12
|
||||||
|
PUSHBUTTON "4",368,385,91,16,12
|
||||||
|
PUSHBUTTON "5",369,405,91,16,12
|
||||||
|
PUSHBUTTON "6",370,425,91,16,12
|
||||||
|
PUSHBUTTON "SHIFT",371,20,108,37,12
|
||||||
|
PUSHBUTTON "Z",372,62,108,16,12
|
||||||
|
PUSHBUTTON "X",373,81,108,16,12
|
||||||
|
PUSHBUTTON "C",374,100,108,16,12
|
||||||
|
PUSHBUTTON "V",375,119,108,16,12
|
||||||
|
PUSHBUTTON "B",376,138,108,16,12
|
||||||
|
PUSHBUTTON "N",377,157,108,16,12
|
||||||
|
PUSHBUTTON "M",378,176,108,16,12
|
||||||
|
PUSHBUTTON ",",379,195,108,16,12
|
||||||
|
PUSHBUTTON ".",380,214,108,16,12
|
||||||
|
PUSHBUTTON "/",381,233,108,16,12
|
||||||
|
PUSHBUTTON "\\",382,267,60,16,12
|
||||||
|
PUSHBUTTON "Up",383,337,108,16,12
|
||||||
|
PUSHBUTTON "1",384,385,107,16,12
|
||||||
|
PUSHBUTTON "2",385,405,107,16,12
|
||||||
|
PUSHBUTTON "3",386,425,107,16,12
|
||||||
|
PUSHBUTTON "CTRL",387,20,123,28,12
|
||||||
|
PUSHBUTTON "ALT",388,66,123,27,12
|
||||||
|
PUSHBUTTON "SPACE",389,96,123,130,12
|
||||||
|
PUSHBUTTON "Left",390,318,123,16,12
|
||||||
|
PUSHBUTTON "Dn",391,337,123,16,12
|
||||||
|
PUSHBUTTON "Right",392,357,123,16,12
|
||||||
|
PUSHBUTTON "0",393,386,123,35,12
|
||||||
|
PUSHBUTTON ".",394,425,123,16,12
|
||||||
|
PUSHBUTTON "SHIFT",395,254,108,48,12
|
||||||
|
PUSHBUTTON "ALT",396,229,123,29,12
|
||||||
|
PUSHBUTTON "CTRL",397,274,123,28,12
|
||||||
|
PUSHBUTTON "Break",398,337,36,16,12
|
||||||
|
PUSHBUTTON "Reset",399,357,36,16,12
|
||||||
|
PUSHBUTTON "Enter",400,444,107,16,28
|
||||||
|
END
|
||||||
|
|
||||||
TIMINGCONFIG DIALOGEX 23, 157, 203, 60
|
TIMINGCONFIG DIALOGEX 23, 157, 203, 60
|
||||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||||
CAPTION "Timing Configuration"
|
CAPTION "Timing Configuration"
|
||||||
|
@ -1986,6 +2097,10 @@ BEGIN
|
||||||
BOTTOMMARGIN, 274
|
BOTTOMMARGIN, 274
|
||||||
END
|
END
|
||||||
|
|
||||||
|
"SUBORKBDIALOG", DIALOG
|
||||||
|
BEGIN
|
||||||
|
END
|
||||||
|
|
||||||
"TIMINGCONFIG", DIALOG
|
"TIMINGCONFIG", DIALOG
|
||||||
BEGIN
|
BEGIN
|
||||||
LEFTMARGIN, 10
|
LEFTMARGIN, 10
|
||||||
|
@ -2152,12 +2267,12 @@ BEGIN
|
||||||
END
|
END
|
||||||
#endif // APSTUDIO_INVOKED
|
#endif // APSTUDIO_INVOKED
|
||||||
|
|
||||||
#endif // Íåéòðàëüíûé resources
|
#endif // Neutral resources
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Ðóññêèé (Ðîññèÿ) resources
|
// Russian (Russia) resources
|
||||||
|
|
||||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_RUS)
|
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_RUS)
|
||||||
LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT
|
LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT
|
||||||
|
@ -2232,12 +2347,12 @@ BEGIN
|
||||||
END
|
END
|
||||||
#endif // APSTUDIO_INVOKED
|
#endif // APSTUDIO_INVOKED
|
||||||
|
|
||||||
#endif // Ðóññêèé (Ðîññèÿ) resources
|
#endif // Russian (Russia) resources
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Àíãëèéñêèé (ÑØÀ) resources
|
// English (United States) resources
|
||||||
|
|
||||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
||||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||||
|
@ -2471,7 +2586,7 @@ IDB_BITMAP_SELECTED17 BITMAP "res\\te_17_selected.bmp"
|
||||||
IDB_BITMAP_SELECTED18 BITMAP "res\\te_18_selected.bmp"
|
IDB_BITMAP_SELECTED18 BITMAP "res\\te_18_selected.bmp"
|
||||||
IDB_BITMAP_SELECTED19 BITMAP "res\\te_19_selected.bmp"
|
IDB_BITMAP_SELECTED19 BITMAP "res\\te_19_selected.bmp"
|
||||||
IDB_BRANCH_SPRITESHEET BITMAP "res\\branch_spritesheet.bmp"
|
IDB_BRANCH_SPRITESHEET BITMAP "res\\branch_spritesheet.bmp"
|
||||||
#endif // Àíãëèéñêèé (ÑØÀ) resources
|
#endif // English (United States) resources
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,7 @@ Main - Main gate between emulator and Taseditor
|
||||||
#include "main.h" // for GetRomName
|
#include "main.h" // for GetRomName
|
||||||
#include "taseditor.h"
|
#include "taseditor.h"
|
||||||
#include "window.h"
|
#include "window.h"
|
||||||
|
#include "video.h"
|
||||||
#include "../../input.h"
|
#include "../../input.h"
|
||||||
#include "../keyboard.h"
|
#include "../keyboard.h"
|
||||||
#include "../joystick.h"
|
#include "../joystick.h"
|
||||||
|
@ -56,7 +57,6 @@ extern int joysticksPerFrame[INPUT_TYPES_TOTAL];
|
||||||
extern bool turbo;
|
extern bool turbo;
|
||||||
extern int pal_emulation;
|
extern int pal_emulation;
|
||||||
extern int newppu;
|
extern int newppu;
|
||||||
extern void PushCurrentVideoSettings();
|
|
||||||
extern void RefreshThrottleFPS();
|
extern void RefreshThrottleFPS();
|
||||||
extern bool LoadFM2(MovieData& movieData, EMUFILE* fp, int size, bool stopAfterHeader);
|
extern bool LoadFM2(MovieData& movieData, EMUFILE* fp, int size, bool stopAfterHeader);
|
||||||
// temporarily saved FCEUX config
|
// temporarily saved FCEUX config
|
||||||
|
@ -883,7 +883,6 @@ void applyMovieInputConfig()
|
||||||
pal_emulation = currMovieData.palFlag;
|
pal_emulation = currMovieData.palFlag;
|
||||||
FCEUI_SetVidSystem(pal_emulation);
|
FCEUI_SetVidSystem(pal_emulation);
|
||||||
RefreshThrottleFPS();
|
RefreshThrottleFPS();
|
||||||
PushCurrentVideoSettings();
|
|
||||||
// update PPU type
|
// update PPU type
|
||||||
newppu = currMovieData.PPUflag;
|
newppu = currMovieData.PPUflag;
|
||||||
SetMainWindowText();
|
SetMainWindowText();
|
||||||
|
|
|
@ -19,6 +19,8 @@ Popup display - Manager of popup windows
|
||||||
#include "taseditor_project.h"
|
#include "taseditor_project.h"
|
||||||
#include "zlib.h"
|
#include "zlib.h"
|
||||||
|
|
||||||
|
#include "drivers/win/video.h"
|
||||||
|
|
||||||
extern TASEDITOR_CONFIG taseditorConfig;
|
extern TASEDITOR_CONFIG taseditorConfig;
|
||||||
extern TASEDITOR_WINDOW taseditorWindow;
|
extern TASEDITOR_WINDOW taseditorWindow;
|
||||||
extern BOOKMARKS bookmarks;
|
extern BOOKMARKS bookmarks;
|
||||||
|
@ -91,7 +93,7 @@ void POPUP_DISPLAY::init()
|
||||||
{
|
{
|
||||||
free();
|
free();
|
||||||
// fill scr_bmp palette with current palette colors
|
// fill scr_bmp palette with current palette colors
|
||||||
extern PALETTEENTRY *color_palette;
|
PALETTEENTRY* color_palette = GetPalette();
|
||||||
for (int i = 0; i < 256; ++i)
|
for (int i = 0; i < 256; ++i)
|
||||||
{
|
{
|
||||||
screenshotBmi->bmiColors[i].rgbRed = color_palette[i].peRed;
|
screenshotBmi->bmiColors[i].rgbRed = color_palette[i].peRed;
|
||||||
|
|
|
@ -46,7 +46,6 @@
|
||||||
char *textToTrans; // buffer to hold the text that needs translating
|
char *textToTrans; // buffer to hold the text that needs translating
|
||||||
char *transText; //holds the translated text
|
char *transText; //holds the translated text
|
||||||
|
|
||||||
extern void FCEUD_BlitScreen(uint8 *XBuf); //needed for pause, not sure where this is defined...
|
|
||||||
//adelikat merge 7/1/08 - had to add these extern variables
|
//adelikat merge 7/1/08 - had to add these extern variables
|
||||||
//------------------------------
|
//------------------------------
|
||||||
extern uint8 PALRAM[0x20];
|
extern uint8 PALRAM[0x20];
|
||||||
|
|
|
@ -48,8 +48,8 @@ using namespace std;
|
||||||
|
|
||||||
#include "debuggersp.h"
|
#include "debuggersp.h"
|
||||||
|
|
||||||
extern Name* lastBankNames;
|
extern Name* pageNames[32];
|
||||||
extern Name* loadedBankNames;
|
extern int pageNumbersLoaded[32];
|
||||||
extern Name* ramBankNames;
|
extern Name* ramBankNames;
|
||||||
|
|
||||||
// ################################## End of SP CODE ###########################
|
// ################################## End of SP CODE ###########################
|
||||||
|
@ -840,8 +840,8 @@ void FCEUD_TraceInstruction(uint8 *opcode, int size)
|
||||||
}
|
}
|
||||||
|
|
||||||
replaceNames(ramBankNames, a, &tempAddressesLog);
|
replaceNames(ramBankNames, a, &tempAddressesLog);
|
||||||
replaceNames(loadedBankNames, a, &tempAddressesLog);
|
for(int i=0;i<ARRAY_SIZE(pageNames);i++)
|
||||||
replaceNames(lastBankNames, a, &tempAddressesLog);
|
replaceNames(pageNames[i], a, &tempAddressesLog);
|
||||||
}
|
}
|
||||||
strncpy(str_disassembly, a, LOG_DISASSEMBLY_MAX_LEN);
|
strncpy(str_disassembly, a, LOG_DISASSEMBLY_MAX_LEN);
|
||||||
str_disassembly[LOG_DISASSEMBLY_MAX_LEN - 1] = 0;
|
str_disassembly[LOG_DISASSEMBLY_MAX_LEN - 1] = 0;
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,71 +1,96 @@
|
||||||
#ifndef WIN_VIDEO_H
|
#ifndef WIN_VIDEO_H
|
||||||
#define WIN_VIDEO_H
|
#define WIN_VIDEO_H
|
||||||
|
|
||||||
#include "common.h"
|
#include <Windows.h>
|
||||||
|
#include "types.h"
|
||||||
|
|
||||||
// I like hacks.
|
typedef enum
|
||||||
#define uint8 __UNO492032
|
|
||||||
#include <winsock.h>
|
|
||||||
#include "ddraw.h"
|
|
||||||
#undef LPCWAVEFORMATEX
|
|
||||||
#include "dsound.h"
|
|
||||||
#include "dinput.h"
|
|
||||||
#include <commctrl.h>
|
|
||||||
#include <shlobj.h> // For directories configuration dialog.
|
|
||||||
#undef uint8
|
|
||||||
|
|
||||||
#include "main.h"
|
|
||||||
#include "window.h"
|
|
||||||
|
|
||||||
enum DIRECTDRAW_MODES
|
|
||||||
{
|
{
|
||||||
DIRECTDRAW_MODE_SOFTWARE,
|
DIRECTDRAW_MODE_SOFTWARE = 0, // all features are emulated in software
|
||||||
DIRECTDRAW_MODE_SURFACE_IN_RAM,
|
DIRECTDRAW_MODE_SURFACE_IN_RAM, // place offscreen surface in RAM rather than in VRAM; may or may not use hardware acceleration
|
||||||
DIRECTDRAW_MODE_FULL,
|
DIRECTDRAW_MODE_FULL, // use available hardware features, emulate the rest
|
||||||
// ...
|
// ...
|
||||||
DIRECTDRAW_MODES_TOTAL
|
DIRECTDRAW_MODES_TOTAL
|
||||||
};
|
} DIRECTDRAW_MODE;
|
||||||
|
|
||||||
#define VF_DDSTRETCHED 1
|
#define VIDEOMODEFLAG_DXBLT 1
|
||||||
|
#define VIDEOMODEFLAG_STRFS 2
|
||||||
|
|
||||||
#define VEF_LOSTSURFACE 1
|
typedef enum
|
||||||
#define VEF____INTERNAL 2
|
{
|
||||||
|
FILTER_NONE = 0,
|
||||||
#define VMDF_DXBLT 1
|
FILTER_HQ2X,
|
||||||
#define VMDF_STRFS 2
|
FILTER_SCALE2X,
|
||||||
|
FILTER_NTSC2X,
|
||||||
|
FILTER_HQ3X,
|
||||||
|
FILTER_SCALE3X
|
||||||
|
} VFILTER;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int x;
|
int width;
|
||||||
int y;
|
int height;
|
||||||
int bpp;
|
int bpp;
|
||||||
int flags;
|
int flags;
|
||||||
int xscale;
|
int xscale;
|
||||||
int yscale;
|
int yscale;
|
||||||
RECT srect;
|
RECT srcRect;
|
||||||
RECT drect;
|
RECT dstRect;
|
||||||
int special;
|
VFILTER filter;
|
||||||
} vmdef;
|
} VideoMode;
|
||||||
|
|
||||||
// left, top, right, bottom
|
typedef enum {
|
||||||
extern vmdef vmodes[11];
|
SYNCMODE_NONE = 0,
|
||||||
extern int winspecial;
|
SYNCMODE_WAIT,
|
||||||
extern int NTSCwinspecial;
|
SYNCMODE_LAZYWAIT,
|
||||||
|
SYNCMODE_DOUBLEBUF
|
||||||
|
} VSYNCMODE;
|
||||||
|
|
||||||
extern int directDrawModeWindowed;
|
void InitVideoDriver(void);
|
||||||
extern int directDrawModeFullscreen;
|
void ShutdownVideoDriver();
|
||||||
|
|
||||||
extern int fssync;
|
// Recalculate blit rectangle within window of given size
|
||||||
extern int winsync;
|
void OnWindowSizeChange(int width, int height);
|
||||||
|
|
||||||
void SetFSVideoMode();
|
// Get current blit rectangle
|
||||||
void FCEUD_BlitScreen(uint8 *XBuf);
|
RECT GetActiveRect(void);
|
||||||
void ConfigVideo();
|
|
||||||
void recalculateBestFitRect(int width, int height);
|
// Get driver palette
|
||||||
int SetVideoMode(int fs);
|
PALETTEENTRY* GetPalette(void);
|
||||||
|
|
||||||
|
// Returns true when in fullscreen mode, false when in windowed
|
||||||
|
bool GetIsFullscreen(void);
|
||||||
|
|
||||||
|
// Set fullscreen mode flag
|
||||||
|
// FCEUD_VideoChanged() must be called in order to make value take effect
|
||||||
|
void SetIsFullscreen(bool f);
|
||||||
|
|
||||||
|
VSYNCMODE GetWindowedSyncModeIdx(void);
|
||||||
|
void SetWindowedSyncModeIdx(VSYNCMODE idx);
|
||||||
|
|
||||||
|
|
||||||
|
// Bring up the Video configuration dialog
|
||||||
|
void ShowConfigVideoDialog();
|
||||||
|
|
||||||
|
// (Re)apply render lines and sprite limitation to FCE
|
||||||
void DoVideoConfigFix();
|
void DoVideoConfigFix();
|
||||||
|
|
||||||
|
|
||||||
|
// Implements FCEUD requirements
|
||||||
|
bool FCEUD_ShouldDrawInputAids(void);
|
||||||
void FCEUD_BlitScreen(uint8 *XBuf);
|
void FCEUD_BlitScreen(uint8 *XBuf);
|
||||||
void ResetVideo();
|
void FCEUD_VideoChanged(void); // this one should be declared here
|
||||||
void SetFSVideoMode();
|
void FCEUD_SetPalette(unsigned char index, unsigned char r, unsigned char g, unsigned char b);
|
||||||
void PushCurrentVideoSettings();
|
void FCEUD_GetPalette(unsigned char i, unsigned char *r, unsigned char *g, unsigned char *b);
|
||||||
void ResetCustomMode();
|
|
||||||
|
|
||||||
|
// see win/config.h
|
||||||
|
bool& _FIXME_getFullscreenVar(void);
|
||||||
|
int& _FIXME_getVModeIdxVar(void);
|
||||||
|
VSYNCMODE& _FIXME_getFullscreenSyncModeIdxVar(void);
|
||||||
|
VSYNCMODE& _FIXME_getWindowedSyncModeIdxVar(void);
|
||||||
|
VFILTER& _FIXME_getFilterModeWindowedIdxVar(void);
|
||||||
|
int& _FIXME_getFilterOptionVar(void);
|
||||||
|
DIRECTDRAW_MODE& _FIXME_getDDrawModeWindowedVar(void);
|
||||||
|
DIRECTDRAW_MODE& _FIXME_getDDrawModeFullscreenVar(void);
|
||||||
|
VideoMode& _FIXME_getCustomVideoModeVar(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -83,8 +83,6 @@ extern PLAYBACK playback;
|
||||||
#include "Win32InputBox.h"
|
#include "Win32InputBox.h"
|
||||||
extern int32 fps_scale_unpaused;
|
extern int32 fps_scale_unpaused;
|
||||||
|
|
||||||
//extern void ToggleFullscreen();
|
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
//----Context Menu - Some dynamically added menu items
|
//----Context Menu - Some dynamically added menu items
|
||||||
|
@ -995,7 +993,7 @@ void HideFWindow(int h)
|
||||||
//Toggles the display status of the main menu.
|
//Toggles the display status of the main menu.
|
||||||
void ToggleHideMenu(void)
|
void ToggleHideMenu(void)
|
||||||
{
|
{
|
||||||
if(!fullscreen && !nofocus && (GameInfo || tog))
|
if(!GetIsFullscreen() && !nofocus && (GameInfo || tog))
|
||||||
{
|
{
|
||||||
tog ^= 1;
|
tog ^= 1;
|
||||||
HideMenu(tog);
|
HideMenu(tog);
|
||||||
|
@ -1034,7 +1032,7 @@ bool ALoad(const char *nameo, char* innerFilename, bool silent)
|
||||||
|
|
||||||
UpdateCheckedMenuItems();
|
UpdateCheckedMenuItems();
|
||||||
|
|
||||||
PushCurrentVideoSettings();
|
FCEUD_VideoChanged();
|
||||||
|
|
||||||
std::string recentFileName = nameo;
|
std::string recentFileName = nameo;
|
||||||
if(GameInfo->archiveFilename && GameInfo->archiveCount>1)
|
if(GameInfo->archiveFilename && GameInfo->archiveCount>1)
|
||||||
|
@ -1053,7 +1051,10 @@ bool ALoad(const char *nameo, char* innerFilename, bool silent)
|
||||||
|
|
||||||
if(eoptions & EO_FSAFTERLOAD)
|
if(eoptions & EO_FSAFTERLOAD)
|
||||||
{
|
{
|
||||||
SetFSVideoMode();
|
changerecursive=1;
|
||||||
|
SetIsFullscreen(true);
|
||||||
|
FCEUD_VideoChanged();
|
||||||
|
changerecursive=0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1119,7 +1120,7 @@ void LoadNewGamey(HWND hParent, const char *initialdir)
|
||||||
|
|
||||||
void GetMouseData(uint32 (&md)[3])
|
void GetMouseData(uint32 (&md)[3])
|
||||||
{
|
{
|
||||||
extern RECT bestfitRect;
|
RECT bestfitRect = GetActiveRect();
|
||||||
|
|
||||||
double screen_width = VNSWID;
|
double screen_width = VNSWID;
|
||||||
double screen_height = FSettings.TotalScanlines();
|
double screen_height = FSettings.TotalScanlines();
|
||||||
|
@ -1271,8 +1272,10 @@ LRESULT FAR PASCAL AppWndProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam)
|
||||||
{
|
{
|
||||||
if (fullscreenByDoubleclick)
|
if (fullscreenByDoubleclick)
|
||||||
{
|
{
|
||||||
extern void ToggleFullscreen();
|
changerecursive=1;
|
||||||
ToggleFullscreen();
|
SetIsFullscreen(!GetIsFullscreen());
|
||||||
|
FCEUD_VideoChanged();
|
||||||
|
changerecursive=0;
|
||||||
return 0;
|
return 0;
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
|
@ -1379,7 +1382,7 @@ LRESULT FAR PASCAL AppWndProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam)
|
||||||
goto proco;
|
goto proco;
|
||||||
|
|
||||||
case WM_SIZE:
|
case WM_SIZE:
|
||||||
if (!fullscreen && !changerecursive && !windowedfailed)
|
if (!GetIsFullscreen() && !changerecursive && !windowedfailed)
|
||||||
{
|
{
|
||||||
switch(wParam)
|
switch(wParam)
|
||||||
{
|
{
|
||||||
|
@ -1439,7 +1442,7 @@ LRESULT FAR PASCAL AppWndProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam)
|
||||||
//break;
|
//break;
|
||||||
goto proco;
|
goto proco;
|
||||||
case WM_DISPLAYCHANGE:
|
case WM_DISPLAYCHANGE:
|
||||||
if(!fullscreen && !changerecursive)
|
if(!GetIsFullscreen() && !changerecursive)
|
||||||
vchanged=1;
|
vchanged=1;
|
||||||
goto proco;
|
goto proco;
|
||||||
case WM_DROPFILES:
|
case WM_DROPFILES:
|
||||||
|
@ -1970,7 +1973,7 @@ LRESULT FAR PASCAL AppWndProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam)
|
||||||
FCEUI_SetVidSystem(pal_emulation);
|
FCEUI_SetVidSystem(pal_emulation);
|
||||||
RefreshThrottleFPS();
|
RefreshThrottleFPS();
|
||||||
UpdateCheckedMenuItems();
|
UpdateCheckedMenuItems();
|
||||||
PushCurrentVideoSettings();
|
FCEUD_VideoChanged();
|
||||||
break;
|
break;
|
||||||
case MENU_DIRECTORIES:
|
case MENU_DIRECTORIES:
|
||||||
ConfigDirectories();
|
ConfigDirectories();
|
||||||
|
@ -1994,7 +1997,7 @@ LRESULT FAR PASCAL AppWndProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam)
|
||||||
ConfigTiming();
|
ConfigTiming();
|
||||||
break;
|
break;
|
||||||
case MENU_VIDEO:
|
case MENU_VIDEO:
|
||||||
ConfigVideo();
|
ShowConfigVideoDialog();
|
||||||
break;
|
break;
|
||||||
case MENU_HOTKEYS:
|
case MENU_HOTKEYS:
|
||||||
MapInput();
|
MapInput();
|
||||||
|
@ -2290,16 +2293,16 @@ LRESULT FAR PASCAL AppWndProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam)
|
||||||
|
|
||||||
if(wParam==SC_KEYMENU)
|
if(wParam==SC_KEYMENU)
|
||||||
{
|
{
|
||||||
if(GameInfo && ((InputType[2]==SIFC_FKB) || (InputType[2]==SIFC_SUBORKB)) && cidisabled)
|
if(GameInfo && ((InputType[2]==SIFC_FKB) || (InputType[2]==SIFC_SUBORKB) || (InputType[2]==SIFC_PEC586KB)) && cidisabled)
|
||||||
break;
|
break;
|
||||||
if(lParam == VK_RETURN || fullscreen || tog) break;
|
if(lParam == VK_RETURN || GetIsFullscreen() || tog) break;
|
||||||
}
|
}
|
||||||
goto proco;
|
goto proco;
|
||||||
case WM_SYSKEYDOWN:
|
case WM_SYSKEYDOWN:
|
||||||
if(GameInfo && ((InputType[2]==SIFC_FKB) || (InputType[2]==SIFC_SUBORKB)) && cidisabled)
|
if(GameInfo && ((InputType[2]==SIFC_FKB) || (InputType[2]==SIFC_SUBORKB) || (InputType[2]==SIFC_PEC586KB)) && cidisabled)
|
||||||
break; // Hopefully this won't break DInput...
|
break; // Hopefully this won't break DInput...
|
||||||
|
|
||||||
if(fullscreen || tog)
|
if(GetIsFullscreen() || tog)
|
||||||
{
|
{
|
||||||
if(wParam==VK_MENU)
|
if(wParam==VK_MENU)
|
||||||
break;
|
break;
|
||||||
|
@ -2328,26 +2331,16 @@ adelikat: Outsourced this to a remappable hotkey
|
||||||
if(GameInfo)
|
if(GameInfo)
|
||||||
{
|
{
|
||||||
//Only disable command keys if a game is loaded(and the other conditions are right, of course).
|
//Only disable command keys if a game is loaded(and the other conditions are right, of course).
|
||||||
if(InputType[2]==SIFC_FKB)
|
if((InputType[2]==SIFC_FKB) || (InputType[2]==SIFC_SUBORKB) || (InputType[2]==SIFC_PEC586KB))
|
||||||
{
|
{
|
||||||
if(wParam==VK_SCROLL)
|
if(wParam==VK_SCROLL)
|
||||||
{
|
{
|
||||||
cidisabled^=1;
|
cidisabled^=1;
|
||||||
FCEUI_DispMessage("Family Keyboard %sabled.",0,cidisabled?"en":"dis");
|
FCEUI_DispMessage("%s Keyboard %sabled.",0,InputType[2]==SIFC_FKB?"Family":(InputType[2]==SIFC_SUBORKB?"Subor":"PEC586"),cidisabled?"en":"dis");
|
||||||
}
|
}
|
||||||
if(cidisabled)
|
if(cidisabled)
|
||||||
break; // Hopefully this won't break DInput...
|
break; // Hopefully this won't break DInput...
|
||||||
}
|
}
|
||||||
if(InputType[2]==SIFC_SUBORKB)
|
|
||||||
{
|
|
||||||
if(wParam==VK_SCROLL)
|
|
||||||
{
|
|
||||||
cidisabled^=1;
|
|
||||||
FCEUI_DispMessage("Subor Keyboard %sabled.",0,cidisabled?"en":"dis");
|
|
||||||
}
|
|
||||||
if(cidisabled)
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
goto proco;
|
goto proco;
|
||||||
|
|
||||||
|
@ -2472,9 +2465,10 @@ void FixWXY(int pref, bool shift_held)
|
||||||
|
|
||||||
void UpdateFCEUWindow(void)
|
void UpdateFCEUWindow(void)
|
||||||
{
|
{
|
||||||
if(vchanged && !fullscreen && !changerecursive && !nofocus)
|
if(vchanged && !GetIsFullscreen() && !changerecursive && !nofocus)
|
||||||
{
|
{
|
||||||
SetVideoMode(0);
|
SetIsFullscreen(false);
|
||||||
|
FCEUD_VideoChanged();
|
||||||
vchanged = 0;
|
vchanged = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2615,11 +2609,13 @@ void SetMainWindowStuff()
|
||||||
ShowWindow(hAppWnd, SW_SHOWNORMAL);
|
ShowWindow(hAppWnd, SW_SHOWNORMAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (eoptions & EO_BESTFIT && !windowedfailed)
|
// removed check for EO_BESTFIT flag
|
||||||
|
// OnWindowSizeChange() now is a general purpose window resize handler on video driver side
|
||||||
|
if (!windowedfailed)
|
||||||
{
|
{
|
||||||
RECT client_recr;
|
RECT client_recr;
|
||||||
GetClientRect(hAppWnd, &client_recr);
|
GetClientRect(hAppWnd, &client_recr);
|
||||||
recalculateBestFitRect(client_recr.right - client_recr.left, client_recr.bottom - client_recr.top);
|
OnWindowSizeChange(client_recr.right - client_recr.left, client_recr.bottom - client_recr.top);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2987,6 +2983,10 @@ void UpdateMenuHotkeys()
|
||||||
ChangeMenuItemText(MENU_CDLOGGER, combined);
|
ChangeMenuItemText(MENU_CDLOGGER, combined);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool GetIsFullscreenOnDoubleclick() {
|
||||||
|
return fullscreenByDoubleclick;
|
||||||
|
}
|
||||||
|
|
||||||
//This function is for the context menu item Save Movie As...
|
//This function is for the context menu item Save Movie As...
|
||||||
//It gets a filename from the user then calls CreateMovie()
|
//It gets a filename from the user then calls CreateMovie()
|
||||||
void SaveMovieAs()
|
void SaveMovieAs()
|
||||||
|
|
|
@ -40,6 +40,10 @@ void GetMouseData(uint32 (&md)[3]);
|
||||||
//void ChangeMenuItemText(int menuitem, string text);
|
//void ChangeMenuItemText(int menuitem, string text);
|
||||||
void UpdateMenuHotkeys();
|
void UpdateMenuHotkeys();
|
||||||
|
|
||||||
|
// Returns true if fullscreen via double click is enabled
|
||||||
|
// TODO: replace fullscreenByDoubleclick references with a call to this
|
||||||
|
bool GetIsFullscreenOnDoubleclick(void);
|
||||||
|
|
||||||
template<int BUFSIZE>
|
template<int BUFSIZE>
|
||||||
inline std::string GetDlgItemText(HWND hDlg, int nIDDlgItem) {
|
inline std::string GetDlgItemText(HWND hDlg, int nIDDlgItem) {
|
||||||
char buf[BUFSIZE];
|
char buf[BUFSIZE];
|
||||||
|
|
|
@ -69,14 +69,15 @@ enum ESIFC
|
||||||
SIFC_4PLAYER = 3,
|
SIFC_4PLAYER = 3,
|
||||||
SIFC_FKB = 4,
|
SIFC_FKB = 4,
|
||||||
SIFC_SUBORKB = 5,
|
SIFC_SUBORKB = 5,
|
||||||
SIFC_HYPERSHOT = 6,
|
SIFC_PEC586KB = 6,
|
||||||
SIFC_MAHJONG = 7,
|
SIFC_HYPERSHOT = 7,
|
||||||
SIFC_QUIZKING = 8,
|
SIFC_MAHJONG = 8,
|
||||||
SIFC_FTRAINERA = 9,
|
SIFC_QUIZKING = 9,
|
||||||
SIFC_FTRAINERB = 10,
|
SIFC_FTRAINERA = 10,
|
||||||
SIFC_OEKAKIDS = 11,
|
SIFC_FTRAINERB = 11,
|
||||||
SIFC_BWORLD = 12,
|
SIFC_OEKAKIDS = 12,
|
||||||
SIFC_TOPRIDER = 13,
|
SIFC_BWORLD = 13,
|
||||||
|
SIFC_TOPRIDER = 14,
|
||||||
|
|
||||||
SIFC_COUNT = SIFC_TOPRIDER
|
SIFC_COUNT = SIFC_TOPRIDER
|
||||||
};
|
};
|
||||||
|
@ -92,6 +93,7 @@ inline const char* ESIFC_Name(ESIFC esifc)
|
||||||
"4-Player Adapter",
|
"4-Player Adapter",
|
||||||
"Family Keyboard",
|
"Family Keyboard",
|
||||||
"Subor Keyboard",
|
"Subor Keyboard",
|
||||||
|
"PEC586 Keyboard",
|
||||||
"HyperShot Pads",
|
"HyperShot Pads",
|
||||||
"Mahjong",
|
"Mahjong",
|
||||||
"Quiz King Buzzers",
|
"Quiz King Buzzers",
|
||||||
|
|
|
@ -473,7 +473,7 @@ static BMAPPINGLocal bmap[] = {
|
||||||
{"Konami VRC6 Rev. B", 26, Mapper26_Init},
|
{"Konami VRC6 Rev. B", 26, Mapper26_Init},
|
||||||
{"CC-21 MI HUN CHE", 27, UNLCC21_Init}, // Former dupe for VRC2/VRC4 mapper, redefined with crc to mihunche boards
|
{"CC-21 MI HUN CHE", 27, UNLCC21_Init}, // Former dupe for VRC2/VRC4 mapper, redefined with crc to mihunche boards
|
||||||
{"", 28, Mapper28_Init},
|
{"", 28, Mapper28_Init},
|
||||||
// {"", 29, Mapper29_Init},
|
{"", 29, Mapper29_Init},
|
||||||
// {"", 30, Mapper30_Init},
|
// {"", 30, Mapper30_Init},
|
||||||
// {"", 31, Mapper31_Init},
|
// {"", 31, Mapper31_Init},
|
||||||
{"IREM G-101", 32, Mapper32_Init},
|
{"IREM G-101", 32, Mapper32_Init},
|
||||||
|
@ -972,6 +972,7 @@ static int iNES_Init(int num) {
|
||||||
switch (num) { // FIXME, mapper or game data base with the board parameters and ROM/RAM sizes
|
switch (num) { // FIXME, mapper or game data base with the board parameters and ROM/RAM sizes
|
||||||
case 13: CHRRAMSize = 16 * 1024; break;
|
case 13: CHRRAMSize = 16 * 1024; break;
|
||||||
case 6:
|
case 6:
|
||||||
|
case 29:
|
||||||
case 96: CHRRAMSize = 32 * 1024; break;
|
case 96: CHRRAMSize = 32 * 1024; break;
|
||||||
case 176: CHRRAMSize = 128 * 1024; break;
|
case 176: CHRRAMSize = 128 * 1024; break;
|
||||||
default: CHRRAMSize = 8 * 1024; break;
|
default: CHRRAMSize = 8 * 1024; break;
|
||||||
|
|
|
@ -108,6 +108,7 @@ void Mapper24_Init(CartInfo *);
|
||||||
void Mapper25_Init(CartInfo *);
|
void Mapper25_Init(CartInfo *);
|
||||||
void Mapper26_Init(CartInfo *);
|
void Mapper26_Init(CartInfo *);
|
||||||
void Mapper28_Init(CartInfo *);
|
void Mapper28_Init(CartInfo *);
|
||||||
|
void Mapper29_Init(CartInfo *);
|
||||||
void Mapper32_Init(CartInfo *);
|
void Mapper32_Init(CartInfo *);
|
||||||
void Mapper33_Init(CartInfo *);
|
void Mapper33_Init(CartInfo *);
|
||||||
void Mapper34_Init(CartInfo *);
|
void Mapper34_Init(CartInfo *);
|
||||||
|
|
|
@ -38,6 +38,7 @@
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
#include "drivers/win/main.h"
|
#include "drivers/win/main.h"
|
||||||
|
#include "drivers/win/video.h"
|
||||||
#include "drivers/win/memwatch.h"
|
#include "drivers/win/memwatch.h"
|
||||||
#include "drivers/win/cheat.h"
|
#include "drivers/win/cheat.h"
|
||||||
#include "drivers/win/debugger.h"
|
#include "drivers/win/debugger.h"
|
||||||
|
@ -67,6 +68,7 @@ extern INPUTCFC *FCEU_InitArkanoidFC(void);
|
||||||
extern INPUTCFC *FCEU_InitSpaceShadow(void);
|
extern INPUTCFC *FCEU_InitSpaceShadow(void);
|
||||||
extern INPUTCFC *FCEU_InitFKB(void);
|
extern INPUTCFC *FCEU_InitFKB(void);
|
||||||
extern INPUTCFC *FCEU_InitSuborKB(void);
|
extern INPUTCFC *FCEU_InitSuborKB(void);
|
||||||
|
extern INPUTCFC *FCEU_InitPEC586KB(void);
|
||||||
extern INPUTCFC *FCEU_InitHS(void);
|
extern INPUTCFC *FCEU_InitHS(void);
|
||||||
extern INPUTCFC *FCEU_InitMahjong(void);
|
extern INPUTCFC *FCEU_InitMahjong(void);
|
||||||
extern INPUTCFC *FCEU_InitQuizKing(void);
|
extern INPUTCFC *FCEU_InitQuizKing(void);
|
||||||
|
@ -431,6 +433,9 @@ static void SetInputStuffFC()
|
||||||
case SIFC_SUBORKB:
|
case SIFC_SUBORKB:
|
||||||
portFC.driver=FCEU_InitSuborKB();
|
portFC.driver=FCEU_InitSuborKB();
|
||||||
break;
|
break;
|
||||||
|
case SIFC_PEC586KB:
|
||||||
|
portFC.driver=FCEU_InitPEC586KB();
|
||||||
|
break;
|
||||||
case SIFC_HYPERSHOT:
|
case SIFC_HYPERSHOT:
|
||||||
portFC.driver=FCEU_InitHS();
|
portFC.driver=FCEU_InitHS();
|
||||||
break;
|
break;
|
||||||
|
@ -1175,15 +1180,13 @@ static void FCEUI_DoExit(void)
|
||||||
void ToggleFullscreen()
|
void ToggleFullscreen()
|
||||||
{
|
{
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
extern int SetVideoMode(int fs); //adelikat: Yeah, I know, hacky
|
|
||||||
extern void UpdateCheckedMenuItems();
|
extern void UpdateCheckedMenuItems();
|
||||||
|
|
||||||
UpdateCheckedMenuItems();
|
UpdateCheckedMenuItems();
|
||||||
changerecursive=1;
|
|
||||||
|
|
||||||
int oldmode = fullscreen;
|
changerecursive=1;
|
||||||
if(!SetVideoMode(oldmode ^ 1))
|
SetIsFullscreen(!GetIsFullscreen());
|
||||||
SetVideoMode(oldmode);
|
FCEUD_VideoChanged();
|
||||||
changerecursive=0;
|
changerecursive=0;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,14 +21,12 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "share.h"
|
#include "share.h"
|
||||||
#include "fkb.h"
|
#include "fkb.h"
|
||||||
#define AK2(x,y) ( (FKB_##x) | (FKB_##y <<8) )
|
|
||||||
#define AK(x) FKB_ ## x
|
#define AK(x) FKB_ ## x
|
||||||
|
|
||||||
static uint8 bufit[0x49];
|
static uint8 bufit[0x49];
|
||||||
static uint8 ksmode;
|
static uint8 ksmode;
|
||||||
static uint8 ksindex;
|
static uint8 ksindex;
|
||||||
|
|
||||||
|
|
||||||
static uint16 matrix[9][2][4] =
|
static uint16 matrix[9][2][4] =
|
||||||
{
|
{
|
||||||
{ { AK(F8), AK(RETURN), AK(BRACKETLEFT), AK(BRACKETRIGHT) },
|
{ { AK(F8), AK(RETURN), AK(BRACKETLEFT), AK(BRACKETRIGHT) },
|
||||||
|
@ -51,51 +49,40 @@ static uint16 matrix[9][2][4]=
|
||||||
{ AK(DOWN), AK(SPACE), AK(DELETE), AK(INSERT) } },
|
{ AK(DOWN), AK(SPACE), AK(DELETE), AK(INSERT) } },
|
||||||
};
|
};
|
||||||
|
|
||||||
static void FKB_Write(uint8 v)
|
static void FKB_Write(uint8 v) {
|
||||||
{
|
|
||||||
v >>= 1;
|
v >>= 1;
|
||||||
if(v&2)
|
if (v & 2) {
|
||||||
{
|
|
||||||
if ((ksmode & 1) && !(v & 1))
|
if ((ksmode & 1) && !(v & 1))
|
||||||
ksindex = (ksindex + 1) % 9;
|
ksindex = (ksindex + 1) % 9;
|
||||||
}
|
}
|
||||||
ksmode = v;
|
ksmode = v;
|
||||||
}
|
}
|
||||||
|
|
||||||
static uint8 FKB_Read(int w, uint8 ret)
|
static uint8 FKB_Read(int w, uint8 ret) {
|
||||||
{
|
if (w) {
|
||||||
//printf("$%04x, %d, %d\n",w+0x4016,ksindex,ksmode&1);
|
|
||||||
if(w)
|
|
||||||
{
|
|
||||||
int x;
|
int x;
|
||||||
|
|
||||||
ret &= ~0x1E;
|
ret &= ~0x1E;
|
||||||
for (x = 0; x < 4; x++)
|
for (x = 0; x < 4; x++)
|
||||||
if (bufit[ matrix[ksindex][ksmode & 1][x] & 0xFF ] || bufit[ matrix[ksindex][ksmode & 1][x] >> 8])
|
if (bufit[ matrix[ksindex][ksmode & 1][x] & 0xFF ] || bufit[ matrix[ksindex][ksmode & 1][x] >> 8])
|
||||||
{
|
|
||||||
ret |= 1 << (x + 1);
|
ret |= 1 << (x + 1);
|
||||||
}
|
|
||||||
ret ^= 0x1E;
|
ret ^= 0x1E;
|
||||||
}
|
}
|
||||||
return(ret);
|
return(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void FKB_Strobe(void)
|
static void FKB_Strobe(void) {
|
||||||
{
|
|
||||||
ksmode = 0;
|
ksmode = 0;
|
||||||
ksindex = 0;
|
ksindex = 0;
|
||||||
//printf("strobe\n");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void FKB_Update(void *data, int arg)
|
static void FKB_Update(void *data, int arg) {
|
||||||
{
|
memcpy(bufit + 1, data, sizeof(bufit) - 1);
|
||||||
memcpy(bufit+1,data,0x48);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static INPUTCFC FKB = { FKB_Read, FKB_Write, FKB_Strobe, FKB_Update, 0, 0 };
|
static INPUTCFC FKB = { FKB_Read, FKB_Write, FKB_Strobe, FKB_Update, 0, 0 };
|
||||||
|
|
||||||
INPUTCFC *FCEU_InitFKB(void)
|
INPUTCFC *FCEU_InitFKB(void) {
|
||||||
{
|
|
||||||
memset(bufit, 0, sizeof(bufit));
|
memset(bufit, 0, sizeof(bufit));
|
||||||
ksmode = ksindex = 0;
|
ksmode = ksindex = 0;
|
||||||
return(&FKB);
|
return(&FKB);
|
||||||
|
|
|
@ -0,0 +1,96 @@
|
||||||
|
/* FCE Ultra - NES/Famicom Emulator
|
||||||
|
*
|
||||||
|
* Copyright notice for this file:
|
||||||
|
* Copyright (C) 2002 Xodnizel
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <string.h>
|
||||||
|
#include "share.h"
|
||||||
|
#include "suborkb.h"
|
||||||
|
|
||||||
|
#define AK(x) FKB_ ## x
|
||||||
|
|
||||||
|
static uint8 bufit[0x66];
|
||||||
|
static uint8 kspos, kstrobe;
|
||||||
|
static uint8 ksindex;
|
||||||
|
|
||||||
|
//TODO: check all keys, some of the are wrong
|
||||||
|
|
||||||
|
static uint16 matrix[13][8] =
|
||||||
|
{
|
||||||
|
{ AK(ESCAPE),AK(SPACE),AK(LMENU),AK(LCONTROL),AK(LSHIFT),AK(GRAVE),AK(TAB),AK(CAPITAL) },
|
||||||
|
{ AK(F6),AK(F7),AK(F5),AK(F4),AK(F8),AK(F2),AK(F1),AK(F3) },
|
||||||
|
{ AK(EQUALS), AK(NUMPAD0),AK(PERIOD),AK(A),AK(RETURN),AK(1),AK(Q),AK(Z) },
|
||||||
|
{ 0, AK(NUMPAD3),AK(NUMPAD6),AK(S),AK(NUMPAD9),AK(2),AK(W),AK(X) },
|
||||||
|
{ AK(SLASH), AK(NUMPAD2),AK(NUMPAD5),AK(D),AK(NUMPAD8),AK(3),AK(E),AK(C) },
|
||||||
|
{ AK(BREAK), AK(NUMPAD1),AK(NUMPAD4),AK(F),AK(NUMPAD7),AK(4),AK(R),AK(V) },
|
||||||
|
{ AK(BACK),AK(BACKSLASH),AK(GRETURN),AK(G),AK(RBRACKET),AK(5),AK(T),AK(B) },
|
||||||
|
{ AK(9),AK(PERIOD),AK(L),AK(K),AK(O),AK(8),AK(I),AK(COMMA) },
|
||||||
|
{ AK(0),AK(SLASH),AK(SEMICOLON),AK(J),AK(P),AK(7),AK(U),AK(M) },
|
||||||
|
{ AK(MINUS),AK(MINUS),AK(APOSTROPHE),AK(H),AK(LBRACKET),AK(6),AK(Y),AK(N) },
|
||||||
|
{ AK(F11),AK(F12),AK(F10),0,AK(MINUS),AK(F9),0,0 },
|
||||||
|
{ AK(UP),AK(RIGHT),AK(DOWN),AK(DIVIDE),AK(LEFT),AK(MULTIPLY),AK(SUBTRACT),AK(ADD) },
|
||||||
|
{ AK(INSERT),AK(NUMPAD1),AK(HOME),AK(PRIOR),AK(DELETE),AK(END),AK(NEXT),AK(NUMLOCK) },
|
||||||
|
};
|
||||||
|
|
||||||
|
static void PEC586KB_Write(uint8 v) {
|
||||||
|
if (!(kstrobe & 2) && (v & 2)) {
|
||||||
|
kspos = 0;
|
||||||
|
}
|
||||||
|
if ((kstrobe & 1) && !(v & 1)) {
|
||||||
|
ksindex = 0;
|
||||||
|
}
|
||||||
|
if ((kstrobe & 4) && !(v & 4)) {
|
||||||
|
kspos++;
|
||||||
|
kspos %= 13;
|
||||||
|
}
|
||||||
|
kstrobe = v;
|
||||||
|
}
|
||||||
|
|
||||||
|
static uint8 PEC586KB_Read(int w, uint8 ret) {
|
||||||
|
#ifdef FCEUDEF_DEBUGGER
|
||||||
|
if (!fceuindbg) {
|
||||||
|
#endif
|
||||||
|
if (w) {
|
||||||
|
ret &= ~2;
|
||||||
|
if(bufit[matrix[kspos][7-ksindex]])
|
||||||
|
ret |= 2;
|
||||||
|
ksindex++;
|
||||||
|
ksindex&=7;
|
||||||
|
}
|
||||||
|
#ifdef FCEUDEF_DEBUGGER
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
return(ret);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void PEC586KB_Strobe(void) {
|
||||||
|
// kstrobe = 0;
|
||||||
|
// ksindex = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void PEC586KB_Update(void *data, int arg) {
|
||||||
|
memcpy(bufit + 1, data, sizeof(bufit) - 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
static INPUTCFC PEC586KB = { PEC586KB_Read, PEC586KB_Write, PEC586KB_Strobe, PEC586KB_Update, 0, 0 };
|
||||||
|
|
||||||
|
INPUTCFC *FCEU_InitPEC586KB(void) {
|
||||||
|
memset(bufit, 0, sizeof(bufit));
|
||||||
|
kspos = ksindex = kstrobe = 0;
|
||||||
|
return(&PEC586KB);
|
||||||
|
}
|
|
@ -1,93 +1,83 @@
|
||||||
|
/* FCE Ultra - NES/Famicom Emulator
|
||||||
|
*
|
||||||
|
* Copyright notice for this file:
|
||||||
|
* Copyright (C) 2002 Xodnizel
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
*/
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "share.h"
|
#include "share.h"
|
||||||
#include "suborkb.h"
|
#include "suborkb.h"
|
||||||
#define AK2(x,y) ( (FKB_##x) | (FKB_##y <<8) )
|
|
||||||
#define AK(x) FKB_ ## x
|
#define AK(x) FKB_ ## x
|
||||||
|
|
||||||
static uint8 bufit[0x61];
|
static uint8 bufit[0x66];
|
||||||
static uint8 ksmode;
|
static uint8 ksmode;
|
||||||
static uint8 ksindex;
|
static uint8 ksindex;
|
||||||
|
|
||||||
|
|
||||||
static uint16 matrix[13][2][4] =
|
static uint16 matrix[13][2][4] =
|
||||||
{
|
{
|
||||||
{{AK(4),AK(G),AK(F),AK(C)},
|
{ { AK(4), AK(G), AK(F), AK(C) }, { AK(F2), AK(E), AK(5), AK(V) } },
|
||||||
{AK(F2),AK(E),AK(5),AK(V)}},
|
{ { AK(2), AK(D), AK(S), AK(END) }, { AK(F1), AK(W), AK(3), AK(X) } },
|
||||||
{{AK(2),AK(D),AK(S),AK(END)},
|
{ { AK(INSERT), AK(BACK), AK(NEXT), AK(RIGHT) }, { AK(F8), AK(PRIOR), AK(DELETE), AK(HOME) } },
|
||||||
{AK(F1),AK(W),AK(3),AK(X)}},
|
{ { AK(9), AK(I), AK(L), AK(COMMA) }, { AK(F5), AK(O), AK(0), AK(PERIOD) } },
|
||||||
{{AK(INSERT),AK(BACK),AK(NEXT),AK(RIGHT)},
|
{ { AK(RBRACKET), AK(RETURN), AK(UP), AK(LEFT) }, { AK(F7), AK(LBRACKET), AK(BACKSLASH), AK(DOWN) } },
|
||||||
{AK(F8),AK(PRIOR),AK(DELETE),AK(HOME)}},
|
{ { AK(Q), AK(CAPITAL), AK(Z), AK(TAB) }, { AK(ESCAPE), AK(A), AK(1), AK(LCONTROL) } },
|
||||||
{{AK(9),AK(I),AK(L),AK(COMMA)},
|
{ { AK(7), AK(Y), AK(K), AK(M) }, { AK(F4), AK(U), AK(8), AK(J) } },
|
||||||
{AK(F5),AK(O),AK(0),AK(PERIOD)}},
|
{ { AK(MINUS), AK(SEMICOLON), AK(APOSTROPHE), AK(SLASH) }, { AK(F6), AK(P), AK(EQUALS), AK(LSHIFT) } },
|
||||||
{{AK(RBRACKET),AK(RETURN),AK(UP),AK(LEFT)},
|
{ { AK(T), AK(H), AK(N), AK(SPACE) }, { AK(F3), AK(R), AK(6), AK(B) } },
|
||||||
{AK(F7),AK(LBRACKET),AK(BACKSLASH),AK(DOWN)}},
|
{ { AK(NUMPAD6), AK(GRETURN), AK(NUMPAD4), AK(NUMPAD8) }, { AK(NUMPAD2), 0, 0, 0 } }, // baibaidino actually uses diferent layot
|
||||||
{{AK(Q),AK(CAPITAL),AK(Z),AK(TAB)},
|
{ { AK(LMENU), AK(NUMPAD4), AK(NUMPAD7), AK(F11) }, { AK(F12), AK(NUMPAD1), AK(NUMPAD2), AK(NUMPAD8) } },
|
||||||
{AK(ESCAPE),AK(A),AK(1),AK(LCONTROL)}},
|
{ { AK(SUBTRACT), AK(ADD), AK(MULTIPLY), AK(NUMPAD9) }, { AK(F10), AK(NUMPAD5), AK(DIVIDE), AK(NUMLOCK) } },
|
||||||
{{AK(7),AK(Y),AK(K),AK(M)},
|
{ { AK(GRAVE), AK(NUMPAD6), AK(PAUSE), AK(SPACE) }, { AK(F9), AK(NUMPAD3), AK(DECIMAL), AK(NUMPAD0) } },
|
||||||
{AK(F4),AK(U),AK(8),AK(J)}},
|
|
||||||
{{AK(MINUS),AK(SEMICOLON),AK(APOSTROPHE),AK(SLASH)},
|
|
||||||
{AK(F6),AK(P),AK(EQUALS),AK(LSHIFT)}},
|
|
||||||
{{AK(T),AK(H),AK(N),AK(SPACE)},
|
|
||||||
{AK(F3),AK(R),AK(6),AK(B)}},
|
|
||||||
{{0,0,0,0},
|
|
||||||
{0,0,0,0}},
|
|
||||||
{{AK(LMENU),AK(NUMPAD4),AK(NUMPAD7),AK(F11)},
|
|
||||||
{AK(F12),AK(NUMPAD1),AK(NUMPAD2),AK(NUMPAD8)}},
|
|
||||||
{{AK(SUBTRACT),AK(ADD),AK(MULTIPLY),AK(NUMPAD9)},
|
|
||||||
{AK(F10),AK(NUMPAD5),AK(DIVIDE),AK(NUMLOCK)}},
|
|
||||||
{{AK(GRAVE),AK(NUMPAD6),AK(PAUSE),AK(SPACE)},
|
|
||||||
{AK(F9),AK(NUMPAD3),AK(DECIMAL),AK(NUMPAD0)}},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static void SuborKB_Write(uint8 v)
|
static void SuborKB_Write(uint8 v) {
|
||||||
{
|
|
||||||
v >>= 1;
|
v >>= 1;
|
||||||
if(v&2)
|
if (v & 2) {
|
||||||
{
|
|
||||||
if ((ksmode & 1) && !(v & 1))
|
if ((ksmode & 1) && !(v & 1))
|
||||||
ksindex = (ksindex + 1) % 13;
|
ksindex = (ksindex + 1) % 13;
|
||||||
}
|
}
|
||||||
ksmode = v;
|
ksmode = v;
|
||||||
}
|
}
|
||||||
|
|
||||||
static uint8 SuborKB_Read(int w, uint8 ret)
|
static uint8 SuborKB_Read(int w, uint8 ret) {
|
||||||
{
|
if (w) {
|
||||||
if(w)
|
|
||||||
{
|
|
||||||
int x;
|
int x;
|
||||||
|
|
||||||
ret &= ~0x1E;
|
ret &= ~0x1E;
|
||||||
// if(ksindex==9)
|
|
||||||
// {
|
|
||||||
// if(ksmode&1)
|
|
||||||
// ret|=2;
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// {
|
|
||||||
for (x = 0; x < 4; x++)
|
for (x = 0; x < 4; x++)
|
||||||
if(bufit[matrix[ksindex][ksmode&1][x]&0xFF]||bufit[matrix[ksindex][ksmode&1][x]>>8])
|
if (bufit[matrix[ksindex][ksmode & 1][x]])
|
||||||
ret |= 1 << (x + 1);
|
ret |= 1 << (x + 1);
|
||||||
// }
|
|
||||||
ret ^= 0x1E;
|
ret ^= 0x1E;
|
||||||
}
|
}
|
||||||
return(ret);
|
return(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void SuborKB_Strobe(void)
|
static void SuborKB_Strobe(void) {
|
||||||
{
|
|
||||||
ksmode = 0;
|
ksmode = 0;
|
||||||
ksindex = 0;
|
ksindex = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void SuborKB_Update(void *data, int arg)
|
static void SuborKB_Update(void *data, int arg) {
|
||||||
{
|
memcpy(bufit + 1, data, sizeof(bufit) - 1);
|
||||||
memcpy(bufit+1,data,0x60);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static INPUTCFC SuborKB = { SuborKB_Read, SuborKB_Write, SuborKB_Strobe, SuborKB_Update, 0, 0 };
|
static INPUTCFC SuborKB = { SuborKB_Read, SuborKB_Write, SuborKB_Strobe, SuborKB_Update, 0, 0 };
|
||||||
|
|
||||||
INPUTCFC *FCEU_InitSuborKB(void)
|
INPUTCFC *FCEU_InitSuborKB(void) {
|
||||||
{
|
|
||||||
memset(bufit, 0, sizeof(bufit));
|
memset(bufit, 0, sizeof(bufit));
|
||||||
ksmode = ksindex = 0;
|
ksmode = ksindex = 0;
|
||||||
return(&SuborKB);
|
return(&SuborKB);
|
||||||
|
|
|
@ -93,4 +93,10 @@
|
||||||
#define FKB_RIGHT 0x5D
|
#define FKB_RIGHT 0x5D
|
||||||
#define FKB_NUMPAD0 0x5E
|
#define FKB_NUMPAD0 0x5E
|
||||||
#define FKB_DECIMAL 0x5F
|
#define FKB_DECIMAL 0x5F
|
||||||
|
#define FKB_RSHIFT 0x60
|
||||||
|
#define FKB_RMENU 0x61
|
||||||
|
#define FKB_RCONTROL 0x62
|
||||||
|
#define FKB_BREAK 0x63
|
||||||
|
#define FKB_RESET 0x64
|
||||||
|
#define FKB_GRETURN 0x65
|
||||||
|
|
||||||
|
|
|
@ -47,6 +47,7 @@
|
||||||
#include "drivers/win/main.h"
|
#include "drivers/win/main.h"
|
||||||
#include "drivers/win/ram_search.h"
|
#include "drivers/win/ram_search.h"
|
||||||
#include "drivers/win/ramwatch.h"
|
#include "drivers/win/ramwatch.h"
|
||||||
|
#include "drivers/win/video.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
@ -243,7 +244,11 @@ static bool ReadStateChunk(EMUFILE* is, SFORMAT *sf, int size)
|
||||||
|
|
||||||
static int read_sfcpuc=0, read_snd=0;
|
static int read_sfcpuc=0, read_snd=0;
|
||||||
|
|
||||||
|
#ifndef WIN32
|
||||||
|
// included corresponding header on Windows, no longer needed
|
||||||
|
// TODO do the same for SDL and remove declaration completely
|
||||||
void FCEUD_BlitScreen(uint8 *XBuf); //mbg merge 7/17/06 YUCKY had to add
|
void FCEUD_BlitScreen(uint8 *XBuf); //mbg merge 7/17/06 YUCKY had to add
|
||||||
|
#endif
|
||||||
void UpdateFCEUWindow(void); //mbg merge 7/17/06 YUCKY had to add
|
void UpdateFCEUWindow(void); //mbg merge 7/17/06 YUCKY had to add
|
||||||
static bool ReadStateChunks(EMUFILE* is, int32 totalsize)
|
static bool ReadStateChunks(EMUFILE* is, int32 totalsize)
|
||||||
{
|
{
|
||||||
|
|
|
@ -390,6 +390,7 @@ static BMAPPING bmap[] = {
|
||||||
{ "NovelDiamond9999999in1", Novel_Init, 0 },
|
{ "NovelDiamond9999999in1", Novel_Init, 0 },
|
||||||
{ "OneBus", UNLOneBus_Init, 0 },
|
{ "OneBus", UNLOneBus_Init, 0 },
|
||||||
{ "PEC-586", UNLPEC586Init, 0 },
|
{ "PEC-586", UNLPEC586Init, 0 },
|
||||||
|
{ "RET-CUFROM", Mapper29_Init, BMCFLAG_32KCHRR },
|
||||||
{ "RROM", NROM_Init, 0 },
|
{ "RROM", NROM_Init, 0 },
|
||||||
{ "RROM-128", NROM_Init, 0 },
|
{ "RROM-128", NROM_Init, 0 },
|
||||||
{ "SA-002", TCU02_Init, 0 },
|
{ "SA-002", TCU02_Init, 0 },
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
#ifndef BITFLAGS_H
|
||||||
|
#define BITFLAGS_H
|
||||||
|
|
||||||
|
// Flag test / set / clear macros for convenience and clarity
|
||||||
|
#define FL_TEST(var, mask) (var & mask)
|
||||||
|
#define FL_SET(var, mask) (var |= mask)
|
||||||
|
#define FL_CLEAR(var, mask) (var &= ~mask)
|
||||||
|
#define FL_FROMBOOL(var, mask, b) (var = (b)? var|mask:var&(~mask))
|
||||||
|
|
||||||
|
#endif // BITFLAGS_H
|
|
@ -596,6 +596,7 @@
|
||||||
<ClCompile Include="..\src\input\mahjong.cpp" />
|
<ClCompile Include="..\src\input\mahjong.cpp" />
|
||||||
<ClCompile Include="..\src\input\mouse.cpp" />
|
<ClCompile Include="..\src\input\mouse.cpp" />
|
||||||
<ClCompile Include="..\src\input\oekakids.cpp" />
|
<ClCompile Include="..\src\input\oekakids.cpp" />
|
||||||
|
<ClCompile Include="..\src\input\pec586kb.cpp" />
|
||||||
<ClCompile Include="..\src\input\powerpad.cpp" />
|
<ClCompile Include="..\src\input\powerpad.cpp" />
|
||||||
<ClCompile Include="..\src\input\quiz.cpp" />
|
<ClCompile Include="..\src\input\quiz.cpp" />
|
||||||
<ClCompile Include="..\src\input\shadow.cpp" />
|
<ClCompile Include="..\src\input\shadow.cpp" />
|
||||||
|
@ -963,6 +964,7 @@
|
||||||
<ClInclude Include="..\src\ines-correct.h" />
|
<ClInclude Include="..\src\ines-correct.h" />
|
||||||
<ClInclude Include="..\src\ines.h" />
|
<ClInclude Include="..\src\ines.h" />
|
||||||
<ClInclude Include="..\src\input.h" />
|
<ClInclude Include="..\src\input.h" />
|
||||||
|
<ClInclude Include="..\src\input\fkb.h" />
|
||||||
<ClInclude Include="..\src\input\share.h" />
|
<ClInclude Include="..\src\input\share.h" />
|
||||||
<ClInclude Include="..\src\input\suborkb.h" />
|
<ClInclude Include="..\src\input\suborkb.h" />
|
||||||
<ClInclude Include="..\src\movie.h" />
|
<ClInclude Include="..\src\movie.h" />
|
||||||
|
|
|
@ -958,6 +958,9 @@
|
||||||
<ClCompile Include="..\src\boards\mihunche.cpp">
|
<ClCompile Include="..\src\boards\mihunche.cpp">
|
||||||
<Filter>boards</Filter>
|
<Filter>boards</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\src\input\pec586kb.cpp">
|
||||||
|
<Filter>input</Filter>
|
||||||
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="..\src\drivers\common\args.h">
|
<ClInclude Include="..\src\drivers\common\args.h">
|
||||||
|
@ -1464,6 +1467,9 @@
|
||||||
<ClInclude Include="..\src\utils\ioapi.h">
|
<ClInclude Include="..\src\utils\ioapi.h">
|
||||||
<Filter>utils</Filter>
|
<Filter>utils</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\src\input\fkb.h">
|
||||||
|
<Filter>input</Filter>
|
||||||
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ResourceCompile Include="..\src\drivers\win\res.rc">
|
<ResourceCompile Include="..\src\drivers\win\res.rc">
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
>
|
>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPreBuildEventTool"
|
Name="VCPreBuildEventTool"
|
||||||
CommandLine="SubWCRev.bat"
|
CommandLine=""
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCustomBuildTool"
|
Name="VCCustomBuildTool"
|
||||||
|
@ -102,7 +102,7 @@
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPostBuildEventTool"
|
Name="VCPostBuildEventTool"
|
||||||
CommandLine="xcopy /y /d "$(ProjectDir)\..\src\drivers\win\7z.dll" "$(OutDir)"
"
|
CommandLine="
"
|
||||||
/>
|
/>
|
||||||
</Configuration>
|
</Configuration>
|
||||||
<Configuration
|
<Configuration
|
||||||
|
@ -1030,10 +1030,6 @@
|
||||||
RelativePath="..\src\boards\kof97.cpp"
|
RelativePath="..\src\boards\kof97.cpp"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
|
||||||
RelativePath="..\src\boards\vrc5.cpp"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
<File
|
||||||
RelativePath="..\src\boards\ks7012.cpp"
|
RelativePath="..\src\boards\ks7012.cpp"
|
||||||
>
|
>
|
||||||
|
@ -1186,6 +1182,10 @@
|
||||||
RelativePath="..\src\boards\vrc3.cpp"
|
RelativePath="..\src\boards\vrc3.cpp"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\src\boards\vrc5.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\src\boards\vrc6.cpp"
|
RelativePath="..\src\boards\vrc6.cpp"
|
||||||
>
|
>
|
||||||
|
@ -2486,37 +2486,6 @@
|
||||||
<Filter
|
<Filter
|
||||||
Name="help"
|
Name="help"
|
||||||
>
|
>
|
||||||
<File
|
|
||||||
RelativePath="..\src\drivers\win\help\fceux.chm"
|
|
||||||
>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Debug|Win32"
|
|
||||||
>
|
|
||||||
<Tool
|
|
||||||
Name="VCCustomBuildTool"
|
|
||||||
CommandLine="copy /y ..\src\drivers\win\help\fceux.chm "$(OutDir)"
"
|
|
||||||
Outputs="$(OutDir)\fceux.chm"
|
|
||||||
/>
|
|
||||||
</FileConfiguration>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Release|Win32"
|
|
||||||
>
|
|
||||||
<Tool
|
|
||||||
Name="VCCustomBuildTool"
|
|
||||||
CommandLine="copy /y ..\src\drivers\win\help\fceux.chm "$(OutDir)"
"
|
|
||||||
Outputs="$(OutDir)\fceux.chm"
|
|
||||||
/>
|
|
||||||
</FileConfiguration>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Release Fastbuild|Win32"
|
|
||||||
>
|
|
||||||
<Tool
|
|
||||||
Name="VCCustomBuildTool"
|
|
||||||
CommandLine="copy /y ..\src\drivers\win\help\fceux.chm "$(OutDir)"
"
|
|
||||||
Outputs="$(OutDir)\fceux.chm"
|
|
||||||
/>
|
|
||||||
</FileConfiguration>
|
|
||||||
</File>
|
|
||||||
</Filter>
|
</Filter>
|
||||||
<Filter
|
<Filter
|
||||||
Name="lua"
|
Name="lua"
|
||||||
|
@ -4215,6 +4184,10 @@
|
||||||
RelativePath="..\src\input\oekakids.cpp"
|
RelativePath="..\src\input\oekakids.cpp"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\src\input\pec586kb.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\src\input\powerpad.cpp"
|
RelativePath="..\src\input\powerpad.cpp"
|
||||||
>
|
>
|
||||||
|
|
|
@ -803,10 +803,6 @@
|
||||||
RelativePath="..\src\boards\kof97.cpp"
|
RelativePath="..\src\boards\kof97.cpp"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
|
||||||
RelativePath="..\src\boards\vrc5.cpp"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
<File
|
||||||
RelativePath="..\src\boards\ks7012.cpp"
|
RelativePath="..\src\boards\ks7012.cpp"
|
||||||
>
|
>
|
||||||
|
@ -852,11 +848,11 @@
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\src\boards\mihunche.cpp"
|
RelativePath="..\src\boards\malee.cpp"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\src\boards\malee.cpp"
|
RelativePath="..\src\boards\mihunche.cpp"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
|
@ -959,6 +955,10 @@
|
||||||
RelativePath="..\src\boards\vrc3.cpp"
|
RelativePath="..\src\boards\vrc3.cpp"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\src\boards\vrc5.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\src\boards\vrc6.cpp"
|
RelativePath="..\src\boards\vrc6.cpp"
|
||||||
>
|
>
|
||||||
|
@ -2439,6 +2439,10 @@
|
||||||
RelativePath="..\src\input\oekakids.cpp"
|
RelativePath="..\src\input\oekakids.cpp"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\src\input\pec586kb.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\src\input\powerpad.cpp"
|
RelativePath="..\src\input\powerpad.cpp"
|
||||||
>
|
>
|
||||||
|
|
Loading…
Reference in New Issue