Friday, November 10, 2017

Perfect Analog Capture with the Datapath Vision RGB E1s

The search is finally over, for anyone looking for analog RGB capture direct from retro consoles (no upscaler required), this card is what you want.  

The DataPath Vision RGB E1s is a professional capture card, which normally retails for over $1000 US. Thankfully we found this on Ebay for less than 1/10th that price EBay DataPath Vision RGB E1s. (This link will probably not last forever.)  A major caveat to buying this specific one is that it comes with neither accessories (although they are easy to find/purchase, HDMI, VGA, and Component to DVI) nor a long bracket that fits a standard size computer case.  I had to steal a bracket from an old video card that (kinda) fits this.  Also your audio capture will have to be run separately, as this card does not support audio. 

Looking at the specs, this thing capable of 1080p 60fps capture, which alone was reason enough to buy it at this cheap price.  It is not shown on the website, but it the DataPath can actually support any resolution you throw at it, including 240p signals.  The biggest thing is that the DataPath is capable of full range RGB capture, that is, RGB 8:8:8, also known as RGB24, a full 3 bytes of data per pixel.  For reference the PEXHDCAP that I had previously been using is YUV 4:2:2, which not only is less data being converted, but colors are being shared between neighboring pixels.  I had spent a bunch of time with Avisynth scripts fixing what was a poor capture method for the PEXHDCAP.  These are now obsolete with the DataPath card. 

Another nice thing is that I can use the exact same setup that I used with my PEXHDCAP for the DataPath card, SCART->Sync Strike->VGA->VGAtoDVI converter.  I just had to run audio separately into my computer's Line-IN. 

Here are some screenshots (or check them out in the Imgur Album HERE because the built-in viewer doesn't do them justice).  I made these using Avisynth to only Crop and PointResize x4 up to this size for better viewing.  The card driver settings that I am using for SNES/NES can be found HERE and MPC-HC settings HERE.

A Link to the Past (SNES 1-chip):
The 240p Suite Color Bleed test (SNES 1-chip):
Sonic 2:
Mega Man 2 (NESRGB modded A/V Famicom):
Dragon Warrior 2 (NESRGB modded A/V Famicom):

Here is a screenshot comparison I made between the DataPath and EMU (Bizhawk). 

It is stunning how good this looks.  As you might have noticed, these screenshots look almost identical to an emulator, which, to be honest, is just crazy to me.  The only real issue I've noticed is a bit of noise in the signal, some of which was also present in my PEXHDCAP card and is simple enough to clean up in Avisynth. 

One other thing about this card is that it captures in the actual native resolution that is output by each console, so in the case of a SNES, 256x224 (for most games).  This means that the video is 8:7 instead of the 4:3 that we are used to seeing, just like an emulator.  This begs the question, should we capture in 8:7 or stretch the picture horizontally to 4:3?  In the case of a Genesis (Sonic 2), it captures the game at 320x224, which is wider than the normal 4:3, so I'd have to shrink the picture horizontally.  I am thinking for now I'll just stick with 4:3. 

Here is a basic Avisynth script I am using for this card.  This includes cropping, a bit of smoothing to help fix the noise, and upscaling.

UPDATE: I started creating a basic setup guide for the DataPath, you can find it HERE.

Thursday, February 16, 2017

Dragon Warrior 2 - Lua Scripting - Dodge Chances

One other thing that I've wondered in Dragon Warrior 2 is dodge chances: raw chance, with Surround up, and does the Clothes Hiding actually do anything? Here is the script I used to test (Dragon Warrior 2 Dodge Chance Lua).

First up is the chance of just a raw dodge:

Raw dodge chance

The chances are pretty low, and with some margin of error, seem to be in line with the general accepted 1/64 dodge chance. 

Here is an important one, the chance of being hit with the enemy Surrounded (in this case I used the Light Sword): 

A Surrounded Cyclops

Surround in this game gives an additional 25% chance to dodge an enemy attack. This is pretty low and they even adjusted this rate higher in later games to be more effective, to 50% or more.  It makes Surround a pretty useless spell, except for in a few select cases. 

Now for equipping Clothes Hiding:

Hero with Clothes Hiding equipped

This is the most surprising result.  Clothes Hiding seems to give an additional 12.5% (or 1/8) to dodge an enemy attack.  I was thinking this was much lower, and it might make getting a set of Clothes Hiding a good option at some point in the speedrun. 

And to be complete, I did one more test, combining Surround and Clothes Hiding: 

Cyclops Surrounded and Hero with Clothes Hiding

The effects of both seem to stack, giving close to the combined dodge chance of both Surround and Clothes Hiding. 

Wednesday, February 15, 2017

Dragon Warrior 4 - Lua Scripting - The Demon Hammer

I've been curious for awhile now, but couldn't find any documented information on the Demon Hammer in Dragon Warrior 4.  The only thing that I did know is that it gives +70 attack and it is a cursed item.  In Dragon Quest 5 DS the Demon Hammer, or Hela's Hammer, has a 50/50% chance to critical or miss, and is extremely useful in the speedrun.  So in looking for better methods to hunt Metal Babbles, I wanted to find out what it really does in DW4.

In Bizhawk, I ran this script (DW4 Demon Hammer Lua) to test it.  I ran the test with Ragnar equipped with the Demon Hammer against a single Rhinoband. The results:

Ragnar fighting for science.

So after 10000+ trials it turns out he critical chance for the Demon Hammer in this game is only 33%, which has been a common theme in testing things in Dragon Warrior 4. So far we have found that you have a 33% chance to hit a Metal (Slime/Babble/King) enemy and 33% chance to put any enemy to sleep with a hit from the Sword of Lethargy.

Whether this hit rate is useful or not remains to be seen though. Getting the Demon Hammer early for the Metal Babble grind is a bit risky, as it is located in the middle of the Colossus.  And at that point, it would make sense to try to get all the way to the Dire Palace for the return point, and be done with the Colossus before the grind. But getting through at around level 15 though is another matter.

However, the potential to save time with it is still there, equip it onto Ragnar for the Metal Babble grind and then remove the curse afterwards. A downside, however, is that Ragnar will be much less effective against the other random encounters you see in the Royal Crypt while grinding.  Getting the Metal Babble Sword for Ragnar still might be the better option here, even with the huge amount of time it takes to pick it up. More testing is needed, as always.

Saturday, February 11, 2017

Controller Input Display and Arduino UNO Firmware

A few years ago I built an Input Display for reading NES, SNES, etc... inputs from my console to put up on my stream.  At the time, the only way to do this was using NintendoSpy by cylon13.  I figured out what hardware I needed and built one myself, and I was pretty happy with the results.

After that, a lot of people had asked me about how to build it themselves, so I decided to put together a guide on how to do this. Controller Input Display How To v1.2  The guide itself might be a little out of date now, but I think it's still good for people to follow.

In the last year, I discovered another input display that uses the exact same hardware, called InputControl by Omnigamer.  I found that this software seemed to be much more accurate as far as reading inputs than NintendoSpy had been.  I looked into the firmware for this, and it was using SPI and interrupts to read the controller data instead of manually reading the bit input stream, as NintendoSpy had done.

So anyway, I was bored this morning so I decided to put together some better firmware for my controller input display.  I started with the base InputControl Firmware, pared it down to the basics (removed logging and some other unneeded things), and added some additional functions so that it could support NintendoSpy as well.  Here is the new Firmware.

The result is a firmware that works with NES and SNES controller inputs, and also works with both NintendoSpy and InputControl.  These are set by using #defines in the firmware file and programming the Arduino.  So far I've found that using the Auduino's SPI interface, this gives much better performance over the older NintendoSpy firmware.

Friday, January 20, 2017

Dragon Warrior 2 - Lua Scripting - Targeted Chances

I've been writing and running some Lua script tests lately, thanks to TheCowness as I took most of the work from him.  I've been using them to test specific chances of things happening in various Dragon Warrior games.  

Here is one that I ran on for Dragon Warrior 2 (script here).  This script loads a preset state over and over and records the chances that either Middenhall, Cannock, or Moonbrooke are targeted in battle. 

The results:

From what I already knew from speedrunning this game, I was fairly confident that it was an equal chance for each character to be targeted.  This just confirms my suspicions and helps my sanity for whenever I see Moonbrook targeted and killed during the grind segment.  I might double check this for a couple more enemies, but I'm pretty sure that this holds throughout the game.

Hello World

I created this blog as a test method to post information that I learn about my various speedruns.  Mainly I want to make what I learn publicly available and archived.  Time will tell if this is a viable method.

You can find me at my Twitch channel