Skip to content
shaw02 edited this page Sep 3, 2019 · 5 revisions

Function Reference: nsd_main()

Define

    void    __fastcall__    nsd_main(void );

Inputs

No inputs


Outputs

No outputs


Contents

This is main routine of sound driver.
User application should call this function nsd_main() every flame or 1/60 sec.


Notes

Usually, this function are called from V-Blank (NMI) interrupt.
However; MUSTNOT written directly the pointer of function nsd_main() to interrupt vector of 6502.
This function nsd_main() does not keep each register (A X Y).

This function will play the BGM and SE.
Therefore, data of BGM and SE must be load to real memory area of CPU.
If there is bank (mapper LSI), user application can call BGM and SE separately.
Please refer nsd_main_bgm() and nsd_main_se()

  • Home
  • Developer's Guide
  • Function reference
  • Structure reference
  • MML command reference
    • Setting command
    • Define Envelope pattern (E(){})
    • Define Patch pattern (P(){})
    • Define Delta PCM (DPCM{})
    • Define FDS carrer wave (FDSC(){})
    • Define FDS modulator wave (FDSM(){})
    • Define VRC7 voice (VRC7(){})
    • Define N16x voice (N163(){})
    • Define Sequence (BGM(){},SE(){},Sub(){})
      • Notes (a,b,c,d,e,f,g)
      • Rest (r,w)
      • Key shift (k)
      • Length (l)
      • Octave (o)
      • Quantize (q)
      • Sweep (s)
      • Tempo (t)
      • Volume (v)
      • Memory witer (y)
      • VRC7 register write (yV)
      • Detune (D,D%)
      • Envelop (E@,Ev,Em,En)
      • Pseudo echo (EC)
      • Pseudo echo buff control
      • SN5b Envelop Frequency (F)
      • Key signature (K{})
      • Scale (scale())
      • Jump (j)
      • Loop (L)
      • n16x channnel number (NC)
      • Portamento (P)
      • Portamento2 ({})
      • Relase control (Rm,R@,Rv)
      • Sub routine call (S)
      • SE call (SE)
      • Track (TR)
      • Call macro ($)
      • Define local macro ($$)
      • Set Instruments (@)
      • Set Patch (@P)
      • Set VRC7 user instruments (@V)
      • Set FDS carrer waveform (@FC)
      • Set FDS modulator wafevorm (@FM)
      • Set FDS modulator frequency (@FF)
      • Set FDS master volume (@FV)
      • Load n16x wafe vorm (@N)
      • Load n16x wafe vorm (@NL)
      • Set n16x sample length (@NS)
      • Relative volume ((,))
      • Relative octave (<,>,",')
      • Repeat type A ([,:,])
      • Repeat type B (|:,\,:|)
      • Tie (^)
      • Transpose (_,__)
Clone this wiki locally