Skip to content

USB Serial

Mraulio edited this page Jan 8, 2024 · 11 revisions

In this part of the app you have the USB connections functionalities. Here you can find the library used for the usb serial communication.

There are 3 USB related features:

imagen
IMPORTANT: you must open the app from the popup when connecting the usb device to your phone to create the connection.

Arduino Printer Emulator

The Arduino Printer Emulator is probably the cheapest way of extracting images from a camera, and many other games, and fairly easy project to make and well documented (it was my first ever experience with an Arduino project, and my main way of extracting GB Camera images for a long time). As the name says it emulates being a Game Boy Printer, receiving the images data that you can decode later.

Usage

Connect your arduino board to your phone using an OTG USB cable. Open the app from the popup and go to the USB Serial tab. Select Arduino Printer Emulator. A //Connected message should appear. If you get some error toasts reconnect and make sure you open it from the popup. You can go to your Game Boy and start printing, and you should reveive the image data on screen.

You have different buttons:

  • Delete: deletes the text.
  • Save: saves the text to a .txt file with the current date into Download/GBCamera Manager/Arduino Printer Hex. That file can be imported in the Import tab, onto the web app or paste the content in Mofosyne's RAW decoder
  • Decode: decodes the current text and converts it to images. After decoding the Add images button will show up.
    • Add images: adds the decoded images to the gallery.

Print to Arduino - GBP

You can print any image to the real hardware, a Game Boy Printer. The functions in this tab are just for printing a test banner.

Usage

You need an Arduino board flashed with the v3.3.0 or superior version of the Arduino Printer Emulator same as before, or you can also use the standalone Printer interface by Raphael Boichot. The link cable setup is the same for both.

Connect your arduino board to your phone using an OTG USB cable, open the app from the popup and go to the USB Serial tab. Select Print to Arduino - GBP. If your board is flashed with the Arduino Printer Emulator the Game Boy Printer must be connected to the Arduino board with the link cable and the printer must be turned ON so the board detects it and is put in Printing interface mode. If the printer is OFF it won't print as the board will be in Printer emulator mode. If you forgot to turn the printer ON you can just do it and reconnect the board, or just reset the arduino board. As previously stated, you can only print a test banner here. Go to the Gallery to print your images.

GBxCart

If you own a GBxCart device you can use this app to extract the camera cart RAM and get a .sav file containing the camera images. That save file will be stored in Download/GBCamera Manager/Save dumps.

Usage

Connect your GBxCart to the phone using an USB OTG cable. Open the app from the popup, go to USB Serial and select GBxCart.
The app automatically reads the cartridge's name. It will say something like GAMEBOYCAMERA. If it detects that the ROM is Photo! a new button will appear to dump the full 1MB and extract the save banks.
You can manually read the ROM name by pressing the Read ROM Name button. This will help in cases that the cartridge is badly connected and you can't see the name or it's corrupted, so it's recommended that there is an adequate name read before reading the RAM (corrupted name means corrupted extracted save file almost certainly).

Reading and saving the RAM/ROM and getting the images.

Press the Read and Save RAM button. The RAM extraction will begin and you will see a percentage. When it gets to 100% the save file is created and the app will extract all images from it, showing the actual images from the camera gallery. You can also use the checkboxes to show the Last seen image from the sensor, which is also stored in the RAM, and the Deleted images, as the camera doesn't actually delete images until you overwrite them with another. Learn more about that here.

You can now add the images to the app's gallery using the green Add images button, or delete the save file using the red Delete sav button (in case it's corrupted or you just don't want to keep the file after adding the images to the gallery).

Also if you own a custom camera flashcart with Photo! ROM flashed into it you can extract the full 1MB ROM containing the 7 save banks using the Dump full Photo! ROM button (takes about 1 min or less). The files will be stored in Download/GBCamera Manager/Photo ROM dumps/..., creating a folder for each dump that contains the full 1MB file, and that file divided in the rom itself (first 128KB) and the valid save banks.
After the dump is finished the app will extract all images contained in the available save banks, and you can add the images to the gallery using the green Add images button or delete the whole dump folder if you want (like in case it's corrupted) using the red Delete folder button. You can also use the checkboxes here to show/hide the Last seen or Deleted images.

As always, if any image already exists in the app's gallery (checked by its identifier hash), it will appear with a red name and won't be added again to the gallery.
If you experience any problem with this please open an Issue or come discuss it on the Discord, not every combination of Android phone/Android version/GBxCart version has been tested.

*There is a problem more likely to appear on newer/faster phones, getting some corruption in the extracted data. Working on fixing that.