CC65 and the W65C134SXB

Building your first 6502-based project? We'll help you get started here.
Post Reply
rclancy
Posts: 11
Joined: 03 Dec 2019
Location: New Mexico

CC65 and the W65C134SXB

Post by rclancy »

Hi All! I'm just getting started with 6502 assembly. I spent plenty of time with the apple IIe and the c64 when I was a kid. But, beyond a few PEEKs and POKEs, I never did any assembly. I've worked as a sysadmin and programmer (though not recently) but my knowledge was always pretty high-level. Now, I'm fixing that. :D

I picked up a W65C134SXB on the cheap and I've been playing around with it. My main problem is that I don't have any windows computers and WDC's tools are windows only. I run Linux and while I could probably get the tool set running under WINE, I can't see any reason I shouldn't be able to do it all natively. I got EasySXB up and running so I can connect to the 134 over it's serial interface. I've played around with the monitor a bit and it's pretty fun. I need to dig into the documentation a bit more, but I wanted to get something up and running first. It seems like CC65 (or in my case ca65) is the most popular environment for 6502 work and I need all the documentation I can get. EasySXB comes with and LED blink sample written for naken_asm. I ported it over to ca65 and assembled it. But, in order to link it into a binary, ld65 needs a memory map of the 134. It doesn't look super hard to generate one, but I thought I'd check if anyone else had done the heavy lifting before I dove in. Thanks!

tldr; Anyone have an ld65 compatible memory map of the W65C134SXB?

Any other tips for working with the 134 would be appreciated too!
User avatar
BigEd
Posts: 11464
Joined: 11 Dec 2008
Location: England
Contact:

Re: CC65 and the W65C134SXB

Post by BigEd »

Welcome! I think you're on the right lines, and a recipe for a non-windows tooling would be a good thing to collect. But I'm afraid I can't help - someone will surely be along in due course.
User avatar
cjs
Posts: 759
Joined: 01 Dec 2018
Location: Tokyo, Japan
Contact:

Re: CC65 and the W65C134SXB

Post by cjs »

rclancy wrote:
It seems like CC65 (or in my case ca65) is the most popular environment for 6502 work....
It is indeed, and with good reason. It's a great assembler and toolchain, and even has this thing called a "C compiler" (whatever that is) thrown in as well. Dunno why anybody would ever use that, though. :-)
Quote:
But, in order to link it into a binary, ld65 needs a memory map of the 134. It doesn't look super hard to generate one, but I thought I'd check if anyone else had done the heavy lifting before I dove in. Thanks!
They look easy enough to generate, but given that you're just starting out, unless you foresee a need for separate assembly and relocation/linking abilities, or for writing in C, you may want simply to consider dropping a lot of that complexity and using a non-linking assembler. The speed difference should be inconsequential. (Cross-assemblers on modern hardware are so fast that assembling straight to the binary output is actually faster for small programs, and probably about the same speed for "large" programs, where "large" means a 64 KB or so system.

I myself am currently using the ASxxxx suite, as I originally thought I'd want a linker, but at this point I'm looking at switching away from a system with a linker, perhaps to AS. It's mainly just the switching cost that's got that on the back burner for me.
Curt J. Sampson - github.com/0cjs
User avatar
BigEd
Posts: 11464
Joined: 11 Dec 2008
Location: England
Contact:

Re: CC65 and the W65C134SXB

Post by BigEd »

I think cc65 can be arranged not to worry too much about a system's memory map - I seem to recall I used it with "-t none"... ah yes
viewtopic.php?p=19339#p19339
viewtopic.php?p=9534#p9534
rclancy
Posts: 11
Joined: 03 Dec 2019
Location: New Mexico

Re: CC65 and the W65C134SXB

Post by rclancy »

Thanks for the advice! I'll try telling ld65 not to use a memory map.

Once I get things figured out, I'll post a tutorial on using the 134 in Linux. Maybe it'll be useful to somebody.
MalphasWats
Posts: 12
Joined: 24 Nov 2019

Re: CC65 and the W65C134SXB

Post by MalphasWats »

rclancy wrote:
Thanks for the advice! I'll try telling ld65 not to use a memory map.

Once I get things figured out, I'll post a tutorial on using the 134 in Linux. Maybe it'll be useful to somebody.
I would definitely be interested in such a thing :)
rclancy
Posts: 11
Joined: 03 Dec 2019
Location: New Mexico

Re: CC65 and the W65C134SXB

Post by rclancy »

MalphasWats wrote:
rclancy wrote:
Thanks for the advice! I'll try telling ld65 not to use a memory map.

Once I get things figured out, I'll post a tutorial on using the 134 in Linux. Maybe it'll be useful to somebody.
I would definitely be interested in such a thing :)
Okie Dokie, I've got it working. One last question, should I post the tutorial in Newbies? Or would someplace else be better?
User avatar
BillO
Posts: 1038
Joined: 12 Dec 2008
Location: Canada

Re: CC65 and the W65C134SXB

Post by BillO »

BigEd wrote:
I think cc65 can be arranged not to worry too much about a system's memory map - I seem to recall I used it with "-t none"... ah yes
viewtopic.php?p=19339#p19339
viewtopic.php?p=9534#p9534
This works if your MM does not conflict with CC65's assumptions. Been bitten by that on occasion.
Bill
User avatar
BillO
Posts: 1038
Joined: 12 Dec 2008
Location: Canada

Re: CC65 and the W65C134SXB

Post by BillO »

rclancy wrote:
MalphasWats wrote:
rclancy wrote:
Thanks for the advice! I'll try telling ld65 not to use a memory map.

Once I get things figured out, I'll post a tutorial on using the 134 in Linux. Maybe it'll be useful to somebody.
I would definitely be interested in such a thing :)
Okie Dokie, I've got it working. One last question, should I post the tutorial in Newbies? Or would someplace else be better?
Since it would be new, "Newbies" might not be a bad place, but others might like to see it in "Programming". Take a shot at it. The mods will move it if the choice is egregious.
Bill
User avatar
GARTHWILSON
Forum Moderator
Posts: 8775
Joined: 30 Aug 2002
Location: Southern California
Contact:

Re: CC65 and the W65C134SXB

Post by GARTHWILSON »

We started the "Newbies" section of the forum for true newbies to this field. The boundary lines are awfully blurry, which is ok; but I fear that some users, humbly calling themselves newbies, have posted about such lofty things there that the true newbies would be intimidated and not want to post their simple questions. The intimidation thing was what we wanted to remedy. A discussion on using the 134 in Linux should really go in the "Programming" section.
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
cjs
Posts: 759
Joined: 01 Dec 2018
Location: Tokyo, Japan
Contact:

Re: CC65 and the W65C134SXB

Post by cjs »

I'm with Garth on this one; you may be new to 6502 programming (as am I!), but if you have enough understanding of memory maps to create an ld65 memory map description, you're not a "newbie." :-) Also consider where the discussion is likely to go: in this case responses are likely to get pretty highly technical. (As opposed to, "maybe you should try this platform instead while you're starting out.")
Curt J. Sampson - github.com/0cjs
rclancy
Posts: 11
Joined: 03 Dec 2019
Location: New Mexico

Re: CC65 and the W65C134SXB

Post by rclancy »

Thanks for the info, I'll put it in programming. :D
User avatar
GARTHWILSON
Forum Moderator
Posts: 8775
Joined: 30 Aug 2002
Location: Southern California
Contact:

Re: CC65 and the W65C134SXB

Post by GARTHWILSON »

bump
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?
Post Reply