• HomeBoards
  • RulesRules
  • HelpHelp
  • WikiWiki
  • Donate

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

kuwanger

  • Posts: 29
Re: FCEUX 2.2.2
« Reply #20 on: November 18, 2013, 06:49:40 pm »
Code for the first scaler:

Code: [Select]
#define SX 256
#define SY 224
#define DX 320
#define DY 240

#define P(X) (palettetranslate[X])
#define COLORMIX16(A,B,C,D) (((P(A) >> 2) & 0x39E7) + ((P(B) >> 2) & 0x39E7) + ((P(C) >> 2) & 0x39E7) + ((P(D) >> 2) & 0x39E7))

void upscale_320x240(uint32 *dst, uint8 *src)
{
uint16 *buffer = (uint16 *) alloca(sizeof(uint16) * SX * SY * 2 * 2), *buf;
uint16 *dest = (uint16 *) dst;
uint8 *src_old;
int mix = 0;
int x,y;
int dx, dy;
int sx, sy;

uint16 color, a, b, c, d;

// Scale2x 256x224 -> 512x448
buf = buffer;
for (x = 0; x < SX; x++) {
color = P(*src++);
buf[0] = color;
buf[1] = color;
buf[SX*2] = color;
buf[SX*2+1] = color;
buf+=2;
}
for (y = 1; y < SY - 1; y++) {
color = P(*src++);
buf[0] = color;
buf[1] = color;
buf[SX*2] = color;
buf[SX*2+1] = color;
buf+=2;
for (x = 1; x < SX - 1; x++) {
a = P(src[-SX]); b = P(src[1]); c = P(src[-1]); d = P(src[SX]);
color = P(*src++);
buf[0]      = (c == a && c != d && a != b) ? a : color;
buf[1]      = (a == b && a != c && b != d) ? b : color;
buf[SX*2]   = (d == c && d != b && c != a) ? c : color;
buf[SX*2+1] = (b == d && b != a && d != c) ? d : color;
buf+=2;
}
color = P(*src++);
buf[0] = color;
buf[1] = color;
buf[SX*2] = color;
buf[SX*2+1] = color;
buf+=(2+SX*2);
}
for (x = 0; x < SX; x++) {
color = P(*src++);
buf[0] = color;
buf[1] = color;
buf[SX*2] = color;
buf[SX*2+1] = color;
buf+=2;
}

//Downscale to 320x240
dy = 0;
for(y = 0; y < DY; y++) {
dx = 0;
dy += (SY*2-1);
buf = buffer;
for(x = 0; x < DX; x++) {
color = COLORMIX16(buffer[0], buffer[1], buffer[SX*2], buffer[SX*2+1]);
*dest++ = color | ((color>>3) & 0x1803) | ((color>>4) & 0x60);
dx += (SX*2-1);
while (dx >= DX) {
dx -= DX;
buffer++;
}
}
buffer = buf;
while (dy >= DY) {
dy -= DY;
buffer += (SX*2);
}
}
}

Second scaler:

Code: [Select]
#define SX 256
#define SY 224
#define DX 320
#define DY 240

#define P(X) (palettetranslate[X])

void upscale_320x240(uint32 *dst, uint8 *src)
{
uint16 *dest = (uint16 *) dst, a, b, c;
uint8 *src_old;
int x,y;
int dy;
dy = 0;
src -= 8*SX;
for(y = 0; y < DY; y++) {
dy += SY;
src_old = src;
src += 8;
for(x = 0; x < (SX-16)/3; x++) {
a = P(*src++); b = P(*src++); c = P(*src++);
*dest++ = a;
*dest++ = (a & 0xf800) | (b & 0x07ff);
*dest++ = (b & 0xffe0) | (c & 0x001f);
*dest++ = c;
}
src += 8;
}
}
« Last Edit: November 18, 2013, 06:54:26 pm by kuwanger »

lithium210

  • Posts: 31
Re: FCEUX 2.2.2
« Reply #21 on: November 18, 2013, 08:04:33 pm »
Huge difference in sound and scaler is looking great.  Been waiting on an update for this emu and here it is! Appreciate the work and thanks a lot!!

opt2not

  • Posts: 203
Re: FCEUX 2.2.2
« Reply #22 on: November 20, 2013, 05:50:07 pm »
I haven't been able to get the first scaler version to load up any ROMS for me, but the second one with the sub-pixel scaling works like a charm!
Looks great and sounds great! Thank you so much for your work on this Kuwanger!

Gab1975

  • Posts: 1165
Re: FCEUX 2.2.2
« Reply #23 on: November 20, 2013, 10:28:11 pm »
Thanks! The improvements are very nice! ;)
I noticed that games like Duck Hunt are unplayable, the "ideal" could be a virtual gun sight which simulates the light gun, but I know this is no easy to add inside the code...

zear

  • * Moderator
  • Posts: 2381
Re: FCEUX 2.2.2
« Reply #24 on: November 21, 2013, 10:48:50 am »
Thanks! The improvements are very nice! ;)
I noticed that games like Duck Hunt are unplayable, the "ideal" could be a virtual gun sight which simulates the light gun, but I know this is no easy to add inside the code...
Well, we have no touchscreen to make lightgun games useful.

Vato

  • Posts: 75
Re: FCEUX 2.2.2
« Reply #25 on: November 21, 2013, 01:25:32 pm »
Thanks! The improvements are very nice! ;)
I noticed that games like Duck Hunt are unplayable, the "ideal" could be a virtual gun sight which simulates the light gun, but I know this is no easy to add inside the code...
Well, we have no touchscreen to make lightgun games useful.

maybe the lightgun could be set to use the analog?

Ive played some DuckHunt on nesDS, and using the touch screen actually makes the game waaaay too easy, lol.

Gab1975

  • Posts: 1165
Re: FCEUX 2.2.2
« Reply #26 on: November 21, 2013, 02:19:11 pm »

maybe the lightgun could be set to use the analog?

Ive played some DuckHunt on nesDS, and using the touch screen actually makes the game waaaay too easy, lol.

I think that it isn't so easy... with the touch screen is possible to simulate the light-sensor input, while to use the analog stick and/or the d-pad, as virtual gunsight, is needed an heavy implementation/change to the code...

Nebuleon

  • Guest
Re: FCEUX 2.2.2
« Reply #27 on: November 21, 2013, 07:55:45 pm »

maybe the lightgun could be set to use the analog?

Ive played some DuckHunt on nesDS, and using the touch screen actually makes the game waaaay too easy, lol.

I think that it isn't so easy... with the touch screen is possible to simulate the light-sensor input, while to use the analog stick and/or the d-pad, as virtual gunsight, is needed an heavy implementation/change to the code...
Not to mention that inputting an absolute position on a screen, as opposed to a slow or fast movement, with an analog stick is very awkward ;)

trisoret

  • Posts: 27
Re: FCEUX 2.2.2
« Reply #28 on: November 28, 2013, 05:46:33 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

I tried that and the emulator would just crash every time I launch a game, then I tried editing the .cfg of each game using the mentioned settings, nothing would change, any help?

133794m3r

  • Posts: 72
Re: FCEUX 2.2.2
« Reply #29 on: November 28, 2013, 06:14:46 pm »
Why is there no option to set "default" folder to look for games? It currently just throws that away after each and every load of the emulator. It should at the very least save it's last folder, or even better say "hey would you like to make this default?"

Vato

  • Posts: 75
Re: FCEUX 2.2.2
« Reply #30 on: November 28, 2013, 06:28:18 pm »
Why is there no option to set "default" folder to look for games? It currently just throws that away after each and every load of the emulator. It should at the very least save it's last folder, or even better say "hey would you like to make this default?"

in gmenu2x highlight the fceux icon and press select, then 'edit Fceux'. from there you can edit the 'Selector Directory' to your game folder.

edit: oh i see what you mean, it wont save the path in the emulators gui...

edit too: once the 'selector directory' path set up, even though the emulator itself doesnt save the path, pressing L+R to get to get to its menu, and then A then Y brings me back to my NES directory. fewer clicks then navigating all the way to the folder my games are kept in.
A bit of a shortcut i guess.
« Last Edit: November 28, 2013, 07:31:49 pm by Vato »

133794m3r

  • Posts: 72
Re: FCEUX 2.2.2
« Reply #31 on: December 03, 2013, 04:48:58 am »
I'll try that then.
And by the way it _doesn't_ work at all.
I'm using the latest one that he gave there. And it's the _only_ OPK that isn't able to be edited.
There is no "edit" fceux in there at all.
Also what's up with it using x/y for the famicon? It only had 2 buttons+dpad+select/start. No reason to pretend it uses all 4.O

So to just reiterate this all, this thing whilst OK, sucks balls. Until it starts remembering where it's at, this thing is pretty close to useless. Also the "save as default" thing? It doesn't work, so I have to redo the config _each_ and every time!.
« Last Edit: December 03, 2013, 04:53:28 am by 133794m3r »

Awakened

  • Posts: 96
Re: FCEUX 2.2.2
« Reply #32 on: December 03, 2013, 08:00:51 am »
gmenu2x seems to remember my NES folder without me having to do anything except navigate to it the first time I launched FCEUX. I personally don't use this emulator's in game ROM menu; when I want to switch games I just open it's menu and exit, which takes me back to my ROM list in gmenu2x, right at the game I was just playing. Exiting and relaunching the emulator is quick enough on the Zero I don't mind it so much.
« Last Edit: December 03, 2013, 08:03:13 am by Awakened »

Vato

  • Posts: 75
Re: FCEUX 2.2.2
« Reply #33 on: December 03, 2013, 11:45:43 am »
if its not saving the path, then sounds like the setting isn't enabled.
while fceux is highlighted in gmenu2x, press start and set 'save last selection' to 'on'.

no issues here with being able to select/edit. im using the .opk that kuwanger modified w/the subpixel scaler, from post #17 of this thread.
« Last Edit: December 03, 2013, 12:02:11 pm by Vato »

flaps

  • Posts: 9
Re: FCEUX 2.2.2
« Reply #34 on: December 03, 2013, 12:52:41 pm »
Is there a way to map the menu button to something other than L? I keep hitting it by accident.

goldenegg

  • Posts: 56
Re: FCEUX 2.2.2
« Reply #35 on: December 08, 2013, 09:02:30 pm »
Quick question ... is ~/.fceux on the SD card or the on-board memory?  I ask, because I created that directory on the SD card and put disksys.rom there, but the emulator doesn't seem to pick it up.
« Last Edit: December 08, 2013, 09:09:37 pm by goldenegg »

zear

  • * Moderator
  • Posts: 2381
Re: FCEUX 2.2.2
« Reply #36 on: December 08, 2013, 09:32:03 pm »
~/ is on the internal SD.

Xantos

  • Posts: 5
Re: FCEUX 2.2.2
« Reply #37 on: December 16, 2013, 05:32:09 pm »
Hi everyone,

first of all congratulation for your hard work.

Just a little bug report:
Zelda 2 froze the emulator after approximately 1h playing. I couldn't do anything (in game neither activating the emu menu), but I managed to go back to the app select screen by pressing the power button+select (so only the emu froze, not the console).

48khz sound + low pass filter, everything else default.

Since I don't know wether most of you tested the games for more than an hour, the problem may come from that long time playing.



[edit]: This bug happened again on faxanadu, every option set to default. I think we definitely need an update for this emu.
« Last Edit: December 23, 2013, 06:37:19 pm by Xantos »

gustavolatil

  • Posts: 131
Re: FCEUX 2.2.2
« Reply #38 on: December 25, 2013, 04:54:56 am »
pal titles run a bit faster than normal, it happens in blaster master and tmnt fighting edition (or whatev)
anyone with the same problem or a solution?

asdfzxc920

  • Posts: 5
Re: FCEUX 2.2.2
« Reply #39 on: December 26, 2013, 06:25:03 pm »
pal titles run a bit faster than normal, it happens in blaster master and tmnt fighting edition (or whatev)
anyone with the same problem or a solution?
Try manually setting FCEUX to PAL mode.

 

Post a new topic