I Made a Sudoku Thing

Discussion of development of software for any "obsolete" computer or video game system. See the WSdev wiki and ObscureDev wiki for more information on certain platforms.
User avatar
tokumaru
Posts: 12668
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: I Made a Sudoku Thing

Post by tokumaru »

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?
User avatar
nicklausw
Posts: 376
Joined: Sat Jan 03, 2015 5:58 pm
Location: ...

Re: I Made a Sudoku Thing

Post by nicklausw »

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.
User avatar
tokumaru
Posts: 12668
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: I Made a Sudoku Thing

Post by tokumaru »

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.
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?
User avatar
nicklausw
Posts: 376
Joined: Sat Jan 03, 2015 5:58 pm
Location: ...

Re: I Made a Sudoku Thing

Post by nicklausw »

...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.