-
-
Notifications
You must be signed in to change notification settings - Fork 77
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
A possibility to rebuild tools #7
Comments
I am not the owner of tcc, i'm using the one shipped with snes-sdk. I will try to compile it or chat with mic_ who did that some time ago. |
Hi! I wonder if it is worth the effort porting the 816-tcc which is based on version 0.9.23 of tcc to the most recent version of tcc 0.9.27. Edit: Add link to source |
Hi, I think it will be useful to port tcc816 on the latest version of tcc :) I already compared tcc816 version with the official tcc and tcc 0.9.23 with 0.9.27 to see modifications (with winmerge software) but i don’t know th difficulty to adapt it. |
I also compared the versions and it seems to be quite a bit of work to port 816-tcc to 0.9.27. |
I saw that you used the tcc link from github. The first one was on google code (https://code.google.com/archive/p/snes-sdk/source/default/commits) and the latest commit was done on August, 2011. I don’t know if there are a gap. So it is a real challenge to port it, but it could be a big improvement for the snes dev community (pvsneslib and more). Are you interested? An other point is the version of wla embedded with with it (9.4). I thought it was the first thing to do (upgrade to 9.8) but i have some difficulties for asm part. |
I am interested in a nice portable snes-toolchain. So yes. But before I try to update 816-tcc I'd like to build all tools and the toolchain on linux and build a nice Dockerfile/Image so snes programming becomes platform independent. |
ok so please keep us informed when you will have something to try :) |
To continue this thread and now that tcc is available on the repository, i think if the project need to be independent, we should upload this sources :
snesbrr is less important because available here and only to help the developer. |
I can rebuild all tools except of TASM from which I could not find the source code. Instead of simply uploading the sources of the tools mentioned I would rather include them as git submodules since most of the tools are hosted on github already and often by the original mantainers. |
I am not sure to understand where is used TASM but i think it is for sound module ? I would like to test few modifications of tcc816 sources to understand how it works but the one provided with pvsneslib give me difficulties. When downloaded, you need to do : I tried with .PHONY: all in makefile but still the same. Did you progress on Docker ? |
Yes, TASM is needed to compile code for the SPC-700. If wla dx is able to compile for the SPC-700 that's cool but is it compatible with the code provided with this toolchain? I think the TASM assembler code is somewhat different than wla dx asssembler code. So someone would need to port the SPC-700 code to wla dx. To build tcc816 one needs to run I did make some progress on docker but I am busy with my work right now. |
From this thread it was not advised to use wla for SPC 700 but there a no informations and it was 5 years ago. And Vhelin (owner of wla) is really open (and available) to improve the tool. Ok thanks, Take the time you need to do something cool and useful for everybody, but i will be happy to see it ! |
You might run in problems using the resulting 816-tcc.exe when you try to compile with it. The gcc does a lot of optimizations and on linux the resulting 816-tcc gives a segfault when I tried to compile code. Ironically I could fix this by simply using tcc. I actually tried a lot of compilers like clang and different versions of gcc (down to 4.x.x). The problem is the 816-tcc was compiled using gcc2 or gcc3. Both versions are incompatible with modern gnu/linux distributions. |
Yes it seems to work correctly for me but i didn’t tried a lot of code for now. |
i need some help to build pvsneslib for wla 9.8. I don't know if someone here can help ?
but i get snes_rules:68: *** commands commence before first target. Stop. Then, i would like to generate dynamically the linkfile for wlalink.
but linkfile is not created. And finally, in hello_world sample, i would like to find where comes from this lines generated in asm :
I thought it cames from 816-gen.c but i replaced |
Hi! Recipes are evaluated in second pass during makefile processing so you need to inject some shell scripting.
|
Hi, For hello_world, it was a stupid error, i included an other folder in 816-tcc command line.. |
really strange. i think tcc is completely bugged. I compiled at least 100 times PVSneslib this last weeks without difficulties. I did change in tcc 816 to replace I just changed it to nmi_handler and built the tool a new time but i got an error on background.h (definition of bgState). I changed it to :
and it seems to work because building continue. Then i get the same on sprite.h : In file included from libc_c.c:5:
Line 60 is "typedef struct". I don't know if i will find a solution to it with this version of tcc. If you have any idea, please tell me ! |
Here is the last version mic_ sent me last week, perhaps it could help with this issue. |
I tried it and the result is the same :( i compared files with winmerge and it seems to be only optimisations. To be sure, i will retry with sources from github. I should also try to build tcc with an other compiler than gcc like advised by Chief-Detektor. Without solution, i think the 1st step will be to upgrade tcc816 on 0.9.27 then wla. |
Hi ! My problem is solved by using sources from github and re-apply modifications to all files. It is not the first time, i think that it is related to Programmer's Notepad which corrupt files some times. I will check to use an other (and better?) tool. Now, the standard hello world sample build correctly with wla 9.8 but the text doesn't appear to the screen :( i will investigate on it. edit : -s (small s) flag in wlaling generate .sym file for No$sns The last compilation rule (after the command wlalink.exe) in snes_rules contains :
Is it still useful for PVSneslib ? |
I spent some hours to understand why the text doesn't appear but without success. I uploaded hello_world sources : Does somebody can help me to find where the bug comes from ? |
i did test with others sample, this issue is more global than i thought : no display in all samples (background, sprites or text...). |
Did you progress on your work Chief-Detektor? :) |
Not yet, sorry, so much things in real life (i'm preparing a big trip to another country). |
Ok cool! I am curious to know which country you chose ;) enjoy it |
You see see on FB & Twitter next sunday with my friends I will meet in these mysterious country |
@alekmaul @Chief-Detektor did you manage to have a first draft of the docker file? I'm trying to setup pvsneslib on Linux 😄 |
HI, nothing on my side, sorry. I will try to think how to handle dockerfile for the project. |
Hi!
I really like this project and the idea to be able to write C code for the SNES. But in order to have a really clean and sound toolchain around it I think we ideally need a better C compiler. This all challenged me but the SNES itself was still too mysterious to me. |
Thanks for the write up!! I'll try to figure something out with all the infos that you gave me. I also found this http://emureview.ztnet.com/developerscorner/SoundCPU/spc.htm which has a SPC700 TASM table |
Hi, Spc700 is available in wla too: https://wla-dx.readthedocs.io/en/latest/man/wla-cpu.html |
I made this Dockerfile quickly, everything seems to work: https://github.com/vayan/docker-snes-toolchain/blob/master/Dockerfile, I need to try with some big project to make sure everything is ok. We can use it like this |
That's cool! |
I also wasted lot of time trying to do that 😭 Do you have a link to a big open source C SNES game so I can test things? |
Unfortunately not.. |
I'm trying things with this one for now 😄 https://drludos.itch.io/keeping-snes-alive |
Yep this should do it! Fingers crossed! :) |
Maybe this one can be used to test: https://github.com/1r3n33/bomberworld Or this one but it is older: |
Pushed a fix to add We don't need to work on Windows anymore 😅 and we can do CI and all sort of magic stuff There's some issue with #36 with the project |
Wow, really cool :) i am not familiar with docker but i will try to install it and use your image. For the SNESHEADER issue (where parameters used to build the lib and the game need to be the same), it is one of the reason i found to upgrade the lib with the latest version of wla (#29) because i think we can overwrite some properties in game header (like sram) by using directly wla directives (and snestool would become useless) |
Awesome! Great Job!
We should definitely use ci from now on to ensure quality and functionality
when working on the tools and the library.
Thanks for the effort!
RetroAntho <notifications@github.com> schrieb am Mi., 3. Juni 2020, 14:50:
… Wow, really cool :) i am not familiar with docker but i will try to
install it and use your image.
For the SNESHEADER issue (where parameters used to build the lib and the
game need to be the same), it is one of the reason i found to upgrade the
lib with the latest version of wla (#29
<#29>) because i think we can
overwrite some properties in game header (like sram) by using directly wla
directives (and snestool would become useless)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#7 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACRYLW64NPRBFODNV3TLOGDRUZBKRANCNFSM4E22ZLFA>
.
|
Argggg, i'm too much busy to read all comments, you're all crazy, thanks a lot guys :D ! |
Hi all! It might be worth it to evaluate it for further use and adaption since it is written in python it is definitely easier to extend and maintain than the tcc-65816. |
T'inquiete pas de soucis @alekmaul 😄 @Chief-Detektor outside my knowledge, what the issue with |
I saw some discussions about compiler comparison. This one is really interesting: I think the better is still tcc816 for now (because of specific SNES architecture) and we can also remove tools that are not free (like wdc). Tcc816 version is very old but i think it could be updated and improved to solve some existing bugs, merge pieces of code everywhere (constify, optimiser, python script...). From my point of view, it should be better to invest time in the current tools and document it instead of use new one. Maybe the python compiler ppci you said could be an alternative but i think it will ask as much work as update current tools and it will probably have other constraints/limitations |
@vayan I think the version of tcc we use is very hard to maintain and extend due to it's nature being tiny and being written by a genius. Also if you compare the original tcc with the patched version we use with this library you can see that these changes seem more a proof of concept than a solid and sound solution. @hoit I absolutely agree that we should stick with this tcc as long as we don't have a working alternative. The version tcc-65816 is based on is V0.9.23 official repo is here. It might be worth it porting the 65816 specific changes to the newest version but I am really not sure.. |
Hello, @alekmaul do you remember where you took sources or if you changed anything ? |
In this Dockerfile you can see how I managed to rebuild everything: https://github.com/vayan/docker-snes-toolchain/blob/master/Dockerfile But that's inside a 32-bit docker image :) |
nice @vayan, I will check the difference with the docker image provided by redbug :) |
@hoit , regarding snesbrr, I have the source code and here are the author & version |
I confirm, same author & version !
|
Hi, i think we can close the issue: snesbrr now build correctly. All tools needed for pvsneslib (and open sources) are available in the repo. is it ok for you too? |
Hi!
I appreciate your work very much and like it, but I have a problem with using it.
I want to use your library with cygwin environment that differs from the recommended msys. But I can't. The tools and compilers are using the msys paths and so on. They are build upon msys infrastructure...
The problem is - we don't have the sources. Are your tools closed source? I tried rebuilding tcc-65816 from scratch by taking the code from a snes-sdk mirror, but, unfortunately, it needs some patching.
Could you please provide us with the links or the sources for (at least) tcc-65816 sources that you are using?
The text was updated successfully, but these errors were encountered: