ndless-nspire / Ndless

The TI-Nspire calculator extension for native applications
http://ndless.me
830 stars 103 forks source link

8bpp mode not working properly on CX II #262

Open gameblabla opened 3 years ago

gameblabla commented 3 years ago

Made an attempt with Worship Vector by switching it to native 8bpp due to an issue i have with SDL upon exit.

https://github.com/gameblabla/worship-vector/commit/72694a523d8a603d356f60cca0ad22a222ef78e0

When you exit the app, it does it properly without any crashes or freezes. However, the display is... well not displayed properly on it. IMG_20201204_013904

A shame as it is quite a bit faster than 16bpp. I also tried 4bpp with it and obviously, it didn't work properly at all. If you need a precompiled tns, here's one : worship.tns.zip

Vogtinator commented 3 years ago

Yeah, this just isn't implemented yet. For bpp != 16, lcd_init needs to allocate a new buffer, as the magic 0xA8000000 area is unsuitable.

gameblabla commented 3 years ago

Does it actually use the magic 0xA8000000 area ? Because i looked at how lcd_init inits the 8bpp surface and it does seem to allocate a new buffer for the 8bpp surface. https://github.com/ndless-nspire/Ndless/blob/master/ndless/src/resources/syscalls.c#L245

However, i don't see A8000000 anywhere... Either it is using an OS call, it's not actually using it or it's done in a strange, transparent way...