From: Pokemonhacker <pok...@us...> - 2006-01-04 15:10:47
|
Update of /cvsroot/vba/VisualBoyAdvance/src/win32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31737 Modified Files: Commands.cpp GBDisassemble.cpp MainWnd.cpp MainWnd.h MainWndOptions.cpp resource.h VBA.cpp VBA.h vba.rc Log Message: - Added support for the 'Genericflashcard' setting (GB/GBC). Index: GBDisassemble.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/GBDisassemble.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** GBDisassemble.cpp 16 Jun 2004 13:51:45 -0000 1.4 --- GBDisassemble.cpp 4 Jan 2006 15:10:33 -0000 1.5 *************** *** 1,5 **** // 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 --- 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 *************** *** 40,43 **** --- 40,44 ---- extern gbRegister SP; extern gbRegister PC; + extern u8 register_LY; extern u16 IFF; extern int gbDis(char *, u16); *************** *** 244,247 **** --- 245,250 ---- sprintf(buffer, "%04x", IFF); GetDlgItem(IDC_R6)->SetWindowText(buffer); + sprintf(buffer, "%04x", register_LY); + GetDlgItem(IDC_LY)->SetWindowText(buffer); m_z = (AF.B.B0 & 0x80) != 0; Index: VBA.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/VBA.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** VBA.cpp 25 Jun 2005 06:23:31 -0000 1.12 --- VBA.cpp 4 Jan 2006 15:10:33 -0000 1.13 *************** *** 198,201 **** --- 198,202 ---- winFlashSize = 0x10000; winRtcEnable = false; + winGenericflashcardEnable = false; winSaveType = 0; rewindMemory = NULL; Index: Commands.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/Commands.cpp,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** Commands.cpp 5 Nov 2004 00:49:25 -0000 1.23 --- Commands.cpp 4 Jan 2006 15:10:33 -0000 1.24 *************** *** 1,5 **** // 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 --- 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 *************** *** 149,152 **** --- 149,153 ---- { "OptionsEmulatorAGBPrint", ID_OPTIONS_EMULATOR_AGBPRINT }, { "OptionsEmulatorRTC", ID_OPTIONS_EMULATOR_REALTIMECLOCK }, + { "OptionsEmulatorGenericflashcard", ID_OPTIONS_EMULATOR_GENERICFLASHCARD }, { "OptionsEmulatorRewindInterval", ID_OPTIONS_EMULATOR_REWINDINTERVAL }, { "OptionsSoundOff", ID_OPTIONS_SOUND_OFF }, Index: VBA.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/VBA.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** VBA.h 13 May 2004 15:06:55 -0000 1.6 --- VBA.h 4 Jan 2006 15:10:33 -0000 1.7 *************** *** 2,6 **** // 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 --- 2,6 ---- // 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 *************** *** 111,114 **** --- 111,115 ---- int winFlashSize; bool winRtcEnable; + bool winGenericflashcardEnable; int winSaveType; char *rewindMemory; Index: MainWnd.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/MainWnd.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** MainWnd.cpp 25 Jun 2005 06:23:59 -0000 1.16 --- MainWnd.cpp 4 Jan 2006 15:10:33 -0000 1.17 *************** *** 201,204 **** --- 201,206 ---- ON_COMMAND(ID_OPTIONS_EMULATOR_REALTIMECLOCK, OnOptionsEmulatorRealtimeclock) ON_UPDATE_COMMAND_UI(ID_OPTIONS_EMULATOR_REALTIMECLOCK, OnUpdateOptionsEmulatorRealtimeclock) + ON_COMMAND(ID_OPTIONS_EMULATOR_GENERICFLASHCARD, OnOptionsEmulatorGenericflashcard) + ON_UPDATE_COMMAND_UI(ID_OPTIONS_EMULATOR_GENERICFLASHCARD, OnUpdateOptionsEmulatorGenericflashcard) ON_COMMAND(ID_OPTIONS_EMULATOR_AUTOHIDEMENU, OnOptionsEmulatorAutohidemenu) ON_UPDATE_COMMAND_UI(ID_OPTIONS_EMULATOR_AUTOHIDEMENU, OnUpdateOptionsEmulatorAutohidemenu) *************** *** 476,479 **** --- 478,482 ---- theApp.cartridgeType = (int)type; if(type == IMAGE_GB) { + genericflashcardEnable = theApp.winGenericflashcardEnable; if(!gbLoadRom(theApp.szFile)) return false; Index: MainWnd.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/MainWnd.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** MainWnd.h 18 Dec 2004 23:11:08 -0000 1.8 --- MainWnd.h 4 Jan 2006 15:10:33 -0000 1.9 *************** *** 2,6 **** // 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 --- 2,6 ---- // 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 *************** *** 230,233 **** --- 230,235 ---- afx_msg void OnOptionsEmulatorRealtimeclock(); afx_msg void OnUpdateOptionsEmulatorRealtimeclock(CCmdUI* pCmdUI); + afx_msg void OnOptionsEmulatorGenericflashcard(); + afx_msg void OnUpdateOptionsEmulatorGenericflashcard(CCmdUI* pCmdUI); afx_msg void OnOptionsEmulatorAutohidemenu(); afx_msg void OnUpdateOptionsEmulatorAutohidemenu(CCmdUI* pCmdUI); Index: vba.rc =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/vba.rc,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -d -r1.50 -r1.51 *** vba.rc 25 Jun 2005 06:23:31 -0000 1.50 --- vba.rc 4 Jan 2006 15:10:33 -0000 1.51 *************** *** 926,929 **** --- 926,930 ---- LTEXT "HL:",IDC_STATIC,250,55,18,8 LTEXT "IFF:",IDC_STATIC,250,85,18,8 + LTEXT "LY:",IDC_STATIC,272,95,18,8 LTEXT "",IDC_R0,285,25,52,8,SS_NOPREFIX LTEXT "",IDC_R1,285,35,52,8,SS_NOPREFIX *************** *** 931,934 **** --- 932,936 ---- LTEXT "",IDC_R3,285,55,52,8,SS_NOPREFIX LTEXT "",IDC_R6,285,85,52,8,SS_NOPREFIX + LTEXT "",IDC_LY,285,95,52,8,SS_NOPREFIX CONTROL "N",IDC_N,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,250,109,21,10 *************** *** 1815,1818 **** --- 1817,1822 ---- MENUITEM "Rewind interval...", ID_OPTIONS_EMULATOR_REWINDINTERVAL + MENUITEM "Generic Flashcard (GB/GBC)", ID_OPTIONS_EMULATOR_GENERICFLASHCARD + MENUITEM "&Game Overrides...", ID_OPTIONS_EMULATOR_GAMEOVERRIDES Index: resource.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/resource.h,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** resource.h 25 Jun 2005 06:23:31 -0000 1.39 --- resource.h 4 Jan 2006 15:10:33 -0000 1.40 *************** *** 506,509 **** --- 506,510 ---- #define IDC_BIT_15 1265 #define IDC_MIRRORING 1266 + #define IDC_LY 1267 #define ID_HELP_ABOUT 40001 #define ID_FILE_EXIT 40002 *************** *** 748,751 **** --- 749,753 ---- #define ID_OPTIONS_EMULATOR_GAMEOVERRIDES 40276 #define ID_HELP_GNUPUBLICLICENSE 40277 + #define ID_OPTIONS_EMULATOR_GENERICFLASHCARD 40279 // Next default values for new objects Index: MainWndOptions.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/MainWndOptions.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** MainWndOptions.cpp 5 Nov 2004 00:50:18 -0000 1.5 --- MainWndOptions.cpp 4 Jan 2006 15:10:33 -0000 1.6 *************** *** 1,5 **** // 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 --- 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 *************** *** 685,688 **** --- 685,704 ---- } + void MainWnd::OnOptionsEmulatorGenericflashcard() + { + if(emulating && theApp.cartridgeType == 1) + theApp.winGenericflashcardEnable = !theApp.winGenericflashcardEnable; + } + + void MainWnd::OnUpdateOptionsEmulatorGenericflashcard(CCmdUI* pCmdUI) + { + if(emulating && theApp.cartridgeType == 1) + pCmdUI->SetCheck(theApp.winGenericflashcardEnable); + else + pCmdUI->SetCheck(false); + + pCmdUI->Enable(emulating && theApp.cartridgeType == 1); + } + void MainWnd::OnUpdateOptionsEmulatorAutohidemenu(CCmdUI* pCmdUI) { |