mattcurrie / dmg-acid2

😀 The Acid2 test, now for the original Game Boy! 😀
MIT License
181 stars 12 forks source link

Suggestion added failure states. #4

Open Smileynator opened 3 years ago

Smileynator commented 3 years ago

I ran this test on my emulator, and it actually went haywire for several reasons.

  1. If you trigger coincidence interrupt multiple times in the same LY, this causes very wild flickering. (speed of flickering depends on how often you re-call the interrupt) https://user-images.githubusercontent.com/3433068/113571762-3c98e780-9617-11eb-8859-ae0748858baa.gif
  2. If you invert sprite sorting by accident. The hello world message turns british instead. https://user-images.githubusercontent.com/3433068/113571837-618d5a80-9617-11eb-9e27-b86bab9f408a.png

Might be nice to add to the list of known faulty states?

ArcticXWolf commented 3 years ago

Hey @Smileynator ! I hope you dont mind me asking here, but I currently run into the same problem like you did, in that my emulator flickers a lot in this test. However I am not understanding your explanation fully: Of which interrupts do you speak? VBLANK? STAT? TIMER?

And a second/unrelated question: As this testrom does not write anything to serial port or else, how did you detect, if it ran to completion (for automated test)?

Thanks!

mattcurrie commented 3 years ago

@Smileynator Thanks for these. For the interrupt issue, I'm just wondering if you would be able to generate the image with the same palette as I use for the other issue example images so it matches? If not, I can try to put something together :) For the hello world text, I'm thinking about modifying that in a future release, as having the 11th sprite at the end of the line is a bit misleading and could lead to emulators passing the test for the wrong reason (e.g. selecting the 10 sprites by X coordinate order rather than by their order in OAM).

@ArcticXWolf The only interrupt the test uses is the STAT interrupt's LY=LYC condition, which is used to update register values on the correct screen row. The STAT interrupt should only be triggering once per line when the LY=LYC condition is met. Regarding your second question, the test executes an ld b, b instruction during VBlank to indicate test completion.

ArcticXWolf commented 3 years ago

Thanks for your fast answer :)

I guess my problem lies elsewhere.. I only trigger the Interrupt once per Scanline (using a rising edge detector):

2021/08/01 10:19:29 Scanline: 87
2021/08/01 10:19:29 Scanline: 88
2021/08/01 10:19:29 Interrupt: 1
2021/08/01 10:19:29 Scanline: 89
2021/08/01 10:19:29 Scanline: 90
2021/08/01 10:19:29 Scanline: 91
2021/08/01 10:19:29 Scanline: 92
2021/08/01 10:19:29 Scanline: 93
2021/08/01 10:19:29 Scanline: 94
2021/08/01 10:19:29 Scanline: 95
2021/08/01 10:19:29 Scanline: 96
2021/08/01 10:19:29 Scanline: 97
2021/08/01 10:19:29 Scanline: 98
2021/08/01 10:19:29 Scanline: 99
2021/08/01 10:19:29 Scanline: 100
2021/08/01 10:19:29 Scanline: 101
2021/08/01 10:19:29 Scanline: 102
2021/08/01 10:19:29 Scanline: 103
2021/08/01 10:19:29 Scanline: 104
2021/08/01 10:19:29 Interrupt: 1
2021/08/01 10:19:29 Scanline: 105
2021/08/01 10:19:29 Scanline: 106
2021/08/01 10:19:29 Scanline: 107
2021/08/01 10:19:29 Scanline: 108
2021/08/01 10:19:29 Scanline: 109
2021/08/01 10:19:29 Scanline: 110
2021/08/01 10:19:29 Scanline: 111
2021/08/01 10:19:29 Scanline: 112
2021/08/01 10:19:29 Interrupt: 1
2021/08/01 10:19:29 Scanline: 113
2021/08/01 10:19:29 Scanline: 114

And in comparison to Smileynator my graphics are far more garbled than theirs.

GIF of wrong graphics

Its strange, because all games I've tried in DMG mode run completely fine.

Smileynator commented 3 years ago

Sorry to get back to this so late. I am afraid I already passed the tests far and long by this point. And i rarely check my github at all. I have just taken my above image and corrected the colors in photoshop, but the animated one does not want to do that in photoshop sadly. (i also see they are not pixelperfect due to how i pulled the screenshots from the get-go, so it will do nobody any good in automated tests) So that is currently the best i can provide you. I hope it helps! 113571837-618d5a80-9617-11eb-9e27-b86bab9f408a

ArcticXWolf commented 3 years ago

Np, I realized I had some problems with my window implementation, that was the biggest issue. I think this issue can be closed from my side :)

kageurufu commented 11 months ago

For what it's worth, I had this issue with flickering as well. I realized I was excluding all PPU writes, not just vram/oam