mirror of https://github.com/mgba-emu/mgba.git
Merge branch 'master' (early part) into medusa
This commit is contained in:
commit
8de9ac36d7
1
CHANGES
1
CHANGES
|
@ -44,6 +44,7 @@ Features:
|
||||||
- New unlicensed GB mappers: NT (older types 1 and 2), Li Cheng, GGB-81
|
- New unlicensed GB mappers: NT (older types 1 and 2), Li Cheng, GGB-81
|
||||||
- Debugger: Add range watchpoints
|
- Debugger: Add range watchpoints
|
||||||
Emulation fixes:
|
Emulation fixes:
|
||||||
|
- GBA Memory: Make VRAM access stalls only apply to BG RAM
|
||||||
- GBA Video: Disable BG target 1 blending when OBJ blending (fixes mgba.io/i/2722)
|
- GBA Video: Disable BG target 1 blending when OBJ blending (fixes mgba.io/i/2722)
|
||||||
Misc:
|
Misc:
|
||||||
- GB Serialize: Add missing savestate support for MBC6 and NT (newer)
|
- GB Serialize: Add missing savestate support for MBC6 and NT (newer)
|
||||||
|
|
|
@ -397,7 +397,7 @@ static void GBASetActiveRegion(struct ARMCore* cpu, uint32_t address) {
|
||||||
LOAD_32(value, address & 0x0001FFFC, gba->video.vram); \
|
LOAD_32(value, address & 0x0001FFFC, gba->video.vram); \
|
||||||
} \
|
} \
|
||||||
++wait; \
|
++wait; \
|
||||||
if (gba->video.shouldStall) { \
|
if (gba->video.shouldStall && (address & 0x0001FFFF) < ((GBARegisterDISPCNTGetMode(gba->memory.io[REG_DISPCNT >> 1]) >= 3) ? 0x00014000 : 0x00010000)) { \
|
||||||
wait += GBAMemoryStallVRAM(gba, wait, 1); \
|
wait += GBAMemoryStallVRAM(gba, wait, 1); \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -557,7 +557,7 @@ uint32_t GBALoad16(struct ARMCore* cpu, uint32_t address, int* cycleCounter) {
|
||||||
} else {
|
} else {
|
||||||
LOAD_16(value, address & 0x0001FFFE, gba->video.vram);
|
LOAD_16(value, address & 0x0001FFFE, gba->video.vram);
|
||||||
}
|
}
|
||||||
if (gba->video.shouldStall) {
|
if (gba->video.shouldStall && (address & 0x0001FFFF) < ((GBARegisterDISPCNTGetMode(gba->memory.io[REG_DISPCNT >> 1]) >= 3) ? 0x00014000 : 0x00010000)) {
|
||||||
wait += GBAMemoryStallVRAM(gba, wait, 0);
|
wait += GBAMemoryStallVRAM(gba, wait, 0);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -777,7 +777,7 @@ uint32_t GBALoad8(struct ARMCore* cpu, uint32_t address, int* cycleCounter) {
|
||||||
} \
|
} \
|
||||||
} \
|
} \
|
||||||
++wait; \
|
++wait; \
|
||||||
if (gba->video.shouldStall) { \
|
if (gba->video.shouldStall && (address & 0x0001FFFF) < ((GBARegisterDISPCNTGetMode(gba->memory.io[REG_DISPCNT >> 1]) >= 3) ? 0x00014000 : 0x00010000)) { \
|
||||||
wait += GBAMemoryStallVRAM(gba, wait, 1); \
|
wait += GBAMemoryStallVRAM(gba, wait, 1); \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -904,7 +904,7 @@ void GBAStore16(struct ARMCore* cpu, uint32_t address, int16_t value, int* cycle
|
||||||
gba->video.renderer->writeVRAM(gba->video.renderer, address & 0x0001FFFE);
|
gba->video.renderer->writeVRAM(gba->video.renderer, address & 0x0001FFFE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (gba->video.shouldStall) {
|
if (gba->video.shouldStall && (address & 0x0001FFFF) < ((GBARegisterDISPCNTGetMode(gba->memory.io[REG_DISPCNT >> 1]) >= 3) ? 0x00014000 : 0x00010000)) {
|
||||||
wait += GBAMemoryStallVRAM(gba, wait, 0);
|
wait += GBAMemoryStallVRAM(gba, wait, 0);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -805,7 +805,7 @@ void PainterGL::performDraw() {
|
||||||
m_backend->postFrame(m_backend, m_buffer);
|
m_backend->postFrame(m_backend, m_buffer);
|
||||||
}
|
}
|
||||||
m_backend->drawFrame(m_backend);
|
m_backend->drawFrame(m_backend);
|
||||||
if (m_showOSD && m_messagePainter) {
|
if (m_showOSD && m_messagePainter && !glContextHasBug(OpenGLBug::IG4ICD_CRASH)) {
|
||||||
m_painter.begin(m_paintDev.get());
|
m_painter.begin(m_paintDev.get());
|
||||||
m_messagePainter->paint(&m_painter);
|
m_messagePainter->paint(&m_painter);
|
||||||
m_painter.end();
|
m_painter.end();
|
||||||
|
|
|
@ -31,6 +31,17 @@ bool glContextHasBug(OpenGLBug bug) {
|
||||||
case OpenGLBug::GLTHREAD_BLOCKS_SWAP:
|
case OpenGLBug::GLTHREAD_BLOCKS_SWAP:
|
||||||
return version.contains(" Mesa ");
|
return version.contains(" Mesa ");
|
||||||
|
|
||||||
|
case OpenGLBug::IG4ICD_CRASH:
|
||||||
|
#ifdef Q_OS_WIN
|
||||||
|
if (vendor != "Intel") {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (renderer == "Intel Pineview Platform") {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
return false;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,7 @@ namespace QGBA {
|
||||||
enum class OpenGLBug {
|
enum class OpenGLBug {
|
||||||
CROSS_THREAD_FLUSH, // mgba.io/i/2761
|
CROSS_THREAD_FLUSH, // mgba.io/i/2761
|
||||||
GLTHREAD_BLOCKS_SWAP, // mgba.io/i/2767
|
GLTHREAD_BLOCKS_SWAP, // mgba.io/i/2767
|
||||||
|
IG4ICD_CRASH, // mgba.io/i/2136
|
||||||
};
|
};
|
||||||
|
|
||||||
bool glContextHasBug(OpenGLBug);
|
bool glContextHasBug(OpenGLBug);
|
||||||
|
|
Loading…
Reference in New Issue