Fix CDXA on PS3

This commit is contained in:
Jaby 2024-07-20 16:05:53 +02:00
parent e6c5ed161f
commit d1321b133f
8 changed files with 20 additions and 13 deletions

View File

@ -169,6 +169,11 @@ namespace NormalScene {
FontWriter::new_font_writer.write(cursor, Title, GPU::Color24::Yellow(0xD0), &FontWriter::wiggle);
FontWriter::new_font_writer.write(cursor.change_position(Make::PositionI16((GPU::Display::Width-VersionLength)/2, 16 + DefaultFont::Info.get_kern_size().height)), Version, GPU::Color24::Green(0xD0), &FontWriter::wiggle);
menu.update(FontWriter::bios_font_writer, cursor, Make::PositionI16(8, 64));
// TODO: Make this a feature
// Force state change for now
/*state_changer.asset_load = Assets::Overlay::load_gpu_test;
state_changer.main = GPUTest::main;*/
}
static void render() {
@ -201,7 +206,7 @@ namespace LoadingScene {
static void run() {
if(true) {//(old_state_changer != state_changer) {
printf("Loading new state...\n");
//printf("Loading new state...\n");
// TODO: Callback for file load? Locally?
update();

View File

@ -49,7 +49,7 @@ namespace Menu {
bool BackMenu :: update(const GPU::PositionI16& position, bool auto_clear) {
const auto& controller = Periphery::get_primary_controller_as<JabyEngine::Periphery::GenericController>();
if(controller.button.is_down(DigitalButton::Circle)) {
if(true/*controller.button.is_down(DigitalButton::Circle)*/) {
this->waiting = true;
if(this->timeout.is_expired_for(2500_ms)) {
return true;

View File

@ -37,5 +37,12 @@
<Channel>../assets/bin/Evacuation.xa</Channel>
</XA-Audio>
</Directory>
<!-- TODO: Support lead out track of 2 seconds for PS3 -->
<Directory hidden = "true">
<File>../assets/bin/fox.xa</File>
<File>../assets/bin/fox.xa</File>
<File>../assets/bin/fox.xa</File>
<File>../assets/bin/fox.xa</File>
</Directory>
</Track>
</ISO_Project>

View File

@ -178,6 +178,7 @@ namespace JabyEngine {
static constexpr Desc GetLocP{0x11, Interrupt::Type::Acknowledge};
static constexpr Desc GetTN{0x13, Interrupt::Type::Acknowledge};
static constexpr Desc GetTD{0x14, Interrupt::Type::Acknowledge};
static constexpr Desc SeekL{0x15, Interrupt::Type::Complete};
static constexpr Desc ReadS{0x1B, Interrupt::Type::DataReady};
};

View File

@ -1,5 +1,5 @@
#pragma once
#include "../stddef.hpp"
#include <stddef.hpp>
#define __used __attribute__((used))
#define __no_align __attribute__((packed))

View File

@ -64,7 +64,7 @@ namespace JabyEngine {
CD::enable_CDXA(setting.double_speed); //< Activates PortIndex0
set_channel(setting.channel);
CD::Command::send_wait_response(CD_IO::Command::SetLoc, setting.last_loc.min, setting.last_loc.sec, setting.last_loc.sector);
CD::Command::send(CD_IO::Command::SetLoc, setting.last_loc.min, setting.last_loc.sec, setting.last_loc.sector);
CD::Command::send(CD_IO::Command::ReadS);
}
}

View File

@ -8,7 +8,6 @@ namespace JabyEngine {
namespace CD {
namespace internal {
extern SysCall::InterruptCallback irq_callback;
extern void blubb();
}
}
@ -39,7 +38,7 @@ namespace JabyEngine {
SysCall::ExitCriticalSection();
// TODO: Do we need this at all?!
__debug_boot_color_at(::JabyEngine::GPU::Color24::Red(), DebugX, DebugY, DebugScale);
/*__debug_boot_color_at(::JabyEngine::GPU::Color24::Red(), DebugX, DebugY, DebugScale);
CD_IO::PortIndex0::change_to();
__debug_boot_color_at(::JabyEngine::GPU::Color24::Green(), DebugX, DebugY, DebugScale);
@ -47,9 +46,9 @@ namespace JabyEngine {
__debug_boot_color_at(::JabyEngine::GPU::Color24::Blue(), DebugX, DebugY, DebugScale);
Command::send(CD_IO::Command::GetStat);
__debug_boot_color_at(::JabyEngine::GPU::Color24::Yellow(), DebugX, DebugY, DebugScale);
Command::send(CD_IO::Command::Init);
Command::send(CD_IO::Command::Init);*/
Command::send(CD_IO::Command::Demute);
//Command::send(CD_IO::Command::Demute);
}
}
}

View File

@ -22,10 +22,6 @@ namespace JabyEngine {
ExternalAudioInputVolume::Right.write({0});
}
static void clear_control_register() {
ControlRegister.write({0});
}
static void clear_voice() {
for(auto& voice : SPU_IO::Voice) {
voice.volumeLeft.write({0});
@ -87,7 +83,6 @@ namespace JabyEngine {
clear_main_volume();
clear_cd_and_ext_audio_volume();
clear_control_register();
clear_voice();
clear_pmon();
clear_noise_and_echo();