The BIOS Soundplayer

Talk about programming CreatiVision (except games programming). Projects of homebrew hardware are also welcome.
Post Reply
User avatar
Mobsie
Posts: 495
Joined: Fri Jun 13, 2008 10:38 am
Location: Weinheim, Germany

The BIOS Soundplayer

Post by Mobsie » Mon Oct 07, 2013 9:37 pm

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.
User avatar
carlsson
Posts: 505
Joined: Fri Jun 13, 2008 7:39 am
Location: Västerås, Sweden

Re: The BIOS Soundplayer

Post by carlsson » Tue Oct 08, 2013 10:14 pm

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.
User avatar
Mobsie
Posts: 495
Joined: Fri Jun 13, 2008 10:38 am
Location: Weinheim, Germany

Re: The BIOS Soundplayer

Post by Mobsie » Wed Oct 09, 2013 6:32 am

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.
User avatar
@username@
Posts: 202
Joined: Tue Oct 22, 2013 6:59 pm
Location: Glasgow, Scotland

Re: The BIOS Soundplayer

Post by @username@ » Mon Jan 06, 2014 2:56 pm

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.
˙uʍop-ǝpısdn sı ɹoʇıuoɯ ɹnoʎ 'sıɥʇ pɐǝɹ uɐɔ noʎ ɟı

The creatiVision Emulator 16.04.24
Salora Manager / Laser 2001 BLOAD utility 0.9
CSL Cartridge middleware
http://sourceforge.net/projects/creativisionemulator
Post Reply