Browse Source

Starting a rewrite of the NESBank class to support 1k, 2k, 4k, and the normal 8k access.

dev-bank
Bryan Miller 5 years ago
parent
commit
e2900290c6
1 changed files with 8 additions and 7 deletions
  1. +8
    -7
      app/js/models/NESBank.js

+ 8
- 7
app/js/models/NESBank.js View File

constructor(){ constructor(){
super(); super();
this.__LP = []; // Left Patterns (Sprites) this.__LP = []; // Left Patterns (Sprites)
this.__RP = []; // Right Patterns (Backgrounds)
this.__AccessMode = 2; // 0 = Sprites only | 1 = BG only | 2 = Sprites and BG
this.__RP = []; // Right Patterns (Backgrounds)
this.__View = [];
this.__AccessMode = NESBank.ACCESSMODE_8K;
this.__AccessOffset = 0;


var handle_datachanged = Utils.debounce((function(side){ var handle_datachanged = Utils.debounce((function(side){
if ((side == 0 && (this.__AccessMode == 0 || this.__AccessMode == 2)) || if ((side == 0 && (this.__AccessMode == 0 || this.__AccessMode == 2)) ||






NESBank.ACCESSMODE_SPRITE = 0;
NESBank.ACCESSMODE_BACKGROUND = 1;
NESBank.ACCESSMODE_FULL = 2;


NESBank.ACCESSMODE_8K = 0;
NESBank.ACCESSMODE_1K = 1;
NESBank.ACCESSMODE_2K = 2;
NESBank.ACCESSMODE_4K = 3;

Loading…
Cancel
Save