Skip to content
 

Implementing AntSnes with Qt part 5: Implementing the Blit

The current Qt version is implemented on top of the old Avkon layer, and it really doesn’t have fast blitting methods available. Therefore I Implemented the blit with Symbian’s Anti-Tearing API, which should be the fastest available method to draw on the screen. Forum.nokia has a very good example how to use the Anti-tearing API.
There’s a ton of Qt blog posts about graphics performance, so I’m not going though all that stuff again. Here’s one really good post about the performance: http://labs.trolltech.com/blogs/2009/12/16/qt-graphics-and-performance-an-overview/ I’ll make an update for the fast blit, when there’s real hardware acceleration for Qt in Symbian available, so I can make some benchmarking as well. Until then I’m going with the Anti-Tearing API.
For the blitting I’m using the scaling function I described in the my earlier blog post fast image scaling. The render function is implemented as Qt slot, so I can call it from another thread, see also my post about the worker thread.
Here’s the rendering function.

void QBlitterWidget::render()
 {
 if (IsActive())
    {
     Cancel();
    }
 TAcceleratedBitmapInfo bitmapInfo;
 iDSBitmap->BeginUpdate(bitmapInfo);
 bitmapdata = (TUint8*) bitmapInfo.iAddress;
 //blit the data
 bitmapBlit( g_screenptr, bitmapInfo.iAddress);
 iDSBitmap->EndUpdate(iStatus);
 SetActive();
 }

19 Comments

  1. Thomas says:

    Hi summeli,
    when comes the next Version of the Antsnes for Symbian S60 V5?
    Thomas

  2. ladocracku says:

    Hi,excuse me for my english,i thought to write this for helping on the svilup of antsnes,I have read some posts before about the multitouch funcionn,sayning doesn’t exist on nokia s60v5,and i put some wideo that prove the funcion of nokia multitouch. there are:
    http://www.youtube.com/watch?v=BqYoZUXKLoA&feature=player_embedded
    http://www.youtube.com/watch?v=XndW7YlvYjU
    http://www.youtube.com/watch?v=H5bEfkMLO9U&feature=related
    Please se this videos,they are real,because i have two of this games and they are multitouch!!!!!!!! With nokia nothing is imposible!!!!!!!!!!!

  3. Thomas says:

    Hi summeli,
    can you make the handling of Antsnes how the MameXM emu? This Video shows the i8910 and the hanling. http://www.youtube.com/watch?v=JaRazXTnI9Y
    Best wishes
    Thomas

  4. Thomas says:

    The design of Antsnes is much better! 😉 But the handling is good solved.

  5. Thomas says:

    Great news. 😉

  6. Fenrir007 says:

    Are those QT based emulators compatible with s60v3 phones like the N95?

  7. Thomas says:

    Hi summeli,
    one question. when comes the QT Version of Antsnes circa? Takes it still a long time? I hope this Version run without problems on my i8910. 😉
    For the S60 v3 there is already a working Antsnes, Fenrir007. Or mean you the gameboy and Playstation emu?
    Thomas

    • Summeli says:

      there’s not much to do before release. I just have been skiing basically this whole month, so I haven’t done much 🙂
      Maybe I’ll be more productive on next month, so I’ll get this release done 🙂

    • Fenrir007 says:

      My question was basically if stuff programmed on QT also works on S60v3. I know about antsnes s60v3, I have it installed in my cellphone. But I was wondering if that version will get updates – and if our v3 phones are QT compatible, I guess the answer would be yes.

      • Summeli says:

        The problem with my antsnes is that the resolution in s60 3rd edition phones is too small to get the same UI fit into the screen in any reasonable way. –> I’m not planning to make a separate UI for 3rd edition phones, so they will not be supported by me.

        • Fenrir007 says:

          I see. But is the problem only the UI itself? I mean, apart from that, everything should work in s60v3, then?
          If so, if someone decides to make a UI for the emulator in lower resolution, would you allow such work to be done?

          • Summeli says:

            I would even like that 🙂 All my sources are available at github, so anyone can make a lowres version of antsnes.

  8. danny 92 says:

    great work summeli ^^ are you able to do a video of the emulator ?

  9. Thomas says:

    great!!! Yes the hobby will override!
    Thomas

  10. killer07 says:

    hey summeli!
    i’ve been looking at your page for month and your work is incredible!
    but i’ve a question like danny 92:
    can you take a small video of what you’ve done before? i mean someone who has no knowledge in programming (like me 😀 ) cant understand what that codes mean.
    and i wish you luck mate 😉

  11. Thomas says:

    Hi summeli,
    Comes the Qt version of Antsnes still this month or next? I hope it comes soon. Or is the ski saison not over? 😉
    Best wishes from Germany
    Thomas

    • Summeli says:

      Skiing season is quite close to over. I hope that I’m able to make the first beta during this month. With, or without the stylesheet it still should be better than the old AntSnes….

Leave a Reply

(required)