all repos — mgba @ 7353092b846bbe9032e418ec3fe9282e0ce5d9aa

mGBA Game Boy Advance Emulator

Merge branch 'master' into qt
Jeffrey Pfau jeffrey@endrift.com
Wed, 15 Oct 2014 02:49:22 -0700
commit

7353092b846bbe9032e418ec3fe9282e0ce5d9aa

parent

49b676fa7e8b60969467fab64bf1f4cf10638a72

4 files changed, 8 insertions(+), 5 deletions(-)

jump to
M src/gba/gba.csrc/gba/gba.c

@@ -124,6 +124,7 @@ gba->debugger = 0;

GBAInterruptHandlerInit(&cpu->irqh); GBAMemoryInit(gba); + GBASavedataInit(&gba->memory.savedata, 0); gba->video.p = gba; GBAVideoInit(&gba->video);

@@ -151,6 +152,8 @@

gba->logLevel = GBA_LOG_INFO | GBA_LOG_WARN | GBA_LOG_ERROR | GBA_LOG_FATAL; gba->biosChecksum = GBAChecksum(gba->memory.bios, SIZE_BIOS); + + gba->busyLoop = -1; } void GBADestroy(struct GBA* gba) {

@@ -403,7 +406,7 @@ gba->pristineRom = vf->map(vf, SIZE_CART0, MAP_READ);

gba->memory.rom = gba->pristineRom; gba->activeFile = fname; gba->memory.romSize = gba->pristineRomSize; - gba->romCrc32 = crc32(gba->memory.rom, gba->memory.romSize); + gba->romCrc32 = doCrc32(gba->memory.rom, gba->memory.romSize); GBASavedataInit(&gba->memory.savedata, sav); GBAGPIOInit(&gba->memory.gpio, &((uint16_t*) gba->memory.rom)[GPIO_REG_DATA >> 1]); _checkOverrides(gba, ((struct GBACartridge*) gba->memory.rom)->id);

@@ -443,7 +446,7 @@ gba->memory.rom = gba->pristineRom;

return; } gba->memory.romSize = patchedSize; - gba->romCrc32 = crc32(gba->memory.rom, gba->memory.romSize); + gba->romCrc32 = doCrc32(gba->memory.rom, gba->memory.romSize); } void GBATimerUpdateRegister(struct GBA* gba, int timer) {
M src/util/crc32.csrc/util/crc32.c

@@ -94,7 +94,7 @@ 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94,

0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d }; -uint32_t crc32(const void* buf, size_t size) { +uint32_t doCrc32(const void* buf, size_t size) { return updateCrc32(0, buf, size); }
M src/util/crc32.hsrc/util/crc32.h

@@ -5,7 +5,7 @@ #include "util/common.h"

struct VFile; -uint32_t crc32(const void* buf, size_t size); +uint32_t doCrc32(const void* buf, size_t size); uint32_t updateCrc32(uint32_t crc, const void* buf, size_t size); uint32_t fileCrc32(struct VFile* file, size_t endOffset);
M src/util/patch-ups.csrc/util/patch-ups.c

@@ -90,7 +90,7 @@ return false;

} patch->vf->seek(patch->vf, 0, SEEK_SET); - if (crc32(out, outSize) != goodCrc32) { + if (doCrc32(out, outSize) != goodCrc32) { return false; } return true;