Join us on Discord!
You can help CodeWalrus stay online by donating here.

SDL/n2DLib ports for TI Nspire

Started by gameblabla, August 19, 2015, 08:48:31 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Dream of Omnimaga

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-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

matrefeytontias

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

gameblabla

Quote from: matrefeytontias 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 ?
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 :
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: None (used to own an Nspire and TI-89)

matrefeytontias

#348
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.


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).
  • 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

gameblabla

Quote from: matrefeytontias 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.

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: None (used to own an Nspire and TI-89)

gameblabla

#350
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
  • Calculators owned: None (used to own an Nspire and TI-89)

Dream of Omnimaga

That looks great and fun! Good job gameblabla on the port. :3=
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

gameblabla

Quote from: DJ Omnimaga on April 09, 2017, 04:17:06 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: None (used to own an Nspire and TI-89)

critor

Quote from: gameblabla on April 09, 2017, 06:19:49 PMThanks as always critor
You're welcome. :)

Quote from: gameblabla on April 09, 2017, 06:19:49 PMeven 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.

Dream of Omnimaga

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-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

gameblabla

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: None (used to own an Nspire and TI-89)

gameblabla

#356
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.
  • Calculators owned: None (used to own an Nspire and TI-89)

critor


gameblabla

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: None (used to own an Nspire and TI-89)

gameblabla

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: None (used to own an Nspire and TI-89)

Powered by EzPortal