Integrate all the progress into master #6
|
@ -6,8 +6,6 @@
|
||||||
namespace ScreenCenter {
|
namespace ScreenCenter {
|
||||||
using namespace JabyEngine;
|
using namespace JabyEngine;
|
||||||
|
|
||||||
// TODO: Fit these pieces into 16Word buffers (sizeof(T) >> 2 == words)
|
|
||||||
// TODO: Can we DMA all of this?
|
|
||||||
class Frame {
|
class Frame {
|
||||||
private:
|
private:
|
||||||
struct TopBorder : public GPU::internal::LinkedElementCreator<TopBorder> {
|
struct TopBorder : public GPU::internal::LinkedElementCreator<TopBorder> {
|
||||||
|
@ -90,10 +88,7 @@ namespace ScreenCenter {
|
||||||
}
|
}
|
||||||
|
|
||||||
void setup() {
|
void setup() {
|
||||||
// TODO: I want this in one line
|
this->top_border.concat(this->bottom_border.concat(this->line_border.concat(this->line_cross)));
|
||||||
this->top_border.concat(this->bottom_border);
|
|
||||||
this->bottom_border.concat(this->line_border);
|
|
||||||
this->line_border.concat(this->line_cross);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void render() const {
|
void render() const {
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
#include "../../Auxiliary/bits.hpp"
|
#include "../../Auxiliary/bits.hpp"
|
||||||
#include "../../Auxiliary/type_traits.hpp"
|
#include "../../Auxiliary/type_traits.hpp"
|
||||||
|
#include "../../System/IOPorts/gpu_io.hpp"
|
||||||
|
|
||||||
namespace JabyEngine {
|
namespace JabyEngine {
|
||||||
namespace GPU {
|
namespace GPU {
|
||||||
|
@ -38,14 +39,14 @@ namespace JabyEngine {
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
enable_if<!is_pointer<T>::value, T&>::type concat(T& obj) {
|
enable_if<!is_pointer<T>::value, Link&>::type concat(T& obj) {
|
||||||
Link::set_adr(&obj);
|
Link::set_adr(&obj);
|
||||||
return obj;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
enable_if<!is_pointer<T>::value, const T&>::type concat(const T& obj) {
|
enable_if<!is_pointer<T>::value, const Link&>::type concat(const T& obj) {
|
||||||
return concat(const_cast<T&>(obj));
|
return concat(const_cast<Link&>(obj));
|
||||||
}
|
}
|
||||||
|
|
||||||
constexpr void terminate() {
|
constexpr void terminate() {
|
||||||
|
@ -77,8 +78,7 @@ namespace JabyEngine {
|
||||||
return &this->element;
|
return &this->element;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Replace this magic number?
|
static_assert((sizeof(T) >> 2) <= GPU_IO::FIFOWordSize);
|
||||||
static_assert((sizeof(T) >> 2) <= 16);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
namespace internal {
|
namespace internal {
|
||||||
|
|
|
@ -216,6 +216,8 @@ namespace JabyEngine {
|
||||||
static constexpr auto TexturePageY256 = Bit(4);
|
static constexpr auto TexturePageY256 = Bit(4);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static constexpr size_t FIFOWordSize = 16;
|
||||||
|
|
||||||
__declare_io_port(, GP0, 0x1F801810);
|
__declare_io_port(, GP0, 0x1F801810);
|
||||||
__declare_io_port(, GP1, 0x1F801814);
|
__declare_io_port(, GP1, 0x1F801814);
|
||||||
|
|
||||||
|
|
|
@ -48,7 +48,6 @@ namespace JabyEngine {
|
||||||
using namespace JabyEngine::GPU;
|
using namespace JabyEngine::GPU;
|
||||||
|
|
||||||
static void configurate_display() {
|
static void configurate_display() {
|
||||||
// Ideal I hope that an offset of 0,0 will produce a well enough centered picture for every TV for now
|
|
||||||
GPU_IO::GP1.write(GPU_IO::Command::DisplayMode(::JabyEngine::GPU::internal::Display::DisplayMode));
|
GPU_IO::GP1.write(GPU_IO::Command::DisplayMode(::JabyEngine::GPU::internal::Display::DisplayMode));
|
||||||
GPU::Display::set_offset(0, 0);
|
GPU::Display::set_offset(0, 0);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue