We're on Discord! Please join our server now if you don't want to miss anything! (More info) | Join the UCC4 contest! (More info)

* WalrusIRC & Discord main room

If you have a forum account, have more than 4 posts and are not part of a restricted usergroup, then you can chat in our main Discord server room directly from here and continue using the forums at the same time. Or you can join our server directly and access many more discussion rooms!

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

0 Members and 1 Guest are viewing this topic.

Offline xlibman

  • Omni founder & CW co-founder
  • CodeWalrus Staff
  • Super User
  • Moderator
  • Forum Maintenance
  • Original 5
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 19085
  • Post Rating Ratio: +101/-5
    • 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-84 Plus C Silver Edition, TI-84 Plus CE, Casio fx-CG10
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nintendo Switch, Playstation TV

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: 816
  • Post Rating Ratio: +15/-7
  • 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: 816
  • Post Rating Ratio: +15/-7
  • 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: 816
  • Post Rating Ratio: +15/-7
  • 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
  • Moderator
  • Forum Maintenance
  • Original 5
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 19085
  • Post Rating Ratio: +101/-5
    • 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-84 Plus C Silver Edition, TI-84 Plus CE, Casio fx-CG10
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nintendo Switch, Playstation TV

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

Offline gameblabla

  • Super User
  • Join Date: May 2015
  • Location:
  • Posts: 816
  • Post Rating Ratio: +15/-7
  • 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: 206
  • 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
  • Moderator
  • Forum Maintenance
  • Original 5
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 19085
  • Post Rating Ratio: +101/-5
    • 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-84 Plus C Silver Edition, TI-84 Plus CE, Casio fx-CG10
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nintendo Switch, Playstation TV

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

Offline gameblabla

  • Super User
  • Join Date: May 2015
  • Location:
  • Posts: 816
  • Post Rating Ratio: +15/-7
  • TI-nspire porter
Re: SDL/n2DLib ports for TI Nspire
« Reply #355 on: June 05, 2018, 11:11:07 pm »
Erm..;back somewhat.
I have updated Oswan : it is now compatible with all TI-Nspires : greyscale, CX, CR-4 hardware+ etc...
On firebird; it seems to run somewhat faster than it did on real hardware but i was not able to confirm this yet.
As usual; first post for download.

Let me know if this works properly on your side
  • Calculators owned: TI Nspire CX, TI-89

Offline gameblabla

  • Super User
  • Join Date: May 2015
  • Location:
  • Posts: 816
  • Post Rating Ratio: +15/-7
  • TI-nspire porter
Re: SDL/n2DLib ports for TI Nspire
« Reply #356 on: June 12, 2018, 08:14:39 pm »
After improving my GCW0 port, porting it to the RS-97, i managed to port it to the Nspire too.
A lot of code got stripped : Menu, sound, joystick, config files etc... That allowed me to push more aggressive optimisations than it would allow by default such as decreased size, no rtti, no exceptions etc... A lot of work :P

It works on Firebird so it should work on real hardware too. Sadly i don't have my Nspire with me rn so please try it on your side if possible.
Of  course, you do need the outrun rom files. Extract them in a folder called "roms" and put that tns file relative to that folder.



https://tiplanet.org/forum/archives_voir.php?id=1569330

It's somewhat slow so overc*** your calc if possible.
I admit i haven't tried to switch it to n2DLib yet. That'll come with time i suppose.
« Last Edit: June 12, 2018, 08:31:47 pm by gameblabla »
  • Calculators owned: TI Nspire CX, TI-89

Offline critor

  • Full User
  • Join Date: Dec 2014
  • Location:
  • Posts: 206
  • Post Rating Ratio: +6/-0
Re: SDL/n2DLib ports for TI Nspire
« Reply #357 on: June 15, 2018, 06:32:36 pm »
Awesome ! :D


Let's go to the beach :  8)

Offline gameblabla

  • Super User
  • Join Date: May 2015
  • Location:
  • Posts: 816
  • Post Rating Ratio: +15/-7
  • TI-nspire porter
Re: SDL/n2DLib ports for TI Nspire
« Reply #358 on: July 28, 2018, 01:40:46 pm »
Alright guys, some good stuff.I've updated Oswan with a new autoframeskip thing. I admit, i originally did that because the RS-97 could not run some games fullspeed without it. But now you can.As usual, grab the latest version of Oswan for the TI-Nspire CX (and now monochrome too) here :https://github.com/gameblabla/oswan/raw/master/release/oswan.tns

I've also improved the RoQPlayer ! The old version was based on idroq and that had a fair amount of issues.I've rebased my port on DreamRoQ, which can directly output to RGB565 and can also output sound to a file.This version is much smaller and should run faster too, grab it here :
https://tiplanet.org/forum/archives_voir.php?id=296214
Enjoy
  • Calculators owned: TI Nspire CX, TI-89

Offline gameblabla

  • Super User
  • Join Date: May 2015
  • Location:
  • Posts: 816
  • Post Rating Ratio: +15/-7
  • TI-nspire porter
Re: SDL/n2DLib ports for TI Nspire
« Reply #359 on: September 27, 2018, 05:17:02 pm »
Hey,took the time to fix some of my nspire stuff.First of all, RoqPlayer would sometimes crash on real hardware.

That is now fixed.
Grab it here :https://tiplanet.org/forum/archives_voir.php?id=296214

Also, Picodrive is now finally working again !I also took the time to add support for newer screens on that picodrive.
Get it here : https://tiplanet.org/forum/archives_voir.php?id=304358
Now, i'll have to do the same for PocketSNES but had lost the source code to the latest version so i'll need to start from scratch...
  • Calculators owned: TI Nspire CX, TI-89

 


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