-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
114 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
;;; | ||
;;; nullsound - modular sound driver | ||
;;; Copyright (c) 2024 Damien Ciabrini | ||
;;; This file is part of ngdevkit | ||
;;; | ||
;;; ngdevkit is free software: you can redistribute it and/or modify | ||
;;; it under the terms of the GNU Lesser General Public License as | ||
;;; published by the Free Software Foundation, either version 3 of the | ||
;;; License, or (at your option) any later version. | ||
;;; | ||
;;; ngdevkit is distributed in the hope that it will be useful, | ||
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
;;; GNU Lesser General Public License for more details. | ||
;;; | ||
;;; You should have received a copy of the GNU Lesser General Public License | ||
;;; along with ngdevkit. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
;;; The following driver is based on doc found on neogeodev wiki | ||
;;; https://wiki.neogeodev.org/index.php?title=68k/Z80_communication | ||
|
||
.module nullsound | ||
|
||
.include "ym2610.inc" | ||
.include "ports.inc" | ||
|
||
|
||
;;; | ||
;;; Volume state tracker | ||
;;; ------------------- | ||
;;; Keep track of the global volume and fade out state | ||
;;; | ||
.area DATA | ||
|
||
;;; Global volume attenuation for FM channels | ||
state_volume_fm_global:: .blkb 1 | ||
;;; Global volume attenuation for SSG channels | ||
state_volume_ssg_global:: .blkb 1 | ||
;;; Global volume attenuation for ADPCM-A channels | ||
state_volume_adpcm_a_global:: .blkb 1 | ||
;;; Global volume attenuation for ADPCM-B channels | ||
state_volume_adpcm_b_global:: .blkb 1 | ||
|
||
|
||
.area CODE | ||
|
||
init_volume_state_tracker:: | ||
ld a, #0x0 | ||
ld (state_volume_fm_global), a | ||
ld a, #0x0 | ||
ld (state_volume_ssg_global), a | ||
ld a, #0x0 | ||
ld (state_volume_adpcm_a_global), a | ||
ld a, #0x0 | ||
ld (state_volume_adpcm_b_global), a | ||
ret |