Skip to content
This repository was archived by the owner on May 9, 2024. It is now read-only.

Commit 47f72f8

Browse files
committed
Update README.markdown
1 parent 5f47fa2 commit 47f72f8

File tree

1 file changed

+16
-14
lines changed

1 file changed

+16
-14
lines changed

README.markdown

+16-14
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1+
# CSharp Psp Emulator
2+
13
A PSP Emulator for >= .NET 4.0 made in C# by soywiz - Carlos Ballesteros Velasco
24

35
Work In Progress emulator
46

5-
EMULATOR STATUS:
7+
## EMULATOR STATUS:
68

79
* Cpu and Fpu is almost fully implemented
810
* VFpu still has lots of functions without implementation
@@ -13,36 +15,36 @@ EMULATOR STATUS:
1315
* There are a small number of commercial games running
1416

1517

16-
KEY FEATURES:
18+
## KEY FEATURES:
1719

18-
# Fully Managed and Disengaged
20+
### Fully Managed and Disengaged
1921

2022
Being fully managed (thought it will need unsafe access) will allow to port to lots of platforms in the future: AKA: Linux, Mac, Xbox360, Android, future devices...
2123

22-
# Very Fast Dynamic Recompilation
24+
### Very Fast Dynamic Recompilation
2325

2426
The quality of the generated code is fantastic.
2527
Lots of MIPs instructions encodes in a single X86 instruction.
2628
The registers are inlined in the CpuThreadState class, so access
2729
to a register is as fast as accessing a non-virtual field.
2830

29-
# Fast As Hell Memory Access (Currently on Windows/Linux only)
31+
### Fast As Hell Memory Access (Currently on Windows/Linux only)
3032

3133
Using VirtualAlloc/mmap, allows all the PSP Memory Segments to be in a virtual space that fits the PSP Memory.
3234
And since there is no DMA access on a HLE emulation, we can get a pointer just making an ADD operation between the base and the PSP address.
3335
This is as fast as possible.
3436

3537
MainPtr = VirtualAlloc(Base + MainOffset, MainSize, MEM_RESERVE | MEM_COMMIT, PAGE_READWRITE);
3638

37-
# Very Fast Function Cache
39+
### Very Fast Function Cache
3840

3941
Detect and access to a function cache features O(1),
4042
adding a function cache O(log(n)),
4143
and flushing a range or the whole Function Cache is as fast as possible too.
4244
This is achieved with a Array that contains all the possible memory addresses and a SortedSet
4345
that allows to know which functions have been generated and should be purged when invalidating instruction cache.
4446

45-
# Very Fast Thread Switching
47+
### Very Fast Thread Switching
4648

4749
Each PSP Thread is a native Green Thread / Fiber. Since the PSP has a single core, and some games requres
4850
thread scheduling, we simulate thread scheduling with fibers. Each PspThread have its own registers in an object,
@@ -51,7 +53,7 @@ KEY FEATURES:
5153
in the future, if we optimize the function generation to detect JAL instructions and call delegates directly, inside
5254
nested function calls.
5355

54-
# Very clean HLE Emulation using CustomAttributes, LINQ, method mapping and XML Documentation
56+
### Very clean HLE Emulation using CustomAttributes, LINQ, method mapping and XML Documentation
5557

5658
LINQ + functional-programming helps to make the code very clean, simple and easy to understand.
5759

@@ -90,12 +92,12 @@ KEY FEATURES:
9092
return HleIoDrvFileArg.HleIoDriver.IoDread(HleIoDrvFileArg, IoDirent);
9193
}
9294

93-
# Faster than the original PSP, than DPspEmu and than JPCSP
95+
### Faster than the original PSP, than DPspEmu and than JPCSP
9496

9597
Most CPU/FPU/VFPU operations are something like 8x times faster than the original PSP on a modern computer.
9698
Still the GPU implementation is still limited because of the Cpu <-> Gpu memory BUS. But probably will be enough in most cases.
9799

98-
# KISS and DRY
100+
### KISS and DRY
99101

100102
With the "Keep It Simple Stupid" and "Don't Repeat Yourself" philosophies always in mind,
101103
the quality of the core is a priority always over new features.
@@ -107,24 +109,24 @@ KEY FEATURES:
107109
ID("addu", VM("000000:rs:rt:rd:00000:100001"), "%d, %s, %t", ADDR_TYPE_NONE, 0),
108110
ID("addi", VM("001000:rs:rt:imm16" ), "%t, %s, %i", ADDR_TYPE_NONE, 0),
109111

110-
# UnitTesting and Integration Tests
112+
### UnitTesting and Integration Tests
111113

112114
The idea is to create a full set of tests, testing the emulator interface, code generation, and HLE APIs.
113115
UnitTests are integrated in the code, and HLE APIs are external integration tests in form of PSP executables than can be executed on any emulator to test APIs.
114116

115-
# Fully Open Source
117+
### Fully Open Source
116118

117119
Project is on GitHub, so anyone can branch the project and perform Pull Requests helping to improve the code.
118120

119-
# Created after 4 tries
121+
### Created after 4 tries
120122

121123
I'm the creator of the D PSP Emulator. That emulator had 4 versions, every one was created almost from the scratch with different approaches and trying
122124
to improve the quality of the code in each iteration.
123125
The lack of a good IDE, the complicated structure of the D language, the horrible compilation times, caused that it taked too much time for everything,
124126
and made it impossible to refactoring the code without days or weeks of work.
125127
In this time I have learned lot of things, and since the .NET platform is fast enough, have "mono", and solves all my problems with D, it will be my final choice.
126128

127-
# Final Words
129+
### Final Words
128130

129131
The first emulator made by Noxa was a C# emulator too. It was for .NET 2.0. .NET and C# have evolved a lot since that 2.0 version. And now it is probably the best
130132
platform/language out there. It has the right balance between ease, power and speed. Of course it lacks some stuff, but it is the language where less programming features I have missed.

0 commit comments

Comments
 (0)