A.D.A. Amiga Demoscene Archive

        Welcome guest!

  

  

  

log in with SceneID

  

Demos Amiga Demoscene Archive Forum / Coding / Vertical Sprite Scroller driving me crazy

 

Author Message
fedhex
Member
#1 - Posted: 25 Oct 2017 23:59
Reply Quote
I was trying to do a Vertical Sprite Scroller which at first seemed to be an easy task until i hit the wall with the scrolling part well it scrolls but as soon as it hits 1a on my monitor it restarts even though ive set s8 & e8 in the 3rd control byte works fine in PAL area but the top is another story .. Ive tried waiting for sprpos and also beampos but nothing works ... Help please :)
noname
Member
#2 - Posted: 27 Oct 2017 21:16
Reply Quote
Didn't you previously open another thread with a similar non-question and then have it removed when you found the solution without sharing it?

What do you expect people to reply here? Magical spoon fed solution? If you'd be more precise with your problem description, maybe people could possibly reply, if they wanted. Also, have you checked the hardware reference manual?
fedhex
Member
#3 - Posted: 27 Oct 2017 23:17
Reply Quote
I'm sorry i was not aware of my previous message didnt contain a question. And yes i had it removed since i fixed the bug comming back to asm after so many years comes with some hickups ! i dont expect spoon feeding either since im not a baby :) i would not write in here without checking HRM or any of my other informative links I did try to describe my issue best as possible but i guess i was not clear enough ...

My current issue lies in setting the bit to expand the area of sprites movement which is >255 those bits are surposed to be set in the 3rd control byte of the Sprite, they are S8 and H8 ( Bit 1 and 2 ) ofcourse you can't just put the Sprite anywhere on screen with the bits set they have to be set in the right place so in the middle of the screen they are not set while when overlapping pal area they have to be set for set area and they work fine in PAL which means that they are set however if i use same way to set them in top it does not work i can not scroll beyond $1a if i do so the hole sprite simply disapears and resets in PAL this is ofcourse not so good when dealing with a tall sprite considering i plot 10 letters in each sprite so my textfield is 8x10 chars ..

So my question is .. When do i set the bits for the top of the screen ? doing it in PAL is easy considering i can just do on the first line of the PAL area . And if i set the bit to early well then ofcourse there is no sprite...

Again sorry if i was not clear enough ...
LaBodilsen
Member
#4 - Posted: 28 Oct 2017 21:45
Reply Quote


post 9 might be the answer to your problem.

regards
LaBodilsen
Member
#5 - Posted: 28 Oct 2017 21:46
Reply Quote
fedhex
Member
#6 - Posted: 29 Oct 2017 10:18
Reply Quote
Ah thx i will have a looksy later on when my 2 year old is having a nap :) not much time coding durring the weekend because its his time. Cheers
fedhex
Member
#7 - Posted: 30 Oct 2017 12:03 - Edited
Reply Quote
I tried that approach but it didnt really work for me ... I will include a code snippet so you can check for any wrongdoings ...

Scroll_Spr:

move.w #0, d0 ; High bits
move.w SPR_Hstart, d1 ; X
move.w SPR_Vstart, d2 ; Y

subi.w #1, d2 ; Vertical scroll up

cmpi.w #255-16*2, d2 ; SPR_h PAL check
bls no_9th_bit ; <= 255-Sprite height

move.b #%00000010, d0 ; Set EV8 Vstop bit

cmpi.w #255, d2 ; PAL start
bls no_9th_bit ; <= 255

move.b #%00000110, d0 ; Set SV8&EV8 Vstart,Vstop bits

cmpi.w #313, d2 ; PAL stop
bls no_9th_bit ; <= 313 highest visible line+1

move.w #312, d2 ; Vstart reset position

no_9th_bit

move.w d2, SPR_Vstart
move.w d2, d3
addi.w SPR_Vstop, d3 ; Calculate Vstop

move.b d2, (a1) ; Set VPOS
move.b d1, 1(a1) ; Set HPOS
move.b d3, 2(a1) ; Set VSTOP
move.b d0, 3(a1) ; Set Control bits.

rts

SPR_Hstart: dc.w 135
SPR_Vstart: dc.w 312 ; 28-312
SPR_Vstop: dc.w 32


It works fine if sprite has 16 height but i need it for a text scroller needless to say it will be somewhat big sprites ..

 

  Please log in to comment

  

  

  

 

A.D.A. Amiga Demoscene Archive, Version 3.0