#pragma once
#include <stdint.h>

#define PSG_CLOCK      1000000
#define PATTERN_ROWS   32

typedef struct{
    uint8_t note;
} cell_t;

typedef struct{
    cell_t channel[4];
} row_t;

typedef struct{
    row_t rows[PATTERN_ROWS];
    uint8_t speed;
} pattern_t;

void player_main();
void music_tick_interrupt();
void input_interrupt(char input);
void save();
void load();