Previous 15994 Revisions Next

r12445 Monday 1st August, 2011 at 15:06:28 UTC by Tim Schuerewegen
cybikoxt: automatically load/save the ramdisk file to prevent filesystem changes from being lost (nw)
[src/mess/machine]cybiko.c

src/mess/machine/cybiko.c
r12444r12445
179179   sst39vfx_save(device, file);
180180}
181181
182static void cybiko_ramdisk_load(running_machine &machine, emu_file *file)
183{
184   void *ptr = ram_get_ptr(machine.device(RAM_TAG));
185   file->read( ptr, 512 * 1024);
186}
187
188static void cybiko_ramdisk_save(running_machine &machine, emu_file *file)
189{
190   void *ptr = ram_get_ptr(machine.device(RAM_TAG));
191   file->write( ptr, 512 * 1024);
192}
193
182194MACHINE_START( cybikov1 )
183195{
184196   _logerror( 0, ("machine_start_cybikov1\n"));
r12444r12445
219231   // multi-purpose flash
220232   nvram_system_load( machine, "flash2", cybiko_sst39vfx_load, 1);
221233   memory_set_bankptr( machine, "bank2", sst39vfx_get_base(flash2));
234   // ramdisk
235   nvram_system_load( machine, "ramdisk", cybiko_ramdisk_load, 0);
222236   // serial port
223237   cybiko_rs232_init(machine);
224238   // other
r12444r12445
282296   nvram_system_save( machine, "rtc", cybiko_pcf8593_save);
283297   // multi-purpose flash
284298   nvram_system_save( machine, "flash2", cybiko_sst39vfx_save);
299   // ramdisk
300   nvram_system_save( machine, "ramdisk", cybiko_ramdisk_save);
285301   // serial port
286302   cybiko_rs232_exit();
287303}

Previous 15994 Revisions Next


© 1998-2018 The MESS Team