View Single Post
Old 24 March 2024, 21:03   #17
a/b
Registered User
 
Join Date: Jun 2016
Location: europe
Posts: 1,050
Yeah, BPLCON1 ($dff102).
1px scroll? Change x by +/-1.
x=-17 => $102 = $000f, $0e0/$0e2 = bpl_ptr1-4, $0e8/$0ea = bpl_ptr3-4, $0f0/$0f2 = bpl_ptr5-4
x=-16 => $102 = $0000, $0e0/$0e2 = bpl_ptr1-2, $0e8/$0ea = bpl_ptr3-2, $0f0/$0f2 = bpl_ptr5-2
...
x=-2 => $102 = $000e, $0e0/$0e2 = bpl_ptr1-2, $0e8/$0ea = bpl_ptr3-2, $0f0/$0f2 = bpl_ptr5-2
x=-1 => $102 = $000f, $0e0/$0e2 = bpl_ptr1-2, $0e8/$0ea = bpl_ptr3-2, $0f0/$0f2 = bpl_ptr5-2
x=0 => $102 = $0000, $0e0/$0e2 = bpl_ptr1+0, $0e8/$0ea = bpl_ptr3+0, $0f0/$0f2 = bpl_ptr5+0
x=1 => $102 = $0001, $0e0/$0e2 = bpl_ptr1+0, $0e8/$0ea = bpl_ptr3+0, $0f0/$0f2 = bpl_ptr5+0
...
x=15 => $102 = $000f, $0e0/$0e2 = bpl_ptr1+0, $0e8/$0ea = bpl_ptr3+0, $0f0/$0f2 = bpl_ptr5+0
x=16 => $102 = $0000, $0e0/$0e2 = bpl_ptr1+2, $0e8/$0ea = bpl_ptr3+2, $0f0/$0f2 = bpl_ptr5+2
... etc.

2px scroll => change x by +/-2, use the same calcs..
Since you are only scrolling playfield1 you only set $dff102 bits 0-3 and leave bits 4-7 at 0. To scroll everything you also set bits 4-7 (e.g. $0011, $0022, ... $00ff), this is a difference from my first post.
a/b is offline  
 
Page generated in 0.04321 seconds with 11 queries