Omnimaga

Omnimaga => Our Projects => Ndless => Topic started by: jboavida on December 11, 2010, 05:29:44 pm

Title: Version 1.7 on CAS
Post by: jboavida on December 11, 2010, 05:29:44 pm
Hello,

I have a CAS with OS version 1.7.2741. I have installed Ndless 1.7 following instructions. I got the message box "Ndless installed successfully"
But... every time I run a program that requires Ndless (like hello, hella, or imageviwer) the calculator reboots.

Anyone has the same problem ?

Thanks

Joaquim
Title: Re: Version 1.7 on CAS
Post by: apcalc on December 11, 2010, 05:34:20 pm
Hi!  Welcome to Omnimaga! :)

The programs "hello" and "hella" not working is a bit strange.  The image viewer probably should not work on Ndless 1.7, as it was originally built for Ndless 1.1.  Can you try a program that specifically states it was built for Ndless 1.7 (on ticalc.org, I know Block Dude, gbc4nspire, and NESpire will definately work on Ndless 1.7).  Programs such as the raycaster will not work in that version. 

If you can't get any of these official Ndless 1.7 programs working, post again here.  I assume you have a clickpad CAS as you have OS 1.7 working, so this can't be caused by any touchpad incompatibilities.
Title: Re: Version 1.7 on CAS
Post by: jboavida on December 11, 2010, 06:01:48 pm
Wow! that was fast response. Thanks!

I have tested the Game boy emulator and 5 minutes later I was playing SuperMario  ;D

Everything seems to work... I d'ont know why "hello" fails...

Anyway what I really need is bmpviewer... I have the source code, What compiler should I use?
Do I need to make modifications to the source code or just recompile ?

Thanks again

Joaquim
Title: Re: Version 1.7 on CAS
Post by: apcalc on December 11, 2010, 06:03:47 pm
You have to follow in instruction on hackspire (http://hackspire.unsads.com) to set up a dev. environment.  It can be a slightly difficult task. 

Here is a version that should work on OS 1.7.  I had to make some minor modifications to make this work.  When I tried to build this with the original source, the compilier said some of the functions needed to list all of the .bmp files in a directory are not defined for Ndless 1.7.  I had to modify the source and program usage to accommodate this. 

To use this program you must do this:  Create a folder "examples" on your Nspire.  Put both the document "bmpviewer.tns" and your image, that must be named "image.bmp.tns" in this folder.  Then run bmpviewer.tns to see the image.

I will try to find a better solution to this if I get a bit of free time, but this should work as a temporary solution.  Hope this helps!
Title: Re: Version 1.7 on CAS
Post by: jboavida on December 11, 2010, 08:42:00 pm
Works good. Many thanks!
Hope you don't consider an abuse, but it will be possible to change the source code so it displays the image on the current folder instead the "examples" folder? In that way I can create multiple folders and copy both viewer and image to those folders. The way you send I can only see one image.

As I said I hope you don't consider abusive.  It is a great help as is. :)
Respect.

Thanks
Title: Re: Version 1.7 on CAS
Post by: apcalc on December 11, 2010, 09:15:05 pm
Nevermind!  I have it working!  :w00t:

I went back and played around a bit with the source code.  I was able to add the functions needed to this version so they would work with Ndless 1.7 (thanks critor for "chdir" :)).  Now, just put all the images you want with the name *.bmp.tns in a folder "bmpviewer" (similar to what it done with .gb/.gbc files).  Run "bmpviewer" and you can select your image from the displayed list.  All of the images must be in "bmpviewer" but the actual "bmpviewer.tns" can be in any folder.

Enjoy! :)

EDIT: Er, I guess it might be good if I remember to attach the file :P.
Title: Re: Version 1.7 on CAS
Post by: ExtendeD on December 12, 2010, 03:57:15 am
apcalc, could you please share the modifications required for OS 1.7 compatibility so that I can re-integrate them?
Title: Re: Version 1.7 on CAS
Post by: jboavida on December 12, 2010, 07:06:33 am

Apcalc

Works like a charm.
You save my day! Thanks!  :w00t:
Title: Re: Version 1.7 on CAS
Post by: apcalc on December 12, 2010, 09:56:25 am
apcalc, could you please share the modifications required for OS 1.7 compatibility so that I can re-integrate them?

Sure!

First, I had to add NU_Current_Dir with SYSCALL_CUSTOM:

Code: [Select]
static const unsigned addresses[]={0X102ABE70,0X102ADE80};
#define  NU_Current_Dir SYSCALL_CUSTOM(addresses, int, const char* drive, const char* dirbuffer)

Then, I replaced the "dirlist.c" in the original source with the one included with critor's "ndshell" as bwang's original one used a function "undocfunction(path)" (which I assume is chdir(path)?).  Also, as critor said, I added this to os.h:

Code: [Select]
_SYSCALL1(int, chdir, char*)
Title: Re: Version 1.7 on CAS
Post by: ExtendeD on December 12, 2010, 03:39:06 pm
Thanks, it's now available on the Subversion trunk.