Hardware Hacking Creating a capture card PCB from scratch: open questions

ArmorKnightPlus

Member
OP
Newcomer
Joined
Jun 30, 2022
Messages
6
Trophies
0
Age
32
Location
Washington
XP
40
Country
United States
Was looking into grabbing a capture card for my New 3DS XL, and I started wondering why there weren't more instructions on how to build capture cards. People create custom PCBs for all sorts of things! So I was was a bit surprised that Loopy and Optimize are the only players in town.

So I thought... why not try and build my own from scratch, as a learning experience?

NOTE: I had links in the text below to various references, but I'm too new to post links. I'll try to describe them as best I can.

Looking at the instructions for installing the Optimize New 3DS board (optimize.ath.cx/NEW3DS/install.htm), there are a number of test points to solder the ribbon cable to. Comparing that with 3DBrew's lower screen dump (search for "3DBrew video capture"), it looks like we've got 24bit color with an HSYNC, VSYNC, and CLOCK, and a few other points that I don't know about. Guess I'd need to use an oscilloscope to measure what's going on at those unknown points.

Open questions:
  • There's only one set of 24 bits for color, so I'm guessing one of the unknown points uses a signal to differentiate between top/bottom screen? How else would that even work?

  • Even if I can measure the unknown test points, how do I determine what they're actually used for? Guess I'd just need to experiment and figure it out?

  • Since I'm still new to PCBs, I'm not sure what component/chip you'd need to convert the parallel data to a serial stream that can go out over USB. But it looks like something similar to a PISO shift register would do the trick? You can see a reference image to Loopy's current New 3DS XL board on the 3dscapture forums, though they aren't finished yet.

    Dunno if there's any info to glean there on what chip would work to do the conversion.

Once you get the serial data flowing through the USB, you just need to write a driver/software on the Windows side to interpret the data, which should be straightforward (maybe you could use the HID api).

Anyone have any experience poking around this area?

Thanks,
-AKP
 

FAST6191

Techromancer
Editorial Team
Joined
Nov 21, 2005
Messages
35,291
Trophies
2
Website
trastindustries.com
XP
24,953
Country
United Kingdom
https://web.archive.org/web/20071017021146/http://home.comcast.net/~olimar/DS/jumbotron/ (Loopy's version of this for the DS, albeit never commercialised) might also be of interest.

Not sure where to start. You are asking some sensible questions and have an approach that might yield interesting results but also seem to be jumping in at the deep end without a terribly considered approach.

Serial to parallel. Most usually start off with some kind of highly programmable chip (see also the thing above) and then work down from there if they can find a chip capable of doing the deed (varies, and you might get lucky and find it is a common protocol -- Nintendo are not going to design their own custom setup), though modern FPGAs and related chips are actually of a power level, size* and such that they might stop there and deem it acceptable after slimming down the code or adapting it for those devices. It might also depend on what latency you are willing to put up with for this -- capture for storage/streaming can be seconds out and most won't care.

*most old school FPGAs needed a whole bunch of ancillary chips to make it all work, mainly as you had to essentially program it each power on externally, today that is reduced drastically along with power consumption, price and various limitations.

Determining unknown test points. Look for leaked documentation. Look what chips they connect to, find diagrams for those chips and see what it might be. Eliminate based on other things that are known. Stick your scope/data reader on the thing and see what the results are.
Further to that sounds like you might be new to video transfer as a concept. Might be worth a crash course in that.
Is a bit old school as it is mainly going for VGA rather than some of the more modern approaches used in screens but gives a very nice intro to things you might encounter. Go the other way as well and go on farnell, cpc, element14, rapid, aliexpress... and see what screens they offer* and what protocols they use. Another way still is many like to make projectors, or adapt old laptop screens for their purposes. They can have some interesting info.

*as a general note there are two main types of LCD panel manufacturer. Those that do big screens (laptop and larger), and those that do small screens (phones, most tablets, custom for whatever and everything else).

If you are not familiar with video and the various colour spaces and options available for those playing in those worlds -- you don't necessarily have to do some kind of schoolboy answer for what is yv12 and such ( http://avisynth.nl/index.php/Convert ) but luma, chroma and such should be known. I would not knock you being able to also throw down on RF, SCART, component and composite signals even if it is probably not going to be relevant to this (although if asking what there unknown pins/test points/signals do then knowing what also might be a functionality available -- https://lostnintendohistory.github.io/DS-TV-OUT )

As far as top/bottom screen then does it need to be? 2ds is one large screen and frankly a custom virtual resolution sounds a whole lot easier to handle than tying to sync and redirect pulses. I don't know that it is that. Of course you can go the other way and see what happens when you pull things high, pull things low, invert signals, change things in software (software screen swaps exist for the DS, never mind its GBA stuff, not sure what goes for the 3ds, and there might even be games/homebrew that have such a feature).

HID once in windows (or more likely as it leaves the FPGA/board)... a lot of things do like to appear as webcams. You might want to get more exotic though as USB2.0 tops out around 30 megs a second in the ideal case (see also what your external hard drive might transfer at) and that is bugger all when it comes to raw video, never mind if it is using high bit count RGB. USB3.0 and maybe something with USB C could yield something nice, and I would rather do that than have to try to implement video compression in a FPGA. https://www.cmlab.csie.ntu.edu.tw/cml/dsp/training/coding/mpeg1/ ... and that is only the now impossibly ancient MPEG1.

I will leave it there for now.
 
  • Like
Reactions: ack

ghjfdtg

Well-Known Member
Member
Joined
Jul 13, 2014
Messages
983
Trophies
0
XP
2,293
Country
It's both serial and parallel. Topscreen is serial to reduce data lines (smaller ribbon cable) and bottom is parallel. You won't be able to capture the lines fast enough with some random microcontroller. You need something beefy like an FPGA. And you need USB 2.0 minimum to capture 2 frames + audio fast enough. Audio is 32 + 47 kHz over 2 I2S interfaces. Most capture cards only bother capturing the 32 kHz one.

Side note: The 3DS does NOT use VGA compatible signals.
 

ArmorKnightPlus

Member
OP
Newcomer
Joined
Jun 30, 2022
Messages
6
Trophies
0
Age
32
Location
Washington
XP
40
Country
United States

ghjfdtg

It's both serial and parallel. Topscreen is serial to reduce data lines (smaller ribbon cable) and bottom is parallel...
Audio is 32 + 47 kHz over 2 I2S interfaces. Most capture cards only bother capturing the 32 kHz one.

I'm assuming both audio outputs are the same, since cards only grab the 32khz audio?
I happened to find a list of test points for the DS over at nesdev, is this what you're referring to with the upper screen video?

TP159 Upper Screen Video Data bit? (200mV) (P6.pin12) TP160 Upper Screen Video Data bit? (200mV) (P6.pin11) TP161 Upper Screen Video Data bit? (200mV) (P6.pin14) TP162 Upper Screen Video Data bit? (200mV) (P6.pin15) TP163 Upper Screen Video Clock (15ns, 100mV) (P6.pin8) TP164 Upper Screen Video Clock' (15ns, 100mV) (P6.pin9)

And I'm assuming this is the audio you're referring to:
CL33 TP149 I2S Word Clock (near AIC, up/left) CL34 TP147 I2S Sound Data Out (near nds-slot) CL35 TP150 I2S Bit Clock (near nds-slot) CL36 TP152 Sys 16.7MHz (also CL55)(near nds-slot) I2S should have 5 pins: SDOUT,SDIN, WCLK,BCLK,MCLK

duwen

I saw this just a few days ago... looks like a complicated, but impressive, solution...

I'm aware of the optimize boards, and have looked at the instructions for putting those together. The point is that I'd like to make my own board, not use someone else's.
 

ghjfdtg

Well-Known Member
Member
Joined
Jul 13, 2014
Messages
983
Trophies
0
XP
2,293
Country
I'm assuming both audio outputs are the same, since cards only grab the 32khz audio?
I happened to find a list of test points for the DS over at nesdev, is this what you're referring to with the upper screen video?
They are not the same. The 32 kHz I2S interface is for most audio. 47 kHz is apparently for microphone and another sound engine called CSND only really used by the browser.
I would not compare with the DS. It's not the same. But the idea is basically one bit of each color channel every clock cycle. The clock must be 8 times as fast to transfer the color bits fast enough.
 

ArmorKnightPlus

Member
OP
Newcomer
Joined
Jun 30, 2022
Messages
6
Trophies
0
Age
32
Location
Washington
XP
40
Country
United States
I would not compare with the DS. It's not the same. But the idea is basically one bit of each color channel every clock cycle. The clock must be 8 times as fast to transfer the color bits fast enough.

My apologies, that list of test points wasn't for the DS. It's for the old 3DS mainboard, and includes whatever new test points the New 3DS has, as well.

I've also posted a thread to an electronics forum, with basically everyone telling me that I should start smaller :( though it seems like they have some solid advice.
 

ArmorKnightPlus

Member
OP
Newcomer
Joined
Jun 30, 2022
Messages
6
Trophies
0
Age
32
Location
Washington
XP
40
Country
United States
An update!

I talked to some nice folks over at eevblog (an electronics forum). I may end up trying for a bit less ambitious project first, but I think I have most of the general info needed to start.

Long story short, I might be able to use the Cypress CYUSB3017 chip to take in the video data from the 3DS board, and shove it out over USB. If for whatever reason the chip itself doesn't handle the 3DS's video format, I would use an FPGA to take that data, process it, then feed it to the Cypress chip.

I'd post links to some of this stuff, but I'm still getting blocked by this forum's anti-spam NO LINK protection.
 
  • Like
Reactions: cearp

ack

Well-Known Member
Member
Joined
Jan 30, 2020
Messages
107
Trophies
0
XP
245
Country
United States
make sure to get a for parts 3ds, with a broken screen or something to save money, to develop it on, if you're gonna try this on your main console you're gonna have a bad time. Then, I would connect and lay out all the parts on some foam or something, so you can easily access the motherboard but still be able to boot it and such without having to reassemble it.
 

ArmorKnightPlus

Member
OP
Newcomer
Joined
Jun 30, 2022
Messages
6
Trophies
0
Age
32
Location
Washington
XP
40
Country
United States

That's the one! I love researching DIY projects like this, but one of the most difficult parts is not knowing what you're searching for! If you don't know the concepts or terminology, you have to reach around blindly until you happen upon what you're looking for. I'm glad I've been given great advice on where to start, both here and on eevblog.

make sure to get a for parts 3ds, with a broken screen or something to save money, to develop it on, if you're gonna try this on your main console you're gonna have a bad time. Then, I would connect and lay out all the parts on some foam or something, so you can easily access the motherboard but still be able to boot it and such without having to reassemble it.

Yeah not a bad idea. Been looking at some "for parts" consoles, might be able to snag one or two for cheap.
 

spitzeqc

Member
Newcomer
Joined
Apr 18, 2022
Messages
10
Trophies
0
Location
Earth
XP
41
Country
United States
I remember seeing some signal information for a 3ds capture card on granthaack.com a while back. Unfortunately it seems like the site has been taken down, but there is a saved version here here . Im not sure how helpful it will be without images, but it has a decent text write up of his process along with some values that may be helpful (signal speeds, total memory needed, etc.)
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Skelletonike @ Skelletonike:
    You can get some pretty good combo washing and drying machines for like 350€ nowadays.
    Gift
  • Veho @ Veho:
    They are never as good and thorough as getting them separate but they beat the clothesline so yeah.
    Gift
  • Skelletonike @ Skelletonike:
    got an LG one last month and it was pretty good, was on sale so got it for 400€ (normal price was usually 650). Can't complain
    bout it so far.
    Gift
  • Dark_Phoras @ Dark_Phoras:
    I prefer the clothesline in summer
    Gift
  • Dark_Phoras @ Dark_Phoras:
    Good morning
    Gift
  • Veho @ Veho:
    Good morning.
    Gift
  • Dark_Phoras @ Dark_Phoras:
    Has Childish Gambino become more mature?
    Gift
  • Veho @ Veho:
    No.
    Gift
  • Veho @ Veho:
    He will never become mature, he will go straight to Senile Gambino.
    Gift
  • Dark_Phoras @ Dark_Phoras:
    It sounds good, we might get good music from Senile Gambino that we wouldn't from Straight Gambino
    Gift
  • Veho @ Veho:
    Bought a used Nerf Mega blaster yesterday, good condition, but only got one single foam dart for it. And it was so chewed up, when I tried to fire it today it ripped the tip clean off and spat the thing out in two pieces.
    Gift
  • Veho @ Veho:
    Radical.
    Gift
  • Veho @ Veho:
    I need some mega darts now.
    Gift
  • Dark_Phoras @ Dark_Phoras:
    Don't forget cqc is still valid in gun combat
    Gift
  • FAST6191 @ FAST6191:
    Trying to get americans to use a clothes line there Veho?
    Gift
  • FAST6191 @ FAST6191:
    Always seems to be a bizarre and quaint concept whenever I speak to them
    Gift
  • FAST6191 @ FAST6191:
    or they come visit
    Gift
  • FAST6191 @ FAST6191:
    and this is not the northern snow in May types either. Desert living types as well.
    Gift
  • Dark_Phoras @ Dark_Phoras:
    I've seen so many american movies with clotheslines
    Gift
  • FAST6191 @ FAST6191:
    any set past about 1986?
    Gift
  • Dark_Phoras @ Dark_Phoras:
    That I don't know
    Gift
  • Dark_Phoras @ Dark_Phoras:
    Here it's common to see drying racks in balconies, even of two modern newly built buildings nearby
    Gift
  • Dark_Phoras @ Dark_Phoras:
    I have a drying machine at home and we seldom use it, even in winter
    Gift
  • Dark_Phoras @ Dark_Phoras:
    So, maybe it's a different habit from the usual american's, as you say
    Gift
  • Dark_Phoras @ Dark_Phoras:
    The cold weather is slowly creeping back, how nice
    Gift
    Dark_Phoras @ Dark_Phoras: The cold weather is slowly creeping back, how nice