NABU-LIB icon indicating copy to clipboard operation
NABU-LIB copied to clipboard

NABULIB does not work with latest nightly (recomended) z88dk

Open bocianu opened this issue 2 years ago • 6 comments

Hello World C example does not compile. Skeleton project also fails to compile.

image

I have to download z88dk nightly version from may 2023 to be able to compile examples.

bocianu avatar Oct 07 '23 01:10 bocianu

+1 here.
I am just encountering the same issue. Can't compile my games. I have yet to figure out what's changed though.

linuxplayground avatar Dec 23 '23 19:12 linuxplayground

Right. I don't know WHY This fixes it, but it _SEEMS to work. Maybe you can test on your end too.

in NABU-LIB.C, change the lines where it looks like ld (INTERUPT_VECTOR_MAP_ADDRESS + ?),hl

I don't think SDCC likes it when we do the addition inside the expression. I tried hardcoding the actual address, and it started compiling ok.

INTERUPT_VECTOR_MAP_ADDRESS is defined as 0xFF00 in NABU-LIB.h

So I just searched for each occurrence of that variable in NABU-LIB.c and changed it to the hardcoded result of whatever expression was being used.

OLD:
ld (INTERUPT_VECTOR_MAP_ADDRESS + 6), hl;

NEW:
ld (0xFF06),hl

@DJSures I know it's been a while since you looked at NABU stuff, but this library does need a bit of TLC.

All the function declarations that don't contain any arguments should be declared thusly:

void myFunc(void) {
   // 
}

IE: void inside the paratheses.

This fixes the warnings about missing prototypes.

linuxplayground avatar Dec 23 '23 20:12 linuxplayground