Language:
Lua     Change language:
Pastebin: 98416
Author: dwangoac
Subject: High Speed for NES skip cutscenes script
Created: 2008-10-16 02:33:20
Download and save
Toggle line numbers
1-- High Speed for NES bonus count skip script by dwangoac on 2008-10-11 
2 
3sensitivity = 10 -- This is the number of frames that the memory addresses must match for consecutively before switching to turbo mode 
4speedstatus = 1 -- Set to 1 to see a message on the screen when the script has switched to turbo mode 
5speedupTrigger = 0 
6 
7-- The various combinations of memory addresses below catch cutscene areas of the game where no user input is happening 
8 
9while true do 
10    memoryToWatch1 = memory.readbyte(0x04DC
11    memoryToWatch2 = memory.readbyte(0x04E1
12    memoryToWatch3 = memory.readbyte(0x04E5
13    memoryToWatch4 = memory.readbyte(0x04E9
14    memoryToWatch5 = memory.readbyte(0x07B0) -- timer 
15    memoryToWatch6 = memory.readbyte(0x0034
16    memoryToWatch7 = memory.readbyte(0x03EE) -- cups filled when in cannon minigame 
17    if memoryToWatch1 == 0 and memoryToWatch2 == 0 and memoryToWatch3 == 0 and memoryToWatch4 == 0 or -- Catches bonus counter 
18       memoryToWatch1 == 12 and memoryToWatch2 == 2 and memoryToWatch3 == 2 and memoryToWatch4 == 1 and memoryToWatch7 == 184 or -- Catches spaceship countdown 
19       memoryToWatch5 == 0 and memoryToWatch6 == 0 then -- Catches fireworks display 
20        speedupTrigger = speedupTrigger + 1 
21        if speedupTrigger >= sensitivity then -- If we've hit the sensitivity level, move to turbo speed 
22            if speedstatus == 1 then 
23                gui.text(5,7,"turbo speed"); 
24            end 
25            FCEU.speedmode("turbo"
26        end 
27    else 
28        speedupTrigger = 0 -- Resets as soon as the memory match no longer exists 
29        if speedstatus == 1 then 
30            gui.text(5,7,""); -- Erases turbo message 
31        end 
32        FCEU.speedmode("normal"
33    end 
34 
35   FCEU.frameadvance() 
36end 
Thread:
[98416] High Speed for NES skip cutscenes script by dwangoac at 2008-10-16 02:33:20
Tip: Click the line numbers to toggle highliting on that line.

Paste followup:

Language:
Author:
Subject:


    Tabstop:     bigger biggest
Note: You can prefix a line with "@@@" to highlight it.