Error at file 'mathtest.c' line 29: symbol 'float' not defined
Error at file 'mathtest.c' line 31: symbol 'sin' not defined
Error at file '/home/build/z88dk/build/z88dk/libsrc/_DEVELOPMENT/stdlib/z80/__dtoa__.asm' line 48: symbol 'asm_fpclassify' not defined
Error at file '/home/build/z88dk/build/z88dk/libsrc/_DEVELOPMENT/stdlib/z80/__dtoa__.asm' line 73: symbol '__dtoa_base10' not defined
Error at file '/home/build/z88dk/build/z88dk/libsrc/_DEVELOPMENT/stdlib/z80/__dtoa__.asm' line 106: symbol '__dtoa_digits' not defined
Error at file '/home/build/z88dk/build/z88dk/libsrc/_DEVELOPMENT/stdlib/z80/__dtoa__.asm' line 140: symbol '__dtoa_digits' not defined
Error at file '/home/build/z88dk/build/z88dk/libsrc/_DEVELOPMENT/stdlib/z80/__dtoa_preamble.asm' line 54: symbol '__dtoa_sgnabs' not defined
Error at file '/home/build/z88dk/build/z88dk/libsrc/_DEVELOPMENT/stdlib/z80/__dtoa_print.asm' line 34: symbol '__stdio_printf_sign_0' not defined
Error at file '/home/build/z88dk/build/z88dk/libsrc/_DEVELOPMENT/stdlib/z80/__dtoe__.asm' line 47: symbol 'asm_fpclassify' not defined
Error at file '/home/build/z88dk/build/z88dk/libsrc/_DEVELOPMENT/stdlib/z80/__dtoe__.asm' line 72: symbol '__dtoa_base10' not defined
Error at file '/home/build/z88dk/build/z88dk/libsrc/_DEVELOPMENT/stdlib/z80/__dtoe__.asm' line 97: symbol '__dtoa_digits' not defined
Error at file '/home/build/z88dk/build/z88dk/libsrc/_DEVELOPMENT/stdlib/z80/__dtoe__.asm' line 105: symbol '__dtoa_digits' not defined
Error at file 'crt0_fp/fa.asm' line 12: symbol 'init_floatpack' not defined
13 errors occurred during assembly
Errors in source file C:\Misc\z88dk\lib\config\\..\..\\lib\target\zx81\classic\zx81_crt0.asm:
Error at file 'mathtest.c' line 29: symbol 'float' not defined
^ ----
Error at file 'mathtest.c' line 31: symbol 'sin' not defined
^ ---- 1 errors occurred during assembly
Error at file '/home/build/z88dk/build/z88dk/libsrc/_DEVELOPMENT/stdlib/z80/__dtoa__.asm' line 48: symbol 'asm_fpclassify' not defined
Error at file '/home/build/z88dk/build/z88dk/libsrc/_DEVELOPMENT/stdlib/z80/__dtoa__.asm' line 73: symbol '__dtoa_base10' not defined
Error at file '/home/build/z88dk/build/z88dk/libsrc/_DEVELOPMENT/stdlib/z80/__dtoa__.asm' line 106: symbol '__dtoa_digits' not defined
Error at file '/home/build/z88dk/build/z88dk/libsrc/_DEVELOPMENT/stdlib/z80/__dtoa__.asm' line 140: symbol '__dtoa_digits' not defined
Error at file '/home/build/z88dk/build/z88dk/libsrc/_DEVELOPMENT/stdlib/z80/__dtoa_preamble.asm' line 54: symbol '__dtoa_sgnabs' not defined
Error at file '/home/build/z88dk/build/z88dk/libsrc/_DEVELOPMENT/stdlib/z80/__dtoa_print.asm' line 34: symbol '__stdio_printf_sign_0' not defined
Error at file '/home/build/z88dk/build/z88dk/libsrc/_DEVELOPMENT/stdlib/z80/__dtoe__.asm' line 47: symbol 'asm_fpclassify' not defined
Error at file '/home/build/z88dk/build/z88dk/libsrc/_DEVELOPMENT/stdlib/z80/__dtoe__.asm' line 72: symbol '__dtoa_base10' not defined
Error at file '/home/build/z88dk/build/z88dk/libsrc/_DEVELOPMENT/stdlib/z80/__dtoe__.asm' line 97: symbol '__dtoa_digits' not defined
Error at file '/home/build/z88dk/build/z88dk/libsrc/_DEVELOPMENT/stdlib/z80/__dtoe__.asm' line 105: symbol '__dtoa_digits' not defined
Error at file 'crt0_fp/fa.asm' line 12: symbol 'init_floatpack' not defined
When I try to only assign a value to a float variable (with math.h included), I get the following compilation error:
Error at file 'crt0_fp/fa.asm' line 12: symbol 'init_floatpack' not defined
1 errors occurred during assembly
Errors in source file C:\Misc\z88dk\lib\config\\..\..\\lib\target\zx81\classic\zx81_crt0.asm:
Error at file 'crt0_fp/fa.asm' line 12: symbol 'init_floatpack' not defined
Obviously something is missing, but what?
Math.h includes float.h, so this one should already be there.
There is more than one float library so you have to specify which one you're using by linking to it on the command line. "-lm" will get the default choice.
For the zx81 in classic, I think "-lm" uses the rom float package (in which case the program will be smaller) or else it will be genmath.
With the -lm compile parameter added it works now, thanks.
I even had that parameter in some of my compile batch files for my H-Tron game, without knowing what it was for. I will better remove it because my game does not require any float variables.
I have been using z88dk for almost a year now, but I still haven't found out how to use a makefile. I have always compiled my programs using a batch file that sets the path and required variables and then calls zcc with appropriate parameters.
Now I would like to build the Pac-Man hardware sample: Use the Makefile provided in the {z88dk}/examples/pacman folder.
What exactly needs to be done to compile the program using that makefile?
If you follow those upto step 12 then you'll have a shell where you can cd into the pacman example directory and just type make and a ROM file will be generated.
Hmm, I followed the instructions (not sure if 11. and 12. need to done every time I restart git-bash), but Make gives me a "the system cannot find the file specified" error.
(the error message is in German because my Windows is set to that language)
I'm using Windows 10, UAC is disabled as far as possible (you can no longer turn it off entirely under Windows 10).
I also noticed that running git-bash.exe as an Administrator makes no difference than double-clicking it, I always see my user name at the git-bash prompt, and the make error is the same.
The git-bash problem has been solved now thanks to Dom's help. You need to make sure that z88dk is in your path so that you can run "zcc" from any directory within the git-bash console - before that does not work, make won't work either.
Another simple question (entirely different topic): we have the getmaxx() and getmaxy() functions to determine the graphics screen dimensions. But is it also possible to programatically determine the *text* screen dimensions?
That would of course be helpful for cross-developement.
I had a look at Fabrizio's Cross Chase source and I saw that he's also defining the screen size for each target manually (in display_target_settings.h).
1. The simplest Hello World program compiled for the ZX81 results in a 4K .p file. This makes it impossible to write anything for the unexpanded 1K ZX81. Is there maybe some option to create a size-optimized binary?
I remember that Turbo C for DOS had an "Optimize for Speed or Size" option, maybe there is something similar in z88dk?
2. When compiling for a 16K RAM WRX graphics ZX81, what is the maximum size that the .p file may have? I have noticed that smaller WRX-compiled programs work, but a 9K .p file does not - probably because WRX uses a great part of the available RAM for screen memory?
-Cz?collapses will create the .P file with a collapsed display - so 24 bytes rather than 768.
The last example doesn?t do the conversion from ascii to the zc81 character set - the conversion code takes up memory so it?s probably best not to do it on a 1k model.
There?s probably some more savings to be made in the crt file so if you?re still short a bit of pruning can be done.
It should be -Cz--collapsed (as I found out by trial and error).
With that, the fourth sample .p file fits into 1K RAM, but gives an out-of-sync broken screen. Probably some more tricks are required to display something on the screen.
But it seems that this is NOT a newbie topic. Maybe you can elaborate on that one day, describing the side-effects of each trick and how to overcome them.
the collapsed display has the only effect of reducing the binary size at rest. After having been loaded (saving a bit of time), the display will be restored at its original size, unless you have only 1k. It is not absolutely a beginner 's task to compile a program for 1 or 2 k of memory
RobertK wrote:It should be -Cz--collapsed (as I found out by trial and error).
Sorry - I think that was either an autocorrect mistake due to my thumb hitting the wrong virtual key. Glad you found it in the end though. Running appmake +zx81 (or your chosen port) will show all the valid options available.
Sorry for this newbie question, but how can I query the character code at a specific screen location in text mode (using the generic console)?
I.e. the text mode equivalent to point() in graphics mode.