Patch: Mipsel32 dynarec fixes - Dosbox on GCW-Zero handheld

Here you can discuss the development of patches.

Patch: Mipsel32 dynarec fixes - Dosbox on GCW-Zero handheld

Postby d_smagin » 2013-3-09 @ 07:55

Hello, Qbix and other Dosbox developers.

I'm doing a port of Dosbox for GCW-Zero handheld, a successor for Dingoo a320. GCW-Zero is powered by Ingenic jz4770 SoC (mips32r2) and runs a variant of linux.

Current mipsel32 dynarec can't be used because it's intended for psp which has some differences in terms of OS conventions and memory handling. Here's attached a patch for risc_mipsel32.h which fixes it.

The most prominent changes are:
- added a replacement for seb/seh opcodes for mips32 revision 1 systems
- direct calls (jal) are replaced with indirect ones (jalr)
- fixed correct stackframe setting in gen_run_code() and gen_return_function()
- added proper cacheflush
- some small fixes

Here's the video of some games running on GCW-Zero:

http://www.youtube.com/watch?feature=player_detailpage&v=1o4l2EAx7Js&list=UUFcLcU_iSRU-umtv2nKgpeA
http://www.youtube.com/watch?list=UUFcLcU_iSRU-umtv2nKgpeA&v=VPwiYW6buTY&feature=player_detailpage
UPDATE2: screen keyboard http://www.youtube.com/watch?v=J6P7I9LgYIY&feature=player_detailpage

It would be fine if this patch was added to mainline Dosbox.
Thanks.

Dmitry Smagin

UPDATE:

Patch update in attachment. What's new:
- The new output=surface_dingux is introduced which handles some quirks of the system. This allows to separate GCW-Zero specific code from the rest.
- Some hi-res modes (640x400x8, 640x480x8) are downscaled to 320x240 screen of GCW-Zero, others are just blitted with clipping.

Actually, OpenDingux (GCW-Zero OS) doesn't have X Server, just the pure framebuffer (/dev/fb0) which is always fullscreen. Moreover, framebuffer driver doesn't handle resolutions bigger than 320x240 (though this may change in future). That's why dosbox output should be handled in a special way, hence the new surface_dingux. No other changes to .conf file except output=surface_dingux are needed.

Full source code is here: https://github.com/dmitrysmagin/dosbox-gcw0
You do not have the required permissions to view the files attached to this post.
Last edited by d_smagin on 2013-4-08 @ 05:26, edited 4 times in total.
d_smagin
Newbie
 
Posts: 4
Joined: 2013-3-09 @ 07:37
Location: Russia, Belgorod

Re: Patch: Mipsel32 dynarec fixes - Dosbox on GCW-Zero handheld

Postby crazyc » 2013-3-11 @ 14:35

Good to see some additional work on the mips recompiler support. I added some delay slot filling in the patch ps2dev if you're interested.
crazyc
Newbie
 
Posts: 84
Joined: 2013-2-02 @ 16:17

Re: Patch: Mipsel32 dynarec fixes - Dosbox on GCW-Zero handheld

Postby d_smagin » 2013-3-11 @ 20:32

Hello, Crazyc.
Could you show your patches? Also, how mipsel32 dynarec could be further improved to your mind?
Thanks.
d_smagin
Newbie
 
Posts: 4
Joined: 2013-3-09 @ 07:37
Location: Russia, Belgorod

Re: Patch: Mipsel32 dynarec fixes - Dosbox on GCW-Zero handheld

Postby HunterZ » 2013-3-11 @ 21:23

Hadn't heard of that handheld. I picked up a GP2x Wiz a couple years ago and love it, except that it's slower than I'd like at SNES Mode 7 emulation even when overclocked to ~900Mhz.

This gives me hope that better affordable stuff will be out there if/when my Wiz kicks the bucket.
User avatar
HunterZ
l33t++
 
Posts: 6072
Joined: 2003-1-31 @ 19:04
Location: Seattle

Re: Patch: Mipsel32 dynarec fixes - Dosbox on GCW-Zero handheld

Postby Pickle » 2013-3-12 @ 14:26

HunterZ, i have a early prototype and its much faster than the wiz/caanoo. It would be a nice replacement. Its also an important device as something is needed to fill the void GPH has left (since they quit game devices).
Pickle
Newbie
 
Posts: 94
Joined: 2008-4-14 @ 13:15

Re: Patch: Mipsel32 dynarec fixes - Dosbox on GCW-Zero handheld

Postby HunterZ » 2013-3-12 @ 16:25

Hey, it's Pickle! Nice to cross paths with you on VOGONS :)

The only problem with a new device is that the open handheld space is already crazy fragmented, but this looks more promising as a new device for the open handheld community to rally around than the problematic Pandora (which honestly just added another fragment due to its lack of attainability resulting from production woes and high price).
User avatar
HunterZ
l33t++
 
Posts: 6072
Joined: 2003-1-31 @ 19:04
Location: Seattle

Re: Patch: Mipsel32 dynarec fixes - Dosbox on GCW-Zero handheld

Postby Pickle » 2013-3-12 @ 16:42

Yeah i lurk on here time to time ;-)

I would agree its fragmented for older devices, but for currently produced devices its very small. Its ether the pandora or the gcw.
Pandora has actually stabilized with the new production. There are no more waits if you want one. Price is still pretty high. It still is the the best device out there for mobile open source linux. GCW is nice but it could never replace my pandora. Although I wish i had the GCW wifi in the pandora.

sorry d_smaginm weve highjacked your thread ;-)
Pickle
Newbie
 
Posts: 94
Joined: 2008-4-14 @ 13:15

Re: Patch: Mipsel32 dynarec fixes - Dosbox on GCW-Zero handheld

Postby d_smagin » 2013-3-14 @ 07:01

Update in first post.
d_smagin
Newbie
 
Posts: 4
Joined: 2013-3-09 @ 07:37
Location: Russia, Belgorod

Re: Patch: Mipsel32 dynarec fixes - Dosbox on GCW-Zero handheld

Postby d_smagin » 2013-4-07 @ 17:51

Update2: Added screen keyboard (third video shows it).
d_smagin
Newbie
 
Posts: 4
Joined: 2013-3-09 @ 07:37
Location: Russia, Belgorod

Re: Patch: Mipsel32 dynarec fixes - Dosbox on GCW-Zero handheld

Postby Dominus » 2013-5-09 @ 20:06

Moved to the patches forum viewforum.php?f=41
User avatar
Dominus
DOSBox Moderator
 
Posts: 7532
Joined: 2002-10-03 @ 09:54
Location: Vienna or Ludwigsburg


Return to DOSBox Patches

Who is online

Users browsing this forum: No registered users and 1 guest