Namespacing symbols used by an ASM6 library
Page 2 of 2

Author:  FrankenGraphics [ Sun Apr 14, 2019 4:17 am ]
Post subject:  Re: Namespacing symbols used by an ASM6 library

I think just PENTLY_ would work nicely for anyone, especially if using koitsus' line breaks and groupings.

Author:  tepples [ Tue Jun 25, 2019 10:42 am ]
Post subject:  Re: Namespacing symbols used by an ASM6 library

za909 wrote:
Since my ASM6 projects are rarely that big

I'm pretty sure users of NESmaker expect to use ASM6 for projects as big as Mega Man 4 and Dragon Warrior IV. I assume this based on the fact that ASM6 is the required assembler for NESmaker, and NESmaker targets a 4 Mbit board.

za909 wrote:
I tend not to use any kind of scope prefix if the variables or constants are unique enough. Why would I prefix a musical note constant if I know there really is no reason to name anything else in the project a "D_2" or anything similar.

Different libraries by different authors that are included in an ASM6 project much larger than your own could define D_2 to mean completely unrelated things.

za909 wrote:
as things stand, programming a tex output parser/converter would take more time than it takes for me to manually "convert" my songs + I have features added that are simply not part of Famitracker or any other similar tool, so many effects are best configured by hand anyway.

I tried this at first with Pently. But then I ran into a project where the composer that my producer hired insisted on the FamiTracker module being the authoritative version (in data modeling lingo, the single source of truth), which a game's build process converts to the format used by the driver and automatically re-converts whenever the composer changes the module. And then I ran into another project where the producer insisted on the FamiTracker module being the authoritative version in order to be able to switch to a different composer mid-project. Because I was a programmer on the former project and a candidate for composer on the latter, not the producer, I lacked the authority to make the Pently score the authoritative version.

za909 wrote:
So overall, a single note in my music data never looks more complicated than this (OR the constant with the upper 3 bits for duration, with the constant specifying the note in the low 5 bits, relative to the currently set "octave")

A 5:3 bit split between pitch and duration appears common in these libraries.

za909 wrote:
ASM6 has enough "scope levels" where I can feel very comfortable with the header of the song data having a normal label, and then all channels, and then all the sections for each channel using local labels with a convention of @PU1_0, @PU1_1, @PU1_2, ... same with PU2, TRI and NOI.

My converter already namespaces the IDs and definition labels of sound effects, instruments, drums, patterns, and songs. Namespacing internal labels, internal constants, and internal macros, such as your LP0 and JPC, is where I got hung up. It'll take a while to actually build, and I'm not yet being paid to work on Pently, whereas I am being paid to work on other projects.

Author:  tepples [ Thu Jul 11, 2019 9:24 am ]
Post subject:  Re: Namespacing symbols used by an ASM6 library

Prefixing song data constants and macros is filed as #42.

Author:  tepples [ Mon Jul 22, 2019 6:07 pm ]
Post subject:  Re: Namespacing symbols used by an ASM6 library

So I've spent a couple days on prefixing driver-internal function and variable names and prefixing macros and constants in song data. I'd like to verify that all unprefixed symbols are hidden by a rept 1 scope block. I tried having ASM6F write a Mesen label file, but I didn't see a way to exclude rept-scoped labels.

Is there a way to determine what symbols are visible at the top level after having assembled a file in ASM6?

Page 2 of 2 All times are UTC - 7 hours
Powered by phpBB® Forum Software © phpBB Group