Jump to content
IGNORED

spinners


digress

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 ?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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;

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...