#pragma once
#include <audio.h>
#include <cpu.h>
#include <ppu.h>
#include <cart.h>
#include <dma.h>
#include <gamepad.h>
#include <ram.h>
#include <timer.h>
#include <lcd.h>

typedef struct {
    audio_state audio;
    ppu_state ppu;
    cpu_state cpu; 
    cart_state cart;
    dma_state dma; 
    ctlr_state ctlr;
    ram_state ram;
    timer_state timer;
    lcd_state lcd;
} save_state;

void state_save(save_state*);
void state_load(const save_state*);

void state_save_file(u8 slot);
void state_load_file(u8 slot);