hopper , hops silently on the desktop
Terry Swanborough (61) 152 posts |
By avoiding real work again! I have managed to get hopper running on the desktop It seems to work quite well on the systems I have here Titanium,PI400 and Iyonix(fullscreen) Some of the changes I have made:- Fixed Bug: where moving frog quickly up / down and pressing left and right caused frog Choices window opens above DeskHop Icon (it was opening to the far left of the screen) removed graphics update setting on the choices… / advanced iconbar menu this did not work well when set to slower. This has been replaced by Graphics screen size with the options of 1:1 1.5:1 and fullscreen options. (the fullscreen option uses Mode28 and single tasks). increased speed of some graphics. Most of the changes I have made are in the graphics.c file. Music Problems? Hopper uses the QTMtracker module for its music and sound effects, this aapears to work fine If I use the following :- const char* command=“*QTMLoad <Hopper$Dir>.Music.InGame”; This works fine in both the desktop and in single tasking? The games uses its own buffer to hold the music and then gets QTM to play the music from this you can try the following:- Set the game to run in the DESKTOP, MAKE SURE NOTHING IMPORTTANT is running Has anyone got any ideas as to why it crashes ? I have made no changes to the music playing within Hopper and it seems strange that the same Any of you clever people out there got any ideas?. I have left the makefile and the source in the download you can build the game but will need a you can download from:- Let me know if it works OK and any ideas for the music problem?. |
Julie Stamp (8365) 474 posts |
What you say sounds about right. If you’ve got the music in your app slot, then Wimp_Poll will whisk it away and it won’t be there when QTM comes to read it (I guess QTM is running on a timer interrupt). Will it be ok to do your *QTMLoad solution? If not you could move the buffer for the tune into a dynamic area or RMA block. |
Terry Swanborough (61) 152 posts |
I could use the QTMload solution for playing the music but I don’t think there is a similar type of command for playing samples I’m not that familiar with QTM so I’ll have a closer look but the sound effects are currently played in a similar way? In the past I have used flexlib to allocate memory, I’ll have a look at the dynamic memory allocation, is there a direct way of achieving this? Having never had a.need to use dynamic memory areas in the past. Thanks for the reply and the information I hope the game runs oK apart from the lack of music I had to make quite a few changes to convince hopper to play nice in the desktop environment. |
Charles Ferguson (8243) 427 posts |
From the documentation: ---------------------------------+------------------------------------------ Registers on entry to QTM_Load | Meaning ---------------------------------+------------------------------------------ R0 = pointer to filename | Depending on the value in R1, QTM will R1 = 0 to load to QTM's memory | either load the specified song file into = >0 to load to that address | QTM's own memory (R1=0), or to the | memory address given in R1 (R1<>0). ---------------------------------+------------------------------------------ Supply R1 with 0 to load into RMA, not into application space. |
Terry Swanborough (61) 152 posts |
The playing of the music is not a problem I can use QTM_Load as you say. The game uses QTM_PlayRawSample to play the sound effects I can see no way so far of loading the samples into the QTM memory. I thought QTM_RegisterSample might be what I was looking for but I believe it only registers the sample so it can be played with QTM_PlaySample. I don’t think I can load the samples into QTM but I willing to be proved wrong. |
Charles Ferguson (8243) 427 posts |
Just use the RMA or a dynamic area then, as Julie Stamp suggested. Data used in interrupts cannot live in the application space. |
Julie Stamp (8365) 474 posts |
I think the simplest way to get it going is
You might find that there isn’t a free, in which case you’ll have to put it in yourself somewhere during the exit code. You can’t be lazy with RMA blocks because the OS doesn’t know that they’re yours, so can’t throw them away when you quit. |
Terry Swanborough (61) 152 posts |
Julie thanks for taking the time to reply I have changed the allocation for the music file to use osmodule_alloc and now I have sound, once I have tweaked the program and tested I will release a new version. I probably would have found osmodule_alloc in the end after some reading but as my day job involves many many… hours of reading semiconductor data sheets I am grateful for the help. Many thanks again. |
Terry Swanborough (61) 152 posts |
I have uploaded a new version complete with sounds download from :- |
Julie Stamp (8365) 474 posts |
I have frogs on my desktop :-) It works best if you go into Choices > Misc. and select Auto-repeat. Running on RPCemu, it does leave little traces of the cars as they move along if you’re in a big screen mode. Another thing is that if you change mode then the window can end up smaller than the game screen, without a way to get it back to normal. |
Terry Swanborough (61) 152 posts |
I have made an adjustment to the program let me know if it cures the traces that the cars leave behind. The game timing relies on the game being polled at 100Hz this almost always happens in single tasking mode but in the desktop you can get the case where the poll is delayed, hopper increases the distance the cars move so that the game appears to continue to run at the same speed, I am limiting how big a jump this can be, a compromise but I am trying not to rewrite the whole game :-) I cannot get the window problem to occur here I am running on a titanium in 1920 × 1080 and can move between modes without any problems? I have tried 800,600 1280,1024, I could always shut the main window when a mode change happens? Anyway when you have the time download and see if the cars movement has improved. |
Julie Stamp (8365) 474 posts |
Yes they move more cleanly now. |
Terry Swanborough (61) 152 posts |
Thanks for the feedback, good to know it improved the graphics. |