Page 1 of 1

Memory Timing

Posted: Wed Jan 19, 2011 4:16 am
by DParrott
Hi all,

One more question, using Blaargs's test roms I now have my core passing all CPU instruction tests and passes the instruction timing tests fine.

It fails on every one of the memory timing tests though. What is the impact of the mem timing being incorrect? Is it likely to cause many problems or is it something that I can worry about looking at later on.

I think I'd have to change the way I'm accessing/updating memory. Currently I just record the cycles for an op and update the timer after it's executed. Am I right in thinking that the timers would need to be updated independently based on the cycles passed to correct the memory timing?

Any hints on how I would implement it?

Thanks guys

Posted: Sat Jan 22, 2011 6:46 pm
by MottZilla
I'm guessing if it fails that much, it's that whatever is used to test if timing is correct is broken. I doubt that memory timing will cause tons of games not to work if incorrect but there are probably atleast some. But Gameboy games should be atleast somewhat forgiving of timing errors.

Posted: Mon Jan 24, 2011 12:38 pm
by DParrott
I think my timing code is working ok as all the previous tests pass fine.

I've not made any attempt to have correct memory timing which I think is why they all fail. :-)

It was more asking if it's something I need to work on that is going to cause many issues or if I'm better trying to get some sort of result; like graphics. :-)

I'm probably doing this backwards to a lot of people, I tend to try for "correct" rather than a result and then refine it. I believe I have the cpu and timers working as they should, now I can work on the next bit.

That and I've not done a whole lot with graphics/directx so need to work out where to start.

Posted: Tue Jan 25, 2011 5:23 am
by mic_
No real need for Direct3D/OpenGL to begin with. GDI is more than fast enough for a GB emulator, and involves way less setup. Or you could use SDL which should be even easier.