Re: Mesen-S - SNES Emulator
Posted: Wed Jul 31, 2019 7:40 pm
We might be able to adapt my database editor for storing metadata like overclocking limits and such.
I guess if this moves into serious interest, let me know please ^^;
Yeah, interrupts only need to be polled once every four 21.47MHz clock cycles.
Something else I wanted to do that would reduce some bloat: currently we have to do the NMI/IRQ tests before we execute the last work cycle of each instruction. If we instead did this test on every cycle, and kept a latch of the previous value, eg:
foreach_cycle { last = current; current = testInterrupts(); } then we could trigger interrupts based on last instead of curent.
But I haven't been able to make this work because my testInterrupts() has side effects.
Maybe you'd have better luck, though you might not do it as it might be a touch slower ^-^;
I've always said you could get about twice the speed of higan without losing any accuracy if you optimized it to its limits. I think you have more headroom in Mesen-S to get more than 200%, but then there's also a few corner cases you're skipping because they're quite frankly ridiculously costly. But on the whole, my original estimate seems to be mostly holding up.
I don't want higan to be the fastest accurate emulator, I want it to be the reference implementation people use to validate the hardware. With higan, I want to preserve the machine more than play games. I am not in any way saying one is more important than the other (if anything, a gaming emulator is way more useful), it's just the kind of emulator I wanted to make is all.
I revived bsnes to try and fill the large gap between higan and Snes9X, because I'd pretty much given up on another serious SNES emulator attempt. I was planning to speed up the accuracy portion inside bsnes, but I think that effort might be a bit redundant now ^-^
I guess if this moves into serious interest, let me know please ^^;
Yeah, interrupts only need to be polled once every four 21.47MHz clock cycles.
Something else I wanted to do that would reduce some bloat: currently we have to do the NMI/IRQ tests before we execute the last work cycle of each instruction. If we instead did this test on every cycle, and kept a latch of the previous value, eg:
foreach_cycle { last = current; current = testInterrupts(); } then we could trigger interrupts based on last instead of curent.
But I haven't been able to make this work because my testInterrupts() has side effects.
Maybe you'd have better luck, though you might not do it as it might be a touch slower ^-^;
Yep, yep. This is why I've been bugging other emudevs for quite a while now (to no avail :P) to make an accurate SNES emulator.In general though, while I do try to keep my code as clean as I can, I've found that often times abstractions that make the code cleaner unfortunately end up also making it slower, esp. since everything in a console tends to be interconnected, heh. Most of the time I tend to favor speed over perfectly isolating the code for each piece of hardware (esp. since I end up with fairly slow code even if I do that :p)
I've always said you could get about twice the speed of higan without losing any accuracy if you optimized it to its limits. I think you have more headroom in Mesen-S to get more than 200%, but then there's also a few corner cases you're skipping because they're quite frankly ridiculously costly. But on the whole, my original estimate seems to be mostly holding up.
I don't want higan to be the fastest accurate emulator, I want it to be the reference implementation people use to validate the hardware. With higan, I want to preserve the machine more than play games. I am not in any way saying one is more important than the other (if anything, a gaming emulator is way more useful), it's just the kind of emulator I wanted to make is all.
I revived bsnes to try and fill the large gap between higan and Snes9X, because I'd pretty much given up on another serious SNES emulator attempt. I was planning to speed up the accuracy portion inside bsnes, but I think that effort might be a bit redundant now ^-^

