digress Posted December 22, 2015 Share Posted December 22, 2015 The spinners are disabled in the coleco libraries I've been using. Anyone have a c language solution for how to access this. Specifically I was looking to add steering wheel support to my tank game or could even consider the roller controller. for that matter the superaction buttons 3&4 are also not accessable. I'm a strict c language or(basic) programmer so an assembly language solution won't work for me unless it's a cut and paste insert to inline c code. I did find this http://www.danielvik.com/2015/01/colecovision-driving-module.html but it seems to be accessing a different library that I don't have. Specifically the readIoPort function Quote Link to comment Share on other sites More sharing options...
Pixelboy Posted December 22, 2015 Share Posted December 22, 2015 There's a library folder called lib4k in the Coleco dev package, and you need to use the alternate version called lib4ksa ("sa" stands for Super Action). There's a batch file called patchsdccsa.bat which seems to do the compile+installation job, but I have to warn you: My SDCC setup (which I'm using to compile my own CV games) doesn't contain either the lib4k or lib4ksa libraries in the "include" sub-folder, so you better investigate this further and get a second opinion before compiling stuff you may not actually need. That's the best I can do to help, I'm afraid. Quote Link to comment Share on other sites More sharing options...
digress Posted December 22, 2015 Author Share Posted December 22, 2015 Thanks. I'm aware of this alt library but when compiled doesn't seem to work any differently than the lib4k library . I will give it another try but I haven't gotten it to do anything different yet. It has definitions for the SA 3rd & 4th buttons but when checked it doesn't respond with the appropriate action(does nothing). He did state the spinners were not yet working . There's a library folder called lib4k in the Coleco dev package, and you need to use the alternate version called lib4ksa ("sa" stands for Super Action). There's a batch file called patchsdccsa.bat which seems to do the compile+installation job, but I have to warn you: My SDCC setup (which I'm using to compile my own CV games) doesn't contain either the lib4k or lib4ksa libraries in the "include" sub-folder, so you better investigate this further and get a second opinion before compiling stuff you may not actually need.That's the best I can do to help, I'm afraid. Quote Link to comment Share on other sites More sharing options...
youki Posted December 23, 2015 Share Posted December 23, 2015 I did not try yet the libsa. But when you look in the coleco.h file , you can find that : /* Enable SPINNER */void enable_spinner(void);/* Disable SPINNER */void disable_spinner(void);/* Rest Spinner 1 : Should use simply spinner_1 = 0; instead */void reset_spinner_1(void);/* Rest Spinner 2 : Should use simply spinner_2 = 0; instead */void reset_spinner_2(void);/* Rest Spinners : Should use simply spinner_1 = spinner_2 = 0; instead */void reset_spinners(void); Did you try to call enable_spinner? Then Read spinner_1 ? Quote Link to comment Share on other sites More sharing options...
youki Posted December 23, 2015 Share Posted December 23, 2015 I just look at Daniel Vik 's page. At the end there is a sample code to download. Inside the zip , there is 2 files : input.c and input.h . I think if you had them to your project , you could be able to read the spinner as well. Quote Link to comment Share on other sites More sharing options...
digress Posted December 23, 2015 Author Share Posted December 23, 2015 I overlooked the zip file. I'll try that now. Thanks. This is assembler so I'm not quite sure what to do with it. as far as the lib4ksa though it didn't complain about the routines but rather the globals.I'll look into it some more I tried the spinner_enabled it the result is not finding them though they are in the header file: ?ASlink-Warning-Undefined Global 'spinner_enabled' referenced by module 'nmi' ?ASlink-Warning-Undefined Global '_spinner_1' referenced by module 'main' ?ASlink-Warning-Undefined Global '_spinner_1' referenced by module 'nmi' ?ASlink-Warning-Undefined Global '_spinner_2' referenced by module 'nmi' Edit. Seems to be my crtcv.s. AKA crt0.s Tracking it down. I was using a customized one due to megacart building. I just look at Daniel Vik 's page. At the end there is a sample code to download. Inside the zip , there is 2 files : input.c and input.h . I think if you had them to your project , you could be able to read the spinner as well. Quote Link to comment Share on other sites More sharing options...
youki Posted December 23, 2015 Share Posted December 23, 2015 This is assembler so I'm not quite sure what to do with it. in fact the .h and .c file are for Hightech C compiler (it was the original compiler used in the first dev kits from Daniel Bienvenue). The file need to be ported to SDCC format. For the asm part , may be it is enough to change the #asm and #endasm by __asm; and __endasm; Quote Link to comment Share on other sites More sharing options...
digress Posted December 23, 2015 Author Share Posted December 23, 2015 ok I got it working kind of. It was because I was using a modified crt & assembly program when I switched to megacart. When I went back to the default devkit the spinners worked and the 3rd & 4th buttons work. They worked well actually so the lib4ksa version works fine. Now I need to figure out how to get those functions to work within my megacart setup. Quote Link to comment Share on other sites More sharing options...
digress Posted December 24, 2015 Author Share Posted December 24, 2015 got it working completely now. Just had to go back to the original devkit and reconvert the crt file to the new project and I now have super action controller support & spinners working. 1 Quote Link to comment Share on other sites More sharing options...
Pixelboy Posted December 24, 2015 Share Posted December 24, 2015 got it working completely now. Just had to go back to the original devkit and reconvert the crt file to the new project and I now have super action controller support & spinners working. Great, good for you! Quote Link to comment Share on other sites More sharing options...
PkK Posted December 27, 2015 Share Posted December 27, 2015 libcv has support for spinners: http://colecovision.eu/ColecoVision/development/libcv.shtml Philipp Quote Link to comment Share on other sites More sharing options...
digress Posted December 27, 2015 Author Share Posted December 27, 2015 Thanks Phillip. I believe I am now using your libcv and the spinners are working great. I got the steering wheel working nicely once I figured out the best way to go about it. Now I just need to track down some video corruption happening occasionally but unrelated to the spinners. libcv has support for spinners: http://colecovision.eu/ColecoVision/development/libcv.shtml Philipp 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.