mirror of
https://github.com/liuk7071/ChonkyStation.git
synced 2024-05-10 00:24:07 -04:00
[CDROM] Add logger before it's too late
This commit is contained in:
parent
216aecf234
commit
fc2155a208
1
external/Panda3DS/logger.hpp
vendored
1
external/Panda3DS/logger.hpp
vendored
|
@ -27,6 +27,7 @@ public:
|
|||
static auto cpuTraceLogger = Logger<false>("[CPU TRACE] ");
|
||||
static auto dmaLogger = Logger<false>("[ DMA ] ");
|
||||
static auto gpuLogger = Logger<false>("[ GPU ] ");
|
||||
static auto cdromLogger = Logger<true> ("[ CDROM ] ");
|
||||
|
||||
|
||||
#define MAKE_LOG_FUNCTION(functionName, logger) \
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#include <cdrom.hpp>
|
||||
|
||||
|
||||
MAKE_LOG_FUNCTION(log, cdromLogger)
|
||||
|
||||
CDROM::CDROM(Scheduler* scheduler) : scheduler(scheduler) {
|
||||
statusReg.prmempt = 1; // Parameter fifo empty
|
||||
statusReg.prmwrdy = 1; // Parameter fifo not full
|
||||
|
@ -14,6 +16,8 @@ void CDROM::executeCommand(u8 data) {
|
|||
case CDROMCommands::GetStat: {
|
||||
response.push(statusCode.raw);
|
||||
scheduler->push(&int3, scheduler->time + int3Delay, this);
|
||||
|
||||
log("GetStat (stat: 0x%02x)\n", statusCode.raw);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -26,6 +30,8 @@ void CDROM::executeCommand(u8 data) {
|
|||
|
||||
response.push(statusCode.raw);
|
||||
scheduler->push(&int3, scheduler->time + int3Delay, this);
|
||||
|
||||
log("SetLoc (loc: %d)\n", seekLoc);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -44,6 +50,8 @@ void CDROM::executeCommand(u8 data) {
|
|||
}
|
||||
|
||||
scheduler->push(&int3, scheduler->time + int3Delay, this);
|
||||
|
||||
log("Test\n", statusCode.raw);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -74,6 +82,8 @@ void CDROM::executeCommand(u8 data) {
|
|||
|
||||
scheduler->push(&int3, scheduler->time + int3Delay, this);
|
||||
scheduler->push(&int2, scheduler->time + int3Delay + getIDDelay, this);
|
||||
|
||||
log("GetID\n", statusCode.raw);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <helpers.hpp>
|
||||
#include <logger.hpp>
|
||||
#include <BitField.hpp>
|
||||
#include <queue>
|
||||
#include <scheduler.hpp>
|
||||
|
|
Loading…
Reference in a new issue