libretro / bsnes2014

Libretro fork of bsnes. As close to upstream as possible.
GNU General Public License v3.0
9 stars 17 forks source link

Delete leftover ifdef and change when frame_event_performed flag is cleared #20

Closed Brunnis closed 7 years ago

Brunnis commented 7 years ago

Removed remaining ifdefs that were supposed to be removed in sfc/alt/cpu/timing.cpp in recent commits. The corresponding commit to bsnes-mercury was correct.

Also moved the clearing of the frame_event_performed flag from sfc/cpu/timing/timing.cpp to sfc/cpu/timing/irq.cpp, so that it occurs at exactly the same place as where the nmi_valid signal goes from high to low. This is only a slight change from previously, where the flag was cleared in scanline() when vcounter()==0. The change may not have any practical effects, but it does make more sense, since the old code actually clears the flag just before the nmi_valid signal goes low.

I've made the corresponding change to sfc/alt/cpu/timing.cpp as well, even though it's actually not needed there (the interrupt code executes inside scanline() without any delay anyway). I made this change just to make sure that the code for the two CPU variants mimic each other as closely as possible (easier to read/understand).