cybercase / webminidisc

Upload your Music to NetMD MiniDisc devices thanks to WebUSB and WASM
GNU General Public License v2.0
306 stars 88 forks source link

Homebrew mode and MZ-RH910? #122

Closed kirbysayshi closed 10 months ago

kirbysayshi commented 1 year ago

I was wondering if I should expect to see any Homebrew features available for the MZ-RH910 when connected and the standard disc is in MD (not Hi-MD) mode. It's unclear to me if it's a matter of the exploits not supporting its firmware or it just needs to be allow-listed in webminidisc pro!

Thank you so much for this wonderful software. I'm so grateful!

asivery commented 1 year ago

@kirbysayshi Right now it's not supported at all unfortunately - it's not a matter of simply whitelisting that player yet. I have figured out some things regarding Homebrew mode on them, but I first need to first fix my RH10 to be able to fully test these features.

kirbysayshi commented 1 year ago

Thanks for the update! If there's anything I can do to help test, let me know! I'm a developer and have an RH910.

asivery commented 1 year ago

@kirbysayshi If you have some time, could you take a look at this? This version should have the core exploits ported over already (TOC download, exploit ATRAC download, things like that). Also, it supports metadata editing and track downloads on HiMD devices.

kirbysayshi commented 1 year ago

@asivery great, I'm taking a look now! I saw the in-app changelog, but is there a description of the difference between Connect to HiMD (Restricted) vs (Full) is?

For all of the below, please don't feel the need to acknowledge all the points. It ended up being more than I anticipated. Most of this is just feedback/observations: if it helps you, great, if it doesn't, ignore it! I won't feel bad and have zero expectations.

Some general notes when using the MZ-RH910:

With a 80min MD disc in the player:

With a HiMD disc in the player:

On mac, I also get the same results even after Ejecting (unmounting) the himd disc from my system (since himd can appear as external drives).

I think this is somewhat typical, but I couldn't get my player with an MD disc inserted to be recognized again by webminidiscpro until I pulled out my usb connect, and waited for the disc to be fully loaded in the player (e.g. see track display info on the device screen), then reconnected USB.

Back to 80min disc results:

I did not try Switch to HiMD Unrestricted Mode due to the warning about possibly damaging devices (I only have one HiMD device currently).

I got an error (page went entirely white) when I tried clicking "Song Recognition"

Screenshot 2023-03-11 at 7 14 05 PM

I also saw a few errors on page load, which I assume are related more to this being a testing URL:

Screenshot 2023-03-11 at 7 19 49 PM Screenshot 2023-03-11 at 7 19 57 PM
asivery commented 1 year ago

@kirbysayshi Thank you very much for all the points! It helps greatly. First of all - the difference between HiMD (Restricted) and HiMD (Full) - both of these buttons are responsible for the same thing - HiMD support within Web Minidisc, so the ability to use discs with HiSP / HiLP / LPCM / MP3 recorded on them. For now only track download and metadata editing are supported in both. The first (Restricted) button lets you select the folder where the HiMD device is mounted, since it's a mass storage device in that mode. This mode lets you edit metadata and (in the future) put MP3 audio on HiMD discs. The HiMD (Full) button is tied to the Switch to HiMD Unrestricted Mode option in the Homebrew mode, and lets Web Minidisc take complete control over the HiMD device. In the future it will let you do everything the restricted mode lets you do, but also write HiSP, HiLP and PCM audio. For now it is unfinished.

When it comes to your other points:

Thank you very much for all the testing, and I'll let you know once I write the appropriate bugfixes.

Edit: Also, please do not test the HiMD (Full) mode, since the code responsible for it is even more restricted than the actual HiMD (Restricted) mode for now. I had to implement it in such a roundabout way - splitting the HiMD functionality into 2 different modes - because of WebUSB's security limitations. WebUSB doesn't let applications unload kernel drivers for valid reasons, but when it comes to Minidiscs, that is required (When you record non-MP3 audio on HiMD devices, you need to authorize that audio via lower-level SCSI commands - you can't do that with the mass storage kernel driver loaded). This is my solution to that problem - clicking the Switch to HiMD Unrestricted Mode button redefines the USB descriptors in the HiMD device's memory. It changes the interface class and VID/PID pair. At that point, if you replace the normal MD with a HiMD disc, the device should switch to HiMD mode, which normally would be mass storage, but since that config would have already been overwritten by that button, the device can now be selected using the HiMD (Full) USB request dialog window. Unfortunately the downside is that I had to SCSI mass storage device driver in the browser, since it's impossible to rely on the OS for that anymore. This mode will make it possible to implement all the functionalities of SonicStage in Web Minidisc Pro. For now though, it is entirely unfinished and shouldn't be tested.

asivery commented 10 months ago

HiMD machines support homebrew mode since WMDPro v1.4.0.