Save state before change
This commit is contained in:
@@ -7,6 +7,8 @@
|
||||
|
||||
namespace JabyEngine {
|
||||
namespace CD {
|
||||
extern volatile uint8_t zero;
|
||||
|
||||
namespace internal {
|
||||
enum struct State {
|
||||
Ready = 0,
|
||||
@@ -84,6 +86,7 @@ namespace JabyEngine {
|
||||
void continue_reading();
|
||||
|
||||
BCDTimeStamp get_loc();
|
||||
BCDTimeStamp get_locL();
|
||||
|
||||
void enable_CD();
|
||||
void enable_CDDA();
|
||||
|
@@ -48,7 +48,7 @@ namespace JabyEngine {
|
||||
setting.get_loc_functional = !CD::get_loc().is_zero();
|
||||
|
||||
CD::enable_CDXA(double_speed); //< Activates PortIndex0
|
||||
set_channel(channel);
|
||||
set_channel(channel);printf("!!0-%X %X %X\n", setting.start_loc.min, setting.start_loc.sec, setting.start_loc.sector);
|
||||
CD::NewCommand::send(CD_IO::Command::SetLoc, setting.start_loc.min, setting.start_loc.sec, setting.start_loc.sector);
|
||||
CD::NewCommand::send(CD_IO::Command::ReadS);
|
||||
}
|
||||
@@ -75,8 +75,8 @@ namespace JabyEngine {
|
||||
void pop_play() {
|
||||
CD::enable_CDXA(setting.double_speed); //< Activates PortIndex0
|
||||
|
||||
set_channel(setting.channel);
|
||||
CD::NewCommand::send(CD_IO::Command::SetLoc, setting.last_loc.min, setting.last_loc.sec, setting.last_loc.sector);
|
||||
set_channel(setting.channel);printf("!!1-%X %X %X\n", setting.last_loc.min, setting.last_loc.sec, setting.last_loc.sector);
|
||||
CD::NewCommand::send_wait_response(CD_IO::Command::SetLoc, setting.last_loc.min, setting.last_loc.sec, setting.last_loc.sector);
|
||||
CD::NewCommand::send(CD_IO::Command::ReadS);
|
||||
}
|
||||
}
|
||||
|
@@ -56,8 +56,8 @@ namespace JabyEngine {
|
||||
return self.circular_buffer.allocate();
|
||||
}));
|
||||
|
||||
printf(">>> 0x%p\n", this->jobs.files);
|
||||
printf(">>> %i.) CD needs to load LBA: %i -> %i (is LZ4: [%s])\n", cur_job.rel_lba_idx, cur_lba.get_lba(), cur_lba.get_size_in_sectors(), cur_lba.is_lz4() ? "Yes" : "No");
|
||||
//printf(">>> 0x%p\n", this->jobs.files);
|
||||
//printf(">>> %i.) CD needs to load LBA: %i -> %i (is LZ4: [%s])\n", cur_job.rel_lba_idx, cur_lba.get_lba(), cur_lba.get_size_in_sectors(), cur_lba.is_lz4() ? "Yes" : "No");
|
||||
}
|
||||
|
||||
bool CDFileProcessor :: process_data() {
|
||||
|
@@ -104,7 +104,7 @@ namespace JabyEngine {
|
||||
}
|
||||
|
||||
static Progress switch_state_parse_data(State::Configuration& config, SimpleTIMState& state) {
|
||||
state.words_left = set_gpu_receive_data(reinterpret_cast<const uint32_t*>(config.data_adr), {state.dst_info.get_texture_position(), state.size_info.get_texture_size()});
|
||||
state.words_left = set_gpu_receive_data(reinterpret_cast<const uint32_t*>(config.data_adr), {state.dst_info.get_texture_position(), state.size_info.get_texture_size()});
|
||||
return Helper::exchange_and_execute_process_function(parse_data, config, state);
|
||||
}
|
||||
|
||||
|
@@ -32,7 +32,9 @@ namespace JabyEngine {
|
||||
|
||||
void routine(uint32_t irq) {
|
||||
while(true) {
|
||||
const auto old_status = CD_IO::IndexStatus.read();
|
||||
CD_IRQ::process(irq);
|
||||
CD_IO::IndexStatus.write(old_status);
|
||||
irq = Callback::internal::CD::resume();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user