DPCM/Controller Glitch emulation

Discuss emulation of the Nintendo Entertainment System and Famicom.

Moderator: Moderators

gravelstudios
Posts: 70
Joined: Mon Mar 13, 2017 5:21 pm
Contact:

Re: DPCM/Controller Glitch emulation

Post by gravelstudios » Mon Feb 18, 2019 6:15 am

I'd love to get into SNES development at some point, and you're right about the lack of documentation. Something like that would be a great tool.

Fiskbit
Posts: 75
Joined: Sat Nov 18, 2017 9:15 pm

Re: DPCM/Controller Glitch emulation

Post by Fiskbit » Mon Feb 18, 2019 3:27 pm

As far as I can tell, BizHawk 2.3.1 doesn't support this glitch at all; none of the tests I've tried that are expected to fail are doing so on this emulator. [Edit: Alyosha_TAS pointed out that the NesHawk core, which is not the default, does support this glitch and passes/fails tests as expected]

As of my testing in January, Nintendulator seems to be the best one for testing this, as it correctly passes/fails related input corruption tests I've tried or written. However, last I saw from Quietust on this topic, he wasn't confident that the timing was 100% right in all cases. Mesen and puNES also support this and appear to be good enough for testing anything but long synced-read functions. Nestopia and Nintaco have some level of support, but seem to be inaccurate enough at this time that their results aren't reliable.

And yeah, I agree that multiple reads is the way to go for now.


@rainwarrior: dma_sync_test_loop attempts to sync once and then perform joypad reads indefinitely without corruption. The initial discussion around synced input reading was that the joypad read cycles needed to be timed to land on even cycles, which works fine for a short input reading function, but if your input reading takes longer than your DMC rate, then you also need your sequences of writes to end on even cycles. Otherwise, DMA landing on a misaligned write will take an odd number of cycles and change cycle parity, causing your joypad reads to land on odd cycles.


@Sour: I'm really excited to see what you can pull off for SNES emulation. If the tools are anywhere near as good as what you've made for NES, I suspect I'll finally start tinkering around with SNES.
Last edited by Fiskbit on Mon Feb 18, 2019 6:07 pm, edited 1 time in total.

Alyosha_TAS
Posts: 98
Joined: Wed Jun 15, 2016 11:49 am

Re: DPCM/Controller Glitch emulation

Post by Alyosha_TAS » Mon Feb 18, 2019 5:46 pm

For BizHawk you need to change to the NESHawk core. Do this by going to Config -> Cores -> NES -> NESHawk.

The default core is QuickNES, which is fast but not very accurate.

NESHawk is the slow but accuracy focused core.

Fiskbit
Posts: 75
Joined: Sat Nov 18, 2017 9:15 pm

Re: DPCM/Controller Glitch emulation

Post by Fiskbit » Mon Feb 18, 2019 6:04 pm

Ah, thanks. Yeah, you're right that it passes/fails as it should. Looks like it might be as good as Nintendulator, then.

I'm surprised QuickNES is the default in this emulator, given its accuracy problems. I've already had to work around QuickNES bugs in my projects, such as by incrementing a non-FF negative value to reset MMC1 because QuickNES wasn't ignoring the second write.

fred
Posts: 64
Joined: Fri Dec 30, 2011 7:15 am
Location: Sweden

Re: DPCM/Controller Glitch emulation

Post by fred » Tue Feb 19, 2019 8:13 am

Sour wrote:(esp. since my time is currently all being spent on trying to build a SNES emulator)
Cool! Looking forward to hearing more about that later! :shock:

Post Reply