Full savestating to memory

This commit is contained in:
2025-05-23 15:49:26 -06:00
parent e9d5b359d0
commit b86d550812
23 changed files with 378 additions and 56 deletions

View File

@ -2,13 +2,6 @@
#include <ppu.h>
#include <bus.h>
typedef struct {
bool active;
u8 byte;
u8 value;
u8 start_delay;
} dma_context;
static dma_context ctx;
void dma_start(u8 start) {
@ -37,4 +30,12 @@ void dma_tick() {
bool dma_transferring() {
return ctx.active;
}
void dma_save_state(dma_state* state) {
state->ctx = ctx;
}
void dma_load_state(const dma_state* state) {
ctx = state->ctx;
}