Skip to content

Commit

Permalink
Merge pull request #293 from ogamespec/master
Browse files Browse the repository at this point in the history
DI log commands
  • Loading branch information
ogamespec authored Aug 15, 2023
2 parents f664470 + 4685c44 commit 56a5043
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/di.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// DI - Flipper Disk Interface
#include "pch.h"

using namespace Debug;

// DI state (registers and other data)
DIControl di;

Expand Down Expand Up @@ -274,6 +276,17 @@ static void write_cr(uint32_t addr, uint32_t data)
{
// Issue command

if (di.log) {

Report(Channel::DI, "cmdbuf: %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X\n",
di.cmdbuf[0], di.cmdbuf[1], di.cmdbuf[2], di.cmdbuf[3],
di.cmdbuf[4], di.cmdbuf[5], di.cmdbuf[6], di.cmdbuf[7],
di.cmdbuf[8], di.cmdbuf[9], di.cmdbuf[10], di.cmdbuf[11] );
Report(Channel::DI, "immbuf: %02X %02X %02X %02X\n",
di.immbuf[0], di.immbuf[1], di.immbuf[2], di.immbuf[3] );
Report(Channel::DI, "mar: 0x%08X, len: 0x%08X\n", DIMAR, DILEN);
}

di.hostToDduByteCounter = 0;
DVD::DDU->SetTransferCallbacks(DIHostToDduCallbackCommand, DIDduToHostCallback);
DVD::DDU->StartTransfer(DVD::DduBusDirection::HostToDdu);
Expand Down

0 comments on commit 56a5043

Please sign in to comment.