Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Apr 5, 2012 13:58:01 GMT -5
Not sure why you're having difficulties combining the build-in sound commands ( PSG on 68K ) & FM ( also on the 68K ) though. Works just fine for me .. check out attached file* *Lazy example without proper bus handling ( tested in Regen ). Attachments:
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Apr 5, 2012 13:59:20 GMT -5
Attached is a dump of what it should sound like. Attachments:
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Apr 5, 2012 14:57:08 GMT -5
I appreciate the reply. I added pressing start executes the psg and psg vol commands on channel 1 without messing up your playback on 0. Kega doesn't play back the FM instrument. I don't know if this means it's because it's more forgiving or more accurate (you mentioned it was sans proper bus handling) I have rigged my own PC speaker-like music and sound system using psg and psgvol commands. Just making sure to partition out the channels between music and sound. I have to manually enter note frequency into DATA statements so it's not as advantageous compared to TFM Music Maker. The TFM Music Maker playback engine abnormally speeds up the output when you try to use psg and psgvol commands. This is why I revisited Sega16s tadpcm integration with BEX. I'd hope using the z80 for sound effects wouldn't trash TFM Music Maker output. I've tried what I could to contact Sega16 so I'll just have to wait patiently on this one. In the meantime Shiru has provided an example on how to load a z80 driver into memory while Chilly Willy has pointed me to his z80 driver and even provided a version already in DATA statements (well, C source that could be converted). I have no idea how to go further though. gendev.spritesmind.net/forum/viewtopic.php?t=1109
|
|
|
Post by sega16 on Apr 5, 2012 15:09:00 GMT -5
here is pcmplayer.asm Playtadpcm: cmpi.b #$01,d0 beq.w Playsong1 cmpi.b #$02,d0 beq.w Playsong2 jmp goback 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 Playsong2: jsr PCMDriverLoad move.w #$100,($A11100).l ;Stop the Z80 WaitZ80_02: btst #0,($A11100).l bne.s WaitZ80_02 ;Wait for z80 to stop move.b #(((song2)&$FF0000)>>16),($a00042).l ;location high byte move.b #(((song2)&$FF00)>>8),($a00041).l ;location mid byte move.b #((song2)&$FF),($a00040).l ;location low byte move.b #(((song3-song2)&$FF0000)>>16),($a00045).l ;length high byte move.b #(((song3-song2)&$FF00)>>8),($a00044).l ;length mid byte move.b #((song3-song2)&$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 goback: rts PCMDriverLoad: ;--------------------- ; Load the z80 driver ;--------------------- move.w #$100,($A11100).l ;Stop the Z80 move.w #$100,($A11200).l ;Deassert reset to the Z80
Waitforz80a: btst #0,($A11100).l bne Waitforz80a ;Wait for z80 to halt
lea (Z80Driver),a0 lea ($A00000).l,a1 move.w #Z80DriverEnd-Z80Driver,d1
LoadZ80Driver: move.b (a0)+,(a1)+ dbra d1,LoadZ80Driver
move.w #0,($A11200).l ;Assert reset to the Z80 move.w #0,($A11100).l ;Start the Z80 move.w #$100,($A11200).l ;Deassert reset to the Z80 ;--------------------------- ; Wait for Z80 driver to run ;--------------------------- move.w #20000,d0 waste_time: nop dbra d0, waste_time rts ;--------------------- ; Music driver (z80) ;--------------------- align 2 Z80Driver: incbin pcm/z80_tadpcm1khz.o80 Z80DriverEnd:
align 4 ;TADPCM must be four byte aligned ;now include all music here song1: incbin "pcm\Dark Groovec.snd" align 2 song2: incbin "pcm\The Brentwoods - Billy Maysc.snd" align 2 song3:
|
|
|
Post by beginnerxorz on Nov 20, 2013 6:12:38 GMT -5
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Nov 20, 2013 9:44:15 GMT -5
You'll have to explain what file you want, dawg. There's several listed in this topic..
|
|
|
Post by beginnerxorz on Nov 22, 2013 13:57:59 GMT -5
The first file
|
|
|
Post by beginnerxorz on Dec 3, 2013 16:08:21 GMT -5
.....hehehe! I think I figured out why the files got deleted! It's because sega-16 added copyrighted songs!
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Dec 3, 2013 16:49:39 GMT -5
... or he deleted it/the server deleted it since it's over 2 years old
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Dec 3, 2013 17:25:10 GMT -5
.....hehehe! I think I figured out why the files got deleted! It's because sega-16 added copyrighted songs! Nothing is funny about copyright issues - especially since this means you cannot get the files you want.
|
|
|
Post by sega16 on Dec 4, 2013 21:07:11 GMT -5
|
|
|
Post by beginnerxorz on Dec 5, 2013 7:45:41 GMT -5
Okay.
Output File: basic.bin Pass 1 Pass 2 basic.s:5: *** Error: Symbol 'PLAYTADPCM' undefined *** 0030CA 4EB9 00000000 jsr Playtadpcm basic.s:8: *** Error: Unable to open INCLUDE file 'pcm\pcm_player.asm' *** 0030D6 include "pcm\pcm_player.asm"
00002 Total Error(s)
UnSuccessfully Compiled :( ! 2 Asmx errors Have a nice day
Press ESC to close the log window
|
|
|
Post by sega16 on Dec 5, 2013 18:01:48 GMT -5
If you followed the directions in my original post then you would not get those errors please follow the instructions in my post see steps 1 and 2.
|
|
|
Post by beginnerxorz on Dec 6, 2013 7:37:54 GMT -5
I followed the directions and still.. ..I renamed "pcm_player" to "playpcm" and asm move.b #$03,d0 jsr Playtadpcm end asm
asm include "playpcm.asm" end asm
I ended up with that. -------------------------- Output File: basic.bin Pass 1 Pass 2 basic.s:5: *** Error: Symbol 'PLAYTADPCM' undefined *** 0030CA 4EB9 00000000 jsr Playtadpcm basic.s:7: *** Error: Unable to open INCLUDE file 'playpcm.asm' *** 0030D0 include "playpcm.asm" 00002 Total Error(s) UnSuccessfully Compiled ! 2 Asmx errors Have a nice day Press ESC to close the log window
|
|
|
Post by beginnerxorz on Dec 6, 2013 11:29:42 GMT -5
OMGOMGOMGOMGOMGOMG IT WORKS! THIS IS REALLY HANDY!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ;D
|
|