Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NABULIB does not work with latest nightly (recomended) z88dk #9

Open
bocianu opened this issue Oct 7, 2023 · 6 comments
Open

NABULIB does not work with latest nightly (recomended) z88dk #9

bocianu opened this issue Oct 7, 2023 · 6 comments

Comments

@bocianu
Copy link

bocianu commented Oct 7, 2023

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 bocianu changed the title NABULIB does not work with latest nightly (reccomended) z88dk NABULIB does not work with latest nightly (recomended) z88dk Oct 7, 2023
@linuxplayground
Copy link

+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
Copy link

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.

@agmsmith
Copy link

NABU-LIB seems to be working now with the current Z88DK and related SDCC compiler.

@jefferoonie
Copy link

jefferoonie commented Feb 19, 2025

I get the same results as @bocianu, but I see @agmsmith reports that it is working.

I'm trying to compile on Linux, so maybe I built z88dk from the wrong source. When I get back home, I will have to pull up the versions that I am using.

@agmsmith
Copy link

Which reminds me that I should get the latest Z88DK and compile it for Linux. Have a look at my blog at https://web.ncf.ca/au829/WeekendReports/20240207/NthPongWarsBlog.html for the steps I went through to get the build environment working.

By the way, I have a hacked up NABU-LIB in GitHub to remove a lot of the warning messages from missing void function argument declarations (look in the NthPongCustomisations branch, that's the change in the December 28th 2025 commits, https://github.com/agmsmith/NABU-LIB/tree/NthPongCustomisations). I've since hacked it up more for better missed frame detection (use a counter, not a boolean) and freeing up 2K of space (no full screen 80 column text buffer, redundant when using CP/M).

@jefferoonie
Copy link

jefferoonie commented Feb 20, 2025

Thank you for that information. I pulled down your fork. The missing prototype errors went away.
I'll probably mess around with it in a few weeks.

I also stumbled on some messages from you on the nabu.ca forums, on this very topic. I'll look through that thread when I return.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants