N64FlashcartMenu
Loading...
Searching...
No Matches
64drive_ll.h
Go to the documentation of this file.
1
7#ifndef FLASHCART_64DRIVE_LL_H__
8#define FLASHCART_64DRIVE_LL_H__
9
10
11#include <stdbool.h>
12#include <stdint.h>
13
14
21typedef struct {
22 uint8_t BUFFER[512];
23 uint32_t STATUS;
24 uint32_t __unused_1;
25 uint32_t COMMAND;
26 uint32_t __unused_2;
27 uint32_t LBA;
28 uint32_t __unused_3;
29 uint32_t LENGTH;
30 uint32_t __unused_4;
31 uint32_t RESULT;
32
33 uint32_t __unused_5[49];
34
35 uint32_t SDRAM_SIZE;
36 uint32_t MAGIC;
37 uint32_t VARIANT;
38 uint32_t PERSISTENT;
39 uint32_t BUTTON_UPGRADE;
40 uint32_t REVISION;
41
42 uint32_t __unused_6[64];
43
44 uint32_t USB_COMMAND_STATUS;
45 uint32_t USB_PARAM_RESULT[2];
46
47 uint32_t __unused_7[5];
48
49 uint32_t WIFI_COMMAND_STATUS;
50 uint32_t WIFI_PARAM_RESULT[2];
51
52 uint32_t __unused_8[757];
53
54 uint8_t EEPROM[2048];
55 uint32_t WRITEBACK[256];
57
59#define D64_REGS_BASE (0x18000000UL)
60#define D64_REGS_BASE_EXT (0x1F800000UL)
61#define D64_REGS ((d64_regs_t *) D64_REGS_BASE)
62#define D64_REGS_EXT ((d64_regs_t *) D64_REGS_BASE_EXT)
63
65typedef enum {
66 DEVICE_VARIANT_UNKNOWN = 0x0000,
67 DEVICE_VARIANT_A = 0x4100,
68 DEVICE_VARIANT_B = 0x4200,
70
72typedef enum {
73 TV_TYPE_PAL = 0,
74 TV_TYPE_NTSC = 1,
75 TV_TYPE_MPAL = 2,
76 TV_TYPE_UNKNOWN = 3,
78
80typedef enum {
81 SAVE_TYPE_NONE,
82 SAVE_TYPE_EEPROM_4K,
83 SAVE_TYPE_EEPROM_16K,
84 SAVE_TYPE_SRAM,
85 SAVE_TYPE_FLASHRAM,
86 SAVE_TYPE_SRAM_BANKED,
87 SAVE_TYPE_FLASHRAM_PKST2,
89
90
91bool d64_ll_get_version (d64_device_variant_t *device_variant, uint16_t *fpga_revision, uint32_t *bootloader_version);
92bool d64_ll_set_persistent_variable_storage (bool quick_reboot, d64_tv_type_t force_tv_type, uint8_t cic_seed);
93bool d64_ll_set_save_type (d64_save_type_t save_type);
94bool d64_ll_enable_save_writeback (bool enabled);
95bool d64_ll_enable_cartrom_writes (bool enabled);
96bool d64_ll_enable_extended_mode (bool enabled);
97bool d64_ll_write_eeprom_contents (void *contents);
98bool d64_ll_write_save_writeback_lba_list (void *list);
99 /* 64drive */
101
102
103#endif
d64_tv_type_t
TV Type Enumeration.
Definition: 64drive_ll.h:72
d64_device_variant_t
Device Variant Enumeration.
Definition: 64drive_ll.h:65
d64_save_type_t
Save Type Enumeration.
Definition: 64drive_ll.h:80
Registers Structure.
Definition: 64drive_ll.h:21