1. instructables
Game & MINTIA
by 陳亮
This instructables show how to use a tiny sweet box to
make a NES console.
Supplies:
TTGO T7 v1.3
https://www.aliexpress.com/af/Ttgo-t7-v1.3.html?d=...
1.54" ST7789 IPS LCD
https://www.aliexpress.com/af/1.54-st7789.html?d=y...
Lipo 303040
https://www.aliexpress.com/af/lipo-303040.html?d=y...
MAX98357 I2S DAC audio breakout board
https://www.youtube.com/embed/-ehaDDSYJaE
noopener">https://www.aliexpress.com/af/max98357.ht
ml?d=y&or...
10*18 mm speaker
https://www.aliexpress.com/af/1018-speaker.html?d=...
Thin Prototype PCB
https://www.aliexpress.com/af/lipo-303040.html?d=y...
Four 6.2*6.2*5 mm Tactile Switches
https://lcsc.com/product-detail/Tactile-Switches_D...
Two 12*12*4.3 mm Tactile Switches
https://lcsc.com/product-detail/Tactile-Switches_D...
Four 6*3.5*5 mm Tactile Switches
https://lcsc.com/product-detail/Tactile-Switches_D...
Game & MINTIA: Page 1
2. Step 1: What Is MINTIA?
Step 2: Sweet Box Patch
MINTIA is a multi favor tablet produced by Asahi Group
Food, Ltd. in Japan since 1996. The sweet box design
make it very easy to take one and only one tablet out
when put o the cover, you can see the demo video how
it works. MINTIA is very popular in Japan, it even have
many 3rd parties tailor-made leather case for MINTIA.
The sweet box is very thin and the tablet outlet is very t
for the micro USB plug. MINTIA is over 20 years old,
micro USB plug not yet born at that time! What a
coincident!
4 years ago, I would like to squeeze all electronic
components in it to nd out how much it can be. This is
the 3rd projects I built on MINTIA sweet box.
Asahi MINTIA page:
https://www.asahigroup-holdings.com/en/brand/minti...
MINTIA o cial Facebook page:
https://www.facebook.com/mintia.jp
My previous Mintia projects:
https://www.instructables.com/Arduino-MINTIA-Game-
...
https://www.instructables.com/IoT-LED-Matrix/
I would like to hide the NES console under the MINTIA
sweet box, so I will keep the original front face
unchanged. All magic hide at the back ;>
First of all I need consume all 50 MINTIA tablets. It is an
easy job, I can consume box of it every week. Then
remove the back face sticker. MINTIA box is well
designed, front and back part assembled without glue.
So it is very easy to tear apart after put o the tablet
outlet cover. I would like to utilize all space in the box, so
I will cut out all the internal supports.
Now I can squeeze all components inside it.
Game & MINTIA: Page 2
4. Step 3: Design Back Face Layout
Step 4: Hardware Selection
I would like the NES console look like the Nintendo
classic "Game & Watch" series. So I selected a red MINTIA
sweet box. Then I use a gold color paper as a cover.
Landscape layout, screen at the middle, direction
buttons on the left, select and start buttons at the
bottom and 2 big buttons on the right. Besides the
standard NES buttons, I also require 2 more buttons for
save and load status. So I add 2 more small buttons on
the upper right.
Game & MINTIA: Page 4
5. ESP32 Dev Board
This NES console is based on my previous instructables,
Arduino NES, so it require a ESP32 dev board. Not much
dev board can t into the sweet box, TTGO T7 v1.3 is the
small enough one after removed the Lipo Battery socket.
The limitation is it does not have PSRAM, it limited the
NES ROM can play.
Lipo Battery
The Lipo capacity direct limited the console playing life
time, so it should be as big as possible. Exclude the room
for the ESP32 dev board, there are still enough room for
a 30 x 30 x 40 mm 360 mAH Lipo battery. I think it can
last over an hour.
Display
1.54" inches square display, ST7789 IPS LCD, is the largest
display that can t in MINTIA and still have enough room
remain for the buttons.
Audio board
ESP32 can use internal DAC or external I2S DAC. Internal
DAC still require an extra ampli er to drive a speaker and
external have better sound quality, so I choose external
I2S DAC ampli er board. No any I2S DAC audio breakout
board can t in the remaining room, so I need patch
from a MAX98357 board.
Speaker
After MAX98357 patch, there are still have enough room
can t in a 10*18 mm speaker.
Prototype PCB
Normal PCB is too thick, we need a special thin (<= 1
mm) prototype PCB for holding the display and buttons.
Buttons
For better playing experience, this time I selected some
light touch (125 gf / 160 gf operating force) tactile
switches from Diptronics.
Game & MINTIA: Page 5
6. Step 5: Fix Dev Board & Lipo
Direct soldering Lipo to the original Lipo socket power pins
Use hot glue x the dev board on the sweet box and align the USB socket in the right place (beware hot
glue should not touch any GPIO pins)
Use a little bit hot glue x the Lipo battery
Double check the sweet box back cover can reassemble without problems
Game & MINTIA: Page 6
7. Step 6: I2S DAC Board Patch
The MAX98357 board is a tiny square board but it still cannot t in the sweet box. The upper part is the speaker
connector and no any other electronic components. I will cut it out for saving space. The speaker still can connect by
soldering the node between 2 capacitors as show in second photo. Then use hot glue x in the sweet box and double
check the sweet box back cover can reassemble without problems.
Then it is the soldering work, here are the connection summary:
ESP32 -> MAX98357
===== ========
GPIO 15(TD0) -> LRC
GPIO 13(TCK) -> BCLK
GPIO 14(TMS) -> DIN
5V -> Vin
GND -> GND
-> 100k Ohm resistor -> Gain (optional for 15 dB gain)
Ref.:
Game & MINTIA: Page 7
8. Step 7: Early Test
Step 8: Software Preparation
https://datasheets.maximintegrated.com/en/ds/MAX98...
After connected the rst component, I2S DAC, I would like to check is it works. So switch to software part rst.
Game & MINTIA: Page 8
9. Step 9: Configuration
Arduino IDE
Download and install Arduino IDE if you are not yet do it:
https://www.arduino.cc/en/main/software
ESP32 Support
Follow the Installation Instructions to add ESP32
support if you are not yet do it:
https://github.com/espressif/arduino-esp32
Arduino ESP32 lesystem uploader
Follow the installation steps to install Arduino ESP32
lesystem uploader if you are not yet do it:
https://github.com/me-no-dev/arduino-esp32fs-plugi...
Arduino_GFX Library
Download latest Arduino_GFX libraries: (press "Clone or
Download" -> "Download ZIP")
https://github.com/moononournation/Arduino_GFX
Import libraries in Arduino IDE. (Arduino IDE "Sketch"
Menu -> "Include Library" -> "Add .ZIP Library" -> select
downloaded ZIP le)
Arduino Nofrendo Library
Download latest Arduino Nofrendo libraries: (press
"Clone or Download" -> "Download ZIP")
https://github.com/moononournation/arduino-
nofrend...
Import libraries in Arduino IDE. (Arduino IDE "Sketch"
Menu -> "Include Library" -> "Add .ZIP Library" -> select
downloaded ZIP le)
Open esp32-nofrendo sample code in Arduino IDE ("File" -> "Example" -> "arduino-nofrendo" -> "esp32-
nofrendo")
Save as a new project
Change hardware parameters:
hwcon g.h around line 69, select SPIFFS
// Uncomment one of below, ESP32 support SPIFFS SD_MMC and SD
/* SPIFFS */
#define FILESYSTEM_BEGIN SPIFFS.begin(false, FSROOT); FS filesystem = SPIFFS;
/* 1-bit SD mode SD_MMC, always retry once for begin() failed */
// #define FILESYSTEM_BEGIN (!SD_MMC.begin(FSROOT, true)) && (!SD_MMC.begin(FSROOT, true)); FS filesystem = SD_MMC;
/* 4-bit SD mode SD_MMC, always retry once for begin() failed */
// #define FILESYSTEM_BEGIN (!SD_MMC.begin(FSROOT, false)) && (!SD_MMC.begin(FSROOT, false)); FS filesystem = SD_MMC;
/* SD using default SPI settings */
// #define FILESYSTEM_BEGIN SD.begin(22 /* SS */, SPI, 8000000, FSROOT); FS filesystem = SD;
/* SD using custom SPI settings */
// #define FILESYSTEM_BEGIN SPIClass spi = SPIClass(HSPI); spi.begin(14, 2, 15, 13); SD.begin(13, spi, 8000000, FSROOT); FS filesystem = SD;
hwcon g.h around line 81, set I2S DAC pins
// enable audio
#define HW_AUDIO
#define HW_AUDIO_EXTDAC
#define HW_AUDIO_EXTDAC_WCLK 15
#define HW_AUDIO_EXTDAC_BCLK 13
#define HW_AUDIO_EXTDAC_DOUT 14
#define HW_AUDIO_SAMPLERATE 22050
hwcon g.h around line 89, setting controller GPIO
Game & MINTIA: Page 9
10. Step 10: Program
/* controller is GPIO */
#define HW_CONTROLLER_GPIO
// #define HW_CONTROLLER_GPIO_ANALOG_JOYSTICK
// #define HW_CONTROLLER_GPIO_REVERSE_UD
// #define HW_CONTROLLER_GPIO_UP_DOWN 34
// #define HW_CONTROLLER_GPIO_REVERSE_LF
// #define HW_CONTROLLER_GPIO_LEFT_RIGHT 35
#define HW_CONTROLLER_GPIO_UP 12
#define HW_CONTROLLER_GPIO_DOWN 32
#define HW_CONTROLLER_GPIO_LEFT 25
#define HW_CONTROLLER_GPIO_RIGHT 27
#define HW_CONTROLLER_GPIO_SELECT 4
#define HW_CONTROLLER_GPIO_START 0
#define HW_CONTROLLER_GPIO_A 22
#define HW_CONTROLLER_GPIO_B 21
#define HW_CONTROLLER_GPIO_X 17
#define HW_CONTROLLER_GPIO_Y 16<br>
if your display is 9-bit SPI LCD, display.h around line 37
// #define TFT_BRIGHTNESS 128 /* 0 - 255 */
// #define TFT_BL 14
Arduino_DataBus *bus = new Arduino_ESP32SPI(-1 /* DC */, 5 /* CS */, 18 /* SCK */, 23 /* MOSI */, -1 /* MISO */);
Arduino_ST7789 *gfx = new Arduino_ST7789(bus, 33 /* RST */, 0 /* rotation */, true /* IPS */, 240 /* width */, 240 /* height */, 0 /* col offset 1 */, 80 /* row offset 1 */);
/* ST7796 on breadboard */
// #define TFT_BL 32
// Arduino_DataBus *bus = new Arduino_ESP32SPI_DMA(32 /* DC */, -1 /* CS */, 25 /* SCK */, 33 /* MOSI */, -1 /* MISO */);
// Arduino_TFT *gfx = new Arduino_ST7796(bus, -1 /* RST */, 1 /* rotation */);
/* ST7796 on LCDKit */
// #define TFT_BL 23
// Arduino_ESP32SPI_DMA *bus = new Arduino_ESP32SPI_DMA(19 /* DC */, 5 /* CS */, 22 /* SCK */, 21 /* MOSI */, -1 /* MISO */);
// Arduino_ST7796 *gfx = new Arduino_ST7796(bus, 18, 1 /* rotation */);
if your display is normal SPI LCD, display.h around line 37
// #define TFT_BRIGHTNESS 128 /* 0 - 255 */
// #define TFT_BL 14
Arduino_ESP32SPI_DMA *bus = new Arduino_ESP32SPI_DMA(14 /* DC */, 5 /* CS */, 18 /* SCK */, 23 /* MOSI */, -1 /* MISO */);
Arduino_ST7789 *gfx = new Arduino_ST7789(bus, 33 /* RST */, 0 /* rotation */, true /* IPS */, 240 /* width */, 240 /* height */, 0 /* col offset 1 */, 80 /* row offset 1 */);
/* ST7796 on breadboard */
// #define TFT_BL 32
// Arduino_DataBus *bus = new Arduino_ESP32SPI_DMA(32 /* DC */, -1 /* CS */, 25 /* SCK */, 33 /* MOSI */, -1 /* MISO */);
// Arduino_TFT *gfx = new Arduino_ST7796(bus, -1 /* RST */, 1 /* rotation */);
/* ST7796 on LCDKit */
// #define TFT_BL 23
// Arduino_ESP32SPI_DMA *bus = new Arduino_ESP32SPI_DMA(19 /* DC */, 5 /* CS */, 22 /* SCK */, 21 /* MOSI */, -1 /* MISO */);
// Arduino_ST7796 *gfx = new Arduino_ST7796(bus, 18, 1 /* rotation */);
1. Connect the device with USB cable
2. Open Arduino IDE
3. Open esp32-nofrendo sample code ("File" -> "Example" -> "arduino-nofrendo" -> "esp32-nofrendo")
4. Press Arduino IDE "Upload" button
Game & MINTIA: Page 10
11. Step 11: Sequence Test
Step 12: Thin Prototype PCB Patch
Step 13: Connect Display
5. Select "Tools" menu in Arduino IDE -> "ESP32 Sketch Data Upload" will upload the ROM le to ESP32
SPIFFS.
The dev board have a built-in "Boot" button. This button
can help ESP32 enter program mode easily.
Since the boot button (GPIO 0) is mapped to start button
in hwcon g.h, press this button after Arduino-nofrendo
boot up means press the start button. So I always can
test the connected components by pressing the start
button. E.g. after connected the I2S DAC board I should
able hear game sound by pressing start button.
https://www.youtube.com/embed/r2eza6IIrQI
The rst layer of the NES console is ready, the second layer is
The thin prototype PCB is a large plate, simply use scissor can cut to desired shape. The shape should a little smaller than
the sweet box, and avoid cover the speaker. The dev board ash chip is the thickest component, so I also trim the PCB to
avoid this.
Please read through the ordered display data sheet before make any connection.
Here are the connection summary:
Game & MINTIA: Page 11
12. Step 14: Sweet Box Patch for Display
ESP32 -> Display
GPIO 14 -> D/C
GPIO 5 -> CS
GPIO 18 -> SCK
GPIO 23 -> SDA
GPIO 33 -> RST
3v3 -> Vcc, LED+
GND -> GND, LED-
After connection, simply turn on the power to check if it work.
https://www.youtube.com/embed/KeByIpe4CWw
Game & MINTIA: Page 12
13. Step 15: Power Switch
Step 16: Connect Buttons
I think redirect the dev board power switch outside the sweet box is the most di cult part. I need to use a tiny 3D printed
part help to make it:
https://www.thingiverse.com/thing:4693514
If you do not have a 3D printer, simply desoldering the original switch and extend the pins to a bigger switch should be a
good solution.
Here are the connection summary:
Game & MINTIA: Page 13
14. Step 17: Cover Plate
ESP32 -> Buttons
===== =======
GND -> All buttons
GPIO 12 -> Up button
GPIO 32 -> Down button
GPIO 25 -> Left button
GPIO 27 -> Right button
GPIO 4 -> Select button
GPIO 0 -> Start button
GPIO 22 -> A button
GPIO 21 -> B button
GPIO 17 -> X button
GPIO 16 -> Y button
Check connection anytime:
https://www.youtube.com/embed/2IRCtIsoslc
https://www.youtube.com/embed/EF6tYRvmE2I
Game & MINTIA: Page 14
15. Step 18: Sound Hole
Step 19: Final Decoration
This step is second di cult part.
Select a good looking card paper from stationery shop
Cut the size to a little bit smaller than the sweet box
Cut the buttons and display one by one
Remember punch some hole to let the speaker sound out before stick the cover plate.
I would like to make it look like Nintendo "Game & Watch" series, so I printed a tiny label "Game & MINTIA" and stick on it
;>
Game & MINTIA: Page 15
16. Step 20: Enjoy!
It's time to play and show o what you have done to your friends!
Game & MINTIA: Page 16
17. Step 21: What's Next?
4 years ago, I use MINTIA made a Tetris game with a 0.96" display; Now I use a 1.54" display to make a NES console.
MINTIA still have many possibilities, let's dig it out together!
Game & MINTIA: Page 17
get here the video