CDDA: Difference between revisions

From NeoGeo Development Wiki
Jump to navigation Jump to search
m (1 revision)
mNo edit summary
Line 1: Line 1:
CD Digital Audio tracks.
CDDA stands for CD Digital Audio.
 
When loading a game (or even when the system boots ?), the "CDDA flag" byte at location $000107 in the [[68k]] program is checked. Bit 7 is masked off.
 
== Z80 RAM check method ==
This method was probably implemented to simplify the porting of small games to the NeoGeo CD. Games that didn't need in-game file loading only had to have their vector table and [[sound driver]] code replaced. The sound driver itself translates these commands to CDDA ones and drops them to a specific location in its own RAM, which is then read back and executed by the BIOS when using the [[BIOS calls|$C0044A call]].
 
Putting the CDDA flag byte at $000107 to 0 or 1 enables this method and sets the Z80 return address to $FEF8.
Setting the CDDA flag to any other values allows to choose what the return address will be (set with the 16bit value at $00013A).
 
For example, [[Puzzled]] uses this method. The CDDA flag is set to 0 in the program header. The 68k sends the exact same "play music" Z80 commands as the MVS version of the game, the [[sound driver]] then converts them to CDDA ones and drops them at $FEF8.
 
== Direct method ==
 
BIOS call $C0056A. Command/track pair in D0. (05=read, track number in BCD format).
 
 
 
CDDA functionalities are disabled if ($00013A)=$0000. Set to $FFFF if using the default $FEF8 value.


[[Category:Audio system]]
[[Category:Audio system]]

Revision as of 00:39, 14 February 2011

CDDA stands for CD Digital Audio.

When loading a game (or even when the system boots ?), the "CDDA flag" byte at location $000107 in the 68k program is checked. Bit 7 is masked off.

Z80 RAM check method

This method was probably implemented to simplify the porting of small games to the NeoGeo CD. Games that didn't need in-game file loading only had to have their vector table and sound driver code replaced. The sound driver itself translates these commands to CDDA ones and drops them to a specific location in its own RAM, which is then read back and executed by the BIOS when using the $C0044A call.

Putting the CDDA flag byte at $000107 to 0 or 1 enables this method and sets the Z80 return address to $FEF8. Setting the CDDA flag to any other values allows to choose what the return address will be (set with the 16bit value at $00013A).

For example, Puzzled uses this method. The CDDA flag is set to 0 in the program header. The 68k sends the exact same "play music" Z80 commands as the MVS version of the game, the sound driver then converts them to CDDA ones and drops them at $FEF8.

Direct method

BIOS call $C0056A. Command/track pair in D0. (05=read, track number in BCD format).


CDDA functionalities are disabled if ($00013A)=$0000. Set to $FFFF if using the default $FEF8 value.