Sega Controller Hack Updated For Windows Auto-Launch

Who knew that modern versions of Windows have nixed the option to auto-launch when a USB drive is inserted? Not a big deal unless, like [sonicdude10], you want to base a hack on the behavior. He did find a workaround and recently built a Sega Controller emulator to autoplay on Windows computers.

The bulk of the hack was inspired by a Sega Emulator built in a controller which he saw on Hackaday a couple of years back. It’s simply a Sega-like USB gamepad which has a hub and thumb drive internalized. The hardware changes on [sonicdude10’s] version gets rid of the old thumb drive and replaces it with one that supports U3. This is a hardware emulation trick supported by some USB drives which allows them to enumerate as CD drives instead of USB mass storage. Autoplay for CD drives is still functional in Windows.

We’ve heard a bit about U3 over the years. There was a now-dead hack covered all the way back in 2006. And we even found a comment suggesting its use for USB-based game emulators. [sonicdude10] points to two useful tools that let him customize how U3 performs. u3_tool is a multitool for tweaking how the hardware behaves, u3-autorun makes customization of the auto-launching app a snap.


26 thoughts on “Sega Controller Hack Updated For Windows Auto-Launch

  1. Or you could just create a powershell script to trigger when the USB drive is inserted. Here is one that I use to trigger the backup to run when my backup drive is attached to the ‘puter. (the backup drive is on a timed power switch)…

    #Requires -version 2.0
    Register-WmiEvent -Class win32_VolumeChangeEvent -SourceIdentifier volumeChange
    write-host (get-date -format s) ” Beginning script…”
    do {
    $newEvent = Wait-Event -SourceIdentifier volumeChange
    $eventType = $newEvent.SourceEventArgs.NewEvent.EventType
    $eventTypeName = switch($eventType) {
    1 {“Configuration changed”}
    2 {“Device arrival”}
    3 {“Device removal”}
    4 {“docking”}
    }
    write-host (get-date -format s) ” Event detected = ” $eventTypeName
    if ($eventType -eq 2) {
    $driveLetter = $newEvent.SourceEventArgs.NewEvent.DriveName
    $driveLabel = ([wmi]”Win32_LogicalDisk=’$driveLetter'”).VolumeName
    write-host (get-date -format s) ” Drive name = ” $driveLetter
    write-host (get-date -format s) ” Drive label = ” $driveLabel
    # Execute process if drive matches specified condition(s)
    if ($driveLetter -eq ‘M:’ -and $driveLabel -eq ‘BACKUP_DRIVE’) {
    write-host (get-date -format s) ” Starting task in 10 seconds…”
    start-sleep -seconds 10
    C:\windows\system32\rundll32.exe /d sdengin2.dll,ExecuteScheduledBackup
    }
    }
    Remove-Event -SourceIdentifier volumeChange
    } while (1-eq1) #Loop until next event
    Unregister-Event -SourceIdentifier volumeChange

      1. That is the case here. I made it to be portable. allowing it to be run on most Windows based computers. I wanted it to be extremely simple for my grandmother as she isn’t the most computer literate. So I made it where the emulator auto launches from the built in USB drive.

  2. Nice, the Saturn controller is really a great 2D controller. I built a Saturn -> USB 2 player converter a few years back using an atmega32u2, I should really write it up some time.

    1. Those cheap USB clones unfortunately aren’t that great. As near as I can tell, the moulds were made from castings of real controllers and have poorer finish and don’t fit together as well. They also mucked up the shoulder button design, so if you don’t press the buttons “right” they sink into the body.

      1. better to just buy an original controller and take a dremel to it to get some extra space for a usb hub and drive and a small micro like the amtel 328’s retrozone kits come with. Done this myself for sega genesis and super nintendo.controllers. Saves all the hassle of dealing with halfassed knockoff controllers.

  3. Ah, the good ol’ days of U3.

    No for real, U3 autoplay was sweet. The Sandisk Cruzer was my favorite flash drive and U3 just made it cooler. I used the mod tools to run the PortableApps suite instead of that goofy U3 package stuff.

  4. Hey Mike. I just wanna point one thing out. I’m not this Joe from the original hack article. I just got the idea from the original one I linked to. I go by sonicdude10 all over the internet. If you look at my account name on my YouTube channel you will see that I use sonicdude10.

    If you must use a real life name, call me Mike. Small world.

  5. Not only is U3 pretty much discontinued since 2008, there is also a list of criticisms, let me quote the first one in the list:

    “Malware-like integration behaviour
    Software comes preinstalled on USB disk and, when using stock Windows settings, roots itself in the system similar to malware. U3 removal is possible, but requires complete data backup. ”

    https://en.wikipedia.org/wiki/U3#Criticisms

    1. True but remember that I completely wiped both partitions on the drive and only have the software for auto launching as well as the emulator and ROMs. Yes this method could be used maliciously but I didn’t use it for that here. It’s still a vulnerability in Windows that I took advantage of for something useful. I hate viruses and data stealing.

      1. I was not suggesting you would, but in general this cant’ be popularized, since it would be abused at some point and then it would all end.. And quite some people already disabled CD autoplay I expect. I know I did

        1. The bad guys already know about U3, just like they used auto-play for nefarious tricks before every good admin started disabling it. Script kiddies may not know about it, but if it’s not in a pre-packaged tool-kit, they probably don’t care.

  6. Wasn’t the point of removing autorun from Windows to patch a gaping security hole? I.e. running random binaries from foreign media without even giving the user a chance to intervene. Why did MS feel the need to leave support for autorun from some media in? (Would it break rootkit equipped Sony discs if they were to disable it too?)

    1. Probably. One of the reasons I quit buying CD’s long ago. More and more were appearing with so-called “extras” promoting a better listening experience.

      Right… “better listening experience”, about as useful as edging the CD’s with permanent marker ink.

    2. Windows Vista and newer never automatically run anything from a removable drive, instead the AutoPlay dialog is shown. The autorun.inf file can be used to define special actions that will be shown in the AutoPlay dialog, but in Windows 7 and above this is only allowed for CD and DVD media. See the Wikipedia articles on AutoPlay, AutoRun and autorun.inf for details.

      I remember once buying an U3-enabled memory stick when I didn’t know what it was. Fortunately I didn’t install the software, but it was a complete fucking pain in the ass to remove the partition and make it a regular USB thumb drive. You needed a vendor-specific tool that they tried very much to hide deeply on their website.

  7. As far as I see, AutoPlay isn’t Auto Play at all. You still need to point and click such that it runs. It isn’t much better than having an instruction of “Click CLICKME” after open folder for viewing.

  8. A Sega what emulator? SG-1000, Master System, Game Gear, Genesis, CD, 32x, Saturn, Dreamcast? Why omit that from the article? “Sega Emulator” might as well be referring to the Segagaga game.

  9. There are tons of USB storage sticks out there that can be repurposed for things like this… lots of them have a programmable 8051 inside that can be used for whatever…

    For the ones that don’t have that specific need there are also factory-tools to reconfigure sticks in terms of size ( reduce the used size to improve wearleveling or increase the size of spare-blocks etc ).. You halso have the option, in most of those tools, to create a virtual CD device that you just point out an ISO to use… Quick, easy and old…

    Check out:
    http://hackedgadgets.com/2014/08/14/badusb-hacked-usb-drive-to-black-hat-2014/

  10. A bit old news…..

    Lots of USB sticks (yep, the really cheap ones too) have a programmable processor (8051 and similar)..

    There are also easy to use tools, but is usually in bad english or chinese or a mix, to reconfigure many of these sticks with some of the options below:
    – Have multiple virtual devices.
    – Emulate CD drive for a virtual device
    – Modify the size of the available storage to increase the available badblock reallocation. (perfect for that “temp” stick that never gets filled more than 20% but is rewritten a few times per day)…
    – Change the device-speed.. (some usb-sticks have never been set to what they actually could support)
    – Disable crappy LED’s or just change how they should work…

    And a ton more stuff..

    Check out this link for some more information, and a place to start:
    http://hackedgadgets.com/2014/08/14/badusb-hacked-usb-drive-to-black-hat-2014/

Leave a Reply to ldcCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.