From: Pokemonhacker <pok...@us...> - 2005-06-25 06:18:01
|
Update of /cvsroot/vba/VisualBoyAdvance/src/sdl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9226 Modified Files: debugger.cpp SDL.cpp Log Message: - Fixed some crash bugs and typos in SDL commands. - Fixed a bug in which the debugger wouldn't disable the breakpoints properly (which caused the original instruction to be lost). - Added support for the new 'mirroringEnabled' option in vba-over.ini Index: SDL.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/sdl/SDL.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** SDL.cpp 15 Sep 2004 22:12:54 -0000 1.6 --- SDL.cpp 25 Jun 2005 06:17:52 -0000 1.7 *************** *** 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 *************** *** 232,235 **** --- 232,236 ---- int sdlRtcEnable = 0; int sdlAgbPrint = 0; + int sdlMirroringEnable = 0; int sdlDefaultJoypad = 0; *************** *** 1307,1310 **** --- 1308,1313 ---- if(save >= 0 && save <= 5) cpuSaveType = save; + } else if(!strcmp(token, "mirroringEnabled")) { + mirroringEnable = (atoi(value) == 0 ? false : true); } } *************** *** 2227,2230 **** --- 2230,2235 ---- sdlApplyPerImagePreferences(); + + doMirroring(mirroringEnable); cartridgeType = 0; Index: debugger.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/sdl/debugger.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** debugger.cpp 10 Jun 2005 20:14:04 -0000 1.6 --- debugger.cpp 25 Jun 2005 06:17:52 -0000 1.7 *************** *** 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 *************** *** 143,148 **** { "eb", debuggerEditByte, "Modify memory location (byte)", "<address> <hex value>" }, { "eh", debuggerEditHalfWord,"Modify memory location (half-word)","<address> <hex value>" }, ! { "er", debuggerEditRegister, "Modify register", "<register number> <hex value" }, ! { "ew", debuggerEdit, "Modify memory location (word)", "<address> <hex value" }, { "fd", debuggerFileDisassemble, "Disassemble instructions to file", "<file> [<address> [<number>]]" }, { "fda", debuggerFileDisassembleArm, "Disassemble ARM instructions to file", "<file> [<address> [<number>]]" }, --- 143,148 ---- { "eb", debuggerEditByte, "Modify memory location (byte)", "<address> <hex value>" }, { "eh", debuggerEditHalfWord,"Modify memory location (half-word)","<address> <hex value>" }, ! { "er", debuggerEditRegister, "Modify register", "<register number> <hex value>" }, ! { "ew", debuggerEdit, "Modify memory location (word)", "<address> <hex value>" }, { "fd", debuggerFileDisassemble, "Disassemble instructions to file", "<file> [<address> [<number>]]" }, { "fda", debuggerFileDisassembleArm, "Disassemble ARM instructions to file", "<file> [<address> [<number>]]" }, *************** *** 880,885 **** int n = 0; sscanf(args[1], "%d", &n); - printf("Deleting breakpoint %d (%d)\n", n, debuggerNumOfBreakpoints); if(n >= 0 && n < debuggerNumOfBreakpoints) { n++; if(n < debuggerNumOfBreakpoints) { --- 880,885 ---- int n = 0; sscanf(args[1], "%d", &n); if(n >= 0 && n < debuggerNumOfBreakpoints) { + printf("Deleting breakpoint %d (%d)\n", n, debuggerNumOfBreakpoints); n++; if(n < debuggerNumOfBreakpoints) { *************** *** 895,898 **** --- 895,900 ---- debuggerNumOfBreakpoints--; } + else + printf("No breakpoints are set\n"); } else debuggerUsage("bd"); *************** *** 1535,1540 **** { if(n == 3) { ! u32 address; ! u32 byte; sscanf(args[1], "%x", &address); sscanf(args[2], "%x", &byte); --- 1537,1542 ---- { if(n == 3) { ! u32 address = 0x10000; ! u32 byte = 0; sscanf(args[1], "%x", &address); sscanf(args[2], "%x", &byte); *************** *** 1547,1552 **** { if(n == 3) { ! u32 address; ! u32 byte; sscanf(args[1], "%x", &address); if(address & 1) { --- 1549,1554 ---- { if(n == 3) { ! u32 address = 0x10000; ! u32 HalfWord = 0; sscanf(args[1], "%x", &address); if(address & 1) { *************** *** 1554,1559 **** return; } ! sscanf(args[2], "%x", &byte); ! debuggerWriteHalfWord(address, (u16)byte); } else debuggerUsage("eh"); --- 1556,1561 ---- return; } ! sscanf(args[2], "%x", &HalfWord); ! debuggerWriteHalfWord(address, (u16)HalfWord); } else debuggerUsage("eh"); *************** *** 1563,1567 **** { if(n == 3) { ! int r; u32 val; sscanf(args[1], "%d", &r); --- 1565,1569 ---- { if(n == 3) { ! int r = 15; u32 val; sscanf(args[1], "%d", &r); *************** *** 1721,1725 **** static void debuggerWriteState(int n, char **args) { ! int num; if(n == 2) { --- 1723,1727 ---- static void debuggerWriteState(int n, char **args) { ! int num = 12; if(n == 2) { *************** *** 1728,1732 **** sdlWriteState(num-1); else ! debuggerUsage("save"); } else --- 1730,1734 ---- sdlWriteState(num-1); else ! printf("Savestate number must be in the 1-10 range"); } else *************** *** 1736,1740 **** static void debuggerReadState(int n, char **args) { ! int num; if(n == 2) { --- 1738,1742 ---- static void debuggerReadState(int n, char **args) { ! int num = 12; if(n == 2) { *************** *** 1743,1747 **** sdlReadState(num-1); else ! debuggerUsage("load"); } else --- 1745,1749 ---- sdlReadState(num-1); else ! printf("Savestate number must be in the 1-10 range"); } else *************** *** 1751,1755 **** static void debuggerDumpLoad(int n, char** args) { ! u32 address; char *file; FILE *f; --- 1753,1757 ---- static void debuggerDumpLoad(int n, char** args) { ! u32 address = 0; char *file; FILE *f; *************** *** 1786,1791 **** static void debuggerDumpSave(int n, char** args) { ! u32 address; ! u32 size; char *file; FILE *f; --- 1788,1793 ---- static void debuggerDumpSave(int n, char** args) { ! u32 address = 0; ! u32 size = 0; char *file; FILE *f; *************** *** 2192,2195 **** --- 2194,2198 ---- while(debugger) { systemSoundPause(); + debuggerDisableBreakpoints(); printf("debugger> "); commandCount = 0; |