Nestopia and Ninja Gaiden/Burai Fighter

Discuss emulation of the Nintendo Entertainment System and Famicom.

Moderator: Moderators

User avatar
*Spitfire_NES*
Posts: 306
Joined: Fri May 21, 2010 4:10 pm

Re: Nestopia and Ninja Gaiden/Burai Fighter

Post by *Spitfire_NES* »

can you list the 2 changes zxbdragon? Im still trying to figure out your implementation code for mickeys. What did you do for ninja gaiden?
User avatar
tehcloud
Posts: 22
Joined: Tue Apr 23, 2013 5:25 pm

Re: Nestopia and Ninja Gaiden/Burai Fighter

Post by tehcloud »

Interesting how many issues have been discussed in this thread.

I'm understanding the Ninja Gaiden issue quite a bit better now.

perilsensitive, awesome work. I'm trying to digest all of the stuff you've posted still.
zxbdragon
Posts: 492
Joined: Mon Dec 12, 2011 8:15 pm

Re: Nestopia and Ninja Gaiden/Burai Fighter

Post by zxbdragon »

*Spitfire_NES* wrote:can you list the 2 changes zxbdragon? Im still trying to figure out your implementation code for mickeys. What did you do for ninja gaiden?
perilsensitive ,Delete code

cpu.StealCycles( cpu.GetClock(1) );

if ((readAddress & 0xF000) != 0x4000)
cpu.Peek( readAddress );

cpu.StealCycles( cpu.GetClock(1) );
cpu.Peek( readAddress );
cpu.StealCycles( cpu.GetClock(1) );
User avatar
*Spitfire_NES*
Posts: 306
Joined: Fri May 21, 2010 4:10 pm

Re: Nestopia and Ninja Gaiden/Burai Fighter

Post by *Spitfire_NES* »

zxbdragon wrote:
*Spitfire_NES* wrote:can you list the 2 changes zxbdragon? Im still trying to figure out your implementation code for mickeys. What did you do for ninja gaiden?
perilsensitive ,Delete code

cpu.StealCycles( cpu.GetClock(1) );

if ((readAddress & 0xF000) != 0x4000)
cpu.Peek( readAddress );

cpu.StealCycles( cpu.GetClock(1) );
cpu.Peek( readAddress );
cpu.StealCycles( cpu.GetClock(1) );

Thank you zxbdragon, is this in Apu.cpp and does deleting this break anything or other games? Please post your mickeys fix integrated code diff when you get a chance. Im currently trying to integrate the burai and mickeys fix for the time being.
User avatar
tehcloud
Posts: 22
Joined: Tue Apr 23, 2013 5:25 pm

Re: Nestopia and Ninja Gaiden/Burai Fighter

Post by tehcloud »

This is all you really need to eliminate the Ninja Gaiden (U) moon problem:

Code: Select all

				//if ((readAddress & 0xF000) != 0x4000)
				//	cpu.Peek( readAddress );
I suppose this still qualifies as a hack. At least this way it still passes dma_4016_read.nes.
perilsensitive
Posts: 13
Joined: Mon Jul 15, 2013 3:35 pm

Re: Nestopia and Ninja Gaiden/Burai Fighter

Post by perilsensitive »

tehcloud wrote:This is all you really need to eliminate the Ninja Gaiden (U) moon problem:

Code: Select all

				//if ((readAddress & 0xF000) != 0x4000)
				//	cpu.Peek( readAddress );
I suppose this still qualifies as a hack. At least this way it still passes dma_4016_read.nes.
Good point. I didn't think to try that. :-)
User avatar
tehcloud
Posts: 22
Joined: Tue Apr 23, 2013 5:25 pm

Re: Nestopia and Ninja Gaiden/Burai Fighter

Post by tehcloud »

Still has this problem though. Sorry about the white line on the left, that's part of the window border.
Attachments
ng1.jpg
perilsensitive
Posts: 13
Joined: Mon Jul 15, 2013 3:35 pm

Re: Nestopia and Ninja Gaiden/Burai Fighter

Post by perilsensitive »

tehcloud wrote:Still has this problem though. Sorry about the white line on the left, that's part of the window border.
The top part of the ninja's face is visibile and shouldn't be. It's made of sprites that are normally hidden due to the 8-sprite limit, and they should only appear if you disable the limit. If this is just in the unix port, it looks like the logic for setting unlimited sprites has been swapped:

Code: Select all

diff --git a/source/unix/video.cpp b/source/unix/video.cpp
index 2b06b36..910cba0 100644
--- a/source/unix/video.cpp
+++ b/source/unix/video.cpp
@@ -374,8 +374,8 @@ void video_set_filter() {
                break;
        }
 
-       // Set the sprite limit:  true = enable sprite limit, false = disable sprite limit
-       video.EnableUnlimSprites(conf.video_unlimited_sprites ? false : true);
+       // Set the sprite limit:  false = enable sprite limit, true = disable sprite limit
+       video.EnableUnlimSprites(conf.video_unlimited_sprites ? true : false);
 
        // Set Palette options
        switch (conf.video_palette_mode) {
EDIT: Clarified my explaination. The black square in the corner isn't the problem; it's the fact that the sprites that make up the top row of the ninja's face shouldn't be visible at all due to the 8-sprite limit.
Last edited by perilsensitive on Sat Aug 09, 2014 1:06 pm, edited 1 time in total.
User avatar
tehcloud
Posts: 22
Joined: Tue Apr 23, 2013 5:25 pm

Re: Nestopia and Ninja Gaiden/Burai Fighter

Post by tehcloud »

Thanks for pointing that out. Durrr.
User avatar
Zepper
Formerly Fx3
Posts: 3264
Joined: Fri Nov 12, 2004 4:59 pm
Location: Brazil
Contact:

Re: Nestopia and Ninja Gaiden/Burai Fighter

Post by Zepper »

Found the problem with Burai Fighter. Of course, this is a first look.

At $2007 read/write, if rendering is enabled, the PPU updates X and Y scroll bits at same time.
If rendering is disabled, the things are "normal": the PPU address (loopy_v) is incremented by 1 or 32.

The scorebar is fixed.
User avatar
*Spitfire_NES*
Posts: 306
Joined: Fri May 21, 2010 4:10 pm

Re: Nestopia and Ninja Gaiden/Burai Fighter

Post by *Spitfire_NES* »

glad you got it sorted zepper!

I had a question for peril sensitive. After merging in your fix for first pass at Mc-Acc support i get some errors with the mmc3 hpp file.

NstBoardMmc3.hpp(124): error C2248: 'Nes::Core::Timer::A12<void,0,0>::Filter' : cannot access inaccessible class declared in class 'Nes::Core::Timer::A12<void,0,0>'

NstBoardMmc3.hpp(124): error C2512: 'Nes::Core::Timer::A12<Unit,Hold,Delay>' : no appropriate default constructor available
with
[
Unit=Nes::Core::Boards::Mmc3::BaseIrq,
Hold=39,
Delay=0
]
NstBoardMmc3.hpp(124): error C2614: 'Nes::Core::Boards::Mmc3::Irq<Delay,Filter>' : illegal member initialization: 'A12' is not a base or member
with
[
Delay=0,
Filter=39
]

NstBoardMmc3.hpp(124): error C2955: 'Nes::Core::Timer::A12' : use of class template requires template argument list
src\Nestopia\source\core\vssystem\../NstTimer.hpp(259) : see declaration of 'Nes::Core::Timer::A12'

NstBoardMmc3.hpp(124): error C2975: 'Nes::Core::Timer::A12' : invalid template argument for 'Hold', compile-time evaluatable constant expression expected
src\Nestopia\source\core\vssystem\../NstTimer.hpp(259) : see declaration of 'Nes::Core::Timer::A12'

NestopiaX error C2248: 'Nes::Core::Timer::A12<void,0,0>::Filter' : cannot access inaccessible class declared in class 'Nes::Core::Timer::A12<void,0,0>'

NestopiaX error C2248: 'Nes::Core::Timer::A12<void,0,0>::Filter' : cannot access inaccessible class declared in class 'Nes::Core::Timer::A12<void,0,0>'

NestopiaX error C2248: 'Nes::Core::Timer::A12<void,0,0>::Filter' : cannot access inaccessible class declared in class 'Nes::Core::Timer::A12<void,0,0>'

NestopiaX error C2248: 'Nes::Core::Timer::A12<void,0,0>::Filter' : cannot access inaccessible class declared in class 'Nes::Core::Timer::A12<void,0,0>'

NestopiaX error C2248: 'Nes::Core::Timer::A12<void,0,0>::Filter' : cannot access inaccessible class declared in class 'Nes::Core::Timer::A12<void,0,0>'

NestopiaX error C2512: 'Nes::Core::Timer::A12<Unit,Hold,Delay>' : no appropriate default constructor available
with
[
Unit=Nes::Core::Boards::Mmc3::BaseIrq,
Hold=16,
Delay=0
]
NestopiaX error C2512: 'Nes::Core::Timer::A12<Unit,Hold,Delay>' : no appropriate default constructor available
with
[
Unit=Nes::Core::Boards::Mmc3::BaseIrq,
Hold=16,
Delay=0
]
NestopiaX error C2512: 'Nes::Core::Timer::A12<Unit,Hold,Delay>' : no appropriate default constructor available
with
[
Unit=Nes::Core::Boards::Mmc3::BaseIrq,
Hold=16,
Delay=0
]
NestopiaX error C2512: 'Nes::Core::Timer::A12<Unit,Hold,Delay>' : no appropriate default constructor available
with
[
Unit=Nes::Core::Boards::Mmc3::BaseIrq,
Hold=16,
Delay=0
]
NestopiaX error C2512: 'Nes::Core::Timer::A12<Unit,Hold,Delay>' : no appropriate default constructor available
with
[
Unit=Nes::Core::Boards::Mmc3::BaseIrq,
Hold=16,
Delay=2
]
NestopiaX error C2614: 'Nes::Core::Boards::Mmc3::Irq<>' : illegal member initialization: 'A12' is not a base or member
NestopiaX error C2614: 'Nes::Core::Boards::Mmc3::Irq<>' : illegal member initialization: 'A12' is not a base or member
NestopiaX error C2614: 'Nes::Core::Boards::Mmc3::Irq<>' : illegal member initialization: 'A12' is not a base or member
NestopiaX error C2614: 'Nes::Core::Boards::Mmc3::Irq<>' : illegal member initialization: 'A12' is not a base or member
NestopiaX error C2614: 'Nes::Core::Boards::Mmc3::Irq<Delay>' : illegal member initialization: 'A12' is not a base or member
with
[
Delay=2
]
NestopiaX error C2955: 'Nes::Core::Timer::A12' : use of class template requires template argument list

ore\board\



../NstTimer.hpp(259) : see declaration of 'Nes::Core::Timer::A12'

NestopiaX error C2955: 'Nes::Core::Timer::A12' : use of class template requires template argument list

/NstTimer.hpp(259) : see declaration of 'Nes::Core::Timer::A12'

NestopiaX error C2955: 'Nes::Core::Timer::A12' : use of class template requires template argument list

/NstTimer.hpp(259) : see declaration of 'Nes::Core::Timer::A12'
NestopiaX error C2955: 'Nes::Core::Timer::A12' : use of class template requires template argument list

/NstTimer.hpp(259) : see declaration of 'Nes::Core::Timer::A12'
NestopiaX error C2955: 'Nes::Core::Timer::A12' : use of class template requires template argument list

/NstTimer.hpp(259) : see declaration of 'Nes::Core::Timer::A12'
NestopiaX error C2975: 'Nes::Core::Timer::A12' : invalid template argument for 'Hold', compile-time evaluatable constant expression expected

NestopiaX error C2975: 'Nes::Core::Timer::A12' : invalid template argument for 'Hold', compile-time evaluatable constant expression expected

NestopiaX error C2975: 'Nes::Core::Timer::A12' : invalid template argument for 'Hold', compile-time evaluatable constant expression expected

NestopiaX error C2975: 'Nes::Core::Timer::A12' : invalid template argument for 'Hold', compile-time evaluatable constant expression expected

NstTimer.hpp(259) : see declaration of 'Nes::Core::Timer::A12'

NestopiaX error C2975: 'Nes::Core::Timer::A12' : invalid template argument for 'Hold', compile-time evaluatable constant expression expected

NstTimer.hpp(259) : see declaration of 'Nes::Core::Timer::A12'

i dont know how to use code tags on here, so sorry for the long mess.

i wish there was a way to bring back james updatescrolladdressline code that fixed mickeys rather easily, or an easier way to integrate these 2.
zxbdragon
Posts: 492
Joined: Mon Dec 12, 2011 8:15 pm

Re: Nestopia and Ninja Gaiden/Burai Fighter

Post by zxbdragon »

???
User avatar
*Spitfire_NES*
Posts: 306
Joined: Fri May 21, 2010 4:10 pm

Re: Nestopia and Ninja Gaiden/Burai Fighter

Post by *Spitfire_NES* »

zxbdragon wrote:???
orginally, james had a fix he sent me to fix burai fighter, it ended up however, fixing mickeys instead. Perilsensitive went on to make a fix for burai fighter, but it ended up overwriting the place where i had james code fix posted.

perilsensitive added a first pass for mcacc support on his github, but it makes my compiler freak out with the errors listed above, all im simply saying is i wonder if theres a way to integrate the 2 using nstppu.cpp for the moment. I cannot get the first pass to compile he has listed up.
zxbdragon
Posts: 492
Joined: Mon Dec 12, 2011 8:15 pm

Re: Nestopia and Ninja Gaiden/Burai Fighter

Post by zxbdragon »

*Spitfire_NES* wrote:
zxbdragon wrote:???
orginally, james had a fix he sent me to fix burai fighter, it ended up however, fixing mickeys instead. Perilsensitive went on to make a fix for burai fighter, but it ended up overwriting the place where i had james code fix posted.

perilsensitive added a first pass for mcacc support on his github, but it makes my compiler freak out with the errors listed above, all im simply saying is i wonder if theres a way to integrate the 2 using nstppu.cpp for the moment. I cannot get the first pass to compile he has listed up.
todo test https://github.com/dragon2snow/Nestopia ... 2667f18eac

I am GPL violator, try to merge, there might be a problem
User avatar
*Spitfire_NES*
Posts: 306
Joined: Fri May 21, 2010 4:10 pm

Re: Nestopia and Ninja Gaiden/Burai Fighter

Post by *Spitfire_NES* »

zxbdragon wrote:
*Spitfire_NES* wrote:
zxbdragon wrote:???
orginally, james had a fix he sent me to fix burai fighter, it ended up however, fixing mickeys instead. Perilsensitive went on to make a fix for burai fighter, but it ended up overwriting the place where i had james code fix posted.

perilsensitive added a first pass for mcacc support on his github, but it makes my compiler freak out with the errors listed above, all im simply saying is i wonder if theres a way to integrate the 2 using nstppu.cpp for the moment. I cannot get the first pass to compile he has listed up.
todo test https://github.com/dragon2snow/Nestopia ... 2667f18eac

I am GPL violator, try to merge, there might be a problem
thank you zxbdragon. Is this your github? I will test this out and see what happens, what problems do you think there will be?
Post Reply