Added direct_access interface to interrupt_enable/IE register

This commit is contained in:
Lior Halphon 2017-10-12 22:49:39 +03:00
parent 65dd02cc52
commit a753e00b59
2 changed files with 5 additions and 0 deletions

View File

@ -541,6 +541,10 @@ void *GB_get_direct_access(GB_gameboy_t *gb, GB_direct_access_t access, size_t *
*size = sizeof(gb->sprite_palettes_data);
*bank = 0;
return &gb->sprite_palettes_data;
case GB_DIRECT_ACCESS_IE:
*size = sizeof(gb->interrupt_enable);
*bank = 0;
return &gb->interrupt_enable;
default:
*size = 0;
*bank = 0;

View File

@ -521,6 +521,7 @@ typedef enum {
GB_DIRECT_ACCESS_OAM,
GB_DIRECT_ACCESS_BGP,
GB_DIRECT_ACCESS_OBP,
GB_DIRECT_ACCESS_IE,
} GB_direct_access_t;
/* Returns a mutable pointer to various hardware memories. If that memory is banked, the current bank