Skip to content

Commit

Permalink
GBA Memory: Back out a hack that introduces incorrect behavior, even …
Browse files Browse the repository at this point in the history
…though it fixes a game
  • Loading branch information
endrift committed May 14, 2015
1 parent 3dfa8bc commit daf3ce7
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 7 deletions.
1 change: 0 additions & 1 deletion CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ Bugfixes:
- GBA: Fix bounds-checking on EEPROM access
- GBA Audio: FIFOs should not poll DMAs that are not scheduled for audio
- GBA BIOS: Initialize a variable that may be uninitialized in very rare cases
- GBA Memory: Ensure changing the timing of a DMA reschedules it
- GBA Memory: Allow SRAM to be 64kB
- GBA Memory: Fix 32-bit loads from unaddress cartridge space
- GBA Memory: Fix jumping to invalid memory when switching from Thumb to ARM
Expand Down
6 changes: 0 additions & 6 deletions src/gba/memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -1256,12 +1256,6 @@ uint16_t GBAMemoryWriteDMACNT_HI(struct GBA* gba, int dma, uint16_t control) {
struct GBAMemory* memory = &gba->memory;
struct GBADMA* currentDma = &memory->dma[dma];
int wasEnabled = GBADMARegisterIsEnable(currentDma->reg);
int oldTiming = GBADMARegisterGetTiming(currentDma->reg);
int newTiming = GBADMARegisterGetTiming(control);
// This is probably a huge hack...verify what this does on hardware
if (oldTiming && oldTiming != DMA_TIMING_CUSTOM && oldTiming != newTiming) {
wasEnabled = false;
}
currentDma->reg = control;

if (GBADMARegisterIsDRQ(currentDma->reg)) {
Expand Down

1 comment on commit daf3ce7

@endrift
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know, that's why I backed out this change.

Please sign in to comment.