Previous 15994 Revisions Next

r2173 Sunday 30th March, 2008 at 22:08:42 UTC by Nathan Woods
Changed DEVICE_INIT and DEVICE_EXIT to follow the same prototypes as MAME's
DEVICE_START and DEVICE_STOP
[src/mess]device.c device.h image.c image.h
[src/mess/devices]appldriv.c basicdsk.c basicdsk.h bitbngr.c cartslot.c cassette.c chd_cd.c coco_vhd.c dsk.c flopdrv.c flopdrv.h harddriv.c harddriv.h idedrive.c mflopimg.c
[src/mess/drivers]a2600.c a7800.c abc80x.c apexc.c atarist.c gamecom.c gamepock.c gb.c geneve.c intv.c nc.c nes.c oric.c pc8801.c pdp1.c pokemini.c ql.c sg1000.c sms.c svi318.c thomson.c ti85.c ti990_10.c ti99_4p.c ti99_4x.c ti99_8.c tx0.c vc20.c wswan.c
[src/mess/formats]thom_dsk.c thom_dsk.h
[src/mess/includes]a7800.h d88.h gamecom.h gb.h intv.h nc.h nes.h oric.h pdp1.h pokemini.h serial.h sms.h svi318.h thomson.h ti85.h tx0.h vc20.h wswan.h
[src/mess/machine]990_hd.c 990_hd.h 990_tap.c 990_tap.h 99_usbsm.h a7800.c amigafdc.c cbm.c cbmserb.c d88.c gamecom.c gb.c intv.c nc.c nes.c oric.c pdp1.c pokemini.c serial.c smartmed.c smartmed.h sms.c svi318.c thomson.c ti85.c ti99_4x.c ti99_4x.h tx0.c vc20.c wswan.c

src/mess/devices/harddriv.c
r2172r2173
9494 *
9595 *************************************/
9696
97DEVICE_INIT( mess_hd )
97DEVICE_START( mess_hd )
9898{
9999   struct mess_hd *hd;
100
101   hd = image_alloctag(image, MESSHDTAG, sizeof(struct mess_hd));
102   if (!hd)
103      return INIT_FAIL;
104
100   hd = image_alloctag(device, MESSHDTAG, sizeof(struct mess_hd));
105101   hd->hard_disk_handle = NULL;
106
107   return INIT_PASS;
108102}
109103
110104
r2172r2173
283277      case MESS_DEVINFO_INT_CREATE_OPTCOUNT:         info->i = 1; break;
284278
285279      /* --- the following bits of info are returned as pointers to data or functions --- */
286      case MESS_DEVINFO_PTR_INIT:                  info->init = device_init_mess_hd; break;
280      case MESS_DEVINFO_PTR_INIT:                  info->init = DEVICE_START_NAME(mess_hd); break;
287281      case MESS_DEVINFO_PTR_LOAD:                  info->load = device_load_mess_hd; break;
288282      case MESS_DEVINFO_PTR_UNLOAD:               info->unload = device_unload_mess_hd; break;
289283      case MESS_DEVINFO_PTR_CREATE_OPTGUIDE:         info->p = (void *) mess_hd_option_guide; break;
src/mess/devices/harddriv.h
r2172r2173
1414#include "harddisk.h"
1515
1616
17DEVICE_INIT( mess_hd );
17DEVICE_START( mess_hd );
1818DEVICE_LOAD( mess_hd );
1919DEVICE_UNLOAD( mess_hd );
2020
src/mess/devices/cassette.c
r2172r2173
229229   cassette device init/load/unload/specify
230230*********************************************************************/
231231
232static DEVICE_INIT( cassette )
232static DEVICE_START( cassette )
233233{
234234   const struct IODevice *dev;
235235
236   if (!image_alloctag(image, CASSETTE_TAG, sizeof(struct mess_cassetteimg)))
237      return INIT_FAIL;
236   image_alloctag(device, CASSETTE_TAG, sizeof(struct mess_cassetteimg));
238237
239238   /* set to default state */
240   dev = device_find_from_machine(image->machine, IO_CASSETTE);
241   get_cassimg(image)->state = get_default_state(dev);
242
243   return INIT_PASS;
239   dev = mess_device_from_core_device(device);
240   get_cassimg(device)->state = get_default_state(dev);
244241}
245242
246243
r2172r2173
388385      case MESS_DEVINFO_INT_CASSETTE_DEFAULT_STATE:   info->i = CASSETTE_PLAY; break;
389386
390387      /* --- the following bits of info are returned as pointers to data or functions --- */
391      case MESS_DEVINFO_PTR_INIT:                  info->init = device_init_cassette; break;
388      case MESS_DEVINFO_PTR_INIT:                  info->init = DEVICE_START_NAME(cassette); break;
392389      case MESS_DEVINFO_PTR_LOAD:                  info->load = device_load_cassette; break;
393390      case MESS_DEVINFO_PTR_UNLOAD:               info->unload = device_unload_cassette; break;
394391      case MESS_DEVINFO_PTR_DISPLAY:               info->display = device_display_cassette; break;
src/mess/devices/flopdrv.c
r2172r2173
3131static TIMER_CALLBACK(floppy_drive_index_callback);
3232
3333/* this is called on device init */
34int floppy_drive_init(const device_config *img, const floppy_interface *iface)
34void floppy_drive_init(const device_config *img, const floppy_interface *iface)
3535{
3636   struct floppy_drive *pDrive;
3737
3838   assert(image_slotexists(img));
3939
4040   pDrive = image_alloctag(img, FLOPDRVTAG, sizeof(struct floppy_drive));
41   if (!pDrive)
42      return INIT_FAIL;
4341
4442   /* initialise flags */
4543   pDrive->flags = 0;
r2172r2173
6058   pDrive->rpm = 300;
6159
6260   floppy_drive_set_disk_image_interface(img, iface);
63   return INIT_PASS;
6461}
6562
6663
src/mess/devices/flopdrv.h
r2172r2173
134134void floppy_drive_set_geometry_absolute(const device_config *img, int tracks, int sides);
135135
136136/* called in device init/exit functions */
137int floppy_drive_init(const device_config *img, const floppy_interface *iface);
137void floppy_drive_init(const device_config *img, const floppy_interface *iface);
138138
139139/* get next id from track, 1 if got a id, 0 if no id was got */
140140int floppy_drive_get_next_id(const device_config *img, int side, chrn_id *);
src/mess/devices/idedrive.c
r2172r2173
1616
1717static void ide_get_params(const device_config *image, int *which_bus, int *which_address,
1818   struct ide_interface **intf,
19   device_init_handler *parent_init,
19   device_start_func *parent_init,
2020   device_load_handler *parent_load,
2121   device_unload_handler *parent_unload)
2222{
r2172r2173
3131   parent_devclass.get_info = harddisk_device_getinfo;
3232
3333   if (parent_init)
34      *parent_init = (device_init_handler) mess_device_get_info_fct(&parent_devclass, MESS_DEVINFO_PTR_INIT);
34      *parent_init = (device_start_func) mess_device_get_info_fct(&parent_devclass, MESS_DEVINFO_PTR_INIT);
3535   if (parent_load)
3636      *parent_load = (device_load_handler) mess_device_get_info_fct(&parent_devclass, MESS_DEVINFO_PTR_LOAD);
3737   if (parent_unload)
r2172r2173
4444
4545
4646/*-------------------------------------------------
47   ide_hd_init - Init an IDE hard disk device
47   DEVICE_START(ide_hd) - Init an IDE hard disk device
4848-------------------------------------------------*/
4949
50static int ide_hd_init(const device_config *image)
50static DEVICE_START(ide_hd)
5151{
52   int result, which_bus, which_address;
52   int which_bus, which_address;
5353   struct ide_interface *intf;
54   device_init_handler parent_init;
54   device_start_func parent_init;
5555
5656   /* get the basics */
57   ide_get_params(image, &which_bus, &which_address, &intf, &parent_init, NULL, NULL);
57   ide_get_params(device, &which_bus, &which_address, &intf, &parent_init, NULL, NULL);
5858
5959   /* call the parent init function */
60   result = parent_init(image);
61   if (result != INIT_PASS)
62      return result;
60   parent_init(device);
6361
6462   /* configure IDE */
6563   ide_controller_init_custom(which_bus, intf, NULL);
66   return INIT_PASS;
6764}
6865
6966
r2172r2173
164161   switch(state)
165162   {
166163      /* --- the following bits of info are returned as pointers to data or functions --- */
167      case MESS_DEVINFO_PTR_INIT:               info->init = ide_hd_init; break;
164      case MESS_DEVINFO_PTR_INIT:               info->init = DEVICE_START_NAME(ide_hd); break;
168165      case MESS_DEVINFO_PTR_LOAD:               info->load = ide_hd_load; break;
169166      case MESS_DEVINFO_PTR_UNLOAD:            info->unload = ide_hd_unload; break;
170167      case MESS_DEVINFO_PTR_VALIDITY_CHECK:      info->validity_check = ide_hd_validity_check; break;
src/mess/devices/cartslot.c
r2172r2173
141141
142142
143143
144static DEVICE_INIT( cartslot_specified )
144static DEVICE_START( cartslot_specified )
145145{
146   process_cartridge(image, NULL);
147   return 0;
146   process_cartridge(device, NULL);
148147}
149148
150149static DEVICE_LOAD( cartslot_specified )
r2172r2173
206205      case MESS_DEVINFO_INT_MUST_BE_LOADED:         info->i = must_be_loaded; break;
207206
208207      /* --- the following bits of info are returned as pointers to data or functions --- */
209      case MESS_DEVINFO_PTR_INIT:                  info->init = (count > 0) ? device_init_cartslot_specified : NULL; break;
208      case MESS_DEVINFO_PTR_INIT:                  info->init = (count > 0) ? DEVICE_START_NAME(cartslot_specified) : NULL; break;
210209      case MESS_DEVINFO_PTR_LOAD:                  info->load = (count > 0) ? device_load_cartslot_specified : NULL; break;
211210      case MESS_DEVINFO_PTR_UNLOAD:               info->unload = (count > 0) ? device_unload_cartslot_specified : NULL; break;
212211
src/mess/devices/chd_cd.c
r2172r2173
9696 *
9797 *************************************/
9898
99static DEVICE_INIT( mess_cd )
99static DEVICE_START( mess_cd )
100100{
101101   struct mess_cd *cd;
102
103   cd = image_alloctag(image, MESSCDTAG, sizeof(struct mess_cd));
104   if (!cd)
105      return INIT_FAIL;
106
107        cd->cdrom_handle = NULL;
108
109   return INIT_PASS;
102   cd = image_alloctag(device, MESSCDTAG, sizeof(struct mess_cd));
103   cd->cdrom_handle = NULL;
110104}
111105
112106
r2172r2173
223217      case MESS_DEVINFO_INT_CREATE_OPTCOUNT:         info->i = 1; break;
224218
225219      /* --- the following bits of info are returned as pointers to data or functions --- */
226      case MESS_DEVINFO_PTR_INIT:                  info->init = device_init_mess_cd; break;
220      case MESS_DEVINFO_PTR_INIT:                  info->init = DEVICE_START_NAME(mess_cd); break;
227221      case MESS_DEVINFO_PTR_LOAD:                  info->load = device_load_mess_cd; break;
228222      case MESS_DEVINFO_PTR_UNLOAD:               info->unload = device_unload_mess_cd; break;
229223      case MESS_DEVINFO_PTR_CREATE_OPTGUIDE:         info->p = (void *) mess_cd_option_guide; break;
src/mess/devices/mflopimg.c
r2172r2173
257257/* ----------------------------------------------------------------------- */
258258
259259
260static DEVICE_INIT( floppy )
260static DEVICE_START( floppy )
261261{
262    if (!image_alloctag(image, FLOPPY_TAG, sizeof(mess_flopimg)))
263      return INIT_FAIL;
264   return floppy_drive_init(image, &mess_floppy_interface);
262    image_alloctag(device, FLOPPY_TAG, sizeof(mess_flopimg));
263   floppy_drive_init(device, &mess_floppy_interface);
265264}
266265
267266
r2172r2173
434433         break;
435434
436435      /* --- the following bits of info are returned as pointers to data or functions --- */
437      case MESS_DEVINFO_PTR_INIT:            info->init = device_init_floppy; break;
436      case MESS_DEVINFO_PTR_INIT:            info->init = DEVICE_START_NAME(floppy); break;
438437      case MESS_DEVINFO_PTR_LOAD:            info->load = device_load_floppy; break;
439438      case MESS_DEVINFO_PTR_CREATE:         info->create = device_create_floppy; break;
440439      case MESS_DEVINFO_PTR_UNLOAD:         info->unload = device_unload_floppy; break;
src/mess/devices/dsk.c
r2172r2173
7171
7272
7373
74static DEVICE_INIT( dsk_floppy )
74static DEVICE_START( dsk_floppy )
7575{
76   return floppy_drive_init(image, NULL);
76   floppy_drive_init(device, NULL);
7777}
7878
7979
r2172r2173
544544      case MESS_DEVINFO_INT_CREATABLE:                  info->i = 0; break;
545545
546546      /* --- the following bits of info are returned as pointers to data or functions --- */
547      case MESS_DEVINFO_PTR_INIT:                     info->init = device_init_dsk_floppy; break;
547      case MESS_DEVINFO_PTR_INIT:                     info->init = DEVICE_START_NAME(dsk_floppy); break;
548548      case MESS_DEVINFO_PTR_LOAD:                     info->load = device_load_dsk_floppy; break;
549549      case MESS_DEVINFO_PTR_UNLOAD:                  info->unload = device_unload_dsk_floppy; break;
550550
src/mess/devices/appldriv.c
r2172r2173
276276
277277/* ----------------------------------------------------------------------- */
278278
279static DEVICE_INIT( apple525_floppy )
279static DEVICE_START( apple525_floppy )
280280{
281   device_init_handler parent_init;
281   device_start_func parent_init;
282282
283   if (!image_alloctag(image, APPLE525TAG, sizeof(struct apple525_disk)))
284      return INIT_FAIL;
283   image_alloctag(device, APPLE525TAG, sizeof(struct apple525_disk));
285284
286   parent_init = (device_init_handler) mess_device_get_info_fct(&parent_devclass, MESS_DEVINFO_PTR_INIT);
287   return parent_init(image);
285   parent_init = (device_start_func) mess_device_get_info_fct(&parent_devclass, MESS_DEVINFO_PTR_INIT);
286   parent_init(device);
288287}
289288
290289
r2172r2173
327326      case MESS_DEVINFO_STR_DEV_TAG:         strcpy(info->s = device_temp_str(), APPLE525TAG); break;
328327
329328      /* --- the following bits of info are returned as pointers to data or functions --- */
330      case MESS_DEVINFO_PTR_INIT:            info->init = device_init_apple525_floppy; break;
329      case MESS_DEVINFO_PTR_INIT:            info->init = DEVICE_START_NAME(apple525_floppy); break;
331330      case MESS_DEVINFO_PTR_LOAD:            info->load = device_load_apple525_floppy; break;
332331      case MESS_DEVINFO_PTR_UNLOAD:         info->unload = device_unload_apple525_floppy; break;
333332      case MESS_DEVINFO_PTR_FLOPPY_OPTIONS:   info->p = (void *) floppyoptions_apple2; break;
src/mess/devices/basicdsk.c
r2172r2173
8484   return &basicdsk_drives[drive];
8585}
8686
87DEVICE_INIT( basicdsk_floppy )
87DEVICE_START( basicdsk_floppy )
8888{
89   return floppy_drive_init(image, &basicdsk_floppy_interface);
89   floppy_drive_init(device, &basicdsk_floppy_interface);
9090}
9191
9292/* attempt to insert a disk into the drive specified with id */
r2172r2173
586586      case MESS_DEVINFO_INT_CREATABLE:               info->i = 1; break;
587587
588588      /* --- the following bits of info are returned as pointers to data or functions --- */
589      case MESS_DEVINFO_PTR_INIT:                  info->init = device_init_basicdsk_floppy; break;
589      case MESS_DEVINFO_PTR_INIT:                  info->init = DEVICE_START_NAME(basicdsk_floppy); break;
590590      case MESS_DEVINFO_PTR_UNLOAD:               info->unload = device_unload_basicdsk_floppy; break;
591591
592592      /* --- the following bits of info are returned as NULL-terminated strings --- */
src/mess/devices/coco_vhd.c
r2172r2173
6767
6868
6969
70static DEVICE_INIT( coco_vhd )
70static DEVICE_START( coco_vhd )
7171{
7272   vhd_status = VHDSTATUS_NO_VHD_ATTACHED;
73   return INIT_PASS;
7473}
7574
7675
r2172r2173
247246      case MESS_DEVINFO_INT_COUNT:                     info->i = 1; break;
248247
249248      /* --- the following bits of info are returned as pointers to data or functions --- */
250      case MESS_DEVINFO_PTR_INIT:                     info->init = device_init_coco_vhd; break;
249      case MESS_DEVINFO_PTR_INIT:                     info->init = DEVICE_START_NAME(coco_vhd); break;
251250      case MESS_DEVINFO_PTR_LOAD:                     info->load = device_load_coco_vhd; break;
252251
253252      /* --- the following bits of info are returned as NULL-terminated strings --- */
src/mess/devices/bitbngr.c
r2172r2173
2929
3030static struct bitbanger_info *bitbangers[MAX_PRINTER];
3131
32static int bitbanger_init(const device_config *img)
32static DEVICE_START(bitbanger)
3333{
34   int id = image_index_in_device(img);
34   int id = image_index_in_device(device);
3535   struct bitbanger_info *bi;
3636   const struct bitbanger_config *config;
3737   const struct IODevice *dev;
3838
39   dev = image_device(img);
39   dev = mess_device_from_core_device(device);
4040   config = (const struct bitbanger_config *) mess_device_get_info_ptr(&dev->devclass, MESS_DEVINFO_PTR_BITBANGER_CONFIG);
4141
4242   bi = (struct bitbanger_info *) auto_malloc(sizeof(struct bitbanger_info));
r2172r2173
5050   bi->over_threshhold = 1;
5151
5252   bitbangers[id] = bi;
53   return INIT_PASS;
5453}
5554
5655
r2172r2173
168167      case MESS_DEVINFO_INT_CREATABLE:               info->i = 1; break;
169168
170169      /* --- the following bits of info are returned as pointers to data or functions --- */
171      case MESS_DEVINFO_PTR_INIT:                  info->init = bitbanger_init; break;
170      case MESS_DEVINFO_PTR_INIT:                  info->init = DEVICE_START_NAME(bitbanger); break;
172171
173172      /* --- the following bits of info are returned as NULL-terminated strings --- */
174173      case MESS_DEVINFO_STR_DEV_FILE:               strcpy(info->s = device_temp_str(), __FILE__); break;
src/mess/devices/basicdsk.h
r2172r2173
1515extern const floppy_interface basicdsk_floppy_interface;
1616
1717/* init */
18DEVICE_INIT(basicdsk_floppy);
18DEVICE_START(basicdsk_floppy);
1919DEVICE_LOAD(basicdsk_floppy);
2020DEVICE_UNLOAD(basicdsk_floppy);
2121
r2172r2173
5555
5656void legacybasicdsk_device_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info);
5757
58#define CONFIG_DEVICE_FLOPPY_BASICDSK(count, file_extensions, load)      \
59   CONFIG_DEVICE_BASE(IO_FLOPPY, (count), (file_extensions), DEVICE_LOAD_RESETS_NONE,   \
60      OSD_FOPEN_RW_CREATE_OR_READ, device_init_basicdsk_floppy, NULL, (load), device_unload_basicdsk_floppy, NULL, NULL,\
61      NULL, NULL, floppy_status, NULL, NULL, NULL, NULL, NULL, NULL)   \
6258
63#define CONFIG_DEVICE_FLOPPY_BASICDSK_RO(count, file_extensions, load)      \
64   CONFIG_DEVICE_BASE(IO_FLOPPY, (count), (file_extensions), DEVICE_LOAD_RESETS_NONE,   \
65      OSD_FOPEN_READ, device_init_basicdsk_floppy, NULL, (load), device_unload_basicdsk_floppy, NULL, NULL,\
66      NULL, NULL, floppy_status, NULL, NULL, NULL, NULL, NULL, NULL)   \
67
68
6959#ifdef __cplusplus
7060}
7161#endif
src/mess/image.c
r2172r2173
110110
111111int image_init(running_machine *machine)
112112{
113   int err;
114113   int count, indx;
115114   UINT32 mask, dev_mask = 0, multiple_dev_mask = 0;
116115   const struct IODevice *dev;
r2172r2173
161160
162161      if (dev->init != NULL)
163162      {
164         err = dev->init(machine->images_data->slots[indx].dev);
165         if (err != INIT_PASS)
166            return err;
163         dev->init(machine->images_data->slots[indx].dev);
167164      }
168165      indx++;
169166   }
r2172r2173
899896void *image_alloctag(const device_config *image, const char *tag, size_t size)
900897{
901898   image_slot_data *slot = find_image_slot(image);
902   return tagpool_alloc(&slot->tagpool, tag, size);
899   void *ptr = tagpool_alloc(&slot->tagpool, tag, size);
900   if (ptr == NULL)
901   {
902      memory_error("Out of memory");
903   }
904   return ptr;
903905}
904906
905907
src/mess/includes/wswan.h
r2172r2173
9696extern WRITE8_HANDLER( wswan_port_w );
9797extern READ8_HANDLER( wswan_sram_r );
9898extern WRITE8_HANDLER( wswan_sram_w );
99extern DEVICE_INIT(wswan_cart);
99extern DEVICE_START(wswan_cart);
100100extern DEVICE_LOAD(wswan_cart);
101101extern INTERRUPT_GEN(wswan_scanline_interrupt);
102102
src/mess/includes/pdp1.h
r2172r2173
130130READ18_HANDLER ( pdp1_read_mem );
131131WRITE18_HANDLER ( pdp1_write_mem );
132132
133DEVICE_INIT( pdp1_tape );
133DEVICE_START( pdp1_tape );
134134DEVICE_LOAD( pdp1_tape );
135135DEVICE_UNLOAD( pdp1_tape );
136136
src/mess/includes/nc.h
r2172r2173
4141
4242/*----------- defined in machine/nc.c -----------*/
4343
44DEVICE_INIT( nc_pcmcia_card );
44DEVICE_START( nc_pcmcia_card );
4545DEVICE_LOAD( nc_pcmcia_card );
4646DEVICE_UNLOAD( nc_pcmcia_card );
4747
src/mess/includes/d88.h
r2172r2173
4747
4848/*----------- defined in machine/d88.c -----------*/
4949
50DEVICE_INIT(d88image_floppy);
50DEVICE_START(d88image_floppy);
5151DEVICE_LOAD(d88image_floppy);
5252
5353
src/mess/includes/pokemini.h
r2172r2173
1616extern READ8_HANDLER( pokemini_hwreg_r );
1717extern INTERRUPT_GEN( pokemini_int );
1818
19DEVICE_INIT( pokemini_cart );
19DEVICE_START( pokemini_cart );
2020DEVICE_LOAD( pokemini_cart );
2121
2222
src/mess/includes/nes.h
r2172r2173
8585/* protos */
8686
8787DEVICE_LOAD(nes_cart);
88DEVICE_INIT(nes_disk);
88DEVICE_START(nes_disk);
8989DEVICE_LOAD(nes_disk);
9090DEVICE_UNLOAD(nes_disk);
9191
src/mess/includes/gb.h
r2172r2173
5151WRITE8_HANDLER( gb_io2_w );
5252READ8_HANDLER( gb_ie_r );
5353WRITE8_HANDLER( gb_ie_w );
54DEVICE_INIT(gb_cart);
54DEVICE_START(gb_cart);
5555DEVICE_LOAD(gb_cart);
5656INTERRUPT_GEN( gb_scanline_interrupt );
5757void gb_timer_callback(int cycles);
src/mess/includes/gamecom.h
r2172r2173
149149/*----------- defined in machine/gamecom.c -----------*/
150150
151151extern MACHINE_RESET( gamecom );
152extern DEVICE_INIT( gamecom_cart );
152extern DEVICE_START( gamecom_cart );
153153extern DEVICE_LOAD( gamecom_cart );
154154
155155extern WRITE8_HANDLER( gamecom_internal_w );
src/mess/includes/serial.h
r2172r2173
299299void serial_device_connect(const device_config *image, struct serial_connection *connection);
300300
301301/* init this device */
302int serial_device_init(const device_config *image);
302DEVICE_START(serial_device);
303303int serial_device_load(const device_config *image);
304304void serial_device_unload(const device_config *image);
305305
src/mess/includes/thomson.h
r2172r2173
4646
4747
4848/* serial */
49extern int thom_serial_init   ( const device_config* image );
49extern DEVICE_START( thom_serial );
5050extern int  thom_serial_load   ( const device_config* image );
5151extern void thom_serial_unload ( const device_config* image );
5252
src/mess/includes/tx0.h
r2172r2173
1919
2020void tx0_tape_get_open_mode(const struct IODevice *dev, int id,
2121   unsigned int *readable, unsigned int *writeable, unsigned int *creatable);
22DEVICE_INIT( tx0_tape );
22DEVICE_START( tx0_tape );
2323DEVICE_LOAD( tx0_tape );
2424DEVICE_UNLOAD( tx0_tape );
2525void tx0_io_r1l(void);
r2172r2173
3030DEVICE_UNLOAD(tx0_typewriter);
3131void tx0_io_prt(void);
3232void tx0_io_dis(void);
33DEVICE_INIT( tx0_magtape );
33DEVICE_START( tx0_magtape );
3434DEVICE_LOAD( tx0_magtape );
3535DEVICE_UNLOAD( tx0_magtape );
3636void tx0_sel(void);
src/mess/includes/oric.h
r2172r2173
2020
2121WRITE8_HANDLER(oric_psg_porta_write);
2222
23DEVICE_INIT( oric_floppy );
23DEVICE_START( oric_floppy );
2424DEVICE_LOAD( oric_floppy );
2525
2626/* Telestrat specific */
src/mess/includes/vc20.h
r2172r2173
8787/* VIC reads bits 0 till 7 */
8888int vic6560_dma_read (int offset);
8989
90DEVICE_INIT(vc20_rom);
90DEVICE_START(vc20_rom);
9191DEVICE_LOAD(vc20_rom);
9292
9393DRIVER_INIT( vc20 );
src/mess/includes/a7800.h
r2172r2173
2727void a7800_partialhash(char *dest, const unsigned char *data,
2828   unsigned long length, unsigned int functions);
2929
30DEVICE_INIT( a7800_cart );
30DEVICE_START( a7800_cart );
3131DEVICE_LOAD( a7800_cart );
3232
3333 READ8_HANDLER  ( a7800_TIA_r );
src/mess/includes/intv.h
r2172r2173
2828extern UINT8 intv_gramdirtybytes[];
2929extern UINT16 intv_ram16[];
3030
31DEVICE_INIT( intv_cart );
31DEVICE_START( intv_cart );
3232DEVICE_LOAD( intv_cart );
3333
3434extern MACHINE_RESET( intv );
src/mess/includes/sms.h
r2172r2173
5858
5959void sms_check_pause_button( running_machine *machine );
6060
61DEVICE_INIT( sms_cart );
61DEVICE_START( sms_cart );
6262DEVICE_LOAD( sms_cart );
6363
6464MACHINE_START(sms);
src/mess/includes/ti85.h
r2172r2173
2727
2828SNAPSHOT_LOAD( ti8x );
2929
30DEVICE_INIT( ti85_serial );
30DEVICE_START( ti85_serial );
3131DEVICE_LOAD( ti85_serial );
3232DEVICE_UNLOAD( ti85_serial );
3333
src/mess/includes/svi318.h
r2172r2173
1616MACHINE_START( svi318_ntsc );
1717MACHINE_RESET( svi318 );
1818
19DEVICE_INIT( svi318_cart );
19DEVICE_START( svi318_cart );
2020DEVICE_LOAD( svi318_cart );
2121DEVICE_UNLOAD( svi318_cart );
2222
src/mess/image.h
r2172r2173
213213  Macros for declaring device callbacks
214214****************************************************************************/
215215
216#define   DEVICE_INIT(name)   int device_init_##name(const device_config *image)
217#define DEVICE_EXIT(name)   void device_exit_##name(const device_config *image)
218216#define DEVICE_LOAD(name)   int device_load_##name(const device_config *image)
219217#define DEVICE_CREATE(name)   int device_create_##name(const device_config *image, int create_format, option_resolution *create_args)
220218#define DEVICE_UNLOAD(name)   void device_unload_##name(const device_config *image)
src/mess/device.c
r2172r2173
361361      mess_device->io_device.must_be_loaded      = mess_device_get_info_int(&mess_device->io_device.devclass, MESS_DEVINFO_INT_MUST_BE_LOADED) ? 1 : 0;
362362      mess_device->io_device.load_at_init         = mess_device_get_info_int(&mess_device->io_device.devclass, MESS_DEVINFO_INT_LOAD_AT_INIT) ? 1 : 0;
363363
364      mess_device->io_device.init               = (device_init_handler) mess_device_get_info_fct(&mess_device->io_device.devclass, MESS_DEVINFO_PTR_INIT);
365      mess_device->io_device.exit               = (device_exit_handler) mess_device_get_info_fct(&mess_device->io_device.devclass, MESS_DEVINFO_PTR_EXIT);
364      mess_device->io_device.init               = (device_start_func) mess_device_get_info_fct(&mess_device->io_device.devclass, MESS_DEVINFO_PTR_INIT);
365      mess_device->io_device.exit               = (device_stop_func) mess_device_get_info_fct(&mess_device->io_device.devclass, MESS_DEVINFO_PTR_EXIT);
366366      mess_device->io_device.load               = (device_load_handler) mess_device_get_info_fct(&mess_device->io_device.devclass, MESS_DEVINFO_PTR_LOAD);
367367      mess_device->io_device.create            = (device_create_handler) mess_device_get_info_fct(&mess_device->io_device.devclass, MESS_DEVINFO_PTR_CREATE);
368368      mess_device->io_device.unload            = (device_unload_handler) mess_device_get_info_fct(&mess_device->io_device.devclass, MESS_DEVINFO_PTR_UNLOAD);
src/mess/device.h
r2172r2173
9191
9292struct IODevice;
9393
94typedef int (*device_init_handler)(const device_config *image);
95typedef void (*device_exit_handler)(const device_config *image);
9694typedef int (*device_load_handler)(const device_config *image);
9795typedef int (*device_create_handler)(const device_config *image, int format_type, option_resolution *format_options);
9896typedef void (*device_unload_handler)(const device_config *image);
r2172r2173
114112   char *s;                                 /* generic strings */
115113   double   d;                                 /* generic floating points */
116114
117   device_init_handler init;
118   device_exit_handler exit;
115   device_start_func init;
116   device_stop_func exit;
119117   device_load_handler load;
120118   device_create_handler create;
121119   device_unload_handler unload;
r2172r2173
259257   unsigned int multiple : 1;
260258
261259   /* image handling callbacks */
262   device_init_handler init;
263   device_exit_handler exit;
260   device_start_func init;
261   device_stop_func exit;
264262   device_load_handler load;
265263   device_create_handler create;
266264   device_unload_handler unload;
src/mess/machine/wswan.c
r2172r2173
12621262}
12631263#endif
12641264
1265DEVICE_INIT(wswan_cart)
1265DEVICE_START(wswan_cart)
12661266{
12671267   /* Initialize EEPROM structure */
12681268   memset( &eeprom, 0, sizeof( eeprom ) );
r2172r2173
12801280   rtc.minute = 0;
12811281   rtc.second = 0;
12821282   rtc.setting = 0xFF;
1283
1284   return INIT_PASS;
12851283}
12861284
12871285DEVICE_LOAD(wswan_cart)
src/mess/machine/cbm.c
r2172r2173
174174   return device_find_from_machine(machine, IO_CARTSLOT);
175175}
176176
177static DEVICE_INIT(cbm_rom)
177static DEVICE_START(cbm_rom)
178178{
179   int id = image_index_in_device(image);
179   int id = image_index_in_device(device);
180180   if (id == 0)
181181   {
182182      cbm_c64_game = -1;
183183      cbm_c64_exrom = -1;
184184   }
185   return INIT_PASS;
186185}
187186
188187static DEVICE_LOAD(cbm_rom)
r2172r2173
334333      case MESS_DEVINFO_STR_FILE_EXTENSIONS:      strcpy(info->s = device_temp_str(), "crt"); break;
335334
336335      /* --- the following bits of info are returned as pointers to data or functions --- */
337      case MESS_DEVINFO_PTR_INIT:               info->init = device_init_cbm_rom; break;
336      case MESS_DEVINFO_PTR_INIT:               info->init = DEVICE_START_NAME(cbm_rom); break;
338337      case MESS_DEVINFO_PTR_LOAD:               info->load = device_load_cbm_rom; break;
339338      case MESS_DEVINFO_PTR_UNLOAD:            info->unload = device_unload_cbm_rom; break;
340339
src/mess/machine/pdp1.c
r2172r2173
372372
373373
374374
375DEVICE_INIT( pdp1_tape )
375DEVICE_START( pdp1_tape )
376376{
377   return INIT_PASS;
378377}
379378
380379
src/mess/machine/nc.c
r2172r2173
9494   return 0;
9595}
9696
97DEVICE_INIT( nc_pcmcia_card )
97DEVICE_START( nc_pcmcia_card )
9898{
9999   /* card not present */
100100   nc_set_card_present_state(0);
101101   /* card ram NULL */
102102   nc_card_ram = NULL;
103103   nc_card_size = 0;
104   return INIT_PASS;
105104}
106105
107106/* load pcmcia card */
src/mess/machine/d88.c
r2172r2173
3232   return &d88image_drives[image_index_in_device(img)];
3333}
3434
35DEVICE_INIT(d88image_floppy)
35DEVICE_START(d88image_floppy)
3636{
37   return floppy_drive_init(image, &d88image_floppy_interface);
37   floppy_drive_init(device, &d88image_floppy_interface);
3838}
3939
4040/* attempt to insert a disk into the drive specified with id */
src/mess/machine/pokemini.c
r2172r2173
649649   return pokemini_hwreg[offset];
650650}
651651
652DEVICE_INIT( pokemini_cart ) {
653   return INIT_PASS;
652DEVICE_START( pokemini_cart ) {
654653}
655654
656655DEVICE_LOAD( pokemini_cart ) {
src/mess/machine/990_tap.c
r2172r2173
106106static tpc_t tpc;
107107
108108
109DEVICE_INIT( ti990_tape )
109DEVICE_START( ti990_tape )
110110{
111111   tape_unit_t *t;
112   int id = image_index_in_device(image);
112   int id = image_index_in_device(device);
113113
114   assert ((id >= 0) && (id < MAX_TAPE_UNIT));
114115
115   if ((id < 0) || (id >= MAX_TAPE_UNIT))
116      return INIT_FAIL;
117
118116   t = &tpc.t[id];
119117   memset(t, 0, sizeof(*t));
120118
121   t->img = image;
119   t->img = device;
122120   t->wp = 1;
123121   t->bot = 0;
124122   t->eot = 0;
125
126   return INIT_PASS;
127123}
128124
129/*DEVICE_EXIT( ti990_tape )
125/*DEVICE_STOP( ti990_tape )
130126{
131127   d->img = NULL;
132128}*/
src/mess/machine/nes.c
r2172r2173
551551}
552552
553553
554DEVICE_INIT(nes_disk)
554DEVICE_START(nes_disk)
555555{
556556   /* clear some of the cart variables we don't use */
557557   nes.trainer = 0;
r2172r2173
564564
565565   nes_fds.sides = 0;
566566   nes_fds.data = NULL;
567
568   return INIT_PASS;
569567}
570568
571569
src/mess/machine/gb.c
r2172r2173
13821382   }
13831383}
13841384
1385DEVICE_INIT(gb_cart)
1385DEVICE_START(gb_cart)
13861386{
13871387   int I;
13881388
r2172r2173
14051405   CartType = 0;
14061406   ROMMask = 0;
14071407   RAMMask = 0;
1408   return INIT_PASS;
14091408}
14101409
14111410DEVICE_LOAD(gb_cart)
src/mess/machine/990_tap.h
r2172r2173
22   990_tap.h: include file for 990_tap.c
33*/
44
5DEVICE_INIT( ti990_tape );
5DEVICE_START( ti990_tape );
66DEVICE_LOAD( ti990_tape );
77DEVICE_UNLOAD( ti990_tape );
88
src/mess/machine/990_hd.c
r2172r2173
162162/*
163163   Initialize hard disk unit
164164*/
165DEVICE_INIT( ti990_hd )
165DEVICE_START( ti990_hd )
166166{
167167   hd_unit_t *d;
168   int id = image_index_in_device(image);
168   int id = image_index_in_device(device);
169169
170   assert ((id >= 0) && (id < MAX_DISK_UNIT));
170171
171   if ((id < 0) || (id >= MAX_DISK_UNIT))
172      return INIT_FAIL;
173
174172   d = &hdc.d[id];
175173   memset(d, 0, sizeof(*d));
176174
177   d->img = image;
175   d->img = device;
178176   d->format = format_mame;   /* don't care */
179177   d->hd_handle = NULL;
180178   d->wp = 1;
r2172r2173
183181   /* clear attention line */
184182   /*hdc.w[0] &= ~ (0x80 >> id);*/
185183
186   return device_init_mess_hd(image);
184   DEVICE_START_CALL(mess_hd);
187185}
188186
189/*DEVICE_EXIT( ti990_hd )
187/*DEVICE_STOP( ti990_hd )
190188{
191189   d->img = NULL;
192190}*/
src/mess/machine/990_hd.h
r2172r2173
22   990_hd.h: include file for 990_hd.c
33*/
44
5DEVICE_INIT( ti990_hd );
5DEVICE_START( ti990_hd );
66DEVICE_LOAD( ti990_hd );
77DEVICE_UNLOAD( ti990_hd );
88
src/mess/machine/gamecom.c
r2172r2173
589589   return gamecom_vram[offset];
590590}
591591
592DEVICE_INIT( gamecom_cart )
592DEVICE_START( gamecom_cart )
593593{
594594   internal_ram = sm8500_internal_ram();
595   return INIT_PASS;
596595}
597596
598597DEVICE_LOAD( gamecom_cart )
src/mess/machine/smartmed.c
r2172r2173
101101/*
102102   Init a SmartMedia image
103103*/
104DEVICE_INIT( smartmedia )
104DEVICE_START( smartmedia )
105105{
106   int id = image_index_in_device(image);
106   int id = image_index_in_device(device);
107   assert((id >= 0) && (id < MAX_SMARTMEDIA));
107108
108   if (id >= MAX_SMARTMEDIA)
109   {
110      logerror("smartmedia: invalid chip %d\n", id);
111      return INIT_FAIL;
112   }
113
114109   smartmedia[id].page_data_size = 0;
115110   smartmedia[id].page_total_size = 0;
116111   smartmedia[id].num_pages = 0;
r2172r2173
125120   smartmedia[id].pagereg = NULL;
126121   smartmedia[id].id[0] = smartmedia[id].id[1] = 0;
127122   smartmedia[id].mp_opcode = 0;
128
129   return INIT_PASS;
130123}
131124
132125/*
src/mess/machine/cbmserb.c
r2172r2173
103103
104104
105105
106static DEVICE_INIT( cbm_drive )
106static DEVICE_START( cbm_drive )
107107{
108   int id = image_index_in_device(image);
108   int id = image_index_in_device(device);
109109   if (id == 0)
110110      cbm_drive_open();   /* boy these C64 drivers are butt ugly */
111   return INIT_PASS;
112111}
113112
114static DEVICE_EXIT( cbm_drive )
113static DEVICE_STOP( cbm_drive )
115114{
116   int id = image_index_in_device(image);
115   int id = image_index_in_device(device);
117116   if (id == 0)
118117      cbm_drive_close();   /* boy these C64 drivers are butt ugly */
119118}
r2172r2173
414413      case MESS_DEVINFO_INT_COUNT:                     info->i = 2; break;
415414
416415      /* --- the following bits of info are returned as pointers to data or functions --- */
417      case MESS_DEVINFO_PTR_INIT:                     info->init = device_init_cbm_drive; break;
418      case MESS_DEVINFO_PTR_EXIT:                     info->exit = device_exit_cbm_drive; break;
416      case MESS_DEVINFO_PTR_INIT:                     info->init = DEVICE_START_NAME(cbm_drive); break;
417      case MESS_DEVINFO_PTR_EXIT:                     info->exit = DEVICE_STOP_NAME(cbm_drive); break;
419418      case MESS_DEVINFO_PTR_LOAD:                     info->load = device_load_cbm_drive; break;
420419
421420      /* --- the following bits of info are returned as NULL-terminated strings --- */
src/mess/machine/serial.c
r2172r2173
635635   data_stream_reset(stream);
636636}
637637
638int serial_device_init(const device_config *image)
638DEVICE_START(serial_device)
639639{
640   int id = image_index_in_device(image);
640   int id = image_index_in_device(device);
641641   memset(&serial_devices[id], 0, sizeof(serial_devices[id]));
642   return INIT_PASS;
643642}
644643
645644int serial_device_load(const device_config *image)
src/mess/machine/smartmed.h
r2172r2173
22   smartmed.h: header file for smartmed.c
33*/
44
5DEVICE_INIT( smartmedia );
5DEVICE_START( smartmedia );
66DEVICE_LOAD( smartmedia );
77DEVICE_UNLOAD( smartmedia );
88
src/mess/machine/thomson.c
r2172r2173
177177
178178
179179
180int thom_serial_init ( const device_config *image )
180DEVICE_START( thom_serial )
181181{
182   int idx = image_index_in_device(image);
182   int idx = image_index_in_device(device);
183183
184   if ( serial_device_init( image ) != INIT_PASS )
185      return INIT_FAIL;
184   DEVICE_START_CALL(serial_device);
186185
187186   switch ( idx ) {
188187
189188   case THOM_SERIAL_CC90323:
190189      LOG(( "thom_serial_init: init CD 90-320 RS232 device\n" ));
191      serial_device_connect( image , &to7_io_line );
190      serial_device_connect( device , &to7_io_line );
192191      break;
193192
194193   case THOM_SERIAL_RF57232:
195194      LOG(( "thom_serial_init: init RF 57-232 RS232 device\n" ));
196      acia_6551_connect_to_serial_device( image );
195      acia_6551_connect_to_serial_device( device );
197196      break;
198197
199198   case THOM_SERIAL_MODEM:
r2172r2173
201200      break;
202201
203202   default:
204      logerror( "thom_serial_init: unknown serial device index %i\n", idx );
205      return INIT_FAIL;
203      fatalerror( "thom_serial_init: unknown serial device index %i\n", idx );
204      break;
206205   }
207206
208   serial_device_setup( image, 2400, 7, 2, SERIAL_PARITY_NONE ); /* default */
209   serial_device_set_protocol( image, SERIAL_PROTOCOL_NONE );
210   serial_device_set_transmit_state( image, 1 );
211
212   return INIT_PASS;
207   serial_device_setup( device, 2400, 7, 2, SERIAL_PARITY_NONE ); /* default */
208   serial_device_set_protocol( device, SERIAL_PROTOCOL_NONE );
209   serial_device_set_transmit_state( device, 1 );
213210}
214211
215212
src/mess/machine/tx0.c
r2172r2173
199199}
200200
201201
202DEVICE_INIT( tx0_tape )
202DEVICE_START( tx0_tape )
203203{
204   return INIT_PASS;
205204}
206205
207206
r2172r2173
556555   timer_adjust_oneshot(magtape.timer, delay, 0);
557556}
558557
559DEVICE_INIT( tx0_magtape )
558DEVICE_START( tx0_magtape )
560559{
561   magtape.img = image;
562
563   return INIT_PASS;
560   magtape.img = device;
564561}
565562
566563/*
src/mess/machine/oric.c
r2172r2173
10751075   }
10761076}
10771077
1078DEVICE_INIT( oric_floppy )
1078DEVICE_START( oric_floppy )
10791079{
10801080   /* TODO - THIS DOES NOT MULTITASK BETWEEN ORIC BASICDSKs AND MFM DISKS */
1081   return floppy_drive_init(image, NULL);
1081   floppy_drive_init(device, NULL);
10821082}
10831083
10841084
src/mess/machine/vc20.c
r2172r2173
616616   return retval;
617617}
618618
619DEVICE_INIT(vc20_rom)
619DEVICE_START(vc20_rom)
620620{
621621   vc20_memory_init();
622622   vc20_rom_2000 = NULL;
623623   vc20_rom_4000 = NULL;
624624   vc20_rom_6000 = NULL;
625625   vc20_rom_a000 = NULL;
626   return INIT_PASS;
627626}
628627
629628DEVICE_LOAD(vc20_rom)
src/mess/machine/99_usbsm.h
r2172r2173
1/*DEVICE_INIT( ti99_sm );
1/*DEVICE_START( ti99_sm );
22DEVICE_LOAD( ti99_sm );
33DEVICE_UNLOAD( ti99_sm );*/
44
src/mess/machine/amigafdc.c
r2172r2173
6868static TIMER_CALLBACK(fdc_dma_proc);
6969static TIMER_CALLBACK(fdc_sync_proc);
7070
71static DEVICE_INIT(amiga_fdc)
71static DEVICE_START(amiga_fdc)
7272{
73   int id = image_index_in_device(image);
73   int id = image_index_in_device(device);
7474   fdc_status[id].motor_on = 0;
7575   fdc_status[id].side = 0;
7676   fdc_status[id].dir = 0;
r2172r2173
9696   fdc_side = 1;
9797   fdc_step = 1;
9898   fdc_rdy = 0;
99
100   return INIT_PASS;
10199}
102100
103101static void check_extended_image( int id )
r2172r2173
760758      case MESS_DEVINFO_INT_CREATABLE:            info->i = 0; break;
761759
762760      /* --- the following bits of info are returned as pointers to data or functions --- */
763      case MESS_DEVINFO_PTR_INIT:               info->init = device_init_amiga_fdc; break;
761      case MESS_DEVINFO_PTR_INIT:               info->init = DEVICE_START_NAME(amiga_fdc); break;
764762      case MESS_DEVINFO_PTR_LOAD:               info->load = device_load_amiga_fdc; break;
765763      case MESS_DEVINFO_PTR_UNLOAD:            info->unload = device_unload_amiga_fdc; break;
766764
src/mess/machine/a7800.c
r2172r2173
208208   return IMAGE_VERIFY_PASS;
209209}
210210
211DEVICE_INIT( a7800_cart )
211DEVICE_START( a7800_cart )
212212{
213213   UINT8   *memory;
214214
r2172r2173
218218
219219   /* Allocate memory for BIOS bank switching */
220220   a7800_bios_bkup = (UINT8*) auto_malloc(0x4000);
221   if (!a7800_bios_bkup)
222   {
223      logerror("Could not allocate ROM memory\n");
224      return INIT_FAIL;
225   }
226
227221   a7800_cart_bkup = (UINT8*) auto_malloc(0x4000);
228   if (!a7800_cart_bkup)
229   {
230      logerror("Could not allocate ROM memory\n");
231      return INIT_FAIL;
232   }
233222
234223   /* save the BIOS so we can switch it in and out */
235224   memcpy( a7800_bios_bkup, memory + 0xC000, 0x4000 );
r2172r2173
237226   /* defaults for PAL bios without cart */
238227   a7800_cart_type = 0;
239228   a7800_stick_type = 1;
240
241   return INIT_PASS;
242229}
243230
244231DEVICE_LOAD( a7800_cart )
src/mess/machine/intv.c
r2172r2173
375375   return INIT_PASS;
376376}
377377
378DEVICE_INIT( intv_cart )
378DEVICE_START( intv_cart )
379379{
380380   /* First, initialize these as empty so that the intellivision
381381    * will think that the playcable and keyboard are not attached */
r2172r2173
388388   /* assume keyboard is absent */
389389   memory[0x7000<<1] = 0xff;
390390   memory[(0x7000<<1)+1] = 0xff;
391   return INIT_PASS;
392391}
393392
394393DEVICE_LOAD( intv_cart )
src/mess/machine/sms.c
r2172r2173
736736   return 0;
737737}
738738
739DEVICE_INIT( sms_cart ) {
739DEVICE_START( sms_cart ) {
740740   running_machine *machine = Machine;
741741   int i;
742742
r2172r2173
760760
761761   /* Initially set the vdp to not use sms compatibility mode for GG */
762762   sms_set_ggsmsmode( 0 );
763
764   return INIT_PASS;
765763}
766764
767765DEVICE_LOAD( sms_cart )
src/mess/machine/ti85.c
r2172r2173
648648  TI calculators serial link transmission
649649***************************************************************************/
650650
651DEVICE_INIT( ti85_serial )
651DEVICE_START( ti85_serial )
652652{
653   ti85_free_serial_data_memory(image->machine);
653   ti85_free_serial_data_memory(device->machine);
654654   ti85_receive_serial (NULL,0);
655   return INIT_PASS;
656655}
657656
658657DEVICE_LOAD( ti85_serial )
src/mess/machine/svi318.c
r2172r2173
111111      return IMAGE_VERIFY_FAIL;
112112}
113113
114DEVICE_INIT( svi318_cart )
114DEVICE_START( svi318_cart )
115115{
116116   pcart = NULL;
117117   pcart_rom_size = 0;
118
119   return INIT_PASS;
120118}
121119
122120DEVICE_LOAD( svi318_cart )
src/mess/machine/ti99_4x.c
r2172r2173
466466   /*console_GROMs.data_ptr = memory_region(region_grom);*/
467467}
468468
469DEVICE_INIT( ti99_cart )
469DEVICE_START( ti99_cart )
470470{
471   int id = image_index_in_device(image);
471   int id = image_index_in_device(device);
472472   cartridge_pages[id] = (UINT16 *) (memory_region(REGION_CPU1) + offset_cart + (id * 0x2000));
473   return INIT_PASS;
474473}
475474
476475/*
src/mess/machine/ti99_4x.h
r2172r2173
160160MACHINE_START( ti99_4ev_60hz );
161161MACHINE_RESET( ti99 );
162162
163DEVICE_INIT( ti99_cart );
163DEVICE_START( ti99_cart );
164164DEVICE_LOAD( ti99_cart );
165165DEVICE_UNLOAD( ti99_cart );
166166
src/mess/formats/thom_dsk.c
r2172r2173
782782
783783
784784
785int thom_floppy_init ( const device_config *image )
785DEVICE_START( thom_floppy )
786786{
787787   thom_qdd_compute_map();
788   thom_floppy_reset( thom_floppy_drive_of_image( image  ) );
789   return floppy_drive_init( image, &thom_floppy_interface );
788   thom_floppy_reset( thom_floppy_drive_of_image( device  ) );
789   floppy_drive_init( device, &thom_floppy_interface );
790790}
791791
792792
r2172r2173
928928      info->i = 1;
929929      break;
930930   case MESS_DEVINFO_PTR_INIT:
931      info->init = thom_floppy_init;
931      info->init = DEVICE_START_NAME(thom_floppy);
932932      break;
933933   case MESS_DEVINFO_PTR_LOAD:
934934      info->load = thom_floppy_load;
src/mess/formats/thom_dsk.h
r2172r2173
2525  THOM_FLOPPY_QDD,     /* 2"8 */
2626} thom_floppy_type;
2727
28extern int thom_floppy_init   ( const device_config *image );
28extern DEVICE_START( thom_floppy );
2929extern int  thom_floppy_load   ( const device_config* image );
3030extern void thom_floppy_unload ( const device_config *image);
3131extern int  thom_floppy_create ( const device_config *image,
src/mess/drivers/wswan.c
r2172r2173
179179      case MESS_DEVINFO_INT_MUST_BE_LOADED:   info->i = 1; break;
180180
181181      /* --- the following bits of info are returned as pointers to data or functions --- */
182      case MESS_DEVINFO_PTR_INIT:         info->init = device_init_wswan_cart; break;
182      case MESS_DEVINFO_PTR_INIT:         info->init = DEVICE_START_NAME(wswan_cart); break;
183183      case MESS_DEVINFO_PTR_LOAD:         info->load = device_load_wswan_cart; break;
184184
185185      /* --- the following bits of info are returned as NULL-terminated strings --- */
src/mess/drivers/pdp1.c
r2172r2173
512512      case MESS_DEVINFO_INT_COUNT:                     info->i = 2; break;
513513
514514      /* --- the following bits of info are returned as pointers to data or functions --- */
515      case MESS_DEVINFO_PTR_INIT:                     info->init = device_init_pdp1_tape; break;
515      case MESS_DEVINFO_PTR_INIT:                     info->init = DEVICE_START_NAME(pdp1_tape); break;
516516      case MESS_DEVINFO_PTR_LOAD:                     info->load = device_load_pdp1_tape; break;
517517      case MESS_DEVINFO_PTR_UNLOAD:                  info->unload = device_unload_pdp1_tape; break;
518518      case MESS_DEVINFO_PTR_GET_DISPOSITIONS:            info->getdispositions = pdp1_get_open_mode; break;
src/mess/drivers/nc.c
r2172r2173
17471747      case MESS_DEVINFO_INT_COUNT:                     info->i = 1; break;
17481748
17491749      /* --- the following bits of info are returned as pointers to data or functions --- */
1750      case MESS_DEVINFO_PTR_INIT:                     info->init = device_init_nc_pcmcia_card; break;
1750      case MESS_DEVINFO_PTR_INIT:                     info->init = DEVICE_START_NAME(nc_pcmcia_card); break;
17511751      case MESS_DEVINFO_PTR_LOAD:                     info->load = device_load_nc_pcmcia_card; break;
17521752      case MESS_DEVINFO_PTR_UNLOAD:                  info->unload = device_unload_nc_pcmcia_card; break;
17531753
r2172r2173
17711771      case MESS_DEVINFO_INT_COUNT:                     info->i = 1; break;
17721772
17731773      /* --- the following bits of info are returned as pointers to data or functions --- */
1774      case MESS_DEVINFO_PTR_INIT:                     info->init = serial_device_init; break;
1774      case MESS_DEVINFO_PTR_INIT:                     info->init = DEVICE_START_NAME(serial_device); break;
17751775      case MESS_DEVINFO_PTR_LOAD:                     info->load = device_load_nc_serial; break;
17761776      case MESS_DEVINFO_PTR_UNLOAD:                  info->unload = serial_device_unload; break;
17771777
src/mess/drivers/pokemini.c
r2172r2173
8080   switch( state ) {
8181   case MESS_DEVINFO_INT_COUNT:         info->i = 1; break;
8282   case MESS_DEVINFO_INT_MUST_BE_LOADED:   info->i = 0; break;
83   case MESS_DEVINFO_PTR_INIT:         info->init = device_init_pokemini_cart; break;
83   case MESS_DEVINFO_PTR_INIT:         info->init = DEVICE_START_NAME(pokemini_cart); break;
8484   case MESS_DEVINFO_PTR_LOAD:         info->load = device_load_pokemini_cart; break;
8585   case MESS_DEVINFO_STR_FILE_EXTENSIONS:   strcpy( info->s = device_temp_str(), "min"); break;
8686   default:            cartslot_device_getinfo( devclass, state, info ); break;
src/mess/drivers/nes.c
r2172r2173
395395      case MESS_DEVINFO_INT_COUNT:                     info->i = 1; break;
396396
397397      /* --- the following bits of info are returned as pointers to data or functions --- */
398      case MESS_DEVINFO_PTR_INIT:                     info->init = device_init_nes_disk; break;
398      case MESS_DEVINFO_PTR_INIT:                     info->init = DEVICE_START_NAME(nes_disk); break;
399399      case MESS_DEVINFO_PTR_LOAD:                     info->load = device_load_nes_disk; break;
400400      case MESS_DEVINFO_PTR_UNLOAD:                  info->unload = device_unload_nes_disk; break;
401401
src/mess/drivers/ti99_8.c
r2172r2173
550550      case MESS_DEVINFO_INT_COUNT:                     info->i = 3; break;
551551
552552      /* --- the following bits of info are returned as pointers to data or functions --- */
553      case MESS_DEVINFO_PTR_INIT:                     info->init = device_init_mess_hd; break;
553      case MESS_DEVINFO_PTR_INIT:                     info->init = DEVICE_START_NAME(mess_hd); break;
554554      case MESS_DEVINFO_PTR_LOAD:                     info->load = device_load_ti99_hd; break;
555555      case MESS_DEVINFO_PTR_UNLOAD:                  info->unload = device_unload_ti99_hd; break;
556556
r2172r2173
639639      case MESS_DEVINFO_INT_COUNT:                     info->i = 1; break;
640640
641641      /* --- the following bits of info are returned as pointers to data or functions --- */
642      case MESS_DEVINFO_PTR_INIT:                     info->init = device_init_smartmedia; break;
642      case MESS_DEVINFO_PTR_INIT:                     info->init = DEVICE_START_NAME(smartmedia); break;
643643      case MESS_DEVINFO_PTR_LOAD:                     info->load = device_load_smartmedia; break;
644644      case MESS_DEVINFO_PTR_UNLOAD:                  info->unload = device_unload_smartmedia; break;
645645
src/mess/drivers/gb.c
r2172r2173
635635      case MESS_DEVINFO_INT_MUST_BE_LOADED:            info->i = 1; break;
636636
637637      /* --- the following bits of info are returned as pointers to data or functions --- */
638      case MESS_DEVINFO_PTR_INIT:                     info->init = device_init_gb_cart; break;
638      case MESS_DEVINFO_PTR_INIT:                     info->init = DEVICE_START_NAME(gb_cart); break;
639639      case MESS_DEVINFO_PTR_LOAD:                     info->load = device_load_gb_cart; break;
640640
641641      /* --- the following bits of info are returned as NULL-terminated strings --- */
src/mess/drivers/gamecom.c
r2172r2173
129129      info->i = 1;
130130      break;
131131   case MESS_DEVINFO_PTR_INIT:
132      info->init = device_init_gamecom_cart;
132      info->init = DEVICE_START_NAME(gamecom_cart);
133133      break;
134134   case MESS_DEVINFO_PTR_LOAD:
135135      info->load = device_load_gamecom_cart;
src/mess/drivers/thomson.c
r2172r2173
288288      break;
289289
290290   case MESS_DEVINFO_PTR_INIT:
291      info->init = thom_serial_init;
291      info->init = DEVICE_START_NAME(thom_serial);
292292      break;
293293   case MESS_DEVINFO_PTR_LOAD:
294294      info->load = thom_serial_load;
src/mess/drivers/apexc.c
r2172r2173
169169
170170
171171
172static DEVICE_INIT( apexc_tape )
172static DEVICE_START( apexc_tape )
173173{
174   return INIT_PASS;
175174}
176175
177176
r2172r2173
862861      case MESS_DEVINFO_INT_COUNT:                     info->i = 2; break;
863862
864863      /* --- the following bits of info are returned as pointers to data or functions --- */
865      case MESS_DEVINFO_PTR_INIT:                     info->init = device_init_apexc_tape; break;
864      case MESS_DEVINFO_PTR_INIT:                     info->init = DEVICE_START_NAME(apexc_tape); break;
866865      case MESS_DEVINFO_PTR_LOAD:                     info->load = device_load_apexc_tape; break;
867866      case MESS_DEVINFO_PTR_GET_DISPOSITIONS:            info->getdispositions = apexc_get_open_mode; break;
868867
src/mess/drivers/atarist.c
r2172r2173
21172117      case MESS_DEVINFO_INT_COUNT:                     info->i = 1; break;
21182118
21192119      /* --- the following bits of info are returned as pointers to data or functions --- */
2120      case MESS_DEVINFO_PTR_INIT:                     info->init = serial_device_init; break;
2120      case MESS_DEVINFO_PTR_INIT:                     info->init = DEVICE_START_NAME(serial_device); break;
21212121      case MESS_DEVINFO_PTR_LOAD:                     info->load = device_load_atarist_serial; break;
21222122      case MESS_DEVINFO_PTR_UNLOAD:                  info->unload = serial_device_unload; break;
21232123
r2172r2173
21362136      case MESS_DEVINFO_INT_COUNT:                     info->i = 2; break;
21372137
21382138      /* --- the following bits of info are returned as pointers to data or functions --- */
2139      case MESS_DEVINFO_PTR_INIT:                     info->init = serial_device_init; break;
2139      case MESS_DEVINFO_PTR_INIT:                     info->init = DEVICE_START_NAME(serial_device); break;
21402140      case MESS_DEVINFO_PTR_LOAD:                     info->load = device_load_atarist_serial; break;
21412141      case MESS_DEVINFO_PTR_UNLOAD:                  info->unload = serial_device_unload; break;
21422142
src/mess/drivers/geneve.c
r2172r2173
556556      case MESS_DEVINFO_INT_COUNT:                     info->i = 3; break;
557557
558558      /* --- the following bits of info are returned as pointers to data or functions --- */
559      case MESS_DEVINFO_PTR_INIT:                     info->init = device_init_mess_hd; break;
559      case MESS_DEVINFO_PTR_INIT:                     info->init = DEVICE_START_NAME(mess_hd); break;
560560      case MESS_DEVINFO_PTR_LOAD:                     info->load = device_load_ti99_hd; break;
561561      case MESS_DEVINFO_PTR_UNLOAD:                  info->unload = device_unload_ti99_hd; break;
562562
r2172r2173
621621      case MESS_DEVINFO_INT_COUNT:                     info->i = 1; break;
622622
623623      /* --- the following bits of info are returned as pointers to data or functions --- */
624      case MESS_DEVINFO_PTR_INIT:                     info->init = device_init_smartmedia; break;
624      case MESS_DEVINFO_PTR_INIT:                     info->init = DEVICE_START_NAME(smartmedia); break;
625625      case MESS_DEVINFO_PTR_LOAD:                     info->load = device_load_smartmedia; break;
626626      case MESS_DEVINFO_PTR_UNLOAD:                  info->unload = device_unload_smartmedia; break;
627627
src/mess/drivers/sg1000.c
r2172r2173
855855      case MESS_DEVINFO_INT_COUNT:                     info->i = 1; break;
856856
857857      /* --- the following bits of info are returned as pointers to data or functions --- */
858      case MESS_DEVINFO_PTR_INIT:                     info->init = serial_device_init; break;
858      case MESS_DEVINFO_PTR_INIT:                     info->init = DEVICE_START_NAME(serial_device); break;
859859      case MESS_DEVINFO_PTR_LOAD:                     info->load = device_load_sf7000_serial; break;
860860      case MESS_DEVINFO_PTR_UNLOAD:                  info->unload = serial_device_unload; break;
861861
src/mess/drivers/tx0.c
r2172r2173
406406      case MESS_DEVINFO_INT_COUNT:                     info->i = 2; break;
407407
408408      /* --- the following bits of info are returned as pointers to data or functions --- */
409      case MESS_DEVINFO_PTR_INIT:                     info->init = device_init_tx0_tape; break;
409      case MESS_DEVINFO_PTR_INIT:                     info->init = DEVICE_START_NAME(tx0_tape); break;
410410      case MESS_DEVINFO_PTR_LOAD:                     info->load = device_load_tx0_tape; break;
411411      case MESS_DEVINFO_PTR_UNLOAD:                  info->unload = device_unload_tx0_tape; break;
412412      case MESS_DEVINFO_PTR_GET_DISPOSITIONS:            info->getdispositions = tx0_tape_get_open_mode; break;
r2172r2173
450450      case MESS_DEVINFO_INT_COUNT:                     info->i = 1; break;
451451
452452      /* --- the following bits of info are returned as pointers to data or functions --- */
453      case MESS_DEVINFO_PTR_INIT:                     info->init = device_init_tx0_magtape; break;
453      case MESS_DEVINFO_PTR_INIT:                     info->init = DEVICE_START_NAME(tx0_magtape); break;
454454      case MESS_DEVINFO_PTR_LOAD:                     info->load = device_load_tx0_magtape; break;
455455      case MESS_DEVINFO_PTR_UNLOAD:                  info->unload = device_unload_tx0_magtape; break;
456456
src/mess/drivers/pc8801.c
r2172r2173
571571      case MESS_DEVINFO_INT_COUNT:                     info->i = 2; break;
572572
573573      /* --- the following bits of info are returned as pointers to data or functions --- */
574      case MESS_DEVINFO_PTR_INIT:                     info->init = device_init_d88image_floppy; break;
574      case MESS_DEVINFO_PTR_INIT:                     info->init = DEVICE_START_NAME(d88image_floppy); break;
575575      case MESS_DEVINFO_PTR_LOAD:                     info->load = device_load_d88image_floppy; break;
576576
577577      /* --- the following bits of info are returned as NULL-terminated strings --- */
src/mess/drivers/a2600.c
r2172r2173
523523}
524524
525525
526static DEVICE_INIT( a2600_cart ) {
526static DEVICE_START( a2600_cart )
527{
527528   banking_mode = 0xFF;
528   return 0;
529529}
530530
531531
r2172r2173
20092009      case MESS_DEVINFO_INT_MUST_BE_LOADED:            info->i = 1; break;
20102010
20112011      /* --- the following bits of info are returned as pointers to data or functions --- */
2012      case MESS_DEVINFO_PTR_INIT:                     info->init = device_init_a2600_cart; break;
2012      case MESS_DEVINFO_PTR_INIT:                     info->init = DEVICE_START_NAME(a2600_cart); break;
20132013      case MESS_DEVINFO_PTR_LOAD:                     info->load = device_load_a2600_cart; break;
20142014
20152015      /* --- the following bits of info are returned as NULL-terminated strings --- */
src/mess/drivers/oric.c
r2172r2173
570570      case MESS_DEVINFO_INT_COUNT:                     info->i = 4; break;
571571
572572      /* --- the following bits of info are returned as pointers to data or functions --- */
573      case MESS_DEVINFO_PTR_INIT:                     info->init = device_init_oric_floppy; break;
573      case MESS_DEVINFO_PTR_INIT:                     info->init = DEVICE_START_NAME(oric_floppy); break;
574574      case MESS_DEVINFO_PTR_LOAD:                     info->load = device_load_oric_floppy; break;
575575
576576      /* --- the following bits of info are returned as NULL-terminated strings --- */
src/mess/drivers/vc20.c
r2172r2173
792792      case MESS_DEVINFO_INT_COUNT:                     info->i = 2; break;
793793
794794      /* --- the following bits of info are returned as pointers to data or functions --- */
795      case MESS_DEVINFO_PTR_INIT:                     info->init = device_init_vc20_rom; break;
795      case MESS_DEVINFO_PTR_INIT:                     info->init = DEVICE_START_NAME(vc20_rom); break;
796796      case MESS_DEVINFO_PTR_LOAD:                     info->load = device_load_vc20_rom; break;
797797
798798      /* --- the following bits of info are returned as NULL-terminated strings --- */
src/mess/drivers/ql.c
r2172r2173
11281128      case MESS_DEVINFO_INT_COUNT:                     info->i = 2; break;
11291129
11301130      /* --- the following bits of info are returned as pointers to data or functions --- */
1131      case MESS_DEVINFO_PTR_INIT:                     info->init = serial_device_init; break;
1131      case MESS_DEVINFO_PTR_INIT:                     info->init = DEVICE_START_NAME(serial_device); break;
11321132      case MESS_DEVINFO_PTR_LOAD:                     info->load = device_load_ql_serial; break;
11331133      case MESS_DEVINFO_PTR_UNLOAD:                  info->unload = serial_device_unload; break;
11341134
src/mess/drivers/ti990_10.c
r2172r2173
297297      case MESS_DEVINFO_INT_COUNT:                     info->i = 4; break;
298298
299299      /* --- the following bits of info are returned as pointers to data or functions --- */
300      case MESS_DEVINFO_PTR_INIT:                     info->init = device_init_ti990_hd; break;
300      case MESS_DEVINFO_PTR_INIT:                     info->init = DEVICE_START_NAME(ti990_hd); break;
301301      case MESS_DEVINFO_PTR_LOAD:                     info->load = device_load_ti990_hd; break;
302302      case MESS_DEVINFO_PTR_UNLOAD:                  info->unload = device_unload_ti990_hd; break;
303303
r2172r2173
319319      case MESS_DEVINFO_INT_COUNT:                     info->i = 4; break;
320320
321321      /* --- the following bits of info are returned as pointers to data or functions --- */
322      case MESS_DEVINFO_PTR_INIT:                     info->init = device_init_ti990_tape; break;
322      case MESS_DEVINFO_PTR_INIT:                     info->init = DEVICE_START_NAME(ti990_tape); break;
323323      case MESS_DEVINFO_PTR_LOAD:                     info->load = device_load_ti990_tape; break;
324324      case MESS_DEVINFO_PTR_UNLOAD:                  info->unload = device_unload_ti990_tape; break;
325325
src/mess/drivers/abc80x.c
r2172r2173
10681068      case MESS_DEVINFO_INT_COUNT:                     info->i = 1; break;
10691069
10701070      /* --- the following bits of info are returned as pointers to data or functions --- */
1071      case MESS_DEVINFO_PTR_INIT:                     info->init = serial_device_init; break;
1071      case MESS_DEVINFO_PTR_INIT:                     info->init = DEVICE_START_NAME(serial_device); break;
10721072      case MESS_DEVINFO_PTR_LOAD:                     info->load = device_load_abc800_serial; break;
10731073      case MESS_DEVINFO_PTR_UNLOAD:                  info->unload = serial_device_unload; break;
10741074
src/mess/drivers/a7800.c
r2172r2173
346346      case MESS_DEVINFO_INT_MUST_BE_LOADED:            info->i = 1; break;
347347
348348      /* --- the following bits of info are returned as pointers to data or functions --- */
349      case MESS_DEVINFO_PTR_INIT:                     info->init = device_init_a7800_cart; break;
349      case MESS_DEVINFO_PTR_INIT:                     info->init = DEVICE_START_NAME(a7800_cart); break;
350350      case MESS_DEVINFO_PTR_LOAD:                     info->load = device_load_a7800_cart; break;
351351      case MESS_DEVINFO_PTR_PARTIAL_HASH:               info->partialhash = a7800_partialhash; break;
352352
src/mess/drivers/intv.c
r2172r2173
435435      case MESS_DEVINFO_INT_MUST_BE_LOADED:            info->i = 1; break;
436436
437437      /* --- the following bits of info are returned as pointers to data or functions --- */
438      case MESS_DEVINFO_PTR_INIT:                     info->init = device_init_intv_cart; break;
438      case MESS_DEVINFO_PTR_INIT:                     info->init = DEVICE_START_NAME(intv_cart); break;
439439      case MESS_DEVINFO_PTR_LOAD:                     info->load = device_load_intv_cart; break;
440440
441441      /* --- the following bits of info are returned as NULL-terminated strings --- */
src/mess/drivers/sms.c
r2172r2173
509509      case MESS_DEVINFO_INT_MUST_BE_LOADED:      info->i = 0; break;
510510
511511      /* --- the following bits of info are returned as pointers to data or functions --- */
512      case MESS_DEVINFO_PTR_INIT:            info->init = device_init_sms_cart; break;
512      case MESS_DEVINFO_PTR_INIT:            info->init = DEVICE_START_NAME(sms_cart); break;
513513      case MESS_DEVINFO_PTR_LOAD:            info->load = device_load_sms_cart; break;
514514
515515      /* --- the following bits of info are returned as NULL-terminated strings --- */
src/mess/drivers/ti85.c
r2172r2173
491491      case MESS_DEVINFO_INT_COUNT:                     info->i = 1; break;
492492
493493      /* --- the following bits of info are returned as pointers to data or functions --- */
494      case MESS_DEVINFO_PTR_INIT:                     info->init = device_init_ti85_serial; break;
494      case MESS_DEVINFO_PTR_INIT:                     info->init = DEVICE_START_NAME(ti85_serial); break;
495495      case MESS_DEVINFO_PTR_LOAD:                     info->load = device_load_ti85_serial; break;
496496      case MESS_DEVINFO_PTR_UNLOAD:                  info->unload = device_unload_ti85_serial; break;
497497
r2172r2173
533533      case MESS_DEVINFO_INT_COUNT:                     info->i = 1; break;
534534
535535      /* --- the following bits of info are returned as pointers to data or functions --- */
536      case MESS_DEVINFO_PTR_INIT:                     info->init = device_init_ti85_serial; break;
536      case MESS_DEVINFO_PTR_INIT:                     info->init = DEVICE_START_NAME(ti85_serial); break;
537537      case MESS_DEVINFO_PTR_LOAD:                     info->load = device_load_ti85_serial; break;
538538      case MESS_DEVINFO_PTR_UNLOAD:                  info->unload = device_unload_ti85_serial; break;
539539
src/mess/drivers/svi318.c
r2172r2173
514514
515515      /* --- the following bits of info are returned as pointers to data or functions --- */
516516      case MESS_DEVINFO_PTR_INIT:
517         info->init = device_init_svi318_cart;
517         info->init = DEVICE_START_NAME(svi318_cart);
518518         break;
519519      case MESS_DEVINFO_PTR_LOAD:
520520         info->load = device_load_svi318_cart;
src/mess/drivers/ti99_4p.c
r2172r2173
345345      case MESS_DEVINFO_INT_COUNT:                     info->i = 3; break;
346346
347347      /* --- the following bits of info are returned as pointers to data or functions --- */
348      case MESS_DEVINFO_PTR_INIT:                     info->init = device_init_mess_hd; break;
348      case MESS_DEVINFO_PTR_INIT:                     info->init = DEVICE_START_NAME(mess_hd); break;
349349      case MESS_DEVINFO_PTR_LOAD:                     info->load = device_load_ti99_hd; break;
350350      case MESS_DEVINFO_PTR_UNLOAD:                  info->unload = device_unload_ti99_hd; break;
351351
r2172r2173
424424      case MESS_DEVINFO_INT_COUNT:                     info->i = 1; break;
425425
426426      /* --- the following bits of info are returned as pointers to data or functions --- */
427      case MESS_DEVINFO_PTR_INIT:                     info->init = device_init_smartmedia; break;
427      case MESS_DEVINFO_PTR_INIT:                     info->init = DEVICE_START_NAME(smartmedia); break;
428428      case MESS_DEVINFO_PTR_LOAD:                     info->load = device_load_smartmedia; break;
429429      case MESS_DEVINFO_PTR_UNLOAD:                  info->unload = device_unload_smartmedia; break;
430430   }
src/mess/drivers/ti99_4x.c
r2172r2173
781781      case MESS_DEVINFO_INT_COUNT:                     info->i = 3; break;
782782
783783      /* --- the following bits of info are returned as pointers to data or functions --- */
784      case MESS_DEVINFO_PTR_INIT:                     info->init = device_init_ti99_cart; break;
784      case MESS_DEVINFO_PTR_INIT:                     info->init = DEVICE_START_NAME(ti99_cart); break;
785785      case MESS_DEVINFO_PTR_LOAD:                     info->load = device_load_ti99_cart; break;
786786      case MESS_DEVINFO_PTR_UNLOAD:                  info->unload = device_unload_ti99_cart; break;
787787
r2172r2173
820820      case MESS_DEVINFO_INT_COUNT:                     info->i = 3; break;
821821
822822      /* --- the following bits of info are returned as pointers to data or functions --- */
823      case MESS_DEVINFO_PTR_INIT:                     info->init = device_init_mess_hd; break;
823      case MESS_DEVINFO_PTR_INIT:                     info->init = DEVICE_START_NAME(mess_hd); break;
824824      case MESS_DEVINFO_PTR_LOAD:                     info->load = device_load_ti99_hd; break;
825825      case MESS_DEVINFO_PTR_UNLOAD:                  info->unload = device_unload_ti99_hd; break;
826826
r2172r2173
906906      case MESS_DEVINFO_INT_COUNT:                     info->i = 1; break;
907907
908908      /* --- the following bits of info are returned as pointers to data or functions --- */
909      case MESS_DEVINFO_PTR_INIT:                     info->init = device_init_smartmedia; break;
909      case MESS_DEVINFO_PTR_INIT:                     info->init = DEVICE_START_NAME(smartmedia); break;
910910      case MESS_DEVINFO_PTR_LOAD:                     info->load = device_load_smartmedia; break;
911911      case MESS_DEVINFO_PTR_UNLOAD:                  info->unload = device_unload_smartmedia; break;
912912
src/mess/drivers/gamepock.c
r2172r2173
6262   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
6363MACHINE_DRIVER_END
6464
65static DEVICE_INIT(gamepock_cart) {
65static DEVICE_START(gamepock_cart) {
6666   memory_set_bankptr( 1, memory_region( REGION_USER1 ) );
67   return INIT_PASS;
6867}
6968
7069static DEVICE_LOAD(gamepock_cart) {
r2172r2173
8584   switch( state ) {
8685   case MESS_DEVINFO_INT_COUNT:                              info->i = 1; break;
8786   case MESS_DEVINFO_INT_MUST_BE_LOADED:                     info->i = 0; break;
88   case MESS_DEVINFO_PTR_INIT:                              info->init = device_init_gamepock_cart; break;
87   case MESS_DEVINFO_PTR_INIT:                              info->init = DEVICE_START_NAME(gamepock_cart); break;
8988   case MESS_DEVINFO_PTR_LOAD:                              info->load = device_load_gamepock_cart; break;
9089   case MESS_DEVINFO_STR_FILE_EXTENSIONS:                     strcpy( info->s = device_temp_str(), "bin" ); break;
9190   default:                                       cartslot_device_getinfo(devclass, state, info); break;

Previous 15994 Revisions Next


© 1998-2018 The MESS Team