Page 1 of 4 1234 LastLast
Results 1 to 10 of 35

Thread: Daedalus News - 2 more updates from StrmnNrmn's blog

                  
   
  1. #1
    DCEmu Rookie GeEkPiE's Avatar
    Join Date
    Apr 2006
    Location
    UK, hampshire
    Age
    28
    Posts
    148
    Rep Power
    46

    psp Daedalus News - 2 more updates from StrmnNrmn's blog

    Captain Morgan's compatibility results

    It looks like Captain Morgan has put a lot of effort into doing compatibility testing with Daedalus R6. Thanks Cap'n! (thanks for your email too - I promise I'll get back to you just as soon as sort this issue out!)

    [Update]

    Don't miss Wally*Won_Kenobie's R6 compatibility list, which is also excellent. Wally has been collecting missing_mux.txt files for me too, for which I am indebted

    -StrmnNrmn

    A great optimisation/bugfix..

    ..with a catch.

    This week I've been posting about various speedups I've been making by implementing various opcodes in the new dynarec engine. Although I have implemented most of the commonly used opcodes now, after my previous post I decided to add some temporary logging to the emulator to see how often the remaining unhandled opcodes were being used. Two that immediately jumped out at me were JAL (Jump And Link, which is used to perform a function call) and JR (Jump Register, which is used to return from a function call.)

    These two instructions are very heavily used, and I was surprised to realise that I'd not implemented them! They're pretty easy to code - in fact, due to the way I construct the instruction traces that are fed into the dynamic recompiler I could effectively ignore the JAL instruction and JR just required a couple of lines of code.

    So far so good. I was expecting a modest speedup - maybe another 2-3% on top of all the previous changes I've made this week. After compiling and running the new code, I was amazed to see an improvement of over 10%! Surprised with the figures I was seeing, I did a full rebuild and checked the results again with several different roms. They all showed the same kind of speedup.

    I've been programming (and more importantly debugging) long enough now when I should trust my instincts - call it my programming 'Spider-Sense' tingling if you will, but I knew something didn't quite add up . In situations like this in the past, rather than taking an unexpected speedup for granted I've spent time investigating the root cause to find out exactly what's going on. At the very least I'll simply satisfy my own curiosity, but often I'll find some useful information along the way too (e.g. other related improvements and optimisations etc.)

    So I started looking through the code and rerunning a few roms to try and get a handle on what was causing such a significant improvement. After a short while I realised that all the roms were now generating a lot more potential traces for the dynarec engine to consider for recompiling. This confused me even more, because this behaviour should slow the emulator down rather than speed it up. Another puzzling thing was that the only observable behaviour of my changes should be the speed of emulation - but it looked like my change was somehow changing the flow of execution in the rom.

    After bit more head scratching and debugging, I finally realised what had happened. In making my changes, I had inadvertently fixed a bug in the dynarec engine that was causing the recompiled code to jump back out to the interpreter whenever a JAL instruction was encountered! This bug had been in the dynarec engine since the first day or so, but because its only side effect was to slow down the emulator rather than something more obvious (i.e. a crash!) it had remained undetected for a couple of months.

    So I had figured out what the reason for the 10% speedup was, and I could finally get to bed safe in the knowledge that I had fixed a nasty, subtle bug along the way. Brilliant!

    It was only then that I noticed a couple of new problems that I hadn't seen before: The emulator began hanging in places that had previously been fine - such as Peach's letter at the start of Mario 64. On the occasions the emulator managed to get past that point, I found out that Mario wouldn't move or jump (but strangely the c-buttons and pause menu worked fine)



    I've spent the last couple of evenings trying to figure out why fixing one bug is causing another. I've finally managed to find a way of reliably reproducing a hang within a few seconds of starting the emulator up. This is important because my best chance of identifying and fixing the problem is to be able to run the PC build of the emulator with my 'fragment simulator' enabled. The simulator is very slow however (about 100x slower than running the emulator normally), which is why it's important to find a way of reliably reproducing the bug very early on in the emulation.

    So that's what I've been up to over the past couple of days, and why I haven't been able to reply to people's emails or comments on this blog. Now that I can reproduce the bug in the fragment simulator I'm confident that I can get to the bottom of it. I'll keep you posted with any developments and try to go through emails/comments just as soon as I've cracked it.

    -StrmnNrmn

  2. #2
    DCEmu Regular
    Join Date
    Jan 2006
    Location
    UK
    Age
    42
    Posts
    308
    Rep Power
    48

    Default

    In summary; Strmnnrmn has been working hard on the Dynarec, he's implemented a lot of opcodes and got another 10% speed increase. Unfortunately he has also discovered a bug that has caused a lot of roms to now crash. He has just about pinned this problem down and hopes to solve it soon. After that he will work on some further requested functionality before R7 is released.

    Not to get everyones hopes up but this sounds really cool, with the dynarec finished we could see a 30-40% speed increase on R6! Lets wish him all the best.

  3. #3
    DCEmu Rookie GeEkPiE's Avatar
    Join Date
    Apr 2006
    Location
    UK, hampshire
    Age
    28
    Posts
    148
    Rep Power
    46

    Default

    yea, this release im pleased to see is mainly going to be focused on speed.

  4. #4
    DCEmu Rookie Xiro's Avatar
    Join Date
    Apr 2006
    Posts
    124
    Rep Power
    46

    Default

    yea strmn nrmn is a beast... he has been really working hard these last couple days and updating us getting us pumped for a new release.

    He also said in comments that he would like to implement even more fixes in his code before an R7 release, but he will keep us updated as he works.

  5. #5
    XBOX 360 User Kramer's Avatar
    Join Date
    May 2006
    Location
    Perth, Australia
    Age
    28
    Posts
    1,807
    Rep Power
    59

    Default

    its good that StrmnNrmn post more updates nowadays this one sounds very interesting hopefully mario kart will play without crashes in r7

    -!-
    /\

  6. #6

    Default

    Sounds awesome! We are getting very close to full speed n64 emulation on the psp!!!

  7. #7
    DCEmu Legend Video_freak's Avatar
    Join Date
    Dec 2005
    Location
    Bay Area, California
    Posts
    2,892
    Rep Power
    84

    Default

    it could have 30-40% speed increase! holy crap

  8. #8
    LUA Coder D0N's Avatar
    Join Date
    Jan 2006
    Posts
    863
    Rep Power
    54

    Default

    Excellent news! Keep up the great work StrmnNrmn!

  9. #9
    DCemu Contributor NeoXCS's Avatar
    Join Date
    Jul 2005
    Age
    29
    Posts
    247
    Rep Power
    49

    Default

    Wow StrmnNrmn thats amazing! Good luck on fixing that bug that causes the hangs! I can't wait to for this release of Daedalus! Keep up the good work as you always do StrmnNrmn!

  10. #10
    DCEmu Old Pro Baboon's Avatar
    Join Date
    May 2006
    Location
    Devon, England.
    Posts
    1,735
    Rep Power
    52

    Default

    This all sounds very promising.

    Hopefully there will be a significant speed increase and a little less crashing.

    Good luck fella.

Page 1 of 4 1234 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •