Results 1 to 3 of 3

Thread: Wiimote Speaker Hacked!

  1. #1
    Member Jamezli's Avatar
    Join Date
    Dec 2006
    Location
    Richmond
    Posts
    414
    Thanks
    0
    Thanked 24 Times in 7 Posts

    Wiimote Speaker Hacked!

    http://www.battleclan.ca/content/view/698/116/

    Here is the GlovePIE script from the site:
    Code:
    // Carl Kenner's Wiimote Speaker Test script! Version 2
    // A = start sound, B = stop sound
    // Minus = decrease sample frequency
    // Plus = increase sample frequency
    // It takes a short time to start (due to delays built into Poke)
    
    // Change the next line to set the rate at which sound data is sent
    // BUT it must be low enough for the wiimote to respond to the B button
    // it may depend on your PC speed. Must be at least 91 for freq 13.
    pie.FrameRate = 120 Hz
    
    if not var.initialized then
    var.freq = 13 // Set sample rate = 3640 Hz (so computer can keep up)
    var.volume = 0x40 // volume = 40 ??? Seems to be about max
    debug = var.freq
    var.initialized = true
    end if
    
    if var.On and (not Wiimote.One) and (not Wiimote.Two) then
    // Report 18, send 20 bytes, square wave, 1/4 sample rate freq
    WiimoteSend(1, 0x18, 20 shl 3, 0xCC,0x33,0xCC,0x33,0xCC,0x33,0xCC,0x33,0xCC,0x33, 0xCC,0x33,0xCC,0x33,0xCC,0x33,0xCC,0x33,0xCC,0x33)
    else if var.On and Wiimote.One then
    // Report 18, send 20 bytes, square wave, 1/2 sample rate freq
    WiimoteSend(1, 0x18, 20 shl 3, 0xC3,0xC3,0xC3,0xC3,0xC3,0xC3,0xC3,0xC3,0xC3,0xC3, 0xC3,0xC3,0xC3,0xC3,0xC3,0xC3,0xC3,0xC3,0xC3,0xC3)
    else if var.On and Wiimote.Two then
    // Report 18, send 20 bytes, square wave, 1/8 sample rate freq
    WiimoteSend(1, 0x18, 20 shl 3, 0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,0xCC,0xCC, 0x33,0x33,0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33)
    end if
    
    
    if pressed(Wiimote.A) then
    // Enable Speaker
    Wiimote.Report14 = 0x04 | Int(Wiimote.Rumble)
    // Mute Speaker
    Wiimote.Report19 = 0x04 | Int(Wiimote.Rumble)
    // Write 0x01 to register 0xa20009
    WiimotePoke(1, 0x04a20009, 0x01)
    // Write 0x08 to register 0xa20001
    WiimotePoke(1, 0x04a20001, 0x08)
    // Write 7-byte configuration to registers 0xa20001-0xa20008
    WiimotePoke(1, 0x04a20001, 0x00)
    WiimotePoke(1, 0x04a20002, 0x00)
    WiimotePoke(1, 0x04a20003, 0x00)
    WiimotePoke(1, 0x04a20004, var.freq)
    WiimotePoke(1, 0x04a20005, var.volume) // 40
    WiimotePoke(1, 0x04a20006, 0x00)
    WiimotePoke(1, 0x04a20007, 0x00)
    // Write 0x01 to register 0xa20008
    WiimotePoke(1, 0x04a20008, 0x01)
    // Unmute speaker
    Wiimote.Report19 = 0x00 | Int(Wiimote.Rumble)
    var.On = true
    end if
    
    if pressed(Wiimote.B) then
    var.On = false
    Wiimote.Report19 = 0x04 | Int(Wiimote.Rumble) // Mute Speaker
    Wiimote.Report14 = 0x00 | Int(Wiimote.Rumble) // Disable speaker
    end if
    
    if pressed(Wiimote.Plus) then
    var.freq--
    debug = var.freq
    // Mute Speaker
    Wiimote.Report19 = 0x04 | Int(Wiimote.Rumble)
    // Write 0x01 to register 0xa20009
    WiimotePoke(1, 0x04a20009, 0x01)
    // Write 0x08 to register 0xa20001
    WiimotePoke(1, 0x04a20001, 0x08)
    // Write 7-byte configuration to registers 0xa20001-0xa20008
    WiimotePoke(1, 0x04a20001, 0x00)
    WiimotePoke(1, 0x04a20002, 0x00)
    WiimotePoke(1, 0x04a20003, 0x00)
    WiimotePoke(1, 0x04a20004, var.freq) // max volume?
    WiimotePoke(1, 0x04a20005, var.volume)
    WiimotePoke(1, 0x04a20006, 0x00)
    WiimotePoke(1, 0x04a20007, 0x00)
    // Write 0x01 to register 0xa20008
    WiimotePoke(1, 0x04a20008, 0x01)
    // Unmute speaker
    Wiimote.Report19 = 0x00 | Int(Wiimote.Rumble)
    end if
    
    if pressed(Wiimote.Minus) then
    var.freq++
    debug = var.freq
    // Mute Speaker
    Wiimote.Report19 = 0x04 | Int(Wiimote.Rumble)
    // Write 0x01 to register 0xa20009
    WiimotePoke(1, 0x04a20009, 0x01)
    // Write 0x08 to register 0xa20001
    WiimotePoke(1, 0x04a20001, 0x08)
    // Write 7-byte configuration to registers 0xa20001-0xa20008
    WiimotePoke(1, 0x04a20001, 0x00)
    WiimotePoke(1, 0x04a20002, 0x00)
    WiimotePoke(1, 0x04a20003, 0x00)
    WiimotePoke(1, 0x04a20004, var.freq) // max volume?
    WiimotePoke(1, 0x04a20005, var.volume)
    WiimotePoke(1, 0x04a20006, 0x00)
    WiimotePoke(1, 0x04a20007, 0x00)
    // Write 0x01 to register 0xa20008
    WiimotePoke(1, 0x04a20008, 0x01)
    // Unmute speaker
    Wiimote.Report19 = 0x00 | Int(Wiimote.Rumble)
    end if

  2. #2
    Member Nave's Avatar
    Join Date
    Dec 2006
    Location
    Canada, Oshawa
    Posts
    261
    Thanks
    0
    Thanked 2 Times in 2 Posts
    Oh dude, should make it so it will have conversations with you when you press a button lol. Or shake it up and it start yelling to cool it lol, SO many possibilities!
    Rrrrrol up the Rrrrrrim Stats:

    "Please play again" = 25
    Free Coffee/Donut = 4

  3. #3
    Junior Member DudeMG's Avatar
    Join Date
    Aug 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Jamezli View Post
    http://www.battleclan.ca/content/view/698/116/

    Here is the GlovePIE script from the site:
    Code:
    // Carl Kenner's Wiimote Speaker Test script! Version 2
    // A = start sound, B = stop sound
    // Minus = decrease sample frequency
    // Plus = increase sample frequency
    // It takes a short time to start (due to delays built into Poke)
    
    // Change the next line to set the rate at which sound data is sent
    // BUT it must be low enough for the wiimote to respond to the B button
    // it may depend on your PC speed. Must be at least 91 for freq 13.
    pie.FrameRate = 120 Hz
    
    if not var.initialized then
    var.freq = 13 // Set sample rate = 3640 Hz (so computer can keep up)
    var.volume = 0x40 // volume = 40 ??? Seems to be about max
    debug = var.freq
    var.initialized = true
    end if
    
    if var.On and (not Wiimote.One) and (not Wiimote.Two) then
    // Report 18, send 20 bytes, square wave, 1/4 sample rate freq
    WiimoteSend(1, 0x18, 20 shl 3, 0xCC,0x33,0xCC,0x33,0xCC,0x33,0xCC,0x33,0xCC,0x33, 0xCC,0x33,0xCC,0x33,0xCC,0x33,0xCC,0x33,0xCC,0x33)
    else if var.On and Wiimote.One then
    // Report 18, send 20 bytes, square wave, 1/2 sample rate freq
    WiimoteSend(1, 0x18, 20 shl 3, 0xC3,0xC3,0xC3,0xC3,0xC3,0xC3,0xC3,0xC3,0xC3,0xC3, 0xC3,0xC3,0xC3,0xC3,0xC3,0xC3,0xC3,0xC3,0xC3,0xC3)
    else if var.On and Wiimote.Two then
    // Report 18, send 20 bytes, square wave, 1/8 sample rate freq
    WiimoteSend(1, 0x18, 20 shl 3, 0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,0xCC,0xCC, 0x33,0x33,0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33)
    end if
    
    
    if pressed(Wiimote.A) then
    // Enable Speaker
    Wiimote.Report14 = 0x04 | Int(Wiimote.Rumble)
    // Mute Speaker
    Wiimote.Report19 = 0x04 | Int(Wiimote.Rumble)
    // Write 0x01 to register 0xa20009
    WiimotePoke(1, 0x04a20009, 0x01)
    // Write 0x08 to register 0xa20001
    WiimotePoke(1, 0x04a20001, 0x08)
    // Write 7-byte configuration to registers 0xa20001-0xa20008
    WiimotePoke(1, 0x04a20001, 0x00)
    WiimotePoke(1, 0x04a20002, 0x00)
    WiimotePoke(1, 0x04a20003, 0x00)
    WiimotePoke(1, 0x04a20004, var.freq)
    WiimotePoke(1, 0x04a20005, var.volume) // 40
    WiimotePoke(1, 0x04a20006, 0x00)
    WiimotePoke(1, 0x04a20007, 0x00)
    // Write 0x01 to register 0xa20008
    WiimotePoke(1, 0x04a20008, 0x01)
    // Unmute speaker
    Wiimote.Report19 = 0x00 | Int(Wiimote.Rumble)
    var.On = true
    end if
    
    if pressed(Wiimote.B) then
    var.On = false
    Wiimote.Report19 = 0x04 | Int(Wiimote.Rumble) // Mute Speaker
    Wiimote.Report14 = 0x00 | Int(Wiimote.Rumble) // Disable speaker
    end if
    
    if pressed(Wiimote.Plus) then
    var.freq--
    debug = var.freq
    // Mute Speaker
    Wiimote.Report19 = 0x04 | Int(Wiimote.Rumble)
    // Write 0x01 to register 0xa20009
    WiimotePoke(1, 0x04a20009, 0x01)
    // Write 0x08 to register 0xa20001
    WiimotePoke(1, 0x04a20001, 0x08)
    // Write 7-byte configuration to registers 0xa20001-0xa20008
    WiimotePoke(1, 0x04a20001, 0x00)
    WiimotePoke(1, 0x04a20002, 0x00)
    WiimotePoke(1, 0x04a20003, 0x00)
    WiimotePoke(1, 0x04a20004, var.freq) // max volume?
    WiimotePoke(1, 0x04a20005, var.volume)
    WiimotePoke(1, 0x04a20006, 0x00)
    WiimotePoke(1, 0x04a20007, 0x00)
    // Write 0x01 to register 0xa20008
    WiimotePoke(1, 0x04a20008, 0x01)
    // Unmute speaker
    Wiimote.Report19 = 0x00 | Int(Wiimote.Rumble)
    end if
    
    if pressed(Wiimote.Minus) then
    var.freq++
    debug = var.freq
    // Mute Speaker
    Wiimote.Report19 = 0x04 | Int(Wiimote.Rumble)
    // Write 0x01 to register 0xa20009
    WiimotePoke(1, 0x04a20009, 0x01)
    // Write 0x08 to register 0xa20001
    WiimotePoke(1, 0x04a20001, 0x08)
    // Write 7-byte configuration to registers 0xa20001-0xa20008
    WiimotePoke(1, 0x04a20001, 0x00)
    WiimotePoke(1, 0x04a20002, 0x00)
    WiimotePoke(1, 0x04a20003, 0x00)
    WiimotePoke(1, 0x04a20004, var.freq) // max volume?
    WiimotePoke(1, 0x04a20005, var.volume)
    WiimotePoke(1, 0x04a20006, 0x00)
    WiimotePoke(1, 0x04a20007, 0x00)
    // Write 0x01 to register 0xa20008
    WiimotePoke(1, 0x04a20008, 0x01)
    // Unmute speaker
    Wiimote.Report19 = 0x00 | Int(Wiimote.Rumble)
    end if
    hi im new and wondering, what do you do with this?

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •