Author Topic: pSDL v1.0.0  (Read 17163 times)

0 Members and 4 Guests are viewing this topic.

Offline ruler501

  • Meep
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2475
  • Rating: +66/-9
  • Crazy Programmer
    • View Profile
pSDL v1.0.0
« on: June 15, 2012, 12:30:59 pm »
I have been working on porting nSDL to the prizm so people can write one program to run on both prizm and both nspires. It now even compiles for on calc :D so it should be ready for anyone who wants to to test it. Until it gets to version 1 and I get most bugs out I will not be distributing binaries so you will have to build it. To compile it run make -f Makefile.prizm and it should compile. to install it assumes you built it in the /projects directory of the prizm sdk then run make -f Makefile.prizm install to install it to your prizm sdk

I need people to help me find any errors I might have made and to test the library. If someone could please help me the code is at https://github.com/ruler501/pSDL It now compiles fine and will run if you use a 8 bit surface. malloc seems to fail if it tries to use a 16bpp surface the size of the screen. If someone could please find a way to get malloc working with large values that could allow much more usability

I could not have done this without hoffa's wonderful nSDL. I have copied most of his code and only changed the parts that are platform specific(mainly).

DEMO:

This is a demo of a program called explosion I cannot currently remember where I got it from. Other than removing functions the prizm doesnt support very little work was needed to port it

Attatched is the binaries for version 1.0.0 I will be updating soon since the current version does not support anywhere near the whole keyboard like it should.
pSDL has also moved so that it is now called pSDL on my github instead of still being called nSDL

EDIT:Touched up the entire post to be more concise and orderly
« Last Edit: August 04, 2012, 09:40:58 pm by ruler501 »
I currently don't do much, but I am a developer for a game you should totally try out called AssaultCube Reloaded download here https://assaultcuber.codeplex.com/
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCM/CS/M/S d- s++: a---- C++ UL++ P+ L++ E---- W++ N o? K- w-- o? !M V?
PS+ PE+ Y+ PGP++ t 5? X R tv-- b+++ DI+ D+ G++ e- h! !r y

Offline Juju

  • Incredibly sexy mare
  • Coder Of Tomorrow
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 5730
  • Rating: +500/-19
  • Weird programmer
    • View Profile
    • juju2143's shed
Re: pSDL v0.0.1
« Reply #1 on: June 15, 2012, 01:21:41 pm »
I was about to get a similar project started (I was looking at the SDL sources last week to check the feasibility of the thing), I'll be happy to help you :)

Of course, it'll be easy to have programs that compiles on both Ndless and the Prizm and to have nSDL and pSDL in the same branch, as plateform-specific code are separated in the SDL library (you can see a src/tinspire and a src/prizm directory).
« Last Edit: June 15, 2012, 01:45:48 pm by Juju »

Remember the day the walrus started to fly...

I finally cleared my sig after 4 years you're happy now?
THEGAME
This signature is ridiculously large you've been warned.

The cute mare that used to be in my avatar is Yuki Kagayaki, you can follow her on Facebook and Tumblr.

Offline hoffa

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 322
  • Rating: +131/-13
    • View Profile
Re: pSDL v0.0.1
« Reply #2 on: June 15, 2012, 01:56:55 pm »
Nice!

You can try removing a few of the HAVE_* defines in SDL_config_prizm.h, as SDL does implement a few of the functions. Also doesn't the Prizm have a 320x240 usable screen (EDIT: apparently it doesn't indeed)?
« Last Edit: June 15, 2012, 01:57:38 pm by hoffa »

Offline ruler501

  • Meep
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2475
  • Rating: +66/-9
  • Crazy Programmer
    • View Profile
Re: pSDL v0.0.1
« Reply #3 on: June 15, 2012, 03:23:06 pm »
I fixed the calc compile by adding a HAVE_MALLOC define to the prizm config not sure if this may break something later on but for now it compiles succesfuly with the sdk. I'm going to reupload the correct version to github as a download if someone could try to see if it works on calc. I won't have a calc available for another 30 min or so so I can't test it myself
I currently don't do much, but I am a developer for a game you should totally try out called AssaultCube Reloaded download here https://assaultcuber.codeplex.com/
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCM/CS/M/S d- s++: a---- C++ UL++ P+ L++ E---- W++ N o? K- w-- o? !M V?
PS+ PE+ Y+ PGP++ t 5? X R tv-- b+++ DI+ D+ G++ e- h! !r y

Offline Juju

  • Incredibly sexy mare
  • Coder Of Tomorrow
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 5730
  • Rating: +500/-19
  • Weird programmer
    • View Profile
    • juju2143's shed
Re: pSDL v0.0.1
« Reply #4 on: June 15, 2012, 03:29:00 pm »
I'll give a try as soon as I'll get home.

Remember the day the walrus started to fly...

I finally cleared my sig after 4 years you're happy now?
THEGAME
This signature is ridiculously large you've been warned.

The cute mare that used to be in my avatar is Yuki Kagayaki, you can follow her on Facebook and Tumblr.

Offline ruler501

  • Meep
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2475
  • Rating: +66/-9
  • Crazy Programmer
    • View Profile
Re: pSDL v0.0.1
« Reply #5 on: June 15, 2012, 03:42:52 pm »
Thanks for now I'll just run through the tests and see how that works once I get my calc
I currently don't do much, but I am a developer for a game you should totally try out called AssaultCube Reloaded download here https://assaultcuber.codeplex.com/
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCM/CS/M/S d- s++: a---- C++ UL++ P+ L++ E---- W++ N o? K- w-- o? !M V?
PS+ PE+ Y+ PGP++ t 5? X R tv-- b+++ DI+ D+ G++ e- h! !r y

Offline Eiyeron

  • Urist McEiyolobster
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1430
  • Rating: +130/-10
  • (-_(//));
    • View Profile
    • Rétro-Actif : Rétro/Prog/Blog
Re: pSDL v0.0.1
« Reply #6 on: June 15, 2012, 04:35:15 pm »
The FULL screen dims (with FS enlabed) is 396*224.

Offline calc84maniac

  • eZ80 Guru
  • Coder Of Tomorrow
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2912
  • Rating: +471/-17
    • View Profile
    • TI-Boy CE
Re: pSDL v0.0.1
« Reply #7 on: June 15, 2012, 05:59:54 pm »
The FULL screen dims (with FS enlabed) is 396*224.
It's hard to get that working with the default buffer and screen copy routine though.
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman

Offline ruler501

  • Meep
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2475
  • Rating: +66/-9
  • Crazy Programmer
    • View Profile
Re: pSDL v0.0.1
« Reply #8 on: June 15, 2012, 06:51:15 pm »
We can set that later as what happens when SDL_FULLSCREEN is passed as a flag to the video surface. I'd rather not work on that till I get this working

To get this to compile I define HAVE_MALLOC in the build command so that SDL_malloc.c does not compile. When I do this though I get errors later that a number of functions aren't defined. I think I need to have SDL_malloc.c compile but to do so I have to have the stdlib functions in it work. I'll look through it and try to make a list of what needs to be implemented also if someone could look through it and help find areas that can be worked together without the stdlib or with functions already implemented that would be great

EDIT: these are the compile errors from my test program with SDL http://pastebin.com/Z2EeK5KA
« Last Edit: June 15, 2012, 08:58:59 pm by ruler501 »
I currently don't do much, but I am a developer for a game you should totally try out called AssaultCube Reloaded download here https://assaultcuber.codeplex.com/
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCM/CS/M/S d- s++: a---- C++ UL++ P+ L++ E---- W++ N o? K- w-- o? !M V?
PS+ PE+ Y+ PGP++ t 5? X R tv-- b+++ DI+ D+ G++ e- h! !r y

Offline ruler501

  • Meep
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2475
  • Rating: +66/-9
  • Crazy Programmer
    • View Profile
Re: pSDL v0.0.1
« Reply #9 on: June 16, 2012, 12:22:12 am »
I had some pretty serious errors in how I built it I have fixed that in the most recent commit but now there are lots of build errors

I'm going to be in the mountains of new mexico on a hike for the next 9 days so if someone else could work on it and maybe get something fixed I would much appreciate it
I currently don't do much, but I am a developer for a game you should totally try out called AssaultCube Reloaded download here https://assaultcuber.codeplex.com/
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCM/CS/M/S d- s++: a---- C++ UL++ P+ L++ E---- W++ N o? K- w-- o? !M V?
PS+ PE+ Y+ PGP++ t 5? X R tv-- b+++ DI+ D+ G++ e- h! !r y

Offline ruler501

  • Meep
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2475
  • Rating: +66/-9
  • Crazy Programmer
    • View Profile
Re: pSDL v0.0.1
« Reply #10 on: June 22, 2012, 11:47:16 pm »
I'm slowly working through the errors but I am finding things that are missing that need to be added to the SDK for it to compile.
The things I've found so far that need implementation are:
stdint.h (Though i think I got this working acceptably you can see my slightly modified version of it in the include folder of the most recent commit)
stdarg.h(for va_list)
and probably more but until I get past one I can't see the next problems
I currently don't do much, but I am a developer for a game you should totally try out called AssaultCube Reloaded download here https://assaultcuber.codeplex.com/
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCM/CS/M/S d- s++: a---- C++ UL++ P+ L++ E---- W++ N o? K- w-- o? !M V?
PS+ PE+ Y+ PGP++ t 5? X R tv-- b+++ DI+ D+ G++ e- h! !r y

Offline ruler501

  • Meep
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2475
  • Rating: +66/-9
  • Crazy Programmer
    • View Profile
Re: pSDL v0.1.0
« Reply #11 on: June 25, 2012, 11:41:39 pm »
Attached is the image of the first SDL program to run succesfully with video on the prizm


EDIT: wow just realized that this is now a quadruple post

You should be able to run any 8bpp program with pSDL on the prizm with little modification
« Last Edit: June 26, 2012, 12:20:04 am by ruler501 »
I currently don't do much, but I am a developer for a game you should totally try out called AssaultCube Reloaded download here https://assaultcuber.codeplex.com/
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCM/CS/M/S d- s++: a---- C++ UL++ P+ L++ E---- W++ N o? K- w-- o? !M V?
PS+ PE+ Y+ PGP++ t 5? X R tv-- b+++ DI+ D+ G++ e- h! !r y

Offline Juju

  • Incredibly sexy mare
  • Coder Of Tomorrow
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 5730
  • Rating: +500/-19
  • Weird programmer
    • View Profile
    • juju2143's shed
Re: pSDL v0.1.0
« Reply #12 on: June 25, 2012, 11:58:15 pm »
Sweet :D

Remember the day the walrus started to fly...

I finally cleared my sig after 4 years you're happy now?
THEGAME
This signature is ridiculously large you've been warned.

The cute mare that used to be in my avatar is Yuki Kagayaki, you can follow her on Facebook and Tumblr.

Offline ruler501

  • Meep
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2475
  • Rating: +66/-9
  • Crazy Programmer
    • View Profile
Re: pSDL v0.1.0
« Reply #13 on: June 25, 2012, 11:59:52 pm »
IkaTari said in a few days there might be a way to fix the problem with not being able to allocate enough space for 16 bpp surfaces so that may not be such a large problem
I currently don't do much, but I am a developer for a game you should totally try out called AssaultCube Reloaded download here https://assaultcuber.codeplex.com/
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCM/CS/M/S d- s++: a---- C++ UL++ P+ L++ E---- W++ N o? K- w-- o? !M V?
PS+ PE+ Y+ PGP++ t 5? X R tv-- b+++ DI+ D+ G++ e- h! !r y

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: pSDL v0.1.0
« Reply #14 on: June 26, 2012, 12:54:51 am »
Glad to see new progress and I'm glad SDL programs will finally arrive on the PRIZM too. :)