I guess I don't understand how the PRG Addresses work. Does the assembler asm6 translate each of my identical labels in each our lower banks into PRG Addresses listed in the ROM (the .nes file)? Or does Mesen create the PRG Addresses so that the mlb file can work?Sour wrote:I'm not entirely sure I'm following what you're saying.
Like I said though, Mesen has no concept of label scope - it can't redefine the same label multiple times because of this.
If multiple identical labels existed, the debugger would have no idea which one was being referred to by a given line of code, which makes it harder/impossible to display a corresponding tooltip, or to navigate to the label, or to open the label in the hex editor, etc.
Regardless, I will try again. Somehow you must have access to the ROM addresses to emulate a NES. I thought it might be possible to specify a ROM address in your mlb file (i.e. $9000). That would be just one address. But, you'd have to get your assembler to treat those addresses with the same method you use to translate my identical labels into the PRG Addresses. For example, in each of the lower banks ($8000-$BFFF) in our MMC1 game (note: the 2 higher banks ($C000-$FFFF) can be either bank 15 or bank 31) there are certain bytes with identical labels, let's pretend one of those labels is named abyte and is always labeling address $9000. So my idea was to somehow specify in your mlb file that abyte points to address $9000.
- P:*9000:abyte or
- I:9000:abyte| note: I for identical
Somehow when switching banks the PRG Address for abyte changes to the appropriate value... so you already have that code written. Just was wondering if it was possible to reuse that code so that when trying to label $9000, you might be able to translate that $9000 into the appropriate PRG Address depending on what bank is selected in the emulated game?
Oh ok! Great choice of "R".Sour wrote:When I mentioned improving asm6f, I strictly meant the .mlb file export feature it contains, not the actual assembler.
"R" in the mlb label files refers to the 2kb of internal RAM that the NES has (e.g $0000 to $1FFF in CPU memory)