• SDL ports for Nspire 5 1
Currently:  

Author Topic: SDL ports for Nspire  (Read 112772 times)

0 Members and 1 Guest are viewing this topic.

Offline gameblabla

  • LV3 Member (Next: 100)
  • ***
  • Posts: 86
  • Rating: +17/-1
    • View Profile
    • Gameblabla's website
Re: SDL ports for Nspire
« Reply #60 on: September 03, 2015, 03:14:09 pm »
Hmmm, strange.
I guess i should reinstall everything because i installed to flash with nspire_emu.
Edited my post.

Hope you all enjoy PocketSNES

Offline rwill

  • LV2 Member (Next: 40)
  • **
  • Posts: 29
  • Rating: +3/-0
    • View Profile
Re: SDL ports for Nspire
« Reply #61 on: September 03, 2015, 04:34:02 pm »
Hi gameblabla,

I noticed that save games are actually not working with scummvm on the nspire. I also just got your PM ( I do not log in when checking forums for activity so I rarely see them in time ).

Anyway you could try to change the following lines in \backends\fs\nspire\nspire-fs.h to
Code: [Select]
virtual bool exists() const;
virtual bool isReadable() const;
virtual bool isWritable() const;
like remove the function body after the const and implement them like so in \backends\fs\nspire\nspire-fs.cpp:
Code: [Select]
bool NspireFilesystemNode::exists() const {
Common::String str = _path;
if( !_isDirectory && !str.hasSuffix(".tns" ) )
{
str += ".tns";
}
return access(str.c_str(), F_OK) == 0;
}

bool NspireFilesystemNode::isReadable() const {
Common::String str = _path;
if( !_isDirectory && !str.hasSuffix(".tns" ) )
{
str += ".tns";
}
return access(str.c_str(), R_OK) == 0;
}

bool NspireFilesystemNode::isWritable() const {
Common::String str = _path;
if( !_isDirectory && !str.hasSuffix(".tns" ) )
{
str += ".tns";
}
return access(str.c_str(), W_OK) == 0;
}

The idea is that file access is wrapped in a way that scummvm does not know about the .tns suffix except on the lowest level because there appear to be many places in scummvm that expect a file to have a certain name or format.

Just a note, maybe you should distribute the patch or the full source with your binaries, or make them available elsewhere, to honor the GPL.

Offline gameblabla

  • LV3 Member (Next: 100)
  • ***
  • Posts: 86
  • Rating: +17/-1
    • View Profile
    • Gameblabla's website
Re: SDL ports for Nspire
« Reply #62 on: September 03, 2015, 05:35:12 pm »
Okay, thanks rwill. ScummVM is a huge mess.
I have updated ScummVM with rwill's patch, so games like day of the tentacles should work now.
Link is still the same, download it here.

I will publish the source code (it's quite big) on github.
Thanks rwill for the help

Offline annoyingcalc

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1953
  • Rating: +140/-72
  • Found in Eclipse.exe
    • View Profile
Re: SDL ports for Nspire
« Reply #63 on: September 03, 2015, 06:31:45 pm »
Just wonder, since I don't have the capability to load a game this size onto my calculator, but will Humongous Entertainment games work?


EDIT: I know some of the games run on different engines. To be specific I mean later ones like Spy fox or Pajama Sam
This used to contain a signature.

Offline gameblabla

  • LV3 Member (Next: 100)
  • ***
  • Posts: 86
  • Rating: +17/-1
    • View Profile
    • Gameblabla's website
Re: SDL ports for Nspire
« Reply #64 on: September 03, 2015, 06:53:51 pm »
Just wonder, since I don't have the capability to load a game this size onto my calculator, but will Humongous Entertainment games work?
EDIT: I know some of the games run on different engines. To be specific I mean later ones like Spy fox or Pajama Sam
No, i don't think i have compiled support for them.

A reminder for everyone who missed this : I have ported PocketSNES, a super nintendo emulator based on Snes9x.
You can download here in the attachments

Offline annoyingcalc

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1953
  • Rating: +140/-72
  • Found in Eclipse.exe
    • View Profile
Re: SDL ports for Nspire
« Reply #65 on: September 03, 2015, 07:15:52 pm »
Ok, thanks.
This used to contain a signature.

Offline gameblabla

  • LV3 Member (Next: 100)
  • ***
  • Posts: 86
  • Rating: +17/-1
    • View Profile
    • Gameblabla's website
Re: SDL ports for Nspire
« Reply #66 on: September 04, 2015, 07:50:42 am »
Hello guys,
I did a video to show you how well PocketSNES runs on my Ti Nspire CX.
I'm showing you Super Mario Kart here.
https://www.youtube.com/watch?v=w2EGVom3LCo

It runs even better with overclocking actually.

EDIT: Just fixed a huge bug with PocketSNES that prevented it from working on some calc.
Anyways, you should download it again if you had issues with it.
« Last Edit: September 04, 2015, 08:51:10 am by gameblabla »

Offline rwill

  • LV2 Member (Next: 40)
  • **
  • Posts: 29
  • Rating: +3/-0
    • View Profile
Re: SDL ports for Nspire
« Reply #67 on: September 04, 2015, 12:43:16 pm »
Hello,

I noticed that critor still has problems loading saved games in ScummVM. gameblabla, are you sure that you build from the right source and did the .h and .cpp modifications ? It works here. You can test save games by pressing the '(' key on the nspire to save a game in scumm games and use the same menu to load one. I can provide a patch against the original 1.7.0 source on request if it still fails.

Offline gameblabla

  • LV3 Member (Next: 100)
  • ***
  • Posts: 86
  • Rating: +17/-1
    • View Profile
    • Gameblabla's website
Re: SDL ports for Nspire
« Reply #68 on: September 04, 2015, 01:11:06 pm »
Yeah, please gimme that full patch please,
it's possible i messed up. Sorry
I will start from scratch

Offline rwill

  • LV2 Member (Next: 40)
  • **
  • Posts: 29
  • Rating: +3/-0
    • View Profile
Re: SDL ports for Nspire
« Reply #69 on: September 04, 2015, 02:58:48 pm »
Hi gameblabla,

try this, please report back.

Offline annoyingcalc

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1953
  • Rating: +140/-72
  • Found in Eclipse.exe
    • View Profile
Re: SDL ports for Nspire
« Reply #70 on: September 04, 2015, 03:57:36 pm »
That SNES emulator port looks amazing. Will try it out soon.
This used to contain a signature.

Offline gameblabla

  • LV3 Member (Next: 100)
  • ***
  • Posts: 86
  • Rating: +17/-1
    • View Profile
    • Gameblabla's website
Re: SDL ports for Nspire
« Reply #71 on: September 04, 2015, 07:19:32 pm »
Quote
Hi gameblabla,
try this, please report back.
Hello rwill,
i compiled it again and the fix works just fine.
I could save and load a game in Lure without any trouble, thanks rwill.
I think you deserve all credits.
Anyways, i reuploded ScummVM with the patch inside.
Strangely enough though, i did not have to fix Dragon History for nspire this time.
Weird.

Quote
will Humongous Entertainment games work?
HE games should work actually on Nspire, i checked ScummVM's doc and they apparently only require
the standard ScummVM engine.

Now, i'm currently thinking how we can switch from SDL to n2DLib for the video.
Since rwill already switched timing and input to native, that's the only thing left to do.
It should be a simple matter of pointing the framebuffer to the buffer adress.
That's how i did it with PokéMini.

SDL version:
Code: [Select]
PokeMini_VideoBlit((void *)((uint8_t *)screen->pixels + PMOff), PixPitch);n2DLib version:
Code: [Select]
PokeMini_VideoBlit((void *)((uint8_t *)BUFF_BASE_ADDRESS + PMOff), PixPitch);
The only problem is ScummVM's abtrasction system, probably the reason rwill has not
switched to native yet.
I simply need to look at the other ports to get it though...

Offline rwill

  • LV2 Member (Next: 40)
  • **
  • Posts: 29
  • Rating: +3/-0
    • View Profile
Re: SDL ports for Nspire
« Reply #72 on: September 05, 2015, 12:03:20 pm »
Hi gameblabla,

it is not really simple to write a graphics output module for ScummVM as it is designed to run on very different platforms so the amount of abstraction the graphic module has to cover is quite high. I would guess that copying the ScummVM SDL graphics driver and replacing the SDL calls with something more native might be the quickest way. There are documents and hints available what does what, start here: doxygen.scummvm.org/d9/df4/classOSystem.html

As it appears that you are kind of overloading yourself with emulator ports - it might be wise for you to buy some small server device on which you can install Git or Subversion, like a Raspberry PI + Flash Drive for example, to do local development and version control if you have not already. Just to keep things organized...

Offline gameblabla

  • LV3 Member (Next: 100)
  • ***
  • Posts: 86
  • Rating: +17/-1
    • View Profile
    • Gameblabla's website
Re: SDL ports for Nspire
« Reply #73 on: September 06, 2015, 12:49:04 am »
I FINALLY found the reason why my emulators were so slow :
Simply linking SDL to your executable, even if you do not use it, will slow it down twice as much !
I almost became crazy when i learned that...

I updated PocketSNES, Potator, Oswan to n2DLib and they are now 20% cooler 200% awesome !

I can finally run all my SNES games fullspeed on my overclocked TI Nspire CX (266 Mhz),
same for Potator emulator and Oswan is much faster. (still not fullspeed though)

I will do a second video about PocketSNES tomorrow but in the meantime,
you can download the new versions below.

And i'll try to work on ScummVM too, it's just a daunting task though...

Oswan: https://tiplanet.org/forum/archives_voir.php?id=219761
Potator : https://tiplanet.org/forum/archives_voir.php?id=239616
PocketSNES : https://tiplanet.org/forum/archives_voir.php?id=302632
« Last Edit: September 27, 2018, 01:34:45 pm by gameblabla »

Offline SpiroH

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 729
  • Rating: +153/-23
    • View Profile
Re: SDL ports for Nspire
« Reply #74 on: September 06, 2015, 01:54:24 pm »
Congratulations for the PocketSNES port effort. Another bunch of games to the Nspire/ndless world. Good (and hard) work!

Question:  Any chance to change the default key bindings like in the gpSP emulator (via Menu)? I tried to play some games (Megaman X3 and VII) on the kArmTI/Nspiroid emulator and found it a bit hard to play with the default bindings. All the rest appears to work just fine, though. BTW, the last version is way faster but the key bindings are again different. So, yeah.