In svn rev6190, I fixed the crash in cdtv. Now we can once more load CHDs to cdtv. (thanks Anna for providing a test case
However, I think there is something wrong going on with the cdda (probably on the MAME side): the cdda can be set from the cdrom by using cdda_set_from_cdrom, but this function requires the cdrom to be a 'void' entry rather than a device (like cdroms are in MESS) and this was causing the error I fixed: the cdda.c code was not finding the correct cdda device when cdda_set_from_cdrom was called.
This is probably due to the fact that in MAME cdda_set_from_cdrom is called with a second parameter from SCSI elements and SCSI is not a device yet in MAME.
While the current code in MESS seems to work, there are other functions which expect a void parameter and receive a device one.
Hence, I fear there could be other problems (hopefully not affecting anything visible) which will only be fixed with a device-ification of SCSI!!