nes-emu
Version:
A NES emulator
21 lines (19 loc) • 580 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _constants = require("../constants");
var _registers = require("../../registers");
/** Sets options for the DMC channel. */
class DMCControl extends _registers.WriteOnlyInMemoryRegister {
constructor() {
super();
this.addReadOnlyField("dpcmPeriodId", 0, 4).addReadOnlyField("loop", 6).addField("irqEnable", 7);
}
/** Returns the DPCM period. */
get dpcmPeriod() {
return _constants.dpcmPeriods[this.dpcmPeriodId];
}
}
exports.default = DMCControl;