Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Dec 9, 2013 9:24:01 GMT -5
Can you explain how you got it to work? I'm sure it would be useful information when beginnerxorz II comes around
|
|
|
Post by beginnerxorz on Dec 9, 2013 10:03:45 GMT -5
I downloaded the files and put them in the BasiEgaXorz install directory. I renamed z80_tadpcm1khz.o80
to tadpcm.o80
and in pcm_player.asm I changed incbin z80_tadpcm1khz.o80
to incbin tadpcm.o80
and then in BasiEgaXorz I type asm move.b #$01,d0 ;What song to play jsr Playtadpcm ;branch to the Player in the include file end asm
asm include "pcm_player.asm" end asm
then I compile. It takes a while, but it's worth the wait! By the way, to put your own songs in, go to audio.online-convert.com/convert-to-wavset the bit resolution to 16-bit set the sampling rate to 8000hz set the audio channels to mono wait for the song to convert put it In the directory of BasiEgaXorz. edit compress.bat so it says pcm2tadpcm "song.wav" "songc.snd"
now edit pcm_player.asm. things get trickier here first duplicate this and put it under the routine to play song 2 Playsong1: jsr PCMDriverLoad move.w #$100,($A11100).l ;Stop the Z80 WaitZ80_01: btst #0,($A11100).l bne.s WaitZ80_01 ;Wait for z80 to stop move.b #(((song1)&$FF0000)>>16),($a00042).l ;location high byte move.b #(((song1)&$FF00)>>8),($a00041).l ;location mid byte move.b #((song1)&$FF),($a00040).l ;location low byte move.b #(((song2-song1)&$FF0000)>>16),($a00045).l ;length high byte move.b #(((song2-song1)&$FF00)>>8),($a00044).l ;length mid byte move.b #((song2-song1)&$FF),($a00043).l ;length low byte move.b #$C0,($a0004d).l ;pan center move.b #$FF,($a0004e).l ;play how many times move.b #$00,($a0004f).l ;pause = 0 move.b #$01,($a00050).l ;sample rate (NEW!);0D=11khz 04=16KHZ 22KHZ=01 8khz=15 7khz=1A 6khz=20 5khz=28 move.w #$0,($A11100).l ;Start the Z80 rts
change song2 to song3 and change song3 to song4 then change Playsong1 to Playsong3 now change all 2 WaitZ80_1 to WaitZ80_3 change the includes. as you can see the label song3 is empty. Add under there incbin "song.snd" align 2
now under that add song4: put nothing under there. compile and run. This should work. This took a long time to type though. good luck to you!
|
|
zenac
Moldy Popcorn
Posts: 41
|
Post by zenac on Dec 16, 2013 17:28:55 GMT -5
In the example of this topic, is it possible to STOP the song?
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Jan 6, 2014 14:39:34 GMT -5
In the example of this topic, is it possible to STOP the song? Change this line under each SongX: from this: move.b #$FF,($a0004e).l ;play how many times to this: move.b #$01,($a0004e).l ;play how many times in the pcm_player.asm file
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Jan 6, 2014 16:59:34 GMT -5
And just an FYI - this driver appears to use most of the FM channels, at the very best guess, 3 or 4, so it will interrupt/halt your FM tracks (at least with TFM)
|
|
|
Post by sega16 on Jan 7, 2014 11:15:20 GMT -5
That is not true it only uses FM6. You can choice to either use FM6 as an FM channel or a DAC channel.
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Jan 7, 2014 12:05:35 GMT -5
It completely cuts out all of my TFM tracks (I use 1 through 5 as I use a different PCM driver, but I wanted to see how well this one compared), so if it's only using FM6, then something else is going on. The TFM Driver was loaded after TadPCM, which shouldn't matter since TadPCM is on the z80 and TFM is on the 68k.
|
|
|
Post by sega16 on Oct 17, 2014 21:18:20 GMT -5
Apparently I never responded to this sorry about that. The reason for it cutting out your FM music is that the z80 driver and your m68k code are trying to access the ym2612 at the same time.
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Oct 20, 2014 8:04:02 GMT -5
Apparently I never responded to this sorry about that. The reason for it cutting out your FM music is that the z80 driver and your m68k code are trying to access the ym2612 at the same time. Ahhh. That makes sense. Would this driver work with moons GYM player that he posted in another thread? Also, is it possible to play 2 PCM sound clips at the same time? (I'm sure it is possible, but sound is beyond my knowledge currently)
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Oct 20, 2014 8:12:56 GMT -5
Would this driver work with moons GYM player that he posted in another thread? You shouldn't be using that GYM player unless you want to do something like SMS Brawl in the first place .. but it depends on the GYM file. The GYM format supports PCM instructions .. but as they are logged per frame, they end up sounding terrible. So as long as your GYM file doesn't use channel 6 you can use a PCM sample on the side. You'd need to add proper bus requesting to the GYM player though, since the TadPCM driver will be accessing the YM2612 from the Z80. Anyway, in short; you shouldn't use GYM .. and when you do don't use any GYM files / music that use PCM. Also, is it possible to play 2 PCM sound clips at the same time? (I'm sure it is possible, but sound is beyond my knowledge currently) There's only one PCM / DAC channel on the YM2612, so when you want to play multiple PCM samples at once you need to mix them in software.
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Oct 20, 2014 9:43:10 GMT -5
Ah. I see. Thanks for the clarification
|
|
|
Post by beginnerxorz on Nov 3, 2015 6:09:53 GMT -5
I have a bit of a problem here.
I added a "Song 3" to my 68k assembly file. But whenever I call Song 2 to play in BEX, it calls Song 3 for some reason. I've checked the code, line by line, and it is all right.
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Nov 3, 2015 12:25:33 GMT -5
I have a bit of a problem here. I added a "Song 3" to my 68k assembly file. But whenever I call Song 2 to play in BEX, it calls Song 3 for some reason. I've checked the code, line by line, and it is all right. You're probably misusing some labels or not quite understanding how the sound driver works. Without seeing your code I can only guess. The few people I know are using Stefs XGM driver. That even comes with examples. devster.proboards.com/thread/1071/add-music-sfx-game-driver
|
|