It is currently Wed Nov 22, 2017 5:13 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 37 posts ]  Go to page Previous  1, 2, 3
Author Message
PostPosted: Sat Jul 11, 2015 5:54 pm 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 5827
Location: Canada
No. The nes.cfg that comes with CC65 does not specify a fill value, and the "VECTORS" segment starts at $FFF6. The contents are defined in crt0.s, which show that it's just 3 more pointers that I guess are used internally by the CC65 libraries. They all point to the same empty IRQ handler (just an RTI instruction).

I don't recommend using that, though. It's better to use libraries directly oriented toward gaming, like the one Shiru made, or perhaps look at the source code for this music project of mine for another example.


Top
 Profile  
 
PostPosted: Sat Jul 11, 2015 6:15 pm 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 6448
Location: UK (temporarily)
There were a number of other that-era microcontrollers that used a 6502 core with extra vectors, such as Mitsubishi's M50734SP (which is in an old dot matrix printer I had).

Why the original NES build scripts thought it had those extra vectors is a good question, and not one explained in cc65's commit history...


Top
 Profile  
 
PostPosted: Wed Jul 15, 2015 4:41 pm 
Offline
User avatar

Joined: Wed Jul 15, 2015 4:39 pm
Posts: 1
This is probably a really dumb question, but how did you rewrite assembly for different assemblers?
Most tutorials are written for cc65, but I'd like to use the example code with asm6


Top
 Profile  
 
PostPosted: Wed Jul 15, 2015 5:00 pm 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 5827
Location: Canada
Learn how their syntaxes are different and change the code. It's usually very cosmetic changes, like using [] instead of (), or a slightly different way to creating anonymous labels. Some of it you could do with a quick regex search and replace. Sometimes you can't, especailly if it's using a feature specific to the assembler (e.g. ca65's extensive macro system). A program that could automatically convert, reliably, would be as complex as an assembler itself. :P (Actually one way to convert is just to assemble it, and then use a disassembler on the result.)

If you're going through a tutorial, you might as well just read the sample code and convert it manually as you're typing it in to your own code, instead of just trying to copy-paste-regex it into shape. That way you'll at least get used to the language a little bit?

...or just learn ca65 and join the dark side! JOIN USSSSSSSSSSSSS... HISSSSSSS...


Top
 Profile  
 
PostPosted: Wed Jul 15, 2015 5:58 pm 
Online

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19246
Location: NE Indiana, USA (NTSC)
rainwarrior wrote:
A program that could automatically convert, reliably, would be as complex as an assembler itself. :P

I wrote such a program as part of the Action 53 project It acts a filter converting a subset of NESASM/UMK syntax to cc65 syntax. I used it to reassemble LAN Master and Super PakPak. Want me to dig it up?


Top
 Profile  
 
PostPosted: Wed Jul 15, 2015 7:08 pm 
Offline
User avatar

Joined: Mon Jan 03, 2005 10:36 am
Posts: 2981
Location: Tampere, Finland
This is probably not of interest to the original poster, but I'll mention it anyways:

One way to convert stuff from ca65 to other assemblers is to generate an o65 relocatable binary file from the source, and then run that through the co65 tool to get an expanded source file which has all of the code (including macros) expanded into a set of .byte and .word commands that are very easy to adapt to other assemblers in an automated way. The nice thing is that this kind of converted source code is relocatable. This is mostly useful if you want to distribute a relocatable, statically linkable library for multiple different assemblers (I used it in my MUSE sound library). It doesn't help if you want to actually be able to modify the source code after translation, as it's practically indecipherable.

BTW: I remember Shiru had some sort of automated conversion tool included with his FamiTone2 library. I think the source format was NESASM in that one, and it had some limitations, but you might want to check it out anyways.

_________________
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: kkfos.aspekt.fi


Top
 Profile  
 
PostPosted: Wed Jul 15, 2015 8:04 pm 
Offline
User avatar

Joined: Sat Jan 03, 2015 5:58 pm
Posts: 368
Location: ...
owin wrote:
This is probably a really dumb question, but how did you rewrite assembly for different assemblers?
Most tutorials are written for cc65, but I'd like to use the example code with asm6

I don't really know the best way to explain ca65 and asm6's differences to you. Study the two respective hello worlds, I guess?

rainwarrior wrote:
...or just learn ca65 and join the dark side! JOIN USSSSSSSSSSSSS... HISSSSSSS...

I'm starting to think that this would be a good idea, to just get beginners right on the big stuff. The only problem is that ca65 in specific kind of has a weird learning curve to it. Maybe giving asm6 to beginners and ca65 to people with previous experience would work? XD


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 37 posts ]  Go to page Previous  1, 2, 3

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 6 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:  
cron
Powered by phpBB® Forum Software © phpBB Group