Previous 15994 Revisions Next

r6190 Monday 26th October, 2009 at 10:28:15 UTC by Fabio Priuli
[CDTV] Fixed CDTV (it was crashing due to some CDDA change)
[src/mess/machine]amigacd.c matsucd.c matsucd.h

src/mess/machine/matsucd.c
r6189r6190
5151   void (*stch_cb)( running_machine *machine, int level );   /* Status changed callback */
5252   void (*scor_cb)( running_machine *machine, int level );   /* Subcode ready callback */
5353   cdrom_file *cdrom;
54   const device_config *cdda;
5455   emu_timer *frame_timer;
5556} matsucd;
5657
r6189r6190
6162
6263static TIMER_CALLBACK(matsu_subcode_proc);
6364
64void matsucd_init( const device_config *cdrom_device )
65void matsucd_init( const device_config *cdrom_device, const char *cdda_tag )
6566{
6667   memset(&cd, 0, sizeof( matsucd ) );
6768
6869   cd.cdrom = mess_cd_get_cdrom_file( cdrom_device );
70   cd.cdda = devtag_get_device(cdrom_device->machine, cdda_tag);
6971
7072   cd.frame_timer = timer_alloc(cdrom_device->machine, matsu_subcode_proc, NULL);
7173
r6189r6190
362364
363365   if ( cd.cdda_set == 0 )
364366   {
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
365370      if ( cd.cdrom )
366         cdda_set_cdrom( cdda_from_cdrom(machine, cd.cdrom), cd.cdrom);
371         cdda_set_cdrom( cd.cdda, cd.cdrom);
367372
368373      cd.cdda_set = 1;
369374   }
src/mess/machine/matsucd.h
r6189r6190
55***************************************************************************/
66
77/* initialization */
8void matsucd_init( const device_config *cdrom_device );
8void matsucd_init( const device_config *cdrom_device, const char *cdda_tag );
99
1010
1111/* signaling */
src/mess/machine/amigacd.c
r6189r6190
524524MACHINE_RESET( amigacd )
525525{
526526   /* initialize the cdrom */
527   matsucd_init( devtag_get_device(machine, "cdrom") );
527   matsucd_init( devtag_get_device(machine, "cdrom"), "cdda" );
528528   matsucd_set_status_enabled_callback( cdrom_status_enabled );
529529   matsucd_set_status_changed_callback( cdrom_status_change );
530530   matsucd_set_subcode_ready_callback( cdrom_subcode_ready );

Previous 15994 Revisions Next


© 1998-2018 The MESS Team