young indiana jones new ppu discovery, nestopia help...

Discuss emulation of the Nintendo Entertainment System and Famicom.

Moderator: Moderators

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

Post by *Spitfire_NES* » Thu May 05, 2011 3:25 pm

thanks tepples. so what exactly is that? LOL

tepples
Posts: 21875
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Post by tepples » Thu May 05, 2011 4:58 pm

AND with $FC1F clears out the Y tile position while preserving the rest of the VRAM address.

User avatar
Zepper
Formerly Fx3
Posts: 3192
Joined: Fri Nov 12, 2004 4:59 pm
Location: Brazil
Contact:

Post by Zepper » Thu May 05, 2011 5:32 pm

tepples wrote:I'll superimpose $FC1F on the bit definitions for the current VRAM pointer (loopy_V)
Well, I wouldn't say "super", but $7C1F sounds more accurate, even if isn't a major impact after all.

User avatar
James
Posts: 429
Joined: Sat Jan 22, 2005 8:51 am
Location: Chicago, IL
Contact:

Post by James » Thu May 05, 2011 7:36 pm

yeah, $7C1F is more accurate.
get nemulator
http://nemulator.com

User avatar
plasturion
Posts: 63
Joined: Thu Jun 02, 2011 2:05 am
Contact:

Post by plasturion » Thu Jun 02, 2011 2:35 am

Hi, guys. I just wanna say hi and thanks for discover a way to fix problem with this game. I've only wrote some kind of emu friendly patch, that helped me fceux and breakpoints, and also was amazed what the reading $2007 is really doing. This threat is interesting, so thanks a lot. Now nice be seeing Nestopia or FCEUX doing the same what nemulator does.

Zelex
Posts: 268
Joined: Fri Apr 29, 2011 9:44 pm

Post by Zelex » Thu Jun 02, 2011 10:16 am

I think that the odd behavior also happens when the big bombs goes off in the first level.

Zelex
Posts: 268
Joined: Fri Apr 29, 2011 9:44 pm

Post by Zelex » Thu Jun 02, 2011 8:50 pm

Put this fix into nezulator :)

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

Post by *Spitfire_NES* » Thu Jun 02, 2011 9:09 pm

im still trying to figure out what to put into nestopia to fix it. blahhh...maybe someone who knows what the heck they are actually doing can post some info haha. :p

Zelex
Posts: 268
Joined: Fri Apr 29, 2011 9:44 pm

Post by Zelex » Thu Jun 02, 2011 9:20 pm

Code: Select all

    
updateVramAddress: function() {
        if (this.scanline >= 21 && this.scanline <= 260 && (this.f_bgVisibility || this.f_spVisibility) ) {
            if(this.f_addrInc == 1) {
                if((this.vramAddress & 0x7000) == 0x7000) {
                    this.vramAddress &= 0x0FFF;
                    switch(this.vramAddress & 0x03E0) {
                    case 0x03A0: this.vramAddress ^= 0x0800; break;
                    case 0x03E0: this.vramAddress &= 0xFC1F; break;
                    default: this.vramAddress += 0x20; break;
                    }
                } else {
                    this.vramAddress += 0x1000;
                }
            } else {
                this.vramAddress += 1; // possibly wrong
            }
        } else {
            // Increment by either 1 or 32, depending on d2 of Control Register 1:
            this.vramAddress += (this.f_addrInc==1?32:1);
            this.vramAddress &= 0x7FFF;
        }
    },
this gets called whenever you do a read or write to 2007

Zelex
Posts: 268
Joined: Fri Apr 29, 2011 9:44 pm

Post by Zelex » Thu Jun 02, 2011 9:50 pm

Off-topic, any idea where I can get info on the .fm2 and .fcm formats, so I can play back TAS videos in my emu?

User avatar
plasturion
Posts: 63
Joined: Thu Jun 02, 2011 2:05 am
Contact:

Post by plasturion » Fri Jun 03, 2011 2:59 am

I know these are FCEU formats... but I thinka you asking for description.
You can find some info in docs of source code FCEUX. ... here what the first lines of these files contains.
FM2 is ascii plain text.
It consists of several key-value pairs followed by an inputlog section.
The inputlog section can be identified by its starting with a | (pipe).
The inputlog section terminates at eof.
Newlines may be \r\n or \n
FCE Ultra Save State Format
Updated: Mar 9, 2003
---------------------------------------

FCE Ultra's save state format is now designed to be as forward and backwards
compatible as possible. This is achieved through the (over)use of chunks.
All multiple-byte variables are stored LSB(least significant byte)-first.
Data types:

(u)int8 - (un)signed 8 bit variable(also referred to as "byte")
(u)int16 - (un)signed 16 bit variable
(u)int32 - (un)signed 32 bit variable

-- Main File Header:

The main file header is 16-bytes in length. The first three bytes contain
the string "FCS"...
about Nestopia... source 1.40 just need VC++ 2005 Express, SP1, SDK, and DXSDK to compile, it works - yay. : >
now im trying find out where to put a rule. You thinka should be made maybe in NstCore.cpp, NstPpu.cpp, NstVideoReneder.cpp or somwhere else? Damn.. it looks preety difficult... and where's a docs...

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

Post by *Spitfire_NES* » Fri Jun 03, 2011 3:40 pm

so is that code the fix to put into nestopia? i can compile it just fine. lol. :0
let me know. and thanks!

User avatar
thefox
Posts: 3141
Joined: Mon Jan 03, 2005 10:36 am
Location: Tampere, Finland
Contact:

Post by thefox » Fri Jun 03, 2011 4:40 pm

Zelex wrote:Off-topic, any idea where I can get info on the .fm2 and .fcm formats, so I can play back TAS videos in my emu?
The docs are in the HTML Help file (.chm) that comes with FCEUX. FCEUX can also convert .fcm -> .fm2.
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi

User avatar
plasturion
Posts: 63
Joined: Thu Jun 02, 2011 2:05 am
Contact:

Post by plasturion » Sat Jun 04, 2011 1:59 am

*Spitfire_NES* wrote:so is that code the fix to put into nestopia? i can compile it just fine. lol. :0
let me know. and thanks!
Not sure but thinka maybe this method in NstPpu.cpp we should change, but how i'm still wonder.

***Original***

Code: Select all

		NES_PEEK_A(Ppu,2007)
		{
			Update( cycles.one, address );

			NST_VERIFY( IsDead() );

			address = scroll.address & 0x3FFF;
			scroll.address = (scroll.address + ((regs.ctrl[0] & Regs::CTRL0_INC32) ? 32 : 1)) & 0x7FFF;
			UpdateScrollAddressLine();

			io.latch = (address & 0x3F00) != 0x3F00 ? io.buffer : palette.ram[address & 0x1F] & Coloring();
			io.buffer = (address >= 0x2000 ? nmt.FetchName( address ) : chr.FetchPattern( address ));

			return io.latch;
		}
Now I updated this metod to smth like this and it works fine.

***Modified***

Code: Select all

		NES_PEEK_A(Ppu,2007)
		{
			Update( cycles.one, address );

			// NST_VERIFY( IsDead() );

			address = scroll.address & 0x3FFF;
			//scroll.address = (scroll.address + ((regs.ctrl[0] & Regs::CTRL0_INC32) ? 32 : 1)) & 0x7FFF;
			
			if ((scanline >= 21 && scanline <= 260  ) && (regs.ctrl[1] & Regs::CTRL1_BG_SP_ENABLED)) {
				if (regs.ctrl[0] & Regs::CTRL0_INC32) {
					if((scroll.address & 0x7000) == 0x7000) { 
						    scroll.address &= 0x0FFF; 
							switch(scroll.address & 0x03E0) { 
								case 0x03A0: scroll.address ^= 0x0800; break; 
								case 0x03E0: scroll.address &= 0x7C1F; break; 
								default: scroll.address += 0x20;  
							}                 
					} else { 
							scroll.address += 0x1000; 
					} 
				} else {
						scroll.address ++;
				}
			} else {
					scroll.address = (scroll.address + ((regs.ctrl[0] & Regs::CTRL0_INC32) ? 32 : 1)) & 0x7FFF;
			}

			UpdateScrollAddressLine();

			io.latch = (address & 0x3F00) != 0x3F00 ? io.buffer : palette.ram[address & 0x1F] & Coloring();
			io.buffer = (address >= 0x2000 ? nmt.FetchName( address ) : chr.FetchPattern( address ));

			return io.latch;
		}
I'm used part of assert IsDead() and think f_bgVisibility and f_spVisibility can be replaced by (regs.ctrl[1] & Regs::CTRL1_BG_SP_ENABLED)) that gave me correct works Battle Toads airship intro. Address increment obvious is (regs.ctrl[0] & Regs::CTRL0_INC32), I think is enough for working Indiana Jones Chronicles and other games.

Update:
- Now Battle Toads it works.
- Ice Climber works (i just needed to rebuild all project)
- GI JOE, Batman Return of The joker works - condition (address increment check added)

Check this out what nestopia now can http://www.youtube.com/watch?v=fXPGTNZ2EK4

...and here is the new release...
==============================================
Nestopia 1.40.1 beta 1 - unofficial build
Nestopia-1.40.1b(IndyFix)
==============================================
Last edited by plasturion on Sun Jun 12, 2011 6:47 am, edited 2 times in total.

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

Post by *Spitfire_NES* » Tue Jun 07, 2011 4:45 pm

does this affect or impact any other games at all negatively? thanks for posting that. :)

Post Reply