I will answer both post in the same since it easier to follow.
Regarding mapper, understood. I will test the far pointer later since there is one case in my old code that uses a trampoline with a pragma (concept of far pointer in cc65, that's something added recently) so I'm curious how it will make the code simpler in that case than that concept they had

The far pointer feels more C like and reminds me of the dos days with turbo C.
vbc wrote: ↑Thu Jul 23, 2020 8:22 am
fill only inserts the space if some data follows. You cannot use it to fill space at the end. And adding an extra byte at the end is a problem if your data is exactly the full size. Otherwise it is pretty similar.
Oh, I see. Maybe this is why I saw a few scripts that added an extra byte at the end. From the doc, it's not clear that you cannot fill without adding something. Reserve is more useful in that case then.
vbc wrote: ↑Thu Jul 23, 2020 8:22 am
Thank you as well for your comments and feedback. It definitely helps us to improve vbcc.
You're welcome. I love C and since I had a few issues with cc65 I'm more than happy to test vbcc and see the improvement I can get from it. Of course porting code is an issue at first and there is less debugging since mesen was made for cc65 in mind but I think if all goes well, it should get a lot of interest for the nes community. What is important is to get some sample going (like lazycow did) to help dev gets started. I can help for that later but I'm more of a makefile oriented guy so if VC has to be used, I need to adapt it. My current file allow to compile C code by just putting files in source folder and it does all the job for you and you don't need to write include path too (something that save time when you refactor code). It's quite convenient for beginners which was the goal at first but now I use that concept in all my project (laugh).
One thing I would suggest is even though the code at first was not public, the startup/banking code should be documented so that if people need to adapt they can do it on their own. I could figure it out (at the least the startup code) since I did once for cc65 but some people may have less experience with that. One example is the code for copying BSS data. Just reading the code I wouldn't have known it was for that since it's specific for vbcc.
vbc wrote: ↑Thu Jul 23, 2020 8:22 am
Btw. Frank has added linker script documentation as well as ORIGIN/LENGTH (the latter was easy, the former did cost some effort

). This will be included in the next update.
I see. Since I'm the one that started that request then I will be more than happy to test it.
Time to continue to port code and test rawseg, curious how it will goes (not necessary now since mm3 it's working it's just that I'm a curious guy

).
edit:
I have a question regarding vasm and it may come from my lack of experience to uses many assemblers. When using vasm (I guess in old style), except for labels, everything has to be on something else than column 1. Is it for compatibility with older assembler? I liked when I could put section on the first column, but now that's not possible. Not a problem per se, just liked it visually (laugh). Seems macro name can be written on column 1 but I was not able to do it somehow.
For now it's not really an issue, just an habit of writing code a specific way. I will get used soon.
edit2:
I'm porting one library but I used code that was so specific to ca65 that it's a little bit painful to port. I'm not used to old style syntax so I'm not sure how to use a struct.
In ca65, you could define a struct and use it to access offset at a ram address like this:
but from reading the doc, I'm not sure if this is possible to do so. It seems possible to define a memory area and access with the symbols inside but not sure if it can be done that way. Is it? I need to test it but if it's possible, I guess it would be doable that way?
but there was no example in the doc, thus my confusion.
edit3:
For now my workaround for offset is to just create some symbol that act the same way as the struct I was using and I just map to the target variable and it's working fine. Still need to figure out what is the proper way to use struct in the old syntax. I guess ca65 is not that standard after all.