Skip to content

Commit

Permalink
Read filename in one chunk in Toolbox onSendFilePrep
Browse files Browse the repository at this point in the history
This appears to do something to make bus timings
compatible with some Adaptec host adapters.
  • Loading branch information
nielsmh committed Dec 30, 2024
1 parent a684366 commit bc07c93
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/BlueSCSI_Toolbox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -251,12 +251,12 @@ void onGetFile10(char * dir_name) {
void onSendFilePrep(char * dir_name)
{
char file_name[32+1];
memset(file_name, '\0', 32+1);

scsiEnterPhase(DATA_OUT);
for (int i = 0; i < 32+1; ++i)
{
file_name[i] = scsiReadByte();
}
scsiRead(static_cast<uint8_t *>(static_cast<void *>(file_name)), 32+1, NULL);
file_name[32] = '\0';

debuglog("TOOLBOX OPEN FILE FOR WRITE: '", file_name, "'");
SD.chdir(dir_name);
gFile.open(file_name, FILE_WRITE);
SD.chdir("/");
Expand Down

0 comments on commit bc07c93

Please sign in to comment.