mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Merge common.h into linkdefs.h
This commit is contained in:
@@ -1,45 +0,0 @@
|
|||||||
/*
|
|
||||||
* This file is part of RGBDS.
|
|
||||||
*
|
|
||||||
* Copyright (c) 1997-2018, Carsten Sorensen and RGBDS contributors.
|
|
||||||
*
|
|
||||||
* SPDX-License-Identifier: MIT
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef RGBDS_COMMON_H
|
|
||||||
#define RGBDS_COMMON_H
|
|
||||||
|
|
||||||
#define RGBDS_OBJECT_VERSION_STRING "RGB%1hhu"
|
|
||||||
#define RGBDS_OBJECT_VERSION_NUMBER (uint8_t)6
|
|
||||||
|
|
||||||
enum eBankCount {
|
|
||||||
BANK_COUNT_ROM0 = 1,
|
|
||||||
BANK_COUNT_ROMX = 511,
|
|
||||||
BANK_COUNT_WRAM0 = 1,
|
|
||||||
BANK_COUNT_WRAMX = 7,
|
|
||||||
BANK_COUNT_VRAM = 2,
|
|
||||||
BANK_COUNT_OAM = 1,
|
|
||||||
BANK_COUNT_HRAM = 1,
|
|
||||||
BANK_COUNT_SRAM = 16
|
|
||||||
};
|
|
||||||
|
|
||||||
enum eBankGBCount {
|
|
||||||
BANK_MIN_ROM0 = 0,
|
|
||||||
BANK_MAX_ROM0 = BANK_COUNT_ROM0 + BANK_MIN_ROM0 - 1,
|
|
||||||
BANK_MIN_ROMX = 1,
|
|
||||||
BANK_MAX_ROMX = BANK_COUNT_ROMX + BANK_MIN_ROMX - 1,
|
|
||||||
BANK_MIN_WRAM0 = 0,
|
|
||||||
BANK_MAX_WRAM0 = BANK_COUNT_WRAM0 + BANK_MIN_WRAM0 - 1,
|
|
||||||
BANK_MIN_WRAMX = 1,
|
|
||||||
BANK_MAX_WRAMX = BANK_COUNT_WRAMX + BANK_MIN_WRAMX - 1,
|
|
||||||
BANK_MIN_VRAM = 0,
|
|
||||||
BANK_MAX_VRAM = BANK_COUNT_VRAM + BANK_MIN_VRAM - 1,
|
|
||||||
BANK_MIN_OAM = 0,
|
|
||||||
BANK_MAX_OAM = BANK_COUNT_OAM + BANK_MIN_OAM - 1,
|
|
||||||
BANK_MIN_HRAM = 0,
|
|
||||||
BANK_MAX_HRAM = BANK_COUNT_HRAM + BANK_MIN_HRAM - 1,
|
|
||||||
BANK_MIN_SRAM = 0,
|
|
||||||
BANK_MAX_SRAM = BANK_COUNT_SRAM + BANK_MIN_SRAM - 1
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif /* RGBDS_COMMON_H */
|
|
||||||
@@ -12,8 +12,6 @@
|
|||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#include "common.h"
|
|
||||||
|
|
||||||
extern uint64_t nbSectionsToAssign;
|
extern uint64_t nbSectionsToAssign;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -9,6 +9,39 @@
|
|||||||
#ifndef RGBDS_LINKDEFS_H
|
#ifndef RGBDS_LINKDEFS_H
|
||||||
#define RGBDS_LINKDEFS_H
|
#define RGBDS_LINKDEFS_H
|
||||||
|
|
||||||
|
#define RGBDS_OBJECT_VERSION_STRING "RGB%1hhu"
|
||||||
|
#define RGBDS_OBJECT_VERSION_NUMBER (uint8_t)6
|
||||||
|
|
||||||
|
enum eBankCount {
|
||||||
|
BANK_COUNT_ROM0 = 1,
|
||||||
|
BANK_COUNT_ROMX = 511,
|
||||||
|
BANK_COUNT_WRAM0 = 1,
|
||||||
|
BANK_COUNT_WRAMX = 7,
|
||||||
|
BANK_COUNT_VRAM = 2,
|
||||||
|
BANK_COUNT_OAM = 1,
|
||||||
|
BANK_COUNT_HRAM = 1,
|
||||||
|
BANK_COUNT_SRAM = 16
|
||||||
|
};
|
||||||
|
|
||||||
|
enum eBankGBCount {
|
||||||
|
BANK_MIN_ROM0 = 0,
|
||||||
|
BANK_MAX_ROM0 = BANK_COUNT_ROM0 + BANK_MIN_ROM0 - 1,
|
||||||
|
BANK_MIN_ROMX = 1,
|
||||||
|
BANK_MAX_ROMX = BANK_COUNT_ROMX + BANK_MIN_ROMX - 1,
|
||||||
|
BANK_MIN_WRAM0 = 0,
|
||||||
|
BANK_MAX_WRAM0 = BANK_COUNT_WRAM0 + BANK_MIN_WRAM0 - 1,
|
||||||
|
BANK_MIN_WRAMX = 1,
|
||||||
|
BANK_MAX_WRAMX = BANK_COUNT_WRAMX + BANK_MIN_WRAMX - 1,
|
||||||
|
BANK_MIN_VRAM = 0,
|
||||||
|
BANK_MAX_VRAM = BANK_COUNT_VRAM + BANK_MIN_VRAM - 1,
|
||||||
|
BANK_MIN_OAM = 0,
|
||||||
|
BANK_MAX_OAM = BANK_COUNT_OAM + BANK_MIN_OAM - 1,
|
||||||
|
BANK_MIN_HRAM = 0,
|
||||||
|
BANK_MAX_HRAM = BANK_COUNT_HRAM + BANK_MIN_HRAM - 1,
|
||||||
|
BANK_MIN_SRAM = 0,
|
||||||
|
BANK_MAX_SRAM = BANK_COUNT_SRAM + BANK_MIN_SRAM - 1
|
||||||
|
};
|
||||||
|
|
||||||
enum RPNCommand {
|
enum RPNCommand {
|
||||||
RPN_ADD = 0x00,
|
RPN_ADD = 0x00,
|
||||||
RPN_SUB = 0x01,
|
RPN_SUB = 0x01,
|
||||||
|
|||||||
@@ -31,7 +31,6 @@
|
|||||||
|
|
||||||
#include "extern/utf8decoder.h"
|
#include "extern/utf8decoder.h"
|
||||||
|
|
||||||
#include "common.h"
|
|
||||||
#include "linkdefs.h"
|
#include "linkdefs.h"
|
||||||
|
|
||||||
uint32_t nListCountEmpty;
|
uint32_t nListCountEmpty;
|
||||||
|
|||||||
@@ -28,7 +28,6 @@
|
|||||||
|
|
||||||
#include "extern/err.h"
|
#include "extern/err.h"
|
||||||
|
|
||||||
#include "common.h"
|
|
||||||
#include "linkdefs.h"
|
#include "linkdefs.h"
|
||||||
|
|
||||||
void out_SetCurrentSection(struct Section *pSect);
|
void out_SetCurrentSection(struct Section *pSect);
|
||||||
|
|||||||
@@ -21,7 +21,6 @@
|
|||||||
|
|
||||||
#include "extern/err.h"
|
#include "extern/err.h"
|
||||||
#include "linkdefs.h"
|
#include "linkdefs.h"
|
||||||
#include "common.h"
|
|
||||||
|
|
||||||
static struct SymbolList {
|
static struct SymbolList {
|
||||||
size_t nbSymbols;
|
size_t nbSymbols;
|
||||||
|
|||||||
@@ -14,7 +14,6 @@
|
|||||||
#include "extern/err.h"
|
#include "extern/err.h"
|
||||||
|
|
||||||
#include "hashmap.h"
|
#include "hashmap.h"
|
||||||
#include "common.h"
|
|
||||||
|
|
||||||
uint16_t startaddr[] = {
|
uint16_t startaddr[] = {
|
||||||
[SECTTYPE_ROM0] = 0x0000,
|
[SECTTYPE_ROM0] = 0x0000,
|
||||||
|
|||||||
Reference in New Issue
Block a user