- [NEW] Implementada la gestió de registres i interrupcions de la pantalla, així com el renderitzat de tiles

- [FIX] Si una interrupció no està activada, no s'ha d'eixir de halt
- Hi ha algún bug per ahi que ho petat tot
This commit is contained in:
2025-01-17 15:39:18 +01:00
parent 155487376d
commit 7272414f29
4 changed files with 172 additions and 178 deletions

View File

@@ -550,10 +550,10 @@ namespace sm83
void interrupt(uint8_t type)
{
exit_from_halt = true;
const uint8_t IE = mem::readMem(0xffff);
if (IE & type) exit_from_halt = true;
const uint8_t IF = mem::readMem(0xff0f);
mem::writeMem(0xff0f, IF || (IE & type));
mem::writeMem(0xff0f, IF | (IE & type));
processInterrupts();
}