* WalrusIRC

You need to have 5 posts and not be part of restricted usergroups in order to use the WalrusIRC embedded shoutbox. However, you can also access our IRC channel called #CodeWalrus via EFnet.

Author Topic: SDL/n2DLib ports for TI Nspire  (Read 47472 times)

0 Members and 1 Guest are viewing this topic.

Offline xlibman

  • Omni founder & CW co-founder
  • CodeWalrus Staff
  • Super User
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 18622
  • Post Rating Ratio: +95/-4
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • DJ Omnimaga music store
  • Gender: Male
Re: SDL/n2DLib ports for TI Nspire
« Reply #345 on: December 13, 2016, 11:00:59 pm »
Hm I see. Too bad the speed can't get faster, but again the Jaguar hardware is probably not the easiest to emulate, especially not on a calculator. Good job getting this to work so far :3=
  • Calculators owned: TI-57, 73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)

Offline matrefeytontias

  • Full User
  • Join Date: Nov 2014
  • Location: France
  • Posts: 200
  • Post Rating Ratio: +5/-1
  • Axe metalhead of vengence
    • @matrefeytontias
    • matrefeytontias
    • matrefeytontias
  • Gender: Male
Re: SDL/n2DLib ports for TI Nspire
« Reply #346 on: December 14, 2016, 12:06:08 am »
Nice job on all of those. Again, I'm always happy to see when n2DLib comes in handy to someone.

What's the issue with color masking again ?
  • Calculators owned: TI-83+.fr, TI-Nspire CAS prototype, TI-84+ CSE, TI-Nspire CX
My TI games (some got their own article on non-calc websites !) : http://www.ticalc.org/archives/files/authors/112/11202.html

My moozik (100% free metal) : http://www.soundcloud.com/matrefeytontias

Offline gameblabla

  • Super User
  • Join Date: May 2015
  • Location:
  • Posts: 723
  • Post Rating Ratio: +14/-6
  • TI-nspire porter
Re: SDL/n2DLib ports for TI Nspire
« Reply #347 on: December 14, 2016, 02:46:37 pm »
Nice job on all of those. Again, I'm always happy to see when n2DLib comes in handy to someone.
What's the issue with color masking again ?
The problem is that there is no easy way to set a color mask with n2DLib.
(without manually attacking the buffer)

Virtual Jaguar uses a color mask to make the framebuffer look right.
Without it, it looks wrong;
It's implemented as such in vj :
Code: [Select]
surface = SDL_CreateRGBSurface(SDL_SWSURFACE, width, height, 16, 0x7C00, 0x03E0, 0x001F, 0);
How could i set a color mask in the buffer ? Any ideas ?
  • Calculators owned: TI Nspire CX, TI-89

Offline matrefeytontias

  • Full User
  • Join Date: Nov 2014
  • Location: France
  • Posts: 200
  • Post Rating Ratio: +5/-1
  • Axe metalhead of vengence
    • @matrefeytontias
    • matrefeytontias
    • matrefeytontias
  • Gender: Male
Re: SDL/n2DLib ports for TI Nspire
« Reply #348 on: December 14, 2016, 07:28:13 pm »
You indeed have to touch the image buffer, which isn't a big deal, really. It's basically the same as setting the member of the struct, just with no name on it :P This would work for you.

Code: [Select]
inline void setColorKey(unsigned short *src, unsigned short key)
{
    src[2] = key;
}

EDIT : oh wait, you meant a color mask, not a color key. Well that's a bit hard indeed. I didn't have any plan for that since the TI-Nspire screen is R5G6B5, so that would require extra conversion which would be pretty horribly slow anyway ... I think the best solution for you is to write your own updateScreen() based off the existing one. Instead of simply copying the bits, just mask the data using some R5G6B5 to and from RGB transformations (just a couple of bitshifts). But if it is on a per-image basis, then yeah I'm not really sure how to do that except by re-filling the same buffer with the new data (which won't be displayed correctly on-screen by the normal updateScreen() anyway).
« Last Edit: December 14, 2016, 07:32:09 pm by matrefeytontias »
  • Calculators owned: TI-83+.fr, TI-Nspire CAS prototype, TI-84+ CSE, TI-Nspire CX
My TI games (some got their own article on non-calc websites !) : http://www.ticalc.org/archives/files/authors/112/11202.html

My moozik (100% free metal) : http://www.soundcloud.com/matrefeytontias

Offline gameblabla

  • Super User
  • Join Date: May 2015
  • Location:
  • Posts: 723
  • Post Rating Ratio: +14/-6
  • TI-nspire porter
Re: SDL/n2DLib ports for TI Nspire
« Reply #349 on: December 14, 2016, 07:30:11 pm »
You indeed have to touch the image buffer, which isn't a big deal, really. It's basically the same as setting the member of the struct, just with no name on it :P This would work for you.
Code: [Select]
inline void setColorKey(unsigned short *src, unsigned short key)
{
    src[2] = key;
}
Well, thank you for the function. I did without it tho, it turns out it was just expecting the buffer to be 15-bits so i converted it to 16-bits.
  • Calculators owned: TI Nspire CX, TI-89

Offline gameblabla

  • Super User
  • Join Date: May 2015
  • Location:
  • Posts: 723
  • Post Rating Ratio: +14/-6
  • TI-nspire porter
Re: SDL/n2DLib ports for TI Nspire
« Reply #350 on: April 04, 2017, 07:56:30 pm »
Here's Alterego, a NES homebrew game, ported to the TI Nspire thanks to the bitbox  port done by Makapuf.


It's not the NES game running on an emulator, it's the game running natively (through a bitbox wrapper interface).
https://github.com/gameblabla/bitbox-alterego-nspire/raw/master/bitbox-alterego-game/alterego.tns
« Last Edit: April 04, 2017, 08:02:03 pm by gameblabla »
  • Calculators owned: TI Nspire CX, TI-89

Offline xlibman

  • Omni founder & CW co-founder
  • CodeWalrus Staff
  • Super User
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 18622
  • Post Rating Ratio: +95/-4
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • DJ Omnimaga music store
  • Gender: Male
Re: SDL/n2DLib ports for TI Nspire
« Reply #351 on: April 09, 2017, 04:17:06 pm »
That looks great and fun! Good job gameblabla on the port. :3=
  • Calculators owned: TI-57, 73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)

Offline gameblabla

  • Super User
  • Join Date: May 2015
  • Location:
  • Posts: 723
  • Post Rating Ratio: +14/-6
  • TI-nspire porter
Re: SDL/n2DLib ports for TI Nspire
« Reply #352 on: April 09, 2017, 06:19:49 pm »
That looks great and fun! Good job gameblabla on the port. :3=
Thx dude :3
I could make it run faster but i didn't want to break compatibility with CR4+ hardware revisions so i didn't.
I need to work on a better n2Dlib that uses the lcd_blit API properly. (Pom1 only supports it partially)

Critor wrote about it here :
https://tiplanet.org/forum/viewtopic.php?t=19820&p=215232#p215232

Thanks as always critor, even though interest in TI-Nspire software has significantly dropped since a few years ago.
  • Calculators owned: TI Nspire CX, TI-89

Offline critor

  • Full User
  • Join Date: Dec 2014
  • Location:
  • Posts: 187
  • Post Rating Ratio: +6/-0
Re: SDL/n2DLib ports for TI Nspire
« Reply #353 on: April 10, 2017, 01:06:55 pm »
Thanks as always critor
You're welcome. :)

even though interest in TI-Nspire software has significantly dropped since a few years ago.
I'd rather say interest in TI-Nspire games.
The situation is different on other calculators though, like the TI-84 Plus CE.

Offline xlibman

  • Omni founder & CW co-founder
  • CodeWalrus Staff
  • Super User
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 18622
  • Post Rating Ratio: +95/-4
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • DJ Omnimaga music store
  • Gender: Male
Re: SDL/n2DLib ports for TI Nspire
« Reply #354 on: April 10, 2017, 04:52:42 pm »
Yeah I think the constant battle between TI vs Ndless didn't help. The same thing happened with the constant battle between the 68K community vs a certain 68K programmer that shall remain unnamed. It only take one person or organization to alienate everyone else.
  • Calculators owned: TI-57, 73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)

 


You can also use the following HTML or bulletin board code to share it on your page or forum signature!


Also do not forget to check our affiliates below.
Planet Casio TI-Planet Calc.news BroniesQC BosaikNet Velocity Games