gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS Misc > Homebrew tilt and rumble via Wario Ware?

#100288 - IxthusTiger - Sun Aug 27, 2006 6:35 am

With the new Slot-1 carts coming out (and even just WifiMe) is it possible to harness the tilt sensor and rumble in Wario Ware Twisted for use in homebrew games? I'll gladly donate my copy to you if you think you can do it!

#100314 - MaHe - Sun Aug 27, 2006 9:40 am

Yes, it is possible. Somebody just has to code it :)
And a bit of advice: donate it only to a capable coder and someone you can trust, not some new-on-the-scene i-can-do-it kid ;)
_________________
[ Crimson and Black Nintendo DS Lite | CycloDS Evolution | EZ-Flash 3-in-1 | 1 GB Transcend microSD ]

#100332 - IxthusTiger - Sun Aug 27, 2006 11:52 am

Well, I don't want to impose either, I'm not just going to send it off to whoever I think is the best coder, since maybe they don't have the time and I wouldn't want to bug them. I want to give it to whoever has both the time AND the reputation. Does Yoshi's Gravitation have rumble? that one is a little more aesthetically pleasing. I know Drill dozer has rumble, but no tilt.

The table hocky demo from E3 rumbles when Wario Ware Twisted is in the GBA slot. That's so cool.

#100455 - Darkflame - Mon Aug 28, 2006 12:41 am

IxthusTiger wrote:

The table hocky demo from E3 rumbles when Wario Ware Twisted is in the GBA slot. That's so cool.


dosnt seem to work for me :-/

What are you doing? I boot the hockey demo from moonshell (from a GBAMP CF), then quickly swap the gba cart in?
_________________
Darkflames Reviews --
Make your own at;
Rateoholic:Reviews for anything, by anyone.

#100458 - ssj4android - Mon Aug 28, 2006 12:48 am

What about the DS rumble pack? Has any homebrew actually used that, besides the demo?

#100470 - IxthusTiger - Mon Aug 28, 2006 3:32 am

Darkflame wrote:
IxthusTiger wrote:

The table hocky demo from E3 rumbles when Wario Ware Twisted is in the GBA slot. That's so cool.


dosnt seem to work for me :-/

What are you doing? I boot the hockey demo from moonshell (from a GBAMP CF), then quickly swap the gba cart in?


I send it to my DS via WifiMe, with Wario Ware already in the GBA slot :)

#100571 - Primetime00 - Mon Aug 28, 2006 8:17 pm

Quote:
donate it only to a capable coder and someone you can trust, not some new-on-the-scene i-can-do-it kid ;)


I'm a new-on-the-scene i-can-do-it kid

#100573 - MaHe - Mon Aug 28, 2006 8:21 pm

I know, I meant somebody who never released anything ... :P
I think at least someone should write a small library for reading the data from the tilt-sensor.
_________________
[ Crimson and Black Nintendo DS Lite | CycloDS Evolution | EZ-Flash 3-in-1 | 1 GB Transcend microSD ]

#100590 - IxthusTiger - Mon Aug 28, 2006 9:42 pm

Primetime00 wrote:
Quote:
donate it only to a capable coder and someone you can trust, not some new-on-the-scene i-can-do-it kid ;)


I'm a new-on-the-scene i-can-do-it kid


So are you saying you want it or were you just helping him clarify his statement? :)

#100592 - knight0fdragon - Mon Aug 28, 2006 9:47 pm

I have ordered this game too, so hopefully when I look at it I will try and write some code for it
_________________
http://www.myspace.com/knight0fdragonds

MK DS FC: Dragon 330772 075464
AC WW FC: Anthony SamsClub 1933-3433-9458
MPFH: Dragon 0215 4231 1206

#100613 - IxthusTiger - Mon Aug 28, 2006 11:18 pm

knight0fdragon wrote:
I have ordered this game too, so hopefully when I look at it I will try and write some code for it


Well, I think you're awesome.

#100682 - Thomas - Tue Aug 29, 2006 6:07 pm

It has already been done, according to wwcube's posts in this topic:

wwcube wrote:
I made simple demo how to use rumble pak.
http://cube.txt-nifty.com/blog/2005/10/gba_nintendo_ds_c44b.html

direct link:
for NDS (http://cube.txt-nifty.com/blog/files/rumblepak_nds.zip)
for GBA (http://cube.txt-nifty.com/blog/files/rumblepak_mb.zip)


wwcube wrote:

And now, there are demos how to read data from gyro sensor.

direct link:
for NDS (http://cube.txt-nifty.com/blog/files/gyrotest_nds.zip)
for GBA (http://cube.txt-nifty.com/blog/files/gyrotest_mb.zip)


I tried those test programs a while ago and they worked fine. I am looking forward to more homebrew programs/games which use the Wario Ware Twisted game pak.

#100717 - IxthusTiger - Wed Aug 30, 2006 1:11 am

Thomas wrote:
It has already been done, according to wwcube's posts in this topic:

wwcube wrote:
I made simple demo how to use rumble pak.
http://cube.txt-nifty.com/blog/2005/10/gba_nintendo_ds_c44b.html

direct link:
for NDS (http://cube.txt-nifty.com/blog/files/rumblepak_nds.zip)
for GBA (http://cube.txt-nifty.com/blog/files/rumblepak_mb.zip)


wwcube wrote:

And now, there are demos how to read data from gyro sensor.

direct link:
for NDS (http://cube.txt-nifty.com/blog/files/gyrotest_nds.zip)
for GBA (http://cube.txt-nifty.com/blog/files/gyrotest_mb.zip)


I tried those test programs a while ago and they worked fine. I am looking forward to more homebrew programs/games which use the Wario Ware Twisted game pak.


Did you use WifiMe or do these programs allow "swapping?"

#100728 - mastertop101 - Wed Aug 30, 2006 3:57 am

Swapping doesn't work (neither on gba or on DS)

#100739 - knight0fdragon - Wed Aug 30, 2006 5:54 am

not with the way the demo is written, of course it wont work, place some kind of pause before the cart is init so that you are given time to swap
_________________
http://www.myspace.com/knight0fdragonds

MK DS FC: Dragon 330772 075464
AC WW FC: Anthony SamsClub 1933-3433-9458
MPFH: Dragon 0215 4231 1206

#100765 - Thomas - Wed Aug 30, 2006 12:08 pm

They don't allow swapping indeed, I had to use WMB (NDS) or a multiboot cable (GBA) for the test programs to work. A delay would be a nice idea, I would love to try it out but unfortunately I haven't got any programming experience.

#100772 - Darkflame - Wed Aug 30, 2006 1:24 pm

Swappable should certainly be possible if it was coded for it.
_________________
Darkflames Reviews --
Make your own at;
Rateoholic:Reviews for anything, by anyone.

#100782 - mastertop101 - Wed Aug 30, 2006 2:24 pm

You're right, it works !

here are tilt binaries (no source... easy to do and you wouldn't like how i did it ;)) (lets you 10 big seconds to swap it)
http://mastertop101.free.fr/tilt.7z

#101290 - knight0fdragon - Mon Sep 04, 2006 7:27 am

ok i got it to work with C code
_________________
http://www.myspace.com/knight0fdragonds

MK DS FC: Dragon 330772 075464
AC WW FC: Anthony SamsClub 1933-3433-9458
MPFH: Dragon 0215 4231 1206

#101405 - knight0fdragon - Tue Sep 05, 2006 4:21 am

Anyone have the yoshi topsy turvy game so that i may try the code on there
_________________
http://www.myspace.com/knight0fdragonds

MK DS FC: Dragon 330772 075464
AC WW FC: Anthony SamsClub 1933-3433-9458
MPFH: Dragon 0215 4231 1206

#101411 - crossraleigh - Tue Sep 05, 2006 6:13 am

As you may know, the registers for Yoshi are different than the ones for WarioWare. FluBBa posted Yoshi info here.

PS: Editing out the contents of your post because you got your question answered doesn't help the community.

#101412 - knight0fdragon - Tue Sep 05, 2006 7:15 am

I will be releasing the C code shortly, I do not want to keep incorrect information about, right now I am trying to poke around to see if there is something more then just twisting

And I am well aware that Yoshi's registers are different
_________________
http://www.myspace.com/knight0fdragonds

MK DS FC: Dragon 330772 075464
AC WW FC: Anthony SamsClub 1933-3433-9458
MPFH: Dragon 0215 4231 1206

#101414 - knight0fdragon - Tue Sep 05, 2006 7:25 am

oh well, I am a little tired, so here is what the C code looks like, hopefully someone else can poke around and find something other then twisting left and right

of course, if you want to just use it for twisting, stick with the asm file


Code:

#define   GYRO_DATA   (*(vuint16 *)0x80000C4)
#define GYRO_ENABLE (*(vuint16 *)0x80000C6)
#define   GYRO_RW       (*(vuint16 *)0x80000C8)

uint16 gyrodata;
void tiltInit()
{
  GYRO_DATA = 3;
  GYRO_ENABLE = 11;
}

uint16 tiltRead()
{
  uint16 on;
  uint16 off;
  uint16 temp;
  int i = 0;
  GYRO_RW = 1;

  gyrodata &= 0xFFFE;
  GYRO_DATA = gyrodata;

  off = gyrodata | 0x0002;
  on = gyrodata & 0xFFFD;
 
  gyrodata = off;
 
  gyrodata = 0;
  for(i = 0; i < 4; i++)
  {
    GYRO_DATA = on;
    swiDelay(3);
    GYRO_DATA = off;
    swiDelay(3);
  }
 
  for(i = 0; i < 12; i++)
  {
    temp = GYRO_DATA;
    GYRO_DATA = on;
    temp >>=2;
    temp &=1;
    gyrodata = (temp | (gyrodata << 1));
    GYRO_DATA = off;
  }
  temp = gyrodata;
  gyrodata = off | 1;  ///????
  GYRO_DATA = gyrodata;
  GYRO_RW = 0;
  if((temp != 0) && (temp != 0xFFF))
    return temp;
  else
    return -1;
}

void tiltVibration(bool vibrate)
{
  gyrodata &= 0xFFF7;
  gyrodata = (gyrodata & 0xfff7) | (vibrate ? 8 : 0);
  GYRO_DATA = gyrodata;
}

_________________
http://www.myspace.com/knight0fdragonds

MK DS FC: Dragon 330772 075464
AC WW FC: Anthony SamsClub 1933-3433-9458
MPFH: Dragon 0215 4231 1206