Some habits are too hard to break, huh

August 28th, 2010

After a few hours of working on nullDC Dynarec instrumentation/profiling …

Shenmue: Ingame
mov:32 25.07% 37931888
mov:64 0.61% 929370
readm:8 0.14% 215023
readm:16 0.88% 1325655
readm:32 21.96% 33223344
46.25% 15364458 to mem
0.00% 300 to route
53.75% 17858586 to inline
27.54% 9150191 static
18.71% 6214567 fmem
readm:64 0.54% 817860
90.76% 742252 to mem
0.00% 0 to route
9.24% 75608 to inline
8.65% 70780 static
82.10% 671472 fmem
writem:32 3.02% 4563780
98.73% 4505665 to mem
0.06% 2880 to route
1.21% 55235 to inline
0.00% 0 static
98.79% 4508545 fmem
writem:64 0.11% 168904
100.00% 168904 to mem
0.00% 0 to route
0.00% 0 to inline
0.00% 0 static
100.00% 168904 fmem
cmp:32 9.04% 13672121
test:32 2.98% 4502301
SaveT:32 13.33% 20163008
LoadT:32 1.95% 2943077
not:32 0.20% 302600
and:32 0.33% 500402
or:32 0.28% 429952
xor:32 0.14% 212814
shl:32 0.74% 1125146
shr:32 0.12% 182725
rcl:32 0.26% 398469
movex:8 0.19% 288026
add:32 10.19% 15414719
sub:32 2.02% 3055821
fadd:32 0.13% 192646
fsub:32 1.05% 1582237
fmul:32 1.30% 1969777
fdiv:32 0.17% 250172
fneg:32 0.11% 167815
fmac:32 0.30% 447457
ifb:8 0.41% 627217
ftrv:32 0.25% 377367
fipr:32 0.25% 376035
floatfpul:32 0.25% 382908
ftrc:32 0.25% 378803
fcmp:32 0.58% 880835
pref:32 0.46% 701954
rest(18 ops) 0.38% 578451
Total 151.28M

Profiling games sure is fun :D

These are IL opcode counts, per dreamcast second. Sadly its not very practical to get execution time, so execution count will have to do for now … It’s interesting to note that most games archive between 120 and 200 MIPS (With most 30 fps rps on the low side, and DOA2LE getting constantly around 202 MIPS ingame :p)

mov32, readm32, writem32, cmp32, tst32, SaveT, LoadT, add32, sub32 make up for 90% of the opcodes executed. Out of these, readm32, SaveT and LoadT could be optimized, and maybe something can be done for movs aswell.

Memory:
readm:32 21.96% 33,223,344
46.25% 15,364,458 to mem
0.00% 300 to route
53.75% 17,858,586 to inline
27.54% 9,150,191 static
18.71% 6,214,567 fmem
writem:32 3.02% 4563780
98.73% 4,505,665 to mem
0.06% 2,880 to route
1.21% 55,235 to inline
0.00% 0 static
98.79% 4,508,545 fmem

Reads are 7x more common than reads. Array/Pointers access is pretty much the same between writes and reads (6.2M vs 4.5M — in other spots/games the difference is smaller). Whats interesting is static accesses — predicted static + inline — are over 27M for reads, but just 55K for writes. This verifies that sh4 really sucks at loading constants — so pretty much all of the constants are loaded as mem-reads — and also raises some questions about the generated code quality. Also, register reads+writes were REALLY low (10 mmr reads/frame , 96 mmr writes/frame).. Interesting huh ?

Anyway, these numbers and other statistics i plan to gather the following days will help to better optimize nullDC !

nullDC mainline is open source ! also, moved servers :)

May 21st, 2010

nullDC mainline code is now open source. You can also fetch freshly build binaries.

nullDCe will follow soon, hopefully within this month ~)

Let’s see if i manage to write posts more often now ….

Whee ?

May 17th, 2009

Wii hacked (using bannerbomb) ! This is actually old news, but my laptop’s hdd died so it got delayed :p.
Also, i recieved the beagleboard from ZeZu and got Ångström working nicely.

So expect wii and arm updates soon ;)

Finaly some progress !

May 4th, 2009

After many many many many many months of inactivity i finaly started some real work on the dynarec.It now features a basic IL with a working decoder frontend and backends for x86/arm/mips-allegrex.Work is currently done to port the code to Wii/ps3/ps2 ( only if libstdc++ worked …)/xbox.Anyway i don’t feel like writing atm maby i’l edit this post later

*edit #1*

Note that the arm videos are much older than the psp, the arm rec misses MANY opcodes at that point.When ZeZu brings arm on par/i get the beagleboard he mailed speeds should be ~ 3x of what psp gets :)

*edit #2*

To give some PSP numbers, bios (menu) is up from ~ 1.5 fps to ~9, Doa2 ingame from ~0.8 to ~4.5 , PoP3d from ~ 1.2 to ~9.Only 4x more to get PoP fullspeed :p

*edit #3*
Added more PSP videos !

Q: What the heck is a “beagle board”?
A: “The BeagleBoard is an ultra-low cost, high performance, low power OMAP3 based platform”.Its a ‘devkit’ for omap3(Arm Cortex-A8, PowerVR SGX) and it is/will be very similar with next generation of non intel based mobile devices.More on http://beagleboard.org.Pandora is a very similar target to BeagleBoard (and will be mostly compatible).
Results :

*edit #4*
Forgot to say, if someone could donate a copy of The Legend of Zelda: Twilight Princess (PAL) i’l be really happy.I spent all of this month’s money to buy the wii and developing with dolphin sucks ><.Anyone interested can email me (drkiiraziel@gmail.com) or come over on #nullDC @EFnet.Keep in mind that i live in Greece and shipping to here can be quite expensive from outside EU.
PSP 
(videos by PSPdemon)

Bios:

Power Stone:

Shenmue:

Crazy Taxi:

BeagleBoard
(videos by ZeZu — he’s the one working on the omap front atm)

Bios

Prince Of Persia

Clarifications about nullDC/psp

July 29th, 2008

nullDC/psp will only be for psp lite. The old(‘fat’) psp just doesnt have the ram space needed, nothing i can do about that.

The current speeds are very low, but that is expected. There is no dynarec, no optimisation, not even a single mips assembly line on the current source. Most of the current code (everything, apart from 3d rendering) is based on the pc version of nullDC, and most of this code will be replaced. So yeah, IT WILL TAKE QUITE SOME TIME BEFORE THE PROJECT IS ANYTHING NEAR USEABLE.

The current speed (as stated by the on screen couters) is around 10%. THIS IS WRONG, IT IS ACTUALY LOWER. The interpreter runs underclocked (to make the speed bearable). This also happens on the pc build of nullDC when using interpreter (for the same reasons). The rps field (renders per second) is accurate.

After the code is cleaned up/rewriten there are plans to port to pandora ( www.openpandora.org, realy cool stuff ) and possibly other consoles (wii seems like a nice target, ps3 if theres a way to get 3D access). ALL THIS MAY(OR MAY NOT) COME AFTER THE CODE IS REWRITEN, SO DONT ASK ABOUT IT NOW(you’l just waste your time, realy). The code will be open sourced as soon as it gets stable.

While i think it is possible to get fullspeed on psp it is quite likely that i will be proven wrong. I CAN NOT MAKE ANY PROMISSES ABOUT THE SPEED, I ONLY PROMISE I WILL TRY  TO GET IT FAST.

If you somehow think this project is wasted time, then dont waste any more commenting/thinking about it. My time is .. mine, i can do whatever i want with it. Seriusly, if you want to say something bad just save your time, it wont realy change anything ;) .

 

There, i hope this clears up some things. If for some reason you’re still confused read over the bold parts, that will help :p

nullDC/PSP update #2++

July 27th, 2008

So yeah, some fixes here and there, gdrom code added, gdrom selection and ..

Too bad the game crashes with some invalid stuff on TA ingame … i realy need to use *stable* versions while porting, and not experimental drkpvr stuff :p

PS. Oh yeah, the game is DOA2LE

*edit*

Aparently SOTB works fine too :)

*edit #2*

Fixed the ta problems, doa2le ingame works :)

nullDC for psp update

July 26th, 2008

I finaly got the psp port/rewrite of nullDC running bios with texturing!

Many thanks to PSPdemon for recording and uploading the video :)

First Post !

June 23rd, 2007

So after a long time i got around setting up a blog.I’l post coding related stuff mostly, usualy about emulators/compilers :) .Lets see how this turns out…