diff options
| author | JimB16 <f1@jimb.de> | 2015-10-13 14:03:07 +0200 |
|---|---|---|
| committer | JimB16 <f1@jimb.de> | 2015-10-13 14:03:07 +0200 |
| commit | de491408b90bca6bb37ffeb6a1239bbdcdf4b58d (patch) | |
| tree | df00a7c9ad3f4e354c7c5766ed3d9b9eacb9c4cd | |
| parent | f2ebc64d9fb60595f47c52b7cc8b1a9f76a22086 (diff) | |
Created Sound Engine Commands (markdown)
| -rw-r--r-- | Sound-Engine-Commands.md | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/Sound-Engine-Commands.md b/Sound-Engine-Commands.md new file mode 100644 index 0000000..bc504a2 --- /dev/null +++ b/Sound-Engine-Commands.md @@ -0,0 +1,37 @@ +This site should/will describe all commands that are used by the Sound Engine of Pokemon Crystal (and in the future Pokemon Red). This is the result of revising the Code for the Sound Engine. While I'm working on it the name of the commands and their number of parametes may not match with the macros currently used in Pokecrystal. +It should also be a place to suggest some good names for the commands (which stand in the headline of the commands). + +# $dc: intensity (or volenvelope) +\1: Initial Volume of envelope (0-0Fh) (0=No Sound) +\2: Envelope Direction (0=Decrease, 1=Increase) +\3: Number of envelope sweep (n: 0-7) (If zero, stop envelope operation.) +* usage: + * volume $a, $0, $7 ; following notes start with volume=$a and slowly fade out + * volume $2, $1, $4 ; following notes start with volume=$2 and get louder a bit faster than in the previous example + * volume $a, $0, $0 ; following notes have volume=$a without fading + +parameter is directly written in hardware register NRX2 of the corresponding channel + + FF12 - NR12 - Channel 1 Volume Envelope (R/W) + * Bit 7-4 - Initial Volume of envelope (0-0Fh) (0=No Sound) + * Bit 3 - Envelope Direction (0=Decrease, 1=Increase) + * Bit 2-0 - Number of envelope sweep (n: 0-7) (If zero, stop envelope operation.) + Length of 1 step = n*(1/64) seconds + +# $e5: volume +\1: SO2 output level (volume) (0-7) +\2: SO1 output level (volume) (0-7) +* usage: + * volume $7, $7 ; set volume of Left and Right to their maximum + +parameter is directly written in hardware register [NR50](http://bgb.bircd.org/pandocs.htm#soundcontrolregisters) + + **FF24 - NR50 - Channel control / ON-OFF / Volume (R/W)** + The volume bits specify the "Master Volume" for Left/Right sound output. + * Bit 7 - Output Vin to SO2 terminal (1=Enable) + * Bit 6-4 - SO2 output level (volume) (0-7) + * Bit 3 - Output Vin to SO1 terminal (1=Enable) + * Bit 2-0 - SO1 output level (volume) (0-7) + The Vin signal is received from the game cartridge bus, allowing external hardware + in the cartridge to supply a fifth sound channel, additionally to the gameboys + internal four channels. As far as I know this feature isn't used by any existing games. |
