English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Asm / Hardware

 
 
Thread Tools
Old 10 March 2022, 01:17   #1
DanielAllsopp
Registered User
 
DanielAllsopp's Avatar
 
Join Date: Feb 2018
Location: Northumberland, UK
Posts: 272
Trigger MOD Pattern

Evening! Not expecting anyone to be around at this time, but has anyone got any decent experience of using Frank Wille's ptplayer? I've got some mod's with a different pattern for end of level etc, and I see that ptplayer itself states this:

E8 command can be used as a trigger for your main program.

But I can't find any information on how to trigger a different pattern within the mod file itself, which is already playing. I've tried to move the pattern number into the function:

Code:
  moveq	#17,d0
  jsr _mt_E8Trigger
...but this just crashes out.

Can anyone help me out here? It would be greatly appreciated.
DanielAllsopp is offline  
Old 10 March 2022, 09:54   #2
DanielAllsopp
Registered User
 
DanielAllsopp's Avatar
 
Join Date: Feb 2018
Location: Northumberland, UK
Posts: 272
Just doing some reading and E8 is for triggering events from the MOD file and not the other way around. So, it’s read-only.

Back to some reading…
DanielAllsopp is offline  
Old 10 March 2022, 10:34   #3
phx
Natteravn
 
phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,537
You can put any number of sub-songs into a module, which share the same instruments. Assuming your main song is between song-steps 0 and 10, you would put a B00-command at the end of its last pattern (at step 10) to loop back to step 0. Then you can assign your level-end pattern to song position 11 and start it by calling _mt_init with d0=11.

This is how we did it in our games. There is no function to play individual patterns yet, and I don't see why it is needed.
phx is offline  
Old 10 March 2022, 11:03   #4
DanielAllsopp
Registered User
 
DanielAllsopp's Avatar
 
Join Date: Feb 2018
Location: Northumberland, UK
Posts: 272
Quote:
Originally Posted by phx View Post
You can put any number of sub-songs into a module, which share the same instruments. Assuming your main song is between song-steps 0 and 10, you would put a B00-command at the end of its last pattern (at step 10) to loop back to step 0. Then you can assign your level-end pattern to song position 11 and start it by calling _mt_init with d0=11.

This is how we did it in our games. There is no function to play individual patterns yet, and I don't see why it is needed.
Yeah, sub-songs is what I was referring to. Sorry about that. I've also just figured out that I need to call _mt_init again so I'm all sorted I think.

Thanks for your reply though
DanielAllsopp is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Possible to trigger samples from the keyboard? ElectroBlaster Coders. Blitz Basic 2 26 May 2020 21:14
Using keyboard to trigger sample replay? ElectroBlaster Coders. AMOS 5 24 July 2019 17:22
Manually trigger a IRQ7 interrupt hwetters support.FS-UAE 2 03 January 2019 14:03
.MOD Pattern Stripper? volvo_0ne request.Apps 3 23 February 2017 21:51
Trigger level 7 interrupt geir support.FS-UAE 2 15 August 2015 22:45

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 22:39.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.08773 seconds with 12 queries