It is currently Tue Dec 12, 2017 11:07 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 49 posts ]  Go to page Previous  1, 2, 3, 4
Author Message
PostPosted: Thu May 21, 2015 6:47 pm 
Offline
User avatar

Joined: Sat Feb 12, 2005 9:43 pm
Posts: 10164
Location: Rio de Janeiro - Brazil
I'm not sure I understand the question, but ASM6 is completely unaware of NES mappers. It's your responsibility to arrange the banks and .org/.base the addresses correctly for the mapper you're using. Are you having some trouble with that?


Top
 Profile  
 
PostPosted: Fri May 22, 2015 9:31 am 
Offline
User avatar

Joined: Sat Jan 03, 2015 5:58 pm
Posts: 368
Location: ...
tokumaru wrote:
I'm not sure I understand the question, but ASM6 is completely unaware of NES mappers. It's your responsibility to arrange the banks and .org/.base the addresses correctly for the mapper you're using. Are you having some trouble with that?

Cuz I mean, you say that the NES is mapped so that $c000 is right after the header at the beginning (a nes thing) yet asm6 is compatible with anything 6502.


Top
 Profile  
 
PostPosted: Fri May 22, 2015 10:22 am 
Offline
User avatar

Joined: Sat Feb 12, 2005 9:43 pm
Posts: 10164
Location: Rio de Janeiro - Brazil
nicklausw wrote:
Cuz I mean, you say that the NES is mapped so that $c000 is right after the header at the beginning (a nes thing)

Since the header is just metadata prepended to the ROM file, it's not really part of the addressing space in any way. Back when I got started with NES development people didn't even define the header in the source code, they just merged a 16-byte binary file created in an hex editor with the ROM after assembly.

Now it's more common to define the header in the source code, but the assembler doesn't really know what that data is, it just puts the bytes you tell it to in the beginning of the file.

Quote:
yet asm6 is compatible with anything 6502.

Yes.

From what I understand, ASM6 will start outputting data to the file as soon as it finds commands that generate output, and the first .ORG or .BASE will set the program counter so that the addresses of labels can be calculated. Subsequent .ORGs will output filler bytes until the specified address is reached, since the current address is known. Subsequent .BASEs will simply redefine the PC, without generating output, which is useful for creating new banks, because you want to continue appending data to the file but the PC has to be changed back to what it should be at the beginning of a bank.

If you're unsure about how to generate ROMs with a certain structure, let me know exactly what you're trying to do and I'll see if I can help. Are you targeting a mapper other than NROM? What exactly isn't working as you expected?


Top
 Profile  
 
PostPosted: Fri May 22, 2015 11:30 am 
Offline
User avatar

Joined: Sat Jan 03, 2015 5:58 pm
Posts: 368
Location: ...
...oh my god, it makes sense. I think.

So unlike WLA DX, .org doesn't go to a certain area in the source, it's just for address calculation? FINALLY I get it.


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

All times are UTC - 7 hours


Who is online

Users browsing this forum: ReverendSA and 1 guest


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