diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3881cb9 --- /dev/null +++ b/.gitignore @@ -0,0 +1,24 @@ +*.aps +*.db +*.tlog +*.pdb +*.asm +*.pdb +*.idb +*.obj +*.sbr +*.tlog +*.ipch +*.log +*.db +*.opendb +*.bsc +*.exe +*.ilk +handy-win32src-0.95-patched/.vs/handy/v16/.suo +handy-win32src-0.95-patched/vs/* +handy-win32src-0.95-patched/vs/Debug/* +handy-win32src-0.95-patched/vs/Debug Dbg/* +handy-win32src-0.95-patched/vs/Release/* +handy-win32src-0.95-patched/vs/Release Dbg/* + diff --git a/handy-win32src-0.95-patched/.vs/handy/FileContentIndex/51b1d524-e620-4840-bdd9-c8e8f75541a0.vsidx b/handy-win32src-0.95-patched/.vs/handy/FileContentIndex/51b1d524-e620-4840-bdd9-c8e8f75541a0.vsidx new file mode 100644 index 0000000..6641c45 Binary files /dev/null and b/handy-win32src-0.95-patched/.vs/handy/FileContentIndex/51b1d524-e620-4840-bdd9-c8e8f75541a0.vsidx differ diff --git a/handy-win32src-0.95-patched/.vs/handy/FileContentIndex/read.lock b/handy-win32src-0.95-patched/.vs/handy/FileContentIndex/read.lock new file mode 100644 index 0000000..e69de29 diff --git a/handy-win32src-0.95-patched/.vs/handy/v17/.suo b/handy-win32src-0.95-patched/.vs/handy/v17/.suo new file mode 100644 index 0000000..5f17f5d Binary files /dev/null and b/handy-win32src-0.95-patched/.vs/handy/v17/.suo differ diff --git a/handy-win32src-0.95-patched/.vs/handy/v17/fileList.bin b/handy-win32src-0.95-patched/.vs/handy/v17/fileList.bin new file mode 100644 index 0000000..844091b Binary files /dev/null and b/handy-win32src-0.95-patched/.vs/handy/v17/fileList.bin differ diff --git a/handy-win32src-0.95-patched/core/c65c02.h b/handy-win32src-0.95-patched/core/c65c02.h index d924f24..f311677 100644 --- a/handy-win32src-0.95-patched/core/c65c02.h +++ b/handy-win32src-0.95-patched/core/c65c02.h @@ -1740,7 +1740,7 @@ class C65C02 inline void xILLEGAL(void) { char addr[1024]; - sprintf(addr,"C65C02::Update() - Illegal opcode (%02x) at PC=$%04x.",mOpcode,mPC); + sprintf_s(addr, 1024, "C65C02::Update() - Illegal opcode (%02x) at PC=$%04x.", mOpcode,mPC); gError->Warning(addr); } diff --git a/handy-win32src-0.95-patched/core/cart.cpp b/handy-win32src-0.95-patched/core/cart.cpp index b55e0ff..4adba3a 100644 --- a/handy-win32src-0.95-patched/core/cart.cpp +++ b/handy-win32src-0.95-patched/core/cart.cpp @@ -84,9 +84,9 @@ CCart::CCart(UBYTE *gamedata,ULONG gamesize) if(header.magic[0]!='L' || header.magic[1]!='Y' || header.magic[2]!='N' || header.magic[3]!='X' || header.version!=1) { memset(&header,0,sizeof(LYNX_HEADER)); fprintf(stderr, "Invalid cart (no header?).\nGuessing a ROM layout...\n"); - strncpy((char*)&header.cartname,"NO HEADER",32); - strncpy((char*)&header.manufname,"HANDY",16); - header.page_size_bank0=gamesize>>8;// Hard workaround... + strncpy_s((char*)&header.cartname, 32, "NO HEADER", 32); + strncpy_s((char*)&header.manufname, 16, "HANDY", 16); + header.page_size_bank0 = static_cast(gamesize >> 8); // Hard workaround... /* CLynxException lynxerr; @@ -101,12 +101,10 @@ CCart::CCart(UBYTE *gamedata,ULONG gamesize) } // Setup name & manufacturer - - strncpy(mName,(char*)&header.cartname,32); - strncpy(mManufacturer,(char*)&header.manufname,16); + strncpy_s(mName, 33, (char*)&header.cartname, 32); + strncpy_s(mManufacturer, 17, (char*)&header.manufname, 16); // Setup rotation - mRotation=header.rotation; if(mRotation!=CART_NO_ROTATE && mRotation!=CART_ROTATE_LEFT && mRotation!=CART_ROTATE_RIGHT) mRotation=CART_NO_ROTATE; mAudinFlag=(header.aud_bits&0x01); @@ -116,12 +114,10 @@ CCart::CCart(UBYTE *gamedata,ULONG gamesize) header.page_size_bank1=0x000; // Setup name & manufacturer - - strcpy(mName,""); - strcpy(mManufacturer,""); + strcpy_s(mName, 33, ""); + strcpy_s(mManufacturer, 17, ""); // Setup rotation - mAudinFlag=false; mRotation=CART_NO_ROTATE; } @@ -380,8 +376,8 @@ bool CCart::ContextLoad(LSS_FILE *fp) bool CCart::ContextLoadLegacy(LSS_FILE *fp) { TRACE_CART0("ContextLoadLegacy()"); - strcpy(mName,"<** IMAGE **>"); - strcpy(mManufacturer,"<** RESTORED **>"); + strcpy_s(mName, 33, "<** IMAGE **>"); + strcpy_s(mManufacturer, 17, "<** RESTORED **>"); char teststr[100]="XXXXXXXXXXXXXXXXXX"; if(!lss_read(teststr,sizeof(char),18,fp)) return 0; if(strcmp(teststr,"CCart::ContextSave")!=0) return 0; diff --git a/handy-win32src-0.95-patched/core/eeprom.cpp b/handy-win32src-0.95-patched/core/eeprom.cpp index 309aeca..d852704 100644 --- a/handy-win32src-0.95-patched/core/eeprom.cpp +++ b/handy-win32src-0.95-patched/core/eeprom.cpp @@ -40,9 +40,12 @@ CEEPROM::~CEEPROM() void CEEPROM::Load(void) { - if(!Available()) return; - FILE *fe; - if((fe=fopen(filename,"rb"))!=NULL){ + if (!Available()) + return; + + FILE* fe; + errno_t err; + if ((err = fopen_s(&fe, filename, "rb")) == 0) { printf("EEPROM LOAD %s\n",filename); fread(romdata,1,1024,fe); fclose(fe); @@ -51,9 +54,12 @@ void CEEPROM::Load(void) void CEEPROM::Save(void) { - if(!Available()) return; - FILE *fe; - if((fe=fopen(filename,"wb+"))!=NULL){ + if (!Available()) + return; + + FILE* fe; + errno_t err; + if ((err = fopen_s(&fe, filename, "wb+")) == 0) { printf("EEPROM SAVE %s\n",filename); fwrite(romdata,1,Size(),fe); fclose(fe); @@ -154,18 +160,18 @@ void CEEPROM::UpdateEeprom(UWORD cnt) { // Update if either counter strobed or AUDIN changed bool CLKp, CLKn; - CLKp=counter&0x02; + CLKp = (counter & 0x02) != 0; counter=cnt; - CLKn=counter&0x02; + CLKn = (counter & 0x02) != 0; if( CLKp!=CLKn && CLKn) { // Rising edge bool CS, DI; mAUDIN_ext=(readdata&(DONE_MASK>>1)) ? 1 : 0 ; readdata<<=1; - CS=cnt&0x80; + CS = (cnt & 0x80) != 0; DI=false; if(iodir&0x10) { - DI=iodat&0x10; + DI = (iodat & 0x10) != 0; } if(!CS) state=EE_NONE; switch(state) { diff --git a/handy-win32src-0.95-patched/core/eeprom.h b/handy-win32src-0.95-patched/core/eeprom.h index 8778775..82d2cfd 100644 --- a/handy-win32src-0.95-patched/core/eeprom.h +++ b/handy-win32src-0.95-patched/core/eeprom.h @@ -29,7 +29,7 @@ class CEEPROM : public CLynxBase }; void SetEEPROMType(UBYTE b); int Size(void); - int InitFrom(char *data,int count){ memcpy(romdata,data,min(count,Size()));}; + int InitFrom(char *data,int count){ memcpy(romdata,data,__min(count,Size()));}; void Poke(ULONG addr,UBYTE data) { }; UBYTE Peek(ULONG addr) @@ -37,8 +37,8 @@ class CEEPROM : public CLynxBase return(0); }; - void SetFilename(char* f){strcpy(filename,f);}; - char* GetFilename(void){ return filename;}; + void SetFilename(char* f) { strcpy_s(filename, 1024, f); }; + char* GetFilename(void) { return filename; }; void Load(void); void Save(void); diff --git a/handy-win32src-0.95-patched/core/error.h b/handy-win32src-0.95-patched/core/error.h index 56f6592..4597492 100644 --- a/handy-win32src-0.95-patched/core/error.h +++ b/handy-win32src-0.95-patched/core/error.h @@ -63,15 +63,15 @@ class CLynxException { int MsgCount,DescCount; - MsgCount = err.Message().pcount() + 1; - DescCount = err.Description().pcount() + 1; + MsgCount = static_cast(err.Message().pcount()) + 1; + DescCount = static_cast(err.Description().pcount()) + 1; if(MsgCount>MAX_ERROR_MSG) MsgCount=MAX_ERROR_MSG; if(DescCount>MAX_ERROR_DESC) DescCount=MAX_ERROR_DESC; - strncpy(mMsg,err.Message().str(),MsgCount); - mMsg[MsgCount-1]='\0'; - strncpy(mDesc,err.Description().str(),DescCount); - mDesc[DescCount-1]='\0'; + strncpy_s(mMsg, MAX_ERROR_MSG, err.Message().str(), MsgCount); + mMsg[MsgCount-1] = '\0'; + strncpy_s(mDesc, MAX_ERROR_DESC, err.Description().str(), DescCount); + mDesc[DescCount-1] = '\0'; } // Destructor diff --git a/handy-win32src-0.95-patched/core/lynxbase.h b/handy-win32src-0.95-patched/core/lynxbase.h index 6fd162c..30d7f26 100644 --- a/handy-win32src-0.95-patched/core/lynxbase.h +++ b/handy-win32src-0.95-patched/core/lynxbase.h @@ -54,14 +54,14 @@ class CLynxBase }; virtual void Poke(ULONG addr,UBYTE data)=0; - virtual UBYTE Peek(ULONG addr)=0; + virtual UBYTE Peek(ULONG addr)=0; virtual void PokeW(ULONG addr,UWORD data) {}; // ONLY mSystem overloads these, they are never use by the clients - virtual UWORD PeekW(ULONG addr) + virtual UWORD PeekW(ULONG addr) { return 0; }; virtual void BankSelect(EMMODE newbank) {}; - virtual ULONG ObjectSize(void) + virtual ULONG ObjectSize(void) { return 1; }; diff --git a/handy-win32src-0.95-patched/core/lynxdec.cpp b/handy-win32src-0.95-patched/core/lynxdec.cpp index 3f8e209..9cf3bd1 100644 --- a/handy-win32src-0.95-patched/core/lynxdec.cpp +++ b/handy-win32src-0.95-patched/core/lynxdec.cpp @@ -229,7 +229,7 @@ int decrypt_frame(unsigned char * result, const unsigned char * public_mod, const int length) { - int i, j; + int i; int blocks; int accumulator; unsigned char* rptr = result; diff --git a/handy-win32src-0.95-patched/core/memfault.h b/handy-win32src-0.95-patched/core/memfault.h index 6eaae5b..1375efc 100644 --- a/handy-win32src-0.95-patched/core/memfault.h +++ b/handy-win32src-0.95-patched/core/memfault.h @@ -27,6 +27,8 @@ #ifndef BADACCESS_H #define BADACCESS_H +#include "lynxbase.h" + class CMemFaultObj : public CLynxBase { // Function members diff --git a/handy-win32src-0.95-patched/core/mikie.cpp b/handy-win32src-0.95-patched/core/mikie.cpp index 4ce9c5f..729bbf5 100644 --- a/handy-win32src-0.95-patched/core/mikie.cpp +++ b/handy-win32src-0.95-patched/core/mikie.cpp @@ -63,7 +63,7 @@ void CMikie::BlowOut(void) char addr[100]; C6502_REGS regs; mSystem.GetRegs(regs); - sprintf(addr,"Runtime Error - System Halted\nCMikie::Poke() - Read/Write to counter clocks at PC=$%04x.",regs.PC); + sprintf_s(addr, 100, "Runtime Error - System Halted\nCMikie::Poke() - Read/Write to counter clocks at PC=$%04x.", regs.PC); gError->Warning(addr); gSystemHalt=TRUE; } @@ -1874,13 +1874,13 @@ void CMikie::Poke(ULONG addr,UBYTE data) char addr[256]; C6502_REGS regs; mSystem.GetRegs(regs); - sprintf(addr,"Runtime Alert - System Halted\nCMikie::Poke(SYSCTL1) - Lynx power down occured at PC=$%04x.\nResetting system.",regs.PC); + sprintf_s(addr, 256, "Runtime Alert - System Halted\nCMikie::Poke(SYSCTL1) - Lynx power down occured at PC=$%04x.\nResetting system.", regs.PC); gError->Warning(addr); mSystem.Reset(); gSystemHalt=TRUE; } mSystem.CartAddressStrobe((data&0x01)?TRUE:FALSE); - if(mSystem.mEEPROM->Available()) mSystem.mEEPROM->ProcessEepromCounter(mSystem.mCart->GetCounterValue()); + if(mSystem.mEEPROM->Available()) mSystem.mEEPROM->ProcessEepromCounter((UWORD) mSystem.mCart->GetCounterValue()); break; case (MIKEYSREV&0xff): @@ -1890,7 +1890,7 @@ void CMikie::Poke(ULONG addr,UBYTE data) case (IODIR&0xff): TRACE_MIKIE2("Poke(IODIR ,%02x) at PC=%04x",data,mSystem.mCpu->GetPC()); mIODIR=data; - if(mSystem.mEEPROM->Available()) mSystem.mEEPROM->ProcessEepromIO(mIODIR,mIODAT); + if(mSystem.mEEPROM->Available()) mSystem.mEEPROM->ProcessEepromIO((UBYTE) mIODIR, (UBYTE) mIODAT); break; case (IODAT&0xff): @@ -1899,7 +1899,7 @@ void CMikie::Poke(ULONG addr,UBYTE data) mSystem.CartAddressData((mIODAT&0x02)?TRUE:FALSE); // Enable cart writes to BANK1 on AUDIN if AUDIN is set to output if(mIODIR&0x10) mSystem.mCart->mWriteEnableBank1=(mIODAT&0x10)?TRUE:FALSE;// there is no reason to use AUDIN as Write Enable or latch. private patch??? TODO - if(mSystem.mEEPROM->Available()) mSystem.mEEPROM->ProcessEepromIO(mIODIR,mIODAT); + if(mSystem.mEEPROM->Available()) mSystem.mEEPROM->ProcessEepromIO((UBYTE) mIODIR, (UBYTE) mIODAT); break; case (SERCTL&0xff): diff --git a/handy-win32src-0.95-patched/core/mikie.h b/handy-win32src-0.95-patched/core/mikie.h index e760c6c..99875ce 100644 --- a/handy-win32src-0.95-patched/core/mikie.h +++ b/handy-win32src-0.95-patched/core/mikie.h @@ -224,11 +224,11 @@ class CMikie : public CLynxBase inline void UpdateSound(void); inline bool SwitchAudInDir(void) { - return(mIODIR&0x10); + return (mIODIR & 0x10) != 0; }; inline bool SwitchAudInValue(void) { - return (mIODAT&0x10); + return (mIODAT & 0x10) != 0; }; private: diff --git a/handy-win32src-0.95-patched/core/rom.cpp b/handy-win32src-0.95-patched/core/rom.cpp index f1161e9..67ed277 100644 --- a/handy-win32src-0.95-patched/core/rom.cpp +++ b/handy-win32src-0.95-patched/core/rom.cpp @@ -59,7 +59,7 @@ CRom::CRom(char *romfile,bool useEmu) { mWriteEnable=FALSE; mValid = TRUE; - strncpy(mFileName,romfile,1024); + strncpy_s(mFileName, 1024, romfile, 1024); Reset(); // Initialise ROM @@ -75,14 +75,13 @@ CRom::CRom(char *romfile,bool useEmu) mRomData[0x1FE]=0x80; mRomData[0x1FF]=0xFF; - if(useEmu){ + if (useEmu) { mValid = FALSE; - }else{ + } else { // Load up the file - - FILE *fp; - - if((fp=fopen(mFileName,"rb"))==NULL) { + FILE* fp; + errno_t err; + if ((err = fopen_s(&fp, mFileName, "rb")) != 0) { CLynxException lynxerr; lynxerr.Message() << "The Lynx Boot ROM image couldn't be located!"; diff --git a/handy-win32src-0.95-patched/core/susie.cpp b/handy-win32src-0.95-patched/core/susie.cpp index de27bc0..a5547f6 100644 --- a/handy-win32src-0.95-patched/core/susie.cpp +++ b/handy-win32src-0.95-patched/core/susie.cpp @@ -944,9 +944,9 @@ ULONG CSusie::PaintSprites(void) } // Perform Sprite debugging if required, single step on sprite draw - if(gSingleStepModeSprites) { + if (gSingleStepModeSprites) { char message[256]; - sprintf(message,"CSusie:PaintSprites() - Rendered Sprite %03d",sprcount); + sprintf_s(message, 256, "CSusie:PaintSprites() - Rendered Sprite %03d", sprcount); if(!gError->Warning(message)) gSingleStepModeSprites=0; } } else { @@ -1786,7 +1786,7 @@ void CSusie::Poke(ULONG addr,UBYTE data) } else { mSystem.Poke_CARTB0(data); } - mSystem.mEEPROM->ProcessEepromCounter(mSystem.mCart->GetCounterValue()); + mSystem.mEEPROM->ProcessEepromCounter((UWORD) mSystem.mCart->GetCounterValue()); TRACE_SUSIE2("Poke(RCART0,%02x) at PC=$%04x",data,mSystem.mCpu->GetPC()); break; case (RCART1&0xff): @@ -1795,7 +1795,7 @@ void CSusie::Poke(ULONG addr,UBYTE data) } else { mSystem.Poke_CARTB1(data); } - mSystem.mEEPROM->ProcessEepromCounter(mSystem.mCart->GetCounterValue()); + mSystem.mEEPROM->ProcessEepromCounter((UWORD) mSystem.mCart->GetCounterValue()); TRACE_SUSIE2("Poke(RCART1,%02x) at PC=$%04x",data,mSystem.mCpu->GetPC()); break; @@ -2193,7 +2193,7 @@ UBYTE CSusie::Peek(ULONG addr) } else { retval=mSystem.Peek_CARTB0(); } - mSystem.mEEPROM->ProcessEepromCounter(mSystem.mCart->GetCounterValue()); + mSystem.mEEPROM->ProcessEepromCounter((UWORD) mSystem.mCart->GetCounterValue()); // TRACE_SUSIE2("Peek(RCART0)=$%02x at PC=$%04x",retval,mSystem.mCpu->GetPC()); return retval; break; @@ -2203,7 +2203,7 @@ UBYTE CSusie::Peek(ULONG addr) } else { retval=mSystem.Peek_CARTB1(); } - mSystem.mEEPROM->ProcessEepromCounter(mSystem.mCart->GetCounterValue()); + mSystem.mEEPROM->ProcessEepromCounter((UWORD)mSystem.mCart->GetCounterValue()); // TRACE_SUSIE2("Peek(RCART1)=$%02x at PC=$%04x",retval,mSystem.mCpu->GetPC()); return retval; break; diff --git a/handy-win32src-0.95-patched/core/system.cpp b/handy-win32src-0.95-patched/core/system.cpp index 886cbeb..c5a89eb 100644 --- a/handy-win32src-0.95-patched/core/system.cpp +++ b/handy-win32src-0.95-patched/core/system.cpp @@ -215,11 +215,10 @@ CSystem::CSystem(char* gamefile,char* romfile, bool useEmu) throw(lynxerr); } } else { - // Open the file and load the file - FILE *fp; - // Open the cartridge file for reading - if((fp=fopen(gamefile,"rb"))==NULL) { + FILE* fp; + errno_t err; + if ((err = fopen_s(&fp, gamefile, "rb")) != 0) { CLynxException lynxerr; lynxerr.Message() << "Handy Error: File Open Error"; @@ -295,16 +294,17 @@ CSystem::CSystem(char* gamefile,char* romfile, bool useEmu) if(mCart->CartHeaderLess()) { // veryvery strange Howard Check CANNOT work, as there are two different loader-less card types... // unclear HOW this should do anything useful... - FILE *fp; char drive[3],dir[256],cartgo[256]; mFileType=HANDY_FILETYPE_HOMEBREW; - _splitpath(romfile,drive,dir,NULL,NULL); - strcpy(cartgo,drive); - strcat(cartgo,dir); - strcat(cartgo,"howard.o"); + _splitpath_s(romfile, drive, 3, dir, 256, NULL, 0, NULL, 0); + strcpy_s(cartgo, 256, drive); + strcat_s(cartgo, 256, dir); + strcat_s(cartgo, 256, "howard.o"); // Open the howard file for reading - if((fp=fopen(cartgo,"rb"))==NULL) { + FILE* fp; + errno_t err; + if ((err = fopen_s(&fp, cartgo, "rb")) != 0) { CLynxException lynxerr; delete filememory; lynxerr.Message() << "Handy Error: Howard.o File Open Error"; @@ -387,8 +387,8 @@ CSystem::CSystem(char* gamefile,char* romfile, bool useEmu) { char eepromfile[1024]; - strncpy(eepromfile, gamefile,1024-10); - strcat(eepromfile,".eeprom"); + strncpy_s(eepromfile, 1024, gamefile, 1024-10); + strcat_s(eepromfile, 1024, ".eeprom"); mEEPROM->SetFilename(eepromfile); printf("filename %d %s %s\n",mCart->mEEPROMType,gamefile,eepromfile); mEEPROM->Load(); @@ -397,17 +397,18 @@ CSystem::CSystem(char* gamefile,char* romfile, bool useEmu) void CSystem::SaveEEPROM(void) { - if(mEEPROM!=NULL) mEEPROM->Save(); + if (mEEPROM !=NULL) + mEEPROM->Save(); } CSystem::~CSystem() { // Cleanup all our objects - - if(mEEPROM!=NULL){ + if (mEEPROM != NULL){ SaveEEPROM(); delete mEEPROM; } + if(mCart!=NULL) delete mCart; if(mRom!=NULL) delete mRom; if(mRam!=NULL) delete mRam; @@ -420,9 +421,9 @@ CSystem::~CSystem() bool CSystem::IsZip(char *filename) { UBYTE buf[2]; - FILE *fp; - - if((fp=fopen(filename,"rb"))!=NULL) { + FILE* fp; + errno_t err; + if ((err = fopen_s(&fp, filename, "rb")) == 0) { fread(buf, 2, 1, fp); fclose(fp); return(memcmp(buf,"PK",2)==0); @@ -450,7 +451,8 @@ void CSystem::HLE_BIOS_FE19(void) mRam->Poke(0x0005,0x00); mRam->Poke(0x0006,0x02); // Call to $FE00 - mCart->SetShifterValue(0); + if (mCart) + mCart->SetShifterValue(0); // Fallthrou $FE4A HLE_BIOS_FE4A(); } @@ -463,18 +465,21 @@ void CSystem::HLE_BIOS_FE4A(void) unsigned char buff[256];// maximum 5 blocks unsigned char res[256]; - buff[0]=mCart->Peek0(); - int blockcount = 0x100 - buff[0]; + buff[0] = mCart->Peek0(); - for (int i = 1; i < 1+51*blockcount; ++i) { // first encrypted loader - buff[i] = mCart->Peek0(); - } + int blockcount = 0x100 - buff[0]; + if (blockcount > 5) + return; + + for (int i = 1; i < 1 + 51 * blockcount; ++i) { // first encrypted loader + buff[i] = mCart->Peek0(); + } - lynx_decrypt(res, buff, 51); + lynx_decrypt(res, buff, 51); - for (int i = 0; i < 50*blockcount; ++i) { - Poke_CPU(addr++, res[i]); - } + for (int i = 0; i < 50 * blockcount; ++i) { + Poke_CPU(addr++, res[i]); + } // Load Block(s), decode to ($05,$06) // jmp $200 @@ -520,7 +525,6 @@ void CSystem::Reset(void) mMemMap->Reset(); mCart->Reset(); - mEEPROM->Reset(); mRom->Reset(); mRam->Reset(); mMikie->Reset(); @@ -563,12 +567,19 @@ void CSystem::Reset(void) } } +void CSystem::ResetEeprom(void) { + mEEPROM->Reset(); +} + bool CSystem::ContextSave(char *context) { - FILE *fp; bool status=1; - if((fp=fopen(context,"wb"))==NULL) return false; + FILE* fp; + errno_t err; + if ((err = fopen_s(&fp, context, "wb")) != 0) { + return false; + } if(!fprintf(fp,LSS_VERSION)) status=0; @@ -701,9 +712,12 @@ bool CSystem::ContextLoad(char *context) } } else { - FILE *fp; // Just open an read into memory - if((fp=fopen(context,"rb"))==NULL) status=0; + FILE* fp; + errno_t err; + if ((err = fopen_s(&fp, context, "rb")) != 0) { + status = 0; + } fseek(fp,0,SEEK_END); filesize=ftell(fp); @@ -803,7 +817,7 @@ void CSystem::DebugTrace(int address) char message[1024+1]; int count=0; - sprintf(message,"%08x - DebugTrace(): ",gSystemCycleCount); + sprintf_s(message, 1024 + 1, "%08x - DebugTrace(): ", gSystemCycleCount); count=strlen(message); if(address) { @@ -812,8 +826,8 @@ void CSystem::DebugTrace(int address) char linetext[1024]; // Register dump GetRegs(regs); - sprintf(linetext,"PC=$%04x SP=$%02x PS=0x%02x A=0x%02x X=0x%02x Y=0x%02x",regs.PC,regs.SP, regs.PS,regs.A,regs.X,regs.Y); - strcat(message,linetext); + sprintf_s(linetext, 1024, "PC=$%04x SP=$%02x PS=0x%02x A=0x%02x X=0x%02x Y=0x%02x",regs.PC,regs.SP, regs.PS,regs.A,regs.X,regs.Y); + strcat_s(message, 1024 + 1, linetext); count=strlen(message); } else { // The RAM address contents should be dumped to an open debug file in this function @@ -822,7 +836,7 @@ void CSystem::DebugTrace(int address) } while(count<1024 && Peek_RAM(address++)!=0); } } else { - strcat(message,"CPU Breakpoint"); + strcat_s(message, 1024 + 1, "CPU Breakpoint"); count=strlen(message); } message[count]=0; diff --git a/handy-win32src-0.95-patched/core/system.h b/handy-win32src-0.95-patched/core/system.h index 65de113..d7c4d13 100644 --- a/handy-win32src-0.95-patched/core/system.h +++ b/handy-win32src-0.95-patched/core/system.h @@ -195,6 +195,7 @@ class CSystem : public CSystemBase void HLE_BIOS_FE4A(void); void HLE_BIOS_FF80(void); void Reset(void); + void ResetEeprom(void); bool ContextSave(char *context); bool ContextLoad(char *context); bool IsZip(char *filename); diff --git a/handy-win32src-0.95-patched/gui-windows/CodeWin.h b/handy-win32src-0.95-patched/gui-windows/CodeWin.h index 9db7c3d..06f5724 100644 --- a/handy-win32src-0.95-patched/gui-windows/CodeWin.h +++ b/handy-win32src-0.95-patched/gui-windows/CodeWin.h @@ -45,14 +45,11 @@ #ifndef CODEWIN_H #define CODEWIN_H +#ifdef _LYNXDBG -#include -#include "resource.h" #include "../core/system.h" -#include "dmpwndlg.h" - -#ifdef _LYNXDBG +class CSystem; class CCodeWin : public CFrameWnd { diff --git a/handy-win32src-0.95-patched/gui-windows/Codewin.cpp b/handy-win32src-0.95-patched/gui-windows/Codewin.cpp index 8a7908a..de2fe07 100644 --- a/handy-win32src-0.95-patched/gui-windows/Codewin.cpp +++ b/handy-win32src-0.95-patched/gui-windows/Codewin.cpp @@ -44,8 +44,14 @@ // // ////////////////////////////////////////////////////////////////////////////// +#include #include "codewin.h" + +#include "../core/system.h" #include "../core/dis6502.h" + +#include "dmpwndlg.h" +#include "resource.h" #include "widget.h" //#ifdef _DEBUG @@ -350,16 +356,16 @@ void CCodeWin::OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags) { int current_address,address; CString line,dump,sprot; - FILE *fout; - - fout=fopen("code.txt","w"); + + FILE* fout; + fopen_s(&fout, "code.txt", "w"); for(address=0;address<65536;) { line=""; current_address=address; address=Disassemble2(line,address); - fprintf(fout,"%s\n",line); + fprintf(fout,"%s\n", (LPCTSTR)line); } fclose(fout); @@ -483,12 +489,13 @@ void CCodeWin::OnLButtonDblClk(UINT nFlags, CPoint point) C6502_REGS regs; mSystem.GetRegs(regs); - for(int loop=0;loop=MAX_CPU_BREAKPOINTS) { // New breakpoint at next free diff --git a/handy-win32src-0.95-patched/gui-windows/Debugger.cpp b/handy-win32src-0.95-patched/gui-windows/Debugger.cpp index 06f351e..c35072a 100644 --- a/handy-win32src-0.95-patched/gui-windows/Debugger.cpp +++ b/handy-win32src-0.95-patched/gui-windows/Debugger.cpp @@ -28,15 +28,18 @@ #include #include #include + +#include "debugger.h" + #include "../core/system.h" #include "../core/error.h" + #include "debuggerwin.h" #include "tracedlg.h" #include "tracewin.h" #include "dumpwin.h" #include "codewin.h" #include "gfxwin.h" -#include "debugger.h" //#ifdef _DEBUG //#undef THIS_FILE diff --git a/handy-win32src-0.95-patched/gui-windows/Debugger.h b/handy-win32src-0.95-patched/gui-windows/Debugger.h index 916b339..cc4bb84 100644 --- a/handy-win32src-0.95-patched/gui-windows/Debugger.h +++ b/handy-win32src-0.95-patched/gui-windows/Debugger.h @@ -27,6 +27,7 @@ #ifndef DEBUGGER_H #define DEBUGGER_H +class CSystem; #define MAX_DEBUGGER_WIN 1 #define MAX_TRACE_WIN 1 diff --git a/handy-win32src-0.95-patched/gui-windows/Debuggerwin.cpp b/handy-win32src-0.95-patched/gui-windows/Debuggerwin.cpp index 54e51ca..56334d2 100644 --- a/handy-win32src-0.95-patched/gui-windows/Debuggerwin.cpp +++ b/handy-win32src-0.95-patched/gui-windows/Debuggerwin.cpp @@ -48,10 +48,10 @@ #include "color.h" #include "colorstatic.h" #include "debuggerwin.h" -#include "editline.h" #include "displine.h" -#include "widget.h" +#include "editline.h" #include "resource.h" +#include "widget.h" //#ifdef _DEBUG @@ -363,8 +363,8 @@ bool CDebuggerWin::ExecCommand(char *linetext) }; // Dump back to the edit window - strcpy(tmptext,">"); - strncat(tmptext,linetext,MAX_LINE_SIZE-1); + strcpy_s(tmptext, MAX_LINE_SIZE + 1, ">"); + strncat_s(tmptext, MAX_LINE_SIZE + 1, linetext, MAX_LINE_SIZE-1); tmptext[MAX_LINE_SIZE]=0; LineOutput(tmptext); @@ -512,7 +512,8 @@ bool CDebuggerWin::ExecCommand(char *linetext) void CDebuggerWin::LineOutput(char *text) { - char wintext[MAX_LINE_BUFFERS*(MAX_LINE_SIZE+1)]; + const int winTextSize = MAX_LINE_BUFFERS * (MAX_LINE_SIZE + 1); + char wintext[winTextSize]; char winline[MAX_LINE_SIZE+1]; if(mpLogFile) @@ -529,14 +530,14 @@ void CDebuggerWin::LineOutput(char *text) mLineBuffer[loop]=mLineBuffer[loop+1]; } mLineBuffer[MAX_LINE_BUFFERS-1]=tmpline; - strncpy(mLineBuffer[MAX_LINE_BUFFERS-1],text,MAX_LINE_SIZE); + strncpy_s(mLineBuffer[MAX_LINE_BUFFERS-1], MAX_LINE_SIZE+1, text, MAX_LINE_SIZE); mLineBuffer[MAX_LINE_BUFFERS-1][MAX_LINE_SIZE]=0; } else { char *newbuf; newbuf = new char[MAX_LINE_SIZE+1]; - strncpy(newbuf,text,MAX_LINE_SIZE); + strncpy_s(newbuf, MAX_LINE_SIZE + 1, text, MAX_LINE_SIZE); newbuf[MAX_LINE_SIZE]=0; mLineBuffer[mLineInput++]=newbuf; } @@ -544,15 +545,15 @@ void CDebuggerWin::LineOutput(char *text) // Dump the line buffers into the window text - wintext[0]=0; + wintext[0] = 0; int loop; - for(loop=0;loopSetWindowText(wintext); @@ -587,7 +588,8 @@ bool CDebuggerWin::CommandLog(int argc, char **argv) else { // Start logging - if((mpLogFile=fopen(argv[1],"wt"))==NULL) + errno_t err; + if ((err = fopen_s(&mpLogFile, argv[1], "wt")) != 0) { LineOutput("Error Creating Log file"); return true; @@ -638,12 +640,12 @@ bool CDebuggerWin::CommandBpoint(int argc, char **argv) { if(regs.cpuBreakpoints[loop]>0xffff) { - sprintf(tmptext,"BP%02x - Unset",loop); + sprintf_s(tmptext, MAX_LINE_SIZE + 1, "BP%02x - Unset", loop); LineOutput(tmptext); } else { - sprintf(tmptext,"BP%02x - $%04x",loop,regs.cpuBreakpoints[loop]); + sprintf_s(tmptext, MAX_LINE_SIZE + 1, "BP%02x - $%04x", loop, regs.cpuBreakpoints[loop]); LineOutput(tmptext); } } @@ -658,12 +660,12 @@ bool CDebuggerWin::CommandBpoint(int argc, char **argv) { if(regs.cpuBreakpoints[bpn]>0xffff) { - sprintf(tmptext,"BP%02x - Unset",bpn); + sprintf_s(tmptext, MAX_LINE_SIZE + 1, "BP%02x - Unset", bpn); LineOutput(tmptext); } else { - sprintf(tmptext,"BP%02x - $%04x",bpn,regs.cpuBreakpoints[bpn]); + sprintf_s(tmptext, MAX_LINE_SIZE + 1, "BP%02x - $%04x", bpn, regs.cpuBreakpoints[bpn]); LineOutput(tmptext); } } @@ -713,7 +715,6 @@ bool CDebuggerWin::CommandBpoint(int argc, char **argv) bool CDebuggerWin::CommandScript(int argc, char **argv) { UBYTE data; - FILE *fp; if(argc!=2) { @@ -722,7 +723,9 @@ bool CDebuggerWin::CommandScript(int argc, char **argv) } else { - if((fp=fopen(argv[1],"rt"))!=NULL) + FILE* fp; + errno_t err; + if ((err = fopen_s(&fp, argv[1], "rt")) == 0) { while(1) { @@ -877,7 +880,7 @@ bool CDebuggerWin::CommandSearch(int argc, char **argv) char tmptext[MAX_LINE_SIZE+1]; //We found something - sprintf(tmptext,"Match at 0x%04x",addr); + sprintf_s(tmptext, MAX_LINE_SIZE + 1, "Match at 0x%04x", addr); LineOutput(tmptext); search_matches++; @@ -959,13 +962,13 @@ bool CDebuggerWin::CommandMemDump(int argc, char **argv) for(loop=0;loop>8); offset=addr%(mSystem.CartSize()>>8); - sprintf(linetext,"%02x:%03x ",page,offset); + sprintf_s(linetext, MAX_LINE_SIZE + 1, "%02x:%03x ", page, offset); for(loop2=0;loop2<16;loop2++) { char cliptext[MAX_LINE_SIZE+1]; - sprintf(cliptext," %02x",mSystem.Peek_CART(addr+loop2)); - strcat(linetext,cliptext); + sprintf_s(cliptext, MAX_LINE_SIZE + 1, " %02x", mSystem.Peek_CART(addr+loop2)); + strcat_s(linetext, MAX_LINE_SIZE + 1, cliptext); } addr+=16; LineOutput(linetext); @@ -1150,7 +1155,6 @@ bool CDebuggerWin::CommandCartLoad(int argc, char **argv) { ULONG addr; UBYTE data; - FILE *fp; if(argc!=3) { @@ -1161,7 +1165,9 @@ bool CDebuggerWin::CommandCartLoad(int argc, char **argv) { if((addr=GetLongFromString(argv[1],0xffffff))!=0xffffffff) { - if((fp=fopen(argv[2],"rb"))!=NULL) + FILE* fp; + errno_t err; + if ((err = fopen_s(&fp, argv[2], "rb")) == 0) { mSystem.mCart->BankSelect(bank0); mSystem.mCart->mWriteEnableBank0=TRUE; @@ -1192,7 +1198,6 @@ bool CDebuggerWin::CommandCartSave(int argc, char **argv) { ULONG saddr,eaddr,addr; UBYTE data; - FILE *fp; if(argc!=4) { @@ -1203,7 +1208,9 @@ bool CDebuggerWin::CommandCartSave(int argc, char **argv) { if((saddr=GetLongFromString(argv[1],0xffffff))!=0xffffffff && (eaddr=GetLongFromString(argv[2],0xffffff))!=0xffffffff) { - if((fp=fopen(argv[3],"wb"))!=NULL) + FILE* fp; + errno_t err; + if ((err = fopen_s(&fp, argv[3], "wb")) == 0) { // Write loop for(addr=saddr;addr<=eaddr;addr++) @@ -1286,7 +1293,7 @@ bool CDebuggerWin::CommandExecute(int argc, char **argv) } else { - spawnvp(_P_WAIT,argv[1],&argv[1]); + _spawnvp(_P_WAIT,argv[1],&argv[1]); } return true; } @@ -1305,7 +1312,7 @@ bool CDebuggerWin::CommandRegisters(int argc, char **argv) { char linetext[MAX_LINE_SIZE+1]; mSystem.GetRegs(regs); - sprintf(linetext,"PC=$%04x SP=$%02x PS=0x%02x A=0x%02x X=0x%02x Y=0x%02x",regs.PC,regs.SP, regs.PS,regs.A,regs.X,regs.Y); + sprintf_s(linetext, MAX_LINE_SIZE + 1, "PC=$%04x SP=$%02x PS=0x%02x A=0x%02x X=0x%02x Y=0x%02x",regs.PC,regs.SP, regs.PS,regs.A,regs.X,regs.Y); LineOutput(linetext); } else diff --git a/handy-win32src-0.95-patched/gui-windows/Debuggerwin.h b/handy-win32src-0.95-patched/gui-windows/Debuggerwin.h index 31937d4..cb8e358 100644 --- a/handy-win32src-0.95-patched/gui-windows/Debuggerwin.h +++ b/handy-win32src-0.95-patched/gui-windows/Debuggerwin.h @@ -47,13 +47,13 @@ #include -#include "resource.h" #include "../core/system.h" #include "color.h" #include "colorstatic.h" -#include "editline.h" #include "displine.h" #include "dmpwndlg.h" +#include "editline.h" +#include "resource.h" #define MAX_LINE_BUFFERS 500 #define MAX_LINE_SIZE 120 diff --git a/handy-win32src-0.95-patched/gui-windows/DirectSoundPlayer.cpp b/handy-win32src-0.95-patched/gui-windows/DirectSoundPlayer.cpp index d1e7973..2dcb653 100644 --- a/handy-win32src-0.95-patched/gui-windows/DirectSoundPlayer.cpp +++ b/handy-win32src-0.95-patched/gui-windows/DirectSoundPlayer.cpp @@ -156,7 +156,7 @@ bool CDirectSoundPlayer::Start() // Now create the multimedia timer object to play sounds without polling - if((m_TimerID=timeSetEvent(25,0,TimerCallBack,(DWORD)this ,TIME_PERIODIC))==NULL) + if((m_TimerID=timeSetEvent(50,0,TimerCallBack,(DWORD)this ,TIME_PERIODIC))==NULL) { gError->Warning("CDirectSoundPlayer::Start - Error: \n timeSetEvent returned an error"); m_AudioEnabled=FALSE; @@ -170,7 +170,7 @@ bool CDirectSoundPlayer::Start() // Attempt to restore lost buffer hr=m_BufferPrimary->Restore(); } - + if(hr!=DS_OK) { CString message ("CDirectSoundPlayer::Start - Error: \n"); diff --git a/handy-win32src-0.95-patched/gui-windows/DispLine.cpp b/handy-win32src-0.95-patched/gui-windows/DispLine.cpp index 76f60ee..5793076 100644 --- a/handy-win32src-0.95-patched/gui-windows/DispLine.cpp +++ b/handy-win32src-0.95-patched/gui-windows/DispLine.cpp @@ -30,8 +30,8 @@ #include #include "displine.h" -#include "resource.h" #include "debuggerwin.h" +#include "resource.h" #ifdef _LYNXDBG diff --git a/handy-win32src-0.95-patched/gui-windows/Dmpwndlg.cpp b/handy-win32src-0.95-patched/gui-windows/Dmpwndlg.cpp index c36b955..f725904 100644 --- a/handy-win32src-0.95-patched/gui-windows/Dmpwndlg.cpp +++ b/handy-win32src-0.95-patched/gui-windows/Dmpwndlg.cpp @@ -43,7 +43,6 @@ ////////////////////////////////////////////////////////////////////////////// #include "afxwin.h" -#include "resource.h" #include "../core/machine.h" #include "dmpwndlg.h" #include "dumpwin.h" diff --git a/handy-win32src-0.95-patched/gui-windows/Dmpwndlg.h b/handy-win32src-0.95-patched/gui-windows/Dmpwndlg.h index d0f23d8..afdeb41 100644 --- a/handy-win32src-0.95-patched/gui-windows/Dmpwndlg.h +++ b/handy-win32src-0.95-patched/gui-windows/Dmpwndlg.h @@ -45,6 +45,8 @@ #ifndef DMPWINDLG_H #define DMPWINDLG_H +#include "resource.h" + class CDumpWinDlg : public CDialog { // Construction diff --git a/handy-win32src-0.95-patched/gui-windows/DumpWin.h b/handy-win32src-0.95-patched/gui-windows/DumpWin.h index 40e8021..8ae8afa 100644 --- a/handy-win32src-0.95-patched/gui-windows/DumpWin.h +++ b/handy-win32src-0.95-patched/gui-windows/DumpWin.h @@ -47,10 +47,10 @@ #include -#include "hexedit.h" -#include "resource.h" #include "../core/system.h" #include "dmpwndlg.h" +#include "hexedit.h" +#include "resource.h" #ifdef _LYNXDBG diff --git a/handy-win32src-0.95-patched/gui-windows/Dumpwin.cpp b/handy-win32src-0.95-patched/gui-windows/Dumpwin.cpp index 42315bb..4139c46 100644 --- a/handy-win32src-0.95-patched/gui-windows/Dumpwin.cpp +++ b/handy-win32src-0.95-patched/gui-windows/Dumpwin.cpp @@ -319,10 +319,10 @@ void CDumpWin::OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags) { int address=0; CString line,dump,sprot; - FILE *fout; UBYTE data; - fout=fopen("dump.txt","w"); + FILE* fout; + fopen_s(&fout, "dump.txt", "w"); for(int loop=0;loop<(65536/DUMPWIN_WIDTH);loop++) { @@ -342,7 +342,7 @@ void CDumpWin::OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags) line.MakeUpper(); line+=dump; - fprintf(fout,"%s\n",line); + fprintf(fout, "%s\n", (LPCTSTR) line); address+=DUMPWIN_WIDTH; } fclose(fout); diff --git a/handy-win32src-0.95-patched/gui-windows/EditLine.cpp b/handy-win32src-0.95-patched/gui-windows/EditLine.cpp index a50f726..9d25636 100644 --- a/handy-win32src-0.95-patched/gui-windows/EditLine.cpp +++ b/handy-win32src-0.95-patched/gui-windows/EditLine.cpp @@ -40,9 +40,9 @@ CEditLine::CEditLine() mHistoryLast=-1; mHistoryMax=0; - for(int loop=0;loopGetProfileInt(REGISTRY_VERSION,"DisplayBackgroundType", IDB_BITMAP_BACKGROUND3); - if(mDisplayBackgroundType!=IDB_BITMAP_BACKGROUND1 && mDisplayBackgroundType!=IDB_BITMAP_BACKGROUND2 && mDisplayBackgroundType!=IDB_BITMAP_BACKGROUND3) mDisplayBackgroundType=IDB_BITMAP_BACKGROUND1; - if(!mDisplayBackground.LoadBitmap(mDisplayBackgroundType)) return; + mDisplayBackgroundType = mpLynxApp->GetProfileInt(REGISTRY_VERSION,"DisplayBackgroundType", IDB_BITMAP_BACKGROUND3); + if (mDisplayBackgroundType != IDB_BITMAP_BACKGROUND1 && mDisplayBackgroundType != IDB_BITMAP_BACKGROUND2 && mDisplayBackgroundType != IDB_BITMAP_BACKGROUND3) { + mDisplayBackgroundType = IDB_BITMAP_BACKGROUND1; + } + if (!mDisplayBackground.LoadBitmap(mDisplayBackgroundType)) + return; // Flag use original boot rom, defaults to emulation mUseBootRom = mpLynxApp->GetProfileInt(REGISTRY_VERSION, "UseBootRom", 0); @@ -109,9 +111,7 @@ CLynxWindow::CLynxWindow(CString gamefile) mpNetLynx=NULL; // Read the default window position from the registry - CRect rect=rectDefault; - rect.left=mpLynxApp->GetProfileInt(REGISTRY_VERSION,"MainWindowX1", rectDefault.left); rect.top=mpLynxApp->GetProfileInt(REGISTRY_VERSION,"MainWindowY1", rectDefault.top); @@ -124,9 +124,7 @@ CLynxWindow::CLynxWindow(CString gamefile) // Create our window OVERLAPPEDWINDOW - THICKFRAME (No resize) Create(NULL,"Handy",WS_OVERLAPPED|WS_CAPTION|WS_SYSMENU|WS_MINIMIZEBOX,rect,NULL,MAKEINTRESOURCE(IDR_MAINFRAME)); - // // Create an invisible dialog for emulator info - // mInfoDialogEnable=0; mInfoDialog.Create(IDD_INFO_BOX,this); mInfoDialog.ShowWindow(SW_HIDE); @@ -136,9 +134,7 @@ CLynxWindow::CLynxWindow(CString gamefile) ctlspeed.SetRange(1,500); ctlspeed.SetPos(gThrottleMaxPercentage); - // // Initialise/Hide the debugging menu if debugging is disabled - // #ifdef _LYNXDBG mpDebugger=NULL; gSingleStepModeSprites=mpLynxApp->GetProfileInt(REGISTRY_VERSION,"DebugSpriteStep",FALSE); @@ -148,58 +144,46 @@ CLynxWindow::CLynxWindow(CString gamefile) #endif // Load our icon - HICON hIcon = AfxGetApp()->LoadIcon(IDI_ICON1); SetIcon(hIcon,TRUE); // Load the keyboard accelerator table - LoadAccelTable(MAKEINTRESOURCE(IDR_ACCELERATOR1)); // Setup the root directory path - GetCurrentDirectory(256,mRootPath.GetBuffer(256)); mRootPath.ReleaseBuffer(); mRootPath+="\\"; - // // Finally make the lynx emulator object now all the windoze shit is done - // - mCommandLineMode=(strcmp(gamefile,""))?TRUE:FALSE; - if((mpLynx=CreateLynx(gamefile))==NULL) { return; } -// -// Set the video mode, create device contexts -// + // Set the video mode, create device contexts ULONG render=mpLynxApp->GetProfileInt(REGISTRY_VERSION,"DisplayModeRender",DISPLAY_WINDOWED)&DISPLAY_RENDER_MASK; ULONG magnify=mpLynxApp->GetProfileInt(REGISTRY_VERSION,"DisplayModeMagnification",DISPLAY_X1)&DISPLAY_X_MASK; ULONG rotate=DISPLAY_NO_ROTATE; ULONG bkgnd=mpLynxApp->GetProfileInt(REGISTRY_VERSION,"DisplayModeBackground",DISPLAY_BKGND); if(mpLynx->CartGetRotate()==CART_ROTATE_LEFT) rotate=DISPLAY_ROTATE_LEFT; if(mpLynx->CartGetRotate()==CART_ROTATE_RIGHT) rotate=DISPLAY_ROTATE_RIGHT; -// Allow boot into fullscreen - if(render==DISPLAY_FULLSCREEN || render==DISPLAY_EAGLE_FULLSCREEN || render==DISPLAY_LYNXLCD_FULLSCREEN) render=DISPLAY_WINDOWED; + + // Allow boot into fullscreen - if(render==DISPLAY_FULLSCREEN || render==DISPLAY_EAGLE_FULLSCREEN || render==DISPLAY_LYNXLCD_FULLSCREEN) render=DISPLAY_WINDOWED; mDisplayMode=DisplayModeSet(render,bkgnd,magnify,rotate); -// -// Create a Multimedia timer for speed throttling/calculation -// + // Create a Multimedia timer for speed throttling/calculation if((mTimerID=timeSetEvent(1000/HANDY_TIMER_FREQ,0,(LPTIMECALLBACK)fTimerEventHandler,(DWORD)this,TIME_PERIODIC))==NULL) { gError->Fatal("CLynxWindow::CLynxWindow() - Couldn't initialise Multimedia timer ???"); } // Create a sound object - mDirectSoundPlayer.Create(this,gAudioBuffer,&gAudioBufferPointer,HANDY_AUDIO_BUFFER_SIZE,HANDY_AUDIO_SAMPLE_FREQ); if(mpLynxApp->GetProfileInt(REGISTRY_VERSION,"AudioEnabled",FALSE)) gAudioEnabled=mDirectSoundPlayer.Start(); // Enable the joystick if required - mJoystickEnable=FALSE; if(mpLynxApp->GetProfileInt(REGISTRY_VERSION,"JoystickEnabled",FALSE)) OnJoystickMenuSelect(); @@ -520,8 +504,29 @@ void CLynxWindow::CalcWindowSize(CRect *rect) if(win_widthleft=0; @@ -877,6 +882,7 @@ BEGIN_MESSAGE_MAP(CLynxWindow,CFrameWnd) ON_UPDATE_COMMAND_UI(IDM_HELP_INFO,OnInfoMenuUpdate) ON_COMMAND(IDM_HELP_ABOUT, OnAboutBoxSelect) ON_COMMAND(IDM_OPTIONS_RESET, OnResetMenuSelect) + ON_COMMAND(IDM_OPTIONS_RESETEEPROM, OnResetEepromMenuSelect) ON_COMMAND(IDM_OPTIONS_BACKGROUND, OnBkgndMenuSelect) ON_UPDATE_COMMAND_UI(IDM_OPTIONS_BACKGROUND, OnBkgndMenuUpdate) ON_COMMAND(IDM_OPTIONS_USEBOOTROM, OnBootromMenuSelect) @@ -1001,7 +1007,7 @@ void CLynxWindow::OnTimer(UINT nIDEvent) { surfDesc->GetDC(&fullscnHDC); fullscnCDC = CDC::FromHandle (fullscnHDC); - sprintf(info,"%%=%03d F=%03d FSkip=%01d",mEmulationSpeed,mFramesPerSecond,mFrameSkip); + sprintf_s(info, 40, "%%=%03d F=%03d FSkip=%01d", mEmulationSpeed, mFramesPerSecond, mFrameSkip); TextOut(fullscnHDC,0,0,info,strlen(info)); surfDesc->ReleaseDC(fullscnHDC); } @@ -1750,6 +1756,14 @@ void CLynxWindow::OnResetMenuSelect() Invalidate(FALSE); } +void CLynxWindow::OnResetEepromMenuSelect() +{ + mpLynx->ResetEeprom(); + mpLynx->Reset(); + OnDebuggerUpdate(); + Invalidate(FALSE); +} + void CLynxWindow::OnPauseMenuSelect() { if(!gSystemHalt) @@ -2116,12 +2130,12 @@ void CLynxWindow::OnGraphicsMenuSelect() void CLynxWindow::OnRAMDumpMenuSelect() { - FILE *fp; - - if((fp=fopen("lynxram.bin","wb"))!=NULL) + FILE* fp; + errno_t err; + if ((err = fopen_s(&fp, "lynxram.bin", "wb")) == 0) { int loop; - for(loop=0;loop<65536;loop++) + for (loop=0; loop<65536; loop++) { UBYTE data; data=mpLynx->Peek_RAM(loop); diff --git a/handy-win32src-0.95-patched/gui-windows/Lynxwin.h b/handy-win32src-0.95-patched/gui-windows/Lynxwin.h index 6741c34..42e30d4 100644 --- a/handy-win32src-0.95-patched/gui-windows/Lynxwin.h +++ b/handy-win32src-0.95-patched/gui-windows/Lynxwin.h @@ -49,21 +49,21 @@ #include #include #include +#include "../core/system.h" +#include "aboutdlg.h" +#include "debugger.h" +#include "directsoundplayer.h" #include "directx.h" #include "fullscreendirectx.h" #include "fullscreenlcd.h" #include "fullscreeneagle.h" +#include "keydefs.h" +#include "netobj.h" +#include "resource.h" #include "windowdirectx.h" +#include "windoweagle.h" #include "windowgdi.h" #include "windowlcd.h" -#include "windoweagle.h" -#include "directsoundplayer.h" -#include "resource.h" -#include "aboutdlg.h" -#include "keydefs.h" -#include "../core/system.h" -#include "netobj.h" -#include "debugger.h" #ifdef TRACE_LYNXWIN @@ -313,6 +313,7 @@ class CLynxWindow : public CFrameWnd afx_msg void OnInfoMenuUpdate(CCmdUI *pCmdUI); afx_msg void OnAboutBoxSelect(); afx_msg void OnResetMenuSelect(); + afx_msg void OnResetEepromMenuSelect(); afx_msg void OnContextMenu(CWnd *pWnd, CPoint point); afx_msg void OnFileExit(); afx_msg void OnFileLoad(); diff --git a/handy-win32src-0.95-patched/gui-windows/Tracedlg.cpp b/handy-win32src-0.95-patched/gui-windows/Tracedlg.cpp index fb495c9..244f679 100644 --- a/handy-win32src-0.95-patched/gui-windows/Tracedlg.cpp +++ b/handy-win32src-0.95-patched/gui-windows/Tracedlg.cpp @@ -44,9 +44,9 @@ ////////////////////////////////////////////////////////////////////////////// #include -#include "resource.h" #include "../core/system.h" #include "dmpwndlg.h" +#include "resource.h" #include "tracedlg.h" diff --git a/handy-win32src-0.95-patched/gui-windows/Tracewin.h b/handy-win32src-0.95-patched/gui-windows/Tracewin.h index ccb5e06..46ec96a 100644 --- a/handy-win32src-0.95-patched/gui-windows/Tracewin.h +++ b/handy-win32src-0.95-patched/gui-windows/Tracewin.h @@ -46,9 +46,9 @@ #define TRACEWIN_H #include -#include "resource.h" #include "../core/system.h" #include "dmpwndlg.h" +#include "resource.h" #include "tracedlg.h" #ifdef _LYNXDBG diff --git a/handy-win32src-0.95-patched/gui-windows/aboutdlg.h b/handy-win32src-0.95-patched/gui-windows/aboutdlg.h index 652cb0e..9eac302 100644 --- a/handy-win32src-0.95-patched/gui-windows/aboutdlg.h +++ b/handy-win32src-0.95-patched/gui-windows/aboutdlg.h @@ -41,6 +41,8 @@ // // ////////////////////////////////////////////////////////////////////////////// +#include "resource.h" + class CAboutDialog : public CDialog { public: diff --git a/handy-win32src-0.95-patched/gui-windows/gfxwin.h b/handy-win32src-0.95-patched/gui-windows/gfxwin.h index 4004501..37ef8bc 100644 --- a/handy-win32src-0.95-patched/gui-windows/gfxwin.h +++ b/handy-win32src-0.95-patched/gui-windows/gfxwin.h @@ -46,9 +46,9 @@ #define _GFXWIN_H #include -#include "resource.h" #include "../core/system.h" #include "dmpwndlg.h" +#include "resource.h" #ifdef _LYNXDBG diff --git a/handy-win32src-0.95-patched/gui-windows/keydefs.cpp b/handy-win32src-0.95-patched/gui-windows/keydefs.cpp index 4f3ed93..23de365 100644 --- a/handy-win32src-0.95-patched/gui-windows/keydefs.cpp +++ b/handy-win32src-0.95-patched/gui-windows/keydefs.cpp @@ -27,8 +27,8 @@ #include #include #include -#include "resource.h" #include "keydefs.h" +#include "resource.h" #ifdef _DEBUG #define new DEBUG_NEW diff --git a/handy-win32src-0.95-patched/gui-windows/netobj.h b/handy-win32src-0.95-patched/gui-windows/netobj.h index 20299ef..3b3d744 100644 --- a/handy-win32src-0.95-patched/gui-windows/netobj.h +++ b/handy-win32src-0.95-patched/gui-windows/netobj.h @@ -49,8 +49,8 @@ //#include #include #include -#include "resource.h" #include "../core/system.h" +#include "resource.h" // Define the message we will send to // Use the ON_MESSAGE() macro to decode it diff --git a/handy-win32src-0.95-patched/gui-windows/resource.h b/handy-win32src-0.95-patched/gui-windows/resource.h index e72d210..05bbf95 100644 --- a/handy-win32src-0.95-patched/gui-windows/resource.h +++ b/handy-win32src-0.95-patched/gui-windows/resource.h @@ -1,6 +1,6 @@ //{{NO_DEPENDENCIES}} -// Von Microsoft Visual C++ generierte Includedatei. -// Verwendet durch lynxmenu.rc +// Microsoft Visual C++ generated include file. +// Used by lynxmenu.rc // #define IDR_MAINFRAME 101 #define IDR_ACCELERATOR1 103 @@ -149,13 +149,14 @@ #define IDM_EDITLINE_INPUTWAITING 40056 #define ID_OPTIONS_USEBOOTROM 40057 #define IDM_OPTIONS_USEBOOTROM 40058 +#define IDM_OPTIONS_RESETEEPROM 40059 // Next default values for new objects // #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 126 -#define _APS_NEXT_COMMAND_VALUE 40059 +#define _APS_NEXT_COMMAND_VALUE 40060 #define _APS_NEXT_CONTROL_VALUE 1069 #define _APS_NEXT_SYMED_VALUE 103 #endif diff --git a/handy-win32src-0.95-patched/handy.dsp b/handy-win32src-0.95-patched/handy.dsp deleted file mode 100644 index 76903c4..0000000 --- a/handy-win32src-0.95-patched/handy.dsp +++ /dev/null @@ -1,639 +0,0 @@ -# Microsoft Developer Studio Project File - Name="handy" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Application" 0x0101 - -CFG=handy - Win32 Debug Dbg -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "handy.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "handy.mak" CFG="handy - Win32 Debug Dbg" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "handy - Win32 Release" (based on "Win32 (x86) Application") -!MESSAGE "handy - Win32 Debug" (based on "Win32 (x86) Application") -!MESSAGE "handy - Win32 Release Dbg" (based on "Win32 (x86) Application") -!MESSAGE "handy - Win32 Debug Dbg" (based on "Win32 (x86) Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -MTL=midl.exe -RSC=rc.exe - -!IF "$(CFG)" == "handy - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 1 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /G5 /MT /W3 /GX /O2 /Ob2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /FAs /FD /c -# SUBTRACT CPP /YX -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x809 /d "NDEBUG" -# ADD RSC /l 0x809 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 -# ADD LINK32 nafxcw.lib libcmt.lib winmm.lib wsock32.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"nafxcw.lib libcmt.lib" -# SUBTRACT LINK32 /map - -!ELSEIF "$(CFG)" == "handy - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 1 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /G5 /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /FR /FD /GZ /c -# SUBTRACT CPP /X /YX -# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x809 /d "_DEBUG" -# ADD RSC /l 0x809 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept -# ADD LINK32 Nafxcwd.lib Libcmtd.lib winmm.lib wsock32.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"Nafxcwd.lib Libcmtd.lib" /pdbtype:sept -# SUBTRACT LINK32 /incremental:no /nodefaultlib - -!ELSEIF "$(CFG)" == "handy - Win32 Release Dbg" - -# PROP BASE Use_MFC 1 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release_Dbg" -# PROP BASE Intermediate_Dir "Release_Dbg" -# PROP BASE Ignore_Export_Lib 0 -# PROP BASE Target_Dir "" -# PROP Use_MFC 1 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release_Dbg" -# PROP Intermediate_Dir "Release_Dbg" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /G5 /MT /W3 /GX /O2 /Ob2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /FD /c -# SUBTRACT BASE CPP /YX -# ADD CPP /nologo /G5 /MT /W3 /GX /O2 /Ob2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_LYNXDBG" /FR /FD /c -# SUBTRACT CPP /YX -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x809 /d "NDEBUG" -# ADD RSC /l 0x809 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 nafxcw.lib libcmt.lib winmm.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"nafxcw.lib libcmt.lib" -# ADD LINK32 nafxcw.lib libcmt.lib winmm.lib wsock32.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"nafxcw.lib libcmt.lib" /out:"Release_Dbg/handybug.exe" - -!ELSEIF "$(CFG)" == "handy - Win32 Debug Dbg" - -# PROP BASE Use_MFC 1 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug_Dbg" -# PROP BASE Intermediate_Dir "Debug_Dbg" -# PROP BASE Ignore_Export_Lib 0 -# PROP BASE Target_Dir "" -# PROP Use_MFC 1 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug_Dbg" -# PROP Intermediate_Dir "Debug_Dbg" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /G5 /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_LYNXDBG" /FR /FD /GZ /c -# SUBTRACT BASE CPP /X /YX -# ADD CPP /nologo /G5 /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_LYNXDBG" /FR /FD /GZ /c -# SUBTRACT CPP /X /YX -# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x809 /d "_DEBUG" -# ADD RSC /l 0x809 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 Nafxcwd.lib Libcmtd.lib winmm.lib wsock32.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"Nafxcwd.lib Libcmtd.lib" /pdbtype:sept -# SUBTRACT BASE LINK32 /incremental:no /nodefaultlib -# ADD LINK32 Nafxcwd.lib Libcmtd.lib winmm.lib wsock32.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"Nafxcwd.lib Libcmtd.lib" /out:"Debug_Dbg/handybug.exe" /pdbtype:sept -# SUBTRACT LINK32 /incremental:no /nodefaultlib - -!ENDIF - -# Begin Target - -# Name "handy - Win32 Release" -# Name "handy - Win32 Debug" -# Name "handy - Win32 Release Dbg" -# Name "handy - Win32 Debug Dbg" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Group "Zlib" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=".\zlib-113\adler32.c" -# End Source File -# Begin Source File - -SOURCE=".\zlib-113\compress.c" -# End Source File -# Begin Source File - -SOURCE=".\zlib-113\crc32.c" -# End Source File -# Begin Source File - -SOURCE=".\zlib-113\deflate.c" -# End Source File -# Begin Source File - -SOURCE=".\zlib-113\deflate.h" -# End Source File -# Begin Source File - -SOURCE=".\zlib-113\gzio.c" -# End Source File -# Begin Source File - -SOURCE=".\zlib-113\infblock.c" -# End Source File -# Begin Source File - -SOURCE=".\zlib-113\infblock.h" -# End Source File -# Begin Source File - -SOURCE=".\zlib-113\infcodes.c" -# End Source File -# Begin Source File - -SOURCE=".\zlib-113\infcodes.h" -# End Source File -# Begin Source File - -SOURCE=".\zlib-113\inffast.c" -# End Source File -# Begin Source File - -SOURCE=".\zlib-113\inffast.h" -# End Source File -# Begin Source File - -SOURCE=".\zlib-113\inffixed.h" -# End Source File -# Begin Source File - -SOURCE=".\zlib-113\inflate.c" -# End Source File -# Begin Source File - -SOURCE=".\zlib-113\inftrees.c" -# End Source File -# Begin Source File - -SOURCE=".\zlib-113\inftrees.h" -# End Source File -# Begin Source File - -SOURCE=".\zlib-113\infutil.c" -# End Source File -# Begin Source File - -SOURCE=".\zlib-113\infutil.h" -# End Source File -# Begin Source File - -SOURCE=".\zlib-113\trees.c" -# End Source File -# Begin Source File - -SOURCE=".\zlib-113\trees.h" -# End Source File -# Begin Source File - -SOURCE=".\zlib-113\uncompr.c" -# End Source File -# Begin Source File - -SOURCE=".\zlib-113\unzip.c" -# End Source File -# Begin Source File - -SOURCE=".\zlib-113\unzip.h" -# End Source File -# Begin Source File - -SOURCE=".\zlib-113\zconf.h" -# End Source File -# Begin Source File - -SOURCE=".\zlib-113\zlib.h" -# End Source File -# Begin Source File - -SOURCE=".\zlib-113\zutil.c" -# End Source File -# Begin Source File - -SOURCE=".\zlib-113\zutil.h" -# End Source File -# End Group -# Begin Source File - -SOURCE=.\Cart.cpp -# End Source File -# Begin Source File - -SOURCE=.\Codewin.cpp -# End Source File -# Begin Source File - -SOURCE=.\ColorStatic.cpp -# End Source File -# Begin Source File - -SOURCE=.\Debugger.cpp -# End Source File -# Begin Source File - -SOURCE=.\Debuggerwin.cpp -# End Source File -# Begin Source File - -SOURCE=.\DirectSoundPlayer.cpp -# End Source File -# Begin Source File - -SOURCE=.\DispLine.cpp -# End Source File -# Begin Source File - -SOURCE=.\Dmpwndlg.cpp -# End Source File -# Begin Source File - -SOURCE=.\Dumpwin.cpp -# End Source File -# Begin Source File - -SOURCE=.\DxError.cpp -# End Source File -# Begin Source File - -SOURCE=.\EditLine.cpp -# End Source File -# Begin Source File - -SOURCE=.\ErrorHandler.cpp -# End Source File -# Begin Source File - -SOURCE=.\gfxwin.cpp -# End Source File -# Begin Source File - -SOURCE=.\HexEdit.cpp -# End Source File -# Begin Source File - -SOURCE=.\keydefs.cpp -# End Source File -# Begin Source File - -SOURCE=.\Lynxapp.cpp -# End Source File -# Begin Source File - -SOURCE=.\Lynxwin.cpp -# End Source File -# Begin Source File - -SOURCE=.\Memmap.cpp -# End Source File -# Begin Source File - -SOURCE=.\Mikie.cpp -# End Source File -# Begin Source File - -SOURCE=.\netobj.cpp -# End Source File -# Begin Source File - -SOURCE=.\Ram.cpp -# End Source File -# Begin Source File - -SOURCE=.\Rom.cpp -# End Source File -# Begin Source File - -SOURCE=.\Susie.cpp -# End Source File -# Begin Source File - -SOURCE=.\System.cpp -# End Source File -# Begin Source File - -SOURCE=.\Tracedlg.cpp -# End Source File -# Begin Source File - -SOURCE=.\Tracewin.cpp -# End Source File -# Begin Source File - -SOURCE=.\windowgdi.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=.\Aboutdlg.h -# End Source File -# Begin Source File - -SOURCE=.\C6502mak.h -# End Source File -# Begin Source File - -SOURCE=.\C65c02.h -# End Source File -# Begin Source File - -SOURCE=.\Cart.h -# End Source File -# Begin Source File - -SOURCE=.\CodeWin.h -# End Source File -# Begin Source File - -SOURCE=.\Color.h -# End Source File -# Begin Source File - -SOURCE=.\ColorStatic.h -# End Source File -# Begin Source File - -SOURCE=.\Debugger.h -# End Source File -# Begin Source File - -SOURCE=.\Debuggerwin.h -# End Source File -# Begin Source File - -SOURCE=.\DirectSoundPlayer.h -# End Source File -# Begin Source File - -SOURCE=.\DirectX.h -# End Source File -# Begin Source File - -SOURCE=.\Dis6502.h -# End Source File -# Begin Source File - -SOURCE=.\DispLine.h -# End Source File -# Begin Source File - -SOURCE=.\Dmpwndlg.h -# End Source File -# Begin Source File - -SOURCE=.\DumpWin.h -# End Source File -# Begin Source File - -SOURCE=.\EditLine.h -# End Source File -# Begin Source File - -SOURCE=.\Error.h -# End Source File -# Begin Source File - -SOURCE=.\ErrorHandler.h -# End Source File -# Begin Source File - -SOURCE=.\ErrorInterface.h -# End Source File -# Begin Source File - -SOURCE=.\FullScreenDirectX.h -# End Source File -# Begin Source File - -SOURCE=.\FullScreenEagle.h -# End Source File -# Begin Source File - -SOURCE=.\fullscreenlcd.h -# End Source File -# Begin Source File - -SOURCE=.\gfxwin.h -# End Source File -# Begin Source File - -SOURCE=.\HexEdit.h -# End Source File -# Begin Source File - -SOURCE=.\keydefs.h -# End Source File -# Begin Source File - -SOURCE=.\Lynxapp.h -# End Source File -# Begin Source File - -SOURCE=.\lynxbase.h -# End Source File -# Begin Source File - -SOURCE=.\Lynxdef.h -# End Source File -# Begin Source File - -SOURCE=.\lynxrender.h -# End Source File -# Begin Source File - -SOURCE=.\Lynxwin.h -# End Source File -# Begin Source File - -SOURCE=.\Machine.h -# End Source File -# Begin Source File - -SOURCE=.\Memfault.h -# End Source File -# Begin Source File - -SOURCE=.\Memmap.h -# End Source File -# Begin Source File - -SOURCE=.\Mikie.h -# End Source File -# Begin Source File - -SOURCE=.\netobj.h -# End Source File -# Begin Source File - -SOURCE=.\pixblend.h -# End Source File -# Begin Source File - -SOURCE=.\Ram.h -# End Source File -# Begin Source File - -SOURCE=.\resource.h -# End Source File -# Begin Source File - -SOURCE=.\Rom.h -# End Source File -# Begin Source File - -SOURCE=.\Susie.h -# End Source File -# Begin Source File - -SOURCE=.\Sysbase.h -# End Source File -# Begin Source File - -SOURCE=.\System.h -# End Source File -# Begin Source File - -SOURCE=.\Tracedlg.h -# End Source File -# Begin Source File - -SOURCE=.\Tracewin.h -# End Source File -# Begin Source File - -SOURCE=.\warndlg.h -# End Source File -# Begin Source File - -SOURCE=.\widget.h -# End Source File -# Begin Source File - -SOURCE=.\WindowDirectX.h -# End Source File -# Begin Source File - -SOURCE=.\WindowEagle.h -# End Source File -# Begin Source File - -SOURCE=.\windowgdi.h -# End Source File -# Begin Source File - -SOURCE=.\windowlcd.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# Begin Source File - -SOURCE=.\ICON1.ICO -# End Source File -# Begin Source File - -SOURCE=.\LynxBackground.bmp -# End Source File -# Begin Source File - -SOURCE=.\LynxBackground1.bmp -# End Source File -# Begin Source File - -SOURCE=.\lynxbackground2.bmp -# End Source File -# Begin Source File - -SOURCE=.\lynxbackground3.bmp -# End Source File -# Begin Source File - -SOURCE=.\lynxmenu.rc -# End Source File -# End Group -# Begin Group "Support Files" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=.\public\Contents.txt -# End Source File -# Begin Source File - -SOURCE=.\public\handybug\dvreadme.txt -# End Source File -# Begin Source File - -SOURCE=.\public\license.txt -# End Source File -# Begin Source File - -SOURCE=.\public\Readme.txt -# End Source File -# Begin Source File - -SOURCE=.\public\whatsnew.txt -# End Source File -# End Group -# End Target -# End Project diff --git a/handy-win32src-0.95-patched/handy.sln b/handy-win32src-0.95-patched/handy.sln index ea5d097..441e62c 100755 --- a/handy-win32src-0.95-patched/handy.sln +++ b/handy-win32src-0.95-patched/handy.sln @@ -1,9 +1,9 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.24720.0 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30002.166 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "handy", "handy.vcxproj", "{4987A9B5-896C-478C-B73A-4F6A234EBCEF}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "handy", "vs/handy.vcxproj", "{4987A9B5-896C-478C-B73A-4F6A234EBCEF}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -25,4 +25,7 @@ Global GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {69717587-D84F-4895-8E36-AABDA22F78FB} + EndGlobalSection EndGlobal diff --git a/handy-win32src-0.95-patched/handy.vcxproj.filters b/handy-win32src-0.95-patched/handy.vcxproj.filters deleted file mode 100755 index 2b1b57a..0000000 --- a/handy-win32src-0.95-patched/handy.vcxproj.filters +++ /dev/null @@ -1,384 +0,0 @@ - - - - - {31e758dd-3005-4c97-9fd1-b0ba0ac4284e} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {eefee16e-6002-4c90-8b0b-cc21a18c8c20} - - - {1876c70c-755c-471c-85a2-df19f73575a3} - h;hpp;hxx;hm;inl - - - {ece7a276-9b5b-4177-a79d-c9a448742095} - ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe - - - {10b05baa-60d5-40bd-b9c9-556f8d85668f} - - - - - Source Files\Zlib - - - Source Files\Zlib - - - Source Files\Zlib - - - Source Files\Zlib - - - Source Files\Zlib - - - Source Files\Zlib - - - Source Files\Zlib - - - Source Files\Zlib - - - Source Files\Zlib - - - Source Files\Zlib - - - Source Files\Zlib - - - Source Files\Zlib - - - Source Files\Zlib - - - Source Files\Zlib - - - Source Files\Zlib - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Source Files\Zlib - - - Source Files\Zlib - - - Source Files\Zlib - - - Source Files\Zlib - - - Source Files\Zlib - - - Source Files\Zlib - - - Source Files\Zlib - - - Source Files\Zlib - - - Source Files\Zlib - - - Source Files\Zlib - - - Source Files\Zlib - - - Source Files\Zlib - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - Source Files - - - - - Support Files - - - Support Files - - - Support Files - - - Support Files - - - Support Files - - - - - Resource Files - - - Resource Files - - - Resource Files - - - Resource Files - - - \ No newline at end of file diff --git a/handy-win32src-0.95-patched/handy.vcxproj.user b/handy-win32src-0.95-patched/handy.vcxproj.user deleted file mode 100755 index e11921f..0000000 --- a/handy-win32src-0.95-patched/handy.vcxproj.user +++ /dev/null @@ -1,6 +0,0 @@ - - - - true - - \ No newline at end of file diff --git a/handy-win32src-0.95-patched/gui-windows/Icon2.ico b/handy-win32src-0.95-patched/resources/Icon2.ico similarity index 100% rename from handy-win32src-0.95-patched/gui-windows/Icon2.ico rename to handy-win32src-0.95-patched/resources/Icon2.ico diff --git a/handy-win32src-0.95-patched/gui-windows/lynxbackground1.bmp b/handy-win32src-0.95-patched/resources/LynxBackground1.bmp similarity index 100% rename from handy-win32src-0.95-patched/gui-windows/lynxbackground1.bmp rename to handy-win32src-0.95-patched/resources/LynxBackground1.bmp diff --git a/handy-win32src-0.95-patched/gui-windows/icon1.ico b/handy-win32src-0.95-patched/resources/icon1.ico similarity index 100% rename from handy-win32src-0.95-patched/gui-windows/icon1.ico rename to handy-win32src-0.95-patched/resources/icon1.ico diff --git a/handy-win32src-0.95-patched/resources/lynxbackground-template.pspimage b/handy-win32src-0.95-patched/resources/lynxbackground-template.pspimage new file mode 100644 index 0000000..3d6cda4 Binary files /dev/null and b/handy-win32src-0.95-patched/resources/lynxbackground-template.pspimage differ diff --git a/handy-win32src-0.95-patched/resources/lynxbackground-template2.pspimage b/handy-win32src-0.95-patched/resources/lynxbackground-template2.pspimage new file mode 100644 index 0000000..1181bdf Binary files /dev/null and b/handy-win32src-0.95-patched/resources/lynxbackground-template2.pspimage differ diff --git a/handy-win32src-0.95-patched/resources/lynxbackground1-v2.bmp b/handy-win32src-0.95-patched/resources/lynxbackground1-v2.bmp new file mode 100644 index 0000000..00d1188 Binary files /dev/null and b/handy-win32src-0.95-patched/resources/lynxbackground1-v2.bmp differ diff --git a/handy-win32src-0.95-patched/resources/lynxbackground1-v3.bmp b/handy-win32src-0.95-patched/resources/lynxbackground1-v3.bmp new file mode 100644 index 0000000..37ae6fa Binary files /dev/null and b/handy-win32src-0.95-patched/resources/lynxbackground1-v3.bmp differ diff --git a/handy-win32src-0.95-patched/resources/lynxbackground2-v2.bmp b/handy-win32src-0.95-patched/resources/lynxbackground2-v2.bmp new file mode 100644 index 0000000..fc03e2e Binary files /dev/null and b/handy-win32src-0.95-patched/resources/lynxbackground2-v2.bmp differ diff --git a/handy-win32src-0.95-patched/gui-windows/lynxbackground2.bmp b/handy-win32src-0.95-patched/resources/lynxbackground2.bmp similarity index 100% rename from handy-win32src-0.95-patched/gui-windows/lynxbackground2.bmp rename to handy-win32src-0.95-patched/resources/lynxbackground2.bmp diff --git a/handy-win32src-0.95-patched/resources/lynxbackground3-v2.bmp b/handy-win32src-0.95-patched/resources/lynxbackground3-v2.bmp new file mode 100644 index 0000000..aee969e Binary files /dev/null and b/handy-win32src-0.95-patched/resources/lynxbackground3-v2.bmp differ diff --git a/handy-win32src-0.95-patched/gui-windows/lynxbackground3.bmp b/handy-win32src-0.95-patched/resources/lynxbackground3.bmp similarity index 99% rename from handy-win32src-0.95-patched/gui-windows/lynxbackground3.bmp rename to handy-win32src-0.95-patched/resources/lynxbackground3.bmp index dbb9a83..639f910 100644 Binary files a/handy-win32src-0.95-patched/gui-windows/lynxbackground3.bmp and b/handy-win32src-0.95-patched/resources/lynxbackground3.bmp differ diff --git a/handy-win32src-0.95-patched/resources/lynxmenu.aps b/handy-win32src-0.95-patched/resources/lynxmenu.aps new file mode 100644 index 0000000..a797946 Binary files /dev/null and b/handy-win32src-0.95-patched/resources/lynxmenu.aps differ diff --git a/handy-win32src-0.95-patched/gui-windows/lynxmenu.rc b/handy-win32src-0.95-patched/resources/lynxmenu.rc similarity index 94% rename from handy-win32src-0.95-patched/gui-windows/lynxmenu.rc rename to handy-win32src-0.95-patched/resources/lynxmenu.rc index c4bef26..701993f 100644 --- a/handy-win32src-0.95-patched/gui-windows/lynxmenu.rc +++ b/handy-win32src-0.95-patched/resources/lynxmenu.rc @@ -1,573 +1,576 @@ -// Microsoft Visual C++ generated resource script. -// -#include "resource.h" - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#include "afxres.h" - -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// Englisch (Vereinigtes Königreich) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENG) -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_UK -#pragma code_page(1252) - -///////////////////////////////////////////////////////////////////////////// -// -// Menu -// - -IDR_MAINFRAME MENU -BEGIN - POPUP "&File" - BEGIN - MENUITEM "&Load Cartridge\tCtrl+O", IDM_FILE_LOAD - MENUITEM "Load Game Snapshot\tCtrl-L", IDM_FILE_SNAPSHOT_LOAD - MENUITEM "Save &Game Snapshot\tCtrl-G", IDM_FILE_SNAPSHOT_GAME - MENUITEM SEPARATOR - MENUITEM "&BMP snapshot\tCtrl+Alt+B", IDM_FILE_SNAPSHOT_BMP - MENUITEM "&RAW snapshot\tCtrl+Alt+R", IDM_FILE_SNAPSHOT_RAW - MENUITEM SEPARATOR - MENUITEM "E&xit", IDM_FILE_EXIT - END - POPUP "&Options" - BEGIN - MENUITEM "&Sound Enable\tCtrl+S", IDM_OPTIONS_SOUND - MENUITEM SEPARATOR - MENUITEM "&Joystick Enable\tCtrl+J", IDM_OPTIONS_JOYSTICK - MENUITEM SEPARATOR - MENUITEM "Key &definitions...", IDM_OPTIONS_KEYDEFS - MENUITEM SEPARATOR - MENUITEM "Normal Mode (Windowed)", IDM_OPTIONS_DISPLAY_MODE_1 - MENUITEM "&Normal Mode (Full Screen)", IDM_OPTIONS_DISPLAY_MODE_2 - MENUITEM "Lynx LCD Emulation (Windowed)", IDM_OPTIONS_DISPLAY_MODE_3 - MENUITEM "Lynx LCD Emulation (Full Screen)", IDM_OPTIONS_DISPLAY_MODE_4 - MENUITEM "Eagle Mode (Windowed)", IDM_OPTIONS_DISPLAY_MODE_5 - MENUITEM "Eagle Mode (Full Screen)", IDM_OPTIONS_DISPLAY_MODE_6 - MENUITEM "GDI Mode (Windowed - SLOW)", IDM_OPTIONS_DISPLAY_MODE_7 - MENUITEM SEPARATOR - MENUITEM "&1x Screen Zoom", IDM_OPTIONS_SIZE_NORMAL - MENUITEM "&2x Screen Zoom", IDM_OPTIONS_SIZE_DOUBLE - MENUITEM "&3x Screen Zoom", IDM_OPTIONS_SIZE_TRIPLE - MENUITEM "&4x Screen Zoom", IDM_OPTIONS_SIZE_QUAD - MENUITEM SEPARATOR - MENUITEM "&Rotate Screen (Left)", IDM_OPTIONS_ROTATE_LEFT - MENUITEM "&Rotate Screen (Right)", IDM_OPTIONS_ROTATE_RIGHT - MENUITEM SEPARATOR - MENUITEM "Lynx &Background\tCtrl+B", IDM_OPTIONS_BACKGROUND - POPUP "Select Background Type" - BEGIN - MENUITEM "Lynx I", IDM_OPTIONS_BACKGROUNDTYPE1 - MENUITEM "Lynx II", IDM_OPTIONS_BACKGROUNDTYPE2 - MENUITEM "Screen Border", IDM_OPTIONS_BACKGROUNDTYPE3 - END - MENUITEM SEPARATOR - MENUITEM "Use Original Boot Rom", IDM_OPTIONS_USEBOOTROM - MENUITEM SEPARATOR - MENUITEM "Lynx &Networking\tCtrl+N", IDM_OPTIONS_NETWORK - MENUITEM SEPARATOR - MENUITEM "&Reset\tF3", IDM_OPTIONS_RESET - MENUITEM "&Pause\tF5", IDM_OPTIONS_PAUSE - END - POPUP "&Debug" - BEGIN - MENUITEM "&Debugger", IDM_DEBUG_DEBUGGER - MENUITEM "&Trace window", IDM_DEBUG_TRACE - MENUITEM "D&ump window", IDM_DEBUG_DUMP - MENUITEM "&Code window", IDM_DEBUG_CODE - MENUITEM "&Graphics window", IDM_DEBUG_GRAPHICS - MENUITEM SEPARATOR - MENUITEM "Lynx RAM Dump", IDM_DEBUG_RAMDUMP - MENUITEM SEPARATOR - MENUITEM "Close al&l", IDM_DEBUG_CLOSEALL - END - POPUP "&Help" - BEGIN - MENUITEM "&Emulation status", IDM_HELP_INFO - MENUITEM "&About", IDM_HELP_ABOUT - END -END - -IDR_MAINFRAME_CONTEXT_MENU MENU -BEGIN - POPUP "Context Menu" - BEGIN - MENUITEM "&Load Cartridge...\tCtrl+O", IDM_FILE_LOAD - MENUITEM "Load Game Snapshot\tCtrl-L", IDM_FILE_SNAPSHOT_LOAD - MENUITEM "Save &Game Snapshot\tCtrl+G", IDM_FILE_SNAPSHOT_GAME - MENUITEM SEPARATOR - MENUITEM "&Sound Enable\tCtrl+S", IDM_OPTIONS_SOUND - MENUITEM SEPARATOR - MENUITEM "&Joystick Enable\tCtrl+J", IDM_OPTIONS_JOYSTICK - MENUITEM SEPARATOR - MENUITEM "&1x Screen Zoom", IDM_OPTIONS_SIZE_NORMAL - MENUITEM "&2x Screen Zoom", IDM_OPTIONS_SIZE_DOUBLE - MENUITEM "&3x Screen Zoom", IDM_OPTIONS_SIZE_TRIPLE - MENUITEM "&4x Screen Zoom", IDM_OPTIONS_SIZE_QUAD - MENUITEM SEPARATOR - MENUITEM "&Rotate Screen (Left)", IDM_OPTIONS_ROTATE_LEFT - MENUITEM "&Rotate Screen (Right)", IDM_OPTIONS_ROTATE_RIGHT - MENUITEM SEPARATOR - MENUITEM "Lynx &Background\tCtrl+B", IDM_OPTIONS_BACKGROUND - MENUITEM SEPARATOR - MENUITEM "&Full Screen Mode\tAlt+Enter", IDM_OPTIONS_FULL_SCREEN - MENUITEM SEPARATOR - MENUITEM "&Reset\tF3", IDM_OPTIONS_RESET - MENUITEM SEPARATOR - MENUITEM "&Pause\tF5", IDM_OPTIONS_PAUSE - END -END - - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE -BEGIN - "#include ""afxres.h""\r\n" - "\0" -END - -3 TEXTINCLUDE -BEGIN - "\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,0,0,1 - PRODUCTVERSION 1,0,0,1 - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x40004L - FILETYPE 0x1L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "080904b0" - BEGIN - VALUE "Comments", "I can't beleive you're really reading this junk....." - VALUE "CompanyName", "none, open source" - VALUE "FileDescription", "lynx" - VALUE "FileVersion", "1" - VALUE "InternalName", "Handy" - VALUE "LegalCopyright", "Copyright © 1999,2000,2001,2002,2016" - VALUE "OriginalFilename", "Handy.exe" - VALUE "ProductName", "Handy - Lynx Emulator" - VALUE "ProductVersion", "See About Box" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x809, 1200 - END -END - - -///////////////////////////////////////////////////////////////////////////// -// -// Accelerator -// - -IDR_ACCELERATOR1 ACCELERATORS -BEGIN - "B", IDM_OPTIONS_BACKGROUND, VIRTKEY, CONTROL, NOINVERT - "B", IDM_FILE_SNAPSHOT_BMP, VIRTKEY, CONTROL, ALT, NOINVERT - "G", IDM_FILE_SNAPSHOT_GAME, VIRTKEY, CONTROL, NOINVERT - "J", IDM_OPTIONS_JOYSTICK, VIRTKEY, CONTROL, NOINVERT - "L", IDM_FILE_SNAPSHOT_LOAD, VIRTKEY, CONTROL, NOINVERT - "N", IDM_OPTIONS_NETWORK, VIRTKEY, CONTROL, NOINVERT - "O", IDM_FILE_LOAD, VIRTKEY, CONTROL, NOINVERT - "R", IDM_FILE_SNAPSHOT_RAW, VIRTKEY, CONTROL, ALT, NOINVERT - "S", IDM_OPTIONS_SOUND, VIRTKEY, CONTROL, NOINVERT - VK_ESCAPE, IDM_ESCAPE_FULLSCREEN, VIRTKEY, NOINVERT - VK_F11, IDM_DEBUG_STEP, VIRTKEY, NOINVERT - VK_F3, IDM_OPTIONS_RESET, VIRTKEY, NOINVERT - VK_F5, IDM_OPTIONS_PAUSE, VIRTKEY, NOINVERT - VK_RETURN, IDM_OPTIONS_DISPLAY_FULLSCN, VIRTKEY, ALT, NOINVERT -END - - -///////////////////////////////////////////////////////////////////////////// -// -// Icon -// - -// Icon with lowest ID value placed first to ensure application icon -// remains consistent on all systems. -IDI_ICON1 ICON "icon1.ico" - - -///////////////////////////////////////////////////////////////////////////// -// -// Dialog -// - -IDD_DUMPWIN_CONTEXT DIALOG 0, 0, 162, 103 -STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | DS_CENTERMOUSE | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Window Settings" -FONT 8, "MS Sans Serif" -BEGIN - LTEXT "&Address (Hex)",IDC_STATIC,14,14,56,12,NOT WS_GROUP - EDITTEXT IDC_EDIT1,14,26,56,15,ES_AUTOHSCROLL - CONTROL "&Follow PC",IDC_CHECK1,"Button",BS_AUTOCHECKBOX | WS_DISABLED,14,46,53,12 - GROUPBOX "&Data Source",IDC_STATIC,85,10,58,64 - CONTROL "CART&0",IDC_RADIO1,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,95,20,39,10 - CONTROL "CART&1",IDC_RADIO2,"Button",BS_AUTORADIOBUTTON,95,34,39,10 - CONTROL "&RAM",IDC_RADIO3,"Button",BS_AUTORADIOBUTTON,95,47,39,10 - CONTROL "&CPU",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON,95,60,39,10 - DEFPUSHBUTTON "OK",IDOK,23,82,50,14 - PUSHBUTTON "Cancel",IDCANCEL,89,82,50,14 - CONTROL "&2x Zoom",IDC_CHECK2,"Button",BS_AUTOCHECKBOX | WS_DISABLED,14,60,53,12 -END - -IDD_TRACE DIALOG 0, 0, 164, 200 -STYLE DS_SETFONT | WS_CHILD -FONT 8, "MS Sans Serif" -BEGIN - GROUPBOX "Registers",IDC_STATIC,72,5,85,95 - PUSHBUTTON "&Run/Halt",IDM_OPTIONS_PAUSE,32,181,42,16 - PUSHBUTTON "&Step",IDM_DEBUG_STEP,87,181,41,16 - GROUPBOX "Breakpoints",IDC_STATIC,7,5,60,95 - GROUPBOX "Window Updates",IDC_WINUPD,7,105,75,45 - CONTROL "Normal",IDC_WINUPD_NORM,"Button",BS_AUTORADIOBUTTON | BS_NOTIFY | WS_TABSTOP,12,115,69,12 - CONTROL "Once Per Frame",IDC_WINUPD_FRAME,"Button",BS_AUTORADIOBUTTON | BS_NOTIFY,12,125,69,12 - CONTROL "Once per Cycle",IDC_WINUPD_CYCLE,"Button",BS_AUTORADIOBUTTON | BS_NOTIFY,12,135,69,12 - LTEXT "0x0000",IDC_BPOINT0,32,15,25,10 - LTEXT "0x0000",IDC_BPOINT1,32,25,25,10 - LTEXT "0x0000",IDC_BPOINT2,32,35,25,10 - LTEXT "0x0000",IDC_BPOINT3,32,45,26,10 - LTEXT "0x0000",IDC_BPOINT4,32,55,26,10 - LTEXT "0x0000",IDC_BPOINT5,32,65,26,10 - LTEXT "0x0000",IDC_BPOINT6,32,75,26,10 - LTEXT "0x0000",IDC_BPOINT7,32,85,26,10 - GROUPBOX "Run Status",IDC_WINUPD2,92,105,65,45 - CONTROL "Halt",IDC_RUNSTAT_HALT,"Button",BS_AUTORADIOBUTTON | BS_NOTIFY | WS_TABSTOP,95,115,55,12 - CONTROL "Step Mode",IDC_RUNSTAT_STEP,"Button",BS_AUTORADIOBUTTON | BS_NOTIFY,95,125,55,12 - CONTROL "Running",IDC_RUNSTAT_RUN,"Button",BS_AUTORADIOBUTTON | BS_NOTIFY,95,135,55,12 - LTEXT "0x0000",IDC_REG_PC,95,15,25,10 - LTEXT "0x00",IDC_REG_SP,95,25,15,10 - LTEXT "0x00",IDC_REG_PS,95,35,15,10 - LTEXT "0x00",IDC_REG_A,90,65,15,10 - LTEXT "0x00",IDC_REG_X,90,75,15,10 - LTEXT "0x00",IDC_REG_Y,90,85,15,10 - LTEXT "0",IDC_REG_NMI,140,65,8,10 - LTEXT "0",IDC_REG_IRQ,140,75,8,10 - LTEXT "0",IDC_REG_WAI,140,85,8,10 - LTEXT "NMI -",IDC_STATIC,120,65,20,10 - LTEXT "IRQ -",IDC_STATIC,120,75,20,10 - LTEXT "WAI -",IDC_STATIC,120,85,20,10 - LTEXT "A -",IDC_STATIC,80,65,10,10 - LTEXT "X -",IDC_STATIC,80,75,10,10 - LTEXT "Y -",IDC_STATIC,80,85,10,10 - LTEXT "PC -",IDC_STATIC,80,15,15,10 - LTEXT "SP -",IDC_STATIC,80,25,15,10 - LTEXT "PS -",IDC_STATIC,80,35,15,10 - LTEXT "N:",IDC_STATIC,80,45,8,10 - LTEXT "0",IDC_REG_N,88,45,8,10 - LTEXT "V:",IDC_STATIC,96,45,8,10 - LTEXT "0",IDC_REG_V,104,45,8,10 - LTEXT "B:",IDC_STATIC,111,45,8,10 - LTEXT "0",IDC_REG_B,119,45,8,10 - LTEXT "I:",IDC_STATIC,80,55,8,10 - LTEXT "0",IDC_REG_I,88,55,8,10 - LTEXT "Z:",IDC_STATIC,96,55,8,10 - LTEXT "0",IDC_REG_Z,104,55,8,10 - LTEXT "C:",IDC_STATIC,111,55,8,10 - LTEXT "0",IDC_REG_C,119,55,8,10 - LTEXT "D:",IDC_STATIC,127,45,8,10 - LTEXT "0",IDC_REG_D,135,45,8,10 - LTEXT "B0 -",IDC_STATIC,17,15,15,10 - LTEXT "B1 -",IDC_STATIC,17,25,15,10 - LTEXT "B3 -",IDC_STATIC,17,45,15,10 - LTEXT "B2 -",IDC_STATIC,17,35,15,10 - LTEXT "B4 -",IDC_STATIC,17,55,15,10 - LTEXT "B5 -",IDC_STATIC,17,65,15,10 - LTEXT "B6 -",IDC_STATIC,17,75,15,10 - LTEXT "B7 -",IDC_STATIC,17,85,15,10 - GROUPBOX "Cycle Count",IDC_STATIC,92,153,65,25 - LTEXT "00000000",IDC_CYCLE_COUNT,105,163,35,10,SS_CENTERIMAGE - GROUPBOX "Sprite Debug",IDC_STATIC,7,153,75,25 - CONTROL "Single Step",IDC_SPRITE_DEBUG,"Button",BS_AUTOCHECKBOX | BS_NOTIFY,12,163,65,10 -END - -IDD_ABOUT_BOX DIALOGEX 0, 0, 214, 194 -STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "About Handy" -FONT 8, "MS Sans Serif", 0, 0, 0x0 -BEGIN - DEFPUSHBUTTON "OK",IDOK,81,126,50,14 - CTEXT "Copyright K.Wilkins 2007",IDC_STATIC,66,113,80,8 - ICON IDI_ICON1,IDC_STATIC,50,14,20,20 - CTEXT "Lynx Emulator for Windows",IDC_STATIC,77,19,86,8 - CTEXT "Version X.XX",IDC_ABOUT_VERSION,69,38,75,8 - CTEXT "http://lynxdev.atari.org/handy",IDC_STATIC,64,61,96,8 - EDITTEXT IDC_ABOUT_MANUFACTURER,42,147,129,13,ES_CENTER | ES_READONLY - EDITTEXT IDC_ABOUT_CARTRIDGE,42,166,129,13,ES_CENTER | ES_READONLY - CTEXT "(Build XXXXXX)",IDC_ABOUT_BUILD,66,50,82,8 - CTEXT "Core Updates B. Spruck 2016",IDC_STATIC,18,87,176,8 - CTEXT "This is a modified version of the original handy.",IDC_STATIC,18,77,189,8 - CTEXT "Original (old) version: http://handy.sourceforge.net",IDC_STATIC,14,102,186,8 -END - -IDD_INFO_BOX DIALOGEX 0, 0, 109, 84 -STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION -CAPTION "Handy Status Info" -FONT 8, "MS Sans Serif", 0, 0, 0x1 -BEGIN - LTEXT "Frames per second",IDC_STATIC,7,11,61,8 - EDITTEXT IDC_STATUS_FPS,75,8,27,13,ES_AUTOHSCROLL | ES_READONLY - LTEXT "Emulation Speed %",IDC_STATIC,7,47,62,8 - EDITTEXT IDC_STATUS_EFF,75,44,27,13,ES_AUTOHSCROLL | ES_READONLY - EDITTEXT IDC_STATUS_TARGET,75,62,27,13,ES_AUTOHSCROLL | ES_READONLY | ES_NUMBER - CONTROL "Spin1",IDC_STATUS_SPIN1,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,91,63,11,12,WS_EX_TRANSPARENT - LTEXT "Emulation Max %",IDC_STATIC,7,64,54,8 - LTEXT "Frame Skip",IDC_STATIC,7,28,64,8 - EDITTEXT IDC_STATUS_SKIP,75,26,27,13,ES_AUTOHSCROLL | ES_READONLY | ES_NUMBER -END - -IDD_WARNING DIALOG 0, 0, 224, 109 -STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Handy Warning Message" -FONT 8, "MS Sans Serif" -BEGIN - DEFPUSHBUTTON "Continue",IDOK,52,88,50,14 - PUSHBUTTON "Reset Lynx",IDCANCEL,120,88,50,14 - CTEXT "Static\nStatic\nStatic",IDC_WARNING,7,7,210,76,NOT WS_GROUP -END - -IDD_NETWAIT DIALOG 0, 0, 186, 42 -STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Handy Networking" -FONT 8, "MS Sans Serif" -BEGIN - DEFPUSHBUTTON "Cancel",IDCANCEL,67,21,50,14 - CTEXT "Starting Synchronisation...",IDC_NETWAIT_TEXT,7,7,172,10,SS_CENTERIMAGE -END - -IDD_NETADDRESS DIALOG 0, 0, 186, 71 -STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Handy Networking" -FONT 8, "MS Sans Serif" -BEGIN - DEFPUSHBUTTON "OK",IDOK,38,50,50,14 - PUSHBUTTON "Cancel",IDCANCEL,97,50,50,14 - LTEXT "Enter the name or TCP/IP address of the machine you wish to connect with.",IDC_STATIC,7,7,172,15 - EDITTEXT IDC_NETWORK_ADDRESS,7,30,172,12,ES_AUTOHSCROLL -END - -IDD_KEYCONF DIALOG 0, 0, 277, 141 -STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Handy Button Configuration" -FONT 8, "MS Sans Serif" -BEGIN - DEFPUSHBUTTON "Done",IDOK,10,120,255,14 - PUSHBUTTON "UP",IDC_KEYDEF_UP,45,10,35,30,BS_CENTER | BS_VCENTER | BS_MULTILINE - PUSHBUTTON "LEFT",IDC_KEYDEF_LEFT,10,45,35,30,BS_CENTER | BS_VCENTER | BS_MULTILINE - PUSHBUTTON "RIGHT",IDC_KEYDEF_RIGHT,80,45,35,30,BS_CENTER | BS_VCENTER | BS_MULTILINE - PUSHBUTTON "DOWN",IDC_KEYDEF_DOWN,45,80,35,30,BS_CENTER | BS_VCENTER | BS_MULTILINE - PUSHBUTTON "OPT1",IDC_KEYDEF_OPT1,135,10,35,30,BS_CENTER | BS_VCENTER | BS_MULTILINE - PUSHBUTTON "PAUSE",IDC_KEYDEF_PAUSE,135,45,35,30,BS_CENTER | BS_VCENTER | BS_MULTILINE - PUSHBUTTON "OPT2",IDC_KEYDEF_OPT2,135,80,35,30,BS_CENTER | BS_VCENTER | BS_MULTILINE - PUSHBUTTON "A",IDC_KEYDEF_A,190,45,35,30,BS_CENTER | BS_VCENTER | BS_MULTILINE - PUSHBUTTON "B",IDC_KEYDEF_B,230,45,35,30,BS_CENTER | BS_VCENTER | BS_MULTILINE - LTEXT "Caption",IDC_KEYGET,180,10,90,25 -END - -IDD_KEYGET DIALOG 0, 0, 186, 36 -STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Handy Button Configuration" -FONT 8, "MS Sans Serif" -BEGIN - CTEXT "Please press a key",IDC_STATIC,5,5,175,25,SS_CENTERIMAGE -END - - -///////////////////////////////////////////////////////////////////////////// -// -// DESIGNINFO -// - -#ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO -BEGIN - IDD_DUMPWIN_CONTEXT, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 154 - TOPMARGIN, 7 - BOTTOMMARGIN, 96 - END - - IDD_TRACE, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 157 - TOPMARGIN, 7 - BOTTOMMARGIN, 197 - END - - IDD_ABOUT_BOX, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 207 - TOPMARGIN, 7 - BOTTOMMARGIN, 187 - END - - IDD_INFO_BOX, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 102 - TOPMARGIN, 7 - BOTTOMMARGIN, 75 - END - - IDD_WARNING, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 217 - TOPMARGIN, 7 - BOTTOMMARGIN, 102 - END - - IDD_NETWAIT, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 179 - TOPMARGIN, 7 - BOTTOMMARGIN, 35 - END - - IDD_NETADDRESS, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 179 - TOPMARGIN, 7 - BOTTOMMARGIN, 64 - END - - IDD_KEYCONF, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 270 - TOPMARGIN, 7 - BOTTOMMARGIN, 128 - END - - IDD_KEYGET, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 179 - TOPMARGIN, 7 - BOTTOMMARGIN, 29 - END -END -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// Bitmap -// - -IDB_BITMAP_BACKGROUND1 BITMAP "LynxBackground1.bmp" - -IDB_BITMAP_BACKGROUND2 BITMAP "lynxbackground2.bmp" - -IDB_BITMAP_BACKGROUND3 BITMAP "lynxbackground3.bmp" - - -///////////////////////////////////////////////////////////////////////////// -// -// AFX_DIALOG_LAYOUT -// - -IDD_ABOUT_BOX AFX_DIALOG_LAYOUT -BEGIN - 0 -END - - -///////////////////////////////////////////////////////////////////////////// -// -// String Table -// - -STRINGTABLE -BEGIN - IDM_FILE_EXIT "Exit the emulator" - IDM_FILE_OPEN "Open a new game image" - IDM_HELP_ABOUT "Information about the Lynx Emulator" - IDM_DEBUG_TRACE "Open a new trace window" - IDM_DEBUG_DUMP "Open a new dump window" - IDM_DEBUG_CODE "Open a new source code window" - IDM_DEBUG_CLOSEALL "Close all open debug windows" - IDM_OPTIONS_JOYSTICK "Select joystick input" - IDM_OPTIONS_KEYBOARD "Select keyboard input" - IDM_OPTIONS_NORMAL_SIZE "Normal Lynx screen resolution" - IDM_OPTIONS_SIZE_NORMAL "Normal Lynx screen size" - IDM_OPTIONS_SIZE_DOUBLE "Double size Lynx screen size" -END - -STRINGTABLE -BEGIN - IDM_OPTIONS_SIZE_TRIPLE "Triple Lynx screen size" - IDM_OPTIONS_SIZE_QUAD "Quadruple Lynx screen size" - IDM_OPTIONS_ROTATE_LEFT "Rotate Lynx Screen (Left)" - IDM_OPTIONS_ROTATE_RIGHT "Rotate Lynx Screen (Right)" - IDM_OPTIONS_FULL_SCREEN "Full screen mode" - IDM_OPTIONS_WRESET "Reset the emulator" - IDM_OPTIONS_KEYDEFS "Assign keys to Lynx buttons/Joystick" - IDM_HELP_INFO "Display information regarding Handy status" - IDM_OPTIONS_SOUND "Enable/Disable Lynx sound" -END - -STRINGTABLE -BEGIN - IDM_DEBUG_GRAPHICS "Open a new graphics window" -END - -#endif // Englisch (Vereinigtes Königreich) resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// - - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED - +// Microsoft Visual C++ generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "afxres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (United Kingdom) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENG) +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_UK +#pragma code_page(1252) + +///////////////////////////////////////////////////////////////////////////// +// +// Menu +// + +IDR_MAINFRAME MENU +BEGIN + POPUP "&File" + BEGIN + MENUITEM "&Load Cartridge\tCtrl+O", IDM_FILE_LOAD + MENUITEM "Load Game Snapshot\tCtrl-L", IDM_FILE_SNAPSHOT_LOAD + MENUITEM "Save &Game Snapshot\tCtrl-G", IDM_FILE_SNAPSHOT_GAME + MENUITEM SEPARATOR + MENUITEM "&BMP snapshot\tCtrl+Alt+B", IDM_FILE_SNAPSHOT_BMP + MENUITEM "&RAW snapshot\tCtrl+Alt+R", IDM_FILE_SNAPSHOT_RAW + MENUITEM SEPARATOR + MENUITEM "E&xit", IDM_FILE_EXIT + END + POPUP "&Options" + BEGIN + MENUITEM "&Sound Enable\tCtrl+S", IDM_OPTIONS_SOUND + MENUITEM SEPARATOR + MENUITEM "&Joystick Enable\tCtrl+J", IDM_OPTIONS_JOYSTICK + MENUITEM SEPARATOR + MENUITEM "Key &definitions...", IDM_OPTIONS_KEYDEFS + MENUITEM SEPARATOR + MENUITEM "Normal Mode (Windowed)", IDM_OPTIONS_DISPLAY_MODE_1 + MENUITEM "&Normal Mode (Full Screen)", IDM_OPTIONS_DISPLAY_MODE_2 + MENUITEM "Lynx LCD Emulation (Windowed)", IDM_OPTIONS_DISPLAY_MODE_3 + MENUITEM "Lynx LCD Emulation (Full Screen)", IDM_OPTIONS_DISPLAY_MODE_4 + MENUITEM "Eagle Mode (Windowed)", IDM_OPTIONS_DISPLAY_MODE_5 + MENUITEM "Eagle Mode (Full Screen)", IDM_OPTIONS_DISPLAY_MODE_6 + MENUITEM "GDI Mode (Windowed - SLOW)", IDM_OPTIONS_DISPLAY_MODE_7 + MENUITEM SEPARATOR + MENUITEM "&1x Screen Zoom", IDM_OPTIONS_SIZE_NORMAL + MENUITEM "&2x Screen Zoom", IDM_OPTIONS_SIZE_DOUBLE + MENUITEM "&3x Screen Zoom", IDM_OPTIONS_SIZE_TRIPLE + MENUITEM "&4x Screen Zoom", IDM_OPTIONS_SIZE_QUAD + MENUITEM SEPARATOR + MENUITEM "&Rotate Screen (Left)", IDM_OPTIONS_ROTATE_LEFT + MENUITEM "&Rotate Screen (Right)", IDM_OPTIONS_ROTATE_RIGHT + MENUITEM SEPARATOR + MENUITEM "Lynx &Background\tCtrl+B", IDM_OPTIONS_BACKGROUND + POPUP "Select Background Type" + BEGIN + MENUITEM "Lynx I", IDM_OPTIONS_BACKGROUNDTYPE1 + MENUITEM "Lynx II", IDM_OPTIONS_BACKGROUNDTYPE2 + MENUITEM "Screen Border", IDM_OPTIONS_BACKGROUNDTYPE3 + END + MENUITEM SEPARATOR + MENUITEM "Use Original Boot Rom", IDM_OPTIONS_USEBOOTROM + MENUITEM SEPARATOR + MENUITEM "Lynx &Networking\tCtrl+N", IDM_OPTIONS_NETWORK + MENUITEM SEPARATOR + MENUITEM "&Reset\tF3", IDM_OPTIONS_RESET + MENUITEM "Reset + empty EEPROM\tF4", IDM_OPTIONS_RESETEEPROM + MENUITEM "&Pause\tF5", IDM_OPTIONS_PAUSE + END + POPUP "&Debug" + BEGIN + MENUITEM "&Debugger", IDM_DEBUG_DEBUGGER + MENUITEM "&Trace window", IDM_DEBUG_TRACE + MENUITEM "D&ump window", IDM_DEBUG_DUMP + MENUITEM "&Code window", IDM_DEBUG_CODE + MENUITEM "&Graphics window", IDM_DEBUG_GRAPHICS + MENUITEM SEPARATOR + MENUITEM "Lynx RAM Dump", IDM_DEBUG_RAMDUMP + MENUITEM SEPARATOR + MENUITEM "Close al&l", IDM_DEBUG_CLOSEALL + END + POPUP "&Help" + BEGIN + MENUITEM "&Emulation status", IDM_HELP_INFO + MENUITEM "&About", IDM_HELP_ABOUT + END +END + +IDR_MAINFRAME_CONTEXT_MENU MENU +BEGIN + POPUP "Context Menu" + BEGIN + MENUITEM "&Load Cartridge...\tCtrl+O", IDM_FILE_LOAD + MENUITEM "Load Game Snapshot\tCtrl-L", IDM_FILE_SNAPSHOT_LOAD + MENUITEM "Save &Game Snapshot\tCtrl+G", IDM_FILE_SNAPSHOT_GAME + MENUITEM SEPARATOR + MENUITEM "&Sound Enable\tCtrl+S", IDM_OPTIONS_SOUND + MENUITEM SEPARATOR + MENUITEM "&Joystick Enable\tCtrl+J", IDM_OPTIONS_JOYSTICK + MENUITEM SEPARATOR + MENUITEM "&1x Screen Zoom", IDM_OPTIONS_SIZE_NORMAL + MENUITEM "&2x Screen Zoom", IDM_OPTIONS_SIZE_DOUBLE + MENUITEM "&3x Screen Zoom", IDM_OPTIONS_SIZE_TRIPLE + MENUITEM "&4x Screen Zoom", IDM_OPTIONS_SIZE_QUAD + MENUITEM SEPARATOR + MENUITEM "&Rotate Screen (Left)", IDM_OPTIONS_ROTATE_LEFT + MENUITEM "&Rotate Screen (Right)", IDM_OPTIONS_ROTATE_RIGHT + MENUITEM SEPARATOR + MENUITEM "Lynx &Background\tCtrl+B", IDM_OPTIONS_BACKGROUND + MENUITEM SEPARATOR + MENUITEM "&Full Screen Mode\tAlt+Enter", IDM_OPTIONS_FULL_SCREEN + MENUITEM SEPARATOR + MENUITEM "&Reset\tF3", IDM_OPTIONS_RESET + MENUITEM SEPARATOR + MENUITEM "&Pause\tF5", IDM_OPTIONS_PAUSE + END +END + + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 1,0,0,1 + PRODUCTVERSION 1,0,0,1 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x40004L + FILETYPE 0x1L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "080904b0" + BEGIN + VALUE "Comments", "I can't beleive you're really reading this junk....." + VALUE "CompanyName", "none, open source" + VALUE "FileDescription", "lynx" + VALUE "FileVersion", "1" + VALUE "InternalName", "Handy" + VALUE "LegalCopyright", "Copyright © 1999,2000,2001,2002,2016" + VALUE "OriginalFilename", "Handy.exe" + VALUE "ProductName", "Handy - Lynx Emulator" + VALUE "ProductVersion", "See About Box" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x809, 1200 + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Accelerator +// + +IDR_ACCELERATOR1 ACCELERATORS +BEGIN + VK_F11, IDM_DEBUG_STEP, VIRTKEY, NOINVERT + VK_ESCAPE, IDM_ESCAPE_FULLSCREEN, VIRTKEY, NOINVERT + "O", IDM_FILE_LOAD, VIRTKEY, CONTROL, NOINVERT + "B", IDM_FILE_SNAPSHOT_BMP, VIRTKEY, CONTROL, ALT, NOINVERT + "G", IDM_FILE_SNAPSHOT_GAME, VIRTKEY, CONTROL, NOINVERT + "L", IDM_FILE_SNAPSHOT_LOAD, VIRTKEY, CONTROL, NOINVERT + "R", IDM_FILE_SNAPSHOT_RAW, VIRTKEY, CONTROL, ALT, NOINVERT + "B", IDM_OPTIONS_BACKGROUND, VIRTKEY, CONTROL, NOINVERT + VK_RETURN, IDM_OPTIONS_DISPLAY_FULLSCN, VIRTKEY, ALT, NOINVERT + "J", IDM_OPTIONS_JOYSTICK, VIRTKEY, CONTROL, NOINVERT + "N", IDM_OPTIONS_NETWORK, VIRTKEY, CONTROL, NOINVERT + VK_F5, IDM_OPTIONS_PAUSE, VIRTKEY, NOINVERT + VK_F3, IDM_OPTIONS_RESET, VIRTKEY, NOINVERT + "S", IDM_OPTIONS_SOUND, VIRTKEY, CONTROL, NOINVERT + VK_F4, IDM_OPTIONS_RESETEEPROM, VIRTKEY, NOINVERT +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDI_ICON1 ICON "icon1.ico" + + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_DUMPWIN_CONTEXT DIALOG 0, 0, 162, 103 +STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | DS_CENTERMOUSE | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Window Settings" +FONT 8, "MS Sans Serif" +BEGIN + LTEXT "&Address (Hex)",IDC_STATIC,14,14,56,12,NOT WS_GROUP + EDITTEXT IDC_EDIT1,14,26,56,15,ES_AUTOHSCROLL + CONTROL "&Follow PC",IDC_CHECK1,"Button",BS_AUTOCHECKBOX | WS_DISABLED,14,46,53,12 + GROUPBOX "&Data Source",IDC_STATIC,85,10,58,64 + CONTROL "CART&0",IDC_RADIO1,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,95,20,39,10 + CONTROL "CART&1",IDC_RADIO2,"Button",BS_AUTORADIOBUTTON,95,34,39,10 + CONTROL "&RAM",IDC_RADIO3,"Button",BS_AUTORADIOBUTTON,95,47,39,10 + CONTROL "&CPU",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON,95,60,39,10 + DEFPUSHBUTTON "OK",IDOK,23,82,50,14 + PUSHBUTTON "Cancel",IDCANCEL,89,82,50,14 + CONTROL "&2x Zoom",IDC_CHECK2,"Button",BS_AUTOCHECKBOX | WS_DISABLED,14,60,53,12 +END + +IDD_TRACE DIALOG 0, 0, 164, 200 +STYLE DS_SETFONT | WS_CHILD +FONT 8, "MS Sans Serif" +BEGIN + GROUPBOX "Registers",IDC_STATIC,72,5,85,95 + PUSHBUTTON "&Run/Halt",IDM_OPTIONS_PAUSE,32,181,42,16 + PUSHBUTTON "&Step",IDM_DEBUG_STEP,87,181,41,16 + GROUPBOX "Breakpoints",IDC_STATIC,7,5,60,95 + GROUPBOX "Window Updates",IDC_WINUPD,7,105,75,45 + CONTROL "Normal",IDC_WINUPD_NORM,"Button",BS_AUTORADIOBUTTON | BS_NOTIFY | WS_TABSTOP,12,115,69,12 + CONTROL "Once Per Frame",IDC_WINUPD_FRAME,"Button",BS_AUTORADIOBUTTON | BS_NOTIFY,12,125,69,12 + CONTROL "Once per Cycle",IDC_WINUPD_CYCLE,"Button",BS_AUTORADIOBUTTON | BS_NOTIFY,12,135,69,12 + LTEXT "0x0000",IDC_BPOINT0,32,15,25,10 + LTEXT "0x0000",IDC_BPOINT1,32,25,25,10 + LTEXT "0x0000",IDC_BPOINT2,32,35,25,10 + LTEXT "0x0000",IDC_BPOINT3,32,45,26,10 + LTEXT "0x0000",IDC_BPOINT4,32,55,26,10 + LTEXT "0x0000",IDC_BPOINT5,32,65,26,10 + LTEXT "0x0000",IDC_BPOINT6,32,75,26,10 + LTEXT "0x0000",IDC_BPOINT7,32,85,26,10 + GROUPBOX "Run Status",IDC_WINUPD2,92,105,65,45 + CONTROL "Halt",IDC_RUNSTAT_HALT,"Button",BS_AUTORADIOBUTTON | BS_NOTIFY | WS_TABSTOP,95,115,55,12 + CONTROL "Step Mode",IDC_RUNSTAT_STEP,"Button",BS_AUTORADIOBUTTON | BS_NOTIFY,95,125,55,12 + CONTROL "Running",IDC_RUNSTAT_RUN,"Button",BS_AUTORADIOBUTTON | BS_NOTIFY,95,135,55,12 + LTEXT "0x0000",IDC_REG_PC,95,15,25,10 + LTEXT "0x00",IDC_REG_SP,95,25,15,10 + LTEXT "0x00",IDC_REG_PS,95,35,15,10 + LTEXT "0x00",IDC_REG_A,90,65,15,10 + LTEXT "0x00",IDC_REG_X,90,75,15,10 + LTEXT "0x00",IDC_REG_Y,90,85,15,10 + LTEXT "0",IDC_REG_NMI,140,65,8,10 + LTEXT "0",IDC_REG_IRQ,140,75,8,10 + LTEXT "0",IDC_REG_WAI,140,85,8,10 + LTEXT "NMI -",IDC_STATIC,120,65,20,10 + LTEXT "IRQ -",IDC_STATIC,120,75,20,10 + LTEXT "WAI -",IDC_STATIC,120,85,20,10 + LTEXT "A -",IDC_STATIC,80,65,10,10 + LTEXT "X -",IDC_STATIC,80,75,10,10 + LTEXT "Y -",IDC_STATIC,80,85,10,10 + LTEXT "PC -",IDC_STATIC,80,15,15,10 + LTEXT "SP -",IDC_STATIC,80,25,15,10 + LTEXT "PS -",IDC_STATIC,80,35,15,10 + LTEXT "N:",IDC_STATIC,80,45,8,10 + LTEXT "0",IDC_REG_N,88,45,8,10 + LTEXT "V:",IDC_STATIC,96,45,8,10 + LTEXT "0",IDC_REG_V,104,45,8,10 + LTEXT "B:",IDC_STATIC,111,45,8,10 + LTEXT "0",IDC_REG_B,119,45,8,10 + LTEXT "I:",IDC_STATIC,80,55,8,10 + LTEXT "0",IDC_REG_I,88,55,8,10 + LTEXT "Z:",IDC_STATIC,96,55,8,10 + LTEXT "0",IDC_REG_Z,104,55,8,10 + LTEXT "C:",IDC_STATIC,111,55,8,10 + LTEXT "0",IDC_REG_C,119,55,8,10 + LTEXT "D:",IDC_STATIC,127,45,8,10 + LTEXT "0",IDC_REG_D,135,45,8,10 + LTEXT "B0 -",IDC_STATIC,17,15,15,10 + LTEXT "B1 -",IDC_STATIC,17,25,15,10 + LTEXT "B3 -",IDC_STATIC,17,45,15,10 + LTEXT "B2 -",IDC_STATIC,17,35,15,10 + LTEXT "B4 -",IDC_STATIC,17,55,15,10 + LTEXT "B5 -",IDC_STATIC,17,65,15,10 + LTEXT "B6 -",IDC_STATIC,17,75,15,10 + LTEXT "B7 -",IDC_STATIC,17,85,15,10 + GROUPBOX "Cycle Count",IDC_STATIC,92,153,65,25 + LTEXT "00000000",IDC_CYCLE_COUNT,105,163,35,10,SS_CENTERIMAGE + GROUPBOX "Sprite Debug",IDC_STATIC,7,153,75,25 + CONTROL "Single Step",IDC_SPRITE_DEBUG,"Button",BS_AUTOCHECKBOX | BS_NOTIFY,12,163,65,10 +END + +IDD_ABOUT_BOX DIALOGEX 0, 0, 215, 197 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "About Handy" +FONT 8, "MS Sans Serif", 0, 0, 0x0 +BEGIN + DEFPUSHBUTTON "OK",IDOK,81,132,50,14 + CTEXT "Copyright K.Wilkins 2007",IDC_STATIC,66,119,80,8 + ICON IDI_ICON1,IDC_STATIC,50,14,21,20 + CTEXT "Lynx Emulator for Windows",IDC_STATIC,77,19,86,8 + CTEXT "Version X.XX",IDC_ABOUT_VERSION,69,34,75,8 + CTEXT "http://lynxdev.atari.org/handy",IDC_STATIC,64,55,96,8 + EDITTEXT IDC_ABOUT_MANUFACTURER,42,153,129,13,ES_CENTER | ES_READONLY + EDITTEXT IDC_ABOUT_CARTRIDGE,42,172,129,13,ES_CENTER | ES_READONLY + CTEXT "(Build XXXXXX)",IDC_ABOUT_BUILD,66,44,82,8 + CTEXT "Core Updates B. Spruck 2016",IDC_STATIC,18,82,176,8 + CTEXT "This is a modified version of the original handy.",IDC_STATIC,19,71,189,8 + CTEXT "Original (old) version: http://handy.sourceforge.net",IDC_STATIC,14,108,186,8 + CTEXT "Crash fix + new backgrounds - LordKraken 2020",IDC_STATIC,21,93,176,8 +END + +IDD_INFO_BOX DIALOGEX 0, 0, 109, 84 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION +CAPTION "Handy Status Info" +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + LTEXT "Frames per second",IDC_STATIC,7,11,61,8 + EDITTEXT IDC_STATUS_FPS,75,8,27,13,ES_AUTOHSCROLL | ES_READONLY + LTEXT "Emulation Speed %",IDC_STATIC,7,47,62,8 + EDITTEXT IDC_STATUS_EFF,75,44,27,13,ES_AUTOHSCROLL | ES_READONLY + EDITTEXT IDC_STATUS_TARGET,75,62,27,13,ES_AUTOHSCROLL | ES_READONLY | ES_NUMBER + CONTROL "Spin1",IDC_STATUS_SPIN1,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,91,63,11,12,WS_EX_TRANSPARENT + LTEXT "Emulation Max %",IDC_STATIC,7,64,54,8 + LTEXT "Frame Skip",IDC_STATIC,7,28,64,8 + EDITTEXT IDC_STATUS_SKIP,75,26,27,13,ES_AUTOHSCROLL | ES_READONLY | ES_NUMBER +END + +IDD_WARNING DIALOG 0, 0, 224, 109 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Handy Warning Message" +FONT 8, "MS Sans Serif" +BEGIN + DEFPUSHBUTTON "Continue",IDOK,52,88,50,14 + PUSHBUTTON "Reset Lynx",IDCANCEL,120,88,50,14 + CTEXT "Static\nStatic\nStatic",IDC_WARNING,7,7,210,76,NOT WS_GROUP +END + +IDD_NETWAIT DIALOG 0, 0, 186, 42 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Handy Networking" +FONT 8, "MS Sans Serif" +BEGIN + DEFPUSHBUTTON "Cancel",IDCANCEL,67,21,50,14 + CTEXT "Starting Synchronisation...",IDC_NETWAIT_TEXT,7,7,172,10,SS_CENTERIMAGE +END + +IDD_NETADDRESS DIALOG 0, 0, 186, 71 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Handy Networking" +FONT 8, "MS Sans Serif" +BEGIN + DEFPUSHBUTTON "OK",IDOK,38,50,50,14 + PUSHBUTTON "Cancel",IDCANCEL,97,50,50,14 + LTEXT "Enter the name or TCP/IP address of the machine you wish to connect with.",IDC_STATIC,7,7,172,15 + EDITTEXT IDC_NETWORK_ADDRESS,7,30,172,12,ES_AUTOHSCROLL +END + +IDD_KEYCONF DIALOG 0, 0, 277, 141 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Handy Button Configuration" +FONT 8, "MS Sans Serif" +BEGIN + DEFPUSHBUTTON "Done",IDOK,10,120,255,14 + PUSHBUTTON "UP",IDC_KEYDEF_UP,45,10,35,30,BS_CENTER | BS_VCENTER | BS_MULTILINE + PUSHBUTTON "LEFT",IDC_KEYDEF_LEFT,10,45,35,30,BS_CENTER | BS_VCENTER | BS_MULTILINE + PUSHBUTTON "RIGHT",IDC_KEYDEF_RIGHT,80,45,35,30,BS_CENTER | BS_VCENTER | BS_MULTILINE + PUSHBUTTON "DOWN",IDC_KEYDEF_DOWN,45,80,35,30,BS_CENTER | BS_VCENTER | BS_MULTILINE + PUSHBUTTON "OPT1",IDC_KEYDEF_OPT1,135,10,35,30,BS_CENTER | BS_VCENTER | BS_MULTILINE + PUSHBUTTON "PAUSE",IDC_KEYDEF_PAUSE,135,45,35,30,BS_CENTER | BS_VCENTER | BS_MULTILINE + PUSHBUTTON "OPT2",IDC_KEYDEF_OPT2,135,80,35,30,BS_CENTER | BS_VCENTER | BS_MULTILINE + PUSHBUTTON "A",IDC_KEYDEF_A,190,45,35,30,BS_CENTER | BS_VCENTER | BS_MULTILINE + PUSHBUTTON "B",IDC_KEYDEF_B,230,45,35,30,BS_CENTER | BS_VCENTER | BS_MULTILINE + LTEXT "Caption",IDC_KEYGET,180,10,90,25 +END + +IDD_KEYGET DIALOG 0, 0, 186, 36 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Handy Button Configuration" +FONT 8, "MS Sans Serif" +BEGIN + CTEXT "Please press a key",IDC_STATIC,5,5,175,25,SS_CENTERIMAGE +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO +BEGIN + IDD_DUMPWIN_CONTEXT, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 154 + TOPMARGIN, 7 + BOTTOMMARGIN, 96 + END + + IDD_TRACE, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 157 + TOPMARGIN, 7 + BOTTOMMARGIN, 197 + END + + IDD_ABOUT_BOX, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 208 + TOPMARGIN, 7 + BOTTOMMARGIN, 190 + END + + IDD_INFO_BOX, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 102 + TOPMARGIN, 7 + BOTTOMMARGIN, 75 + END + + IDD_WARNING, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 217 + TOPMARGIN, 7 + BOTTOMMARGIN, 102 + END + + IDD_NETWAIT, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 179 + TOPMARGIN, 7 + BOTTOMMARGIN, 35 + END + + IDD_NETADDRESS, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 179 + TOPMARGIN, 7 + BOTTOMMARGIN, 64 + END + + IDD_KEYCONF, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 270 + TOPMARGIN, 7 + BOTTOMMARGIN, 128 + END + + IDD_KEYGET, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 179 + TOPMARGIN, 7 + BOTTOMMARGIN, 29 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Bitmap +// + +IDB_BITMAP_BACKGROUND1 BITMAP "LynxBackground1-v2.bmp" + +IDB_BITMAP_BACKGROUND2 BITMAP "lynxbackground2-v2.bmp" + +IDB_BITMAP_BACKGROUND3 BITMAP "lynxbackground3-v2.bmp" + + +///////////////////////////////////////////////////////////////////////////// +// +// AFX_DIALOG_LAYOUT +// + +IDD_ABOUT_BOX AFX_DIALOG_LAYOUT +BEGIN + 0 +END + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE +BEGIN + IDM_FILE_EXIT "Exit the emulator" + IDM_FILE_OPEN "Open a new game image" + IDM_HELP_ABOUT "Information about the Lynx Emulator" + IDM_DEBUG_TRACE "Open a new trace window" + IDM_DEBUG_DUMP "Open a new dump window" + IDM_DEBUG_CODE "Open a new source code window" + IDM_DEBUG_CLOSEALL "Close all open debug windows" + IDM_OPTIONS_JOYSTICK "Select joystick input" + IDM_OPTIONS_KEYBOARD "Select keyboard input" + IDM_OPTIONS_NORMAL_SIZE "Normal Lynx screen resolution" + IDM_OPTIONS_SIZE_NORMAL "Normal Lynx screen size" + IDM_OPTIONS_SIZE_DOUBLE "Double size Lynx screen size" +END + +STRINGTABLE +BEGIN + IDM_OPTIONS_SIZE_TRIPLE "Triple Lynx screen size" + IDM_OPTIONS_SIZE_QUAD "Quadruple Lynx screen size" + IDM_OPTIONS_ROTATE_LEFT "Rotate Lynx Screen (Left)" + IDM_OPTIONS_ROTATE_RIGHT "Rotate Lynx Screen (Right)" + IDM_OPTIONS_FULL_SCREEN "Full screen mode" + IDM_OPTIONS_WRESET "Reset the emulator" + IDM_OPTIONS_KEYDEFS "Assign keys to Lynx buttons/Joystick" + IDM_HELP_INFO "Display information regarding Handy status" + IDM_OPTIONS_SOUND "Enable/Disable Lynx sound" +END + +STRINGTABLE +BEGIN + IDM_DEBUG_GRAPHICS "Open a new graphics window" +END + +#endif // English (United Kingdom) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/handy-win32src-0.95-patched/resources/resource.h b/handy-win32src-0.95-patched/resources/resource.h new file mode 100644 index 0000000..af4f346 --- /dev/null +++ b/handy-win32src-0.95-patched/resources/resource.h @@ -0,0 +1,163 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by lynxmenu.rc +// +#define IDR_MAINFRAME 101 +#define IDR_ACCELERATOR1 103 +#define IDR_MAINFRAME_CONTEXT_MENU 104 +#define IDI_ICON1 105 +#define IDD_DIALOG1 106 +#define IDD_DUMPWIN_CONTEXT 106 +#define IDD_TRACE 110 +#define IDD_ABOUT_BOX 113 +#define IDD_INFO_BOX 114 +#define IDD_WAITFORIT_BOX 115 +#define IDD_WARNING 116 +#define IDB_BITMAP_BACKGROUND1 121 +#define IDD_NETWAIT 122 +#define IDB_BITMAP_BACKGROUND2 122 +#define IDD_NETADDRESS 123 +#define IDB_BITMAP_BACKGROUND3 123 +#define IDD_KEYCONF 124 +#define IDD_KEYGET 125 +#define IDC_RADIO1 1000 +#define IDC_RADIO2 1001 +#define IDC_RADIO3 1002 +#define IDC_EDIT1 1003 +#define IDC_EDIT2 1004 +#define IDC_RADIO4 1004 +#define IDC_BUTTON1 1008 +#define IDC_KEYDEF_UP 1008 +#define IDC_BUTTON2 1009 +#define IDC_KEYDEF_DOWN 1009 +#define IDM_GETCMDLINE 1009 +#define IDC_CHECK1 1010 +#define IDC_KEYDEF_LEFT 1010 +#define IDC_CHECK2 1011 +#define IDC_KEYDEF_RIGHT 1011 +#define IDC_EDIT3 1012 +#define IDC_KEYDEF_OPT1 1012 +#define IDC_EDIT4 1013 +#define IDC_KEYDEF_PAUSE 1013 +#define IDC_EDIT5 1014 +#define IDC_KEYDEF_OPT2 1014 +#define IDC_EDIT6 1015 +#define IDC_KEYDEF_A 1015 +#define IDC_STATUS_FPS 1016 +#define IDC_KEYDEF_B 1016 +#define IDC_STATUS_EFF 1017 +#define IDC_STATUS_SPIN1 1018 +#define IDC_STATUS_TARGET 1019 +#define IDC_STATUS_SKIP 1020 +#define IDC_ABOUT_MANUFACTURER 1021 +#define IDC_ABOUT_CARTRIDGE 1022 +#define IDC_WARNING 1024 +#define IDC_WINUPD_NORM 1025 +#define IDC_WINUPD_FRAME 1026 +#define IDC_WINUPD_CYCLE 1027 +#define IDC_WINUPD 1028 +#define IDC_BPOINT0 1029 +#define IDC_BPOINT1 1030 +#define IDC_BPOINT2 1031 +#define IDC_BPOINT3 1032 +#define IDC_BPOINT4 1033 +#define IDC_BPOINT5 1034 +#define IDC_BPOINT6 1035 +#define IDC_BPOINT7 1036 +#define IDC_REG_PC 1037 +#define IDC_REG_SP 1038 +#define IDC_REG_PS 1039 +#define IDC_CYCLE_COUNT 1040 +#define IDC_WINUPD2 1041 +#define IDC_RUNSTAT_HALT 1042 +#define IDC_RUNSTAT_STEP 1043 +#define IDC_RUNSTAT_RUN 1044 +#define IDC_SPRITE_DEBUG 1047 +#define IDC_ABOUT_BUILD 1048 +#define IDC_ABOUT_VERSION 1049 +#define IDC_NETWAIT_TEXT 1050 +#define IDC_NETWORK_ADDRESS 1051 +#define IDC_REG_A 1052 +#define IDC_REG_X 1053 +#define IDC_REG_Y 1054 +#define IDC_REG_NMI 1055 +#define IDC_REG_IRQ 1056 +#define IDC_REG_WAI 1057 +#define IDC_REG_N 1058 +#define IDC_REG_V 1059 +#define IDC_REG_B 1060 +#define IDC_REG_I 1061 +#define IDC_REG_Z 1062 +#define IDC_REG_C 1063 +#define IDC_REG_D 1064 +#define IDC_KEYGET 1065 +#define IDC_EDIT_DBG1 1066 +#define IDC_EDIT_DBG2 1067 +#define IDC_EDIT_DBG3 1068 +#define IDM_CARTRIDGE_OPEN 40002 +#define IDM_FILE_SNAPSHOT_GAME 40003 +#define IDM_FILE_EXIT 40004 +#define IDM_FILE_OPEN 40005 +#define IDM_HELP_ABOUT 40006 +#define IDM_DEBUG_TRACE 40007 +#define IDM_DEBUG_DUMP 40008 +#define IDM_DEBUG_CODE 40009 +#define IDM_DEBUG_CLOSEALL 40010 +#define IDM_OPTIONS_JOYSTICK 40011 +#define IDM_OPTIONS_KEYBOARD 40012 +#define IDM_OPTIONS_NORMAL_SIZE 40013 +#define IDM_OPTIONS_SIZE_NORMAL 40014 +#define IDM_OPTIONS_SIZE_DOUBLE 40015 +#define IDM_OPTIONS_SIZE_TRIPLE 40016 +#define IDM_OPTIONS_SIZE_QUAD 40017 +#define IDM_OPTIONS_ROTATE_LEFT 40018 +#define IDM_OPTIONS_ROTATE_RIGHT 40019 +#define IDM_OPTIONS_FULL_SCREEN 40020 +#define IDM_OPTIONS_WRESET 40021 +#define IDM_OPTIONS_RESET 40022 +#define IDM_OPTIONS_KEYDEFS 40023 +#define IDM_OPTIONS_PAUSE 40024 +#define IDM_DEBUG_WINUPDATES 40025 +#define IDM_FILE_LOAD 40026 +#define IDM_HELP_INFO 40027 +#define IDM_OPTIONS_SOUND 40028 +#define IDM_FILE_SNAPSHOT_BMP 40029 +#define IDM_FILE_SNAPSHOT_RAW 40030 +#define IDM_ESCAPE_FULLSCREEN 40031 +#define IDM_DEBUG_GRAPHICS 40032 +#define IDM_DEBUG_STEP 40033 +#define IDM_OPTIONS_BACKGROUND 40034 +#define IDM_DRAW_DEBUG_WINDOWS 40035 +#define IDM_OPTIONS_NETWORK 40036 +#define IDM_OPTIONS_DISPLAY_MODE_1 40037 +#define IDM_OPTIONS_DISPLAY_MODE_2 40038 +#define IDM_OPTIONS_DISPLAY_MODE_3 40039 +#define IDM_OPTIONS_DISPLAY_MODE_4 40040 +#define IDM_OPTIONS_DISPLAY_MODE_5 40041 +#define IDM_OPTIONS_DISPLAY_MODE_6 40042 +#define IDM_OPTIONS_DISPLAY_MODE_7 40043 +#define IDM_OPTIONS_DISPLAY_MODE_8 40044 +#define IDM_OPTIONS_DISPLAY_MODE_9 40045 +#define IDM_OPTIONS_DISPLAY_MODE_10 40046 +#define IDM_OPTIONS_DISPLAY_FULLSCN 40047 +#define IDM_OPTIONS_BACKGROUNDTYPE1 40049 +#define IDM_OPTIONS_BACKGROUNDTYPE2 40050 +#define IDM_OPTIONS_BACKGROUNDTYPE3 40051 +#define IDM_DEBUG_RAMDUMP 40052 +#define IDM_FILE_SNAPSHOT_LOAD 40053 +#define IDM_DEBUG_DEBUGGER 40055 +#define IDM_EDITLINE_INPUTWAITING 40056 +#define ID_OPTIONS_USEBOOTROM 40057 +#define IDM_OPTIONS_USEBOOTROM 40058 +#define IDM_OPTIONS_RESETEEPROM 40059 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 126 +#define _APS_NEXT_COMMAND_VALUE 40062 +#define _APS_NEXT_CONTROL_VALUE 1069 +#define _APS_NEXT_SYMED_VALUE 103 +#endif +#endif diff --git a/handy-win32src-0.95-patched/handy.vcxproj b/handy-win32src-0.95-patched/vs/handy.vcxproj old mode 100755 new mode 100644 similarity index 54% rename from handy-win32src-0.95-patched/handy.vcxproj rename to handy-win32src-0.95-patched/vs/handy.vcxproj index 3d2863d..3a71f19 --- a/handy-win32src-0.95-patched/handy.vcxproj +++ b/handy-win32src-0.95-patched/vs/handy.vcxproj @@ -1,393 +1,402 @@ - - - - - Debug Dbg - Win32 - - - Debug - Win32 - - - Release Dbg - Win32 - - - Release - Win32 - - - - - - MFCProj - {4987A9B5-896C-478C-B73A-4F6A234EBCEF} - - - - Application - v140 - Static - MultiByte - - - Application - v140 - Static - MultiByte - - - Application - v140 - Static - MultiByte - - - Application - v140 - Static - MultiByte - - - - - - - - - - - - - - - - - - - - - - - .\Release_Dbg\ - .\Release_Dbg\ - false - - - .\Debug\ - .\Debug\ - true - - - .\Debug_Dbg\ - .\Debug_Dbg\ - true - - - .\Release\ - .\Release\ - false - - - - MultiThreaded - AnySuitable - true - true - MaxSpeed - true - Level3 - WIN32;NDEBUG;_WINDOWS;_LYNXDBG;%(PreprocessorDefinitions) - .\Release_Dbg\ - true - .\Release_Dbg\handy.pch - .\Release_Dbg\ - .\Release_Dbg\ - - - true - NDEBUG;%(PreprocessorDefinitions) - .\Release_Dbg\handy.tlb - true - Win32 - - - 0x0809 - NDEBUG;%(PreprocessorDefinitions) - - - true - .\Release_Dbg\handy.bsc - - - true - Windows - nafxcw.lib libcmt.lib;%(IgnoreSpecificDefaultLibraries) - Release_Dbg/handybug.exe - nafxcw.lib;libcmt.lib;winmm.lib;wsock32.lib;%(AdditionalDependencies) - - - - - MultiThreadedDebug - Default - true - Disabled - true - Level3 - true - EditAndContinue - false - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - .\Debug\ - true - .\Debug\handy.pch - .\Debug\ - .\Debug\ - EnableFastChecks - - - true - _DEBUG;%(PreprocessorDefinitions) - .\Debug\handy.tlb - true - Win32 - - - 0x0809 - _DEBUG;%(PreprocessorDefinitions) - - - true - .\Debug\handy.bsc - - - true - true - Windows - Nafxcwd.lib Libcmtd.lib;%(IgnoreSpecificDefaultLibraries) - false - .\Debug\handy.exe - Nafxcwd.lib;Libcmtd.lib;winmm.lib;wsock32.lib;%(AdditionalDependencies) - - - - - MultiThreadedDebug - Default - true - Disabled - true - Level3 - true - EditAndContinue - false - WIN32;_DEBUG;_WINDOWS;_LYNXDBG;%(PreprocessorDefinitions) - .\Debug_Dbg\ - true - .\Debug_Dbg\handy.pch - .\Debug_Dbg\ - .\Debug_Dbg\ - EnableFastChecks - - - true - _DEBUG;%(PreprocessorDefinitions) - .\Debug_Dbg\handy.tlb - true - Win32 - - - 0x0809 - _DEBUG;%(PreprocessorDefinitions) - - - true - .\Debug_Dbg\handy.bsc - - - true - true - Windows - Nafxcwd.lib Libcmtd.lib;%(IgnoreSpecificDefaultLibraries) - false - Debug_Dbg/handybug.exe - Nafxcwd.lib;Libcmtd.lib;winmm.lib;wsock32.lib;%(AdditionalDependencies) - - - - - MultiThreaded - AnySuitable - true - true - MaxSpeed - true - Level3 - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - AssemblyAndSourceCode - .\Release\ - .\Release\handy.pch - .\Release\ - .\Release\ - - - true - NDEBUG;%(PreprocessorDefinitions) - .\Release\handy.tlb - true - Win32 - - - 0x0809 - NDEBUG;%(PreprocessorDefinitions) - - - true - .\Release\handy.bsc - - - true - Windows - nafxcw.lib libcmt.lib;%(IgnoreSpecificDefaultLibraries) - .\Release\handy.exe - nafxcw.lib;libcmt.lib;winmm.lib;wsock32.lib;%(AdditionalDependencies) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + Debug Dbg + Win32 + + + Debug + Win32 + + + Release Dbg + Win32 + + + Release + Win32 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + MFCProj + {4987A9B5-896C-478C-B73A-4F6A234EBCEF} + 10.0 + + + + Application + v143 + Static + MultiByte + + + Application + v143 + Static + MultiByte + + + Application + v143 + Static + MultiByte + + + Application + v143 + Static + MultiByte + + + + + + + + + + + + + + + + + + + + + + + $(SolutionDir)vs\$(Configuration)\ + $(Configuration)\ + false + + + $(SolutionDir)vs\$(Configuration)\ + $(Configuration)\ + true + + + $(SolutionDir)vs\$(Configuration)\ + $(Configuration)\ + true + + + $(SolutionDir)vs\$(Configuration)\ + $(Configuration)\ + false + + + + MultiThreaded + AnySuitable + true + true + MaxSpeed + true + Level3 + WIN32;NDEBUG;_WINDOWS;_LYNXDBG;NO_WARN_MBCS_MFC_DEPRECATION;_WINSOCK_DEPRECATED_NO_WARNINGS;_WIN32_WINNT=0x0501;%(PreprocessorDefinitions) + .\$(Configuration)\ + true + .\$(Configuration)\handy.pch + .\$(Configuration)\ + .\$(Configuration)\ + + + true + NDEBUG;%(PreprocessorDefinitions) + .\Release_Dbg\handy.tlb + true + Win32 + + + 0x0809 + NDEBUG;%(PreprocessorDefinitions) + + + true + .\$(Configuration)\handy.bsc + + + true + Windows + nafxcw.lib libcmt.lib;%(IgnoreSpecificDefaultLibraries) + $(Configuration)\handy.exe + nafxcw.lib;libcmt.lib;winmm.lib;wsock32.lib;%(AdditionalDependencies) + + + + + MultiThreadedDebug + Default + true + Disabled + true + Level3 + true + EditAndContinue + false + WIN32;_DEBUG;_WINDOWS;NO_WARN_MBCS_MFC_DEPRECATION;_WINSOCK_DEPRECATED_NO_WARNINGS;_WIN32_WINNT=0x0501;%(PreprocessorDefinitions) + .\$(Configuration)\ + true + .\$(Configuration)\handy.pch + .\$(Configuration)\ + .\$(Configuration)\ + EnableFastChecks + + + true + _DEBUG;%(PreprocessorDefinitions) + .\Debug\handy.tlb + true + Win32 + + + 0x0809 + _DEBUG;%(PreprocessorDefinitions) + + + true + .\$(Configuration)\handy.bsc + + + true + true + Windows + Nafxcwd.lib Libcmtd.lib;%(IgnoreSpecificDefaultLibraries) + false + $(Configuration)\handy.exe + Nafxcwd.lib;Libcmtd.lib;winmm.lib;wsock32.lib;%(AdditionalDependencies) + false + + + + + MultiThreadedDebug + Default + true + Disabled + true + Level3 + true + EditAndContinue + false + WIN32;_DEBUG;_WINDOWS;_LYNXDBG;NO_WARN_MBCS_MFC_DEPRECATION;_WINSOCK_DEPRECATED_NO_WARNINGS;_WIN32_WINNT=0x0501;%(PreprocessorDefinitions) + .\$(Configuration)\ + true + .\$(Configuration)\handy.pch + .\$(Configuration)\ + .\$(Configuration)\ + EnableFastChecks + + + true + _DEBUG;%(PreprocessorDefinitions) + .\Debug_Dbg\handy.tlb + true + Win32 + + + 0x0809 + _DEBUG;%(PreprocessorDefinitions) + + + true + .\$(Configuration)\handy.bsc + + + true + true + Windows + Nafxcwd.lib Libcmtd.lib;%(IgnoreSpecificDefaultLibraries) + false + $(Configuration)\handy.exe + Nafxcwd.lib;Libcmtd.lib;winmm.lib;wsock32.lib;%(AdditionalDependencies) + false + + + + + MultiThreaded + AnySuitable + true + true + MaxSpeed + true + Level3 + WIN32;NDEBUG;_WINDOWS;NO_WARN_MBCS_MFC_DEPRECATION;_WINSOCK_DEPRECATED_NO_WARNINGS;_WIN32_WINNT=0x0501;%(PreprocessorDefinitions) + AssemblyAndSourceCode + .\$(Configuration)\ + .\$(Configuration)\handy.pch + .\$(Configuration)\ + .\$(Configuration)\ + + + true + NDEBUG;%(PreprocessorDefinitions) + .\Release\handy.tlb + true + Win32 + + + 0x0809 + NDEBUG;%(PreprocessorDefinitions) + + + true + .\$(Configuration)\handy.bsc + + + true + Windows + nafxcw.lib libcmt.lib;%(IgnoreSpecificDefaultLibraries) + $(Configuration)\handy.exe + nafxcw.lib;libcmt.lib;winmm.lib;wsock32.lib;%(AdditionalDependencies) + + + + + + + + + + \ No newline at end of file diff --git a/handy-win32src-0.95-patched/vs/handy.vcxproj.filters b/handy-win32src-0.95-patched/vs/handy.vcxproj.filters new file mode 100644 index 0000000..0ac1004 --- /dev/null +++ b/handy-win32src-0.95-patched/vs/handy.vcxproj.filters @@ -0,0 +1,388 @@ + + + + + {903364a2-1064-4f37-87e0-89cf3c09e71e} + + + {ddc86e37-8c67-49c6-9681-0307677993ed} + + + {7525fae3-cd81-4ecf-b7cb-fcd4fe16a805} + + + {4c581666-e204-4d35-8528-936000fd51d9} + + + + + core + + + core + + + core + + + core + + + core + + + core + + + core + + + core + + + core + + + core + + + core + + + core + + + core + + + core + + + core + + + core + + + core + + + core + + + core + + + zlib + + + zlib + + + zlib + + + zlib + + + zlib + + + zlib + + + zlib + + + zlib + + + zlib + + + zlib + + + zlib + + + zlib + + + gui + + + gui + + + gui + + + gui + + + gui + + + gui + + + gui + + + gui + + + gui + + + gui + + + gui + + + gui + + + gui + + + gui + + + gui + + + gui + + + gui + + + gui + + + gui + + + gui + + + gui + + + gui + + + gui + + + gui + + + gui + + + gui + + + gui + + + gui + + + gui + + + gui + + + gui + + + gui + + + + + + core + + + core + + + core + + + core + + + core + + + core + + + core + + + core + + + core + + + zlib + + + zlib + + + zlib + + + zlib + + + zlib + + + zlib + + + zlib + + + zlib + + + zlib + + + zlib + + + zlib + + + zlib + + + zlib + + + zlib + + + zlib + + + gui + + + gui + + + gui + + + gui + + + gui + + + gui + + + gui + + + gui + + + gui + + + gui + + + gui + + + gui + + + gui + + + gui + + + gui + + + gui + + + gui + + + gui + + + gui + + + gui + + + + + resources + + + resources + + + resources + + + resources + + + resources + + + resources + + + resources + + + resources + + + resources + + + + + resources + + + resources + + + + + resources + + + + + + \ No newline at end of file diff --git a/handy-win32src-0.95-patched/vs/handy.vcxproj.user b/handy-win32src-0.95-patched/vs/handy.vcxproj.user new file mode 100644 index 0000000..88a5509 --- /dev/null +++ b/handy-win32src-0.95-patched/vs/handy.vcxproj.user @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/handy-win32src-0.95-patched/zlib-113/gzio.c b/handy-win32src-0.95-patched/zlib-113/gzio.c index 7fd1da0..5cbae10 100644 --- a/handy-win32src-0.95-patched/zlib-113/gzio.c +++ b/handy-win32src-0.95-patched/zlib-113/gzio.c @@ -101,11 +101,12 @@ local gzFile gz_open (path, mode, fd) s->msg = NULL; s->transparent = 0; - s->path = (char*)ALLOC(strlen(path)+1); + int pathSize = strlen(path) + 1; + s->path = (char*)ALLOC(pathSize); if (s->path == NULL) { return destroy(s), (gzFile)Z_NULL; } - strcpy(s->path, path); /* do this early for debugging */ + strcpy_s(s->path, pathSize, path); /* do this early for debugging */ s->mode = '\0'; do { @@ -153,11 +154,17 @@ local gzFile gz_open (path, mode, fd) s->stream.avail_out = Z_BUFSIZE; errno = 0; - s->file = fd < 0 ? F_OPEN(path, fmode) : (FILE*)fdopen(fd, fmode); + if (fd < 0) { + fopen_s(&(s->file), path, fmode); + } + else { + s->file = (FILE*) fdopen(fd, fmode); + } if (s->file == NULL) { return destroy(s), (gzFile)Z_NULL; } + if (s->mode == 'w') { /* Write a very simple .gz header: */ @@ -198,7 +205,7 @@ gzFile ZEXPORT gzdopen (fd, mode) char name[20]; if (fd < 0) return (gzFile)Z_NULL; - sprintf(name, "", fd); /* for debugging */ + sprintf_s(name, 20, "", fd); /* for debugging */ return gz_open (name, mode, fd); } @@ -531,9 +538,9 @@ int ZEXPORTVA gzprintf (gzFile file, const char *format, /* args */ ...) va_start(va, format); #ifdef HAS_vsnprintf - (void)vsnprintf(buf, sizeof(buf), format, va); + (void)vsnprintf_s(buf, sizeof(buf), Z_PRINTF_BUFSIZE, format, va); #else - (void)vsprintf(buf, format, va); + (void)vsprintf_s(buf, Z_PRINTF_BUFSIZE, format, va); #endif va_end(va); len = strlen(buf); /* some *sprintf don't return the nb of bytes written */ @@ -868,9 +875,10 @@ const char* ZEXPORT gzerror (file, errnum) if (m == NULL || *m == '\0') m = (char*)ERR_MSG(s->z_err); TRYFREE(s->msg); - s->msg = (char*)ALLOC(strlen(s->path) + strlen(m) + 3); - strcpy(s->msg, s->path); - strcat(s->msg, ": "); - strcat(s->msg, m); + int msgSize = strlen(s->path) + strlen(m) + 3; + s->msg = (char*)ALLOC(msgSize); + strcpy_s(s->msg, msgSize, s->path); + strcat_s(s->msg, msgSize, ": "); + strcat_s(s->msg, msgSize, m); return (const char*)s->msg; } diff --git a/handy-win32src-0.95-patched/zlib-113/inftrees.c b/handy-win32src-0.95-patched/zlib-113/inftrees.c index 382d198..d21c360 100644 --- a/handy-win32src-0.95-patched/zlib-113/inftrees.c +++ b/handy-win32src-0.95-patched/zlib-113/inftrees.c @@ -403,7 +403,6 @@ inflate_huft * FAR *tl; /* literal/length tree result */ inflate_huft * FAR *td; /* distance tree result */ z_streamp z; /* for memory allocation */ { -#pragma unused(z) #ifdef BUILDFIXED /* build fixed tables if not already */ if (!fixed_built) diff --git a/handy-win32src-0.95-patched/zlib-113/unzip.c b/handy-win32src-0.95-patched/zlib-113/unzip.c index b9f0fbf..7eca3de 100644 --- a/handy-win32src-0.95-patched/zlib-113/unzip.c +++ b/handy-win32src-0.95-patched/zlib-113/unzip.c @@ -345,7 +345,6 @@ extern unzFile ZEXPORT unzOpen (path) unz_s us; unz_s *s; uLong central_pos,uL; - FILE * fin ; uLong number_disk; /* number of the current dist, used for spaning ZIP, unsupported, always 0*/ @@ -360,9 +359,11 @@ extern unzFile ZEXPORT unzOpen (path) if (unz_copyright[0]!=' ') return NULL; - fin=fopen(path,"rb"); - if (fin==NULL) + FILE* fin; + errno_t err2; + if ((err2 = fopen_s(&fin, path, "rb")) != 0) { return NULL; + } central_pos = unzlocal_SearchCentralDir(fin); if (central_pos==0)