Shop OBEX P1 Docs P2 Docs Learn Events
Introducing MIGS: Multi Interface Game-control Standard — Parallax Forums

Introducing MIGS: Multi Interface Game-control Standard

Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
edited 2012-06-05 10:46 in Propeller 1
Welcome to MIGS: the Multi Interface Game-control Standard

The goal of MIGS is to create an easy to implement standard for game control which allows Propeller games to implement commands which can be used with a variety of game control configurations without changing large portions of code.

In other words, any game which incorporates the "MIGS" control standard can be readily modified to be played on ANY Propeller setup. Any game incorporating this control system can be switched quickly from one controller to another by simply changing the MIGS object called in OBJ and adjusting the signal pin.

Currently support controllers with this release:

* NES Controllers (2 players )
* NESC3 NES Controllers with C3 (2 players)
* N64 Controller (2 players possible on a single controller.)
* PS2 Keyboard (2 players possible on a single keyboard.)
* Virtual Keyboard / Reads I,J,L,K & CR from serial terminal
* Wii Classic & Pro Controller (1 player) Digital controls & left joystick compatible with NES
* Wii Nunchuck Controller & Nunchuck clones (1 player) Joystick and buttons

Attached is a simple TV demo and zip of MIGS version 1.2.

I'll be adding additional controllers to this system as I go along..

http://www.propellerpowered.com/library

Nope: gaming isn't dead..

OBC

Comments

  • Cluso99Cluso99 Posts: 18,069
    edited 2011-01-01 16:30
    OBC: Gaming on the prop is definately not dead. I have something in the pipe (not enough time) which has multiple interfaces (hardware) for connecting these and other game controllers. I have ordered a Wii Motion Plus and Wii NES controller which I am going to add also.

    Your solution here will be great asset.

    As I have said before, I don't write or play computer games, but I love to design hardware and write control software (which is what I did for a living). Just not enough time for everything I wnat to do :(
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2011-01-02 21:16
    Thanks Cluso!


    While working on this project, I also found a very simply way to connect the N64 controller.
    (It is one of my favorite controllers, but doesn't see a lot of action.)

    N64_2_Propeller.JPG

    {click to view}
    '' Power Up N64 Controller
    '' Signal pin on P0
    '' +3.3v on P1
    '' Ground on P2
    dira[1] := 1
    dira[2] := 1
    outa[1] := 1
    outa[2] := 0
    waitcnt(clkfreq / 10 + cnt)
    

    OBC
    274 x 539 - 15K
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2011-01-12 15:11
    Updates to MIGS today.

    Added NES_C3 and Virtual Keyboard (Serial)
    Link in top post.

    OBC
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2012-03-08 20:04
    Update to MIGS tonight.

    Added Basic controls for Wii Nunchuck controller. Joystick/Buttons

    OBC
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2012-03-09 13:25
    Update to MIGS 3/9/12

    Combined the Wii Nunchuck and Wii Classic Controllers to a single driver. (wiicombined.spin)
    Controls can also be "hot swapped" most of the time without negative effect.

    OBC
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2012-03-11 16:53
    Added a proceedure, required when using WiiCombined.spin.

    PUB readMIGS must be called once before checking input status. I've added the command to all of the migs drivers to insure they remain compatible, but because the Wii controllers are i2c, they were using far too many cycles to read the i2c lines at each pass of the loop.

    Wii Nunchuck & Will Classic controls now operate at blazing speed with this update. (Download in top thread)

    BTW, Here's some conversion code which will pretty much drop into many existing games to make them compatible with Migs.
    PUB NES_Read_Gamepad : nes_bits  
    
    ' //////////////////////////////////////////////////////////////////
    ' NES Game Paddle Read
    ' //////////////////////////////////////////////////////////////////       
    ' reads both gamepads in parallel encodes 8-bits for each in format
    ' right game pad #1 [15..8] : left game pad #0 [7..0]
    '
    ' RIGHT  = %00000001
    ' LEFT   = %00000010
    ' DOWN   = %00000100
    ' UP     = %00001000
    ' START  = %00010000
    ' SELECT = %00100000
    ' B      = %01000000
    ' A      = %10000000
     nes_bits := %00000000
     MIGS.readMIGS
    
      if MIGS.Player1_Right == 1 
         nes_bits |= %00000001
    
      if MIGS.Player1_Left == 1
         nes_bits |= %00000010
    
      if MIGS.Player1_Down == 1
         nes_bits |= %00000100
    
      if MIGS.Player1_Up == 1 
         nes_bits |= %00001000
    
      if MIGS.Start == 1 
         nes_bits |= %00010000
    
      if MIGS.Select == 1 
         nes_bits |= %00100000 
         
      if MIGS.B == 1
         nes_bits |= %01000000
         
      if MIGS.A == 1
         nes_bits |= %10000000
            
    ' //////////////////////////////////////////////////////////////////
    ' End NES Game Paddle Read
    ' //////////////////////////////////////////////////////////////////       
    
    
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2012-03-17 11:10
    Updated MIGS (download link in top of thread)

    Update includes:
    • Added support for Wii Classic Controller Pro
    • Added support for Nunchuck Clones (*may* also work with wireless)
    • Added left joystick to Wii Classic & Wii Classic Pro


    OBC
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2012-06-05 10:46
    • Updated Wii Controller drivers to prevent lockup when the controller isn't present at program start.
    • Changed official location of the MIGs software (See OP).


    OBC
Sign In or Register to comment.