public void calculateChecksum(Patch p, int start, int end, int ofs) { int sum = 0;
public void calculateChecksum(IPatch ip, int start, int end, int ofs) { Patch p = (Patch)ip; int sum = 0;
    public void calculateChecksum(Patch p, int start, int end, int ofs) {        int sum = 0;        for (int i = start; i <= end; i++)            sum += p.sysex[i];        sum += 0xA5;        p.sysex[ofs] = (byte) (sum % 128);        // p.sysex[ofs]=(byte)(p.sysex[ofs]^127);        // p.sysex[ofs]=(byte)(p.sysex[ofs]+1);    }