2139 Commits

Author SHA1 Message Date
Alex Duchesne
98ecbc507f Merged build tools and translations from dev branch 2025-11-07 16:07:09 -05:00
Alex Duchesne
6e52462319 Enable UTF-8 support in FATFS for all targets
9e53e09c113a0dad9cb1fae5029bac667a60b76e
2025-11-07 15:34:31 -05:00
Alex Duchesne
5a99511264 retro-go: Added a few datasheets for reference
Cherry-pick: c14849e8fae413992942f75847b1a0d96668e9ed

More will be needed as I need to refer to them (GPIO extender, DACs, etc).
2025-11-07 15:21:41 -05:00
Alex Duchesne
bd22070c93 Enable the psram-cache-issue fix for all components
Cherry-pick:  06433c152c067f6c94c8ae7fd16d91edb087b812

Previously it was only enabled in DOOM and the launcher because they write to PSRAM a lot, triggering the bug often.

Other emulators tend to use it only to store their ROM in PSRAM, so the write bug doesn't usually occur. Which is why the fix was disabled until now.

But it definitely causes instability regardless. In this commit it is now enabled for all emulators, but not for the esp-idf side or libretro-go.

This should be a reasonable compromise. More testing is needed to see if it makes any emulator unusably slow...

So far I'm seeing 10-15% higher CPU usage which is... not great. Thankfully most emulators were at 50-60% usage, so there's headroom...
2025-11-07 15:21:02 -05:00
Alex Duchesne
59c033d7d5 Fixed various compilation warnings and runtime "errors"
- Fixed some typing or naming errors resulting in compilation warnings
- No longer show errors for ENOENT
- Adjusted some things regularly causing merge conflicts

All those things are fixed in dev branch but people tend to use master as a basis for their fork (which is usually a good idea!), and those specific items have come up in the issues.

So I'm exceptionally committing those fixes to master between releases.
2025-10-01 13:13:36 -04:00
Alex Duchesne
df5b842114 font_converter: Merged version from dev branch
The main change is that it adds the character ranges to the generated C file
2025-10-01 13:05:37 -04:00
Alex Duchesne
707700fdd7 Merging PORTING.md from dev branch 2025-09-11 15:13:08 -04:00
Alex Duchesne
619e713279 Updated installation instructions in the README 2025-07-27 19:34:17 -04:00
Alex Duchesne
65903046c4 Updated CHANGELOG 2025-07-27 19:33:51 -04:00
Alex Duchesne
f510ea758e Updated CHANGELOG 2025-07-27 18:13:51 -04:00
Alex Duchesne
53b9959dc7 rg_gui: Fixed RG_TEXT_ALIGN_LEFT meant RG_TEXT_ALIGN_RIGHT 2025-07-27 00:10:13 -04:00
Alex Duchesne
91044f8ea6 rg_gui: Fixed crash when using RG_TEXT_BIGGER with new fonts 2025-07-26 23:23:52 -04:00
Alex Duchesne
b17ec473c9 Launcher: Added gui_draw_preview 2025-07-26 22:32:16 -04:00
Alex Duchesne
832b20db98 rg_storage: Do not check for NC when using RG_STORAGE_SDSPI_HOLD_CS
It's implied that it's present...
2025-07-26 21:43:50 -04:00
Alex Duchesne
6678345598 rg_storage: Added RG_STORAGE_SDSPI_HOLD_CS (#190) 2025-07-26 21:28:15 -04:00
Alex Duchesne
fb43d4d7f9 Fixed the clipped "v" in VeraBold 11 2025-07-26 20:28:51 -04:00
Raphael Texier
f6fb3be2ca
Added a python tool to create and edit fonts and added diacritics to french translations (#168)
* Update translations.h

Adding diacritics
File encoding is Latin-1 (ISO 8859-1)

* rg_gui: adding missing translations

* rg_gui: adding missing translations

* moving converter to tool folder
Creating basic UI

* font_converter : upgrading UI

adding settings fields for the user

* fonts: adding source fonts

I might delete some of them later...

* font_converter: updated the tool

it's now working properly (sort of) !

* create basic C font renderer

I now have to code the part where the user can edit the C file using the canvas like some sort of Windows Paint

* font_converter: few tweaks

made the code a bit shorter and more readable

* font_converter: reverse change that caused an issue

* C_font_editor: Now work !!!

* font_converter: some tweaks on file output comments

* Font tools: solved issue when exporting char with empty data

(such as space)

* font_converter: Added zoom function

+ made the tools full screen

* font_converter: now can handle 'space' character

* font toolss: added a way to exclude some characters

and updated file header

* font_tool: fixing error with file output

* rg_gui: new font renderer for LVGL type font

* Removing old font and adding "LVGL" verabold

* rg_gui: removing bit per pixel option

* rg_gui: renaming a struct to match the rest of the code

* font_tools: replaced treshold by bit shifting

* fonttool: updated the generator to match the new font format

* Font_converter: now generate decent results

* fonttools: adding some fonts + somes tweaks

* font_editor: works again with the new format !

* font_tools: small tweaks

* rg_gui: added back vertical stretching

* rg_gui: moved output specific data inside the if(output)

* rg_gui: small tweak

* font_tools: small tweaks on advance_width

* font_editor: new gui

* font_editor: improved ergonomics

* Renamed edit_c_font to font_editor

* Add support for old format to font_converter.py

* Missing commas in font_converter.py's output

* Fixed memory usage calculation in font_converter

* Auto generate data when selecting a font file

Automatically generate the canvas when loading a font. Also fixed: Cancelling the file selector will no longer clear the font name

* Draw bounding box after the pixels, so that it's fully visible

* Do not save empty bitmaps

* Added save dialog to font converter

* Replaced the blue dot with a box representing the real footprint of the glyph

* Converted translations.h to UTF-8

* Made font_editor save in UTF-8

* Removed new format support in font_converter

I'm still working on adapting font_editor...

* Add option to ensure that font size is respected

* font_converter can now load C fonts, and font_editor now imports its load/save abilities

* Fixed typo

* Fixed max height and memory calculations in font_editor

* Blue bounding box should show the actual height taken by the glyph (aka the max height)

* Preserve the real padding in the rendered glyph

* Reduce ofs_y when possible

* Regenerated fonts with font_converter.py

I'm still tweaking font_converter.py but the result is pretty close to the previous fonts. In some cases the line height is increased because of diatrics unfortunately...

* Restore upstream fonts to resolve conflict

* Resolving conflicts

* Fixed some glyphs were clipped on the left

* Fix conflicts

* More logic to reduce max_height

* Renamed Original_fonts to just fonts

* Removed the mention of the old tool now that we have our own

---------

Co-authored-by: Raphael Texier <157415568+raphatex@users.noreply.github.com>
Co-authored-by: Alex Duchesne <ducalex007@gmail.com>
2025-07-26 17:22:09 -04:00
Alex Duchesne
f357884a28 Regenerated fonts with font_converter.py
I'm still tweaking font_converter.py but the result is pretty close to the previous fonts. In some cases the line height is increased because of diatrics unfortunately...
2025-07-26 16:58:30 -04:00
Alex Duchesne
52dfcf1043 Set font width to 0 on proportional fonts 2025-07-26 02:11:52 -04:00
Alex Duchesne
370ac66a63 Add the fix-psram-cache-issue module only for esp32 chip 2025-07-25 23:35:28 -04:00
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