Search found 1541 matches

by byuu
Wed May 24, 2006 12:58 am
Forum: NESemdev
Topic: cycle for cycle stuff
Replies: 99
Views: 50482

If we define a stable state as the main CPU and sound CPU both having just completed instructions, this might not even be possible. I imagine that the only stable states that could be reliably gotten to would constrain the implementation enough that it would come to resemble the previous design tha...
by byuu
Mon May 22, 2006 3:52 pm
Forum: NESemdev
Topic: cycle for cycle stuff
Replies: 99
Views: 50482

The problem with byuu's system (ignoring that it's for the SNES) is a limitation of the emulator implementation. Some of the system state is represented in the host machine's internal state of several threads (program counter, stack contents, stack pointer). This can't be easily converted to an emu...
by byuu
Mon May 22, 2006 8:29 am
Forum: NESemdev
Topic: cycle for cycle stuff
Replies: 99
Views: 50482

You'd made it sound like it wouldn't be possible to avoid savestate versioning issues.. but since the NES is static, it's more a matter of how practical it is. This isn't related to the NES. The reason you can't use savestates with cooperative multithreading is because you can't save the stack + co...
by byuu
Sun May 21, 2006 10:15 pm
Forum: NESemdev
Topic: cycle for cycle stuff
Replies: 99
Views: 50482

augnober wrote:Confucius says.. Platforms and emulators may come and go, but the NES will never change 8)
Uhh... what?
by byuu
Thu May 11, 2006 2:26 pm
Forum: NESemdev
Topic: Down to the cycle
Replies: 26
Views: 8824

The model I have in my mind is that the 6502 latches the IRQ/NMI status at the beginning of the last clock of each instruction. This means that it effectively looks at the IRQ/NMI input just before that time, i.e. what its status was on the next-to-last clock. This would account for most of the lat...
by byuu
Thu May 11, 2006 11:00 am
Forum: NESemdev
Topic: cycle for cycle stuff
Replies: 99
Views: 50482

Alright, figured I'd post about this here as well since we were discussing cooperative multithreading, etc previously in this thread. Basically, what I've found out about cooperative multithreading is that there is an implementation in Win95/NT3.51+ called Windows Fibers. On my Athlon 3500+, it is g...
by byuu
Wed Mar 29, 2006 3:57 pm
Forum: NESemdev
Topic: cycle for cycle stuff
Replies: 99
Views: 50482

It sounds like you aren't interested in giving the catch-up method a fair chance, but I'll try to discuss this anyway. I don't mind giving it a fair chance, it obviously works for you guys. But I'm not interested in using it myself, having tried for the better part of three months to get those issu...
by byuu
Tue Mar 28, 2006 7:31 pm
Forum: NESemdev
Topic: cycle for cycle stuff
Replies: 99
Views: 50482

Oh well, I was hoping for actual problem cases for the catch-up method. I cited many in my first post. To repeat one example, how would you complete a DMA transfer that activates in the middle of an opcode if your CPU emulator can't break out until the opcode is completed? To get the timing right, ...
by byuu
Tue Mar 28, 2006 6:07 pm
Forum: NESemdev
Topic: cycle for cycle stuff
Replies: 99
Views: 50482

I take strong issue with your claims that the catch-up design is a hack. Sorry, it's just my personal opinion. If it works, it works. I try and code things as a reference implementation, which is obviously terrible for performance. There's no need to separate PPU synchronization from CPU memory acc...
by byuu
Mon Mar 27, 2006 11:55 pm
Forum: NESemdev
Topic: cycle for cycle stuff
Replies: 99
Views: 50482

The threading you described is known as "cooperative threading" Never heard of it. So is it doable in c++ without non-portable libraries? The big thing it needs that is going to be hard is the ability to leave and resume in the middle of functions. It also needs to be stack safe. You should be able...
by byuu
Mon Mar 27, 2006 6:05 pm
Forum: NESemdev
Topic: cycle for cycle stuff
Replies: 99
Views: 50482

Whoa, sorry to bump such an old topic. I'd have posted sooner if I knew about this thread. While I write an SNES emulator, the two systems are very similar so I see no reason we can't share experiences. Ok, today i finally finished the new cycle-for-cycle accurate 6502 emulator ... Boy, nothing coul...