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,
117 uint32_t sector_table;
122void sc64_ll_lock (
void);
123sc64_error_t sc64_ll_get_version (uint16_t *major, uint16_t *minor, uint32_t *revision);
124sc64_error_t sc64_ll_get_config (sc64_cfg_id_t cfg, uint32_t *value);
125sc64_error_t sc64_ll_set_config (sc64_cfg_id_t cfg, uint32_t value);
127sc64_error_t sc64_ll_writeback_pending (
bool *pending);
128sc64_error_t sc64_ll_writeback_enable (
void *address);
129sc64_error_t sc64_ll_flash_wait_busy (
void);
130sc64_error_t sc64_ll_flash_get_erase_block_size (
size_t *erase_block_size);
131sc64_error_t sc64_ll_flash_erase_block (
void *address);
Definition: sc64_ll.h:113