You can help CodeWalrus stay online by donating here. | New CodeWalrus | Old (dark mode) | Old (light) | Discord server

SDL/n2DLib ports for TI Nspire

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

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

u/Dream of Omnimaga 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=
u/matrefeytontias 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 ?
u/gameblabla December 14, 2016, 02:46:37 PM
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 ?
u/matrefeytontias 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;
}


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
u/gameblabla December 14, 2016, 07:30:11 PM
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.
u/gameblabla 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
u/Dream of Omnimaga April 09, 2017, 04:17:06 PM
That looks great and fun! Good job gameblabla on the port. :3=
u/gameblabla April 09, 2017, 06:19:49 PM
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.
u/critor April 10, 2017, 01:06:55 PM
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.
u/Dream of Omnimaga 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.
u/gameblabla 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
u/gameblabla 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
u/critor June 15, 2018, 06:32:36 PM
Awesome ! :D


Let's go to the beach :  8)
u/gameblabla 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
u/gameblabla 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...
Website statistics


MyCalcs | Ticalc.org | Cemetech | Omnimaga | TI-Basic Developer | MaxCoderz | TI-Story | Casiocalc.org | Casiopeia | The Museum of HP Calculators | HPCalc.org | CnCalc.org | Music 2000 Community | TI Education | Casio Education | HP Calcs | NumWorks | SwissMicros | Sharp Calculators
Powered by EzPortal