6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Fri Sep 27, 2024 4:30 am

All times are UTC




Post new topic Reply to topic  [ 21 posts ]  Go to page Previous  1, 2
Author Message
PostPosted: Wed Apr 21, 2021 12:10 am 
Offline

Joined: Sat Apr 11, 2020 7:28 pm
Posts: 344
Anyway, it seems that WDC's way of doing business has always been the sorts of "investing on what makes money". The way that Bill Mensch has answered questions like "why not a 32 bit version", or "why not a hundreds or thousands megahertz version" of 65xx technology has been mostly the sorts of "because the market didn't asked for it".

So the same could be said for compilers: Why not a linux version of the WDC C compiler? Because there is no need for it. Because a C compiler for the 65xx can be told it's a toy. At the end hardcore 65xx programmers use assembler which gives them the level of control, counting cycles and using tricks, that no other language could provide. Big names know it, hobbyists know it, and WDC knows it, so no one is whinning about not being able to use WDC's C compiler. And so, they won't be doing anything with it anytime sooner or later. They thought that releasing it full version for free would attract people, but here we are: people is using CC65 or anything else, and the fact that it only runs on Windows natively and it's hard to get working (subject of this thread) leads it to be forgotten. Low demand = low interest by WDC's side. And there is nothing wrong with that. It's business, and the business they (WDC) are doing do works for them.


Top
 Profile  
Reply with quote  
PostPosted: Wed Apr 21, 2021 12:17 am 
Offline

Joined: Sat Apr 11, 2020 7:28 pm
Posts: 344
enso wrote:
Fair enough. There is no reason not to use makefiles to run a windows-only compiler under wine in Linux, if you so desire. Sure, why not! Worthwhile? Only you can tell, by actually trying your makefile and not asking others to do it for you.


Thanks. I'll look for some C written code that I could compile that would make something that could be run on a Commodore 64, and test it with VICE, for example.

The Makefile I wrote seems to be doing what's been told to do: using the assembler with the .asm file, using the C compiler with the .c files and using the linker with the .obj files.

What I'm not sure at all if what the linker outputs is real, useful code that does what is has been programmed to, or if it's garbage.


Top
 Profile  
Reply with quote  
PostPosted: Wed Apr 21, 2021 12:22 am 
Offline
User avatar

Joined: Sat Sep 29, 2012 10:15 pm
Posts: 899
WDC used to charge money for the compiler. Windows users don't care about opensource and don't mind using proprietary closed applications. This would not fly under Linux. It is trivial to port a console application to linux, but it would require opening up the source. It's not like they have any technology to protect, really - there are free compilers that generate 6502 code that is at least as bad or better. So I guess everyone is happy!

Why would the linker output garbage? A makefile is just a conditional script. If your linker works from the command line, it will do the same thing when invoked from a makefile.

_________________
In theory, there is no difference between theory and practice. In practice, there is. ...Jan van de Snepscheut


Top
 Profile  
Reply with quote  
PostPosted: Wed Apr 21, 2021 8:37 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10938
Location: England
It might be better to keep this thread to the topic title: it's reasonable, and indeed generous, to offer a makefile and to ask to see if it works for anyone else.

However, I seem to be failing to control myself, so here's some opinion from me.

(I've been distressed and overwhelmed by makefile trouble in my past. It's very difficult to debug, especially when it's complex and written by someone else.)

Make - or similar - can still be useful in industry, where build times tend to grow unless very carefully controlled. A build time of 20 mins is bad, and when it grows over an hour, that's horrible. If your project is small or simple or your team well-disciplined, you won't find yourself in this territory.

Make for cross-compiled 6502 projects might now be moot - if build times are just a few seconds then
a short shell script is fine for most purposes.


Top
 Profile  
Reply with quote  
PostPosted: Wed Apr 21, 2021 4:05 pm 
Offline
User avatar

Joined: Sat Sep 29, 2012 10:15 pm
Posts: 899
I see what happened here. I've been trying to figure out why OP is talking about compiler or linker generating garbage or not creating a binary that does something useful. Looking at the other thread, http://forum.6502.org/viewtopic.php?f=2&t=6540#p82957 I see that Agumander mentiones that his compiler generated garbage and code that does not do anything useful, presumably due to a missing initialization file.

Just to be clear, a Makefile just invokes the compiler and the linker. Before creating a Makefile, compile and link by hand, from the command line. If your compiler or linker silently generates garbage, wipe it from your drive and get a different one. Do not automate the process of miscompiling your code - it will not help.

So before debugging a Makefile (it took some discipline on my part to actually not look at it), confirm that the compiler/linker actually work.

And have some dignity - do not use half-assed tools designed by corporate teams explicitly not to work on your chosen architecture; by corporate teams who will not opensource their code (for fear of embarrassment or 'legal' reasons), license under reasonable terms, or support it adequately (such as answering 'why does hello-world not compile?'). Life is short, and there is other fish in the sea.

_________________
In theory, there is no difference between theory and practice. In practice, there is. ...Jan van de Snepscheut


Top
 Profile  
Reply with quote  
PostPosted: Wed Apr 21, 2021 8:05 pm 
Offline

Joined: Sat Apr 11, 2020 7:28 pm
Posts: 344
Well, it's just about that: One thing is creating a Makefile that works per se, and another one is that the tools that make invokes do really do anything useful.

The decision about both of them to be used is a thing of everyone reading this.

But the motivation to have both of them working is personal. I'm grateful for the people that voluntarily gets involved in this process.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 21 posts ]  Go to page Previous  1, 2

All times are UTC


Who is online

Users browsing this forum: No registered users and 9 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: