Search found 1541 matches

by byuu
Sun Aug 11, 2019 3:56 am
Forum: SNESdev
Topic: Save State/Load State GUI in emulators...
Replies: 38
Views: 18197

Re: Save State/Load State GUI in emulators...

I have screenshot previews under the state manager, but it's probably not as convenient as hitting one key and seeing pictures of every single state at the same time. It does work on macOS too, but I found an issue with naming the managed states, which I'll fix soon. https://i.imgur.com/KTIfjao.png
by byuu
Sun Aug 04, 2019 12:07 am
Forum: SNESdev
Topic: Mesen-S - SNES Emulator
Replies: 304
Views: 128270

Re: Mesen-S - SNES Emulator

OBC1 will take you like five minutes. It's the dumbest chip in the world. Metal Combat however is a pretty fun game.
by byuu
Thu Aug 01, 2019 7:44 pm
Forum: SNESdev
Topic: 6502/65816: IRQ testing not on last cycle of each opcode?
Replies: 8
Views: 5968

Re: 6502/65816: IRQ testing not on last cycle of each opcode

I feel like I should probably mention that I don't pass those tests still (I was mostly busy fixing more critical stuff up till now :p). ... oh ^-^;; Perhaps we can work out a solution at the same time then. Your CPU core design isn't going to work if you have to poll interrupts the way I do ... So...
by byuu
Thu Aug 01, 2019 7:36 pm
Forum: SNESdev
Topic: 6502/65816: IRQ testing not on last cycle of each opcode?
Replies: 8
Views: 5968

Re: 6502/65816: IRQ testing not on last cycle of each opcode

I improved things as much as I could. https://github.com/byuu/bsnes/blob/master/bsnes/sfc/cpu/irq.cpp status.interruptPending is just a bit-mask combination of (nmi|irq|resetPending), since the WDC65816 core calls it quite often. Omitting that here. auto CPU::lastCycle() -> void { if(!status.irqLock...
by byuu
Thu Aug 01, 2019 4:59 pm
Forum: SNESdev
Topic: 6502/65816: IRQ testing not on last cycle of each opcode?
Replies: 8
Views: 5968

6502/65816: IRQ testing not on last cycle of each opcode?

Currently, my CPU core is littered with this nasty hack: #define L lastCycle(); void WDC65816::instructionJumpIndirect() { V.l = fetch(); V.h = fetch(); W.l = read(uint16(V.w + 0)); L W.h = read(uint16(V.w + 1)); PC.w = W.w; } The idea of L (lastCycle()) is to test interrupts. This becomes important...
by byuu
Thu Aug 01, 2019 6:09 am
Forum: SNESdev
Topic: Mesen-S - SNES Emulator
Replies: 304
Views: 128270

Re: Mesen-S - SNES Emulator

It's this way mostly because that's also how I implemented it on the NES, too. Yeah, it pretty much is how the hardware works (well, the four-clock test thing is just the effective result anyway, but the two-stage pipeline is definitely a real thing.) Disappointing thing is the NES/PC Engine (HuC62...
by byuu
Wed Jul 31, 2019 7:40 pm
Forum: SNESdev
Topic: Mesen-S - SNES Emulator
Replies: 304
Views: 128270

Re: Mesen-S - SNES Emulator

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...
by byuu
Tue Jul 30, 2019 10:22 pm
Forum: SNESdev
Topic: Mesen-S - SNES Emulator
Replies: 304
Views: 128270

Re: Mesen-S - SNES Emulator

In terms of max overclock values, on the NES, both FCEUX/Mesen/puNES support up to 1000 lines of either type, iirc, so that's what I've implemented at the moment Hmm ... I'm doing my overclocking as a % value. For NTSC, each frame gets: uint clocks = 262*1364; uint extraclocks = (clocks*overclock)-...
by byuu
Tue Jul 30, 2019 4:06 pm
Forum: SNESdev
Topic: Mesen-S - SNES Emulator
Replies: 304
Views: 128270

Re: Mesen-S - SNES Emulator

Gave the overclocking a try, noticed a few things. If you run the extra scanlines before / at the start of NMI, it doesn't really have much effect on speed. Most games seem to have all the heavy lifting that lags out in NMI. But, it doesn't hurt to just offer to add extra scanlines to both/either. I...
by byuu
Sat Jul 20, 2019 12:18 pm
Forum: SNESdev
Topic: Mesen-S - SNES Emulator
Replies: 304
Views: 128270

Re: Mesen-S - SNES Emulator

Well just for fun ... So to display "correct behavior" on HblankEmuTest/NTSC, any amount of waiting during sprite tile fetching when the display is forced blanked does it: https://github.com/byuu/higan/blob/master/higan/sfc/ppu/object.cpp#L98 If we don't do that, but we block tile reads when the dis...
by byuu
Sat Jul 20, 2019 10:03 am
Forum: SNESdev
Topic: Mesen-S - SNES Emulator
Replies: 304
Views: 128270

Re: Mesen-S - SNES Emulator

if(_forcedVblank || _scanline >= _vblankStartScanline) { return _internalOamAddress; } else { if(_memoryManager->GetHClock() <= 255 * 4) { return _oamEvaluationIndex << 2; } else { return _oamTimeIndex << 2; } } So then there's not a way to write to the high two bytes of the lower OAM table with th...
by byuu
Sat Jul 20, 2019 9:44 am
Forum: SNESdev
Topic: Mesen-S - SNES Emulator
Replies: 304
Views: 128270

Re: Mesen-S - SNES Emulator

Thanks for the help! _oamTimeIndex: The sprite index being read by the "sprite rendering" portion (270-337). It's supposed to write to BOTH the "low" table of OAM and the "high" table of OAM for the current sprite at once Oh, from the notes it sounded like it was writing to the low table only. Okay ...
by byuu
Sat Jul 20, 2019 7:58 am
Forum: SNESdev
Topic: Mesen-S - SNES Emulator
Replies: 304
Views: 128270

Re: Mesen-S - SNES Emulator

Hey Sour, when you're not busy, can we talk sprite evaluation for a bit? ^-^; https://github.com/byuu/higan/blob/master/higan/sfc/ppu/main.cpp https://github.com/byuu/higan/blob/master/higan/sfc/ppu/object.cpp#L34 https://github.com/byuu/higan/blob/master/higan/sfc/ppu/object.cpp#L94 I implemented t...
by byuu
Fri Jul 19, 2019 6:39 pm
Forum: SNESdev
Topic: Mesen-S - SNES Emulator
Replies: 304
Views: 128270

Re: Mesen-S - SNES Emulator

I imagine doing the same on the SNES (e.g adding scanlines between scanlines 224 & 225 and pausing the SPC during them) would probably work out relatively well in most scenarios - but games with really tight SPC timings might potentially end up locking up? It would break streaming audio games like ...
by byuu
Thu Jul 18, 2019 8:03 pm
Forum: SNESdev
Topic: Mesen-S - SNES Emulator
Replies: 304
Views: 128270

Re: Mesen-S - SNES Emulator

Just released version 0.2.0 This version is mostly accuracy/timing fixes and a lot of debugger tool improvements (+ DSP support). Congratulations! Looks great :D Many thanks to everybody in this thread for helping out! I think I've had more help fixing emulation bugs on Mesen-S in 3 months than I h...