本文整理汇总了C++中save_pointer函数的典型用法代码示例。如果您正苦于以下问题:C++ save_pointer函数的具体用法?C++ save_pointer怎么用?C++ save_pointer使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了save_pointer函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: auto_alloc_array
void cdda_device::device_start()
{
/* allocate an audio cache */
m_audio_cache = auto_alloc_array( machine(), UINT8, CD_MAX_SECTOR_DATA * MAX_SECTORS );
m_stream = machine().sound().stream_alloc(*this, 0, 2, 44100);
m_audio_playing = 0;
m_audio_pause = 0;
m_audio_ended_normally = 0;
m_audio_lba = 0;
m_audio_length = 0;
m_audio_samples = 0;
m_audio_bptr = 0;
m_disc = NULL;
save_item( NAME(m_audio_playing) );
save_item( NAME(m_audio_pause) );
save_item( NAME(m_audio_ended_normally) );
save_item( NAME(m_audio_lba) );
save_item( NAME(m_audio_length) );
save_pointer( NAME(m_audio_cache), CD_MAX_SECTOR_DATA * MAX_SECTORS );
save_item( NAME(m_audio_samples) );
save_item( NAME(m_audio_bptr) );
}
开发者ID:Ander-son,项目名称:libretro-mame,代码行数:25,代码来源:cdda.c
示例2: membank
void cloud9_state::video_start()
{
static const int resistances[3] = { 22000, 10000, 4700 };
/* allocate second bank of videoram */
m_videoram = std::make_unique<uint8_t[]>(0x8000);
membank("bank1")->set_base(m_videoram.get());
/* get pointers to our PROMs */
m_syncprom = memregion("proms")->base() + 0x000;
m_wpprom = memregion("proms")->base() + 0x200;
m_priprom = memregion("proms")->base() + 0x300;
/* compute the color output resistor weights at startup */
compute_resistor_weights(0, 255, -1.0,
3, resistances, m_rweights, 1000, 0,
3, resistances, m_gweights, 1000, 0,
3, resistances, m_bweights, 1000, 0);
/* allocate a bitmap for drawing sprites */
m_screen->register_screen_bitmap(m_spritebitmap);
/* register for savestates */
save_pointer(NAME(m_videoram.get()), 0x8000);
save_item(NAME(m_video_control));
save_item(NAME(m_bitmode_addr));
}
开发者ID:Robbbert,项目名称:store1,代码行数:27,代码来源:cloud9.cpp
示例3: c64_ram_pointer
void c64_xl80_device::device_start()
{
// allocate memory
c64_ram_pointer(machine(), RAM_SIZE);
// state saving
save_pointer(NAME(m_ram), RAM_SIZE);
}
开发者ID:cyberkni,项目名称:276in1JAMMA,代码行数:8,代码来源:xl80.c
示例4: auto_alloc_array
void pc8500_state::video_start()
{
/* allocate video memory */
m_video_ram = auto_alloc_array(m_machine, UINT8, PC8500_LCD_VIDEORAM_SIZE);
/* register for state saving */
save_pointer(NAME(m_video_ram), PC8500_LCD_VIDEORAM_SIZE);
}
开发者ID:cdenix,项目名称:psmame,代码行数:8,代码来源:pc8401a.c
示例5: auto_alloc_array
void zeus2_device::device_start()
{
/* allocate memory for "wave" RAM */
waveram[0] = auto_alloc_array(machine(), UINT32, WAVERAM0_WIDTH * WAVERAM0_HEIGHT * 8/4);
//waveram[1] = auto_alloc_array(machine(), UINT32, WAVERAM1_WIDTH * WAVERAM1_HEIGHT * 12/4);
m_frameColor = std::make_unique<UINT32[]>(WAVERAM1_WIDTH * WAVERAM1_HEIGHT * 2);
m_frameDepth = std::make_unique<UINT16[]>(WAVERAM1_WIDTH * WAVERAM1_HEIGHT * 2);
/* initialize polygon engine */
poly = auto_alloc(machine(), zeus2_renderer(this));
//m_screen = machine().first_screen();
m_screen = downcast<screen_device *>(machine().device("screen"));
m_vblank.resolve_safe();
m_irq.resolve_safe();
/* we need to cleanup on exit */
//machine().add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(zeus2_device::exit_handler2), this));
int_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(zeus2_device::int_timer_callback), this));
vblank_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(zeus2_device::display_irq), this));
/* save states */
save_pointer(NAME(waveram[0]), WAVERAM0_WIDTH * WAVERAM0_HEIGHT * 8 / sizeof(waveram[0][0]));
//save_pointer(NAME(waveram[1]), WAVERAM1_WIDTH * WAVERAM1_HEIGHT * 12 / sizeof(waveram[1][0]));
save_pointer(NAME(m_frameColor.get()), WAVERAM1_WIDTH * WAVERAM1_HEIGHT * 2);
save_pointer(NAME(m_frameDepth.get()), WAVERAM1_WIDTH * WAVERAM1_HEIGHT * 2);
save_item(NAME(m_zeusbase));
save_item(NAME(m_renderRegs));
save_item(NAME(zeus_fifo));
save_item(NAME(zeus_fifo_words));
save_item(NAME(zeus_cliprect.min_x));
save_item(NAME(zeus_cliprect.max_x));
save_item(NAME(zeus_cliprect.min_y));
save_item(NAME(zeus_cliprect.max_y));
save_item(NAME(zeus_matrix));
save_item(NAME(zeus_point));
save_item(NAME(zeus_point2));
save_item(NAME(zeus_texbase));
save_item(NAME(m_renderMode));
save_item(NAME(zeus_quad_size));
save_item(NAME(m_fill_color));
save_item(NAME(m_fill_depth));
save_item(NAME(m_renderPtr));
save_item(NAME(m_yScale));
}
开发者ID:GiuseppeGorgoglione,项目名称:mame,代码行数:46,代码来源:zeus2.cpp
示例6: save_pointer
INPUT_PORTS_END
void harriet_state::machine_start()
{
m_zpram_data = std::make_unique<u8[]>(0x800);
subdevice<nvram_device>("zpram")->set_base(m_zpram_data.get(), 0x800);
save_pointer(NAME(m_zpram_data), 0x800);
}
开发者ID:fesh0r,项目名称:mame-full,代码行数:8,代码来源:harriet.cpp
示例7: if
void psion_state::machine_start()
{
if (!strcmp(machine().system().name, "psionlam"))
{
m_rom_bank_count = 3;
m_ram_bank_count = 0;
}
else if (!strcmp(machine().system().name, "psionp350"))
{
m_rom_bank_count = 0;
m_ram_bank_count = 5;
}
else if (!strncmp(machine().system().name, "psionlz", 7))
{
m_rom_bank_count = 3;
m_ram_bank_count = 3;
}
else if (!strcmp(machine().system().name, "psionp464"))
{
m_rom_bank_count = 3;
m_ram_bank_count = 9;
}
else
{
m_rom_bank_count = 0;
m_ram_bank_count = 0;
}
if (m_rom_bank_count)
{
UINT8* rom_base = (UINT8 *)memregion("maincpu")->base();
membank("rombank")->configure_entry(0, rom_base + 0x8000);
membank("rombank")->configure_entries(1, m_rom_bank_count-1, rom_base + 0x10000, 0x4000);
membank("rombank")->set_entry(0);
}
if (m_ram_bank_count)
{
m_paged_ram = auto_alloc_array(machine(), UINT8, m_ram_bank_count * 0x4000);
memset(m_paged_ram, 0, sizeof(UINT8) * (m_ram_bank_count * 0x4000));
membank("rambank")->configure_entries(0, m_ram_bank_count, m_paged_ram, 0x4000);
membank("rambank")->set_entry(0);
}
save_item(NAME(m_kb_counter));
save_item(NAME(m_enable_nmi));
save_item(NAME(m_tcsr_value));
save_item(NAME(m_stby_pwr));
save_item(NAME(m_pulse));
save_item(NAME(m_rom_bank));
save_item(NAME(m_ram_bank));
save_item(NAME(m_port2_ddr));
save_item(NAME(m_port2));
save_item(NAME(m_port6_ddr));
save_item(NAME(m_port6));
save_pointer(NAME(m_paged_ram), m_ram_bank_count * 0x4000);
}
开发者ID:antervud,项目名称:MAMEHub,代码行数:58,代码来源:psion.c
示例8: auto_alloc_array
void naomi_m2_board::device_start()
{
naomi_board::device_start();
ram = auto_alloc_array(machine(), UINT8, RAM_SIZE);
save_item(NAME(rom_cur_address));
save_pointer(NAME(ram), RAM_SIZE);
}
开发者ID:dinkc64,项目名称:mame,代码行数:9,代码来源:naomim2.c
示例9: auto_alloc_array_clear
void tc0110pcr_device::device_start()
{
m_ram = auto_alloc_array_clear(machine(), UINT16, TC0110PCR_RAM_SIZE);
save_pointer(NAME(m_ram), TC0110PCR_RAM_SIZE);
save_item(NAME(m_type));
machine().save().register_postload(save_prepost_delegate(FUNC(tc0110pcr_device::restore_colors), this));
}
开发者ID:cyberkni,项目名称:276in1JAMMA,代码行数:9,代码来源:tc0110pcr.c
示例10: auto_alloc_array
void v1050_state::video_start()
{
/* allocate memory */
m_attr_ram = auto_alloc_array(machine(), UINT8, V1050_VIDEORAM_SIZE);
/* register for state saving */
save_item(NAME(m_attr));
save_pointer(NAME(m_attr_ram), V1050_VIDEORAM_SIZE);
}
开发者ID:kleopatra999,项目名称:mess-svn,代码行数:9,代码来源:v1050.c
示例11: VIDEO_START_MEMBER
INPUT_PORTS_END
VIDEO_START_MEMBER(vegaeo_state,vega)
{
m_vega_vram = auto_alloc_array(machine(), UINT32, 0x14000*2/4);
save_pointer(NAME(m_vega_vram), 0x14000*2/4);
save_item(NAME(m_vega_vbuffer));
}
开发者ID:mbcoguno,项目名称:mame,代码行数:9,代码来源:vegaeo.c
示例12: auto_alloc_array_clear
void taito_zoom_device::device_start()
{
m_snd_shared_ram = auto_alloc_array_clear(machine(), UINT8, 0x100);
// register for savestates
save_item(NAME(m_reg_address));
save_item(NAME(m_tms_ctrl));
save_pointer(NAME(m_snd_shared_ram), 0x100);
}
开发者ID:Ander-son,项目名称:libretro-mame,代码行数:9,代码来源:taito_zm.c
示例13: save_item
void deco156_state::video_start()
{
m_spriteram = std::make_unique<UINT16[]>(0x2000/2);
/* and register the allocated ram so that save states still work */
save_item(NAME(m_pf1_rowscroll));
save_item(NAME(m_pf2_rowscroll));
save_pointer(NAME(m_spriteram.get()), 0x2000/2);
}
开发者ID:bradhugh,项目名称:mame,代码行数:9,代码来源:deco156.cpp
示例14: save_item
void eeprom_base_device::device_start()
{
uint32_t size = (m_data_bits == 8 ? 1 : 2) << m_address_bits;
m_data = std::make_unique<uint8_t []>(size);
// save states
save_item(NAME(m_completion_time));
save_pointer(m_data.get(), "m_data", size);
}
开发者ID:goofwear,项目名称:mame,代码行数:9,代码来源:eeprom.cpp
示例15: VIDEO_START_MEMBER
VIDEO_START_MEMBER(leland_state,ataxx)
{
/* first do the standard stuff */
m_video_ram = make_unique_clear<uint8_t[]>(VRAM_SIZE);
/* allocate memory */
m_ataxx_qram = make_unique_clear<uint8_t[]>(QRAM_SIZE);
save_pointer(NAME(m_video_ram.get()), VRAM_SIZE);
save_pointer(NAME(m_ataxx_qram.get()), QRAM_SIZE);
save_item(NAME(m_xscroll));
save_item(NAME(m_yscroll));
for (uint8_t i = 0; i < 2; i++)
{
save_item(NAME(m_vram_state[i].m_addr), i);
save_item(NAME(m_vram_state[i].m_latch), i);
}
}
开发者ID:qwijibo,项目名称:mame,代码行数:18,代码来源:leland.cpp
示例16: common_start
void nes_fukutake_device::device_start()
{
common_start();
save_item(NAME(m_latch));
// 2816 (?) bytes of RAM
m_ram = auto_alloc_array_clear(machine(), UINT8, 0xb00);
save_pointer(NAME(m_ram), 0xb00);
}
开发者ID:Ilgrim,项目名称:MAMEHub,代码行数:9,代码来源:nes_pirate.c
示例17: save_item
void naomi_m2_board::device_start()
{
naomi_board::device_start();
ram = std::make_unique<uint8_t[]>(RAM_SIZE);
save_item(NAME(rom_cur_address));
save_pointer(NAME(ram.get()), RAM_SIZE);
}
开发者ID:goofwear,项目名称:mame,代码行数:9,代码来源:naomim2.cpp
示例18: memregion
INPUT_PORTS_END
void c65_state::machine_start()
{
m_iplrom = memregion("maincpu")->base();
save_pointer(NAME(m_cram.target()), 0x800);
}
开发者ID:DragonMinded,项目名称:mame,代码行数:9,代码来源:c65.cpp
示例19: save_item
void taito_zoom_device::device_start()
{
m_snd_shared_ram = make_unique_clear<UINT8[]>(0x100);
// register for savestates
save_item(NAME(m_reg_address));
save_item(NAME(m_tms_ctrl));
save_pointer(NAME(m_snd_shared_ram.get()), 0x100);
}
开发者ID:DragonMinded,项目名称:mame,代码行数:9,代码来源:taito_zm.cpp
示例20: auto_alloc_array
void deco156_state::video_start()
{
m_spriteram = auto_alloc_array(machine(), UINT16, 0x2000/2);
/* and register the allocated ram so that save states still work */
save_item(NAME(m_pf1_rowscroll));
save_item(NAME(m_pf2_rowscroll));
save_pointer(NAME(m_spriteram), 0x2000/2);
}
开发者ID:crazii,项目名称:mameplus,代码行数:9,代码来源:deco156.c
注:本文中的save_pointer函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论