├── .gitignore ├── etc ├── lint_all_files ├── get_checksum_remainder_byte ├── lcd_get_digits_hex.asm ├── int.asm └── lint_file ├── makefile ├── src ├── voice │ ├── remove │ │ ├── remove.asm │ │ └── poly.asm │ └── reset.asm ├── delay.asm ├── test │ ├── volume.asm │ ├── adc.asm │ ├── auto_scaling.asm │ ├── lcd.asm │ ├── rom.asm │ ├── kbd.asm │ ├── switch.asm │ └── tape.asm ├── cpu.asm ├── ui │ ├── increment_decrement.asm │ ├── slider.asm │ ├── button │ │ └── test_mode_combo.asm │ └── ui.asm ├── memcpy.asm ├── event.asm ├── peripherals.asm ├── midi │ └── sysex │ │ └── rx │ │ └── voice_param.asm ├── log.asm ├── patch │ ├── load.asm │ ├── initialise.asm │ ├── activate │ │ ├── pitch_eg.asm │ │ ├── lfo.asm │ │ └── operator_eg.asm │ ├── validate.asm │ ├── convert │ │ ├── to_dx9.asm │ │ └── from_dx9.asm │ ├── deserialise.asm │ └── serialise.asm ├── led.asm ├── pedals.asm ├── jumpoff.asm ├── pitch_bend.asm ├── tape │ ├── input │ │ ├── all.asm │ │ └── single.asm │ └── verify.asm ├── macro.asm ├── sci.asm ├── yamaha_dx97.asm ├── pitch_eg.asm ├── portamento.asm └── ocf.asm └── styleguide.md /.gitignore: -------------------------------------------------------------------------------- 1 | build 2 | ghidra 3 | dev 4 | listing.txt 5 | symbols.txt 6 | *.swp 7 | -------------------------------------------------------------------------------- /etc/lint_all_files: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | files="$(find ./src -type f -name "*.asm")" 4 | current_directory=$(dirname ${0}) 5 | 6 | for filename in ${files} 7 | do 8 | ${current_directory}/./lint_file --input_file ${filename} --fix 9 | done 10 | -------------------------------------------------------------------------------- /makefile: -------------------------------------------------------------------------------- 1 | .POSIX: 2 | .DELETE_ON_ERROR: 3 | MAKEFLAGS += --warn-undefined-variables 4 | MAKEFLAGS += --no-builtin-rules 5 | 6 | .PHONY: clean 7 | 8 | SRC_DIR := src 9 | BUILD_DIR := build 10 | BIN_OUTPUT := ${BUILD_DIR}/yamaha_dx97.bin 11 | INPUT_ASM := ${SRC_DIR}/yamaha_dx97.asm 12 | LISTING_TXT := listing.txt 13 | SYMBOLS_TXT := symbols.txt 14 | 15 | EPROM_TYPE := M27128A@DIP28 16 | 17 | all: ${BIN_OUTPUT} 18 | 19 | ${BIN_OUTPUT}: ${BUILD_DIR} 20 | dasm ${INPUT_ASM} -f3 -v4 -o${BIN_OUTPUT} 21 | 22 | dev: ${BUILD_DIR} 23 | dasm ${INPUT_ASM} -f3 -v4 -o${BIN_OUTPUT} -l${LISTING_TXT} -s${SYMBOLS_TXT} 24 | 25 | ${BUILD_DIR}: 26 | mkdir -p ${BUILD_DIR} 27 | 28 | burn: ${BIN_OUTPUT} 29 | minipro -p "${EPROM_TYPE}" -w ${BIN_OUTPUT} 30 | 31 | burn_pin_test: 32 | minipro -p "${EPROM_TYPE}" --pin_check 33 | 34 | burn_verify: 35 | minipro -p "${EPROM_TYPE}" --verify ${BIN_OUTPUT} 36 | 37 | clean: 38 | rm -rf ${BUILD_DIR} 39 | 40 | lint: 41 | ./etc/lint_all_files 42 | -------------------------------------------------------------------------------- /src/voice/remove/remove.asm: -------------------------------------------------------------------------------- 1 | ; ============================================================================== 2 | ; YAMAHA DX9/7 FIRMWARE 3 | ; Copyright (C) 2022 AJXS (https://ajxs.me/) 4 | ; 5 | ; SPDX-License-Identifier: GPL-3.0-or-later 6 | ; ============================================================================== 7 | ; voice/remove.asm 8 | ; ============================================================================== 9 | ; @TAKEN_FROM_DX7_FIRMWARE 10 | ; DESCRIPTION: 11 | ; Removes a voice with the specified note. 12 | ; This routine is called by both MIDI, and keyboard events. 13 | ; 14 | ; ARGUMENTS: 15 | ; Registers: 16 | ; * ACCB: The MIDI note number of the note to remove. 17 | ; 18 | ; REGISTERS MODIFIED: 19 | ; * ACCA, ACCB, IX 20 | ; ============================================================================== 21 | 22 | .PROCESSOR HD6303 23 | 24 | voice_remove: SUBROUTINE 25 | STAB