Previous 199869 Revisions Next

r33645 Wednesday 3rd December, 2014 at 11:01:10 UTC by Fabio Priuli
(MESS) apollo: made possible to load cartridge tapes from softlist, by dealing with
these images like it's done for cassettes and floppies. [Fabio Priuli]

out of whatsnew: eventually, I hope to have some more spare time to clean up image handling
because the different implementations for each media type cause a lot of unneeded headaches.
[src/emu/bus/isa]sc499.c sc499.h

trunk/src/emu/bus/isa/sc499.c
r242156r242157
1616 */
1717
1818#include "sc499.h"
19#include "formats/ioprocs.h"
1920
2021#define VERBOSE 0
2122
r242156r242157
13071308
13081309bool sc499_ctape_image_device::call_load()
13091310{
1310   if (software_entry() == NULL)
1311   {
1312      m_ctape_data.resize(length());
1313      fread(m_ctape_data, length());
1314   }
1315   else
1316   {
1317      m_ctape_data.resize(get_software_region_length("ctape"));
1318      memcpy(m_ctape_data, get_software_region("ctape"), get_software_region_length("ctape"));
1319   }
1311   UINT32 size;
1312   io_generic io;
1313   io.file = (device_image_interface *)this;
1314   io.procs = &image_ioprocs;
1315   io.filler = 0xff;
13201316
1317   size = io_generic_size(&io);
1318   m_ctape_data.resize(size);
1319
1320   io_generic_read(&io, m_ctape_data, 0, size);
1321
13211322   return IMAGE_INIT_PASS;
13221323}
13231324
trunk/src/emu/bus/isa/sc499.h
r242156r242157
3131   
3232   // image-level overrides
3333   virtual bool call_load();
34//   virtual bool call_softlist_load(software_list_device &swlist, const char *swname, const rom_entry *start_entry) { return load_software(swlist, swname, start_entry); }
35   virtual bool call_softlist_load(software_list_device &swlist, const char *swname, const rom_entry *start_entry) { printf("%s\n", swname); return load_software(swlist, swname, start_entry); }
34   virtual bool call_softlist_load(software_list_device &swlist, const char *swname, const rom_entry *start_entry) { return load_software(swlist, swname, start_entry); }
3635   virtual void call_unload();
3736   virtual iodevice_t image_type() const { return IO_MAGTAPE; }
3837   


Previous 199869 Revisions Next


© 1997-2024 The MAME Team