Repository navigation
Automated hardware testing with NICE64 #478
acdvorak
started this conversation in
Show and tell
Replies: 1 comment
|
Nice. Controller automation is the one think still missing from my setup, which I have been meaning to get around to again for ages. I would encorrage you to join the N64brew discord and share there. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Sharing my local testing setup, which is highly automated and saves me a lot of time.
This setup makes it easy to regression-test N64FCM on real physical hardware with very little effort.
The only thing I still have to do manually is swap the Expansion Pak with the Jumper Pak, and press the console's soft RESET button. Everything else is fully automated from start to finish.
It's not as complicated as it might look (I try to be thorough and detailed). It takes a bit of work upfront, but it pays off if you do a lot of N64 development and testing.
1. N64 controller automation
✅ Script a sequence of button/stick presses to automatically navigate through flashcart and game menus in a repeatable way.
NICE64 is a programmatic N64 controller over USB.
Standalone scriptable CLI:
nice64 "press A + B" "press Z + Stick(50, 75) for 500ms pause 10ms"Simple breadboard
So simple, even a software monkey like me can do it! No soldering required.
Only needs a few cheap, easy-to-find components.
Instructions:
(wire locations differ slightly from the assembled photo, but the end result is the same)
If you're comfortable with entry-level SMD soldering, you can order a fancy custom PCB and a few small components:
🌄 PCB photos
2. Video capture card
✅ Programmatically interpret machine-readable UI output (like 2D barcodes) reliably so that you can inspect internal program state from a script.
I use an HDMI-modded original N64, installed by a reputable modder, to ensure the cleanest, clearest picture possible. This makes it much easier to verify machine-readable 2D barcodes, check exact pixel colors, diff images, etc.
ffmpegrecords videos and still images from the capture card, which can be programmatically analyzed to determine pass/fail.I've had good results with the IOGear UpStream GUV302P powered USB-C HDMI Capture Adapter. It works out of the box, no drivers needed.
On macOS, list AVFoundation-compatible capture devices with:
ffmpeg -hide_banner -f avfoundation -list_devices true -i '' 2>&1 || trueOn macOS, record a 60 second clip with:
ffmpeg -hide_banner -f avfoundation -framerate 60 -i "HDMI to U3 capture:none" -t 60 output.mp4If you want to see the N64's video on a TV at the same time, get yourself an HDMI "splitter" (aka "distributor"). I've had great results with Orei splitters.
3. A/C wall outlet "smart" plug
✅ Programmatically power-cycle the N64 console between tests.
The "smart plugs" I use are discontinued, but you'll want something similar to the Eve Energy (Matter) Smart Plug.
Look for one that supports Matter so that you can use it without Wi-Fi or Internet. All you need is a compatible hub, like an existing Apple TV 4K or similar.
For macOS users who prefer HomeKit, HomeClaw is a fabulous CLI and GUI that lets you programmatically query and control all of your Apple Home's devices. It's great.
4. USB power switching
✅ Programmatically remove all flashcart power to clear volatile memory, while still leaving the cart's USB cable physically connected to your computer.
The creator of the
uhubctlCLI maintains a list of USB hubs that are known to support PPPS (Per-Port Power Switching) on VBUS (USB's power lines) properly: https://github.com/mvp/uhubctlI've had good luck with:
Plugable USBC-HUB7BC externally-powered 7-port hub (2021 model, USB ID
2109:0817) - four left ports only--locationbecause this device actually contains two 4-port USB 2.0 chips internally;--portis optional:uhubctl --vendor 2109 --location ??? --action offStarTech HB31C3A1CPD3 bus-powered 4-port hub (USB-C and USB-A)
--locationor--port:uhubctl --vendor 14b0 --action off5. Flashcart USB CLI tools
✅ Programmatically launch ROMs on flashcarts and copy files over USB.
Fork of
edlinkfor ED64 Pro, with support for additional filesystem commands:cp,ls,rm,mv,mkdir,touchUNFLoaderfor EverDrive-64 X7, SummerCart64, and 64drivesc64deployerfor SummerCart646. Bonus points: N64 controller "KVM" switcher
✅ Safely and easily switch back and forth between a real controller for manual input and a fully-automated NICE64 controller.
https://www.etsy.com/listing/4545465924/controller-switcher-for-nintendo-64
🌄 Photos of N64 controller switcher
7. Related projects
All reactions