;accel flippers
;0 -> 1 -> 3 -> 6 -> 10 -> 14 (15 frames-1)
;==> max skip = 4.

;----------------------------------------------------------------------------------------------
;fixing display bugs ideas
;
;--WRONG, WOULD NEED $9e80-$9fff also!!!-- we can use $bc00-$bfff, $8000-$9000 for the bottom bitmap
;we can use $7c00,$7fff, $4000-$6000 for the middle bitmap
;
;->> we need 3 bitmaps, so we cannot use $0000-$1fff offset (see above)
; -> we have to use $2000-$4000 offset
; -> bitmaps at $6000-$7fff
;               $a000-$bfff
;               $e000-$ffff, $d000-$e000 flipper sprites + 4 blocks display grid?
;                            $c000-$d000 4 blocks display grid + 4 blocks display sprites
;right now one bitmap at $a000,$8c00   -> $a000,$8c00 (colors have to stay out of $9000-$9fff)
;          2nd        at $c000,$e000   -> $e000,$cc00
;          3rd        at $6000,$5c00   -> $6000,$4c00

;---------------------------------------------------------------------------------------------


;-----------------------------------------------------------------------------------------------
;spin system concept :
;
;add friction force parallel to wall according to :
; 1 -> determine in which direction along the wall the force should be
;      how>?!
;      -> multiply |V| to get |speed parallel to wall|
;      -> add/substract spin
;      -> check if result is positive/negative
;
; 2 -> add speed to ball speed, based on
;      : normal speed (g-force) & surface properties (asl/rol)
;      -> transform normal speed parallel to wall (dont really have to do this, just swap x/y and add - later)
;        -> (xco -> -yco , yco -> xco)
;      -> substract static friction in the right direction
;      -> asl/rol to take surface prop. into account
;      -> add to speed
;
; 3 -> change spin
;-----------------------------------------------------------------------------------------------


; ---------------------
; - program schematic -
; ---------------------
;
;  tableinit  ;initialise all values, copy memory, etc
;
;    loop
;      |- ball movement
;      |   \- calculate new direction caused by gravity (use gravity map!)
;      |   |- calculate friction & adjust ball spin
;      |   |- move ball untill collison or timeout (distance/speed)
;      |        \-  if collision -> calc new direction & continue moving the ball
;      |
;      |- do pinball (lights/score)
;      |
;      |
;  /\  |
;   |--|- loop

;bitmap screens memory-map
;
;bitmap 0  1  2
;
;line   0(25)50
;       1 26 51
;       2 27 52
;       3 28 53
;       4 29 54
;       5 30 55
;       6 31 56
;       7 32 57
;       8 33 58
;       9 34 59
;      10 35 60
;      11 36 61
;      12 37 62
;      13 38 63
;      14 39     room for flipper animations
;      15 40
;      16 41
;      17 42
;      18 43
;      19 44
;      20 45
;      21 46
;      22 47
;      23 48
;      24 -- 49
;      --(25)
;
;membitmap $0000-$1f40 -> bitmap 0 $6000...$7f40 (rest $c0 bytes filled with 3 sprites for the ball)
;
;membitmap $2000-$3e80 -> bitmap 1 $a000...$be80   ;bac0-bb80 sprites?!
;membitmap $1f40-$2000 -> bitmap 1 $bf40...$c000
;
;membitmap $3e80-$4000 -> bitmap 2 $de80...$e000
;membitmap $4000-$5000 -> bitmap 2 $c000...$d000
;                         $1000...$1e80 -> flipper sprites == 28 sprites
;
;total mem used : 25+25+20=64 rows == 80 blocks
;

;--------------------------------------------------------------------------
;-Dot matrix display requires the following memory (all VIC-bank relative)-
;--------------------------------------------------------------------------
;lda #$55
;sta $39ff
;sta $3fff
;.repeat 32,I
;        sta $0000+I*8+7
;        sta $0100+I*8+7
;        sta $0800+I*8+7
;        sta $0900+I*8+7
;        sta $1000+I*8+7
;        sta $1100+I*8+7
;        sta $1800+I*8+7
;        sta $1900+I*8+7
;.endrep
;Plus one screen with 8 bytes holding the sprite pointers

