Author Topic: Fceu320 for Dingoo a380 (please test)  (Read 1392 times)

Offline d_smagin

  • *
  • Posts: 166
Fceu320 for Dingoo a380 (please test)
« on: July 28, 2012, 02:34:58 PM »
Hi!

In this thread I uploaded a version of fceu320 that should run on a380.

http://boards.dingoonity.org/dingux-releases/%28release%29-fceu320-v0-3-beta/msg45807/#msg45807

I've tested it only on Ritmix RZX-50, but as it has similar firmware layout as a380, I think this emu will work on a380. Please, test and report.

HOWTO INSTALL FOR RITMIX RZX-50 AND DINGOO A380/A320e:
 - copy folder fceu320 with its contents to "emulator" folder of inner flash-memory of your handheld
 - replace native fc_emu.dge with a replacement from the archive
 - disconnect and play

UPDATE: files should be placed like that:
/emulator/fceu320/fceu320.dge
/emulator/fc_emu.dge

After you first run fceu320 another folder with configs will appear:
/emulator/fceu320/.fceux
« Last Edit: July 29, 2012, 08:49:50 PM by d_smagin »
GCW-Zero prototype, Dingoo a320, Ritmix rzx-50, Dingoo a380

Offline Alien Grey

  • ***
  • Posts: 1049
Re: Fceu320 for Dingoo a380 (please test)
« Reply #1 on: July 28, 2012, 04:22:20 PM »
The emulator runs on the Dingoo A-380 but the screen is locked at the game selector menu.  ???

This also happens when I've tried to add an Atari Lynx emulator and the SDLWrapper from Ayla.
Dingoo A-380 CFW V2.08.03 - 2 x SanDisk 32GB Class 4 MicroSD Inside - 2 x Dingoo F-16 Wireless Game Controller

Offline d_smagin

  • *
  • Posts: 166
Re: Fceu320 for Dingoo a380 (please test)
« Reply #2 on: July 29, 2012, 01:08:33 PM »
Please, could you be more specific?

- did you use the installation scheme with fc_emu.dge replacement or did you just run fceu320.dge ?
- did it start? Black screen or stuck in the rom selection menu?
- or just nothing happens and the emu silently exits?

I need help to know exactly if this emu works on a320/a320e.

Thanks
GCW-Zero prototype, Dingoo a320, Ritmix rzx-50, Dingoo a380

Offline Alien Grey

  • ***
  • Posts: 1049
Re: Fceu320 for Dingoo a380 (please test)
« Reply #3 on: July 29, 2012, 01:25:01 PM »
I renamed it to fc_emu.dge and replaced it with the original emulator.

There's nothing wrong with your build. It runs and I can hear the sound but the screen is locked (stuck in the rom selection menu). There isn't anything you can do to fix it. I've spend a lot of hours trying to compile the Atari Lynx emulator but I didn't get it to run as it should. As long as Dingoo Technology doesn't release their source codes for their emulators there's nothing anyone can do to improve them.

Maybe there's a bug in the OS or they don't want us to replace or add new emulators.  :(
« Last Edit: July 29, 2012, 01:26:49 PM by Alien Grey »
Dingoo A-380 CFW V2.08.03 - 2 x SanDisk 32GB Class 4 MicroSD Inside - 2 x Dingoo F-16 Wireless Game Controller

Offline d_smagin

  • *
  • Posts: 166
Re: Fceu320 for Dingoo a380 (please test)
« Reply #4 on: July 29, 2012, 02:01:04 PM »
Well, you do have to use fc_emu.dge script, because it does some important things.
Code: [Select]
#! /bin/sh

# flush lcd is needed for rzx-50 and, possibly, a380
echo 1 > /proc/jz/lcd_flush

# redefine HOME, because it points to read-only (appfs.ext3)/local/home
export HOME=/mnt/memory/emulator/fceu320

# start actual emulator
cd /mnt/memory/emulator/fceu320
./fceu320.dge "$1"

# revert HOME
export HOME=/usr/local/home
On ritmix rzx50 there's also a problem if you run some emu, music starts, but nothing happens on screen. But i discovered if you do echo 1 > /proc/jz/lcd_flush before starting the emu, the screen begins to work.
Also by default the HOME environment variable points to /usr/local/home which is read only. The script redefines it to allow saving config and savestates.

Maybe, a380 doesn't support SDL_HWSURFACE | SDL_DOUBLEBUF flags in SDL_SetVideoMode? Because rzx50 does.
« Last Edit: July 29, 2012, 02:05:17 PM by d_smagin »
GCW-Zero prototype, Dingoo a320, Ritmix rzx-50, Dingoo a380

Offline Alien Grey

  • ***
  • Posts: 1049
Re: Fceu320 for Dingoo a380 (please test)
« Reply #5 on: July 29, 2012, 02:52:13 PM »
Didn't work.

It fails to launch the emulator and it goes back to the rom selection menu.


Something that I didn't say before is that everything seems to work with TV out but not with the lcd screen. I'm going to give it a try with TV out and let you know if it works with your emulator.
Dingoo A-380 CFW V2.08.03 - 2 x SanDisk 32GB Class 4 MicroSD Inside - 2 x Dingoo F-16 Wireless Game Controller

Offline Alien Grey

  • ***
  • Posts: 1049
Re: Fceu320 for Dingoo a380 (please test)
« Reply #6 on: July 29, 2012, 03:08:55 PM »
Your emulator works with TV out. Very slow but it works.  ;)
Dingoo A-380 CFW V2.08.03 - 2 x SanDisk 32GB Class 4 MicroSD Inside - 2 x Dingoo F-16 Wireless Game Controller

Offline Alien Grey

  • ***
  • Posts: 1049
Re: Fceu320 for Dingoo a380 (please test)
« Reply #7 on: July 29, 2012, 03:33:20 PM »
I've got it to work.

I didn't look at the script before I tried it. The script should be like this.

Code: [Select]
#! /bin/sh

# flush lcd is needed for rzx-50 and, possibly, a380
echo 1 > /proc/jz/lcd_flush

# redefine HOME, because it points to read-only (appfs.ext3)/local/home
export HOME=/mnt/memory/emulator

# start actual emulator
cd /mnt/memory/emulator
./fceu320.dge "$1"

# revert HOME
export HOME=/usr/local/home

The path to the fceu320.dge wasn't correct.  ;)

Thanks a lot. Looks like the lcd flush is necessary for the Dingoo A-380.  :)
Dingoo A-380 CFW V2.08.03 - 2 x SanDisk 32GB Class 4 MicroSD Inside - 2 x Dingoo F-16 Wireless Game Controller

Offline Alien Grey

  • ***
  • Posts: 1049
Re: Fceu320 for Dingoo a380 (please test)
« Reply #8 on: July 29, 2012, 04:07:04 PM »
The emulator is really fast. It runs at 60fps all the time on the Dingoo A-380.

Fullscreen doesn't seem to work and I would really like to use it at 400 x 240 pixels.  ;)


Anyway I'm going to test it some more. If anyone else like to test it I can make an archive with the files necessary to replace the Dingoo A-380 default fc_emu.dge.
Dingoo A-380 CFW V2.08.03 - 2 x SanDisk 32GB Class 4 MicroSD Inside - 2 x Dingoo F-16 Wireless Game Controller

Offline d_smagin

  • *
  • Posts: 166
Re: Fceu320 for Dingoo a380 (please test)
« Reply #9 on: July 29, 2012, 04:14:34 PM »
Now I see. Seems that you've put fceu320.dge to the wrong folder from the start. My idea was to have files like this:
(vfat)/emulator/fceu320/fceu320.dge
(vfat)/emulator/fc_emu.dge - replacement script

Once you start the emulator, another folder will appear:
(vfat)/emulator/fceu320/.fceux

Thanks a lot.

In theory, every standard emulator could be replaced. :) What are the most awful standard emulators on a380? On rzx50 they are: gba (sound is always behind), nes (stuttering sound), gg and sms (too fast). And all emulators have shitty upscaling to fullscreen (SDL_stretch.h is used, oh my....)
GCW-Zero prototype, Dingoo a320, Ritmix rzx-50, Dingoo a380

Offline Alien Grey

  • ***
  • Posts: 1049
Re: Fceu320 for Dingoo a380 (please test)
« Reply #10 on: July 29, 2012, 04:15:53 PM »
fceu320 for Dingoo A-380: https://dl.dropbox.com/u/525714/fceu320.zip

Replace (or rename) the fc_emu.dge from the emulator folder on the Dingoo A-380 with the files from the fceu320 archive. Have fun testing the emulator from d_smagin.  ;)
Dingoo A-380 CFW V2.08.03 - 2 x SanDisk 32GB Class 4 MicroSD Inside - 2 x Dingoo F-16 Wireless Game Controller

Offline d_smagin

  • *
  • Posts: 166
Re: Fceu320 for Dingoo a380 (please test)
« Reply #11 on: July 29, 2012, 04:19:40 PM »
Sorry, I have not coded an upscale routine to 400x240, I only made the emulator recognize any available resolution (480x272 - rzx50, 400x240 - a380, 320x240 - a320) and center the image properly. But you can take a look at sources on openhandhelds, they are universal.
http://dl.openhandhelds.org/cgi-bin/dingoo.cgi?0,0,0,0,46,607
GCW-Zero prototype, Dingoo a320, Ritmix rzx-50, Dingoo a380

Offline Alien Grey

  • ***
  • Posts: 1049
Re: Fceu320 for Dingoo a380 (please test)
« Reply #12 on: July 29, 2012, 04:32:09 PM »
Now I see. Seems that you've put fceu320.dge to the wrong folder from the start. My idea was to have files like this:
(vfat)/emulator/fceu320/fceu320.dge
(vfat)/emulator/fc_emu.dge - replacement script

Once you start the emulator, another folder will appear:
(vfat)/emulator/fceu320/.fceux

Thanks a lot.

In theory, every standard emulator could be replaced. :) What are the most awful standard emulators on a380? On rzx50 they are: gba (sound is always behind), nes (stuttering sound), gg and sms (too fast). And all emulators have shitty upscaling to fullscreen (SDL_stretch.h is used, oh my....)

Keep in mind that the emulator doesn't run from the FAT32. There's a symlink to the fc_emu.dge on the EXT3 partition so all files created are probably going to be created on that partition. I think that the easiest way to do it for everyone is just replacing the files necessary in the emulator folder without having to make sub folders.

I know that all the emulators can be replaced but I didn't know that a lcd flush would do the trick to let them run on the Dingoo A-380. There's still hope that I can get the Atari Lynx emulator to work on the Dingoo A-380. I'm not a developer. For everything I do I need a good backup before I start messing with it.  ;D


The worst emulator is the NES emulator so I'm really happy that you build a new one. The Gameboy and Gameboy color emulator should also be replaced because they run to fast.
Dingoo A-380 CFW V2.08.03 - 2 x SanDisk 32GB Class 4 MicroSD Inside - 2 x Dingoo F-16 Wireless Game Controller

Offline Alien Grey

  • ***
  • Posts: 1049
Re: Fceu320 for Dingoo a380 (please test)
« Reply #13 on: July 29, 2012, 04:34:38 PM »
Sorry, I have not coded an upscale routine to 400x240, I only made the emulator recognize any available resolution (480x272 - rzx50, 400x240 - a380, 320x240 - a320) and center the image properly. But you can take a look at sources on openhandhelds, they are universal.
http://dl.openhandhelds.org/cgi-bin/dingoo.cgi?0,0,0,0,46,607

Maybe this is something for your next version.  ;D
Dingoo A-380 CFW V2.08.03 - 2 x SanDisk 32GB Class 4 MicroSD Inside - 2 x Dingoo F-16 Wireless Game Controller

Offline d_smagin

  • *
  • Posts: 166
Re: Fceu320 for Dingoo a380 (please test)
« Reply #14 on: July 29, 2012, 06:00:05 PM »
Keep in mind that the emulator doesn't run from the FAT32. There's a symlink to the fc_emu.dge on the EXT3 partition so all files created are probably going to be created on that partition. I think that the easiest way to do it for everyone is just replacing the files necessary in the emulator folder without having to make sub folders.

Right and wrong. I know that emulators are really in appfs.ext3 (or whatever name it has). Once you've replaced the fc_emu.dge with a script, it doesn't matter anymore, since the script "jumps" to FAT with "cd /mnt/memory/emulator/fceu320". So you don't really need to mess with appfs.ext3. The replacement of fc_emu.dge does the trick.
GCW-Zero prototype, Dingoo a320, Ritmix rzx-50, Dingoo a380