It is currently Sat Oct 21, 2017 12:45 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 41 posts ]  Go to page Previous  1, 2, 3
Author Message
 Post subject:
PostPosted: Sun Sep 17, 2006 10:12 pm 
Offline
User avatar

Joined: Mon Sep 27, 2004 2:13 pm
Posts: 1667
Location: .ma.us
I planned to fetch and handle input whenever the game strobed the controller, I don't know how realistic this is however.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Sep 17, 2006 10:19 pm 
Offline

Joined: Fri Jul 29, 2005 3:40 pm
Posts: 345
Location: near chicago
i was going to do this. i kinda put that on hold for now. i was looking into different controller and keyboard input libs.

right now i have 2 threads, the nes core thread and the main thread for input. the main thread will set the nes controller variables when changed, then the nes core reads them. its even driven. not sure if this is a good way to code, but works for the time being.

matt


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 21, 2006 3:57 pm 
Offline
User avatar

Joined: Mon Sep 27, 2004 2:13 pm
Posts: 1667
Location: .ma.us
Are there any drawbacks to running one CPU instruction, then 3*(last instruction's cycles) PPU cycles?

Can anything other than CPU writes alter rendering?

Is there a benefit to synching the CPU to PPU cycles?

I don't plan to support MMC2/MMC4/MMC5 initially but what should I be building into the framework so in case I do later on, I don't burn my bridges?

Thanks!


Last edited by kyuusaku on Thu Sep 21, 2006 4:09 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 21, 2006 4:06 pm 
Offline

Joined: Fri Jul 29, 2005 3:40 pm
Posts: 345
Location: near chicago
i think you mean cpu cycle ? a cpu instruction is at least 2 cpu cycles

the emu would be more accurate that way. however that would probably cause alot of cache misses and extra funciton calls. this is how nintendulator works (quietust can comment more on his emu).

mine does the catch up method, in the cpu i count the cpu cycles and catch up the ppu to the cycle read. this works for now. i will try to improve it later.

matt


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 21, 2006 4:14 pm 
Offline
User avatar

Joined: Mon Sep 27, 2004 2:13 pm
Posts: 1667
Location: .ma.us
You're fast, this isn't the first time I've edited my post to have it already replied to ;)

I don't understand your question. I mean running 3 PPU cycles for every CPU cycle that was in the last instruction.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 21, 2006 4:47 pm 
Offline

Joined: Fri Jul 29, 2005 3:40 pm
Posts: 345
Location: near chicago
yes there are 3 ppu cycles in one cpu cycle (for ntsc, not pal)

a cpu instruction has more than one cpu cycle. i think you got it right.

so you dont burn your bridges, i wouldnt hard code 1 cpu cycle to 3 ppu cycles. you wont be able to add pal supppor later on.

what do you have started now ?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 21, 2006 7:48 pm 
Offline
User avatar

Joined: Mon Sep 27, 2004 2:13 pm
Posts: 1667
Location: .ma.us
Right now I've got pseudocode and flowcharts ;)


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 21, 2006 8:16 pm 
Offline

Joined: Fri Jul 29, 2005 3:40 pm
Posts: 345
Location: near chicago
then i suggest start with the cpu. and the memory functions. and i would update the cpu clock cycles for each cpu cycle needed. get the cpu working.

i think there is a link at the bottom of the cpu page on the wiki, the new wiki.

mine is a double switch statement. i would also suggest this too, as there is less redunant code. you can keep all the addressing modes together and the keep all the instructions together

matt


Top
 Profile  
 
 Post subject:
PostPosted: Sat Oct 07, 2006 9:01 am 
Offline
User avatar

Joined: Mon Sep 27, 2004 2:13 pm
Posts: 1667
Location: .ma.us
New questions:

- Are the R,G,B, black background colors from the palette or different entirely? Will something other than $0,1,2,4 really damage the PPU? What do these bits do in monochrome mode? (conflicting information)

-Is it: color mode = background colors, monochrome = emphasis or the opposite or neither?

- I plan to render in real time, pixel by pixel. What would would be the best way for me then to implement a pattern table/nametable viewer? Should I decode the tiles beforehand (ie not render pixel by pixel) and copy them both to the screen buffer and viewer? Would pixel rendering to each be stupidly slow?

-What's the fastest way to fetch pixels?

pixel0 = *palette[((atthi & 0x80)>>4)|((attlo & 0x80)>>5)|((tilehi & 0x80)>>6)|((tilelo & 0x80)>>7)] ?

I notice some emulators use tables to merge bits, could someone please describe a table method?


Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Sat Oct 07, 2006 11:07 am 
Offline

Joined: Fri Jul 29, 2005 3:40 pm
Posts: 345
Location: near chicago
could you start a new thread instead of using a general newbie one? :)


Top
 Profile  
 
 Post subject:
PostPosted: Sat Oct 07, 2006 11:24 am 
Offline
Site Admin
User avatar

Joined: Mon Sep 20, 2004 6:04 am
Posts: 3470
Location: Indianapolis
The damaging PPU thing is a myth, as far as I know. More than a few games used combinations of it (Super Spy Hunter comes to mind, as one that uses all 3 bits at once).


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

All times are UTC - 7 hours


Who is online

Users browsing this forum: Google Adsense [Bot] and 9 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