Thomas Olsson's MkSprite and SFMerge now available
Charles Ferguson (8243) 427 posts |
After looking around for sources, Thomas Olsson has kindly allowed me to publish the sources for his mksprite and sfmerge, together with 32bit versions of these tools. This code had been lost, but Thomas found that a copy had been sent to Will Blatchley, who generously found the old code and made it available! The source can be found at: https://github.com/gerph/thomasolsson-mksprite Releases can be found on the Releases page at: https://github.com/gerph/thomasolsson-mksprite/releases Thomas’s website with his other software can be found here: |
Chris Dewhurst (1709) 167 posts |
I’m getting the following errors when running the ‘test’ file
Running on Raspberry Pi and also tried on RPCEmu. Anyone know what’s wrong? thanks |
Rick Murray (539) 13850 posts |
How are you doing it? If via an Obey file, maybe it needs a larger WimpSlot? |
Chris Dewhurst (1709) 167 posts |
OK so there were no instructions with MkSprite so I had to rub the crystal ball and came up with the following: In the download MkSprite-1/10/zip there is (among other files) a directory called Library. I copied the two files MkSprite and SFMerge to !Boot.Library. Also inside MkSprite-1/10/zip there is a directory called Examples, and inside that is an obeyfile called test. When that is double clicked it gives the errors above. Dragging the ‘Next’ slider in the Tasks window to the maximum it can go (here it’s 28640K) doesn’t cure it, is that what you mean by setting a larger WimpSlot or something else? thanks |
nemo (145) 2554 posts |
A common fault with old code is mistaking too much memory for too little memory. |
Paolo Fabio Zaino (28) 1882 posts |
@ Charles Thanks, I have tried this and I can confirm there seems to be some bug when running it on RO 5 (I haven’t tested it yet on 26bit RO releases). Also, when trying to build the sources there are a number of problems: 1) Your sources comes with the MakeFile (MakefileOriginal) still with Dynamic Dependecies from yoru own builds, these should be cleaned up and test the build from complete clean in order to avoid Norcroft to play funny tricks. These are causing the build to fail on RO 5 (can’t find C:h.SWINames ) 2) I have cleaned them manually and the build still fails, this time with a bunch of warnings, plus quite a few errors, too many to reports here, but we can swithc to emails to list them all. Hope this helps, |
Charles Ferguson (8243) 427 posts |
Ta for the report. Please remember that reporting issues in the GitHub issues systems is far more reliable than anything in these forums. For a start, it reports the issues in the place where they are relevent, and – more usefully – it actually notifies you when there’s an issue. The sources is pretty much as supplied by Thomas, but made to work as a 32bit build. Warnings are as supplied. There should be no errors. The original makefiles are, again, as supplied. If they need stripping, feel free to raise a PR for that (Future note: I’ve done this now). I don’t use the original makefiles, as they were dependant on things that don’t exist, and are provided purely for curiousity. The report that came by email looks like you’ve not built the library that it uses, and that’s explictly what it’s telling you by saying that it cannot find tholib.h. Build the library and reference it in your makefile and it should build fine. I’ll have a look at the builds – it’s always possible that I’ve broken something in rebuilding them. |
Charles Ferguson (8243) 427 posts |
I can confirm that it doesn’t work in RISC OS 5 using the docker RPCEmu I use. The tidy_sprite calls aren’t that complicated, so it’s surprising. Given that we never change mode, the error ‘Not enough memory to change to this screen mode’ seems wrong. Might mean that it thinks the sprite area is too small. Investigating anyhow. |
Charles Ferguson (8243) 427 posts |
The code creates a sprite using a mode selector with size 36×36 using 16 colours, with the mode flags set to NColours = 128 (this is odd), XEigFactor = 1 and YEigFactor = 1. If the NColours value is reset to 15 (which is what it should be for a 16 colour mode), it works. Presumably this has been tightened up in RISC OS 5, but the error message hasn’t been made clear that the mode selector parameters were invalid, I guess. |
Paolo Fabio Zaino (28) 1882 posts |
I agree, thought you’d prefer on here, I too prefer GitHub, so will move every further chats to open issues on GitHub, thanks! :) |
Charles Ferguson (8243) 427 posts |
Code now fixed, and version 1.11 released. You can find updated versions available here: https://github.com/gerph/thomasolsson-mksprite/releases/tag/v1.11 |