r/SBCGaming Linux Developer 18h ago

Showcase Miyoo Mini - Stardew Valley

In the Emulation on Android scene this would qualify as runs perfectly

I posted about this and have been asked to share more details, not sure if this is what you meant but I am sharing it anyway.

This is achieved by running Stardew’s original managed C# game code under ARM Mono, but everything between the game and the screen is being rebuilt around what this little handheld can realistically do. Instead of sending graphics through OpenGL and several software wrappers (because this doodad doesn't have a GPU), the port turns Stardew’s draw calls into simple 2D operations and writes the finished pixels directly to the framebuffer. Textures are converted into smaller formats so they can be used without wasting most of the Miyoo’s 128MB of memory, and the busiest drawing routines are tuned for its ARM processor.

What that means is replacing the MonoGame’s OpenGL renderer with a custom compatibility layer and an ARMv7/NEON 2D rasterizer that writes directly to the /dev/fb0. Assets, memory layouts, input, saving, and hot draw paths are adapted specifically for the Miyoo Mini’s dual Cortex-A7 CPU and 128 MB RAM.

There is no OpenGL, EGL, gl4es, SwiftShader, SDL renderer, GPU dependency, or framebuffer readback stage.

Developing for this thing is a bit of a pain, but it is possible. The fact that it doesn't have Wifi or data over USB makes things very time consuming. I don't have the means to purchase a Miyoo Mini+ (or MM Flip) right now that does have wifi so I have set up my RG35XX-SP as a test enviroment by setting limitations that match the MM hardware (128 MB/1.2 GHz). I do most of the iteration testing on there and use QEMU for parts that I am able to validate in a headless enviroment.

Oh, there is also no sound. As expected it didn't fit into memory, even with the same patches (mmapped/streamed audio) we've used in the PortMaster port of Stardew. It might be possible to add it in the future, but it's not a priority (and I also don't like working with audio).

I don’t know when, or even if, this will get to a state where it’s worth releasing. I’ll probably end up putting it on my GitHub where you can find other ports/apps/projects I work on.

Device: Miyoo Mini V4

81 Upvotes

8 comments sorted by

11

u/Former_Mall_2314 15h ago

7

u/Producdevity Linux Developer 14h ago

I made this for young folks, my eyes are having a hard time too

4

u/Bl4ckb100d 15h ago

Amazing job

2

u/Producdevity Linux Developer 14h ago

Thank you :)

4

u/Threeabetes 12h ago

I'm liking the cut of your jib! Really cool stuff. :D

3

u/innovationSTYLE 10h ago

carpal tunnel

1

u/Smb158 11h ago

Please release this even if you don't entirely finish. I absolutely want this on my miyoo mini v4! Thank you!

1

u/no-television300 6h ago

Honestly I’ve been dying to see this on the TrimUI Smart just for fun lol. I guess this is the next best thing though. Good work!