FS#11205 - emuriver - emulator for iriver ifp-7xx

Attached to Project: Rockbox
Opened by Olle Bergkvist (ollebe) - Saturday, 17 April 2010, 02:15 GMT
Task Type Patches
Category Utils
Status Unconfirmed
Assigned To No-one
Operating System Another
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No


Emuriver is an emulator (not simulator) for iriver ifp-7xx series. It's part of the and has until now been hosted at the main author's (Tomek's) site It includes a tool to create flash images for use with the emulator, and a tool to mount such images and do basic file management on them.

This version is almost identical to the last version from Tomek's site, but I had to fix a few bugs to make it usable on my system. Changes are as follows:

flashimgtool.c: Outputs usage information on errors. (I didn't do this; I don't know where this code came from but it's useful.)

hardware.c: Bug: Arguments were missing in a function call which would sometimes cause segmentation faults, and (I don't know why or how) slow down the emulator.

main.c: Changed a default file name from prog_flash.bin to prog_flash.img (I didn't do this)

main.c: Bug: Added explicit return value to nonvoid function. The implicit return value was sometimes -1 which indicated an error so emuriver aborted.

make_flash_img.c: Optimizations: "if" replaced with "else if". (I didn't do this)

uicurses.c: Rename a variable into someting more unique. (I didn't do this)

The reason I'm submitting this patch is that I think the emulator could be useful as it is for those trying to build the ifp port from SVN, that it could (maybe) be worked on to support other players, and that my bugfixes should be included for those building emuriver.

There are a few issues:
The flashimgtool subdir in emuriver duplicates a few (three years old) files from RB, disk.c, fat.c, and some more.
You might not like the directory structure.
It uses an ancient version of autotools.
I haven't been able to create flash images that actually work with flashimgtool.
I haven't built the RB port for ifp yet, so I don't know if it will run in emuriver or not.

Yes I have discussed the patch in IRC.
This task depends upon

Comment by Olle Bergkvist (ollebe) - Saturday, 17 April 2010, 02:25 GMT
Maybe I did those 4 changes but just forgot about it during the 3 years that passed...
Comment by Olle Bergkvist (ollebe) - Monday, 19 April 2010, 16:46 GMT
It seems there's some serious bug that slows down the program extremely when compiled with certain GCCs and with optimization enabled. I propose working around this with

CFLAGS="-Wall -O0" ./configure --bla-bla-options