-
Notifications
You must be signed in to change notification settings - Fork 2.1k
philips/mcd212.cpp: Rename matte flag constants and refactor matte handling code #13304
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This intentionally makes no changes to output. The purpose is to make the code easier to understand and maintain. 1. The non-canonical name "Regions" was changed to the official name "Mattes". Corresponding abbreviation "R" is changed to "M". 2. Deprecated function get_plane_width is deleted. 3. mix_lines is refactored. 4. Minor changes.
This pull request intentionally has no behavior changes. To ensure this pull has no behavior changes, we pause the refactoring here so that these non-visible changes can be accepted first. Reduction of code (-10 lines).
Any concerns? |
Fixes style. update_matte_arrays will need further refactoring later.
The declaration of x has to be outside the loop because it's used below the loop.
@Vincent-Halver Are you sure you want to rename regions to mattes? At least according to the datasheet of the MCD212 the name region is actually used in there. I'm asking as this might confuse future readers of mcd212.cpp |
@Slamy I feel reasonably sure, though I see why you ask. Let me explain. Mattes and Regions are closely related in the spec: From the Greenbook Spec:
The various function names in the OS call these shapes and unions/intersections/etc as "regions".
The Validation Disc also uses this terminology. You may see debug output when using that disc that refers to these function names. Regions are small files that occupy space in the file manager and developers have to allocate and deallocate them. I do see that the MCD212 PDF doesn't use the word Matte, and instead calls them regions. That means that a choice would have to be made: do you use the Motorola chip's terms, or the official Philips terms? I think it would be good to consider who would actually be reading and writing the code. When working on the emulator, the Validation Disc, Operating System, and official CD-i specification all use the term Matte. It reduces developer confusion to use the same terms that the software uses. So I come to the conclusion it should follow the Greenbook terminology. |
@Vincent-Halver As I'm not the maintainer of this code, I also don't have a saying in this. I was just wondering, considering MAME is not using the HLE approach and sees the systems more low level. In theory CD-i is a software standard and there I would totally understand the naming being done like in the green book. |
Green Book is a standard, and it's not confined to Philips CD-i alone.
Those are interchangeable names tbh, there isn't a real convention there. It's all about personal preferences, I prefer to use actual doc naming for stuff, except where that turns out to be impractical or confusing for MAME. |
I am not, but I would join. Something that would help me a lot would be someone to record all the visual tests from Validation Disc (E) on real hardware. It sounds like we're ok with using the Greenbook spec naming, so if that's alright, let's pull in the change, and I'll clean up the next section of code that fixes the Matte execution order that I alluded to above. |
This intentionally has no visible effects. The purpose is to make the code easier to understand and maintain.