The problem looks like the one I found in github https://github.com/z88dk/z88dk/issues/1103 but I use sccz80 and not the newlib. (sorry I don't use github yet, so I'm posting it here.)
Code: Select all
#include <input.h>
#include <spectrum.h>
unsigned char joys;
void *joyfunc;
struct in_UDK joykeys;
void setupkeyboard()
{
joykeys.fire = in_LookupKey(' ');
joykeys.left = in_LookupKey('o');
joykeys.right = in_LookupKey('p');
joykeys.up = in_LookupKey('q');
joykeys.down = in_LookupKey('a');
joyfunc = in_JoyKeyboard;
}
unsigned char *screen = 16384;
main()
{
joys = 0;
setupkeyboard();
while (1)
{
joys = (joyfunc) (&joykeys);
*(screen) = joys;
}
return 0;
}
Code: Select all
C:\z88dk\SPECJOY>zcc +zx -vn -startup=31 a2.c -o a2b -create-app
a2.c:26:21: warning: Calling via non-function pointer [-Wincompatible-pointer-types]
a2.c:26:30: warning: Assigning from a void expression [-Wvoid]
Is there something I can do to make it working again? I don't mind rewriting code, but I'd like something that can work now, and perhaps even for all the different configurations (zsdcc, newlib, oldlib, sccz80). (I don't want to write 4 tutorials, for example.)