A game selection menu to run single screen Game&Watch roms on M5Stack Tab5 via LCD Game Emulator.

Game Name | ROM Name |
---|---|
Ball | gnw_ball |
Balloon Fight (Crystal) | gnw_bfight |
Chef | gnw_chef |
Climber (Crystal) | gnw_climber |
Donkey Kong Jr. | gnw_dkjr |
Donkey Kong Jr. (Panorama) | gnw_dkjrp |
Fire | gnw_fire |
Fire Attack | gnw_fireatk |
Fire | gnw_fires |
Flagman | gnw_flagman |
Helmet | gnw_helmet |
Judge | gnw_judge |
Lion | gnw_lion |
Manhole | gnw_manhole |
Manhole (Gold) | gnw_manholeg |
Mario's Cement Factory | gnw_mariocm |
Mario's Cement Factory (Table-Top) | gnw_mariocmt |
Mario the Juggler | gnw_mariotj |
Mario's Bombs Away | gnw_mbaway |
Mickey Mouse | gnw_mmouse |
Mickey Mouse (Panorama) | gnw_mmousep |
Octopus | gnw_octopus |
Parachute | gnw_pchute |
Popeye | gnw_popeye |
Popeye (Panorama) | gnw_popeyep |
Super Mario Bros. (Crystal) | gnw_smb |
Snoopy (Panorama) | gnw_snoopyp |
Snoopy Tennis | gnw_stennis |
Turtle Bridge | gnw_tbridge |
Tropical Fish | gnw_tfish |
Vermin | gnw_vermin |
Those are single screen games, for DIY dual screen implementation see the parent project.
- Overlayed menu to navigate between games
- Automatic (landscape forced) screen orientation at boot using builtin IMU
- Roms and artworks preloading (SD or LittleFS)
- Volume and last game selection persistence to RTC memory
- Adjust game time from Tab5 RTC module
- Adjust Tab5 RTC module from game time
- Builtin TouchScreen buttons
- Support for USB SNES Gamepad (0810:e501)
- Support for USB Keyboard
- Support for gzipped roms/artworks e.g.
gzip -c gnw_parachute.gw > gnw_parachute.gw.gz
- None :)
Even though the Tab5 runs at 400MHz (ESP32P4 rulezz), MAME original '.gw' roms are shipped with png/svg artworks that would cripple the performances and make the games unplayable.
Fortunately the roms can be shrunk using LCD-Game-Shrinker:
https://github.com/bzhxx/LCD-Game-Shrinker
Below is a link to a guide describing how to use LCD-Game-Shrinker to generate the shrunk roms.
https://gist.github.com/DNA64/16fed499d6bd4664b78b4c0a9638e4ef (local copy)
If using a SD card, put the shrunk rom files in the /roms
folder, if using LittleFS, leave the files at the root.
#define GW_ROMS_DIR "/roms"
Only one artwork image per game is required: the actual pic of the console as provided in the MAME rom package. That image can be found in the "art packs" mentioned in the LCD-Game-Shrinker guide
That image will be stretched to fit the height of the display, but it must be a jpeg, and be of a reasonable size to avoid slow refresh rates.
Speed vs quality tradeoff: best results observed when resizing the image at half the height of the Tab5 display (360px) and saving the jpg at 80% quality.
Most of those images can be found in the MAME artwork files as PNG format, just resize and save as jpeg using the same filename as the rom.
e.g. for "Parachute" game, the jpeg filename will be gnw_parachute.jpg
and the rom filename will be gnw_parachute.gw
.
generic/
folder of this repository, just apply the same resize/save-as-jpg
procedure.
If using a SD card, put the resized jpg files in the /artworks
folder, if using LittleFS, leave the files at the root.
#define GW_ARTWORKS_DIR "/artworks"
- Open Arduino IDE
- Install EspUsbHost library and apply the fix for M5Tab5
- Clone those additional libraries (don't use the library manager, some of those are outdated in the registry):
- M5GFX
- M5Unified
- ESP32-targz
arduino-BufferStream(fixed version now shipped with this project)
- Optional (if not using the SD card): select a partition scheme where SPIFFS size is between 1MB and 3MB
- Compile and flash
- Optional (if not using the SD card): use the sketch data upload utility to upload the roms/artworks
- The LCD Game emulator engine -> https://github.com/bzhxx/LCD-Game-Emulator
- This project was inspired by -> https://github.com/slowlane112/Esp32-Game-and-Watch
- Awesome rom shrinker Tool -> https://github.com/bzhxx/LCD-Game-Shrinker
- Rom shrinking Tutorial -> https://gist.github.com/DNA64/16fed499d6bd4664b78b4c0a9638e4ef
- Arduino-BufferStream -> https://github.com/Industrial-Shields/arduino-BufferStream