Skip to content

Commit 77b254a

Browse files
authored
Fix margins for GameBox Mini (#104)
* Fix margin to have a black bar instead of garbage on the metal case This unit came in two case variations. The plastic case, which was modified from a simple LCD keyring toy game and for which the unit was designed to fit inside, and a metal case that was designed specifically to house the internals. Turns out, the viewing window on the metal case is higher than on the plastic case, presumably to make better use of the actual screen. With the previous margin, garbage is shown on the bottom of the screen if playing with a metal case. With the plastic case, the bottom of the screen is physically masked off to prevent light bleed, which is why I didn't notice before. Extending the bottom margin prevents the garbage on the bottom of the metal units. * Update config.h Added fixed margin values for plastic case and for metal case.
1 parent 305a3ff commit 77b254a

File tree

1 file changed

+9
-3
lines changed
  • components/retro-go/targets/mrgc-gbm

1 file changed

+9
-3
lines changed

components/retro-go/targets/mrgc-gbm/config.h

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,9 @@
1616
#define RG_SCREEN_HOST SPI2_HOST
1717
#define RG_SCREEN_SPEED SPI_MASTER_FREQ_40M
1818
#define RG_SCREEN_WIDTH 240
19-
#define RG_SCREEN_HEIGHT 230 // Display height 192 plus margin? Was 232
19+
#define RG_SCREEN_HEIGHT 240
2020
#define RG_SCREEN_ROTATE 0
2121
#define RG_SCREEN_MARGIN_TOP 38
22-
#define RG_SCREEN_MARGIN_BOTTOM 2 // Too little gives you garbage under the bottom bezel.
2322
#define RG_SCREEN_MARGIN_LEFT 0
2423
#define RG_SCREEN_MARGIN_RIGHT 0
2524
#define RG_SCREEN_INIT() \
@@ -35,6 +34,13 @@
3534
ILI9341_CMD(0xE1, 0xD0, 0x00, 0x05, 0x0D, 0x0C, 0x06, 0x2D, 0x44, 0x40, 0x0E, 0x1C, 0x18, 0x16, 0x19); \
3635
ILI9341_CMD(0x21);
3736

37+
// Screen margin
38+
// Uncomment the following line if using a plastic case
39+
#define RG_SCREEN_MARGIN_BOTTOM 10 // Fullscreen for plastic case. Black bar on bottom for metal case.
40+
41+
// Uncomment the following line if using a metal case
42+
// #define RG_SCREEN_MARGIN_BOTTOM 0 // Fullscreen for metal case. Cropped on bottom for plastic case.
43+
3844
// Input
3945
#define RG_GAMEPAD_DRIVER 3 // 1 = ODROID-GO, 2 = Serial, 3 = I2C, 4 = AW9523, 5 = ESPLAY-S3, 6 = SDL2
4046
#define RG_GAMEPAD_HAS_MENU_BTN 1
@@ -63,7 +69,7 @@
6369
#define RG_BATTERY_CALC_PERCENT(raw) (((raw) - 170) / 30.f * 100.f)
6470
#define RG_BATTERY_CALC_VOLTAGE(raw) (0)
6571

66-
// Status LED
72+
// Status LED (Does not seem to be mappable)
6773
// #define RG_GPIO_LED GPIO_NUM_NC
6874
// #define RG_GPIO_LED GPIO_NUM_13 // From OG Firmware
6975

0 commit comments

Comments
 (0)