fix file_entry struct
This commit is contained in:
parent
31768e2a41
commit
ed0a95cad5
@ -30,7 +30,7 @@ void dir_entry_start(){
|
|||||||
positon = 0;
|
positon = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void dir_add_entry(uint16_t id, uint8_t file_name,uint32_t file_size,uint8_t file_attr){
|
void dir_entry_add(uint16_t id, uint8_t file_name,uint32_t file_size,uint8_t file_attr){
|
||||||
uint32_t addr;
|
uint32_t addr;
|
||||||
dir_ent_t ent;
|
dir_ent_t ent;
|
||||||
strncpy(ent.file_name,file_name,13);
|
strncpy(ent.file_name,file_name,13);
|
||||||
@ -41,7 +41,7 @@ void dir_add_entry(uint16_t id, uint8_t file_name,uint32_t file_size,uint8_t fil
|
|||||||
positon++;
|
positon++;
|
||||||
}
|
}
|
||||||
|
|
||||||
void dir_add_header(uint16_t position, uint8_t * header){
|
void dir_entry_header(uint16_t position, uint8_t * header){
|
||||||
uint32_t addr;
|
uint32_t addr;
|
||||||
dir_ent_t ent;
|
dir_ent_t ent;
|
||||||
addr = DIR_ENTRY_LOC + ( position << DIR_ENTRY_SIZE_SHIFT ) + DIR_ENTRY_HEADER_OFF;
|
addr = DIR_ENTRY_LOC + ( position << DIR_ENTRY_SIZE_SHIFT ) + DIR_ENTRY_HEADER_OFF;
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
/*
|
˝/*
|
||||||
* =====================================================================================
|
* =====================================================================================
|
||||||
*
|
*
|
||||||
* ________ .__ __ ________ ____ ________
|
* ________ .__ __ ________ ____ ________
|
||||||
@ -32,15 +32,33 @@
|
|||||||
#define DIR_ENTRY_HEADER_OFF 20
|
#define DIR_ENTRY_HEADER_OFF 20
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
uint16_t id; // 1
|
uint16_t id; // 2
|
||||||
uint8_t file_name[13]; // 8.3 = 12 + 1 = 12
|
uint8_t file_name[13]; // 8.3 = 12 + 1 = 13
|
||||||
uint32_t file_size; // 4
|
uint32_t file_size; // 4
|
||||||
uint8_t file_attr; // 1
|
uint8_t file_attr; // 1
|
||||||
uint8_t snes_header[44]; // 44
|
uint8_t snes_header[43]; // 44
|
||||||
} dir_ent_t; // 64
|
} dir_ent_t; // 64
|
||||||
|
|
||||||
void dir_entry_start();
|
void dir_entry_start();
|
||||||
void dir_entry_add_(uint16_t id, uint8_t file_name,uint32_t file_size,uint8_t file_attr);
|
void dir_entry_add(uint16_t id, uint8_t file_name,uint32_t file_size,uint8_t file_attr);
|
||||||
void dir_entry_header(uint16_t position, uint8_t * header);
|
void dir_entry_header(uint16_t position, uint8_t * header);
|
||||||
|
|
||||||
|
/*
|
||||||
|
|
||||||
|
lo:
|
||||||
|
0x7fc0
|
||||||
|
0x7fc0 + 0x200
|
||||||
|
|
||||||
|
hi:
|
||||||
|
0xffc0
|
||||||
|
0xffc0 + 0x200
|
||||||
|
|
||||||
|
emulated reset vector MSB must be set
|
||||||
|
|
||||||
|
sei
|
||||||
|
clc
|
||||||
|
xce
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user