Author Topic: FCEUX 2.2.3 - UPDATE 2016-08-23  (Read 66507 times)

dmitry_smagin (OP)

  • Posts: 423
FCEUX 2.2.3 - UPDATE 2016-08-23
« on: November 14, 2013, 11:32:29 am »
Hello.

Here's the latest stable FCEUX 2.2.3 combined with the gui from fceu320.




Supported: *.nes, *.fds, *.zip
Important note for *.fds:
1) don't forget to place disksys.rom to ~/.fceux
2) *.fds files are not shown in gmenu2x rom browser, just zip them for good

Game Genie
1) put Game Genie rom to ~/.fceux and rename it to gg.rom
2) enable Game Genie from Main Menu

Some rare games (like Elite shown above) require PAL setting to be on (Main Settings). Otherwise the lower part of the screen will be garbled. For other games it has the effect of pitching down the music. If you know other games that require PAL, please, tell me. :)

What's new:
- a lot of obscure, chinese and unlicensed roms should work now (see changelog for FCEUX 2.2.2)
- Vsync is on by default which means tearless scrolling
- Sound rates: 8000, 11025, 16000, 22050, 24000, 32000 (default), 44100, 48000
- Optional stretching to fullscreen
What's new 2014-02-10
- New skin and icon by hi-ban
- New fullscreen scalers: fast and smooth
- Last dir is remembered for internal rom browser
What's new 2014-05-14
- Better navigation in rom menu (hold LEFT or RIGHT for fast scrolling)
- Control mapping
What's new 2014-05-26
- Fixed crash in rom browser if there are less than 8 files in directory
- Audio lag between 16 and 50 milliseconds (hard limits, NTSC) or 20 and 60 milliseconds (hard limits, PAL). The average is 35 milliseconds. Previously, it could go up to 1 second if you entered the menu too much.
- Less odd crackling caused by audio underruns.
- PAL timed games now run at their proper speed, 50 FPS. You must still set PAL to 1 in /Settings/Main Setup, however.
- Triple-buffering. You can set the Quality setting (/Settings/Sound Setup/Quality) to 1 and it will run fine, but 2 is still far too slow.
What's new 2016-08-23
- Update to fceux 2.2.3 core, more mappers and emulation fixes

Controls
 Pad   Pad
 A       A
 B       B
 X       TurboB
 Y       TurboA
 Select    Select
 Start      Start

 R Shoulder           Hotkey combo
 L Shoulder         Open GUI screen

 *Default Hotkeys*
 R + A            Save state (current slot from gui is used)
 R + B             Load state (current slot from gui is used)
 R + Y            Toggle fullscreen
 R + X            Flip fds disk
 R + UP            Toggle framerate display
 R + LEFT         Insert vsuni coin
 R + SELECT         Save snapshot
 R + START         Pause emulation

Download opk (updated 2016-08-23): http://prizma.bmstu.ru/~exmortis/opk/fceux.opk
Download opk (updated 2014-06-15): https://www.sendspace.com/file/48hme6
Source code: https://github.com/dmitrysmagin/fceu320-rzx50

Please, before asking 'why does it work so weird?' remove previous configs for fceu320 or fceux (remove ~/.fceux folder)
« Last Edit: August 23, 2016, 11:42:46 am by dmitry_smagin »
GCW-Zero prototype, Dingoo a320, Ritmix rzx-50, Dingoo a380, Xperia Play

Gab1975

  • Posts: 1165
Re: FCEUX 2.2.2
« Reply #1 on: November 14, 2013, 02:02:04 pm »
Thanks a lot! :) I tested the following games and they all run at full speed: 1942, 1943, Bugs Bunny Crazy Castle, Castlevania, Parodius, Pinball Quest, Salamander, Super Mario Bros 3, Tiny Toon Adventures and Wacky Races.

NB: I used the original resolution (no scaling), the audio sample rate at 44100 Hz and the low-pass filter enabled.
« Last Edit: November 15, 2013, 08:45:46 am by Gab1975 »

Pliskron

  • Posts: 124
Re: FCEUX 2.2.2
« Reply #2 on: November 14, 2013, 04:23:18 pm »
I don't know what's up with this emulator but it's always had horrible sound.

dmitry_smagin (OP)

  • Posts: 423
Re: FCEUX 2.2.2
« Reply #3 on: November 14, 2013, 04:31:33 pm »
Just noticed that configs were not saved for each particular game, just the main fceux.cfg. Fixed and reuploaded (see first post).

I don't know what's up with this emulator but it's always had horrible sound.

I don't hear anything horrible though sound is rather 'grainy'. Anyway, blame fceux's authors! :D Or help to improve.

EDIT: Again noticed a bug: previews weren't saved for quick-saves (R + A). Again fixed and reuploaded.
« Last Edit: November 14, 2013, 06:15:54 pm by d_smagin »
GCW-Zero prototype, Dingoo a320, Ritmix rzx-50, Dingoo a380, Xperia Play

boelze

  • Posts: 42
Re: FCEUX 2.2.2
« Reply #4 on: November 14, 2013, 06:28:19 pm »
Thanks alot for the update! Sound is alot better now.

I can confirm legend of zelda is now fully playable soundwise (it had REALLY bad sound before).

opt2not

  • Posts: 203
Re: FCEUX 2.2.2
« Reply #5 on: November 14, 2013, 09:25:56 pm »
Wooo hoo!  Thanks for the update!  :)

gustavolatil

  • Posts: 131
Re: FCEUX 2.2.2
« Reply #6 on: November 15, 2013, 12:21:39 pm »
T H A N K S!

RupeeClock

  • Posts: 223
Re: FCEUX 2.2.2
« Reply #7 on: November 15, 2013, 04:39:20 pm »
Thanks a lot! This emulator was in much need of an update to address some issues.
Question though, are the controls remappable? I prefer to remap B/A to X/B whenever possible, not just because the A button on my GCW Zero is unresponsive.

dmitry_smagin (OP)

  • Posts: 423
Re: FCEUX 2.2.2
« Reply #8 on: November 15, 2013, 04:58:09 pm »
Again a small fix and reupload, also added some screenshots.

Thanks a lot! This emulator was in much need of an update to address some issues.
Question though, are the controls remappable? I prefer to remap B/A to X/B whenever possible, not just because the A button on my GCW Zero is unresponsive.

Keys are hardcoded for now, though cfg files contain some data for remapping. It's a next issue to improve, thanks for pointing.
GCW-Zero prototype, Dingoo a320, Ritmix rzx-50, Dingoo a380, Xperia Play

BlockABoots

  • Posts: 131
Re: FCEUX 2.2.2
« Reply #9 on: November 15, 2013, 11:58:32 pm »
Great, thanks!! But it doesnt appear to remember your rom location!?

boelze

  • Posts: 42
Re: FCEUX 2.2.2
« Reply #10 on: November 16, 2013, 12:13:15 am »
Question though, are the controls remappable? I prefer to remap B/A to X/B whenever possible, not just because the A button on my GCW Zero is unresponsive.

I like to play with that button mapping too. You can change to that by editing the config file in /.fceux

Code: [Select]
SDL.Input.GamePad.0A = 308
SDL.Input.GamePad.0B = 304

gustavolatil

  • Posts: 131
Re: FCEUX 2.2.2
« Reply #11 on: November 16, 2013, 01:42:23 am »
Great, thanks!! But it doesnt appear to remember your rom location!?
at the menu highlight the fceux icon and press select, then edit fceux and select directory

BlockABoots

  • Posts: 131
Re: FCEUX 2.2.2
« Reply #12 on: November 16, 2013, 12:54:07 pm »
Great, thanks!! But it doesnt appear to remember your rom location!?
at the menu highlight the fceux icon and press select, then edit fceux and select directory

Yeah i tried that already but for some reason FCeux doesnt appear to have this option in the list!?

MacDonals

  • Posts: 79
FCEUX 2.2.2
« Reply #13 on: November 17, 2013, 07:59:03 pm »
I still can not get FDS games to god damn work.  I have a good disksys.rom file.  It is in .fceux folder.  My *.fds files are zipped and on the external card.  When I try to select an FDS ROM from Rom Browser, the screen goes black and I am taken back to the Emulators section of OD.

I guess I can try a full uninstall and reinstall (completely delete the .fceux folder and the opk)...
Update: that didn't help
« Last Edit: November 17, 2013, 11:23:05 pm by MacDonals »

kuwanger

  • Posts: 29
Re: FCEUX 2.2.2
« Reply #14 on: November 17, 2013, 08:40:58 pm »
So, about the grainy sound.  For whatever reason, the dingoo author(s) apparently made FCEU output in stereo instead of mono by copying samples to both channels.  Unfortunately, they didn't consider sign extension as int16 is promoted to int32, so that's the cause of the grainy sound--you can verify this with headphones and notice that the left sounds fine and the right sound grainy.  So, the solution is to either (a) revert to mono sound (since there's little point in duplicating the sample manually) or (b) mask out the bottom 16-bits when doing the sample copying.  Anyways, here's a patch to do the former.

Code: [Select]
--- fceu320-rzx50/src/drivers/dingux-sdl/dingoo-sound.cpp 2013-11-17 15:33:00.779739255 -0500
+++ fceu320-rzx50.new/src/drivers/dingux-sdl/dingoo-sound.cpp 2013-11-17 14:33:51.503796108 -0500
@@ -46,20 +46,20 @@
  */
 static void fillaudio(void *udata, uint8 *stream, int len) // len == spec.samples * 4
 {
-    int32 *tmps = (int32 *)stream;
-    len >>= 2;
+    int16 *tmps = (int16 *)stream;
+    len >>= 1;
 
     // debug code
     //printf("s_BufferIn: %i s_BufferWrite = %i s_BufferRead = %i s_BufferSize = %i\n",
     //    s_BufferIn, s_BufferWrite, s_BufferRead, s_BufferSize);
 
     while (len) {
-        int32 sample = 0;
+        int16 sample = 0;
         if (s_BufferIn) {
             sample = s_Buffer[s_BufferRead];
             s_BufferRead = (s_BufferRead + 1) % s_BufferSize;
             s_BufferIn--;
-            sample |= (sample << 16);
+//          sample = (sample&0xffff) | (sample<<16);
         } else {
             sample = 0;
         }
@@ -110,7 +110,8 @@
 
     spec.freq = soundrate;
     spec.format = AUDIO_S16;
-    spec.channels = 2;
+//    spec.channels = 2;
+    spec.channels = 1;
     spec.samples = 512;
     spec.callback = fillaudio;
     spec.userdata = 0;

PS - The reason I don't release a binary is the github apparently did some clean up that has left the GUI non-functional, and I don't readily know enough about git to use an earlier revision. :/

Seph817

  • Posts: 127
Re: FCEUX 2.2.2
« Reply #15 on: November 18, 2013, 03:11:02 am »
I still can not get FDS games to god damn work.  I have a good disksys.rom file.  It is in .fceux folder.  My *.fds files are zipped and on the external card.  When I try to select an FDS ROM from Rom Browser, the screen goes black and I am taken back to the Emulators section of OD.

I guess I can try a full uninstall and reinstall (completely delete the .fceux folder and the opk)...
Update: that didn't help

I have my FDS roms in a separate folder from the NES ones. They're not zipped and I open them from the GUI in FCEUX. They work fine for me. Yeah, I have to browse to that folder every time I want to play one but, it works.

dmitry_smagin (OP)

  • Posts: 423
Re: FCEUX 2.2.2
« Reply #16 on: November 18, 2013, 04:18:12 am »
So, about the grainy sound.  For whatever reason, the dingoo author(s) apparently made FCEU output in stereo instead of mono by copying samples to both channels.  Unfortunately, they didn't consider sign extension as int16 is promoted to int32, so that's the cause of the grainy sound--you can verify this with headphones and notice that the left sounds fine and the right sound grainy.  So, the solution is to either (a) revert to mono sound (since there's little point in duplicating the sample manually) or (b) mask out the bottom 16-bits when doing the sample copying.  Anyways, here's a patch to do the former.

Code: [Select]
--- fceu320-rzx50/src/drivers/dingux-sdl/dingoo-sound.cpp 2013-11-17 15:33:00.779739255 -0500
+++ fceu320-rzx50.new/src/drivers/dingux-sdl/dingoo-sound.cpp 2013-11-17 14:33:51.503796108 -0500
@@ -46,20 +46,20 @@
  */
 static void fillaudio(void *udata, uint8 *stream, int len) // len == spec.samples * 4
 {
-    int32 *tmps = (int32 *)stream;
-    len >>= 2;
+    int16 *tmps = (int16 *)stream;
+    len >>= 1;
 
     // debug code
     //printf("s_BufferIn: %i s_BufferWrite = %i s_BufferRead = %i s_BufferSize = %i\n",
     //    s_BufferIn, s_BufferWrite, s_BufferRead, s_BufferSize);
 
     while (len) {
-        int32 sample = 0;
+        int16 sample = 0;
         if (s_BufferIn) {
             sample = s_Buffer[s_BufferRead];
             s_BufferRead = (s_BufferRead + 1) % s_BufferSize;
             s_BufferIn--;
-            sample |= (sample << 16);
+//          sample = (sample&0xffff) | (sample<<16);
         } else {
             sample = 0;
         }
@@ -110,7 +110,8 @@
 
     spec.freq = soundrate;
     spec.format = AUDIO_S16;
-    spec.channels = 2;
+//    spec.channels = 2;
+    spec.channels = 1;
     spec.samples = 512;
     spec.callback = fillaudio;
     spec.userdata = 0;

PS - The reason I don't release a binary is the github apparently did some clean up that has left the GUI non-functional, and I don't readily know enough about git to use an earlier revision. :/

Damn, I forgot about sign extension int16 -> int32; fixed and opk reuploaded.
The reason of doubling mono to stereo is to allow working on legacy dingux, on which mono streaming doesn't work (it silently sets itself to stereo).
However, fceux core renders sound in mono, but uses int32 for optimizing. You can see in original sdl driver that it simply discards upper part of sample before sending it. :)
GCW-Zero prototype, Dingoo a320, Ritmix rzx-50, Dingoo a380, Xperia Play

kuwanger

  • Posts: 29
Re: FCEUX 2.2.2
« Reply #17 on: November 18, 2013, 06:41:18 am »
Well, I figured out that it wasn't that the GUI is non-functional...it just externalized all the numbers/font. :)  So, after copying that over it all worked.  So, I decided to toy around with the fullscreen scaler.  It's a mixture of Scale2x and a smooth downscaler.  It's not really exactly what I want, but it looks a little better to me than the current fullscreen scaler.  Anyways, here it is.

fceux.opk /w different fullscreen scaler

PS - Thanks d_smagin.  I figured it might be something like that.

Edit - And here's another scaler that uses subpixel rendering based on cleartext type scaling.  Since FCEU actually uses a 256x240 screen buffer and clipping the sides is common (although seemingly hard-coded one way or the other for various scale modes), I went with this 240x240 -> 320x240 upscale.  At least the results are more crisp, now. :)

fceux.opk /w subpixel scaler (rename to fceux.opk in use)
« Last Edit: November 18, 2013, 04:35:50 pm by kuwanger »

segakiki

  • Posts: 88
Re: FCEUX 2.2.2
« Reply #18 on: November 18, 2013, 05:43:15 pm »
Thanks guys for your work! this emu is perfection for me!
Tried a few games and the sound is crisp and the new scaler looks great!

dmitry_smagin (OP)

  • Posts: 423
Re: FCEUX 2.2.2
« Reply #19 on: November 18, 2013, 05:51:21 pm »
Well, I figured out that it wasn't that the GUI is non-functional...it just externalized all the numbers/font. :)  So, after copying that over it all worked.  So, I decided to toy around with the fullscreen scaler.  It's a mixture of Scale2x and a smooth downscaler.  It's not really exactly what I want, but it looks a little better to me than the current fullscreen scaler.  Anyways, here it is.

fceux.opk /w different fullscreen scaler

PS - Thanks d_smagin.  I figured it might be something like that.

Edit - And here's another scaler that uses subpixel rendering based on cleartext type scaling.  Since FCEU actually uses a 256x240 screen buffer and clipping the sides is common (although seemingly hard-coded one way or the other for various scale modes), I went with this 240x240 -> 320x240 upscale.  At least the results are more crisp, now. :)

fceux.opk /w subpixel scaler (rename to fceux.opk in use)

Could you share your code, please? I'll integrate it into my sourcetree.
GCW-Zero prototype, Dingoo a320, Ritmix rzx-50, Dingoo a380, Xperia Play

 

Post a new topic