More and more bugs
This commit is contained in:
parent
52cdd4dbc0
commit
8604ebf8d4
|
@ -221,6 +221,9 @@ namespace LoadingScene {
|
|||
}
|
||||
|
||||
void main() {
|
||||
printf("Hello Plaschi\n");
|
||||
CDXA::planschi();
|
||||
printf("Bye Bye Planschi\n");
|
||||
setup();
|
||||
|
||||
while(true) {
|
||||
|
|
|
@ -10,5 +10,7 @@ namespace JabyEngine {
|
|||
|
||||
void push_play();
|
||||
void pop_play();
|
||||
|
||||
void planschi();
|
||||
}
|
||||
}
|
|
@ -20,6 +20,7 @@ namespace JabyEngine {
|
|||
|
||||
extern State current_state;
|
||||
extern volatile uint8_t cmd_interrupt_bit;
|
||||
extern uint8_t last_cmd;
|
||||
|
||||
struct Command {
|
||||
struct Internal {
|
||||
|
@ -36,6 +37,10 @@ namespace JabyEngine {
|
|||
} while(cur_irq == CD_IO::Interrupt::None);
|
||||
cur_irq = CD_IO::Interrupt::get_type(CD_IO::PortIndex1::InterruptFlag);
|
||||
|
||||
if(cur_irq == CD_IO::Interrupt::DataReady) {
|
||||
printf("Wopsie!\n");
|
||||
}
|
||||
|
||||
CD_IO::Interrupt::ack_extended(CD_IO::PortIndex1::InterruptFlag);
|
||||
cmd_interrupt_bit = bit::set(cmd_interrupt_bit, cur_irq);
|
||||
return cur_irq;
|
||||
|
@ -97,6 +102,7 @@ namespace JabyEngine {
|
|||
|
||||
BCDTimeStamp get_loc();
|
||||
|
||||
void enable_CD();
|
||||
void enable_CDDA();
|
||||
void enable_CDXA(bool double_speed);
|
||||
|
||||
|
|
|
@ -68,5 +68,13 @@ namespace JabyEngine {
|
|||
CD::Command::send_wait(CD_IO::Command::SetLoc, setting.last_loc.min, setting.last_loc.sec, setting.last_loc.sector);
|
||||
CD::Command::send_wait(CD_IO::Command::ReadS);
|
||||
}
|
||||
|
||||
void planschi() {
|
||||
for(size_t n = 0; n < 100; n++) {
|
||||
CD::enable_CD();
|
||||
CD::enable_CDXA(false);
|
||||
printf("%i\n", n);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -194,6 +194,11 @@ namespace JabyEngine {
|
|||
return BCDTimeStamp{min, sec, sectors};
|
||||
}
|
||||
|
||||
void enable_CD() {
|
||||
CD_IO::PortIndex0::change_to();
|
||||
Command::send_wait(CD_IO::Command::SetMode, DataSectorMode);
|
||||
}
|
||||
|
||||
void enable_CDDA() {
|
||||
CD_IO::PortIndex0::change_to();
|
||||
Command::send_wait(CD_IO::Command::SetMode, AudioSectorMode);
|
||||
|
@ -205,9 +210,9 @@ namespace JabyEngine {
|
|||
|
||||
const uint8_t mode = XAAudioSectorMode.raw | (double_speed ? DoubleSpeedBit : SingleSpeedBit);
|
||||
|
||||
current_state = State::XAMode;
|
||||
CD_IO::PortIndex0::change_to();
|
||||
Command::send_wait(CD_IO::Command::SetMode, mode);
|
||||
current_state = State::XAMode;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue