mamedev / mame

MAME
https://www.mamedev.org/
Other
8.06k stars 2.01k forks source link

SNES CX4 needs to be made non-static #8917

Open cuavas opened 2 years ago

cuavas commented 2 years ago

The SNES CX4 somehow managed to escape being converted to C++ properly. It’s in these files:

The entire state is kept in a file static instance of the CX4 class in snescx4.cpp called cx4, reminiscent of the old approach of using static variables for everything before MAME had devices. The code is all static functions that work on the static instance of the state class.

This really needs to be turned into something that’s instantiated as needed, preferably in the form of a device. It should be relatively easy to turn into a device, given the entry points are a read/write handler pair.

MooglyGuy commented 2 years ago

Replying to this issue so that it can be assigned to me.