- [FIX] Les interrupcions també han d'executar-se al escriure directament en 0xFF0F (IE)

- [FIX] Els 4 bits menys significants del registre F han de ser sempre 0
- [FIX] Arreglats (crec? estaven mal?) els flags de half carry de algunes operacions aritmètiques
- [FIX] Crec que DAA ara va com toca? (potser? abans no?)
This commit is contained in:
2025-01-27 14:04:09 +01:00
parent 7f5760d826
commit 44f4f1a85b
6 changed files with 73 additions and 20 deletions

View File

@@ -1,5 +1,6 @@
#include "mbc1.h"
#include "mem.h"
#include "sm83.h"
#include <stdlib.h>
#include <SDL2/SDL.h>
@@ -111,6 +112,7 @@ namespace mbc1
if ( (address==0xFF50) && ((value&0x01) != 1) ) return; //Only allow disabling boot room
if ( (address==0xFF00) ) { value = value & 0x30; }
if ( (address==0xFF04) ) { hram[address-0xFE00] = 0; return; }
if ( (address==0xFF0F) ) { hram[address-0xFE00] = value; sm83::processInterrupts(); return; }
if ( (address==0xFF46) ) mem::init_dma_transfer(value);
hram[address - 0xFE00] = value;
}