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

Fix timing regression affecting ES_LAUNCH. #3811

Merged
merged 1 commit into from May 18, 2016

Conversation

magumagu
Copy link
Contributor

@magumagu magumagu commented May 3, 2016

Scheduling an event for zero cycles in the future actually means zero
cycles with new timing changes, but the code for IPC ACKs was depending on
it meaning "soon".

Fixes #9511.

I'm not at all confident this is actually right... but it seems to work.


This change is Reviewable

Scheduling an event for zero cycles in the future actually means zero
cycles with new timing changes, but the code for IPC ACKs was depending on
it meaning "soon".

Fixes dolphin-emu#9511.

I'm not at all confident this is actually right... but it seems to work.
@phire
Copy link
Member

phire commented May 3, 2016

Yeah, this bug probably pops up in other places too.

@JMC47
Copy link
Contributor

JMC47 commented May 3, 2016

Fixes the issue. This is why we merged that early. There are probably tons of "soon" that are going to be instant now and break things.

@waddlesplash
Copy link
Contributor

FWIW there are a bunch more CoreTiming::ScheduleEvent(0, ... in the code, maybe they should get audited? https://github.com/dolphin-emu/dolphin/search?utf8=%E2%9C%93&q=CoreTiming+ScheduleEvent (and Ctrl+F for (0.)

@degasus
Copy link
Member

degasus commented May 3, 2016

Or we just change this function to schedule for the next block. Calling the event handler directly doesn't need a CoreTiming wrapper :/

magumagu added a commit to magumagu/dolphin that referenced this pull request May 7, 2016
Fixes issue 8328.

As far as I know, this works the same way as console. Games will generally
react to the reset button the same way as Home->Reset, so this is
only marginally useful, but possibly nice to have in certain situations.

Note that if you try to use Reset, and you're running a WAD which isn't
installed, it will likely crash because WADs respond to the reset button
by launching themselves with ES_LAUNCH.  It might be a good idea to add some
sort of hack to make this work as expected.

It would be easy to extend this to support the power button, but it's
unclear how exactly that should be exposed in the UI. See also issue 8979.

Needs to be rebased once PR dolphin-emu#3811 is merged.
magumagu added a commit to magumagu/dolphin that referenced this pull request May 7, 2016
Fixes issue 8328.

As far as I know, this works the same way as console. Games will generally
react to the reset button the same way as Home->Reset, so this is
only marginally useful, but possibly nice to have in certain situations.

Note that if you try to use Reset, and you're running a WAD which isn't
installed, it will likely crash because WADs respond to the reset button
by launching themselves with ES_LAUNCH.  It might be a good idea to add some
sort of hack to make this work as expected.

It would be easy to extend this to support the power button, but it's
unclear how exactly that should be exposed in the UI. See also issue 8979.

Needs to be rebased once PR dolphin-emu#3811 is merged.
magumagu added a commit to magumagu/dolphin that referenced this pull request May 7, 2016
Fixes issue 8328.

As far as I know, this works the same way as console. Games will generally
react to the reset button the same way as Home->Reset, so this is
only marginally useful, but possibly nice to have in certain situations.

Note that if you try to use Reset, and you're running a WAD which isn't
installed, it will likely crash because WADs respond to the reset button
by launching themselves with ES_LAUNCH.  It might be a good idea to add some
sort of hack to make this work as expected.

It would be easy to extend this to support the power button, but it's
unclear how exactly that should be exposed in the UI. See also issue 8979.

Needs to be rebased once PR dolphin-emu#3811 is merged.
magumagu added a commit to magumagu/dolphin that referenced this pull request May 7, 2016
Fixes issue 8328.

As far as I know, this works the same way as console. Games will generally
react to the reset button the same way as Home->Reset, so this is
only marginally useful, but possibly nice to have in certain situations.

Note that if you try to use Reset, and you're running a WAD which isn't
installed, it will likely crash because WADs respond to the reset button
by launching themselves with ES_LAUNCH.  It might be a good idea to add some
sort of hack to make this work as expected.

It would be easy to extend this to support the power button, but it's
unclear how exactly that should be exposed in the UI. See also issue 8979.

Needs to be rebased once PR dolphin-emu#3811 is merged.
magumagu added a commit to magumagu/dolphin that referenced this pull request May 8, 2016
Fixes issue 8328.

As far as I know, this works the same way as console. Games will generally
react to the reset button the same way as Home->Reset, so this is
only marginally useful, but possibly nice to have in certain situations.

Note that if you try to use Reset, and you're running a WAD which isn't
installed, it will likely crash because WADs respond to the reset button
by launching themselves with ES_LAUNCH.  It might be a good idea to add some
sort of hack to make this work as expected.

It would be easy to extend this to support the power button, but it's
unclear how exactly that should be exposed in the UI. See also issue 8979.

Needs to be rebased once PR dolphin-emu#3811 is merged.
@mimimi085181
Copy link
Contributor

@degasus: How complicated would it be to make this shedule for the next block? The way i understand it, that would get more or less the same timing as before pr #3800 was merged, right? Would that be good solution for #3829 as well?

@phire
Copy link
Member

phire commented May 12, 2016

The way i understand it, that would get more or less the same timing as before pr #3800 was merged, right?

No, because before #3800 the interrupts were being delayed to the next slice, which could be anywhere from 1 to 20,000 cycles depending on what other events were scheduled.

Note: Numbers have been simplified. The size of a block is technically unlimited, but generally they aren't that large.

@JMC47
Copy link
Contributor

JMC47 commented May 14, 2016

Can this please be reviewed. We cannot leave ES_Launch broken for 5.0

@phire
Copy link
Member

phire commented May 16, 2016

Oh, I forgot to say LGTM on this.

@degasus
Copy link
Member

degasus commented May 18, 2016

Reviewed 1 of 1 files at r1.
Review status: all files reviewed at latest revision, all discussions resolved.


Comments from Reviewable

@degasus degasus merged commit 5a36b7d into dolphin-emu:master May 18, 2016
@degasus degasus added this to the Dolphin Release 5.0 milestone May 18, 2016
leoetlino pushed a commit to leoetlino/dolphin that referenced this pull request Jun 1, 2016
Fixes issue 8328.

As far as I know, this works the same way as console. Games will generally
react to the reset button the same way as Home->Reset, so this is
only marginally useful, but possibly nice to have in certain situations.

Note that if you try to use Reset, and you're running a WAD which isn't
installed, it will likely crash because WADs respond to the reset button
by launching themselves with ES_LAUNCH.  It might be a good idea to add some
sort of hack to make this work as expected.

It would be easy to extend this to support the power button, but it's
unclear how exactly that should be exposed in the UI. See also issue 8979.

Needs to be rebased once PR dolphin-emu#3811 is merged.
leoetlino pushed a commit to leoetlino/dolphin that referenced this pull request Jun 6, 2016
Fixes issue 8328.

As far as I know, this works the same way as console. Games will generally
react to the reset button the same way as Home->Reset, so this is
only marginally useful, but possibly nice to have in certain situations.

Note that if you try to use Reset, and you're running a WAD which isn't
installed, it will likely crash because WADs respond to the reset button
by launching themselves with ES_LAUNCH.  It might be a good idea to add some
sort of hack to make this work as expected.

It would be easy to extend this to support the power button, but it's
unclear how exactly that should be exposed in the UI. See also issue 8979.

Needs to be rebased once PR dolphin-emu#3811 is merged.
leoetlino pushed a commit to leoetlino/dolphin that referenced this pull request Jun 9, 2016
Fixes issue 8328.

As far as I know, this works the same way as console. Games will generally
react to the reset button the same way as Home->Reset, so this is
only marginally useful, but possibly nice to have in certain situations.

Note that if you try to use Reset, and you're running a WAD which isn't
installed, it will likely crash because WADs respond to the reset button
by launching themselves with ES_LAUNCH.  It might be a good idea to add some
sort of hack to make this work as expected.

It would be easy to extend this to support the power button, but it's
unclear how exactly that should be exposed in the UI. See also issue 8979.

Needs to be rebased once PR dolphin-emu#3811 is merged.
leoetlino pushed a commit to leoetlino/dolphin that referenced this pull request Jun 11, 2016
Fixes issue 8328.

As far as I know, this works the same way as console. Games will generally
react to the reset button the same way as Home->Reset, so this is
only marginally useful, but possibly nice to have in certain situations.

Note that if you try to use Reset, and you're running a WAD which isn't
installed, it will likely crash because WADs respond to the reset button
by launching themselves with ES_LAUNCH.  It might be a good idea to add some
sort of hack to make this work as expected.

It would be easy to extend this to support the power button, but it's
unclear how exactly that should be exposed in the UI. See also issue 8979.

Needs to be rebased once PR dolphin-emu#3811 is merged.
leoetlino pushed a commit to leoetlino/dolphin that referenced this pull request Jun 15, 2016
Fixes issue 8328.

As far as I know, this works the same way as console. Games will generally
react to the reset button the same way as Home->Reset, so this is
only marginally useful, but possibly nice to have in certain situations.

Note that if you try to use Reset, and you're running a WAD which isn't
installed, it will likely crash because WADs respond to the reset button
by launching themselves with ES_LAUNCH.  It might be a good idea to add some
sort of hack to make this work as expected.

It would be easy to extend this to support the power button, but it's
unclear how exactly that should be exposed in the UI. See also issue 8979.

Needs to be rebased once PR dolphin-emu#3811 is merged.
leoetlino pushed a commit to leoetlino/dolphin that referenced this pull request Jun 18, 2016
Fixes issue 8328.

As far as I know, this works the same way as console. Games will generally
react to the reset button the same way as Home->Reset, so this is
only marginally useful, but possibly nice to have in certain situations.

Note that if you try to use Reset, and you're running a WAD which isn't
installed, it will likely crash because WADs respond to the reset button
by launching themselves with ES_LAUNCH.  It might be a good idea to add some
sort of hack to make this work as expected.

It would be easy to extend this to support the power button, but it's
unclear how exactly that should be exposed in the UI. See also issue 8979.

Needs to be rebased once PR dolphin-emu#3811 is merged.
leoetlino pushed a commit to leoetlino/dolphin that referenced this pull request Jun 19, 2016
Fixes issue 8328.

As far as I know, this works the same way as console. Games will generally
react to the reset button the same way as Home->Reset, so this is
only marginally useful, but possibly nice to have in certain situations.

Note that if you try to use Reset, and you're running a WAD which isn't
installed, it will likely crash because WADs respond to the reset button
by launching themselves with ES_LAUNCH.  It might be a good idea to add some
sort of hack to make this work as expected.

It would be easy to extend this to support the power button, but it's
unclear how exactly that should be exposed in the UI. See also issue 8979.

Needs to be rebased once PR dolphin-emu#3811 is merged.
leoetlino pushed a commit to leoetlino/dolphin that referenced this pull request Jun 20, 2016
Fixes issue 8328.

As far as I know, this works the same way as console. Games will generally
react to the reset button the same way as Home->Reset, so this is
only marginally useful, but possibly nice to have in certain situations.

Note that if you try to use Reset, and you're running a WAD which isn't
installed, it will likely crash because WADs respond to the reset button
by launching themselves with ES_LAUNCH.  It might be a good idea to add some
sort of hack to make this work as expected.

It would be easy to extend this to support the power button, but it's
unclear how exactly that should be exposed in the UI. See also issue 8979.

Needs to be rebased once PR dolphin-emu#3811 is merged.
leoetlino pushed a commit to leoetlino/dolphin that referenced this pull request Jun 23, 2016
Fixes issue 8328.

As far as I know, this works the same way as console. Games will generally
react to the reset button the same way as Home->Reset, so this is
only marginally useful, but possibly nice to have in certain situations.

Note that if you try to use Reset, and you're running a WAD which isn't
installed, it will likely crash because WADs respond to the reset button
by launching themselves with ES_LAUNCH.  It might be a good idea to add some
sort of hack to make this work as expected.

It would be easy to extend this to support the power button, but it's
unclear how exactly that should be exposed in the UI. See also issue 8979.

Needs to be rebased once PR dolphin-emu#3811 is merged.
magumagu added a commit to magumagu/dolphin that referenced this pull request Jun 26, 2016
Fixes issue 8328.

As far as I know, this works the same way as console. Games will generally
react to the reset button the same way as Home->Reset, so this is
only marginally useful, but possibly nice to have in certain situations.

Note that if you try to use Reset, and you're running a WAD which isn't
installed, it will likely crash because WADs respond to the reset button
by launching themselves with ES_LAUNCH.  It might be a good idea to add some
sort of hack to make this work as expected.

It would be easy to extend this to support the power button, but it's
unclear how exactly that should be exposed in the UI. See also issue 8979.

Needs to be rebased once PR dolphin-emu#3811 is merged.
magumagu added a commit to magumagu/dolphin that referenced this pull request Jun 26, 2016
Fixes issue 8328.

As far as I know, this works the same way as console. Games will generally
react to the reset button the same way as Home->Reset, so this is
only marginally useful, but possibly nice to have in certain situations.

Note that if you try to use Reset, and you're running a WAD which isn't
installed, it will likely crash because WADs respond to the reset button
by launching themselves with ES_LAUNCH.  It might be a good idea to add some
sort of hack to make this work as expected.

It would be easy to extend this to support the power button, but it's
unclear how exactly that should be exposed in the UI. See also issue 8979.

Needs to be rebased once PR dolphin-emu#3811 is merged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
6 participants