sábado, 1 de diciembre de 2012

About pspautotests project

Forgot to write about this last time. I created mid last year a project called "pspautotests". I created it to be able to automatically test features on all psp emulators. I initially implemented it in my emulator, then I ported it to jpcsp. With the developement of the new awesome project ppsspp that started using that project, the work on that project have been increased a lot; lots of new tests, fixed stuff and a new system for the output.
The project have been moved to github: https://github.com/hrydgard/pspautotests/ and anyone can commit new tests.

Since cspspemu, jpcsp and ppsspp emulators are using this project, all the improvements here, will yield in better emulator implementations.

I dropped lot of compatibility with my last changes as I said. I think it was a necessary step-back that will improve speed in next releases and even more in the future when implemented more AST optimizations, that will be a good thing specially when ported to mobile devices. The good thing is that with pspautotests project improving a lot, any regressions introduced with new features or step-backs will be much easyly detected and will be fixed faster.

I want to thank Hrydgard to decide using pspautotests. Thanks!

viernes, 30 de noviembre de 2012

More WIP work

I continued the emulator lately. I decided to do a step back and try to rework on the cpu compiler and create a opengl|es plugin in order to be able to port the emulator to mobile devices supporting mono.
So actually the emulator now has less compatibility at this point until I complete/redo some stuff.
I decided to change the way I'm compiling functions to a new way AST-based that will allow simpler+safer micro optimizations. Also it will make code generation simpler and easier to maintain. It will allow to output the AST as C#-like code so you can see what's going on.

I have added a new window that allows you to see compiled functions in several formats (C#-Like, AST, IL, MIPS):

Newer versions will require .NET 4.5. So you won't be able to use it on Windows XP unless you are using mono >= 3.0. Also the new gpu plugin is a OPENGL|ES 2. On windows it will use the angle project. On linux it will use opengl, and on mobile devices it will use the native opengl|es implementation.

On the other hand, lioncash has performed lots of refactorings/cleanups/documentation furthermore to translating the emulator to japanese. Thanks a lot!

lunes, 9 de julio de 2012

Still alive and a new contributor

The pace of the development slowed down last month. (I didn't have too much time lately). I want to resume my work soon, maybe in a couple of weeks or maybe in my spare time sooner.

About three days ago SsJVasto offered to contribute to the project. So now we are three people on the project: SsJVasto, archanox and me. Due to the free limitations of bitbucket, we decided to continue the work directly on github, and maybe we will change the name of the emulator when we have settled a new name (with collaborators "soywiz's psp emulator" doesn't have much much sense anymore).

I will continue with ILCC until I get ffmpeg compiling directly into .NET in a really portable fashion without wrappers, then I will hook it into the emulator and then I will continue working on the emulator :)

And that's the current status.

sábado, 19 de mayo de 2012

More news about ilcc (and a working sample/benchmark) .NET C Compiler

I have reached a new milestone. I have been fixing bugs and now I can compile and run successfully one of my programs. It is a compression tool, that is great for benchmarking. So I have made a benchmark to test the performance of the .NET code in terms of the native code.


You can try the sample by yourself:

Native executables are build using microsoft c/c++ compiler with "cl /Ox" (maximum optimizations).


comptoe_ilcc.exe -c3 file.7z file.7z.c3
Encoding[03] file.7z -> file.7z.c3...Success
Elapsed: 1225


comptoe_native_cl_x86.exe -c3 file.7z file.7z.c3
Encoding[03] file.7z -> file.7z.c3...Success
Elapsed: 810

miércoles, 16 de mayo de 2012

About the progress and a new awesome (and related) project! : ilcc

Lately we are commiting much less to the project that before. That's because I'm working on another project. It is a project related to cspspemu. Indeed I started that project to cover an unimplemented area of the emulator in the best possible way: the video decoding part.

So, which project I have started? I tried to port ffmpeg code to C# by hand, and overwhelmed for the titanic work. Other way would have been to create pinvokes for the ffmpeg DLLs, but I don't like the idea since I would like it to be portable. So what's my approach?

To compile ffmpeg into .NET. How? With the project I'm working on:


lunes, 7 de mayo de 2012

EmuReleases.com and new WIP/GIT releases!

I have created a new site where I will put all the WIP/GIT releases.


I have added in the left side a feed with the lastest builds so you can grab and test them.

You can try the last build:

I won't say what includes exactly until the official release, but it can run some more games, and other games that hanged randomly or went slow are now running smoothly.

Tested games:

  • Puzzle Bubble (WIP BEZIER)
  • Tales of Eternia (no more hangs)
  • Astonishia Story (no more hangs)
  • Breath of Fire III   (no more hangs)
  • Luxor (it seems to run fine)
  • Phantasy Star Portable (now get into the menus and display some text)
  • Tekken 5 (now get into the menus)
This includes portuguese and italian translations:

  • Portuguese: e-COS
  • Italian: gambe
  • Spanish: me
Now that you have all the builds, you can try several builds in order to check for regressions.

sábado, 5 de mayo de 2012

Some improvements

I am working on supporting x64 right now (with atrac3+ support on windows) and improving the compiler performance. Also I have improved the memcpy, memset emulator is using internally making it much faster (almost 10x). Also I have been working on improving lwl/lwr instructions that allow to read unaligned words. https://github.com/soywiz/cspspemu/issues/42

Results are awesome. And make lot of compilerPerf tests 10x faster than a real PSP.

You can see the results here (running in 64-bits and with the new lwl/lwr improvement):
64-bits fixed the LWC1 performance problem on Intel platforms.

Still lots of things to improve:

  • Local variable usage
  • Improve function calling

jueves, 3 de mayo de 2012

jueves, 26 de abril de 2012

WIP : Linux support! : Soywiz's Psp Emulator 2012-04-27 (r264)

I am making public a WIP and unstable version because this is the first version "supporting" linux. The support is still very experimental, so please, report any problems with this version.

Also it includes some fixes on windows/linux versions and includes a new iso manager for windows:

Please, download this version and report any regression bugs related to this new version.

Linux instructions:

To use it on linux you will need to have MONO installed.

To run the emulator:
mono ./CSPspEmu.exe

On fedora (I have tested it on Fedora 15 LoveCook):
yum install mono-core 

If you get an error related to not being able to load gdiplus.dll, try:
ln -s /usr/lib64/libgdiplus.so.0 /usr/lib64/libgdiplus.so
yum install mono-devel

More information: http://www.mono-project.com/DllNotFoundException

On ubuntu:
apt-get install mono-runtime libmono-winforms2.0-cil mesa-common-dev mesa-utils mesa-utils-extra
(Not tested yet)

New! version compatible with linux and with new iso manager:

Previous stable version:

sábado, 7 de abril de 2012

Release : Soywiz's Psp Emulator 2012-04-07 (r256)

This version has major improvements:

  • Module loading (this allow more games to run, including some software like PRX Decrypter or LUA Player)
  • Automatical EBOOT decryption. It will decrypt EBOOTs on the fly. This will allow lots and lots of new games to start running. (But still requires some work to get most of them ingame).
Note: with those improvements I have noticed lots of games start running, and some more starting like: Princess Crown and Ys The Ark of Napishtim.

lunes, 2 de abril de 2012

New version 2012-04-03

New version of the emulator!

  • A new controller window to allow to remap buttons to keys.
  • A "recent" list of opened games.
  • Implemented gpu skinning and morphing.
  • Lots of fixes on GPU.
  • Implemented DXT3.
  • Fixed font reading.
  • Small fixes and improvements.

lunes, 12 de marzo de 2012

sábado, 3 de marzo de 2012

Emulator Buttons

I missed to put information about the mapping keys for each button. And it doesn't allow to configure it yet.
So the mapping right now is the following:

switch (Key)
    case Keys.W: return PspCtrlButtons.Triangle;
    case Keys.S: return PspCtrlButtons.Cross;
    case Keys.A: return PspCtrlButtons.Square;
    case Keys.D: return PspCtrlButtons.Circle;
    case Keys.Q: return PspCtrlButtons.LeftTrigger;
    case Keys.E: return PspCtrlButtons.RightTrigger;
    case Keys.Up: return PspCtrlButtons.Up;
    case Keys.Return: return PspCtrlButtons.Start;
    case Keys.Space: return PspCtrlButtons.Select;
    case Keys.Right: return PspCtrlButtons.Right;
    case Keys.Down: return PspCtrlButtons.Down;
    case Keys.Left: return PspCtrlButtons.Left;

switch (Key)
    case Keys.I: AnalogUp = true; break;
    case Keys.K: AnalogDown = true; break;
    case Keys.J: AnalogLeft = true; break;
    case Keys.L: AnalogRight = true; break;

jueves, 1 de marzo de 2012

New Version with fixes 2012-03-01

Just a few days after the first release I update it again. I have fixed some stuff that I miss and added some new features.

Download the new version 2012-03-01

Short changelog:

  • Initial SAS support. Games will play more sounds. It was disabled because of the speed, but now streams the decoded data.
  • AT3+ loops support. This will avoid the background music to stop.
  • Fixed the stencil buffer. demos/reflection now works fine.
  • Fixed some problems when drawing 2D and 3D, that made the 2D to not display. This fixes some homebrew games (like menus of skyroads, dungeon assault...) and probably commercial too.
  • Regression: Fixed the UID generation to start by 1 instead of 0. That prevented Haruhi from starting. Though still crashes on the mpeg stuff.
  • Fixed minor bugs
  • Improved AT3 speed. Instead of loading the whole WAV to memory, streams it. This makes Castlevania to run at almost full speed. (Though it looks really ugly.)
  • Added a new option in Debug menu to dump geometry in a Waveform .obj file. That dumps the geometry of the current frame to "ms\gpu_frame.obj"
  • Added a new option to register WavDest in order to be able to play atrac3+ background music. You will still need to install OpenMG.
  • Added more information on the about box including git commit/facebook/twitter links
  • Added switches to run the program in commandline. Just run cspspemu /help for more information.
  • Updated OpenTK
  • Refactorings and small speedups

martes, 28 de febrero de 2012

New version! Soywiz's Psp Emulator 2012-02-28 (updated)

Today I release a new version of my emulator. This time it is a completely rewritten emulator from scratch. Now it's written in C# instead of D, and features a dynamic recompilation instead of the old interpreter. Though at this moment the cpu is monothreaded. I will make it optionally multithreaded in the future for games that works fine with multithreading.

Also I have moved to github: https://github.com/soywiz/cspspemu

You can grab the sources with TortoiseGit and compile with Visual C# Express 2010.

And the windows binaries for this version here: Download page

(It will probably work on Linux and Mac in the next versions using Mono because I'm using OpenTK. But at this point mono has some issues with the DynamicMethod generation that keeps it from working.)


This emulator features a "fast memory" option that will improve the speed a lot, but it has some issues with some games (though not many), so it's disabled by default. You can check the improvement of using this memory with the minifire (with vsync off) or compilerperf demos.

This is the first public release of the emulator and I have just tested it on my computer, if you have any issue with it, please comment here and I will try to help you.