Apple2.gs Forums
Discussions for Apple IIgs Programming and other fun stuff. // Infinitum!

Home » Apple IIgs Programming » Audio » NinjaTracker (Info about the new NinjaTracker tool.)
icon14.gif  Re: NinjaTracker [message #83 is a reply to message #82] Wed, 03 June 2015 08:41 Go to previous messageGo to previous message
Dagen is currently offline  Dagen
Messages: 27
Registered: August 2014
Location: United States
Member

Here's an example of how I use the ninjatracker source in my code.

In my case, I'm including it directly in my code with the "put" directive. The only difference is that I remove the "org" statement and just let it compile wherever. I don't believe the player or data files need to be page aligned, but I wouldn't go cross any bank boundries ($FFFF+).

*--- In my S16 program after starting the memory manager tools

            lda   #Mod1SSM                 
            ldx   #^Mod1SSM
            jsr   ReadFile                 ; READ SSM FILE
            _Err  "Module Not Found! : $"  ; CHECK FOR ERRORS

            lda   $06                      ; PATCH POINTERS FOR NINJATRACKER INIT
            sta   Music_File+2
            lda   $04
            sta   Music_File



            lda   #Mod1W
            ldx   #^Mod1W
            jsr   ReadFile                 ; READ WAVE FILE
            _Err  "Module Not Found! : $"  ; CHECK FOR ERRORS

            lda   $06                      ; PATCH POINTERS FOR NINJATRACKER INIT
            sta   Wave+2
            lda   $04
            sta   Wave

            jsl   Init_Sound
*--- sound should be playing after this

                                           ; do something ... 

Mod1SSM     str   'STARDUST.SSM'           ; Module to be played
Mod1W       str   'STARDUST.W'             ; Module to be played
            put   ntengine                 ; the ninjatracker source above (minus 'org' statement)



I can post a full example application later with the complete ReadFile routine. This post was mostly to make sure that no one duplicates my effort to make the source usable in Merlin 16 & Merlin 32.

I hope this helps in some way. Very Happy
 
Read Message
Read Message icon14.gif
Read Message
Previous Topic: Thinking about the big picture of sound on the IIGS
Goto Forum:
  


Current Time: Wed Feb 05 15:00:02 MST 2025

Total time taken to generate the page: 0.02002 seconds