Skip to content
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

Description of mole error #1

Closed
mattrberry opened this issue Jul 12, 2020 · 4 comments
Closed

Description of mole error #1

mattrberry opened this issue Jul 12, 2020 · 4 comments

Comments

@mattrberry
Copy link

Hey there! In my own experience, the description "Object Priority Mode (DMG/CGB)" for the mole error could potentially be a little misleading.

In my own experience, the cause was that sprites on CGB are prioritized by position OAM rather than by X-coordinate.

I'm making an issue rather than a PR because I'm sure you understand this better than I do, and I might just be misunderstanding something.

Thanks for your work on these :)

@mattcurrie
Copy link
Owner

mattcurrie commented Jul 12, 2020

Hi there!

The "Object Priority Mode" is referring to bit 0 of $FF6C. This register is set by the CGB boot ROM to toggle between CGB object priority (prioritise by OAM position) and DMG object priority (prioritise by X coordinate):

https://github.com/ISSOtm/gb-bootroms/blob/master/src/cgb.asm#L23

So the failure case would be if you're prioritising by X coordinate instead of OAM position.

I'll add a note in the table clarifying what it refers to.

@mattrberry
Copy link
Author

Oh wild, I didn't even know that register existed. The Pan Docs don't reference it...

@mattcurrie
Copy link
Owner

Ah yeap :) I only just discovered its purpose earlier this year by playing with the register value before the boot ROM had locked out access to it. Also the official name for the register wasn't known until recently too.

@mattrberry
Copy link
Author

Great, thanks for the info and for updating the readme! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants