src/mess/machine/matsucd.c
| r6189 | r6190 | |
| 51 | 51 | void (*stch_cb)( running_machine *machine, int level ); /* Status changed callback */ |
| 52 | 52 | void (*scor_cb)( running_machine *machine, int level ); /* Subcode ready callback */ |
| 53 | 53 | cdrom_file *cdrom; |
| 54 | const device_config *cdda; |
| 54 | 55 | emu_timer *frame_timer; |
| 55 | 56 | } matsucd; |
| 56 | 57 | |
| r6189 | r6190 | |
| 61 | 62 | |
| 62 | 63 | static TIMER_CALLBACK(matsu_subcode_proc); |
| 63 | 64 | |
| 64 | | void matsucd_init( const device_config *cdrom_device ) |
| 65 | void matsucd_init( const device_config *cdrom_device, const char *cdda_tag ) |
| 65 | 66 | { |
| 66 | 67 | memset(&cd, 0, sizeof( matsucd ) ); |
| 67 | 68 | |
| 68 | 69 | cd.cdrom = mess_cd_get_cdrom_file( cdrom_device ); |
| 70 | cd.cdda = devtag_get_device(cdrom_device->machine, cdda_tag); |
| 69 | 71 | |
| 70 | 72 | cd.frame_timer = timer_alloc(cdrom_device->machine, matsu_subcode_proc, NULL); |
| 71 | 73 | |
| r6189 | r6190 | |
| 362 | 364 | |
| 363 | 365 | if ( cd.cdda_set == 0 ) |
| 364 | 366 | { |
| 367 | // 2009-10, FP: for some reason, cdda_from_cdrom was not returning the correct |
| 368 | // CDDA device. Hence, as a temp workaround, I added the cdda to the struct |
| 369 | // and its tag is configured in matsucd_init |
| 365 | 370 | if ( cd.cdrom ) |
| 366 | | cdda_set_cdrom( cdda_from_cdrom(machine, cd.cdrom), cd.cdrom); |
| 371 | cdda_set_cdrom( cd.cdda, cd.cdrom); |
| 367 | 372 | |
| 368 | 373 | cd.cdda_set = 1; |
| 369 | 374 | } |