Omnimaga: The Coders Of Tomorrow
Welcome, Guest. Please login or register.
 
Omnimaga: The Coders Of Tomorrow
19 June, 2013, 04:00:03 *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
  home news downloads projects tutorials misc forums rules new posts irc about Login Register  
+-OmnomIRC

You must Register, be logged in and have at least 40 posts to use this shout-box! If it still doesn't show up afterward, it might be that OmnomIRC is disabled for your group or under maintenance.

Note: You can also use an IRC client like mIRC, X-Chat or Mibbit to connect to an EFnet server and #omnimaga.

  Show Contributions
Pages: [1]
1  Calculator Community / TI-Nspire Projects / CyberBox on: 28 December, 2011, 04:23:55
I wrote this clone of the DOS game CyberBox back in April, but never got around to putting in the finishing touches and releasing it.
2  Omnimaga / Ndless / Idling the CPU on: 15 March, 2011, 00:27:45
I noticed a thread on TI-Bank where someone said his TI-Nspire CAS drained a set of batteries by 50% in one day while testing out some programs... Power consumption is a very annoying thing in that you can't ignore it even though it's practically impossible to measure it effectively Sad

I suspect that it's mainly the Nspire's 90MHz CPU that can be a power hog, so it's important to make sure we idle it properly when nothing is happening. The way to do this is with the wait-for-interrupt instruction (mcr p15, 0, SBZ, c7, c0, 4), which is executed by the idle() function in libndls. However, this instruction is only useful if the interrupt that wakes the CPU up is acknowledged. Otherwise, next time around, the interrupt controller is already asserting to the CPU that an interrupt is pending, so the instruction just returns immediately.

Presently, Ndless programs run with the CPSR I bit set on the CPU, so the OS's IRQ handler is not run, and IRQs never get acknowledged unless a program does so explicitly. I think libndls should have a delay routine that keeps the CPU idle by acknowledging timer interrupts as they come, something like this:


1
2
3
4
5
6
7
8
9
10
11
12
13
// Idle for n/100 seconds
void delay(int n) {
int irq_mask = *(volatile int *)0xDC000008;
*(volatile int *)0xDC00000C = ~(1 << 19); // Disable all IRQs except timer
for (; n; n--) {
asm ("mcr p15, 0, %0, c7, c0, 4" : : "r" (0)); // Wait for an interrupt to occur
*(volatile int *)0x900A0020 = 1; // Acknowledge timer interrupt at source
*(volatile int *)0xDC000028; // Make interrupt controller stop asserting nIRQ if there aren't any active IRQs left
}
*(volatile int *)0xDC000008 = irq_mask; // Re-enable disabled IRQs
return 0;
}
3  Calculator Community / TI-Nspire Projects / TI-Nspire emulator on: 25 February, 2011, 08:20:07
This topic is the new home for nspire_emu, the TI-Nspire emulator with the highly uncreative name.

Current version: v0.70 (post, download)
4  Calculator Community / TI-Nspire Projects / Java on the TI-Nspire? on: 17 January, 2011, 00:55:59
I've discovered that the TI-Nspire's CPU supports a feature called Jazelle which allows Java code to be partially interpreted by hardware, making it significantly faster than it would be with a plain interpreter. Obviously, the 90MB Java runtime environment is never going to fit on the Nspire, but I wonder if it might be practical to port something like J2ME. It seems a shame to let that hardware go to waste Wink

Here's a little test program, that uses Jazelle to calculate 2+2 (impressive, huh? Grin)
Pages: [1]
Powered by EzPortal
Powered by MySQL Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Powered by PHP
Page created in 1.417 seconds with 28 queries.
Skin by DJ Omnimaga edited from SMF default theme with the help of tr1p1ea.
All programs, games and songs avaliable on this website are property of their respective owners.
Best viewed in Opera, Firefox, Chrome and Safari with a resolution of 1024x768 or above.