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

bam

  • Hero Member
  • *****
  • Posts: 1213
    • View Profile
    • http://thegrinder.ws
Gp2x Psone Emulator Running Realy Fast
« Reply #15 on: January 18, 2006, 11:39:03 pm »
setup paypal and I am in for 20.00(usd)
SL-C3100 current: Stock/Tetsu 18h
Socket BT CF Card
Linksys WCF-12 802.11b/Cheapie USB Ethernet

The Grinder

zodttd

  • Full Member
  • ***
  • Posts: 188
    • View Profile
Gp2x Psone Emulator Running Realy Fast
« Reply #16 on: January 19, 2006, 05:27:12 pm »
Hi, just an update to things...

This is the first time people have offered me donations before I started a project. Very cool community! I was able to buy a new C1000 for $397 US, shipped. It shipped REALLY fast, and already arrived. So I'm working on getting the source code polished up as well as setting up a Linux development environment. Most the code for the emulator is easily ported, and getting the GPU (graphics processing unit) code to blit to the framebuffer shouldn't be hard. I'll have to change some of the input code to support the Zaurus, since GP2PSX used code specific to the GP2X. Since the GP2X runs a flavor of Linux, most this code should be able to be ported pretty quickly. I'm hoping to have something working today. I'm in the process of getting Urielka set up so he can work his magic with a dynamic recompiler.

Thing's that definitely won't work right away:
Sound/Music

Thing's that might not work right away:
- A good frameskip option. I can get something working temp at first though.
- Support for ZNX compressed ISOs. Raw BIN  and Z compressed ISOs should work though. Use PocketISO 2.0 from the *cough* FPSEce *cough* homepage to compress the ISOs.
- The control layout will probably suck and not be configurable at first. Any suggestions on a button layout?

Things to expect, even though we have no idea how it'll turn out:
The emu might run really slow at first. If it turns out that way, I'll do my best to get it going nice and fast. Using direct access to the framebuffer instead of SDL, and using a different GPU will help things greatly.

I'll add a donate link to my signature once I get the emu working on my C1000 and release a build.

Thanks for introducing me to this awesome handheld!
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. :)

danboid

  • Hero Member
  • *****
  • Posts: 881
    • View Profile
    • http://
Gp2x Psone Emulator Running Realy Fast
« Reply #17 on: January 19, 2006, 08:19:24 pm »
Wow!

Sounds like THE most exciting Z project going on right now- good luck with it!

About the controls- the CXX00 series have USB host so we should be able to plug a PSX style USB pad straight in right (with the appropriate adaptor if needed)? I've got a PSX style USB joypad by Gravis but it seems to be broke  As for joypad to keyboard key mapping, may I recommend:

CURSOR KEYS - DPAD (of course   )
Fn - 'Cross' fire button
SHIFT - 'Square' fire button
CTRL - 'Circle' fire button
Z - 'Triangle' fire button
CANCEL (on rear) - L1
OK (on rear) - R1
SCROLL WHEEL LEFT (on rear) - L2
SCROLL WHEEL RIGHT (on rear) - R2
ENTER or . - Start button
SPACE or , - SELECT

We thought you'd be impressed with the C1000- my dads  got a C3000 and I think its the most amazing computer I've seen since I first saw an Amiga- thats f$£kin COOL!   I'm waiting for one with integrated wifi, more RAM, 3D graphics acceleration and USB2 woulds be nice! (Super Zaurii dreaming again    )

Are you targetting the Sharp/Cacko or pdaxrom? Could you do builds for both? That would be fantastic!

Go zodttd!!
« Last Edit: January 19, 2006, 09:28:11 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

stuffman

  • Full Member
  • ***
  • Posts: 104
    • View Profile
    • http://www.dylanpowell.net/zaurus
Gp2x Psone Emulator Running Realy Fast
« Reply #18 on: January 20, 2006, 01:49:27 am »
Wow, great news! I can't wait to see what comes of this project.

As for the control layout, here's something you may want to consider (though I'm sure not everyone will go for it): Back when I was still using the Cacko ROM, I messed around with the Super Nintendo emulator quite a bit.  It was clumsy with the key layout on my 860, but fun nonetheless. For some speed improvement, I downloaded a newer (modified) SDL and installed it. For some reason, using it caused my screen to rotate 180 degrees, so everything was upside-down when using the emulator. Though it was easy to remedy the flipped screen, I actually ended up liking it better that way- the direction keys were on the left like a standard controller, and surprisingly, it was more comfortable to hold this way (slightly awkward because the screen was below the controls, backwards from how most portable game systems are). This may not be to everyone's liking, but I'd suggest giving it a shot. I haven't used a C-1000 (well, actually, I used one to sign up for a credit card, but that's another story), but I'd imagine with the round direction pad, it'd be even easier to use.
[span style=\'font-size:8pt;line-height:100%\']SL-C860 Running pdaXrom 1.1.0beta1.
5GB Seagate ST-1 Microdrive from Rio Carbon, Asst. Other CF Cards.
512MB Sandisk SD.
AmbiCom WL1100C-CF WiFi Card.
Some GPS Card I Can't Remember...
Palm Tungsten Retractable Stylus (If You're Not Using These, You're Missing Out!).
[/font][/span]

Foxdie

  • Sr. Member
  • ****
  • Posts: 465
    • View Profile
    • http://trackmygps.co.uk
Gp2x Psone Emulator Running Realy Fast
« Reply #19 on: January 20, 2006, 05:44:21 am »
Holy crap! I take a break and I return to find there's a PSX emulator in the works for the C series?

Goddam this is amazing news!

zodttd, I can't afford much in the way of money as I'm having to use all my spare cash on driving lessons, but if you need anything like webspace / mirrors just let me or anyone else here know, we'll look after you
Jason "Foxdie" Gaunt
HTC Universal G4 with 2GB SD card running Debian Titchy Linux
[img]http://trackmygps.co.uk/signatures/foxdie.gif\" border=\"0\" class=\"linked-sig-image\" /]
Click image to view my GPS tracker
Follow me on Twitter: @jasongaunt

urielka

  • Full Member
  • ***
  • Posts: 178
    • View Profile
Gp2x Psone Emulator Running Realy Fast
« Reply #20 on: January 20, 2006, 07:41:25 am »
i am working on a dynamic recompiler for the emulator(with zodttd) so when it will be done we will have the closest possible to full speed.

does anyone know about a emulator that have SomeCPU->Arm(need to be for ArmV5 or ArmV4) dynamic recompiler?
it will help me to write the dynamic recompiler which one part of it is the execution of arm asm codes.

so if anyone have documention on Arm,R3000A(psx cpu) or GTE(Geometry Transformation Engine - part of the R3000A that is basicly the real 3d gpu and have other opcodes) plz post it here to help me to write this dynamic recompiler.
and plz donate so we can get this working faster.

Uriel

zodttd

  • Full Member
  • ***
  • Posts: 188
    • View Profile
Gp2x Psone Emulator Running Realy Fast
« Reply #21 on: January 20, 2006, 05:36:34 pm »
A little update on things...

I have the PSX running on the Z C1000 running pdaXrom. Since I just got my C1000, and it being my first Zaurus, I know little about the system.

For instance, when I went to draw directly to the mmap'd framebuffer, it was drawn as if the screen was 480x640, instead of 640x480...rotated? Which brings me to another question, what's the most common Zaurus screen dimension?

Anyways, the PSX emu is running pretty slowly right now. If I get some example code or information on using the framebuffer with, at least,  the Z C1000 I can speed things up. It's using SDL right now, and I modified things so it just Locks the surface, draws to the surface, unlocks then updates. Argh SDL!

Controls are working, the screen is stretched when needed to 640x480 (hardcoded though, which is probably a bad thing considering other Z's probably don't have a 640x480 screen). The screen stretching makes things go pretty slow. There isn't any hardware stretch on the Z Cxxxx series is there?

So, you might be able to play a simple 2D game pretty well at this point, but FF7 is still slow. :/

I'll work on it a bit more before releasing an initial build. I want to make sure compressed ISO's load, as well as try to speed things up more.

Wish me luck. ;P
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. :)

stuffman

  • Full Member
  • ***
  • Posts: 104
    • View Profile
    • http://www.dylanpowell.net/zaurus
Gp2x Psone Emulator Running Realy Fast
« Reply #22 on: January 20, 2006, 07:01:42 pm »
Great to hear things are progressing fast!

The C-series Zauruses all have 640x480 screens, though they'll also run happily at a scaled 320x240. The latter may be a better choice for now, as I'm sure it's much faster drawing only a quarter as many pixels. Also, even though SDL sucks, things may be quicker if we could get the "special" libsdl that I remember using on Cacko working for pdaXrom. I don't remember where I got it other than I think the site was completely in japanese. It was much faster than the other libsdls out there at the time, but I don't know how it compares to the one were using.

Good luck, and if there's anything I can do to help, let me know (webspace, etc... if I had money, you'd be getting it first, for sure).
[span style=\'font-size:8pt;line-height:100%\']SL-C860 Running pdaXrom 1.1.0beta1.
5GB Seagate ST-1 Microdrive from Rio Carbon, Asst. Other CF Cards.
512MB Sandisk SD.
AmbiCom WL1100C-CF WiFi Card.
Some GPS Card I Can't Remember...
Palm Tungsten Retractable Stylus (If You're Not Using These, You're Missing Out!).
[/font][/span]

zodttd

  • Full Member
  • ***
  • Posts: 188
    • View Profile
Gp2x Psone Emulator Running Realy Fast
« Reply #23 on: January 21, 2006, 01:33:41 pm »
Yay! ZarPSX has been released!

Grab ZarPSX v0.01 at:
http://www.friggingames.com/zarpsx.zip

So, I named the emu ZarPSX. It's a working title. It's ZarPSX and not ZaurPSX since I have a tendancy to prefix things with a 3 letter name. Any suggestions for a final name?

Stuff that works in ZarPSX so far:
- A few games. I'm playing R-Types right now. Most games have graphical glitches or run slow in 640x480 mode. Let me know if you get a game working well. My guess is games like Bust A Move 4 and Buster Bros, will run well. Vandal Hearts runs pretty well but with a graphical glitch at the top of the screen. Compatibility list anyone?
- Saving/Loading from memory cards should work.
- BIN/Z/ZNX ISO support. I use XDuplicator (CDRTAO open source project frontend) for ripping to raw BIN format, then compress to Z or ZNX with PocketISO 2.0.
- Frameskipping works. Right now I only have it so the frameskip setting makes the actual blit skip, not the rendering. I can get a good speed up if I skip rendering of frames, but it causes graphical glitches as you could imagine.
- GPU is now my own custom version of Dr Hell's GPU. I like it a lot, but it needs more tweaking.
- 640x480 build for full screen 640x480 screen, as well as a 320x240 build for a huge speed increase (60 FPS in Final Fantasy 7 with frameskip of 1-2, though FF7 crashes pretty quickly into the game, more on that later).
- All the default controls work. They're mapped as noted below. They'll change as the emulator progresses, I just had this button layout set before people started suggesting there own.
- File menu for loading ISO's. It sucks, but it works!
- HLE support works. Hold down the 'H' key when selecting an ISO to run the game using HLE. HLE should improve performance, and perhaps fix or cause glitches by the way it handles emulating the PSX BIOS. When HLE is used, no BIOS ROM is needed, and no PSX splash screen is seen.

Stuff that doesn't work in ZarPSX yet:
- Final Fantasy 7 as well as some other games don't work when they should. As you can see in the code for ZarPSX, it's based off of PCSX. Yeah, PCSX. :/ ...Good thing is, PCSX works with a lot of games, including FF7, which is why I'm unsure as to the reason my small modifications to the core of PCSX made these games not work. I was thinking it might actually have to do with some of the "plugin" code I jammed into ZarPSX such as PlugCD.c. If someone feels like getting these games working with ZarPSX, please PM me.
- MDEC timings are off. This is probably a quick fix, but I timed the MDEC interrupt wrong. MDEC is the "movie codec" the PSX uses. So if you get really jittery or slideshow-like movies, this is why. I'll fix it asap.
- Games that span multiple ISOs won't work currently.

As I've explained to Urielka, ZarPSX's code is horrid imho. I think we can make this emulator much better as a community. So take a look at the code, clean it up, edit it, and submit it back to me, and I'll keep everything in order and keep the ZarPSX project humming along. Urielka is researching dynamic recompilers, and if a dynamic recompiler is made for ZarPSX, we will see a fairly good speed increase from it. Right now, 320x240 ZarPSX is pretty fast, full speed for most games with a single frameskip. But 640x480 ZarPSX needs about a 3 or 4 frameskip to reach the same speed, yet appears choppy. So let's get 640x480 full screen ZarPSX fullspeed!

Things to help out:
- Get a compatibility list for ZarPSX up and running. This will help me out greatly, especially when the emu progresses. A wiki would be good for this most likely.
- Fix bugs in ZarPSX and submit them to me.
- Get a CVS going?
- Help me figure out how to use the framebuffer on the Zaurus Cxxxx line.
- Get ZarPSX running on Zaurus' other than the Cxxxx line.

Keep in mind it's "normal" to wait a minute or so for the stupid PSX splash screen to finish. I'll speed this process up for the next release, in the meantime, wait for it or use HLE to skip the process.

----
How to use ZarPSX:
Run zarpsxhi for a full 640x480 resolution. Games will go slower.
Run zarpsxlow for 320x240 resolution. Games will go faster but will appear in a small window in the center of the screen. :/
----
Controls:
PSX -> Zaurus
UP/DOWN/LEFT/RIGHT -> Digital Pad
X/SQUARE/O/TRIANGLE -> A/S/D/F (might have these in the wrong order, i'll get the correct order in a bit)
L1/R1/L2/R2 -> Z/X/C/V
START -> ENTER
SELECT -> SPACE

SELECT ISO -> ENTER/OK
QUIT EMU -> BACKSPACE
LOWER FRAMESKIP -> K
RAISE FRAMESKIP -> L

Every once and awhile an issue comes along that a game reads from the wrong coord in the VRAM set for the PSX. I made a little fix for this by using the 'P' key to toggle this graphics fix. Don't use it unless you think it's needed (such as when the game seems frozen or is stuck on a blank screen).
----
BIOS:
If you do not use HLE, you will *NEED* a PSX BIOS. The BIOS should be named scph1001.bin and be located where zarpsx is. Please DO NOT ask for this file. If you can't find the file, try using HLE by holding down the 'H' key when selecting an ISO. HLE should give a slight speed increase as well, but may cause glitches.
----
Saving games:
Currently only saving through a memory card file is supported. That's why the two formatted memory card files (.mcr files) are included. Saving within the game to the memory card files should be the same as if it were being saved to an actual memory card on a PSX. So nothing to worry about here. Just keep the .mcr files in the same directory as zarpsx.
----
Required Librarys:
You will need the SDL library as well as the Zlib library installed on your Zaurus.
----
Required Zaurus:
This version will probably only work on the Cxxxx line of Zaurus' from the sounds of things. But maybe not, let me know!


Hope you enjoy ZarPSX! There's a long ways for it to go, but it's coming along. Once the compatibility goes up and things speed up enough to be able to use 640x480 over 320x240, things will be smooth. I really do think a fullspeed PSX emulator with sound is possible on the Zaurus Cxxxx. Let's get this project nice and polished.


ZodTTD

P.S. Anyone interested in a port of OpenTTD (Transport Tycoon Deluxe) to the Zaurus? I've ported it to many other handhelds, and can probably get it up and running on the Zaurus fairly easily if it hasn't been done already.
Also, I just remembered I forgot the makefile to compile zarpsx. It's simple to compile though. If anyone needs help compiling, let me know.
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 #24 on: January 21, 2006, 01:43:33 pm »
Just got some example code for bvdd support. I'll see if working it into the code makes things go faster, which it should. Argh SDL!
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. :)

kalgriffen

  • Newbie
  • *
  • Posts: 9
    • View Profile
Gp2x Psone Emulator Running Realy Fast
« Reply #25 on: January 21, 2006, 01:47:15 pm »
I think it's great that you are putting the time and effort into getting this working (and asking for community support to boot!).  Keep up the good work, and I do believe thanks are in order from all of us.

danboid

  • Hero Member
  • *****
  • Posts: 881
    • View Profile
    • http://
Gp2x Psone Emulator Running Realy Fast
« Reply #26 on: January 21, 2006, 10:25:00 pm »
Whoah!

I can't believe how fast you got a PSX emu for the Z together zodttd! You must've had yr Z for, what, 3 whole days? Is that Rtype Delta you say you've got running? WOW, if so! Wow anyway!    

I was keen to get pdaxrom on my C3000 but now this has been released... I probably won't be able to wait much longer before I put the new beta version on. I would imagine a bvdd version with a few more speed-ups would push me over the edge!

Don't suppose this first version supports a USB joypad?

If you were to ask me about the name I would only be able to name it psxz, but converted into zodish i suppose its called psxzee  
« Last Edit: January 21, 2006, 10:30:31 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

stuffman

  • Full Member
  • ***
  • Posts: 104
    • View Profile
    • http://www.dylanpowell.net/zaurus
Gp2x Psone Emulator Running Realy Fast
« Reply #27 on: January 22, 2006, 05:16:39 am »
Wowie wow wow wow! That was fast! I'd like to report that it is running on my C860, albeit *very* slowly at the moment. I don't know if it has to do with the Zaurus model itself or SDL or whatever, but running the zarpsxlow will runs fullscreen for me. Seeing as how I can only overclock my 860 to 471mhz (can it go higher? I'm afraid to try), a dynamic recompiler would be great, but heck, this project is only a few days old and I already have Final Fantasy Tactics running (slowly) on my Zaurus! Great work, keep it up!
[span style=\'font-size:8pt;line-height:100%\']SL-C860 Running pdaXrom 1.1.0beta1.
5GB Seagate ST-1 Microdrive from Rio Carbon, Asst. Other CF Cards.
512MB Sandisk SD.
AmbiCom WL1100C-CF WiFi Card.
Some GPS Card I Can't Remember...
Palm Tungsten Retractable Stylus (If You're Not Using These, You're Missing Out!).
[/font][/span]

desertrat

  • Hero Member
  • *****
  • Posts: 743
    • View Profile
    • http://
Gp2x Psone Emulator Running Realy Fast
« Reply #28 on: January 22, 2006, 05:37:17 am »
Quote
P.S. Anyone interested in a port of OpenTTD (Transport Tycoon Deluxe) to the Zaurus? I've ported it to many other handhelds, and can probably get it up and running on the Zaurus fairly easily if it hasn't been done already.
Also, I just remembered I forgot the makefile to compile zarpsx. It's simple to compile though. If anyone needs help compiling, let me know.
I had been wondering why no-one (AFAIK) has ported it to the Z yet. Since you asked, I, for one would not say no to your kind offer  

-- cheers
SL-C3100 / Ambicon WL1100C-CF / pdaXrom 1.1.0beta3 / IceWM

urielka

  • Full Member
  • ***
  • Posts: 178
    • View Profile
Gp2x Psone Emulator Running Realy Fast
« Reply #29 on: January 22, 2006, 09:00:47 am »
i have ported pcsx to the Zaurus a month ago but it was without any preformence tuning(then Sash or Laze put their own build on the feed).

i have been doing alot of research on dynamic recompilation of the R3000A to ARM9 core and i can say that i have a good direction on how to do this.

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.

this emulator can go upto 15-18 fps without any dynamic recompiler in 3D games with a very very good code,but it can get to full speed easily with a modest dynamic recompiler(Gte which is the thing that do 3D calculations is part of the dynamic recompiler coz it is part of the cpu).

plz help us make this dream come true
plz post here some documention so i can start this dynamic recompiler
« Last Edit: January 22, 2006, 09:06:28 am by urielka »