File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -705,9 +705,17 @@ int Modem :: ExecuteCommand(ModemCommand_t *cmd)
705705 }
706706
707707 // ATA command does not return a response (except for CONNECT response)
708- if (doesResponse)
709- acia.SendToRx ((uint8_t *)response, strlen (response));
710-
708+ if (doesResponse) {
709+ char hex_buf[128 ]; // Buffer for HEX string
710+ int pos = 0 ;
711+ size_t resp_len = strlen (response);
712+ for (size_t i = 0 ; i < resp_len && pos < 120 ; i++) {
713+ pos += sprintf (hex_buf + pos, " %02X" , (uint8_t )response[i]);
714+ }
715+ // Calculating what C64 fetched from the buffer based on status transitions
716+ printf (" PUSH_HEX:%s\n " , hex_buf);
717+ acia.SendToRx ((uint8_t *)response, resp_len);
718+ }
711719 return connectionStateChange;
712720}
713721
You can’t perform that action at this time.
0 commit comments