Jump to content



1

Some Z26 Controller Scripts For GlovePIE


2 replies to this topic

#1 Vic George 2K3 OFFLINE  

Vic George 2K3

    Quadrunner

  • 5,078 posts
  • GNAP ATTACK!!!
  • Location:Westfield, MA, USA

Posted Fri Apr 8, 2011 5:01 AM

Some that I made for the Z26 emulator, for playing Atari 2600 games, mostly the joystick-controlled ones. This is the script that just uses the Wii Remote:
wiimote.Leds = 0
Up = wiimote.Right
Down = wiimote.Left
Left = wiimote.Up
Right = wiimote.Down
F2 = wiimote.Minus //Select
F1 = wiimote.Plus //Start
Escape = wiimote.Home //Exit
Control = wiimote.One
Control = wiimote.Two
And this is the script that uses the Classic Controller:
wiimote.Leds = 0
Up = wiimote.classic.Up or Wiimote.Classic.Joy1Y < -0.2
Down = wiimote.classic.Down or Wiimote.Classic.Joy1Y > 0.2
Left = wiimote.classic.Left or Wiimote.Classic.Joy1X < -0.2
Right = wiimote.classic.Right or Wiimote.Classic.Joy1X > 0.2
F2 = wiimote.classic.Minus //Select
F1 = wiimote.classic.Plus //Start
Escape = wiimote.classic.Home //Exit
Control = wiimote.classic.B

Some specialized versions of the Z26 Classic Controller script for certain Atari 2600 games:

Tron Deadly Discs: This simulates as best as it can a dual firing joystick for games where dual firing joysticks may be or are required but were forced into using a single joystick and action button when ported to the Atari 2600. This script also works for Vanguard and Tutankham.

// Z26 Emulator Controller Script for Tron Deadly Discs
wiimote.Leds = 0
Up = wiimote.classic.Up or Wiimote.Classic.Joy1Y < -0.2
Down = wiimote.classic.Down or Wiimote.Classic.Joy1Y > 0.2
Left = wiimote.classic.Left or Wiimote.Classic.Joy1X < -0.2
Right = wiimote.classic.Right or Wiimote.Classic.Joy1X > 0.2
F2 = wiimote.classic.Minus //Select
F1 = wiimote.classic.Plus //Start
Escape = wiimote.classic.Home //Exit
Up&&Control = wiimote.classic.Joy2Y < -0.2
Down&&Control = wiimote.classic.Joy2Y > 0.2
Left&&Control = wiimote.classic.Joy2X < -0.2
Right&&Control = wiimote.classic.Joy2X > 0.2

Raiders Of The Lost Ark: This game actually uses two joysticks; one for moving Indiana Jones and the other for selecting the objects in his inventory. I simply put them onto one controller, with the Left Stick moving Indiana Jones and the Right Stick for selecting his inventory. Button B uses the selected item in his inventory and Button A selects the item.

wiimote.Leds = 0
Up = wiimote.classic.Up or Wiimote.Classic.Joy1Y < -0.2
Down = wiimote.classic.Down or Wiimote.Classic.Joy1Y > 0.2
Left = wiimote.classic.Left or Wiimote.Classic.Joy1X < -0.2
Right = wiimote.classic.Right or Wiimote.Classic.Joy1X > 0.2
E = Wiimote.Classic.Joy2Y < -0.2
D = Wiimote.Classic.Joy2Y > 0.2
S = Wiimote.Classic.Joy2X < -0.2
F = Wiimote.Classic.Joy2X > 0.2
F2 = wiimote.classic.Minus //Select
F1 = wiimote.classic.Plus //Start
Escape = wiimote.classic.Home //Exit
Control = wiimote.classic.B
N = wiimote.Classic.A

Stargate: This sequel to Defender uses two joysticks; one of them for the main control of the ship and the other for the remaining three weapons. All the controls you need to play this game are all put into one controller.

wiimote.Leds = 0
Up = wiimote.classic.Up or Wiimote.Classic.Joy1Y < -0.2
Down = wiimote.classic.Down or Wiimote.Classic.Joy1Y > 0.2
Left = wiimote.classic.Left or Wiimote.Classic.Joy1X < -0.2
Right = wiimote.classic.Right or Wiimote.Classic.Joy1X > 0.2
F2 = wiimote.classic.Minus //Select
F1 = wiimote.classic.Plus //Start
Escape = wiimote.classic.Home //Exit
Control = wiimote.classic.B //Fire
N = wiimote.Classic.A //Smart Bomb
E = wiimote.Classic.Y //Inviso
D = wiimote.Classic.X //Hyperspace

Star Raiders: This game uses both the joystick and the Video Touch Pad, which is basically a fancied-up version of the Atari 2600 keypad controller. Again all the controls needed for playing this game are all put onto one controller.

// Z26 Emulator Controller Script for Star Raiders
wiimote.Leds = 0
Up = wiimote.classic.Up or Wiimote.Classic.Joy1Y < -0.2
Down = wiimote.classic.Down or Wiimote.Classic.Joy1Y > 0.2
Left = wiimote.classic.Left or Wiimote.Classic.Joy1X < -0.2
Right = wiimote.classic.Right or Wiimote.Classic.Joy1X > 0.2
F2 = wiimote.classic.Minus //Select
F1 = wiimote.classic.Plus //Start
Escape = wiimote.classic.Home //Exit
Control = wiimote.classic.B //Fire
Key.1 = wiimote.classic.Y //Keypad 1
Key.2 = wiimote.classic.X //Keypad 2
Key.3 = wiimote.classic.A //Keypad 3
Q = wiimote.classic.LFull //Keypad 4
W = wiimote.classic.RFull //Keypad 5

Tank Games: For simulating tank controls in games like Combat, Battlezone, and Robot Tank.

// Z26 Emulator Controller Script for Tank Games
wiimote.Leds = 0
Up = wiimote.Classic.Joy1Y < -0.2 and Wiimote.Classic.Joy2Y < -0.2
Down = wiimote.Classic.Joy1Y > 0.2 and Wiimote.Classic.Joy2Y > 0.2
Left = wiimote.Classic.Joy1Y > 0.2 and Wiimote.Classic.Joy2Y < -0.2
Right = wiimote.Classic.Joy1Y < -0.2 and Wiimote.Classic.Joy2Y > 0.2
F2 = wiimote.classic.Minus //Select
F1 = wiimote.classic.Plus //Start
Escape = wiimote.classic.Home //Exit
Control = wiimote.classic.ZR


#2 dwane413 OFFLINE  

dwane413

    Chopper Commander

  • 233 posts
  • Location:Oklahoma

Posted Fri Apr 8, 2011 7:10 PM

View PostVic George 2K3, on Fri Apr 8, 2011 5:01 AM, said:

Some that I made for the Z26 emulator, for playing Atari 2600 games, mostly the joystick-controlled ones.

Thanks. I didn't even know that you could use Wiimotes on a PC until I saw your Wii-fying my PC post a few days ago. I don't have a Wii, but yesterday I took my laptop to my brothers house and was able to get it working with my sister-in-laws Wiimotes. My biggest problem was pairing until I found out that with some drivers you need to "press ALT-S to skip the passkey step".

I used Stella instead of Z26. I got two remotes connected and tried Combat and Surround to test that they were both working. I also played Hack 'Em.

Since I couldn't find any scripts for Stella, I took an existing script for Secret Maryo Chronicles (which I also played) and edited it for Stella.

wiimote.Led1 = true
wiimote2.Led2 = true
Up = wiimote.Right
Down = wiimote.Left
Left = wiimote.Up
Right = wiimote.Down
Key.LeftControl = Wiimote.Two
Key.LeftControl = wiimote.One
Key.Pause = wiimote.A
Key.F1 = wiimote.Minus
Key.F2 = wiimote.Plus
Key.Pause = wiimote2.A
Key.Y = wiimote2.Right
Key.H = wiimote2.Left
Key.G = wiimote2.Up
Key.J = wiimote2.Down
Key.F = wiimote2.Two
Key.F = wiimote2.One
Enter = wiimote.B
Key.Escape = Wiimote.Home

I think everything worked except for "Pause".

Anyway, thanks for introducing me to GlovePIE and for the scripts. Do you or anyone else have a script using the Wii Remote for the paddles that would work in Stella or Z26? I found mention of someone using one, but couldn't find the script:

Wiimote + Bluetooth = Awesome lightgun / NES Zapper and 2600 Paddle controller!

Quote

Which brings me to....Atari 2600 paddle games! The wiimote also has motion sensors. You could continue to use the Wiimote in lightgun mode and "point" to track the 2600 paddle controller (which works reasonably well), but I've found its more fun, and more intuitive to rotate the controller and hold it in two hands like some Wii driving games. Instead of twisting a dial, you "steer" like you would a car. I do about as well with Kaboom as I used to with the real controller. Great stuff.

If no one has a paddle script, I may be able to modify the script found on this page later on:
Pvt. John Doe's Steering Wheel Script

Edited by dwane413, Fri Apr 8, 2011 7:32 PM.


#3 Vic George 2K3 OFFLINE  

Vic George 2K3

    Quadrunner

  • 5,078 posts
  • GNAP ATTACK!!!
  • Location:Westfield, MA, USA

Posted Sat Apr 9, 2011 2:29 PM

Here's a script I created for games like Starmaster, which use the TV Type and difficulty switches. Button A toggles the TV Type switch, and Buttons ZL and ZR toggle the left and right difficulty switches. You can also use this script for other games.

wiimote.Leds = 0
Up = wiimote.classic.Up or Wiimote.Classic.Joy1Y < -0.2
Down = wiimote.classic.Down or Wiimote.Classic.Joy1Y > 0.2
Left = wiimote.classic.Left or Wiimote.Classic.Joy1X < -0.2
Right = wiimote.classic.Right or Wiimote.Classic.Joy1X > 0.2
F2 = wiimote.classic.Minus //Select
F1 = wiimote.classic.Plus //Start
Escape = wiimote.classic.Home //Exit
Control = wiimote.classic.B
//Use Button A to toggle Color and B&W Switch
if pressed(wiimote.classic.A) then var.NumberA++
if var.NumberA > 2 then var.NumberA = 1
F3 = delta(var.NumberA) and (var.NumberA = 1)
F4 = delta(var.NumberA) and (var.NumberA = 2)
//Use Button ZL to toggle Left Difficulty Switch
if pressed(wiimote.classic.ZL) then var.NumberB++
if var.NumberB > 2 then var.NumberB = 1
F5 = delta(var.NumberB) and (var.NumberB = 1)
F6 = delta(var.NumberB) and (var.NumberB = 2)
//Use Button ZR to toggle Right Difficulty Switch
if pressed(wiimote.classic.ZR) then var.NumberC++
if var.NumberC > 2 then var.NumberC = 1
F7 = delta(var.NumberC) and (var.NumberC = 1)
F8 = delta(var.NumberC) and (var.NumberC = 2)





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users