#160715 - elhobbs - Mon Jul 21, 2008 1:19 am
do I need to do anything special to get rumble working on the ezflash 5 with the 3 in 1 expansion pack? I have tried a few rumble samples and nothing happens. Is there anything special that needs to be done? I am beginning to think my 3 in 1 card is broken. I can get the expansion pack ram to work but the rumble does not work. so either I am missing an important init sequence (there does not appear to be one) or it is broken.
#160722 - elhobbs - Mon Jul 21, 2008 3:21 am
I found the 3 in 1 test source code on the ezflash site and it looks like the 3 in 1 does require enabling the rumble. here is the code Code: |
void SetShake(u16 data)
{
*(vuint16 *)0x9fe0000 = 0xd200;
*(vuint16 *)0x8000000 = 0x1500;
*(vuint16 *)0x8020000 = 0xd200;
*(vuint16 *)0x8040000 = 0x1500;
*(vuint16 *)0x9E20000 = data;
*(vuint16 *)0x9fc0000 = 0x1500;
}
//to enable
sysSetCartOwner(true);
SetShake(0xF0);
//to rumble
*(vu16 *)0x8000000 = 0x00;
*(vu16 *)0x8000000 = 0x02;
|
so, the SetShake function looks like it may be very specific to the 3 in 1. do other cards have similiar initialization sequences? is there a library like lick's ram library for rumble?
#160731 - Maxxie - Mon Jul 21, 2008 7:06 am
elhobbs wrote: |
so, the SetShake function looks like it may be very specific to the 3 in 1. do other cards have similiar initialization sequences? is there a library like lick's ram library for rumble? |
Yes. Even the rumble itself is very individual. Some cards need constant CPU interaction (setting & unsetting a bit) to vibrate an actuator others just start or stop a motor.
For the SC Rumble:
Code: |
// check and enable rumble
bool SC_TestRumble(void)
{
/* since REG_ is volatile, the write should not be optimized */
/* which would break mode set */
REG_SC_UNLOCK = SC_MAGIC ;
REG_SC_UNLOCK = SC_MAGIC ;
/* mode is rumble + sD Cart, to not break a previous DLDI initialization */
REG_SC_UNLOCK = SC_RUMBLE | SC_SDCARD ;
REG_SC_UNLOCK = SC_RUMBLE | SC_SDCARD ;
if ((REG_SC_A & 2) || (REG_SC_B & 2))
{
return false ;
} else
{
return true ;
}
}
void RUMBLER::Enable(bool en)
{
switch (type)
{
case RUMBLE_SC:
REG_SC_B = en?2:0 ;
break ;
...
}
|
_________________
Trying to bring more detail into understanding the wireless hardware
#160746 - tepples - Mon Jul 21, 2008 1:00 pm
Maxxie wrote: |
Even the rumble itself is very individual. Some cards need constant CPU interaction (setting & unsetting a bit) to vibrate an actuator others just start or stop a motor. |
Do the ones that need CPU interaction need CPU interaction more often than 60 times a second?
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#160747 - silent_code - Mon Jul 21, 2008 1:32 pm
@ tepples: They could need more than that. When a timer is available, it can be used to trigger the rumbling at a specific frequency. 60hz might just be too low and games that run at 30 hz are affected by that issue even more.
_________________
July 5th 08: "Volumetric Shadow Demo" 1.6.0 (final) source released
June 5th 08: "Zombie NDS" WIP released!
It's all on my page, just click WWW below.
#160748 - Maxxie - Mon Jul 21, 2008 1:42 pm
I once thought about using DMA on a volatile register to feed the port (HSync / triggerBitValue via vcount i.e.) but then i figured out, that "my" rumble is a motor one :p
So haven't tested this aproach.
For cards that trigger with BIT(1) this should lead to a max ~4kHz try of rumble.
However that occupies a lot of bus-bandwidth and a (high priorized for screen reg access) DMA channel.
_________________
Trying to bring more detail into understanding the wireless hardware
#160750 - silent_code - Mon Jul 21, 2008 1:56 pm
Errrr... Metroid Prime Pb comes with the offical Rumble Pak and the game also works with the M3Real RAM & Rumble, although the R&R uses a little motor. There is a difference in intensities (official has more pronounced "soft" rumbling, but the R&R has more powerful "hard" rumbling), but they both seem to work the same... off the offial cartridge, of course. ;^D
PS: Both paks seem not to be compatible with the NDS' inofficial rumble alarm feature (only compatible with some Wario game pak, iIrc).
_________________
July 5th 08: "Volumetric Shadow Demo" 1.6.0 (final) source released
June 5th 08: "Zombie NDS" WIP released!
It's all on my page, just click WWW below.
#160751 - Maxxie - Mon Jul 21, 2008 2:01 pm
Can you hear the *YARR* of the pirates putting patches over their eye... err ... rumble code?
(Which will be the reason why it doesn't work on the firmware functions like the alarm)
_________________
Trying to bring more detail into understanding the wireless hardware
#160752 - silent_code - Mon Jul 21, 2008 2:12 pm
@ Maxxie: ??? ... ? There are no pirates in my room. :^) (I don't get it. ;^D )
PS: Arrrr! (Playing along, just for the fun of it...)
_________________
July 5th 08: "Volumetric Shadow Demo" 1.6.0 (final) source released
June 5th 08: "Zombie NDS" WIP released!
It's all on my page, just click WWW below.
#160777 - spinal_cord - Mon Jul 21, 2008 11:57 pm
Never mind.
_________________
I'm not a boring person, it's just that boring things keep happening to me.
Homepage