Integrate all the progress into master #6

Merged
jaby merged 595 commits from ToolBox into main 2025-01-01 13:17:44 +00:00
1 changed files with 8 additions and 14 deletions
Showing only changes of commit 5f45070961 - Show all commits

View File

@ -112,18 +112,7 @@ namespace JabyEngine {
} break;
case CD_IO::Interrupt::DataEnd: {
//set_tcb(get_tcb_of_th(thread));
/*printf("EPC: 0x%p; SR: 0x%p\n", get_current_tcb().reg[31], get_current_tcb().sr);
get_current_tcb().reg[31] = (uint32_t)(void(*)())[]() {
printf("Wuff! Now crash!\n");
while(true);
};
printf("EPC: 0x%p; SR: 0x%p\n", get_current_tcb().reg[31], get_current_tcb().sr); while(true);*/
//SysCall::ReturnFromException();
if(thread != 0) {
if(thread != 0 && table_of_tables.processes->current_tcb == &table_of_tables.threads[0]) {
//changeThread(thread);
printf("About to change...\n");
table_of_tables.processes->current_tcb = &table_of_tables.threads[thread&0xFFFF];
@ -169,13 +158,18 @@ namespace JabyEngine {
printf("Hallo!\n");
CD_IO::PortIndex0::change_to();
Command::send<CD_IO::PortIndex0>(CD_IO::Command::SetLoc, static_cast<uint8_t>(0x0), static_cast<uint8_t>(0x09), static_cast<uint8_t>(0x0));
printf("Wait...\n");
Command::send_wait<CD_IO::PortIndex0>(CD_IO::Command::SetLoc, static_cast<uint8_t>(0x0), static_cast<uint8_t>(0x09), static_cast<uint8_t>(0x0));
printf("Done!\n");
Command::send<CD_IO::PortIndex0>(CD_IO::Command::Play);
table_of_tables.processes->current_tcb = &table_of_tables.threads[0];
SysCall::ReturnFromException();
}, reinterpret_cast<uint32_t*>(0x80010000), SysCall::get_gp());
}, &stack[1023], SysCall::get_gp());
SysCall::ExitCriticalSection();
table_of_tables.threads[thread&0xFFFF].sr = table_of_tables.threads[0].sr;
printf(">>> 0x%X\n", table_of_tables.threads[0].sr);
}
Command::wait_completed();