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

Change screen offset in every scanline #129

Closed
Viza74 opened this issue May 12, 2017 · 1 comment
Closed

Change screen offset in every scanline #129

Viza74 opened this issue May 12, 2017 · 1 comment
Assignees
Labels
enhancement Improvement of existing feature or adding something new
Milestone

Comments

@Viza74
Copy link

Viza74 commented May 12, 2017

I see that in 0.24 the background color can be changed in the scanline function which is nice (copperbars FTW :) )
It would be nice to be able to also change the screen offset (0x3FF9) in every scanline for some king of glitch effect, or maybe scroll-out-scroll-in screen changes.

@nesbox nesbox self-assigned this May 23, 2017
@nesbox nesbox added the enhancement Improvement of existing feature or adding something new label May 23, 2017
@nesbox nesbox added this to the 0.25.0 milestone May 23, 2017
@nesbox
Copy link
Owner

nesbox commented May 24, 2017

shake=0
d=4
function TIC()
	if btnp()~=0 then shake=30 end
	if shake>0 then
		poke(0x3FF9+1,math.random(-d,d))
		shake=shake-1		
		if shake==0 then memset(0x3FF9,0,2) end
	end
	cls(12)
	print("PRESS ANY KEY TO GLITCH!",54,64)
end

function scanline(row)
	if shake>0 then
		poke(0x3FF9,math.random(-d,d))		
	end
end

glitch

done in .25

@nesbox nesbox closed this as completed May 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvement of existing feature or adding something new
Projects
None yet
Development

No branches or pull requests

2 participants