Skip to content
xXJSONDeruloXxPublic

About

One-game GBA cartridge firmware for the Anbernic XX line of handhelds: power on straight into your last save state

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

58 Commits

Folders and files

Repository files navigation

OneCart

Latest release CI

A one-game firmware for Anbernic's H700 handhelds. The SD card in slot 1 is a cartridge: power on and you are back in the game where you left it, in under three seconds. Power off and it saves exactly where you were.

The Minish Cap on OneCart, and the OneCart menu over Metroid Fusion

  • Straight into the game. No launcher, no list of systems, no settings screens. The last save state loads at power-on, and a tap on Menu is the only menu.
  • Power off is a save. The power button (or closing the lid on a foldable) saves the state from the moment it was pressed and switches off with a picture-tube effect.
  • Saves you can trust. The battery save (.sav) is written as soon as the game changes it, and the state every few minutes, so a flat battery loses little. Every write is checked: one the card refuses is tried again, never replaces the old file, and the Menu says so.
  • Works with RG28XX, RG34XX, RG35XX, RG40XX, RG CubeXX and RG SP handhelds. GBA, GB and GBC games, with mGBA.

Advance Wars, Metroid Fusion and Kirby and the Amazing Mirror on OneCart

Quick start

  1. Download onecart-<version>.img.xz from the latest release and write it to a microSD card with balenaEtcher or Raspberry Pi Imager.
  2. Unplug the card and plug it back in. On the CART drive, set your handheld in onecart/model.txt (the names).
  3. Copy your own .gba, .gb or .gbc file into the root of the card. To keep your progress from another emulator, copy its .sav too, named like the ROM.
  4. Put the card in slot 1 and power on.

If the screen stays dark and nothing starts, your handheld may be one of the few with DDR3 memory (some RG35XX 2024 and Plus units): use onecart-<version>_ddr3.img.xz instead.

Playing

A tap on Menu pauses the game under the menu shown above. L1 and R1 page between its three pages, Guide, Menu and Controls, and the menu opens again on the page and the row you last used, even after powering off.

  • Menu: the game's name, the battery level, how long you have played the game in all, and OneCart's version; then resume, save or load the manual slot, volume, start muted, brightness, fast-forward speed, the picture, reset the game, and save and power off. D-pad up and down picks a row, left and right change a value, A chooses, B or Menu goes back.
  • Controls: every button and what it does, as in the table below.
  • Guide: a text guide for the game, such as a walkthrough from GameFAQs: copy it as a .txt file next to the game (named like the game if there are several). Up and down scroll a line, left and right a page, and A lists its chapters to jump to one. The guide opens where you left it, even after powering off.

The guide and controls pages of the menu

Changes are kept in onecart/settings.ini. Held with another button, Menu is a modifier instead:

Buttons Action
Power, or closing the lid save and switch off
Vol+ / Vol- volume
Menu + Vol+ / Vol-, or Menu + Up / Down brightness
R2 (hold) fast-forward
Menu + R1 fast-forward on or off
L2 (hold) rewind
X (hold) / Y (hold) turbo A / turbo B
Menu + Select save to the manual slot
Menu + Start load the manual slot
Menu + X (hold 1 s) reset the game (L2 rewinds out of an accidental reset)
Select held while powering on start from the battery save, skipping the resume state (a way out of a state that soft-locks)

The picture

Picture sets the size: sharp (a whole-number scale), fill (as large as fits, keeping the shape), crop (the whole screen, keeping the shape, edges cut off) or stretch (the whole screen).

The four picture sizes: sharp, fill, crop and stretch

Filter adds scanlines or an LCD grid, with any size. Colors shows the game as it draws itself, or with the GBA screen's colours (mGBA's colour correction). Ghosting (off, simple, smart or LCD) blends frames as the original screen did; some games rely on it for transparency, such as F-Zero and the Boktai series.

Close-ups of no filter, scanlines, the LCD grid and GBA colours

No game on the card

The handheld says so and what to do, until the power button switches it off. Copy a .gba, .gb or .gbc file to the CART drive and power on again.

The Utterly Gameless screen

The card

One FAT32 partition. Its root holds only the game and its saves; everything of OneCart's own is in the onecart/ folder. A whole cartridge, as Windows shows it:

A OneCart card in Windows Explorer: the onecart folder, Metroid Fusion.gba, Metroid Fusion.sav and Metroid Fusion.state

File What it is
<game>.gba (or .gb, .gbc) the game: the first ROM found in the root
<game>.sav its battery save, compatible with other emulators
<game>.state the resume state (mGBA format)
<game>.state.1 the manual save slot (Menu+Select / Menu+Start)
<game>.txt a guide for the game, if you add one (any .txt next to the game)
onecart/settings.ini settings: the picture, fast-forward speed, rewind length, autosave interval, volume, brightness, the USB shell
onecart/playtime.txt, onecart/guide-places.txt each game's play time and where its guide was left
onecart/model.txt which handheld the card boots on
onecart/log.txt, onecart/boot-log.txt what the last session and boot did, to send along with a problem report
onecart/boot/, onecart/extlinux/ the firmware

settings.ini can be edited by hand: a value out of range is brought back into range, and your own comments and lines are kept.

A second cartridge in slot 2

A card in slot 2 with a ROM in its root (FAT32 or exFAT, nothing else needed) is played instead of the game on the slot 1 card. Its .sav and states are kept on that card, so each game keeps its own progress: take the slot 2 card out and the slot 1 game resumes where it was. Settings stay on the slot 1 card. Swap cards with the handheld off (the power button saves first). An empty slot 2 costs the boot nothing: its card-detect switch is read directly.

Supported handhelds

Handheld model=
RG28XX rg28xx (the default)
RG34XX, RG34XX SP rg34xx, rg34xx-sp (or rg34xx-sp-v2-panel)
RG35XX 2024, Plus, H, Pro, SP rg35xx-2024, rg35xx-plus, rg35xx-h, rg35xx-pro, rg35xx-sp
RG40XX H, V rg40xx-h, rg40xx-v
RG CubeXX rgcubexx
RG SP rg-sp

Some of these came with a second kind of screen that nothing outside tells apart (the -rev6-panel and -v2-panel names in onecart/model.txt). If the screen stays black or shows garbage, hold power for 10 seconds and try the other name.

Tested on the RG28XX, RG40XX-H and RG35XX SP. The other models use the same kernel and drivers with their own device trees (from ROCKNIX), and reports are welcome.

Updating

Copy the release's onecart-<version>.update.zip into the root of the card, as it is (don't unzip it), and power on. The handheld checks it, installs it with a progress bar, deletes it and restarts into your game. The same file fits DDR4 and DDR3 cards. Only onecart/boot/ and onecart/extlinux/ change; the game, saves, settings and model.txt stay. A damaged download installs nothing: the handheld says so and renames it to .failed.

The same card with onecart-v0.3.2.update.zip copied into its root, next to the game and its saves

The update screen: UPDATING ONECART V0.3.2, DO NOT POWER OFF, and a progress bar

Extracting the zip onto the CART drive yourself, replacing the files, does the same (a card on v0.3.0, which has no updater yet, is updated this way once).

Cards from before v0.3.0 need the new image written instead: the boot loader and the card's layout changed. Copy the game and its saves off the card, write the image, copy them back into the root and set the model in onecart/model.txt. To keep your settings, copy the old onecart.ini to onecart/settings.ini.

For developers

Build instructions, firmware architecture, development workflows and component licenses are in Technical documentation.

About

One-game GBA cartridge firmware for the Anbernic XX line of handhelds: power on straight into your last save state

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages