mrneo240 / sm64-port

A port of https://www.github.com/n64decomp/sm64 for modern devices.
https://discord.gg/7bcNTPK
60 stars 8 forks source link

Please, rectify the guide for Dreamcast Building #19

Open Special-Niewbie opened 3 years ago

Special-Niewbie commented 3 years ago

Hi everyone, if you are on Windows and you meet some difficulties on building or you come from other Console Enviroments as me.... Please, keep in mind that:

1) You need the nice kos_setup_script.sh to build up the Dreamcast Enviroment waiting awhile and once the bash will finish to build up all the enviroment; STILL NOT done to build up this project yet. Below I'm continue to explain you why.

2) Once everything it's done from the first point, you have to copy the file environ.sh located into your MSYS/Mingw - \opt\toolchains\dc\kos folder, and copy it into the sm64-port folder project.

3) Once pasted the environ.sh file you can build this project only with Mingw32 (Mingw64 will gives you the errors), so open Mingw32 and run the environ.sh by writing source environ.sh; then the code line will go just on a new line. You have to do this becase the projects need everytime the PATH Enviroment to be pointent for each project into them folders. Oderwise you will face differetnt strange errors because the project it doesn't have the PATH settled from the Variable Enviroment of Windows (for me it's new this Enviroment and I don't know if I need to do Manually for each PATH, later I will check).

4) As wrote in main page you can make the Dreamcast .bin file by esecuting like that make TARGET_DC=1 scramble. As per my understanding you have to build two times because the Creator of the project, wrote this at the beginning: Fixed textures live in the psp/textures/ folder. copy these into textures/, overwrite the extracted ones, and rebuild

Hope can be helpful to whom would like to build up this project for Dreamcast.

Ha.... last thing and not for importance, @mrneo240 THANKS A LOT FOR YOUR NICE PROJECT ;)

T0biasCZe commented 3 years ago

You need the nice kos_setup_script.sh to build up the Dreamcast Enviroment

where get the kos setup script.sh ?

Special-Niewbie commented 3 years ago

@T0biasCZe , here: https://dcemulation.org/index.php?title=File:Kos_setup_script.zip

T0biasCZe commented 3 years ago

@Special-Niewbie ok i have builded the KOS (manually since the script didnt work), copied environ_dreamcast.sh, ran source environ_dreamcast.sh, then typed "make --jobs 4 TARGET_DC=1 VERSION=eu scramble", and after all the textures are extracted it throws
Makefile:953: /Makefile.rules: No such file or directory
make: *** No rule to make target '/Makefile.rules'. Stop.

Special-Niewbie commented 3 years ago

I suggest you by the automated script....if I don't mistake was a mistake part of coding that I fixed, in the past, if you want I can pass to you....

Anyway this it's the annoying part of building because you will face two steps wit the error that to unlock you have to do this: Copy the file from /opt/toolchains/dc/kos/doc/environ.sh.sample and rename it in environ.sh and place into /opt/toolchains/dc/kos/environ.sh then start again the build process.....it will continue and then you should face again the similar with mk file or something like that. When you will face it , let me know....

T0biasCZe commented 3 years ago

Ok i started the build process of the KOS but i get error 2 and error 255 -_-

Special-Niewbie commented 3 years ago

For this reason would be great from your side to run the automated kos_setup_script.sh.

Last time I have changed these two lines into the kos_setup_script.sh. From:

echo "Downloading.."; sh download.sh
echo "Unpacking..";   sh unpack.sh

To:

echo "Downloading.."; ./download.sh
echo "Unpacking..";   ./unpack.sh

Try with the automated script in this way, will settle all the environment without to face some problem. And keep internet line free during the Kos installation.

Next time, post the full terminal error, OS where you are running if Linux or Windows instead of the just codes, please.

T0biasCZe commented 3 years ago

i tried the setup script again and it started and the KOS compiled fine this time. (idk why the script didnt want to start last time) but the game is compiling for while then it throws

build/eu_dc/src/game/spawn_sound.o build/eu_dc/src/game/thread6.o build/eu_dc/src/audio/data.o src/audio/effects.c: In function 'adsr_update': src/audio/effects.c:383:13: warning: empty declaration [enabled by default] src/audio/effects.c:393:13: warning: empty declaration [enabled by default] build/eu_dc/src/audio/effects.o src/audio/effects.c: In function 'adsr_update': src/audio/effects.c:383:13: warning: empty declaration [enabled by default] src/audio/effects.c:393:13: warning: empty declaration [enabled by default] build/eu_dc/src/audio/external.o build/eu_dc/src/audio/globals_start.o build/eu_dc/src/audio/heap.o build/eu_dc/src/audio/load.o src/audio/load.c:27:11: warning: 'pad' defined but not used [-Wunused-variable] build/eu_dc/src/audio/playback.o src/audio/port_eu.c: In function 'create_next_audio_buffer': src/audio/port_eu.c:149:9: warning: implicit declaration of function 'audio_reset_session' [-Wimplicit-function-declaration] build/eu_dc/src/audio/port_eu.o src/audio/port_eu.c: In function 'create_next_audio_buffer': src/audio/port_eu.c:149:9: warning: implicit declaration of function 'audio_reset_session' [-Wimplicit-function-declaration] src/audio/seqplayer.c:163:1: error: expected identifier or '(' before '}' token make: *** [Makefile:900: build/eu_dc/src/audio/seqplayer.o] Error 1 I have windows 10 with Mingw32

Special-Niewbie commented 3 years ago

Just then I tried to build and I can build quietly.

So you place the ROM into the folder right?! After that you opened Mingw32 and go into the sm64-port, and then on Mingw32 did you write: source /opt/toolchains/dc/kos/environ.sh and then write make TARGET_DC=1 scramble?

Edit = What I mentioned it's on Linux, but I builded even on Windows last time, try what i wrote just then if not follow what i wrote on first post. And for now don't try to add any mods like voices or characters , because first you have to test the base if it works.... Also I can see that you are tring to build the EU version, I'm European as well, but I suggest you to build the US version if you have, because SM64 EU and US on language side are the same and the US version has 30 FPS vs the PAL version with 25 FPS.

T0biasCZe commented 3 years ago

yes, thats exactly what i did I tried the US version, it compiled fine at the position where it threw error before but then it threw error at different place so i tried the Japanese version, and it threw error at the end again xD, so then i copied the JP error here and started again the US version again so i can copy the error here. But now the US version compiled fine... WTF

Special-Niewbie commented 3 years ago

These are the mysteries of our holy lord ......... Except the bugs at the beginning, from now on you should be fine with the environment, and what I can guess from your movements maybe some times when you build a project could be that keep in memory some error from the previous one and even if everything it's fine still gives you unreasonable errors. Or probably the building process was keeping in memory the US languages and when you went to build the JP version the Audio it doesn't match with the previous one and again gives you some unreasonable errors . The important that you solved

ianmicheal commented 2 years ago

$ make TARGET_DC=1 Makefile.split:152: build/us_dc/level_rules.mk: No such file or directory sh-elf-cpp -P -DVERSION_US -I . -o build/us_dc/level_rules.mk levels/level_rules.mk cc1.exe: fatal error: opening output file build/us_dc/level_rules.mk: No such file or directory compilation terminated. make: *** [build/us_dc/level_rules.mk] Error 1

I get this error ?

Special-Niewbie commented 2 years ago

$ make TARGET_DC=1 Makefile.split:152: build/us_dc/level_rules.mk: No such file or directory sh-elf-cpp -P -DVERSION_US -I . -o build/us_dc/level_rules.mk levels/level_rules.mk cc1.exe: fatal error: opening output file build/us_dc/level_rules.mk: No such file or directory compilation terminated. make: *** [build/us_dc/level_rules.mk] Error 1

I get this error ?

Hi @ianmicheal , I saw now your message, did you solved it? Otherwise i will try to replicate your error to understand what you are missing....

ianmicheal commented 2 years ago

$ make TARGET_DC=1 Makefile.split:152: build/us_dc/level_rules.mk: No such file or directory sh-elf-cpp -P -DVERSION_US -I . -o build/us_dc/level_rules.mk levels/level_rules.mk cc1.exe: fatal error: opening output file build/us_dc/level_rules.mk: No such file or directory compilation terminated. make: *** [build/us_dc/level_rules.mk] Error 1 I get this error ?

Hi @ianmicheal , I saw now your message, did you solved it? Otherwise i will try to replicate your error to understand what you are missing....

Thank you no i have not got any further i can build gldc aldc cmake is installed correct