help adapt code from atmega328 to attiny85

im working on a small avr oscillocope that use the analog pin to read the voltage and display it on the pc.
here is the base hardware that im using.

it works for the hardware but i cant get the software to work.

windows recognizes it as a usb game controller and the UI is in another language. it also may not work on win7x64 (which is what im running)

i also built up a quick and dirty oscilloscope with the arduino uno.
https://code.google.com/p/xoscillo/
it is detected as a COM port and has nice software

HERE IS WHAT I WANT....
i want to use the board that i made with the attiny85 paired with usb to work on the other software and recognized as a COMM port.

is this possible and where would i start.

code for the attiny85 (HEX) http://www.reality.be/files/main.hex
code for the arduino uno (INO)
this is the code i want to adapt to use with the attiny85 chip and vusb.

// Scopino - Scope application
// By Amit Zohar
// Ver 1.0, 10/9/12
const int maxSamples = 500;
const int maxSampChan = maxSamples/2;
const int maxChannel = 2;
word samples[maxSamples];
int channel=1, timeRes=200, timeStep=1, voltAmp=2, voltCoup=0, trigVal=0, trigMode=0;
//unsigned long times[maxSamples]; // Time stamp debugging
const int pinSquare=2;

void setup() {
  Serial.begin(115200); // Fast IO
  Serial.setTimeout(10); // Quick read
  pinMode(pinSquare, OUTPUT); // Square wave 100Hz
  tone(pinSquare, 100);
}

///////////////////////// Process serial input
// Protocol: *C<channel>T<time resolution>S<samples division>V<voltage amp.>P<voltage coupling>G<trigger value>H<trigger mode>E
// (C) Channel: 1-2
// (T) Time resolution: at least 200uSec per channel
// (S) Samples division: divide # of samples for speed
// (V) Voltage amp.: 1=amplified (H/W), 2=0-5V as-is, 3=0-50V attenuated by 10 (H/W)
// (P) Voltage coupling: 0=DC, 1=AC (H/W)
// (G) Trigger value: value needed to be crossed for trigger (0-1023)
// (H) Trigger mode: 0=free run, 1=positive slope, 2=negative slope, 3=both slopes
// Example: *C10T5S333V8P1G1H2E
// Default: *C1T200S1V2P0G0H0E
void getCommand()
{
  const int recBuf=64;
  if (Serial.available() > 0) // Incoming chars?
  {
    delay(10); // Let all chars arrive
    char recRare[recBuf];
    int chars = Serial.readBytes(recRare,recBuf); // Get buf to String
    recRare[chars] = 0;
    String rec = recRare;
    if (rec.startsWith("*")) // Valid frame start
    {
      //      Serial.write('*');
      int posC = rec.indexOf("C");
      int posT = rec.indexOf("T");
      int posS = rec.indexOf("S");
      int posV = rec.indexOf("V");
      int posP = rec.indexOf("P");
      int posG = rec.indexOf("G");
      int posH = rec.indexOf("H");
      int posE = rec.indexOf("E");
      String prm;
      char ca[recBuf];
      prm = rec.substring(posC+1,posT); // Channel
      prm.toCharArray(ca,sizeof(ca));
      channel = atoi(ca);
      prm = rec.substring(posT+1,posS); // Time resolution
      prm.toCharArray(ca,sizeof(ca));
      timeRes = atoi(ca);
      prm = rec.substring(posS+1,posV); // Samples division
      prm.toCharArray(ca,sizeof(ca));
      timeStep = atoi(ca);
      prm = rec.substring(posV+1,posP); // Voltage amp.
      prm.toCharArray(ca,sizeof(ca));
      voltAmp = atoi(ca);
      prm = rec.substring(posP+1,posG); // Voltage coup.
      prm.toCharArray(ca,sizeof(ca));
      voltCoup = atoi(ca);
      prm = rec.substring(posG+1,posH); // Trigger value
      prm.toCharArray(ca,sizeof(ca));
      trigVal = atoi(ca);
      prm = rec.substring(posH+1,posE); // Trigger mode
      prm.toCharArray(ca,sizeof(ca));
      trigMode = atoi(ca);
      //      Serial.print(channel); // Debugging
      //      Serial.print(',');
      //      Serial.print(timeRes);
      //      Serial.print(',');
      //      Serial.print(timeStep);
      //      Serial.print(',');
      //      Serial.print(voltAmp);
      //      Serial.print(',');
      //      Serial.print(voltCoup);
      //      Serial.print(',');
      //      Serial.print(trigVal);
      //      Serial.print(',');
      //      Serial.print(trigMode);
      //      Serial.print(',');
    }
  }
}

///////////////////////// Sample
unsigned long sample()
{
  // Trigger check
  int preSamp=-1, curSamp;
  const int waitTrig = 1000;
  for  (int i=0; i<=waitTrig; i++) // Try to catch the trigger
  {
    if ( trigMode == 0) break; // Free run
    curSamp = analogRead(0);
    if (preSamp != -1) // We have previous sample
    {
      boolean pos = false, neg = false; // Calculate which slope it is
      if (preSamp < trigVal && curSamp >= trigVal) pos = true;
      if (preSamp >= trigVal && curSamp < trigVal) neg = true;
      if ( trigMode == 1 && pos) break; // Positive slope
      if ( trigMode == 2 && neg) break; // Negative slope
      if ( trigMode == 3 && (pos || neg)) break; // Both
    }
    preSamp = curSamp; // Save last sample
    if (i == waitTrig) return 0; // No trigger, do some other work
  }

  // Sampling
  //  unsigned long timeSamp; // Time stamp debugging
  unsigned long samp1, timeFrom1, nextSamp;
  int rawSamp;
  samp1 = micros(); // Sampling start
  for ( unsigned long i=0;i<maxSamples/timeStep;i++) // Sampling loop
  {
    //    timeSamp = micros(); // Time stamp debugging
    //    times[i] = timeSamp-firstSamp; // Time stamp debugging
    for (int ch=0; ch<channel; ch++) // Sample all channels (reuse buffer for channel 2)
      samples[i+maxSampChan*ch] = analogRead(ch);

    nextSamp = timeRes*(i+1); // Time for next sample
    do timeFrom1 = micros()-samp1; // Wait for next sample time
    while (timeFrom1 < nextSamp);
  }
  return timeFrom1;
}

///////////////////////// Send output
// Protocol: *Channel>Time resolution:Sample1,Sample2...,
void sendSamples(unsigned long sampTime)
{
  String samp;
  for (int ch=0; ch<channel; ch++) // Sample all channels
  {
    //    Serial.print("*1:");
    Serial.print("*"); // Channel
    Serial.print(ch+1);
    Serial.print(":");

    Serial.print(sampTime/maxSamples); // Time resolution
    Serial.print(">");
    for (int i=0;i<maxSamples/timeStep;i++) // Samples
    {
      //    Serial.print(times[i]); // Time stamp debugging
      //    Serial.print('=');
      samp =  String(samples[i+maxSampChan*ch], HEX); // Send in HEX format   
      Serial.print(samp);
      Serial.print(',');
    }
    Serial.println();
  }
}

void loop(){
  getCommand(); // We listen to the master program
  unsigned long sampTime = sample(); // We sample
  if (sampTime > 0) sendSamples(sampTime); // We have samples
}

I'm not too optimistic about that fitting into the 85 chip. You only have 8K of Flash memory and only 512b of SRAM. You've defined maxsamples to be 500 word-length items, which is almost more than twice the data space you have. Add in the other arrays you define and you don't have a prayer. EEPROM isn't going to help much, either, because it's slow and has a finite R/W cycle.

what if i only use one analog pin instead of dual channel and reduce the samples? do you think it would make any difference.

the only avr chips i have are attiny85's; atmega328p-pu's; atmega32u4's; and a big ass1284p.
i guess i could build a board with a 32u4 with built in usb support so i dont have to modify code, but that sure is a lot of wasted IO's just to read the values of 2 analog pins.

anyone with a suggestion