Results 1 to 4 of 4

Thread: Progress Report: Wii64 Dynarec (Part 2) - Nintendo 64 Emulator for Wii

                  
   
  1. #1
    Won Hung Lo wraggster's Avatar
    Join Date
    Apr 2003
    Location
    Nottingham, England
    Age
    52
    Posts
    139,757
    Blog Entries
    3209
    Rep Power
    50

    Rev Progress Report: Wii64 Dynarec (Part 2) - Nintendo 64 Emulator for Wii

    Tehpola has posted more news on the work going on to bring Nintendo 64 Emulation to the Nintendo Wii:

    The structure of the dynarec itself is an important factor in the performance of the emulator. In order to convey some of the changes we’ve made to the dynarec, you have to understand how its structured and how it works. You can divide my dynarec into a few distinct pieces: the translator, the trampoline, the code cache, and some run-time helper functions.

    The translator is given an address at which it will translate a chunk of MIPS code into PowerPC. It uses a total of 3 passes to accomplish that. Pass 0 reads in a instruction at a time until it hits an unconditional jump, a jump register, or an exception return, which signifies the end of the function its trying to recompile. Its main purpose is to identify any branch instructions and determine where they are branching to; it does this to ensure that no branches will be branching into a register mapping. Pass 1 actually does the translation by converting each MIPS instruction to a sequence of PowerPC instructions. Branches are left unfilled because we don’t yet know how many PowerPC instructions will be between any given source instructions. Pass 2 then fills out the branch destinations now that every instruction’s position is known. The translator uses volatile and nonvolatile PPC registers in its generated code. Nonvolatile registers are used to store constants like the memory address to store the register values into, the address of the N64 memory, and a few other useful emulator variables. Volatile registers are used to temporarily store N64 registers for the generated instructions to operate on. These are mapped to hardware registers as needed, and stored to memory when changed and no longer needed.

    The code that’s generated by the translator goes into the code cache. On a PC with no real memory limit this isn’t necessary. However, on the Wii, memory is quite constrained. In total, we have access to a little under 88MB of memory. However, using the larger MEM2, which is 64MB, is somewhat slower than using the 24MB of MEM1, so we have to limit the code to fit in MEM1 for it to run as fast as possible. Not to mention that the cache has to share MEM1 with all of the emulator code and static structures.

    I have a few functions which the recompiled code will call in order to reduce the amount of generated code generated for complex instructions. For example, interpreted instructions, updating Count, and taking floating-point unavailable exceptions. These are just ordinary C functions which will only be invoked by the recompiled code. These functions allow for a reasonable trade-off: faster than interpreting and relatively small code generated for just the function call.

    The trampoline, or dispatcher, is at the heart of the dynarec. The trampoline is responsible for determining if code at a given N64 address is recompiled, and if its not, recompiling it, and then calling the recompiled code. When the code that the trampoline invoked needs to branch to another block of code, it returns to the trampoline with the N64 address of the code it wants to run, and the process begins again: the trampoline looks up the new address, possibly recompiles, and then calls the desired recompiled code. Branches within a function don’t need to return to the trampoline, but because any function can be freed from the code cache at any time, every branch outside of the function must return to the trampoline to be dispatched.

    http://emulatemii.com/wordpress/?p=119

  2. #2
    DCEmu Rookie
    Join Date
    Jul 2008
    Posts
    137
    Rep Power
    0

    Default

    is it really necessary that emulatemii tell us that?

    we want sample or beta version......that's it.

  3. #3
    DCEmu Regular djdynamite123's Avatar
    Join Date
    Sep 2008
    Location
    Redcar, UK.
    Age
    36
    Posts
    309
    Rep Power
    0

    Default

    errr yeah, so we understand it, if you really want to play just use a pc version of project64 or something.

  4. #4
    DCEmu Rookie
    Join Date
    Jul 2008
    Posts
    137
    Rep Power
    0

    Default

    playing mario 64 with a keyboard is so much fun :P

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. New report confirms success of Nintendo DS in Japan
    By wraggster in forum Nintendo News Forum
    Replies: 0
    Last Post: April 12th, 2006, 17:20
  2. Replies: 0
    Last Post: October 6th, 2005, 17:49
  3. Nintendo Revolution: The Last Stand?
    By wraggster in forum Nintendo News Forum
    Replies: 6
    Last Post: July 31st, 2005, 00:34
  4. Replies: 4
    Last Post: December 15th, 2004, 10:01

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
  •