Author Topic: VirtualJaguar port for GCW0  (Read 900 times)

gameblabla (OP)

  • *
  • Posts: 437
VirtualJaguar port for GCW0
« on: December 12, 2016, 05:17:00 am »
I finally found the old VirtualJaguar SDL port source code and i decided to take a look at it.
After backporting some upstream code to it, i managed to fix some graphical bugs in some games.



I then decided to port it to the GCW0 and it ended up running much slower than i expected...
No offense but the Ingenic proc runs like a 300Mhz Pentium 2.

That said, you could still play some games on it.
Wolfenstein 3D is the fastest game to run on VirtualJaguar and is somewhat playable.
Cybermorph works somewhat slowly and is kind of unresponsive.

Atari Karts looks great but runs very slowly.
Bubsy works but only when DSP is disabled, same for Worms.

Power Drive Rally will mess up your screen, don't use it for now.

You can download the emulator here :
https://github.com/gameblabla/virtualjaguar-sdl/raw/master/vj.opk

No need for bioses or configuration...
Just put the OPK in /media/data/apps and you're good to go.

Here's Worms (Atari Jaguar version) running on the GCW0.
<a href="http://www.youtube.com/watch?v=bBzMDjIjkv8" target="_blank">http://www.youtube.com/watch?v=bBzMDjIjkv8</a>
« Last Edit: January 06, 2017, 04:31:15 pm by gameblabla »

dmitry_smagin

  • *
  • Posts: 395
Re: VirtualJaguar port for GCW0
« Reply #1 on: December 12, 2016, 07:02:24 am »
That's cool. Thanks for the effort!
GCW-Zero prototype, Dingoo a320, Ritmix rzx-50, Dingoo a380, Xperia Play

zhongtiao1

Re: VirtualJaguar port for GCW0
« Reply #2 on: December 12, 2016, 10:55:40 pm »
Same thing on the jaguar core I made for the retroarch emulator.

If you wanted to optimize it, you probably could

Sent from my Q5 using Tapatalk 2

congusbongus

  • *
  • Posts: 74
    • congusbongusgames
Re: VirtualJaguar port for GCW0
« Reply #3 on: December 12, 2016, 11:02:06 pm »
That graphical "bug" looks like interlacing. How was it fixed? By doubling the frame rate?

gameblabla (OP)

  • *
  • Posts: 437
Re: VirtualJaguar port for GCW0
« Reply #4 on: December 13, 2016, 12:52:22 am »
Quote
Same thing on the jaguar core I made for the retroarch emulator.
If you wanted to optimize it, you probably could
I could of course obviously but honestly, the libretro tax overhead is too much for the GCW0.
It's already slow as it is.

That graphical "bug" looks like interlacing. How was it fixed? By doubling the frame rate?
I don't know if this was an interlacing bug. I fixed it by merging the upstream GPU code.
After that, the graphics corruption was gone. It also fixed the HUD in Wolfenstein 3D.

I have removed the libstdc++ dependency. This made the executable smaller and it should be more cache friendly.
I'll soon release a new update.
« Last Edit: January 06, 2017, 04:32:03 pm by gameblabla »

Senor Quack

  • *
  • Posts: 174
Re: VirtualJaguar port for GCW0
« Reply #5 on: December 13, 2016, 03:37:47 am »
Cool, nice to see new stuff.

I then decided to port it to the GCW0 and it ended up running much slower than i expected...
No offense but the Ingenic proc runs like a 300Mhz Pentium 2.

That's really about all you can expect. The P2 is an advanced, complex CPU with many more power-hungry transistors than our simpler RISC core. P2 has out-of-order execution, superscalar issuing, pipelined multiplier/FPU, compiler support for auto-vectorized SIMD, etc.
« Last Edit: December 13, 2016, 03:41:17 am by Senor Quack »

gameblabla (OP)

  • *
  • Posts: 437
Re: VirtualJaguar port for GCW0
« Reply #6 on: December 13, 2016, 04:17:07 am »
I have released a new update that's a hair faster and it can run Worms fullspeed !
(No DSP, frameskip of 6)

I made a video showing how Worms runs on it :
https://www.youtube.com/watch?v=bBzMDjIjkv8

Pretty much all the other games run slowly tho. (except maybe homebrew games)

That's really about all you can expect. The P2 is an advanced, complex CPU with many more power-hungry transistors than our simpler RISC core. P2 has out-of-order execution, superscalar issuing, pipelined multiplier/FPU, compiler support for auto-vectorized SIMD, etc.
much sadness.
Are you sure GCC is taking advantage of the MXU tho ?
I thought it didn't compile code for MXU on MIPS but maybe this had changed ?

Senor Quack

  • *
  • Posts: 174
Re: VirtualJaguar port for GCW0
« Reply #7 on: December 13, 2016, 05:23:05 am »
Are you sure GCC is taking advantage of the MXU tho ?
I thought it didn't compile code for MXU on MIPS but maybe this had changed ?

GCC doesn't have MXU auto-vectorization, but our toolchain can generate the instructions if you use assembly. The test build of GCC 6 pcercuei recently released lacks all MXU support, as the MXU patches would need to be ported.

gameblabla (OP)

  • *
  • Posts: 437
Re: VirtualJaguar port for GCW0
« Reply #8 on: December 16, 2016, 02:00:46 am »
GCC doesn't have MXU auto-vectorization, but our toolchain can generate the instructions if you use assembly. The test build of GCC 6 pcercuei recently released lacks all MXU support, as the MXU patches would need to be ported.
This sucks obviously. Where he released his test build tho ?
It doesn't really matter if it doesn't have MXU patches.
I know no games except the experimental branch of PocketSNES that uses the MXU.

I do wonder something tho.... if i can make a static build that can fit inside L2 cache,
would the emulation speed dramatically increase ? Or not by much ?
Or maybe the operating system and the backgrounds apps like ftp are already filling up the cache ?

As far as Virtual Jaguar go, i can't seem to optimise further.
The emulation of each coprocessor plus the GPU really slows this down to a crawl.
I'm not even sure a JIT for m68k would be enough to significantly lower the cpu usage.
I did release an update that should speed up things a bit on the Non-DSP version.
« Last Edit: December 16, 2016, 03:22:06 am by gameblabla »