-
Notifications
You must be signed in to change notification settings - Fork 32
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
[WIP] Adding audio mode to initiator mode #157
base: main
Are you sure you want to change the base?
[WIP] Adding audio mode to initiator mode #157
Conversation
This commit uses sense codes to obtain more detailed error messages.
The SCSI can enter audio mode via setting "AudioMode=1" in the bluescsi.ini file
This change makes the read command ABLE to read from the SCSI tape in audio mode, with several drawbacks. Instead of a read capacitiy command the program assumes a massive file size, Instead of reading blocks, I can only read flat 5822 byte size frames, individually. Also the Audio Command is very ugly
Interpolation flags are set in the data when it fails a checksum, this commit tracks them, next ill need to reread these flags
Hi @andrewocyeah - just following up as this is marked WIP - anything we can help test? What is left? Thanks for the contribution! |
Added Commands to the functions I added + removed 'comment code' that was left in.
Added description to the code dealing with Interpolations
Hi @erichelgeson !, There are many misc read errors that occur, almost all of them are fixed via restarting the BLUESCSI, or ocaisionally the attached device. Audio mode data uses interpolation flags, that act as a checksum. My code is able to record these and will raise g_initiator_transfer.all_ok = false; when it finds one. The error that occurs is rewinding the device is very difficult as it seems many commands to do this, are not implemented. The data mode code (what currently exists) is capable of reading multiple sectors of data at a time. In Audio mode (this pull request) despite continuous debugging I can only read 1 sector of data at a time. I am yet to be able to read the capacity of the attached device, so I set the sector count to be very very big, and the device will reach the end of data, but try to keep recording, (the data IS on the SD card so it works regardless but is VERY ugly) Also I only tested this code with 1 SCSI DDS3 tape reader, so I expect things to fall apart if I use a different one. Feedback welcome! |
I just did some testing on this PR with my SDT-9000 (firmware 12.2). This drive and firmware combination supports AUDIO MODE. I set bluescsi.ini to
I then started a video of this process with a split-screen of the DDS drive & BlueSCSI with the console log at https://ia904607.us.archive.org/25/items/datstrue-read/bluescsi_audiomode_test_20240820.mp4. Here's some notes on that video: I put the resulting files in https://archive.org/download/datstrue-read/20240820_bluescsi_audiomode_test/ and a copy of the log at https://gist.github.com/dericed/821e9099ce32bb54cedc588eeddc7793. Some comments:
|
I think this is when the audio mode is not set or fails to set, the drive expects audio format and when it sees the data format replies BLANK. The tape doesn't continually move for DATXtract either - I believe it fills the buffer as if you do one read it moves, wait till the tape stops, do another 20 reads and the tape doesnt move. We should probably log out time stamps instead of a counter - I haven't found a way to read the length of a recording without seeking the entire tape, which doesnt seem useful. Retries need to be looked at. Audio processing could be moved out of the pico or disabled with a flag if someone wishes to have the raw data. I'm not the target consumer so I don't know how people would use this. I've not found a way to read faster than 1x in the docs. Nor has the docs on the "Fixed block read" worked as described in the scsi/sony specs. Great work, this is really close! |
@@ -399,9 +411,12 @@ void scsiInitiatorMainLoop() | |||
g_initiator_state.target_file.flush(); | |||
|
|||
int speed_kbps = numtoread * g_initiator_state.sectorsize / (millis() - time_start); | |||
log_f("SCSI read succeeded, sectors done: %d / %d speed %d kB/s - %.2f%%", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @erichelgeson @andrewocyeah, I was looking at this commit and see that this SCSI log line is changed. In the new version it is specific to the details of audio_mode tape transfers. I suggest this should be a conditional, so if audio_mode then use the new log line, else stay with the original.
This is a work in progress to add audio mode to the
Initiator mode of the bluescsi in order to read audio DAT tapes on a DDS drive.
This addresses this issue: #131