tschak909, on Sun Mar 11, 2007 5:57 PM, said:
So far the kernel seems to be coming along very nicely, I was finally able to implement a smooth scrolling algorithm by unrolling everything.... but I have some other problems that have come up:
* The first digit for the score is garbled, not sure why.. it's looking like a mangled pointer somehow....
* The scroll completes, then starts at the very beginning again. I suspect this is because i am updating state during overscan.. do I need to move the bounds enforcement (basically the AND), in-kernel?
I am pasting source and a screenshot.. but I'm showing some progress!
attachment
and the current code:
attachment
Until next time!
-Thom
To avoid this sort of variable clashing, I suggest you try the following...
SEG.U variables
ORG $80
; define your variables here
; this is an uninitialised segment -- the assembler will calculate addresses, but create no actual data in the binary
; examples...
GAME_STATUS ds 1 ; 1 byte for this var!
PF1DATA ds 32 ; 32 for this one
PF2DATA ds 32 ; and this
; this allows you to insert/remove variables at will, and resize, without having to recalculate!
; in other words, let the assembler calculate the locations of stuff, you just state how big they are!
SEG code
ORG $F000
; rest of your program here