As far as I know, yes, it only functions when a D+/D- signal is present in the microcontroller. If you connect my custom board to a USB-C or USB-A port (which also makes a difference) with only VBUS and GND, it won't detect the DP signal. I've tested this on both the RP2040 and RP2350.don't know, and you may not care, but does this determine that an actual USB Host is connected and it's not simply connected to a PSU using some pull-up or other ?
Your concerns are completely valid, and that was actually the first approach I explored. However, setting up the full TinyUSB stack is not an option for my project. I use TinyUSB exclusively to manage the device's mass storage mode, but only after the code above detects it is connected to a USB host. Because of this, I had to take the more challenging route and work directly with the microcontroller’s low-level registers.I would have looked for something inside or called by TinyUSB, or whatever is used, to determine when the RP2 has been enumerated to determine if an actual USB Host is connected but that may not be "minimal". I recall recording TinyUSB 'process_control_request' calls to try to determine whether the Host was Linux or Windows from the RP2.
Just to provide more context, this is my project: https://sidecartridge.com/products/side ... -atari-st/, which is currently used by hundreds of Atari ST fans.How to do it, and how minimal it can be, seems to depend on exactly what you are trying to determine.
In short, the ROM emulator must complete its boot process before the host computer finishes resetting (about 100-300ms depending on the model but there are some restriction below 100ms in the Motorola 68000). During this boot sequence, if the emulator detects a connection to a USB host, it loads a different program from flash memory, transforming the ROM emulator into a small FAT volume where users can store their own ROM images. Otherwise, it proceeds with the standard boot process, launching the ROM emulator and initiating the bit-banging emulation.
Statistics: Posted by logronoide — Fri Mar 14, 2025 5:18 pm