UNPKG

nes-emu

Version:

A NES emulator

16 lines (15 loc) 500 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _registers = require("../../registers"); /** Controls the sample length of the DMC channel when using DPCM mode. */ class DMCSampleLength extends _registers.WriteOnlyInMemoryRegister { /** Returns the real sample length in bytes. */ get lengthInBytes() { // sample length = %LLLL.LLLL0001 = (L * 16) + 1 bytes return this.value * 16 + 1; } } exports.default = DMCSampleLength;