Author |
Message |
|
Techrocket9
Advanced Newbie
Joined: 07 Nov 2009 Posts: 62
|
Posted: 08 Mar 2010 03:00:51 pm Post subject: |
|
|
Does the source have experimental support for 2.0 or something (aka is there any reason we would want it over the release)?
Last edited by Guest on 25 Mar 2010 12:04:08 am; edited 1 time in total |
|
Back to top |
|
|
Lego
Advanced Newbie
Joined: 05 Feb 2010 Posts: 58
|
Posted: 08 Mar 2010 03:18:21 pm Post subject: |
|
|
ExtendeD wrote:
well nice, i've synced a copy :D
Techrocket9 wrote: Does the source have experimental support for 2.0 or something (aka is there any reason we would want it over the release).
during my quick read through i havn't seen anything concerning 2.0
Last edited by Guest on 08 Mar 2010 03:19:22 pm; edited 1 time in total |
|
Back to top |
|
|
bwang
Member
Joined: 15 Mar 2009 Posts: 128
|
Posted: 08 Mar 2010 09:02:15 pm Post subject: |
|
|
The demo in the Subversion trunk will not compile on Linux. Looking at the Makefile, I see that GCC=nspire-gcc. Is this a new compiler or some sort of custom script that uses arm-elf-gcc? |
|
Back to top |
|
|
ExtendeD
Advanced Newbie
Joined: 30 Aug 2009 Posts: 91
|
Posted: 09 Mar 2010 03:39:29 pm Post subject: |
|
|
Yes, this is a gcc wrapper. There are also ld and as wrappers.
You should 'make' in the tools/ directory to build and gather the tools to the bin/ directory.
Then add 'bin/' to your PATH as described to the ReadMe file (there is also a 'make install' target in the root directory which copies the tools to /usr/local/bin if you want).
Of course this version is in development and may not be stable. |
|
Back to top |
|
|
bwang
Member
Joined: 15 Mar 2009 Posts: 128
|
Posted: 25 Mar 2010 03:58:45 pm Post subject: |
|
|
Does anyone know how to write to the LCD buffer without updating the screen? I'm writing a raycaster (Omnimaga thread here) but it is suffering from flicker problems. |
|
Back to top |
|
|
fullmetalcoder
Member
Joined: 01 Aug 2009 Posts: 139
|
Posted: 25 Mar 2010 05:52:29 pm Post subject: |
|
|
if the lcd is memory-mapped then the easiest way is probably double-buffering but it comes with a notable memory cost and unless the mapping address can be altered (which is unlikely) it will also incur noticeable speed loss. However I guess neither of these is a very important concern since copying buffer content is probably much much faster than raytracing a whole scene and a few dozens of kb are not such a big deal on the nspire after all...
Last edited by Guest on 25 Mar 2010 05:59:11 pm; edited 1 time in total |
|
Back to top |
|
|
bwang
Member
Joined: 15 Mar 2009 Posts: 128
|
Posted: 25 Mar 2010 06:05:15 pm Post subject: |
|
|
Can you explain how I could implement double buffering? I assume it's more complicated than storing an array of pixel values and then drawing them all to the screen (since for some reason that kept causing my Nspire to reset). |
|
Back to top |
|
|
calc84maniac
Elite
Joined: 22 Jan 2007 Posts: 770
|
Posted: 25 Mar 2010 06:48:18 pm Post subject: |
|
|
Oh, now I get what you were doing. You'll need to modify the SetPixel function to draw to the other "invisible" buffer. Then, to update the screen, call memcpy to copy the buffer over to the LCD ram.
Last edited by Guest on 25 Mar 2010 06:48:50 pm; edited 1 time in total |
|
Back to top |
|
|
kaarsten
Newbie
Joined: 12 Nov 2009 Posts: 6
|
Posted: 03 Apr 2010 09:24:03 pm Post subject: |
|
|
I tried the double buffering a page back. I asked, but no one provided a solution. :/
Last edited by Guest on 03 Apr 2010 09:24:40 pm; edited 1 time in total |
|
Back to top |
|
|
tr1p1ea
Elite
Joined: 03 Aug 2003 Posts: 870
|
Posted: 08 Apr 2010 01:42:33 am Post subject: |
|
|
So you drew to a different place in memory and once you had completed drawing a full frame, you copied it over to LCD RAM? |
|
Back to top |
|
|
bwang
Member
Joined: 15 Mar 2009 Posts: 128
|
Posted: 10 Apr 2010 09:33:19 pm Post subject: |
|
|
Quote: I tried the double buffering a page back. I asked, but no one provided a solution. :/
I just modified the utils.c file from the Ndless demo:
Code:
/*****************************************************************************
* Copyright (C) 2010 by ANNEHEIM Geoffrey
* Contact: geoffrey.anneheim@gmail.com
*
* Original code by BoneSoft:
* http://www.codeproject.com/KB/GDI-plus/FunWithGravity.aspx
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE.
*
* RCSID $Id$
*****************************************************************************/
#include <os.h>
#include "utils.h"
inline bool rect_intersect(const t_rect* r1, const t_rect* r2) {
if ((r1->y + r1->h) < r2->y) return false;
if (r1->y > (r2->y + r2->h)) return false;
if ((r1->x + r1->w) < r2->x) return false;
if (r1->x > (r2->x + r2->w)) return false;
return true;
}
inline void refresh(char* scrbuf) {
memcpy(SCREEN_BASE_ADDRESS, scrbuf, SCREEN_BYTES_SIZE);
}
inline void clearScreen() {
memset(SCREEN_BASE_ADDRESS, 0xFF, SCREEN_BYTES_SIZE);
}
inline void clearBuf(char* scrbuf) {
memset(scrbuf, 0xFF, SCREEN_BYTES_SIZE);
}
inline void setPixel(int x, int y, int color) {
unsigned char* p = (unsigned char*)(SCREEN_BASE_ADDRESS + ((x >> 1) + (y << 7) + (y << 5)));
*p = (x & 1) ? ((*p & 0xF0) | color) : ((*p & 0x0F) | (color << 4));
}
inline void setPixelBuf(char* scrbuf, int x, int y, int color) {
unsigned char* p = (unsigned char*)(scrbuf + ((x >> 1) + (y << 7) + (y << 5)));
*p = (x & 1) ? ((*p & 0xF0) | color) : ((*p & 0x0F) | (color << 4));
}
inline int getPixel(int x, int y) {
unsigned char* p = (unsigned char*)(SCREEN_BASE_ADDRESS + ((x >> 1) + (y << 7) + (y << 5)));
return ((x & 1) ? (*p & 0x0F) : (*p >> 4));
}
int rand() {
static int m_w = 56789;
static int m_z = 38765;
m_z = 36969 * (m_z & 65535) + (m_z >> 16);
m_w = 18000 * (m_w & 65535) + (m_w >> 16);
return (m_z << 16) + m_w;
}
void showSimpleDialogBox(const char* title, const char* msg) {
char* buffTitle;
char* buffMsg;
buffTitle = (char*)malloc(0x200);
buffMsg = (char*)malloc(0x800);
ascii2utf16(buffTitle, title, 0x80);
ascii2utf16(buffMsg, msg, 0x200);
show_dialog_box2(0, buffTitle, buffMsg);
free(buffTitle);
free(buffMsg);
}
void fade(int n) {
int i, color1, color2;
unsigned char* p = (unsigned char*)SCREEN_BASE_ADDRESS;
for (i = 1; i < SCREEN_BYTES_SIZE; ++i) {
color1 = (*p & 0x0F) + n;
color2 = (*p >> 4) + n;
if (color1 > 0xF) color1 = 0xF;
if (color2 > 0xF) color2 = 0xF;
if (color1 < 0) color1 = 0;
if (color2 < 0) color2 = 0;
*p = (color2 << 4) | (color1 & 0xF);
p++;
}
}
|
|
Back to top |
|
|
aktentasche
Newbie
Joined: 11 Jun 2010 Posts: 7
|
Posted: 11 Jun 2010 07:30:38 pm Post subject: |
|
|
hi guys!
right now im looking for a calculator to use in my studies. 95% of my fellow students have a ti-200, but i am willing to get a ti-nspire since it has severe advantages.(despite the main disadvantage of few programs available)
besides that, i have a few questions:
-can ndless be used with OS 2.0?
-is it possible to downgrade the OS so ndless works? (just got here and read about it, but i wanna know for sure)
i do have some experience in C/ASM(8051) progamming, so with the outstanding possibilities of creating own software im sure im gonna design some programs relating to electrical engineering:
[s]-are there any libraries for using the hardware of the nspire(esp. LCD) or do i have to get the things to work on a low hardware level?[/s]
-where to release my programs?
[s]-i read something about the lack of getting a key input, is that correct?[/s]
-does the nspire have rs232-port?
all in all:
am i able to purchase a nspire cas OS 2.0 and start programming? i am willing to write a faq because i didnt find any in here.
greetings
Last edited by Guest on 11 Jun 2010 07:38:01 pm; edited 1 time in total |
|
Back to top |
|
|
bwang
Member
Joined: 15 Mar 2009 Posts: 128
|
Posted: 11 Jun 2010 09:58:48 pm Post subject: |
|
|
Ndless 2 is supposed to come out soon. The current Touchpad Nspires cannot be downgraded to 1.1.
There are functions for turning pixels on and such; however, right now there is a severe lack of I/O functions. |
|
Back to top |
|
|
Lionel Debroux
Member
Joined: 01 Aug 2009 Posts: 170
|
Posted: 12 Jun 2010 09:49:52 am Post subject: |
|
|
Quote: am i able to purchase a nspire cas OS 2.0 and start programming?
Not for the time being. |
|
Back to top |
|
|
aktentasche
Newbie
Joined: 11 Jun 2010 Posts: 7
|
Posted: 12 Jun 2010 01:34:47 pm Post subject: |
|
|
Lionel Debroux wrote:
Quote: am i able to purchase a nspire cas OS 2.0 and start programming?
Not for the time being.
ok so i have to wait until a new version of ndless is being released or get a nspire with an older OS.
thx guys. |
|
Back to top |
|
|
calc84maniac
Elite
Joined: 22 Jan 2007 Posts: 770
|
Posted: 13 Jun 2010 11:12:15 am Post subject: |
|
|
aktentasche wrote:
Lionel Debroux wrote:
Quote: am i able to purchase a nspire cas OS 2.0 and start programming?
Not for the time being.
ok so i have to wait until a new version of ndless is being released or get a nspire with an older OS.
thx guys.
Or if you get a blue clickpad model with a newer OS, you can downgrade. It's only the new black touchpad model that you can't downgrade. |
|
Back to top |
|
|
ExtendeD
Advanced Newbie
Joined: 30 Aug 2009 Posts: 91
|
Posted: 14 Jun 2010 02:36:56 pm Post subject: |
|
|
bwang wrote:
Ndless 2 is supposed to come out soon.
Neither geogeo or myself are actually working on it at the moment. |
|
Back to top |
|
|
geogeo
Newbie
Joined: 19 Nov 2009 Posts: 7
|
Posted: 14 Jun 2010 04:16:40 pm Post subject: |
|
|
Sorry for my long time of reply.
I worked on Ndless 2 two months ago. Today, Ndless 2 is fully functional on the OS 1.7 (CAS and NON-CAS) and a basic system calls manager was added. But today, ExtendeD and me haven't much time to continue working on this project. I encourage people who want to participate to Ndless 2 (even if you suppose to have a low level in programming) to supply your own contribution to the community. |
|
Back to top |
|
|
bwang
Member
Joined: 15 Mar 2009 Posts: 128
|
Posted: 14 Jun 2010 05:00:52 pm Post subject: |
|
|
What is preventing Ndless 2's release, then? Stability? Legal issues? |
|
Back to top |
|
|
aktentasche
Newbie
Joined: 11 Jun 2010 Posts: 7
|
Posted: 14 Jun 2010 10:44:23 pm Post subject: |
|
|
geogeo wrote: I encourage people who want to participate to Ndless 2 (even if you suppose to have a low level in programming) to supply your own contribution to the community.
if you had commented your code id be interested |
|
Back to top |
|
|
|