are there any parallax machine code scrolling routines out there?
Re: are there any parallax machine code scrolling routines out there?
Thanks @777
Useful.
Can I suggest you may want to get the basics under your belt before attempting something as advanced as this?
The free book by Jonathan Caldwell on getting started with creating Spectrum games is excellent, and it only assumes that the reader knows the basics of assembly language (at least in the earlier chapters)
https://spectrumcomputing.co.uk/entry/2 ... trum_Games
Darryl Sloan has also produced an excellent PDF along with a YouTube series:
viewtopic.php?p=48652#p48652
I'm never going to be a master machine code author, but both these resources got me to a level I'm content with.
Useful.
Can I suggest you may want to get the basics under your belt before attempting something as advanced as this?
The free book by Jonathan Caldwell on getting started with creating Spectrum games is excellent, and it only assumes that the reader knows the basics of assembly language (at least in the earlier chapters)
https://spectrumcomputing.co.uk/entry/2 ... trum_Games
Darryl Sloan has also produced an excellent PDF along with a YouTube series:
viewtopic.php?p=48652#p48652
I'm never going to be a master machine code author, but both these resources got me to a level I'm content with.
Re: are there any parallax machine code scrolling routines out there?
yeah, ive looked at and used this book
i think i saw some of those videos too...
i started programming the spectrum when i was 8 :-
1 plot rnd*255,rnd*175
2 goto 1
1 plot rnd*255,rnd*175
2 goto 1
Re: are there any parallax machine code scrolling routines out there?
Great @777,
You should be able to write a simple game after reading those two titles.
You should be able to write a simple game after reading those two titles.
Re: are there any parallax machine code scrolling routines out there?
something weird did happen when i tried to put a too high a number into the width poke, which looks like parallax, spooky...
type goto 9900
https://easyupload.io/dplksm
no idea why thats happening...
type goto 9900
https://easyupload.io/dplksm
no idea why thats happening...
i started programming the spectrum when i was 8 :-
1 plot rnd*255,rnd*175
2 goto 1
1 plot rnd*255,rnd*175
2 goto 1
Re: are there any parallax machine code scrolling routines out there?
I have to agree.
If he can't figure out the problem here ...
... then it's too early to try and get a grasp on parallax scrolling777 wrote: ↑Sun Apr 24, 2022 2:12 pmCode: Select all
org 40000 call 3503 ld a,0 start inc a rst 16 jp start
Website: Tardis Remakes / Mostly remakes of Arcade and ZX Spectrum games.
My games for the Spectrum: Dingo, The Speccies, The Speccies 2, Vallation & Sqij.
Twitter: Sokurah
My games for the Spectrum: Dingo, The Speccies, The Speccies 2, Vallation & Sqij.
Twitter: Sokurah
Re: are there any parallax machine code scrolling routines out there?
Absolutely @Sokurah.
Please take these as constructive and supportive comments @777. This is certainly how they are intended.
I get excited when I manage to get a single character UDG moving around the screen!
Maybe look at Boriel BASIC. You get the simplicity of BASIC with the speed of machine code. This runs on a PC but creates Spectrum files.
Also, look at the Softek FP Compiler. That's good fun and accepts most BASIC commands, and also has good documentation:
https://spectrumcomputing.co.uk/entry/8 ... l_Compiler
Re: are there any parallax machine code scrolling routines out there?
Out of interest, where's that from?777 wrote: ↑Wed Apr 27, 2022 2:26 pm something weird did happen when i tried to put a too high a number into the width poke, which looks like parallax, spooky...
type goto 9900
https://easyupload.io/dplksm
no idea why thats happening...
I had a quick look. The BASIC program seems to have 4 POKEs that affects what the code does.
Code: Select all
9921 POKE 58679,0
9922 POKE 58680,64
9923 POKE 58681,50
9924 POKE 58682,100
So it's 0 + (64 * 256) = 16384 (start of screen display).
I think you might want to change this to the position at the end of the row because it's it's scrolling left (though I may have missed something). So try setting them to 31 and 64 (respectively) to put the screen address at the rightmost character of the row.
The third POKE at 9923 seems to be the number of pixel rows to scroll. So you could POKE it to 16 to scroll two full character rows.
The fourth POKE at 9924 is the column row to start at I think [Edit: Sorry, number of columns (counting from the right, as it's scrolling left)]. So if you're scrolling the whole row left, try poking it at 32.
I think that should scroll the top two character rows of the screen. If you POKE too high for the third & fourth parameters, you're possibly to get odd effects.
I reckon you'd have to refine/adapt the routine a bit for a game though (unless it was a Frogger-type game which just scrolls one line at a time). Maybe trying to get the top two character rows scrolling twice as fast as the next two would be a good practice exercise.
My Speccy site: thirdharmoniser.com
Re: are there any parallax machine code scrolling routines out there?
here
https://spectrumcomputing.co.uk/entry/8 ... upercode_3
i put a too high poke in on purpose btw... i understand what the pokes do.
https://spectrumcomputing.co.uk/entry/8 ... upercode_3
i put a too high poke in on purpose btw... i understand what the pokes do.
Last edited by 777 on Wed Apr 27, 2022 4:43 pm, edited 1 time in total.
i started programming the spectrum when i was 8 :-
1 plot rnd*255,rnd*175
2 goto 1
1 plot rnd*255,rnd*175
2 goto 1
Re: are there any parallax machine code scrolling routines out there?
Ah - I see...! There's actually instructions for that in the entry. I guess it's either the "Right to left scroll" or the "Box scroll" option.
The instructions tells you what to POKE - only thing is with routines like this, it doesn't really explain how the routine works, and the code within it.
One thing you could try doing is fire up ZX Spin, launch the debugger and put a breakpoint on the start address (58571). Then then when you GOTO 9900 it'll stop. You can step through the code in the debugger to try to figure out what it's doing.
My Speccy site: thirdharmoniser.com
Re: are there any parallax machine code scrolling routines out there?
@777,
If you are more interested in pre-built routines, take a look here:
https://spectrumcomputing.co.uk/entry/2 ... X_Spectrum
And here:
https://spectrumcomputing.co.uk/entry/2 ... r_Spectrum
Both include scrolling routines.
If you are more interested in pre-built routines, take a look here:
https://spectrumcomputing.co.uk/entry/2 ... X_Spectrum
And here:
https://spectrumcomputing.co.uk/entry/2 ... r_Spectrum
Both include scrolling routines.
Re: are there any parallax machine code scrolling routines out there?
yep, that one works!!!!PeterJ wrote: ↑Wed Apr 27, 2022 4:43 pm
https://spectrumcomputing.co.uk/entry/2 ... r_Spectrum
Both include scrolling routines.
i started programming the spectrum when i was 8 :-
1 plot rnd*255,rnd*175
2 goto 1
1 plot rnd*255,rnd*175
2 goto 1