#7956 - funkeejeffou - Sun Jun 29, 2003 1:00 pm
Let's say that I store in RAM 16 bit negative numbers like :
if I load it's value to a register like this :
then r1 = 0x0000FFFF = 65535 and not -1 !!!
That's annoying me a little bit and I'd like to figure out a fast way to load 8 or 16 bits variable into a register.
I thought about doing this for 16 bit variables(would be the same for 8bits with 24 shifts):
so that the upper bits will be fixed, but it's kinda slow...
Anybody has a suggestion ?
I also have another problem, my code works fine on VisualBoy but some graphic bugs occurs on harware (my bitmaps wich are stored in ROM are buggy when reaching the last pixels).
Since I'm using Goldroad, must I patch the rom?
I'm also suspecting the F2A config; the fixdata an 32K options are unfamiliar to me...
How do you burn in the right way a ROM?
Help will be much and much appreciated.
Code: |
variable
@DCW 0xFFFF ;this equals -1 |
if I load it's value to a register like this :
Code: |
mov r0, variable
ldrh r1, [r0] |
That's annoying me a little bit and I'd like to figure out a fast way to load 8 or 16 bits variable into a register.
I thought about doing this for 16 bit variables(would be the same for 8bits with 24 shifts):
Code: |
mov r1, r1 lsl#16
mov r1, r1 asr#16 |
Anybody has a suggestion ?
I also have another problem, my code works fine on VisualBoy but some graphic bugs occurs on harware (my bitmaps wich are stored in ROM are buggy when reaching the last pixels).
Since I'm using Goldroad, must I patch the rom?
I'm also suspecting the F2A config; the fixdata an 32K options are unfamiliar to me...
How do you burn in the right way a ROM?
Help will be much and much appreciated.