From: Wouter V. <ver...@gm...> - 2017-12-25 11:24:30
|
IMHO it's not a goal on itself to have all chip implementations separate from the MSXDevice classes. - For I8255 this separation turns out to be useful, because many devices reuse the I8255 chip. - For the V99x8 chip / VDP device separating them doesn't bring any real advantage. But there's also nothing that prevents separating them in the future. - For the sound devices we usually did separate the chip from the device. For many, but not all, it turned out that (sometimes years later) we could actually reuse the chip in a second device. But if we would have made the other choice, it wouldn't be difficult to separate them at that point. So I don't mind this inconsistency at all. I merely see it as an implementation detail that can be changed (in both directions) at any point. Wouter On Mon, Dec 25, 2017 at 1:37 AM, Maarten ter Huurne <ma...@tr...> wrote: > On Sunday, 24 December 2017 18:17:25 CET Wouter Vermaelen wrote: > > > I like the following option best. I think it's option b, or at least > > very close to it: > > - Copy the readIO, peekIo, writeIO() implementation to the I8255 class > > - (optionally) The existing readPortA() .. methods in I8255 can then > > become private. > > - The read/peek/writeIO methods in MSXPPI and SVIPPI remain but only > > delegate to I8255. > > I like this because it's simple and it also keeps the I8255 stuff and > > the MSXDevice stuff separated. > > Ah, so use the same method signatures as MSXDevice in I8255, without > actually inheriting from MSXDevice? I think that's an improvement over > the current situation, since it would reduce the duplicated code to one > line per method. > > It is inconsistent though to have the I8255 chip separated from > MSXDevice and have for example the VDP as an MSXDevice. Although if we > ever want to do something about that inconsistency for all devices, the > solution would be to separate chip from glue for all, so having I8255 as > a non-device class makes sense. > > > I don't think there's any impact on serialization. > > Agreed: the serialization would only be an issue if I8255 was made into > an MSXDevice. > > Bye, > Maarten > > > > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > openMSX-devel mailing list > ope...@li... > https://lists.sourceforge.net/lists/listinfo/openmsx-devel > |