"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.FakeMupen = void 0;
const N64Header_1 = require("./N64Header");
const FakeMemory_1 = require("modloader64_api/SidedProxy/FakeMemory");
const path_1 = __importDefault(require("path"));
const fs_1 = __importDefault(require("fs"));
class FakeMupen {
    rom;
    rom_data;
    ram;
    constructor(rom, logger, lobby) {
        this.rom = rom;
        this.rom_data = Buffer.alloc(0x50, 0);
        if (fs_1.default.existsSync(rom)) {
            let temp = fs_1.default.readFileSync(this.rom);
            temp.copy(this.rom_data, 0, 0, 0x50);
        }
        this.ram = new FakeMemory_1.FakeMemory();
    }
    getRomAccess() {
        return new FakeMemory_1.FakeRom();
    }
    getInternalPlugin() {
        return path_1.default.resolve(__dirname, "MupenServerPlugin.js");
    }
    getDebuggerAccess() {
        return {};
    }
    getRomOriginalSize() {
        return -1;
    }
    getYaz0Encoder() {
        return {};
    }
    getInputAccess() {
        return {};
    }
    getGfxAccess() {
        return {};
    }
    getSDLAccess() {
        return {};
    }
    getImGuiAccess() {
        return {};
    }
    on(which, callback) {
    }
    startEmulator(preStartCallback) {
        preStartCallback(this.rom_data);
        return this.ram;
    }
    stopEmulator() { }
    finishInjects() { }
    isEmulatorReady() {
        return true;
    }
    getLoadedRom() {
        return this.rom_data;
    }
    getFrameCount() {
        return -1;
    }
    setFrameCount(num) { }
    pauseEmulator() { }
    resumeEmulator() { }
    getRomHeader() {
        return new N64Header_1.N64Header(this.rom_data);
    }
    getMemoryAccess() {
        return this.ram;
    }
    softReset() { }
    hardReset() { }
    saveState(file) { }
    loadState(file) { }
    setSaveDir(path) { }
    getUtils() {
        return {};
    }
    getSaveStateManager() {
        return {};
    }
    getHiResTextureAccess() {
        return {};
    }
}
exports.FakeMupen = FakeMupen;
//# sourceMappingURL=FakeMupen.js.map