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
|
From: Pokemonhacker <pok...@us...> - 2006-01-05 14:55:39
|
Update of /cvsroot/vba/VisualBoyAdvance/src/win32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6086 Modified Files: Logging.cpp Log Message: - Logging.cpp : corrected a small bug in onInitDialog (m_agbprint was wrongly checked against m_undefined's systemVerbose flag). Index: Logging.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/Logging.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Logging.cpp 13 May 2004 15:06:50 -0000 1.5 --- Logging.cpp 5 Jan 2006 14:55:31 -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 *************** *** 226,230 **** m_dma3 = (systemVerbose & 128) != 0; m_undefined = (systemVerbose & 256) != 0; ! m_agbprint = (systemVerbose & 256) != 0; UpdateData(FALSE); --- 226,230 ---- m_dma3 = (systemVerbose & 128) != 0; m_undefined = (systemVerbose & 256) != 0; ! m_agbprint = (systemVerbose & 512) != 0; UpdateData(FALSE); |
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) { |
From: Pokemonhacker <pok...@us...> - 2006-01-04 15:02:10
|
Update of /cvsroot/vba/VisualBoyAdvance/src/sdl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29603 Modified Files: SDL.cpp Log Message: - SDL.cpp : fix for pix's calloc. Index: SDL.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/sdl/SDL.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** SDL.cpp 3 Sep 2005 12:28:53 -0000 1.8 --- SDL.cpp 4 Jan 2006 15:01:54 -0000 1.9 *************** *** 2274,2278 **** vram = (u8 *)calloc(1, 0x20000); oam = (u8 *)calloc(1, 0x400); ! pix = (u8 *)calloc(1, 4 * 240 * 160); ioMem = (u8 *)calloc(1, 0x400); --- 2274,2278 ---- vram = (u8 *)calloc(1, 0x20000); oam = (u8 *)calloc(1, 0x400); ! pix = (u8 *)calloc(1, 4 * 241 * 162); ioMem = (u8 *)calloc(1, 0x400); |
From: Pokemonhacker <pok...@us...> - 2006-01-04 13:43:16
|
Update of /cvsroot/vba/VisualBoyAdvance/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9247 Modified Files: bios.cpp GBA.cpp GBAinline.h RTC.cpp Log Message: - bios.cpp : corrected a bug in registerRamReset. - gba.cpp/gbainline.h : corrected the mirroring of Vram. - gba.cpp : changed slightly the emulation of gbasavetype. - RTC.cpp : vba now ignores rtc command 0x64. Index: bios.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/bios.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** bios.cpp 3 Sep 2005 12:28:23 -0000 1.18 --- bios.cpp 4 Jan 2006 13:42:58 -0000 1.19 *************** *** 869,872 **** --- 869,874 ---- // no need to trace here. this is only called directly from GBA.cpp // to emulate bios initialization + + CPUUpdateRegister(0x0, 0x80); if(flags) { *************** *** 894,909 **** if(flags & 0x80) { int i; ! for(i = 0; i < 8; i++) CPUUpdateRegister(0x200+i*2, 0); ! CPUUpdateRegister(0x202, 0xFFFF); ! ! for(i = 0; i < 8; i++) CPUUpdateRegister(0x4+i*2, 0); ! for(i = 0; i < 16; i++) CPUUpdateRegister(0x20+i*2, 0); ! for(i = 0; i < 24; i++) CPUUpdateRegister(0xb0+i*2, 0); --- 896,909 ---- if(flags & 0x80) { int i; ! for(i = 0; i < 0x10; i++) CPUUpdateRegister(0x200+i*2, 0); ! for(i = 0; i < 0xF; i++) CPUUpdateRegister(0x4+i*2, 0); ! for(i = 0; i < 0x20; i++) CPUUpdateRegister(0x20+i*2, 0); ! for(i = 0; i < 0x18; i++) CPUUpdateRegister(0xb0+i*2, 0); Index: GBA.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/GBA.cpp,v retrieving revision 1.63 retrieving revision 1.64 diff -C2 -d -r1.63 -r1.64 *** GBA.cpp 3 Sep 2005 12:28:23 -0000 1.63 --- GBA.cpp 4 Jan 2006 13:42:58 -0000 1.64 *************** *** 1036,1039 **** --- 1036,1042 ---- gbaSaveType = 2; break; + case 5: + gbaSaveType = 5; + break; default: systemMessage(MSG_UNSUPPORTED_SAVE_TYPE, *************** *** 1121,1125 **** } ! if(gbaSaveType) { FILE *file = fopen(fileName, "wb"); --- 1124,1128 ---- } ! if((gbaSaveType) && (gbaSaveType!=5)) { FILE *file = fopen(fileName, "wb"); *************** *** 3172,3177 **** break; case 6: ! if ((address & 0xFFFFFF) < 0x18000) ! WRITE16LE(((u16 *)&vram[address & 0x1fffe]), value); break; case 7: --- 3175,3184 ---- break; case 6: ! address = (address & 0x1fffe); ! if (((DISPCNT & 7) >2) && ((address & 0x1C000) == 0x18000)) ! return; ! if ((address & 0x18000) == 0x18000) ! address &= 0x17fff; ! WRITE16LE(((u16 *)&vram[address]), value); break; case 7: *************** *** 3300,3307 **** break; case 6: // no need to switch // byte writes to OBJ VRAM are ignored ! if ((address & 0xFFFFFF) < objTilesAddress[((DISPCNT&7)+1)>>2]) ! *((u16 *)&vram[address & 0x1FFFE]) = (b << 8) | b; break; case 7: --- 3307,3320 ---- break; case 6: + address = (address & 0x1fffe); + if (((DISPCNT & 7) >2) && ((address & 0x1C000) == 0x18000)) + return; + if ((address & 0x18000) == 0x18000) + address &= 0x17fff; + // no need to switch // byte writes to OBJ VRAM are ignored ! if ((address) < objTilesAddress[((DISPCNT&7)+1)>>2]) ! *((u16 *)&vram[address]) = (b << 8) | b; break; case 7: *************** *** 3317,3321 **** goto unwritable; case 14: ! if(!eepromInUse | cpuSramEnabled | cpuFlashEnabled) { (*cpuSaveGameFunc)(address, b); break; --- 3330,3337 ---- goto unwritable; case 14: ! if (!(saveType == 5) && (!eepromInUse | cpuSramEnabled | cpuFlashEnabled)) { ! ! //if(!cpuEEPROMEnabled && (cpuSramEnabled | cpuFlashEnabled)) { ! (*cpuSaveGameFunc)(address, b); break; *************** *** 3721,3724 **** --- 3737,3742 ---- } + saveType = gbaSaveType = cpuSaveType; + ARM_PREFETCH; Index: GBAinline.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/GBAinline.h,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** GBAinline.h 30 Sep 2005 16:06:32 -0000 1.14 --- GBAinline.h 4 Jan 2006 13:42:59 -0000 1.15 *************** *** 102,106 **** break; case 6: ! value = READ32LE(((u32 *)&vram[address & 0x1fffc])); break; case 7: --- 102,114 ---- break; case 6: ! address = (address & 0x1fffc); ! if (((DISPCNT & 7) >2) && ((address & 0x1C000) == 0x18000)) ! { ! value = 0; ! break; ! } ! if ((address & 0x18000) == 0x18000) ! address &= 0x17fff; ! value = READ32LE(((u32 *)&vram[address])); break; case 7: *************** *** 230,234 **** break; case 6: ! value = READ16LE(((u16 *)&vram[address & 0x1fffe])); break; case 7: --- 238,250 ---- break; case 6: ! address = (address & 0x1fffe); ! if (((DISPCNT & 7) >2) && ((address & 0x1C000) == 0x18000)) ! { ! value = 0; ! break; ! } ! if ((address & 0x18000) == 0x18000) ! address &= 0x17fff; ! value = READ16LE(((u16 *)&vram[address])); break; case 7: *************** *** 317,321 **** return paletteRAM[address & 0x3ff]; case 6: ! return vram[address & 0x1ffff]; case 7: return oam[address & 0x3ff]; --- 333,342 ---- return paletteRAM[address & 0x3ff]; case 6: ! address = (address & 0x1ffff); ! if (((DISPCNT & 7) >2) && ((address & 0x1C000) == 0x18000)) ! return 0; ! if ((address & 0x18000) == 0x18000) ! address &= 0x17fff; ! return vram[address]; case 7: return oam[address & 0x3ff]; *************** *** 372,376 **** if(address & 3) { if(systemVerbose & VERBOSE_UNALIGNED_MEMORY) { ! log("Unaliagned word write: %08x to %08x from %08x\n", value, address, --- 393,397 ---- if(address & 3) { if(systemVerbose & VERBOSE_UNALIGNED_MEMORY) { ! log("Unaligned word write: %08x to %08x from %08x\n", value, address, *************** *** 409,416 **** break; case 0x06: ! if(address & 0x10000) ! WRITE32LE(((u32 *)&vram[address & 0x17ffc]), value); ! else ! WRITE32LE(((u32 *)&vram[address & 0x1fffc]), value); break; case 0x07: --- 430,439 ---- break; case 0x06: ! address = (address & 0x1fffc); ! if (((DISPCNT & 7) >2) && ((address & 0x1C000) == 0x18000)) ! return; ! if ((address & 0x18000) == 0x18000) ! address &= 0x17fff; ! WRITE32LE(((u32 *)&vram[address]), value); break; case 0x07: Index: RTC.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/RTC.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** RTC.cpp 13 Oct 2004 21:07:03 -0000 1.8 --- RTC.cpp 4 Jan 2006 13:42:59 -0000 1.9 *************** *** 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 *************** *** 120,123 **** --- 120,125 ---- rtcClockData.state = DATA; break; + case 0x64: + break; case 0x65: { |
From: Pokemonhacker <pok...@us...> - 2006-01-04 13:39:01
|
Update of /cvsroot/vba/VisualBoyAdvance/src/gb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7893 Modified Files: GB.cpp GB.h gbCheats.cpp gbCodes.h gbCodesCB.h gbGfx.cpp gbGlobals.cpp gbGlobals.h gbMemory.cpp gbSGB.cpp gbSound.cpp Log Message: - GB/GBC 'experimental' changes (too many to be listed right now...). Still not 100% perfect, but almost every known bug have been corrected. Index: gbCodes.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/gb/gbCodes.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** gbCodes.h 13 May 2004 15:06:46 -0000 1.6 --- gbCodes.h 4 Jan 2006 13:38:47 -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 *************** *** 103,107 **** --- 103,109 ---- if(gbCgbMode) { if(gbMemory[0xff4d] & 1) { + gbSpeedSwitch(); + //clockTicks += 228*144-(gbSpeed ? 62 : 63); if(gbSpeed == 0) *************** *** 576,590 **** case 0x76: // HALT - if(IFF & 1) { - PC.W--; IFF |= 0x80; ! } else { ! if((register_IE & register_IF) > 0) ! IFF |= 0x100; ! else { ! PC.W--; ! IFF |= 0x81; ! } ! } break; case 0x77: --- 578,585 ---- case 0x76: // HALT IFF |= 0x80; ! // Takes longer to get out of Halt depending on the gbHardware ??? ! if (gbHardware & 5) ! clockTicks++; break; case 0x77: *************** *** 1337,1341 **** // DI // IFF&=0xFE; ! IFF&=(~0x21); break; // F4 illegal --- 1332,1336 ---- // DI // IFF&=0xFE; ! IFF&=(~0x31); break; // F4 illegal *************** *** 1384,1389 **** case 0xfb: // EI ! IFF|=0x20; break; // FC illegal // FD illegal --- 1379,1388 ---- case 0xfb: // EI ! if (!(IFF & 0x30)) ! IFF|=0x20; break; + case 0xfc: + case 0xfd: + breakpoint = true; // FC illegal // FD illegal *************** *** 1402,1407 **** break; default: ! systemMessage(0, N_("Unknown opcode %02x at %04x"), ! gbReadOpcode(PC.W-1),PC.W-1); ! emulating = false; return; --- 1401,1409 ---- break; default: ! if (gbSystemMessage == false) ! { ! systemMessage(0, N_("Unknown opcode %02x at %04x"), ! gbReadOpcode(PC.W-1),PC.W-1); ! gbSystemMessage =true; ! } return; Index: gbGlobals.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/gb/gbGlobals.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** gbGlobals.cpp 13 May 2004 15:06:46 -0000 1.5 --- gbGlobals.cpp 4 Jan 2006 13:38:47 -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 *************** *** 39,42 **** --- 39,43 ---- int gbWindowLine = -1; + bool genericflashcardEnable = false; int gbCgbMode = 0; Index: gbMemory.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/gb/gbMemory.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** gbMemory.cpp 13 May 2004 15:06:46 -0000 1.3 --- gbMemory.cpp 4 Jan 2006 13:38:47 -0000 1.4 *************** *** 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 *************** *** 42,47 **** case 0x2000: // ROM bank select // value = value & 0x1f; ! if(value == 0) ! value = 1; if(value == gbDataMBC1.mapperROMBank) break; --- 42,47 ---- case 0x2000: // ROM bank select // value = value & 0x1f; ! if((value & 0x1f) == 0) ! value += 1; if(value == gbDataMBC1.mapperROMBank) break; *************** *** 52,56 **** if(gbDataMBC1.mapperMemoryModel == 0) { // model is 16/8, so we have a high address in use ! tmpAddress |= (gbDataMBC1.mapperROMHighAddress) << 19; } --- 52,56 ---- if(gbDataMBC1.mapperMemoryModel == 0) { // model is 16/8, so we have a high address in use ! tmpAddress |= (gbDataMBC1.mapperROMHighAddress & 3) << 19; } *************** *** 74,77 **** --- 74,78 ---- gbDataMBC1.mapperRAMBank = value; gbDataMBC1.mapperRAMAddress = tmpAddress; + gbDataMBC1.mapperROMHighAddress = 0; } else { // 16/8, set the high address *************** *** 84,91 **** --- 85,131 ---- gbMemoryMap[0x06] = &gbRom[tmpAddress + 0x2000]; gbMemoryMap[0x07] = &gbRom[tmpAddress + 0x3000]; + + gbMemoryMap[0x0a] = &gbRam[0]; + gbMemoryMap[0x0b] = &gbRam[0x1000]; + gbDataMBC1.mapperRAMBank = 0; } break; case 0x6000: // memory model select gbDataMBC1.mapperMemoryModel = value & 1; + + if(gbDataMBC1.mapperMemoryModel == 1) { + // 4/32 model, RAM bank switching provided + value = gbDataMBC1.mapperRAMBank & 0x03; + tmpAddress = value << 13; + tmpAddress &= gbRamSizeMask; + gbMemoryMap[0x0a] = &gbRam[tmpAddress]; + gbMemoryMap[0x0b] = &gbRam[tmpAddress + 0x1000]; + gbDataMBC1.mapperRAMBank = value; + gbDataMBC1.mapperRAMAddress = tmpAddress; + + tmpAddress = gbDataMBC1.mapperROMBank << 14; + + + tmpAddress &= gbRomSizeMask; + gbMemoryMap[0x04] = &gbRom[tmpAddress]; + gbMemoryMap[0x05] = &gbRom[tmpAddress + 0x1000]; + gbMemoryMap[0x06] = &gbRom[tmpAddress + 0x2000]; + gbMemoryMap[0x07] = &gbRom[tmpAddress + 0x3000]; + + } else { + // 16/8, set the high address + + tmpAddress = gbDataMBC1.mapperROMBank << 14; + tmpAddress |= (gbDataMBC1.mapperROMHighAddress) << 19; + tmpAddress &= gbRomSizeMask; + gbMemoryMap[0x04] = &gbRom[tmpAddress]; + gbMemoryMap[0x05] = &gbRom[tmpAddress + 0x1000]; + gbMemoryMap[0x06] = &gbRom[tmpAddress + 0x2000]; + gbMemoryMap[0x07] = &gbRom[tmpAddress + 0x3000]; + + gbMemoryMap[0x0a] = &gbRam[0]; + gbMemoryMap[0x0b] = &gbRam[0x1000]; + + } break; } *************** *** 108,115 **** // check current model ! if(gbDataMBC1.mapperMemoryModel == 1) { // model is 16/8, so we have a high address in use tmpAddress |= (gbDataMBC1.mapperROMHighAddress) << 19; } tmpAddress &= gbRomSizeMask; --- 148,157 ---- // check current model ! if(gbDataMBC1.mapperMemoryModel == 0) { // model is 16/8, so we have a high address in use tmpAddress |= (gbDataMBC1.mapperROMHighAddress) << 19; } + gbMemoryMap[0x0a] = &gbRam[0]; + gbMemoryMap[0x0b] = &gbRam[0x1000]; tmpAddress &= gbRomSizeMask; *************** *** 119,123 **** gbMemoryMap[0x07] = &gbRom[tmpAddress + 0x3000]; ! if(gbRamSize) { gbMemoryMap[0x0a] = &gbRam[gbDataMBC1.mapperRAMAddress]; gbMemoryMap[0x0b] = &gbRam[gbDataMBC1.mapperRAMAddress + 0x1000]; --- 161,165 ---- gbMemoryMap[0x07] = &gbRom[tmpAddress + 0x3000]; ! if((gbRamSize) && (gbDataMBC1.mapperMemoryModel == 1)){ gbMemoryMap[0x0a] = &gbRam[gbDataMBC1.mapperRAMAddress]; gbMemoryMap[0x0b] = &gbRam[gbDataMBC1.mapperRAMAddress + 0x1000]; Index: gbGlobals.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/gb/gbGlobals.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** gbGlobals.h 13 May 2004 15:06:46 -0000 1.4 --- gbGlobals.h 4 Jan 2006 13:38:47 -0000 1.5 *************** *** 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 *************** *** 47,50 **** --- 47,60 ---- extern u8 gbObp1[4]; extern u16 gbPalette[128]; + extern bool gbScreenOn; + extern u8 gbSCYLine[190]; + // gbSCXLine is used for the emulation (bug) of the SX change + // found in the Artic Zone game. + extern u8 gbSCXLine[190]; + // gbBgpLine is used for the emulation of the + // Prehistorik Man's title screen scroller. + extern u8 gbBgpLine[190]; + extern u8 gbObp0Line [190]; + extern u8 gbObp1Line [190]; extern u8 register_LCDC; *************** *** 55,60 **** --- 65,72 ---- extern u8 register_WX; extern u8 register_VBK; + extern u8 oldRegister_WY; extern int emulating; + extern bool genericflashcardEnable; extern int gbBorderLineSkip; *************** *** 64,68 **** extern void gbRenderLine(); ! extern void gbDrawSprites(); extern u8 (*gbSerialFunction)(u8); --- 76,80 ---- extern void gbRenderLine(); ! extern int gbDrawSprites(bool); extern u8 (*gbSerialFunction)(u8); Index: gbCodesCB.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/gb/gbCodesCB.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** gbCodesCB.h 13 May 2004 15:06:46 -0000 1.3 --- gbCodesCB.h 4 Jan 2006 13:38:47 -0000 1.4 *************** *** 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 *************** *** 1283,1288 **** break; default: ! systemMessage(0, N_("Unknown opcode %02x at %04x"), ! gbReadOpcode(PC.W-1),PC.W-1); ! emulating = false; return; --- 1283,1291 ---- break; default: ! if (gbSystemMessage == false) ! { ! systemMessage(0, N_("Unknown opcode %02x at %04x"), ! gbReadOpcode(PC.W-1),PC.W-1); ! gbSystemMessage =true; ! } return; Index: GB.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/gb/GB.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** GB.h 13 May 2004 15:06:46 -0000 1.5 --- GB.h 4 Jan 2006 13:38:47 -0000 1.6 *************** *** 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 *************** *** 39,42 **** --- 39,43 ---- extern bool gbLoadRom(const char *); extern void gbEmulate(int); + extern void gbDrawLine(); extern bool gbIsGameboyRom(const char *); extern void gbSoundReset(); Index: gbSound.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/gb/gbSound.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** gbSound.cpp 13 May 2004 15:06:46 -0000 1.7 --- gbSound.cpp 4 Jan 2006 13:38:47 -0000 1.8 *************** *** 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 *************** *** 223,226 **** --- 223,227 ---- break; case NR30: + gbMemory[NR30] = data; if(!(data & 0x80)) { gbMemory[NR52] &= 0xfb; *************** *** 242,245 **** --- 243,247 ---- break; case NR34: + gbMemory[NR34] = data; freq = 2048 - (((data &7) << 8) | (int)gbMemory[NR33]); if(freq) { Index: gbGfx.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/gb/gbGfx.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** gbGfx.cpp 13 May 2004 15:06:46 -0000 1.6 --- gbGfx.cpp 4 Jan 2006 13:38:47 -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 *************** *** 59,62 **** --- 59,63 ---- u16 gbLineMix[160]; + int inUseRegister_WY = 0; void gbRenderLine() *************** *** 89,94 **** // int yLine = (y + gbBorderRowSkip) * gbBorderLineSkip; ! int sx = register_SCX; ! int sy = register_SCY; sy+=y; --- 90,95 ---- // int yLine = (y + gbBorderRowSkip) * gbBorderLineSkip; ! int sx = gbSCXLine[0]; ! int sy = gbSCYLine[0]; sy+=y; *************** *** 114,121 **** tile_map_address++; ! if((register_LCDC & 16) == 0) { ! if(tile < 128) tile += 128; ! else tile -= 128; ! } int tile_pattern_address = tile_pattern + tile * 16 + by*2; --- 115,120 ---- tile_map_address++; ! if(!(register_LCDC & 0x10)) ! tile ^= 0x80; int tile_pattern_address = tile_pattern + tile * 16 + by*2; *************** *** 124,127 **** --- 123,146 ---- if((register_LCDC & 0x01 || gbCgbMode) && (layerSettings & 0x0100)) { while(x < 160) { + + tx = (tx-(sx >> 3) + (gbSCXLine[x]>>3)) & 0x1f; + + sx = gbSCXLine[x]; + + + sy = gbSCYLine[x+(gbSpeed ? 15 : 7)]; + + sy+=y; + + sy &= 255; + + ty = sy >> 3; + + by = sy & 7; + + tile_map_line_y = tile_map + ty * 32; + + tile_map_address = tile_map_line_y + tx; + u8 tile_a = 0; u8 tile_b = 0; *************** *** 156,160 **** c = c + (attrs & 7)*4; } else { ! c = gbBgp[c]; if(gbSgbMode && !gbCgbMode) { int dx = x >> 3; --- 175,179 ---- c = c + (attrs & 7)*4; } else { ! c = (gbBgpLine[x+3]>>(c<<1)) &3; if(gbSgbMode && !gbCgbMode) { int dx = x >> 3; *************** *** 169,174 **** } } ! gbLineMix[x] = gbColorOption ? gbColorFilter[gbPalette[c]] : ! gbPalette[c]; x++; if(x >= 160) --- 188,193 ---- } } ! gbLineMix[x] = gbColorOption ? gbColorFilter[gbPalette[c] & 0x7FFF] : ! gbPalette[c] & 0x7FFF; x++; if(x >= 160) *************** *** 186,198 **** tile = bank0[tile_map_line_y + tx]; ! if((register_LCDC & 16) == 0) { ! if(tile < 128) tile += 128; ! else tile -= 128; ! } tile_pattern_address = tile_pattern + tile * 16 + by * 2; } } else { for(int i = 0; i < 160; i++) { ! gbLineMix[i] = gbPalette[0]; gbLineBuffer[i] = 0; } --- 205,218 ---- tile = bank0[tile_map_line_y + tx]; ! if(!(register_LCDC & 0x10)) ! tile ^= 0x80; ! tile_pattern_address = tile_pattern + tile * 16 + by * 2; } } else { for(int i = 0; i < 160; i++) { ! // Use gbBgp[0] instead of 0 (?) ! // (this fixes white flashes on Last Bible II) ! gbLineMix[i] = gbPalette[gbBgp[0]]; gbLineBuffer[i] = 0; } *************** *** 200,207 **** // do the window display ! if((register_LCDC & 0x20) && (layerSettings & 0x2000)) { ! int wy = register_WY; ! if(y >= wy) { int wx = register_WX; wx -= 7; --- 220,245 ---- // do the window display ! // LCDC.0 also enables/disables the window in !gbCgbMode ?!?! ! // (tested on real hardware) ! // This fixes Last Bible II & Zankurou Musouken ! if((register_LCDC & 0x01 || gbCgbMode) && (register_LCDC & 0x20) && ! (layerSettings & 0x2000) && (gbWindowLine != -2)) { ! ! // Fix (accurate emulation) for most of the window display problems ! // (ie. Zen - Intergalactic Ninja, Urusei Yatsura...). ! if ((gbWindowLine == -1) || (gbWindowLine>144)) ! { ! inUseRegister_WY = oldRegister_WY; ! if (register_LY>oldRegister_WY) ! gbWindowLine = 146; ! } ! ! int wy = inUseRegister_WY; ! if(y >= inUseRegister_WY) { ! ! if (gbWindowLine == -1) ! gbWindowLine = 0; ! int wx = register_WX; wx -= 7; *************** *** 213,220 **** if((register_LCDC & 0x40) != 0) tile_map = 0x1c00; ! ! if(gbWindowLine == -1) { ! gbWindowLine = 0; ! } tx = 0; --- 251,255 ---- if((register_LCDC & 0x40) != 0) tile_map = 0x1c00; ! tx = 0; *************** *** 281,285 **** c = c + (attrs & 7) * 4; } else { ! c = gbBgp[c]; if(gbSgbMode && ! gbCgbMode) { int dx = x >> 3; --- 316,320 ---- c = c + (attrs & 7) * 4; } else { ! c = (gbBgpLine[x+3]>>(c<<1)) &3; if(gbSgbMode && ! gbCgbMode) { int dx = x >> 3; *************** *** 294,299 **** } } ! gbLineMix[x] = gbColorOption ? gbColorFilter[gbPalette[c]] : ! gbPalette[c]; x++; if(x >= 160) --- 329,334 ---- } } ! gbLineMix[x] = gbColorOption ? gbColorFilter[gbPalette[c] & 0x7FFF] : ! gbPalette[c] & 0x7FFF; x++; if(x >= 160) *************** *** 319,325 **** } } } else { for(int i = 0; i < 160; i++) { ! gbLineMix[i] = gbPalette[0]; gbLineBuffer[i] = 0; } --- 354,368 ---- } } + else if (gbWindowLine == -2) + { + inUseRegister_WY = oldRegister_WY; + if (register_LY>oldRegister_WY) + gbWindowLine = 146; + else + gbWindowLine = 0; + } } else { for(int i = 0; i < 160; i++) { ! gbLineMix[i] = gbPalette[gbBgp[0]]; gbLineBuffer[i] = 0; } *************** *** 348,352 **** // int yLine = (y+gbBorderRowSkip) * gbBorderLineSkip; ! u8 *pal = gbObp0; --- 391,399 ---- // int yLine = (y+gbBorderRowSkip) * gbBorderLineSkip; ! for (int i = 0; i<4; i++) ! { ! gbObp0[i] = (gbObp0Line[x+7]>>(i<<1)) & 3; ! gbObp1[i] = (gbObp1Line[x+7]>>(i<<1)) & 3; ! } u8 *pal = gbObp0; *************** *** 367,371 **** int b = 0; ! if(gbCgbMode && flags & 0x08) { a = bank1[address++]; b = bank1[address++]; --- 414,418 ---- int b = 0; ! if(gbCgbMode && (flags & 0x08)) { a = bank1[address++]; b = bank1[address++]; *************** *** 443,453 **** } ! gbLineMix[xxx] = gbColorOption ? gbColorFilter[gbPalette[c]] : ! gbPalette[c]; } } ! void gbDrawSprites() { int x = 0; int y = 0; --- 490,501 ---- } ! gbLineMix[xxx] = gbColorOption ? gbColorFilter[gbPalette[c] & 0x7FFF] : ! gbPalette[c] & 0x7FFF; } } ! int gbDrawSprites(bool draw) { + int x = 0; int y = 0; *************** *** 457,463 **** if(!(register_LCDC & 0x80)) ! return; if((register_LCDC & 2) && (layerSettings & 0x1000)) { int yc = register_LY; --- 505,512 ---- if(!(register_LCDC & 0x80)) ! return 0; if((register_LCDC & 2) && (layerSettings & 0x1000)) { + int yc = register_LY; *************** *** 475,482 **** int t = yc -y + 16; if(size && t >=0 && t < 16) { ! gbDrawSpriteTile(tile,x-8,yc,t,flags,size,i); count++; } else if(!size && t >= 0 && t < 8) { ! gbDrawSpriteTile(tile, x-8, yc, t, flags,size,i); count++; } --- 524,533 ---- int t = yc -y + 16; if(size && t >=0 && t < 16) { ! if (draw) ! gbDrawSpriteTile(tile,x-8,yc,t,flags,size,i); count++; } else if(!size && t >= 0 && t < 8) { ! if (draw) ! gbDrawSpriteTile(tile, x-8, yc, t, flags,size,i); count++; } *************** *** 484,490 **** // sprite limit reached! if(count >= 10) break; ! } } } --- 535,544 ---- // sprite limit reached! if(count >= 10) + { break; ! } ! } } + return (count*3); } Index: gbSGB.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/gb/gbSGB.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** gbSGB.cpp 13 May 2004 22:30:30 -0000 1.11 --- gbSGB.cpp 4 Jan 2006 13:38:47 -0000 1.12 *************** *** 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 *************** *** 256,262 **** u16 c = gbPalette[palette + color]; ! if(!color) ! c = gbPalette[0]; ! if((yy < 40 || yy >= 184) || (xx < 48 || xx >= 208)) { switch(systemColorDepth) { case 16: --- 256,265 ---- u16 c = gbPalette[palette + color]; ! ! // Fix for Super Snaky ??? ! // (it allows SGB borders to not redraw on the GB screen) ! //if(!color) ! // c = gbPalette[0]; ! if(((yy < 40 || yy >= 184) || (xx < 48 || xx >= 208)) && (color)) { switch(systemColorDepth) { case 16: Index: GB.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/gb/GB.cpp,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** GB.cpp 13 May 2004 22:33:46 -0000 1.20 --- GB.cpp 4 Jan 2006 13:38:47 -0000 1.21 *************** *** 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 [...2830 lines suppressed...] + + // Used to apply the interrupt's execution time. + if (gbDmaTicks) + { + clockTicks = gbDmaTicks; + gbDmaTicks = 0; + + goto gbRedoLoop; } *************** *** 3186,3188 **** 1000, #endif ! }; --- 3947,3949 ---- 1000, #endif ! }; \ No newline at end of file Index: gbCheats.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/gb/gbCheats.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** gbCheats.cpp 3 Sep 2005 12:28:39 -0000 1.8 --- gbCheats.cpp 4 Jan 2006 13:38:47 -0000 1.9 *************** *** 51,55 **** { utilWriteInt(gzFile, gbCheatNumber); ! if(gbCheatNumber) utilGzWrite(gzFile, &gbCheatList[0], sizeof(gbCheat)*gbCheatNumber); } --- 51,55 ---- { utilWriteInt(gzFile, gbCheatNumber); ! if(gbCheatNumber>0) utilGzWrite(gzFile, &gbCheatList[0], sizeof(gbCheat)*gbCheatNumber); } *************** *** 82,86 **** gbCheatNumber = utilReadInt(gzFile); ! if(gbCheatNumber) { utilGzRead(gzFile, &gbCheatList[0], sizeof(gbCheat)*gbCheatNumber); } --- 82,86 ---- gbCheatNumber = utilReadInt(gzFile); ! if(gbCheatNumber>0) { utilGzRead(gzFile, &gbCheatList[0], sizeof(gbCheat)*gbCheatNumber); } |
From: Pokemonhacker <pok...@us...> - 2005-09-30 16:06:40
|
Update of /cvsroot/vba/VisualBoyAdvance/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24013 Modified Files: GBAinline.h Log Message: - Corrected a bug, introduced in my latests changes, in the readhalfword from timers IO Reg. Index: GBAinline.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/GBAinline.h,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** GBAinline.h 3 Sep 2005 12:28:23 -0000 1.13 --- GBAinline.h 30 Sep 2005 16:06:32 -0000 1.14 *************** *** 208,211 **** --- 208,212 ---- if((address < 0x4000400) && ioReadable[address & 0x3fe]) { + value = READ16LE(((u16 *)&ioMem[address & 0x3fe])); if (((address & 0x3fe)>0xFF) && ((address & 0x3fe)<0x10E)) { *************** *** 222,227 **** value = 0xFFFF - ((timer3Ticks-cpuTotalTicks) >> timer3ClockReload); } - else - value = READ16LE(((u16 *)&ioMem[address & 0x3fe])); } else goto unreadable; --- 223,226 ---- |
From: Pokemonhacker <pok...@us...> - 2005-09-03 12:29:32
|
Update of /cvsroot/vba/VisualBoyAdvance/src/win32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22519 Modified Files: MainWndFile.cpp MapView.cpp MemoryViewerDlg.cpp OamView.cpp PaletteView.cpp TileView.cpp Log Message: SRC : Arm-new.h : - Fixed the clockticks and the bus prefetch emulation. Bios.cpp : - Fixed a bug in void BIOS_BitUnPack(). GBA.cpp : - HBLANK duration now set to 224 ticks. - Added partial clockticks emulation for swi when no bios is used. - Changed the timers handling (and updated the savestate to version 9). - Tweaked the IRQ delay handling ; tweaked the bus prefetch emulation. GBA.h : - Changed the timers handling (and updated the savestate to version 9). GBAinline.h : - Changed the timers handling. Gfx.cpp : - Added 'max number of objects per line' emulation. Gfx.h : - Added 'max number of objects per line' emulation. : - Fixed a display bug (objects overlapping to the right were now shown on the left). thumb.h : - Fixed the clockticks and the bus prefetch emulation. GB : gbCheats.cpp : - Fixed a bug in the code comparison (thx jdratlif). SDL : SDL.cpp : - Made it that the screen is redrawn when you load/save a savestate. WIN32 : MainWndFile.cpp : - Made it that the screen is redrawn when you load/save a savestate. MapView.cpp : - Corrected a crash bug when no rom were loaded. MemoryViewerDlg.cpp : - Corrected a crash bug when no rom were loaded. OamView.cpp : - Corrected a crash bug when no rom were loaded. PaletteView.cpp : - Corrected a crash bug when no rom were loaded. TileView.cpp : - Corrected a crash bug when no rom were loaded. Index: MapView.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/MapView.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** MapView.cpp 25 Jun 2005 06:23:31 -0000 1.8 --- MapView.cpp 3 Sep 2005 12:29:23 -0000 1.9 *************** *** 999,1033 **** } ! void MapView::OnSave() { ! CString filename; ! if(theApp.captureFormat == 0) ! filename = "map.png"; ! else ! filename = "map.bmp"; ! LPCTSTR exts[] = {".png", ".bmp" }; ! CString filter = theApp.winLoadFilter(IDS_FILTER_PNG); ! CString title = winResLoadString(IDS_SELECT_CAPTURE_NAME); ! FileDlg dlg(this, ! filename, ! filter, ! theApp.captureFormat ? 2 : 1, ! theApp.captureFormat ? "BMP" : "PNG", ! exts, ! "", ! title, ! true); ! if(dlg.DoModal() == IDCANCEL) { ! return; ! } ! if(dlg.getFilterIndex() == 2) ! saveBMP(dlg.GetPathName()); ! else ! savePNG(dlg.GetPathName()); } --- 999,1036 ---- } ! void MapView::OnSave() { ! if(rom != NULL) ! { ! CString filename; ! if(theApp.captureFormat == 0) ! filename = "map.png"; ! else ! filename = "map.bmp"; ! LPCTSTR exts[] = {".png", ".bmp" }; ! CString filter = theApp.winLoadFilter(IDS_FILTER_PNG); ! CString title = winResLoadString(IDS_SELECT_CAPTURE_NAME); ! FileDlg dlg(this, ! filename, ! filter, ! theApp.captureFormat ? 2 : 1, ! theApp.captureFormat ? "BMP" : "PNG", ! exts, ! "", ! title, ! true); ! if(dlg.DoModal() == IDCANCEL) { ! return; ! } ! if(dlg.getFilterIndex() == 2) ! saveBMP(dlg.GetPathName()); ! else ! savePNG(dlg.GetPathName()); ! } } Index: MainWndFile.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/MainWndFile.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** MainWndFile.cpp 25 Jun 2005 06:23:31 -0000 1.10 --- MainWndFile.cpp 3 Sep 2005 12:29:23 -0000 1.11 *************** *** 38,41 **** --- 38,42 ---- extern void remoteCleanUp(); + extern void InterframeCleanup(); void MainWnd::OnFileOpen() *************** *** 255,269 **** filename.Format("%s\\%s%d.sgm", saveDir, buffer, nID); bool res = loadSaveGame(filename); theApp.rewindCount = 0; theApp.rewindCounter = 0; theApp.rewindSaveNeeded = false; ! ! CString format = winResLoadString(IDS_LOADED_STATE_N); ! buffer.Format(format, nID); ! ! systemScreenMessage(buffer); ! return res; } --- 256,275 ---- filename.Format("%s\\%s%d.sgm", saveDir, buffer, nID); + CString format = winResLoadString(IDS_LOADED_STATE_N); + buffer.Format(format, nID); + bool res = loadSaveGame(filename); + if (theApp.paused) + InterframeCleanup(); + + systemScreenMessage(buffer); + + systemDrawScreen(); + theApp.rewindCount = 0; theApp.rewindCounter = 0; theApp.rewindSaveNeeded = false; ! return res; } *************** *** 340,343 **** --- 346,351 ---- systemScreenMessage(buffer); + + systemDrawScreen(); return res; Index: OamView.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/OamView.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** OamView.cpp 13 May 2004 15:06:55 -0000 1.4 --- OamView.cpp 3 Sep 2005 12:29:23 -0000 1.5 *************** *** 464,498 **** void OamView::OnSave() { ! CString captureBuffer; ! if(theApp.captureFormat == 0) ! captureBuffer = "oam.png"; ! else ! captureBuffer = "oam.bmp"; ! LPCTSTR exts[] = {".png", ".bmp" }; ! CString filter = theApp.winLoadFilter(IDS_FILTER_PNG); ! CString title = winResLoadString(IDS_SELECT_CAPTURE_NAME); ! FileDlg dlg(this, ! captureBuffer, ! filter, ! theApp.captureFormat ? 2 : 1, ! theApp.captureFormat ? "BMP" : "PNG", ! exts, ! "", ! title, ! true); ! if(dlg.DoModal() == IDCANCEL) { ! return; ! } ! captureBuffer = dlg.GetPathName(); ! if(dlg.getFilterIndex() == 2) ! saveBMP(captureBuffer); ! else ! savePNG(captureBuffer); } --- 464,501 ---- void OamView::OnSave() { ! if(rom != NULL) ! { ! CString captureBuffer; ! if(theApp.captureFormat == 0) ! captureBuffer = "oam.png"; ! else ! captureBuffer = "oam.bmp"; ! LPCTSTR exts[] = {".png", ".bmp" }; ! CString filter = theApp.winLoadFilter(IDS_FILTER_PNG); ! CString title = winResLoadString(IDS_SELECT_CAPTURE_NAME); ! FileDlg dlg(this, ! captureBuffer, ! filter, ! theApp.captureFormat ? 2 : 1, ! theApp.captureFormat ? "BMP" : "PNG", ! exts, ! "", ! title, ! true); ! if(dlg.DoModal() == IDCANCEL) { ! return; ! } ! captureBuffer = dlg.GetPathName(); ! if(dlg.getFilterIndex() == 2) ! saveBMP(captureBuffer); ! else ! savePNG(captureBuffer); ! } } Index: MemoryViewerDlg.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/MemoryViewerDlg.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** MemoryViewerDlg.cpp 13 May 2004 15:06:55 -0000 1.4 --- MemoryViewerDlg.cpp 3 Sep 2005 12:29:23 -0000 1.5 *************** *** 321,363 **** void MemoryViewerDlg::OnSave() { ! MemoryViewerAddressSize dlg; ! CString buffer; ! dlg.setAddress(m_viewer.getCurrentAddress()); ! LPCTSTR exts[] = { ".dmp" }; ! if(dlg.DoModal() == IDOK) { ! CString filter = theApp.winLoadFilter(IDS_FILTER_DUMP); ! CString title = winResLoadString(IDS_SELECT_DUMP_FILE); ! FileDlg file(this, ! buffer, ! filter, ! 0, ! "DMP", ! exts, ! "", ! title, ! true); ! if(file.DoModal() == IDOK) { ! buffer = file.GetPathName(); ! FILE *f = fopen(buffer, "wb"); ! if(f == NULL) { ! systemMessage(IDS_ERROR_CREATING_FILE, buffer); ! return; ! } ! int size = dlg.getSize(); ! u32 addr = dlg.getAddress(); ! for(int i = 0; i < size; i++) { ! fputc(CPUReadByteQuick(addr), f); ! addr++; ! } ! fclose(f); } } --- 321,366 ---- void MemoryViewerDlg::OnSave() { ! if(rom != NULL) ! { ! MemoryViewerAddressSize dlg; ! CString buffer; ! dlg.setAddress(m_viewer.getCurrentAddress()); ! LPCTSTR exts[] = { ".dmp" }; ! if(dlg.DoModal() == IDOK) { ! CString filter = theApp.winLoadFilter(IDS_FILTER_DUMP); ! CString title = winResLoadString(IDS_SELECT_DUMP_FILE); ! FileDlg file(this, ! buffer, ! filter, ! 0, ! "DMP", ! exts, ! "", ! title, ! true); ! if(file.DoModal() == IDOK) { ! buffer = file.GetPathName(); ! FILE *f = fopen(buffer, "wb"); ! if(f == NULL) { ! systemMessage(IDS_ERROR_CREATING_FILE, buffer); ! return; ! } ! int size = dlg.getSize(); ! u32 addr = dlg.getAddress(); ! for(int i = 0; i < size; i++) { ! fputc(CPUReadByteQuick(addr), f); ! addr++; ! } ! fclose(f); ! } } } *************** *** 366,420 **** void MemoryViewerDlg::OnLoad() { ! CString buffer; ! LPCTSTR exts[] = { ".dmp" }; ! CString filter = theApp.winLoadFilter(IDS_FILTER_DUMP); ! CString title = winResLoadString(IDS_SELECT_DUMP_FILE); ! FileDlg file(this, ! buffer, ! filter, ! 0, ! "DMP", ! exts, ! "", ! title, ! false); ! if(file.DoModal() == IDOK) { ! buffer = file.GetPathName(); ! FILE *f = fopen(buffer, "rb"); ! if(f == NULL) { ! systemMessage(IDS_CANNOT_OPEN_FILE, ! "Cannot open file %s", ! buffer); ! return; ! } ! MemoryViewerAddressSize dlg; ! fseek(f, 0, SEEK_END); ! int size = ftell(f); ! fseek(f, 0, SEEK_SET); ! dlg.setAddress(m_viewer.getCurrentAddress()); ! dlg.setSize(size); ! if(dlg.DoModal() == IDOK) { ! int size = dlg.getSize(); ! u32 addr = dlg.getAddress(); ! for(int i = 0; i < size; i++) { ! int c = fgetc(f); ! if(c == -1) ! break; ! CPUWriteByteQuick(addr, c); ! addr++; } ! OnRefresh(); } ! fclose(f); ! } } --- 369,426 ---- void MemoryViewerDlg::OnLoad() { ! if(rom != NULL) ! { ! CString buffer; ! LPCTSTR exts[] = { ".dmp" }; ! CString filter = theApp.winLoadFilter(IDS_FILTER_DUMP); ! CString title = winResLoadString(IDS_SELECT_DUMP_FILE); ! FileDlg file(this, ! buffer, ! filter, ! 0, ! "DMP", ! exts, ! "", ! title, ! false); ! if(file.DoModal() == IDOK) { ! buffer = file.GetPathName(); ! FILE *f = fopen(buffer, "rb"); ! if(f == NULL) { ! systemMessage(IDS_CANNOT_OPEN_FILE, ! "Cannot open file %s", ! buffer); ! return; ! } ! MemoryViewerAddressSize dlg; ! fseek(f, 0, SEEK_END); ! int size = ftell(f); ! fseek(f, 0, SEEK_SET); ! dlg.setAddress(m_viewer.getCurrentAddress()); ! dlg.setSize(size); ! if(dlg.DoModal() == IDOK) { ! int size = dlg.getSize(); ! u32 addr = dlg.getAddress(); ! for(int i = 0; i < size; i++) { ! int c = fgetc(f); ! if(c == -1) ! break; ! CPUWriteByteQuick(addr, c); ! addr++; ! } ! OnRefresh(); } ! fclose(f); } ! } } Index: TileView.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/TileView.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TileView.cpp 13 May 2004 15:06:55 -0000 1.2 --- TileView.cpp 3 Sep 2005 12:29:23 -0000 1.3 *************** *** 266,301 **** void TileView::OnSave() { ! CString captureBuffer; ! if(theApp.captureFormat == 0) ! captureBuffer = "tiles.png"; ! else ! captureBuffer = "tiles.bmp"; ! LPCTSTR exts[] = {".png", ".bmp" }; ! CString filter = theApp.winLoadFilter(IDS_FILTER_PNG); ! CString title = winResLoadString(IDS_SELECT_CAPTURE_NAME); ! FileDlg dlg(this, ! captureBuffer, ! filter, ! theApp.captureFormat ? 2 : 1, ! theApp.captureFormat ? "BMP" : "PNG", ! exts, ! "", ! title, ! true); ! if(dlg.DoModal() == IDCANCEL) { ! return; ! } ! captureBuffer = dlg.GetPathName(); ! if(dlg.getFilterIndex() == 2) ! saveBMP(captureBuffer); ! else ! savePNG(captureBuffer); } --- 266,304 ---- void TileView::OnSave() { ! if(rom != NULL) ! { ! CString captureBuffer; ! if(theApp.captureFormat == 0) ! captureBuffer = "tiles.png"; ! else ! captureBuffer = "tiles.bmp"; ! LPCTSTR exts[] = {".png", ".bmp" }; ! CString filter = theApp.winLoadFilter(IDS_FILTER_PNG); ! CString title = winResLoadString(IDS_SELECT_CAPTURE_NAME); ! FileDlg dlg(this, ! captureBuffer, ! filter, ! theApp.captureFormat ? 2 : 1, ! theApp.captureFormat ? "BMP" : "PNG", ! exts, ! "", ! title, ! true); ! if(dlg.DoModal() == IDCANCEL) { ! return; ! } ! captureBuffer = dlg.GetPathName(); ! if(dlg.getFilterIndex() == 2) ! saveBMP(captureBuffer); ! else ! savePNG(captureBuffer); ! } } Index: PaletteView.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/PaletteView.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** PaletteView.cpp 31 Oct 2004 18:25:40 -0000 1.5 --- PaletteView.cpp 3 Sep 2005 12:29:23 -0000 1.6 *************** *** 110,158 **** void PaletteView::save(int which) { ! CString captureBuffer; ! if(which == 0) ! captureBuffer = "bg.pal"; ! else ! captureBuffer = "obj.pal"; ! LPCTSTR exts[] = {".pal", ".pal", ".act" }; ! CString filter = theApp.winLoadFilter(IDS_FILTER_PAL); ! CString title = winResLoadString(IDS_SELECT_PALETTE_NAME); ! FileDlg dlg(this, ! captureBuffer, ! filter, ! 1, ! "PAL", ! exts, ! "", ! title, ! true); ! if(dlg.DoModal() == IDCANCEL) { ! return; ! } ! captureBuffer = dlg.GetPathName(); ! PaletteViewControl *p = NULL; ! if(which == 0) ! p = &paletteView; ! else ! p = &paletteViewOBJ; ! switch(dlg.getFilterIndex()) { ! case 0: ! case 1: ! p->saveMSPAL(captureBuffer); ! break; ! case 2: ! p->saveJASCPAL(captureBuffer); ! break; ! case 3: ! p->saveAdobe(captureBuffer); ! break; } } --- 110,161 ---- void PaletteView::save(int which) { ! if(rom != NULL) ! { ! CString captureBuffer; ! if(which == 0) ! captureBuffer = "bg.pal"; ! else ! captureBuffer = "obj.pal"; ! LPCTSTR exts[] = {".pal", ".pal", ".act" }; ! CString filter = theApp.winLoadFilter(IDS_FILTER_PAL); ! CString title = winResLoadString(IDS_SELECT_PALETTE_NAME); ! FileDlg dlg(this, ! captureBuffer, ! filter, ! 1, ! "PAL", ! exts, ! "", ! title, ! true); ! if(dlg.DoModal() == IDCANCEL) { ! return; ! } ! captureBuffer = dlg.GetPathName(); ! PaletteViewControl *p = NULL; ! if(which == 0) ! p = &paletteView; ! else ! p = &paletteViewOBJ; ! switch(dlg.getFilterIndex()) { ! case 0: ! case 1: ! p->saveMSPAL(captureBuffer); ! break; ! case 2: ! p->saveJASCPAL(captureBuffer); ! break; ! case 3: ! p->saveAdobe(captureBuffer); ! break; ! } } } |
From: Pokemonhacker <pok...@us...> - 2005-09-03 12:29:07
|
Update of /cvsroot/vba/VisualBoyAdvance/src/sdl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22424 Modified Files: SDL.cpp Log Message: SRC : Arm-new.h : - Fixed the clockticks and the bus prefetch emulation. Bios.cpp : - Fixed a bug in void BIOS_BitUnPack(). GBA.cpp : - HBLANK duration now set to 224 ticks. - Added partial clockticks emulation for swi when no bios is used. - Changed the timers handling (and updated the savestate to version 9). - Tweaked the IRQ delay handling ; tweaked the bus prefetch emulation. GBA.h : - Changed the timers handling (and updated the savestate to version 9). GBAinline.h : - Changed the timers handling. Gfx.cpp : - Added 'max number of objects per line' emulation. Gfx.h : - Added 'max number of objects per line' emulation. : - Fixed a display bug (objects overlapping to the right were now shown on the left). thumb.h : - Fixed the clockticks and the bus prefetch emulation. GB : gbCheats.cpp : - Fixed a bug in the code comparison (thx jdratlif). SDL : SDL.cpp : - Made it that the screen is redrawn when you load/save a savestate. WIN32 : MainWndFile.cpp : - Made it that the screen is redrawn when you load/save a savestate. MapView.cpp : - Corrected a crash bug when no rom were loaded. MemoryViewerDlg.cpp : - Corrected a crash bug when no rom were loaded. OamView.cpp : - Corrected a crash bug when no rom were loaded. PaletteView.cpp : - Corrected a crash bug when no rom were loaded. TileView.cpp : - Corrected a crash bug when no rom were loaded. Index: SDL.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/sdl/SDL.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** SDL.cpp 25 Jun 2005 06:17:52 -0000 1.7 --- SDL.cpp 3 Sep 2005 12:28:53 -0000 1.8 *************** *** 1357,1364 **** --- 1357,1368 ---- else sprintf(stateName,"%s%d.sgm", filename, num+1); + if(emulator.emuWriteState) emulator.emuWriteState(stateName); + sprintf(stateName, "Wrote state %d", num+1); systemScreenMessage(stateName); + + systemDrawScreen(); } *************** *** 1378,1381 **** --- 1382,1387 ---- sprintf(stateName, "Loaded state %d", num+1); systemScreenMessage(stateName); + + systemDrawScreen(); } |
From: Pokemonhacker <pok...@us...> - 2005-09-03 12:28:49
|
Update of /cvsroot/vba/VisualBoyAdvance/src/gb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22388 Modified Files: gbCheats.cpp Log Message: SRC : Arm-new.h : - Fixed the clockticks and the bus prefetch emulation. Bios.cpp : - Fixed a bug in void BIOS_BitUnPack(). GBA.cpp : - HBLANK duration now set to 224 ticks. - Added partial clockticks emulation for swi when no bios is used. - Changed the timers handling (and updated the savestate to version 9). - Tweaked the IRQ delay handling ; tweaked the bus prefetch emulation. GBA.h : - Changed the timers handling (and updated the savestate to version 9). GBAinline.h : - Changed the timers handling. Gfx.cpp : - Added 'max number of objects per line' emulation. Gfx.h : - Added 'max number of objects per line' emulation. : - Fixed a display bug (objects overlapping to the right were now shown on the left). thumb.h : - Fixed the clockticks and the bus prefetch emulation. GB : gbCheats.cpp : - Fixed a bug in the code comparison (thx jdratlif). SDL : SDL.cpp : - Made it that the screen is redrawn when you load/save a savestate. WIN32 : MainWndFile.cpp : - Made it that the screen is redrawn when you load/save a savestate. MapView.cpp : - Corrected a crash bug when no rom were loaded. MemoryViewerDlg.cpp : - Corrected a crash bug when no rom were loaded. OamView.cpp : - Corrected a crash bug when no rom were loaded. PaletteView.cpp : - Corrected a crash bug when no rom were loaded. TileView.cpp : - Corrected a crash bug when no rom were loaded. Index: gbCheats.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/gb/gbCheats.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** gbCheats.cpp 13 May 2004 15:06:46 -0000 1.7 --- gbCheats.cpp 3 Sep 2005 12:28:39 -0000 1.8 *************** *** 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 *************** *** 339,343 **** gbCheatList[i].compare = compare; ! gbCheatList[i].code = 0; } --- 339,345 ---- gbCheatList[i].compare = compare; ! //gbCheatList[i].code = 0; ! gbCheatList[i].code = 0x100; // fix for compare value ! } |
From: Pokemonhacker <pok...@us...> - 2005-09-03 12:28:35
|
Update of /cvsroot/vba/VisualBoyAdvance/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22301 Modified Files: arm-new.h bios.cpp GBA.cpp GBA.h GBAinline.h Gfx.cpp Gfx.h thumb.h Log Message: SRC : Arm-new.h : - Fixed the clockticks and the bus prefetch emulation. Bios.cpp : - Fixed a bug in void BIOS_BitUnPack(). GBA.cpp : - HBLANK duration now set to 224 ticks. - Added partial clockticks emulation for swi when no bios is used. - Changed the timers handling (and updated the savestate to version 9). - Tweaked the IRQ delay handling ; tweaked the bus prefetch emulation. GBA.h : - Changed the timers handling (and updated the savestate to version 9). GBAinline.h : - Changed the timers handling. Gfx.cpp : - Added 'max number of objects per line' emulation. Gfx.h : - Added 'max number of objects per line' emulation. : - Fixed a display bug (objects overlapping to the right were now shown on the left). thumb.h : - Fixed the clockticks and the bus prefetch emulation. GB : gbCheats.cpp : - Fixed a bug in the code comparison (thx jdratlif). SDL : SDL.cpp : - Made it that the screen is redrawn when you load/save a savestate. WIN32 : MainWndFile.cpp : - Made it that the screen is redrawn when you load/save a savestate. MapView.cpp : - Corrected a crash bug when no rom were loaded. MemoryViewerDlg.cpp : - Corrected a crash bug when no rom were loaded. OamView.cpp : - Corrected a crash bug when no rom were loaded. PaletteView.cpp : - Corrected a crash bug when no rom were loaded. TileView.cpp : - Corrected a crash bug when no rom were loaded. Index: Gfx.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/Gfx.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Gfx.cpp 13 May 2004 15:06:44 -0000 1.2 --- Gfx.cpp 3 Sep 2005 12:28:23 -0000 1.3 *************** *** 23,27 **** 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16}; - u32 line0[240]; u32 line1[240]; --- 23,26 ---- *************** *** 33,36 **** --- 32,36 ---- bool gfxInWin0[240]; bool gfxInWin1[240]; + int lineOBJpixleft[128]; int gfxBG2Changed = 0; Index: thumb.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/thumb.h,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** thumb.h 25 Jun 2005 06:12:26 -0000 1.14 --- thumb.h 3 Sep 2005 12:28:23 -0000 1.15 *************** *** 768,777 **** busPrefetch = false; ! if (busPrefetchCount<0) ! busPrefetchCount=0; ! if (busPrefetchCount>16) ! busPrefetchCount=8; ! ! clockTicks = codeTicksAccessSeq16(armNextPC)+1; #ifndef FINAL_VERSION if(armNextPC == stop) { [...1639 lines suppressed...] reg[14].I = temp|1; THUMB_PREFETCH; ! clockTicks = codeTicksAccessSeq16(armNextPC) + ! codeTicksAccess16(armNextPC) + codeTicksAccessSeq16(armNextPC) + 3; ! busPrefetchCount = 0; } break; *************** *** 2669,2671 **** CPUUndefinedException(); break; ! } \ No newline at end of file --- 2181,2186 ---- CPUUndefinedException(); break; ! } ! ! if (clockTicks==0) ! clockTicks = codeTicksAccessSeq16(oldArmNextPC) + 1; Index: GBA.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/GBA.cpp,v retrieving revision 1.62 retrieving revision 1.63 diff -C2 -d -r1.62 -r1.63 *** GBA.cpp 25 Jun 2005 06:26:33 -0000 1.62 --- GBA.cpp 3 Sep 2005 12:28:23 -0000 1.63 *************** *** 43,47 **** #endif ! #define UPDATE_REG(address, value) WRITE16LE(((u16 *)&ioMem[address]),value) #define ARM_PREFETCH \ --- 43,50 ---- #endif ! #define UPDATE_REG(address, value)\ ! {\ [...1700 lines suppressed...] break; + } } } + + struct EmulatedSystem GBASystem = { // emuMain *************** *** 4232,4234 **** 5000 #endif ! }; --- 4344,4346 ---- 5000 #endif ! }; \ No newline at end of file Index: GBA.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/GBA.h,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** GBA.h 25 Jun 2005 06:26:33 -0000 1.21 --- GBA.h 3 Sep 2005 12:28:23 -0000 1.22 *************** *** 31,35 **** #define SAVE_GAME_VERSION_7 7 #define SAVE_GAME_VERSION_8 8 ! #define SAVE_GAME_VERSION SAVE_GAME_VERSION_8 typedef struct { --- 31,36 ---- #define SAVE_GAME_VERSION_7 7 #define SAVE_GAME_VERSION_8 8 ! #define SAVE_GAME_VERSION_9 9 ! #define SAVE_GAME_VERSION SAVE_GAME_VERSION_9 typedef struct { *************** *** 103,106 **** --- 104,108 ---- extern void doMirroring(bool); extern void CPUUpdateRegister(u32, u16); + extern void applyTimer (); extern void CPUWriteHalfWord(u32, u16); extern void CPUWriteByte(u32, u8); Index: GBAinline.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/GBAinline.h,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** GBAinline.h 25 Jun 2005 06:26:33 -0000 1.12 --- GBAinline.h 3 Sep 2005 12:28:23 -0000 1.13 *************** *** 31,34 **** --- 31,47 ---- extern bool cpuDmaHack; extern u32 cpuDmaLast; + extern bool timer0On; + extern int timer0Ticks; + extern int timer0ClockReload; + extern bool timer1On; + extern int timer1Ticks; + extern int timer1ClockReload; + extern bool timer2On; + extern int timer2Ticks; + extern int timer2ClockReload; + extern bool timer3On; + extern int timer3Ticks; + extern int timer3ClockReload; + extern int cpuTotalTicks; #define CPUReadByteQuick(addr) \ *************** *** 194,198 **** case 4: if((address < 0x4000400) && ioReadable[address & 0x3fe]) ! value = READ16LE(((u16 *)&ioMem[address & 0x3fe])); else goto unreadable; break; --- 207,228 ---- case 4: if((address < 0x4000400) && ioReadable[address & 0x3fe]) ! { ! if (((address & 0x3fe)>0xFF) && ((address & 0x3fe)<0x10E)) ! { ! if (((address & 0x3fe) == 0x100) && timer0On) ! value = 0xFFFF - ((timer0Ticks-cpuTotalTicks) >> timer0ClockReload); ! else ! if (((address & 0x3fe) == 0x104) && timer1On && !(TM1CNT & 4)) ! value = 0xFFFF - ((timer1Ticks-cpuTotalTicks) >> timer1ClockReload); ! else ! if (((address & 0x3fe) == 0x108) && timer2On && !(TM2CNT & 4)) ! value = 0xFFFF - ((timer2Ticks-cpuTotalTicks) >> timer2ClockReload); ! else ! if (((address & 0x3fe) == 0x10C) && timer3On && !(TM3CNT & 4)) ! value = 0xFFFF - ((timer3Ticks-cpuTotalTicks) >> timer3ClockReload); ! } ! else ! value = READ16LE(((u16 *)&ioMem[address & 0x3fe])); ! } else goto unreadable; break; Index: bios.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/bios.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** bios.cpp 25 Jun 2005 06:14:08 -0000 1.17 --- bios.cpp 3 Sep 2005 12:28:23 -0000 1.18 *************** *** 154,158 **** int len = CPUReadHalfWord(header); ! // check address int bits = CPUReadByte(header+2); int revbits = 8 - bits; --- 154,162 ---- int len = CPUReadHalfWord(header); ! // check address ! if(((source & 0xe000000) == 0) || ! ((source + len) & 0xe000000) == 0) ! return; ! int bits = CPUReadByte(header+2); int revbits = 8 - bits; *************** *** 178,182 **** u32 d = b & mask; u32 temp = d >> bitcount; ! if(!temp && addBase) { temp += base; } --- 182,186 ---- u32 d = b & mask; u32 temp = d >> bitcount; ! if(d || addBase) { temp += base; } Index: arm-new.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/arm-new.h,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** arm-new.h 25 Jun 2005 06:11:56 -0000 1.15 --- arm-new.h 3 Sep 2005 12:28:23 -0000 1.16 *************** *** 1115,1119 **** \ if ((dest == 15)||((opcode & 0x02000010)==0x10))\ ! clockTicks = 2+codeTicksAccess32(armNextPC);\ if(shift) {\ LOGICAL_LSL_REG\ --- 1115,1123 ---- \ if ((dest == 15)||((opcode & 0x02000010)==0x10))\ ! {\ ! clockTicks = 1+codeTicksAccess32(armNextPC);\ [...6614 lines suppressed...] CPUSoftwareInterrupt(opcode & 0x00FFFFFF); --- 8657,8664 ---- CASE_256(0xf00) // SWI <comment> ! clockTicks = codeTicksAccessSeq32(armNextPC) + 1; clockTicks += 2 + codeTicksAccess32(armNextPC) + codeTicksAccessSeq32(armNextPC); + busPrefetchCount=0; CPUSoftwareInterrupt(opcode & 0x00FFFFFF); *************** *** 8356,8357 **** --- 8697,8701 ---- } } + + if (clockTicks == 0) + clockTicks = codeTicksAccessSeq32(oldArmNextPC) + 1; \ No newline at end of file Index: Gfx.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/Gfx.h,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** Gfx.h 17 Jul 2005 18:57:08 -0000 1.16 --- Gfx.h 3 Sep 2005 12:28:23 -0000 1.17 *************** *** 101,104 **** --- 101,105 ---- extern bool gfxInWin0[240]; extern bool gfxInWin1[240]; + extern int lineOBJpixleft[128]; extern int gfxBG2Changed; *************** *** 732,735 **** --- 733,740 ---- inline void gfxDrawSprites(u32 *lineOBJ) { + // lineOBJpix is used to keep track of the drawn OBJs + // and to stop drawing them if the 'maximum number of OBJ per line' + // has been reached. + int lineOBJpix = (DISPCNT & 0x20) ? 954 : 1226; int m=0; gfxClearArray(lineOBJ); *************** *** 745,797 **** sprites++; ! // ignore OBJ-WIN ! if((a0 & 0x0c00) == 0x0800) ! continue; ! ! int sizeY = 8; ! int sizeX = 8; ! ! switch(((a0 >>12) & 0x0c)|(a1>>14)) { ! case 0: ! break; ! case 1: ! sizeX = sizeY = 16; ! break; ! case 2: ! sizeX = sizeY = 32; ! break; ! case 3: ! sizeX = sizeY = 64; ! break; ! case 4: ! sizeX = 16; ! break; ! case 5: ! sizeX = 32; ! break; ! case 6: ! sizeX = 32; ! sizeY = 16; ! break; ! case 7: ! sizeX = 64; ! sizeY = 32; ! break; ! case 8: ! sizeY = 16; ! break; ! case 9: ! sizeY = 32; ! break; ! case 10: ! sizeX = 16; ! sizeY = 32; ! break; ! case 11: ! sizeX = 32; ! sizeY = 64; ! break; ! default: continue; } --- 750,784 ---- sprites++; ! lineOBJpixleft[x]=lineOBJpix; ! ! lineOBJpix-=2; ! if (lineOBJpix<=0) continue; + + if ((a0 & 0x0c00) == 0x0c00) + a0 &=0xF3FF; + + if ((a0>>14) == 3) + { + a0 &= 0x3FFF; + a1 &= 0x3FFF; + } + + int sizeX = 8<<(a1>>14); + int sizeY = sizeX; + + if ((a0>>14) & 1) + { + if (sizeX<32) + sizeX<<=1; + if (sizeY>8) + sizeY>>=1; + } + else if ((a0>>14) & 2) + { + if (sizeX>8) + sizeX>>=1; + if (sizeY<32) + sizeY<<=1; } *************** *** 802,808 **** int sy = (a0 & 255); - if(sy > 160) - sy -= 256; if(a0 & 0x0100) { --- 789,831 ---- int sy = (a0 & 255); + int sx = (a1 & 0x1FF); + + // computes ticks used by OBJ-WIN if OBJWIN is enabled + if (((a0 & 0x0c00) == 0x0800) && (layerEnable & 0x8000)) + { + if ((a0 & 0x0300) == 0x0300) + { + sizeX<<=1; + sizeY<<=1; + } + if((sy+sizeY) > 256) + sy -= 256; + if ((sx+sizeX)> 512) + sx-=512; + if (sx<0) + { + sizeX+=sx; + sx = 0; + } + else if ((sx+sizeX)>240) + sizeX=240-sx; + if ((VCOUNT>=sy) && (VCOUNT<sy+sizeY) && (sx<240)) + { + if (a0 & 0x0100) + lineOBJpix-=8+2*sizeX; + else + lineOBJpix-=sizeX-2; + } + continue; + } + // else ignores OBJ-WIN if OBJWIN is disabled, and ignored disabled OBJ + else + if(((a0 & 0x0c00) == 0x0800) || ((a0 & 0x0300) == 0x0200)) + continue; + + if (lineOBJpix<0) + continue; + if(a0 & 0x0100) { *************** *** 813,821 **** fieldY <<= 1; } ! int t = VCOUNT - sy; if((t >= 0) && (t < fieldY)) { ! int sx = (a1 & 0x1FF); ! if((sx < 240) || (((sx + fieldX) & 511) < 240)) { // int t2 = t - (fieldY >> 1); int rot = (a1 >> 9) & 0x1F; --- 836,851 ---- fieldY <<= 1; } ! if((sy+fieldY) > 256) ! sy -= 256; int t = VCOUNT - sy; if((t >= 0) && (t < fieldY)) { ! int startpix = 0; ! if ((sx+fieldX)> 512) ! { ! startpix=512-sx; ! } ! if (lineOBJpix>0) ! if((sx < 240) || startpix) { ! lineOBJpix-=8; // int t2 = t - (fieldY >> 1); int rot = (a1 >> 9) & 0x1F; *************** *** 855,858 **** --- 885,892 ---- c &= 0x3FE; for(int x = 0; x < fieldX; x++) { + if (x >= startpix) + lineOBJpix-=2; + if (lineOBJpix<0) + continue; int xxx = realX >> 8; int yyy = realY >> 8; *************** *** 886,890 **** #endif } ! sx = (sx+1)&511;; realX += dx; realY += dy; --- 920,924 ---- #endif } ! sx = (sx+1)&511; realX += dx; realY += dy; *************** *** 898,903 **** if(DISPCNT & 0x40) inc = sizeX >> 3; ! int palette = (a2 >> 8) & 0xF0; for(int x = 0; x < fieldX; x++) { int xxx = realX >> 8; int yyy = realY >> 8; --- 932,941 ---- if(DISPCNT & 0x40) inc = sizeX >> 3; ! int palette = (a2 >> 8) & 0xF0; for(int x = 0; x < fieldX; x++) { + if (x >= startpix) + lineOBJpix-=2; + if (lineOBJpix<0) + continue; int xxx = realX >> 8; int yyy = realY >> 8; *************** *** 935,939 **** lineOBJ[sx] = 0x001F; #endif ! sx = (sx+1)&511;; realX += dx; realY += dy; --- 973,977 ---- lineOBJ[sx] = 0x001F; #endif ! sx = (sx+1)&511; realX += dx; realY += dy; *************** *** 944,951 **** } } else { int t = VCOUNT - sy; if((t >= 0) && (t < sizeY)) { ! int sx = (a1 & 0x1FF); ! if(((sx < 240)||(((sx+sizeX)&511)<240)) && !(a0 & 0x0200)) { if(a0 & 0x2000) { if(a1 & 0x2000) --- 982,996 ---- } } else { + if(sy+sizeY > 256) + sy -= 256; int t = VCOUNT - sy; if((t >= 0) && (t < sizeY)) { ! int startpix = 0; ! if ((sx+sizeX)> 512) ! { ! startpix=512-sx; ! } ! if((sx < 240) || startpix) { ! lineOBJpix+=2; if(a0 & 0x2000) { if(a1 & 0x2000) *************** *** 977,980 **** --- 1022,1029 ---- for(int xx = 0; xx < sizeX; xx++) { + if (xx >= startpix) + lineOBJpix--; + if (lineOBJpix<0) + continue; if(sx < 240) { u8 color = vram[address]; *************** *** 1049,1052 **** --- 1098,1105 ---- xxx = 7; for(int xx = sizeX - 1; xx >= 0; xx--) { + if (xx >= startpix) + lineOBJpix--; + if (lineOBJpix<0) + continue; if(sx < 240) { u8 color = vram[address]; *************** *** 1089,1092 **** --- 1142,1149 ---- } else { for(int xx = 0; xx < sizeX; xx++) { + if (xx >= startpix) + lineOBJpix--; + if (lineOBJpix<0) + continue; if(sx < 240) { u8 color = vram[address]; *************** *** 1140,1147 **** { gfxClearArray(lineOBJWin); ! if(layerEnable & 0x8000) { u16 *sprites = (u16 *)oam; // u16 *spritePalette = &((u16 *)paletteRAM)[256]; for(int x = 0; x < 128 ; x++) { u16 a0 = READ16LE(sprites++); u16 a1 = READ16LE(sprites++); --- 1197,1205 ---- { gfxClearArray(lineOBJWin); ! if((layerEnable & 0x9000) == 0x9000) { u16 *sprites = (u16 *)oam; // u16 *spritePalette = &((u16 *)paletteRAM)[256]; for(int x = 0; x < 128 ; x++) { + int lineOBJpix = lineOBJpixleft[x]; u16 a0 = READ16LE(sprites++); u16 a1 = READ16LE(sprites++); *************** *** 1149,1207 **** sprites++; ! // ignore non OBJ-WIN ! if((a0 & 0x0c00) != 0x0800) continue; ! int sizeY = 8; ! int sizeX = 8; ! switch(((a0 >>12) & 0x0c)|(a1>>14)) { ! case 0: ! break; ! case 1: ! sizeX = sizeY = 16; ! break; ! case 2: ! sizeX = sizeY = 32; ! break; ! case 3: ! sizeX = sizeY = 64; ! break; ! case 4: ! sizeX = 16; ! break; ! case 5: ! sizeX = 32; ! break; ! case 6: ! sizeX = 32; ! sizeY = 16; ! break; ! case 7: ! sizeX = 64; ! sizeY = 32; ! break; ! case 8: ! sizeY = 16; ! break; ! case 9: ! sizeY = 32; ! break; ! case 10: ! sizeX = 16; ! sizeY = 32; ! break; ! case 11: ! sizeX = 32; ! sizeY = 64; ! break; ! default: ! continue; } int sy = (a0 & 255); - - if(sy > 160) - sy -= 256; if(a0 & 0x0100) { --- 1207,1245 ---- sprites++; ! if (lineOBJpix<=0) continue; + + // ignores non OBJ-WIN and disabled OBJ-WIN + if(((a0 & 0x0c00) != 0x0800) || ((a0 & 0x0300) == 0x0200)) + continue; + + if ((a0 & 0x0c00) == 0x0c00) + a0 &=0xF3FF; ! if ((a0>>14) == 3) ! { ! a0 &= 0x3FFF; ! a1 &= 0x3FFF; ! } ! int sizeX = 8<<(a1>>14); ! int sizeY = sizeX; ! ! if ((a0>>14) & 1) ! { ! if (sizeX<32) ! sizeX<<=1; ! if (sizeY>8) ! sizeY>>=1; ! } ! else if ((a0>>14) & 2) ! { ! if (sizeX>8) ! sizeX>>=1; ! if (sizeY<32) ! sizeY<<=1; } int sy = (a0 & 255); if(a0 & 0x0100) { *************** *** 1212,1220 **** fieldY <<= 1; } ! int t = VCOUNT - sy; if((t >= 0) && (t < fieldY)) { int sx = (a1 & 0x1FF); ! if((sx < 240) || (((sx + fieldX) & 511) < 240)) { // int t2 = t - (fieldY >> 1); int rot = (a1 >> 9) & 0x1F; --- 1250,1265 ---- fieldY <<= 1; } ! if((sy+fieldY) > 256) ! sy -= 256; int t = VCOUNT - sy; if((t >= 0) && (t < fieldY)) { int sx = (a1 & 0x1FF); ! int startpix = 0; ! if ((sx+fieldX)> 512) ! { ! startpix=512-sx; ! } ! if((sx < 240) || startpix) { ! lineOBJpix-=8; // int t2 = t - (fieldY >> 1); int rot = (a1 >> 9) & 0x1F; *************** *** 1250,1253 **** --- 1295,1302 ---- c &= 0x3FE; for(int x = 0; x < fieldX; x++) { + if (x >= startpix) + lineOBJpix-=2; + if (lineOBJpix<0) + continue; int xxx = realX >> 8; int yyy = realY >> 8; *************** *** 1264,1268 **** } } ! sx = (sx+1)&511;; realX += dx; realY += dy; --- 1313,1317 ---- } } ! sx = (sx+1)&511; realX += dx; realY += dy; *************** *** 1278,1281 **** --- 1327,1334 ---- // int palette = (a2 >> 8) & 0xF0; for(int x = 0; x < fieldX; x++) { + if (x >= startpix) + lineOBJpix-=2; + if (lineOBJpix<0) + continue; int xxx = realX >> 8; int yyy = realY >> 8; *************** *** 1287,1291 **** if(xxx < 0 || xxx >= sizeX || yyy < 0 || yyy >= sizeY || ! sx >= 240){ } else { u32 color = vram[0x10000 + ((((c + (yyy>>3) * inc)<<5) --- 1340,1344 ---- if(xxx < 0 || xxx >= sizeX || yyy < 0 || yyy >= sizeY || ! sx >= 240) { } else { u32 color = vram[0x10000 + ((((c + (yyy>>3) * inc)<<5) *************** *** 1302,1306 **** } // } ! sx = (sx+1)&511;; realX += dx; realY += dy; --- 1355,1359 ---- } // } ! sx = (sx+1)&511; realX += dx; realY += dy; *************** *** 1310,1317 **** } } else { int t = VCOUNT - sy; if((t >= 0) && (t < sizeY)) { int sx = (a1 & 0x1FF); ! if(((sx < 240)||(((sx+sizeX)&511)<240)) && !(a0 & 0x0200)) { if(a0 & 0x2000) { if(a1 & 0x2000) --- 1363,1378 ---- } } else { + if((sy+sizeY) > 256) + sy -= 256; int t = VCOUNT - sy; if((t >= 0) && (t < sizeY)) { int sx = (a1 & 0x1FF); ! int startpix = 0; ! if ((sx+sizeX)> 512) ! { ! startpix=512-sx; ! } ! if((sx < 240) || startpix) { ! lineOBJpix+=2; if(a0 & 0x2000) { if(a1 & 0x2000) *************** *** 1336,1339 **** --- 1397,1404 ---- // u32 prio = (((a2 >> 10) & 3) << 25) | ((a0 & 0x0c00)<<6); for(int xx = 0; xx < sizeX; xx++) { + if (xx >= startpix) + lineOBJpix--; + if (lineOBJpix<0) + continue; if(sx < 240) { u8 color = vram[address]; *************** *** 1385,1388 **** --- 1450,1457 ---- xxx = 7; for(int xx = sizeX - 1; xx >= 0; xx--) { + if (xx >= startpix) + lineOBJpix--; + if (lineOBJpix<0) + continue; if(sx < 240) { u8 color = vram[address]; *************** *** 1409,1412 **** --- 1478,1485 ---- } else { for(int xx = 0; xx < sizeX; xx++) { + if (xx >= startpix) + lineOBJpix--; + if (lineOBJpix<0) + continue; if(sx < 240) { u8 color = vram[address]; |
From: Pokemonhacker <pok...@us...> - 2005-07-17 18:57:26
|
Update of /cvsroot/vba/VisualBoyAdvance/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29885 Modified Files: Gfx.h Log Message: - Updated the copyright. Index: Gfx.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/Gfx.h,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** Gfx.h 17 Jul 2005 18:55:43 -0000 1.15 --- Gfx.h 17 Jul 2005 18:57:08 -0000 1.16 *************** *** 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 |
From: Pokemonhacker <pok...@us...> - 2005-07-17 18:55:53
|
Update of /cvsroot/vba/VisualBoyAdvance/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29500 Modified Files: Gfx.h Log Message: - Corrected a typo in gfxDrawRotScreen. Index: Gfx.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/Gfx.h,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** Gfx.h 14 Nov 2004 18:52:52 -0000 1.14 --- Gfx.h 17 Jul 2005 18:55:43 -0000 1.15 *************** *** 306,310 **** if(pc & 0x8000) dy |= 0xFFFF8000; ! int dmy = pd & 0x7FFFF; if(pd & 0x8000) dmy |= 0xFFFF8000; --- 306,310 ---- if(pc & 0x8000) dy |= 0xFFFF8000; ! int dmy = pd & 0x7FFF; if(pd & 0x8000) dmy |= 0xFFFF8000; *************** *** 463,467 **** if(pc & 0x8000) dy |= 0xFFFF8000; ! int dmy = pd & 0x7FFFF; if(pd & 0x8000) dmy |= 0xFFFF8000; --- 463,467 ---- if(pc & 0x8000) dy |= 0xFFFF8000; ! int dmy = pd & 0x7FFF; if(pd & 0x8000) dmy |= 0xFFFF8000; *************** *** 561,565 **** if(pc & 0x8000) dy |= 0xFFFF8000; ! int dmy = pd & 0x7FFFF; if(pd & 0x8000) dmy |= 0xFFFF8000; --- 561,565 ---- if(pc & 0x8000) dy |= 0xFFFF8000; ! int dmy = pd & 0x7FFF; if(pd & 0x8000) dmy |= 0xFFFF8000; *************** *** 662,666 **** if(pc & 0x8000) dy |= 0xFFFF8000; ! int dmy = pd & 0x7FFFF; if(pd & 0x8000) dmy |= 0xFFFF8000; --- 662,666 ---- if(pc & 0x8000) dy |= 0xFFFF8000; ! int dmy = pd & 0x7FFF; if(pd & 0x8000) dmy |= 0xFFFF8000; |
From: Pokemonhacker <pok...@us...> - 2005-06-25 06:26:43
|
Update of /cvsroot/vba/VisualBoyAdvance/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13408 Modified Files: GBA.cpp GBA.h GBAinline.h Globals.cpp Globals.h Log Message: - Cleaned the gba.cpp code a bit (too much changed to list them). - Changed all the clockticks management. Internal emulation speed should be more accurate now (fixes some games that crashed, like Advance Wars 2 or Tennis no Oojisama 2003), some other should have less slowdown/flickering (Breath of Fire 3's underwater level, Mario & Luigi Saga's intro). Added pseudo-support for bus prefetch (still need to check how it works for all the cases). - Added a 3 lines delay between the time a BG is enabled and the time it is displayed on screen (Lady Sia 2's blue lines on water level bug). - Put the supposed correct settings in DISPSTAT and lcdTicks on bootup when no bios are used (or when bios animation is skipped). (Earthworm Jim 2 now boots up). - Added a rom mirroring option in the 'Game Override' menu. Enabling it for the 'Mini'/'Classic' series makes the controls respond properly. - Bit 15 of WAITCNT is now read-only (Donkey Kong King of Swing doesn't crash on some levels anymore). - Bit 11 and 15 of SGCNT (FIFO Reset bits) are now cleared. - Corrected a bug introduced in VBA 1.8.0 which would prevent a game from accessing the 0x10000+ area of VRAM (Duke Nukem & Need for Speed 2's flickering is gone). - Added a 'pseudo-support' for GFX modes 6&7 (but no games should use them). - Soft Reset is now working properly (it was broken when the prefetch emulation was added). Index: GBA.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/GBA.cpp,v retrieving revision 1.61 retrieving revision 1.62 diff -C2 -d -r1.61 -r1.62 *** GBA.cpp 11 Jun 2005 03:17:02 -0000 1.61 --- GBA.cpp 25 Jun 2005 06:26:33 -0000 1.62 *************** *** 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 [...1314 lines suppressed...] + } + if(timer3On && !(TM3CNT & 4) && (timer3Ticks < clockTicks)) { + UPDATE_REG(0x10C, TM3D+totalTicks); + } + } } } *************** *** 4007,4011 **** // emuReadState CPUReadState, ! // emuWriteState CPUWriteState, // emuReadMemState --- 4212,4216 ---- // emuReadState CPUReadState, ! // emuWriteState CPUWriteState, // emuReadMemState Index: GBA.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/GBA.h,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** GBA.h 18 Dec 2004 23:09:56 -0000 1.20 --- GBA.h 25 Jun 2005 06:26:33 -0000 1.21 *************** *** 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 *************** *** 101,104 **** --- 101,105 ---- extern bool CPUWriteState(const char *); extern int CPULoadRom(const char *); + extern void doMirroring(bool); extern void CPUUpdateRegister(u32, u16); extern void CPUWriteHalfWord(u32, u16); *************** *** 107,111 **** extern void CPUReset(); extern void CPULoop(int); ! extern bool CPUCheckDMA(int,int); extern bool CPUIsGBAImage(const char *); extern bool CPUIsZipFile(const char *); --- 108,112 ---- extern void CPUReset(); extern void CPULoop(int); ! extern void CPUCheckDMA(int,int); extern bool CPUIsGBAImage(const char *); extern bool CPUIsZipFile(const char *); Index: GBAinline.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/GBAinline.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** GBAinline.h 18 Dec 2004 23:09:56 -0000 1.11 --- GBAinline.h 25 Jun 2005 06:26:33 -0000 1.12 *************** *** 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 *************** *** 30,34 **** extern bool cpuEEPROMSensorEnabled; extern bool cpuDmaHack; - extern bool cpuDmaHack2; extern u32 cpuDmaLast; --- 30,33 ---- *************** *** 121,125 **** #endif ! if(cpuDmaHack || cpuDmaHack2) { value = cpuDmaLast; } else { --- 120,124 ---- #endif ! if(cpuDmaHack) { value = cpuDmaLast; } else { *************** *** 235,239 **** } #endif ! if(cpuDmaHack2 || cpuDmaHack) { value = cpuDmaLast & 0xFFFF; } else { --- 234,238 ---- } #endif ! if(cpuDmaHack) { value = cpuDmaLast & 0xFFFF; } else { *************** *** 326,330 **** } #endif ! if(cpuDmaHack || cpuDmaHack2) { return cpuDmaLast & 0xFF; } else { --- 325,329 ---- } #endif ! if(cpuDmaHack) { return cpuDmaLast & 0xFF; } else { Index: Globals.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/Globals.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Globals.cpp 13 May 2004 15:06:44 -0000 1.8 --- Globals.cpp 25 Jun 2005 06:26:33 -0000 1.9 *************** *** 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 *************** *** 46,49 **** --- 46,50 ---- bool cpuEnhancedDetection = true; bool cheatsEnabled = true; + bool mirroringEnable = false; u8 *bios = NULL; Index: Globals.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/Globals.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Globals.h 13 May 2004 15:06:44 -0000 1.7 --- Globals.h 25 Jun 2005 06:26:33 -0000 1.8 *************** *** 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 *************** *** 58,61 **** --- 58,62 ---- extern bool cpuEnhancedDetection; extern bool cheatsEnabled; + extern bool mirroringEnable; extern u8 *bios; |
From: Pokemonhacker <pok...@us...> - 2005-06-25 06:24:08
|
Update of /cvsroot/vba/VisualBoyAdvance/src/win32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12327 Modified Files: MainWnd.cpp Log Message: - Fixed some crash bugs on VBA Tools when no roms were loaded. - Fixed some crash in the 'open file' menus. - Fixed a crash bug on closing VBA (it wouldn't stop emulating in some cases). - Made it that clicking on the currently used screen size now resizes the screen (before it was ignored). Can be useful if you resized the window manually by mistake. - IO Viewer : Renamed BG8VHOFS to BG2VHOFS ; made that changing the bits of a register updates the value shown on the IO Viewer ; made that clicking on 'Refresh' reloads the in-ram value of the selected register ; the checkbox of the 4th bit of SOUNDCNT_H is now disabled. - Disassemble Window : clicking on 'go' now aligns the address automatically, depending on what disassemble mode has been selected (ARM or THUMB). - Added a 'pseudo-support' for GFX modes 6&7 (but no games should use them). Index: MainWnd.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/MainWnd.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** MainWnd.cpp 18 Dec 2004 23:11:08 -0000 1.15 --- MainWnd.cpp 25 Jun 2005 06:23:59 -0000 1.16 *************** *** 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 *************** *** 426,429 **** --- 426,430 ---- void MainWnd::OnClose() { + emulating = false; CWnd::OnClose(); *************** *** 496,500 **** theApp.romSize = size; ! flashSetSize(theApp.winFlashSize); rtcEnable(theApp.winRtcEnable); --- 497,501 ---- theApp.romSize = size; ! flashSetSize(theApp.winFlashSize); rtcEnable(theApp.winRtcEnable); *************** *** 536,539 **** --- 537,546 ---- if(i != (UINT)-1 && (i <= 5)) cpuSaveType = (int)i; + i = GetPrivateProfileInt(buffer, + "mirroringEnabled", + -1, + tempName); + if(i != (UINT)-1) + doMirroring (i == 0 ? false : true); theApp.emulator = GBASystem; *************** *** 968,972 **** theApp.szFile = ""; ! LPCTSTR exts[] = { "" }; CString filter = winLoadFilter(IDS_FILTER_ROM); CString title = winResLoadString(IDS_SELECT_ROM); --- 975,979 ---- theApp.szFile = ""; ! LPCTSTR exts[] = { "", "", "" }; CString filter = winLoadFilter(IDS_FILTER_ROM); CString title = winResLoadString(IDS_SELECT_ROM); |
From: Pokemonhacker <pok...@us...> - 2005-06-25 06:23:43
|
Update of /cvsroot/vba/VisualBoyAdvance/src/win32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11978 Modified Files: Disassemble.cpp FileDlg.cpp IOViewer.cpp IOViewer.h IOViewerRegs.h MainWndFile.cpp MapView.cpp resource.h VBA.cpp vba.rc Log Message: - Fixed some crash bugs on VBA Tools when no roms were loaded. - Fixed some crash in the 'open file' menus. - Fixed a crash bug on closing VBA (it wouldn't stop emulating in some cases). - Made it that clicking on the currently used screen size now resizes the screen (before it was ignored). Can be useful if you resized the window manually by mistake. - IO Viewer : Renamed BG8VHOFS to BG2VHOFS ; made that changing the bits of a register updates the value shown on the IO Viewer ; made that clicking on 'Refresh' reloads the in-ram value of the selected register ; the checkbox of the 4th bit of SOUNDCNT_H is now disabled. - Disassemble Window : clicking on 'go' now aligns the address automatically, depending on what disassemble mode has been selected (ARM or THUMB). - Added a 'pseudo-support' for GFX modes 6&7 (but no games should use them). Index: MapView.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/MapView.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** MapView.cpp 13 May 2004 15:06:50 -0000 1.7 --- MapView.cpp 25 Jun 2005 06:23:31 -0000 1.8 *************** *** 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 *************** *** 466,469 **** --- 466,470 ---- } + void MapView::OnRefresh() { *************** *** 512,515 **** --- 513,522 ---- renderMode5(); break; + case 6: + renderMode5(); + break; + case 7: + renderMode5(); + break; } enableButtons(mode); *************** *** 760,764 **** // all text bgs (16 bits) ! if(mode == 0 ||(mode < 3 && bg < 2)) { return GetTextClickAddress(base, x, y); } --- 767,771 ---- // all text bgs (16 bits) ! if(mode == 0 ||(mode < 3 && bg < 2) || mode == 6 || mode == 7) { return GetTextClickAddress(base, x, y); } *************** *** 792,796 **** int mode = DISPCNT & 7; ! if(mode >= 3) { // bitmap modes GetDlgItem(IDC_TILE_NUM)->SetWindowText("---"); --- 799,803 ---- int mode = DISPCNT & 7; ! if(mode >= 3 && mode <=5) { // bitmap modes GetDlgItem(IDC_TILE_NUM)->SetWindowText("---"); Index: VBA.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/VBA.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** VBA.cpp 13 May 2004 15:06:55 -0000 1.11 --- VBA.cpp 25 Jun 2005 06:23:31 -0000 1.12 *************** *** 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 *************** *** 1462,1467 **** } ! if(videoOption == value && value != VIDEO_OTHER) ! return; updateWindowSize(value); --- 1462,1467 ---- } ! //if(videoOption == value && value != VIDEO_OTHER) ! // return; updateWindowSize(value); Index: IOViewerRegs.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/IOViewerRegs.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** IOViewerRegs.h 13 May 2004 15:06:50 -0000 1.2 --- IOViewerRegs.h 25 Jun 2005 06:23:31 -0000 1.3 *************** *** 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 *************** *** 259,263 **** }, { ! &BG2HOFS, 0x18, "0x4000018-BG8HOFS", 0x01FF, { "", --- 259,263 ---- }, { ! &BG2HOFS, 0x18, "0x4000018-BG2HOFS", 0x01FF, { "", *************** *** 1120,1124 **** }, { ! NULL, 0x82, "0x4000082-SGCNT0_H", 0xFF1F, { "", --- 1120,1124 ---- }, { ! NULL, 0x82, "0x4000082-SGCNT0_H", 0xFF0F, { "", Index: MainWndFile.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/MainWndFile.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** MainWndFile.cpp 14 Nov 2004 18:54:40 -0000 1.9 --- MainWndFile.cpp 25 Jun 2005 06:23:31 -0000 1.10 *************** *** 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 *************** *** 169,173 **** theApp.szFile = ""; ! LPCTSTR exts[] = { "" }; CString filter = winLoadFilter(IDS_FILTER_GBROM); CString title = winResLoadString(IDS_SELECT_ROM); --- 169,173 ---- theApp.szFile = ""; ! LPCTSTR exts[] = { "", "", "", "" }; CString filter = winLoadFilter(IDS_FILTER_GBROM); CString title = winResLoadString(IDS_SELECT_ROM); *************** *** 422,426 **** { theApp.winCheckFullscreen(); ! LPCTSTR exts[] = { "" }; CString filter = theApp.cartridgeType == 1 ? winLoadFilter(IDS_FILTER_GBS) : winLoadFilter(IDS_FILTER_SPS); CString title = winResLoadString(IDS_SELECT_SNAPSHOT_FILE); --- 422,426 ---- { theApp.winCheckFullscreen(); ! LPCTSTR exts[] = { ".gbs" }; CString filter = theApp.cartridgeType == 1 ? winLoadFilter(IDS_FILTER_GBS) : winLoadFilter(IDS_FILTER_SPS); CString title = winResLoadString(IDS_SELECT_SNAPSHOT_FILE); *************** *** 566,570 **** CString capdir = regQueryStringValue("captureDir", ""); if(capdir.IsEmpty()) ! capdir = getDirFromFile(name); CString ext = "png"; --- 566,570 ---- CString capdir = regQueryStringValue("captureDir", ""); if(capdir.IsEmpty()) ! capdir = getDirFromFile(theApp.filename); CString ext = "png"; Index: vba.rc =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/vba.rc,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** vba.rc 18 Dec 2004 23:11:08 -0000 1.49 --- vba.rc 25 Jun 2005 06:23:31 -0000 1.50 *************** *** 1202,1206 **** END ! IDD_GAME_OVERRIDES DIALOG DISCARDABLE 0, 0, 271, 118 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Game overrides" --- 1202,1206 ---- END ! IDD_GAME_OVERRIDES DIALOG DISCARDABLE 0, 0, 271, 138 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Game overrides" *************** *** 1213,1219 **** COMBOBOX IDC_FLASH_SIZE,152,76,112,12,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP ! DEFPUSHBUTTON "OK",IDOK,7,97,50,14 ! PUSHBUTTON "Defaults",IDC_DEFAULTS,110,97,50,14 ! PUSHBUTTON "Cancel",IDCANCEL,213,97,50,14 LTEXT "Overrides for game:",IDC_STATIC,7,17,140,8 EDITTEXT IDC_NAME,152,15,112,14,ES_AUTOHSCROLL | WS_DISABLED --- 1213,1221 ---- COMBOBOX IDC_FLASH_SIZE,152,76,112,12,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP ! COMBOBOX IDC_MIRRORING,152,97,112,12,CBS_DROPDOWNLIST | ! WS_VSCROLL | WS_TABSTOP ! DEFPUSHBUTTON "OK",IDOK,7,117,50,14 ! PUSHBUTTON "Defaults",IDC_DEFAULTS,110,117,50,14 ! PUSHBUTTON "Cancel",IDCANCEL,213,117,50,14 LTEXT "Overrides for game:",IDC_STATIC,7,17,140,8 EDITTEXT IDC_NAME,152,15,112,14,ES_AUTOHSCROLL | WS_DISABLED *************** *** 1221,1224 **** --- 1223,1227 ---- LTEXT "Save Type:",IDC_STATIC,7,57,140,8 LTEXT "Flash Size:",IDC_STATIC,7,77,140,8 + LTEXT "Mirroring:",IDC_STATIC,7,97,140,8 END Index: FileDlg.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/FileDlg.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** FileDlg.cpp 13 May 2004 15:06:49 -0000 1.5 --- FileDlg.cpp 25 Jun 2005 06:23:31 -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 *************** *** 19,23 **** // FileDlg.cpp: implementation of the FileDlg class. // ! ////////////////////////////////////////////////////////////////////// #include "stdafx.h" #include <commdlg.h> --- 19,23 ---- // FileDlg.cpp: implementation of the FileDlg class. // ! #include "stdafx.h" #include <commdlg.h> *************** *** 167,177 **** if(filename.GetLength() == 0) { ! filename.Format("*%s", typeName); } else { ! int index = filename.Find('.'); ! if (index == -1) { ! filename = filename + typeName; ! } else { ! filename = filename.Left(index) + typeName; } } --- 167,180 ---- if(filename.GetLength() == 0) { ! if(strlen(typeName) != 0) ! filename.Format("*%s", typeName); } else { ! if(strlen(typeName) != 0) { ! int index = filename.Find('.'); ! if (index == -1) { ! filename = filename + typeName; ! } else { ! filename = filename.Left(index) + typeName; ! } } } Index: resource.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/resource.h,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** resource.h 18 Dec 2004 23:11:08 -0000 1.38 --- resource.h 25 Jun 2005 06:23:31 -0000 1.39 *************** *** 505,508 **** --- 505,509 ---- #define IDC_BIT_14 1264 #define IDC_BIT_15 1265 + #define IDC_MIRRORING 1266 #define ID_HELP_ABOUT 40001 #define ID_FILE_EXIT 40002 Index: IOViewer.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/IOViewer.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** IOViewer.h 13 May 2004 15:06:50 -0000 1.2 --- IOViewer.h 25 Jun 2005 06:23:31 -0000 1.3 *************** *** 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 *************** *** 38,41 **** --- 38,42 ---- public: void update(); + void bitChange(); bool autoUpdate; int selected; Index: Disassemble.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/Disassemble.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Disassemble.cpp 13 May 2004 15:06:49 -0000 1.3 --- Disassemble.cpp 25 Jun 2005 06:23:31 -0000 1.4 *************** *** 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 *************** *** 119,122 **** --- 119,123 ---- { mode = 1; + address&=0xfffffffC; refresh(); } *************** *** 134,137 **** --- 135,142 ---- m_address.GetWindowText(buffer); sscanf(buffer, "%x", &address); + if (mode==1) + address&=0xfffffffc; + else if (mode==2) + address&=0xfffffffe; refresh(); } *************** *** 139,142 **** --- 144,149 ---- void Disassemble::OnGopc() { + if(rom != NULL) + { if(armState) address = armNextPC - 16; *************** *** 145,152 **** --- 152,162 ---- refresh(); + } } void Disassemble::OnNext() { + if(rom != NULL) + { CPULoop(1); if(armState) { *************** *** 164,167 **** --- 174,178 ---- } refresh(); + } } *************** *** 174,177 **** --- 185,189 ---- { mode = 2; + address&=0xfffffffe; refresh(); } Index: IOViewer.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/IOViewer.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** IOViewer.cpp 13 May 2004 15:06:50 -0000 1.2 --- IOViewer.cpp 25 Jun 2005 06:23:31 -0000 1.3 *************** *** 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 *************** *** 68,71 **** --- 68,87 ---- ON_CBN_SELCHANGE(IDC_ADDRESSES, OnSelchangeAddresses) ON_BN_CLICKED(IDC_APPLY, OnApply) + ON_BN_CLICKED(IDC_BIT_0, bitChange) + ON_BN_CLICKED(IDC_BIT_1, bitChange) + ON_BN_CLICKED(IDC_BIT_2, bitChange) + ON_BN_CLICKED(IDC_BIT_3, bitChange) + ON_BN_CLICKED(IDC_BIT_4, bitChange) + ON_BN_CLICKED(IDC_BIT_5, bitChange) + ON_BN_CLICKED(IDC_BIT_6, bitChange) + ON_BN_CLICKED(IDC_BIT_7, bitChange) + ON_BN_CLICKED(IDC_BIT_8, bitChange) + ON_BN_CLICKED(IDC_BIT_9, bitChange) + ON_BN_CLICKED(IDC_BIT_10, bitChange) + ON_BN_CLICKED(IDC_BIT_11, bitChange) + ON_BN_CLICKED(IDC_BIT_12, bitChange) + ON_BN_CLICKED(IDC_BIT_13, bitChange) + ON_BN_CLICKED(IDC_BIT_14, bitChange) + ON_BN_CLICKED(IDC_BIT_15, bitChange) //}}AFX_MSG_MAP END_MESSAGE_MAP() *************** *** 81,88 **** } void IOViewer::OnRefresh() { // TODO: Add your control notification handler code here ! } --- 97,123 ---- } + void IOViewer::bitChange() + { + CString buffer; + u16 data = 0; + + for(int i = 0; i < 16; i++) { + CButton *pWnd = (CButton *)GetDlgItem(IDC_BIT_0 + i); + + if(pWnd) { + if(pWnd->GetCheck()) + data |= (1 << i); + } + } + + buffer.Format("%04X", data); + m_value.SetWindowText(buffer); + } + void IOViewer::OnRefresh() { // TODO: Add your control notification handler code here ! ! update(); } *************** *** 187,190 **** --- 222,227 ---- void IOViewer::OnApply() { + if(rom != NULL) + { const IOData *sel = &ioViewRegisters[selected]; u16 res = 0; *************** *** 199,201 **** --- 236,239 ---- CPUWriteHalfWord(0x4000000+sel->offset, res); update(); + } } |
From: Pokemonhacker <pok...@us...> - 2005-06-25 06:19:13
|
Update of /cvsroot/vba/VisualBoyAdvance/src/win32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9829 Modified Files: GameOverrides.cpp GameOverrides.h Log Message: - Added support for the new 'mirroringEnabled' option in vba-over.ini Index: GameOverrides.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/GameOverrides.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** GameOverrides.h 6 Nov 2004 14:19:56 -0000 1.1 --- GameOverrides.h 25 Jun 2005 06:19:04 -0000 1.2 *************** *** 1,2 **** --- 1,20 ---- + // 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 + // 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. + #if !defined(AFX_GAMEOVERRIDES_H__EEEFE37F_F477_455D_8682_705FB2DBCC0C__INCLUDED_) #define AFX_GAMEOVERRIDES_H__EEEFE37F_F477_455D_8682_705FB2DBCC0C__INCLUDED_ *************** *** 21,24 **** --- 39,43 ---- enum { IDD = IDD_GAME_OVERRIDES }; CEdit m_name; + CComboBox m_mirroring; CComboBox m_flashSize; CComboBox m_saveType; Index: GameOverrides.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/GameOverrides.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** GameOverrides.cpp 6 Nov 2004 14:19:40 -0000 1.1 --- GameOverrides.cpp 25 Jun 2005 06:19:04 -0000 1.2 *************** *** 1,2 **** --- 1,20 ---- + // 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 + // 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. + // GameOverrides.cpp : implementation file // *************** *** 31,34 **** --- 49,53 ---- //{{AFX_DATA_MAP(GameOverrides) DDX_Control(pDX, IDC_NAME, m_name); + DDX_Control(pDX, IDC_MIRRORING, m_mirroring); DDX_Control(pDX, IDC_FLASH_SIZE, m_flashSize); DDX_Control(pDX, IDC_SAVE_TYPE, m_saveType); *************** *** 66,70 **** int flash = m_flashSize.GetCurSel(); int save = m_saveType.GetCurSel(); ! if(rtc == 0 && flash == 0 && save == 0) WritePrivateProfileString(buffer, NULL, NULL, tempName); else { --- 85,90 ---- int flash = m_flashSize.GetCurSel(); int save = m_saveType.GetCurSel(); ! int mirroring = m_mirroring.GetCurSel(); ! if(rtc == 0 && flash == 0 && save == 0 && mirroring == 0) WritePrivateProfileString(buffer, NULL, NULL, tempName); else { *************** *** 111,114 **** --- 131,144 ---- } WritePrivateProfileString(buffer, "saveType", value, tempName); + value = NULL; + switch(mirroring) { + case 1: + value = "0"; + break; + case 2: + value = "1"; + break; + } + WritePrivateProfileString(buffer, "mirroringEnabled", value, tempName); } CDialog::OnOK(); *************** *** 120,123 **** --- 150,154 ---- m_flashSize.SetCurSel(0); m_saveType.SetCurSel(0); + m_mirroring.SetCurSel(0); } *************** *** 152,155 **** --- 183,191 ---- "None" }; + const char *mirroringValues[] = { + "Default", + "Disabled", + "Enabled" + }; int i; *************** *** 164,168 **** m_saveType.AddString(saveValues[i]); } ! GetModuleFileName(NULL, tempName, 2048); --- 200,207 ---- m_saveType.AddString(saveValues[i]); } ! for(i = 0; i < 3; i++) { ! m_mirroring.AddString(mirroringValues[i]); ! } ! GetModuleFileName(NULL, tempName, 2048); *************** *** 219,222 **** --- 258,276 ---- m_saveType.SetCurSel(0); + v = GetPrivateProfileInt(buffer, + "mirroringEnabled", + -1, + tempName); + switch(v) { + case 0: + m_mirroring.SetCurSel(1); + break; + case 1: + m_mirroring.SetCurSel(2); + break; + default: + m_mirroring.SetCurSel(0); + } + return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE |
From: Pokemonhacker <pok...@us...> - 2005-06-25 06:18:43
|
Update of /cvsroot/vba/VisualBoyAdvance/src/win32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9688 Modified Files: BugReport.cpp Log Message: - Added support for the new 'mirroringEnabled' option in vba-over.ini Index: BugReport.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/BugReport.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** BugReport.cpp 13 May 2004 15:06:49 -0000 1.3 --- BugReport.cpp 25 Jun 2005 06:18:35 -0000 1.4 *************** *** 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 *************** *** 228,231 **** --- 228,232 ---- AppendFormat(report, "Blue shift : %08x\r\n", systemBlueShift); AppendFormat(report, "Layer setting: %04X\r\n", layerSettings); + AppendFormat(report, "Mirroring : %d\r\n", mirroringEnable); AppendFormat(report, "Save type : %d (%d)\r\n", theApp.winSaveType, cpuSaveType); |
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; |
From: Pokemonhacker <pok...@us...> - 2005-06-25 06:16:13
|
Update of /cvsroot/vba/VisualBoyAdvance/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8618 Modified Files: Sound.cpp Log Message: - Corrected some small typos in sound.cpp. Index: Sound.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/Sound.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** Sound.cpp 18 Dec 2004 23:09:56 -0000 1.15 --- Sound.cpp 25 Jun 2005 06:16:05 -0000 1.16 *************** *** 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 *************** *** 30,34 **** extern bool stopState; - extern bool cpuDmaHack2; u8 soundWavePattern[4][32] = { --- 30,33 ---- *************** *** 389,394 **** sound2On = 1; } ! break; ! ioMem[address] = data; case NR30: data &= 0xe0; --- 388,393 ---- sound2On = 1; } ! ioMem[address] = data; ! break; case NR30: data &= 0xe0; *************** *** 543,547 **** case SGCNT0_H: data &= 0xFF0F; ! soundControl = data & 0x770F;; if(data & 0x0800) { soundDSFifoAWriteIndex = 0; --- 542,546 ---- case SGCNT0_H: data &= 0xFF0F; ! soundControl = data & 0x770F; if(data & 0x0800) { soundDSFifoAWriteIndex = 0; *************** *** 562,566 **** soundDSBEnabled = (data & 0x3000) ? true : false; soundDSBTimer = (data & 0x4000) ? 1 : 0; ! *((u16 *)&ioMem[address]) = data; break; case FIFOA_L: --- 561,565 ---- soundDSBEnabled = (data & 0x3000) ? true : false; soundDSBTimer = (data & 0x4000) ? 1 : 0; ! *((u16 *)&ioMem[address]) = soundControl; break; case FIFOA_L: *************** *** 853,857 **** if(soundDSAEnabled) { if(soundDSFifoACount <= 16) { ! cpuDmaHack2 = CPUCheckDMA(3, 2); if(soundDSFifoACount <= 16) { soundEvent(FIFOA_L, (u16)0); --- 852,856 ---- if(soundDSAEnabled) { if(soundDSFifoACount <= 16) { ! CPUCheckDMA(3, 2); if(soundDSFifoACount <= 16) { soundEvent(FIFOA_L, (u16)0); *************** *** 882,886 **** if(soundDSBEnabled) { if(soundDSFifoBCount <= 16) { ! cpuDmaHack2 = CPUCheckDMA(3, 4); if(soundDSFifoBCount <= 16) { soundEvent(FIFOB_L, (u16)0); --- 881,885 ---- if(soundDSBEnabled) { if(soundDSFifoBCount <= 16) { ! CPUCheckDMA(3, 4); if(soundDSFifoBCount <= 16) { soundEvent(FIFOB_L, (u16)0); |
From: Pokemonhacker <pok...@us...> - 2005-06-25 06:15:48
|
Update of /cvsroot/vba/VisualBoyAdvance/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8431 Modified Files: EEprom.cpp EEprom.h Log Message: - Now a newly created Eeprom is filled with 0xFFs (fixes Tetris Advance's highscores reading crash). Index: EEprom.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/EEprom.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** EEprom.h 13 May 2004 15:06:43 -0000 1.2 --- EEprom.h 25 Jun 2005 06:15:34 -0000 1.3 *************** *** 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 *************** *** 25,28 **** --- 25,29 ---- extern int eepromRead(u32 address); extern void eepromWrite(u32 address, u8 value); + extern void eepromInit(); extern void eepromReset(); extern u8 eepromData[0x2000]; Index: EEprom.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/EEprom.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** EEprom.cpp 13 May 2004 15:06:43 -0000 1.6 --- EEprom.cpp 25 Jun 2005 06:15:34 -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 *************** *** 17,20 **** --- 17,21 ---- // Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + #include <memory.h> #include "GBA.h" #include "EEprom.h" *************** *** 43,46 **** --- 44,52 ---- }; + void eepromInit() + { + memset(eepromData, 255, sizeof(eepromData)); + } + void eepromReset() { |
From: Pokemonhacker <pok...@us...> - 2005-06-25 06:15:08
|
Update of /cvsroot/vba/VisualBoyAdvance/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8093 Modified Files: Cheats.cpp Log Message: - Added a very basic master code support for AR/GS/GSA/CB. It only works for arm/thumb branches (ie. 95%+ of the (m) codes). Useful for cheatcodes that need to be enable at a specific instruction (like Pokemon cheatcodes). Only one master code can be enabled (the last one on the list is enabled, the other are disabled). If no (m) codes are entered (or if they are all disabled), VBA executed the cheats on each LCD line (like it used to be on the other versions). But we strongly recommend that, from now on, you enter the full (m) code and ID code when they are avaible, to prevent any crash due from codes not working properly. - Now the VBA 16/32bits 'Codes...' accept any 'valid' memory area (from 0x02 to 0x0D). If you miss the ability to enable more than 3 GSA Rom Patching Codes (VBA 1.7.2), or to use CBA codes that could change the ROM area, you just have now to use 'Codes...' to reproduct these effects. And the VBA 8bits 'Codes...' can now access the 0x02-0x07 memory range. Index: Cheats.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/Cheats.cpp,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** Cheats.cpp 18 Dec 2004 23:09:56 -0000 1.25 --- Cheats.cpp 25 Jun 2005 06:14:57 -0000 1.26 *************** *** 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 *************** *** 193,196 **** --- 193,199 ---- #define GSA_16_BIT_MIF_LOWER_OR_EQ_U 110 #define GSA_16_BIT_MIF_HIGHER_OR_EQ_U 111 + #define MASTER_CODE 112 + #define CHEATS_16_BIT_WRITE 114 + #define CHEATS_32_BIT_WRITE 115 CheatsData cheatsList[100]; *************** *** 206,209 **** --- 209,213 ---- bool cheatsCBATableGenerated = false; u16 super = 0; + extern u32 mastercode; u8 cheatsCBACurrentSeed[12] = { *************** *** 316,320 **** #define CHEAT_PATCH_ROM_16BIT(a,v) \ ! WRITE16LE(((u16 *)&rom[(a) & 0x1ffffff]), v); static bool isMultilineWithData(int i) --- 320,327 ---- #define CHEAT_PATCH_ROM_16BIT(a,v) \ ! WRITE16LE(((u16 *)&rom[(a) & 0x1ffffff]), v); ! ! #define CHEAT_PATCH_ROM_32BIT(a,v) \ ! WRITE32LE(((u32 *)&rom[(a) & 0x1ffffff]), v); static bool isMultilineWithData(int i) *************** *** 435,438 **** --- 442,448 ---- case GSA_16_BIT_MIF_LOWER_OR_EQ_U: case GSA_16_BIT_MIF_HIGHER_OR_EQ_U: + case MASTER_CODE: + case CHEATS_16_BIT_WRITE: + case CHEATS_32_BIT_WRITE: return false; // the codes below have two lines of data *************** *** 559,562 **** --- 569,575 ---- case GSA_16_BIT_MIF_LOWER_OR_EQ_U: case GSA_16_BIT_MIF_HIGHER_OR_EQ_U: + case MASTER_CODE: + case CHEATS_16_BIT_WRITE: + case CHEATS_32_BIT_WRITE: return 1; case CBA_IF_KEYS_PRESSED: *************** *** 572,577 **** { bool onoff = true; ! int ticks = 1; int i; for (i = 0; i<4; i++) if (rompatch2addr [i] != 0) { --- 585,592 ---- { bool onoff = true; ! int ticks = 0; int i; + mastercode = 0; + for (i = 0; i<4; i++) if (rompatch2addr [i] != 0) { *************** *** 713,716 **** --- 728,734 ---- i++; break; + case MASTER_CODE: + mastercode = cheatsList[i].address; + break; } if (onoff) { *************** *** 1290,1293 **** --- 1308,1325 ---- } break; + case CHEATS_16_BIT_WRITE: + if ((cheatsList[i].address>>24)>=0x08) { + CHEAT_PATCH_ROM_16BIT(cheatsList[i].address, cheatsList[i].value); + } else { + CPUWriteHalfWord(cheatsList[i].address, cheatsList[i].value); + } + break; + case CHEATS_32_BIT_WRITE: + if ((cheatsList[i].address>>24)>=0x08) { + CHEAT_PATCH_ROM_32BIT(cheatsList[i].address, cheatsList[i].value); + } else { + CPUWriteMemory(cheatsList[i].address, cheatsList[i].value); + } + break; } } *************** *** 1331,1334 **** --- 1363,1372 ---- cheatsList[x].oldValue = CPUReadMemory(address); break; + case CHEATS_16_BIT_WRITE: + cheatsList[x].oldValue = CPUReadHalfWord(address); + break; + case CHEATS_32_BIT_WRITE: + cheatsList[x].oldValue = CPUReadMemory(address); + break; } cheatsNumber++; *************** *** 1352,1355 **** --- 1390,1406 ---- CPUWriteMemory(cheatsList[x].address, cheatsList[x].oldValue); break; + case CHEATS_16_BIT_WRITE: + if ((cheatsList[x].address>>24)>=0x08) { + CHEAT_PATCH_ROM_16BIT(cheatsList[x].address, cheatsList[x].oldValue); + } else { + CPUWriteHalfWord(cheatsList[x].address, cheatsList[x].oldValue); + } + break; + case CHEATS_32_BIT_WRITE: + if ((cheatsList[x].address>>24)>=0x08) { + CHEAT_PATCH_ROM_32BIT(cheatsList[x].address, cheatsList[x].oldValue); + } else { + CPUWriteMemory(cheatsList[x].address, cheatsList[x].oldValue); + } case GSA_16_BIT_ROM_PATCH: if(cheatsList[x].status & 1) { *************** *** 1360,1370 **** break; case GSA_16_BIT_ROM_PATCH2C: ! case GSA_16_BIT_ROM_PATCH2D: ! case GSA_16_BIT_ROM_PATCH2E: ! case GSA_16_BIT_ROM_PATCH2F: if(cheatsList[x].status & 1) { cheatsList[x].status &= ~1; } break; } } --- 1411,1424 ---- break; case GSA_16_BIT_ROM_PATCH2C: ! case GSA_16_BIT_ROM_PATCH2D: ! case GSA_16_BIT_ROM_PATCH2E: ! case GSA_16_BIT_ROM_PATCH2F: if(cheatsList[x].status & 1) { cheatsList[x].status &= ~1; } break; + case MASTER_CODE: + mastercode=0; + break; } } *************** *** 1388,1391 **** --- 1442,1446 ---- if(i >= 0 && i < cheatsNumber) { cheatsList[i].enabled = true; + mastercode = 0; } } *************** *** 1410,1413 **** --- 1465,1471 ---- } break; + case MASTER_CODE: + mastercode=0; + break; } cheatsList[i].enabled = false; *************** *** 1455,1460 **** switch(address >> 24) { ! case 2: ! case 3: break; default: --- 1513,1528 ---- switch(address >> 24) { ! case 0x02: ! case 0x03: ! case 0x04: ! case 0x05: ! case 0x06: ! case 0x07: ! case 0x08: ! case 0x09: ! case 0x0A: ! case 0x0B: ! case 0x0C: ! case 0x0D: break; default: *************** *** 1469,1475 **** int type = 0; if(len == 13) ! type = 1; if(len == 17) ! type = 2; cheatsAdd(code, desc, address, address, value, type, type); return true; --- 1537,1543 ---- int type = 0; if(len == 13) ! type = 114; if(len == 17) ! type = 115; cheatsAdd(code, desc, address, address, value, type, type); return true; *************** *** 1588,1591 **** --- 1656,1668 ---- int type = ((address >> 25) & 127) | ((address >> 17) & 0x80); u32 addr = (address & 0x00F00000) << 4 | (address & 0x0003FFFF); + u16 mcode = (address>>24 & 0xFF); + + if ((mcode & 0xFE) == 0xC4) + { + cheatsAdd(code, desc, address, (address & 0x1FFFFFF) | (0x08000000), + value, 257, MASTER_CODE); + mastercode = (address & 0x1FFFFFF) | (0x08000000); + } + else switch(type) { case 0x00: *************** *** 1802,1806 **** cheatsAdd(code, desc, address, addr, value, 257, GSA_32_BIT_IF_TRUE3); break; ! case 0x47: cheatsAdd(code, desc, address, addr, value, 257, GSA_ALWAYS3); break; --- 1879,1883 ---- cheatsAdd(code, desc, address, addr, value, 257, GSA_32_BIT_IF_TRUE3); break; ! case 0x47: cheatsAdd(code, desc, address, addr, value, 257, GSA_ALWAYS3); break; *************** *** 1933,1937 **** cheatsAdd(code, desc, address, address & 0x0F0FFFFF, 0, 256, GSA_32_BIT_GS_WRITE); ! break; case 15: cheatsAdd(code, desc, address, 0, value & 0xFFFF, 256, GSA_SLOWDOWN); --- 2010,2014 ---- cheatsAdd(code, desc, address, address & 0x0F0FFFFF, 0, 256, GSA_32_BIT_GS_WRITE); ! break; case 15: cheatsAdd(code, desc, address, 0, value & 0xFFFF, 256, GSA_SLOWDOWN); *************** *** 1996,2002 **** UNKNOWN_CODE); break; ! } ! break; ! default: // unsupported code cheatsAdd(code, desc, address, address, value, 256, --- 2073,2083 ---- UNKNOWN_CODE); break; ! } ! break; ! case 0x0f: ! cheatsAdd(code, desc, address, (address & 0xFFFFFFF), value, 256, MASTER_CODE); ! mastercode = (address & 0xFFFFFFF); ! break; ! default: // unsupported code cheatsAdd(code, desc, address, address, value, 256, *************** *** 2467,2470 **** --- 2548,2555 ---- } break; + case 0x01: + cheatsAdd(code, desc, address, (address & 0x1FFFFFF) | 0x08000000, value, 512, MASTER_CODE); + mastercode = (address & 0x1FFFFFF) | 0x08000000; + break; case 0x02: cheatsAdd(code, desc, address, address & 0x0FFFFFFE, value, 512, |
From: Pokemonhacker <pok...@us...> - 2005-06-25 06:14:17
|
Update of /cvsroot/vba/VisualBoyAdvance/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7685 Modified Files: bios.cpp Log Message: - Corrected a bug in RLUnCompVram/RLUnCompWram. Reading of the header is now correctly done when the header's address is not aligned (Mortal Kombat 2's fire animation now shows properly). - CPUSet/CPUFastset : Added emulation for bios reading from bios area (just in case some games would want to use it). Index: bios.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/bios.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** bios.cpp 7 Jun 2005 10:19:26 -0000 1.16 --- bios.cpp 25 Jun 2005 06:14:08 -0000 1.17 *************** *** 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 *************** *** 279,283 **** // fill ? if((cnt >> 24) & 1) { ! u32 value = CPUReadMemory(source); while(count) { CPUWriteMemory(dest, value); --- 279,283 ---- // fill ? if((cnt >> 24) & 1) { ! u32 value = (source>0x0EFFFFFF ? 0x1CAD1CAD : CPUReadMemory(source)); while(count) { CPUWriteMemory(dest, value); *************** *** 288,292 **** // copy while(count) { ! CPUWriteMemory(dest, CPUReadMemory(source)); source += 4; dest += 4; --- 288,292 ---- // copy while(count) { ! CPUWriteMemory(dest, (source>0x0EFFFFFF ? 0x1CAD1CAD : CPUReadMemory(source))); source += 4; dest += 4; *************** *** 297,301 **** // 16-bit fill? if((cnt >> 24) & 1) { ! u16 value = CPUReadHalfWord(source); while(count) { CPUWriteHalfWord(dest, value); --- 297,301 ---- // 16-bit fill? if((cnt >> 24) & 1) { ! u16 value = (source>0x0EFFFFFF ? 0x1CAD : CPUReadHalfWord(source)); while(count) { CPUWriteHalfWord(dest, value); *************** *** 306,310 **** // copy while(count) { ! CPUWriteHalfWord(dest, CPUReadHalfWord(source)); source += 2; dest += 2; --- 306,310 ---- // copy while(count) { ! CPUWriteHalfWord(dest, (source>0x0EFFFFFF ? 0x1CAD : CPUReadHalfWord(source))); source += 2; dest += 2; *************** *** 342,346 **** while(count > 0) { // BIOS always transfers 32 bytes at a time ! u32 value = CPUReadMemory(source); for(int i = 0; i < 8; i++) { CPUWriteMemory(dest, value); --- 342,346 ---- while(count > 0) { // BIOS always transfers 32 bytes at a time ! u32 value = (source>0x0EFFFFFF ? 0xBAFFFFFB : CPUReadMemory(source)); for(int i = 0; i < 8; i++) { CPUWriteMemory(dest, value); *************** *** 354,358 **** // BIOS always transfers 32 bytes at a time for(int i = 0; i < 8; i++) { ! CPUWriteMemory(dest, CPUReadMemory(source)); source += 4; dest += 4; --- 354,358 ---- // BIOS always transfers 32 bytes at a time for(int i = 0; i < 8; i++) { ! CPUWriteMemory(dest, (source>0x0EFFFFFF ? 0xBAFFFFFB :CPUReadMemory(source))); source += 4; dest += 4; *************** *** 964,968 **** u32 dest = reg[1].I; ! u32 header = CPUReadMemory(source); source += 4; --- 964,968 ---- u32 dest = reg[1].I; ! u32 header = CPUReadMemory(source & 0xFFFFFFFC); source += 4; *************** *** 1033,1037 **** u32 dest = reg[1].I; ! u32 header = CPUReadMemory(source); source += 4; --- 1033,1037 ---- u32 dest = reg[1].I; ! u32 header = CPUReadMemory(source & 0xFFFFFFFC); source += 4; |
From: Pokemonhacker <pok...@us...> - 2005-06-25 06:12:35
|
Update of /cvsroot/vba/VisualBoyAdvance/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6825 Modified Files: thumb.h Log Message: - Changed all the clockticks management. Internal emulation speed should be more accurate now (fixes some games that crashed, like Advance Wars 2 or Tennis no Oojisama 2003), some other should have less slowdown/flickering (Breath of Fire 3's underwater level, Mario & Luigi Saga's intro). Added pseudo-support for bus prefetch (still need to check how it works for all the cases). Index: thumb.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/thumb.h,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** thumb.h 19 Nov 2004 01:08:32 -0000 1.13 --- thumb.h 25 Jun 2005 06:12:26 -0000 1.14 *************** *** 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 [...1565 lines suppressed...] break; *************** *** 2466,2469 **** --- 2634,2639 ---- reg[14].I = temp|1; THUMB_PREFETCH; + busPrefetchCount=0; + clockTicks += 2*codeTicksAccessSeq16(armNextPC) + codeTicksAccess16(armNextPC)+3; } break; *************** *** 2499,2501 **** CPUUndefinedException(); break; ! } --- 2669,2671 ---- CPUUndefinedException(); break; ! } \ No newline at end of file |
From: Pokemonhacker <pok...@us...> - 2005-06-25 06:12:06
|
Update of /cvsroot/vba/VisualBoyAdvance/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6577 Modified Files: arm-new.h Log Message: - Changed all the clockticks management. Internal emulation speed should be more accurate now (fixes some games that crashed, like Advance Wars 2 or Tennis no Oojisama 2003), some other should have less slowdown/flickering (Breath of Fire 3's underwater level, Mario & Luigi Saga's intro). Added pseudo-support for bus prefetch (still need to check how it works for all the cases). Index: arm-new.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/arm-new.h,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** arm-new.h 19 Nov 2004 01:08:32 -0000 1.14 --- arm-new.h 25 Jun 2005 06:11:56 -0000 1.15 *************** *** 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 [...7854 lines suppressed...] ! CPUSoftwareInterrupt(opcode & 0x00FFFFFF); break; #ifdef GP_SUPPORT --- 8310,8325 ---- reg[15].I += 4; ARM_PREFETCH; + clockTicks += 2 + codeTicksAccess32(armNextPC) + + codeTicksAccessSeq32(armNextPC); + busPrefetchCount=0; } break; CASE_256(0xf00) // SWI <comment> ! busPrefetchCount=0; ! clockTicks += 2 + codeTicksAccess32(armNextPC) + ! codeTicksAccessSeq32(armNextPC); ! CPUSoftwareInterrupt(opcode & 0x00FFFFFF); ! break; #ifdef GP_SUPPORT |
From: Pokemonhacker <pok...@us...> - 2005-06-10 20:14:15
|
Update of /cvsroot/vba/VisualBoyAdvance/src/sdl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1003 Modified Files: debugger.cpp Log Message: - Corrected a crash bug in save/load savestates commands. Index: debugger.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/sdl/debugger.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** debugger.cpp 20 Dec 2004 15:03:13 -0000 1.5 --- debugger.cpp 10 Jun 2005 20:14:04 -0000 1.6 *************** *** 1722,1730 **** { int num; ! ! sscanf(args[1],"%d",&num); ! ! if(num > 0 && num < 11) ! sdlWriteState(num-1); else debuggerUsage("save"); --- 1722,1733 ---- { int num; ! ! if(n == 2) { ! sscanf(args[1],"%d",&num); ! if(num > 0 && num < 11) ! sdlWriteState(num-1); ! else ! debuggerUsage("save"); ! } else debuggerUsage("save"); *************** *** 1734,1742 **** { int num; ! ! sscanf(args[1],"%d",&num); ! ! if(num > 0 && num < 11) ! sdlReadState(num-1); else debuggerUsage("load"); --- 1737,1748 ---- { int num; ! ! if(n == 2) { ! sscanf(args[1],"%d",&num); ! if(num > 0 && num < 11) ! sdlReadState(num-1); ! else ! debuggerUsage("load"); ! } else debuggerUsage("load"); |