#!/bin/sh # Rockman 2 - Dr Wily no Nazo (J) cheat code generator for FCEU # This program updates the rockman2.cht file of FCE Ultra. # Copyright (C) 1992,2005 Bisqwit (http://iki.fi/bisqwit/) # converted by hanzou in January 2006 to support Rockman 2 # Stages: # 0-7 = heat,air,wood,bubble,quick,flash,metal,clash # 8 = wily1 # 9 = wily2 # 10 = wily3 # 11 = wily4 # 12 = wily5 (rematches) # 13 = wily6 # 14 = ?? # 15 = intro ################################################################## # Update these variables to your preference. -1 = cheat disabled stage=-1 life=100 # stages beaten/items owned: heat=1 air=1 wood=1 bubble=1 quick=1 flash=1 metal=1 clash=1 item1=1 item2=1 item3=1 # energy gauges: H=28 A=28 W=28 B=28 Q=28 F=28 M=28 C=28 I1=28 I2=28 I3=28 P=-1 blink=55 ############################################ echo_p() { v=$2 [ "$2" = "-1" ] && echo -n ':' && v=255 printf '%s:%02x:%s\n' $3 $v $1 } ( weapons=0 [ $heat = "1" ] && let "weapons += 1" [ $air = "1" ] && let "weapons += 2" [ $wood = "1" ] && let "weapons += 4" [ $bubble = "1" ] && let "weapons += 8" [ $quick = "1" ] && let "weapons += 16" [ $flash = "1" ] && let "weapons += 32" [ $metal = "1" ] && let "weapons += 64" [ $clash = "1" ] && let "weapons += 128" echo_p 'weapons' $weapons 009A items=0 [ $item1 = "1" ] && let "items += 1" [ $item2 = "1" ] && let "items += 2" [ $item3 = "1" ] && let "items += 4" echo_p 'items' $items 009B echo_p 'H' $H 009C echo_p 'A' $A 009D echo_p 'W' $W 009E echo_p 'B' $B 009F echo_p 'Q' $Q 00A0 echo_p 'F' $F 00A1 echo_p 'M' $M 00A2 echo_p 'C' $C 00A3 echo_p '1' $I1 00A4 echo_p '2' $I2 00A5 echo_p '3' $I3 00A6 echo_p 'P' $P 06C0 echo_p 'life' $life 00A8 echo_p 'stage' $stage 002A echo_p 'blink' $blink 004B ) | tee ~/.fceultra/cheats/rockman2.cht > ~/.fceultra/cheats/megaman2.cht