Page 1 of 1

CC65 and the W65C134SXB

Posted: Tue Dec 03, 2019 2:20 am
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!

Re: CC65 and the W65C134SXB

Posted: Tue Dec 03, 2019 9:50 am
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.

Re: CC65 and the W65C134SXB

Posted: Tue Dec 03, 2019 11:49 am
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.

Re: CC65 and the W65C134SXB

Posted: Tue Dec 03, 2019 8:54 pm
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

Re: CC65 and the W65C134SXB

Posted: Wed Dec 04, 2019 2:38 am
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.

Re: CC65 and the W65C134SXB

Posted: Wed Dec 04, 2019 9:57 am
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 :)

Re: CC65 and the W65C134SXB

Posted: Fri Dec 06, 2019 1:57 am
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?

Re: CC65 and the W65C134SXB

Posted: Fri Dec 06, 2019 3:22 am
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.

Re: CC65 and the W65C134SXB

Posted: Fri Dec 06, 2019 3:27 am
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.

Re: CC65 and the W65C134SXB

Posted: Fri Dec 06, 2019 3:57 am
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.

Re: CC65 and the W65C134SXB

Posted: Fri Dec 06, 2019 5:12 am
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.")

Re: CC65 and the W65C134SXB

Posted: Sat Dec 07, 2019 2:08 am
by rclancy
Thanks for the info, I'll put it in programming. :D

Re: CC65 and the W65C134SXB

Posted: Tue Apr 07, 2020 8:16 am
by GARTHWILSON
bump