|
|||
CommunicationIt’s possible to communicate with Guitar Zero using a 3.3V FTDI USB-serial cable. Guitar Zero has headers that are compatible with this cable. I’ve written a script for converting Guitar Hero and Rockband files into button presses which is how I made the Fire and Flames FC 100% run through below. I also have scripts for downloading from and uploading to the Guitar Zero mod. The scripts (and button presses for several songs) are in the Downloads directory. Guitar Zero has a basic prompt interface with several commands including the following: h Display help screen i Display basic settings dbi # Dump information on bank # db # Dump the entire song at bank # ra # Read an address from the EEPROM wa # # Write data to an address in the EEPROM sb # Set the active bank ss # # Set the size of a song at in a given memory bank Detailed Serial Interface InstructionsCommunicating with the Guitar Zero Mod over serial requires an FTDI cable, available here and here for $20. This one also works great and is a little cheaper. The serial interface uses the same pins that drive the LED that normally indicates Guitar Zero’s status, so using serial means temporarily disabling the LED. The Guitar Zero Mod also needs to know that it should send serial communication signals instead of powering the LED. Step 1: hold GRYBO + UPSTRUM for 4 seconds to put the mod into serial mode. the LED should turn red. note that you have to press all the buttons more or less at the same time. This same technique can be repeated to put the mod back into LED mode. (Or just type super-secret serial command “goled”) Step 2 (optional): remove the LED jumper on Guitar Zero PCB. It is located a little to the left of the LED. Serial communication will still work with this jumper in place, so in later versions I’ll probably not even include a jumper. The next step is to install the FTDI Virtual Com port drivers available here. Next we will communicate with the mod using a terminal. First connect the FTDI cable to the mod – the black wire toward the top pin. You can see the serial communication pins in this picture, the black wire should line up with the pin labeled GND on the PCB in that picture. The rest works slightly different on the Mac or PC. Mac: open a terminal window. First we need to find the ‘device’ for your FTDI cable. type: ll -l /dev/ | grep usbserial and look for something like /dev/cu.usbserial-FTE1XLT3. Next type stty -f /dev/cu.usbserial-FTE1XLT3 (or whatever is appropriate) and then screen /dev/cu.usbserial-FTE1XLT3 38400 This will put you in a terminal window where you can communicate with the Guitar Zero mod. type ‘i’ and hit enter and you should see some basic information. You can type ‘goled’ to put the guitar back into LED mode without needing to use the GRYBO+UPSTRUM technique. press ctrl+\ when you want to exit this program. PC: First, right-click on My Computer and select Properties. Click on the Hardware tab and open Device Manager. Expand the Ports(COM & LPT) section and you should see something that says USB Serial (COM3) or something like that. The name in parenthesis is the COM port that you will be using. Open Hypterterminal (Start->Programs->Accessories->Communications->Hyperterminal). Choose a dorky telephone icon and type a name like Guitar Zero and click okay. Then select the COM port you identified earlier and click OK. Finally Select 38400 bits per second, 8 data bits, Parity: None, Stop bits: 1, and Flow Control: None. You should now be able to type ‘i’ and see some basic information about the mod. You can type ‘goled’ to put the guitar back into LED mode without needing to use the GRYBO+UPSTRUM technique. Now that you have (hopefully) verified that you can communicate with the mod over serial, close the terminal program – otherwise it will intercept communications to and from my scripts. I’ve also noticed a peculiarity on Windows, you can only communicate with the device in scripts if you have first communicated with it in Hyperterminal. If you disconnect the FTDI cable and connect it again – you’ll need to open Hyperterminal again and connect to the device again. I don’t know why this is, maybe something wrong with my serial initialization code… Mac: Install XCode from the OS X install CD. Then download Device::SerialPort, a perl module. Save the file your Mac and then in terminal go to the directory where you saved this. type tar xfvz Device-SerialPort-1.04.tar.gz then cd into Device-SerialPort-1.04 and type the following commands perl Makefile.PL make sudo make install Next, download putsongblock.pl, getsong.pl, and settings.pl from here. Edit the $ftdi=”" line in settings.pl to reflect the path for your usb cable. You should now be able to put songs on the guitar and download them from the guitar using the following commands: putsongblock.pl [bank#] [filename.g0] and getsong.pl [bank#] > [filename.g0] PC: Install ActiveState Perl (google it). Download Win32::Serialport. Open the file using something like winzip or 7zip. You’ll have to open it twice – unzip it once and untar it once – a program like 7zip can do both. Save these files somewhere on your computer and then double click on install.pl. and Win32::SerialPort should now be installed. Download win32getsong.pl, win32putsongblock.pl, and settings.pl from here. Edit settings.pl so that the $ftdi = “” line reads $ftdi = "COM3"; or whatever is appropriate for your computer. Open a command window (Start->Run… and then type ‘cmd’) and cd to the directory where you saved these scripts. you should now be able to put songs on the guitar and download songs from the guitar using the following commands: win32putsongblock.pl [bank#] [filename.g0] and win32getsong.pl [bank#] > [filename.g0] For later versions, the “putsong” command is win32putsongblock.pl -at25 [bank#] [filename.g0] Good luck. |
|||
|
Copyright © 2012 Ben Scott |
|||