nesdev.com
http://forums.nesdev.com/

Troubles when planning to make a FDS template with CA65
http://forums.nesdev.com/viewtopic.php?f=2&t=15789
Page 2 of 2

Author:  rainwarrior [ Fri Apr 14, 2017 12:12 am ]
Post subject:  Re: Troubles when planning to make a FDS template with CA65

Here's a modified version of my simple ca65 example program to run on FDS.

Rather than trying to do everything with CA65/LD65, it uses ca65/ld65 to assemble a binary file and then creates the FDS with a python (3) script.

While you could technically just build the file in ca65/ld65, it feels a lot more sensible just to assemble the FDS with a secondary tool. I might make a third version just to demonstrate how to do it in ca65/ld65 alone though.


edit: eventually reconsidered that maybe an external python script wasn't that great either, and would recommend instead the version below that skips the license (or the ca65 only version just above it if you want to keep the license for some reason). keeping this uploaded here for posterity, though, just in case it's wanted.

Attachments:
example_fds.zip [8.3 KiB]
Downloaded 10 times

Author:  Pokun [ Fri Apr 14, 2017 12:44 am ]
Post subject:  Re: Troubles when planning to make a FDS template with CA65

Why is this hard to do in ca65? And why does it make more sense to use an additional tool for it?
To me it sounds like it would be better if the assembler could do it without outside help.

Author:  rainwarrior [ Fri Apr 14, 2017 12:54 am ]
Post subject:  Re: Troubles when planning to make a FDS template with CA65

Here's the ca65/ld65 only version, demonstrating that you can in fact do it without any additional tools.

Pokun wrote:
Why is this hard to do in ca65? And why does it make more sense to use an additional tool for it?
To me it sounds like it would be better if the assembler could do it without outside help.

I don't think it's "hard", you can look at the example I am posting now to see exactly how it looks.

I just think it's easier to work with an external tool than write all the extra boilerplate in the ca65 stuff. You could make some of it cleaner with macros, but the config files have to be the way they are. Though maybe it's just me, already having python installed and ready to go, and used to just using it to write quick/simple tools whenever I need them. Admittedly it's not really a big difference either way.

Attachments:
example_fds_ca65_only.zip [7.89 KiB]
Downloaded 8 times

Author:  Pokun [ Fri Apr 14, 2017 1:26 am ]
Post subject:  Re: Troubles when planning to make a FDS template with CA65

I see, thanks for the example!

Author:  rainwarrior [ Tue May 02, 2017 1:24 pm ]
Post subject:  Re: Troubles when planning to make a FDS template with CA65

Using the technique described here, I've made a third version of the example that skips the license screen.

This is convenient because it makes the startup sequence a few seconds faster, but also prevents your program from lying to the user about a license from Nintendo. ;)

(This is built upon the second "ca65 only" example above.)


edit: examples updated to prevent accidental clearing of BIOS variables at $F9-$FF

Attachments:
example_fds_skip_license.zip [8.38 KiB]
Downloaded 8 times

Page 2 of 2 All times are UTC - 7 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/