mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-05 23:44:53 +00:00
Rework handling of dmadata (#1036)
* Generate dmadata * Remove tab indentations in mkdmadata.c and mkldscript.c * Fix * Review suggestions * Hopefully fix * Fix index Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com> Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
This commit is contained in:
parent
783ef3a117
commit
04a9d51e90
13 changed files with 2034 additions and 3438 deletions
58
tools/spec.h
Normal file
58
tools/spec.h
Normal file
|
@ -0,0 +1,58 @@
|
|||
#ifndef _SPEC_H_
|
||||
#define _SPEC_H_
|
||||
|
||||
enum
|
||||
{
|
||||
STMT_address,
|
||||
STMT_after,
|
||||
STMT_align,
|
||||
STMT_beginseg,
|
||||
STMT_endseg,
|
||||
STMT_entry,
|
||||
STMT_flags,
|
||||
STMT_include,
|
||||
STMT_include_data_with_rodata,
|
||||
STMT_name,
|
||||
STMT_number,
|
||||
STMT_romalign,
|
||||
STMT_stack,
|
||||
STMT_increment,
|
||||
STMT_pad_text,
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
FLAG_BOOT = (1 << 0),
|
||||
FLAG_OBJECT = (1 << 1),
|
||||
FLAG_RAW = (1 << 2),
|
||||
};
|
||||
|
||||
struct Include
|
||||
{
|
||||
char *fpath;
|
||||
int linkerPadding;
|
||||
uint8_t dataWithRodata;
|
||||
};
|
||||
|
||||
struct Segment
|
||||
{
|
||||
uint32_t fields;
|
||||
char *name;
|
||||
char *after;
|
||||
uint32_t flags;
|
||||
uint32_t address;
|
||||
uint32_t stack;
|
||||
uint32_t align;
|
||||
uint32_t romalign;
|
||||
uint32_t increment;
|
||||
uint32_t entry;
|
||||
uint32_t number;
|
||||
struct Include *includes;
|
||||
int includesCount;
|
||||
};
|
||||
|
||||
void parse_rom_spec(char *spec, struct Segment **segments, int *segment_count);
|
||||
|
||||
void free_rom_spec(struct Segment *segments, int segment_count);
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue