INNER CODE UNIT · TypeScript

ram

mantou132/nesbox · packages/fceux/src/index.ts:152

    const ram = new Uint8Array(10 * 1024);
    const offset = this.#fceux!._getMemory();
    ram.set(new Uint8Array(this.#fceux!.HEAP8.buffer, offset, 2 * 1024));
    ram.set(new Uint8Array(this.#fceux!.HEAP8.buffer, offset + 0x6000, 8 * 1024), 2 * 1024);
    return ram;
  }
  read_ram(addr: number): number {
    return this.#fceux!._readMemory(addr);
  }
  write_ram(addr: number, val: number) {
    this.#fceux!._writeMemory(addr, val);
  }
  /**
   * @ignore
   */
  free() {
    // no body
  }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…