• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ snapshot_module_close函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中snapshot_module_close函数的典型用法代码示例。如果您正苦于以下问题:C++ snapshot_module_close函数的具体用法?C++ snapshot_module_close怎么用?C++ snapshot_module_close使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了snapshot_module_close函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: magicdesk_snapshot_read_module

int magicdesk_snapshot_read_module(snapshot_t *s)
{
    BYTE vmajor, vminor;
    snapshot_module_t *m;

    m = snapshot_module_open(s, SNAP_MODULE_NAME, &vmajor, &vminor);
    if (m == NULL) {
        return -1;
    }

    if ((vmajor != CART_DUMP_VER_MAJOR) || (vminor != CART_DUMP_VER_MINOR)) {
        snapshot_module_close(m);
        return -1;
    }

    if (0
        || (SMR_B_INT(m, &currbank) < 0)
        || (SMR_BA(m, roml_banks, 0x2000 * 64) < 0)) {
        snapshot_module_close(m);
        return -1;
    }

    snapshot_module_close(m);

    return magicdesk_common_attach();
}
开发者ID:AreaScout,项目名称:vice,代码行数:26,代码来源:magicdesk.c


示例2: riotcore_snapshot_write_module

int riotcore_snapshot_write_module(riot_context_t *riot_context, snapshot_t *p)
{
    snapshot_module_t *m;

    m = snapshot_module_create(p, riot_context->myname, RIOT_DUMP_VER_MAJOR, RIOT_DUMP_VER_MINOR);

    if (m == NULL) {
        return -1;
    }

    update_timer(riot_context);

    if (0
        || SMW_B(m, riot_context->riot_io[0]) < 0
        || SMW_B(m, riot_context->riot_io[1]) < 0
        || SMW_B(m, riot_context->riot_io[2]) < 0
        || SMW_B(m, riot_context->riot_io[3]) < 0
        || SMW_B(m, riot_context->r_edgectrl) < 0
        || SMW_B(m, (BYTE)(riot_context->r_irqfl | (riot_context->r_irqline ? 1 : 0))) < 0
        || SMW_B(m, (BYTE)(riot_context->r_N - (*(riot_context->clk_ptr) - riot_context->r_write_clk) / riot_context->r_divider)) < 0
        || SMW_W(m, (WORD)(riot_context->r_divider)) < 0
        || SMW_W(m, (BYTE)((*(riot_context->clk_ptr) - riot_context->r_write_clk) % riot_context->r_divider)) < 0
        || SMW_B(m, (BYTE)(riot_context->r_irqen ? 1 : 0)) < 0) {
            snapshot_module_close(m);
            return -1;
    }

    return snapshot_module_close(m);
}
开发者ID:EdCornejo,项目名称:emu-ex-plus-alpha,代码行数:29,代码来源:riotcore.c


示例3: actionreplay2_snapshot_read_module

int actionreplay2_snapshot_read_module(snapshot_t *s)
{
    BYTE vmajor, vminor;
    snapshot_module_t *m;

    m = snapshot_module_open(s, SNAP_MODULE_NAME, &vmajor, &vminor);
    if (m == NULL) {
        return -1;
    }

    if ((vmajor != CART_DUMP_VER_MAJOR) || (vminor != CART_DUMP_VER_MINOR)) {
        snapshot_module_close(m);
        return -1;
    }

    if (0
        || (SMR_B_INT(m, &ar_enabled) < 0)
        || (SMR_DW_INT(m, &ar_cap_enable) < 0)
        || (SMR_DW_INT(m, &ar_cap_disable) < 0)
        || (SMR_BA(m, roml_banks, 0x4000) < 0)) {
        snapshot_module_close(m);
        return -1;
    }

    snapshot_module_close(m);

    return actionreplay2_common_attach();
}
开发者ID:AreaScout,项目名称:vice,代码行数:28,代码来源:actionreplay2.c


示例4: dtlbasic_read_snapshot

static int dtlbasic_read_snapshot(struct snapshot_s *s)
{
    BYTE major_version, minor_version;
    snapshot_module_t *m;

    /* enable device */
    set_dtlbasic_dongle_enabled(1, NULL);

    m = snapshot_module_open(s, snap_module_name, &major_version, &minor_version);

    if (m == NULL) {
        return -1;
    }

    /* Do not accept versions higher than current */
    if (major_version > SNAP_MAJOR || minor_version > SNAP_MINOR) {
        snapshot_set_error(SNAPSHOT_MODULE_HIGHER_VERSION);
        goto fail;
    }

    if (0
        || SMR_DW_INT(m, &dtlbasic_counter) < 0
        || SMR_DW_INT(m, &write_status) < 0
        || SMR_DW_INT(m, &sense_status) < 0
        || SMR_DW_INT(m, &dtlbasic_state) < 0) {
        goto fail;
    }
    return snapshot_module_close(m);

fail:
    snapshot_module_close(m);
    return -1;
}
开发者ID:aerdnar,项目名称:emu-ex-plus-alpha,代码行数:33,代码来源:dtl-basic-dongle.c


示例5: sid_snapshot_write_module_simple

static int sid_snapshot_write_module_simple(snapshot_t *s)
{
    int sound, sid_engine;
    snapshot_module_t *m;

    m = snapshot_module_create(s, snap_module_name_simple, SNAP_MAJOR_SIMPLE,
                               SNAP_MINOR_SIMPLE);
    if (m == NULL) {
        return -1;
    }

    resources_get_int("Sound", &sound);
    if (SMW_B(m, (BYTE)sound) < 0) {
        snapshot_module_close(m);
        return -1;
    }

    if (sound) {
        resources_get_int("SidEngine", &sid_engine);
        if (SMW_B(m, (BYTE)sid_engine) < 0) {
            snapshot_module_close(m);
            return -1;
        }

        /* FIXME: Only data for first SID stored. */
        if (SMW_BA(m, sid_get_siddata(0), 32) < 0) {
            snapshot_module_close(m);
            return -1;
        }
    }

    snapshot_module_close(m);
    return 0;
}
开发者ID:Chegwin,项目名称:GBA4iOS-2.0-Beta-4,代码行数:34,代码来源:sid-snapshot.c


示例6: ds12c887rtc_snapshot_read_module

int ds12c887rtc_snapshot_read_module(snapshot_t *s)
{
    BYTE vmajor, vminor;
    snapshot_module_t *m;
    int temp_ds12c887rtc_address;

    m = snapshot_module_open(s, SNAP_MODULE_NAME, &vmajor, &vminor);
    if (m == NULL) {
        return -1;
    }

    if ((vmajor != CART_DUMP_VER_MAJOR) || (vminor != CART_DUMP_VER_MINOR)) {
        snapshot_module_close(m);
        return -1;
    }

    /* FIXME: Implement the RTC snapshot part */
    if (0
        || (SMR_DW_INT(m, &temp_ds12c887rtc_address) < 0)) {
        snapshot_module_close(m);
        return -1;
    }

    snapshot_module_close(m);

    /* HACK set address to an invalid value, then use the function */
    ds12c887rtc_base_address = -1;
    set_ds12c887rtc_base(temp_ds12c887rtc_address, NULL);

    return ds12c887rtc_enable();
}
开发者ID:AreaScout,项目名称:vice,代码行数:31,代码来源:ds12c887rtc.c


示例7: easyflash_snapshot_write_module

int easyflash_snapshot_write_module(snapshot_t *s)
{
    snapshot_module_t *m;

    m = snapshot_module_create(s, SNAP_MODULE_NAME,
                          CART_DUMP_VER_MAJOR, CART_DUMP_VER_MINOR);
    if (m == NULL) {
        return -1;
    }

    if (0
        || (SMW_B(m, (BYTE)easyflash_jumper) < 0)
        || (SMW_B(m, easyflash_register_00) < 0)
        || (SMW_B(m, easyflash_register_02) < 0)
        || (SMW_BA(m, easyflash_ram, 256) < 0)
        || (SMW_BA(m, roml_banks, 0x80000) < 0)
        || (SMW_BA(m, romh_banks, 0x80000) < 0)) {
        snapshot_module_close(m);
        return -1;
    }

    snapshot_module_close(m);

    if (0
        || (flash040core_snapshot_write_module(s, easyflash_state_low, FLASH_SNAP_MODULE_NAME) < 0)
        || (flash040core_snapshot_write_module(s, easyflash_state_high, FLASH_SNAP_MODULE_NAME) < 0)) {
        return -1;
    }

    return 0;
}
开发者ID:BigBoss21X,项目名称:vice-emu,代码行数:31,代码来源:easyflash.c


示例8: userport_rtc_read_snapshot_module

static int userport_rtc_read_snapshot_module(snapshot_t *s)
{
    BYTE major_version, minor_version;
    snapshot_module_t *m;

    /* enable device */
    set_userport_rtc_enabled(1, NULL);

    m = snapshot_module_open(s, snap_module_name, &major_version, &minor_version);

    if (m == NULL) {
        return -1;
    }

    /* Do not accept versions higher than current */
    if (major_version > SNAP_MAJOR || minor_version > SNAP_MINOR) {
        snapshot_set_error(SNAPSHOT_MODULE_HIGHER_VERSION);
        goto fail;
    }

    if (SMR_B_INT(m, &read_line_active) < 0) {
        goto fail;
    }
    snapshot_module_close(m);

    return rtc58321a_read_snapshot(rtc58321a_context, s);

fail:
    snapshot_module_close(m);
    return -1;
}
开发者ID:aerdnar,项目名称:emu-ex-plus-alpha,代码行数:31,代码来源:userport_rtc_58321a.c


示例9: finalexpansion_snapshot_write_module

int finalexpansion_snapshot_write_module(snapshot_t *s)
{
    snapshot_module_t *m;

    m = snapshot_module_create(s, SNAP_MODULE_NAME, VIC20CART_DUMP_VER_MAJOR, VIC20CART_DUMP_VER_MINOR);
    if (m == NULL) {
        return -1;
    }

    if (0
        || (SMW_B(m, register_a) < 0)
        || (SMW_B(m, register_b) < 0)
        || (SMW_B(m, lock_bit) < 0)
        || (SMW_BA(m, cart_ram, CART_RAM_SIZE) < 0)
        || (SMW_BA(m, flash_state.flash_data, CART_ROM_SIZE) < 0)) {
        snapshot_module_close(m);
        return -1;
    }

    snapshot_module_close(m);

    if ((flash040core_snapshot_write_module(s, &flash_state, FLASH_SNAP_MODULE_NAME) < 0)) {
        return -1;
    }

    return 0;
}
开发者ID:markjreed,项目名称:vice-emu,代码行数:27,代码来源:finalexpansion.c


示例10: freezemachine_snapshot_read_module

int freezemachine_snapshot_read_module(snapshot_t *s)
{
    BYTE vmajor, vminor;
    snapshot_module_t *m;

    m = snapshot_module_open(s, SNAP_MODULE_NAME, &vmajor, &vminor);
    if (m == NULL) {
        return -1;
    }

    if ((vmajor != CART_DUMP_VER_MAJOR) || (vminor != CART_DUMP_VER_MINOR)) {
        snapshot_module_close(m);
        return -1;
    }

    if (0
        || (SMR_B_INT(m, &rom_A14) < 0)
        || (SMR_B_INT(m, &roml_toggle) < 0)
        || (SMR_B_INT(m, &allow_toggle) < 0)
        || (SMR_BA(m, roml_banks, 0x4000) < 0)
        || (SMR_BA(m, romh_banks, 0x4000) < 0)) {
        snapshot_module_close(m);
        return -1;
    }

    snapshot_module_close(m);

    return freezemachine_common_attach();
}
开发者ID:sasq64,项目名称:script-vice,代码行数:29,代码来源:freezemachine.c


示例11: kcs_snapshot_read_module

int kcs_snapshot_read_module(snapshot_t *s)
{
    BYTE vmajor, vminor;
    snapshot_module_t *m;

    m = snapshot_module_open(s, SNAP_MODULE_NAME, &vmajor, &vminor);
    if (m == NULL) {
        return -1;
    }

    if ((vmajor != CART_DUMP_VER_MAJOR) || (vminor != CART_DUMP_VER_MINOR)) {
        snapshot_module_close(m);
        return -1;
    }

    if (0
        || (SMR_B_INT(m, &freeze_flag) < 0)
        || (SMR_B_INT(m, &config) < 0)
        || (SMR_BA(m, roml_banks, 0x2000) < 0)
        || (SMR_BA(m, romh_banks, 0x2000) < 0)
        || (SMR_BA(m, export_ram0, 0x2000) < 0)) {
        snapshot_module_close(m);
        return -1;
    }

    snapshot_module_close(m);

    return kcs_common_attach();
}
开发者ID:AreaScout,项目名称:vice,代码行数:29,代码来源:kcs.c


示例12: vic_fp_snapshot_write_module

int vic_fp_snapshot_write_module(snapshot_t *s)
{
    snapshot_module_t *m;

    m = snapshot_module_create(s, SNAP_MODULE_NAME,
                               VIC20CART_DUMP_VER_MAJOR,
                               VIC20CART_DUMP_VER_MINOR);
    if (m == NULL) {
        return -1;
    }

    if (0
        || (SMW_B(m, cart_bank_reg) < 0)
        || (SMW_B(m, cart_cfg_reg) < 0)
        || (SMW_BA(m, cart_ram, CART_RAM_SIZE) < 0)
        || (SMW_BA(m, cart_rom, CART_ROM_SIZE) < 0)) {
        snapshot_module_close(m);
        return -1;
    }

    snapshot_module_close(m);

    if ((flash040core_snapshot_write_module(s, &flash_state, FLASH_SNAP_MODULE_NAME) < 0)) {
        return -1;
    }

    return 0;
}
开发者ID:twinaphex,项目名称:vice-next,代码行数:28,代码来源:vic-fp.c


示例13: paperclip64_read_snapshot

static int paperclip64_read_snapshot(struct snapshot_s *s, int port)
{
    BYTE major_version, minor_version;
    snapshot_module_t *m;

    m = snapshot_module_open(s, snap_module_name, &major_version, &minor_version);

    if (m == NULL) {
        return -1;
    }

    /* Do not accept versions higher than current */
    if (major_version > SNAP_MAJOR || minor_version > SNAP_MINOR) {
        snapshot_set_error(SNAPSHOT_MODULE_HIGHER_VERSION);
        goto fail;
    }

    if (0
        || SMR_DW_INT(m, &counter) < 0
        || SMR_B(m, &command) < 0) {
        goto fail;
    }

    return snapshot_module_close(m);

fail:
    snapshot_module_close(m);
    return -1;
}
开发者ID:Rakashazi,项目名称:emu-ex-plus-alpha,代码行数:29,代码来源:paperclip64.c


示例14: mmc_snapshot_read_module

int mmc_snapshot_read_module(snapshot_t *s)
{
    return -1;
#if 0
    BYTE vmajor, vminor;
    snapshot_module_t *m;

    m = snapshot_module_open(s, SNAP_MODULE_NAME, &vmajor, &vminor);
    if (m == NULL) {
        return -1;
    }

    if ((vmajor != CART_DUMP_VER_MAJOR) || (vminor != CART_DUMP_VER_MINOR)) {
        snapshot_module_close(m);
        return -1;
    }

    if (0) {
        snapshot_module_close(m);
        return -1;
    }

    snapshot_module_close(m);
    return 0;
#endif
}
开发者ID:AreaScout,项目名称:vice,代码行数:26,代码来源:spi-sdcard.c


示例15: digimax_snapshot_write_module

int digimax_snapshot_write_module(snapshot_t *s)
{
    snapshot_module_t *m;

    m = snapshot_module_create(s, SNAP_MODULE_NAME,
                               CART_DUMP_VER_MAJOR, CART_DUMP_VER_MINOR);
    if (m == NULL) {
        return -1;
    }

    if (0
        || (SMW_DW(m, (DWORD)digimax_address) < 0)
/* FIXME: implement userport part in userport_digimax.c */
#if 0
        || (SMW_B(m, digimax_userport_address) < 0)
        || (SMW_B(m, digimax_userport_direction_A) < 0)
        || (SMW_B(m, digimax_userport_direction_B) < 0)
#endif
        || (SMW_BA(m, digimax_sound_data, 4) < 0)
        || (SMW_B(m, snd.voice0) < 0)
        || (SMW_B(m, snd.voice1) < 0)
        || (SMW_B(m, snd.voice2) < 0)
        || (SMW_B(m, snd.voice3) < 0)) {
        snapshot_module_close(m);
        return -1;
    }

    snapshot_module_close(m);
    return 0;
}
开发者ID:carriercomm,项目名称:VICE-Core,代码行数:30,代码来源:digimax.c


示例16: warpspeed_snapshot_read_module

int warpspeed_snapshot_read_module(snapshot_t *s)
{
    BYTE vmajor, vminor;
    snapshot_module_t *m;

    m = snapshot_module_open(s, SNAP_MODULE_NAME, &vmajor, &vminor);
    if (m == NULL) {
        return -1;
    }

    if ((vmajor != CART_DUMP_VER_MAJOR) || (vminor != CART_DUMP_VER_MINOR)) {
        snapshot_module_close(m);
        return -1;
    }

    if (0
        || (SMR_BA(m, roml_banks, 0x2000) < 0)
        || (SMR_BA(m, romh_banks, 0x2000) < 0)) {
        snapshot_module_close(m);
        return -1;
    }

    snapshot_module_close(m);

    return warpspeed_common_attach();
}
开发者ID:SMTDDR,项目名称:droidsound,代码行数:26,代码来源:warpspeed.c


示例17: fdc_snapshot_read_module

int fdc_snapshot_read_module(snapshot_t *p, int fnum)
{
    BYTE vmajor, vminor;
    BYTE byte, ndrv;
    DWORD dword;
    snapshot_module_t *m;
    char *name;

    name = lib_msprintf("FDC%d", fnum);

    m = snapshot_module_open(p, name, &vmajor, &vminor);
    lib_free(name);

    if (m == NULL) {
        log_message(fdc_log, "Could not find snapshot module %s", name);
        return -1;
    }

    if (vmajor != FDC_DUMP_VER_MAJOR) {
        log_error(fdc_log,
                  "Snapshot module version (%d.%d) newer than %d.%d.",
                  vmajor, vminor, FDC_DUMP_VER_MAJOR, FDC_DUMP_VER_MINOR);
        snapshot_module_close(m);
        return -1;
    }

    SMR_B(m, &byte);
    if (byte > FDC_LAST_STATE) {
        snapshot_module_close(m);
        return -1;
    }
    fdc[fnum].fdc_state = byte;

    /* clk till next invocation */
    SMR_DW(m, &dword);

    fdc[fnum].alarm_clk = drive_clk[fnum] + dword;
    alarm_set(fdc[fnum].fdc_alarm, fdc[fnum].alarm_clk);

    /* number of drives - so far 1 only */
    SMR_B(m, &ndrv);

    /* last accessed track/sector */
    SMR_B(m, &byte);
    fdc[fnum].last_track = byte;
    SMR_B(m, &byte);
    fdc[fnum].last_sector = byte;

    if (ndrv > 1) {
        /* ignore drv 0 values */
        SMR_B(m, &byte);
        SMR_B(m, &byte);
    }

    if (snapshot_module_close(m) < 0)
        return -1;

    return 0;
}
开发者ID:bobsummerwill,项目名称:VICE,代码行数:59,代码来源:fdc.c


示例18: sid_snapshot_read_module_simple

static int sid_snapshot_read_module_simple(snapshot_t *s)
{
    BYTE major_version, minor_version;
    snapshot_module_t *m;
    BYTE tmp[34];

    m = snapshot_module_open(s, snap_module_name_simple,
                             &major_version, &minor_version);
    if (m == NULL) {
        goto fail;
    }

    if (major_version > SNAP_MAJOR_SIMPLE
        || minor_version > SNAP_MINOR_SIMPLE) {
        log_error(LOG_DEFAULT,
                  "SID: Snapshot module version (%d.%d) newer than %d.%d.\n",
                  major_version, minor_version,
                  SNAP_MAJOR_SIMPLE, SNAP_MINOR_SIMPLE);
        snapshot_module_close(m);
        goto fail;
    }

    /* If more than 32 bytes are present then the resource "Sound" and
       "SidEngine" come first! If there is only one byte present, then
       sound is disabled. */
    if (SMR_BA(m, tmp, 34) < 0) {
        if (SMR_BA(m, tmp, 32) < 0) {
            if (SMR_BA(m, tmp, 1) < 0) {
                snapshot_module_close(m);
                goto fail;
            } else {
                sound_close();
            }
        } else {
            memcpy(sid_get_siddata(0), &tmp[0], 32);
        }
    } else {
        int res_sound = (int)(tmp[0]);
        int res_engine = (int)(tmp[1]);

        screenshot_prepare_reopen();
        sound_close();
        screenshot_try_reopen();
        resources_set_int("Sound", res_sound);
        if (res_sound) {
            resources_set_int("SidEngine", res_engine);
            /* FIXME: Only data for first SID read. */
            memcpy(sid_get_siddata(0), &tmp[2], 32);
            sound_open();
        }
    }

    return snapshot_module_close(m);

fail:
    log_error(LOG_DEFAULT, "Failed reading SID snapshot");
    return -1;
}
开发者ID:Chegwin,项目名称:GBA4iOS-2.0-Beta-4,代码行数:58,代码来源:sid-snapshot.c


示例19: finalexpansion_snapshot_read_module

int finalexpansion_snapshot_read_module(snapshot_t *s)
{
    BYTE vmajor, vminor;
    snapshot_module_t *m;
    BYTE *cart_flash = NULL;

    m = snapshot_module_open(s, SNAP_MODULE_NAME, &vmajor, &vminor);
    if (m == NULL) {
        return -1;
    }

    if (vmajor != VIC20CART_DUMP_VER_MAJOR) {
        snapshot_module_close(m);
        return -1;
    }

    if (!cart_ram) {
        cart_ram = lib_malloc(CART_RAM_SIZE);
    }
    if (!cart_flash) {
        cart_flash = lib_malloc(CART_ROM_SIZE);
    }

    flash040core_init(&flash_state, maincpu_alarm_context, FLASH040_TYPE_B, cart_flash);

    if (0
        || (SMR_B(m, &register_a) < 0)
        || (SMR_B(m, &register_b) < 0)
        || (SMR_B(m, &lock_bit) < 0)
        || (SMR_BA(m, cart_ram, CART_RAM_SIZE) < 0)
        || (SMR_BA(m, flash_state.flash_data, CART_ROM_SIZE) < 0)) {
        snapshot_module_close(m);
        flash040core_shutdown(&flash_state);
        lib_free(cart_ram);
        lib_free(cart_flash);
        cart_ram = NULL;
        cart_flash = NULL;
        return -1;
    }

    snapshot_module_close(m);

    if ((flash040core_snapshot_read_module(s, &flash_state, FLASH_SNAP_MODULE_NAME) < 0)) {
        flash040core_shutdown(&flash_state);
        lib_free(cart_ram);
        lib_free(cart_flash);
        cart_ram = NULL;
        cart_flash = NULL;
        return -1;
    }

    mem_cart_blocks = VIC_CART_RAM123 |
                      VIC_CART_BLK1 | VIC_CART_BLK2 | VIC_CART_BLK3 | VIC_CART_BLK5 |
                      VIC_CART_IO2 | VIC_CART_IO3;
    mem_initialize_memory();

    return 0;
}
开发者ID:markjreed,项目名称:vice-emu,代码行数:58,代码来源:finalexpansion.c


示例20: megacart_snapshot_read_module

int megacart_snapshot_read_module(snapshot_t *s)
{
    BYTE vmajor, vminor;
    snapshot_module_t *m;

    m = snapshot_module_open(s, SNAP_MODULE_NAME, &vmajor, &vminor);
    if (m == NULL) {
        return -1;
    }

    if (vmajor != VIC20CART_DUMP_VER_MAJOR) {
        snapshot_module_close(m);
        return -1;
    }

    if (!cart_ram) {
        cart_ram = lib_malloc(CART_RAM_SIZE);
    }
    if (!cart_nvram) {
        cart_nvram = lib_malloc(CART_NVRAM_SIZE);
    }
    if (!cart_rom) {
        cart_rom = lib_malloc(CART_ROM_SIZE);
    }

    if (0
        || (SMR_B(m, &bank_low_reg) < 0)
        || (SMR_B(m, &bank_high_reg) < 0)
        || (SMR_B_INT(m, &oe_flop) < 0)
        || (SMR_B_INT(m, &nvram_en_flop) < 0)
        || (SMR_BA(m, cart_ram, CART_RAM_SIZE) < 0)
        || (SMR_BA(m, cart_rom, CART_ROM_SIZE) < 0)
        || (SMR_BA(m, cart_nvram, CART_NVRAM_SIZE) < 0)) {
        snapshot_module_close(m);
        lib_free(cart_ram);
        lib_free(cart_nvram);
        lib_free(cart_rom);
        cart_ram = NULL;
        cart_nvram = NULL;
        cart_rom = NULL;
        return -1;
    }

    snapshot_module_close(m);

    cart_rom_low = cart_rom;
    cart_rom_high = cart_rom + 0x100000;

    reset_mode = BUTTON_RESET;

    mem_cart_blocks = VIC_CART_RAM123 |
                      VIC_CART_BLK1 | VIC_CART_BLK2 | VIC_CART_BLK3 | VIC_CART_BLK5 |
                      VIC_CART_IO2 | VIC_CART_IO3;
    mem_initialize_memory();

    return 0;
}
开发者ID:markjreed,项目名称:vice-emu,代码行数:57,代码来源:megacart.c



注:本文中的snapshot_module_close函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ snapshot_module_create函数代码示例发布时间:2022-05-30
下一篇:
C++ snapshot函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap