#libnds bgInit function has a bunch of safety checks (github.com/devkitPro/li...) before it calls library code doing the real job github.com/devkitPro/li....
It still uses good old REG_BGxCNT registers, although there's an alias to them, and has its own internal state github.com/devkitPro/li...