Skip to content

Commit

Permalink
GB Memory: Fix OAM DMA from top 8 kB
Browse files Browse the repository at this point in the history
  • Loading branch information
endrift committed Jun 17, 2020
1 parent d2f84e6 commit 0234cb0
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
0.8.3: (Future)
Emulation fixes:
- GB Memory: Fix OAM DMA from top 8 kB
- GB MBC: Fix MBC1 RAM enable bit selection
- GB MBC: Fix MBC2 bit selection

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

This file was deleted.

2 changes: 1 addition & 1 deletion src/gb/io.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ void GBIOReset(struct GB* gb) {
GBIOWrite(gb, REG_SCY, 0x00);
GBIOWrite(gb, REG_SCX, 0x00);
GBIOWrite(gb, REG_LYC, 0x00);
GBIOWrite(gb, REG_DMA, 0xFF);
gb->memory.io[REG_DMA] = 0xFF;
GBIOWrite(gb, REG_BGP, 0xFC);
if (gb->model < GB_MODEL_CGB) {
GBIOWrite(gb, REG_OBP0, 0xFF);
Expand Down
4 changes: 2 additions & 2 deletions src/gb/memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -519,8 +519,8 @@ uint8_t GBView8(struct SM83Core* cpu, uint16_t address, int segment) {
}

void GBMemoryDMA(struct GB* gb, uint16_t base) {
if (base > 0xF100) {
return;
if (base >= 0xE000) {
base &= 0xDFFF;
}
mTimingDeschedule(&gb->timing, &gb->memory.dmaEvent);
mTimingSchedule(&gb->timing, &gb->memory.dmaEvent, 8);
Expand Down

0 comments on commit 0234cb0

Please sign in to comment.