(keitai-l) Doja 4.0 emulator problems

From: Peter <piteco_at_gmail.com>
Date: 08/18/05
Message-ID: <43048C6C.7020208@gmail.com>
    I'm developing games using Eclipse 3.1 and Doja 4.0 emulator, but 
I'm having some problems with the emulator:
    * the /Graphics.fillRect(int x, int y, int width, int height)/ is
      not working - the emulator simply seems to ignore calls to this
      method. I'm setting correctly the clip area, but the area isn't
      filled. I've done a workaround using a loop like

            for (int i = x; i < x + width; i++)
                g.drawLine(i, y, i, y + height);

          but this is certainly *much *slower than making a single call 
to fillRect.

    * calls to System.currentTimeMillis() often returns the same value.
      I'm using the system time to synchronize animations, but the
      method isn't returning the correct values. Here are some values
      printed to the console during a loop:

    call number 0: 1124370216093
    call number 1: 1124370216140
    *call number 2: 1124370216218
    call number 3: 1124370216218*
    call number 4: 1124370216406
    *call number 5: 1124370216421
    call number 6: 1124370216421*
    call number 7: 1124370216625
    *call number 8: 1124370216718
    call number 9: 1124370216718*
    call number 10: 1124370216937
    *call number 11: 1124370217046
    call number 12: 1124370217046
    call number 13: 1124370217265
    call number 14: 1124370217265

    *

    It's worth noting that this is an actual game loop and so, between 
the calls, I'm doing a lot of calculations and method calls, so it's 
very strange that consecutive calls return the same value. Running the 
same loop on a Nokia 7210 emulator gives me some more accurate values:


    call number 0: 1124359929265
    call number 1: 1124359929343
    call number 2: 1124359929406
    call number 3: 1124359929468
    call number 4: 1124359929531
    call number 5: 1124359929593
    call number 6: 1124359929687
    call number 7: 1124359929750
    call number 8: 1124359929812
    call number 9: 1124359929875
    call number 10: 1124359929953
    call number 11: 1124359930015
    call number 12: 1124359930078
    call number 13: 1124359930140
    call number 14: 1124359930203

    In other words: calls to System.currentTimeMillis() shouldn't *ever* 
return the same values. Since it is returning strange values, it's hard 
to implement a good animation. Any ideas on how to solve or any 
workarounds for these problems?

Peter
Received on Thu Aug 18 16:26:09 2005