Beginners cc65

Programming the 6502 microprocessor and its relatives in assembly and other languages.
User avatar
Dr Jefyll
Posts: 3526
Joined: 11 Dec 2009
Location: Ontario, Canada
Contact:

Re: Beginners cc65

Post by Dr Jefyll »

8BIT wrote:
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
This sounds great, Daryl. Will this same material apply to the cc65 assembler as well? I don't have much interest in C, but I could make use of cc65 and the Kawalski Simulator for some asm projects. Thanks,

Jeff
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html
User avatar
8BIT
Posts: 1787
Joined: 30 Aug 2002
Location: Sacramento, CA
Contact:

Re: Beginners cc65

Post by 8BIT »

I don't see why not, as cc65 first turns .c files into .s files then assembles and links those into the output file.
User avatar
GARTHWILSON
Forum Moderator
Posts: 8775
Joined: 30 Aug 2002
Location: Southern California
Contact:

Re: Beginners cc65

Post by GARTHWILSON »

Quote:
Try a google search for uIP 1.0 or better yet, uIP 0.9.
I don't know why I still don't have a mindset geared to doing the easy thing, a web search. Anyway, ixquick.com (the search engine we use) instantly turned up a load of relevant sites. Edit, years later: We're using duckduckgo.com now.
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?
User avatar
8BIT
Posts: 1787
Joined: 30 Aug 2002
Location: Sacramento, CA
Contact:

Re: Beginners cc65

Post by 8BIT »

Finished the draft port. Can someone try to install this on a Windows machine and test it?

http://sbc.rictor.org/support/CC65forSim.zip

Follow installation.txt instructions. Also has compiling and loading instructions.

Sim files are included and appear in the 6502 subfolder after installation.

Thanks

Daryl
User avatar
8BIT
Posts: 1787
Joined: 30 Aug 2002
Location: Sacramento, CA
Contact:

Re: Beginners cc65

Post by 8BIT »

8BIT wrote:
Finished the draft port. Can someone try to install this on a Windows machine and test it?

http://sbc.rictor.org/support/CC65forSim.zip

Follow installation.txt instructions. Also has compiling and loading instructions.

Sim files are included and appear in the 6502 subfolder after installation.

Thanks

Daryl
Finally.... I was getting many 403 forbidden errors trying to post this. Finally got it to work.
User avatar
BigDumbDinosaur
Posts: 9428
Joined: 28 May 2009
Location: Midwestern USA (JB Pritzker’s dystopia)
Contact:

Re: Beginners cc65

Post by BigDumbDinosaur »

8BIT wrote:
8BIT wrote:
Finished the draft port. Can someone try to install this on a Windows machine and test it?

http://sbc.rictor.org/support/CC65forSim.zip

Follow installation.txt instructions. Also has compiling and loading instructions.

Sim files are included and appear in the 6502 subfolder after installation.

Thanks

Daryl
Finally.... I was getting many 403 forbidden errors trying to post this. Finally got it to work.
The version of the Kowalski simulator you included, which is version 1.2.8, appears to have some problems, not the least of which the I/O window function doesn't work at all. When the simulator tries to open the I/O window, nothing appears, and the main program window in which the simulator is running goes out of focus.

Also, someone removed some functionality from under the File menu option. The older version I have (1.2.5) includes a recent files list. The newer version does not. Also, in the newer version you can't resize the open and save dialog windows, which is extremely annoying.
x86?  We ain't got no x86.  We don't NEED no stinking x86!
User avatar
8BIT
Posts: 1787
Joined: 30 Aug 2002
Location: Sacramento, CA
Contact:

Re: Beginners cc65

Post by 8BIT »

The new version ran on 2 of my xp boxes but I did not try it on my Win 7 boxes. I have replaced the files in the zip with v1.2.5

Thanks for pointing that out.

Daryl
User avatar
Dajgoro
Posts: 808
Joined: 08 Aug 2011
Location: Croatia
Contact:

Re: Beginners cc65

Post by Dajgoro »

I installed the cc65 to the suggested path C:\Program files\cc65 and i pasted the CC65 folder in the installed cc65 in program files, and when i try to make hello1 it can't find the lib files. I fixed the path to go trough program files, but still nothing.
User avatar
BigDumbDinosaur
Posts: 9428
Joined: 28 May 2009
Location: Midwestern USA (JB Pritzker’s dystopia)
Contact:

Re: Beginners cc65

Post by BigDumbDinosaur »

8BIT wrote:
The new version ran on 2 of my xp boxes but I did not try it on my Win 7 boxes. I have replaced the files in the zip with v1.2.5

Thanks for pointing that out.

Daryl
I'm on Windows 2000 here. It's the only Windows box around here.
x86?  We ain't got no x86.  We don't NEED no stinking x86!
User avatar
BigEd
Posts: 11464
Joined: 11 Dec 2008
Location: England
Contact:

Re: Beginners cc65

Post by BigEd »

Both versions can be found at the Wayback Machine:
http://web.archive.org/web/200701270603 ... nload.html

Also, the old project page is still up at SourceForge
http://sourceforge.net/scm/?type=cvs&group_id=186227
with CVS access, browseable here
http://uip-stack.cvs.sourceforge.net/vi ... stack/uip/

André has kept a copy of 1.0 ported to PET:
http://www.6502.org/users/andre/hwinfo/ ... x.html#uip

Cheers
Ed

Edit: oops, replying to last post of first page - things have moved on!
Last edited by BigEd on Sat Jun 09, 2012 1:51 pm, edited 1 time in total.
User avatar
8BIT
Posts: 1787
Joined: 30 Aug 2002
Location: Sacramento, CA
Contact:

Re: Beginners cc65

Post by 8BIT »

Dajgoro wrote:
I installed the cc65 to the suggested path C:\Program files\cc65 and i pasted the CC65 folder in the installed cc65 in program files, and when i try to make hello1 it can't find the lib files. I fixed the path to go trough program files, but still nothing.
It has to be installed to c:\cc65 for all the batch files to work. Try to uninstall and reinstall to that folder.
I am sorry, my original post gave instructions to place it there but with all those 403 errors, it must have gotten dropped in the final post that worked.

I'll add that to the installation.txt help file.

Daryl
User avatar
8BIT
Posts: 1787
Joined: 30 Aug 2002
Location: Sacramento, CA
Contact:

Re: Beginners cc65

Post by 8BIT »

I fixed the instrcutions and have added a new demo, in the Hello3 folder. This is just an assembly file (no C) that can be assembled and linked using cc65 and run in the simulator.
User avatar
Dajgoro
Posts: 808
Joined: 08 Aug 2011
Location: Croatia
Contact:

Re: Beginners cc65

Post by Dajgoro »

I reinstalled it and i still i can't get it working. I get this error:

Code: Select all

C:\cc65\CC65\SIM Demos\hello1>set CC65LIB=c:\cc65\lib

C:\cc65\CC65\SIM Demos\hello1>cl65 -t none -C sim.cfg -o hello.65b -m hello.map
-l c:\cc65\lib\sim.o hello.c text.s c:\cc65\lib\sim.lib
ld65.exe: Error: Cannot find config file `sim.cfg'

C:\cc65\CC65\SIM Demos\hello1>del *.o /Q  1>nul

C:\cc65\CC65\SIM Demos\hello1>pause
Press any key to continue . . .


User avatar
8BIT
Posts: 1787
Joined: 30 Aug 2002
Location: Sacramento, CA
Contact:

Re: Beginners cc65

Post by 8BIT »

The sim.cfg file should be in the c:\cc65\cfg folder. If it is not, run the copysim.bat file in the c:\cc65\sim folder. That will re-compile the SIM target files and copy all the necessary files. I checked my machine and there is not a specific PATH to the c:\cc65\cfg folder in DOS so the compiler must search in the c:\cc65\cfg folder by default.

Let me know if you cannot get it to work. You can also try to copy the sim.cfg file to the hello1 folder and see if it finds it then.

Daryl
User avatar
Dajgoro
Posts: 808
Joined: 08 Aug 2011
Location: Croatia
Contact:

Re: Beginners cc65

Post by Dajgoro »

The copysim.bat throws lots of cannot find type of errors, and now when i run the make.bat in hello1 i get this:

Code: Select all

C:\cc65\CC65\SIM Demos\hello1>set CC65LIB=c:\cc65\lib

C:\cc65\CC65\SIM Demos\hello1>cl65 -t none -C sim.cfg -o hello.65b -m hello.map
-l c:\cc65\lib\sim.o hello.c text.s c:\cc65\lib\sim.lib
Unresolved external `_cprintf' referenced in:
  hello.s(13)
Unresolved external `callmain' referenced in:
  crt0.s(15)
Unresolved external `donelib' referenced in:
  crt0.s(14)
Unresolved external `initlib' referenced in:
  crt0.s(14)
Unresolved external `pushax' referenced in:
  hello.s(34)
Unresolved external `sp' referenced in:
  C:\cc65/asminc/zeropage.inc(11)
Unresolved external `zerobss' referenced in:
  crt0.s(16)
ld65.exe: Error: 7 unresolved external(s) found - cannot create output file

C:\cc65\CC65\SIM Demos\hello1>del *.o /Q  1>nul

C:\cc65\CC65\SIM Demos\hello1>pause
Press any key to continue . . .
Edit: Would it be possible to add the cc65 into eclipse, or some other ide?
Post Reply