Full savestating to memory
This commit is contained in:
15
lib/dma.c
15
lib/dma.c
@ -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;
|
||||
}
|
Reference in New Issue
Block a user