hckrnws
Porting Rockbox to an undocumented $9 Aliexpress 'YP3' MP3 Player with LLMs
by jaydenmilne
by jaydenmilne
I had one of these in my box of unfinished projects. It's fun to dream about the possibilities, but actually programming it is time consuming.
Or at least it used to be. I plugged it in and had Claude write a Yoto box clone for my kiddo. It serves a webpage for uploading tracks and I have the m5 rfid accessory so I can associate rfid cards with songs. I can add album art and there's a carousel for picking songs. I even added some music visualizations and games.
I could publish the repo, but why bother? Just have Claude write you a new one from scratch exactly to your specifications. It takes about 30 minutes.
We live in an age of marvels and monsters. Riemann? Super intelligence? Is a singularity just around the corner? I have no idea but it doesn't seem so unlikely these days. Life comes at you fast, as they say.
Because reusing effort means spending fewer tokens and not having to find the same bugs again. I appreciate that lowering the cost to write software means the value of sharing it is lower, but I don't think it's zero.
But rockbox ports? Seems an excellent use for LLMs
What's disturbing is that given the trajectory of things, it doesn't seem unlikely that in a year or two it will be able to produce something as polished as rockbox from a single prompt, all while I'm still sipping my morning coffee.
It is hard to find a tiny hackable MP3 player that weighs under 40g (let alone widely available with bluetooth and USB-C). For comparison the iPod Shuffle is 13g and most popular iPod Nano is 37g. I think the PineTime smart watch might be another option. It's tough to find a really good option for books while running since the cheapy garbage players don't support audiobook formats out of the box.
So now we're down to "I bought a thing", in essence. Or, "I had a thing made for me", at best. From your kid's perspective, that's probably fine. Maybe my kids are being deprived of something by waiting for their dad to make a clone of yoto. It's just that as a reader on Hacker News, I don't know what this all entails. For me it's infinitely far from the hacker spirit. It makes me depressed. Not that you had one made, or even bought one – almost everything I own someone else made and I merely bought – but I don't understand where the joy is supposed to be.
You'll look fondly back at the 6 month lead times then realising the 30 minutes was magical but just the dealer getting you hooked.
I haven't decided if this is in jest yet.
Doesn't mean the open models will continue to be so good, but they have so far.
Many people simply don't have the money
I've been building a 'tinybot' from this flow. The devices you see out there at ridiculously cheap prices are so - SO - much better than the current-gen software that runs on them. Android running on a MediaTek is so hard-hamstrung by the OS and the many many layers of abstraction and virtualization.
$10 for a complete hardware product is incredible.
When you bump that up to just $20, or even more to like $50+, you can get some really, really nice specced 'microdevices', like the ones mentioned by `beala` here: https://news.ycombinator.com/item?id=50644855.
I've got plans for these things, and because of the shift away from software being sold, it's time for the powerful hardware that it sat on to rise again!
P.S.: If any of this sounds intriguing to you, please do drop me a line! I'm going to be open-sourcing the repo I'm using to build my prototypes, and if all goes well, I'll have some pages up soon explaining the build process, the tools, How-To's, limitations, etc. I could use all the help I can get, and this site has plenty of folks that like to tinker on the very small and the very "underpowered" ;) (yes, I think this is what folks call the 'nerd snipe', and you have my blessing to save yourself before you get caught in it. We're all supposed to be working, after all.)
Also, though, this is just wild. The ability to point Claude at these sorts of problems and say "Here, figure this out" is just incredible. I agree with OP that reverse-engineering one of these things is one of the hardest problems I can imagine (well, that and the Riemann hypothesis), and seeing it do so well is yet another eye-opening moment in a year that's been full of them.
https://recho.atzkey.workers.dev/
https://zmd22.github.io/diskos-disco/
https://b0hemia.github.io/diskOS/
Disclaimer: I have no affiliation, I'm just following the space.
I would love to see this..
> RockGPT This is going to get its own blog post because it is deeply amusing. A ~1 million param model running on your MP3 player. Almost coherent, fine tuned to be aloof and dismissive of humanity. Weights are streamed from SD card. Crazy
However, I'd really encourage everyone wanting a SERIOUS portable audio player experience to take a look at the HiBy R1 for 70-120 bucks or HiBy R3 Pro II for a little more (depending on your location) along with the open source port Sonix Player[1].
Although I'm a huge fan of RockBox, I was always intrigued by the fact that an open source player could have Wifi, Bluetooth and full Linux support along with good battery life and decent audio quality.
I'm currently working with other devs to make it a really flawless experience and starting to feel like an iPod without the restrictions of Apple or Android (USB-C, no vendor lock-in, open source sync support, etc.).
I have a personal vendetta against crappy software that holds back otherwise capable hardware, it's honestly a reason I got into tech to begin with
Can be listed with capabilities and filtering of wifi+lcd / bluetooth+2buttons+lcd / 5leds+wifi.
https://github.com/rockbox-y1/rockbox
https://www.innioasis.com/products/y1
I learnt about it thanks to the Dammit Jeff youtube channel
I tried to do the same thing for a Famue BF30 on something like chatgtp 5.4 earlier this year but didn't make any real progress. I figured it was partially because there was no docs or even reviews on this model because it was such a new device. But maybe it's worth revisiting with a claude model.
I think the hardware/form factor of the Famue BF30 is just awesome, but the software making it effectively unusable.
Just in case anyone wonders, Rockbox supports several recent "high-resolution music players" from Chinese companies - they aren't $9 but they aren't particularly expensive either, and they offer decent sound and build quality.
its great fun!! and these low power controllers have insane battery if you are used to regular android power consumption
But the obvious shortcoming is that it doesn't work for bringing up display driver itself, framebuffer is what you want displayed, not what's actually displayed :)
XIP from SPI flash with dual core but no Icache/Dcache? So that execution is kneecapped by fetches over a bus that's optimistically quad at 40MHz, and if both cores ever try to XIP together, one starves to death? What the fuck.
I'd go looking for a cache peripheral that just isn't enabled by the stock firmware. Because, why? Why would you do that in the design stage? Did they just expect the second core to be a DSP/protocol slave that either runs a few DSP routines loaded manually into SRAM, or spends most of its time in BT ROM? Did they expect the firmware devs to grit their teeth and manually SRAM every little bit of code that needs to do things at a speed faster than "glacial"? All to save a couple KB worth of SRAM for the cache? On a chip that relies on the SPI flash die for the bulk of its code and assets, and already ships a 512KB chunk of SRAM?
At this point, I feel like the reason chips like that don't see public documentation isn't something like "proprietary information", but that their makers live in shame of what they have created.
I never actually moved past mp3 players though; my current one does everything I need so well for so long (~22 hour battery life) at such an insanely light weight (20g) that it's lasted 15 years so far (on its second battery now, mind)
Aside from the FM-1, there are also open firmwares available for the SMK-25 and the SMC-PAD. I want to try making an HID driver for my SMC-PAD Pocket, as it's a great form factor but is very limited by the MIDI CCs that the software can send, I'd love to see it usable as an HID device for a macro pad. I also would like to see if's possible to vibecode better firmwares for 8bitdo gamepads, the 8bitdo Micro can be used as a Bluetooth keyboard with its stock firmware but the functionality is a little limited and the factory app is terrible. Additionally, I have a Datafrog SF3000 that people were trying to develop firmware for a couple years ago before the models were good enough, I'm wondering if it might be possible to repurpose it as a media player, synth, or something else entirely. It seems to have a general purpose 2.4GHz transmitter that has SDK examples for a Bluetooth or Wi-Fi stack.
TBH as long as nothing stupid like outlawing open models happens, I'm beginning to think that the RE capabilities of LLMs could usher in a new age of OSS. Although the big labs have stolen countless hours of human labor, if LLMs can be used to open our hardware back up it would be a dream come true for the idea of a full GPL stack for any closed device. Even something like factoring in P which seems like a nightmare at first glance might actually be a huge win for OSS if it lets us crack the signing key for locked platforms in a reasonable timeframe. Granted there would be a period of horror to live through first, and maybe it's the nostalgic millenial in me talking, but if our devices started to be offline-first due to the risks of being online, and we truly owned the hardware, I would count that as a win.
Hah I got a good chuckle out of that
The problem with "it works" is that if you don't understand why it doesn't quite work, you can't fix it.
I used it over twenty years ago on an Archos Jukebox, which was one of the ugliest and chunkiest music players. I was super happy to get it as a gift, though.
[dead]
[dead]
[dead]
[dead]
At some point, you realize they never liked chess.
But, and here's the biggest problem: in that analogy, this site, and the wider hacker and maker communities, are chess enthusiast communities. Not communities for unboxing videos, which I feel half of HN is fast becoming :-(
A tale as old as time: the companies exploring a new arena are lax and basically crowd source where the nuggets of value are. Once gold is struck, the ToS change, and the garden walls are raised overnight. Enjoy the freedom while ot lasts, before Reverse Engineering is sold as a $5,000 add-on to vetted "Cyber-plus" customers
Though I still recommend Rockbox for it ;-)
That could still be an improvement though.
I mean look at this, it's like a Cartesian product of every possible combination: https://benjie-tech.en.alibaba.com/productgrouplist-80268160...
I think you're right, stock is around 40mhz. Right now it's running at 55mhz, that was the fastest stable speed we could squeeze out of it.
Well, it's not impossible that those are the same dies that start as 1 MB but get "halved" if one of the halves is defective, or for market segmentation reasons. And that the same happened to caches. But it does seem a bit unlikely.
Did you find any MaskROM/calibration data chunks? Or vendor tools that might be writing to them?
Chips from the same family would usually have differences in ROM, while the same die with changed chip ID would, within a revision, have the exact same ROM. And it's not that common for those kinds of chips to ever do a revision, let alone one that changes ROM. The die either works well enough or it doesn't.
If the USB IDs/serials that differ from chip to chip come from ROM and not something like registers or fuses, it's different dies.
Having a thing everyone can dump music and playlists they want to share is nice too.
Maybe these all-in-one devices weren't such a good idea.
The fact that we're relying on its tastes and its own limited and transient understandings of the systems it's working on is a sign of how primitive it still is. Hopefully the day is not too far off where it can explain to us every decision it made, which will empower us to prompt it with precision.
Source: I do exactly that.
More power to you if you can tolerate that but I couldn't. You can still save space with Opus but you need at least double that bitrate to match regular streaming (e.g. Spotify) quality.
I know, not fair to compare phones with the sansa clip, but I already carry my phone everywhere. So it is $50 for a dedicated music player vs the sunk cost of the phone and sd card.
So I still think they're going to optimize for the wrong thing and usability is going to be lost. Since Rockbox is made by - well - users it is more aligned with them (insert Stallman argument about FOSS here)
Maybe even something like a standard, embedded app store.