Jump to content

witchspace's Photo

witchspace

Member Since 10 Jan 2017
OFFLINE Last Active Feb 4 2017 4:40 AM

Topics I've Started

Atari ST GEM-to-hardware palette mapping

Tue Jan 24, 2017 1:33 AM

So I recently played around with GEM on Atari ST a bit, and palette setting, and (re-) discovered this weird mapping between GEM/VDI and hardware color mappings:

unsigned vdi_color_map[16] = { 0, 15, 1, 2, 4, 6, 3, 5, 7, 8, 9, 10, 12, 14, 4, 13 };

Asking GEM VDI to draw a line, v_line with vsl_color 15 would give you a line in... color 13!

 

I don't understand why they would do this. I really don't. Besides being confusing (it took me a while to figure out what was happening). It seems like a waste of resources, which was even more important on old, slow hardware. Why not just remap the palette?

 

There may be some really interesting reason I'm missing.

 

In any case I found this a curious old bit of computing history icon_smile.gif

 

Edit: sorry@moderator this probably belongs better here: https://atariage.com...on-programming/