44 Commits

Author SHA1 Message Date
Alex Duchesne
e141ab7817 font_converter: Add support for hexadecimal numbers in glyph ranges (#269) 2026-01-07 15:42:06 -05:00
Alex Duchesne
98ecbc507f Merged build tools and translations from dev branch 2025-11-07 16:07:09 -05: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
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
9d689564c1 rg_storage: Fixed miniz build outside esp-idf 2024-12-17 19:58:47 -05:00
Alex Duchesne
0260ecaa70 Moved launcher images to themes/default 2024-12-13 13:22:23 -05:00
Alex Duchesne
99c7e38969 Moved gen_images.py to tools 2024-12-13 13:20:29 -05:00
Raphael Texier
7b4a99cba8
Adding Localization support (#159)
* Innitial commit

Localization for retro-go using a simple 0(n) lookup function called rg_gettext()

* adding language settings in options menu

* adding more gettext()

* new lookup function

* adding "For these changes to take effect you must restart your device." gui alert + fixing gettext() function

* modifying the gui dialog

* updating struct syntax

* update struct syntax (again)

* creating the python tool for localization

* updating tool + adding missing translations

* moving stuff to libs + starting writing readme

* adding missing "libs/localization" folder import in cmakelist + added the "fixme for rg_system"

* synthax adjust + moving back stuff from libs to retro-go

* removing trailing spaces

* adding the enum for language ids

* updating documentation according to the latest changes

* small tweaks

* Moved LOCALIZATION.md to the root folder

Whilst it is mostly relevant to libretro-go, it really is project-wide documentation.

* rg_localization: Got rid of the switch, made GUI dynamic

This makes adding a language more straightforward.

I kept the *msg *fr *en for now to avoid updating translations.h, but it could be replaced by the GCC extension as such:

[RG_LANG_EN] = "...",
[RG_LANG_FR] = "...",

So that adding a language is really just updating the enum...

* rg_localization: translations is const, we can use RG_COUNT

* rg_gui: Fixed language selection

* rg_localization: No need to validate rg_language in rg_gettext

It should always be valid, there's no need to validate it.

* rg_gui: Show language name in the log

* rg_localization: Got rid of the Translation struct

I am not 100% positive this is a good move...

Benefits:
- One less thing to change when adding a language
- Less code is always better

Cons:
- It doesn't make it clear what the "key" is (the english text)
- If in the future we need to add things like flags it will have to be returned to a struct

* updated python tool + updating translations

* added missing translations

* audio filter wrong translation

* fix : "a propose de retro-go"

---------

Co-authored-by: Alex Duchesne <ducalex007@gmail.com>
2024-11-16 13:04:50 -05:00
Alex Duchesne
0bdd41512f Moved build_sdl2 script to tools
It doesn't deserve to be in root until it's working :(
2024-09-02 14:07:31 -04:00
Alex Duchesne
d47519f02e Updated CHANGELOG (1.43 release) 2024-09-02 13:44:32 -04:00
Alex Duchesne
e5eec87959 Added my old mkrelease.py script 2024-08-31 17:06:25 -04:00
Alex Duchesne
192163966e Updated patches for esp-idf 5.0 2024-08-27 18:00:53 -04:00
Alex Duchesne
6be5d23c40 Updated panic patch to work on esp-idf 4.4 2024-08-02 15:52:45 -04:00
Alex Duchesne
af99223f0a Updated SD Card patches to work on esp-idf 4.4 2024-08-02 15:50:22 -04:00
Alex Duchesne
12bfdd5590 Add missing trailing newline to sdcard-fix patch file (#125) 2024-06-30 16:05:14 -04:00
Alex Duchesne
206959d867 Bump minimum ESP-IDF version to 4.2
Perhaps I will raise it once again to 4.3 before merging to main...
2024-03-19 02:38:05 -04:00
Alex Duchesne
feb56553d3 mkfw: Fixed permissions 2024-01-30 18:48:02 -05:00
Alex Duchesne
42504729e4 Fixed compilation on esp-idf 5.0
Still can't officially support it because performance in several emulators is pretty bad and I haven't tracked down why yet.

PNG decoding also fails on many files so there's clearly something weird going on...
2024-01-07 17:00:36 -05:00
Alex Duchesne
6cc1c0f0f6 Modified the sdcard patch to improve write stability
This seems to fix most upload issues
2022-10-10 12:09:26 -04:00
Alex Duchesne
102fbb7b15 Fixed panic patch for 4.2 - 4.3 2022-10-01 09:56:34 -04:00
Alex Duchesne
112287ea18 Removed disable-boot-sha256 patch just in case... [Amended]
There has been cases of flash corruption on the MRGC-G32. I don't think this is related, but it's the only thing that even comes close to touching the flash in retro-go.
2021-11-24 15:46:54 -05:00
Alex Duchesne
a708e52e44 Build is now back to 3.5MB, including snes and doom! 2021-11-15 23:42:01 -05:00
Alex Duchesne
e512f83319 Removed the SPI mutex for ODROID-GO
The SPI locking is now done at a lower level, in the sdspi driver.

My first attempt (to avoid having to patch esp-idf) was to scan the memory to find the spi_device_handle and do the locking in sdcard_do_transaction. It worked, but it feels wrong.

Since we already patch that exact to improve SD Card compat, I think it's cleaner to just add the two locking lines to it...
2021-10-17 15:44:20 -04:00
Alex Duchesne
2976b87e58 Misc fixes 2021-10-13 19:45:01 -04:00
Alex Duchesne
54fab945bb Added some environment variables to rg_tool.py 2021-09-24 12:26:08 -04:00
Alex Duchesne
bb6427e6f1 Added support for the mrgc-g32 to the build scripts
It's not great but it works...
2021-09-13 20:51:00 -04:00
Alex Duchesne
d323f0bfeb Fixed audio sink for mrgc 2021-08-18 17:32:34 -04:00
Alex Duchesne
4b039a5650 Re-enabled assertion printing
Silent does save almost 15K per app but it makes it so much harder to help users track down issues...
2021-05-24 11:07:32 -04:00
Alex Duchesne
43b9f4888a Make theme creator work in htmlpreview 2021-03-29 15:34:54 -04:00
Alex Duchesne
64febdde0b Adding the old never-finished theme creator 2021-03-29 15:12:13 -04:00
Alex Duchesne
4d090da111 Fixed warning caused by missing cast in esp-idf's panic patch 2021-03-14 12:43:31 -04:00
Alex Duchesne
fda99f73af Updated README to describe the patches + added missing newlines to .diff 2021-03-12 05:46:38 -05:00
Alex Duchesne
2111671c3e Fixed abort message not shown in the intercepted panic log 2021-03-04 23:32:57 -05:00
Alex Duchesne
221ec0cc00 Let each module deal with its GPIOs instead of doing it half in system.c and half in the module 2021-03-03 18:29:16 -05:00
Alex Duchesne
394bd6d259 Added esp-idf hook to capture panic log and save it to sd card
This copies (to the RTC memor)y what the panic handler sends over serial.
That way we can save it to crash.log on the SD Card after the restart.

I'm still testing but so far it doesn't seem to interfer with anything
2021-03-01 23:55:32 -05:00
Alex Duchesne
7df50a4529 Intercept SD Card transfers to apply SPI lock
This allows us to use raw stdio calls without wrapping in rg_spi_lock_acquire/release
We also get a nice disk activity indicator as a bonus!
2021-02-26 11:05:34 -05:00
Alex Duchesne
922c304b0b Added esp-idf patch to enable exfat 2021-02-21 17:09:57 -05:00
Alex Duchesne
9e1a802d77 Added patch to have ESP_ERROR_CHECK work even with silent assertions 2020-12-08 22:31:47 -05:00
Alex Duchesne
88c3d12343 Updated mkfw.py 2020-12-05 15:15:08 -05:00
Alex Duchesne
79c92d49b6 Added partition usage display to mkfw + added audio tip in readme
Also enabled NEWLIB_NANO_FORMAT for even smaller binaries!
2020-12-03 16:56:01 -05:00
Alex Duchesne
e49b0e6cc3 Addded basic profiling and fixed sd card init status being inverted 2020-09-09 20:38:10 -04:00
Alex Duchesne
89d797d5b6 Formatted rg_tool.py with black 2020-08-27 18:02:20 -04:00
Alex Duchesne
93477d9e46 Build scripts are now written in python for better portability 2020-08-25 12:39:39 -04:00
Alex Duchesne
3b30fbce80 Updated build instructions, bundled mkfw 2020-07-29 21:29:01 -04:00