WIP - StepFive - Amiga Musics + SFX on falcon...

All about games on the Falcon, TT & clones

Moderators: Mug UK, [ProToS], lp, moondog/.tSCc., Moderator Team

Post Reply
ricco59
Retro freak
Retro freak
Posts: 13
Joined: Sat Apr 25, 2009 7:48 am
Location: Arras - France
Contact:

WIP - StepFive - Amiga Musics + SFX on falcon...

Post by ricco59 »

... Hi Atari Fans ;)

I need some help.

Since few years, I'm coding, porting slowly an amiga game (few hours a week when I have a little spare time) to a basic Falcon030 and want to know what is the best way to play a 3 voices amiga format mod and use the other voices to play sample effects with frequency and volume values. Maybe you have some source examples

I'm using a basic vblank loop

Game :
- action 1 - play sfx1
- action 2 - play sfx2
- ...
- ...
- jsr mt_music (or something like this)
- wait vblank (using xbios)
bra game

Oh, I forgot, I code in asm using devpac (Hatari for coding and real Falcon for testing and bug hunting ;) )

Many thanks and Merry Christmas

Eric

ps :
I'm posting some screenshots very soon and maybe a short video. Thanks again
There are some work to do but the game is playable
User avatar
ggn
Atari God
Atari God
Posts: 1258
Joined: Sat Dec 28, 2002 4:49 pm

Re: WIP - StepFive - Amiga Musics + SFX on falcon...

Post by ggn »

Check out DSPmod34 (http://dhs.nu/files.php?t=democreation), it supports up to 4 channels music + 4 channels of sound effects.

Good luck with your game!

(and Happy Christmas!)
is 73 Falcon patched atari games enough ? ^^
ricco59
Retro freak
Retro freak
Posts: 13
Joined: Sat Apr 25, 2009 7:48 am
Location: Arras - France
Contact:

Re: WIP - StepFive - Amiga Musics + SFX on falcon...

Post by ricco59 »

Many thanks ggn. I have to study this ;)

Here are some screenshots
Image Image Image Image
Image Image Image

and a video
https://www.youtube.com/watch?v=wCCLa_lgniA

See you

Eric

ps : Thanks to the Modo
MM41
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 127
Joined: Sun Jun 28, 2015 2:36 pm
Location: France

Re: WIP - StepFive - Amiga Musics + SFX on falcon...

Post by MM41 »

Nice game Ricco59 :cheers: ,
My Falcon is happy to see a new game :D
User avatar
dma
Atari God
Atari God
Posts: 1145
Joined: Wed Nov 20, 2002 11:22 pm
Location: France
Contact:

Re: WIP - StepFive - Amiga Musics + SFX on falcon...

Post by dma »

Waaah a falling quadraminos game, sweet!
Colorful graphs, and that book opening animation looks really cool.
Can't wait to play it. :)
ricco59
Retro freak
Retro freak
Posts: 13
Joined: Sat Apr 25, 2009 7:48 am
Location: Arras - France
Contact:

Re: WIP - StepFive - Amiga Musics + SFX on falcon...

Post by ricco59 »

@MM41, dma > Thank you for your feedback

I have to finish it.
Those next days, I'm going to try to include sfx and musics

C U
ricco59
Retro freak
Retro freak
Posts: 13
Joined: Sat Apr 25, 2009 7:48 am
Location: Arras - France
Contact:

Re: WIP - StepFive - Amiga Musics + SFX on falcon...

Post by ricco59 »

@ggn, is there a tuto to know how DSPmod34 works and how use it for sample playing (maybe a simple source code playing a .mod while playing 2 or 3 samples) ? It's my first try on Atari Falcon :)
Thanks again my Friend ;)
User avatar
ggn
Atari God
Atari God
Posts: 1258
Joined: Sat Dec 28, 2002 4:49 pm

Re: WIP - StepFive - Amiga Musics + SFX on falcon...

Post by ggn »

ricco59 wrote:@ggn, is there a tuto to know how DSPmod34 works and how use it for sample playing (maybe a simple source code playing a .mod while playing 2 or 3 samples) ? It's my first try on Atari Falcon :)
Thanks again my Friend ;)
Sure thing!

You can start without even integrating it in your code to see how it works by assembling "easy_use.s". Don't forget to change the path to your .mod file in label "dspmod34_mod" first. This should assemble and run properly as a .prg.

Now that we got it working, let's butcher it a bit ;).

Go to label "dspmod34_voltab4" at line 256. Each word value tells the player how loud each channel will be. As you notice, there are 4 $7fff and 4 0 values. This means that the first 4 channels (which are used by the mod) are at max volume and the others are 0. For the player 0 means "don't use this channel ever". So change the first 2 zeros to say $3fff (which should be half the volume of the mod). If you assemble and run this, it should still play the mod fine.

Now, incbin a couple of samples so we can try the sample playing out.

From the docs, you can find that you have to call dspmod34_player+dspmod34_fx to play a sample. Also you have to set up some magic values before calling:

Code: Select all

   	d0: fx-Channel ( 0 ... 3 )
	d1: Sample-Period
	d2: Sample-Volume
	d3: Sample-Position
	a0: Sample-Start	( Adresse )
	a1: Sample-Ende         ( Adresse )
	a2: Repeat-Start        ( Adresse )
	a3: Repeat-Länge        ( Bytes )
So if you incbin your sample like this:

Code: Select all

my_ossom_sample: incbin "sample.raw"
my_ossom_sample_end:
you can load d0 with 0 to play your sample in the first fx channel (which is channel 5 if we count all channels), d2 with 64 (maximum allowable volume), d3 with 0 so we play the sample from start, a0 with my_ossom_sample, a1 with my_ossom_sample_end. If you don't want the sample to loop, just load a2 with my_ossom_sample and a3 with 2. Otherwise you need to calculate and enter the start position and length of the loop.

Which leaves us with d1 which I left for the end, because it's where the dreaded amiga comes into play. Because the mod player has to emulate the Paula chip to play the samples, it internally calculates sample frequencies using so called amiga period values. A quick search around the internets brought me to this site: https://bel.fi/alankila/modguide/interpolate.txt where we see that the Paula clock is around 3546895Hz. So if we want to play a 8KHz mono sample we have to calculate the period as 3546895/2/8000=221.6809375, so let's say 222. (I'm not 100% sure where that /2 comes from - I'm not an expert on Amiga stuff, just bear with me, I just did the absolute minimum to get the thing working :D).

So, with this knowledge we can now go to easy_use.s and add some code after line 88, i.e. after calling "dspmod34_supervisor_out" and before waiting for keypress. Something like:

Code: Select all

                lea my_ossom_sample,a0
                lea my_ossom_sample_end,a1
                moveq   #0,D0
                move.w  #222,D1
                move.w  #64,D2
                moveq   #0,D3
                movea.l A0,A2
                lea     2,A3
                bsr     dspmod34_player+dspmod34_fx
In theory this should play the sample once when the program is run. Perhaps you might want to change that "lea 2,a3" to something like "lea "my_ossom_sample_end-my_ossom_sample,a3" so it will loop the sample as long as the mod is playing.

And that should be all there is to it!

If you got this working then integrating it with your code shouldn't be too hard, just move the code from "begin" to "move.l #dspmod34_vbl,$04d2" in your startup code. If you check out the top of easy_use.s, there are some other useful routines to run, like turning the player off and on, etc etc.

Anyway, try this out and good luck :)
is 73 Falcon patched atari games enough ? ^^
ricco59
Retro freak
Retro freak
Posts: 13
Joined: Sat Apr 25, 2009 7:48 am
Location: Arras - France
Contact:

Re: WIP - StepFive - Amiga Musics + SFX on falcon...

Post by ricco59 »

Thank you my friend and happy new year for all Atari & Retro Fans ;)
ricco59
Retro freak
Retro freak
Posts: 13
Joined: Sat Apr 25, 2009 7:48 am
Location: Arras - France
Contact:

Re: WIP - StepFive - Amiga Musics + SFX on falcon...

Post by ricco59 »

Hi Friends

Too bad : I can't finish my game STEPFIVE for falcon because, my Bird stays on the floor.... Black Screen

Power led is On, the disk drive led is active flashing, stopping, flashing, etc...

Is my videl dead ??? Is there anybody who solve this problem ?? Is there a way to make it fly again ?

I am very sad that I can't continue developing this game unless ...



Thanks in advance

Eric
User avatar
Ektus
Captain Atari
Captain Atari
Posts: 259
Joined: Mon May 24, 2010 2:58 am
Location: Germany
Contact:

Re: WIP - StepFive - Amiga Musics + SFX on falcon...

Post by Ektus »

NVRAM battery dead? What kind of monitor do you have connected? Test cartridges are available from Belgium, too, to undergo some low level troubleshooting.
Schneider CPC464 (long retired), Atari Mega ST4 (retired), Falcon+CT2A, Falcon+CT63+CTPCI+Radeon 9250, Milan040+SCSI+Rage
User avatar
Eero Tamminen
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2229
Joined: Sun Jul 31, 2011 1:11 pm

Re: WIP - StepFive - Amiga Musics + SFX on falcon...

Post by Eero Tamminen »

ricco59 wrote: Sun Sep 13, 2020 6:40 pm Too bad : I can't finish my game STEPFIVE for falcon because, my Bird stays on the floor.... Black Screen

Power led is On, the disk drive led is active flashing, stopping, flashing, etc...
...
Is this hard disk led? And if yes, have you tried some boot floppy?
ricco59 wrote: Sun Sep 13, 2020 6:40 pm Is my videl dead ??? Is there anybody who solve this problem ?? Is there a way to make it fly again ?
I guess you've tried monitor cable connections and that the problem isn't with your monitor?

(Old CRT monitors have similar caps issues as our old Atari machines...)
ricco59
Retro freak
Retro freak
Posts: 13
Joined: Sat Apr 25, 2009 7:48 am
Location: Arras - France
Contact:

Re: WIP - StepFive - Amiga Musics + SFX on falcon...

Post by ricco59 »

Hi,

@Ektus >
My falcon is connected to a vga monitor.
I searched my 'falcon to scart' cable but no way... I can't find it
I'll test it using rf cable

@Eero >
the hd is disconnected. I only have disk drive connected
A fan tells me to create a 'bootable' disk with auto folder and a nvram reset prg in it. It's programmed ;)

Thanks friends
I'll try the different solutions during this weekend

See you
ricco59
Retro freak
Retro freak
Posts: 13
Joined: Sat Apr 25, 2009 7:48 am
Location: Arras - France
Contact:

Re: WIP - StepFive - Amiga Musics + SFX on falcon...

Post by ricco59 »

Hi again

I've seen some things...
- as written the floppy/hdd led activity is flashing, stopping, flashing and so on ...
- I've connected back the internal speaker and when I switch on the falcon, I hear a 'poc' but as the floppy led activity sequence, the falcon 'poc' at each flashing (I hope you understand what I mean :) )
Is my falcon rebooting, rebooting,... ?

Normally, this 'poc' is heard one time, while booting the computer no ?

Thks

Eric
ricco59
Retro freak
Retro freak
Posts: 13
Joined: Sat Apr 25, 2009 7:48 am
Location: Arras - France
Contact:

Re: WIP - StepFive - Amiga Musics + SFX on falcon...

Post by ricco59 »

Hi

Last try

I've changed memory (Centek 14Mo)..... the same
I've changed the psu........................ the same too...

I have to put my falcon in standby for a while

Eric
User avatar
viking272
Captain Atari
Captain Atari
Posts: 439
Joined: Mon Oct 13, 2008 12:50 pm
Location: west of London, UK

Re: WIP - StepFive - Amiga Musics + SFX on falcon...

Post by viking272 »

Hi Eric, mabe make a post in the hardware section as there are some great and knowledgeable guys on AF who might be able to help more?
Have you tried a different monitor or TV with RF? Do you get any output at all or just white or black blank?
ricco59
Retro freak
Retro freak
Posts: 13
Joined: Sat Apr 25, 2009 7:48 am
Location: Arras - France
Contact:

Re: WIP - StepFive - Amiga Musics + SFX on falcon...

Post by ricco59 »

Hi Viking272

I'm waiting for a FALCON VGA-RGB-MONO ADAPTOR to connect it on a RGB monitor
I'll come back after receiving it. I'm about to order capacitors for motherboard, they have never been changed...

I got black screen, and it's like the falcon reboot, reboot... I did'nt hear the noise of the disk drive when booting the falcon... nothing

stay tuned, I'm waiting for my orders ;)

thanks to all

Eric
User avatar
Cyprian
10 GOTO 10
10 GOTO 10
Posts: 1962
Joined: Fri Oct 04, 2002 11:23 am
Location: Warsaw, Poland

Re: WIP - StepFive - Amiga Musics + SFX on falcon...

Post by Cyprian »

a few years ago my TT refused to start. I had a plan to remount all sockets, and replace all capacitors. Fortunately before that I just checked reset button. And that was that! It was invisible broken and constantly pressed.
I probably saved life of my TT and also a lot of money
https://www.atari-forum.com/viewtopic.p ... 29#p214729
Portfolio / Lynx II / Jaguar / TT030 / Mega STe / 800 XL / 1040 STe / Falcon030 / 65 XE / 520 STm / SM124 / SC1435
SDrive / PAK68/3 / Lynx Multi Card / LDW Super 2000 / XCA12 / SkunkBoard / CosmosEx / SatanDisk / UltraSatan / USB Floppy Drive Emulator / Eiffel / SIO2PC / Crazy Dots / PAM Net
Hatari / Steem SSE / Aranym / Saint
http://260ste.appspot.com/
Post Reply

Return to “Games”