20 Commits

Author SHA1 Message Date
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
a7f7435a72 Removed unnecessary esp-idf components
These were required with previous versions of esp-idf, but it seems to build fine now without them on 4.4/5.0
2024-09-19 14:42:02 -04:00
Alex Duchesne
3d3cbb0ff9 Moved all Wi-Fi configuration from launcher to rg_gui
More apps might want to use wifi.

The file server remains in the launcher for now. But it could make sense to move it to retro-go at some point.

Big part of the new code in rg_gui is copy pasted from the launcher and needs some cleanup...
2024-08-29 22:43:36 -04:00
Alex Duchesne
04a5ff0767 MSX: Fixed ambiguous includes 2024-08-24 12:31:57 -04:00
Alex Duchesne
cecd9ef629 rg_system: Added message queue to rg_task
Having a built-in messaging system for all tasks is very convenient.

Tasks are free to ignore it or to use it to receive work units. There is no longer a need for separate queues!

This also allows tasks to receive and react to some standard messages like STOP/SHUTDOWN.

An additional benefit is that this will be very easy to make it work in SDL2 compared to full fledged queues. (I have already made a very unsafe and innefficient implementation to showcase, but it needs more SDL_Mutex/SDL_Cond...).
2024-08-22 15:04:26 -04:00
Alex Duchesne
51a03bbd36 rg_utils: Added rg_extension_match 2024-07-16 19:36:10 -04:00
Alex Duchesne
7d409d77d2 Updated CHANGELOG.md 2024-04-16 19:10:28 -04:00
Alex Duchesne
8c3f2deac6 MSX: Bound back START to fMSX menu
I still think we could do something more useful with the button...
2024-04-16 18:41:16 -04:00
Alex Duchesne
90f8288c02 MSX: Freed the START button
Moved fMSX menu to the options menu, moved virtual keyboard to select button.

Now just have to find what's the best usage of the newly freed button!
2024-03-18 16:31:41 -04:00
Alex Duchesne
437ca25c02 rg_system: Added wrappers for FreeRTOS queues
I don't like abstraction for the sake of abstraction,  but I like apps to depend FreeRTOS even less.
2024-03-14 20:30:19 -04:00
Alex Duchesne
65eedf6952 MSX: Fix building on esp-idf 5.0 2024-03-13 16:38:36 -04:00
Alex Duchesne
0c188157b7 MSX: Made some changes to match fMSX-go
- Run audio emulation on core 1
- Set sample rate to 32000
- Set RAM pages to 2
- Set VRAM pages to 2
- Make GetFreeAudio return 1024
2024-03-13 16:36:58 -04:00
Alex Duchesne
db6135f572 MSX: Do not show storage root in missing file dialog 2024-03-12 18:13:23 -04:00
Alex Duchesne
6e8052cb21 MSX: Check for missing bios files on startup
This slows down boot a little but I think it's worth it to avoid user frustration!
2024-03-12 18:07:11 -04:00
Alex Duchesne
9eb04c1efc rg_surface: Replaced custom scaling by a zoom factor that preserves aspect ratio and can go over 1x 2024-03-08 17:51:08 -05:00
Alex Duchesne
3114647d08 MSX: Fixed cart loading 2024-03-07 23:32:09 -05:00
Alex Duchesne
f68a0003c1 rg_system: Improved logging
Added colors and also added a verbose mode that is stripped from release builds (so RG_LOGV calls can contain costly calculations that won't impact normal runtime)
2024-03-06 20:22:46 -05:00
Alex Duchesne
0bd6a01fd5 MSX: Embedded CARTS.SHA
Continuing with my attempt at not modifying fMSX directly, this intercepts the call and redirect to a file in retro-go's cache.

The cached file is created from our embedded copy of CARTS.SHA when not present.
2024-03-05 15:33:08 -05:00
Alex Duchesne
e4fed31b4b MSX: Added direct save state support 2024-03-04 12:41:13 -05:00
Alex Duchesne
07f1fafa39 Added fMSX 6.0 emulator
The emulator source is unmodified but it is dynamically patched at compile time (by forcing an include file).

Both keyboard and joystick are emulated. For keyboard I looked up the most used keys in games. With feedback I'll be able to tweak that, but the virtual keyboard also works if other keys are needed.

Save states work through the in-game menu but not yet through retro-go's menu.

Launcher images are also missing.
2024-03-02 17:22:15 -05:00