Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
translations translations
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Thank You for your continued support and contributions!

+  Rockbox Technical Forums
|-+  Rockbox General
| |-+  Rockbox General Discussion
| | |-+  Rockbox simulator binaries for MacOS (ARM64)
« previous next »
  • Print
Pages: [1] 2

Author Topic: Rockbox simulator binaries for MacOS (ARM64)  (Read 7555 times)

Offline chris_s

  • Developer
  • Member
  • *
  • Posts: 299
Rockbox simulator binaries for MacOS (ARM64)
« on: August 18, 2023, 03:54:49 PM »
iPod4g, iPod video, and Fiio M3k simulator

Date: 2025-04-01
Build: e094c599fa (4.0)

Download

App has not been signed. Expect to see a warning message when trying to launch it for the first time!
See Apple's instructions on how to get past this.



If you encounter something unexpected, or would like to see other targets included in the app bundle, feel free to provide feedback.

Press Tab key to show/hide the background, or press F1 for help.
Pressing 0, 1, 2 or 3 adjusts zoom from 50 to 300%. Pressing 4 switches the scale quality from best (linear) to nearest pixel sampling.

At the bottom of this post, you can find instructions on how to compile a target yourself.
Hosted (i.e. Linux-based) targets – even their simulators – currently need Linux to compile.




Known issues
  • After waking your Mac from sleep, playback in the Simulator may not resume.  Quit and relaunch the app as a workaround
  • The Lua-based boomshine plugin ignores all input and will require force-quitting the simulator.
Notes
  • Simulator binaries and supporting files are wrapped in a self-contained bundle, whose main executable (rbsim) is not part of the official Rockbox code repository. It is a short custom shell script that can be read in any text editor to see what it's doing.

  • The simdisk (for an iPod video) is located at ~/Library/Application Support/Rockbox Simulator/ipodvideo

    A .rockbox folder containing system files for the selected target will be automatically copied there during app launch, unless files of the expected version already exists in the destination (files will be updated as necessary). Any themes that you may want to download and other changes to the installation go in that location as well.

    Don't directly modify the contents of Rockbox Simulator.app instead!

  • Command line output will not be visible if you're launching the app normally.
    In case you do want to see it:

    - Open the app bundle as a folder by right-clicking it and selecting Show Package Content.
    - Drag the icon for the executable file rbsim in the subfolder Contents/MacOS to a new Terminal window
    - Press Enter (with the Terminal window in the foreground) after, optionally, appending a target name to the command, separated from it with a space, such as ipodvideo, fiiom3k or ipod4g. Otherwise, the last-used will be picked or you'll be presented with a list of choices.

  • To navigate the iPod simulator using a keyboard without a numpad, :

    - MENU: Backspace or Escape
    - PLAY: Spacebar
    - SELECT: Enter
    - UP/DOWN/LEFT/RIGHT: Cursor keys, as usual
    - SELECT + PLAY: Space Bar + Enter, or F6 (used for WPS and File Browser Shortcut)

    When holding down the function key, a Mac's media keys (F7,F8,F9) can alternatively be used for LEFT/PLAY/RIGHT while the app is in the foreground.

    NB: I would recommend Bilgus's keyremap plugin if you prefer an experience closer to the original iPod's firmware where MENU instead of LEFT can be used to go up a menu level, which I find a lot more intuitive.



You can disable the background for all simulators by executing this command in Terminal (replace true with false to undo):
Code: [Select]
defaults write org.rockbox.sim nobackground true
When executing rbsim from the command line, parameters accepted by each one of the target binaries can be passed through to them:
Code: [Select]
/path/to/rbsim ipodvideo --nobackground --debugwps --zoom 2
Don't forget to include the name of a target as the parameter provided to rbsim in your command, such as ipodvideo before appending any other parameters.
To see a list of available parameters, execute
Code: [Select]
/path/to/rbsim ipodvideo --help
When launching the app, you're presented with a choice of simulators.  To prevent this list from showing and instead always open the last-used simulator, execute the following command in Terminal (replace true with false to undo):
Code: [Select]
defaults write org.rockbox.sim skiplist true




To compile a simulator yourself, follow these steps on macOS Sequoia

1) Install the package manager Homebrew and add it to your PATH (by following the provided instructions)

2) Install packages for sdl2 and the latest gcc by executing the following command
Code: [Select]
brew install sdl2 gcc
3) Check out the source code for Rockbox and prepare a sim folder for the Simulator
Code: [Select]
git clone git://git.rockbox.org/rockbox
cd rockbox
mkdir sim
cd sim

4) Run the configure script, enter a number for some target from the displayed list (such as 22 for iPod video), then press Enter, 's' and Enter again
Code: [Select]
../tools/configure
5) Build, install, and launch the simulator
Code: [Select]
make -j10 && make fullinstall && ./rockboxui
Done!

* icon.png (23.81 kB, 226x206 - viewed 633 times.)

* sim.png (182.56 kB, 438x358 - viewed 33 times.)
« Last Edit: April 01, 2025, 10:48:49 AM by chris_s »
Logged

Offline rockbox_dev123

  • Member
  • *
  • Posts: 160
Re: Rockbox simulator binaries for MacOS (ARM64)
« Reply #1 on: August 19, 2023, 04:35:24 PM »
Thank you very much for providing this.

I had previously tried to compile the simulator on my 13" M1 2020 and given up.

This should make any upcoming theming work much easier!
Logged

Offline chris_s

  • Developer
  • Member
  • *
  • Posts: 299
Re: Rockbox simulator binaries for MacOS (ARM64)
« Reply #2 on: August 22, 2023, 08:57:08 PM »
Good to hear there's other people interested in this. :)

A new, SDL2-based, version is now available for testing, by the way – the post above has been updated.
Logged

Offline chris_s

  • Developer
  • Member
  • *
  • Posts: 299
Re: Rockbox simulator binaries for MacOS (ARM64)
« Reply #3 on: August 24, 2023, 05:17:13 PM »
Uploaded version 1.2, see changelog above.
Logged

Offline Darthagnon

  • Member
  • *
  • Posts: 12
Re: Rockbox simulator binaries for MacOS (ARM64)
« Reply #4 on: August 26, 2023, 11:59:55 AM »
Anyone wondering whether there are Windows builds available, there are some outdated binaries available here: http://rasher.dk/rockbox/simulator/
Logged

Offline rockbox_dev123

  • Member
  • *
  • Posts: 160
Re: Rockbox simulator binaries for MacOS (ARM64)
« Reply #5 on: September 17, 2023, 09:09:23 AM »
I accidentally left my latest iPod classic on a train last week... RIP.

Oh well, an iPod should be treated as "cattle and not a pet" as the music is replaceable. I resurrected an iPod video from my parts bin.

While waiting for replacement parts (finally making the switch from mSATA to SDXC now that rockbox has matured to handle SD well) I setup another external HDD and began transcoding my FLAC library to ogg, rsyncing my MP3 files and reapplying ReplayGain to all of the set.

36 hours later and I'm done. I'm ready to sequentially transfer these "proxies" to an SD card without fragmentation!

I'm using the simulator now to initialize the database on this external disk. I actually very rarely ever use the database and prefer .m3u or file browsing, but I'm restless until I can get my new iPod working.

Thanks for the detailed instructions - I modified the rbsim shell script to set:
Quote
SIMDISKDEST="/Volumes/IPOD"

Next up is to get my fork compiling for ipodvideo instead of the ipod6g!

EDIT: Rough calculations show that by transcoding FLAC to ogg at ​112kbps I am getting an 87% reduction in disk usage.
« Last Edit: September 17, 2023, 09:18:36 AM by rockbox_dev123 »
Logged

Offline chris_s

  • Developer
  • Member
  • *
  • Posts: 299
Re: Rockbox simulator binaries for MacOS (ARM64)
« Reply #6 on: September 17, 2023, 11:15:06 AM »
Quote from: rockbox_dev123 on September 17, 2023, 09:09:23 AM
I accidentally left my latest iPod classic on a train last week... RIP.
sorry for your loss :(

Quote from: rockbox_dev123 on September 17, 2023, 09:09:23 AM
I'm using the simulator now to initialize the database on this external disk. I actually very rarely ever use the database and prefer .m3u or file browsing, but I'm restless until I can get my new iPod working.
One word of warning – after trying this myself - with regard to special characters used in filenames:

The simulator on MacOS seems to store filenames as decomposed Unicode in the database (even with a FAT filesystem underneath). When attempting to use that same database on device, it expects the precomposed form and thus won't find these files.

E.g. the letter é is represented as hexadecimal C3 A9 (letter e with acute accent)  for a database built on device, but as 65 CC 81 (letter e and combining acute accent) when built using the simulator.


I don't know and haven't looked into the reasons for that or how it can be fixed yet, but it should be added to the list of known issues.

NB: Same thing applies to the database tool compiled on MacOS
« Last Edit: September 17, 2023, 12:49:40 PM by chris_s »
Logged

Offline rockbox_dev123

  • Member
  • *
  • Posts: 160
Re: Rockbox simulator binaries for MacOS (ARM64)
« Reply #7 on: May 02, 2024, 06:44:16 PM »
Is there a way to simulate the lock/hold button in the ui simulator? I ended up having to take screenshots on real hardware and it was extremely frustrating compared to how great using the simulator is!
Logged

Offline chris_s

  • Developer
  • Member
  • *
  • Posts: 299
Re: Rockbox simulator binaries for MacOS (ARM64)
« Reply #8 on: May 06, 2024, 06:31:13 AM »
Quote from: rockbox_dev123 on May 02, 2024, 06:44:16 PM
Is there a way to simulate the lock/hold button in the ui simulator? I ended up having to take screenshots on real hardware and it was extremely frustrating compared to how great using the simulator is!
'h' should activate hold on the iPod simulator and Esc (or pressing the power button) locks the M3K sim.
Logged

Offline rockbox_dev123

  • Member
  • *
  • Posts: 160
Re: Rockbox simulator binaries for MacOS (ARM64)
« Reply #9 on: May 06, 2024, 04:04:10 PM »
Quote from: chris_s on May 06, 2024, 06:31:13 AM
Quote from: rockbox_dev123 on May 02, 2024, 06:44:16 PM
Is there a way to simulate the lock/hold button in the ui simulator? I ended up having to take screenshots on real hardware and it was extremely frustrating compared to how great using the simulator is!
'h' should activate hold on the iPod simulator and Esc (or pressing the power button) locks the M3K sim.

'h' worked perfectly, thanks.
Logged

Offline rockbox_dev123

  • Member
  • *
  • Posts: 160
Re: Rockbox simulator binaries for MacOS (ARM64)
« Reply #10 on: October 12, 2024, 04:19:47 PM »
Gerrit shows that only these changes remain unmerged or unresolved:
  • 5278 Make simulator compile on MacOS
  • 5279 Fix simulator crashing on MacOS
  • 5287 SDL2: Fix deadlock when changing sample rate

I'll try and get round to merging these locally and attempting to compile my own simulator builds soon and report back with a how-to.
Logged

Offline Dream1iner

  • Member
  • *
  • Posts: 3
Re: Rockbox simulator binaries for MacOS (ARM64)
« Reply #11 on: October 28, 2024, 10:26:51 AM »
Any chance to update rockbox version?
Thanks in advance.
Logged

Offline rockbox_dev123

  • Member
  • *
  • Posts: 160
Re: Rockbox simulator binaries for MacOS (ARM64)
« Reply #12 on: December 07, 2024, 02:55:17 PM »
Now that all of these patches have been merged I would appreciate any advice you can offer me on building the simulator.

If I do ../tools/configure --target=200 --type=n then the build fails because objcopy is missing. If I then install binutils with brew and add /opt/homebrew/Cellar/binutils/2.43.1/bin to my $PATH then there are multiple linker fails along the lines of "archive member '/' not a mach-o file in '/rockbox/build/lib/libtlsf.a';".

If I do ../tools/configure --target=200 --type=s then I get errors that indicate I am missing the SDL development packages e.g. "error: 'SDL_BUTTON_WHEELDOWN' undeclared (first use in this function)" etc.

I'm using rockbox as a means to slowly teach myself more about C.
Logged

Offline chris_s

  • Developer
  • Member
  • *
  • Posts: 299
Re: Rockbox simulator binaries for MacOS (ARM64)
« Reply #13 on: December 07, 2024, 03:18:35 PM »
For the SDL app (target 200) you need llvm-objcopy on the Mac (using type=n), i.e. install llvm using brew, then symlink the installed llvm-objcopy to /usr/local/bin/objcopy.

After that it looks like you still have to comment out the debugf line in tree_voice_cb (apps/tree.c) - not sure right now what the deal is there, that seems... new. Disregard - my mistake

SDL_BUTTON_WHEELDOWN doesn't exist anymore in SDL2, so that may be a remnant that has been overlooked so far and still needs to be removed.... The SDL app, I don't think is supposed to be compiled as a simulator though (doesn't work on Linux either).
« Last Edit: December 07, 2024, 03:37:06 PM by chris_s »
Logged

Offline rockbox_dev123

  • Member
  • *
  • Posts: 160
Re: Rockbox simulator binaries for MacOS (ARM64)
« Reply #14 on: December 07, 2024, 03:41:17 PM »
Thanks! It has been a very long time since I last compiled a simulator on Linux so I had forgotten how the simulators are intended to be used. There is a simulator for each real hardware target. With the latest master I was able to do ../tools/configure --target=ipod6g --type=s and compile successfully on macOS M1!

Logged

  • Print
Pages: [1] 2
« previous next »
+  Rockbox Technical Forums
|-+  Rockbox General
| |-+  Rockbox General Discussion
| | |-+  Rockbox simulator binaries for MacOS (ARM64)
 

  • SMF 2.0.19 | SMF © 2021, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.169 seconds with 22 queries.