7#ifndef FLASHCART_SC64_LL_H__
8#define FLASHCART_SC64_LL_H__
23 uint8_t DD_SECTOR[256];
24 uint8_t FLASHRAM[128];
27#define SC64_BUFFERS_BASE (0x1FFE0000UL)
28#define SC64_BUFFERS ((sc64_buffers_t *) SC64_BUFFERS_BASE)
33 SC64_ERROR_BAD_ARGUMENT,
34 SC64_ERROR_BAD_ADDRESS,
35 SC64_ERROR_BAD_CONFIG_ID,
38 SC64_ERROR_UNKNOWN_CMD = -1
42 CFG_ID_BOOTLOADER_SWITCH,
43 CFG_ID_ROM_WRITE_ENABLE,
44 CFG_ID_ROM_SHADOW_ENABLE,
56 CFG_ID_ROM_EXTENDED_ENABLE,
70 BOOT_MODE_DIRECT_ROM = 3,
71 BOOT_MODE_DIRECT_DDIPL = 4,
80 SAVE_TYPE_SRAM_BANKED,
85 CIC_SEED_AUTO = 0xFFFF
92 TV_TYPE_PASSTHROUGH = 3
97 DRIVE_TYPE_DEVELOPMENT,
109 BUTTON_MODE_USB_PACKET,
110 BUTTON_MODE_DD_DISK_SWAP,
114void sc64_ll_lock (
void);
115sc64_error_t sc64_ll_get_version (uint16_t *major, uint16_t *minor, uint32_t *revision);
116sc64_error_t sc64_ll_get_config (sc64_cfg_id_t cfg, uint32_t *value);
117sc64_error_t sc64_ll_set_config (sc64_cfg_id_t cfg, uint32_t value);
118sc64_error_t sc64_ll_writeback_pending (
bool *pending);
119sc64_error_t sc64_ll_writeback_enable (
void *address);
120sc64_error_t sc64_ll_flash_wait_busy (
void);
121sc64_error_t sc64_ll_flash_get_erase_block_size (
size_t *erase_block_size);
122sc64_error_t sc64_ll_flash_erase_block (
void *address);