diff options
author | Toad King | 2012-06-17 23:29:15 -0400 |
---|---|---|
committer | Toad King | 2012-06-17 23:29:15 -0400 |
commit | 3d94ab02be6a35c5551f2850252c4d873c086c6e (patch) | |
tree | 54a719dc9742f8dd508e070be3d735a43ebfb938 /src | |
parent | 207e18f698eed8a963485fa409d3757df26e0b0c (diff) | |
download | snes9x2002-3d94ab02be6a35c5551f2850252c4d873c086c6e.tar.gz snes9x2002-3d94ab02be6a35c5551f2850252c4d873c086c6e.tar.bz2 snes9x2002-3d94ab02be6a35c5551f2850252c4d873c086c6e.zip |
color accuracy update
some colors (like battle menus in SMRPG) are still corrupted, need to look into it more
Diffstat (limited to 'src')
-rw-r--r-- | src/rops.h | 72 |
1 files changed, 23 insertions, 49 deletions
@@ -5,35 +5,25 @@ Raster Operations macros */ +#define ROP_CLEARTOP(a) \ + " bic " #a ", " #a ", #0b01000000000000000 \n" // ------------- // RGB_555 // a.red = a.red - b.red // a.blue = a.blue - b.blue // a.green = a.green - b.green -/* -#define ROP_SUB(a, b) \ - " bics " #b ", " #b ", #0b00000100000100000 \n"\ - " orr " #a ", " #a ", #0b00000100000100000 \n"\ - " orr " #a ", " #a ", #0b10000000000000000 \n"\ - " sub " #a ", " #a ", " #b " \n"\ - " tst " #a ", #0b00000000000100000 \n"\ - " biceq " #a ", " #a ", #0b00000000000011111 \n"\ - " tst " #a ", #0b00000100000000000 \n"\ - " biceq " #a ", " #a ", #0b00000011111100000 \n"\ - " tst " #a ", #0b10000000000000000 \n"\ - " biceq " #a ", " #a ", #0b01111100000000000 \n" -*/ #define ROP_SUB(a, b) \ " bics " #b ", " #b ", #0b00000010000100000 \n"\ " beq 999f \n"\ " orr " #a ", " #a ", #0b00000010000100000 \n"\ - " orr " #a ", " #a ", #(1 << 31) \n"\ - " subs " #a ", " #a ", " #b " \n"\ - " bicpl " #a ", " #a ", #0b00111110000000000 \n"\ - " tst " #a ", #0b00000000000100000 \n"\ + " orr " #a ", " #a ", #(1 << 31) \n"\ + " sub " #a ", " #a ", " #b " \n"\ + " tst " #a ", #0b00000000000100000 \n"\ " biceq " #a ", " #a ", #0b00000000000011111 \n"\ - " tst " #a ", #0b00000010000000000 \n"\ + " tst " #a ", #0b00000010000000000 \n"\ " biceq " #a ", " #a ", #0b00000001111100000 \n"\ + " tst " #a ", #0b01000000000000000 \n"\ + " bicne " #a ", " #a ", #0b01111110000000000 \n"\ "999:\n" @@ -43,25 +33,6 @@ // a.red = (a.red - b.red) / 2 // a.blue = (a.blue - b.blue) / 2 // a.green = (a.green - b.green) / 2 -/* -#define ROP_SUB1_2(a, b) \ - " movne " #a ", " #a ", lsr #1 \n"\ - " bicne " #a ", " #a ", #0b00000010000010000 \n"\ - " movne " #b ", " #b ", lsr #1 \n"\ - " bicne " #b ", " #b ", #0b00000010000010000 \n"\ - \ - " bic " #b ", " #b ", #0b00000100000100000 \n"\ - " orr " #a ", " #a ", #0b00000100000100000 \n"\ - " orr " #a ", " #a ", #0b10000000000000000 \n"\ - " sub " #a ", " #a ", " #b " \n"\ - " tst " #a ", #0b00000000000100000 \n"\ - " biceq " #a ", " #a ", #0b00000000000011111 \n"\ - " tst " #a ", #0b00000100000000000 \n"\ - " biceq " #a ", " #a ", #0b00000011111100000 \n"\ - " tst " #a ", #0b10000000000000000 \n"\ - " biceq " #a ", " #a ", #0b01111100000000000 \n" -*/ - #define ROP_SUB1_2(a, b) \ " movne " #a ", " #a ", lsr #1 \n"\ " bicne " #a ", " #a ", #0b00000001000010000 \n"\ @@ -69,15 +40,16 @@ " bicne " #b ", " #b ", #0b00000001000010000 \n"\ \ " bics " #b ", " #b ", #0b00000010000100000 \n"\ - " beq 999f \n"\ + " beq 999f \n"\ " orr " #a ", " #a ", #0b00000010000100000 \n"\ - " orr " #a ", " #a ", #(1 << 31) \n"\ + " orr " #a ", " #a ", #(1 << 31) \n"\ " subs " #a ", " #a ", " #b " \n"\ - " bicpl " #a ", " #a ", #0b00111110000000000 \n"\ - " tst " #a ", #0b00000000000100000 \n"\ + " tst " #a ", #0b00000000000100000 \n"\ " biceq " #a ", " #a ", #0b00000000000011111 \n"\ - " tst " #a ", #0b00000010000000000 \n"\ + " tst " #a ", #0b00000010000000000 \n"\ " biceq " #a ", " #a ", #0b00000001111100000 \n"\ + " tst " #a ", #0b01000000000000000 \n"\ + " bicne " #a ", " #a ", #0b01111110000000000 \n"\ "999:\n" @@ -91,12 +63,13 @@ " beq 999f \n"\ " bic " #a ", " #a ", #0b00000010000100000 \n"\ " add " #a ", " #a ", " #b " \n"\ - " tst " #a ", #0b00000000000100000 \n"\ + " tst " #a ", #0b00000000000100000 \n"\ " orrne " #a ", " #a ", #0b00000000000011111 \n"\ - " tst " #a ", #0b00000010000000000 \n"\ + " tst " #a ", #0b00000010000000000 \n"\ " orrne " #a ", " #a ", #0b00000001111100000 \n"\ - " tst " #a ", #0b01000000000000000 \n"\ + " tst " #a ", #0b01000000000000000 \n"\ " orrne " #a ", " #a ", #0b00111110000000000 \n"\ + ROP_CLEARTOP(a) \ "999:\n" // ------------- @@ -112,12 +85,13 @@ " bicne " #b ", " #b ", #0b00000100001000000 \n"\ " add " #a ", " #a ", " #b " \n"\ " movne " #a ", " #a ", lsr #1 \n"\ - " tst " #a ", #0b00000000000100000 \n"\ + " tst " #a ", #0b00000000000100000 \n"\ " orrne " #a ", " #a ", #0b00000000000011111 \n"\ - " tst " #a ", #0b00000010000000000 \n"\ + " tst " #a ", #0b00000010000000000 \n"\ " orrne " #a ", " #a ", #0b00000001111100000 \n"\ - " tst " #a ", #0b01000000000000000 \n"\ - " orrne " #a ", " #a ", #0b00111110000000000 \n" + " tst " #a ", #0b01000000000000000 \n"\ + " orrne " #a ", " #a ", #0b00111110000000000 \n"\ + ROP_CLEARTOP(a) typedef struct { |