Psycho Fox is a simple platformer for the Sega Master System. This run is a real time improvement over the currently published run thanks to some devious abuse of the SMS architecture.

Game objectives

  • Emulator used: BizHawk 1.12.2
  • Beats the game as fast as possible
  • Abuses programming errors

Comments

This one might be a bit controvertial but I figured it's an interesting enough circumstance that is was worth trying to put on the workbench. This trick was originally pointed out by MESHUGGAH here as a possible emulator bug. But as it turns out, this is a valid trick that just so happens to be possible due to a simple programming oversight.
The improvement in this run is entirely due to reducing loading times by abusing non-maskable interrupts (NMIs) that are generated in the SMS when the 'pause' button is hit. It might seem counter-intuitive that pressing the pause button would make a game go faster, but it does turn out to be the case if pressed at the right time.
Here is what the game is doing during typical loading screen frame:
Halt, wait for interrupt (~50000 cycles)
Vblank, Execute necessary code for the frame (~7000 cycles)
Repeat
What happens when you press pause, is that an NMI occurs in those ~50000 cycles where nothing is happening. The NMI itslef doesn't do anything important except for Return to where the code would be executing after a normal interrupt, so basically it's doing two frames in one. EX:
Halt, wait for interrupt (zero cycles in this case since pause is pressed immediately)
NMI
Execute frame code
Halt again
VBlank, frame code again
The basic idea is that the return from interrupt returns to the same place regardless of which interrupt is triggered. There is plenty of time in a frame to add another interrupt without effecting anything else.
And that's all there is to it!
So is it legit? Personally I think so, it's valid input that is doable real time (since on average you'd hit an NMI during HALT about 75% of the time.) And, why would you not want loading screens to go faster?

feos: At the first glance it looked like a rejection to me, because not a single frame of gameplay was improved through optimization. But I double-checked, and there's no rule demanding that for every obsoletion, only for switching game regions. So yeah, as long as something can be sped up with player input alone, it is considered an optimization technique. Accepting as an improvement to [1996] SMS Psycho Fox by Sonikkustar in 02:10.27.
fsvgm777: Processing.


TASVideoAgent
They/Them
Moderator
Joined: 8/3/2004
Posts: 15558
Location: 127.0.0.1
This topic is for the purpose of discussing #5518: Sonikkustar & Alyosha's SMS Psycho Fox in 02:02.17
adelikat
He/Him
Emulator Coder, Site Developer, Site Owner, Expert player (3571)
Joined: 11/3/2004
Posts: 4754
Location: Tennessee
I think this technique is cool as hell. Pausing to speed up load times, I love the counter-intuitive. For me this isn't controversial at all. Also, I get the impression this is something that could be done to other SMS games as well?
It's hard to look this good. My TAS projects
Challenger
He/Him
Skilled player (1688)
Joined: 2/23/2016
Posts: 1061
I didn't expect that was possible to speed up load times. Liked this, despite that sounds a bit controversial.
My homepage --Currently not much motived for TASing as before...-- But I'm still working.
Alyosha
He/Him
Editor, Emulator Coder, Expert player (3809)
Joined: 11/30/2014
Posts: 2828
Location: US
adelikat wrote:
I think this technique is cool as hell. Pausing to speed up load times, I love the counter-intuitive. For me this isn't controversial at all. Also, I get the impression this is something that could be done to other SMS games as well?
Yes, any game that increments a counter outside of an interrupt loop potentially is vulnerable to this. MESSUHGAH originally pointed it out on Batman. If they had simply incremented the counter within the loop this would not occur at all (since NMI jumps to $0066 and IRQ jumps to $0038) Also it's just good luck that we see this behavior at all. Emulators that start frames at vbkank (as even other bizhawk cores like NEShawk do) would execute the NMI but then immediately enter IRQ before anything goes awry. Time to improve some SMS runs !
Challenger
He/Him
Skilled player (1688)
Joined: 2/23/2016
Posts: 1061
Alyosha wrote:
Time to improve some SMS runs !
I'm actually working (slowly) on SMS Ninja Gaiden. I don't know if pause works on this game or not.
My homepage --Currently not much motived for TASing as before...-- But I'm still working.
NitroGenesis
He/Him
Editor, Experienced player (556)
Joined: 12/24/2009
Posts: 1873
It's interesting. I suppose it's kind of dodgy whether it by itself an actual improvement though, since it doesn't seem to affect gameplay.
YoungJ1997lol wrote:
Normally i would say Yes, but thennI thought "its not the same hack" so ill stick with meh.
MarbleousDave
He/Him
Player (13)
Joined: 9/12/2009
Posts: 1559
Encode?
Editor, Emulator Coder, Site Developer
Joined: 5/11/2011
Posts: 1108
Location: Murka
Alyosha wrote:
Also it's just good luck that we see this behavior at all. Emulators that start frames at vbkank (as even other bizhawk cores like NEShawk do) would execute the NMI but then immediately enter IRQ before anything goes awry.
I think the real answer is that cores need to have subframe input for this sort of thing.
Stovent
He/Him
Publisher
Joined: 8/23/2016
Posts: 165
Location: France
Temp encode : Link to video
[17:37:00]<TheCoreyBurton> It's N64 - it's ALWAYS bad news.
Post subject: Movie published
TASVideoAgent
They/Them
Moderator
Joined: 8/3/2004
Posts: 15558
Location: 127.0.0.1
This movie has been published. The posts before this message apply to the submission, and posts after this message apply to the published movie. ---- [3418] SMS Psycho Fox by Sonikkustar & Alyosha in 02:02.17