Create Macros for PAL/NTSC

This commit is contained in:
jaby 2022-10-02 17:47:24 +02:00
parent 733921f4ce
commit 04af1daf6c
3 changed files with 12 additions and 1 deletions

View File

@ -2,6 +2,14 @@
#define __JABYENGINE_GPU_HPP__ #define __JABYENGINE_GPU_HPP__
#include "../System/IOPorts/GPU_IO.hpp" #include "../System/IOPorts/GPU_IO.hpp"
#if !defined(JABYENGINE_NTSC) && !defined(JABYENGINE_PAL)
#error "JABYENGINE_NTSC or JABYENGINE_PAL must be defined"
#else
#if defined(JABYENGINE_NTSC) && defined(JABYENGINE_PAL)
#error "Please define only JABYENGINE_NTSC or JABYENGINE_PAL"
#endif
#endif
namespace GPU { namespace GPU {
namespace Display { namespace Display {
static void enable() { static void enable() {

View File

@ -7,6 +7,7 @@ PLATFORM ?= PSX
#Build profile, possible values: release, debug, profile, coverage #Build profile, possible values: release, debug, profile, coverage
BUILD_DIR ?= bin BUILD_DIR ?= bin
BUILD_PROFILE ?= debug BUILD_PROFILE ?= debug
TV_FORMAT ?= PAL
CONFIG_NAME ?= $(PLATFORM)-$(BUILD_PROFILE) CONFIG_NAME ?= $(PLATFORM)-$(BUILD_PROFILE)
OUTPUT_DIR = $(BUILD_DIR)/$(CONFIG_NAME) OUTPUT_DIR = $(BUILD_DIR)/$(CONFIG_NAME)
@ -56,6 +57,8 @@ CCFLAGS += $(ARCHFLAGS)
CCFLAGS += $(CCFLAGS_$(BUILD_PROFILE)) CCFLAGS += $(CCFLAGS_$(BUILD_PROFILE))
CCFLAGS += -DJABYENGINE_$(TV_FORMAT)
#Linker flags #Linker flags
LDFLAGS_release += -Os LDFLAGS_release += -Os

View File

@ -65,7 +65,7 @@
"C_Cpp.default.compilerArgs": [ "C_Cpp.default.compilerArgs": [
], ],
"C_Cpp.default.defines": [ "C_Cpp.default.defines": [
"" "JABYENGINE_PAL"
], ],
"files.exclude": { "files.exclude": {
"**/*.o": true, "**/*.o": true,