6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sun Jun 30, 2024 8:07 am

All times are UTC




Post new topic Reply to topic  [ 87 posts ]  Go to page 1, 2, 3, 4, 5, 6  Next
Author Message
 Post subject: Beginners cc65
PostPosted: Mon Jun 04, 2012 11:25 pm 
Offline
User avatar

Joined: Mon Aug 08, 2011 2:48 pm
Posts: 808
Location: Croatia
I am trying to figure out how the cc65 works. I use Windows and I am kinda lost with the cc65, i tried to compile a simple C code, but i get some error about network path not found. After reading the cc65 manual I am even more confused...


Top
 Profile  
Reply with quote  
 Post subject: Re: Beginners cc65
PostPosted: Tue Jun 05, 2012 6:14 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10837
Location: England
Are you running in a windows command shell or a Cygwin shell?
Sounds like a confusion between forward and backward slashes in file paths.
I recommend running in Cygwin.
Cheers
Ed


Top
 Profile  
Reply with quote  
 Post subject: Re: Beginners cc65
PostPosted: Tue Jun 05, 2012 2:02 pm 
Offline
User avatar

Joined: Mon Aug 08, 2011 2:48 pm
Posts: 808
Location: Croatia
I have Cygwin, i had to use it once for some labs that i had to do...

But if i use Cygwin, then what are toes exe files?


Top
 Profile  
Reply with quote  
 Post subject: Re: Beginners cc65
PostPosted: Tue Jun 05, 2012 2:57 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10837
Location: England
Cygwin will run a win32 exe no problem. And Cygwin programs are also .exe files. But it does look like the cc65 binaries are for native windows. Perhaps you could paste your command line and the result?


Top
 Profile  
Reply with quote  
 Post subject: Re: Beginners cc65
PostPosted: Tue Jun 05, 2012 3:05 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 9:02 pm
Posts: 1696
Location: Sacramento, CA
I run CC65 from Windows XP and I don't use cygwin (although I'm sure its possible).

CC65 is not an easy "beast" to understand. First thing you need to decide is which platform you plan to target. Without that, it won't work. It is best to use a DOS batch file to handle the compiling process.

If you want an example, you can download my SBC-3 support package. It contains the source code to create an SBC-3 platform that you can target along with two sample programs. There is a batch file in each of the two demo programs that takes care of the compiling. Remember though, that this can only be executed from my SBC-3 (properly outfitted). There are many other targets included in the CC65 package so you will have to choose an appropriate one for your use.

It took me several months to build the target source files and to get programs to compile correctly. I started out by downloading Chris Ward's source files for retargeting CC65 to his SBC. From there, I just modifying those files to fit the SBC-3. I then went into the source files for other targeted platforms and started bringing in more routines that the SBC-3 would support, including serial, graphics, disk strorage, and ethernet.

It was a long road with many bumps, but it can be done.

Daryl

http://sbc.rictor.org/download/cc65lib.zip


Top
 Profile  
Reply with quote  
 Post subject: Re: Beginners cc65
PostPosted: Tue Jun 05, 2012 8:50 pm 
Offline
User avatar

Joined: Mon Aug 08, 2011 2:48 pm
Posts: 808
Location: Croatia
First thing i need to figure out how to compile for any platform at all, is there a good free emulator for any of the cc65 platforms, so i can test the compiled program there, before i go and modify it to fit my sbc?


Top
 Profile  
Reply with quote  
 Post subject: Re: Beginners cc65
PostPosted: Tue Jun 05, 2012 8:57 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10837
Location: England
VICE emulates the C64 and is well thought of.


Top
 Profile  
Reply with quote  
 Post subject: Re: Beginners cc65
PostPosted: Tue Jun 05, 2012 8:58 pm 
Offline
User avatar

Joined: Mon Aug 08, 2011 2:48 pm
Posts: 808
Location: Croatia
Yes but C64 emulators tend not to be free, and they are usually closed, so i don't know how i could manipulate the rom...


Top
 Profile  
Reply with quote  
 Post subject: Re: Beginners cc65
PostPosted: Tue Jun 05, 2012 9:11 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10837
Location: England
VICE is GPL. You're unlikely to find an historical system with open-sourced ROMs. You will find sources from reverse-engineering efforts for most of them.

(Normally you'd be compiling an application - whether the OS is open or closed isn't an issue.)


Top
 Profile  
Reply with quote  
 Post subject: Re: Beginners cc65
PostPosted: Tue Jun 05, 2012 9:43 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 9:02 pm
Posts: 1696
Location: Sacramento, CA
It would not be too hard to target the Kawalski Simulator, since all it has is simple input and output. That would at least give you something to start with. Purhaps I'll work on that. It may take a little time, as my spare time has been pretty sparse.

Daryl


Top
 Profile  
Reply with quote  
 Post subject: Re: Beginners cc65
PostPosted: Fri Jun 08, 2012 7:22 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 9:02 pm
Posts: 1696
Location: Sacramento, CA
I have completed the port to the Kawalski Simulator.

There are not too many features to port as the simulator only has a simple console window and no other IO.

I have also modified 4 of the sample programs to work with the limited conio.h routines. This should give a decent starting point for others to probe the workings of a generic cc65 target.

I just need to write up an brief instruction on installing cc65 with this target, along with generating and loading the samples.

Daryl


Top
 Profile  
Reply with quote  
 Post subject: Re: Beginners cc65
PostPosted: Fri Jun 08, 2012 8:55 pm 
Offline

Joined: Tue Jul 05, 2005 7:08 pm
Posts: 1017
Location: near Heidelberg, Germany
Have you submitted the port back to the cc65 community? They might be interested.

_________________
Author of the GeckOS multitasking operating system, the usb65 stack, designer of the Micro-PET and many more 6502 content: http://6502.org/users/andre/


Top
 Profile  
Reply with quote  
 Post subject: Re: Beginners cc65
PostPosted: Fri Jun 08, 2012 9:04 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 9:02 pm
Posts: 1696
Location: Sacramento, CA
Not yet. I think I would have to spend a lot more time testing more of the cc65 environment before doing that. The 4 demo programs run fine, but that is not to say that any generic C program will. I am not an expert in C. I was just driven enough get cc65 to work for my uIP ethernet project.

In other words, it's enough to help others get started but not a complete solution.

Daryl


Last edited by 8BIT on Fri Jun 08, 2012 10:20 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: Beginners cc65
PostPosted: Fri Jun 08, 2012 9:29 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8460
Location: Southern California
Quote:
I was just driven enough get cc65 to work for my uIP ehternet project.

Daryl, on the "Homebuilt Projects" page, Adam's uIP link (near the bottom) no longer really has anything to do with uIP. I was trying to find the correct link to give to Mike, and the closest I came was that it might be part of a 1.4GB (not MB!) download that I wasn't about to do. Do you have a link to the uIP material?

_________________
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?


Top
 Profile  
Reply with quote  
 Post subject: Re: Beginners cc65
PostPosted: Fri Jun 08, 2012 10:19 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 9:02 pm
Posts: 1696
Location: Sacramento, CA
There used to be a link to the "old uIP" pages but they have removed that I see. Try a google search for uIP 1.0 or better yet, uIP 0.9. If that doesn't yield anything, I have the source files backed up at home and can email them to anyone who wants them.

Daryl


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 87 posts ]  Go to page 1, 2, 3, 4, 5, 6  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 4 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: