N64FlashcartMenu
Loading...
Searching...
No Matches
Drive

Data Structures

struct  d64_regs_t
 Registers Structure. More...
 

Macros

#define D64_REGS_BASE   (0x18000000UL)
 Registers Base Address.
 
#define D64_REGS_BASE_EXT   (0x1F800000UL)
 
#define D64_REGS   ((d64_regs_t *) D64_REGS_BASE)
 
#define D64_REGS_EXT   ((d64_regs_t *) D64_REGS_BASE_EXT)
 

Enumerations

enum  d64_device_variant_t { DEVICE_VARIANT_UNKNOWN = 0x0000 , DEVICE_VARIANT_A = 0x4100 , DEVICE_VARIANT_B = 0x4200 }
 Device Variant Enumeration. More...
 
enum  d64_tv_type_t { TV_TYPE_PAL = 0 , TV_TYPE_NTSC = 1 , TV_TYPE_MPAL = 2 , TV_TYPE_UNKNOWN = 3 }
 TV Type Enumeration. More...
 
enum  d64_save_type_t {
  SAVE_TYPE_NONE , SAVE_TYPE_EEPROM_4KBIT , SAVE_TYPE_EEPROM_16KBIT , SAVE_TYPE_SRAM_256KBIT ,
  SAVE_TYPE_FLASHRAM_1MBIT , SAVE_TYPE_SRAM_BANKED , SAVE_TYPE_FLASHRAM_PKST2
}
 Save Type Enumeration. More...
 

Functions

flashcart_td64_get_flashcart (void)
 Get the flashcart structure for 64drive.
 
bool d64_ll_get_version (d64_device_variant_t *device_variant, uint16_t *fpga_revision, uint32_t *bootloader_version)
 Get the 64drive version.
 
bool d64_ll_set_persistent_variable_storage (bool quick_reboot, d64_tv_type_t force_tv_type, uint8_t cic_seed)
 Set the persistent variable storage.
 
bool d64_ll_set_save_type (d64_save_type_t save_type)
 Set the save type.
 
bool d64_ll_enable_save_writeback (bool enabled)
 Enable or disable save writeback.
 
bool d64_ll_enable_cartrom_writes (bool enabled)
 Enable or disable cart ROM writes.
 
bool d64_ll_enable_extended_mode (bool enabled)
 Enable or disable extended mode.
 
bool d64_ll_write_eeprom_contents (void *contents)
 Write EEPROM contents.
 
bool d64_ll_write_save_writeback_lba_list (void *list)
 Write save writeback LBA list.
 

Detailed Description


Data Structure Documentation

◆ d64_regs_t

struct d64_regs_t

Registers Structure.

Data Fields
uint8_t BUFFER[512]

General buffer

uint32_t STATUS

Status register

uint32_t __unused_1

Unused

uint32_t COMMAND

Command register

uint32_t __unused_2

Unused

uint32_t LBA

Logical Block Address register

uint32_t __unused_3

Unused

uint32_t LENGTH

Length register

uint32_t __unused_4

Unused

uint32_t RESULT

Result register

uint32_t __unused_5[49]

Unused

uint32_t SDRAM_SIZE

SDRAM size register

uint32_t MAGIC

Magic register

uint32_t VARIANT

Variant register

uint32_t PERSISTENT

Persistent register

uint32_t BUTTON_UPGRADE

Button upgrade register

uint32_t REVISION

Revision register

uint32_t __unused_6[64]

Unused

uint32_t USB_COMMAND_STATUS

USB command status register

uint32_t USB_PARAM_RESULT[2]

USB parameter result registers

uint32_t __unused_7[5]

Unused

uint32_t WIFI_COMMAND_STATUS

WiFi command status register

uint32_t WIFI_PARAM_RESULT[2]

WiFi parameter result registers

uint32_t __unused_8[757]

Unused

uint8_t EEPROM[2048]

EEPROM buffer

uint32_t WRITEBACK[256]

Writeback buffer

Enumeration Type Documentation

◆ d64_device_variant_t

Device Variant Enumeration.

Enumerator
DEVICE_VARIANT_UNKNOWN 

Unknown device variant

DEVICE_VARIANT_A 

Device variant A

DEVICE_VARIANT_B 

Device variant B

◆ d64_tv_type_t

TV Type Enumeration.

Enumerator
TV_TYPE_PAL 

PAL TV type

TV_TYPE_NTSC 

NTSC TV type

TV_TYPE_MPAL 

MPAL TV type

TV_TYPE_UNKNOWN 

Unknown TV type

◆ d64_save_type_t

Save Type Enumeration.

Enumerator
SAVE_TYPE_NONE 

No save type

SAVE_TYPE_EEPROM_4KBIT 

EEPROM 4Kbit

SAVE_TYPE_EEPROM_16KBIT 

EEPROM 16Kbit

SAVE_TYPE_SRAM_256KBIT 

SRAM 256Kbit

SAVE_TYPE_FLASHRAM_1MBIT 

FlashRAM 1Mbit

SAVE_TYPE_SRAM_BANKED 

SRAM Banked

SAVE_TYPE_FLASHRAM_PKST2 

FlashRAM PKST2

Function Documentation

◆ d64_get_flashcart()

flashcart_t * d64_get_flashcart ( void )

Get the flashcart structure for 64drive.

Returns
flashcart_t* Pointer to the flashcart structure.

◆ d64_ll_get_version()

bool d64_ll_get_version ( d64_device_variant_t * device_variant,
uint16_t * fpga_revision,
uint32_t * bootloader_version )

Get the 64drive version.

Parameters
device_variantPointer to store the device variant.
fpga_revisionPointer to store the FPGA revision.
bootloader_versionPointer to store the bootloader version.
Returns
true if successful, false otherwise.

Get the 64drive version.

Parameters
device_variantPointer to store the device variant.
fpga_revisionPointer to store the FPGA revision.
bootloader_versionPointer to store the bootloader version.
Returns
true if a timeout occurred, false otherwise.

◆ d64_ll_set_persistent_variable_storage()

bool d64_ll_set_persistent_variable_storage ( bool quick_reboot,
d64_tv_type_t force_tv_type,
uint8_t cic_seed )

Set the persistent variable storage.

Parameters
quick_rebootEnable or disable quick reboot.
force_tv_typeTV type to force.
cic_seedCIC seed value.
Returns
true if successful, false otherwise.

Set the persistent variable storage.

Parameters
quick_rebootFlag indicating whether to enable quick reboot.
force_tv_typeThe TV type to force.
cic_seedThe CIC seed value.
Returns
true if a timeout occurred, false otherwise.

◆ d64_ll_set_save_type()

bool d64_ll_set_save_type ( d64_save_type_t save_type)

Set the save type.

Parameters
save_typeThe save type to set.
Returns
true if successful, false otherwise.

Set the save type.

Parameters
save_typeThe save type.
Returns
true if a timeout occurred, false otherwise.

◆ d64_ll_enable_save_writeback()

bool d64_ll_enable_save_writeback ( bool enabled)

Enable or disable save writeback.

Parameters
enabledTrue to enable, false to disable.
Returns
true if successful, false otherwise.

Enable or disable save writeback.

Parameters
enabledFlag indicating whether to enable save writeback.
Returns
true if a timeout occurred, false otherwise.

◆ d64_ll_enable_cartrom_writes()

bool d64_ll_enable_cartrom_writes ( bool enabled)

Enable or disable cart ROM writes.

Parameters
enabledTrue to enable, false to disable.
Returns
true if successful, false otherwise.

Enable or disable cart ROM writes.

Parameters
enabledFlag indicating whether to enable cart ROM writes.
Returns
true if a timeout occurred, false otherwise.

◆ d64_ll_enable_extended_mode()

bool d64_ll_enable_extended_mode ( bool enabled)

Enable or disable extended mode.

Parameters
enabledTrue to enable, false to disable.
Returns
true if successful, false otherwise.

Enable or disable extended mode.

Parameters
enabledFlag indicating whether to enable extended mode.
Returns
true if a timeout occurred, false otherwise.

◆ d64_ll_write_eeprom_contents()

bool d64_ll_write_eeprom_contents ( void * contents)

Write EEPROM contents.

Parameters
contentsPointer to the EEPROM contents.
Returns
true if successful, false otherwise.

Write EEPROM contents.

Parameters
contentsPointer to the EEPROM contents.
Returns
true if a timeout occurred, false otherwise.

◆ d64_ll_write_save_writeback_lba_list()

bool d64_ll_write_save_writeback_lba_list ( void * list)

Write save writeback LBA list.

Parameters
listPointer to the LBA list.
Returns
true if successful, false otherwise.

Write save writeback LBA list.

Parameters
listPointer to the LBA list.
Returns
true if a timeout occurred, false otherwise.