6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Wed May 08, 2024 4:35 am

All times are UTC




Post new topic Reply to topic  [ 13 posts ] 
Author Message
 Post subject: CC65 and the W65C134SXB
PostPosted: Tue Dec 03, 2019 2:20 am 
Offline

Joined: Tue Dec 03, 2019 1:48 am
Posts: 11
Location: New Mexico
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!


Top
 Profile  
Reply with quote  
PostPosted: Tue Dec 03, 2019 9:50 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10800
Location: England
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.


Top
 Profile  
Reply with quote  
PostPosted: Tue Dec 03, 2019 11:49 am 
Offline
User avatar

Joined: Sat Dec 01, 2018 1:53 pm
Posts: 727
Location: Tokyo, Japan
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


Top
 Profile  
Reply with quote  
PostPosted: Tue Dec 03, 2019 8:54 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10800
Location: England
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


Top
 Profile  
Reply with quote  
PostPosted: Wed Dec 04, 2019 2:38 am 
Offline

Joined: Tue Dec 03, 2019 1:48 am
Posts: 11
Location: New Mexico
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.


Top
 Profile  
Reply with quote  
PostPosted: Wed Dec 04, 2019 9:57 am 
Offline

Joined: Sun Nov 24, 2019 9:14 am
Posts: 12
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 :)


Top
 Profile  
Reply with quote  
PostPosted: Fri Dec 06, 2019 1:57 am 
Offline

Joined: Tue Dec 03, 2019 1:48 am
Posts: 11
Location: New Mexico
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?


Top
 Profile  
Reply with quote  
PostPosted: Fri Dec 06, 2019 3:22 am 
Offline
User avatar

Joined: Fri Dec 12, 2008 10:40 pm
Posts: 1001
Location: Canada
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


Top
 Profile  
Reply with quote  
PostPosted: Fri Dec 06, 2019 3:27 am 
Offline
User avatar

Joined: Fri Dec 12, 2008 10:40 pm
Posts: 1001
Location: Canada
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


Top
 Profile  
Reply with quote  
PostPosted: Fri Dec 06, 2019 3:57 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8432
Location: Southern California
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?


Top
 Profile  
Reply with quote  
PostPosted: Fri Dec 06, 2019 5:12 am 
Offline
User avatar

Joined: Sat Dec 01, 2018 1:53 pm
Posts: 727
Location: Tokyo, Japan
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


Top
 Profile  
Reply with quote  
PostPosted: Sat Dec 07, 2019 2:08 am 
Offline

Joined: Tue Dec 03, 2019 1:48 am
Posts: 11
Location: New Mexico
Thanks for the info, I'll put it in programming. :D


Top
 Profile  
Reply with quote  
PostPosted: Tue Apr 07, 2020 8:16 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8432
Location: Southern California
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?


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 13 posts ] 

All times are UTC


Who is online

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