It is currently Sat Dec 16, 2017 6:00 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 34 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: FCEUX with Dendy-mode
PostPosted: Mon Oct 28, 2013 1:19 pm 
Offline
User avatar

Joined: Sat Apr 18, 2009 4:36 am
Posts: 260
Location: Russia
Hi, nesdev.
http://tasvideos.org/forum/viewtopic.ph ... 911#357911
http://sourceforge.net/p/fceultra/bugs/629/

Maybe someone of you can help FCEUX developers to add Dendy-mode please?
Since NES.emu (the best iOS/Android NES emulator) based on fceux-2.2.3-svn code, will be nice if NES.emu will support dendy-mode too


Last edited by Eugene.S on Sun Apr 26, 2015 2:46 pm, edited 1 time in total.

Top
 Profile  
 
PostPosted: Sat Nov 02, 2013 7:17 am 
Offline
User avatar

Joined: Sat Apr 18, 2009 4:36 am
Posts: 260
Location: Russia
*post is outdated. i have deleted it*


Last edited by Eugene.S on Fri Apr 24, 2015 4:13 pm, edited 1 time in total.

Top
 Profile  
 
PostPosted: Wed Mar 19, 2014 3:22 am 
Offline

Joined: Sat Aug 03, 2013 3:08 pm
Posts: 36
Location: Russia
Somebody knows is it possible to make that debugger shows current pixel / scanline after each instruction?

_________________
My profile on RHDN.


Top
 Profile  
 
PostPosted: Fri Apr 24, 2015 2:40 pm 
Offline
User avatar

Joined: Tue Apr 19, 2011 11:26 am
Posts: 106
Location: RU
So... I added this, with extensive help from DoomGuard and Eugene.S. All the switches and logic tweaks. But when I add PPU loops (scanlines) to match Dendy's, something gets corrupted in the code, though the very Dendy mode was reported to be quite accurate (for a start).

There's info that actual Dendy PPU does nothing after scanline 240, but all the rest elements keep running, resulting in known timings. But I don't know how to properly incorporate that info into code. Corruption is resulting visibly in crashing when it tries to save to config or changing a ROM (maybe more), and it's caused exactly by additional PPU loops/scanlines. No other Dendy logic addition breaks it.

Since I'm unable to advance, here's the patch for FCEUX:
http://sourceforge.net/projects/feos-ta ... h/download

And here's the modified PPU.cpp file for quick reference:
http://pastebin.com/5M2B3zFS
Lines 1788 and 2031 activate additional loops, for old and new PPUs. On both PPUs the games work as expected, but the code is wrong.

...? Oh yes, the build!
http://sourceforge.net/projects/feos-ta ... z/download


Top
 Profile  
 
PostPosted: Fri Apr 24, 2015 2:58 pm 
Offline
User avatar

Joined: Sat Apr 18, 2009 4:36 am
Posts: 260
Location: Russia
So, Dendy-mode work correct on both "old_ppu" and "new_ppu" modes at now.
We really need help of nesdev people to solve crashing problem (buffer overflow?) on windows.

I've small notes:
Quote:
There's info that actual Dendy PPU does nothing after scanline 240

This is actual on fceux "old_ppu" mode.
I think fceux "new_ppu" mode and real dendy hardware does nothing after scanline 241
Quote:
Corruption is resulting visibly in crashing when it tries to save to config or changing a ROM

This crashing problem appears only on windows build. Linux/SDL build work good.
Maybe it can help you.


Top
 Profile  
 
PostPosted: Sun Apr 26, 2015 3:23 am 
Offline
User avatar

Joined: Tue Apr 19, 2011 11:26 am
Posts: 106
Location: RU
Welp, it appeared to have zero connection with Windows. It was overflowing the common video buffer (XBuf), and writes outside it were corrupting all sorts of variables, that then prevented config save and ROM switching, and whatnot.

Commit: https://sourceforge.net/p/fceultra/code/3107/

New build: https://sourceforge.net/projects/feos-t ... z/download

Huge thanks to Doomguard45, Eugene.S, HardWareMan and whoever participated in Dendy research.


Top
 Profile  
 
PostPosted: Sun Apr 26, 2015 12:52 pm 
Offline
User avatar

Joined: Fri Nov 12, 2004 2:49 pm
Posts: 7317
Location: Chexbres, VD, Switzerland
Does the dendy have swapped duty cycle? I'd like to hear how games sounds with this bug turned on.


Top
 Profile  
 
PostPosted: Sun Apr 26, 2015 12:58 pm 
Offline
User avatar

Joined: Tue Apr 19, 2011 11:26 am
Posts: 106
Location: RU
Bregalad wrote:
Does the dendy have swapped duty cycle? I'd like to hear how games sounds with this bug turned on.

Yes, but not all models do. puNES and RockNES can emulate that feature bug. We discussed adding it to fceux, but it makes little sense to me.


Top
 Profile  
 
PostPosted: Sun Apr 26, 2015 1:01 pm 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 5899
Location: Canada
It seems a pretty reasonable option to want if you are interested in emulating Dendy games.


Top
 Profile  
 
PostPosted: Sun Apr 26, 2015 1:11 pm 
Offline
User avatar

Joined: Tue Apr 19, 2011 11:26 am
Posts: 106
Location: RU
rainwarrior wrote:
It seems a pretty reasonable option to want if you are interested in emulating Dendy games.

You saying that is enough reason for me!
Stay tuned...


Top
 Profile  
 
PostPosted: Sun Apr 26, 2015 1:34 pm 
Offline
User avatar

Joined: Sat Apr 18, 2009 4:36 am
Posts: 260
Location: Russia
Note:

TA-03NP1-6527P chip is good,
UMC UA6527P have swapped 25<->50 duty cycles

viewtopic.php?p=85979#p85979


Top
 Profile  
 
PostPosted: Sun Apr 26, 2015 1:37 pm 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 5899
Location: Canada
Yes, the key word was "option". ;)


Top
 Profile  
 
PostPosted: Sun Apr 26, 2015 4:17 pm 
Offline
User avatar

Joined: Tue Apr 19, 2011 11:26 am
Posts: 106
Location: RU
https://sourceforge.net/p/fceultra/code/3108/


Attachments:
File comment: DutySwap
fceux.7z [1.05 MiB]
Downloaded 138 times
Top
 Profile  
 
PostPosted: Sun Apr 26, 2015 4:33 pm 
Offline
User avatar

Joined: Sat Apr 18, 2009 4:36 am
Posts: 260
Location: Russia
Quote:
https://sourceforge.net/p/fceultra/code/3108/
Added option to swap bytes in charge of duty cycles, a bug present on some Dendy models.

...and on some standard-NTSC famiclones too ;)
RockNES has no PAL or Dendy modes, but can emulate swapped duty bug.
Zepper, we want PAL and Dendy :beer:


Top
 Profile  
 
PostPosted: Tue Apr 28, 2015 12:48 pm 
Offline
User avatar

Joined: Sat Apr 18, 2009 4:36 am
Posts: 260
Location: Russia
TODO: fix NSF player, it's broken on Dendy-mode


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 34 posts ]  Go to page 1, 2, 3  Next

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group