r/NESDEV • • Oct 29 '26

how do you do mid scanline scroll changeing

i programe in NESASM and everything has been EXTREMELY easy so far and iv made a few quick simple demos but iv been wondering how to do scanline detection and stuff so today iv actually been trying but i couldnt get it to work, can someone explain how you actually do it

8 Upvotes

6 comments sorted by

2

u/xXgreeneyesXx Oct 29 '26

basically, you have three choices:
Sprite 0 hit, which you can only do once a frame
Mapper based timers, which add in a scanline or clock cycle counter
Just, time it really well, each instruction takes a set amount of time, if you count your cycles really good, you can just, time it out. but uh. thats hard. thats really really hard.

1

u/TheCatInJapan Oct 29 '26

how do you use sprite 0 hit as iv tried it but so far got nothing sucsesfull to work :<

1

u/xXgreeneyesXx Oct 29 '26

lookat the PPU OAM page on the nesdev wiki

1

u/puke7 Oct 31 '26

these are all correct answers šŸŽ‰

1

u/Personal-Ad-487 Oct 29 '26

I’m definitely not a pro, but have you tried using Sprite 0 hit?

1

u/Calm-School-6270 Oct 29 '26

Yep Sprite Zero hit is the best bet.