mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-24 03:52:08 +00:00
link: move includes to include/link/
Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>
This commit is contained in:
21
include/link/assign.h
Normal file
21
include/link/assign.h
Normal file
@@ -0,0 +1,21 @@
|
||||
#ifndef ASMOTOR_LINK_ASSIGN_H
|
||||
#define ASMOTOR_LINK_ASSIGN_H
|
||||
|
||||
#include "link/types.h"
|
||||
|
||||
enum eBankDefine {
|
||||
BANK_HOME = 0,
|
||||
BANK_BSS = 256,
|
||||
BANK_VRAM,
|
||||
BANK_HRAM
|
||||
};
|
||||
|
||||
#define MAXBANKS 259
|
||||
|
||||
extern SLONG area_Avail(SLONG bank);
|
||||
extern void AssignSections(void);
|
||||
extern void CreateSymbolTable(void);
|
||||
extern SLONG MaxBankUsed;
|
||||
extern SLONG MaxAvail[MAXBANKS];
|
||||
|
||||
#endif
|
||||
6
include/link/library.h
Normal file
6
include/link/library.h
Normal file
@@ -0,0 +1,6 @@
|
||||
#ifndef ASMOTOR_LINK_LIBRARY_H
|
||||
#define ASMOTOR_LINK_LIBRARY_H
|
||||
|
||||
extern void AddNeededModules(void);
|
||||
|
||||
#endif
|
||||
19
include/link/main.h
Normal file
19
include/link/main.h
Normal file
@@ -0,0 +1,19 @@
|
||||
#ifndef ASMOTOR_LINK_MAIN_H
|
||||
#define ASMOTOR_LINK_MAIN_H
|
||||
|
||||
#include "link/types.h"
|
||||
|
||||
extern void PrintUsage(void);
|
||||
extern void fatalerror(char *s);
|
||||
extern char temptext[1024];
|
||||
extern SLONG fillchar;
|
||||
extern char smartlinkstartsymbol[256];
|
||||
|
||||
enum eOutputType {
|
||||
OUTPUT_GBROM,
|
||||
OUTPUT_PSION2
|
||||
};
|
||||
|
||||
extern enum eOutputType outputtype;
|
||||
|
||||
#endif
|
||||
11
include/link/mapfile.h
Normal file
11
include/link/mapfile.h
Normal file
@@ -0,0 +1,11 @@
|
||||
#ifndef ASMOTOR_LINK_MAPFILE_H
|
||||
#define ASMOTOR_LINK_MAPFILE_H
|
||||
|
||||
extern void SetMapfileName(char *name);
|
||||
extern void SetSymfileName(char *name);
|
||||
extern void CloseMapfile(void);
|
||||
extern void MapfileWriteSection(struct sSection *pSect);
|
||||
extern void MapfileInitBank(SLONG bank);
|
||||
extern void MapfileCloseBank(SLONG slack);
|
||||
|
||||
#endif
|
||||
112
include/link/mylink.h
Normal file
112
include/link/mylink.h
Normal file
@@ -0,0 +1,112 @@
|
||||
#ifndef ASMOTOR_LINK_LINK_H
|
||||
#define ASMOTOR_LINK_LINK_H
|
||||
|
||||
#if defined(AMIGA) || defined(__GNUC__)
|
||||
#define _MAX_PATH 512
|
||||
#endif
|
||||
|
||||
#include "link/types.h"
|
||||
|
||||
extern SLONG options;
|
||||
#define OPT_SMALL 0x01
|
||||
#define OPT_SMART_C_LINK 0x02
|
||||
|
||||
enum eRpnData {
|
||||
RPN_ADD = 0,
|
||||
RPN_SUB,
|
||||
RPN_MUL,
|
||||
RPN_DIV,
|
||||
RPN_MOD,
|
||||
RPN_UNSUB,
|
||||
|
||||
RPN_OR,
|
||||
RPN_AND,
|
||||
RPN_XOR,
|
||||
RPN_UNNOT,
|
||||
|
||||
RPN_LOGAND,
|
||||
RPN_LOGOR,
|
||||
RPN_LOGUNNOT,
|
||||
|
||||
RPN_LOGEQ,
|
||||
RPN_LOGNE,
|
||||
RPN_LOGGT,
|
||||
RPN_LOGLT,
|
||||
RPN_LOGGE,
|
||||
RPN_LOGLE,
|
||||
|
||||
RPN_SHL,
|
||||
RPN_SHR,
|
||||
|
||||
RPN_BANK,
|
||||
|
||||
RPN_HRAM,
|
||||
|
||||
RPN_PCEZP,
|
||||
|
||||
RPN_RANGECHECK,
|
||||
|
||||
RPN_CONST = 0x80,
|
||||
RPN_SYM = 0x81
|
||||
};
|
||||
|
||||
enum eSectionType {
|
||||
SECT_BSS,
|
||||
SECT_VRAM,
|
||||
SECT_CODE,
|
||||
SECT_HOME,
|
||||
SECT_HRAM
|
||||
};
|
||||
|
||||
struct sSection {
|
||||
SLONG nBank;
|
||||
SLONG nOrg;
|
||||
BBOOL oAssigned;
|
||||
|
||||
SLONG nByteSize;
|
||||
enum eSectionType Type;
|
||||
UBYTE *pData;
|
||||
SLONG nNumberOfSymbols;
|
||||
struct sSymbol **tSymbols;
|
||||
struct sPatch *pPatches;
|
||||
struct sSection *pNext;
|
||||
};
|
||||
|
||||
enum eSymbolType {
|
||||
SYM_LOCAL,
|
||||
SYM_IMPORT,
|
||||
SYM_EXPORT
|
||||
};
|
||||
|
||||
struct sSymbol {
|
||||
char *pzName;
|
||||
enum eSymbolType Type;
|
||||
/* the following 3 items only valid when Type!=SYM_IMPORT */
|
||||
SLONG nSectionID; /* internal to object.c */
|
||||
struct sSection *pSection;
|
||||
SLONG nOffset;
|
||||
};
|
||||
|
||||
enum ePatchType {
|
||||
PATCH_BYTE = 0,
|
||||
PATCH_WORD_L,
|
||||
PATCH_LONG_L,
|
||||
PATCH_WORD_B,
|
||||
PATCH_LONG_B
|
||||
};
|
||||
|
||||
struct sPatch {
|
||||
char *pzFilename;
|
||||
SLONG nLineNo;
|
||||
SLONG nOffset;
|
||||
enum ePatchType Type;
|
||||
SLONG nRPNSize;
|
||||
UBYTE *pRPN;
|
||||
struct sPatch *pNext;
|
||||
BBOOL oRelocPatch;
|
||||
};
|
||||
|
||||
extern struct sSection *pSections;
|
||||
extern struct sSection *pLibSections;
|
||||
|
||||
#endif
|
||||
7
include/link/object.h
Normal file
7
include/link/object.h
Normal file
@@ -0,0 +1,7 @@
|
||||
#ifndef ASMOTOR_LINK_OBJECT_H
|
||||
#define ASMOTOR_LINK_OBJECT_H
|
||||
|
||||
extern void obj_Readfile(char *tzObjectfile);
|
||||
extern void lib_Readfile(char *tzLibfile);
|
||||
|
||||
#endif
|
||||
7
include/link/output.h
Normal file
7
include/link/output.h
Normal file
@@ -0,0 +1,7 @@
|
||||
#ifndef ASMOTOR_LINK_OUTPUT_H
|
||||
#define ASMOTOR_LINK_OUTPUT_H
|
||||
|
||||
void out_Setname(char *tzOutputfile);
|
||||
void Output(void);
|
||||
|
||||
#endif
|
||||
9
include/link/patch.h
Normal file
9
include/link/patch.h
Normal file
@@ -0,0 +1,9 @@
|
||||
#ifndef ASMOTOR_LINK_PATCH_H
|
||||
#define ASMOTOR_LINK_PATCH_H
|
||||
|
||||
#include "link/types.h"
|
||||
|
||||
void Patch(void);
|
||||
extern SLONG nPC;
|
||||
|
||||
#endif
|
||||
11
include/link/symbol.h
Normal file
11
include/link/symbol.h
Normal file
@@ -0,0 +1,11 @@
|
||||
#ifndef ASMOTOR_LINK_SYMBOL_H
|
||||
#define ASMOTOR_LINK_SYMBOL_H
|
||||
|
||||
#include "link/types.h"
|
||||
|
||||
void sym_Init(void);
|
||||
void sym_CreateSymbol(char *tzName, SLONG nValue, SBYTE nBank);
|
||||
SLONG sym_GetValue(char *tzName);
|
||||
SLONG sym_GetBank(char *tzName);
|
||||
|
||||
#endif
|
||||
16
include/link/types.h
Normal file
16
include/link/types.h
Normal file
@@ -0,0 +1,16 @@
|
||||
#ifndef ASMOTOR_LINK_TYPES_H
|
||||
#define ASMOTOR_LINK_TYPES_H
|
||||
|
||||
#if defined(AMIGA) || defined(__GNUC__)
|
||||
#define _MAX_PATH 512
|
||||
#endif
|
||||
|
||||
typedef unsigned char UBYTE;
|
||||
typedef signed char SBYTE;
|
||||
typedef unsigned short UWORD;
|
||||
typedef signed short SWORD;
|
||||
typedef unsigned long ULONG;
|
||||
typedef signed long SLONG;
|
||||
typedef signed char BBOOL;
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user