Tuesday, February 14, 2017

Encoding SNES movies - Tutorial

This text is a quick and dirty tutorial to encode high quality videos from SNES emulators. Very suitable for unofficial tool-assisted speedruns movies. If you wanna know the completely right way, you must follow this guide. This tutorial presupposes that the user is using the Windows OS and that the game is the NTSC (american or japanese, but not european) version, with a constant native resolution of 256x224 pixels (or 512x448). Some obscure games might vary that.

Software
Emulator(s): BizHawk, lsnes or Snes9x-rr.

Lossless codec: install Camstudio, otherwise the dumped video will be have a huge size. This will place a dll file in your system that programs can use to encode and decode videos.

Scripting video editor: install Avisynth. Like in the previous installation, no executable is added to My Programs.

Encoding package: download and extract this archive. I (Amaraticando) used the original package from TASVideos, removed a bunch of stuff and tweaked it for SMW. If you don't trust the Mega link, download the original one.

Video Dumping

BizHawk
ResolutionSound
256x22444.1KHz stereo
Select Speed/Skip to 0 (never skip)
You can turn off the sound in Config -> Sound if you don't want to hear it while dumping. It won't affect the dump's audio.
Open the ROM.
Pause emulation. (Pause key)
Load the movie.
Select File -> AVI/WAV -> Record AVI.
Choose a file name (such as movie.avi), and choose a lossless RGB codec of your choice (Camstudio recommended). Click OK.
Unpause emulation. At this point, audio and video are now being captured.
When you reach the desired end point, select File -> AVI/WAV -> Stop AVI.

lsnes
ResolutionSound
256x224/512x44844.1 KHz stereo
Open the emulator, load the ROM.
Select load movie/savestate tab, select the movie, check start paused and hit ok.
Set avi-soundrate to 5 (settings, advanced tab, or 'set-setting avi-soundrate 5')
Select AVI capture (Camstudio / PCM) from capture menu.
Set speed to turbo (or other desired speed).
If you want to, you can mute audio by unchecking Config->Sounds enabled. This won't affect dumped audio.
Unpause the emulator
When reaching the end, select end avi dump.
Snes9x-rr
ResolutionSound
256x224 (NTSC)48KHz stereo[1]
Note: This applies to v1.43 v17 and most revisions of v1.51. Earlier versions of v1.43 have a different menu layout.
Select Config -> Speed -> Frame skip -> skip 0.
Select Config -> Sound -> Playback rate -> 48KHz.
Select Config -> Video -> Display Configuration... and make sure that "Bi-Linear Mode 7" is checked.
Load the ROM.
Set speed to about 400% (= key or Config -> Speed -> Set Speed).
Pause emulation (Pause key).
Load the movie file, with Sync Sound checked (it increases sound resolution).
Select File -> Audio/Video Recording -> Start AVI Recording. Choose a file name (such as movie.avi), and choose a lossless RGB codec of your choice (Camstudio recommended). Click OK.
Unpause emulation. You are now capturing audio/video.
When you reach the desired end point, select File -> Audio/Video Recording -> Stop AVI Recording.


Video Encoding
Navigate to the encoding package folder. There's a readme inside. You must place the raw AVI that you just dumped inside the folder (like in the picture below). If there's any SOX audio, put it too (optional). The names must be exactly movie.avi and audio.sox .

Next, double click on global.bat. This will open a prompt and execute the batch.
If the prompt doesn't appear, hold Shift and right click on the folder. The context that appears will have a Open command window here. Inside the prompt, type global.bat and enter.

The prompt will give you some options and maybe some error if something went wrong.
You will have to type the size of the encode and the crf quality (the lower the better, but takes more time and disk space). After everything is done, the encode will be on folder output. For safety, remove the mkv file from this folder when you finish.

Monday, November 14, 2016

SNES Super Mario World - List of Pit Hacks and Records

In this post I shall list the main pit hacks and their best times.
The best times that matter the most are the ones in their chronological order, but I might put a few records that weren't the best at its time in small font.
The difficulty level is my opinion on how hard it's to complete the hack with tools, without considering the best strats and optimization.
This list is probably incomplete, you can suggest edits in the comments. A pit hack must be harder than Molotov's Pit Hacks series.

Colon Three
Download   Difficulty: ★★★★
100%
to be done

The level%
16:45 by TheLilGecko
19:25 by gusapno
Demo by HoorayForJay and shadowdragon121TASer

Glitch Abuse
Download   Difficulty: ★★
2:38.92 by Amaraticando
9:47.50 by shadowdragon121TASer
9:50.12 by HoorayForJay
10:24.72 by TheFinalBoss726
12:26      by Bullethead2202 [deleted channel]

Glitch Abuse 2
Download   Difficulty: ★★
PS: must display the castle destruction to count as finished. The Pokey stun glitch is not valid.
10:24.20 by  shadowdragon121TASer
11:47.62 by Amaraticando (smv)
13:30 by HoorayForJay and shadowdragon121TASer
WIP  sub 2 mins by BrunoVisnadi

Glitch Abuse 3
Download  (notice that there's a beta version)   Difficulty: ★★★
6:43.96 by shadowdragon121TASer

Item Abuse
Download   Difficulty: ★
PS: timing ends when the credits scene appears.
5:44.28 by Amaraticando [original glitched video with description]
7:06.10 by Regnum0nline (smv)
7:12      by PangaeaPanga [YouTube strike]
7:15      by TheFinalBoss726 and Regnum0nline (smv)
7:35      by PangaeaPanga [YouTube strike]
7:41      by TheFinalBoss726
8:05      by xKingBulletBillx
8:14      by ISM
8:46      by xKingBulletBillx10:34    by dainegai
WIP sub 3:30 mins by Amaraticando

Item Abuse 2
Download (alt)   Difficulty: ★★
6:57:?? by Gbreeze
7:02.10 by Regnum0nline and PangaeaPanga
7:37.83 by Lucas S.
8:02.90 by Kaizoman666
8:08 by sotel11
9:02.93 by TheFinalBoss726
WIP by Regnum0nline

Item Abuse 3
Download   Difficulty: ★★★★
7:05.47 by shadowdragon121TASer
7:57 by PangaeaPanga (smv) [demo, original video received a copyright strike]

La MansiĆ³n
Download   Difficulty: ★★
1:45.97 by shadowdragon121TASer
Demo by rappervsmario

Living on the Edge
Download   Difficulty: ★★★
2:19.87 by Amaraticando
2:32.92 by shadowdragon121TASer
2:37.55 by HoorayForJay
2:47      by TheFinalBoss726 [demo]

Pit of Death
Download (alt)   Difficulty: ★
PS: Snes9x 1.43  is not preferred due to it inaccurate timing
2:00.07 by HoorayForJay [probably wrong time, todo: fix later]
2:01.?? by TheFinalBoss726
2:02.?? by MRO314 [Snes9x 1.51?]
2:02.?? by Sung-Hyeon Kim
2:03.?? by xKingBulletBillx
2:03.?? by dainegai
2:04.?? by Kainiet
Demo by MoltovMarioWorld
AFAIK, there's a deleted TAS by Panga.
WIP  exactly 2 mins by BrunoVisnadi

Pit of Despair
Download   Difficulty: ★
1:16.07 by Lucas S.
1:16.93 by HoorayForJay
1:44.?? by Olivebates
1:59.?? by dainegai
2:10.9? by MoltovMarioWorld

Pit of Insaneness
Download   Difficulty: ★★★
6:25.33 by Lucas S.
7:03.10 by Lucas S.
7:56.28 by MRO314 (smv)
?:??.?? by NBKevin98 [deleted]

Pit of Keys
Download (v1.1)  Difficulty: ★
2:20.60 by shadowdragon121TASer
2:26.87 by Sung-Hyeon Kim
2:38.43 by sotel11
3:05.?? by TheFinalBoss726

Pit of Trials
Download   Difficulty: ★★
6:51.53 by shadowdragon121TASer
8:02.08 by HoorayForJay

Pitiless
Download/Thread   Difficulty: ???
to be done

Shell Abuse
Download   Difficulty: ★
1:09.27 by shadowdragon121TASer
1:12.37 by shadowdragon121TASer
1:13.55 by DarkGui21
1:14:25 by Sung-Hyeon Kim
1:14:?? by Shameimaru Aya
Demo by shadowdragon121TASer

So I Herd You Liek Corner Clip
Download   Difficulty: ★★
1:30.23 by ylTAP (smv)
1:36.45 by shadowdragon121TASer
Demo by TheFinalBoss726

The Pit Level 2
Download   Difficulty: ★★
9:37.42 by IgorSantos777

Wall-Jump Abuse
Download   Difficulty: ★★★
6:31.37 by shadowdragon121TASer
6:57.65 by shadowdragon121TASer
7:11.75 by HoorayForJay
9:39.67 by Lucas S.

World of Dickish Moves
Download/thread   Difficulty: ★★★★
16:42 by TheFinalBoss726 [demo]

Yoshi Puzzle Pit
Download   Difficulty: ★★
4:08.03 by shadowdragon121TASer
5:12.02 by shadowdragon121TASer
8:51.10 by rappervsmario (smv)

Sunday, November 13, 2016

SNES Super Mario World - How to duplicate blocks to the sides

The Game Resources > SMW wiki has an explanation on how to duplicate blocks from some distance, but it's not satisfactory. Let me provide a better one.

First off, you must throw the projectile upward with null horizontal speed. Remember that Mario doesn't need to have zero speed for this and it's useful to try pressing left+up or right+up.

Every sprite has 4 points of interaction, like draw in the pictures. You must observe the head and the lateral point that touches the block. Drawing the block boundary is also useful.

The solid blocks only push sprites outside every other frame. That means that in odd frames they will push to the right (or left) and in even frames they will push to the opposite side. By the time the projectile gets inside the block, the direction must push the projectile outside and remove the head from its boundary. The lateral push is always 4 pixels wide.

Let's see each step of a duplication away:

click to increase the pictures

The sprite starts with vertical speed -112 and it increases +3 each frame.
Observe that the head is just below the boundary, but not touching it. In this case, the vertical position is 334.0 and the speed is -97. Using the SMW arithmetic, we can calculate the next would-be position:
334.0 - 97 = 334.0 - (6*16 + 1) = 334.0 - 6.0 - 0.1 = 328.0 - 0.1 = 327.F

The projectile goes outside and the duplication occurs:


Let's see what happens in the middle of the frame.
The sprite goes up and the lateral points touch the boundary:
As the right lateral point is inside and the block is pushin to the left, then the sprite goes to the left 4 pixels. If the green area below were to the right, the block wouldn't change its horizontal position. If the head were much to the right, the shift to the left wouldn't be enough to escape the boundary. In this case, the duplication doesn't occur, but the block isn't activated!
Duplication to the right is very similar and the presence of another block in the vicinity doesn't matter.

Remarks:
1) The setup consists in positioning the projectile in a good horizontal position, good vertical position and good vertical subpixel. The closer to the block, the wider is the number of possible initial positions. You should be able to predict the oscillation of the block too and always check if the sprite is not moving to the left/right.

2) the majority of handheld sprites have the same offsets and dimensions. However, it might be the case that the vertical distance between head and laterals is not 7 pixels. In this case, the minimal speed required is not -97.

3) the emulator used was lsnes. The Lua script used to display the helpful info is my smw-tas.

Tuesday, July 26, 2016

SNES Super Mario World - Clearing Levels Without Pressing A or B

The title of this post is exactly the name of an interesting playlist on YouTube.

The idea is: the player must complete the maximum amount of the 96 exits in the game without pressing A or B. Making a Tool-Assisted Speedrun is allowed and pretty much required in most levels (unless you're some god). Of course it's impossible to clear all of them, but the correct number of exits is still unknown.

Rules:
1) The buttons A and B are prohibited. You cannot press any of them, not even for a frame. You cannot either start the level with those buttons pressed.
2) You cannot start the level in a glitched state. For instance, you cannot start the level with an orb in the item reserve. However, you can start with Yoshi, with a cape and with a normal item in the inventory, even if you need to press A/B in previous levels.

Not discussed yet: the use of arbitrary code execution without pressing A or B on any joypad.

Table in progress: to add the difficulty and date.

TOTAL: 46 out of 96 exits, as of 2016/09/28.


-




-


-


-




2016/09/20
secret exit

2016/09/20


 secret exit




-


secret exit
-


-






 secret exit




-


secret exit
-


-





secret exit




 secret exit
-




-


-


-


-


-


secret exit
-







-


-


-




secret exit
-






-





secret exit




secret exit






secret exit


-


secret exit
-




secret exit




-







-




secret exit




-


secret exit
-


-


-




-



-




-


secret exit
-


-


-


secret exit
-






secret exit
-


-


does not count as an exit



-


secret exit
-




secret exit


Everyone and SomeGuy712x

November 1990
secret exit


-


secret exit
-


-


secret exit
-



-


-


-


-




-