Author Topic: Gp2x Psone Emulator Running Realy Fast  (Read 111398 times)

urielka

  • Full Member
  • ***
  • Posts: 178
    • View Profile
Gp2x Psone Emulator Running Realy Fast
« Reply #45 on: January 23, 2006, 04:56:41 am »
beacuse of that a dynamic recompiler have a cache which it store common stuff and don`t get recompiled again.(every good dynamic recompiler have a cache and even some have code optimzers,cache code is pretty simple).
if you will see a graph of the speed of the dynamic recompiler it will look like a y=e^x coz in the first moment it start slowly recompiling every asm code and then it gather stuff in the cache(not single opcodes but blocks of code) and then it start going real fast,the time that it takes to gather the cache stuff is less than a second coz in a second a R3000A(Psx Cpu) preforme more than 30 MIPS(Million instructions per second,of course this number is theoreticy limit and not real preformence).

chiark

  • Full Member
  • ***
  • Posts: 191
    • View Profile
    • http://www.chiark.com
Gp2x Psone Emulator Running Realy Fast
« Reply #46 on: January 23, 2006, 05:14:50 am »
Blimey guys, I leave my Z alone for a month, and now I find that there's a decent playstation emulator and the possibility of running TomTom on it.

I really must do this more often

Great to see you all working together, too, rather than fragmenting which happens all too often in the open world.

zodttd

  • Full Member
  • ***
  • Posts: 188
    • View Profile
Gp2x Psone Emulator Running Realy Fast
« Reply #47 on: January 23, 2006, 08:30:32 am »
It's definitely cool to finally get help with this stuff! The Z has a great community.

I'm posting the source to cleaned up version of ZPSX ( ZPSX sounds better than ZarPSX ). It still has some odd bugs in it relating to how I'm compiling PCSX, but it now uses CDRiso which supports .bz instead of .znx. I'll include the shared library for libbz2 just in case someone doesn't have it. Hope thats ok.

Once I track down why PCSX is giving some games glitches such as freezing at the psx logo at boot, or 3D not rendering textures properly, game compatibility should go way up. I think it may have to do with how I'm compiling the emu, since in this version I took out all edits to PCSX, used a different "CD Plugin" and I tested  the GPU and it works in Windows. Anyways, I'll compile in Pete's SoftGPU with as few modifications as possible, and see if I can get things working that way, just in case it is the GPU.

Time to study makefiles and get a new version using Pete's softgpu up again.
http://www.zodttd.com for all your psx4all needs (as in downloads and support). :)

CLICK HERE TO DONATE ANY AMOUNT VIA PAYPAL

Thanks for the support! I can hardly wait to get back into Zaurus development again. :)

zodttd

  • Full Member
  • ***
  • Posts: 188
    • View Profile
Gp2x Psone Emulator Running Realy Fast
« Reply #48 on: January 23, 2006, 01:54:48 pm »
Well, I worked on "ZarPSX" some more. I started over completely and tried to get PCSX up and running on the Zaurus using GTK, CDRiso compiled as a shared object, and Dr Hell's GPU. Still got the same bug in Final Fantasy Tactics (no textures are shown in the opening scene in the rotating 3D building), and Tactics Ogre glitches when choosing the birthday when starting a new game. What's weird is I never use to get these bugs on previous ports, until I started to port to the GP2X, which is also a ARM/Linux based handheld. Now I can't seem to figure out what's causing this bug. Am I missing a compiler option for int sizes or something (had an issue on the Palm port where int size of 2 or 4byte was an issue)? I really doubt it's Dr Hell's GPU, since I got Pete's SoftGPU running and it had the problem as well, even on the GP2X. This bug is really bothering me. If someone can figure it out, please let me know how to fix it! Thanks!

In the meantime I cleaned up ZarPSX 0.01's code, still have that bug, but the code is a bit nicer looking.

From the readme:

UPDATED January 23rd, 2006:
Grab ZarPSX v0.02 at:
http://www.friggingames.com/zarpsx002.zip

ZarPSX (working title), has been updated to v0.02. This release is pretty much a cleanup of code and a change of the CDR plugin to try to find out what's causing strange glitches in games.
Changes include:
- CDR plugin changed to cdriso. This allows for .bz compression, but has temporarily taken away .znx compression. Due to including bz compression, you will *need* to have the "libbz2.so.1.0" shared object file put inside the  "/usr/lib" directory on your Zaurus. If you need this file, it is included in this release.
- Clean up of code. I've tried to take away most of the crap needed for previous ports of this emulator. What's left is pretty much barebones.
- Downgraded from PCSX 1.6b to 1.5. I seemed to have left some code related to 1.6b in the last release by accident. Fixed.
- Set default frameskip to 3

This release is only useful to those who care to look at or use the source. Not much has changed for end users of this emulator...yet. At least once I track down a certain bug, compatibility should go way up.
http://www.zodttd.com for all your psx4all needs (as in downloads and support). :)

CLICK HERE TO DONATE ANY AMOUNT VIA PAYPAL

Thanks for the support! I can hardly wait to get back into Zaurus development again. :)

azalin

  • Newbie
  • *
  • Posts: 33
    • View Profile
Gp2x Psone Emulator Running Realy Fast
« Reply #49 on: January 24, 2006, 05:16:51 am »
Could it be something like this
( https://www.oesf.org/forums/index.php?showtopic=9343&st=15 see the post by ikm)
Quote
The xpdf crashing on pdaXrom is a memory access processor issue. This is related to the ARM processor design. Those kind or bugs are hard to find in source code, even hardder when the source code is not yours, even harder when there are a lot of memory pointer for document handling.

Yep, these problems seem likely to be caused by the unaligned memory accesses, which are not handled correctly by the ARM processor. There is a handy gcc's option to hunt down memory alignment problems such as these:

CODE

      -Wcast-align
          Warn whenever a pointer is cast such that the required alignment of
          the target is increased.  For example, warn if a "char *" is cast
          to an "int *" on machines where integers can only be accessed at
          two- or four-byte boundaries.


It creates much false positives, but it still is easier than just reading all the code

Good luck on the project, it is awesome!

Laze

  • Hero Member
  • *****
  • Posts: 704
    • View Profile
    • http://www.pdaXrom.org
Gp2x Psone Emulator Running Realy Fast
« Reply #50 on: January 24, 2006, 07:27:29 am »
zodttd: Great work!!!!

I just tried and BubbleBooblePack runs almost perfect - with some flickering :-)
C760 running pdaXrom lastest ;-)
SL5500 Running Cacko Qtopia
512 MB SD Card, 128 MB CF Card, Prism2 CF Wlan.

Always visit http://www.pdaXrom.org for latest news.

omega

  • Hero Member
  • *****
  • Posts: 626
    • View Profile
    • http://
Gp2x Psone Emulator Running Realy Fast
« Reply #51 on: January 24, 2006, 08:16:42 am »
Does this mean I could run the version of Command & Conquer that was on the playstation on my zaurus?!?!??! Excellent...
Gorgeous C860, 256 Sandisk SD, 1Gig Pretec 40x CF, PDAIR leather case & the really cool retractable iPDA USB sync/charge cable. Powered by PDAXROM BETA 1.

My wish - to have a Command & Conquer style game on my Z! (FREECNC!!!) Simcity 2000 would also be great.

zodttd

  • Full Member
  • ***
  • Posts: 188
    • View Profile
Gp2x Psone Emulator Running Realy Fast
« Reply #52 on: January 24, 2006, 02:40:47 pm »
It also means you can run the PSX version of Sim City 2000!
Though this emulator is still slow, it's progressing pretty well.

Some updates on things:
I fixed a bug in the code I've been talking about for some time now. It took me nearly 3 months to figure this one out. Heh. It seems GCC for ARM likes to compile with chars as unsigned instead of signed. A quick compiler options got 3D rendering. Also, I fixed a bug that caused lots of games to crash with a segmentation fault right when the game is selected. HLE is now working which speeds up games. I'll post the revised code within the hour.
http://www.zodttd.com for all your psx4all needs (as in downloads and support). :)

CLICK HERE TO DONATE ANY AMOUNT VIA PAYPAL

Thanks for the support! I can hardly wait to get back into Zaurus development again. :)

scoutme

  • Hero Member
  • *****
  • Posts: 579
    • View Profile
Gp2x Psone Emulator Running Realy Fast
« Reply #53 on: January 24, 2006, 03:05:11 pm »
can you post some screenshots? (I'll try it as soon as possible)

deniscallies

  • Jr. Member
  • **
  • Posts: 73
    • View Profile
    • http://
Gp2x Psone Emulator Running Realy Fast
« Reply #54 on: January 24, 2006, 03:33:33 pm »
Hello,
can someone of you explain how to get a iso or bin file from a PSX cd?
The Problem is that i only can use Mac OS X 10.4 or debian Linux.
With Roxio Toast i cannot make a .bin file

Please help    i can´t wait to show my friends my "Mini PSX"

Thank you,

Denis

danboid

  • Hero Member
  • *****
  • Posts: 881
    • View Profile
    • http://
Gp2x Psone Emulator Running Realy Fast
« Reply #55 on: January 24, 2006, 03:37:31 pm »
Quote
It also means you can run the PSX version of Sim City 2000!
Though this emulator is still slow, it's progressing pretty well.

Some updates on things:
I fixed a bug in the code I've been talking about for some time now. It took me nearly 3 months to figure this one out. Heh. It seems GCC for ARM likes to compile with chars as unsigned instead of signed. A quick compiler options got 3D rendering. Also, I fixed a bug that caused lots of games to crash with a segmentation fault right when the game is selected. HLE is now working which speeds up games. I'll post the revised code within the hour.
[div align=\"right\"][{POST_SNAPBACK}][/a][/div]

      !!!

I'm totally stunned at how fast this has come together. Have you got R-Type Delta or Strider 2 to test on it- do they work? They did under the Linux/x86 PCSX.

Thanks for keeping us updated on this zodttd - hope you don't mind me asking the story behind your nick? As for the programs name, zpsx is much better than zarpsx imo. The bz2 move was a good one- have you tried 7zip though? That may be even better..

Have you got a USB joypad to try with zpsx? Have you got round to adding support for usb sticks?

zodttd- if you fancy becoming the undisputed champ of the zaurus emulator world could you please consider porting GP2X MAME to the Z

[a href=\"http://www.talfi.net/gp32_franxis/]http://www.talfi.net/gp32_franxis/[/url]

I saw this working over the weekend- you can already play Neo-Geo games full speed with sound and thats on a 200Mhz ARM! Thats all thanks to the inclusion of the cyclone M68k ARM ASM emulation code.
Zaurus SL-C3000 w/ MD swapped for a Kingston 32GB Ultimate 266X CF running ALARM
Banana Pi running ALARM on a WD Scorpio SATA II HD
System76 Gazelle Pro i7 laptop w/ SAMSUNG 840 EVO SSD running Arch x64

How to install Arch on your C3x00 Zaurus https://github.com/danboid/ZALARM-install

zodttd

  • Full Member
  • ***
  • Posts: 188
    • View Profile
Gp2x Psone Emulator Running Realy Fast
« Reply #56 on: January 24, 2006, 04:33:28 pm »
ZPSX v0.03 released:
----------
From the readme:

UPDATED January 24th, 2006
Grab ZPSX v0.03 at:
http://www.friggingames.com/zpsx003.zip

ZPSX ( still a working title  ) has been updated to version 0.03. This release is a good one, at least for me. I finally fixed a long standing bug in my Linux ports of this emulator. Now that this bug is fixed MANY more games work, including many games that required 3D rendering. Tactics Ogre now works, as does Final Fantasy Tactics!
All three types of ISOs are now supported, including .BIN/.Z/.ZNX/.BZ. Use PocketISO 2.0 to compress ISOs, but remember that compression of ISOs is good, but when you rip out stuff from the ISO you might encounter errors in emulators.
Also of note is HLE now works properly. Hold down the H key when selecting a game to load, and HLE will be used. HLE will speed up some games, but cause errors in others. Try it out and see how it fairs!
Oh yeah, the default frameskip is set to 3. You should lower/raise it as needed by pressing the K (lower) and L (raise) keys.

Besides some compiler options, that's all for now. Give this version a go and let me know how it runs! Feedback of any sort is greatly appreciated. Thanks!
----------

That covers most of this post. Be sure to post feedback. I need to configure the keys better, as well as get the compiler options tuned better. I also forgot to mention you can now exit the emulator from the menu by pressing the backspace key. Source is included in the zip as well as the zpsx_xscale_hi/low binaries. I also included the libbz2 as well as the memory card files (.mcr). The memory card files should go in the same directory as ZPSX, as well as the BIOS scph1001.bin if youre not using HLE (no BIOS needed when using the HLE option).

Anyone want to help set up a Subversion/CVS thingy?
Also we could use a compatibility list coming up pretty soon.

I'm thinking of getting rid of SDL. It's pretty nice, but I'm assuming it ties ZPSX to X11, which some might not like. Do you think running ZPSX in an X11 env will slow down the emu?

Oh, new posts...My nick comes from getting OpenTTD running on the Tapwave Zodiac. It just kinda stuck. Heh. I'm thinking of getting OpenTTD running on the Zaurus, since it might be a bit nicer than my Palm/GP2X/PPC ports of it.

I can take a look at the GP2X code for the emu. It's quite impressive. Maybe I can use some pull from the GP2X world to get franxis to help me out...

Are most USB joypads compatible with the Z C1000? If so I'll pick one up today and see if I can get USB joystick support working.

As for ripping PSX games, I usually use XDuplicator (a Windows frontend for the cdrtao project on sourceforge). I would bet that theres a port of this project to Darwin for MAC OSX users. When using it, rip as RAW and it will output a working .bin. Simple as that. If you want to compress the ISO, use PocketISO with the bin outputted.

Enjoy ZPSX,
ZodTTD
http://www.zodttd.com for all your psx4all needs (as in downloads and support). :)

CLICK HERE TO DONATE ANY AMOUNT VIA PAYPAL

Thanks for the support! I can hardly wait to get back into Zaurus development again. :)

speculatrix

  • Administrator
  • Hero Member
  • *****
  • Posts: 3707
    • View Profile
Gp2x Psone Emulator Running Realy Fast
« Reply #57 on: January 24, 2006, 05:53:03 pm »
Quote
the things i need help with are:
1.examples of Arm Asm 
2.examples of Arm Asm with C
3.documention on Arm and R3000A cpu.
[div align=\"right\"][{POST_SNAPBACK}][/a][/div]

take a look at qemu, a cross-platform virtual machine, - [a href=\"http://qemu.sourceforge.net]http://qemu.sourceforge.net[/url] - as this allows an arm processor to emulate other CPUs such as x86... and vice versa! Whether this is precisely what you need, I don't know, but there's probably some important ideas there.

also take a look at the zaurus hardware emulator from virtera - http://www.virtera.com/ - which is currently free to evaluate, allowing you to use a PC to run as a virtual Zaurus and thus test out ideas.

this is truly exciting news! way to go, guys!
Gemini 4G/Wi-Fi owner, formerly zaurus C3100 and 860 owner; also owner of an HTC Doubleshot, a Zaurus-like phone.

urielka

  • Full Member
  • ***
  • Posts: 178
    • View Profile
Gp2x Psone Emulator Running Realy Fast
« Reply #58 on: January 24, 2006, 06:02:51 pm »
hehe i know VirtualMhz.
i also know qemu and will take a look at the source.
but for the moment i am working on converting the regular interpter from c to asm so it will speed up things and alow me to learn more about Arm and R3000A(MIPS) asm.

danboid

  • Hero Member
  • *****
  • Posts: 881
    • View Profile
    • http://
Gp2x Psone Emulator Running Realy Fast
« Reply #59 on: January 24, 2006, 06:45:37 pm »
Congratulations on solving the 3D problem zodttd- sounds like this new release is quite a milestone for both the Zaurus and emulation communities- I'm sure zpsx will only introduce the Z to a wider audience- maybe then Sharp will release their next model in Europe/US again? I'd like to hear what kinda framerates CXX00 users get under demanding games like Crash Bandicoot 2 or Gran Turismo 2.

Unfortunately my USB joypad seems to have broke and I have no idea what the pad compatibility is like but it sure would be a good enough feature to make me go buy a new pad just for zpsx (when i manage to coax the Z off my dad   )

zodttd- when do you expect to release an updated GP2PSX with 3D and HLE??

PSX on Z - coolest emu combo ever? (Just gotta install pdaxrom again...)
« Last Edit: January 24, 2006, 06:46:40 pm by danboid »
Zaurus SL-C3000 w/ MD swapped for a Kingston 32GB Ultimate 266X CF running ALARM
Banana Pi running ALARM on a WD Scorpio SATA II HD
System76 Gazelle Pro i7 laptop w/ SAMSUNG 840 EVO SSD running Arch x64

How to install Arch on your C3x00 Zaurus https://github.com/danboid/ZALARM-install