|
Post by oerg866 on Mar 2, 2009 8:32:15 GMT -5
Is it possible?
|
|
sasuke
PooP MonkeeH
Ninja Cat
Posts: 8
|
Post by sasuke on Mar 2, 2009 13:50:24 GMT -5
If you are talking about using the FM chip for PCM playback, then yes. Just request the Z80 bus like you normally do when writing to the FM chips, then use these commands: poke &HA04000, &H2B 'Access YM2612 register &H2A poke &HA04001, &H80 'Turn PCM mode on poke &HA04000, &H2A 'Access YM2612's PCM DAC register Then you poke the bytes of the code to address &HA04001. However, there must be a delay in the code that is the same as the PCM's recorded sample rate, or else the data will play at the wrong speed. Also, it is more practical to learn Z80 assembly and how the Z80 works on the Genesis because it requires lots of CPU time. As for the Sega CD's PCM chip, it is not possible without writing a custom CD driver, which is something that BEX cannot do at all. You would have to write a separate 68k assembly program and use the BuildSCD program at MOD's website. Thanks for the question.
|
|
|
Post by Mairtrus on Mar 2, 2009 17:57:13 GMT -5
So, are you wanting to do something like this? Sasuke explained it really good, but in adition to his comment, there is something more that you can do, like this: poke &hA04002,&hB6 poke &hA04003,&hC0 'Turn on both speakers in case you changed the PAN. Also, it is more practical to learn Z80 assembly and how the Z80 works on the Genesis because it requires lots of CPU time. Not for now. Drx wrote a small Z80 PCM player some time ago, and Zephyr managed to put it on a BEX proyect (is in some place on the forums, but I do not remeber where right now). I didn't tested it yet, but I will start right now
|
|
oompa loompa
I AM THE GOVERNATOR
"Git 'Er Dun!"
Posts: 1,301
|
Post by oompa loompa on Mar 4, 2009 16:50:26 GMT -5
It's possible to play PCM formated samples with BEX, but I don't recommend it . The hardest part is that you have to get the timing exactly perfect to get any decent sound coming out of the genesis. The YM2612 (is this the correct name? it's been a while ) doesn't have any DAC memory, nor does it give any feedback on when another sample should be loaded into the DAC. This is already hard to do in something like assembly language because the instruction timing on the 68k and Z80 processors are really unpredictable because the genesis is adding on extra wait states, or weird things. You can still try though , it's not very hard getting sound through the DAC from BEX as sasuke points out. Just go do something like poke &HA04001, read() after initializing the YM2612, and you're in business . Don't depend on getting a very high sample rater though . maybe you could get a good 22khz (which should be around horizontal blanking tv timing) or so. To wait for HBLANK, use SLEEP2, which should be a good delay. This is undocumented, but to adjust the delay that SLEEP2 uses, adjust VISIBLEX though assembly (can only be accessed through assembly), eg: asm " move.b 240,(VISIBLEX)"
|
|
|
Post by Syniphas on Mar 6, 2009 12:29:27 GMT -5
I've been wondering if it'd be possible to add PCM SFX on airstriker 2 for some time now, songs take all the six channels though, and the thing is just slow as hell as it is already
|
|