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
- action 1 - play sfx1
- action 2 - play sfx2
- jsr mt_music (or something like this)
- wait vblank (using xbios)
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
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
Good luck with your game!
(and Happy Christmas!)
Here are some screenshots
and a video
ps : Thanks to the Modo
- Obsessive compulsive Atari behavior
- Posts: 138
- Joined: Sun Jun 28, 2015 2:36 pm
- Location: France
My Falcon is happy to see a new game
Colorful graphs, and that book opening animation looks really cool.
Can't wait to play it.
I have to finish it.
Those next days, I'm going to try to include sfx and musics
Thanks again my Friend
Sure thing!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
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 )
Code: Select all
my_ossom_sample: incbin "sample.raw" my_ossom_sample_end:
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 ).
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
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
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
Is this hard disk led? And if yes, have you tried some boot floppy?
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...)
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
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
I'll try the different solutions during this weekend
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 ?
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
- Atari Super Hero
- Posts: 506
- Joined: Mon Oct 13, 2008 12:50 pm
- Location: west of London, UK
Have you tried a different monitor or TV with RF? Do you get any output at all or just white or black blank?
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
I probably saved life of my TT and also a lot of money
https://www.atari-forum.com/viewtopic.p ... 29#p214729
SDrive / PAK68/3 / Lynx Multi Card / LDW Super 2000 / XCA12 / SkunkBoard / CosmosEx / SatanDisk / UltraSatan / USB Floppy Drive Emulator / Eiffel / SIO2PC / Crazy Dots / PAM Net / AT Speed C16
Hatari / Steem SSE / Aranym / Saint