Skip to content

Batocera v36 for Egret II Mini alpha 0.1

Latest
Compare
Choose a tag to compare
@acmeplus acmeplus released this 18 Nov 02:41
· 4 commits to main since this release
c3b115a

introduction

This is an initial release of batocera v36 for the Egret II Mini (E2M)

WARNINGs:

  • Do not try to install this firmware into a Astro City Mini or a Astro City Mini V, they are not compatible
  • Do not install if you don't feel comfortable with alpha quality releases, things may work or may not work at this time

This is preliminary alpha release so use it only if you like the cutting edge. The installation modifies the internal boot to add support to boot from SDCARD. Once the system has been flashed the console will boot batocera if the batocera SDCARD is inserted, but if the SDCARD is not inserted it will boot to factory firmware (note that instead of the Egret II Mini secondary logo you will see a custom circular logo instead). Once the internal installation is done, the system is ready to boot this or future batocera images, without having to run the installation again.

Installation instructions are linux based but below are the windows and mac instructions, note that Apple M1/M2 Silicon Macs are not currently supported for installation.

Installing the custom firmware

To get it installed follow the following steps:

  1. Download and flash the batocera-sunxi_r16-e2m-36-20221107.img.gz to an empty SDCARD that has at least 16GB of storage. You can use balena-etcher to flash the image.
  2. Insert the SDCARD into the E2M SDCARD port
  3. Download and extract the e2m-install_20221229.zip to a folder on your computer.
  4. Unplug the E2M power adapter (or disconnect the USB C power cable)
  5. Find a USB A to USB A cable to connect your computer to the E2M.
  6. Set the E2M power switch to the ON position.
  7. Run the e2m-backup-and-install.sh script (this is for linux, look at the notes below for windows or mac instructions)
  8. When you see the message *** PRESS A KEY WHEN READY AND THEN CONNECT THE E2M TO THE USB *** press a key on the console and connect the E2M power adapter
  9. Wait until the bootloader is installed, you will see something like:
$ ./e2m-backup-and-install.sh
E2M custom boot installation
============================

1. Connect the USB C Power cable to the E2M power port
2. Connect a USB A to USB A cable to the E2M 2P USB port
3. Press a key when you are ready, and then plug the USB A cable to this computer.

*** PRESS A KEY WHEN READY AND THEN CONNECT THE E2M TO THE USB ***
No Allwinner devices in FEL mode detected.
Attempt #:1
No Allwinner devices in FEL mode detected.
Attempt #:2
No Allwinner devices in FEL mode detected.
Attempt #:3
No Allwinner devices in FEL mode detected.
Attempt #:4
No Allwinner devices in FEL mode detected.
Attempt #:5
No Allwinner devices in FEL mode detected.
Attempt #:6
No Allwinner devices in FEL mode detected.
Attempt #:7
Initializing...

Sending now...


finished: status:0...31


Astro City Mini should be in FEL mode now.

Booting from memory...
100% [================================================]    13 kB,  126.0 kB/s
100% [================================================]  3423 kB,  191.8 kB/s 
100% [================================================]  3616 kB,  191.7 kB/s 
100% [================================================]  1114 kB,  191.9 kB/s 
Done. The installation will continue on the E2M.
The E2M will reboot when the custom boot has been installed.
  1. Once you see that message, the installation will continue on the console. Look at the screen prompts that will basically install the patched firmware automatically.
  2. After the machine reboots, the system will now show a circular custom logo message after the TAITO boot logo and will start performing the first batocera boot. Note that this first boot may take up to 3 minutes. Subsequent boots will take less than a minute.

Restoring the original bootloader

The original bootloader backup is internal and typically does not need to be restored. The custom bootloader installed only adds the capability to boot via SDCARD and does not modify any other elements or impacts the stock functionality.

In any case, if you want to revert the bootloader to factory:

  1. Unplug the E2M power adapter (or disconnect the USB C power cable)
  2. Find a USB A to USB A cable to connect your computer to the E2M.
  3. Set the E2M power switch to the ON position.
  4. Run the e2m-restore.sh script and follow the screen prompts (this is for linux, look at the notes below for windows or mac instructions). You will see something like:
$ ./e2m-restore.sh 
E2M original boot restore
=========================

1. Connect the USB C Power cable to the E2M power port
2. Connect a USB A to USB A cable to the E2M 2P USB port
3. Press a key when you are ready, and then plug the USB A cable to this computer.

*** PRESS A KEY WHEN READY AND THEN CONNECT THE E2M TO THE USB ***
No Allwinner devices in FEL mode detected.
Attempt #:1
No Allwinner devices in FEL mode detected.
Attempt #:2
No Allwinner devices in FEL mode detected.
Attempt #:3
Initializing...

Sending now...


finished: status:0...31


Astro City Mini should be in FEL mode now.

Booting from memory...
100% [================================================]    13 kB,  126.0 kB/s
100% [================================================]  3423 kB,  191.6 kB/s 
100% [================================================]  3616 kB,  191.5 kB/s 
100% [================================================]  1114 kB,  191.6 kB/s 
Done. The installation will continue on the E2M.
The E2M will reboot when the original boot has been restored.
  1. Follow the prompts on the screen. The system will restore the original boot partition to the E2M and will reboot to factory mode.

Notes

This is a preliminary version. While most of the batocera functionality is working, there are also some issues, below is a short list of what works and what's currently broken. This port is not only Egret II Mini based, but Allwinner/Sunxi R16 based, It has also been tested on the Astro City Mini and theoretically it should be possible to get batocera to work on other R16 boards like Astro City Mini-V, Genesis Mini, NES/SNES Classics, etc.

Linux:

  • You will need to install sunxi-tools from your distro (e.g. sudo apt install sunxi-tools in ubuntu/debian)
  • The sunxi-autofel is compiled on a ubuntu 22.10 64bit, so if you have a different arch (e.g. 32bit or older GLIBC based distro) it may or may not work. You can compile your own version by cloning and compiling this repo.

Windows commands:

  • You will need to have zadig drivers or the classic driver for sunxi-fel to work. If you have installed hakchi or Project Lunar in the past you may not need to install any driver.
  • Follow the instructions above, but instead of calling e2m-backup-and-install.sh run the following command on the windows command prompt: e2m-backup-and-install.bat
  • To restore the original firmware, instead of e2m-restore.sh run e2m-restore.bat

Mac commands:

  • For mac you may need to de-quarantine the sunxi-fel-mac and sunxi-autofel-mac that are found on the data folder of the installation files. Open a terminal, navigate to the data folder and execute: xattr -d com.apple.quarantine sunxi-autofel-mac and xattr -d com.apple.quarantine sunxi-fel-mac.
  • To install on mac, follow the instructions but instead of calling e2m-backup-and-install.sh run the following command on the mac terminal: sh e2m-backup-and-install_mac.sh
  • To restore the original firmware, follow the instructions but instead of e2m-restore.sh run sh e2m-restore_mac.sh

What works:

  • Batocera core functionality is working: controller, audio, network (with USB wifi or ethernet), samba, etc.
  • Retroarch rotation and autorotation (you can dynamically rotate games without restarting)
  • EmulationStation rotation: dynamic but ES is restarted (note that the first time you boot the screen orientation may be wrong, just pop the screen out/in and it will set correctly)
  • SDL2 based emulators (SDLPoP, Devilutionx, OpenBOR, etc.)
  • Some wifi and ethernet usb dongles are supported (8188eu and 8192cu for wifi, AX88178A and AX88179 for ethernet). Just insert them on the P1 port. Note: sometimes you may need to unplug and plug them after batocera/ES starts.

What's broken:

  • HDMI output: The retroarch rotation patches currently interfere with the non-rotated HDMI display. So while the LCD only displays correctly the HDMI display is rotate 90 degrees
  • No DRM video support, system uses mali fbdev implementation, so this may mean that some of future batocera features may not be compatible. It shouldn't impact current compatibility yet
  • Music volume can be changed, but master volume cannot be changed via the ES menu. You can change the default volume in batocera.conf.
  • Retroarch screen autorotation requires these variables to be added to batocera.conf:
global.retroarch.input_rotate_landscape_btn = "14"
global.retroarch.input_rotate_portrait_btn = "15”
  • By default controls may need to be redefined. Also you need to add the following lines at the bottom of batocera.conf to make sure all the buttons work correctly on retroarch, including the hotkey:
global.retroarch.input_player1_a = "b" 
global.retroarch.input_player1_a_btn = "5" 
global.retroarch.input_player1_b = "a" 
global.retroarch.input_player1_b_btn = "1" 
global.retroarch.input_player1_l = "f" 
global.retroarch.input_player1_l_btn = "3" 
global.retroarch.input_player1_r = "c" 
global.retroarch.input_player1_r_btn = "4" 
global.retroarch.input_player1_x = "e"
global.retroarch.input_player1_x_btn = "0"
 global.retroarch.input_player1_y = "d" 
global.retroarch.input_player1_y_btn = "2" 
global.retroarch.input_save_state = "x" 
global.retroarch.input_save_state_btn = "nul"
  • Batocera splash video has the wrong resolution. Once batocera boots, go to settings, developer, splash screen and change it static image. That also reduces the boot time.
  • For more information please see this page

Contributors:

Development: @acmeplus, @winteriscomingpinball
Testing: @neocvera, @fakemaria
Acknowledgements: hakchi (madmonkey1907), Project Lunar (cyanic, darkdev1), bakueikozo, batocera linux