Skip to content

Official RumblePak not recognised #65

@ssstolk

Description

@ssstolk

Bug Report

What's the issue you encountered?

My official Rumble Pak is not recognised by libnds' code in rumble.c.

How can the issue be reproduced?

Call rumbleIsInserted() and it returns false,
even though my official NintendoDS Rumble Pak (model no. NTR-008, NTR-A-ZV-USA) is inserted.
This Rumble Pak came with Metroid Pinball.

Environment?

N/A

Additional context?

I managed to fix the issue, for this particular RumblePak at least, by changing the last line to include a check for the value that my RumblePak provides at the GBA SLOT address:

id = *(vu16*)0x08000000;
return (id == 0xFFFD || id == 0x7E00);

with the variable defined as
vu16 id;

For reference, in earlier libnds code for rumble.c, I also had to adjust the libnds code to properly work with my RumblePak. I did that by removing the check on four[0] and four[2].

        rumbleType = RT_OFFICIAL;
        // Now check to see if it's true open bus, or if D1 is pulled low
        four[0] = GBA_BUS[0] & 3; //0xFF;
        four[1] = GBA_BUS[1] & 3; //0xFF;
        four[2] = GBA_BUS[2] & 3; //0xFF;
        four[3] = GBA_BUS[3] & 3; //0xFF;
        return /*(four[0] == 0x00) && (four[2] == 0x00) &&*/ (four[1] == 0x01) && (four[3] == 0x01);

Once detected, rumbling functionality (i.e., setting the rumble position) works as expected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions