It is currently Fri Jul 20, 2018 6:01 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Wed Dec 20, 2017 1:23 pm 
Offline

Joined: Sun Dec 10, 2017 9:01 am
Posts: 2
I'm trying to understand why NESASM is placing my .incbin file at $0524 in ROM file when the i want it to place at $8514 ?
The only code im compileing is:

Code:
  .inesprg 8   ; 8x 16KB PRG code
  .ineschr 0   ; 1x  8KB CHR data
  .inesmap 0   ; mapper 0 = NROM, no bank swapping
  .inesmir 0   ; background mirroring
 
  .bank 0
  .org $8514
  .incbin "noheader.nsf"


Top
 Profile  
 
PostPosted: Wed Dec 20, 2017 1:30 pm 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 7316
Location: Seattle
NESASM forces you to use 8 KiB banks.
ORG only lets you set the address within that bank (as well as the nominal memory address that will be used when it's referred to later)
NES files have a sixteen byte header.

($8514) & $1FFF = $0514
$0514 + 16 = $0524.

Also, you are going to have a bad time trying to stuff a bigger-than-32KiB NSF inside a ROM. Just use rainwarrior's eznsf tool instead.


Top
 Profile  
 
PostPosted: Wed Dec 20, 2017 4:14 pm 
Offline
User avatar

Joined: Sat Feb 12, 2005 9:43 pm
Posts: 10612
Location: Rio de Janeiro - Brazil
ROM begins at $8000, so the contents of file offset $0524 will indeed be loaded at CPU address $8514, after you take the 16-byte ($10 in hex) iNES header into account.

But yeah, I don't know if NESASM's 8KB banks limitation will let you .incbin a file larger than that.


Top
 Profile  
 
PostPosted: Sun Dec 24, 2017 8:57 am 
Offline
User avatar

Joined: Mon Feb 07, 2011 12:46 pm
Posts: 991
tokumaru wrote:
But yeah, I don't know if NESASM's 8KB banks limitation will let you .incbin a file larger than that.
I believe it will; incbin is the only exception to that limitation.

_________________
.


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

All times are UTC - 7 hours


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:  
Powered by phpBB® Forum Software © phpBB Group