kramlat
Moldy Popcorn
got slack?
Posts: 42
|
Post by kramlat on May 27, 2004 6:45:44 GMT -5
how do you set up and play FM sound and instruments on the YM2612 with your little program?
and how do you set up and play DAC samples?
|
|
|
Post by Tom Maneiro on May 27, 2004 20:50:24 GMT -5
Sorry, only PSG sound is implemented
|
|
|
Post by uchuusen on May 28, 2004 7:26:13 GMT -5
Currently, the only way to play FM music and sound with a program developed in BasiEgaXorz is to write a program that controls the sound hardware directly, and then a player program that can play music from a data file, or something. You can either use the poke command in basic, or you can use the asm command 'move.b' to make writes to the control ports. I have few FM examples with sources on my webpage, including a music player, although the player I have up there is a bit old, and I have since redesigned it twice, hehe. The demos most likely will not work on the real hardware, since I'm not sure if I'm accessing the Z80 memory area properly, but they work on WGENS, Lazarus, and on Megasis (mostly), so I think it can give you an idea of how the OPN2 works. the page is at www.geocities.com/eiennarufuyu/I hope this made sense.
|
|
|
Post by Tom Maneiro on May 29, 2004 14:21:45 GMT -5
neat demos
|
|
oompa loompa
I AM THE GOVERNATOR
"Git 'Er Dun!"
Posts: 1,301
|
Post by oompa loompa on Jun 2, 2004 2:41:05 GMT -5
yea, all what uchuusen said, fm sound can't be used from basic, since there are no commands, or software to do that. the only way to play fm sound is to directly access the hardware using poke/peek, or inline assembly.
sometime later, i might put out a simple music tracker to make+play fm music. i plan to use the whole 8k of the z80 for one whole song, so its gonna be kinda difficult to write and interpreter for the z80. that's my plan, maybe others have better plans on how to play good fm music with basic without going through the whole poke/peek stuff =)
|
|
|
Post by hotrodx on Oct 25, 2004 5:36:39 GMT -5
I'm impressed with the program! Good luck!
My wish list:
1. SUB/FUNCTION implementation (puhleeaze!!!) 2. Require VARIABLE DECLARATION 3. A RESOURCE File implementation 4. CLASSES, if possible
|
|
|
Post by Tom Maneiro on Oct 29, 2004 16:37:21 GMT -5
"resource file"? why not a Windows emulator? ;D ;D ;D ;D ;D ;D ;D
|
|
oompa loompa
I AM THE GOVERNATOR
"Git 'Er Dun!"
Posts: 1,301
|
Post by oompa loompa on Nov 5, 2004 22:40:17 GMT -5
btw, back to the older older posts, i've released an fm tracker. i haven't converted the asm routines into basiegaxorz libraries yet =(, this should be simple to do when i have 10 mins =P that's gonna be a pretty hard one to implement into this kinda compiler. the reason is that all variables are stored in one area only, and are only referenced in that area, so you cannot declare any private variables for your functions or subs. i can implement it simply without having any private variables though piece of cake just one more option keyword =D i dunno about this one. you can use data files and what not. i think you mean resource file by like including text files, or some data for an image x.x i doubt it =P, its like the function/sub thing although it is very possible. i planned for this too, first begining with argunerics
|
|
|
Post by Tom Maneiro on Nov 6, 2004 18:45:33 GMT -5
a cheap VB-clone....
I can design a VB-ish GUI.... but no "dirty prorgamming job" ;D
|
|
oompa loompa
I AM THE GOVERNATOR
"Git 'Er Dun!"
Posts: 1,301
|
Post by oompa loompa on Nov 14, 2004 21:51:31 GMT -5
??
well c++ would be nice for the gemesis =D, better than vb 0o0o0o0o represent. but then c++ would spell gcc, which spells trouble for the windows users. maybe i'll make it myself then, but that'll be another day hehe
|
|
|
Post by Tulio Adriano on Dec 8, 2004 7:07:34 GMT -5
Ohoo... of course all of we would like BasiEgaXorz be a Visual Basic for Mega Drive (and I think that's actualy possible using development for the VB Environment, but let's bypass this subject for now) with intelisense, color interaction (reserved keywords, comments, etc), function tips and syntax check, but we know that's pretty hard to make.
About Sub and Function implementation, that's really intresting since it would make the code more clean. And for the private variables, I don't feel like I need them.
Now about FM Sound, if only I knew how to handle the Z80 thing I would create a kind of MIDI driver, where you have 9 channels (being 3 psg +1 Wnoise) and the remaining 5 FM could have instruments predefined, or by constants or by each FM parameter (Eg.:
Sub PrepareChannelInstrument(Channel, Atack, Sustain, Decay, Release, WaveType) FMChannel(1).Instrument.Atack = 2 FMChannel(1).Instrument.Sustain = 5 FMChannel(1).Instrument.Decay = 3 FMChannel(1).Instrument.Release = 0 FMChannel(1).Instrument.WaveType = SawTooth End Sub
And an InCode command would play that channel later
FMChannel(1).Play "C", 200 'Play note C and hold the key for 200 miliseconds
End Eg.)
With that, it would be easy to create a user function that play a track.#nosmileys#nosmileys
|
|
oompa loompa
I AM THE GOVERNATOR
"Git 'Er Dun!"
Posts: 1,301
|
Post by oompa loompa on Dec 9, 2004 0:17:54 GMT -5
ahhh, i meant private variables as in variables automatically created when you start a function, and automatically destroyed when you leave the function.
as in:
declare sub main() dim a as integer a=90 end sub
declare sub youra() dim a as integer a=100 end sub
they both contain the same variable name "a", but have totally different values and different memory locations. in basiegaxorz, this is never going to happen. all variables are declared statically, and are never created and destroyed. there is only one heap, and its the main heap for combiming strings and data only so it cannot be used for variables. i first started acessing data using absolute addressing because basiegaxorz was meant to be a test program for small developers. it'd be hard to change all that now since basiegaxor has come a long way now =)
i made a ym2612 driver for the z80 called the devster noise machine, you should check that out =D
|
|