Hello!!
Just trying supermodel again after a couple year hiatus as I am working on getting my emulator rig updated, super happy to see that there is still active development on it. Built from source for linux, and quickly figured out that I needed config files moved over to the right spot, but then I am getting an error for "unable to load bitmap crosshair texture". I see the crosshair bitmaps in the Assets folder, right where they are supposed to be. Am I missing something easy here?
Thanks so much!!
unable to load bitmap crosshair texture
Forum rules
Keep it classy!
Keep it classy!
- No ROM requests or links.
- Do not ask to be a play tester.
- Do not ask about release dates.
- No drama!
Re: unable to load bitmap crosshair texture
You need a folder called Assets
and the bitmap files should be in there
and the bitmap files should be in there
Re: unable to load bitmap crosshair texture
I had a couple more minutes tonight to play with this. Turns out that instead of just having the Assets folder in ~/supermodel where it was after compiling, the program was looking for it in ~/.local/share/supermodel. Figured this out by just running "supermodel" with no rom or other options from command line and looking for the error log file location, which happened to be in the same path, and I spotted the empty Assets folder there that the program had apparently created.
Copied the bmp's over into the new location, and it fired right up for a quick round of scud race (after doing the onetime setup of the game from Master to Single).![Very Happy :D](./images/smilies/icon_e_biggrin.gif)
Copied the bmp's over into the new location, and it fired right up for a quick round of scud race (after doing the onetime setup of the game from Master to Single).
![Very Happy :D](./images/smilies/icon_e_biggrin.gif)
Re: unable to load bitmap crosshair texture
I thought the Unix logic should look in the current working directory from where Supermodel is run first. It then goes through a series of increasingly bizarre paths. The contributor who added this logic says it is now customary for this to be the case on Unix systems but if you think the logic should be changed please let me know.gumbyaz wrote: ↑Tue Nov 28, 2023 2:47 am I had a couple more minutes tonight to play with this. Turns out that instead of just having the Assets folder in ~/supermodel where it was after compiling, the program was looking for it in ~/.local/share/supermodel. Figured this out by just running "supermodel" with no rom or other options from command line and looking for the error log file location, which happened to be in the same path, and I spotted the empty Assets folder there that the program had apparently created.
Copied the bmp's over into the new location, and it fired right up for a quick round of scud race (after doing the onetime setup of the game from Master to Single).![]()
Here is the code.
Re: unable to load bitmap crosshair texture
My knowledge of linux/unix standards is far from perfect, so the contributor that suggested this may be right. But to me it would seem easier to have it first look in the working folder from where the program was run? I am probably in the wrong in that I just left the executable in the spot that it was made in, and did not move it somewhere else in the /bin or /usr structures, which could be part of the issue?
My two cents: I think that as long as you are consistent with its location, all it might need is a quick comment in the readme to instruct first timers where to put it?
My two cents: I think that as long as you are consistent with its location, all it might need is a quick comment in the readme to instruct first timers where to put it?
Re: unable to load bitmap crosshair texture
There should be some logic in there so supermodel doesn't fall over if these bitmaps don't exist. Most people don't care to use them. This issue is going to keep coming up I know it.
Re: unable to load bitmap crosshair texture
Where did you run it from and what did that folder structure look like? I thought that it would prefer to use the current working directory. I believe it checks for the Config/ subdirectory existing first.gumbyaz wrote: ↑Tue Nov 28, 2023 3:09 am My knowledge of linux/unix standards is far from perfect, so the contributor that suggested this may be right. But to me it would seem easier to have it first look in the working folder from where the program was run? I am probably in the wrong in that I just left the executable in the spot that it was made in, and did not move it somewhere else in the /bin or /usr structures, which could be part of the issue?
My two cents: I think that as long as you are consistent with its location, all it might need is a quick comment in the readme to instruct first timers where to put it?
I agree there should be logic to prevent missing assets from knocking Supermodel over.
Re: unable to load bitmap crosshair texture
After downloading the repository and extracting it, I just moved the whole folder into the highest level of my home folder, so there was a folder sitting there as ~/Supermodel with all of the repository folders/files in it. I made the executable there, so it ended up as ~/Supermodel/bin/supermodel. I left it there and have been running it from there.
So initially, the assets folder containing the bitmaps was just located at ~/Supermodel/Assets since this is where it sits in the top of the repository. But the program could not find it here at startup and would exit with the "unable to load bitmap crosshair texture" error.
While I was trying this, it looks like the program created its own assets folder at ~/.local/share/supermodel/Assets, but this folder was empty. Copying the bitmaps there got it running.
I have near zero programming skills (it has been a long time since the Pascal programming class that they made us non-computer science engineers take back in the early 90s), but from scanning the code you sent last night I think I can understand where it would have created this folder (~.local/share/supermodel/Assets), but the gap seems to be that there is nothing in place to drop the files in there if and only if they aren't found in that folder already? I think that mame behaves like this for the mame.ini file - if it finds it where it expects it, then it does nothing - but if it doesn't find it then I think it creates the mame.ini file from its default copy.
So initially, the assets folder containing the bitmaps was just located at ~/Supermodel/Assets since this is where it sits in the top of the repository. But the program could not find it here at startup and would exit with the "unable to load bitmap crosshair texture" error.
While I was trying this, it looks like the program created its own assets folder at ~/.local/share/supermodel/Assets, but this folder was empty. Copying the bitmaps there got it running.
I have near zero programming skills (it has been a long time since the Pascal programming class that they made us non-computer science engineers take back in the early 90s), but from scanning the code you sent last night I think I can understand where it would have created this folder (~.local/share/supermodel/Assets), but the gap seems to be that there is nothing in place to drop the files in there if and only if they aren't found in that folder already? I think that mame behaves like this for the mame.ini file - if it finds it where it expects it, then it does nothing - but if it doesn't find it then I think it creates the mame.ini file from its default copy.
Re: unable to load bitmap crosshair texture
Where did you run it from? If you ran it from ~/Supermodel like this: bin/supermodel
Then it should use ~/Supermodel.
Then it should use ~/Supermodel.
Re: unable to load bitmap crosshair texture
No, my command prompt has been at home folder level, and running the executable by typing in its full path:
/home/arcade/Supermodel/bin/supermodel
Would that change the behavior somehow?
/home/arcade/Supermodel/bin/supermodel
Would that change the behavior somehow?