You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DAT files with sound effects doesn't seem to be properly supported. This introduces a number of issues, including a crash when a game tries to play a sound using the SFX condact. The way sound works in DAAD is via the PICTURE command, which loads the sound data in the picture buffer, to be played later with SFX n 255.
The fastest way to reproduce the crash is playing the Amiga version of Espacial, which plays a sound as soon as you interact with the menu using the space bar.
File "C:\Users\Admin\Desktop\naps 23.10 portable win32\naps\condactos_daad.py", line 206, in c1_PICTURE
if gui.hay_grafico (picno):
File "C:\Users\Admin\Desktop\naps 23.10 portable win32\naps\gui_pygame.py", line 683, in hay_grafico
if not graficos_bitmap.recursos[numero] or 'imagen' not in graficos_bitmap.recursos[numero]:
IndexError: list index out of range
Sounds are identified in the DAT file because bit 4 of the entry flags is set (bit 0 is the floating flag, bit 1 is the cache flag, bit 2 switches the CGA red/blue palette, bit 3 I have no idea).
In addition, sounds have the same 6 byte header as images, except the height word has the highest bit set (just like the width word is set to mark compressed images). Width and height are set to 0 otherwise.
The sound data itself is a raw signed 8 bit sample. The playback frequency is determined by the X value in the DAT header, which accepts values from 0 to 5 for frequencies of 5, 7, 9.5, 15, 20 and 30Hz respectively. SFX n 255 just plays the sample and blocks until the playback ends (the first parameter, n, is ignored).
SFX, when parameter 2 is not 255, sets a system variable to the value of parameter 1. In this variable, bit 0 marks if there should be a click sound when a key is pressed, and bit 1 enables keyboard repeat. I've not supported this in ADP and as far as I know there is no game using this feature.
The text was updated successfully, but these errors were encountered:
DAT files with sound effects doesn't seem to be properly supported. This introduces a number of issues, including a crash when a game tries to play a sound using the SFX condact. The way sound works in DAAD is via the PICTURE command, which loads the sound data in the picture buffer, to be played later with SFX n 255.
The fastest way to reproduce the crash is playing the Amiga version of Espacial, which plays a sound as soon as you interact with the menu using the space bar.
Sounds are identified in the DAT file because bit 4 of the entry flags is set (bit 0 is the floating flag, bit 1 is the cache flag, bit 2 switches the CGA red/blue palette, bit 3 I have no idea).
In addition, sounds have the same 6 byte header as images, except the height word has the highest bit set (just like the width word is set to mark compressed images). Width and height are set to 0 otherwise.
The sound data itself is a raw signed 8 bit sample. The playback frequency is determined by the X value in the DAT header, which accepts values from 0 to 5 for frequencies of 5, 7, 9.5, 15, 20 and 30Hz respectively. SFX n 255 just plays the sample and blocks until the playback ends (the first parameter, n, is ignored).
SFX, when parameter 2 is not 255, sets a system variable to the value of parameter 1. In this variable, bit 0 marks if there should be a click sound when a key is pressed, and bit 1 enables keyboard repeat. I've not supported this in ADP and as far as I know there is no game using this feature.
The text was updated successfully, but these errors were encountered: