If someone need a Musicplayer for game Jingle`s or intro then take a look at the Bios Soundplayer.
All CreatiVision games use this player for the Jingle`s and all sounds great. You then don`t need place the Notes def. in your program because is all in the Bios, this save you important ROM place. And the Notes have the right value is needed on the CV. You can also use this notes for your own player or effects.
The BIOS Soundplayer
Re: The BIOS Soundplayer
Interesting. Do you have any pointers which routines to call, how to set it up? For that matter, my music player takes about 0.5K plus music data so it isn't that much larger but of course if the BIOS has built in routines to play sounds at given intervals, it is good to have.
Re: The BIOS Soundplayer
Yes, in the program you call it with:
ldx #00
jsr $fbd6 --> the player
in X is the sound/music number.
The player looks always at $BF00 for the address list, for example in DeepSea we have at $BF00 = 20 BF 34 C0 BE 0F 80 BF 2A. It means (20 BF 34)= Music Nr.0.
The call with ldx #0 use jingle Nr.0, is at address $BF20, len=hex 34 (52 Byte)
At $BF20 are then the sound data for jingle Nr.0, is $Bf20 + len=34, the player plays backward from this address. The first byte at $BF20+34 is the Tempo, the rest are the notes to play. Always 3 notes for the 3 Channels.
This 52 Bytes play the start jingle in DeepSea: 22 0D 25 22 09 21 22 09 21 1F 0B 03 AF A9 22 0B 23 01 23 03 22 0B 23 1F 0B 03 23 3B AF 99 23 03 23 3B AC 1F 0B 03 23 3B BD 23 03 C3 B9 23 0B 23 1F 0B 03 AC 10. Is great.
In the Bios from $FC80 are the note, 2 bytes for each, and the volume settings. At $FC79 are 7 different note tyes, this are 7 different length to play for each note.
All games i check use this player for the start music etc. But is not for background music because it stop the interrupt, but for the rest is perfect.
There are more then 10 other calls in the Bios i test at the moment, many for copy data from the ROM to VDP etc.
ldx #00
jsr $fbd6 --> the player
in X is the sound/music number.
The player looks always at $BF00 for the address list, for example in DeepSea we have at $BF00 = 20 BF 34 C0 BE 0F 80 BF 2A. It means (20 BF 34)= Music Nr.0.
The call with ldx #0 use jingle Nr.0, is at address $BF20, len=hex 34 (52 Byte)
At $BF20 are then the sound data for jingle Nr.0, is $Bf20 + len=34, the player plays backward from this address. The first byte at $BF20+34 is the Tempo, the rest are the notes to play. Always 3 notes for the 3 Channels.
This 52 Bytes play the start jingle in DeepSea: 22 0D 25 22 09 21 22 09 21 1F 0B 03 AF A9 22 0B 23 01 23 03 22 0B 23 1F 0B 03 23 3B AF 99 23 03 23 3B AC 1F 0B 03 23 3B BD 23 03 C3 B9 23 0B 23 1F 0B 03 AC 10. Is great.
In the Bios from $FC80 are the note, 2 bytes for each, and the volume settings. At $FC79 are 7 different note tyes, this are 7 different length to play for each note.
All games i check use this player for the start music etc. But is not for background music because it stop the interrupt, but for the rest is perfect.
There are more then 10 other calls in the Bios i test at the moment, many for copy data from the ROM to VDP etc.
- @username@
- Posts: 335
- Joined: Tue Oct 22, 2013 6:59 pm
- Location: Scotland
Re: The BIOS Soundplayer
To use the BIOS maximum volume table, use the call to $FCE6.
The difference is that the player at $FBD6 use a decay volume table, which decrements at each interval. The second, at $FCE6, does not.
You could of course use your own custom volume table by placing the addess in $4/$5 and calling $FBDE.
The difference is that the player at $FBD6 use a decay volume table, which decrements at each interval. The second, at $FCE6, does not.
You could of course use your own custom volume table by placing the addess in $4/$5 and calling $FBDE.