Post Reply 
Daedalus R11 News Update
Author Message
YoYoBallz
L4YoY0s

Posts: 6,057.4567
Threads: 644
Joined: 3rd Mar 2007
Reputation: 15.01961
E-Pigs: 13327.7533
Offline
Post: #1
Daedalus R11 News Update
StrmnNrmn Wrote:Wow, it's been far longer than I'd intended to give this update. I had a great time in Spain, and came back and spent a few evenings playing through Crackdown. It was quite nice to take a break for a few days :)

Since then I've been working on the various features I promised for R11.

I talked a bit about the texture cache being the main culprit for gobbling up memory while the emulator is running. When I started profiling this in detail, I realised that one of the worst offenders for memory consumption was mirrored texture support for 4 or 8-bit palettised textures. There were actually two main problems which were exacerbating the problem.

Firstly, I've never handled palettised textures directly in Daedalus. By that, I mean that rather than converting the palettised texture on the n64 to a palettised texture on the PSP, I've been converting it to a 32-bit RGBA texture. This means that on the n64, a 64x64 pixel 4-bit palettised texture would take up 2KiB. By converting this up to a 32-bit RGBA texture on the PSP, it takes 16KiB - an eightfold increase in memory usage.

The second issue which was compounding the problem was that the PSP doesn't have support for mirrored textures. In order to support this feature I have to manually duplicate and mirror the texture. This means that a 64x64 texture mirrored along the S and T axes on the n64 will become a 128x128 texture on the PSP.

The main problem I was getting due to running out of memory was due to the heavy use of mirrored 4-bit palettised textures in some games. A 64x64 4-bit palettised texture that took up 2KiB on the n64 would consume a huge 64KiB on the PSP - a 32-fold increase! The problem was that certain games were using dozens of such textures in a single display list, and the available memory was rapidly being exhausted.

So over the past couple of weeks I've been working on rewriting Daedalus's texture handling so that it supports 4-bit and 8-bit palettised textures directly. This has taken a lot more time than I'd anticipated because of the number of places in the codebase which have to fiddle around with texture data directly. I also spent a week trying to track down two horrible bugs (both of which turned out to be brain-dead logic errors on my part).

The great thing about this work is that not only does supporting palettised textures directly save a lot of memory, it also has a number of small performance benefits. Generating less texture data generally means a bit less work for the CPU (well, less cache usage), so converting palettised textures is now a bit quicker. Palettised textures are also a lot more efficient to render with (mostly due to the fact that they consume less bus bandwidth and can make better use of the PSP's texture cache.)

The other big chunk of work I've been bashing away at is improving the way that I handle preferences for individual roms. One of the big problems with the current setup with Daedalus is that the main daedalus.ini file consists of both global rom-specific details (such as the rom's name, save type, comments etc) and local user-defined preferences (such as whether to enable speed sync, disable dynarec etc). This means that I can't ship a new version of daedalus.ini without wiping out people's local preferences.

What I've done now is split daedalus.ini into two files. roms.ini will contain global rom-specific details, and an updated version will be distributed with every version of Daedalus from now on. If I know dynarec causes a certain rom to fail to run, I can add a setting for this in roms.ini, and everyone will be able to pick up the change in the next release. Another good example is the SaveType field; every version of Super Mario 64 uses a 4k EEPROM, and so once this is set up in roms.ini it should never need tweaking.

The other file I created is called preferences.ini. This file won't ship with Daedalus - the emulator will create this the first time you change some settings when playing a rom, and update it with any further changes that you make. This means that when you copy a fresh build of Daedalus across to your memory stick, the new build will pick up your existing preferences.ini file and so remember all of your settings.

The settings that Daedalus will currently remember for each rom are:


    * Texture Update Check
    * Frameskip
    * Limit Framerate
    * Dynamic Recompilation (used to override the setting in roms.ini if you're having problems with dynarec)
    * Audio
    * Adjust Frequency
    * Controller



I'll be adding to this list over the coming months, as more options become configurable.

One other thing that will be stored in preferences.ini (which I've not coded yet) is all of the options from the 'Global Settings' page - stuff like the viewport size, stick deadzone, whether to display the framerate or not, etc.

So R11 is shaping up pretty nicely, even if it's taken a bit longer than I'd hoped. I have a few more things to work on, but I'll try to keep you all updated a bit more frequently as I work towards the next release.

-StrmnNrmn

- Source: [ StrmnNrmn's Blogspot]

<Myth0s> i love boys
-------------------------------------------------------------------
I Go To Earth When Mars Is Boring.
-------------------------------------------------------------------
¿ʞɔпɟ əɥʇ ʇɐɥʍ I was first EPerson to have upside down title.
-------------------------------------------------------------------
22/04/2007 02:53 PM
Find all posts by this user Quote this message in a reply
Shady
Sometimes when poo, I hungry

Posts: 4,355.4586
Threads: 472
Joined: 18th Mar 2007
Reputation: 9.99582
E-Pigs: 508.0987
Offline
Post: #2
RE: Daedalus R11 News Update
ohh its not out  yet

(09/06/2011 06:25 AM)S7* Wrote:  Spambots are strange, mysterious creatures.
(This post was last modified: 22/04/2007 03:04 PM by Shady.)
22/04/2007 03:03 PM
Visit this user's website Find all posts by this user Quote this message in a reply
YoYoBallz
L4YoY0s

Posts: 6,057.4567
Threads: 644
Joined: 3rd Mar 2007
Reputation: 15.01961
E-Pigs: 13327.7533
Offline
Post: #3
RE: Daedalus R11 News Update
No not yet, this is just an update of how his work is going

<Myth0s> i love boys
-------------------------------------------------------------------
I Go To Earth When Mars Is Boring.
-------------------------------------------------------------------
¿ʞɔпɟ əɥʇ ʇɐɥʍ I was first EPerson to have upside down title.
-------------------------------------------------------------------
22/04/2007 04:09 PM
Find all posts by this user Quote this message in a reply
Ge64
Former Admin ;)

Posts: 3,163.4170
Threads: 295
Joined: 3rd Feb 2007
Reputation: 0.38918
E-Pigs: 108.4795
Offline
Post: #4
RE: Daedalus R11 News Update
Hm, can't wait for r12, not much reason to get r11 as i don't have any problems

[Image: ub1985584.jpg]
22/04/2007 04:16 PM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA
Smart Alternative

Posts: 17,022.2988
Threads: 1,174
Joined: 19th Jan 2007
Reputation: -1.71391
E-Pigs: 446.1274
Offline
Post: #5
RE: Daedalus R11 News Update
N64 emulation is seriously going crazy now - I mean, like, wow...
22/04/2007 05:11 PM
Visit this user's website Find all posts by this user Quote this message in a reply
xBu
Jedi

Posts: 4,999.4590
Threads: 55
Joined: 15th Apr 2007
Reputation: 3.44876
E-Pigs: 44.0477
Offline
Post: #6
RE: Daedalus R11 News Update
An update, hope one day this will run fullspeed.
22/04/2007 05:14 PM
Find all posts by this user Quote this message in a reply
beaner2k6
∞©∞

Posts: 2,523.4281
Threads: 62
Joined: 1st Mar 2007
Reputation: 1.65351
E-Pigs: 73.7237
Offline
Post: #7
RE: Daedalus R11 News Update
hopefully the audio will be good
i can't play a game without audio it pisses me off not to hear the little sfx

[Image: beaner2k6.jpg]
[Image: 218ohu.jpg]
[Image: newbitmapimage3aj5.png]
[Image: beaner2k6.png]
(This post was last modified: 22/04/2007 06:17 PM by beaner2k6.)
22/04/2007 06:13 PM
Find all posts by this user Quote this message in a reply
_VEndeTta
Endless Night

Posts: 522.1732
Threads: 48
Joined: 9th Apr 2007
Reputation: -3.19624
E-Pigs: 4.8849
Offline
Post: #8
RE: Daedalus R11 News Update
Lies. False hope. I'll believe it when I'm running around
in a tuxedo killing people with oversized heads saying to
myself, "The Names Bond, James Bond" in a voice loud
enough to make people feel uncomfortable. :@

By the way, that random quote "Same Spoon Different Day" is by Stephen King.

[Image: 3c68ce3.jpg]
And when you gaze long into an abyss,
the abyss gazes also into you.
(This post was last modified: 22/04/2007 06:22 PM by _VEndeTta.)
22/04/2007 06:21 PM
Find all posts by this user Quote this message in a reply
Ge64
Former Admin ;)

Posts: 3,163.4170
Threads: 295
Joined: 3rd Feb 2007
Reputation: 0.38918
E-Pigs: 108.4795
Offline
Post: #9
RE: Daedalus R11 News Update
it won't be faster. r12 will. this is just a compatibility update as far as I know

[Image: ub1985584.jpg]
22/04/2007 06:30 PM
Find all posts by this user Quote this message in a reply
_VEndeTta
Endless Night

Posts: 522.1732
Threads: 48
Joined: 9th Apr 2007
Reputation: -3.19624
E-Pigs: 4.8849
Offline
Post: #10
RE: Daedalus R11 News Update
*Crosses fingers but doesn't really believe it*

[Image: 3c68ce3.jpg]
And when you gaze long into an abyss,
the abyss gazes also into you.
22/04/2007 06:36 PM
Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)

 Quick Theme: