A native macOS application for modding Nintendo mini consoles, built with Swift and SwiftUI. This is a ground-up rewrite of Hakchi2 CE targeting macOS.
- NES Classic / Famicom Mini
- SNES Classic (USA / EUR) / Super Famicom Mini
- Custom Kernel Install — Flash a custom kernel to enable homebrew, or uninstall/factory reset
- Game Management — Import ROMs, auto-match metadata via CRC32, edit game details
- Drag-and-Drop Sync — Drag games into the Console Game Bar, click Sync to upload over USB
- Module Manager — Browse, install, and manage hakchi modules (hmods) from an online repository
- Scraper — Search TheGamesDB for cover art, descriptions, and metadata
- Stock Kernel Backup — Back up and restore the original kernel
- macOS 14.0 (Sonoma) or later
- Swift 5.9+
- USB-A cable (or USB-C adapter) to connect to the console
Download the latest .zip from Releases, extract it, and double-click Swift Hakchi2.app.
Because the app is not signed with an Apple Developer certificate, macOS will block it on first launch. To allow it:
- Open System Settings > Privacy & Security
- Scroll down to Security
- Click Open Anyway next to the message about Swift Hakchi2, or change the Allow applications from setting to include the app
Alternatively, right-click the app and choose Open to bypass the warning once.
Clone the repository and run:
./run.shThis builds the project, assembles a .app bundle, and launches it. For build-only:
swift build # Debug
swift build -c release # ReleaseThe main window is organized top to bottom:
- Action Bar — Buttons for Install Kernel, Connect/Disconnect, Memboot, and Reboot
- Games Explorer — Your ROM library displayed as a grid of cover art cards (left), with an editable detail panel (right). The header has Add ROMs and Import from Console buttons, plus a search field.
- Console Game Bar — A tray along the bottom labeled "Desired Console Config" that shows which games will be on your console after the next sync. Has Custom Games and Default Games tabs, and a centered Sync button.
- Status Bar — Connection indicator (green = connected, orange = FEL mode, red = disconnected), console type, and game counts.
- Click Install Kernel in the action bar
- Choose whether to back up the stock kernel (recommended for first-time setup)
- If the console isn't in FEL mode, the app shows instructions and waits:
- Power off the console and unplug USB
- Hold the RESET button on the console
- While holding RESET, plug in the USB cable
- Release after 3 seconds
- The app flashes the custom kernel automatically once the console is detected
Additional kernel operations are in the Kernel menu: Uninstall, Factory Reset, and Shutdown.
- Add ROMs — Click "Add ROMs" in the Games Explorer header. Supported formats:
.nes,.sfc,.smc,.md,.bin,.zip - Import from Console — Click "Import from Console" to copy existing custom games from a connected console into your library
- Auto-matching — Imported ROMs are matched by CRC32 against a built-in database to fill in name, publisher, release date, and cover art
- Edit details — Click any game card to select it. The detail panel shows editable fields for name, publisher, genre, release date, players, command line, and description. Click "Save" to persist changes.
- Scraper — Select a game and click "Search Online..." in the detail panel to search TheGamesDB for metadata and cover art. Requires an API key (see Settings).
- Delete — Right-click a game card and choose "Delete Game..." to remove it from the library (your original ROM file is not affected)
- Drag game cards from the Games Explorer down into the Console Game Bar
- The Console Game Bar shows your desired configuration — Custom Games tab for your imports, Default Games tab for stock titles
- To remove a game, drag it off the Console Game Bar back up into the explorer area (a "Remove" label follows your cursor and a poof animation plays on drop)
- Stock games can be hidden by dragging them off, or re-enabled via right-click → "Re-enable"
- Click the Sync button in the Console Game Bar to upload everything to the console
The console has approximately 300 MB of usable storage. If syncing would remove games already on the console, the app warns you and offers to import them first.
Open the Module Manager from the Modules menu (Cmd+Shift+M):
- Browse tab — Click "Load Repository" to fetch available modules, then click "Install" next to any module. You can also use "Install from File..." for local
.hmodfiles. - Installed tab — View modules on the console, select any to uninstall with "Uninstall Selected"
Open from the Swift Hakchi2 menu (Cmd+,):
- Console tab — Default console type (NES/SNES/Famicom/Super Famicom), TheGamesDB API key, and "Enrich Library Now" button to bulk-fetch metadata
- Storage tab — Upload games compressed, separate game storage per console, max game size (MB), and games folder path
- Advanced tab — Purge all cover art (re-downloads from database), purge all imported games (clears library, does not delete original ROM files)
The app communicates with the console through two USB protocols:
-
FEL Mode — When the console is in its Allwinner bootloader, the app uses the FEL protocol to initialize DRAM and boot a custom kernel image. The user enters FEL mode by holding Reset while powering on.
-
RNDIS/SSH — After memboot, the console exposes a USB RNDIS network gadget. The app runs a user-space TCP/IP stack over this link and opens an SSH session to execute commands and transfer files — no network drivers or kernel extensions required.
SwiftHakchi/ Swift application
├── App/ Entry point and AppState (global coordinator)
├── Models/ Data models (Game, ConsoleType, DesktopFile, AppConfig)
├── Services/ Actor-based business logic (device, flash, games, SSH, FEL)
├── Views/ SwiftUI interface
├── Utilities/ Helpers (TarWriter, CRC32, Game Genie codecs)
└── Resources/ Binary payloads (fes1.bin, hakchi.hmod, basehmods.tar)
USBBridge/ C library — USB and network protocol stack
├── src/ IOKit USB, FEL, RNDIS, TCP/IP, SSH bridge, Clovershell
└── include/ Public headers consumed by Swift
vendor/ Vendored C dependencies
├── mbedtls/ MBedTLS (cryptography, used by libssh2)
└── libssh2/ LibSSH2 (SSH protocol)
This project is not affiliated with Nintendo. Use at your own risk.