Introduce JabyEngine configuration file
This commit is contained in:
parent
684e030de0
commit
8b8ca421a9
|
@ -1,4 +1,5 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
#include "../jabyegine_config.hpp"
|
||||||
#include "gpu_primitives.hpp"
|
#include "gpu_primitives.hpp"
|
||||||
|
|
||||||
namespace JabyEngine {
|
namespace JabyEngine {
|
||||||
|
@ -7,9 +8,8 @@ namespace JabyEngine {
|
||||||
// This size is by Hardware limitation
|
// This size is by Hardware limitation
|
||||||
static constexpr auto Size = SizeU16::create(16, 16);
|
static constexpr auto Size = SizeU16::create(16, 16);
|
||||||
|
|
||||||
// The following two values can be easily changed
|
static constexpr auto TextureLoadPos = Configuration::BIOSFont::TextureLoadPos;
|
||||||
static constexpr auto TextureLoadPos = PositionU16::create(320, 256);
|
static constexpr auto CLUTLoadPos = Configuration::BIOSFont::CLUTLoadPos;
|
||||||
static constexpr auto CLUTLoadPos = PositionU16::create(320, 511);
|
|
||||||
|
|
||||||
static constexpr TexPage get_tex_page() {
|
static constexpr TexPage get_tex_page() {
|
||||||
return TexPage::create(BIOS_Font::TextureLoadPos, GPU::TexturePageColor::$4bit);
|
return TexPage::create(BIOS_Font::TextureLoadPos, GPU::TexturePageColor::$4bit);
|
||||||
|
|
|
@ -1,9 +1,13 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
#include "../jabyegine_config.hpp"
|
||||||
#include "raw_controller.hpp"
|
#include "raw_controller.hpp"
|
||||||
|
|
||||||
namespace JabyEngine {
|
namespace JabyEngine {
|
||||||
namespace Periphery {
|
namespace Periphery {
|
||||||
extern RawController controller[1][1];
|
static constexpr uint32_t PortCount = Configuration::Periphery::UsePortB ? 2 : 1;
|
||||||
|
static constexpr uint32_t DeviceCount = Configuration::Periphery::UseMultiTap ? 4 : 1;
|
||||||
|
|
||||||
|
extern RawController controller[PortCount][DeviceCount];
|
||||||
|
|
||||||
void query_controller();
|
void query_controller();
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
#pragma once
|
||||||
|
#include "GPU/gpu_types.hpp"
|
||||||
|
|
||||||
|
namespace JabyEngine {
|
||||||
|
struct Configuration {
|
||||||
|
struct BIOSFont {
|
||||||
|
static constexpr auto TextureLoadPos = GPU::PositionU16::create(320, 256);
|
||||||
|
static constexpr auto CLUTLoadPos = GPU::PositionU16::create(320, 511);
|
||||||
|
};
|
||||||
|
|
||||||
|
struct Periphery {
|
||||||
|
static constexpr bool UsePortB = false;
|
||||||
|
static constexpr bool UseMultiTap = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -3,10 +3,13 @@
|
||||||
|
|
||||||
namespace JabyEngine {
|
namespace JabyEngine {
|
||||||
namespace Periphery {
|
namespace Periphery {
|
||||||
RawController controller[1][1];
|
RawController controller[PortCount][DeviceCount];
|
||||||
|
|
||||||
void query_controller() {
|
void query_controller() {
|
||||||
printf("Needs implementation\n");
|
printf("Needs implementation\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static_assert(!Configuration::Periphery::UsePortB, "Port B not supported yet");
|
||||||
|
static_assert(!Configuration::Periphery::UseMultiTap, "MultiTap not supported yet");
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue