Outils pour utilisateurs

Outils du site


Planet X3 - Part 4 - Audio Engine - WIP

Planet X3 utilise un segment spécifique pour la gestion sonore (via le speaker) et musicale.

Offset Taille Infos Description
0x0000 word Number of active Channel(s)
0x0002 word Temporary variables for PC Speaker State
0x0004 word PC Speaker Enable
0x0006 word Audio System enable flag
0x0008 word pointer to CS:DriverInit
0x000A word pointer to CS:DriverShutdown
0x000C word pointer to CS:DriverUpdate
0x000E word pointer to CS:DriverAdlibWrite
0x0010 word Pointer to CS:DriverOPL2LPT Port address
0x0012 word extra variables, shared between channels
0x0016 word voice song pointer ?
0x001A word
: :
0x001F byte
: :
0x0022 16 bytes Voice 0 Sound Effect
0x0032 16 bytes Voice 1 music
0x0042 16 bytes Voice 2 music
0x0052 16 bytes Voice 3 music
0x0062 16 bytes Voice 4 music
0x0072 16 bytes Voice 5 music adLib
0x0082 16 bytes Voice 6 music adLib
0x00CA word Music data
max size: 0x8000
0x8001 byte SFX data
max size: 0x4000
0x8002 byte
: :

Voice x details

offset size Description
0 byte wait
+1 byte volume
+2 word ret
+4 word ptr
+6 word loop
+8 word pitch 1
+A word pitch 2
+C byte previous volume
+D byte priority
+E word Previous Reference

Music Format

start offset in ram

Offset size Description
0 byte Music targeted device (0: speaker, 1: tandy, 2: adLib)
1 byte number [N] of voice/stream 4 for speaker & Tandy, 6 for adlib
2 word Pointer to first Stream (relative to begining of the song data)
4 word Pointer to second Stream (relative to begining of the song data)
6..n word Pointer to ..[N] Stream (relative to begining of the song data)
xx - stream data
back2root/reverse-engineering/planet-x3/part4-audio-engine.txt · Dernière modification : 2023/02/15 22:51 de frater