Nestopia and Ninja Gaiden/Burai Fighter
Moderator: Moderators
Re: Nestopia and Ninja Gaiden/Burai Fighter
Where exactly in the NES hardware does this mirroring from $3000 to $2000 takes place? I thought $3000 had PA12 high, just like $1000, likewise clocking the counter. Is it inside the PPU? Inside the MMC3? Or, as I thought, only on the CHR ROM part of the board?
EDIT: fixed typo
EDIT: fixed typo
Re: Nestopia and Ninja Gaiden/Burai Fighter
in nemu...
fixed is
if(address & 0x1000)
irq.address =4;===>irq.address =8;
?
fixed is
if(address & 0x1000)
irq.address =4;===>irq.address =8;
?
Re: Nestopia and Ninja Gaiden/Burai Fighter
You mean like $1000, right? I'm not sure what you mean by "the CHR ROM part of the board".tepples wrote:I thought $3000 had PA12 high, just like $2000
Check out this post: viewtopic.php?t=3657&view=next#p27891. In my emulator, palette writes were already not being put on the bus, so this seems to be the same issue (I may have been thinking about Mickey's Adventure in Numberland, not Safari in Letterland, when I mentioned it needing precise IRQ timing...)
get nemulator
http://nemulator.com
http://nemulator.com
Re: Nestopia and Ninja Gaiden/Burai Fighter
you update ppu or mmc3 irq?James wrote:You mean like $1000, right? I'm not sure what you mean by "the CHR ROM part of the board".tepples wrote:I thought $3000 had PA12 high, just like $2000
Check out this post: viewtopic.php?t=3657&view=next#p27891. In my emulator, palette writes were already not being put on the bus, so this seems to be the same issue (I may have been thinking about Mickey's Adventure in Numberland, not Safari in Letterland, when I mentioned it needing precise IRQ timing...)
Re: Nestopia and Ninja Gaiden/Burai Fighter
PPUzxbdragon wrote:you update ppu or mmc3 irq?
get nemulator
http://nemulator.com
http://nemulator.com
Re: Nestopia and Ninja Gaiden/Burai Fighter
I see Nintendulator is fixed mmc3 irqJames wrote:PPUzxbdragon wrote:you update ppu or mmc3 irq?
Can you share your fix part ?
- *Spitfire_NES*
- Posts: 306
- Joined: Fri May 21, 2010 4:10 pm
Re: Nestopia and Ninja Gaiden/Burai Fighter
Hey zxbdragon here is one thing that james helped me with that DID fix mickey's safari in letterland but not burai fighter, maybe you can help us zxbdragon get burai fighter fixed.
in NstPPU.cpp
change:
NST_FORCE_INLINE void Ppu::UpdateScrollAddressLine()
{
if (io.line)
io.line.Toggle( scroll.address & 0x3FFF, cpu.GetCycles() );
}
to
NST_FORCE_INLINE void Ppu::UpdateScrollAddressLine()
{
if (io.line)
{
int a12_mask = ~((scroll.address & 0x2000) >> 1);
io.line.Toggle( (scroll.address & a12_mask) & 0x3FFF, cpu.GetCycles() );
}
}
this will fix mickeys safari in letterland, now we need to figure out burai fighter. Thanks for this code james as well james and allowing me to share!
in NstPPU.cpp
change:
NST_FORCE_INLINE void Ppu::UpdateScrollAddressLine()
{
if (io.line)
io.line.Toggle( scroll.address & 0x3FFF, cpu.GetCycles() );
}
to
NST_FORCE_INLINE void Ppu::UpdateScrollAddressLine()
{
if (io.line)
{
int a12_mask = ~((scroll.address & 0x2000) >> 1);
io.line.Toggle( (scroll.address & a12_mask) & 0x3FFF, cpu.GetCycles() );
}
}
this will fix mickeys safari in letterland, now we need to figure out burai fighter. Thanks for this code james as well james and allowing me to share!
Last edited by *Spitfire_NES* on Sun Jun 29, 2014 7:57 am, edited 1 time in total.
Re: Nestopia and Ninja Gaiden/Burai Fighter
My bad.James wrote:You mean like $1000, right?tepples wrote:I thought $3000 had PA12 high, just like $2000
I might have said things wrong. Let me try again:I'm not sure what you mean by "the CHR ROM part of the board".
Some chips see accesses to $3000-$3EFF as accesses to $2000-$2EFF. Examples of this include CIRAM (the nametable memory) because PA12 isn't connected. Others see accesses to $3000-$3EFF as accesses to $1000-$1EFF (the second pattern table). Examples of this include the MMC3 itself because the TLSROM hack depends on it ignoring PA13.
If that's the issue, that would explain it. A test ROM for whether the MMC3's PIT is clocked by writes to $3000-$3EFF but not $3F00-$3FFF might help.In my emulator, palette writes were already not being put on the bus
Re: Nestopia and Ninja Gaiden/Burai Fighter
thank you james and *Spitfire_NES**Spitfire_NES* wrote:Hey zxbdragon here is one thing that james helped me with that DID fix mickey's safari in letterland but not burai fighter, maybe you can help us zxbdragon get burai fighter fixed.
in NstPPU.cpp
change:
NST_FORCE_INLINE void Ppu::UpdateScrollAddressLine()
{
if (io.line)
io.line.Toggle( scroll.address & 0x3FFF, cpu.GetCycles() );
}
to
NST_FORCE_INLINE void Ppu::UpdateScrollAddressLine()
{
if (io.line)
{
int a12_mask = ~((scroll.address & 0x2000) >> 1);
io.line.Toggle( (scroll.address & a12_mask) & 0x3FFF, cpu.GetCycles() );
}
}
this will fix mickeys safari in letterland, now we need to figure out burai fighter. Thanks for this code james as well james and allowing me to share!
thank you james and *Spitfire_NES**Spitfire_NES* wrote:Hey zxbdragon here is one thing that james helped me with that DID fix mickey's safari in letterland but not burai fighter, maybe you can help us zxbdragon get burai fighter fixed.
in NstPPU.cpp
change:
NST_FORCE_INLINE void Ppu::UpdateScrollAddressLine()
{
if (io.line)
io.line.Toggle( scroll.address & 0x3FFF, cpu.GetCycles() );
}
to
NST_FORCE_INLINE void Ppu::UpdateScrollAddressLine()
{
if (io.line)
{
int a12_mask = ~((scroll.address & 0x2000) >> 1);
io.line.Toggle( (scroll.address & a12_mask) & 0x3FFF, cpu.GetCycles() );
}
}
this will fix mickeys safari in letterland, now we need to figure out burai fighter. Thanks for this code james as well james and allowing me to share!
I have been concerned burai fighter,
- *Spitfire_NES*
- Posts: 306
- Joined: Fri May 21, 2010 4:10 pm
Re: Nestopia and Ninja Gaiden/Burai Fighter
yes, the mickeys issue and the burai fighter issue seem to be related.
Re: Nestopia and Ninja Gaiden/Burai Fighter
I still might not be following what you're saying, but all of the TLSROM (and other MMC3) games I tested seem to work fine with this fix. Do you know of any game that's dependent on this behavior?tepples wrote:Others see accesses to $3000-$3EFF as accesses to $1000-$1EFF (the second pattern table). Examples of this include the MMC3 itself because the TLSROM hack depends on it ignoring PA13.
get nemulator
http://nemulator.com
http://nemulator.com
Re: Nestopia and Ninja Gaiden/Burai Fighter
Was just thinking about this a bit more. I've only implemented this fix on $2006/$2007 access, not on normal accesses during rendering. So maybe this behavior only applies then...
edit: It must only apply then. The PPU doesn't access $3xxx during rendering (see Brad Taylor's 2C02 reference).
edit: It must only apply then. The PPU doesn't access $3xxx during rendering (see Brad Taylor's 2C02 reference).
Last edited by James on Thu Jul 03, 2014 7:11 am, edited 1 time in total.
get nemulator
http://nemulator.com
http://nemulator.com
- *Spitfire_NES*
- Posts: 306
- Joined: Fri May 21, 2010 4:10 pm
Re: Nestopia and Ninja Gaiden/Burai Fighter
is this something i need to check for on nestopia's end for james? Trying to figure out anything i can to have accurate emulation.James wrote:Was just thinking about this a bit more. I've only implemented this fix on $2006/$2007 access, not on normal accesses during rendering. So maybe this behavior only applies then...
Re: Nestopia and Ninja Gaiden/Burai Fighter
I don't know. You should probably hold off until there is a definitive answer to how this works (which will likely involve tests on real hardware).*Spitfire_NES* wrote:is this something i need to check for on nestopia's end for james? Trying to figure out anything i can to have accurate emulation.
get nemulator
http://nemulator.com
http://nemulator.com
- *Spitfire_NES*
- Posts: 306
- Joined: Fri May 21, 2010 4:10 pm
Re: Nestopia and Ninja Gaiden/Burai Fighter
ok will do. In the meantime i will mess around with what i have so far and see if anything turns up. Maybe someone can come along who might understand nestopia better than i and at least lend a hand to maybe help me figure out burai fighter.
thanks james!

thanks james!