Previous | 199869 Revisions | Next |
r17431 Thursday 23rd August, 2012 at 20:47:28 UTC by smf |
---|
removed am53cf96_get_device and some other unused GetDevice() trampolines (nw) |
[src/emu/machine] | 53c810.c 53c810.h am53cf96.c am53cf96.h wd33c93.c wd33c93.h |
[src/mame/drivers] | konamigv.c twinkle.c |
r17430 | r17431 | |
---|---|---|
877 | 877 | static MACHINE_RESET( twinkle ) |
878 | 878 | { |
879 | 879 | /* also hook up CDDA audio to the CD-ROM drive */ |
880 | cdda_set_cdrom(machine.device("cdda"), am53cf96_get_device(SCSI_ID_4)); | |
880 | void *cdrom; | |
881 | scsidev_device *scsidev = machine.device<scsidev_device>("cdrom0"); | |
882 | scsidev->GetDevice( &cdrom ); | |
883 | cdda_set_cdrom(machine.device("cdda"), cdrom); | |
881 | 884 | } |
882 | 885 | |
883 | 886 | static void spu_irq(device_t *device, UINT32 data) |
r17430 | r17431 | |
---|---|---|
329 | 329 | static MACHINE_RESET( konamigv ) |
330 | 330 | { |
331 | 331 | /* also hook up CDDA audio to the CD-ROM drive */ |
332 | cdda_set_cdrom(machine.device("cdda"), am53cf96_get_device(SCSI_ID_4)); | |
332 | void *cdrom; | |
333 | scsidev_device *scsidev = machine.device<scsidev_device>("cdrom"); | |
334 | scsidev->GetDevice( &cdrom ); | |
335 | cdda_set_cdrom(machine.device("cdda"), cdrom); | |
333 | 336 | } |
334 | 337 | |
335 | 338 | static void spu_irq(device_t *device, UINT32 data) |
r17430 | r17431 | |
---|---|---|
737 | 737 | } |
738 | 738 | } |
739 | 739 | |
740 | void *lsi53c810_get_device(int id) | |
741 | { | |
742 | void *ret; | |
743 | ||
744 | if (devices[id]) | |
745 | { | |
746 | logerror("lsi53c810: fetching dev pointer for SCSI ID %d\n", id); | |
747 | devices[id]->GetDevice( &ret ); | |
748 | ||
749 | return ret; | |
750 | } | |
751 | ||
752 | return NULL; | |
753 | } | |
754 | ||
755 | 740 | /************************************* |
756 | 741 | * |
757 | 742 | * Disassembler |
r17430 | r17431 | |
---|---|---|
16 | 16 | extern void lsi53c810_read_data(int bytes, UINT8 *pData); |
17 | 17 | extern void lsi53c810_write_data(int bytes, UINT8 *pData); |
18 | 18 | |
19 | extern void *lsi53c810_get_device(int id); | |
20 | ||
21 | 19 | READ8_HANDLER( lsi53c810_reg_r ); |
22 | 20 | WRITE8_HANDLER( lsi53c810_reg_w ); |
23 | 21 |
r17430 | r17431 | |
---|---|---|
843 | 843 | } |
844 | 844 | } |
845 | 845 | |
846 | void *wd33c93_get_device(int id) | |
847 | { | |
848 | void *ret; | |
849 | ||
850 | if (devices[id]) | |
851 | { | |
852 | devices[id]->GetDevice( &ret ); | |
853 | return ret; | |
854 | } | |
855 | ||
856 | return NULL; | |
857 | } | |
858 | ||
859 | 846 | void wd33c93_clear_dma(void) |
860 | 847 | { |
861 | 848 | /* indicate DMA completed by clearing the transfer count */ |
r17430 | r17431 | |
---|---|---|
17 | 17 | extern void wd33c93_init( running_machine &machine, const struct WD33C93interface *interface ); |
18 | 18 | extern void wd33c93_get_dma_data(int bytes, UINT8 *pData); |
19 | 19 | extern void wd33c93_write_data(int bytes, UINT8 *pData); |
20 | extern void *wd33c93_get_device(int id); | |
21 | 20 | extern void wd33c93_clear_dma(void); |
22 | 21 | extern int wd33c93_get_dma_count(void); |
23 | 22 | extern READ8_HANDLER(wd33c93_r); |
r17430 | r17431 | |
---|---|---|
264 | 264 | logerror("53cf96: request for unknown device SCSI ID %d\n", last_id); |
265 | 265 | } |
266 | 266 | } |
267 | ||
268 | // get the device handle (HD or CD) for the specified SCSI ID | |
269 | void *am53cf96_get_device(int id) | |
270 | { | |
271 | void *ret; | |
272 | ||
273 | if (devices[id]) | |
274 | { | |
275 | logerror("53cf96: fetching dev pointer for SCSI ID %d\n", id); | |
276 | devices[id]->GetDevice( &ret ); | |
277 | return ret; | |
278 | } | |
279 | ||
280 | return NULL; | |
281 | } |
r17430 | r17431 | |
---|---|---|
17 | 17 | extern void am53cf96_init( running_machine &machine, const struct AM53CF96interface *interface ); |
18 | 18 | extern void am53cf96_read_data(int bytes, UINT8 *pData); |
19 | 19 | void am53cf96_write_data(int bytes, UINT8 *pData); |
20 | void *am53cf96_get_device(int id); | |
21 | 20 | extern READ32_HANDLER( am53cf96_r ); |
22 | 21 | extern WRITE32_HANDLER( am53cf96_w ); |
23 | 22 |
Previous | 199869 Revisions | Next |