-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
VideoInterface: start counting half-lines at 0 instead of 1 #8334
Conversation
bca1a43
to
4bd7d00
Compare
Fixed to account for impending #8230 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since #8230 is merged, you'll have to rebase this.
{ | ||
s_ticks_last_line_start = CoreTiming::GetTicks(); | ||
u32 h_thresh = (reg.HCT > m_HTiming0.HLW) ? 1 : 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to save on letters here; especially when your PR is meant to make it easier to reason about code ;)
u32 h_thresh = (reg.HCT > m_HTiming0.HLW) ? 1 : 0; | |
u32 horizontal_threshold = (reg.HCT > m_HTiming0.HLW) ? 1 : 0; |
Not sure if thats the best name though (or whether my guesses of what h
and thresh
were meant to stand for were correct).
4bd7d00
to
4c2a7ef
Compare
This breaks the FMV loading in NTSC (PAL works) Mario Kart: Double Dash after the Lakitu/Fish thing. The game isn't frozen, the FMV just doesn't play. You can skip it like normal and play the game. |
- Re-organize VideoInterface::Update() to count half-lines starting at 0 instead of 1 - Use horizontal position when checking if we should assert some display interrupt - Add some more descriptive comments
4c2a7ef
to
9e3b867
Compare
Forgot to adjust the half-line count when servicing MMIO reads on the vertical beam position register. |
Everything I tested appears to work now. |
LGTM |
@@ -317,7 +317,7 @@ void RegisterMMIO(MMIO::Mapping* mmio, u32 base) | |||
// MMIOs with unimplemented writes that trigger warnings. | |||
mmio->Register( | |||
base | VI_VERTICAL_BEAM_POSITION, | |||
MMIO::ComplexRead<u16>([](u32) { return 1 + (s_half_line_count - 1) / 2; }), | |||
MMIO::ComplexRead<u16>([](u32) { return 1 + (s_half_line_count) / 2; }), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are the parentheses around s_half_line_count
necessary anymore?
If you enable progressive scan and disable PAL60 mode on 10888, Visual Controller Test is broken with a black screen. |
Found it easier to reason about
VideoInterface::Update()
if we start counting half-lines at 0 instead of 1.