Murcho Posted February 7, 2015 Share Posted February 7, 2015 Hi everyone, After discovering 3 of our Atari Lynx machines at my parents place recently, I decided to give Lynx programming a go, and I've been working through the excellent series at https://atarilynxdeveloper.wordpress.com/series/atarilynxprogrammingtutorial/ I've set up using Ubuntu instead of Windows (I was having all sorts of problems getting started under Windows) and so I've found the modified source for sprpck here http://atariage.com/forums/topic/166552-lynx-sprite-packing-tool/?p=2080209 and got that compiling under Ubuntu. I've got my Makefile set up to try and compile the bmp file, but I'm getting a couple of issues. First is complaining about RLE-bitmaps not being supported. I've tried saving out of several different programs, and I managed to save out of one (I can't even remember which one now), which led to the second problem. When I use the BMP that doesn't complain about RLE, I get the error : make: *** [robot.o] Segmentation fault (core dumped) So after banging my head for several hours I'm caving in and asking for help. 1. What programs do you use to save out a bitmap files compatible with sprpck? 2. Any ideas why I would be getting this Segmentation fault? Thanks for the help. Quote Link to comment Share on other sites More sharing options...
sage Posted February 8, 2015 Share Posted February 8, 2015 Hi, 1) sprpck does not support all types of bmp. i normally use gimp to save them as 24bit images. that works. 2) there are several modified sprpck sources available. please tell us where you got it. 3) it looks like you are using cc65 and the sprpck as part of a Makefile chain. Please show the Makefile. 4) run make with the follow additional parameters "--debug=j" to see what is actually called. 5) you might want to run sprpck from command line directly to see if it a sproblem of sprpck or your Makefile Quote Link to comment Share on other sites More sharing options...
obschan Posted February 9, 2015 Share Posted February 9, 2015 (edited) If you're on a 64bit linux you may want to check and modify the definition of the bmp header, it should fix you RLE problem : https://bitbucket.org/wookie/sprpck/src/0d3fbe22dccb3b31b1efbac76143a4ecadab2304/bmp.h?at=default And increase the malloc line 361: https://bitbucket.org/wookie/sprpck/src/0d3fbe22dccb3b31b1efbac76143a4ecadab2304/sprpck.c?at=default Edited February 9, 2015 by obschan Quote Link to comment Share on other sites More sharing options...
Murcho Posted February 20, 2015 Author Share Posted February 20, 2015 Hi guys, Sorry I was away on holidays so only just got back to this. So a combination of your suggestions led me to a solution so thanks to both! For anyone else coming across this problem, it was a 64 bit OS problem. I was running all of this under Ubuntu 64 bit 14.04. Running sprpck with the -v option printed out all the info for the BMP data, which spat out some enormous numbers that seemed very wrong, which pointed to incorrect data types. At the top of bmp.h are the defines for data types : #define WORD unsigned short #define DWORD unsigned long #define LONG long which map to 32 bit data types. To get sprpck working under 64 bit OS (and this might be different per OS, check here: http://www.unix.org/whitepapers/64bit.html for the different possible types), I had to change the defines to : #define WORD unsigned short #define DWORD unsigned int #define LONG int This fixed my problems. Thanks again to @sage and @obschan for the help! 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.