- [NEW] Reestructurada tota la gestió de memòria i mapeig de sistemes

This commit is contained in:
2025-01-28 12:57:12 +01:00
parent a64a18d1be
commit a617fec42a
7 changed files with 228 additions and 340 deletions

View File

@@ -592,9 +592,9 @@ namespace sm83
void HALT()
{
if (!halted) {
uint8_t *IE = mem::rawPtr(0xffff);
uint8_t *IF = mem::rawPtr(0xff0f);
if ( (ime==0) && ((*IF & *IE) != 0) ) {
const uint8_t IE = mem::readMem(0xffff);
const uint8_t IF = mem::readMem(0xff0f);
if ( (ime==0) && ((IF & IE) != 0) ) {
// [TODO] HALT BUG
if (pending_ei==2) rPC--;
return;