Try loading TexturePage
This commit is contained in:
parent
406e803234
commit
34f78e08b1
|
@ -1,7 +1,7 @@
|
||||||
ARTIFACT = PoolBox
|
ARTIFACT = PoolBox
|
||||||
BUILD_DIR = bin
|
BUILD_DIR = bin
|
||||||
|
|
||||||
#OVERLAY_CONFIG = Overlays.json
|
OVERLAY_CONFIG = Overlays.json
|
||||||
|
|
||||||
include $(JABY_ENGINE_DIR)/lib/Wildcard.mk
|
include $(JABY_ENGINE_DIR)/lib/Wildcard.mk
|
||||||
SRCS = $(call rwildcard, src, c cpp)
|
SRCS = $(call rwildcard, src, c cpp)
|
||||||
|
|
|
@ -1,12 +1,7 @@
|
||||||
{
|
{
|
||||||
"slot_0": {
|
"slot_0": {
|
||||||
"main_area": {
|
"timer_tests": {
|
||||||
"pattern": "bin/*/src/MainState/*.o"
|
"pattern": "bin/*/src/TimerTests/*.o"
|
||||||
}
|
|
||||||
},
|
|
||||||
"slot_1": {
|
|
||||||
"main_area2": {
|
|
||||||
"pattern": "bin/*/src/MainState2/*.o"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -0,0 +1,17 @@
|
||||||
|
#include <PSX/Timer/high_res_timer.hpp>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
extern "C" void busy_loop(int count);
|
||||||
|
namespace Overlay {
|
||||||
|
void mesaure_busy_loop() {
|
||||||
|
static constexpr auto Counts = 500;
|
||||||
|
|
||||||
|
JabyEngine::HighResTime::enable();
|
||||||
|
const auto start = JabyEngine::HighResTime::get_time_stamp();
|
||||||
|
busy_loop(Counts);
|
||||||
|
const auto end = JabyEngine::HighResTime::get_time_stamp();
|
||||||
|
JabyEngine::HighResTime::disable();
|
||||||
|
|
||||||
|
printf("Busy loop of %i took %ims %ins\n", Counts, start.milliseconds_to(end), start.microseconds_to(end));
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,26 +1,47 @@
|
||||||
#include <PSX/Timer/high_res_timer.hpp>
|
#include <PSX/File/Processor/cd_file_processor.hpp>
|
||||||
|
#include <PSX/AutoLBA/auto_lba_declaration.hpp>
|
||||||
#include <PSX/GPU/gpu.hpp>
|
#include <PSX/GPU/gpu.hpp>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
extern "C" void busy_loop(int count);
|
enum LBA {
|
||||||
|
__jabyengine_start_lba_request
|
||||||
|
__jabyengine_request_lba_for(FONT, "ASSETS/FONT.BIN"),
|
||||||
|
__jabyengine_end_lba_request
|
||||||
|
};
|
||||||
|
|
||||||
static void mesaure_busy_loop() {
|
static void load_assets() {
|
||||||
static constexpr auto Counts = 500;
|
static const JabyEngine::CDFile Assets[] = {
|
||||||
|
JabyEngine::CDFileBuilder::simple_tim(LBA::FONT, JabyEngine::SimpleTIM(320, 0, 320, 256)),
|
||||||
|
};
|
||||||
|
|
||||||
JabyEngine::HighResTime::enable();
|
const auto buffer_cfg = JabyEngine::CDFileProcessor::BufferConfiguration::new_default();
|
||||||
const auto start = JabyEngine::HighResTime::get_time_stamp();
|
JabyEngine::CDFileProcessor file_processor;
|
||||||
busy_loop(Counts);
|
|
||||||
const auto end = JabyEngine::HighResTime::get_time_stamp();
|
|
||||||
JabyEngine::HighResTime::disable();
|
|
||||||
|
|
||||||
printf("Busy loop of %i took %ims %ins\n", Counts, start.milliseconds_to(end), start.microseconds_to(end));
|
file_processor.setup(lba, Assets, buffer_cfg);
|
||||||
|
while(true) {
|
||||||
|
switch(file_processor.process()) {
|
||||||
|
case JabyEngine::Progress::InProgress:
|
||||||
|
break;
|
||||||
|
|
||||||
|
case JabyEngine::Progress::Done:
|
||||||
|
if(!file_processor.next(lba, buffer_cfg)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case JabyEngine::Progress::Error:
|
||||||
|
printf("Error detected! Aborting load\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
printf("Hello PoolBox!\n");
|
printf("Hello PoolBox!\n");
|
||||||
mesaure_busy_loop();
|
load_assets();
|
||||||
|
|
||||||
while(true) {
|
while(true) {
|
||||||
JabyEngine::GPU::swap_buffers_vsync(2);
|
JabyEngine::GPU::swap_buffers_vsync(2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
__declare_lba_header(LBA);
|
|
@ -4,7 +4,10 @@
|
||||||
<License>%PSX_LICENSE_PATH%/LICENSEE.DAT</License>
|
<License>%PSX_LICENSE_PATH%/LICENSEE.DAT</License>
|
||||||
</Description>
|
</Description>
|
||||||
<Track>
|
<Track>
|
||||||
<File name="SYSTEM.CNF">iso/System.cnf</File>
|
<File name = "SYSTEM.CNF">iso/System.cnf</File>
|
||||||
<Main name="XXXX_AAA.AA">application/bin/PSX-release/PoolBox.psexe</Main>
|
<Main name = "XXXX_AAA.AA" lba_source = "application/src/main.cpp">application/bin/PSX-release/PoolBox.psexe</Main>
|
||||||
|
<Directory name="ASSETS">
|
||||||
|
<File name = "FONT.BIN" lz4 = "already">assets/bin/TexturePage.bin</File>
|
||||||
|
</Directory>
|
||||||
</Track>
|
</Track>
|
||||||
</ISO_Project>
|
</ISO_Project>
|
Loading…
Reference in New Issue