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 development > First Option Pak revealed: WarioWare Twisted!

#43609 - jgkspsx - Wed May 25, 2005 3:07 am

Very sorry if this has been posted, but I found nothing in two searches.

I just tried out the Table Hockey demo (thanks so much to everyone involved in ripping the E3 demos, especially FireFly) and found that it used the WarioWare Twisted! cart in my GBA slot to provide force feedback. Perhaps it's just an accident and the rumble pak's motor-control register happens to be addressed the same as WarioWare's motor, but I think Nintendo is giving us a really cool alternative for buying single-function option paks.

So, have any DS programmers interested in using the Twisted! position sensor yet? Until we have working programmable DS cards, this is obviously not an option for most, but it would be very cool to experiment with.

#43610 - Darkain - Wed May 25, 2005 3:17 am

can you test this out by seeing if you can enable the rumble feature on the alarm in the system menu? /me is highly curious now
_________________
-=- Darkain Dragoon -=-
http://www.darkain.com
DarkStar for Nintendo DS

#43611 - jgkspsx - Wed May 25, 2005 3:32 am

Darkain wrote:
can you test this out by seeing if you can enable the rumble feature on the alarm in the system menu? /me is highly curious now

It doesn't seem so :(
I don't see the option and it doesn't rumble when the alarm goes off.

#43617 - EaDS Milliways - Wed May 25, 2005 4:22 am

jgkspsx wrote:
Darkain wrote:
can you test this out by seeing if you can enable the rumble feature on the alarm in the system menu? /me is highly curious now

It doesn't seem so :(
I don't see the option and it doesn't rumble when the alarm goes off.

Maybe it's based on the Wario Table Hockey code. Does anyone have pictures of what the game looks like?

#43618 - Joat - Wed May 25, 2005 4:34 am

The Metroid: Pinball demo at E3 (on the girl with 3x DSen tied to her waist) included a rumble option pack. The girl was going to let me look at the cart, but when she tried to pull it out (so I could see at least if it's a braindead device on the PHI pin or something, with only a few silvered contacts, or a full cart with e.g. extra sram or something), we noticed nintendo had screwed the effing things into the DS, and she wouldn't let me unscrew it.

Also, the DS used a standard sized DS card (also screwed in), rather than a DS flash cart (which are about 2.5x longer than a normal card), so either Nintendo has a newer revision flash cart than other developers, has OTP carts (i.e. the matrix semi they keep saying they'll move to) or Metroid: Pinball is already complete, and they're not releasing it yet for some strange reason.
_________________
Joat
http://www.bottledlight.com

#43620 - krunkster - Wed May 25, 2005 4:39 am

I can confirm that Hockey demo rumbles with pak but alarm does not.

I'll try more demos later.

#43621 - jgkspsx - Wed May 25, 2005 4:54 am

EaDS Milliways wrote:
Maybe it's based on the Wario Table Hockey code. Does anyone have pictures of what the game looks like?

Here are some screenshots:
http://media.ds.ign.com/media/682/682848/imgs_1.html

#43622 - tepples - Wed May 25, 2005 4:56 am

Turn it sideways, and reveal the true nature of table hockey: it's just a good-looking Pong clone.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#43623 - Joat - Wed May 25, 2005 4:58 am

Oh yeah, on the subject of being based on wario code, it's my impression that the table hockey demo is over a year old (was shown at last E3 iirc).
_________________
Joat
http://www.bottledlight.com

#43625 - jgkspsx - Wed May 25, 2005 5:42 am

tepples wrote:
Turn it sideways, and reveal the true nature of table hockey: it's just a good-looking Pong clone.

I like Pong :P

But I like Air Hockey more :)

The point of the thread was the force feedback, though, not either game. Heh. I do believe it's nearly identical to the demo shown last year at E3, though.

#43629 - doublec - Wed May 25, 2005 6:28 am

Is there documentation anywhere on how to use the warioware twisted rumble option or position sensor? Programatically I'm talking about.

#43645 - netdroid9 - Wed May 25, 2005 9:46 am

doublec wrote:
Is there documentation anywhere on how to use the warioware twisted rumble option or position sensor? Programatically I'm talking about.


Yeah, the games source code. It's legal to dissasemble for compatability reasons.

I think I finally found a thread to use as an example :).

#43664 - jgkspsx - Wed May 25, 2005 2:54 pm

netdroid9 wrote:
Yeah, the games source code. It's legal to dissasemble for compatability reasons.

I hear that there's an emulator patch out there that programmatically implements the twist sensor. Looking at that code might be easier and more "directly" legal than disassembling ;)

#43668 - Kyoufu Kawa - Wed May 25, 2005 3:32 pm

jgkspsx wrote:
I hear that there's an emulator patch out there that programmatically implements the twist sensor. Looking at that code might be easier and more "directly" legal than disassembling ;)
SlimeSmile has the game with that patch. Too bad you can't get any further than Dribble and Spitz. Apparently, the game switches to digital-style measurement in their boss stage, or so he said.

#43696 - Quirky - Wed May 25, 2005 7:39 pm

Kyoufu Kawa wrote:
Apparently, the game switches to digital-style measurement in their boss stage, or so he said.


Yoshi's Universal Gravitation [E] / Topsy Turvy [U] uses digital measurement too, judging by its somewhat clunky feel :(

#43725 - jgkspsx - Thu May 26, 2005 12:02 am

Kyoufu Kawa wrote:
SlimeSmile has the game with that patch. Too bad you can't get any further than Dribble and Spitz. Apparently, the game switches to digital-style measurement in their boss stage, or so he said.

Wait... they patched the game r0m so it takes input from D-pad and B button? Crap, I thought they wrote an add-on for an emulator. Anyway, knowing where they patched will make finding the sensor-reading code in the real game easier.

#43776 - Kyoufu Kawa - Thu May 26, 2005 5:42 pm

I do think I remember VBA having motion-control keybindings... can't be very sure having never used them.

A patch like that would only make sense for flash carts anyway. They don't have the motion stuff.

#43787 - tepples - Thu May 26, 2005 8:20 pm

Don't VBA's motion-control keybindings refer to Kirby Tilt n Tumble for GBC?
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#43856 - Kyoufu Kawa - Fri May 27, 2005 10:48 am

Like I said, never used 'em, so how would I know?

#43860 - MrD - Fri May 27, 2005 11:04 am

Tepples is right, really screws ya up when you wanna play it on DCgnuboy. :(

#56673 - wwcube - Mon Oct 10, 2005 4:00 pm

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)

#56705 - IxthusTiger - Mon Oct 10, 2005 6:25 pm

If you put in a GBAMP incorrectly, the DS will read it as an option pack. Then when you set the alarm, it will ask you if you would like to use rumble.

#56714 - funkaster - Mon Oct 10, 2005 7:05 pm

IxthusTiger wrote:
If you put in a GBAMP incorrectly, the DS will read it as an option pack. Then when you set the alarm, it will ask you if you would like to use rumble.

Something similar happens if you put an EFA (256 or 512, not the EFA-II) in the GBA slot. When you set the alarm, the DS asks you if you want to set the rumble option.

#56806 - pixie - Tue Oct 11, 2005 6:51 pm

The bandbrothers addon cart shows as a option pak

#57498 - wwcube - Sun Oct 16, 2005 3:57 pm

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)

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)

#57514 - mastertop101 - Sun Oct 16, 2005 5:53 pm

Hum, I don't understand where will be the gba/ds homebrew if there is the wario ware cart in the gba port ??

#57518 - Dark Knight ez - Sun Oct 16, 2005 6:11 pm

The homebrew could be loaded entirely into RAM (as is done with WiFi download at the moment), and after that, it can be executed without having a homebrew device (e.g. flashcard) in the gba port. A gyro sensor cart could be inserted then.

#57522 - tepples - Sun Oct 16, 2005 6:28 pm

I've tried pak-swapping on my GBA and Nintendo DS, but a lot of times, pak-swapping (at least in GBA mode) only makes the system reset, even for a pure multiboot program.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#57525 - Dark Knight ez - Sun Oct 16, 2005 7:38 pm

I doubt that would happen in NDS mode, although I haven't tried that, to be honest. (Swapping a GBA cart when running the NDS game from the NDS cart that is.)

#57589 - The 9th Sage - Mon Oct 17, 2005 5:02 am

Dark Knight ez wrote:
I doubt that would happen in NDS mode, although I haven't tried that, to be honest. (Swapping a GBA cart when running the NDS game from the NDS cart that is.)


Usually it works fine, unless you're running homebrew that NEEDS to access data from whatever is in the GBA slot.
_________________
Now with 20% More Old Man from Zelda 1 than ever before!

#162891 - cualquiercosa327 - Mon Sep 15, 2008 8:11 pm

hello i tried the binary and it works fine,but i was unable to compile.
Some functions has older.here i post an review version which compiles.
thanks wwcube

/*
* Gyro test for Nintendo DS
*
* by wwcube
*/

#include <nds.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>

#include <nds/arm9/input.h>
#include <nds/arm9/console.h>

#include "gyro.h"
#include "sincos.h"

extern const unsigned char bmp_Bitmap[];
extern const unsigned short bmp_Palette[];

/*
* Rotate function from
* http://j-gbadev.hp.infoseek.co.jp/kiso/step18.htm
*/
void RotateBG3(int angle)
{
s16 s = FixedSin(angle);
s16 c = FixedCos(angle);

BG3_XDX = c;
BG3_XDY = s;
BG3_YDX = -s;
BG3_YDY = c;

int bg3x = (120<<8) - 144 * FixedCos(angle-33);
int bg3y = ( 80<<8) - 144 *-FixedSin(angle-33);

BG3_CX = bg3x;
BG3_CY = bg3y;
}

void init_irq()
{
irqInit();
irqSet(IRQ_VBLANK, NULL);
irqEnable(IRQ_VBLANK);
}

void init_video()
{
videoSetMode(MODE_5_2D | DISPLAY_BG3_ACTIVE);
videoSetModeSub(MODE_0_2D | DISPLAY_BG0_ACTIVE);
vramSetMainBanks(
VRAM_A_MAIN_BG_0x06000000,
VRAM_B_LCD,
VRAM_C_SUB_BG,
VRAM_D_LCD
);

SUB_BG0_CR = BG_MAP_BASE(31);

BG_PALETTE_SUB[255] = RGB15(31,31,31);

consoleInitDefault((u16*)SCREEN_BASE_BLOCK_SUB(31), (u16*)CHAR_BASE_BLOCK_SUB(0), 16);

BG3_CR = BG_BMP8_128x128;
dmaCopy(bmp_Bitmap, BG_GFX, 128*128);
dmaCopy(bmp_Palette, BG_PALETTE, 256*2);
}

int main(void)
{
int newtral;
int gyromax;
int gyromin;
int angle;
int adjustflag;
int adjustdata[60];
int adjustdatanum;

REG_EXMEMCNT &= 0xFF7F; /* It allow ARM9 accessing to CART */


REG_EXMEMCNT &= 0xFFE0; /* Wait for ROM2nd,ROM1st,RAM is 6,10,10 */
REG_EXMEMCNT |= 0x000A; /* Wait for ROM2nd,ROM1st,RAM is 6, 6, 6 */

init_irq();
init_video();

gyroInit();

newtral = 0x0650;
gyromax = newtral;
gyromin = newtral;

angle = 0;
adjustdatanum = 0;
adjustflag = 1;

for (;;) {
int gyrodata;

swiWaitForVBlank();

scanKeys();
if (keysDown() & KEY_START) {
adjustflag = 1;
}

gyrodata = gyroRead();
if (adjustflag) {
adjustdata[adjustdatanum] = gyrodata;
adjustdatanum++;
if ((keysUp() & KEY_START)
|| (adjustdatanum > sizeof(adjustdata)/sizeof(adjustdata[0]))) {
int i;
int n = 0;
newtral = 0;
for (i = 0; i < adjustdatanum; i++) {
if (adjustdata[i] != 0 && adjustdata[i] != -1) {
newtral += adjustdata[i];
n++;
}
}
newtral = (newtral + n/2) / n;
gyromax = newtral;
gyromin = newtral;
adjustdatanum = 0;
adjustflag = 0;
angle = 0;
}
continue;
}

if (gyrodata > gyromax) {
gyromax = gyrodata;
}
if (gyrodata < gyromin) {
gyromin = gyrodata;
}
int diff = (newtral - gyrodata);
angle += diff;
if (angle >= 360*32) {
angle -= 360*32;
} else if (angle < 0) {
angle += 360*32;
}
if ((diff > 64) || (diff < -64)) {
gyroVibration(1);
} else {
gyroVibration(0);
}

RotateBG3(angle/32);

#if 1
iprintf("\x1b[13;0HGyrodat: %04x", gyrodata & 0xffff);
iprintf("\x1b[15;0HNewtral: %04x", newtral);
iprintf("\x1b[16;0HGyromax: %04x", gyromax);
iprintf("\x1b[17;0HGyromin: %04x", gyromin);
iprintf("\x1b[19;0HAngle : %4d", angle/32);
#endif
}

return 0;
}


//they are only two changes on older waitcr and in a mem direction