psycopathicteen wrote:
tepples wrote:
[Soft sprite scaling is] certainly doable, seeing as
I did it in real time on the NES.
can you post the LUT you used for scaling on the NES?
It's the output of
tools/mkscaletable.py in the demo's source code. In case you don't have Python, I've uploaded it here. You can scale each half of a 16x16 with this table, and then you can use the multiplier to shift the right half left several bits depending on the scale factor.
16 to 16, if you're not special casing it: use 8to8 (identity) table, multiply right side by $01
16 to 15: use 8to8 table, multiply right side by $02
16 to 14: use 8to7 table, multiply right side by $02
16 to 13: use 8to7 table, multiply right side by $04
16 to 12: use 8to6 table, multiply right side by $04
16 to 11: use 8to6 table, multiply right side by $08
16 to 10: use 8to5 table, multiply right side by $08
16 to 9: use 8to5 table, multiply right side by $10
16 to 8: use 8to4 table, multiply right side by $10