Remove old prints + fix log types

Up next is the transition to a git submodule, should be simple enough
This commit is contained in:
Shay
2020-10-02 12:36:22 -06:00
parent 27ba6022bd
commit 59eedf6518
8 changed files with 13 additions and 58 deletions
+2 -22
View File
@@ -148,15 +148,12 @@ void InitParms(int argc, const char* const* argv) {
* DONE, EXACT
*/
void InitCD() {
// printf("Initializing CD drive\nThis may take a while ...\n");
spdlog::debug("Initializing CD drive\nThis may take a while...\n");
spdlog::info("Initializing CD drive\nThis may take a while...\n");
sceCdInit(SCECdINIT);
sceCdMmode(SCECdDVD);
while (sceCdDiskReady(0) == SCECdNotReady) {
// printf("Drive not ready ... insert a disk!\n");
spdlog::debug("Drive not ready... insert a disk!\n");
}
// printf("Disk type %d\n", sceCdGetDiskType());
spdlog::debug("Disk type {}\n", sceCdGetDiskType());
}
@@ -175,27 +172,21 @@ void InitIOP() {
if (!reboot) {
// reboot with development IOP kernel
// printf("Rebooting IOP...\n");
spdlog::debug("Rebooting IOP...");
while (!sceSifRebootIop("host0:/usr/local/sce/iop/modules/ioprp221.img")) {
// printf("Failed, retrying...\n");
spdlog::debug("Failed, retrying");
}
while (!sceSifSyncIop()) {
// printf("Syncing...\n");
spdlog::debug("Syncing...");
}
} else {
// reboot with IOP kernel off of the disk
// reboot with development IOP kernel
// printf("Rebooting IOP...\n");
spdlog::debug("Rebooting IOP...");
while (!sceSifRebootIop("cdrom0:\\DRIVERS\\IOPRP221.IMG;1")) {
// printf("Failed, retrying...\n");
spdlog::debug("Failed, retrying");
}
while (!sceSifSyncIop()) {
// printf("Syncing...\n");
spdlog::debug("Syncing...");
}
}
@@ -247,7 +238,6 @@ void InitIOP() {
sceSifLoadModule("host0:/usr/home/src/989snd10/iop/989ERR.IRX", 0, nullptr);
// printf("Initializing CD library\n");
spdlog::debug("Initializing CD library...");
auto rv = sceSifLoadModule("host0:binee/overlord.irx", cmd + len + 1 - overlord_boot_command,
overlord_boot_command);
@@ -280,7 +270,6 @@ void InitIOP() {
MsgErr("loading 989snd.irx failed\n");
}
// printf("Initializing CD library in ISO_CD mode\n");
spdlog::debug("Initializing CD library in ISO_CD mode...");
auto rv = sceSifLoadModule("cdrom0:\\\\DRIVERS\\\\OVERLORD.IRX;1",
cmd + len + 1 - overlord_boot_command, overlord_boot_command);
@@ -292,8 +281,7 @@ void InitIOP() {
if (rv < 0) {
MsgErr("MC driver init failed %d\n", rv);
} else {
// printf("InitIOP OK\n");
spdlog::debug("InitIOP OK");
spdlog::info("InitIOP OK");
}
}
@@ -314,8 +302,6 @@ int InitMachine() {
// initialize the global heap
u32 global_heap_size = GLOBAL_HEAP_END - HEAP_START;
float size_mb = ((float)global_heap_size) / (float)(1 << 20);
// printf("gkernel: global heap - 0x%x to 0x%x (size %.3f MB)\n", HEAP_START, GLOBAL_HEAP_END,
// size_mb);
spdlog::info("gkernel: global heap 0x{} to 0x{} (size {} MB)", HEAP_START, GLOBAL_HEAP_END,
size_mb);
kinitheap(kglobalheap, Ptr<u8>(HEAP_START), global_heap_size);
@@ -326,8 +312,6 @@ int InitMachine() {
kinitheap(kdebugheap, Ptr<u8>(DEBUG_HEAP_START), debug_heap_size);
float debug_size_mb = ((float)debug_heap_size) / (float)(1 << 20);
float gap_size_mb = ((float)DEBUG_HEAP_START - GLOBAL_HEAP_END) / (float)(1 << 20);
// printf("gkernel: debug heap - 0x%x to 0x%x (size %.3f MB, gap %.3f MB)\n", DEBUG_HEAP_START,
// debug_heap_end, debug_size_mb, gap_size_mb);
spdlog::info("gkernel: global heap 0x{} to 0x{} (size {} MB, gap {} MB)", DEBUG_HEAP_START,
debug_heap_end, debug_size_mb, gap_size_mb);
} else {
@@ -354,10 +338,8 @@ int InitMachine() {
InitGoalProto();
}
// printf("InitSound\n");
spdlog::info("InitSound");
InitSound(); // do nothing!
// printf("InitRPC\n");
spdlog::info("InitRPC");
InitRPC(); // connect to IOP
reset_output(); // reset output buffers
@@ -369,10 +351,8 @@ int InitMachine() {
}
spdlog::info("InitListenerConnect");
// printf("InitListenerConnect\n");
InitListenerConnect();
spdlog::info("InitCheckListener");
// printf("InitCheckListener\n");
InitCheckListener();
Msg(6, "kernel: machine started\n");
return 0;