English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General > Coders. Releases

 
 
Thread Tools
Old 01 March 2021, 18:53   #141
Antiriad_UK
OCS forever!

Antiriad_UK's Avatar
 
Join Date: Mar 2019
Location: Birmingham, UK
Posts: 380
Quote:
Originally Posted by phx View Post
Why do you include your custom.inc into ptplayer.asm?
Told you, crazy demo coders
I must admit I've gone the other way now and have separate objects and link them.
Antiriad_UK is online now  
Old 01 March 2021, 23:34   #142
Antiriad_UK
OCS forever!

Antiriad_UK's Avatar
 
Join Date: Mar 2019
Location: Birmingham, UK
Posts: 380
Quote:
Originally Posted by DanScott View Post
Just popping Antiriads version into my demo system.

I'm getting a "repeatedly defined symbol" error, as the EQU's for the hardware registers are conflicting with my "custom.inc"

Might be worth popping an "CUSTOM_REGS equ 0/1" or similar, around those (and the CIA defines)
So could do something like this:

Code:
; Custom chip registers - try and catch predefined EQUs - if it fails sort this
; out yourself :)
	ifnd CUSTOM
CUSTOM		equ	$dff000
	endc	;CUSTOM

	ifnd INTREQR
INTREQR		equ	$01e
INTENAR		equ	$01c
DMACON		equ	$096
INTENA		equ	$09a
INTREQ		equ	$09c
	endc	;INTREQR

	ifnd AUD0LC
AUD0LC		equ	$0a0
AUD0LEN		equ	$0a4
AUD0VOL		equ	$0a8
AUD1LC		equ	$0b0
AUD1LEN		equ	$0b4
AUD1VOL		equ	$0b8
AUD2LC		equ	$0c0
AUD2LEN		equ	$0c4
AUD2VOL		equ	$0c8
AUD3LC		equ	$0d0
AUD3LEN		equ	$0d4
AUD3VOL		equ	$0d8
	endc	;AUD0LC

; Audio channel registers
	ifnd	AUDLC
AUDLC		equ	0
AUDLEN		equ	4
AUDPER		equ	6
AUDVOL		equ	8
	endc	;AUDLC

; CIA registers
	ifnd	CIAA
CIAA		equ	$bfe001
CIAB		equ	$bfd000
	endc	;CIAA

	ifnd	CIATALO
CIAPRA		equ	$000
CIATALO		equ	$400
CIATAHI		equ	$500
CIATBLO		equ	$600
CIATBHI		equ	$700
CIAICR		equ	$d00
CIACRA		equ	$e00
CIACRB		equ	$f00
	endc	;CIATALO
Which would catch everything in my old ".inc" file that I was using until I switched to CBM includes. But it still will fail for some asmone/include everything in one file type people.

Separate objects/linking files is better aside ( ) Maybe it would be easier just to redefine all those values as something like
Code:
__CUSTOM equ	$dff000
...
__AUD0LC		equ	$0a0
...
__CIATALO		equ	$400
Edit: I've updated the source with the first option.

Last edited by Antiriad_UK; 02 March 2021 at 10:49. Reason: Updated source
Antiriad_UK is online now  
Old 01 March 2021, 23:55   #143
DanScott
Lemon. / Core Design

DanScott's Avatar
 
Join Date: Mar 2016
Location: Tier 5
Posts: 962
My solution was to just delete them from the player source

Anyhow.. the MINIMAL setting lopped off about 8k from my test.exe Every little helps...
DanScott is offline  
Old 02 March 2021, 00:10   #144
Antiriad_UK
OCS forever!

Antiriad_UK's Avatar
 
Join Date: Mar 2019
Location: Birmingham, UK
Posts: 380
Quote:
Originally Posted by DanScott View Post
My solution was to just delete them from the player source
I'd be disappointed with anything less
Antiriad_UK is online now  
Old 20 March 2021, 23:52   #145
h0ffman
Registered User
 
Join Date: Aug 2008
Location: Salisbury
Posts: 518
Found a bug. The 9 command isn't being honoured when using sample 0. The trick allows for playing a sample offset at different volumes. It works by running a setup line first with no note and the command with the instrument number. Playing a note with sample 0 then plays the sample at the previously set offset. For example..

--- 5 910
D-3 0 C20

There's a few variants to this aswell. I'll roll up a demo mod with them in tomorrow.
h0ffman is offline  
Old 21 March 2021, 01:44   #146
phx
Natteravn

phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 1,869
Quote:
Originally Posted by h0ffman View Post
It works by running a setup line first with no note and the command with the instrument number. Playing a note with sample 0 then plays the sample at the previously set offset.
From looking at the source I would say it cannot work, because command 9 is only executed when a note was given with it. And unless I made a stupid mistake I should have copied that behaviour from the official V2.3B player source.

Which players or trackers are known to work like you said?
Although, probably I will implement it neverthess, as long as it doesn't break other modules.

Quote:
There's a few variants to this aswell. I'll roll up a demo mod with them in tomorrow.
Thanks.
phx is offline  
Old 21 March 2021, 08:53   #147
h0ffman
Registered User
 
Join Date: Aug 2008
Location: Salisbury
Posts: 518
Yeah it does look that way in the source but actually when it's used with a note the command gets executed twice. It plays the note at the offset and subsequently moves the offset on again.

Pretty sure all the versions of protracker have this "feature" including the original replay source. Bubsys clone also supports this along with the player 6.1
h0ffman is offline  
Old 21 March 2021, 12:51   #148
daxb
Registered User
 
Join Date: Oct 2009
Location: Germany
Posts: 2,792
Quote:
Originally Posted by h0ffman View Post
--- 5 910
D-3 0 C20
Usually, I quite often used the opposite command order like this (PT3.62):
Code:
--- 5 C20
D-3 0 910
However, I remember that PT2.x vs. PT 3.x handled (non-) existence of sample number differently in some cases.
daxb is offline  
Old 21 March 2021, 13:27   #149
h0ffman
Registered User
 
Join Date: Aug 2008
Location: Salisbury
Posts: 518
Quote:
Originally Posted by daxb View Post
However, I remember that PT2.x vs. PT 3.x handled (non-) existence of sample number differently in some cases.
I don't trust any of the v3's. I'm still using 2.3d
h0ffman is offline  
Old 21 March 2021, 14:12   #150
phx
Natteravn

phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 1,869
I think I made a mistake and optimised that feature away.
According to the original PT2.3B source it should work without a note.

I got nothing to reproduce the problem, but maybe you want to test my fix from the latest beta-archive:
http://sun.hasenbraten.de/~frank/TEST/ptplayer61beta.lha
phx is offline  
Old 22 March 2021, 10:54   #151
girv
Mostly Harmless

girv's Avatar
 
Join Date: Aug 2004
Location: Northern Ireland
Posts: 973
Code:
- New function mt_loopfx() for playing looped sound effects.
Just what I needed! Many thanks Using it in Turbo Tomato with modifications to set up the interrupts via the OS.
girv is offline  
Old 22 March 2021, 13:36   #152
h0ffman
Registered User
 
Join Date: Aug 2008
Location: Salisbury
Posts: 518
Quote:
Originally Posted by phx View Post
I think I made a mistake and optimised that feature away.
According to the original PT2.3B source it should work without a note.

I got nothing to reproduce the problem, but maybe you want to test my fix from the latest beta-archive:
http://sun.hasenbraten.de/~frank/TEST/ptplayer61beta.lha
thanks pal, i've plugged it in and the particular scenario I had is now working perfectly. I've been a bit tied up last few days but will try and create a proper test module sometime this week.

Also double thanks for implementing the master volume changes (which I think I missed?). I've got smooth transitions between mods now.

side note, I forgot I modified the mt_init to use a unified sample pack for all modules. i built a little app which finds all the unique samples (by name) in a colletion of modules, exports a single sample pack and adds references inside each module. Guess I'm mentioning it in case there was anybody else here who might need that? It just made the process of making the music for my game a lot easier as each mod can be written separately but also share samples.
h0ffman is offline  
Old 22 March 2021, 15:31   #153
phx
Natteravn

phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 1,869
Quote:
Originally Posted by h0ffman View Post
thanks pal, i've plugged it in and the particular scenario I had is now working perfectly.
Thanks for the confirmation!

Quote:
Also double thanks for implementing the master volume changes (which I think I missed?). I've got smooth transitions between mods now.
Nice. So all the latest modifications are confirmed working. Perhaps I can move towards an official release now.

Quote:
side note, I forgot I modified the mt_init to use a unified sample pack for all modules. i built a little app which finds all the unique samples (by name) in a colletion of modules, exports a single sample pack and adds references inside each module. Guess I'm mentioning it in case there was anybody else here who might need that?
Do you have portable source code to share? Indeed, maybe somebody is interested.

But I don't understand why you have to change something in mt_init for it? mt_init allows the separate specification of module- and sample-pointers.
phx is offline  
Old 22 March 2021, 15:45   #154
h0ffman
Registered User
 
Join Date: Aug 2008
Location: Salisbury
Posts: 518
So, its a little more complicated I guess. My tool runs through the following steps.

1. optimise all modules, removing unused patterns and samples
2. makes a list of all distinct samples and saves them in an indexed pack
3. using the index, it runs through all the modules replacing the first 4 bytes of the sample name with the index value within the sample pack
4. each module is then saved as pattern data only
5. on mt_init, I pass in the base address of the pack, as the init runs through each sample setting pointers, it grabs the index id from the sample name and uses that to find the required sample within the pack. the found sample is then loaded into the sample pointers.

so basically without the tool its not really useable. once the game is done I'd happily wrap it up into something useable it anybody needs it.
h0ffman is offline  
Old 22 March 2021, 21:52   #155
phx
Natteravn

phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 1,869
Quote:
Originally Posted by h0ffman View Post
5. on mt_init, I pass in the base address of the pack, as the init runs through each sample setting pointers, it grabs the index id from the sample name and uses that to find the required sample within the pack. the found sample is then loaded into the sample pointers.
Ok, I understand. This is the additional logic needed in mt_init. But probably too special to make it part of the default ptplayer.

Quote:
once the game is done I'd happily wrap it up into something useable it anybody needs it.
phx 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
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

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 13:50.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.
Page generated in 0.12550 seconds with 15 queries