It is currently Tue May 21, 2019 12:04 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: Fri Feb 08, 2019 6:04 pm 
Offline

Joined: Tue Aug 28, 2018 8:54 am
Posts: 143
Location: Edmonton, Canada
I have added famitone to my project, and it requires FT_BASE_ADR to be at xx00 address. As for now it just put

Code:
FT_BASE_ADR = $600


And in this project I should not use too much RAM to overlap with this address, but can I actually make ca65 to reserve space at certain address without creating separate segment in the middle of the RAM?


Top
 Profile  
 
PostPosted: Fri Feb 08, 2019 6:36 pm 
Offline
User avatar

Joined: Fri May 08, 2015 7:17 pm
Posts: 2505
Location: DIGDUG
You can shrink the segment of your RAM so it doesn't overlap.

_________________
nesdoug.com -- blog/tutorial on programming for the NES


Top
 Profile  
 
PostPosted: Fri Feb 08, 2019 7:08 pm 
Offline

Joined: Tue Aug 28, 2018 8:54 am
Posts: 143
Location: Edmonton, Canada
I can, but I will loose 256 - FT_BASE_SIZE = 116 bytes to nothing too. Seems like a waste.


Top
 Profile  
 
PostPosted: Fri Feb 08, 2019 7:12 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 21391
Location: NE Indiana, USA (NTSC)
Then make another memory area at $690-$6FF or something.

_________________
Pin Eight | Twitter | GitHub | Patreon


Top
 Profile  
 
PostPosted: Fri Feb 08, 2019 7:35 pm 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 7460
Location: Canada
yaros wrote:
And in this project I should not use too much RAM to overlap with this address, but can I actually make ca65 to reserve space at certain address without creating separate segment in the middle of the RAM?

If the segment has the align attribute on it you can use the .align directive to make it pad to a power-of-two boundary:
Code:
; CFG has "align=256" on the current segment
.align 256
thing: .res 55 ; this will be aligned to 256 bytes


Top
 Profile  
 
PostPosted: Sun Feb 10, 2019 2:20 pm 
Offline

Joined: Tue Aug 28, 2018 8:54 am
Posts: 143
Location: Edmonton, Canada
rainwarrior wrote:
If the segment has the align attribute on it you can use the .align directive to make it pad to a power-of-two boundary


Thank you, this makes more sense to me.


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

All times are UTC - 7 hours


Who is online

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