Rockbox Technical Forums
Support and General Use => User Interface and Voice => Topic started by: Mmmm on September 16, 2005, 07:23:04 AM
-
I am able to compile the code but I dont know how to use the simulator. I assume that when compiling you have to choose a simulator build but what then? Are there any instructions about this? I couldn't find any on the WIKI.
-
Have you had a look at this page?
http://www.rockbox.org/docs/uisimulator.html
-
Aha.. thanks Tukoz the one place i didnt look was in the docs! ::)
So just to get this straight.... i need to
i) download the uisimulator folder using CVS
ii) compile as usual but choose simulator build
iii) instead of 'make zip' to create the zip file i type 'make install'
iv) fill up the subdirectory with music, jpgs cfg files etc
v) type rockboxui in the compiled directory
and i'm away... does this sound right?
-
Aha.. thanks Tukoz the one place i didnt look was in the docs! ::)
So just to get this straight.... i need to
i) download the uisimulator folder using CVS
ii) compile as usual but choose simulator build
iii) instead of 'make zip' to create the zip file i type 'make install'
iv) fill up the subdirectory with music, jpgs cfg files etc
v) type rockboxui in the compiled directory
and i'm away... does this sound right?
Yep, that's it - I've just tried it myself (it must be fairly easy then!) and it's fantastic to be able to see my WPS and fiddle without repeatedly connecting and disconnecting my iRiver!
-
Brilliant... I cant wait to get home and try it then... now for a bit of clock watching................
-
OK, I've tried it and it seems to be alright but it doesn't actually play the files, it just sits there at 0.00. Ffd and rwd work fine but it won't progress through the track on its own!
What have i done wrong? I chose win32 because i'm running windows, is that right?
???
-
I also selected Win32 for Windows, and likewise it doesn't actually play the track - I suspect it's something to do with the simulator not having the capacity to access your hardware. It shows Ffd and Rwd fine though, probably just simulating what would happen without actually playing it.
I must stress, all the above is a guess! Maybe someone with more in depth knowledge (perhaps Daniel Stenberg, I seem to remember him saying he wrote it - sorry if wrong) could explain what it actually does?
-
Yes, I wrote the initial (and most other) X11 parts of it. I also recently added the music playback abilities to the X11 (linux/cygwin) version. I don't run windows and I don't develop on windows so win32 things is generally beyond me.
If it doesn't play sound for you, then start figuring out why and fix it!
Things don't always fix themselves by magic you know.
-
I don't develop on windows so win32 things is generally beyond me.
oh...that's a shame.. :(
If it doesn't play sound for you, then start figuring out why and fix it!
Believe me, if its beyond you then I really dont have even the faintest inkling of a chance !;)
I don't suppose thare is any possible way of using the X11 parts on windows is there?
Now I just know that was a silly question! ;D
Maybe the time has come to dump windows! ;D
-
I also have a couple more questions....
Is it possible to simulate the hold button?
Is it possible to simulate plugging in the charger?
and finally how does it decide on the battery level and can I change it?
-
I don't run windows and I don't develop on windows so win32 things is generally beyond me.
You're not the only one. Count me in, too... :)
Is it possible to simulate the hold button?
I trust you are wondering about this for WPS purposes? If so, put your image in the "else" condition for the test then switch it into the "if" condition when you're happy.
Is it possible to simulate plugging in the charger?
I trust you are wondering about this for WPS purposes? If so, put your image in the "else" condition for the test then switch it into the "if" condition when you're happy.
and finally how does it decide on the battery level and can I change it?
It seems to be always on battery level 3. Change it? Patch the simulator code.
-
The Win32 simulator is capable of playing sound (though the support isn't complete, it should be at the same level as the X11 simulator), but it won't build with that support by default; you have to edit autoconf.h first.
Still, as long as the codecs are properly installed, it should "play", and not be stuck at 0:00, but it can take a little while for it to start.
-
Lear : are you saying that i have to edit autoconf.h first or that it should play if I wait a bit?
Do you know what I have to change in autoconf.h?
Kenshin: Thanks, that answers my questions. I suppose if it wasn't for WPS purposes I'd have to patch the sim code to get these things working would I?
-
If it doesn't play sound for you, then start figuring out why and fix it!
Things don't always fix themselves by magic you know.
I would if I could, believe me. The extent of my programming skills are limited VB. I was guessing that the playback capability wasn't there, not complaining it wasn't.
The Win32 simulator is capable of playing sound (though the support isn't complete, it should be at the same level as the X11 simulator), but it won't build with that support by default; you have to edit autoconf.h first.
That's interesting. Given my non existant programming, I'll wait until someone else pokes around then hopefully tells me how to do it. I certainly have the relevent codecs as sound (mp3/ogg etc) plays on my computer otherwise.
-
Lear : are you saying that i have to edit autoconf.h first or that it should play if I wait a bit?
It should play (i.e., not stay at 0:00) if you wait (not very long, a couple of seconds or so, IIRC). You need to edit autoconf.h to actually hear something.
Do you know what I have to change in autoconf.h?
#define ROCKBOX_HAS_SIMSOUND
It's there already though #undef:ed.
-
It should play (i.e., not stay at 0:00) if you wait (not very long, a couple of seconds or so, IIRC). You need to edit autoconf.h to actually hear something.
Hmmm, bizarre - mine just stays at 0:00 for however long I leave it (forgetting about hearing anything at the moment). It claims it is playing incidently, not paused. If I hold down right to fast forward, it skips through as normal, but when I let go just sits there at the time I skipped to without moving.
I'm not particularly bothered, as I just wanted it to preview my WPS which it does fine. Just a bit odd, that's all!
-
Mine's the same as yours Bigbambi. It just sits at 0.00 for however long it is left ???
#define ROCKBOX_HAS_SIMSOUND
It's there already though #undef:ed.
Thanks Lear, I'll give that a go although I suppose I wont know if it works seeing as it doesn't actually play!
EDIT : ok, i've changed this line to #define but it still doesn't play... as suspected... anyone any ideas?
I've tried ogg, mp3, flac and wav all with the same result.
-
AHA.......I have it..... well, actually Lear had it all along but I was just being too dozy to really know what he was saying! :-[ ::)
This is the Key
#define ROCKBOX_HAS_SIMSOUND
but you have to change this just before you compile..not after!!! its so obvious, of course it's source code, must be part of the makefile, you have to compile it or it won't do anything! I'm so stupid!
So after rbconf and creating the makefile, change this, then type make, make install and everything works beautifully. The lagging keys have even stopped lagging (I forgot to tell you that it seemed to be running very slow)!
;D ;D :D :) ;D :D :D...................... 8)
-
Good stuff. I'll give it a go forthwith
-
Is there some file i can change to include something like this so that #define ROCKBOX_HAS_SIMSOUND is the default setting for win32 simulator?
If simulator build and win32 is chosen,
create autoconf.h with
#define ROCKBOX_HAS_SIMSOUND
else
create autoconf.h with
#undef ROCKBOX_HAS_SIMSOUND
maybe something in the tools folder?
-
autoconf.h is created by the tools/configure script
I don't know why the win32 simulator defaults to no sound. Anyone?
-
Mainly because I haven't updated the configure script I guess. :)
-
It' a shameless hack i know but putting these two lines into tools/configure does the trick!
79Â if [ "$simver" = "win32" ]; then
80Â Â Â # win32 version
81Â Â Â Â GCCOPTS="$GCCOPTS -mno-cygwin -DNOCYGWIN"
82Â Â Â Â LDOPTS="-lgdi32 -luser32 -mno-cygwin"
+ 83Â Â use_simsound="#define ROCKBOX_HAS_SIMSOUND"
+ 84Â Â echo "Enabled PCM sound playback in simulator"
85Â Â else
I suppose there should really be a call to checksoundcard and then that should do the #define but it didn't seem to work, I assume this is because it doesn't do the checking properly on a windows system! Who knows? :D
-
Ive made a guide to installing the simulator which i've put at the bottom of the simple guide to compiling.
Just click on the green part of my sig to see it.
-
I just noticed that the UISim uses 99% of the CPU in windows.
At first I thought it might be cause I activated sound but now i compiled without sound and it still grabs the whole CPU even if i dont do anything and just let the UISim sit there.
Do any of you also have this problem?
Id like to fix it so if someone could help by pointing me in the right direction that would be great. Since I don't know my way around the RockBox firmware jet and ive not programmed in a long time.
Thanks :)
-
I did some more testing and it looks like my CPU problem has to do with the Iriver Sim. Im using the H120/140 version.
-
I'ver just had a look at it on my system in case it was a problem with g-funks only, but the iRiver H120/140 sim (the only one I've tried) sits at 99% CPU on mine too.
My system is an Athlon 2500+ with 1 GB of RAM, so clearly something is up!
-
Is it possible to simulate the hold button?
Sorry to resuscitate a near dead thread, but I don't suppose we could map this to the to the Scroll Lock, and just use the Scroll Lock LED on our keyboards as a hold indicator?
Edit: Through some very preliminary reading about SDL from Google, looks like the Scroll Lock key in particular may not support this, though Caps Lock and Num Lock will. Since for optimal use of some of the UISimulators (I'm personally more concerned with the gigabeat port), Num Lock should be on to allow use of the '5' key on the numpad, perhaps implement it where Hold is off when Num Lock is on. I know it's a little backwards, but we're just aspiring and off/on indicator.
-
Why not caps lock, exactly?
-
After discussing it in the IRC channel, it was suggested that Sims that have a hold button should have a hold indicator on their wps. I'm currently trying to implement it with Numpad7 and Numpad1 for DAP hold and remote hold, respectively, thereby also permitting it's use via the numpad since most of the Sim controls are through it.
Best reason why not to use caps lock, from personal experience is that I tend to multitask even when using the UISim, and if i turn caps lock on or off in another program, I can't easily predict the reaction to the UISim, and even if it is still okay, the point of the LED indicator becomes useless anyway.
-
Why not caps lock, exactly?
because some people (like me) change there caps lock key to be an additonal easy to reach ctrl-key.
-
Well, it's working, save one glitch. Since simulator hold status is set via a boolean variable, and not as a button in the regular sense of play, or menu, etc... it doesn't respond in one touch... it'll oscillate and you need to play with the key to get it to drop in or out of hold... at least I think that's the problem.
Hopefully somebody in the IRC channel can help me out on this and make it fit for prime time.
-
So I scrapped the remote hold. If really really necessary, almost verbatim code can be put in.
I was missing one line of code to make it work. It runs now. It'll be committed soon.
-
So now I've been pulled into the fold, asked to add support for the LCD remotes to the UISim (since they are shown). This likely won't be committed for a while though.
Remote hold works, but does anyone know a way to easily tell the difference of if a key input is from the remote or from the DAP? From what i've been told, in practical use, the remote hold only holds the remote, and the dap hold only holds the dap.
-
(button_get(false) & BUTTON_REMOTE) is true if the key is from the remote.
-
Thanks... encountered that in the IRC channel though already.
Next snag: what the iriver LCD remote buttons are assigned to (ie the 3 slider buttons are assigned to)