PDA

View Full Version : The DS' great hidden secret: Pressure Sensitivity!


markster3000
01-08-2008, 10:16 PM
It looks like the DS has more up its sleeve than anyone previously thought, as a little known homebrew project is showing off pressure sensitivity.

It's a painting program by the name of Colors! (http://www.collectingsmiles.com/colors/)

Colors! is a simplistic digital painting application for Nintendo DS based on modern painting-techniques developed for drawing tablets in programs like Photoshop. By taking advantage of the pressure sensitivity of the DS touch-screen it becomes a perfect portable digital sketch-book.

http://i203.photobucket.com/albums/aa55/goodavatar/image004.jpg (http://www.collectingsmiles.com/colors/)

I didn't believe that the screen had pressure sensitivity until I tried it myself. It's amazingly precise! I wish games would take advantage of this feature more.

Kamalot
01-09-2008, 05:15 AM
This is an amazing homebrew app!

Here are some of my favorite pics in the gallery (http://colors.brombra.net/).

http://i203.photobucket.com/albums/aa55/goodavatar/2335.jpg
http://i203.photobucket.com/albums/aa55/goodavatar/572.jpg
http://i203.photobucket.com/albums/aa55/goodavatar/2437.jpg
http://i203.photobucket.com/albums/aa55/goodavatar/1065.jpg

Worldcrafter
01-09-2008, 05:22 AM
This is one of the many reasons why my R4 is in the mail. DSQuake, here I come!

Spigot
01-09-2008, 05:27 AM
gorgeous stuff

Kamalot
01-09-2008, 05:29 AM
I don't know if you realize it, but the site allows you to download the construction drawing files. I believe this essentially allows you to 'replay' the drawing.

Here's an example of a drawing, and the page that allows you to download the 'replays'. (http://colors.brombra.net/details/1281-aura_by_tsenzen.php)

Gorvi
01-09-2008, 05:32 AM
markster3000, you may want to remove your sig.

And Kam, your picture imbeds are borked in that post up there.

Kamalot
01-09-2008, 05:42 AM
Oh sweet! The pages with the art have playable replays on them. Scroll down to the bottom of this page (http://colors.brombra.net/details/1281-aura_by_tsenzen.php)and press the Begin Playback button to see it in action!

NoName
01-09-2008, 05:51 AM
That's really cool, its amazing what random people on the internet can do. This seems higher quality than some things that get released for the DS at retail...

KidCactus
01-09-2008, 05:52 AM
I wish I could draw like that, then I'd be all over this.

Generation ABXY
01-09-2008, 06:35 AM
This is one of the coolest things I have seen for the DS - I've never before been tempted to mod a system, but now...

Does anyone know what I need to do to use this?

Kamalot
01-09-2008, 06:37 AM
This is one of the coolest things I have seen for the DS - I've never before been tempted to mod a system, but now...

Does anyone know what I need to do to use this?

All you need is a Nintendo DS cart that accepts memory cards, like this one (http://www.volumerate.com/details.vr/sku.1202~r.DX).

Librum
01-09-2008, 07:31 AM
Holy cow, that's amazing. And here I thought I had to lug my tablet PC around to sketch on Painter for that.

That'll give me a purpose for the Supercard I bought some time ago, since I apparently should have bought an R4. :)

Bone
01-09-2008, 07:32 AM
I would modify the headline of this article, as it's inaccurate. There is no pressure sensitivity on the DS. They merely simulate it with airbrush effects and transparency, the same way Photoshop works.

The effect of course is similar to pressure sensitivity but I assure you it's based on position and duration of a stroke, not pressure. I've been using Colors! for months and it's an awesome little program.

EDIT: Here are a couple of examples of my work in Colors! (one is NSFW, but should be OK because it's art, not porn).

http://i232.photobucket.com/albums/ee153/_B_o_n_e_/Colors/colors_slot5.png

http://i232.photobucket.com/albums/ee153/_B_o_n_e_/Colors/colors_slot8.png

agentgray
01-09-2008, 07:48 AM
Yes, this is my 2nd favorite app on the DS right now.

Nintendo would make billions more if this was official. Irony: I've just begun to learn how to watercolor...

score
01-09-2008, 08:47 AM
Colors is awesome.

My young daughter loves doing drawings on it and then playing them back.

BGSS
01-09-2008, 09:44 AM
Pressure works fine here, but I think pressure is a horrible idea for games. People that are quickly trying to reach the "max pressure point" will press way to hard on the DS screen, repeated hard presses could damage or scratch the screen. I don't want to be encouraged to hurt my screen.

Bone
01-09-2008, 10:00 AM
Yea, again... there is no pressure sensitivity. It's an illusion. Press as hard or soft as you like, it all comes down to how much surface of the stylus is touching the screen, and how long you hold it there.

Stormeh
01-09-2008, 10:06 AM
So, I've seen a lot of threads on DS homebrew and backups on this site lately, but it seems like everyone skirts around some pretty major questions I have about the R4 or similar technologies. Is there a rule about discussing this stuff on the forums? I want to pick one up, but before I do I have a few questions for someone that owns one. Can I post them here or could someone PM me? Thanks,

Spigot
01-09-2008, 10:09 AM
Well, we're talking about the legitimate uses of homebrew devices and such. And yes, we realize that people will use them to download illegal copies of roms they don't own but while that is discussed, it's not condoned.

And we won't be posting links to ROMZRUS.COM or anything.

What's your question?

Stormeh
01-09-2008, 10:20 AM
Ok, so, my questions:

* If I get an R4, what's the best place to buy one? I've seen links around but they're usually dead links that don't land on a product page.
* One of my main purposes for wanting to buy one is loading all my DS games onto one card for convenience. Is this possible? Could I copy my own games onto the cart or would I have to download roms?
* If I do play my backed up games off the cart, could I still play them online?
* What good homebrew apps are there? The idea of Quake on DS sounds fantastic. I've also heard of SCUMM emulators, which I'd love as well. What other "killer apps" are there in the homebrew community?

Thanks for your responses in advance! =)

Kamalot
01-09-2008, 10:22 AM
Well, we're talking about the legitimate uses of homebrew devices and such. And yes, we realize that people will use them to download illegal copies of roms they don't own but while that is discussed, it's not condoned.

You got it. The homebrew scene on the DS is downright amazing. Remember how so many people flipped out over Skype? The DS has had a VOIP SIP client (http://en.wikipedia.org/wiki/Session_Initiation_Protocol) for a long time. For those who don't know, SIP is characterized by having roots in the IP community rather than the telecom industry. You can set up your own SIP server for VOIP calls.

Here's a list of other notable homebrew DS apps (http://en.wikipedia.org/wiki/Nintendo_DS_homebrew#Applications)and should be a great place to get started. It includes Internet applications, applications, utilities and more.

Nura
01-09-2008, 10:29 AM
http://colors.brombra.net/details/2499-Evil_Avatar_by_nura.php

I just had to try it! i'm sure some of you guys can do it better, so let's see it! :D

Kamalot
01-09-2008, 10:32 AM
http://colors.brombra.net/details/2499-Evil_Avatar_by_nura.php

I just had to try it! i'm sure some of you guys can do it better, so let's see it! :D

That is great!

Good show!

NoName
01-09-2008, 10:45 AM
See my replies in red.
Ok, so, my questions:

* If I get an R4, what's the best place to buy one? I've seen links around but they're usually dead links that don't land on a product page.
The site Mod Chip Store (http://www.modchipstore.com/) is where I go for things like this. They're competitively priced and reliable.
* One of my main purposes for wanting to buy one is loading all my DS games onto one card for convenience. Is this possible? Could I copy my own games onto the cart or would I have to download roms?
You would have to download the roms. Each NDS release has a number attached, you'll need this to find the rom (unless it's a big name release that's not in a pack)
* If I do play my backed up games off the cart, could I still play them online?
Yes
* What good homebrew apps are there? The idea of Quake on DS sounds fantastic. I've also heard of SCUMM emulators, which I'd love as well. What other "killer apps" are there in the homebrew community?
See Kamalot's reply. Also search the boards, we have at least two threads answering that question
Thanks for your responses in advance! =)

Typical_Michael
01-09-2008, 10:52 AM
You can put linux on a ds? And go on the innarnets? I feel like I am ridiculously behind in the times.

Slowpc
01-09-2008, 11:40 AM
We (evav) be on the kotaku :)

NoName
01-09-2008, 12:02 PM
We (evav) be on the kotaku :)

Wow, they did give us credit for the story. This doesn't fit very well with my current image of Kotaku, I'm a bit confused... :eek:

Bone
01-09-2008, 12:09 PM
Great, so they published our misinformation as well?

Come on people, there is no pressure sensitivity going on here. If we want to make up stuff, I declare that Colors! works by harnessing the magic of tiny elves. Publish that!

shunoshi
01-09-2008, 12:11 PM
Wow, this looks like a great app. I need to load this sucka up tonight. I suck at drawing, but it'll still be fun.

Kamalot
01-09-2008, 12:12 PM
Great, so they published our misinformation as well?

Come on people, there is no pressure sensitivity going on here. If we want to make up stuff, I declare that Colors! works by harnessing the magic of tiny elves. Publish that!

Without having tried it myself, I read "pressure sensitivity' as features of Colors in both the Wiki (http://en.wikipedia.org/wiki/Nintendo_DS_homebrew) and the official technical discussion thread (http://forum.gbadev.org/viewtopic.php?p=140721).

Current features
-------------------
Hard and soft circular brush
Pressure-sensitivity can affect opacity and brush-size
512x384 image resolution with 2 stage zoom
Replay the whole painting process of an image
Hue-circle and luminance and saturation-triangle style palette
Load and Save to memory card
Send painting as e-mail using Wi-Fi

Is it possible you are mistaken?

Bone
01-09-2008, 12:23 PM
No, it's not possible ;)

The developers of Colors! have written it that way on purpose- because the EFFECT that the program has is much like pressure sensitivity. There's no need confusing end-users, but then again, instead they are misleading them.

The DS screen is simply a touchscreen. Writing a program to simulate pressure sensitivity would involve using things like timing (how long the stylus is pressed on a point) and size (the diameter of the tool being used) to simulate it.

If you lightly draw, you are using the very tip of your stylus, for a tiny dot. The harder you press, the more surface of the stylus touches the screen, for a wider dot.

Trust me. ThaGirl works on DS titles, for one thing. This really would have to be a well-kept secret, to not be in the actual hardware design docs that she possesses.

Backseat Killer
01-09-2008, 01:06 PM
Sorry to disappoint, but Bone is right. The DS has never and will never support analog touch sensitive controls.

That is all.

dub3000
01-09-2008, 01:08 PM
Fwiw, there's a tech demo floating around demonstrating detection of multiple touch points at the same time. But apparently it's unreliable?

Rirath
01-09-2008, 01:10 PM
Yea, again... there is no pressure sensitivity. It's an illusion. Press as hard or soft as you like, it all comes down to how much surface of the stylus is touching the screen, and how long you hold it there.

If it's an illusion, it's a damn good one... the end result is nearly the same.
So it's how much stylus touches rather than how hard you press... same thing.

Brushes still change size depending on how hard you're pressing, opacity still changes. It might not be registering "pressure" on the screen, but it's still working as intended. It's still not a binary 1 or 0. Draw lightly, you get a small, light brush. Draw hard, you get a large, dark brush. That's pressure sensitivity to me.

Kamalot
01-09-2008, 01:17 PM
If it's an illusion, it's a damn good one... the end result is nearly the same.
So it's how much stylus touches rather than how hard you press... same thing.

Brushes still change size depending on how hard you're pressing, opacity still changes. It might not be registering "pressure" on the screen, but it's still working as intended. It's still not a binary 1 or 0. Draw lightly, you get a small, light brush. Draw hard, you get a large, dark brush. That's pressure sensitivity to me.

Precisely. If the program reacts in a predictable manner to the varying amounts of pressure applied to the stylus, and the program has been designed to utilize that input as a feature, then that sounds like Pressure Sensitivity to me! I don't care HOW it is done.

Backseat Killer
01-09-2008, 01:19 PM
There are all kinds of timing tricks, collision tricks, etc that can be done to FAKE pressure sensitivity, but I promise, there is NO actual real pressure sensitivity.

Backseat Killer
01-09-2008, 01:20 PM
Fwiw, there's a tech demo floating around demonstrating detection of multiple touch points at the same time. But apparently it's unreliable?

The DS only recognizes one touch at a time.

Kamalot
01-09-2008, 01:24 PM
There are all kinds of timing tricks, collision tricks, etc that can be done to FAKE pressure sensitivity, but I promise, there is NO actual real pressure sensitivity.

Precisely. Everyone knows that modern thumb-sticks are actually digital devices but people still refer to the input as an Analog Control because it offers so many levels of detection and direction that it may as well be.

Backseat Killer
01-09-2008, 01:37 PM
May as well be - but isn't!

I am just trying to save you all from the cruel grasp of misinformation. You should be thanking me! ;)

Rommel
01-09-2008, 01:39 PM
How did you not realize the screen was pressure sensitive? From the moment I touched the DS it seemed apparrent to me.

shunoshi
01-09-2008, 01:43 PM
How did you not realize the screen was pressure sensitive? From the moment I touched the DS it seemed apparrent to me.

Obviously you're not understanding....it's not. It's a digital input. Either you're touching a certain area or you're not.

Kamalot
01-09-2008, 01:46 PM
Obviously you're not understanding....it's not. It's a digital input. Either you're touching a certain area or you're not.

But, can the display tell how BIG of an area I am touching?

Bone
01-09-2008, 01:47 PM
Touch sensitive and pressure sensitive are not the same thing, Rommel :)

Anyway, I realize I'm being picky here. But we can say the program allows levels of sensitivity while not saying the DS itself actually has pressure sensitivity, right?

Because we get to the point where people are quoting a news story as fact, then people say "Nintendo hides these features from the 3rd party", etc. Misinformation is not a good thing in my opinion.

Regardless, Colors! does let you paint with varying brush sizes. The transparency changes based on the transparency you have chosen. Last time I used it, there was a set transparency level that allowed you to "watercolor" over existing colors.

Backseat Killer
01-09-2008, 01:49 PM
But, can the display tell how BIG of an area I am touching?

That depends on the collision system implemented. But, yes.

Kamalot
01-09-2008, 01:50 PM
Touch sensitive and pressure sensitive are not the same thing, Rommel :)

Anyway, I realize I'm being picky here. But we can say the program allows levels of sensitivity while not saying the DS itself actually has pressure sensitivity, right?

Because we get to the point where people are quoting a news story as fact, then people say "Nintendo hides these features from the 3rd party", etc. Misinformation is not a good thing in my opinion.

Regardless, Colors! does let you paint with varying brush sizes. The transparency changes based on the transparency you have chosen. Last time I used it, there was a set transparency level that allowed you to "watercolor" over existing colors.

I think we can all agree that the DS does not have any special capabilities to register multiple levels of pressure. Yet these developers have found a way, using the stylus, to mimic the features found on pressure-sensitive devices. I am at a loss as to the best means to describe this feature other than 'Pressure Sensitive'.

Rirath
01-09-2008, 01:58 PM
Maybe this will satisfy a few people, but I doubt it:
http://forum.gbadev.org/viewtopic.php?t=14396&highlight=pressure

Post from the dev which seems to say the hardware does generate pressure info.
Wouldn't be the first time the homebrew scene found things devs don't use.

At any rate, this is a great little app I'll be getting use out of. Too bad I suck at Oekaki style drawing, which this is closest to... but I'd love to see what my GF could do with this. She's got some godly (http://www.spacecatsamba.com/view.php?rowid=126) Oekaki art (http://www.spacecatsamba.com/view.php?rowid=125). This may be the app that finally gets her into homebrew.

Bone
01-09-2008, 02:22 PM
Yea I just read that. It inspired me to email the guy! I asked him how the data is pulled in. His response:

"Well. I’m actually not sure about the answer myself. I could point you to the technical specifications of the touch-screen, but it would probably only tell you what you are already thinking. The values the DS hardware report are resistance in different axis, x, y and two diagonal (z1, z2) and by some clever math that specifications tells about you can calculate pressure from that. As you say, you could think of the reported value as the total area that touches the screen, or if you assume that the area is constant, you could think of it as pressure.

More to the point: This is not part of the Nintendo DS specifications and official Nintendo SDK doesn’t allow you to access the z1 and z2 values, so you could also say that the Nintendo DS doesn’t support pressure even though a hacked one does."

So apparently it uses the z1 and z2 as calculations of a diagonal (sounds like a diameter to me). Either way, you're right, the end result is a program that responds to pressure. Maybe I'm being too picky in the semantics. Wouldn't be the first time.

dub3000
01-09-2008, 02:52 PM
So apparently it uses the z1 and z2 as calculations of a diagonal (sounds like a diameter to me). Either way, you're right, the end result is a program that responds to pressure. Maybe I'm being too picky in the semantics. Wouldn't be the first time.

Which is probably how the multi-touch support works - I guess it looks for a rectangle formed by the two touch points. The code is out there somewhere if you want to check it out.

I have to stress that this is really unreliable on some DS's (especially mine - I get areas where the pressure pickup is totally wrong!) which is probably why it isn't exposed in the official spec.

Nura
01-09-2008, 03:12 PM
Can't we all just be happy for this awesome homebrew? i haven't been able to put it down the last couple of hours! i simply love this! :D (and yes, i've made a better eye then the one i posted earlier!)

Jack B
01-09-2008, 03:16 PM
I purchased a Wacom pressure sensitive pad for my daughter years ago hoping she'd develop her artistic talents, but she didn't use if for more than a week.

I tried it. It was fun, but I can't draw a lick, so sadly it was not much use to me.

51|RandoM
01-09-2008, 03:38 PM
I don't care HOW it is done. I seem to recall you caring how things were done before, but then again that was a different platform.

Magnanimous Gnome
01-09-2008, 04:09 PM
I seem to recall you caring how things were done before, but then again that was a different platform.

OH SNAP!

:eek:

GargantulaKon
01-09-2008, 04:09 PM
This program alone, will make me research to see if I can get a DS right now. I will now have to figure out how to make a DS homebrew compatible.

Wow, look how homebrew made me want to get a DS in addition to my homebrew enabled PSP. Nintendo, take note. The FAQ for Colors explains how to get your DS homebrew enabled.

Xerxes
01-09-2008, 05:21 PM
Oh Bone... Keep fighting.

Kamalot
01-09-2008, 08:44 PM
I seem to recall you caring how things were done before, but then again that was a different platform.

If you continue reading the thread, you'll also see "Yet these developers have found a way, using the stylus, to mimic the features found on pressure-sensitive devices. I am at a loss as to the best means to describe this feature other than 'Pressure Sensitive'."

Do you have a better description of the feature?

The program reacts in a predictable manner to the varying amounts of pressure applied to the stylus, and the program has been designed to utilize that input as a feature. It responds and reacts to variations in pressure, therefore it is 'pressure sensitive'. If you could accomplish this with toothpicks, rubber bands, and a spool to achieve the same effect, it would still be 'pressure sensitive'. I don't care HOW it is done.

Oh, or maybe we shouldn't call them touchscreens at all since our fingers never come in contact with the actual display surface, but a membrane above it.:rolleyes:

Bone
01-09-2008, 10:55 PM
Oh Bone... Keep fighting.I'm not fighting. I just realized I was more interested in the technicality of it than most of the people here. Kam was right when he said that whether or not it IS pressure sensitivity, the program itself provides you with that effect.

Like I said, and from my paintings above, I love this program and would be sketching on it now if my damn R4 didn't break :mad:

NoName
01-10-2008, 05:00 AM
Like I said, and from my paintings above, I love this program and would be sketching on it now if my damn R4 didn't break :mad:

I would be really unhappy if my R4 broke. Though didn't they redesign the card? Are the new ones less liable to go out over time?

Bone
01-10-2008, 07:37 AM
They redesigned it, but I have the old one and my spring broke. I removed the spring as suggested on their site, but it just stopped working shortly after. Won't recognize my MicroSD card (which works fine in other devices, like my cell phone) anymore.

Heretic Machine
01-10-2008, 09:49 AM
I purchased a Wacom pressure sensitive pad for my daughter years ago hoping she'd develop her artistic talents, but she didn't use if for more than a week.

I tried it. It was fun, but I can't draw a lick, so sadly it was not much use to me.

Not being able to draw is really one of my biggest regrets... I just can't, I've tried for years to develop some kind of talent for it, and I never make any progress. And of course, artists don't want to teach you, they have better things to do (like draw awesome stuff).

They redesigned it, but I have the old one and my spring broke. I removed the spring as suggested on their site, but it just stopped working shortly after. Won't recognize my MicroSD card (which works fine in other devices, like my cell phone) anymore.

My R4 broke almost right out of the box. I took it apart, fiddled with it for a bit, and got it into a mostly working condition. Every now and then it'll stop accepting the SD card, but I can usually fix it with a couple of tries.

Spigot
01-10-2008, 10:02 AM
Not being able to draw is really one of my biggest regrets... I just can't, I've tried for years to develop some kind of talent for it, and I never make any progress. And of course, artists don't want to teach you, they have better things to do (like draw awesome stuff).I hear ya. I can do a few doodles and draw a mean stick man, but unless you want to have your artwork populated by a thousand rudimentary ducks, I can't draw worth beans.

I mean, here's an example of my best work (http://notl33t.blogspot.com/2007/11/g-comics-presents.html)... and it looks more like something my kid drew.

Kamalot
01-10-2008, 10:06 AM
I mean, here's an example of my best work (http://notl33t.blogspot.com/2007/11/g-comics-presents.html)... and it looks more like something my kid drew.

The 'looks like my kid' part may also have to do with the subject matter and witty dialog.

Spigot
01-10-2008, 10:12 AM
The 'looks like my kid' part may also have to do with the subject matter and witty dialog.Heh.

He did help...

That said, if I tried doing The Last Supper it would probably look quite similar. And feature a tank in the background, as I can also draw a mean tank... or space shuttle.

Kamalot
01-10-2008, 10:14 AM
Heh.

He did help...

That said, if I tried doing The Last Supper it would probably look quite similar. And feature a tank in the background, as I can also draw a mean tank... or space shuttle.

Now, I gotta see it...

Spigot
01-10-2008, 10:23 AM
Now, I gotta see it...Tell you what. I'll get around to loading up Colors on my DS and attempt this later on. Don't say I didn't warn you.

shunoshi
01-10-2008, 10:56 AM
Why do I feel like we need a new BEAR thread? A special Colors! edition!!! If I don't see one created by tonight when I get home from work I may have to try my hand at it. :D

Bone
01-10-2008, 11:00 AM
I can't participate so my two images above will have to be repeated. I think it's a cool idea though.

Xerxes
01-10-2008, 02:49 PM
My R4 works like a champ. Imagine that.

jetboy
01-11-2008, 03:09 AM
I would modify the headline of this article, as it's inaccurate. There is no pressure sensitivity on the DS. They merely simulate it with airbrush effects and transparency, the same way Photoshop works.

The effect of course is similar to pressure sensitivity but I assure you it's based on position and duration of a stroke, not pressure. I've been using Colors! for months and it's an awesome little program.

EDIT: Here are a couple of examples of my work in Colors! (one is NSFW, but should be OK because it's art, not porn).


So you paint with Colors! for months and you didn't noticed that it HAS pressure sensitivity? Congratulations!

If you go to the color picker screen there are those 2 little buttons you can check so it will turn on pressure sensing for respectively opacity or brush size. You might want to try this.

I assure you it's based on position and duration of a stroke, not pressure.

You are totally wrong. Duration, speed, length of stroke has nothing in common here - pressure does.

I registered here because of you, because you are spreading misinformation that needs to be corrected. Yes, Colors! reads z1 and z2, and that's how you read pressure on those type of screen. Go see the part description of this Texas Instrument screen that is used in Nintendo DS.

By the way. I see you draw nicely so I would like to invite you, and all others that paint with Colors to post some of their pictures in the Colors! Gallery (http://colors.brombra.net) i run. When posting pictures remember to include drw files that have history of painting stored. Watching them is great learning experience and a lot of fun.

Ancalagon
01-11-2008, 03:12 AM
I did my honours thesis on gesture recognition. Used the Microsoft .Ink library as the backend. Pressure is quite a useful metric.

markster3000
01-11-2008, 05:53 AM
Woah--

I submitted this, but I thought that it was never posted! I must have lost it under the Olimar news!

I'm glad to see that the discussion was very productive here! Bone's e-mail to the guy seems to be quite the little bombshell.

Spigot
01-11-2008, 06:30 AM
Ooo... Bone got pwned.

I was playing Master Of Illusion and it has a 'love tester' thing and it seems that you have to press harder to make it work better, so I totally believe that there's pressure sensitivity.

Bone
01-11-2008, 07:34 AM
So you paint with Colors! for months and you didn't noticed that it HAS pressure sensitivity? Congratulations!
Are you an idiot? Did you read my posts? I acknowledge more than once that the EFFECT of the program is pressure sensitivity- in the program.



You are totally wrong. Duration, speed, length of stroke has nothing in common here - pressure does.
Actually the developer himself acknowledged that the pressure is determined by clever programming. A hack. It's taking certain values and extrapolating on them.

This information has come from people who actively develop on the DS as well as the guy who wrote Colors!. In particular, a friend of mine who both programs official DS games as well as homebrew on the side. He has a clear picture of what is officially in the Nintendo's libraries and what is in the hacked libraries.


I registered here because of you, because you are spreading misinformation that needs to be corrected. Yes, Colors! reads z1 and z2, and that's how you read pressure on those type of screen. Go see the part description of this Texas Instrument screen that is used in Nintendo DS.
And how does z1 and z2 get calculated? It's not in Nintendo's library because it's not an accurate reading, hence the problems some people have with Colors! and any other pressure sensitive program using those values.

From a little more digging, I found that z1 and z2 are values that are added by the "hacked" library. They are based on the threshold of when the screen thinks it has contact, but may be reading a false positive. The threshold is there to avoid accidental readings on the screen. So by comparing the threshold of "there may be a hit on the screen" with "there is definitely a hit on the screen", you can get a simulation of pressure sensitivity.

Again, the z1 and z2 values are not exposed by Nintendo because they aren't used for that purpose. It's not something Nintendo is hiding from developers. I'm glad the hackers were able to make something useful out of it, but again, we have to remember it's unsupported and from the Colors! developer's own mouth, he realizes it doesn't work for everyone. He even says he doesn't understand how the z1 and z2 values get there- he's using the values provided by ndslib (http://www.drunkencoders.com/documents/DS/ndslib.htm) and quite effectively, I might add. But it doesn't mean he wrote the ndslib or knows how they are extrapolating the z1 and z2 values, which again, are not provided by Nintendo.

Backseat Killer
01-11-2008, 09:04 AM
God, I love it when you talk all technical!

I especially love it when you are soo very right!

shunoshi
01-11-2008, 01:57 PM
Wow, this has turned into quite the debate.

On a side note, thanks for the gallery jetboy, it's very cool. I just wish I could draw worth a damn.

Bone
01-11-2008, 02:04 PM
The relevance of the debate is moot to this program (Colors!), really. I'm just deeply interested in how exactly they are reading the data to make pressure sensitivity happen. It's a good hack, and my prodding seems to irritate people.

That's OK with me, check the user title.

markster3000
01-12-2008, 01:56 AM
jetboy's mentioning of it being a Texas Instruments screen led me in an interesting direction.

Googling for "texas instruments x y z1 z2" led me to this spec paper on some Texas Insturments device that features a very DS-like touch screen: http://focus.ti.com/lit/ds/symlink/tsc2100.pdf

If you search within that document for "z1", you find that Texas Instruments themselves describe the method to derive pressure sensitivity from the touch screen using the z1 and z2 values.

RTOUCH = RX–plate * (xPosition/4096) * (z2/z1 - 1)

This is almost exactly the same math as the actual code Colors uses:

int intPressure = (touchXY.x * touchXY.z2) / (64 * touchXY.z1) - touchXY.x / 64;
which is mathematically equivalent to:
int intPressure = touchXY.x/64 * (touchXY.z2/touchXY.z1 - 1);

Texas Instruments does warn though: "the voltage across the touch panel often overshoots and then slowly settles (decays) to a stable dc value," but they offer that a small delay before doing your measurement avoids this.


None of this, of course, is in the Nintendo spec.


I can imagine why Nintendo would do this. Letting developers get too close to the hardware (what with z1 and z2 being apparently tied closely to electrical resistance) limits Nintendo's options during hardware redesign phases. If a new screen becomes available that only offers (x,y) coords without pressure detection, then there is no risk that some games will suddenly stop working on this new hardware.

masscat
01-12-2008, 03:02 AM
The touch screen controller in the DS is indeed a Texas Instruments device. It is the TSC2046 (http://focus.ti.com/docs/prod/folders/print/tsc2046.html).

This device uses the same method for pressure detection as the TSC2100 described by markster3000.
The datasheet for the TSC2046 suggests using the pressure measurement can be used to determining if the touch was produce by a stylus or a finger.

You can find the DS specs that most homebrew use for directly accessing the hardware at GBATEK (http://nocash.emubase.de/gbatek.htm).

The problem with the pressure detection is that the quality of its response varies between DSs and even over the area of a single screen.
For example my DS lite has a patch where the pressure response is different from the rest of the screen. This leads Colors! to produce light strokes over this area.

Bone
01-12-2008, 10:54 AM
Interesting. So the TI part itself supports it, but it's flaky and varies from screen to screen. And even on an individual screen, there are areas of limited response.

It does make sense that Nintendo would not rely on this feature, but I stand fully corrected on that point.

masscat
01-12-2008, 01:20 PM
The pressure response can be very good. My old (non lite) DS gives a good range of values between a heavy and soft touch and is consistent across the entire screen. So it is just pot luck on a particular DS.

Since Nintendo do not support pressure sensing it probably means that they can produce/buy the touch screens (the actual screen part) somewhat cheaper.
The joy of homebrew is that people can play around with the hardware in ways that Nintendo may not support or expect (although the results may not perform perfectly on all DSs).