Back to my small contributions, I decided to temporarily stop the work on DMA/HDMA [1], and to convert the SNES sound to be a MAME device.

This allows to remove a few static variables and represents a first (small) step towards save states. The code will be added tomorrow morning (I have to review the changes and I'm definitely too tired right now)

Next target for device-fication might be the PPU...

[1] Tokimeki Memorial refuses to work properly as soon as
- I init HDMA according to docs
- I enable HDMA direction bit
- I add indirect transfer edge cases
Given that all 3 things are supposed to happen on the hardware, this means I'm missing something else. In any case, Kale did a wonderful job with the current code, and I only expect this to have a minor impact on the MESS emulation (but of course, there is no reason we should not try to follow Anomie's docs and byuu's source, for accuracy sake wink )