2119 Commits

Author SHA1 Message Date
Alex Duchesne
88fd24fab5 rg_system: Disable overclock code if not esp32 chip 2025-07-25 23:20:56 -04:00
Alex Duchesne
234b845a08 rg_storage: Fixed miniz.h for esp-idf 5.4
Tested: 4.4.8, 5.0.1, 5.1, 5.2, 5.4

All seem to find the header. Hopefully it's finally a universal solution...
2025-07-25 23:07:01 -04:00
Alex Duchesne
ca3940d88f rg_display: Wait a bit longer before turning on the backlight 2025-07-23 17:23:25 -04:00
Alex Duchesne
0ddee3e53c rg_i2c: Get rid of warning when using PCF8575 #203 2025-07-11 14:31:14 -04:00
Alex Duchesne
d57d455e1d rg_i2c: Added support for PCF8575
It's not very elegant but it should work...
2025-07-10 15:34:42 -04:00
Alex Duchesne
57a47ff77d rg_i2c: Fixed compilation error with gpio extenders 2025-07-10 15:32:09 -04:00
Alex Duchesne
2931a35c79 rg_storage: Update the deprecated esp-idf miniz header's path (#209) 2025-07-10 15:04:35 -04:00
DynaMight1124
36b2eafbd3
New device: CrokPocket (#206) (also updates vmu and nullnano)
* Update config.h

* Add files via upload

* Update README.md

* Update README.md

* Adjust to new visible area for dev

* Update to new RG_GAMEPAD_GPIO_MAP style

* Amend VMU ADC control values

* Amend Null Nano ADC control values
2025-07-10 14:33:43 -04:00
Alex Duchesne
c65932fa8f rg_input: Made filter code match PR#180 again
Filter is now always enabled. If a device wants to opt out they should set it to >4096, or INT_MAX.
2025-07-06 15:57:13 -04:00
Alex Duchesne
4136437c9d rg_i2c: Added output latch cache to be able to toggle bits faster
This will also be needed for PCF8575
2025-07-04 19:10:22 -04:00
Alex Duchesne
950667456a rg_input: Added back RG_GAMEPAD_ADC_FILTER_WINDOW from #180 2025-07-04 17:24:05 -04:00
Alex Duchesne
54ecbc4395 rg_i2c: rg_i2c_read_byte can now indicate failure by returning -1 2025-07-02 22:06:40 -04:00
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