Newbie to emulation questions
Page 3 of 3

Author:  kyuusaku [ Sun Sep 17, 2006 10:12 pm ]
Post subject: 

I planned to fetch and handle input whenever the game strobed the controller, I don't know how realistic this is however.

Author:  mattmatteh [ Sun Sep 17, 2006 10:19 pm ]
Post subject: 

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.


Author:  kyuusaku [ Thu Sep 21, 2006 3:57 pm ]
Post subject: 

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?


Author:  mattmatteh [ Thu Sep 21, 2006 4:06 pm ]
Post subject: 

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.


Author:  kyuusaku [ Thu Sep 21, 2006 4:14 pm ]
Post subject: 

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.

Author:  mattmatteh [ Thu Sep 21, 2006 4:47 pm ]
Post subject: 

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 ?

Author:  kyuusaku [ Thu Sep 21, 2006 7:48 pm ]
Post subject: 

Right now I've got pseudocode and flowcharts ;)

Author:  mattmatteh [ Thu Sep 21, 2006 8:16 pm ]
Post subject: 

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


Author:  kyuusaku [ Sat Oct 07, 2006 9:01 am ]
Post subject: 

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?


Author:  mattmatteh [ Sat Oct 07, 2006 11:07 am ]
Post subject: 

could you start a new thread instead of using a general newbie one? :)

Author:  Memblers [ Sat Oct 07, 2006 11:24 am ]
Post subject: 

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).

Page 3 of 3 All times are UTC - 7 hours
Powered by phpBB® Forum Software © phpBB Group