Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mode 7 M7VOFS latching test (for reference) #274

Open
paulb-nl opened this issue May 6, 2021 · 2 comments
Open

Mode 7 M7VOFS latching test (for reference) #274

paulb-nl opened this issue May 6, 2021 · 2 comments

Comments

@paulb-nl
Copy link
Contributor

paulb-nl commented May 6, 2021

I have modified the mode 7 tutorial from https://wiki.superfamicom.org/mode-7-scaling to write to M7VOFS in an HV-IRQ to see when the write takes effect.

If the write is on time then there is a black line above the second row of colored squares like so:
20210506_095613-mode7_bra_nops83_x2

There are different versions of the test slowrom/fastrom and bra and wai. The bra ones wait for the interrupt in an infinite loop.

-:
lda $10
bra -

mode7_tests.zip

The test starts with interrupt H: 0, V:36. Press the L/R buttons to decrement/increment the H value. Press select to reset everything.
Below are the results. The number is the value of the H-IRQ.

SNES APU-01, 1-CHIP-01 with Everdrive:

wai_nops83           1 flicker
wai_nops95_fastrom   3  flicker
wai_nops96_fastrom   1 is too late (no flicker)
bra_nops82           1-6 flicker
bra_nops83           0-3 flicker
bra_nops95_fastrom   1-5 flicker
bra_nops96_fastrom   0-2 flicker

MiSTer with commit a04ac87:

wai_nops83           4 flicker
wai_nops95_fastrom   6 flicker
wai_nops96_fastrom   3 flicker
bra_nops82           6-10 flicker
bra_nops83           2-7 flicker
bra_nops95_fastrom   4-9 flicker
bra_nops96_fastrom   1-6 flicker

Here is an example video of bra_nops_82 on an APU-01 SNES. It starts with the write on time and then I press R 7 times until it stops flickering so the line flickers at H-IRQ 1-6.

2021-05-04.16-08-48.mov
@srg320
Copy link
Collaborator

srg320 commented May 7, 2021

Thanks @paulb-nl.
With your tests I determined the right time by latching Mode 7 registers, which is H_CNT = 11. With this time also no glitches in Super Mario World.

I'm not a fan of adjusting the values for specific games/tests, but I don't see any other option at the moment.

@paulb-nl
Copy link
Contributor Author

paulb-nl commented May 7, 2021

Thanks @srg320. The timings are very close now. These are the results with latching at H_CNT 11:

wai_nops83          1 flicker
wai_nops95_fastrom  3  flicker
wai_nops96_fastrom  0 flicker
bra_nops82           3-7 flicker
bra_nops83           0-4 flicker
bra_nops95_fastrom  1-6 flicker
bra_nops96_fastrom  0-3 flicker

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants