Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up/Dump sound/songs data #298

Merged
merged 13 commits into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
430 changes: 430 additions & 0 deletions MPlayDef.s

Large diffs are not rendered by default.

12 changes: 11 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,14 @@ MID_BUILDDIR = $(BUILD_DIR)/$(MID_SUBDIR)
C_SOURCES := $(wildcard src/*.c)
ASM_SOURCES := $(wildcard asm/*.s data/*.s)
C_ASM_SOURCES := $(wildcard src/*.s)
SONG_SRCS := $(wildcard sound/songs/*.s)

C_OBJECTS := $(addprefix $(BUILD_DIR)/, $(C_SOURCES:%.c=%.o))
ASM_OBJECTS := $(addprefix $(BUILD_DIR)/, $(ASM_SOURCES:%.s=%.o))
C_ASM_OBJECTS := $(addprefix $(BUILD_DIR)/, $(C_ASM_SOURCES:%.s=%.o))
ALL_OBJECTS := $(C_OBJECTS) $(ASM_OBJECTS) $(C_ASM_OBJECTS)
SONG_OBJS := $(addprefix $(BUILD_DIR)/, $(SONG_SRCS:%.s=%.o))

ALL_OBJECTS := $(C_OBJECTS) $(ASM_OBJECTS) $(C_ASM_OBJECTS) $(SONG_OBJS)

SUBDIRS := $(sort $(dir $(ALL_OBJECTS)))

Expand Down Expand Up @@ -236,6 +239,13 @@ $(ASM_BUILDDIR)/%.o: $(ASM_SUBDIR)/%.s
$(ASM_BUILDDIR)/%.d: $(ASM_SUBDIR)/%.s
@$(call scaninc,$(INCLUDE_PATHS))

$(SONG_BUILDDIR)/%.o: $(SONG_SUBDIR)/%.s
@$(CPP) -x assembler-with-cpp $(CPPFLAGS) $< -o $(SONG_BUILDDIR)/$*.s
$(AS) $(ASFLAGS) -o $@ $(SONG_BUILDDIR)/$*.s

$(SONG_BUILDDIR)/%.d: $(SONG_SUBDIR)/%.s
@$(call scaninc,$(INCLUDE_PATHS))

$(C_BUILDDIR)/%.o: $(C_SUBDIR)/%.s
@$(CPP) -x assembler-with-cpp $(CPPFLAGS) $< -o $(C_BUILDDIR)/$*.s
$(AS) $(ASFLAGS) -o $@ $(C_BUILDDIR)/$*.s
Expand Down
20 changes: 20 additions & 0 deletions VoiceDef.s
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
.include "MPlayDef.s"

.equ DirectSound, 0x00
.equ SquareWave1, 0x01
.equ ProgNoise, 0x04
.equ RoughNoise, 0x01
.equ DirectSoundFix, 0x08
.equ ASquareWave1, 0x09
.equ ASquareWave2, 0x0A
.equ AProgWave, 0x0B
.equ AProgNoise, 0x0C
.equ KeySplit, 0x40
.equ DrumTable, 0x80

.equ FineNoise, 0x00

.equ WaveDuty75, 0x03
.equ WaveDuty50, 0x02
.equ WaveDuty25, 0x01
.equ WaveDuty12, 0x00
Loading
Loading