It is currently Tue Dec 12, 2017 3:00 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 218 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7, 8 ... 15  Next
Author Message
 Post subject:
PostPosted: Tue Apr 19, 2011 3:45 pm 
Offline
User avatar

Joined: Fri May 21, 2010 4:10 pm
Posts: 279
James wrote:
You'll need to modify the NES_POKE_D(Ppu,2007) function in NstPpu.cpp.


thanks james. i really appreciate it man. one more question to you, will this break or affect other games? and what values do i need to change exactly? i been looking over the nestopia source i have and have learned some things, but im not sure what value or what i need to do to the nes_poke_d.

do i just need to change a value of 2007 or some sorts>? :D and thanks again man, this community really comes together to help noobs in need like me who are trying to learn what they can. :)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 19, 2011 5:48 pm 
Offline
User avatar

Joined: Sat Jan 22, 2005 8:51 am
Posts: 427
Location: Chicago, IL
Sorry, that should've been NES_PEEK_A(Ppu, 2007).

Take a look at that function, then take a look at the code I posted earlier in this thread and see if you can figure it out/spot the similarities. Post your questions here and we'll work through it.

_________________
get nemulator
http://nemulator.com


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 19, 2011 6:01 pm 
Offline
User avatar

Joined: Fri May 21, 2010 4:10 pm
Posts: 279
James wrote:
Sorry, that should've been NES_PEEK_A(Ppu, 2007).

Take a look at that function, then take a look at the code I posted earlier in this thread and see if you can figure it out/spot the similarities. Post your questions here and we'll work through it.



ok awesome i like the way this is being done. haha. thanks for even taking your time to do this with me bro. im gonna look at that now.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 20, 2011 1:30 pm 
Offline
User avatar

Joined: Fri May 21, 2010 4:10 pm
Posts: 279
hey james after looking through the current code the only similarities i see is the 32 and 1 in the nestopias code: scroll.address = (scroll.address + ((regs.ctrl[0] & Regs::CTRL0_INC32) ? 32 : 1)) & 0x7FFF;

and also the code of 07FFF which matches the code fix you made. the rest there are no matches or similiarities that i see, with that said do i need to leave io.latch and the io.buffer alone and modify the code containing the

address = scroll.address & 0x3FFF; part?

perhaps maybe im way off haha.

is it simply a matter of adjusting the line of 0x07FFF and 03FFF to another value? thanks again for taking your time to help with this.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 20, 2011 6:23 pm 
Offline
User avatar

Joined: Sat Jan 22, 2005 8:51 am
Posts: 427
Location: Chicago, IL
These two statements are equivalent:

vram_address = (vram_address + address_increment) & 0x7FFF;


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


Notice, however, that my version executes different code when the PPU is rendering:

Code:
if (rendering)
{
 //do something that nestopia doesn't do
}
else
{
 vram_address = (vram_address + address_increment) & 0x7FFF;
}


So you need to figure out a) how to identify when nestopia's ppu is rendering (i.e., sprites and/or background enabled while on-screen) and b) how to translate my rendering code to nestopia.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 21, 2011 4:47 pm 
Offline
User avatar

Joined: Fri May 21, 2010 4:10 pm
Posts: 279
vram_address &= 0x0FFF;
switch (vram_address & 0x03E0)
{
case 0x03A0:
vram_address ^= 0x0800;
case 0x03E0:
vram_address &= 0xFC1F;
break;
default:
vram_address += 0x0020;
}
}
else
vram_address += 0x1000;


thats the part of your code thats stumping me. the way im seeing it and prob wrong but it seems like if its rendering at 0x07FFF then i need to switch the address, so what is 0x0800? and oxOFC1F? and also the 0X0020 and 0X1000?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 21, 2011 5:01 pm 
Offline
Formerly Fx3
User avatar

Joined: Fri Nov 12, 2004 4:59 pm
Posts: 3076
Location: Brazil
I suspect you're far from getting the achievement of "the man who fixed nestopia in the world". :)

_________________
Zepper
RockNES developer


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 21, 2011 5:35 pm 
Offline
User avatar

Joined: Fri May 21, 2010 4:10 pm
Posts: 279
Zepper wrote:
I suspect you're far from getting the achievement of "the man who fixed nestopia in the world". :)


hahaha i dont want any achievements or credit. i just want to be able to play this on my fave emulator. and any and all credit will go to james for the help or anyone else who is willing to help me learn something new. :)


Top
 Profile  
 
 Post subject:
PostPosted: Sat Apr 30, 2011 7:15 am 
Offline
User avatar

Joined: Fri May 21, 2010 4:10 pm
Posts: 279
i been drivin myself crazy trying to get this done. arrrghhh! :twisted:


Top
 Profile  
 
 Post subject:
PostPosted: Sat Apr 30, 2011 1:12 pm 
Offline
Formerly Fx3
User avatar

Joined: Fri Nov 12, 2004 4:59 pm
Posts: 3076
Location: Brazil
*Spitfire_NES* wrote:
i been drivin myself crazy trying to get this done. arrrghhh! :twisted:


All your challenge are belong to us :D

_________________
Zepper
RockNES developer


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 02, 2011 6:50 am 
Offline
User avatar

Joined: Sat Jan 22, 2005 8:51 am
Posts: 427
Location: Chicago, IL
ok -- let's start with some basic questions: 1) what level of C/C++ experience do you have? 2) step 1 is being able to determine when reads occur during rendering -- have you written code for this yet? 3) please post what you've tried already so that we can build off of that/help explain why it hasn't worked yet.

_________________
get nemulator
http://nemulator.com


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 02, 2011 10:38 am 
Offline
Formerly Fx3
User avatar

Joined: Fri Nov 12, 2004 4:59 pm
Posts: 3076
Location: Brazil
Looks like a copy & paste game.

_________________
Zepper
RockNES developer


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 02, 2011 2:38 pm 
Offline
User avatar

Joined: Fri May 21, 2010 4:10 pm
Posts: 279
James wrote:
ok -- let's start with some basic questions: 1) what level of C/C++ experience do you have? 2) step 1 is being able to determine when reads occur during rendering -- have you written code for this yet? 3) please post what you've tried already so that we can build off of that/help explain why it hasn't worked yet.


copy and paste game? lol. what does that mean haha?

im very very low level james. i have tried a couple things and hey im being honest here at least. i tried adjusting some of the parameters of the addresses that you have listed in your fix to nestopia it wasnt much of a change really just a change of the address which obviously isnt right and i learned from that. heres what i have tried:

if scroll.address = (scroll.address + ((regs.ctrl[0] & Regs::CTRL0_INC32) ? 32 : 1)) & 0x7FFF;
{
im stumped here as to what to put
}
else
{
scroll.address = (scroll.address + ((regs.ctrl[0] & Regs::CTRL0_INC32) ? 32 : 1)) & 0xFC1F;
}

do i know what im doing? hell no? am i trying? hell yes. haha. i still dont understand some of the values in your code like 0xFC1F and the others, do i need to look into another part of the ppu files to find out when it renders? and yea like i said im a noob, but im gonna get it sooner or later.


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 02, 2011 3:15 pm 
Offline
Formerly Fx3
User avatar

Joined: Fri Nov 12, 2004 4:59 pm
Posts: 3076
Location: Brazil
*Spitfire_NES* wrote:
copy and paste game? lol. what does that mean haha?


Yes, I'm joking! Thanks for understanding me. ^_^;;

_________________
Zepper
RockNES developer


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 02, 2011 4:16 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19335
Location: NE Indiana, USA (NTSC)
*Spitfire_NES* wrote:
do i know what im doing? hell no? am i trying? hell yes. haha. i still dont understand some of the values in your code like 0xFC1F and the others

I'll superimpose $FC1F on the bit definitions for the current VRAM pointer (loopy_V):
Code:
1111 1100 0001 1111  Decoding the bitmask $FC1F
|||| |||| |||| ||||
|||| |||| |||+-++++- X tile position
|||| ||++-+++------- Y tile position
|||| |+------------- X screen
|||| +-------------- Y screen
|+++---------------- Y pixel position
+------------------- This bit don exits, as far as I know


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 218 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7, 8 ... 15  Next

All times are UTC - 7 hours


Who is online

Users browsing this forum: Google [Bot], Yahoo [Bot] and 8 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