Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DI log commands #293

Merged
merged 1 commit into from
Aug 15, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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