Iadvd / RetrocomputingZXSpectrum

Example applications to be used with the Android TCP/IP Virtual Joystick application
GNU General Public License v2.0
19 stars 3 forks source link

Warnings Undefined Global to compile #5

Closed Nextric closed 5 months ago

Nextric commented 10 months ago

I'm trying to follow the instructions to compile a lot, but there are several warnings in the music section that I think cause the screen to go black and not start once the tap is generated.

The output of the compilation and other operations is this: C:\mucho>sdasz80 -xlos -g crt0.rel crt0.s

C:\mucho>sdasz80 -xlos -g dzx7_standard.rel dzx7_standard.s

C:\mucho>sdcc -c -o app.rel app.c -mz80 --no-std-crt0 --opt-code-speed --Werror --peep-asm --peep-return

C:\mucho>rem 0xfe00 leaves 512 bytes for data & stack

C:\mucho>sdcc -mz80 --no-std-crt0 --opt-code-speed --nostdlib --code-loc 0xe006 --data-loc 0xfe00 -Wl -b_HEADER=0xe000 crt0.rel app.rel dzx7_standard.rel

?ASlink-Warning-Undefined Global '_musicstart_id' referenced by module 'app'

?ASlink-Warning-Undefined Global '_musicstart_is' referenced by module 'app'

?ASlink-Warning-Undefined Global '_musicstart_iu' referenced by module 'app'

?ASlink-Warning-Undefined Global '_musicend' referenced by module 'app'

C:\mucho>rem Dejamos una copia por si acaso

C:\mucho>copy crt0.ihx output_bck\ 1 archivo(s) copiado(s).

C:\mucho>rem compilamos la aventura

C:\mucho>mc aventura.txt aventura.dat MuCho compiler, by Jari Komppa http://iki.fi/sol/ Trainer data: 436 bytes |---------1---------2---------3---------4---------5---------6----| the door is not as opressive You are in a small silver key glitt ers room with The room. ---- --- -- - to it. With A glows red. O utside light. sign neon window, light switch next lights turned on, for turns. it felt darkness. Lightning flashes window. open. door, single has street. down blue. looking window dark lightni ng's have key. Press Get Unlock Open Close Exit through Wait whi le end. played left on. remembered turn off lights. Compressing.. start end zx7: 1015 -> 398 (39.212%), 0x5b0c

             dark.scr (09) zx7: 2593 ->  537 (20.710%), 0x5c9a
            light.scr (10) zx7: 2881 ->  703 (24.401%), 0x5eb3

Code "beepfx.ihx" not found C:\mucho>rem Generamos el Tap

C:\mucho>mackarel crt0.ihx aventura.tap aventura -nosprestore -noei -lowblock aventura.dat 0x5b00 -q -screencodec zx7 Mackarel 2.1 by Jari Komppa, http://iki.fi/sol

Iadvd commented 5 months ago

Nextric, please I apologize very much, for the delayed answer. I did not expect messages through GitHub, usually I do not have much time to review. Just in case I will explain in deep: these files are replacements for the MuCho suite (https://github.com/jarikomppa/speccy/tree/master/mucho), specifically it will create the file "crt0.ihx" when the m.bat file is executed. That file contains the calls to build the "crt0.ihx" file which is the "core" of the MuCho engine. So to be able to build that file properly you just need the app.c and music.h files, nothing else. They will be put into your local /mucho/ project and then you call the m.bat batch and it will create the "crt0.ihx" file. So if yo udownload the /mucho/ project of Jari Komppa's master "https://github.com/jarikomppa/speccy/tree/master/mucho" and you replace app.c and add music.h and call m.bat I expect it to work. I tried right now and in my case it worked fine. There is an important point: I have found serious problems with the latest version of the sdcc compiler, I just can compile the standard projects (I mean Jari Komppa's original project) using an older version of sdcc, it seems that the last ones have some bugs regarding the Spectrum assembly conversion. I am using for instance right now "SDCC : mcs51/z80/z180/r2k/r2ka/r3ka/sm83/tlcs90/ez80_z80/z80n/ds390/pic16/pic14/TININative/ds400/hc08/s08/stm8/pdk13/pdk14/pdk15/mos6502 4.2.0 #13081 (MINGW64) published under GNU General Public License (GPL) " and I am not having any warnings or problems at all. Your issue seems like a sdcc problem or that you do not have for instance the /mucho/ project and "https://github.com/jarikomppa/speccy/tree/master/tools" projects available. Probably is the version of SDCC as I see that no other library messages are appearing. If the issue is the SDCC version the solution is using an older version and removing the path of the version that does not work from the windows system path so it is not called when the m.bat runs. I hope it helps. Again my apologies for the late answer and best regards!

Nextric commented 5 months ago

Nothing, thank you very much for your answers. I do think it's because of the SDCC version too.

Iadvd commented 5 months ago

Cool, I will close the issue :) best regards and thanks for reviewing the code!

Iadvd commented 5 months ago

Closed: probably is the compiler version