2157 Commits

Author SHA1 Message Date
Alex Duchesne
d5ef3920ec rg_input: Check for i2c read failures
Failures could previously register as ghost presses
2025-07-02 12:41:20 -04:00
Alex Duchesne
107cb7c1f1 rg_input: Made rg_keymap_gpio_t and rg_keymap_i2c_t consistent regarding pullups/downs
IMPORTANT: This will break out of tree targets but hopefully this is the last time. As long as targets stick to named definitions (`.num = ...`) from now on...
2025-06-30 14:56:31 -04:00
Alex Duchesne
57e03eb57b rg_i2c: Revert some accidental changes from d7811ec7 2025-06-27 19:53:23 -04:00
Alex Duchesne
f3ae55da8c rg_i2c: Check port is valid in rg_i2c_gpio 2025-06-27 19:11:53 -04:00
Alex Duchesne
d7811ec7aa rg_input: Do not invert I2C input for RAW/MRGC 2025-06-27 19:09:14 -04:00
Alex Duchesne
b46e5b767a rg_i2c: rg_i2c_gpio_read_port now returns -1 on failure 2025-06-27 18:22:56 -04:00
Alex Duchesne
4a85fa2195 rg_input: Fixed MRGC and T-DECK I2C input 2025-06-27 18:17:19 -04:00
Alex Duchesne
23e8b466b4 rg_i2c: Changed reg type to int in _gpio_port so that we can express -1 2025-06-27 17:56:31 -04:00
Alex Duchesne
109feb563c rg_input: level can now be specified when using the shift register driver
Same as GPIO and I2C.
2025-06-27 16:55:37 -04:00
Alex Duchesne
3890743dd7 rg_i2c: Added support for MCP23017 internal pullup resistors 2025-06-26 20:52:56 -04:00
Alex Duchesne
62fa913631 translations: Added missing trailing commas 2025-06-26 17:36:31 -04:00
Alex Duchesne
919661651c rg_utils: Removed less than comparison in rg_utf8_get_codepoint in case char is signed 2025-06-26 16:26:19 -04:00
Alex Duchesne
27e74ffdbc rg_gui: Added UTF-8 support
Retro-Go now supports U+0001 to U+FFFF which should cover almost all languages!

Fonts will need to be updated to add the missing glyphs, only basic has some latin glyphs right now. This will be done when tooling from #168 is merged in.

Note: The only documentation I have read to write the parser is wikipedia, so I'm sure that I'm missing many things. Also I have no idea how parse errors are supposed to be handled...
2025-06-26 16:17:35 -04:00
Alex Duchesne
4ed0b57db9 rg_gui: Changed fonts format to use 16bit codepoints
This is in preparation for UTF-8 support.
2025-06-26 16:06:20 -04:00
Alex Duchesne
c310eb232a rg_i2c: Fixed naming conflict with some versions of esp-idf 2025-06-25 19:38:32 -04:00
Alex Duchesne
ce1fa1b238 rg_i2c: gpio port struct 2025-06-25 19:31:40 -04:00
Alex Duchesne
581c4779ec rg_i2c: Added very basic error handling to rg_i2c_gpio_init 2025-06-25 19:10:04 -04:00
Alex Duchesne
3654042835 rg_gui: Fixed fallback glyph when font width is 0 (undefined) 2025-06-25 13:02:25 -04:00
Alex Duchesne
3dbe19b186 Formatting 2025-06-25 04:04:12 -04:00
Alex Duchesne
2212baa1c9 Fixed byteboy was initializing the LEDC driver for nothing
I don't have the schematics but it might have caused issues.
2025-06-25 03:52:01 -04:00
Alex Duchesne
fa36fe1d02 rg_input: Fixed inverted i2c gpio input value
Since it's now possible to specify the expected bit value in the target's config.h, it makes no sense to invert the value anymore.
2025-06-25 00:54:05 -04:00
Alex Duchesne
936ea8cc9a rg_input: Added initialization code for RG_GAMEPAD_I2C_MAP when extender is used
I had to convert bitmasks in all targets to use pin/bit number instead.
2025-06-25 00:48:03 -04:00
Alex Duchesne
1454089ba8 rg_i2c: Added function rg_i2c_gpio_configure_port 2025-06-25 00:19:13 -04:00
Alex Duchesne
51e74f6257 rg_i2c: Added log message at the end of rg_i2c_gpio_init 2025-06-24 23:13:05 -04:00
Alex Duchesne
83e01529ea rg_i2c: Renamed some variables for consistency 2025-06-24 23:06:30 -04:00
Alex Duchesne
d8695c4c94 rg_i2c: Added compile error on unknown rg_i2c_gpio driver 2025-06-24 22:55:31 -04:00
Alex Duchesne
efb0968a0a rg_i2c: Added support for MCP23017 extender (#203)
This is untested because I don't have one. All my knowledge comes from reading the datasheet.

Maybe I broke all extenders with this new code, in fact...
2025-06-24 22:52:00 -04:00
Alex Duchesne
56f30977cc rg_i2c+rg_system: Moved I2C GPIO extender init from rg_input to rg_system
If RG_I2C_GPIO_DRIVER is defined, rg_i2c_gpio_init() will be called very early in rg_system_init

That is because input, display, audio, everything really, could depend on it.
2025-06-24 15:07:14 -04:00
DynaMight1124
e7bcbb48b5
New Device: VMU (#205)
* Added VMU config files

* Update config.h for VMU

* Adjust battery limits

* Small amendments to full battery voltage

* Update README.md

* Update config.h for dev build

* Just a small update to Null Nano battery to match VMU
2025-06-24 12:51:06 -04:00
Alex Duchesne
757b516a2d Updated CHANGELOG 2025-06-17 15:45:59 -04:00
Kilrah
df424c4554
Lilygo T-Deck Plus support (#204)
* t-deck-plus test

* SD init now reliable based on https://github.com/Xinyuan-LilyGO/T-Deck/blob/master/examples/SD/SD.ino

* t-deck plus support done

* Add assets

* Update doc

* Update doc

* Update doc

* Adjust screen constants

* Remove fw def

---------

Co-authored-by: Kilrah <kilrah@kilrah.xyz>
2025-06-17 15:12:15 -04:00
Alex Duchesne
76785a2d8b rg_display: Added compile error if RG_SCREEN_ROTATE is used in ILI driver 2025-06-04 13:20:35 -04:00
Alex Duchesne
c473a5338a rg_display Added driver foreward declarations for clarity 2025-06-04 13:09:22 -04:00
Alex Duchesne
49646e6958 retro-go: Added nullnano to the README.md 2025-06-04 12:47:50 -04:00
DynaMight1124
f28b4cf42b
New device: Null Nano by Ampersand (#202)
* Update config.h

* Add files via upload

* Update config.h

* Update config.h

* Add files via upload

* Update config.h

* Update config.h

Fix dpad issues

* Updated to correct name and add Github link

* Update config.h

Reverted changes, turned out to be a badly printed Dpad! Doh.

* Added Rounded Corners

* Updating to correct device name

* Delete components/retro-go/targets/wrigley directory

* Update config.h

* Update for dev build
2025-06-04 12:46:21 -04:00
Alex Duchesne
6699690589 rg_display+rg_gui: Added safe area and visible area concepts to replace margins and rounded corner const
rg_gui's behavior hasn't been improved yet. This commit only makes it possible to preemptively define the safe area in `config.h`.

Ideally future me should also add a type for margins, I just didn't know where to put it right now....
2025-05-30 20:55:31 -04:00
Alex Duchesne
4fc7c2290c rg_gui: Fixed void left in the menu when value is multiline
Bug appeared in 6c632d, when I tried to fix another bug that overwrote part of the label all the time (especially visible in basic font 8)
2025-05-22 20:10:31 -04:00
Alex Duchesne
2b68354469 Updated CHANGELOG 2025-05-22 19:41:55 -04:00
Alex Duchesne
74a39a2860 SMS: Fixed broken input mapping in GG and SMS since 1.38 (#198) 2025-05-22 19:32:06 -04:00
Alex Duchesne
6c632d2026 rg_gui: Removed basic font renderer
I've converted the basic font to a prop font.

It will now be easier to convert to the new font system from PR#168 because there's just one type to convert.
2025-05-22 18:27:32 -04:00
Alex Duchesne
6950bad61d Added clangd path to the VS Code workspace 2025-05-22 15:54:22 -04:00
Alex Duchesne
4da7ac5d07 rg_surface: Implemented rg_surface_fill 2025-03-31 15:14:06 -04:00
Alex Duchesne
da12453ac4 NES: Fixed alternative MMC3 mappers realloc hack
There was a typo and likely memory corruption until now.
2025-03-31 13:11:33 -04:00
Alex Duchesne
c59c1048a3 SNES: Fixed type in printf format 2025-03-17 14:32:24 -04:00
Alex Duchesne
f4d9293b01 Launcher: Added fIle browser
It doesn't do anything yet other than allow to navigate the tree...
2025-03-17 13:52:27 -04:00
Alex Duchesne
83a1494bca Launcher: Fixed some scrolling weirdnesses 2025-03-17 13:27:53 -04:00
Alex Duchesne
b643227c37 Launcher: Replaced TAB_RESCAN with TAB_DEINIT
Every open tab would be rescanned every time something happened through the webui. This can be very slow and memory-intensive.

Now tabs are de-initialized when the webui deems that something might have changed and only the current tab is reloaded.
2025-03-17 13:27:35 -04:00
Alex Duchesne
dbb419a9e7 rg_gui: Fixed network status in options menu 2025-03-17 13:25:47 -04:00
Alex Duchesne
df74f0734a Launcher: Added a default background option for themes
Currently in a theme the background files are named `background_<tab name>.png`. The problem is that sometimes retro-go adds new tabs, which causes themes to have missing backgrounds.

So I added a fallback. Theme can now provide a file named `background.png` that will be used when a tab-specific background isn't found. This also enables themes to provide a single background file if they don't want per-tab ones.
2025-03-17 13:25:39 -04:00
Alex Duchesne
66c194a9b0 SNES: Reduced binary size by ~20KB
I refactored spc700.c:
- Replaced jump table by a switch. I'm aware that they're essentially the same thing (given our range), but the generated code is ~9KB less, so...
- Removed unnecessary inlining

Doesn't seem to have any performance impact, if anything it is marginally faster...

Possible improvements:
- Grouping identical instructions will reduce size further, but it might break the switch optimizations
- Finalizing the loop inside the function will certainly improve performance
2025-02-21 19:20:06 -05:00