regs/map.h

39 lines
649 B
C
Raw Normal View History

2018-08-20 00:24:54 +00:00
#pragma once
/**
* @copyright 2018 Sean Kasun
* The memory map for the tracing disassembler
*/
#include <stdint.h>
typedef enum {
IsData = 0x01,
IsOpcode = 0x02,
IsOperand = 0x04,
IsX8 = 0x10,
IsM8 = 0x20,
2020-02-17 05:18:50 +00:00
IsEmu = 0x100,
IsFlags = 0xff013f,
IsX8Changed = 0x200,
IsM8Changed = 0x400,
IsEmuChanged = 0x2000,
2018-08-20 00:24:54 +00:00
} MapFlags;
typedef struct Rule {
uint32_t address;
uint16_t flags;
2018-09-25 23:15:15 +00:00
char *symbol;
2018-08-20 00:24:54 +00:00
struct Rule *next;
} Rule;
typedef struct {
Rule *rules;
uint32_t minMemory;
uint32_t maxMemory;
MapFlags *mem;
const char *filename;
} Map;
extern Map *loadMap(const char *filename, uint32_t org, MapFlags flags);