30 May 2014, 12:16 | #21 | |
Going nowhere
Join Date: Oct 2001
Location: United Kingdom
Age: 50
Posts: 9,024
|
Quote:
|
|
30 May 2014, 13:57 | #22 |
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,561
|
Just tried it again with some different mods. Stringray's source and my updated version both seem to work here.
Which one did you use? Note, that when using the updated version (2.0 on Aminet) the API for mt_init changed. You have to pass additionally A1=0 (no separated samples) and D0=0 (start playing at position 0). Otherwise, on which hardware did you test. And which mod? Maybe you can provide a test source or binary? |
31 May 2014, 00:16 | #23 |
Registered User
Join Date: May 2010
Location: London, UK
Posts: 268
|
I've been trying to read up and figure out amiga interrupts because this is one of many areas I'm pretty ignorant on so I thought I'd edit it the code to show at which scan line the player starts and for how long it runs. It seems to start slightly earlier each frame, should this be the case?
|
31 May 2014, 12:39 | #24 | |
Going nowhere
Join Date: Oct 2001
Location: United Kingdom
Age: 50
Posts: 9,024
|
Quote:
The mods are for Where Time Stood Still. I thought it was an error in one mod that had an unsupported effect, but then I tried it with another mod and the same problem occurred, 20 seconds or so into playback, it stopped playing. I will download your version from Aminet and see if that makes a difference. |
|
01 June 2014, 13:19 | #25 | |
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,561
|
Quote:
You could run a 60Hz screen mode and the playback still has the expected speed. |
|
01 June 2014, 13:28 | #26 | ||
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,561
|
Quote:
Quote:
Does it stop at exactly the same position everytime? What does "stopping" mean? The player becomes silent? The last notes continue to play forever? Something crashed? I really would like to help, if I had something to reproduce. |
||
01 June 2014, 14:41 | #27 | |
Registered User
Join Date: May 2010
Location: London, UK
Posts: 268
|
Quote:
|
|
02 June 2014, 02:38 | #28 | |
Going nowhere
Join Date: Oct 2001
Location: United Kingdom
Age: 50
Posts: 9,024
|
Quote:
I.AM.A.TWAT One thing I had to do though was put an EVEN statement before MT_VAR otherwise there was some addressing problems for 68000 Amigas. Last edited by Galahad/FLT; 02 June 2014 at 03:18. |
|
02 June 2014, 14:20 | #29 | ||
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,561
|
Quote:
Quote:
|
||
03 June 2014, 07:20 | #30 |
move.l #$c0ff33,throat
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,865
|
Indeed, happened when I changed the mt_mastervol routine and deleted the pointer tables.
Last edited by StingRay; 03 June 2014 at 07:25. |
03 June 2014, 09:42 | #31 |
Going nowhere
Join Date: Oct 2001
Location: United Kingdom
Age: 50
Posts: 9,024
|
Well the routine works a treat gents, and you both get a credit in the game, so now its nearly finished
|
17 August 2014, 22:45 | #32 | |
Registered User
Join Date: Sep 2008
Location: Gainesville U.S.A.
Posts: 771
|
Quote:
- no KS2 dependency - no guru (yet) on 68000 - doesn't demand 1meg to run. Experimental commands: PHXInst vbr,pal or nts - Install the player (if vbr is not 0 the value can be found in the debugger) PHXInit address - initialize mod at address PHXEnable 0=no music not0=music PHXRem - remove the player. How to install: Put phx.obj into Blitz2:Blitzlibs/Otherlibs drawer. Run the makedeflibs program. Shutdown and restart Blitz. Paste the test program into the editor. If all went well the PHX commands will be highlighted the same as BASIC keywords. Fill in the path and name of a module and try to compile and run it. To put Blitz back the way it was delete phx.obj and re-run makedeflibs. Code:
chip.l=2 vbr.l=0 pal.l=1 nts.l=0 LoadBank 0,"some.mod",chip a.l = Peek.l(Addr Bank(0)) NPrint a PHXInst vbr,pal PHXInit a PHXEnable 1 ;0 no music For j.l=1 To 25000 NPrint j Next j PHXRem |
|
22 July 2016, 05:06 | #33 |
Registered User
Join Date: Feb 2011
Location: Italy/Rome
Posts: 2,344
|
are there some example to show how it work?
|
22 July 2016, 09:45 | #34 |
Registered User
Join Date: Mar 2016
Location: Australia
Posts: 907
|
I just did a quick hack to play a module and it seemed to work. Haven't tried SFX yet.
Note: I didn't use the small data model version. I used ptplayer_noa4.asm. Code:
; mt_init(a6=CUSTOM,a0=TrackerModule, a1=Samples|NULL,d0=InitialSongPos) lea CUSTOM,a6 lea module,a0 move.l #0,a1 move.l #0,d0 jsr mt_init ; mt_install_cia(a6=CUSTOM, a0=AutoVecBase, d0=PALflag.b) move.l vectorBase,a0 move.b #1,d0 jsr mt_install_cia move.b #1,mt_Enable ; Start playing module: incbin "module.mod" vectorBase: dc.l 0 ; make sure this has the correct vector base |
22 July 2016, 12:13 | #35 |
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,561
|
Just a note, because the order of mt_init and mt_install_cia in alpine9000's example might be confusing:
Usually you will do mt_install_cia only once at the start of your program. It install a level 6 CIA-B interrupt handler and enables TimerA/B interrupts. mt_init is called for every new module you want to play. Also for sub-modules, as you can pass the start position. |
03 September 2016, 14:02 | #36 | |
Moderator
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,731
|
Quote:
If you need the compression for the module then P6112 supports sound effects by way of setting the number of channels, freeing the other channels for playing samples at any time. |
|
16 November 2016, 17:09 | #37 |
Inviyya Dude!
Join Date: Sep 2016
Location: Amiga Island
Posts: 2,801
|
I tried to include this in my code, but get lots of errors when compiling (./vasmm68k_mot -Fhunkexe -o e -nosym Innviya/main.asm):
error 3005: reloc type 10, size 16, mask 0xffffffffffffffff (symbol mt_Enable + 0xff800000) not supported error 3009: undefined symbol <_LinkerDB> at CODE+0x81c, reloc type 1 error 3005: reloc type 10, size 16, mask 0xffffffffffffffff (symbol mt_Enable + 0xffffffc0) not supported error 3009: undefined symbol <_LinkerDB> at CODE+0x8aa, reloc type 1 error 3005: reloc type 10, size 16, mask 0xffffffffffffffff (symbol mt_chan1 + 0xffffe000) not supported Anyone any ideas whats wrong here and how I can fix it?? |
16 November 2016, 17:28 | #38 | |
Inviyya Dude!
Join Date: Sep 2016
Location: Amiga Island
Posts: 2,801
|
Quote:
Works with ptplayer_noa4.asm though, so maybe I will just use that one.. edit: but now my program hangs... damn... Last edited by Tigerskunk; 16 November 2016 at 17:38. |
|
05 June 2017, 10:26 | #39 | |
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,561
|
There have been some improvements to the ptplayer 2.0 release on Aminet, years ago. Besides some bug fixes and enhancements there is a more flexible function for playing sound effects, which was already used in games like Power Glove and Tiger Claw. From the readme:
Quote:
Code:
_mt_playfx(a6=CUSTOM, a0=SfxStructurePointer) Request playing of a prioritized external sound effect, either on a fixed channel or on the most unused one. Structure layout of SfxStructure: APTR sfx_ptr (pointer to sample start in Chip RAM, even address) WORD sfx_len (sample length in words) WORD sfx_per (hardware replay period for sample) WORD sfx_vol (volume 0..64, is unaffected by the song's master volume) BYTE sfx_cha (0..3 selected replay channel, -1 selects best channel) BYTE sfx_pri (unsigned priority, must be non-zero) When multiple samples are assigned to the same channel the lower priority sample will be replaced. When priorities are the same, then the older sample is replaced. The chosen channel is blocked for music until the effect has completely been replayed. Now a reworked 5.0 can be found on Aminet (http://aminet.net/mus/play/ptplayer.lha), which is portable enough to work on most assemblers. Tested are: Devpac, vasm, PhxAss, Basm, SNMA, AsmOne, AsmPro. Additionally I added a leading underscore to all exported function- and variable-names, so they can be directly accessed from C source texts as well. |
|
05 June 2017, 15:29 | #40 |
old chunk of coal
Join Date: Nov 2011
Location: Hungary
Posts: 1,307
|
Nice! Have you considered adding small stubs that take care of the stack/register parameters, and get the VBR and the chipset address? That would make it much easier to use it from C.
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
MOD-player with external sound effects | phx | Coders. Asm / Hardware | 14 | 18 June 2012 10:41 |
Amiga Forever&Protracker bad sound | moriez | support.WinUAE | 14 | 06 January 2009 01:26 |
What was the first Amiga tracker to support external midi instruments | Kola | Amiga scene | 3 | 09 December 2008 19:20 |
Sound/Protracker package | Dunny | request.Apps | 3 | 23 July 2008 19:17 |
Sampled sound player? | cdoty | Coders. General | 7 | 25 August 2007 16:21 |
|
|