Integrate all the progress into master #6
|
@ -1,7 +1,7 @@
|
|||
ARTIFACT = PoolBox
|
||||
BUILD_DIR = bin
|
||||
|
||||
#OVERLAY_CONFIG = Overlays.json
|
||||
OVERLAY_CONFIG = Overlays.json
|
||||
|
||||
include $(JABY_ENGINE_DIR)/lib/Wildcard.mk
|
||||
SRCS = $(call rwildcard, src, c cpp)
|
||||
|
|
|
@ -1,12 +1,7 @@
|
|||
{
|
||||
"slot_0": {
|
||||
"main_area": {
|
||||
"pattern": "bin/*/src/MainState/*.o"
|
||||
}
|
||||
},
|
||||
"slot_1": {
|
||||
"main_area2": {
|
||||
"pattern": "bin/*/src/MainState2/*.o"
|
||||
"timer_tests": {
|
||||
"pattern": "bin/*/src/TimerTests/*.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 <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 constexpr auto Counts = 500;
|
||||
static void load_assets() {
|
||||
static const JabyEngine::CDFile Assets[] = {
|
||||
JabyEngine::CDFileBuilder::simple_tim(LBA::FONT, JabyEngine::SimpleTIM(320, 0, 320, 256)),
|
||||
};
|
||||
|
||||
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();
|
||||
const auto buffer_cfg = JabyEngine::CDFileProcessor::BufferConfiguration::new_default();
|
||||
JabyEngine::CDFileProcessor file_processor;
|
||||
|
||||
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() {
|
||||
printf("Hello PoolBox!\n");
|
||||
mesaure_busy_loop();
|
||||
load_assets();
|
||||
|
||||
while(true) {
|
||||
JabyEngine::GPU::swap_buffers_vsync(2);
|
||||
}
|
||||
}
|
||||
}
|
||||
__declare_lba_header(LBA);
|
|
@ -4,7 +4,10 @@
|
|||
<License>%PSX_LICENSE_PATH%/LICENSEE.DAT</License>
|
||||
</Description>
|
||||
<Track>
|
||||
<File name="SYSTEM.CNF">iso/System.cnf</File>
|
||||
<Main name="XXXX_AAA.AA">application/bin/PSX-release/PoolBox.psexe</Main>
|
||||
<File name = "SYSTEM.CNF">iso/System.cnf</File>
|
||||
<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>
|
||||
</ISO_Project>
|
Loading…
Reference in New Issue