Finish clean-up
This commit is contained in:
@@ -15,11 +15,11 @@ namespace JabyEngine {
|
||||
}
|
||||
|
||||
template<typename...ARGS>
|
||||
static void send(New::IOPort<CD_IO::CommandFifo>& cmd_fifo, New::IOPort<CD_IO::ParameterFifo>& parameter_fifo, CD_IO::Command::Desc cmd, ARGS...args) {
|
||||
static void send(IOPort<CD_IO::CommandFifo>& cmd_fifo, IOPort<CD_IO::ParameterFifo>& parameter_fifo, CD_IO::Command::Desc cmd, ARGS...args) {
|
||||
while(CD_IO::IndexStatus.read().is_set2(CD_IO::IndexStatus::IsTransmissionBusy));
|
||||
|
||||
((parameter_fifo.write(CD_IO::ParameterFifo{args})),...);
|
||||
cmd_fifo.write(CD_IO::CommandFifo{cmd.id});
|
||||
cmd_fifo.write(CD_IO::CommandFifo {cmd.id});
|
||||
cmd_interrupt_bit = bit::set(0, cmd.complete_irq);
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace JabyEngine {
|
||||
}
|
||||
|
||||
template<typename...ARGS>
|
||||
static void send_wait(New::IOPort<CD_IO::CommandFifo>& cmd_fifo, New::IOPort<CD_IO::ParameterFifo>& parameter_fifo, CD_IO::Command::Desc cmd, ARGS...args) {
|
||||
static void send_wait(IOPort<CD_IO::CommandFifo>& cmd_fifo, IOPort<CD_IO::ParameterFifo>& parameter_fifo, CD_IO::Command::Desc cmd, ARGS...args) {
|
||||
send(cmd_fifo, parameter_fifo, cmd, args...);
|
||||
wait_completed();
|
||||
}
|
||||
|
@@ -26,7 +26,7 @@ namespace JabyEngine {
|
||||
|
||||
static void configurate_display() {
|
||||
// Ideal I hope that an offset of 0,0 will produce a well enough centered picture for every TV
|
||||
GPU_IO::GP1.write(GPU_IO::Command::DisplayMode(internal::Display::DisplayMode));
|
||||
GPU_IO::GP1.write(GPU_IO::Command::DisplayMode(::JabyEngine::GPU::internal::Display::DisplayMode));
|
||||
GPU::Display::set_offset(0, 0);
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ namespace JabyEngine {
|
||||
state.process(bytes_ready);
|
||||
|
||||
// Duplicate DisplayBuffer content
|
||||
internal::copy_vram_to_vram({PositionU16(0, Display::Height), SizeU16(Display::Width, Display::Height)}, PositionU16(0, 0));
|
||||
::JabyEngine::GPU::internal::copy_vram_to_vram({PositionU16(0, Display::Height), SizeU16(Display::Width, Display::Height)}, PositionU16(0, 0));
|
||||
|
||||
Display::enable();
|
||||
}
|
||||
@@ -67,7 +67,7 @@ namespace JabyEngine {
|
||||
void setup() {
|
||||
GPU_IO::GP1.write(GPU_IO::Command::Reset());
|
||||
configurate_display();
|
||||
internal::Display::exchange_buffer_and_display();
|
||||
::JabyEngine::GPU::internal::Display::exchange_buffer_and_display();
|
||||
|
||||
GPU::internal::wait_ready_for_CMD();
|
||||
GPU::internal::quick_fill_fast(Color24::Black(), {PositionU16(0, 0), SizeU16(Display::Width, Display::Height)});
|
||||
|
@@ -11,30 +11,10 @@ extern "C" uint32_t __planschi_start;
|
||||
extern "C" uint32_t __planschi_end;
|
||||
|
||||
namespace JabyEngine {
|
||||
// For now
|
||||
namespace Blubb {
|
||||
__new_declare_io_value(Test, uint32_t) {
|
||||
};
|
||||
__new_declare_io_port(, Test, 0);
|
||||
static void bla(New::IOPort<struct Test>& wuff) {
|
||||
asm("#planschi");
|
||||
const auto a = Test::from(Bit(1), Bit(2));
|
||||
|
||||
wuff.write(a);
|
||||
wuff.write(a);
|
||||
wuff.write(a);
|
||||
asm("#planschi");
|
||||
}
|
||||
}
|
||||
|
||||
namespace boot {
|
||||
namespace Start {
|
||||
static void enable_DMA() {
|
||||
::JabyEngine::Blubb::bla(::JabyEngine::Blubb::Test);
|
||||
|
||||
asm("#miau");
|
||||
DMA_IO::DPCR.write(DMA_IO::DPCR.read().set2(DMA_IO::DPCR::SPUEnable, DMA_IO::DPCR::GPUEnable, DMA_IO::DPCR::CDROMEnable));
|
||||
asm("#miau");
|
||||
}
|
||||
|
||||
static void setup() {
|
||||
|
Reference in New Issue
Block a user