You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As described in the ASM6 manual, ASM6's excuse for a linker is include, which behaves the same way as the C language preprocessor's #include. Because ASM6 lacks file-local symbols, functions and variables within the driver, such as update_channel_hw, graceTime, and attackPitch, escape the context of the audio driver and may collide with labels used by the main program. Some contrived examples follow:
update_channel_hw means what, DMA channels?
graceTime sounds like it might be used by mercy invincibility
attackPitch sounds like pointing the nose of an aircraft up or down
The solution suggested in "Namespacing symbols used by an ASM6 library" on NESdev BBS is to prefix everything. The first half was #42, adding a PENTLY_ prefix to constants and macros in music data. This, the second half, is about RAM and ROM addresses and constants not related to music data.
Most symbols declared outside a scope should contain pently, case insensitive. Some categories are done:
Public labels begin with pently_
C-callable aliases for public labels begin with _pently_
Configuration flags begin with PENTLY_USE_
With new guidelines to follow:
Like music data constants, driver-internal constants begin with PENTLY_
Internal ROM labels begin with pentlyi_ to preserve separation of the defined API from the internals
Internal RAM labels, such as those allocated by pentlybss.py, also begin with pentlyi_
The text was updated successfully, but these errors were encountered:
As described in the ASM6 manual, ASM6's excuse for a linker is
include
, which behaves the same way as the C language preprocessor's#include
. Because ASM6 lacks file-local symbols, functions and variables within the driver, such asupdate_channel_hw
,graceTime
, andattackPitch
, escape the context of the audio driver and may collide with labels used by the main program. Some contrived examples follow:update_channel_hw
means what, DMA channels?graceTime
sounds like it might be used by mercy invincibilityattackPitch
sounds like pointing the nose of an aircraft up or downThe solution suggested in "Namespacing symbols used by an ASM6 library" on NESdev BBS is to prefix everything. The first half was #42, adding a
PENTLY_
prefix to constants and macros in music data. This, the second half, is about RAM and ROM addresses and constants not related to music data.Most symbols declared outside a scope should contain
pently
, case insensitive. Some categories are done:pently_
_pently_
PENTLY_USE_
With new guidelines to follow:
PENTLY_
pentlyi_
to preserve separation of the defined API from the internalspentlybss.py
, also begin withpentlyi_
The text was updated successfully, but these errors were encountered: