PDA

View Full Version : CPS1PSP WIP News And Cache Convertor Source Code Released



b8a
September 14th, 2006, 12:20
Have you forgotten about the CPS1 emulator with all of the excitement over the CPS2 emulator? Well, NJ (http://neocdz.hp.infoseek.co.jp/psp/index.html) certainly hasn't and he's been hard at work on his CPS1PSP emulator.

Planned
-Change the drawing processes to ones similar to CPS2 to improve the speed by as much as possible.
-Change the Z80 core.
-Add state save/load: The state save feature is mainly to make the debugging process easier (I added it because I don't want to keep on playing until the same spot where a bug occurs over and over again), and I have given absolutely no consideration for compatibility with other emulators.
-Anything else that I may happen to think of.

Nothings been going the way I had planned. First of all, it's unstable. There's been lots of occasions where I haven't even been able to compile it. By adding the -G0 compile option it won't even run. Without it, there are games that won't run when using the same C68K as CPS2. It also looks like I won't be able to use CZ80. To make it compatible with kabuki encryption, I'd have to make quite a few changes to the source, but by making it compatible, I've got the feeling that it'll be even slower than MAME's Z80.
This is about what the state of things is right now.

It certainly is rough emulating YM2151 with the PSP's processing capabilities.
I'm planning on ending development of this with the next release.
Additionally, he has finally released the source code for the cache converters for the NEO GEO and CPS2 emulators, and it should now be much easier to port this tool to other platforms. For those interested:

About the Source
-I had absolutely no plans to release this, so there isn't even a single comment.
-Because the it would be tedious to write the explanation, I haven't even written instructions on how to compile it.
-The source code is so disorganized that I have declined to supply it when I have received requests for the source in order to port it. Frankly, (especially with CPS2) I don't think you'll be able to tell what's going on when looking at it.
-Visual C++ 6.0 is necessary in order to compile it. If you fix the makefile you can compile it in versions later than 6.0. It would be necessary to rewrite the code under GCC.
-zip32j.dll is used for the ZIP compression.
-I won't reply to any questions related to the program, so please understand.
The readme contains much of the same information, but with apologies for only using GCC for PSP applications, a note that he uses GNU MAKE, an appeal to do something about the zip32j.dll dependancy should it be ported, and finally, a comment that the source for the emulators proper needs to be cleaned up, but is forthcoming.

NovaKane
September 14th, 2006, 15:18
Cool, I'm going to try it out asap. Thanks NJ.

comicgeek
September 14th, 2006, 15:28
Super fast update. I haven 't even begun to play with the previous release of this emu. whew!

Baboon
September 14th, 2006, 15:33
yes, yes, yes! ...thankyou very much NJ! I'll give this a go in an hour once I finish work! :)

Also thanks to Ba8 for the information and translation on this release.

I'm hoping that with the source code being released we might finaly get a new version of mame that plays most games (tmnt, simpsons, crudebuster, BUBBLE BOBBLE etc)

NJ.. the saviour of PSP arcade emulation! Happy days! :D

NovaKane
September 14th, 2006, 16:12
Maybe it's just me but Beta2 runs better especially with SF2 Turbo. Big difference in speed. A good update, but I'll stick with Beta2 until the save state is included in the future release.

ACID
September 14th, 2006, 16:17
Thanks so much NJ

jinqui242
September 14th, 2006, 16:33
Odd. I've had CPS1 Beta 3 on my HD since August 5 or 6th. I downloaded this release today from DCEMU and the creation dates are the same on both EBOOTs (Aug 5). I even had the Beta 3 Read Me. Am I missing something here? Hasn't this release (minus cache converter source code) been out for over a month now?

Maybe I got it directly from his website, I don't remember.

Mr. Shizzy
September 14th, 2006, 17:40
I'm hoping that with the source code being released we might finaly get a new version of mame that plays most games (tmnt, simpsons, crudebuster, BUBBLE BOBBLE etc) :D


Me too. With everything that's now possible on the PSP, it amazes me that I still can't play "Tapper: Budwieser Edition" on any of the current MAME emulators.

JKKDARK
September 14th, 2006, 18:39
great release :)

The_Ultimate_Eggman
September 14th, 2006, 18:48
Good update. would be better if fullscreen was added and save facility

neosan
September 14th, 2006, 18:49
Great Release thanks NJ. =)

aries2k4
September 14th, 2006, 19:16
Nice release NJ. With the source code released it would be great if some crafty coder could put ad-hoc in this. hint, hint, lol.

ste
September 14th, 2006, 19:52
Yep beta 3 has been out ages and beta 2 is faster anyway.

E.J.
September 14th, 2006, 19:54
wee, i thougth he had forgotten about the CPS1 Emu

Baboon
September 14th, 2006, 20:58
Good update. would be better if fullscreen was added and save facility

There is a fullscreen option already. Press start and slect when in the game and go to game configuration at the top. :)

pkmaximum
September 14th, 2006, 21:35
Man I had this out for a while, why are we reposing it?

Veskgar
September 14th, 2006, 21:35
Yes, I too have been using Beta 3 for a while now. I got it directly from NJ's website. So I guess nothing is new with this announcement. Is the cache converter upgraded at all?

I just have to give NJ more compliments on all the excellent work. This is a really fun EMU. I don't really care for the START + SELECT to access menu. I would have preferred L + R or something. It is awkward to try and press both START + SELECT simultaneously. But that is a minor gripe largely overshadowed by the great quality of this EMU.

Baboon
September 14th, 2006, 22:47
Well If this is old news I reckon the next instalment will be due quite soon... NJ never seems to take too long updating and tweaking his emu's.

I think the last version I had of this emulator was the Beta1, so I'm v happy right now. :)

The_Ultimate_Eggman
September 14th, 2006, 23:25
Press start and slect when in the game and go to game configuration at the top. :)[/QUOTE]


lol found it 20seconds after posting !!! :D :p

Video_freak
September 15th, 2006, 01:16
Thank you NJ! :)

Pumped'Up
September 15th, 2006, 04:34
I can't wait for the next version of CPS1, NJ! You're awesome man!!!

ACID
September 15th, 2006, 04:36
I just hope he thimks about doing RAINE emu

Baboon
September 15th, 2006, 09:08
I’m hoping that we will have an update on this emu by the weekend? :)

For all the breast lovers on this site... In the CPS1 Japan arcade version of Final Fight, during the game’s intro, the kidnapped Jessica is shown wearing only her underwear when Haggar turns on the TV. The same scene was deleted from every other version of the game in the world, and alternatively now cuts to Damnd while you can hear Jessica screaming in the background - check it out! :eek:

I’m sure all the later console conversions were also censored quite a bit, with the women in the game either being completely edited out, or their breasts being covered up! lol :D

razorak
September 15th, 2006, 09:21
OMG i missed this yesterday as i was studying...DAM!!!

ACID
September 15th, 2006, 09:38
I have to checke that out baboon

b8a
September 15th, 2006, 10:39
Whoops! My apologies everyone, I glanced through my past notes and beta 2 was the last version that I noticed listed, so when I noticed that NJ had updated the CPS1 section of his homepage, I jumped to the conclusion that it was a new release. I did think it was odd that there was no changelog posted, but I had a massive headache at the time, so I didn't really look that closely into it. Thanks for catching my mistake all! As a reward for watching this thread though, NJ has posted some excellent, long awaited news:

Current State Of Development
Since the current state is as I wrote above <<the portion that I already translated in the first post of this thread -- b8a>>, I'm temporarily not updating CPS1. Since it's now possible to run kernel mode in 2.6 through the TIFF loader, I've tested various processes which I might be able to use in the emulator.
Well, the problem I've run in to is AdHoc. First I searched the net and found something called adhoc-examples. It looks like the content is just the Adhoc portion taken straight from SMSPlus. I went ahead and did a straight compile of it and installed it on both a 1.5 and a 2.6 PSP. Wow, it worked. Continuing on, I took that same sample source and put it in the launch portion for CPS2PSP. It doesn't work (laughs)

This really ticked me off, so I did various things to change the original sample's source code, however it's performance is extremely unstable. Adding code unrelated to the sample or even slightly changing the original sample's source code (in other words, it wouldn't work regardless of what I tried) caused it to immediately stop working. In the worst occasions, simply recompiling caused it to perform differently. There were various reasons that it wouldn't work ranging from it being unable to recognize a connection, to it freezing during initialization, as well as others.

I thought that maybe it was my development environment that was screwing up, so I installed the revision from SVN, but with absolutely no change. Additionally, only the FW1.5 PSP is unstable while the 2.6 one performed consistently regardless of what I did to change the code. Using the Adhoc libraries from pspdev which were added unbeknownst to me at some point, I tried rewriting the source from scratch, however, ultimately it worked on the 2.6 but not on the 1.5. I had been thinking of only including the basics of this when releasing the source code, but as of right now this is looking pretty much like it's useless.

If anyone knows of any techniques to get this to operate consistently, or even reasons that might cause it to be unstable, please contact me.

The 2.80 SDK is out now, but by looking at the readme.txt it looks as though only programs under 128KB will run? For the time being, it looks like this won't be of any use to the programs I've released here.

One more thing about the AdHoc situation, when rewriting the source once again I think I was able to make a version that runs stable using only the libraries from pspdev. The size is pretty compact as well. Now I just need to add it into the the emulator and check to make sure it works... I'm tired now so I'll get to it some time tomorrow or later (laughs)Thanks to the new TIFF loader, it looks like he's now able to take a shot at implementing the much anticipated AdHoc feature. Looks like our good friend NJ has found himself a new challenge (!_!)

razorak
September 15th, 2006, 10:45
Since it's now possible to run kernel mode in 2.6 through the TIFF loader

it has kernel mode?? i swear i thought it was only user mode...lemme go check

edit:i was right


This version brings user-mode homebrew to v2.0-v2.6 PSPs, without the need for Grand Theft Auto. Now, almost all the software that worked with GTA can now be used without it.

Baboon
September 15th, 2006, 10:58
Originaly NJ said he wasnt intrested in sorting out a two player mode by linking PSP's together because he only had one machine. I guess this has changed now?

Two player mode here we come! :)

b8a
September 15th, 2006, 11:14
Originaly NJ said he wasnt intrested in sorting out a two player mode by linking PSP's together because he only had one machine. I guess this has changed now?His original statement was that he wanted to but couldn't since he already owned two PSPs, but only one was compatible with homebrew and he had no interest in getting a third PSP. Later on, he put out a statement that flat out denied interest in working on AdHoc, and in that statement he said it was because he only had one PSP. His tone in that statement sounded very annoyed, so I suspect that he was saying that because people were bothering him about it and he just wanted to put an end to the discussion. What's changed now is that kernel mode is possible on 2.6, so since (apparently) his second PSP is at 2.6, he can now test this out and work on it.

it has kernel mode?? i swear i thought it was only user mode...lemme go check

edit:i was rightDoesn't really matter if you were right or not. NJ says that he got it to work, so that really should be enough. That bit caught my attention too, but I'm not going to look a gift horse in the mouth.

pkmaximum
September 15th, 2006, 13:07
This is great, but is he talking about ad hoc emulation for his CPS-1, or CPS-2. Because I wouldn't mind iether but I'm just curious to find out wich one he is going to implement it for.

Baboon
September 15th, 2006, 13:18
This is great, but is he talking about ad hoc emulation for his CPS-1, or CPS-2. Because I wouldn't mind iether but I'm just curious to find out wich one he is going to implement it for.


To be honest it would be class if he implements two player mode in any one of his emus (CPS1+2, CDZ, or NGE). :)

I'm hoping he's talking about CPS2 though... xmen vs SF 2-player? ...yes please! :)

pkmaximum
September 15th, 2006, 13:30
Welll I completeley agree, but I figured in that WIP he was talking about CPS emulation, and not NEO GEO, or NEO GEO CD. As he announced a while back that he would be stopping that project for a while, due to other works, and then thats when the CPS-1 emulator came out. But that wip that was just posted I thougth was based on the CPS emulators, and no other, that is why I said that it would be nice to have ad hoc on iether system, I'm just curious on wich one it will be.

And yes I agree ad hoc on any emulator that is ever made for the PSP in my opinion is a really great thing to do. To think that game gear and SMS was the first emulator that we actually got to play ad hoc emulation on. =P Then it was Sega Genesis, then Super Nintendo, Then NES. Hopefully all emulators eventually will reach the point were they have the multiplayer hardware of the system emulated, and we can do ad hoc emulation.

neosan
September 15th, 2006, 15:37
Does the GP2X have a better platform for homebrew emulators such as CPS and NeoGeo? Just wondering...

pkmaximum
September 15th, 2006, 19:20
Probaly as the duell core would be great for creating cache files and such. But the CPS-2 emulators, NEO GEO, CPS-1, NEO GEO CD. Are so good right now on the PSP. That people aren't really even concerened about getting it faster =D That is how great it is right now.

But to completeley answer your question=Yes Most liekley the GP2X would be much more efficient for running arcade platforms.

P.S. Of course I have extremeley high doubts of this ever happening, but wouldn't Infastructure emulation Kick Ass =D.

Hmmmm just watch I bet NJ will land a job with SONY, if he doesn't already have an outstanding job. Coding for them, because the work he does is certainly brilliant!

neosan
September 15th, 2006, 20:40
I am still new the PSP emu scene, But I am huge 2d gaming nut! How has MAME progressed on the PSP, from what I am reading it looks like only the really old arcade titles work.....NJ's caching source will hopefully help move things along with MAME.

NovaKane
September 15th, 2006, 21:09
I am still new the PSP emu scene, But I am huge 2d gaming nut! How has MAME progressed on the PSP, from what I am reading it looks like only the really old arcade titles work.....NJ's caching source will hopefully help move things along with MAME.

Well, he's not exactly doing MAME but rather emulators such as CPS1, CPS2, and NeoGeo which use MAME roms. Although the game selection is limited to choose from (depending on preference), his emulators are the best around. And since you're a 2D fan like a lot of us here, you'll have no problem finding some great games to play.

Mr. Shizzy
September 16th, 2006, 08:21
I just hope he thimks about doing RAINE emu


Hell yeah !!! I second that notion. :D

b8a
September 16th, 2006, 10:11
Update on the situation:

Yep, it doesn't work. After incorporating it into the emulator, the emulator stops working. Since it's no good even having performed a connection test directly after launching, the cause is unknown. Initialization and exit processes work just fine, but it stops working when trying to connect to the other person.
What I know as of right now:
-The -G0 compile option is necessary:
Is it alright to deactivate the data placed in the small data and small bss sections?
If not, it doesn't run correctly on FW1.5 PSPs.
However, when applying -G0 to the whole thing, the binary size increases and the speed drops considerably, so I'd really like to only apply it to Adhoc related source if possible.

At the very least, the possibility of implementing AdHoc at this stage is pretty much 0%.
No matter what I do I can't generate the proper binary.So, looks like it's back to no AdHoc for the time being. Maybe NJ will be kind enough to look into this again once the venerable Fanjita has worked out a proper kernel mode TIFF loader.

I looked around a bit for info on this, and it definitely looks like WiFi has been possible in usermode on 2.00+ via the GTA loader for some time. I was looking for a definitive answer about whether it was reliable or not, but couldn't find any info that went too much into the details.

If any coder has experience linking the disparate PSP firmwares and could shed some light on this situation, I'm sure NJ would be very grateful.

b8a
September 19th, 2006, 10:48
NJ figured out the problem...

I discovered one spot that was causing problems. I'd allocated 12x12 const int sections in the frame skip table, and it appears as though this causes the problem.
By changing these to const unsigned char, it starts to work... I don't get it.

It now works. The problem is as written above, but I'm at a complete loss as to why the problem occurs. Then the issue was whether or not it would actually communicate in-game. Well, since it only runs at 222MHz, I doubt it will be very playable.

I tested it on the comparatively light CPS2 Street Fighter Zero.
Yep, it's too slow and doesn't make for a good game (ha ha)
It only achieves about 30fps at best. It would be just fine if it was running at 333MHz however.
Also, I while the cause is unknown, the cache data is corrupted on the server side and the characters don't display correctly. Well, I'll leave the source code around, but I've decided not to implement it into the official version.

pkmaximum
September 19th, 2006, 22:06
Wow b8a you had me going when I read the post before that XD. Glad to see he is in the process of getting the ad hoc working. I don't completely understand why he can't achieve 333mhz while doing this though =[

But by reading this it seems though that he only has plans for CPS-1.

b8a
September 20th, 2006, 12:48
Glad to see he is in the process of getting the ad hoc working. I don't completely understand why he can't achieve 333mhz while doing this though I think that has to do with the possibility that it's actually running under user mode. Someone please feel free to correct me if I'm wrong, but it's my understanding that changing the CPU clock rate requires kernel mode access. But that's just conjecture. There's already been more then enough kernel/user mode confusion in this thread (!_!)

And, (as it says in the post) he actually tried this out using CPS2 SFZ, so the same technique is most likely applicable to both emulators (if not Neo Geo as well).

Also, (as it says in the post) his current plan is NOT to release an official version (of any of his emulators) with AdHoc enabled (since it runs too slow and has various other problems in it's current state).

However! Since he's releasing the source code (in the not too distant future from the sounds of it), even if he never distributes an official pre-compiled version with AdHoc enabled, everything needed for someone else to do so will be right there. It even sounds like he's going to include the portion of the code nessecary to enable AdHoc even if he doesn't release a binary with it enabled.

But, NJ's been known to change his mind before. He may still yet figure out how to work out all the problems. Plus, with the impending kernel mode TIFF Loader, that may just give him extra options for getting it to work correctly. We'll just have to hold tight and see what happens.

3025826
October 19th, 2006, 22:26
ummm well where to start...... well i would really like to know how to run ps1 games on this i have ff7 iso that is sort-of playable on psx-p and i would lovve to know how to play it on this. is my iso wrong? is it wrong file format? please, a little help. i am new to this emulator.