You can subscribe to this list here.
2004 |
Jan
(17) |
Feb
(38) |
Mar
(24) |
Apr
(18) |
May
(75) |
Jun
(2) |
Jul
|
Aug
|
Sep
(21) |
Oct
(3) |
Nov
(19) |
Dec
(5) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(15) |
Jul
(2) |
Aug
|
Sep
(5) |
Oct
|
Nov
|
Dec
|
2006 |
Jan
(8) |
Feb
|
Mar
|
Apr
(6) |
May
(73) |
Jun
(57) |
Jul
(12) |
Aug
(68) |
Sep
(6) |
Oct
|
Nov
|
Dec
|
Update of /cvsroot/vba/VisualBoyAdvance/win32/dependencies/libjpeg In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv6111/win32/dependencies/libjpeg Removed Files: .cvsignore jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c jchuff.h jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jconfig.h jcparam.c jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c jdct.h jddctmgr.c jdhuff.c jdhuff.h jdinput.c jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c jdpostct.c jdsample.c jdtrans.c jerror.c jerror.h jfdctflt.c jfdctfst.c jfdctint.c jidctflt.c jidctfst.c jidctint.c jidctred.c jinclude.h jmemmgr.c jmemnobs.c jmemsys.h jmorecfg.h jpegint.h jpeglib.h jquant1.c jquant2.c jutils.c jversion.h libjpeg.vcproj Log Message: skin support was bloating dependencies --- jdtrans.c DELETED --- --- jidctflt.c DELETED --- --- jerror.h DELETED --- --- jfdctfst.c DELETED --- --- jccoefct.c DELETED --- --- jversion.h DELETED --- --- jdmaster.c DELETED --- --- jerror.c DELETED --- --- jcapimin.c DELETED --- --- jdct.h DELETED --- --- jchuff.h DELETED --- --- jfdctint.c DELETED --- --- jmemmgr.c DELETED --- --- jpegint.h DELETED --- --- jidctred.c DELETED --- --- jdhuff.h DELETED --- --- jdcoefct.c DELETED --- --- jchuff.c DELETED --- --- jfdctflt.c DELETED --- --- jcomapi.c DELETED --- --- jdphuff.c DELETED --- --- jcsample.c DELETED --- --- jdpostct.c DELETED --- --- jccolor.c DELETED --- --- jconfig.h DELETED --- --- jcparam.c DELETED --- --- jmorecfg.h DELETED --- --- jidctint.c DELETED --- --- jcmainct.c DELETED --- --- jdatadst.c DELETED --- --- jcphuff.c DELETED --- --- jcmarker.c DELETED --- --- .cvsignore DELETED --- --- jdmainct.c DELETED --- --- jcdctmgr.c DELETED --- --- jcinit.c DELETED --- --- jdcolor.c DELETED --- --- jmemsys.h DELETED --- --- jddctmgr.c DELETED --- --- jcprepct.c DELETED --- --- jdinput.c DELETED --- --- jcapistd.c DELETED --- --- jcmaster.c DELETED --- --- jpeglib.h DELETED --- --- jdmerge.c DELETED --- --- jutils.c DELETED --- --- libjpeg.vcproj DELETED --- --- jdmarker.c DELETED --- --- jdatasrc.c DELETED --- --- jdhuff.c DELETED --- --- jquant2.c DELETED --- --- jquant1.c DELETED --- --- jinclude.h DELETED --- --- jctrans.c DELETED --- --- jdapistd.c DELETED --- --- jdapimin.c DELETED --- --- jmemnobs.c DELETED --- --- jidctfst.c DELETED --- --- jdsample.c DELETED --- |
From: Spacy <sp...@us...> - 2006-06-08 02:49:49
|
Update of /cvsroot/vba/VisualBoyAdvance/win32/dependencies/libjasper In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv5578/win32/dependencies/libjasper Removed Files: .cvsignore libjasper.vcproj Log Message: skin support was bloating dependencies --- .cvsignore DELETED --- --- libjasper.vcproj DELETED --- |
From: Spacy <sp...@us...> - 2006-06-07 18:14:30
|
Update of /cvsroot/vba/VisualBoyAdvance/src/win32 In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv20856/src/win32 Modified Files: VBA.cpp Log Message: added NOSKIN option Index: VBA.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/VBA.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** VBA.cpp 6 Jun 2006 14:33:43 -0000 1.16 --- VBA.cpp 7 Jun 2006 18:14:17 -0000 1.17 *************** *** 1832,1835 **** --- 1832,1836 ---- void VBA::winUpdateSkin() { + #ifndef NOSKINS skinButtons = 0; if(skin) { *************** *** 1853,1856 **** --- 1854,1858 ---- updateMenuBar(); } + #endif } |
From: Spacy <sp...@us...> - 2006-06-07 18:14:13
|
Update of /cvsroot/vba/VisualBoyAdvance/src/win32 In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv20458/src/win32 Modified Files: MainWndOptions.cpp Log Message: added NOSKIN option Index: MainWndOptions.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/MainWndOptions.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** MainWndOptions.cpp 6 Jun 2006 21:04:21 -0000 1.9 --- MainWndOptions.cpp 7 Jun 2006 18:13:54 -0000 1.10 *************** *** 583,586 **** --- 583,587 ---- void MainWnd::OnOptionsVideoRenderoptionsSelectskin() { + #ifndef NOSKINS LPCTSTR exts[] = {".ini" }; CString filter = winLoadFilter(IDS_FILTER_INI); *************** *** 616,619 **** --- 617,623 ---- theApp.winUpdateSkin(); theApp.winAccelMgr.UpdateMenu(theApp.menu); + #else + systemMessage( 0, _T("This build of VBA does not support skins!") ); + #endif } *************** *** 626,632 **** --- 630,640 ---- void MainWnd::OnOptionsVideoRenderoptionsSkin() { + #ifndef NOSKINS theApp.skinEnabled = !theApp.skinEnabled; theApp.updateRenderMethod(true); theApp.winAccelMgr.UpdateMenu(theApp.menu); + #else + systemMessage( 0, _T("This build of VBA does not support skins!") ); + #endif } |
From: Spacy <sp...@us...> - 2006-06-06 22:32:24
|
Update of /cvsroot/vba/VisualBoyAdvance/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv4893/src Modified Files: remote.cpp Log Message: Index: remote.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/remote.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** remote.cpp 6 Jun 2006 21:04:20 -0000 1.9 --- remote.cpp 6 Jun 2006 22:32:19 -0000 1.10 *************** *** 238,242 **** *p++ = '$'; ! for(int i = 0 ;i < count; i++) { csum += packet[i]; *p++ = packet[i]; --- 238,242 ---- *p++ = '$'; ! for(size_t i = 0 ;i < count; i++) { csum += packet[i]; *p++ = packet[i]; |
From: Spacy <sp...@us...> - 2006-06-06 22:32:23
|
Update of /cvsroot/vba/VisualBoyAdvance/src/win32 In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv4893/src/win32 Modified Files: display.cpp Log Message: Index: display.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/display.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** display.cpp 6 Jun 2006 21:27:01 -0000 1.1 --- display.cpp 6 Jun 2006 22:32:19 -0000 1.2 *************** *** 82,85 **** --- 82,95 ---- { case 16: + register unsigned int lineSize = width<<1; + register unsigned char *src = ((unsigned char*)source) + lineSize + 4; + register unsigned char *dst = (unsigned char*)destination; + do { + MoveMemory( dst, src, lineSize ); + src+=lineSize; + dst+=lineSize; + src += 2; + dst += (destinationPitch - lineSize); + } while ( --height); break; case 32: |
From: Spacy <sp...@us...> - 2006-06-06 22:10:59
|
Update of /cvsroot/vba/VisualBoyAdvance/win32/dependencies/sdl/Debug In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv27678/win32/dependencies/sdl/Debug Removed Files: SDL.dll SDL.lib SDLmain.lib Log Message: moved --- SDL.lib DELETED --- --- SDLmain.lib DELETED --- --- SDL.dll DELETED --- |
From: Spacy <sp...@us...> - 2006-06-06 22:10:03
|
Update of /cvsroot/vba/VisualBoyAdvance/win32/dependencies/sdl/Release In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv27185/win32/dependencies/sdl/Release Removed Files: SDL.dll SDL.lib SDLmain.lib Log Message: moved --- SDL.lib DELETED --- --- SDLmain.lib DELETED --- --- SDL.dll DELETED --- |
From: Spacy <sp...@us...> - 2006-06-06 21:27:14
|
Update of /cvsroot/vba/VisualBoyAdvance/src/win32 In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv8123/src/win32 Added Files: display.cpp Log Message: copyImage: shared between Direct3D & DIrectDraw --- NEW FILE: display.cpp --- // VisualBoyAdvance - Nintendo Gameboy/GameboyAdvance (TM) emulator. // Copyright (C) 1999-2003 Forgotten // Copyright (C) 2004 Forgotten and the VBA development team // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2, or(at your option) // any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software Foundation, // Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "stdafx.h" #include "Display.h" void copyImage( void *source, void *destination, unsigned int width, unsigned int height, unsigned int destinationPitch, unsigned int colorDepth ) { #ifdef ASM // Copy the image at [source] to the locked Direct3D texture __asm { mov eax, width ; Initialize mov ebx, height ; mov edi, destination ; mov edx, destinationPitch ; cmp colorDepth, 16 ; Check colorDepth==16bit jnz gbaOtherColor ; sub edx, eax ; sub edx, eax ; mov esi, source ; lea esi,[esi+2*eax+4] ; shr eax, 1 ; gbaLoop16bit: mov ecx, eax ; rep movsd ; add esi, 4 ; add edi, edx ; dec ebx ; jnz gbaLoop16bit ; jmp gbaLoopEnd ; gbaOtherColor: cmp colorDepth, 32 ; Check colorDepth==32bit jnz gbaOtherColor2 ; lea esi, [eax*4] ; sub edx, esi ; mov esi, source ; lea esi, [esi+4*eax+4] ; gbaLoop32bit: mov ecx, eax ; rep movsd ; ECX times: Move DWORD at [ESI] to [EDI] | ESI++ EDI++ add esi, 4 ; add edi, edx ; dec ebx ; jnz gbaLoop32bit ; jmp gbaLoopEnd ; gbaOtherColor2: lea eax, [eax+2*eax] ; Works like colorDepth==24bit sub edx, eax ; gbaLoop24bit: mov ecx, eax ; shr ecx, 2 ; rep movsd ; add edi, edx ; dec ebx ; jnz gbaLoop24bit ; gbaLoopEnd: } #else // #ifdef ASM // optimized C version switch(colorDepth) { case 16: break; case 32: register unsigned int lineSize = width<<2; register unsigned char *src = ((unsigned char*)source) + lineSize + 4; register unsigned char *dst = (unsigned char*)destination; do { MoveMemory( dst, src, lineSize ); src+=lineSize; dst+=lineSize; src += 4; dst += (destinationPitch - lineSize); } while ( --height); break; } // very compatible C version //unsigned int nBytesPerPixel = colorDepth>>3; //unsigned int i, x, y, srcPitch = (width+1) * nBytesPerPixel; //unsigned char * src = ((unsigned char*)source)+srcPitch; //unsigned char * dst = (unsigned char*)destination; //for (y=0;y<height;y++) //Width //for (x=0;x<width;x++) //Height //for (i=0;i<nBytesPerPixel;i++) //Byte# Of Pixel //*(dst+i+(x*nBytesPerPixel)+(y*destinationPitch)) = *(src+i+(x*nBytesPerPixel)+(y*srcPitch)); #endif // #ifdef ASM } |
Update of /cvsroot/vba/VisualBoyAdvance/src/win32 In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv29806/src/win32 Modified Files: AcceleratorManager.cpp Direct3D.cpp DirectDraw.cpp DirectInput.cpp Display.h GBCheatsDlg.cpp GBCheatsDlg.h GBMapView.cpp Input.h Joypad.cpp Joypad.h Logging.cpp MainWndFile.cpp MainWndOptions.cpp MainWndTools.cpp MapView.cpp ModeConfirm.cpp ModeConfirm.h ResizeDlg.cpp TileView.cpp VBA.h VideoMode.cpp skin.cpp vba.rc Log Message: make compilable for Windows x64 Index: Display.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/Display.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Display.h 13 May 2004 15:06:49 -0000 1.2 --- Display.h 6 Jun 2006 21:04:21 -0000 1.3 *************** *** 18,21 **** --- 18,23 ---- // Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + #pragma once + enum DISPLAY_TYPE { GDI = 0, *************** *** 43,44 **** --- 45,48 ---- virtual int selectFullScreenMode(GUID **) = 0; }; + + void copyImage( void *source, void *destination, unsigned int width, unsigned int height, unsigned int destinationPitch, unsigned int colorDepth ); Index: Input.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/Input.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Input.h 13 May 2004 15:06:50 -0000 1.2 --- Input.h 6 Jun 2006 21:04:21 -0000 1.3 *************** *** 44,48 **** virtual bool readDevices() = 0; virtual u32 readDevice(int which) = 0; ! virtual CString getKeyName(int key) = 0; virtual void checkKeys() = 0; virtual void checkMotionKeys() = 0; --- 44,48 ---- virtual bool readDevices() = 0; virtual u32 readDevice(int which) = 0; ! virtual CString getKeyName(LONG_PTR key) = 0; virtual void checkKeys() = 0; virtual void checkMotionKeys() = 0; Index: MainWndTools.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/MainWndTools.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** MainWndTools.cpp 13 May 2004 15:06:50 -0000 1.3 --- MainWndTools.cpp 6 Jun 2006 21:04:21 -0000 1.4 *************** *** 52,56 **** extern bool debugger; extern int emulating; ! extern int remoteSocket; extern void remoteCleanUp(); --- 52,56 ---- extern bool debugger; extern int emulating; ! extern SOCKET remoteSocket; extern void remoteCleanUp(); Index: Joypad.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/Joypad.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Joypad.h 27 May 2006 14:47:33 -0000 1.3 --- Joypad.h 6 Jun 2006 21:04:21 -0000 1.4 *************** *** 61,65 **** public: void assignKeys(); ! void assignKey(int id, int key); JoypadConfig(int w, CWnd* pParent = NULL); // standard constructor --- 61,65 ---- public: void assignKeys(); ! void assignKey(int id, LONG_PTR key); JoypadConfig(int w, CWnd* pParent = NULL); // standard constructor *************** *** 100,104 **** afx_msg void OnOk(); afx_msg void OnDestroy(); ! afx_msg void OnTimer(UINT nIDEvent); afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags); virtual BOOL OnInitDialog(); --- 100,104 ---- afx_msg void OnOk(); afx_msg void OnDestroy(); ! afx_msg void OnTimer(UINT_PTR nIDEvent); afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags); virtual BOOL OnInitDialog(); *************** *** 114,118 **** public: void assignKeys(); ! void assignKey(int id, int key); MotionConfig(CWnd* pParent = NULL); // standard constructor --- 114,118 ---- public: void assignKeys(); ! void assignKey(int id, LONG_PTR key); MotionConfig(CWnd* pParent = NULL); // standard constructor *************** *** 143,147 **** virtual BOOL OnInitDialog(); afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags); ! afx_msg void OnTimer(UINT nIDEvent); DECLARE_MESSAGE_MAP() private: --- 143,147 ---- virtual BOOL OnInitDialog(); afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags); ! afx_msg void OnTimer(UINT_PTR nIDEvent); DECLARE_MESSAGE_MAP() private: Index: Direct3D.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/Direct3D.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Direct3D.cpp 13 May 2006 16:32:16 -0000 1.8 --- Direct3D.cpp 6 Jun 2006 21:04:21 -0000 1.9 *************** *** 36,39 **** --- 36,41 ---- #include "resource.h" + #include "Display.h" + #ifdef _DEBUG #define new DEBUG_NEW *************** *** 502,506 **** if(!pDevice) return; ! // Test the cooperative level to see if it's okay to render if( FAILED( pDevice->TestCooperativeLevel() ) ) --- 504,508 ---- if(!pDevice) return; ! // Test the cooperative level to see if it's okay to render if( FAILED( pDevice->TestCooperativeLevel() ) ) *************** *** 542,600 **** copyY = 144; } ! } ! // MMX doesn't seem to be faster to copy the data ! __asm { ! mov eax, copyX; ! mov ebx, copyY; ! ! mov esi, pix; ! mov edi, locked.pBits; ! mov edx, locked.Pitch; ! cmp systemColorDepth, 16; ! jnz gbaOtherColor; ! sub edx, eax; ! sub edx, eax; ! lea esi,[esi+2*eax+4]; ! shr eax, 1; ! gbaLoop16bit: ! mov ecx, eax; ! repz movsd; ! inc esi; ! inc esi; ! inc esi; ! inc esi; ! add edi, edx; ! dec ebx; ! jnz gbaLoop16bit; ! jmp gbaLoopEnd; ! gbaOtherColor: ! cmp systemColorDepth, 32; ! jnz gbaOtherColor2; ! ! sub edx, eax; ! sub edx, eax; ! sub edx, eax; ! sub edx, eax; ! lea esi, [esi+4*eax+4]; ! gbaLoop32bit: ! mov ecx, eax; ! repz movsd; ! add esi, 4; ! add edi, edx; ! dec ebx; ! jnz gbaLoop32bit; ! jmp gbaLoopEnd; ! gbaOtherColor2: ! lea eax, [eax+2*eax]; ! sub edx, eax; ! gbaLoop24bit: ! mov ecx, eax; ! shr ecx, 2; ! repz movsd; ! add edi, edx; ! dec ebx; ! jnz gbaLoop24bit; ! gbaLoopEnd: ! } } --- 544,549 ---- copyY = 144; } ! } ! copyImage( pix, locked.pBits, theApp.sizeX, theApp.sizeY, locked.Pitch, systemColorDepth ); } *************** *** 713,715 **** return new Direct3DDisplay(); } - --- 662,663 ---- Index: GBCheatsDlg.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/GBCheatsDlg.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** GBCheatsDlg.cpp 13 May 2004 15:06:49 -0000 1.4 --- GBCheatsDlg.cpp 6 Jun 2006 21:04:21 -0000 1.5 *************** *** 638,642 **** m_desc.GetWindowText(buffer); ! int bank = (address >> 16); address &= 0xFFFF; --- 638,642 ---- m_desc.GetWindowText(buffer); ! LONG_PTR bank = (address >> 16); address &= 0xFFFF; *************** *** 690,696 **** m_address.SetWindowText(buffer); m_address.EnableWindow(FALSE); ! ::SetWindowLong(m_address, ! GWL_USERDATA, ! address); numberType = regQueryDwordValue("gbCheatsNumberType", 2); --- 690,694 ---- m_address.SetWindowText(buffer); m_address.EnableWindow(FALSE); ! ::SetWindowLongPtr( m_address.GetSafeHwnd(), GWLP_USERDATA, address); numberType = regQueryDwordValue("gbCheatsNumberType", 2); *************** *** 827,833 **** if(m_list.GetItem(&item)) { if(gbCheatList[item.lParam].enabled) ! gbCheatDisable(item.lParam); else ! gbCheatEnable(item.lParam); refresh(); } --- 825,831 ---- if(m_list.GetItem(&item)) { if(gbCheatList[item.lParam].enabled) ! gbCheatDisable((int)item.lParam); else ! gbCheatEnable((int)item.lParam); refresh(); } *************** *** 845,849 **** item.iItem = mark; if(m_list.GetItem(&item)) { ! gbCheatRemove(item.lParam); refresh(); } --- 843,847 ---- item.iItem = mark; if(m_list.GetItem(&item)) { ! gbCheatRemove((int)item.lParam); refresh(); } *************** *** 873,879 **** (((l->uNewState & LVIS_STATEIMAGEMASK)>>12))) { if(m_list.GetCheck(l->iItem)) ! gbCheatEnable(l->lParam); else ! gbCheatDisable(l->lParam); refresh(); } --- 871,877 ---- (((l->uNewState & LVIS_STATEIMAGEMASK)>>12))) { if(m_list.GetCheck(l->iItem)) ! gbCheatEnable((int)l->lParam); else ! gbCheatDisable((int)l->lParam); refresh(); } Index: GBCheatsDlg.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/GBCheatsDlg.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** GBCheatsDlg.h 13 May 2004 15:06:49 -0000 1.3 --- GBCheatsDlg.h 6 Jun 2006 21:04:21 -0000 1.4 *************** *** 122,126 **** // Implementation protected: ! u32 address; // Generated message map functions --- 122,126 ---- // Implementation protected: ! LONG_PTR address; // Generated message map functions Index: Logging.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/Logging.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Logging.cpp 5 Jan 2006 14:55:31 -0000 1.6 --- Logging.cpp 6 Jun 2006 21:04:21 -0000 1.7 *************** *** 238,242 **** void Logging::log(const char *s) { ! int size = ::SendMessage(m_log, WM_GETTEXTLENGTH, 0, 0); m_log.SetSel(size, size); m_log.ReplaceSel(s); --- 238,242 ---- void Logging::log(const char *s) { ! DWORD size = (DWORD)::SendMessage(m_log, WM_GETTEXTLENGTH, 0, 0); m_log.SetSel(size, size); m_log.ReplaceSel(s); Index: AcceleratorManager.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/AcceleratorManager.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** AcceleratorManager.cpp 4 Nov 2003 14:09:51 -0000 1.6 --- AcceleratorManager.cpp 6 Jun 2006 21:04:20 -0000 1.7 *************** *** 248,252 **** } ! int nAccel = arrayACCEL.GetSize(); LPACCEL lpAccel = (LPACCEL)LocalAlloc(LPTR, nAccel * sizeof(ACCEL)); if (!lpAccel) { --- 248,252 ---- } ! INT_PTR nAccel = arrayACCEL.GetSize(); LPACCEL lpAccel = (LPACCEL)LocalAlloc(LPTR, nAccel * sizeof(ACCEL)); if (!lpAccel) { *************** *** 269,273 **** arrayACCEL.RemoveAll(); ! HACCEL hNewTable = CreateAcceleratorTable(lpAccel, nAccel); if (!hNewTable) { ::LocalFree(lpAccel); --- 269,273 ---- arrayACCEL.RemoveAll(); ! HACCEL hNewTable = CreateAcceleratorTable(lpAccel, (int)nAccel); if (!hNewTable) { ::LocalFree(lpAccel); *************** *** 710,714 **** // AccelsDatasArray.InsertAt(0, MAKELONG(65535, iCount)); ! int count = AccelsDatasArray.GetSize(); DWORD *data = (DWORD *)malloc(count * sizeof(DWORD)); ASSERT(data != NULL); --- 710,714 ---- // AccelsDatasArray.InsertAt(0, MAKELONG(65535, iCount)); ! INT_PTR count = AccelsDatasArray.GetSize(); DWORD *data = (DWORD *)malloc(count * sizeof(DWORD)); ASSERT(data != NULL); *************** *** 717,721 **** data[index] = AccelsDatasArray[index]; ! regSetBinaryValue("keyboard", (char *)data, count*sizeof(DWORD)); AccelsDatasArray.RemoveAll(); --- 717,721 ---- data[index] = AccelsDatasArray[index]; ! regSetBinaryValue("keyboard", (char *)data, (int)(count*sizeof(DWORD))); AccelsDatasArray.RemoveAll(); Index: ModeConfirm.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/ModeConfirm.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ModeConfirm.h 27 May 2006 14:47:33 -0000 1.3 --- ModeConfirm.h 6 Jun 2006 21:04:21 -0000 1.4 *************** *** 61,65 **** afx_msg void OnDestroy(); virtual BOOL OnInitDialog(); ! afx_msg void OnTimer(UINT nIDEvent); //}}AFX_MSG DECLARE_MESSAGE_MAP() --- 61,65 ---- afx_msg void OnDestroy(); virtual BOOL OnInitDialog(); ! afx_msg void OnTimer(UINT_PTR nIDEvent); //}}AFX_MSG DECLARE_MESSAGE_MAP() Index: GBMapView.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/GBMapView.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** GBMapView.cpp 27 May 2006 14:47:33 -0000 1.7 --- GBMapView.cpp 6 Jun 2006 21:04:21 -0000 1.8 *************** *** 501,505 **** int x = (int)(wParam & 0xffff); ! int y = wParam >> 16; CString buffer; --- 501,505 ---- int x = (int)(wParam & 0xffff); ! int y = (int)(wParam >> 16); CString buffer; Index: MapView.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/MapView.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** MapView.cpp 3 Sep 2005 12:29:23 -0000 1.9 --- MapView.cpp 6 Jun 2006 21:04:21 -0000 1.10 *************** *** 787,792 **** mapViewZoom.setColors(colors); ! int x = wParam & 0xffff; ! int y = (wParam >> 16); CString buffer; --- 787,792 ---- mapViewZoom.setColors(colors); ! int x = (int)(wParam & 0xffff); ! int y = (int)(wParam >> 16); CString buffer; Index: ModeConfirm.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/ModeConfirm.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ModeConfirm.cpp 13 May 2004 15:06:55 -0000 1.2 --- ModeConfirm.cpp 6 Jun 2006 21:04:21 -0000 1.3 *************** *** 101,105 **** } ! void ModeConfirm::OnTimer(UINT nIDEvent) { CString buffer; --- 101,105 ---- } ! void ModeConfirm::OnTimer(UINT_PTR nIDEvent) { CString buffer; Index: TileView.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/TileView.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TileView.cpp 3 Sep 2005 12:29:23 -0000 1.3 --- TileView.cpp 6 Jun 2006 21:04:21 -0000 1.4 *************** *** 530,535 **** zoom.setColors(colors); ! int x = (wParam & 0xFFFF)/8; ! int y = ((wParam >> 16) & 0xFFFF)/8; u32 address = 0x6000000 + 0x4000 * charBase; --- 530,535 ---- zoom.setColors(colors); ! int x = (int)((wParam & 0xFFFF) / 8); ! int y = (int)(((wParam >> 16) & 0xFFFF) / 8); u32 address = 0x6000000 + 0x4000 * charBase; Index: vba.rc =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/vba.rc,v retrieving revision 1.55 retrieving revision 1.56 diff -C2 -d -r1.55 -r1.56 *** vba.rc 27 May 2006 14:47:33 -0000 1.55 --- vba.rc 6 Jun 2006 21:04:21 -0000 1.56 *************** *** 13,18 **** #undef APSTUDIO_READONLY_SYMBOLS - ///////////////////////////////////////////////////////////////////////////// - // English (U.S.) resources #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) --- 13,16 ---- *************** *** 77,81 **** FONT 8, "MS Sans Serif", 0, 0, 0x0 BEGIN ! ICON 101,IDC_STATIC,6,6,20,20 CTEXT "VisualBoyAdvance Emulator",IDC_STATIC,30,6,120,8 CTEXT "Copyright © 2006 VBA development team",IDC_STATIC,6,36,144,8 --- 75,79 ---- FONT 8, "MS Sans Serif", 0, 0, 0x0 BEGIN ! ICON IDI_ICON,IDC_STATIC,6,6,20,20 CTEXT "VisualBoyAdvance Emulator",IDC_STATIC,30,6,120,8 CTEXT "Copyright © 2006 VBA development team",IDC_STATIC,6,36,144,8 *************** *** 1826,1836 **** ///////////////////////////////////////////////////////////////////////////// // - // RT_MANIFEST - // - - 1 RT_MANIFEST "VisualBoyAdvance.exe.manifest" - - ///////////////////////////////////////////////////////////////////////////// - // // String Table // --- 1824,1827 ---- Index: DirectDraw.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/DirectDraw.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** DirectDraw.cpp 13 May 2006 16:32:16 -0000 1.8 --- DirectDraw.cpp 6 Jun 2006 21:04:21 -0000 1.9 *************** *** 34,37 **** --- 34,39 ---- #include "resource.h" + #include "Display.h" + #ifdef _DEBUG #define new DEBUG_NEW *************** *** 632,635 **** --- 634,638 ---- { HRESULT hret; + unsigned int nBytesPerPixel = systemColorDepth>>3; if(pDirectDraw == NULL || *************** *** 704,761 **** } } ! // MMX doesn't seem to be faster to copy the data ! __asm { ! mov eax, copyX; ! mov ebx, copyY; ! ! mov esi, pix; ! mov edi, ddsDesc.lpSurface; ! mov edx, ddsDesc.lPitch; ! cmp systemColorDepth, 16; ! jnz gbaOtherColor; ! sub edx, eax; ! sub edx, eax; ! lea esi,[esi+2*eax+4]; ! shr eax, 1; ! gbaLoop16bit: ! mov ecx, eax; ! repz movsd; ! inc esi; ! inc esi; ! inc esi; ! inc esi; ! add edi, edx; ! dec ebx; ! jnz gbaLoop16bit; ! jmp gbaLoopEnd; ! gbaOtherColor: ! cmp systemColorDepth, 32; ! jnz gbaOtherColor2; ! ! sub edx, eax; ! sub edx, eax; ! sub edx, eax; ! sub edx, eax; ! lea esi, [esi+4*eax+4]; ! gbaLoop32bit: ! mov ecx, eax; ! repz movsd; ! add esi, 4; ! add edi, edx; ! dec ebx; ! jnz gbaLoop32bit; ! jmp gbaLoopEnd; ! gbaOtherColor2: ! lea eax, [eax+2*eax]; ! sub edx, eax; ! gbaLoop24bit: ! mov ecx, eax; ! shr ecx, 2; ! repz movsd; ! add edi, edx; ! dec ebx; ! jnz gbaLoop24bit; ! gbaLoopEnd: ! } } if(theApp.showSpeed && (theApp.videoOption > VIDEO_4X || theApp.skin != NULL)) { --- 707,711 ---- } } ! copyImage( pix, ddsDesc.lpSurface, copyX, copyY, ddsDesc.lPitch, systemColorDepth ); } if(theApp.showSpeed && (theApp.videoOption > VIDEO_4X || theApp.skin != NULL)) { *************** *** 829,833 **** SetBkMode(hdc,TRANSPARENT); TextOut(hdc, theApp.dest.left+10, theApp.dest.bottom - 20, theApp.screenMessageBuffer, ! strlen(theApp.screenMessageBuffer)); ddsPrimary->ReleaseDC(hdc); } else { --- 779,783 ---- SetBkMode(hdc,TRANSPARENT); TextOut(hdc, theApp.dest.left+10, theApp.dest.bottom - 20, theApp.screenMessageBuffer, ! (int)_tcslen(theApp.screenMessageBuffer)); ddsPrimary->ReleaseDC(hdc); } else { Index: VideoMode.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/VideoMode.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** VideoMode.cpp 13 May 2006 16:32:16 -0000 1.6 --- VideoMode.cpp 6 Jun 2006 21:04:21 -0000 1.7 *************** *** 111,115 **** sprintf(buffer, "%4dx%4dx%2d", surf->dwWidth, surf->dwHeight, surf->ddpfPixelFormat.dwRGBBitCount); ! int pos = ::SendMessage(h, LB_ADDSTRING, 0, (LPARAM)buffer); ::SendMessage(h, LB_SETITEMDATA, pos, (surf->ddpfPixelFormat.dwRGBBitCount << 24) | --- 111,115 ---- sprintf(buffer, "%4dx%4dx%2d", surf->dwWidth, surf->dwHeight, surf->ddpfPixelFormat.dwRGBBitCount); ! WPARAM pos = ::SendMessage(h, LB_ADDSTRING, 0, (LPARAM)buffer); ::SendMessage(h, LB_SETITEMDATA, pos, (surf->ddpfPixelFormat.dwRGBBitCount << 24) | *************** *** 185,189 **** VideoDriverSelect d(pWnd); ! selected = d.DoModal(); if(selected == -1) { --- 185,189 ---- VideoDriverSelect d(pWnd); ! INT_PTR selected = d.DoModal(); if(selected == -1) { *************** *** 230,234 **** VideoMode dlg(ddraw, pWnd); ! int res = dlg.DoModal(); if(res != -1) { --- 230,234 ---- VideoMode dlg(ddraw, pWnd); ! INT_PTR res = dlg.DoModal(); if(res != -1) { *************** *** 246,250 **** #endif ! return res; } --- 246,250 ---- #endif ! return (int)res; } *************** *** 297,306 **** void VideoMode::OnOk() { ! int cur = m_modes.GetCurSel(); if(cur != -1) { ! cur = m_modes.GetItemData(cur); } ! EndDialog(cur); } --- 297,306 ---- void VideoMode::OnOk() { ! DWORD_PTR cur = m_modes.GetCurSel(); if(cur != -1) { ! cur = m_modes.GetItemData((int)cur); } ! EndDialog((int)cur); } Index: ResizeDlg.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/ResizeDlg.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ResizeDlg.cpp 4 Nov 2003 14:09:52 -0000 1.3 --- ResizeDlg.cpp 6 Jun 2006 21:04:21 -0000 1.4 *************** *** 90,94 **** if(res == IDRETRY) { ! __asm int 3; } else if(res == IDABORT) SendMessage(*theApp.m_pMainWnd, WM_QUIT, 0, 0); --- 90,94 ---- if(res == IDRETRY) { ! DebugBreak(); } else if(res == IDABORT) SendMessage(*theApp.m_pMainWnd, WM_QUIT, 0, 0); *************** *** 144,148 **** ::SendMessage(*theApp.m_pMainWnd, WM_QUIT, 0, 0); } else if(nCode == IDRETRY) ! __asm int 3; } --- 144,148 ---- ::SendMessage(*theApp.m_pMainWnd, WM_QUIT, 0, 0); } else if(nCode == IDRETRY) ! DebugBreak(); } Index: MainWndFile.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/MainWndFile.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** MainWndFile.cpp 6 Jun 2006 14:33:43 -0000 1.15 --- MainWndFile.cpp 6 Jun 2006 21:04:21 -0000 1.16 *************** *** 707,711 **** if(game != -1) { ! return cheatsImportGSACodeFile(fileName, game, v3); } --- 707,711 ---- if(game != -1) { ! return cheatsImportGSACodeFile(fileName, (int)game, v3); } Index: Joypad.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/Joypad.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Joypad.cpp 6 Jun 2006 14:33:43 -0000 1.7 --- Joypad.cpp 6 Jun 2006 21:04:21 -0000 1.8 *************** *** 31,36 **** #endif ! extern USHORT joypad[4][13]; ! extern USHORT motion[4]; ///////////////////////////////////////////////////////////////////////////// --- 31,36 ---- #endif ! extern LONG_PTR joypad[4][13]; ! extern LONG_PTR motion[4]; ///////////////////////////////////////////////////////////////////////////// *************** *** 55,63 **** LRESULT JoypadEditControl::OnJoyConfig(WPARAM wParam, LPARAM lParam) { ! #ifdef _WIN64 ! SetWindowLongPtr( GetSafeHwnd(), GWL_USERDATA, ((wParam<<8)|lParam) ); ! #else ! SetWindowLongPtr( GetSafeHwnd(), GWL_USERDATA, PtrToLong((wParam<<8)|lParam) ); ! #endif this->SetWindowText( theApp.input->getKeyName( (int)((wParam<<8)|lParam) ) ); GetParent()->GetNextDlgTabItem(this, FALSE)->SetFocus(); --- 55,59 ---- LRESULT JoypadEditControl::OnJoyConfig(WPARAM wParam, LPARAM lParam) { ! SetWindowLongPtr( this->GetSafeHwnd(), GWLP_USERDATA, (wParam<<8) | lParam ); this->SetWindowText( theApp.input->getKeyName( (int)((wParam<<8)|lParam) ) ); GetParent()->GetNextDlgTabItem(this, FALSE)->SetFocus(); *************** *** 140,144 **** } ! void JoypadConfig::OnTimer(UINT nIDEvent) { theApp.input->checkDevices(); --- 136,140 ---- } ! void JoypadConfig::OnTimer(UINT_PTR nIDEvent) { theApp.input->checkDevices(); *************** *** 157,197 **** timerId = SetTimer(0,50,NULL); ! SetWindowLongPtr(up, GWL_USERDATA,joypad[which][KEY_UP]); up.SetWindowText(theApp.input->getKeyName(joypad[which][KEY_UP])); ! SetWindowLongPtr(down, GWL_USERDATA,joypad[which][KEY_DOWN]); down.SetWindowText(theApp.input->getKeyName(joypad[which][KEY_DOWN])); ! SetWindowLongPtr(left, GWL_USERDATA,joypad[which][KEY_LEFT]); left.SetWindowText(theApp.input->getKeyName(joypad[which][KEY_LEFT])); ! SetWindowLongPtr(right, GWL_USERDATA,joypad[which][KEY_RIGHT]); right.SetWindowText(theApp.input->getKeyName(joypad[which][KEY_RIGHT])); ! SetWindowLongPtr(buttonA, GWL_USERDATA,joypad[which][KEY_BUTTON_A]); buttonA.SetWindowText(theApp.input->getKeyName(joypad[which][KEY_BUTTON_A])); ! SetWindowLongPtr(buttonB, GWL_USERDATA,joypad[which][KEY_BUTTON_B]); buttonB.SetWindowText(theApp.input->getKeyName(joypad[which][KEY_BUTTON_B])); ! SetWindowLongPtr(buttonL, GWL_USERDATA,joypad[which][KEY_BUTTON_L]); buttonL.SetWindowText(theApp.input->getKeyName(joypad[which][KEY_BUTTON_L])); ! SetWindowLongPtr(buttonR, GWL_USERDATA,joypad[which][KEY_BUTTON_R]); buttonR.SetWindowText(theApp.input->getKeyName(joypad[which][KEY_BUTTON_R])); ! SetWindowLongPtr(buttonSelect, GWL_USERDATA,joypad[which][KEY_BUTTON_SELECT]); buttonSelect.SetWindowText(theApp.input->getKeyName(joypad[which][KEY_BUTTON_SELECT])); ! SetWindowLongPtr(buttonStart, GWL_USERDATA,joypad[which][KEY_BUTTON_START]); buttonStart.SetWindowText(theApp.input->getKeyName(joypad[which][KEY_BUTTON_START])); ! SetWindowLongPtr(speed, GWL_USERDATA,joypad[which][KEY_BUTTON_SPEED]); speed.SetWindowText(theApp.input->getKeyName(joypad[which][KEY_BUTTON_SPEED])); ! SetWindowLongPtr(capture, GWL_USERDATA,joypad[which][KEY_BUTTON_CAPTURE]); capture.SetWindowText(theApp.input->getKeyName(joypad[which][KEY_BUTTON_CAPTURE])); ! SetWindowLongPtr(buttonGS, GWL_USERDATA,joypad[which][KEY_BUTTON_GS]); buttonGS.SetWindowText(theApp.input->getKeyName(joypad[which][KEY_BUTTON_GS])); --- 153,193 ---- timerId = SetTimer(0,50,NULL); ! SetWindowLongPtr(up, GWLP_USERDATA,joypad[which][KEY_UP]); up.SetWindowText(theApp.input->getKeyName(joypad[which][KEY_UP])); ! SetWindowLongPtr(down, GWLP_USERDATA,joypad[which][KEY_DOWN]); down.SetWindowText(theApp.input->getKeyName(joypad[which][KEY_DOWN])); ! SetWindowLongPtr(left, GWLP_USERDATA,joypad[which][KEY_LEFT]); left.SetWindowText(theApp.input->getKeyName(joypad[which][KEY_LEFT])); ! SetWindowLongPtr(right, GWLP_USERDATA,joypad[which][KEY_RIGHT]); right.SetWindowText(theApp.input->getKeyName(joypad[which][KEY_RIGHT])); ! SetWindowLongPtr(buttonA, GWLP_USERDATA,joypad[which][KEY_BUTTON_A]); buttonA.SetWindowText(theApp.input->getKeyName(joypad[which][KEY_BUTTON_A])); ! SetWindowLongPtr(buttonB, GWLP_USERDATA,joypad[which][KEY_BUTTON_B]); buttonB.SetWindowText(theApp.input->getKeyName(joypad[which][KEY_BUTTON_B])); ! SetWindowLongPtr(buttonL, GWLP_USERDATA,joypad[which][KEY_BUTTON_L]); buttonL.SetWindowText(theApp.input->getKeyName(joypad[which][KEY_BUTTON_L])); ! SetWindowLongPtr(buttonR, GWLP_USERDATA,joypad[which][KEY_BUTTON_R]); buttonR.SetWindowText(theApp.input->getKeyName(joypad[which][KEY_BUTTON_R])); ! SetWindowLongPtr(buttonSelect, GWLP_USERDATA,joypad[which][KEY_BUTTON_SELECT]); buttonSelect.SetWindowText(theApp.input->getKeyName(joypad[which][KEY_BUTTON_SELECT])); ! SetWindowLongPtr(buttonStart, GWLP_USERDATA,joypad[which][KEY_BUTTON_START]); buttonStart.SetWindowText(theApp.input->getKeyName(joypad[which][KEY_BUTTON_START])); ! SetWindowLongPtr(speed, GWLP_USERDATA,joypad[which][KEY_BUTTON_SPEED]); speed.SetWindowText(theApp.input->getKeyName(joypad[which][KEY_BUTTON_SPEED])); ! SetWindowLongPtr(capture, GWLP_USERDATA,joypad[which][KEY_BUTTON_CAPTURE]); capture.SetWindowText(theApp.input->getKeyName(joypad[which][KEY_BUTTON_CAPTURE])); ! SetWindowLongPtr(buttonGS, GWLP_USERDATA,joypad[which][KEY_BUTTON_GS]); buttonGS.SetWindowText(theApp.input->getKeyName(joypad[which][KEY_BUTTON_GS])); *************** *** 202,206 **** } ! void JoypadConfig::assignKey(int id, int key) { switch(id) { --- 198,202 ---- } ! void JoypadConfig::assignKey(int id, LONG_PTR key) { switch(id) { *************** *** 252,292 **** id = IDC_EDIT_UP; ! assignKey(id, GetWindowLongPtr(up, GWL_USERDATA)); id = IDC_EDIT_DOWN; ! assignKey(id, GetWindowLongPtr(down, GWL_USERDATA)); id = IDC_EDIT_LEFT; ! assignKey(id, GetWindowLongPtr(left, GWL_USERDATA)); id = IDC_EDIT_RIGHT; ! assignKey(id, GetWindowLongPtr(right, GWL_USERDATA)); id = IDC_EDIT_BUTTON_A; ! assignKey(id, GetWindowLongPtr(buttonA, GWL_USERDATA)); id = IDC_EDIT_BUTTON_B; ! assignKey(id, GetWindowLongPtr(buttonB, GWL_USERDATA)); id = IDC_EDIT_BUTTON_L; ! assignKey(id, GetWindowLongPtr(buttonL, GWL_USERDATA)); id = IDC_EDIT_BUTTON_R; ! assignKey(id, GetWindowLongPtr(buttonR, GWL_USERDATA)); id = IDC_EDIT_BUTTON_SELECT; ! assignKey(id, GetWindowLongPtr(buttonSelect, GWL_USERDATA)); id = IDC_EDIT_BUTTON_START; ! assignKey(id, GetWindowLongPtr(buttonStart, GWL_USERDATA)); id = IDC_EDIT_SPEED; ! assignKey(id, GetWindowLongPtr(speed, GWL_USERDATA)); id = IDC_EDIT_CAPTURE; ! assignKey(id, GetWindowLongPtr(capture, GWL_USERDATA)); id = IDC_EDIT_BUTTON_GS; ! assignKey(id, GetWindowLongPtr(buttonGS, GWL_USERDATA)); // winSaveKeys(); --- 248,288 ---- id = IDC_EDIT_UP; ! assignKey(id, GetWindowLongPtr(up, GWLP_USERDATA)); id = IDC_EDIT_DOWN; ! assignKey(id, GetWindowLongPtr(down, GWLP_USERDATA)); id = IDC_EDIT_LEFT; ! assignKey(id, GetWindowLongPtr(left, GWLP_USERDATA)); id = IDC_EDIT_RIGHT; ! assignKey(id, GetWindowLongPtr(right, GWLP_USERDATA)); id = IDC_EDIT_BUTTON_A; ! assignKey(id, GetWindowLongPtr(buttonA, GWLP_USERDATA)); id = IDC_EDIT_BUTTON_B; ! assignKey(id, GetWindowLongPtr(buttonB, GWLP_USERDATA)); id = IDC_EDIT_BUTTON_L; ! assignKey(id, GetWindowLongPtr(buttonL, GWLP_USERDATA)); id = IDC_EDIT_BUTTON_R; ! assignKey(id, GetWindowLongPtr(buttonR, GWLP_USERDATA)); id = IDC_EDIT_BUTTON_SELECT; ! assignKey(id, GetWindowLongPtr(buttonSelect, GWLP_USERDATA)); id = IDC_EDIT_BUTTON_START; ! assignKey(id, GetWindowLongPtr(buttonStart, GWLP_USERDATA)); id = IDC_EDIT_SPEED; ! assignKey(id, GetWindowLongPtr(speed, GWLP_USERDATA)); id = IDC_EDIT_CAPTURE; ! assignKey(id, GetWindowLongPtr(capture, GWLP_USERDATA)); id = IDC_EDIT_BUTTON_GS; ! assignKey(id, GetWindowLongPtr(buttonGS, GWLP_USERDATA)); // winSaveKeys(); *************** *** 355,368 **** timerId = SetTimer(0,200,NULL); ! SetWindowLongPtr(up, GWL_USERDATA,motion[KEY_UP]); up.SetWindowText(theApp.input->getKeyName(motion[KEY_UP])); ! SetWindowLongPtr(down, GWL_USERDATA,motion[KEY_DOWN]); down.SetWindowText(theApp.input->getKeyName(motion[KEY_DOWN])); ! SetWindowLongPtr(left, GWL_USERDATA,motion[KEY_LEFT]); left.SetWindowText(theApp.input->getKeyName(motion[KEY_LEFT])); ! SetWindowLongPtr(right, GWL_USERDATA,motion[KEY_RIGHT]); right.SetWindowText(theApp.input->getKeyName(motion[KEY_RIGHT])); --- 351,364 ---- timerId = SetTimer(0,200,NULL); ! SetWindowLongPtr(up, GWLP_USERDATA,motion[KEY_UP]); up.SetWindowText(theApp.input->getKeyName(motion[KEY_UP])); ! SetWindowLongPtr(down, GWLP_USERDATA,motion[KEY_DOWN]); down.SetWindowText(theApp.input->getKeyName(motion[KEY_DOWN])); ! SetWindowLongPtr(left, GWLP_USERDATA,motion[KEY_LEFT]); left.SetWindowText(theApp.input->getKeyName(motion[KEY_LEFT])); ! SetWindowLongPtr(right, GWLP_USERDATA,motion[KEY_RIGHT]); right.SetWindowText(theApp.input->getKeyName(motion[KEY_RIGHT])); *************** *** 377,381 **** } ! void MotionConfig::OnTimer(UINT nIDEvent) { theApp.input->checkDevices(); --- 373,377 ---- } ! void MotionConfig::OnTimer(UINT_PTR nIDEvent) { theApp.input->checkDevices(); *************** *** 384,388 **** } ! void MotionConfig::assignKey(int id, int key) { switch(id) { --- 380,384 ---- } ! void MotionConfig::assignKey(int id, LONG_PTR key) { switch(id) { *************** *** 407,419 **** id = IDC_EDIT_UP; ! assignKey(id, GetWindowLongPtr(up, GWL_USERDATA)); id = IDC_EDIT_DOWN; ! assignKey(id, GetWindowLongPtr(down, GWL_USERDATA)); id = IDC_EDIT_LEFT; ! assignKey(id, GetWindowLongPtr(left, GWL_USERDATA)); id = IDC_EDIT_RIGHT; ! assignKey(id, GetWindowLongPtr(right, GWL_USERDATA)); } --- 403,415 ---- id = IDC_EDIT_UP; ! assignKey(id, GetWindowLongPtr(up, GWLP_USERDATA)); id = IDC_EDIT_DOWN; ! assignKey(id, GetWindowLongPtr(down, GWLP_USERDATA)); id = IDC_EDIT_LEFT; ! assignKey(id, GetWindowLongPtr(left, GWLP_USERDATA)); id = IDC_EDIT_RIGHT; ! assignKey(id, GetWindowLongPtr(right, GWLP_USERDATA)); } Index: DirectInput.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/DirectInput.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** DirectInput.cpp 27 May 2006 14:47:33 -0000 1.6 --- DirectInput.cpp 6 Jun 2006 21:04:21 -0000 1.7 *************** *** 50,54 **** virtual bool readDevices(); virtual u32 readDevice(int which); ! virtual CString getKeyName(int key); virtual void checkKeys(); virtual void checkMotionKeys(); --- 50,54 ---- virtual bool readDevices(); virtual u32 readDevice(int which); ! virtual CString getKeyName(LONG_PTR key); virtual void checkKeys(); virtual void checkMotionKeys(); *************** *** 85,89 **** static int axisNumber = 0; ! USHORT joypad[4][13] = { { DIK_LEFT, DIK_RIGHT, --- 85,89 ---- static int axisNumber = 0; ! LONG_PTR joypad[4][13] = { { DIK_LEFT, DIK_RIGHT, *************** *** 100,104 **** }; ! USHORT motion[4] = { DIK_NUMPAD4, DIK_NUMPAD6, DIK_NUMPAD8, DIK_NUMPAD2 }; --- 100,104 ---- }; ! LONG_PTR motion[4] = { DIK_NUMPAD4, DIK_NUMPAD6, DIK_NUMPAD8, DIK_NUMPAD2 }; *************** *** 172,176 **** } ! static void winSaveKey(char *name, int num, USHORT value) { char buffer[80]; --- 172,176 ---- } ! static void winSaveKey(char *name, int num, LONG_PTR value) { char buffer[80]; *************** *** 178,182 **** sprintf(buffer, "Joy%d_%s", num, name); ! regSetDwordValue(buffer, value); } --- 178,182 ---- sprintf(buffer, "Joy%d_%s", num, name); ! regSetDwordValue(buffer, (DWORD)value); } *************** *** 200,211 **** regSetDwordValue("joyVersion", 1); ! regSetDwordValue("Motion_Left", ! motion[KEY_LEFT]); ! regSetDwordValue("Motion_Right", ! motion[KEY_RIGHT]); ! regSetDwordValue("Motion_Up", ! motion[KEY_UP]); ! regSetDwordValue("Motion_Down", ! motion[KEY_DOWN]); } --- 200,207 ---- regSetDwordValue("joyVersion", 1); ! regSetDwordValue("Motion_Left", (DWORD)motion[KEY_LEFT]); ! regSetDwordValue("Motion_Right", (DWORD)motion[KEY_RIGHT]); ! regSetDwordValue("Motion_Up", (DWORD)motion[KEY_UP]); ! regSetDwordValue("Motion_Down", (DWORD)motion[KEY_DOWN]); } *************** *** 333,337 **** static void checkKeys() { ! int dev = 0; int i; --- 329,333 ---- static void checkKeys() { ! LONG_PTR dev = 0; int i; *************** *** 628,636 **** } ! BOOL checkKey(int key) { ! int dev = (key >> 8); ! int k = (key & 255); if(dev == 0) { --- 624,632 ---- } ! BOOL checkKey(LONG_PTR key) { ! LONG_PTR dev = (key >> 8); ! LONG_PTR k = (key & 255); if(dev == 0) { *************** *** 638,642 **** } else { if(k < 16) { ! int axis = k >> 1; LONG value = pDevices[dev].axis[axis].center; switch(pDevices[dev].axis[axis].offset) { --- 634,638 ---- } else { if(k < 16) { ! LONG_PTR axis = k >> 1; LONG value = pDevices[dev].axis[axis].center; switch(pDevices[dev].axis[axis].offset) { *************** *** 671,675 **** return value < pDevices[dev].axis[axis].negative; } else if(k < 48) { ! int hat = (k >> 2) & 3; int state = getPovState(pDevices[dev].state.rgdwPOV[hat]); BOOL res = FALSE; --- 667,671 ---- return value < pDevices[dev].axis[axis].negative; } else if(k < 48) { ! LONG_PTR hat = (k >> 2) & 3; int state = getPovState(pDevices[dev].state.rgdwPOV[hat]); BOOL res = FALSE; *************** *** 923,930 **** } ! CString DirectInput::getKeyName(int key) { ! int d = (key >> 8); ! int k = key & 255; DIDEVICEOBJECTINSTANCE di; --- 919,926 ---- } ! CString DirectInput::getKeyName(LONG_PTR key) { ! LONG_PTR d = (key >> 8); ! LONG_PTR k = key & 255; DIDEVICEOBJECTINSTANCE di; *************** *** 937,941 **** if(d == 0) { ! pDevices[0].device->GetObjectInfo(&di,key,DIPH_BYOFFSET); winBuffer = di.tszName; } else { --- 933,937 ---- if(d == 0) { ! pDevices[0].device->GetObjectInfo( &di, (DWORD)key, DIPH_BYOFFSET ); winBuffer = di.tszName; } else { *************** *** 966,975 **** } } else if(k < 48) { ! int hat = (k >> 2) & 3; pDevices[d].device->GetObjectInfo(&di, ! DIJOFS_POV(hat), DIPH_BYOFFSET); char *dir = "up"; ! int dd = k & 3; if(dd == 1) dir = "down"; --- 962,971 ---- } } else if(k < 48) { ! LONG_PTR hat = (k >> 2) & 3; pDevices[d].device->GetObjectInfo(&di, ! (DWORD)DIJOFS_POV(hat), DIPH_BYOFFSET); char *dir = "up"; ! LONG_PTR dd = k & 3; if(dd == 1) dir = "down"; *************** *** 981,985 **** } else { pDevices[d].device->GetObjectInfo(&di, ! DIJOFS_BUTTON(k-128), DIPH_BYOFFSET); winBuffer.Format(winResLoadString(IDS_JOY_BUTTON),d,di.tszName); --- 977,981 ---- } else { pDevices[d].device->GetObjectInfo(&di, ! (DWORD)DIJOFS_BUTTON(k-128), DIPH_BYOFFSET); winBuffer.Format(winResLoadString(IDS_JOY_BUTTON),d,di.tszName); Index: MainWndOptions.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/MainWndOptions.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** MainWndOptions.cpp 27 May 2006 14:47:33 -0000 1.8 --- MainWndOptions.cpp 6 Jun 2006 21:04:21 -0000 1.9 *************** *** 1534,1537 **** --- 1534,1538 ---- void MainWnd::OnOptionsFilterDisablemmx() { + #ifdef MMX theApp.disableMMX = !theApp.disableMMX; if(!theApp.disableMMX) *************** *** 1539,1542 **** --- 1540,1544 ---- else cpu_mmx = 0; + #endif } Index: VBA.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/VBA.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** VBA.h 27 May 2006 14:47:33 -0000 1.8 --- VBA.h 6 Jun 2006 21:04:21 -0000 1.9 *************** *** 232,237 **** HMODULE winLoadLanguage(const char *name); void winSetLanguageOption(int option, bool force); - bool detectMMX(); #ifdef MMX #endif void updatePriority(); --- 232,237 ---- HMODULE winLoadLanguage(const char *name); void winSetLanguageOption(int option, bool force); #ifdef MMX + bool detectMMX(); #endif void updatePriority(); Index: skin.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/skin.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** skin.cpp 6 Jun 2006 14:33:43 -0000 1.8 --- skin.cpp 6 Jun 2006 21:04:21 -0000 1.9 *************** *** 151,159 **** m_dOldStyle = dwStyle; dwStyle &= ~(WS_CAPTION|WS_SIZEBOX); - #ifdef _WIN64 SetWindowLongPtr(m_hWnd, GWL_STYLE, dwStyle); - #else - SetWindowLongPtr(m_hWnd, GWL_STYLE, (LONG)dwStyle); - #endif RECT r; --- 151,155 ---- *************** *** 173,181 **** // subclass the window procedure ! #ifdef _WIN64 ! m_OldWndProc = (WNDPROC)SetWindowLongPtr(m_hWnd, GWL_WNDPROC, (LONG_PTR)SkinWndProc); ! #else ! m_OldWndProc = (WNDPROC)LongToPtr(SetWindowLongPtr(m_hWnd, GWL_WNDPROC, PtrToLong(SkinWndProc))); ! #endif // store a pointer to our class instance inside the window procedure. --- 169,173 ---- // subclass the window procedure ! m_OldWndProc = (WNDPROC)SetWindowLongPtr( m_hWnd, GWLP_WNDPROC, (LONG_PTR)SkinWndProc ); // store a pointer to our class instance inside the window procedure. *************** *** 223,231 **** // unsubclass the window procedure ! #ifdef _WIN64 ! OurWnd = (WNDPROC)SetWindowLongPtr(m_hWnd, GWL_WNDPROC, (LONG_PTR)m_OldWndProc); ! #else ! OurWnd = (WNDPROC)LongToPtr(SetWindowLongPtr(m_hWnd, GWL_WNDPROC, PtrToLong(m_OldWndProc))); ! #endif // remove the pointer to our class instance, but if we fail we don't care. --- 215,219 ---- // unsubclass the window procedure ! OurWnd = (WNDPROC)SetWindowLongPtr( m_hWnd, GWLP_WNDPROC, (LONG_PTR)m_OldWndProc ); // remove the pointer to our class instance, but if we fail we don't care. *************** *** 236,244 **** m_bHooked = ( OurWnd ? false : true ); - #ifdef _WIN64 SetWindowLongPtr(m_hWnd, GWL_STYLE, m_dOldStyle); - #else - SetWindowLongPtr(m_hWnd, GWL_STYLE, (LONG)m_dOldStyle); - #endif RECT r; --- 224,228 ---- *************** *** 550,554 **** // we will need a pointer to the associated class instance // (it was stored in the window before, remember?) ! CSkin *pSkin = (CSkin*)GetProp(hWnd, "skin"); // to handle WM_PAINT --- 534,538 ---- // we will need a pointer to the associated class instance // (it was stored in the window before, remember?) ! CSkin *pSkin = (CSkin*)GetProp(hWnd, _T("skin")); // to handle WM_PAINT |
From: Spacy <sp...@us...> - 2006-06-06 21:04:32
|
Update of /cvsroot/vba/VisualBoyAdvance/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv29806/src Modified Files: EEprom.h Flash.h GBA.cpp Sound.cpp Sound.h elf.cpp memgzio.c remote.cpp Log Message: make compilable for Windows x64 Index: Flash.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/Flash.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Flash.h 14 Nov 2004 18:54:14 -0000 1.4 --- Flash.h 6 Jun 2006 21:04:20 -0000 1.5 *************** *** 21,26 **** #define VBA_FLASH_H ! extern void flashSaveGame(gzFile gzFile); ! extern void flashReadGame(gzFile gzFile, int version); extern u8 flashRead(u32 address); extern void flashWrite(u32 address, u8 byte); --- 21,26 ---- #define VBA_FLASH_H ! extern void flashSaveGame(gzFile _gzFile); ! extern void flashReadGame(gzFile _gzFile, int version); extern u8 flashRead(u32 address); extern void flashWrite(u32 address, u8 byte); Index: memgzio.c =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/memgzio.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** memgzio.c 27 May 2006 14:47:32 -0000 1.4 --- memgzio.c 6 Jun 2006 21:04:20 -0000 1.5 *************** *** 332,336 **** if (s->stream.avail_in == 0) { errno = 0; ! s->stream.avail_in = memRead(s->inbuf, 1, Z_BUFSIZE, s->file); if (s->stream.avail_in == 0) { s->z_eof = 1; --- 332,336 ---- if (s->stream.avail_in == 0) { errno = 0; ! s->stream.avail_in = (uInt)memRead(s->inbuf, 1, Z_BUFSIZE, s->file); if (s->stream.avail_in == 0) { s->z_eof = 1; *************** *** 477,482 **** } if (s->stream.avail_out > 0) { ! s->stream.avail_out -= memRead(next_out, 1, s->stream.avail_out, ! s->file); } len -= s->stream.avail_out; --- 477,481 ---- } if (s->stream.avail_out > 0) { ! s->stream.avail_out -= (uInt)memRead(next_out, 1, s->stream.avail_out, s->file); } len -= s->stream.avail_out; *************** *** 489,493 **** errno = 0; ! s->stream.avail_in = memRead(s->inbuf, 1, Z_BUFSIZE, s->file); if (s->stream.avail_in == 0) { s->z_eof = 1; --- 488,492 ---- errno = 0; ! s->stream.avail_in = (uInt)memRead(s->inbuf, 1, Z_BUFSIZE, s->file); if (s->stream.avail_in == 0) { s->z_eof = 1; Index: Sound.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/Sound.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** Sound.cpp 25 Jun 2005 06:16:05 -0000 1.16 --- Sound.cpp 6 Jun 2006 21:04:20 -0000 1.17 *************** *** 1,5 **** // VisualBoyAdvance - Nintendo Gameboy/GameboyAdvance (TM) emulator. // Copyright (C) 1999-2003 Forgotten ! // Copyright (C) 2005 Forgotten and the VBA development team // This program is free software; you can redistribute it and/or modify --- 1,6 ---- // VisualBoyAdvance - Nintendo Gameboy/GameboyAdvance (TM) emulator. // Copyright (C) 1999-2003 Forgotten ! // Copyright (C) 2004 Forgotten and the VBA development team ! // Copyright (C) 2004-2006 VBA development team // This program is free software; you can redistribute it and/or modify *************** *** 19,25 **** #include <memory.h> #include "GBA.h" #include "Globals.h" - #include "Sound.h" #include "Util.h" --- 20,27 ---- #include <memory.h> + #include "Sound.h" + #include "GBA.h" #include "Globals.h" #include "Util.h" *************** *** 27,31 **** #define SOUND_MAGIC 0x60000000 #define SOUND_MAGIC_2 0x30000000 ! #define NOISE_MAGIC 5 extern bool stopState; --- 29,33 ---- #define SOUND_MAGIC 0x60000000 #define SOUND_MAGIC_2 0x30000000 ! #define NOISE_MAGIC 5 extern bool stopState; Index: GBA.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/GBA.cpp,v retrieving revision 1.66 retrieving revision 1.67 diff -C2 -d -r1.66 -r1.67 *** GBA.cpp 13 May 2006 16:32:15 -0000 1.66 --- GBA.cpp 6 Jun 2006 21:04:20 -0000 1.67 *************** *** 1231,1241 **** utilPutDword(buffer, 0x000f0000); fwrite(buffer, 1, 4, file); // save type 0x000f0000 = GBA save ! utilPutDword(buffer, strlen(title)); fwrite(buffer, 1, 4, file); // title length fwrite(title, 1, strlen(title), file); ! utilPutDword(buffer, strlen(desc)); fwrite(buffer, 1, 4, file); // desc length fwrite(desc, 1, strlen(desc), file); ! utilPutDword(buffer, strlen(notes)); fwrite(buffer, 1, 4, file); // notes length fwrite(notes, 1, strlen(notes), file); --- 1231,1241 ---- utilPutDword(buffer, 0x000f0000); fwrite(buffer, 1, 4, file); // save type 0x000f0000 = GBA save ! utilPutDword(buffer, (u32)strlen(title)); fwrite(buffer, 1, 4, file); // title length fwrite(title, 1, strlen(title), file); ! utilPutDword(buffer, (u32)strlen(desc)); fwrite(buffer, 1, 4, file); // desc length fwrite(desc, 1, strlen(desc), file); ! utilPutDword(buffer, (u32)strlen(notes)); fwrite(buffer, 1, 4, file); // notes length fwrite(notes, 1, strlen(notes), file); Index: Sound.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/Sound.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Sound.h 13 May 2004 15:06:44 -0000 1.4 --- Sound.h 6 Jun 2006 21:04:20 -0000 1.5 *************** *** 3,6 **** --- 3,7 ---- // Copyright (C) 1999-2003 Forgotten // Copyright (C) 2004 Forgotten and the VBA development team + // Copyright (C) 2004-2006 VBA development team // This program is free software; you can redistribute it and/or modify *************** *** 21,24 **** --- 22,27 ---- #define VBA_SOUND_H + #include "System.h" + #define NR10 0x60 #define NR11 0x62 *************** *** 48,68 **** #define FIFOB_H 0xa6 ! extern void soundTick(); ! extern void soundShutdown(); ! extern bool soundInit(); ! extern void soundPause(); ! extern void soundResume(); ! extern void soundEnable(int); ! extern void soundDisable(int); ! extern int soundGetEnable(); ! extern void soundReset(); ! extern void soundSaveGame(gzFile); ! extern void soundReadGame(gzFile, int); ! extern void soundEvent(u32, u8); ! extern void soundEvent(u32, u16); ! extern void soundTimerOverflow(int); ! extern void soundSetQuality(int); - //extern int SOUND_TICKS; extern int SOUND_CLOCK_TICKS; extern int soundTicks; --- 51,70 ---- #define FIFOB_H 0xa6 ! void soundTick(); ! void soundShutdown(); ! bool soundInit(); ! void soundPause(); ! void soundResume(); ! void soundEnable(int); ! void soundDisable(int); ! int soundGetEnable(); ! void soundReset(); ! void soundSaveGame(gzFile); ! void soundReadGame(gzFile, int); ! void soundEvent(u32, u8); ! void soundEvent(u32, u16); ! void soundTimerOverflow(int); ! void soundSetQuality(int); extern int SOUND_CLOCK_TICKS; extern int soundTicks; Index: EEprom.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/EEprom.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** EEprom.h 25 Jun 2005 06:15:34 -0000 1.3 --- EEprom.h 6 Jun 2006 21:04:20 -0000 1.4 *************** *** 21,26 **** #define VBA_EEPROM_H ! extern void eepromSaveGame(gzFile gzFile); ! extern void eepromReadGame(gzFile gzFile, int version); extern int eepromRead(u32 address); extern void eepromWrite(u32 address, u8 value); --- 21,26 ---- #define VBA_EEPROM_H ! extern void eepromSaveGame(gzFile _gzFile); ! extern void eepromReadGame(gzFile _gzFile, int version); extern int eepromRead(u32 address); extern void eepromWrite(u32 address, u8 value); Index: remote.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/remote.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** remote.cpp 20 May 2004 21:01:29 -0000 1.8 --- remote.cpp 6 Jun 2006 21:04:20 -0000 1.9 *************** *** 21,25 **** #include <string.h> ! #ifndef WIN32 # include <unistd.h> # include <sys/socket.h> --- 21,25 ---- #include <string.h> ! #ifndef _WIN32 # include <unistd.h> # include <sys/socket.h> *************** *** 33,37 **** # define socklen_t int # endif // ! HAVE_ARPA_INET_H ! #else // WIN32 # include <winsock.h> # include <io.h> --- 33,37 ---- # define socklen_t int # endif // ! HAVE_ARPA_INET_H ! #else // _WIN32 # include <winsock.h> # include <io.h> *************** *** 40,44 **** # define read _read # define write _write ! #endif // WIN32 #include "GBA.h" --- 40,44 ---- # define read _read # define write _write ! #endif // _WIN32 #include "GBA.h" *************** *** 55,60 **** int remotePort = 55555; int remoteSignal = 5; ! int remoteSocket = -1; ! int remoteListenSocket = -1; bool remoteConnected = false; bool remoteResumed = false; --- 55,60 ---- int remotePort = 55555; int remoteSignal = 5; ! SOCKET remoteSocket = -1; ! SOCKET remoteListenSocket = -1; bool remoteConnected = false; bool remoteResumed = false; *************** *** 86,94 **** { if(remoteSocket == -1) { ! #ifdef WIN32 WSADATA wsaData; int error = WSAStartup(MAKEWORD(1,1),&wsaData); ! #endif // WIN32 ! int s = socket(PF_INET, SOCK_STREAM, 0); remoteListenSocket = s; --- 86,94 ---- { if(remoteSocket == -1) { ! #ifdef _WIN32 WSADATA wsaData; int error = WSAStartup(MAKEWORD(1,1),&wsaData); ! #endif // _WIN32 ! SOCKET s = socket(PF_INET, SOCK_STREAM, 0); remoteListenSocket = s; *************** *** 132,140 **** socklen_t len = sizeof(addr); ! #ifdef WIN32 int flag = 0; ioctlsocket(s, FIONBIO, (unsigned long *)&flag); ! #endif // WIN32 ! int s2 = accept(s, (sockaddr *)&addr, &len); if(s2 > 0) { fprintf(stderr, "Got a connection from %s %d\n", --- 132,140 ---- socklen_t len = sizeof(addr); ! #ifdef _WIN32 int flag = 0; ioctlsocket(s, FIONBIO, (unsigned long *)&flag); ! #endif // _WIN32 ! SOCKET s2 = accept(s, (sockaddr *)&addr, &len); if(s2 > 0) { fprintf(stderr, "Got a connection from %s %d\n", *************** *** 142,148 **** ntohs(addr.sin_port)); } else { ! #ifdef WIN32 int error = WSAGetLastError(); ! #endif // WIN32 } char dummy; --- 142,148 ---- ntohs(addr.sin_port)); } else { ! #ifdef _WIN32 int error = WSAGetLastError(); ! #endif // _WIN32 } char dummy; *************** *** 231,235 **** char buffer[1024]; ! int count = strlen(packet); unsigned char csum = 0; --- 231,235 ---- char buffer[1024]; ! size_t count = strlen(packet); unsigned char csum = 0; *************** *** 247,251 **** *p++ = 0; // printf("Sending %s\n", buffer); ! remoteSendFnc(buffer, count + 4); char c = 0; --- 247,251 ---- *p++ = 0; // printf("Sending %s\n", buffer); ! remoteSendFnc(buffer, (int)count + 4); char c = 0; Index: elf.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/elf.cpp,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** elf.cpp 27 May 2006 14:47:32 -0000 1.20 --- elf.cpp 6 Jun 2006 21:04:20 -0000 1.21 *************** *** 962,967 **** break; case DW_FORM_ref_addr: ! attr->value = (elfDebugInfo->infodata + elfRead4Bytes(data)) - ! elfGetCompileUnitForData(data)->top; data += 4; break; --- 962,966 ---- break; case DW_FORM_ref_addr: ! attr->value = (elfDebugInfo->infodata + elfRead4Bytes(data)) - elfGetCompileUnitForData(data)->top; data += 4; break; *************** *** 971,979 **** break; case DW_FORM_ref_udata: ! attr->value = (elfDebugInfo->infodata + ! (elfGetCompileUnitForData(data)->top - ! elfDebugInfo->infodata) + ! elfReadLEB128(data, &bytes)) - ! elfCurrentUnit->top; data += bytes; break; --- 970,974 ---- break; case DW_FORM_ref_udata: ! attr->value = (elfDebugInfo->infodata + (elfGetCompileUnitForData(data)->top - elfDebugInfo->infodata) + elfReadLEB128(data, &bytes)) - elfCurrentUnit->top; data += bytes; break; |
From: Spacy <sp...@us...> - 2006-06-06 21:04:32
|
Update of /cvsroot/vba/VisualBoyAdvance/src/gb In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv29806/src/gb Modified Files: GB.cpp Log Message: make compilable for Windows x64 Index: GB.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/gb/GB.cpp,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** GB.cpp 6 Jun 2006 14:25:43 -0000 1.27 --- GB.cpp 6 Jun 2006 21:04:20 -0000 1.28 *************** *** 2912,2916 **** } ! int read = fread(&gbMemory[0xa000], 1, 256, --- 2912,2916 ---- } ! size_t read = fread(&gbMemory[0xa000], 1, 256, *************** *** 2933,2937 **** 1, file); ! if(read >0) { systemMessage(MSG_FAILED_TO_READ_SGM, N_("Battery file's size incompatible with the rom settings %s (%d).\nWarning : save of the battery file is now disabled !"), name, read); --- 2933,2937 ---- 1, file); ! if(read > 0) { systemMessage(MSG_FAILED_TO_READ_SGM, N_("Battery file's size incompatible with the rom settings %s (%d).\nWarning : save of the battery file is now disabled !"), name, read); *************** *** 3066,3070 **** } ! int read = fread(&gbMemory[0xa000], 1, 256, --- 3066,3070 ---- } ! size_t read = fread(&gbMemory[0xa000], 1, 256, *************** *** 3087,3091 **** 1, file); ! if(read >0) { systemMessage(MSG_FAILED_TO_READ_SGM, N_("Battery file's size incompatible with the rom settings %s (%d).\nWarning : save of the battery file is now disabled !"), name, read); --- 3087,3091 ---- 1, file); ! if(read > 0) { systemMessage(MSG_FAILED_TO_READ_SGM, N_("Battery file's size incompatible with the rom settings %s (%d).\nWarning : save of the battery file is now disabled !"), name, read); *************** *** 3386,3390 **** } fseek(file, 0x13, SEEK_SET); ! int read = 0; int toRead = 0; switch(gbRomType) { --- 3386,3390 ---- } fseek(file, 0x13, SEEK_SET); ! size_t read = 0; int toRead = 0; switch(gbRomType) { |
From: Spacy <sp...@us...> - 2006-06-06 21:04:32
|
Update of /cvsroot/vba/VisualBoyAdvance/src/sdl In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv29806/src/sdl Modified Files: SDL.cpp TestEmu.cpp Log Message: make compilable for Windows x64 Index: TestEmu.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/sdl/TestEmu.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** TestEmu.cpp 27 May 2006 14:47:33 -0000 1.6 --- TestEmu.cpp 6 Jun 2006 21:04:20 -0000 1.7 *************** *** 35,39 **** #include "../getopt.h" ! #ifndef WIN32 # include <unistd.h> # define GETCWD getcwd --- 35,39 ---- #include "../getopt.h" ! #ifndef _WIN32 # include <unistd.h> # define GETCWD getcwd Index: SDL.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/sdl/SDL.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** SDL.cpp 6 Jun 2006 14:25:17 -0000 1.13 --- SDL.cpp 6 Jun 2006 21:04:20 -0000 1.14 *************** *** 40,50 **** #include "../gb/gbGlobals.h" ! #ifndef WIN32 # include <unistd.h> # define GETCWD getcwd ! #else // WIN32 # include <direct.h> # define GETCWD _getcwd ! #endif // WIN32 #ifndef __GNUC__ --- 40,50 ---- #include "../gb/gbGlobals.h" ! #ifndef _WIN32 # include <unistd.h> # define GETCWD getcwd ! #else // _WIN32 # include <direct.h> # define GETCWD _getcwd ! #endif // _WIN32 #ifndef __GNUC__ *************** *** 867,879 **** char path[2048]; ! #ifdef WIN32 #define PATH_SEP ";" #define FILE_SEP '\\' #define EXE_NAME "VisualBoyAdvance-SDL.exe" ! #else // ! WIN32 #define PATH_SEP ":" #define FILE_SEP '/' #define EXE_NAME "VisualBoyAdvance" ! #endif // ! WIN32 fprintf(stderr, "Searching for file %s\n", name); --- 867,879 ---- char path[2048]; ! #ifdef _WIN32 #define PATH_SEP ";" #define FILE_SEP '\\' #define EXE_NAME "VisualBoyAdvance-SDL.exe" ! #else // ! _WIN32 #define PATH_SEP ":" #define FILE_SEP '/' #define EXE_NAME "VisualBoyAdvance" ! #endif // ! _WIN32 fprintf(stderr, "Searching for file %s\n", name); *************** *** 898,902 **** } ! #ifdef WIN32 home = getenv("USERPROFILE"); if(home != NULL) { --- 898,902 ---- } ! #ifdef _WIN32 home = getenv("USERPROFILE"); if(home != NULL) { *************** *** 907,911 **** return f; } ! #else // ! WIN32 fprintf(stderr, "Searching system config directory: %s\n", SYSCONFDIR); sprintf(path, "%s%c%s", SYSCONFDIR, FILE_SEP, name); --- 907,911 ---- return f; } ! #else // ! _WIN32 fprintf(stderr, "Searching system config directory: %s\n", SYSCONFDIR); sprintf(path, "%s%c%s", SYSCONFDIR, FILE_SEP, name); *************** *** 913,917 **** if(f != NULL) return f; ! #endif // ! WIN32 if(!strchr(arg0, '/') && --- 913,917 ---- if(f != NULL) return f; ! #endif // ! _WIN32 if(!strchr(arg0, '/') && |
From: Spacy <sp...@us...> - 2006-06-06 15:48:34
|
Update of /cvsroot/vba/VisualBoyAdvance/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv25618/src Modified Files: NLS.h Log Message: two IDs were missing Index: NLS.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/NLS.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** NLS.h 13 May 2004 15:06:44 -0000 1.4 --- NLS.h 6 Jun 2006 15:19:25 -0000 1.5 *************** *** 61,62 **** --- 61,64 ---- #define MSG_CBA_CODE_WARNING 40 #define MSG_OUT_OF_MEMORY 41 + #define MSG_WRONG_GAMESHARK_CODE 42 + #define MSG_UNSUPPORTED_GAMESHARK_CODE 43 |
From: Spacy <sp...@us...> - 2006-06-06 14:57:16
|
Update of /cvsroot/vba/VisualBoyAdvance/src/gb In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv1412/src/gb Modified Files: GB.cpp GB.h gbCheats.cpp gbCheats.h gbMemory.cpp gbMemory.h Log Message: Pokemonhacker: Improved/corrected the GG and GS cheats handling. Added support for the GS hardware rom bank switching. Corrected a crash in loading GB savestates while in GBC mode. Index: gbMemory.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/gb/gbMemory.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** gbMemory.cpp 13 May 2006 16:32:15 -0000 1.6 --- gbMemory.cpp 6 Jun 2006 14:25:43 -0000 1.7 *************** *** 1532,1536 **** } ! mapperMMM01 gbDataMMM01 ={ 0, // RAM enable --- 1532,1536 ---- } ! // MMM01 Used in Momotarou collection (however the rom is corrupted) mapperMMM01 gbDataMMM01 ={ 0, // RAM enable *************** *** 1543,1547 **** }; ! // MBC1 ROM write registers void mapperMMM01ROM(u16 address, u8 value) { --- 1543,1547 ---- }; ! // MMM01 ROM write registers void mapperMMM01ROM(u16 address, u8 value) { *************** *** 1614,1618 **** } ! // MBC1 RAM write void mapperMMM01RAM(u16 address, u8 value) { --- 1614,1618 ---- } ! // MMM01 RAM write void mapperMMM01RAM(u16 address, u8 value) { *************** *** 1653,1654 **** --- 1653,1717 ---- } } + + // GameGenie ROM write registers + void mapperGGROM(u16 address, u8 value) + { + int tmpAddress = 0; + + switch(address & 0x6000) { + case 0x0000: // RAM enable register + break; + case 0x2000: // GameGenie has only a half bank + break; + case 0x4000: // GameGenie has no RAM + if ((address >=0x4001) && (address <= 0x4020)) // GG Hardware Registers + gbMemoryMap[address >> 12][address & 0x0fff] = value; + break; + case 0x6000: // GameGenie has only a half bank + break; + } + } + + + // GS3 Used to emulate the GS V3.0 rom bank switching + mapperGS3 gbDataGS3 = { 1 }; // ROM bank + + void mapperGS3ROM(u16 address, u8 value) + { + int tmpAddress = 0; + + switch(address & 0x6000) { + case 0x0000: // GS has no ram + break; + case 0x2000: // GS has no 'classic' ROM bank select + break; + case 0x4000: // GS has no ram + break; + case 0x6000: // 0x6000 area is RW, and used for GS hardware registers + + if (address == 0x7FE1) // This is the (half) ROM bank select register + { + if(value == gbDataGS3.mapperROMBank) + break; + tmpAddress = value << 13; + + tmpAddress &= gbRomSizeMask; + gbDataGS3.mapperROMBank = value; + gbMemoryMap[0x04] = &gbRom[tmpAddress]; + gbMemoryMap[0x05] = &gbRom[tmpAddress + 0x1000]; + } + else + gbMemoryMap[address>>12][address & 0x0fff] = value; + break; + } + } + + void memoryUpdateMapGS3() + { + int tmpAddress = gbDataGS3.mapperROMBank << 13; + + tmpAddress &= gbRomSizeMask; + // GS can only change a half ROM bank + gbMemoryMap[0x04] = &gbRom[tmpAddress]; + gbMemoryMap[0x05] = &gbRom[tmpAddress + 0x1000]; + } \ No newline at end of file Index: gbCheats.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/gb/gbCheats.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** gbCheats.h 13 May 2004 15:06:46 -0000 1.3 --- gbCheats.h 6 Jun 2006 14:25:43 -0000 1.4 *************** *** 51,54 **** --- 51,55 ---- extern void gbCheatDisable(int); extern u8 gbCheatRead(u16); + extern void gbCheatWrite(bool); extern int gbCheatNumber; Index: GB.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/gb/GB.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** GB.h 27 May 2006 14:47:33 -0000 1.8 --- GB.h 6 Jun 2006 14:25:43 -0000 1.9 *************** *** 39,42 **** --- 39,43 ---- extern bool gbLoadRom(const char *); extern void gbEmulate(int); + extern void gbWriteMemory(register u16, register u8); extern void gbDrawLine(); extern bool gbIsGameboyRom(const char *); Index: gbMemory.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/gb/gbMemory.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** gbMemory.h 30 Apr 2006 14:44:16 -0000 1.3 --- gbMemory.h 6 Jun 2006 14:25:43 -0000 1.4 *************** *** 147,150 **** --- 147,154 ---- }; + struct mapperGS3 { + int mapperROMBank; + }; + extern mapperMBC1 gbDataMBC1; extern mapperMBC2 gbDataMBC2; *************** *** 155,158 **** --- 159,163 ---- extern mapperTAMA5 gbDataTAMA5; extern mapperMMM01 gbDataMMM01; + extern mapperGS3 gbDataGS3; void mapperMBC1ROM(u16,u8); *************** *** 180,183 **** --- 185,190 ---- void mapperMMM01ROM(u16,u8); void mapperMMM01RAM(u16,u8); + void mapperGGROM(u16,u8); + void mapperGS3ROM(u16,u8); //extern void (*mapper)(u16,u8); //extern void (*mapperRAM)(u16,u8); *************** *** 193,196 **** --- 200,204 ---- extern void memoryUpdateMapTAMA5(); extern void memoryUpdateMapMMM01(); + extern void memoryUpdateMapGS3(); Index: GB.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/gb/GB.cpp,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** GB.cpp 27 May 2006 14:47:33 -0000 1.26 --- GB.cpp 6 Jun 2006 14:25:43 -0000 1.27 *************** *** 134,137 **** --- 134,138 ---- int gbIntBreak = 0; int gbInterruptLaunched = 0; + u8 gbCheatingDevice = 0; // 1 = GS, 2 = GG // breakpoint bool breakpoint = false; *************** *** 726,733 **** #endif - if(mapper) (*mapper)(address, value); return; } --- 727,734 ---- #endif if(mapper) (*mapper)(address, value); return; + } *************** *** 738,744 **** // This part is used to emulate a small difference between hardwares // (check 8-in-1's arrow on GBA/GBC to verify it) ! ((register_LY == 0) && ((gbHardware & 0xa) && (gbScreenOn==false) && ! (register_LCDC & 0x80)) && ! (gbLcdLYIncrementTicksDelayed ==(GBLY_INCREMENT_CLOCK_TICKS-GBLCD_MODE_2_CLOCK_TICKS)))) gbMemoryMap[address>>12][address&0x0fff] = value; return; --- 739,745 ---- // This part is used to emulate a small difference between hardwares // (check 8-in-1's arrow on GBA/GBC to verify it) ! ((register_LY == 0) && ((gbHardware & 0xa) && (gbScreenOn==false) && ! (register_LCDC & 0x80)) && ! (gbLcdLYIncrementTicksDelayed ==(GBLY_INCREMENT_CLOCK_TICKS-GBLCD_MODE_2_CLOCK_TICKS)))) gbMemoryMap[address>>12][address&0x0fff] = value; return; *************** *** 772,785 **** // OAM not accessible during mode 2 & 3. ! if((address < 0xfea0) && ! (((gbHardware & 0xa) && ((gbLcdMode | gbLcdModeDelayed) &2)) || ! ((gbHardware & 5) && (((gbLcdModeDelayed == 2) && ! (gbLcdTicksDelayed<=GBLCD_MODE_2_CLOCK_TICKS)) || ! (gbLcdModeDelayed == 3))))) { ! return; } ! if(address < 0xff00){ gbMemory[address] = value; return; --- 773,793 ---- // OAM not accessible during mode 2 & 3. ! if(address < 0xfea0) ! { ! if (((gbHardware & 0xa) && ((gbLcdMode | gbLcdModeDelayed) &2)) || ! ((gbHardware & 5) && (((gbLcdModeDelayed == 2) && ! (gbLcdTicksDelayed<=GBLCD_MODE_2_CLOCK_TICKS)) || ! (gbLcdModeDelayed == 3)))) ! return; ! else ! { ! gbMemory[address] = value; ! return; ! } } ! ! if((address > 0xfea0) && (address < 0xff00)){ // GBC allows reading/writing to that area gbMemory[address] = value; return; *************** *** 1712,1715 **** --- 1720,1736 ---- break; } + + if ((address >= 0xfea0) && (address < 0xff00)) + { + if (gbHardware & 1) + return ((((address + ((address >> 4) - 0xfea)) >> 2) & 1) ? 0x00 : 0xff ); + else if (gbHardware & 2) + return gbMemoryMap[address>>12][address & 0x0fff]; + else if (gbHardware & 4) + return ((((address + ((address >> 4) - 0xfea)) >> 2) & 1) ? 0xff : 0x00 ); + else if (gbHardware & 8) + return ((address & 0xf0) |((address & 0xf0)>>4)); + } + return gbMemoryMap[address>>12][address & 0x0fff]; } *************** *** 1958,1961 **** --- 1979,1994 ---- return 0xff; + if ((address >= 0xfea0) && (address < 0xff00)) + { + if (gbHardware & 1) + return ((((address + ((address >> 4) - 0xfea)) >> 2) & 1) ? 0x00 : 0xff ); + else if (gbHardware & 2) + return gbMemoryMap[address>>12][address & 0x0fff]; + else if (gbHardware & 4) + return ((((address + ((address >> 4) - 0xfea)) >> 2) & 1) ? 0xff : 0x00 ); + else if (gbHardware & 8) + return ((address & 0xf0) |((address & 0xf0)>>4)); + } + return gbMemoryMap[address>>12][address & 0x0fff]; } *************** *** 1963,1966 **** --- 1996,2000 ---- void gbVblank_interrupt() { + gbCheatWrite(false); // Emulates GS codes. gbMemory[0xff0f] = register_IF &= 0xfe; gbWriteMemory(--SP.W, PC.B.B1); *************** *** 2172,2176 **** if (gbMemory != NULL) { ! memset(gbMemory,0, 65536); for (int temp = 0xC000; temp < 0xE000; temp++) if ((temp & 0x8) ^((temp & 0x800)>>8)) --- 2206,2210 ---- if (gbMemory != NULL) { ! memset(gbMemory,0xff, 65536); for (int temp = 0xC000; temp < 0xE000; temp++) if ((temp & 0x8) ^((temp & 0x800)>>8)) *************** *** 2618,2621 **** --- 2652,2656 ---- inBios = false; } + gbMemoryMap[0x01] = &gbRom[0x1000]; gbMemoryMap[0x02] = &gbRom[0x2000]; *************** *** 2642,2646 **** gbMemoryMap[0x0d] = &gbMemory[0xd000]; gbMemoryMap[0x0e] = &gbMemory[0xe000]; ! gbMemoryMap[0x0f] = &gbMemory[0xf000]; } --- 2677,2681 ---- gbMemoryMap[0x0d] = &gbMemory[0xd000]; gbMemoryMap[0x0e] = &gbMemory[0xe000]; ! gbMemoryMap[0x0f] = &gbMemory[0xf000]; } *************** *** 2660,2663 **** --- 2695,2700 ---- gbSystemMessage = false; + gbCheatWrite(true); // Emulates GS codes. + } *************** *** 3597,3603 **** } - int oldgbCgbMode = gbCgbMode; - int oldgbSgbMode = gbSgbMode; - gbReset(); --- 3634,3637 ---- *************** *** 3608,3634 **** // Correct crash when loading color gameboy save in regular gameboy type. ! if (oldgbCgbMode != gbCgbMode) { ! if (!gbCgbMode) ! { ! if(gbVram != NULL) { ! free(gbVram); ! gbVram = NULL; ! } ! if(gbWram != NULL) { ! free(gbWram); ! gbWram = NULL; ! } } ! else ! { ! if(gbVram == NULL) ! gbVram = (u8 *)malloc(0x4000); ! if(gbWram == NULL) ! gbWram = (u8 *)malloc(0x8000); ! memset(gbVram,0,0x4000); ! memset(gbPalette,0, 2*128); } } if(version >= GBSAVE_GAME_VERSION_7) { --- 3642,3667 ---- // Correct crash when loading color gameboy save in regular gameboy type. ! if (!gbCgbMode) { ! if(gbVram != NULL) { ! free(gbVram); ! gbVram = NULL; } ! if(gbWram != NULL) { ! free(gbWram); ! gbWram = NULL; } } + else + { + if(gbVram == NULL) + gbVram = (u8 *)malloc(0x4000); + if(gbWram == NULL) + gbWram = (u8 *)malloc(0x8000); + memset(gbVram,0,0x4000); + memset(gbPalette,0, 2*128); + } + + if(version >= GBSAVE_GAME_VERSION_7) { *************** *** 3775,3778 **** --- 3808,3815 ---- memoryUpdateMapMBC7(); break; + case 0x56: + // GS3 + memoryUpdateMapGS3(); + break; case 0xfd: // TAMA5 *************** *** 4028,4031 **** --- 4065,4070 ---- if(gbRomSize < gbRomSizes[gbRom[0x148]]) { gbRom = (u8 *)realloc(gbRom, gbRomSizes[gbRom[0x148]]); + for (int i = gbRomSize; i<gbRomSizes[gbRom[0x148]]; i++) + gbRom[i] = 0x00; // Not sure if it's 0x00, 0xff or random data... } // (it's in the case a cart is 'lying' on its size. *************** *** 4060,4063 **** --- 4099,4115 ---- gbRom[0x149] = ramsize; + if ((gbRom[2] == 0x6D) && (gbRom[5] == 0x47) && (gbRom[6] == 0x65) && (gbRom[7] == 0x6E) && + (gbRom[8] == 0x69) && (gbRom[9] == 0x65) && (gbRom[0xA] == 0x28) && (gbRom[0xB] == 0x54)) + { + gbCheatingDevice = 1; // GameGenie + for (int i = 0; i < 0x20; i++) // Cleans GG hardware registers + gbRom[0x4000+i] = 0; + } + else if (((gbRom[0x104] == 0x44) && (gbRom[0x156] == 0xEA) && (gbRom[0x158] == 0x7F) && + (gbRom[0x159] == 0xEA) && (gbRom[0x15B] == 0x7F)) || ((gbRom[0x165] == 0x3E) && + (gbRom[0x166] == 0xD9) && (gbRom[0x16D] == 0xE1) && (gbRom[0x16E] == 0x7F))) + gbCheatingDevice = 2; // GameShark + else gbCheatingDevice = 0; + if(ramsize > 5) { systemMessage(MSG_UNSUPPORTED_RAM_SIZE, *************** *** 4090,4093 **** --- 4142,4149 ---- gbRomType = 0x1b; } + else if (gbCheatingDevice == 1) + gbRomType = 0x55; + else if (gbCheatingDevice == 2) + gbRomType = 0x56; gbRom[0x147] = gbRomType; *************** *** 4101,4105 **** case 0x03: case 0x08: ! case 0x09: // MBC 1 mapper = mapperMBC1ROM; --- 4157,4161 ---- case 0x03: case 0x08: ! case 0x09: // MBC 1 mapper = mapperMBC1ROM; *************** *** 4155,4158 **** --- 4211,4222 ---- mapperReadRAM = mapperMBC7ReadRAM; break; + // GG (GameGenie) + case 0x55: + mapper = mapperGGROM; + break; + case 0x56: + // GS (GameShark) + mapper = mapperGS3ROM; + break; case 0xfd: // TAMA5 Index: gbCheats.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/gb/gbCheats.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** gbCheats.cpp 27 May 2006 14:47:33 -0000 1.10 --- gbCheats.cpp 6 Jun 2006 14:25:43 -0000 1.11 *************** *** 28,34 **** --- 28,36 ---- #include "gbCheats.h" #include "gbGlobals.h" + #include "GB.h" gbCheat gbCheatList[100]; int gbCheatNumber = 0; + int gbNextCheat = 0; bool gbCheatMap[0x10000]; *************** *** 181,188 **** GBCHEAT_HEX_VALUE(code[5]); - if(address < 0xa000 || - address > 0xdfff) - return false; - return true; } --- 183,186 ---- *************** *** 221,227 **** gbCheatList[i].enabled = true; ! ! gbCheatMap[gbCheatList[i].address] = true; ! gbCheatNumber++; } --- 219,233 ---- gbCheatList[i].enabled = true; ! ! int gsCode = gbCheatList[i].code; ! ! if ((gsCode !=1) && ((gsCode & 0xF0) !=0x80) && ((gsCode & 0xF0) !=0x90) && ! ((gsCode & 0xF0) !=0xA0) && ((gsCode) !=0xF0) && ((gsCode) !=0xF1)) ! systemMessage(MSG_WRONG_GAMESHARK_CODE, ! N_("Wrong GameShark code type : %s"), code); ! else if (((gsCode & 0xF0) ==0xA0) || ((gsCode) ==0xF0) || ((gsCode) ==0xF1)) ! systemMessage(MSG_UNSUPPORTED_GAMESHARK_CODE, ! N_("Unsupported GameShark code type : %s"), code); ! gbCheatNumber++; } *************** *** 319,323 **** strcpy(gbCheatList[i].cheatDesc, desc); ! gbCheatList[i].code = 1; gbCheatList[i].value = (GBCHEAT_HEX_VALUE(code[0]) << 4) + GBCHEAT_HEX_VALUE(code[1]); --- 325,329 ---- strcpy(gbCheatList[i].cheatDesc, desc); ! gbCheatList[i].code = 0x101; gbCheatList[i].value = (GBCHEAT_HEX_VALUE(code[0]) << 4) + GBCHEAT_HEX_VALUE(code[1]); *************** *** 344,347 **** --- 350,354 ---- } + gbCheatList[i].enabled = true; *************** *** 428,431 **** --- 435,439 ---- } + // Used to emulated GG codes u8 gbCheatRead(u16 address) { *************** *** 440,461 **** return gbCheatList[i].value; break; ! case 0x00: ! case 0x01: ! case 0x80: ! return gbCheatList[i].value; ! case 0x90: ! case 0x91: ! case 0x92: ! case 0x93: ! case 0x94: ! case 0x95: ! case 0x96: ! case 0x97: ! if(address >= 0xd000 && address < 0xe000) { ! if(((gbMemoryMap[0x0d] - gbWram)/0x1000) == ! (gbCheatList[i].code - 0x90)) ! return gbCheatList[i].value; ! } else return gbCheatList[i].value; } } --- 448,454 ---- return gbCheatList[i].value; break; ! case 0x101: // GameGenie 6 digits code support return gbCheatList[i].value; + break; } } *************** *** 463,464 **** --- 456,518 ---- return gbMemoryMap[address>>12][address&0xFFF]; } + + + // Used to emulate GS codes. + void gbCheatWrite(bool reboot) + { + if(cheatsEnabled) + { + u16 address = 0; + + if (gbNextCheat >= gbCheatNumber) + gbNextCheat = 0; + + for(int i = gbNextCheat; i < gbCheatNumber; i++) { + if(gbCheatList[i].enabled) { + address = gbCheatList[i].address; + if ((!reboot) && (address >= 0x8000) && !((address>=0xA000) && (address<0xC000))) + { // These codes are executed one per one, at each Vblank + switch(gbCheatList[i].code) { + case 0x01: + gbWriteMemory(address, gbCheatList[i].value); + gbNextCheat = i+1; + return; + case 0x90: + case 0x91: + case 0x92: + case 0x93: + case 0x94: + case 0x95: + case 0x96: + case 0x97: + case 0x98: + case 0x99: + case 0x9A: + case 0x9B: + case 0x9C: + case 0x9D: + case 0x9E: + case 0x9F: + int oldbank = gbMemory[0xff70]; + gbWriteMemory(0xff70, gbCheatList[i].code & 0xf); + gbWriteMemory(address, gbCheatList[i].value); + gbWriteMemory(0xff70, oldbank); + gbNextCheat = i+1; + return; + } + } + else // These codes are only executed when the game is booted + { + switch(gbCheatList[i].code & 0xF0) { + case 0x80: + gbWriteMemory(0x0000, 0x0A); + gbWriteMemory(0x4000, gbCheatList[i].value & 0xF); + gbWriteMemory(address, gbCheatList[i].value); + gbNextCheat = i+1; + return; + } + } + } + } + } + } \ No newline at end of file |
Update of /cvsroot/vba/VisualBoyAdvance/src/win32 In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv4915/src/win32 Modified Files: AboutDialog.cpp Joypad.cpp MainWndFile.cpp RomInfo.cpp VBA.cpp resource.h skin.cpp Log Message: Pokemonhacker: Improved/corrected the GG and GS cheats handling. Added support for the GS hardware rom bank switching. Corrected a crash in loading GB savestates while in GBC mode. Spacy: minor Index: VBA.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/VBA.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** VBA.cpp 27 May 2006 14:47:33 -0000 1.15 --- VBA.cpp 6 Jun 2006 14:33:43 -0000 1.16 *************** *** 1338,1344 **** ifbType = 0; ! flashSize = winFlashSize = regQueryDwordValue("flashSize", 0x10000); if(winFlashSize != 0x10000 && winFlashSize != 0x20000) winFlashSize = 0x10000; agbPrintEnable(regQueryDwordValue("agbPrint", 0) ? true : false); --- 1338,1345 ---- ifbType = 0; ! winFlashSize = regQueryDwordValue("flashSize", 0x10000); if(winFlashSize != 0x10000 && winFlashSize != 0x20000) winFlashSize = 0x10000; + flashSize = winFlashSize; agbPrintEnable(regQueryDwordValue("agbPrint", 0) ? true : false); Index: MainWndFile.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/MainWndFile.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** MainWndFile.cpp 27 May 2006 14:47:33 -0000 1.14 --- MainWndFile.cpp 6 Jun 2006 14:33:43 -0000 1.15 *************** *** 738,742 **** CFileStatus status; CString str; ! __time64_t time = (__time64_t)-1; int found = 0; --- 738,742 ---- CFileStatus status; CString str; ! time_t time = (time_t)-1; int found = 0; *************** *** 824,828 **** CFileStatus status; CString str; ! __time64_t time = 0; int found = -1; --- 824,828 ---- CFileStatus status; CString str; ! time_t time = 0; int found = -1; *************** *** 831,835 **** if(emulating && CFile::GetStatus(name, status)) { ! if((unsigned long)status.m_mtime.GetTime() > time) { time = status.m_mtime.GetTime(); found = i; --- 831,835 ---- if(emulating && CFile::GetStatus(name, status)) { ! if(status.m_mtime.GetTime() < time) { time = status.m_mtime.GetTime(); found = i; Index: resource.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/resource.h,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** resource.h 27 May 2006 14:47:33 -0000 1.43 --- resource.h 6 Jun 2006 14:33:43 -0000 1.44 *************** *** 45,48 **** --- 45,50 ---- #define IDS_CBA_CODE_WARNING 40 #define IDS_OUT_OF_MEMORY 41 + #define IDS_WRONG_GAMESHARK_CODE 42 + #define IDS_UNSUPPORTED_GAMESHARK_CODE 43 #define IDI_ICON 101 #define IDD_REGISTERS 102 Index: Joypad.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/Joypad.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Joypad.cpp 27 May 2006 14:47:33 -0000 1.6 --- Joypad.cpp 6 Jun 2006 14:33:43 -0000 1.7 *************** *** 57,61 **** #ifdef _WIN64 SetWindowLongPtr( GetSafeHwnd(), GWL_USERDATA, ((wParam<<8)|lParam) ); ! #elif defined _WIN32 SetWindowLongPtr( GetSafeHwnd(), GWL_USERDATA, PtrToLong((wParam<<8)|lParam) ); #endif --- 57,61 ---- #ifdef _WIN64 SetWindowLongPtr( GetSafeHwnd(), GWL_USERDATA, ((wParam<<8)|lParam) ); ! #else SetWindowLongPtr( GetSafeHwnd(), GWL_USERDATA, PtrToLong((wParam<<8)|lParam) ); #endif Index: AboutDialog.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/AboutDialog.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** AboutDialog.cpp 26 May 2006 14:37:41 -0000 1.4 --- AboutDialog.cpp 6 Jun 2006 14:33:43 -0000 1.5 *************** *** 20,26 **** // #include "AboutDialog.h" #include "../AutoBuild.h" - #include "resource.h" #ifdef _DEBUG --- 20,26 ---- // + #include "stdafx.h" #include "AboutDialog.h" #include "../AutoBuild.h" #ifdef _DEBUG Index: RomInfo.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/RomInfo.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** RomInfo.cpp 27 May 2006 14:47:33 -0000 1.6 --- RomInfo.cpp 6 Jun 2006 14:33:43 -0000 1.7 *************** *** 402,405 **** --- 402,411 ---- type = "ROM+MBC7+BATT"; break; + case 0x55: + type = "GameGenie"; + break; + case 0x56: + type = "GameShark V3.0"; + break; case 0xfc: type = "ROM+POCKET CAMERA"; Index: skin.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/skin.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** skin.cpp 27 May 2006 14:47:33 -0000 1.7 --- skin.cpp 6 Jun 2006 14:33:43 -0000 1.8 *************** *** 153,157 **** #ifdef _WIN64 SetWindowLongPtr(m_hWnd, GWL_STYLE, dwStyle); ! #elif defined _WIN32 SetWindowLongPtr(m_hWnd, GWL_STYLE, (LONG)dwStyle); #endif --- 153,157 ---- #ifdef _WIN64 SetWindowLongPtr(m_hWnd, GWL_STYLE, dwStyle); ! #else SetWindowLongPtr(m_hWnd, GWL_STYLE, (LONG)dwStyle); #endif *************** *** 175,179 **** #ifdef _WIN64 m_OldWndProc = (WNDPROC)SetWindowLongPtr(m_hWnd, GWL_WNDPROC, (LONG_PTR)SkinWndProc); ! #elif defined _WIN32 m_OldWndProc = (WNDPROC)LongToPtr(SetWindowLongPtr(m_hWnd, GWL_WNDPROC, PtrToLong(SkinWndProc))); #endif --- 175,179 ---- #ifdef _WIN64 m_OldWndProc = (WNDPROC)SetWindowLongPtr(m_hWnd, GWL_WNDPROC, (LONG_PTR)SkinWndProc); ! #else m_OldWndProc = (WNDPROC)LongToPtr(SetWindowLongPtr(m_hWnd, GWL_WNDPROC, PtrToLong(SkinWndProc))); #endif *************** *** 225,229 **** #ifdef _WIN64 OurWnd = (WNDPROC)SetWindowLongPtr(m_hWnd, GWL_WNDPROC, (LONG_PTR)m_OldWndProc); ! #elif defined _WIN32 OurWnd = (WNDPROC)LongToPtr(SetWindowLongPtr(m_hWnd, GWL_WNDPROC, PtrToLong(m_OldWndProc))); #endif --- 225,229 ---- #ifdef _WIN64 OurWnd = (WNDPROC)SetWindowLongPtr(m_hWnd, GWL_WNDPROC, (LONG_PTR)m_OldWndProc); ! #else OurWnd = (WNDPROC)LongToPtr(SetWindowLongPtr(m_hWnd, GWL_WNDPROC, PtrToLong(m_OldWndProc))); #endif *************** *** 238,242 **** #ifdef _WIN64 SetWindowLongPtr(m_hWnd, GWL_STYLE, m_dOldStyle); ! #elif defined _WIN32 SetWindowLongPtr(m_hWnd, GWL_STYLE, (LONG)m_dOldStyle); #endif --- 238,242 ---- #ifdef _WIN64 SetWindowLongPtr(m_hWnd, GWL_STYLE, m_dOldStyle); ! #else SetWindowLongPtr(m_hWnd, GWL_STYLE, (LONG)m_dOldStyle); #endif |
From: Spacy <sp...@us...> - 2006-06-06 14:25:43
|
Update of /cvsroot/vba/VisualBoyAdvance/src/sdl In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv1368/src/sdl Modified Files: SDL.cpp Log Message: Pokemonhacker: Improved/corrected the GG and GS cheats handling. Added support for the GS hardware rom bank switching. Corrected a crash in loading GB savestates while in GBC mode. Index: SDL.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/sdl/SDL.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** SDL.cpp 27 May 2006 14:47:33 -0000 1.12 --- SDL.cpp 6 Jun 2006 14:25:17 -0000 1.13 *************** *** 816,820 **** struct stat buf; ! size_t len = strlen(dir); char *p = dir + len - 1; --- 816,820 ---- struct stat buf; ! int len = strlen(dir); char *p = dir + len - 1; *************** *** 839,843 **** static char filebuffer[2048]; ! size_t len = strlen(name); char *p = name + len - 1; --- 839,843 ---- static char filebuffer[2048]; ! int len = strlen(name); char *p = name + len - 1; *************** *** 2219,2225 **** if(!failed) { gbGetHardwareType(); ! ! // used for the handling of the gb Boot Rom ! if (gbHardware & 5) { char tempName[0x800]; --- 2219,2225 ---- if(!failed) { gbGetHardwareType(); ! ! // used for the handling of the gb Boot Rom ! if (gbHardware & 5) { char tempName[0x800]; *************** *** 2284,2288 **** } } else { ! cartridgeType = IMAGE_GBA; strcpy(filename, "gnu_stub"); rom = (u8 *)malloc(0x2000000); --- 2284,2288 ---- } } else { ! cartridgeType = 0; strcpy(filename, "gnu_stub"); rom = (u8 *)malloc(0x2000000); |
From: Spacy <sp...@us...> - 2006-06-06 03:51:08
|
Update of /cvsroot/vba/VisualBoyAdvance/src/win32 In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv20004/src/win32 Modified Files: DirectSound.cpp Log Message: Fixed a bug. Reworked the whole file. Index: DirectSound.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/DirectSound.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** DirectSound.cpp 13 May 2004 15:06:49 -0000 1.3 --- DirectSound.cpp 4 Jun 2006 17:13:56 -0000 1.4 *************** *** 2,5 **** --- 2,6 ---- // Copyright (C) 1999-2003 Forgotten // Copyright (C) 2004 Forgotten and the VBA development team + // Copyright (C) 2004-2006 VBA development team // This program is free software; you can redistribute it and/or modify *************** *** 18,26 **** #include "stdafx.h" ! #include "VBA.h" #include "AVIWrite.h" - #include "Sound.h" #include "WavWriter.h" #include "../System.h" #include "../GBA.h" --- 19,28 ---- #include "stdafx.h" ! ! // Tools #include "AVIWrite.h" #include "WavWriter.h" + // Internals #include "../System.h" #include "../GBA.h" *************** *** 28,373 **** #include "../Sound.h" #include <mmreg.h> #include <dsound.h> class DirectSound : public ISound { private: ! HINSTANCE dsoundDLL; ! LPDIRECTSOUND pDirectSound; ! LPDIRECTSOUNDBUFFER dsbPrimary; ! LPDIRECTSOUNDBUFFER dsbSecondary; ! LPDIRECTSOUNDNOTIFY dsbNotify; ! HANDLE dsbEvent; ! WAVEFORMATEX wfx; public: ! DirectSound(); ! virtual ~DirectSound(); ! bool init(); ! void pause(); ! void reset(); ! void resume(); ! void write(); }; DirectSound::DirectSound() { ! dsoundDLL = NULL; ! pDirectSound = NULL; ! dsbPrimary = NULL; ! dsbSecondary = NULL; ! dsbNotify = NULL; ! dsbEvent = NULL; } DirectSound::~DirectSound() { ! if(theApp.aviRecorder != NULL) { ! delete theApp.aviRecorder; ! theApp.aviRecorder = NULL; ! theApp.aviFrameNumber = 0; ! } ! ! if(theApp.soundRecording) { ! if(theApp.soundRecorder != NULL) { ! delete theApp.soundRecorder; ! theApp.soundRecorder = NULL; ! } ! theApp.soundRecording = false; ! } ! ! if(dsbNotify != NULL) { ! dsbNotify->Release(); ! dsbNotify = NULL; ! } ! if(dsbEvent != NULL) { ! CloseHandle(dsbEvent); ! dsbEvent = NULL; ! } ! ! if(pDirectSound != NULL) { ! if(dsbPrimary != NULL) { ! dsbPrimary->Release(); ! dsbPrimary = NULL; ! } ! ! if(dsbSecondary != NULL) { ! dsbSecondary->Release(); ! dsbSecondary = NULL; ! } ! ! pDirectSound->Release(); ! pDirectSound = NULL; ! } ! ! if(dsoundDLL != NULL) { ! FreeLibrary(dsoundDLL); ! dsoundDLL = NULL; ! } } bool DirectSound::init() { ! HRESULT hr; - dsoundDLL = LoadLibrary("DSOUND.DLL"); - HRESULT (WINAPI *DSoundCreate)(LPCGUID,LPDIRECTSOUND *,IUnknown *); - if(dsoundDLL != NULL) { - DSoundCreate = (HRESULT (WINAPI *)(LPCGUID,LPDIRECTSOUND *,IUnknown *)) - GetProcAddress(dsoundDLL, "DirectSoundCreate"); - - if(DSoundCreate == NULL) { - theApp.directXMessage("DirectSoundCreate"); - return false; - } - } else { - theApp.directXMessage("DSOUND.DLL"); - return false; - } - - if((hr = DSoundCreate(NULL,&pDirectSound,NULL) != DS_OK)) { - // errorMessage(myLoadString(IDS_ERROR_SOUND_CREATE), hr); - systemMessage(IDS_CANNOT_CREATE_DIRECTSOUND, - "Cannot create DirectSound %08x", hr); - pDirectSound = NULL; - dsbSecondary = NULL; - return false; - } ! if((hr=pDirectSound->SetCooperativeLevel((HWND)*theApp.m_pMainWnd, ! DSSCL_EXCLUSIVE)) != DS_OK) { ! // errorMessage(myLoadString(IDS_ERROR_SOUND_LEVEL), hr); ! systemMessage(IDS_CANNOT_SETCOOPERATIVELEVEL, ! "Cannot SetCooperativeLevel %08x", hr); ! return false; ! } - DSBUFFERDESC dsbdesc; - ZeroMemory(&dsbdesc,sizeof(DSBUFFERDESC)); - dsbdesc.dwSize=sizeof(DSBUFFERDESC); - dsbdesc.dwFlags = DSBCAPS_PRIMARYBUFFER; - - if((hr=pDirectSound->CreateSoundBuffer(&dsbdesc, - &dsbPrimary, - NULL) != DS_OK)) { - // errorMessage(myLoadString(IDS_ERROR_SOUND_BUFFER),hr); - systemMessage(IDS_CANNOT_CREATESOUNDBUFFER, - "Cannot CreateSoundBuffer %08x", hr); - return false; - } - - // Set primary buffer format ! memset(&wfx, 0, sizeof(WAVEFORMATEX)); ! wfx.wFormatTag = WAVE_FORMAT_PCM; ! wfx.nChannels = 2; ! switch(soundQuality) { ! case 2: ! wfx.nSamplesPerSec = 22050; ! soundBufferLen = 736*2; ! soundBufferTotalLen = 7360*2; ! break; ! case 4: ! wfx.nSamplesPerSec = 11025; ! soundBufferLen = 368*2; ! soundBufferTotalLen = 3680*2; ! break; ! default: ! soundQuality = 1; ! wfx.nSamplesPerSec = 44100; ! soundBufferLen = 1470*2; ! soundBufferTotalLen = 14700*2; ! } ! wfx.wBitsPerSample = 16; ! wfx.nBlockAlign = (wfx.wBitsPerSample / 8) * wfx.nChannels; ! wfx.nAvgBytesPerSec = wfx.nSamplesPerSec * wfx.nBlockAlign; - if((hr = dsbPrimary->SetFormat(&wfx)) != DS_OK) { - // errorMessage(myLoadString(IDS_ERROR_SOUND_PRIMARY),hr); - systemMessage(IDS_CANNOT_SETFORMAT_PRIMARY, - "Cannot SetFormat for primary %08x", hr); - return false; - } - - ZeroMemory(&dsbdesc,sizeof(DSBUFFERDESC)); - dsbdesc.dwSize = sizeof(DSBUFFERDESC); - dsbdesc.dwFlags = DSBCAPS_GETCURRENTPOSITION2|DSBCAPS_CTRLPOSITIONNOTIFY; - dsbdesc.dwBufferBytes = soundBufferTotalLen; - dsbdesc.lpwfxFormat = &wfx; ! if((hr = pDirectSound->CreateSoundBuffer(&dsbdesc, &dsbSecondary, NULL)) ! != DS_OK) { ! dsbdesc.dwFlags = DSBCAPS_GETCURRENTPOSITION2; ! if((hr = pDirectSound->CreateSoundBuffer(&dsbdesc, &dsbSecondary, NULL)) ! != DS_OK) { ! systemMessage(IDS_CANNOT_CREATESOUNDBUFFER_SEC, ! "Cannot CreateSoundBuffer secondary %08x", hr); ! return false; ! } ! } ! dsbSecondary->SetCurrentPosition(0); ! if(!theApp.useOldSync) { ! hr = dsbSecondary->QueryInterface(IID_IDirectSoundNotify, ! (void **)&dsbNotify); ! if(!FAILED(hr)) { ! dsbEvent = CreateEvent(NULL, FALSE, FALSE, NULL); ! ! DSBPOSITIONNOTIFY notify[10]; ! ! for(int i = 0; i < 10; i++) { ! notify[i].dwOffset = i*soundBufferLen; ! notify[i].hEventNotify = dsbEvent; ! } ! if(FAILED(dsbNotify->SetNotificationPositions(10, notify))) { ! dsbNotify->Release(); ! dsbNotify = NULL; ! CloseHandle(dsbEvent); ! dsbEvent = NULL; ! } ! } ! } ! ! hr = dsbPrimary->Play(0,0,DSBPLAY_LOOPING); ! if(hr != DS_OK) { ! // errorMessage(myLoadString(IDS_ERROR_SOUND_PLAYPRIM), hr); ! systemMessage(IDS_CANNOT_PLAY_PRIMARY, "Cannot Play primary %08x", hr); ! return false; ! } ! systemSoundOn = true; ! ! return true; } void DirectSound::pause() { ! if(dsbSecondary != NULL) { ! DWORD status = 0; ! dsbSecondary->GetStatus(&status); ! ! if(status & DSBSTATUS_PLAYING) { ! dsbSecondary->Stop(); ! } ! } } void DirectSound::reset() { ! if(dsbSecondary) { ! dsbSecondary->Stop(); ! dsbSecondary->SetCurrentPosition(0); ! } } void DirectSound::resume() { ! if(dsbSecondary != NULL) { ! dsbSecondary->Play(0,0,DSBPLAY_LOOPING); ! } } void DirectSound::write() { ! int len = soundBufferLen; ! LPVOID lpvPtr1; ! DWORD dwBytes1; ! LPVOID lpvPtr2; ! DWORD dwBytes2; - if(!pDirectSound) - return; ! if(theApp.soundRecording) { ! if(dsbSecondary) { ! if(theApp.soundRecorder == NULL) { ! theApp.soundRecorder = new WavWriter; ! WAVEFORMATEX format; ! dsbSecondary->GetFormat(&format, sizeof(format), NULL); ! if(theApp.soundRecorder->Open(theApp.soundRecordName)) ! theApp.soundRecorder->SetFormat(&format); ! } ! } ! ! if(theApp.soundRecorder) { ! theApp.soundRecorder->AddSound((u8 *)soundFinalWave, len); ! } ! } - if(theApp.aviRecording) { - if(theApp.aviRecorder) { - if(dsbSecondary) { - if(!theApp.aviRecorder->IsSoundAdded()) { - WAVEFORMATEX format; - dsbSecondary->GetFormat(&format, sizeof(format), NULL); - theApp.aviRecorder->SetSoundFormat(&format); - } - } - - theApp.aviRecorder->AddSound((const char *)soundFinalWave, len); - } - } - - HRESULT hr; ! if(!speedup && synchronize && !theApp.throttle) { ! DWORD status=0; ! hr = dsbSecondary->GetStatus(&status); ! if(status && DSBSTATUS_PLAYING) { ! if(!soundPaused) { ! DWORD play; ! while(true) { ! dsbSecondary->GetCurrentPosition(&play, NULL); ! if(play < soundNextPosition || ! play > soundNextPosition+soundBufferLen) { ! break; ! } ! if(dsbEvent) { ! WaitForSingleObject(dsbEvent, 50); ! } ! } ! } ! } else { ! soundPaused = 1; ! } ! } ! // Obtain memory address of write block. This will be in two parts ! // if the block wraps around. ! hr = dsbSecondary->Lock(soundNextPosition, soundBufferLen, &lpvPtr1, ! &dwBytes1, &lpvPtr2, &dwBytes2, ! 0); ! ! // If DSERR_BUFFERLOST is returned, restore and retry lock. ! if (DSERR_BUFFERLOST == hr) { ! dsbSecondary->Restore(); ! hr = dsbSecondary->Lock(soundNextPosition, soundBufferLen,&lpvPtr1, ! &dwBytes1, &lpvPtr2, &dwBytes2, ! 0); ! } ! soundNextPosition += soundBufferLen; ! soundNextPosition = soundNextPosition % soundBufferTotalLen; ! ! if SUCCEEDED(hr) { ! // Write to pointers. ! CopyMemory(lpvPtr1, soundFinalWave, dwBytes1); ! if (NULL != lpvPtr2) { ! CopyMemory(lpvPtr2, soundFinalWave+dwBytes1, dwBytes2); ! } ! // Release the data back to DirectSound. ! hr = dsbSecondary->Unlock(lpvPtr1, dwBytes1, lpvPtr2, ! dwBytes2); ! } } ISound *newDirectSound() { ! return new DirectSound(); } --- 30,366 ---- #include "../Sound.h" + // DirectSound includes + #include <mmsystem.h> #include <mmreg.h> #include <dsound.h> + class DirectSound : public ISound { private: ! LPDIRECTSOUND8 pDirectSound; // DirectSound interface ! LPDIRECTSOUNDBUFFER dsbPrimary; // Primary DirectSound buffer ! LPDIRECTSOUNDBUFFER dsbSecondary; // Secondary DirectSound buffer ! LPDIRECTSOUNDNOTIFY8 dsbNotify; ! HANDLE dsbEvent; ! WAVEFORMATEX wfx; // Primary buffer wave format public: ! DirectSound(); ! virtual ~DirectSound(); ! bool init(); // initialize the primary and secondary sound buffer ! void pause(); // pause the secondary sound buffer ! void reset(); // stop and reset the secondary sound buffer ! void resume(); // resume the secondary sound buffer ! void write(); // write the emulated sound to the secondary sound buffer }; + DirectSound::DirectSound() { ! CoInitialize( NULL ); ! ! pDirectSound = NULL; ! dsbPrimary = NULL; ! dsbSecondary = NULL; ! dsbNotify = NULL; ! dsbEvent = NULL; } + DirectSound::~DirectSound() { ! if(theApp.aviRecorder) { ! delete theApp.aviRecorder; ! theApp.aviRecorder = NULL; ! theApp.aviFrameNumber = 0; ! } ! ! if(theApp.soundRecording) { ! if(theApp.soundRecorder) { ! delete theApp.soundRecorder; ! theApp.soundRecorder = NULL; ! } ! theApp.soundRecording = false; ! } ! ! if(dsbNotify) { ! dsbNotify->Release(); ! dsbNotify = NULL; ! } ! ! if(dsbEvent) { ! CloseHandle(dsbEvent); ! dsbEvent = NULL; ! } ! ! if(pDirectSound) { ! if(dsbPrimary) { ! dsbPrimary->Release(); ! dsbPrimary = NULL; ! } ! if(dsbSecondary) { ! dsbSecondary->Release(); ! dsbSecondary = NULL; ! } ! ! pDirectSound->Release(); ! pDirectSound = NULL; ! } ! ! CoUninitialize(); } + bool DirectSound::init() { ! HRESULT hr; ! DWORD freq; ! DSBUFFERDESC dsbdesc; ! int i; ! // Initialize DirectSound ! if( FAILED( hr = DirectSoundCreate8( &DSDEVID_DefaultPlayback, &pDirectSound, NULL ) ) ) { ! systemMessage( IDS_CANNOT_CREATE_DIRECTSOUND, _T("Cannot create DirectSound %08x"), hr ); ! pDirectSound = NULL; ! return false; ! } ! if( FAILED( hr = pDirectSound->SetCooperativeLevel( theApp.m_pMainWnd->GetSafeHwnd(), DSSCL_EXCLUSIVE ) ) ) { ! systemMessage( IDS_CANNOT_SETCOOPERATIVELEVEL, _T("Cannot SetCooperativeLevel %08x"), hr ); ! return false; ! } ! // Create primary sound buffer ! ZeroMemory( &dsbdesc, sizeof(DSBUFFERDESC) ); ! dsbdesc.dwSize = sizeof(DSBUFFERDESC); ! dsbdesc.dwFlags = DSBCAPS_PRIMARYBUFFER; ! if( FAILED( hr = pDirectSound->CreateSoundBuffer( &dsbdesc, &dsbPrimary, NULL ) ) ) { ! systemMessage(IDS_CANNOT_CREATESOUNDBUFFER, _T("Cannot CreateSoundBuffer %08x"), hr); ! return false; ! } ! switch(soundQuality) ! { ! case 4: ! freq = 11025; ! break; ! case 2: ! freq = 22050; ! break; ! default: ! soundQuality = 1; ! case 1: ! freq = 44100; ! break; ! } ! soundBufferLen = freq*2/30; ! soundBufferTotalLen = soundBufferLen * 10; ! ZeroMemory( &wfx, sizeof(WAVEFORMATEX) ); ! wfx.wFormatTag = WAVE_FORMAT_PCM; ! wfx.nChannels = 2; ! wfx.nSamplesPerSec = freq; ! wfx.wBitsPerSample = 16; ! wfx.nBlockAlign = wfx.nChannels * wfx.wBitsPerSample / 8; ! wfx.nAvgBytesPerSec = wfx.nSamplesPerSec * wfx.nBlockAlign; ! if( FAILED( hr = dsbPrimary->SetFormat( &wfx ) ) ) { ! systemMessage( IDS_CANNOT_SETFORMAT_PRIMARY, _T("CreateSoundBuffer(primary) failed %08x"), hr ); ! return false; ! } ! ! ! // Create secondary sound buffer ! ZeroMemory( &dsbdesc, sizeof(DSBUFFERDESC) ); ! dsbdesc.dwSize = sizeof(DSBUFFERDESC); ! dsbdesc.dwFlags = DSBCAPS_GETCURRENTPOSITION2 | DSBCAPS_CTRLPOSITIONNOTIFY; ! dsbdesc.dwBufferBytes = soundBufferTotalLen; ! dsbdesc.lpwfxFormat = &wfx; ! ! if( FAILED( hr = pDirectSound->CreateSoundBuffer( &dsbdesc, &dsbSecondary, NULL ) ) ) { ! systemMessage( IDS_CANNOT_CREATESOUNDBUFFER, _T("CreateSoundBuffer(secondary) failed %08x"), hr ); ! return false; ! } ! ! if( FAILED( hr = dsbSecondary->SetCurrentPosition( 0 ) ) ) { ! systemMessage( 0, _T("dsbSecondary->SetCurrentPosition failed %08x"), hr ); ! return false; ! } ! ! ! if( !theApp.useOldSync ) { ! if( FAILED( hr = dsbSecondary->QueryInterface( IID_IDirectSoundNotify8, (LPVOID*)&dsbNotify ) ) ) { ! dsbEvent = CreateEvent( NULL, FALSE, FALSE, NULL ); ! DSBPOSITIONNOTIFY notify[10]; ! for( i = 0; i < 10; i++ ) { ! notify[i].dwOffset = i * soundBufferLen; ! notify[i].hEventNotify = dsbEvent; ! } ! ! if( FAILED( dsbNotify->SetNotificationPositions( 10, notify ) ) ) { ! dsbNotify->Release(); ! dsbNotify = NULL; ! CloseHandle(dsbEvent); ! dsbEvent = NULL; ! } ! } ! } ! ! ! // Play primary buffer ! if( FAILED( hr = dsbPrimary->Play( 0, 0, DSBPLAY_LOOPING ) ) ) { ! systemMessage( IDS_CANNOT_PLAY_PRIMARY, _T("Cannot Play primary %08x"), hr ); ! return false; ! } ! ! systemSoundOn = true; ! ! return true; } + void DirectSound::pause() { ! if( dsbSecondary == NULL ) return; ! ! DWORD status; ! ! dsbSecondary->GetStatus( &status ); ! ! if( status & DSBSTATUS_PLAYING ) dsbSecondary->Stop(); } + void DirectSound::reset() { ! if( dsbSecondary == NULL ) return; ! ! dsbSecondary->Stop(); ! ! dsbSecondary->SetCurrentPosition( 0 ); } + void DirectSound::resume() { ! if( dsbSecondary == NULL ) return; ! ! dsbSecondary->Play( 0, 0, DSBPLAY_LOOPING ); } + void DirectSound::write() { ! if(!pDirectSound) return; ! HRESULT hr; ! DWORD status = 0; ! DWORD play = 0; ! WAVEFORMATEX format; ! LPVOID lpvPtr1; ! DWORD dwBytes1 = 0; ! LPVOID lpvPtr2; ! DWORD dwBytes2 = 0; ! if( theApp.soundRecording ) { ! if( dsbSecondary ) { ! if( theApp.soundRecorder ) { ! theApp.soundRecorder->AddSound( (u8 *)soundFinalWave, soundBufferLen ); ! } else { ! theApp.soundRecorder = new WavWriter; ! dsbSecondary->GetFormat( &format, sizeof(format), NULL ); ! if( theApp.soundRecorder->Open( theApp.soundRecordName ) ) { ! theApp.soundRecorder->SetFormat( &format ); ! } ! } ! } ! } ! ! if( theApp.aviRecording ) { ! if( theApp.aviRecorder ) { ! if( dsbSecondary ) { ! if( !theApp.aviRecorder->IsSoundAdded() ) { ! dsbSecondary->GetFormat( &format, sizeof(format), NULL ); ! theApp.aviRecorder->SetSoundFormat( &format ); ! } ! } ! theApp.aviRecorder->AddSound( (const char *)soundFinalWave, soundBufferLen ); ! } ! } ! ! ! if( !speedup && synchronize && !theApp.throttle ) { ! hr = dsbSecondary->GetStatus(&status); ! if( status & DSBSTATUS_PLAYING ) { ! if( !soundPaused ) { ! while( true ) { ! dsbSecondary->GetCurrentPosition(&play, NULL); ! if( ( play < soundNextPosition ) || ( play > (soundNextPosition + soundBufferLen) ) ) { ! break; ! } ! if( dsbEvent ) { ! WaitForSingleObject(dsbEvent, 50); ! } ! } ! } ! } else { ! soundPaused = 1; ! } ! } ! ! // Obtain memory address of write block. ! // This will be in two parts if the block wraps around. ! if( DSERR_BUFFERLOST == ( hr = dsbSecondary->Lock( ! soundNextPosition, ! soundBufferLen, ! &lpvPtr1, ! &dwBytes1, ! &lpvPtr2, ! &dwBytes2, ! 0 ) ) ) { ! // If DSERR_BUFFERLOST is returned, restore and retry lock. ! dsbSecondary->Restore(); ! hr = dsbSecondary->Lock( ! soundNextPosition, ! soundBufferLen, ! &lpvPtr1, ! &dwBytes1, ! &lpvPtr2, ! &dwBytes2, ! 0 ); ! } ! ! soundNextPosition += soundBufferLen; ! soundNextPosition = soundNextPosition % soundBufferTotalLen; ! if( SUCCEEDED( hr ) ) { ! // Write to pointers. ! CopyMemory( lpvPtr1, soundFinalWave, dwBytes1 ); ! if ( lpvPtr2 ) { ! CopyMemory( lpvPtr2, soundFinalWave + dwBytes1, dwBytes2 ); ! } ! ! // Release the data back to DirectSound. ! hr = dsbSecondary->Unlock( lpvPtr1, dwBytes1, lpvPtr2, dwBytes2 ); ! } else { ! systemMessage( 0, _T("dsbSecondary->Lock() failed: %08x"), hr ); ! return; ! } } + ISound *newDirectSound() { ! return new DirectSound(); } |
From: Spacy <sp...@us...> - 2006-05-27 15:01:02
|
Update of /cvsroot/vba/VisualBoyAdvance/win32 In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv11589/win32 Modified Files: vba_vs2005.suo Log Message: Index: vba_vs2005.suo =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/win32/vba_vs2005.suo,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 Binary files /tmp/cvsSfIBF3 and /tmp/cvswk8gWL differ |
From: Spacy <sp...@us...> - 2006-05-27 14:56:12
|
Update of /cvsroot/vba/VisualBoyAdvance/win32 In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv10206/win32 Modified Files: .cvsignore Log Message: Index: .cvsignore =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/win32/.cvsignore,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** .cvsignore 27 May 2006 14:10:22 -0000 1.3 --- .cvsignore 27 May 2006 14:56:06 -0000 1.4 *************** *** 7,9 **** MFC_Release MFC_Debug ! vba_vs2005.vcproj.A1.Spacy.user \ No newline at end of file --- 7,10 ---- MFC_Release MFC_Debug ! vba_vs2005.vcproj.A1.Spacy.user ! SDL_Release \ No newline at end of file |
Update of /cvsroot/vba/VisualBoyAdvance/src/win32 In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv6380/src/win32 Modified Files: AboutDialog.h AccelEditor.cpp BitmapControl.h ColorButton.h ColorControl.h DirectInput.cpp Directories.cpp FileDlg.cpp GBACheats.cpp GBACheats.h GBColorDlg.cpp GBColorDlg.h GBDisassemble.h GBMapView.cpp GBMapView.h GBTileView.cpp Joypad.cpp Joypad.h MainWnd.cpp MainWndFile.cpp MainWndOptions.cpp MapView.h MemoryViewer.cpp MemoryViewer.h MemoryViewerAddressSize.h ModeConfirm.h Reg.cpp RomInfo.cpp VBA.cpp VBA.h ZoomControl.h resource.h skin.cpp skin.h skinButton.cpp stdafx.cpp stdafx.h vba.rc Log Message: vs2005 compatibility, minor changes/fixes Index: GBACheats.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/GBACheats.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** GBACheats.h 13 May 2004 15:06:49 -0000 1.3 --- GBACheats.h 27 May 2006 14:47:33 -0000 1.4 *************** *** 21,25 **** #define AFX_GBACHEATS_H__FC31D47D_52C8_42B2_95C7_7C3FD09316A4__INCLUDED_ ! #include "..\System.h" // Added by ClassView #if _MSC_VER > 1000 #pragma once --- 21,25 ---- #define AFX_GBACHEATS_H__FC31D47D_52C8_42B2_95C7_7C3FD09316A4__INCLUDED_ ! #include "../System.h" // Added by ClassView #if _MSC_VER > 1000 #pragma once Index: ZoomControl.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/ZoomControl.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ZoomControl.h 13 May 2004 15:06:55 -0000 1.2 --- ZoomControl.h 27 May 2006 14:47:33 -0000 1.3 *************** *** 21,25 **** #define AFX_ZOOMCONTROL_H__BC193230_D2D6_4240_93AE_28C2EF2C641A__INCLUDED_ ! #include "..\System.h" // Added by ClassView #if _MSC_VER > 1000 #pragma once --- 21,25 ---- #define AFX_ZOOMCONTROL_H__BC193230_D2D6_4240_93AE_28C2EF2C641A__INCLUDED_ ! #include "../System.h" // Added by ClassView #if _MSC_VER > 1000 #pragma once Index: MapView.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/MapView.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MapView.h 13 May 2004 15:06:54 -0000 1.2 --- MapView.h 27 May 2006 14:47:33 -0000 1.3 *************** *** 32,36 **** #include "ResizeDlg.h" #include "IUpdate.h" ! #include "..\System.h" // Added by ClassView ///////////////////////////////////////////////////////////////////////////// --- 32,36 ---- #include "ResizeDlg.h" #include "IUpdate.h" ! #include "../System.h" // Added by ClassView ///////////////////////////////////////////////////////////////////////////// Index: MemoryViewer.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/MemoryViewer.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** MemoryViewer.h 13 May 2004 15:06:55 -0000 1.3 --- MemoryViewer.h 27 May 2006 14:47:33 -0000 1.4 *************** *** 21,25 **** #define AFX_MEMORYVIEWER_H__52C50474_5399_4D0B_A3E4_4C52C4E0EAA0__INCLUDED_ ! #include "..\System.h" // Added by ClassView #if _MSC_VER > 1000 #pragma once --- 21,25 ---- #define AFX_MEMORYVIEWER_H__52C50474_5399_4D0B_A3E4_4C52C4E0EAA0__INCLUDED_ ! #include "../System.h" // Added by ClassView #if _MSC_VER > 1000 #pragma once Index: Reg.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/Reg.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Reg.cpp 13 May 2004 15:06:55 -0000 1.7 --- Reg.cpp 27 May 2006 14:47:33 -0000 1.8 *************** *** 21,25 **** static char buffer[2048]; static HKEY vbKey = NULL; ! static CString regVbaPath; #define VBA_PREF "preferences" --- 21,25 ---- static char buffer[2048]; static HKEY vbKey = NULL; ! static CString *regVbaPath = NULL; #define VBA_PREF "preferences" *************** *** 39,43 **** &vbKey, &disp); ! regVbaPath.Format("%s\\vba.ini", path); } --- 39,48 ---- &vbKey, &disp); ! if( regVbaPath != NULL ) { ! delete regVbaPath; ! regVbaPath = NULL; ! } ! regVbaPath = new CString(); ! regVbaPath->Format("%s\\vba.ini", path); } *************** *** 49,53 **** const char *regGetINIPath() { ! return regVbaPath; } --- 54,58 ---- const char *regGetINIPath() { ! return *regVbaPath; } *************** *** 76,80 **** (LPTSTR)buffer, 2048, ! regVbaPath); if(res) --- 81,85 ---- (LPTSTR)buffer, 2048, ! *regVbaPath); if(res) *************** *** 107,111 **** key, def, ! regVbaPath); } --- 112,116 ---- key, def, ! *regVbaPath); } *************** *** 135,139 **** k, -1, ! regVbaPath); if(size >= 0 && size < count) count = size; --- 140,144 ---- k, -1, ! *regVbaPath); if(size >= 0 && size < count) count = size; *************** *** 142,146 **** value, count, ! regVbaPath); } --- 147,151 ---- value, count, ! *regVbaPath); } *************** *** 153,162 **** REG_SZ, (const UCHAR *)value, ! strlen(value)+1); } else { WritePrivateProfileString(VBA_PREF, key, value, ! regVbaPath); } } --- 158,167 ---- REG_SZ, (const UCHAR *)value, ! lstrlen(value)+1); } else { WritePrivateProfileString(VBA_PREF, key, value, ! *regVbaPath); } } *************** *** 176,180 **** key, buffer, ! regVbaPath); } } --- 181,185 ---- key, buffer, ! *regVbaPath); } } *************** *** 197,201 **** k, buffer, ! regVbaPath); WritePrivateProfileStruct(VBA_PREF, --- 202,206 ---- k, buffer, ! *regVbaPath); WritePrivateProfileStruct(VBA_PREF, *************** *** 203,207 **** value, count, ! regVbaPath); } } --- 208,212 ---- value, count, ! *regVbaPath); } } *************** *** 216,220 **** key, NULL, ! regVbaPath); } } --- 221,225 ---- key, NULL, ! *regVbaPath); } } *************** *** 239,243 **** REG_SZ, (const UCHAR *)type, ! strlen(type)+1); RegCloseKey(key); return true; --- 244,248 ---- REG_SZ, (const UCHAR *)type, ! lstrlen(type)+1); RegCloseKey(key); return true; *************** *** 265,269 **** REG_SZ, (const UCHAR *)desc, ! strlen(desc)+1); HKEY key2; res = RegCreateKeyEx(key, --- 270,274 ---- REG_SZ, (const UCHAR *)desc, ! lstrlen(desc)+1); HKEY key2; res = RegCreateKeyEx(key, *************** *** 282,286 **** REG_SZ, (const UCHAR *)application, ! strlen(application)+1); RegCloseKey(key2); RegCloseKey(key); --- 287,291 ---- REG_SZ, (const UCHAR *)application, ! lstrlen(application)+1); RegCloseKey(key2); RegCloseKey(key); *************** *** 319,323 **** valueName, temp, ! regVbaPath); } break; --- 324,328 ---- valueName, temp, ! *regVbaPath); } break; *************** *** 326,330 **** valueName, buffer, ! regVbaPath); break; case REG_BINARY: --- 331,335 ---- valueName, buffer, ! *regVbaPath); break; case REG_BINARY: *************** *** 338,347 **** k, temp, ! regVbaPath); WritePrivateProfileStruct(section, valueName, buffer, size, ! regVbaPath); } break; --- 343,352 ---- k, temp, ! *regVbaPath); WritePrivateProfileStruct(section, valueName, buffer, size, ! *regVbaPath); } break; Index: stdafx.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/stdafx.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** stdafx.h 13 May 2004 15:06:55 -0000 1.3 --- stdafx.h 27 May 2006 14:47:33 -0000 1.4 *************** *** 34,37 **** --- 34,44 ---- //#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers + // Target for Windows 2000 + #define WINVER 0x0500 + #define _WIN32_WINNT 0x0500 + + #define STRICT + + #include <afxwin.h> #include <afxcmn.h> Index: stdafx.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/stdafx.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** stdafx.cpp 13 May 2004 15:06:55 -0000 1.2 --- stdafx.cpp 27 May 2006 14:47:33 -0000 1.3 *************** *** 17,26 **** // Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ! // stdafx.cpp : source file that includes just the standard includes ! // DialogSizer.pch will be the pre-compiled header ! // stdafx.obj will contain the pre-compiled type information ! ! #include "stdafx.h" ! ! // TODO: reference any additional headers you need in STDAFX.H ! // and not in this file --- 17,19 ---- // Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ! #include "stdafx.h" \ No newline at end of file Index: RomInfo.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/RomInfo.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** RomInfo.cpp 30 Apr 2006 14:33:25 -0000 1.5 --- RomInfo.cpp 27 May 2006 14:47:33 -0000 1.6 *************** *** 549,553 **** { CDialog::OnInitDialog(); ! char buffer[13]; --- 549,553 ---- { CDialog::OnInitDialog(); ! char buffer[13]; *************** *** 570,573 **** --- 570,576 ---- sprintf(buffer, "%02x", rom[0xb4]); + if( rom[0xb4] & 0x80 ) { + strcat(buffer, " (DACS)"); + } GetDlgItem(IDC_ROM_DEVICE_TYPE)->SetWindowText(buffer); Index: GBACheats.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/GBACheats.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** GBACheats.cpp 18 Dec 2004 23:11:08 -0000 1.11 --- GBACheats.cpp 27 May 2006 14:47:33 -0000 1.12 *************** *** 766,770 **** LVITEM item; for(int i = 0; i < count; i++) { ! memset(&item,0, sizeof(item)); item.mask = LVIF_PARAM|LVIF_STATE; item.stateMask = LVIS_SELECTED; --- 766,770 ---- LVITEM item; for(int i = 0; i < count; i++) { ! memset(&item, 0, sizeof(item)); item.mask = LVIF_PARAM|LVIF_STATE; item.stateMask = LVIS_SELECTED; *************** *** 773,779 **** if(item.state & LVIS_SELECTED) { if(cheatsList[item.lParam].enabled) ! cheatsDisable(item.lParam); else ! cheatsEnable(item.lParam); } } --- 773,779 ---- if(item.state & LVIS_SELECTED) { if(cheatsList[item.lParam].enabled) ! cheatsDisable((int)(item.lParam & 0xFFFFFFFF)); else ! cheatsEnable((int)(item.lParam & 0xFFFFFFFF)); } } *************** *** 797,801 **** if(m_list.GetItem(&item)) { if(item.state & LVIS_SELECTED) { ! cheatsDelete(item.lParam, restoreValues); } } --- 797,801 ---- if(m_list.GetItem(&item)) { if(item.state & LVIS_SELECTED) { ! cheatsDelete((int)(item.lParam & 0xFFFFFFFF), restoreValues); } } *************** *** 839,845 **** (((l->uNewState & LVIS_STATEIMAGEMASK)>>12))) { if(m_list.GetCheck(l->iItem)) ! cheatsEnable(l->lParam); else ! cheatsDisable(l->lParam); refresh(); } --- 839,845 ---- (((l->uNewState & LVIS_STATEIMAGEMASK)>>12))) { if(m_list.GetCheck(l->iItem)) ! cheatsEnable((int)(l->lParam & 0xFFFFFFFF)); else ! cheatsDisable((int)(l->lParam & 0xFFFFFFFF)); refresh(); } Index: skin.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/skin.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** skin.h 29 Feb 2004 13:04:54 -0000 1.4 --- skin.h 27 May 2006 14:47:33 -0000 1.5 *************** *** 68,72 **** RECT m_rect; ! DWORD m_dOldStyle; RECT m_oldRect; int m_nButtons; --- 68,72 ---- RECT m_rect; ! LONG_PTR m_dOldStyle; RECT m_oldRect; int m_nButtons; Index: GBColorDlg.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/GBColorDlg.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** GBColorDlg.h 13 May 2004 15:06:49 -0000 1.2 --- GBColorDlg.h 27 May 2006 14:47:33 -0000 1.3 *************** *** 22,26 **** #include "ColorButton.h" // Added by ClassView ! #include "..\System.h" // Added by ClassView #if _MSC_VER > 1000 #pragma once --- 22,26 ---- #include "ColorButton.h" // Added by ClassView ! #include "../System.h" // Added by ClassView #if _MSC_VER > 1000 #pragma once Index: ModeConfirm.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/ModeConfirm.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ModeConfirm.h 13 May 2004 15:06:55 -0000 1.2 --- ModeConfirm.h 27 May 2006 14:47:33 -0000 1.3 *************** *** 35,39 **** public: int count; ! UINT timer; ModeConfirm(CWnd* pParent); // standard constructor --- 35,39 ---- public: int count; ! UINT_PTR timer; ModeConfirm(CWnd* pParent); // standard constructor Index: Directories.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/Directories.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Directories.cpp 26 May 2006 14:38:47 -0000 1.3 --- Directories.cpp 27 May 2006 14:47:33 -0000 1.4 *************** *** 248,250 **** } return res; ! } \ No newline at end of file --- 248,250 ---- } return res; ! } Index: MainWnd.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/MainWnd.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** MainWnd.cpp 30 Apr 2006 14:32:39 -0000 1.18 --- MainWnd.cpp 27 May 2006 14:47:33 -0000 1.19 *************** *** 484,487 **** --- 484,490 ---- if(!gbLoadRom(theApp.szFile)) return false; + + gbGetHardwareType(); + // used for the handling of the gb Boot Rom if (gbHardware & 5) *************** *** 496,506 **** strcat(tempName, "\\DMG_ROM.bin"); - skipBios = theApp.skipBiosFile ? true : false; gbCPUInit(tempName, theApp.useBiosFile ? true : false); } ! gbReset(); theApp.emulator = GBSystem; gbBorderOn = theApp.winGbBorderOn; --- 499,509 ---- strcat(tempName, "\\DMG_ROM.bin"); skipBios = theApp.skipBiosFile ? true : false; gbCPUInit(tempName, theApp.useBiosFile ? true : false); } ! + gbReset(); theApp.emulator = GBSystem; gbBorderOn = theApp.winGbBorderOn; *************** *** 953,957 **** if(!GetMenuItemInfo(theApp.menu, i, MF_BYPOSITION, &info)) { } ! if(!AppendMenu(theApp.popup, MF_POPUP|MF_STRING, (UINT)info.hSubMenu, buffer)) { } } --- 956,960 ---- if(!GetMenuItemInfo(theApp.menu, i, MF_BYPOSITION, &info)) { } ! if(!AppendMenu(theApp.popup, MF_POPUP|MF_STRING, (UINT_PTR)info.hSubMenu, buffer)) { } } *************** *** 967,971 **** if(!GetMenuItemInfoW(theApp.menu, i, MF_BYPOSITION, &info)) { } ! if(!AppendMenuW(theApp.popup, MF_POPUP|MF_STRING, (UINT)info.hSubMenu, buffer)) { } } --- 970,974 ---- if(!GetMenuItemInfoW(theApp.menu, i, MF_BYPOSITION, &info)) { } ! if(!AppendMenuW(theApp.popup, MF_POPUP|MF_STRING, (UINT_PTR)info.hSubMenu, buffer)) { } } Index: GBMapView.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/GBMapView.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** GBMapView.cpp 13 May 2004 15:06:49 -0000 1.6 --- GBMapView.cpp 27 May 2006 14:47:33 -0000 1.7 *************** *** 500,505 **** mapViewZoom.setColors(colors); ! int x = wParam & 0xffff; ! int y = (wParam >> 16); CString buffer; --- 500,505 ---- mapViewZoom.setColors(colors); ! int x = (int)(wParam & 0xffff); ! int y = wParam >> 16; CString buffer; Index: AccelEditor.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/AccelEditor.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** AccelEditor.cpp 13 May 2006 16:32:16 -0000 1.4 --- AccelEditor.cpp 27 May 2006 14:47:33 -0000 1.5 *************** *** 157,161 **** index = m_currents.AddString(szBuffer); // and a pointer to the accel object. ! m_currents.SetItemData(index, (DWORD)pAccel); } } --- 157,161 ---- index = m_currents.AddString(szBuffer); // and a pointer to the accel object. ! m_currents.SetItemData(index, (DWORD_PTR)pAccel); } } *************** *** 236,240 **** index = m_currents.AddString(szBuffer); ! m_currents.SetItemData(index, (DWORD)pAccel); // Reset the key editor. --- 236,240 ---- index = m_currents.AddString(szBuffer); ! m_currents.SetItemData(index, (DWORD_PTR)pAccel); // Reset the key editor. Index: Joypad.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/Joypad.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Joypad.h 13 May 2004 15:06:50 -0000 1.2 --- Joypad.h 27 May 2006 14:47:33 -0000 1.3 *************** *** 42,50 **** public: - // Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(JoypadEditControl) - //}}AFX_VIRTUAL - // Implementation public: --- 42,45 ---- *************** *** 53,62 **** virtual ~JoypadEditControl(); - // Generated message map functions - protected: - //{{AFX_MSG(JoypadEditControl) - afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags); - //}}AFX_MSG - DECLARE_MESSAGE_MAP() }; --- 48,51 ---- *************** *** 103,107 **** // Implementation protected: ! UINT timerId; int which; --- 92,96 ---- // Implementation protected: ! UINT_PTR timerId; int which; *************** *** 110,114 **** afx_msg void OnCancel(); afx_msg void OnOk(); - afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags); afx_msg void OnDestroy(); afx_msg void OnTimer(UINT nIDEvent); --- 99,102 ---- *************** *** 150,165 **** // Generated message map functions - //{{AFX_MSG(MotionConfig) afx_msg void OnCancel(); afx_msg void OnOk(); - afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags); afx_msg void OnDestroy(); virtual BOOL OnInitDialog(); afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags); afx_msg void OnTimer(UINT nIDEvent); - //}}AFX_MSG DECLARE_MESSAGE_MAP() private: ! UINT timerId; }; //{{AFX_INSERT_LOCATION}} --- 138,150 ---- // Generated message map functions afx_msg void OnCancel(); afx_msg void OnOk(); afx_msg void OnDestroy(); virtual BOOL OnInitDialog(); afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags); afx_msg void OnTimer(UINT nIDEvent); DECLARE_MESSAGE_MAP() private: ! UINT_PTR timerId; }; //{{AFX_INSERT_LOCATION}} Index: GBMapView.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/GBMapView.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** GBMapView.h 13 May 2004 15:06:49 -0000 1.2 --- GBMapView.h 27 May 2006 14:47:33 -0000 1.3 *************** *** 32,36 **** #include "ResizeDlg.h" #include "IUpdate.h" ! #include "..\System.h" // Added by ClassView ///////////////////////////////////////////////////////////////////////////// --- 32,36 ---- #include "ResizeDlg.h" #include "IUpdate.h" ! #include "../System.h" // Added by ClassView ///////////////////////////////////////////////////////////////////////////// Index: AboutDialog.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/AboutDialog.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** AboutDialog.h 26 May 2006 14:37:41 -0000 1.3 --- AboutDialog.h 27 May 2006 14:47:33 -0000 1.4 *************** *** 61,65 **** //{{AFX_MSG(AboutDialog) virtual BOOL OnInitDialog(); - // virtual void OnOK(); //}}AFX_MSG --- 61,64 ---- Index: GBDisassemble.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/GBDisassemble.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** GBDisassemble.h 13 May 2004 15:06:49 -0000 1.2 --- GBDisassemble.h 27 May 2006 14:47:33 -0000 1.3 *************** *** 21,25 **** #define AFX_GBDISASSEMBLE_H__3EFD5B47_6DBF_4F63_8F91_A9511EC590EB__INCLUDED_ ! #include "..\System.h" // Added by ClassView #if _MSC_VER > 1000 #pragma once --- 21,25 ---- #define AFX_GBDISASSEMBLE_H__3EFD5B47_6DBF_4F63_8F91_A9511EC590EB__INCLUDED_ ! #include "../System.h" // Added by ClassView #if _MSC_VER > 1000 #pragma once Index: FileDlg.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/FileDlg.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** FileDlg.cpp 25 Jun 2005 06:23:31 -0000 1.6 --- FileDlg.cpp 27 May 2006 14:47:33 -0000 1.7 *************** *** 160,164 **** ASSERT(typeControl != NULL); ! int sel = ::SendMessage(typeControl, CB_GETCURSEL, 0, 0); ASSERT(sel != -1); --- 160,164 ---- ASSERT(typeControl != NULL); ! LRESULT sel = ::SendMessage(typeControl, CB_GETCURSEL, 0, 0); ASSERT(sel != -1); Index: MemoryViewerAddressSize.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/MemoryViewerAddressSize.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MemoryViewerAddressSize.h 13 May 2004 15:06:55 -0000 1.2 --- MemoryViewerAddressSize.h 27 May 2006 14:47:33 -0000 1.3 *************** *** 21,25 **** #define AFX_MEMORYVIEWERADDRESSSIZE_H__04605262_2B1D_4EED_A467_B6C56AC2CACD__INCLUDED_ ! #include "..\System.h" // Added by ClassView #if _MSC_VER > 1000 #pragma once --- 21,25 ---- #define AFX_MEMORYVIEWERADDRESSSIZE_H__04605262_2B1D_4EED_A467_B6C56AC2CACD__INCLUDED_ ! #include "../System.h" // Added by ClassView #if _MSC_VER > 1000 #pragma once Index: vba.rc =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/vba.rc,v retrieving revision 1.54 retrieving revision 1.55 diff -C2 -d -r1.54 -r1.55 *** vba.rc 26 May 2006 14:37:41 -0000 1.54 --- vba.rc 27 May 2006 14:47:33 -0000 1.55 *************** *** 14,71 **** ///////////////////////////////////////////////////////////////////////////// - // German (Germany) resources - - #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_DEU) - #ifdef _WIN32 - LANGUAGE LANG_GERMAN, SUBLANG_GERMAN - #pragma code_page(1252) - #endif //_WIN32 - - ///////////////////////////////////////////////////////////////////////////// - // - // Version - // - - VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,8,0,600 - PRODUCTVERSION 1,8,0,600 - FILEFLAGSMASK 0x3fL - #ifdef _DEBUG - FILEFLAGS 0x29L - #else - FILEFLAGS 0x28L - #endif - FILEOS 0x40004L - FILETYPE 0x1L - FILESUBTYPE 0x0L - BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904b0" - BEGIN - VALUE "Comments", "VisualBoyAdvance comes with NO WARRANTY. Use it at your own risk." - VALUE "CompanyName", "http://vba.ngemu.com/" - VALUE "FileDescription", "VisualBoyAdvance emulator" - VALUE "FileVersion", "1, 8, 0, 600" - VALUE "InternalName", "VisualBoyAdvance" - VALUE "LegalCopyright", "Copyright © 2006 VBA development team" - VALUE "OriginalFilename", "VisualBoyAdvance.exe" - VALUE "PrivateBuild", "0" - VALUE "ProductName", "VisualBoyAdvance emulator" - VALUE "ProductVersion", "1, 8, 0, 600" - VALUE "SpecialBuild", "0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 - END - END - - #endif // German (Germany) resources - ///////////////////////////////////////////////////////////////////////////// - - - ///////////////////////////////////////////////////////////////////////////// // English (U.S.) resources --- 14,17 ---- *************** *** 131,135 **** FONT 8, "MS Sans Serif", 0, 0, 0x0 BEGIN ! ICON "IDI_ICON",IDC_STATIC,6,6,21,20 CTEXT "VisualBoyAdvance Emulator",IDC_STATIC,30,6,120,8 CTEXT "Copyright © 2006 VBA development team",IDC_STATIC,6,36,144,8 --- 77,81 ---- FONT 8, "MS Sans Serif", 0, 0, 0x0 BEGIN ! ICON 101,IDC_STATIC,6,6,20,20 CTEXT "VisualBoyAdvance Emulator",IDC_STATIC,30,6,120,8 CTEXT "Copyright © 2006 VBA development team",IDC_STATIC,6,36,144,8 Index: resource.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/resource.h,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** resource.h 26 May 2006 14:37:41 -0000 1.42 --- resource.h 27 May 2006 14:47:33 -0000 1.43 *************** *** 45,48 **** --- 45,49 ---- #define IDS_CBA_CODE_WARNING 40 #define IDS_OUT_OF_MEMORY 41 + #define IDI_ICON 101 #define IDD_REGISTERS 102 #define IDD_DEBUG 103 *************** *** 757,761 **** #define _APS_NEXT_COMMAND_VALUE 40278 #define _APS_NEXT_CONTROL_VALUE 1256 ! #define _APS_NEXT_SYMED_VALUE 104 #endif #endif --- 758,762 ---- #define _APS_NEXT_COMMAND_VALUE 40278 #define _APS_NEXT_CONTROL_VALUE 1256 ! #define _APS_NEXT_SYMED_VALUE 105 #endif #endif Index: ColorButton.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/ColorButton.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ColorButton.h 13 May 2004 15:06:49 -0000 1.2 --- ColorButton.h 27 May 2006 14:47:33 -0000 1.3 *************** *** 21,25 **** #define AFX_COLORBUTTON_H__DF02109B_B91C_49FD_954F_74A48B83C314__INCLUDED_ ! #include "..\System.h" // Added by ClassView #if _MSC_VER > 1000 #pragma once --- 21,25 ---- #define AFX_COLORBUTTON_H__DF02109B_B91C_49FD_954F_74A48B83C314__INCLUDED_ ! #include "../System.h" // Added by ClassView #if _MSC_VER > 1000 #pragma once Index: BitmapControl.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/BitmapControl.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** BitmapControl.h 13 May 2004 15:06:49 -0000 1.2 --- BitmapControl.h 27 May 2006 14:47:33 -0000 1.3 *************** *** 21,25 **** #define AFX_BITMAPCONTROL_H__2434AADB_B6A5_4E43_AA16_7B65B6F7FA26__INCLUDED_ ! #include "..\System.h" // Added by ClassView #if _MSC_VER > 1000 #pragma once --- 21,25 ---- #define AFX_BITMAPCONTROL_H__2434AADB_B6A5_4E43_AA16_7B65B6F7FA26__INCLUDED_ ! #include "../System.h" // Added by ClassView #if _MSC_VER > 1000 #pragma once Index: VBA.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/VBA.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** VBA.cpp 13 May 2006 16:32:16 -0000 1.14 --- VBA.cpp 27 May 2006 14:47:33 -0000 1.15 *************** *** 21,25 **** #include "stdafx.h" #include <mmsystem.h> - #include <windows.h> #include "AVIWrite.h" --- 21,24 ---- *************** *** 165,171 **** --- 164,172 ---- filterWidth = 0; filterHeight = 0; + fsAdapter = 0; fsWidth = 0; fsHeight = 0; fsColorDepth = 0; + fsFrequency = 0; fsForceChange = false; surfaceSizeX = 0; *************** *** 225,228 **** --- 226,230 ---- ddrawUseVideoMemory = false; d3dFilter = 0; + d3dKeepAspectRatio = true; glFilter = 0; glType = 0; *************** *** 290,293 **** --- 292,304 ---- InterframeCleanup(); + char winBuffer[2048]; + + GetModuleFileName(NULL, winBuffer, 2048); + char *p = strrchr(winBuffer, '\\'); + if(p) + *p = 0; + + regInit(winBuffer); + saveSettings(); *************** *** 509,512 **** --- 520,524 ---- } + void VBA::adjustDestRect() { *************** *** 575,578 **** --- 587,591 ---- } + void VBA::updateIFB() { *************** *** 1207,1213 **** --- 1220,1228 ---- pVideoDriverGUID = &videoDriverGUID; + fsAdapter = regQueryDwordValue("fsAdapter", 0); fsWidth = regQueryDwordValue("fsWidth", 0); fsHeight = regQueryDwordValue("fsHeight", 0); fsColorDepth = regQueryDwordValue("fsColorDepth", 0); + fsFrequency = regQueryDwordValue("fsFrequency", 0); if(videoOption == VIDEO_OTHER) { *************** *** 1266,1269 **** --- 1281,1285 ---- if(d3dFilter < 0 || d3dFilter > 1) d3dFilter = 0; + d3dKeepAspectRatio = regQueryDwordValue("d3dKeepAspectRatio", true) ? true : false; glFilter = regQueryDwordValue("glFilter", 0); if(glFilter < 0 || glFilter > 1) *************** *** 1322,1326 **** ifbType = 0; ! winFlashSize = regQueryDwordValue("flashSize", 0x10000); if(winFlashSize != 0x10000 && winFlashSize != 0x20000) winFlashSize = 0x10000; --- 1338,1342 ---- ifbType = 0; ! flashSize = winFlashSize = regQueryDwordValue("flashSize", 0x10000); if(winFlashSize != 0x10000 && winFlashSize != 0x20000) winFlashSize = 0x10000; *************** *** 1682,1705 **** bool VBA::updateRenderMethod(bool force) { ! bool res = updateRenderMethod0(force); ! ! while(!res && renderMethod > 0) { ! if(renderMethod == OPENGL) ! renderMethod = DIRECT_3D; ! else if(renderMethod == DIRECT_3D) ! renderMethod = DIRECT_DRAW; ! else if(renderMethod == DIRECT_DRAW) { ! if(videoOption > VIDEO_4X) { ! videoOption = VIDEO_2X; ! force = true; ! } else ! renderMethod = GDI; ! } ! ! res = updateRenderMethod(force); ! } ! return res; } bool VBA::updateRenderMethod0(bool force) { --- 1698,1731 ---- bool VBA::updateRenderMethod(bool force) { ! bool res = updateRenderMethod0(force); ! ! while(!res && renderMethod > 0) { ! if( fsAdapter > 0 ) { ! fsAdapter = 0; ! } else { ! if( videoOption > VIDEO_4X ) { ! videoOption = VIDEO_1X; ! force = true; ! } else { ! if(renderMethod == OPENGL) { ! renderMethod = DIRECT_3D; ! } else { ! if(renderMethod == DIRECT_3D) { ! renderMethod = DIRECT_DRAW; ! } else { ! if(renderMethod == DIRECT_DRAW) { ! renderMethod = GDI; ! } ! } ! } ! } ! } ! res = updateRenderMethod(force); ! } ! ! return res; } + bool VBA::updateRenderMethod0(bool force) { *************** *** 1733,1747 **** switch(renderMethod) { case GDI: ! display = newGDIDisplay(); ! break; case DIRECT_DRAW: ! display = newDirectDrawDisplay(); ! break; case DIRECT_3D: ! display = newDirect3DDisplay(); ! break; ! case OPENGL: ! display = newOpenGLDisplay(); ! break; } --- 1759,1775 ---- switch(renderMethod) { case GDI: ! display = newGDIDisplay(); ! break; case DIRECT_DRAW: ! pVideoDriverGUID = NULL; ! ZeroMemory( &videoDriverGUID, sizeof( GUID ) ); ! display = newDirectDrawDisplay(); ! break; case DIRECT_3D: ! display = newDirect3DDisplay(); ! break; ! case OPENGL: ! display = newOpenGLDisplay(); ! break; } *************** *** 1774,1785 **** } void VBA::winCheckFullscreen() { ! if(videoOption > VIDEO_4X && tripleBuffering) { ! if(display) ! display->checkFullScreen(); ! } } void VBA::shutdownDisplay() { --- 1802,1816 ---- } + void VBA::winCheckFullscreen() { ! if(videoOption > VIDEO_4X && tripleBuffering) { ! if(display) { ! display->checkFullScreen(); ! } ! } } + void VBA::shutdownDisplay() { *************** *** 2099,2105 **** --- 2130,2138 ---- + regSetDwordValue("fsAdapter", fsAdapter); regSetDwordValue("fsWidth", fsWidth); regSetDwordValue("fsHeight", fsHeight); regSetDwordValue("fsColorDepth", fsColorDepth); + regSetDwordValue("fsFrequency", fsFrequency); regSetDwordValue("renderMethod", renderMethod); *************** *** 2134,2137 **** --- 2167,2171 ---- regSetDwordValue("d3dFilter", d3dFilter); + regSetDwordValue("d3dKeepAspectRatio", d3dKeepAspectRatio); regSetDwordValue("glFilter", glFilter); regSetDwordValue("glType", glType); Index: skinButton.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/skinButton.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** skinButton.cpp 13 May 2004 15:06:55 -0000 1.7 --- skinButton.cpp 27 May 2006 14:47:33 -0000 1.8 *************** *** 98,102 **** HDC hDC = ::BeginPaint(m_hWnd, &ps); HDC memDC = ::CreateCompatibleDC(hDC); ! UINT state = ::SendMessage(m_hWnd, BM_GETSTATE, 0, 0); HBITMAP oldBitmap; if(state & BST_PUSHED) --- 98,102 ---- HDC hDC = ::BeginPaint(m_hWnd, &ps); HDC memDC = ::CreateCompatibleDC(hDC); ! LRESULT state = ::SendMessage(m_hWnd, BM_GETSTATE, 0, 0); HBITMAP oldBitmap; if(state & BST_PUSHED) Index: DirectInput.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/DirectInput.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** DirectInput.cpp 13 May 2006 16:32:16 -0000 1.5 --- DirectInput.cpp 27 May 2006 14:47:33 -0000 1.6 *************** *** 40,44 **** class DirectInput : public Input { private: ! HINSTANCE dinputDLL; public: --- 40,44 ---- class DirectInput : public Input { private: ! HMODULE dinputDLL; public: *************** *** 723,731 **** if(dinputDLL) { ! #ifdef _AFXDLL ! AfxFreeLibrary( dinputDLL ); ! #else ! FreeLibrary( dinputDLL ); ! #endif dinputDLL = NULL; } --- 723,727 ---- if(dinputDLL) { ! FreeLibrary(dinputDLL); dinputDLL = NULL; } *************** *** 738,747 **** 0, "VBA.ini"); ! #ifdef _AFXDLL ! dinputDLL = AfxLoadLibrary("dinput.dll"); ! #else ! dinputDLL = LoadLibrary( _T("dinput.dll") ); ! #endif ! HRESULT (WINAPI *DInputCreate)(HINSTANCE,DWORD,LPDIRECTINPUT *,IUnknown *); if(dinputDLL != NULL) { --- 734,738 ---- 0, "VBA.ini"); ! dinputDLL = LoadLibrary("dinput.dll"); HRESULT (WINAPI *DInputCreate)(HINSTANCE,DWORD,LPDIRECTINPUT *,IUnknown *); if(dinputDLL != NULL) { *************** *** 754,758 **** } } else { ! directXMessage("DINPUT.DLL"); return false; } --- 745,749 ---- } } else { ! directXMessage("dinput.dll"); return false; } Index: MainWndFile.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/MainWndFile.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** MainWndFile.cpp 13 May 2006 16:32:16 -0000 1.13 --- MainWndFile.cpp 27 May 2006 14:47:33 -0000 1.14 *************** *** 690,694 **** fseek(f, 0x1e, SEEK_SET); fread(&len, 1, 4, f); ! int game = 0; if(len > 1) { GSACodeSelect dlg(f); --- 690,694 ---- fseek(f, 0x1e, SEEK_SET); fread(&len, 1, 4, f); ! INT_PTR game = 0; if(len > 1) { GSACodeSelect dlg(f); *************** *** 738,742 **** CFileStatus status; CString str; ! __time64_t time = -1; int found = 0; --- 738,742 ---- CFileStatus status; CString str; ! __time64_t time = (__time64_t)-1; int found = 0; *************** *** 745,749 **** if(emulating && CFile::GetStatus(name, status)) { ! if((unsigned long)status.m_mtime.GetTime() < time) { time = status.m_mtime.GetTime(); found = i; --- 745,749 ---- if(emulating && CFile::GetStatus(name, status)) { ! if(status.m_mtime.GetTime() < time) { time = status.m_mtime.GetTime(); found = i; Index: Joypad.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/Joypad.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Joypad.cpp 13 May 2006 16:32:16 -0000 1.5 --- Joypad.cpp 27 May 2006 14:47:33 -0000 1.6 *************** *** 47,53 **** BEGIN_MESSAGE_MAP(JoypadEditControl, CEdit) - //{{AFX_MSG_MAP(JoypadEditControl) - ON_WM_CHAR() - //}}AFX_MSG_MAP ON_MESSAGE(JOYCONFIG_MESSAGE, OnJoyConfig) END_MESSAGE_MAP() --- 47,50 ---- *************** *** 56,71 **** // JoypadEditControl message handlers - void JoypadEditControl::OnChar(UINT nChar, UINT nRepCnt, UINT nFlags) - { - } - LRESULT JoypadEditControl::OnJoyConfig(WPARAM wParam, LPARAM lParam) { ! SetWindowLong(GetSafeHwnd(), GWL_USERDATA,((wParam<<8)|lParam)); ! SetWindowText(theApp.input->getKeyName((wParam<<8)|lParam)); ! GetParent()->GetNextDlgTabItem(this, FALSE)->SetFocus(); ! return TRUE; } BOOL JoypadEditControl::PreTranslateMessage(MSG *pMsg) { --- 53,69 ---- // JoypadEditControl message handlers LRESULT JoypadEditControl::OnJoyConfig(WPARAM wParam, LPARAM lParam) { ! #ifdef _WIN64 ! SetWindowLongPtr( GetSafeHwnd(), GWL_USERDATA, ((wParam<<8)|lParam) ); ! #elif defined _WIN32 ! SetWindowLongPtr( GetSafeHwnd(), GWL_USERDATA, PtrToLong((wParam<<8)|lParam) ); ! #endif ! this->SetWindowText( theApp.input->getKeyName( (int)((wParam<<8)|lParam) ) ); ! GetParent()->GetNextDlgTabItem(this, FALSE)->SetFocus(); ! return TRUE; } + BOOL JoypadEditControl::PreTranslateMessage(MSG *pMsg) { *************** *** 113,124 **** BEGIN_MESSAGE_MAP(JoypadConfig, CDialog) - //{{AFX_MSG_MAP(JoypadConfig) ON_BN_CLICKED(ID_CANCEL, OnCancel) ON_BN_CLICKED(ID_OK, OnOk) - ON_WM_CHAR() ON_WM_DESTROY() ON_WM_TIMER() ON_WM_KEYDOWN() - //}}AFX_MSG_MAP END_MESSAGE_MAP() --- 111,119 ---- *************** *** 138,145 **** } - void JoypadConfig::OnChar(UINT nChar, UINT nRepCnt, UINT nFlags) - { - } - void JoypadConfig::OnDestroy() { --- 133,136 ---- *************** *** 166,206 **** timerId = SetTimer(0,50,NULL); ! SetWindowLong(up, GWL_USERDATA,joypad[which][KEY_UP]); up.SetWindowText(theApp.input->getKeyName(joypad[which][KEY_UP])); ! SetWindowLong(down, GWL_USERDATA,joypad[which][KEY_DOWN]); down.SetWindowText(theApp.input->getKeyName(joypad[which][KEY_DOWN])); ! SetWindowLong(left, GWL_USERDATA,joypad[which][KEY_LEFT]); left.SetWindowText(theApp.input->getKeyName(joypad[which][KEY_LEFT])); ! SetWindowLong(right, GWL_USERDATA,joypad[which][KEY_RIGHT]); right.SetWindowText(theApp.input->getKeyName(joypad[which][KEY_RIGHT])); ! SetWindowLong(buttonA, GWL_USERDATA,joypad[which][KEY_BUTTON_A]); buttonA.SetWindowText(theApp.input->getKeyName(joypad[which][KEY_BUTTON_A])); ! SetWindowLong(buttonB, GWL_USERDATA,joypad[which][KEY_BUTTON_B]); buttonB.SetWindowText(theApp.input->getKeyName(joypad[which][KEY_BUTTON_B])); ! SetWindowLong(buttonL, GWL_USERDATA,joypad[which][KEY_BUTTON_L]); buttonL.SetWindowText(theApp.input->getKeyName(joypad[which][KEY_BUTTON_L])); ! SetWindowLong(buttonR, GWL_USERDATA,joypad[which][KEY_BUTTON_R]); buttonR.SetWindowText(theApp.input->getKeyName(joypad[which][KEY_BUTTON_R])); ! SetWindowLong(buttonSelect, GWL_USERDATA,joypad[which][KEY_BUTTON_SELECT]); buttonSelect.SetWindowText(theApp.input->getKeyName(joypad[which][KEY_BUTTON_SELECT])); ! SetWindowLong(buttonStart, GWL_USERDATA,joypad[which][KEY_BUTTON_START]); buttonStart.SetWindowText(theApp.input->getKeyName(joypad[which][KEY_BUTTON_START])); ! SetWindowLong(speed, GWL_USERDATA,joypad[which][KEY_BUTTON_SPEED]); speed.SetWindowText(theApp.input->getKeyName(joypad[which][KEY_BUTTON_SPEED])); ! SetWindowLong(capture, GWL_USERDATA,joypad[which][KEY_BUTTON_CAPTURE]); capture.SetWindowText(theApp.input->getKeyName(joypad[which][KEY_BUTTON_CAPTURE])); ! SetWindowLong(buttonGS, GWL_USERDATA,joypad[which][KEY_BUTTON_GS]); buttonGS.SetWindowText(theApp.input->getKeyName(joypad[which][KEY_BUTTON_GS])); --- 157,197 ---- timerId = SetTimer(0,50,NULL); ! SetWindowLongPtr(up, GWL_USERDATA,joypad[which][KEY_UP]); up.SetWindowText(theApp.input->getKeyName(joypad[which][KEY_UP])); ! SetWindowLongPtr(down, GWL_USERDATA,joypad[which][KEY_DOWN]); down.SetWindowText(theApp.input->getKeyName(joypad[which][KEY_DOWN])); ! SetWindowLongPtr(left, GWL_USERDATA,joypad[which][KEY_LEFT]); left.SetWindowText(theApp.input->getKeyName(joypad[which][KEY_LEFT])); ! SetWindowLongPtr(right, GWL_USERDATA,joypad[which][KEY_RIGHT]); right.SetWindowText(theApp.input->getKeyName(joypad[which][KEY_RIGHT])); ! SetWindowLongPtr(buttonA, GWL_USERDATA,joypad[which][KEY_BUTTON_A]); buttonA.SetWindowText(theApp.input->getKeyName(joypad[which][KEY_BUTTON_A])); ! SetWindowLongPtr(buttonB, GWL_USERDATA,joypad[which][KEY_BUTTON_B]); buttonB.SetWindowText(theApp.input->getKeyName(joypad[which][KEY_BUTTON_B])); ! SetWindowLongPtr(buttonL, GWL_USERDATA,joypad[which][KEY_BUTTON_L]); buttonL.SetWindowText(theApp.input->getKeyName(joypad[which][KEY_BUTTON_L])); ! SetWindowLongPtr(buttonR, GWL_USERDATA,joypad[which][KEY_BUTTON_R]); buttonR.SetWindowText(theApp.input->getKeyName(joypad[which][KEY_BUTTON_R])); ! SetWindowLongPtr(buttonSelect, GWL_USERDATA,joypad[which][KEY_BUTTON_SELECT]); buttonSelect.SetWindowText(theApp.input->getKeyName(joypad[which][KEY_BUTTON_SELECT])); ! SetWindowLongPtr(buttonStart, GWL_USERDATA,joypad[which][KEY_BUTTON_START]); buttonStart.SetWindowText(theApp.input->getKeyName(joypad[which][KEY_BUTTON_START])); ! SetWindowLongPtr(speed, GWL_USERDATA,joypad[which][KEY_BUTTON_SPEED]); speed.SetWindowText(theApp.input->getKeyName(joypad[which][KEY_BUTTON_SPEED])); ! SetWindowLongPtr(capture, GWL_USERDATA,joypad[which][KEY_BUTTON_CAPTURE]); capture.SetWindowText(theApp.input->getKeyName(joypad[which][KEY_BUTTON_CAPTURE])); ! SetWindowLongPtr(buttonGS, GWL_USERDATA,joypad[which][KEY_BUTTON_GS]); buttonGS.SetWindowText(theApp.input->getKeyName(joypad[which][KEY_BUTTON_GS])); *************** *** 261,301 **** id = IDC_EDIT_UP; ! assignKey(id, GetWindowLong(up, GWL_USERDATA)); id = IDC_EDIT_DOWN; ! assignKey(id, GetWindowLong(down, GWL_USERDATA)); id = IDC_EDIT_LEFT; ! assignKey(id, GetWindowLong(left, GWL_USERDATA)); id = IDC_EDIT_RIGHT; ! assignKey(id, GetWindowLong(right, GWL_USERDATA)); id = IDC_EDIT_BUTTON_A; ! assignKey(id, GetWindowLong(buttonA, GWL_USERDATA)); id = IDC_EDIT_BUTTON_B; ! assignKey(id, GetWindowLong(buttonB, GWL_USERDATA)); id = IDC_EDIT_BUTTON_L; ! assignKey(id, GetWindowLong(buttonL, GWL_USERDATA)); id = IDC_EDIT_BUTTON_R; ! assignKey(id, GetWindowLong(buttonR, GWL_USERDATA)); id = IDC_EDIT_BUTTON_SELECT; ! assignKey(id, GetWindowLong(buttonSelect, GWL_USERDATA)); id = IDC_EDIT_BUTTON_START; ! assignKey(id, GetWindowLong(buttonStart, GWL_USERDATA)); id = IDC_EDIT_SPEED; ! assignKey(id, GetWindowLong(speed, GWL_USERDATA)); id = IDC_EDIT_CAPTURE; ! assignKey(id, GetWindowLong(capture, GWL_USERDATA)); id = IDC_EDIT_BUTTON_GS; ! assignKey(id, GetWindowLong(buttonGS, GWL_USERDATA)); // winSaveKeys(); --- 252,292 ---- id = IDC_EDIT_UP; ! assignKey(id, GetWindowLongPtr(up, GWL_USERDATA)); id = IDC_EDIT_DOWN; ! assignKey(id, GetWindowLongPtr(down, GWL_USERDATA)); id = IDC_EDIT_LEFT; ! assignKey(id, GetWindowLongPtr(left, GWL_USERDATA)); id = IDC_EDIT_RIGHT; ! assignKey(id, GetWindowLongPtr(right, GWL_USERDATA)); id = IDC_EDIT_BUTTON_A; ! assignKey(id, GetWindowLongPtr(buttonA, GWL_USERDATA)); id = IDC_EDIT_BUTTON_B; ! assignKey(id, GetWindowLongPtr(buttonB, GWL_USERDATA)); id = IDC_EDIT_BUTTON_L; ! assignKey(id, GetWindowLongPtr(buttonL, GWL_USERDATA)); id = IDC_EDIT_BUTTON_R; ! assignKey(id, GetWindowLongPtr(buttonR, GWL_USERDATA)); id = IDC_EDIT_BUTTON_SELECT; ! assignKey(id, GetWindowLongPtr(buttonSelect, GWL_USERDATA)); id = IDC_EDIT_BUTTON_START; ! assignKey(id, GetWindowLongPtr(buttonStart, GWL_USERDATA)); id = IDC_EDIT_SPEED; ! assignKey(id, GetWindowLongPtr(speed, GWL_USERDATA)); id = IDC_EDIT_CAPTURE; ! assignKey(id, GetWindowLongPtr(capture, GWL_USERDATA)); id = IDC_EDIT_BUTTON_GS; ! assignKey(id, GetWindowLongPtr(buttonGS, GWL_USERDATA)); // winSaveKeys(); *************** *** 329,340 **** BEGIN_MESSAGE_MAP(MotionConfig, CDialog) - //{{AFX_MSG_MAP(MotionConfig) ON_BN_CLICKED(ID_CANCEL, OnCancel) ON_BN_CLICKED(ID_OK, OnOk) - ON_WM_CHAR() ON_WM_DESTROY() ON_WM_KEYDOWN() ON_WM_TIMER() - //}}AFX_MSG_MAP END_MESSAGE_MAP() --- 320,328 ---- *************** *** 354,361 **** } - void MotionConfig::OnChar(UINT nChar, UINT nRepCnt, UINT nFlags) - { - } - void MotionConfig::OnDestroy() { --- 342,345 ---- *************** *** 371,384 **** timerId = SetTimer(0,200,NULL); ! SetWindowLong(up, GWL_USERDATA,motion[KEY_UP]); up.SetWindowText(theApp.input->getKeyName(motion[KEY_UP])); ! SetWindowLong(down, GWL_USERDATA,motion[KEY_DOWN]); down.SetWindowText(theApp.input->getKeyName(motion[KEY_DOWN])); ! SetWindowLong(left, GWL_USERDATA,motion[KEY_LEFT]); left.SetWindowText(theApp.input->getKeyName(motion[KEY_LEFT])); ! SetWindowLong(right, GWL_USERDATA,motion[KEY_RIGHT]); right.SetWindowText(theApp.input->getKeyName(motion[KEY_RIGHT])); --- 355,368 ---- timerId = SetTimer(0,200,NULL); ! SetWindowLongPtr(up, GWL_USERDATA,motion[KEY_UP]); up.SetWindowText(theApp.input->getKeyName(motion[KEY_UP])); ! SetWindowLongPtr(down, GWL_USERDATA,motion[KEY_DOWN]); down.SetWindowText(theApp.input->getKeyName(motion[KEY_DOWN])); ! SetWindowLongPtr(left, GWL_USERDATA,motion[KEY_LEFT]); left.SetWindowText(theApp.input->getKeyName(motion[KEY_LEFT])); ! SetWindowLongPtr(right, GWL_USERDATA,motion[KEY_RIGHT]); right.SetWindowText(theApp.input->getKeyName(motion[KEY_RIGHT])); *************** *** 423,435 **** id = IDC_EDIT_UP; ! assignKey(id, GetWindowLong(up, GWL_USERDATA)); id = IDC_EDIT_DOWN; ! assignKey(id, GetWindowLong(down, GWL_USERDATA)); id = IDC_EDIT_LEFT; ! assignKey(id, GetWindowLong(left, GWL_USERDATA)); id = IDC_EDIT_RIGHT; ! assignKey(id, GetWindowLong(right, GWL_USERDATA)); } --- 407,419 ---- id = IDC_EDIT_UP; ! assignKey(id, GetWindowLongPtr(up, GWL_USERDATA)); id = IDC_EDIT_DOWN; ! assignKey(id, GetWindowLongPtr(down, GWL_USERDATA)); id = IDC_EDIT_LEFT; ! assignKey(id, GetWindowLongPtr(left, GWL_USERDATA)); id = IDC_EDIT_RIGHT; ! assignKey(id, GetWindowLongPtr(right, GWL_USERDATA)); } Index: MemoryViewer.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/MemoryViewer.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** MemoryViewer.cpp 13 May 2004 15:06:54 -0000 1.7 --- MemoryViewer.cpp 27 May 2006 14:47:33 -0000 1.8 *************** *** 536,541 **** LRESULT MemoryViewer::OnWMChar(WPARAM wParam, LPARAM LPARAM) ! { ! if(OnEditInput(wParam)) return 0; return 1; --- 536,541 ---- LRESULT MemoryViewer::OnWMChar(WPARAM wParam, LPARAM LPARAM) ! { // The WM_CHAR message uses Unicode Transformation Format (UTF)-16. ! if(OnEditInput((UINT)(wParam & 0xFFFF))) return 0; return 1; Index: MainWndOptions.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/MainWndOptions.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** MainWndOptions.cpp 30 Apr 2006 14:33:12 -0000 1.7 --- MainWndOptions.cpp 27 May 2006 14:47:33 -0000 1.8 *************** *** 43,46 **** --- 43,48 ---- #include "../gb/gbPrinter.h" + #include <tchar.h> + extern int emulating; *************** *** 109,120 **** } void MainWnd::OnOptionsFrameskipThrottleOther() { ! Throttle dlg; ! int v = dlg.DoModal(); ! if(v) ! theApp.throttle = v; } void MainWnd::OnUpdateOptionsFrameskipThrottleOther(CCmdUI* pCmdUI) { --- 111,126 ---- } + void MainWnd::OnOptionsFrameskipThrottleOther() { ! Throttle dlg; ! int v = (int)dlg.DoModal(); ! ! if( v ) { ! theApp.throttle = v; ! } } + void MainWnd::OnUpdateOptionsFrameskipThrottleOther(CCmdUI* pCmdUI) { *************** *** 222,230 **** } void MainWnd::OnOptionsVideoVsync() { ! theApp.vsync = !theApp.vsync; } void MainWnd::OnUpdateOptionsVideoVsync(CCmdUI* pCmdUI) { --- 228,241 ---- } + void MainWnd::OnOptionsVideoVsync() { ! theApp.vsync = !theApp.vsync; ! if( theApp.display ) { ! theApp.display->setOption( _T("vsync"), theApp.vsync ); ! } } + void MainWnd::OnUpdateOptionsVideoVsync(CCmdUI* pCmdUI) { *************** *** 270,280 **** } BOOL MainWnd::OnOptionVideoSize(UINT nID) { ! theApp.updateVideoSize(nID); ! theApp.m_pMainWnd->PostMessage(VBA_CONFIRM_MODE); ! return TRUE; } void MainWnd::OnOptionsVideoFullscreen320x240() { --- 281,293 ---- } + BOOL MainWnd::OnOptionVideoSize(UINT nID) { ! theApp.updateVideoSize(nID); ! theApp.m_pMainWnd->PostMessage(VBA_CONFIRM_MODE); ! return TRUE; } + void MainWnd::OnOptionsVideoFullscreen320x240() { *************** *** 292,295 **** --- 305,309 ---- } + void MainWnd::OnOptionsVideoFullscreen() { *************** *** 326,329 **** --- 340,344 ---- } + void MainWnd::OnUpdateOptionsVideoFullscreen(CCmdUI* pCmdUI) { *************** *** 343,354 **** } void MainWnd::OnOptionsVideoFullscreenstretchtofit() { ! theApp.fullScreenStretch = !theApp.fullScreenStretch; ! theApp.updateWindowSize(theApp.videoOption); ! if(theApp.display) ! theApp.display->clear(); } void MainWnd::OnUpdateOptionsVideoFullscreenstretchtofit(CCmdUI* pCmdUI) { --- 358,376 ---- } + void MainWnd::OnOptionsVideoFullscreenstretchtofit() { ! theApp.fullScreenStretch = !theApp.fullScreenStretch; ! theApp.d3dKeepAspectRatio = !theApp.fullScreenStretch; ! theApp.updateWindowSize( theApp.videoOption ); ! if( theApp.display ) { ! if( emulating ) { ! theApp.display->clear( ); ! } ! theApp.display->setOption( _T("d3dKeepAspectRatio"), theApp.d3dKeepAspectRatio ); ! } } + void MainWnd::OnUpdateOptionsVideoFullscreenstretchtofit(CCmdUI* pCmdUI) { *************** *** 427,445 **** } void MainWnd::OnOptionsVideoTriplebuffering() { ! theApp.tripleBuffering = !theApp.tripleBuffering; } void MainWnd::OnUpdateOptionsVideoTriplebuffering(CCmdUI* pCmdUI) { ! pCmdUI->SetCheck(theApp.tripleBuffering); } void MainWnd::OnOptionsVideoDdrawemulationonly() { ! theApp.ddrawEmulationOnly = !theApp.ddrawEmulationOnly; } void MainWnd::OnUpdateOptionsVideoDdrawemulationonly(CCmdUI* pCmdUI) { --- 449,476 ---- } + void MainWnd::OnOptionsVideoTriplebuffering() { ! theApp.tripleBuffering = !theApp.tripleBuffering; ! if( theApp.display ) { ! theApp.display->setOption( _T("tripleBuffering"), theApp.tripleBuffering ); ! } } + void MainWnd::OnUpdateOptionsVideoTriplebuffering(CCmdUI* pCmdUI) { ! pCmdUI->SetCheck(theApp.tripleBuffering); } void MainWnd::OnOptionsVideoDdrawemulationonly() { ! theApp.ddrawEmulationOnly = !theApp.ddrawEmulationOnly; ! if( theApp.display ) { ! theApp.display->setOption( _T("ddrawEmulationOnly"), theApp.ddrawEmulationOnly ); ! } } + void MainWnd::OnUpdateOptionsVideoDdrawemulationonly(CCmdUI* pCmdUI) { *************** *** 447,455 **** } void MainWnd::OnOptionsVideoDdrawusevideomemory() { ! theApp.ddrawUseVideoMemory = !theApp.ddrawUseVideoMemory; } void MainWnd::OnUpdateOptionsVideoDdrawusevideomemory(CCmdUI* pCmdUI) { --- 478,491 ---- } + void MainWnd::OnOptionsVideoDdrawusevideomemory() { ! theApp.ddrawUseVideoMemory = !theApp.ddrawUseVideoMemory; ! if( theApp.display ) { ! theApp.display->setOption( _T("ddrawUseVideoMemory"), theApp.ddrawUseVideoMemory ); ! } } + void MainWnd::OnUpdateOptionsVideoDdrawusevideomemory(CCmdUI* pCmdUI) { *************** *** 459,465 **** void MainWnd::OnOptionsVideoRenderoptionsD3dnofilter() { ! theApp.d3dFilter = 0; ! if(theApp.display) ! theApp.display->setOption("d3dFilter", 0); } --- 495,502 ---- void MainWnd::OnOptionsVideoRenderoptionsD3dnofilter() { ! theApp.d3dFilter = 0; ! if( theApp.display ) { ! theApp.display->setOption( _T("d3dFilter"), theApp.d3dFilter ); ! } } *************** *** 469,479 **** } void MainWnd::OnOptionsVideoRenderoptionsD3dbilinear() { ! theApp.d3dFilter = 1; ! if(theApp.display) ! theApp.display->setOption("d3dFilter", 1); } void MainWnd::OnUpdateOptionsVideoRenderoptionsD3dbilinear(CCmdUI* pCmdUI) { --- 506,519 ---- } + void MainWnd::OnOptionsVideoRenderoptionsD3dbilinear() { ! theApp.d3dFilter = 1; ! if( theApp.display ) { ! theApp.display->setOption( _T("d3dFilter"), theApp.d3dFilter ); ! } } + void MainWnd::OnUpdateOptionsVideoRenderoptionsD3dbilinear(CCmdUI* pCmdUI) { *************** *** 481,491 **** } void MainWnd::OnOptionsVideoRenderoptionsGlnearest() { ! theApp.glFilter = 0; ! if(theApp.display) ! theApp.display->setOption("glFilter", 0); } void MainWnd::OnUpdateOptionsVideoRenderoptionsGlnearest(CCmdUI* pCmdUI) { --- 521,534 ---- } + void MainWnd::OnOptionsVideoRenderoptionsGlnearest() { ! theApp.glFilter = 0; ! if( theApp.display ) { ! theApp.display->setOption( _T("glFilter"), theApp.glFilter ); ! } } + void MainWnd::OnUpdateOptionsVideoRenderoptionsGlnearest(CCmdUI* pCmdUI) { *************** *** 493,503 **** } void MainWnd::OnOptionsVideoRenderoptionsGlbilinear() { ! theApp.glFilter = 1; ! if(theApp.display) ! theApp.display->setOption("glFilter", 1); } void MainWnd::OnUpdateOptionsVideoRenderoptionsGlbilinear(CCmdUI* pCmdUI) { --- 536,549 ---- } + void MainWnd::OnOptionsVideoRenderoptionsGlbilinear() { ! theApp.glFilter = 1; ! if( theApp.display ) { ! theApp.display->setOption( _T("glFilter"), theApp.glFilter ); ! } } + void MainWnd::OnUpdateOptionsVideoRenderoptionsGlbilinear(CCmdUI* pCmdUI) { *************** *** 505,515 **** } void MainWnd::OnOptionsVideoRenderoptionsGltriangle() { ! theApp.glType = 0; ! if(theApp.display) ! theApp.display->setOption("glType", 0); } void MainWnd::OnUpdateOptionsVideoRenderoptionsGltriangle(CCmdUI* pCmdUI) { --- 551,564 ---- } + void MainWnd::OnOptionsVideoRenderoptionsGltriangle() { ! theApp.glType = 0; ! if( theApp.display ) { ! theApp.display->setOption( _T("glType"), theApp.glType ); ! } } + void MainWnd::OnUpdateOptionsVideoRenderoptionsGltriangle(CCmdUI* pCmdUI) { ***************... [truncated message content] |
From: Spacy <sp...@us...> - 2006-05-27 14:47:38
|
Update of /cvsroot/vba/VisualBoyAdvance/src/gb In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv6380/src/gb Modified Files: GB.cpp GB.h gbCheats.cpp Log Message: vs2005 compatibility, minor changes/fixes Index: GB.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/gb/GB.cpp,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** GB.cpp 13 May 2006 16:32:15 -0000 1.25 --- GB.cpp 27 May 2006 14:47:33 -0000 1.26 *************** *** 2092,2104 **** } ! void gbReset() { - - gbCgbMode = 0; gbSgbMode = 0; - oldRegister_WY = 146; - gbInterruptLaunched = 0; - if(gbRom[0x143] & 0x80) { if((gbEmulatorType == 0) || --- 2092,2099 ---- } ! void gbGetHardwareType() { gbCgbMode = 0; gbSgbMode = 0; if(gbRom[0x143] & 0x80) { if((gbEmulatorType == 0) || *************** *** 2106,2129 **** gbEmulatorType == 4) { gbCgbMode = 1; - if (gbVram == NULL) - gbVram = (u8 *)malloc(0x4000); - if (gbWram == NULL) - gbWram = (u8 *)malloc(0x8000); - memset(gbVram,0,0x4000); - memset(gbPalette,0, 2*128); } } ! else ! { ! if(gbVram != NULL) { ! free(gbVram); ! gbVram = NULL; ! } ! if(gbWram != NULL) { ! free(gbWram); ! gbWram = NULL; ! } ! } ! if((gbCgbMode == 0 ) && (gbRom[0x146] == 0x03)) { if(gbEmulatorType == 0 || --- 2101,2107 ---- gbEmulatorType == 4) { gbCgbMode = 1; } } ! if((gbCgbMode == 0 ) && (gbRom[0x146] == 0x03)) { if(gbEmulatorType == 0 || *************** *** 2144,2147 **** --- 2122,2153 ---- if (gbHardware & 8) // If GBA is selected, choose the GBA default settings. gbGBCColorType = 2; // (0 = GBC, 1 = GBA, 2 = GBASP) + } + + void gbReset() + { + gbGetHardwareType(); + + oldRegister_WY = 146; + gbInterruptLaunched = 0; + + if(gbCgbMode == 1) { + if (gbVram == NULL) + gbVram = (u8 *)malloc(0x4000); + if (gbWram == NULL) + gbWram = (u8 *)malloc(0x8000); + memset(gbVram,0,0x4000); + memset(gbPalette,0, 2*128); + } + else + { + if(gbVram != NULL) { + free(gbVram); + gbVram = NULL; + } + if(gbWram != NULL) { + free(gbWram); + gbWram = NULL; + } + } gbLYChangeHappened = false; Index: GB.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/gb/GB.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** GB.h 30 Apr 2006 14:41:06 -0000 1.7 --- GB.h 27 May 2006 14:47:33 -0000 1.8 *************** *** 43,46 **** --- 43,47 ---- extern void gbSoundReset(); extern void gbSoundSetQuality(int); + extern void gbGetHardwareType(); extern void gbReset(); extern void gbCleanUp(); Index: gbCheats.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/gb/gbCheats.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** gbCheats.cpp 4 Jan 2006 13:38:47 -0000 1.9 --- gbCheats.cpp 27 May 2006 14:47:33 -0000 1.10 *************** *** 164,168 **** bool gbVerifyGsCode(const char *code) { ! int len = strlen(code); if(len == 0) --- 164,168 ---- bool gbVerifyGsCode(const char *code) { ! size_t len = strlen(code); if(len == 0) *************** *** 229,233 **** bool gbVerifyGgCode(const char *code) { ! int len = strlen(code); if(len != 11 && --- 229,233 ---- bool gbVerifyGgCode(const char *code) { ! size_t len = strlen(code); if(len != 11 && *************** *** 314,318 **** int i = gbCheatNumber; ! int len = strlen(code); strcpy(gbCheatList[i].cheatCode, code); --- 314,318 ---- int i = gbCheatNumber; ! size_t len = strlen(code); strcpy(gbCheatList[i].cheatCode, code); |
From: Spacy <sp...@us...> - 2006-05-27 14:47:37
|
Update of /cvsroot/vba/VisualBoyAdvance/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv6380/src Modified Files: Cheats.cpp Globals.h Util.cpp elf.cpp memgzio.c thumb.h unzip.cpp Log Message: vs2005 compatibility, minor changes/fixes Index: memgzio.c =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/memgzio.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** memgzio.c 17 Jan 2004 23:07:32 -0000 1.3 --- memgzio.c 27 May 2006 14:47:32 -0000 1.4 *************** *** 126,130 **** } memcpy(file->next, buffer, total); ! file->available -= total; file->next += total; return total; --- 126,130 ---- } memcpy(file->next, buffer, total); ! file->available -= (int)total; file->next += total; return total; *************** *** 148,152 **** } memcpy(buffer, file->next, total); ! file->available -= total; file->next += total; return total; --- 148,152 ---- } memcpy(buffer, file->next, total); ! file->available -= (int)total; file->next += total; return total; *************** *** 171,175 **** local long memTell(MEMFILE *f) { ! return (f->next - f->memory) - 8; } --- 171,175 ---- local long memTell(MEMFILE *f) { ! return (long)(f->next - f->memory) - 8; } *************** *** 198,202 **** va_end(list); ! return memWrite(buffer, 1, len, f); } --- 198,202 ---- va_end(list); ! return (int)memWrite(buffer, 1, len, f); } Index: thumb.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/thumb.h,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** thumb.h 30 Apr 2006 14:37:15 -0000 1.16 --- thumb.h 27 May 2006 14:47:32 -0000 1.17 *************** *** 775,779 **** #ifndef FINAL_VERSION if(armNextPC == stop) { ! armNextPC = armNextPC++; } #endif --- 775,779 ---- #ifndef FINAL_VERSION if(armNextPC == stop) { ! armNextPC++; } #endif Index: unzip.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/unzip.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** unzip.cpp 13 May 2004 15:06:45 -0000 1.2 --- unzip.cpp 27 May 2006 14:47:32 -0000 1.3 *************** *** 155,159 **** { unsigned char c; ! int err = fread(&c, 1, 1, fin); if (err==1) { --- 155,159 ---- { unsigned char c; ! size_t err = fread(&c, 1, 1, fin); if (err==1) { Index: Cheats.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/Cheats.cpp,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** Cheats.cpp 30 Apr 2006 14:35:35 -0000 1.27 --- Cheats.cpp 27 May 2006 14:47:32 -0000 1.28 *************** *** 1468,1472 **** bool cheatsVerifyCheatCode(const char *code, const char *desc) { ! int len = strlen(code); if(len != 11 && len != 13 && len != 17) { systemMessage(MSG_INVALID_CHEAT_CODE, N_("Invalid cheat code '%s'"), code); --- 1468,1472 ---- bool cheatsVerifyCheatCode(const char *code, const char *desc) { ! size_t len = strlen(code); if(len != 11 && len != 13 && len != 17) { systemMessage(MSG_INVALID_CHEAT_CODE, N_("Invalid cheat code '%s'"), code); *************** *** 1479,1483 **** } ! int i; for(i = 0; i < 8; i++) { if(!CHEAT_IS_HEX(code[i])) { --- 1479,1483 ---- } ! size_t i; for(i = 0; i < 8; i++) { if(!CHEAT_IS_HEX(code[i])) { Index: Util.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/Util.cpp,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** Util.cpp 13 May 2006 16:32:15 -0000 1.26 --- Util.cpp 27 May 2006 14:47:32 -0000 1.27 *************** *** 946,954 **** size = fileSize; } ! int read = fileSize <= size ? fileSize : size; ! int r = fread(image, 1, read, f); fclose(f); ! if(r != (int)read) { systemMessage(MSG_ERROR_READING_IMAGE, N_("Error reading image %s"), file); --- 946,954 ---- size = fileSize; } ! size_t read = fileSize <= size ? fileSize : size; ! size_t r = fread(image, 1, read, f); fclose(f); ! if(r != read) { systemMessage(MSG_ERROR_READING_IMAGE, N_("Error reading image %s"), file); Index: Globals.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/Globals.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Globals.h 25 Jun 2005 06:26:33 -0000 1.8 --- Globals.h 27 May 2006 14:47:32 -0000 1.9 *************** *** 21,24 **** --- 21,26 ---- #define VBA_GLOBALS_H + #include "GBA.h" + #define VERBOSE_SWI 1 #define VERBOSE_UNALIGNED_MEMORY 2 Index: elf.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/elf.cpp,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** elf.cpp 13 Oct 2004 21:07:03 -0000 1.19 --- elf.cpp 27 May 2006 14:47:32 -0000 1.20 *************** *** 821,825 **** return NULL; } ! *bytesRead = strlen((char *)data) + 1; return (char *)data; } --- 821,825 ---- return NULL; } ! *bytesRead = (int)strlen((char *)data) + 1; return (char *)data; } *************** *** 1071,1075 **** while(data < end) { ! u32 offset = data - topOffset; u32 len = elfRead4Bytes(data); data += 4; --- 1071,1075 ---- while(data < end) { ! u32 offset = (u32)(data - topOffset); u32 len = elfRead4Bytes(data); data += 4; *************** *** 1111,1115 **** cie->data = data; ! cie->dataLen = dataEnd - data; } else { ELFfde *fde = (ELFfde *)calloc(1, sizeof(ELFfde)); --- 1111,1115 ---- cie->data = data; ! cie->dataLen = (u32)(dataEnd - data); } else { ELFfde *fde = (ELFfde *)calloc(1, sizeof(ELFfde)); *************** *** 1137,1141 **** fde->data = data; ! fde->dataLen = dataEnd - data; if((elfFdeCount %10) == 0) { --- 1137,1141 ---- fde->data = data; ! fde->dataLen = (u32)(dataEnd - data); if((elfFdeCount %10) == 0) { *************** *** 2763,2767 **** while(ddata < end) { unit = elfParseCompUnit(ddata, abbrevdata); ! unit->offset = ddata-debugdata; elfParseLineInfo(unit, data); if(last == NULL) --- 2763,2767 ---- while(ddata < end) { unit = elfParseCompUnit(ddata, abbrevdata); ! unit->offset = (u32)(ddata-debugdata); elfParseLineInfo(unit, data); if(last == NULL) |
From: Spacy <sp...@us...> - 2006-05-27 14:47:37
|
Update of /cvsroot/vba/VisualBoyAdvance/src/sdl In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv6380/src/sdl Modified Files: SDL.cpp TestEmu.cpp debugger.cpp Log Message: vs2005 compatibility, minor changes/fixes Index: TestEmu.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/sdl/TestEmu.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** TestEmu.cpp 20 Dec 2004 15:03:13 -0000 1.5 --- TestEmu.cpp 27 May 2006 14:47:33 -0000 1.6 *************** *** 24,36 **** #include <sys/stat.h> ! #include "AutoBuild.h" ! #include "GBA.h" #include "debugger.h" ! #include "Sound.h" ! #include "unzip.h" ! #include "Util.h" ! #include "gb/GB.h" ! #include "gb/gbGlobals.h" #ifndef WIN32 --- 24,37 ---- #include <sys/stat.h> ! #include "../AutoBuild.h" ! #include "../GBA.h" #include "debugger.h" ! #include "../Sound.h" ! #include "../unzip.h" ! #include "../Util.h" ! #include "../gb/GB.h" ! #include "../gb/gbGlobals.h" ! #include "../getopt.h" #ifndef WIN32 Index: debugger.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/sdl/debugger.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** debugger.cpp 13 May 2006 16:32:16 -0000 1.8 --- debugger.cpp 27 May 2006 14:47:33 -0000 1.9 *************** *** 1067,1071 **** address &= 0x3ffff; final &= 0x3ffff; ! for(u32 i = address; i < final; i++) if(freezeWorkRAM[i] == 1) freezeWorkRAM[i] = 0; --- 1067,1071 ---- address &= 0x3ffff; final &= 0x3ffff; ! for(int i = address; i < final; i++) if(freezeWorkRAM[i] == 1) freezeWorkRAM[i] = 0; *************** *** 1078,1082 **** address &= 0x7fff; final &= 0x7fff; ! for(u32 i = address; i < final; i++) if(freezeInternalRAM[i] == 1) freezeInternalRAM[i] = 0; --- 1078,1082 ---- address &= 0x7fff; final &= 0x7fff; ! for(int i = address; i < final; i++) if(freezeInternalRAM[i] == 1) freezeInternalRAM[i] = 0; *************** *** 1167,1171 **** address &= 0x3ffff; final &= 0x3ffff; ! for(u32 i = address; i < final; i++) if(freezeWorkRAM[i] == 2) freezeWorkRAM[i] = 0; --- 1167,1171 ---- address &= 0x3ffff; final &= 0x3ffff; ! for(int i = address; i < final; i++) if(freezeWorkRAM[i] == 2) freezeWorkRAM[i] = 0; *************** *** 1178,1182 **** address &= 0x7fff; final &= 0x7fff; ! for(u32 i = address; i < final; i++) if(freezeInternalRAM[i] == 2) freezeInternalRAM[i] = 0; --- 1178,1182 ---- address &= 0x7fff; final &= 0x7fff; ! for(int i = address; i < final; i++) if(freezeInternalRAM[i] == 2) freezeInternalRAM[i] = 0; *************** *** 1250,1254 **** char format[30]; for(i = 0; i < count; i++) { ! int l = strlen(elfGetAddressSymbol(pc+4*i)); if(l > len) len = l; --- 1250,1254 ---- char format[30]; for(i = 0; i < count; i++) { ! size_t l = strlen(elfGetAddressSymbol(pc+4*i)); if(l > len) len = l; *************** *** 1269,1273 **** char format[30]; for(i = 0; i < count; i++) { ! int l = strlen(elfGetAddressSymbol(pc+2*i)); if(l > len) len = l; --- 1269,1273 ---- char format[30]; for(i = 0; i < count; i++) { ! size_t l = strlen(elfGetAddressSymbol(pc+2*i)); if(l > len) len = l; Index: SDL.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/sdl/SDL.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** SDL.cpp 13 May 2006 16:32:16 -0000 1.11 --- SDL.cpp 27 May 2006 14:47:33 -0000 1.12 *************** *** 110,113 **** --- 110,114 ---- extern void CPUUpdateRenderBuffers(bool); + extern int gbHardware; struct EmulatedSystem emulator = { *************** *** 815,819 **** struct stat buf; ! int len = strlen(dir); char *p = dir + len - 1; --- 816,820 ---- struct stat buf; ! size_t len = strlen(dir); char *p = dir + len - 1; *************** *** 838,842 **** static char filebuffer[2048]; ! int len = strlen(name); char *p = name + len - 1; --- 839,843 ---- static char filebuffer[2048]; ! size_t len = strlen(name); char *p = name + len - 1; *************** *** 2217,2221 **** failed = !gbLoadRom(szFile); if(!failed) { ! cartridgeType = 1; emulator = GBSystem; if(sdlAutoIPS) { --- 2218,2238 ---- failed = !gbLoadRom(szFile); if(!failed) { ! gbGetHardwareType(); ! ! // used for the handling of the gb Boot Rom ! if (gbHardware & 5) ! { ! char tempName[0x800]; ! strcpy(tempName, arg0); ! char *p = strrchr(tempName, '\\'); ! if(p) { *p = 0x00; } ! strcat(tempName, "\\DMG_ROM.bin"); ! fprintf(stderr, "%s\n", tempName); ! gbCPUInit(tempName, useBios); ! } ! else useBios = false; ! ! gbReset(); ! cartridgeType = IMAGE_GB; emulator = GBSystem; if(sdlAutoIPS) { *************** *** 2267,2271 **** } } else { ! cartridgeType = 0; strcpy(filename, "gnu_stub"); rom = (u8 *)malloc(0x2000000); --- 2284,2288 ---- } } else { ! cartridgeType = IMAGE_GBA; strcpy(filename, "gnu_stub"); rom = (u8 *)malloc(0x2000000); |
From: Spacy <sp...@us...> - 2006-05-27 14:30:06
|
Update of /cvsroot/vba/VisualBoyAdvance/win32 In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv32104/win32 Modified Files: vba_vs2005.suo Log Message: n/a Index: vba_vs2005.suo =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/win32/vba_vs2005.suo,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 Binary files /tmp/cvsTrFpHY and /tmp/cvsHUh1jL differ |