Omnimaga

Calculator Community => Other Calc-Related Projects and Ideas => TI-Nspire => Topic started by: Goplat on February 25, 2011, 01:20:07 am

Title: TI-Nspire emulator
Post by: Goplat on February 25, 2011, 01:20:07 am
This topic is the new home for nspire_emu, the TI-Nspire emulator with the highly uncreative name.

Current version: v0.70 (post (http://ourl.ca/9360/330734), download (http://www.omnimaga.org/index.php?action=dlattach;topic=6763.0;attach=14364))
Title: Re: TI-Nspire emulator
Post by: Xeda112358 on February 25, 2011, 01:21:37 am
So is there a download here? (and yeah, that can be a little troublesome)
Title: Re: TI-Nspire emulator
Post by: ralphdspam on February 25, 2011, 01:21:40 am
Are there any plans to support color from the CX?
Title: Re: TI-Nspire emulator
Post by: willrandship on February 25, 2011, 01:21:44 am
Yay for that. Will there be another linux-compatible release? :)
Title: Re: TI-Nspire emulator
Post by: Goplat on February 25, 2011, 01:28:57 am
So is there a download here? (and yeah, that can be a little troublesome)
See below.

Are there any plans to support color from the CX?
Perhaps. The CX isn't just a normal Nspire with a color screen. We know it has extra RAM and flash - what else in the hardware might have changed? We'll just have to wait and see.

Yay for that. Will there be another linux-compatible release? :)
Someone else made that, not me. I'm not familiar with Linux GUI libraries.

Anyway, here's the new version, 0.50:
Title: Re: TI-Nspire emulator
Post by: DJ Omnimaga on February 25, 2011, 02:44:53 am
I should probably update. I still run 0.20. X.x

Btw glad it's not available for download for more people and I'm glad this is still in the works. Are you still planning to post updates on UTI as well too? You could probably just link to the Omnimaga attachments since they aren't that big.

Will this version run at accurate speed?
Title: Re: TI-Nspire emulator
Post by: Lionel Debroux on February 25, 2011, 02:48:48 am
nspire_emu works well on Wine, which lessens the urgency of having a native *nix version.

Great changes, as usual ;)
Title: Re: TI-Nspire emulator
Post by: DJ Omnimaga on February 25, 2011, 02:55:34 am
This is good to hear. Most programs work in Wine, but there are exceptions, such as Starcraft Battle.net and RPG Maker VX database editing section.
Title: Re: TI-Nspire emulator
Post by: ExtendeD on February 25, 2011, 07:43:46 am
Excellent Goplat, as usual!
Does this mean that we now have enough information on the USB controller to implement on-calc drivers?
Title: Re: TI-Nspire emulator
Post by: Goplat on February 25, 2011, 12:04:31 pm
Will this version run at accurate speed?
Timing is the same as it always was (1 instruction per cycle). I may make it more accurate at some point, but various features of the CPU make exact cycle timing impractical.

Does this mean that we now have enough information on the USB controller to implement on-calc drivers?
I think we already did: we know that it's Freescale's USB OTG module, revision 0x42; you can find documentation of it in the MCF54455 reference manual (the MCF54455 is not related to the TI-Nspire but just happens to use the same revision of this module). The host interface is based on EHCI 1.0 (http://www.intel.com/technology/usb/ehcispec.htm).
Title: Re: TI-Nspire emulator
Post by: ExtendeD on February 25, 2011, 01:06:20 pm
I'm wondering how quickly support for OS 3.0 will be added.
Title: Re: TI-Nspire emulator
Post by: compu on February 26, 2011, 01:11:31 pm
I have just experienced a bug, after idling around in the nspire home screen for some minutes, the console starts spamming usb resets and I can't send any files... I have used 0.41 before and haven't had this error.
Title: Re: TI-Nspire emulator
Post by: Goplat on February 26, 2011, 01:21:51 pm
I have just experienced a bug, after idling around in the nspire home screen for some minutes, the console starts spamming usb resets and I can't send any files... I have used 0.41 before and haven't had this error.

This is actually not new, there have always been problems when the OS tries to go into standby (after 3 minutes of idleness). In previous versions, you would see an infinite loop of unsupported USB port accesses:
Quote
Warning at PC=10374D2C: Bad read_word: b00001bc
debug> c
Warning at PC=10374D50: Bad write_word: b00001bc 00000000
debug> c
Warning at PC=10374D2C: Bad read_word: b00001ac
debug> c
Warning at PC=10374D2C: Bad read_word: b00001bc
debug>
Title: Re: TI-Nspire emulator
Post by: compu on February 26, 2011, 01:26:27 pm
That's not what I mean, I have set the standby time to 30 minutes  ;)

My output looks more like
Code: [Select]
usb reset
usb reset
usb reset
...

And the calculator doesn't crash.

EDIT: usb reset, not cpu reset..
Title: Re: TI-Nspire emulator
Post by: Goplat on February 26, 2011, 01:35:55 pm
That's not what I mean, I have set the standby time to 30 minutes  ;)

My output looks more like
Code: [Select]
usb reset
usb reset
usb reset
...

And the calculator doesn't crash.
Yes. With the new modifications to the USB code, the symptoms have changed, but it's still the same bug. And I still don't see it any sooner than whatever the standby time is set to (unless emulation is sped up by pressing "`" or something)
Title: Re: TI-Nspire emulator
Post by: compu on February 26, 2011, 01:38:46 pm
Okay sorry, I didn't know that :banghead:
Title: Re: TI-Nspire emulator
Post by: ParkerR on March 07, 2011, 04:08:18 pm
Thank you very much Goplat. Now I can run 2.1 CAS :)
Title: Re: TI-Nspire emulator
Post by: calc84maniac on March 07, 2011, 04:09:47 pm
By the way Goplat, if you find the time, would you mind adding those access permission bits to the MMU before you get too busy adding support for OS 3.0 and Nspire CX?
Title: Re: TI-Nspire emulator
Post by: Goplat on March 09, 2011, 01:18:46 am
By the way Goplat, if you find the time, would you mind adding those access permission bits to the MMU before you get too busy adding support for OS 3.0 and Nspire CX?

Here you go. Version 0.51:
Title: Re: TI-Nspire emulator
Post by: DJ Omnimaga on March 10, 2011, 12:29:22 am
By the way is it me or is that emulator very small? Is it just due to the lack of GUI like in WabbitEmu? Not complaining, though, I just kinda expected the file size to be at least close to 1 MB. :P
Title: Re: TI-Nspire emulator
Post by: fb39ca4 on March 12, 2011, 08:46:07 am
It's just you. A program such as firefox, with all it's features takes up about 15mb of disk space.
Title: Re: TI-Nspire emulator
Post by: DJ Omnimaga on March 13, 2011, 01:56:48 am
Ah ok, because WabbitEmu is like 2.27 MB O.O
Title: Re: TI-Nspire emulator
Post by: compu on March 22, 2011, 02:58:14 pm
Could you attach imgdump here too?
I am logged in at United-TI, but I still can't download it :(
Title: Re: TI-Nspire emulator
Post by: Goplat on March 22, 2011, 03:30:20 pm
Here you go
Title: Re: TI-Nspire emulator
Post by: compu on March 23, 2011, 02:51:37 am
Thanks :)
Title: Re: TI-Nspire emulator
Post by: z80man on March 23, 2011, 02:55:43 am
Just wondering, but how many Hz does the nspire emulator get. My current version of the Prizm emulator achieves about 8MHz now on the average computer (I released the first test version yesterday), but I still have many more optimizations to do including multi threading.
Title: Re: TI-Nspire emulator
Post by: Goplat on March 23, 2011, 03:45:39 am
Just wondering, but how many Hz does the nspire emulator get. My current version of the Prizm emulator achieves about 8MHz now on the average computer (I released the first test version yesterday), but I still have many more optimizations to do including multi threading.

On my computer, it typically runs around 100-200 million instructions per second. It depends heavily on the code being executed - plain arithmetic is fast, branches and memory accesses are slower, accesses to memory-mapped I/O ports are very slow. The main reason it's so fast otherwise is that I translate sequences of ARM instructions into the x86 code needed to emulate them, and execute that directly, so the overhead of figuring out what an instruction does is only incurred the first time it's executed. Without this feature, it's about 10x slower.

I have to ask: what hardware does the Prizm have whose emulation can be sped up with multi-threading?

Title: Re: TI-Nspire emulator
Post by: z80man on March 23, 2011, 04:51:40 am
I use multi-threading to control the hardware other than the cpu itself. So primary execution is handled by the first thread, hardware and peripherals on the second thread, gui on the third thread, and the plug-in app scripting language on the fourth thread.
Title: Re: TI-Nspire emulator
Post by: Goplat on April 08, 2011, 03:29:35 am
Here is a version compatible with OS 3.0.1, made possible by returning the correct values from addresses 900A0000, 90110xxx, and CC000008. (Boot2 3.01 still doesn't work)
Title: Re: TI-Nspire emulator
Post by: Lionel Debroux on April 08, 2011, 03:42:19 am
Thanks :)

Is there a short-term plan for merging the modifications in Ncubate, which allow reverse-engineering from the comfort of IDA through the GDBstub ?
Title: Re: TI-Nspire emulator
Post by: critor on April 08, 2011, 02:39:09 pm
Great!
Title: Re: TI-Nspire emulator
Post by: apcalc on April 08, 2011, 02:49:38 pm
Very Nice!  Thank you for the update, Goplat! :D
Title: Re: TI-Nspire emulator
Post by: DJ Omnimaga on April 22, 2011, 09:51:58 pm
Ooh thanks! It should be more suitable for screenshots than the computer link software (which doesn't work with CalcCapture due to weird chars in the window title <_<)

That reminds me, I really need to create a sub-forum for this one day...
Title: Re: TI-Nspire emulator
Post by: Goplat on May 19, 2011, 02:23:13 pm
New version: Boot2 3.01 can now successfully load the OS. (Note that you must use boot1 for it to work)
Title: Re: TI-Nspire emulator
Post by: shrear on May 19, 2011, 02:35:56 pm
Nice.
But how does on get boot1?
I know that there is a dumper for ndless1 out there
but I think that to try to use it on a touchpad could be complicated
Title: Re: TI-Nspire emulator
Post by: ExtendeD on May 21, 2011, 08:08:25 am
Goplat, do you plan to fix the backtrace debugger command probably broken by the new OS 3.0 function prolog? I miss it :(
Title: Re: TI-Nspire emulator
Post by: pianoman on May 21, 2011, 05:57:02 pm
This might sound really stupid, but how do you start the emulator?
Whenever I try, I just get a console window that closes really quickly.
Title: Re: TI-Nspire emulator
Post by: Deep Toaster on May 21, 2011, 06:24:36 pm
You have to start it up through the command prompt. Instructions to run it are here: http://hackspire.unsads.com/wiki/index.php/Emulators#Setup
Title: Re: TI-Nspire emulator
Post by: pianoman on May 21, 2011, 06:25:32 pm
Oh... thank you!
Title: Re: TI-Nspire emulator
Post by: Deep Toaster on May 21, 2011, 06:26:23 pm
Np, and welcome to Omnimaga!

If you have the time you should go introduce yourself (http://www.omnimaga.org/index.php?board=10.0) :)
Title: Re: TI-Nspire emulator
Post by: pianoman on May 25, 2011, 06:49:58 pm
I got the emulator working!
Thank you!
Title: Re: TI-Nspire emulator
Post by: ruler501 on June 04, 2011, 08:35:49 pm
I'm sorry if this seems stupid but how do you get this working with linux?
I have linux mint 11 gnome
Title: Re: TI-Nspire emulator
Post by: Lionel Debroux on June 05, 2011, 01:47:24 am
The emulator works well with Wine :)

My scripts for launching the boot2, the 1.7.2741 CAS, and 1.7.2741 non-CAS respectively, are:
Code: [Select]
#!/bin/sh
pushd ~/TI-Nspire/ncubate_emu-v032b
wine nspire_emu.exe /B=boot2.img.raw /F=tinspire_boot2.bin /G=2000 &
popd
Code: [Select]
#!/bin/sh
pushd ~/TI-Nspire/ncubate_emu-v032b
wine nspire_emu.exe /C /B=boot2.img.raw /F=tinspirecas_1.7.2741.bin /G=2000 &
popd
Code: [Select]
#!/bin/sh
pushd ~/TI-Nspire/ncubate_emu-v032b
wine nspire_emu.exe /B=boot2.img.raw /F=tinspire_1.7.2741.bin /G=2000 &
popd

This requires creating the .bin files first, which is, IIRC, done with the /N option.

~/TI-Nspire/ncubate_emu-v032b is the folder where I store the emulator.
Title: Re: TI-Nspire emulator
Post by: Munchor on June 05, 2011, 11:27:57 am
If this is C, can't it be compiled with GCC on Linux?
Title: Re: TI-Nspire emulator
Post by: Lionel Debroux on June 05, 2011, 11:35:45 am
The emulator uses the Windows API ;)
Title: Re: TI-Nspire emulator
Post by: ruler501 on June 05, 2011, 11:52:01 am
Do I just need to change the versions numbers for it to work with 3.0.2?
Title: Re: TI-Nspire emulator
Post by: DJ Omnimaga on June 06, 2011, 02:59:51 pm
Adding color support would be nice in the future, since acquiring a full version of the student software might not be possible for everyone. :P
Title: Re: TI-Nspire emulator
Post by: pianoman on July 08, 2011, 02:20:43 pm
I'm having some trouble with OS 3.0.1.
I get the "Install OS now" screen on the boot-up.
Did it brick the nspire_emu too (:P), or am I doing something wrong?
Title: Re: TI-Nspire emulator
Post by: Levak on July 08, 2011, 04:35:51 pm
Have you notified that the OS 3.0.2 reboots infinitively ? (tested with boot2 1.4)
Title: Re: TI-Nspire emulator
Post by: Goplat on July 09, 2011, 02:11:32 pm
Have you notified that the OS 3.0.2 reboots infinitively ? (tested with boot2 1.4)

I've noticed this. In OS 3.0.2, if you're using boot2 1.4, then it updates to boot2 3.0 and then immediately reboots (the reboot is to prevent the bricking that sometimes happened on-calc in OS 3.0.1). Of course, updating boot2 means nothing if you're using the /B option, so you'll get an infinite loop.

boot2 3.0 requires boot1 to work, and you could use the two of them together to start OS 3.0.2. (e.g. nspire_emu /1=boot1.bin /PB=boot2-3.0.img /PO=ti-nspire-3.0.2.tno) If you haven't made a boot1 dump, another way around this problem is just to use TNOC.
Title: Re: TI-Nspire emulator
Post by: Levak on July 09, 2011, 02:22:42 pm
Have you notified that the OS 3.0.2 reboots infinitively ? (tested with boot2 1.4)

I've noticed this. In OS 3.0.2, if you're using boot2 1.4, then it updates to boot2 3.0 and then immediately reboots (the reboot is to prevent the bricking that sometimes happened on-calc in OS 3.0.1). Of course, updating boot2 means nothing if you're using the /B option, so you'll get an infinite loop.
Thanks you for this clear explanation =)

Quote
another way around this problem is just to use TNOC.

Oh yeah ! I've forgot completly this method x)
This was what I've done with my OS 3.0.1 xD
Title: Re: TI-Nspire emulator
Post by: pianoman on August 07, 2011, 07:46:38 pm
How do you do a boot1 dump?
Title: Re: TI-Nspire emulator
Post by: Levak on August 07, 2011, 07:58:57 pm
How do you do a boot1 dump?
Through the dock connector.
Title: Re: TI-Nspire emulator
Post by: XVicarious on August 07, 2011, 08:00:28 pm
How aboot teh "Nulator"? "Nspire Emulator"?
Title: Re: TI-Nspire emulator
Post by: fb39ca4 on August 07, 2011, 08:12:13 pm
Or eNulator. It sounds almost the same except the m is replaced with an n.
Title: Re: TI-Nspire emulator
Post by: Deep Toaster on August 07, 2011, 09:34:07 pm
Or eNulator. It sounds almost the same except the m is replaced with an n.
Doesn't start with an N.
How do you do a boot1 dump?
If you're trying to run OS 3.0.1, just use TNOC to get rid of boot2, and use a boot2 ripped from a lower OS version. (That's how Levak showed me.)
Title: Re: TI-Nspire emulator
Post by: fb39ca4 on August 07, 2011, 09:36:15 pm
It doesn't have to start with an n. The n is emphasized by the capital anyways.
Title: Re: TI-Nspire emulator
Post by: Lionel Debroux on August 08, 2011, 12:06:48 am
Quote
Quote
How do you do a boot1 dump?
Through the dock connector.
Or somewhere else maybe.
Title: Re: TI-Nspire emulator
Post by: DJ Omnimaga on August 08, 2011, 12:22:18 am
By the way I wonder if a Nspire CX emu will ever be possible despite the boot issues mentionned in another thread? (They were encrypted or something, right?)
Title: Re: TI-Nspire emulator
Post by: bsl on August 08, 2011, 01:16:53 am
It looks like an Nspire CX emu wll have to use the boot2 that comes with the tcc/tco file, its different than the
one that comes with the tno/tnc files for boot2_3.1.131.
I get an error decompressing it , but it seems most if it is there. [I get an EOF error]
Title: Re: TI-Nspire emulator
Post by: critor on August 08, 2011, 04:58:11 am
The decoded CX Boot2 is correct.
It's just that the EOF code has been removed from that new CX Boot2.

But it then has to be decrypted, which means you need the CX Boot1.
Title: Re: TI-Nspire emulator
Post by: Goplat on August 15, 2011, 05:09:10 pm
How aboot teh "Nulator"? "Nspire Emulator"?
Or eNulator. It sounds almost the same except the m is replaced with an n.
Yeah, I probably should have given this thing a better name by now. I'm not too creative with names.
eNulator is nice, Nulator doesn't suggest the right pronounciation (without context, I would probably pronounce it null-a-tor or noo-later).

A while ago I came up with the name "TraNspire" - based on the way that I get decent emulation speed by translating ARM instructions into sequences of x86 instructions to emulate them.
Title: Re: TI-Nspire emulator
Post by: fb39ca4 on August 15, 2011, 05:10:33 pm
I like TraNspire :thumbsup:
Title: Re: TI-Nspire emulator
Post by: migasbr on November 14, 2011, 05:12:05 am
Hello all!

I'm trying to install the emulator on my non-cas nspire but I have a doubt... I followed these <a href="http://hackspire.unsads.com/wiki/index.php/Emulators#Setup">instructions</a> and reached to the point of getting emulator screen to start the installation. Now, my doubt is: Should I have the calculator plugged in at this time and the OS will be installed automatically or should I let it load, then save the flash as <name>.tno and install it using the software from Ti-Texas?...  ???


Title: Re: TI-Nspire emulator
Post by: Lionel Debroux on November 14, 2011, 05:15:04 am
I'm not sure I understand correctly your problem, but the emulator communicates neither with a real calculator, nor with TI's software (TI-Nspire Computer Link Software a.k.a "TINCLS", TI-Nspire Computer Software a.k.a "TINCS").
Title: Re: TI-Nspire emulator
Post by: migasbr on November 14, 2011, 07:13:12 am
I'm not sure I understand correctly your problem, but the emulator communicates neither with a real calculator, nor with TI's software (TI-Nspire Computer Link Software a.k.a "TINCLS", TI-Nspire Computer Software a.k.a "TINCS").

I'm sorry, but I'm still a noob in this field.. With the emulator we can use the CAS functions on a non cas spire calculator, right? And we do this by installing the emulated OS into the calculator correct? My doubt is how to install it in the calculator..
Title: Re: TI-Nspire emulator
Post by: Lionel Debroux on November 14, 2011, 07:26:39 am
I'm afraid I still don't understand what you're trying to do, but maybe I'm just thick :)

Quote
With the emulator we can use the CAS functions on a non cas spire calculator, right?
makes me think that you don't want to emulate a Nspire calculator on your computer (which you can do as described in the page you linked to, adding a /C switch to the final nspire_emu / ncubate invocation if you want to emulate a CAS calculator). Instead, I think that you want to try to use the CAS OS on your real, non-CAS Nspire calculator. Is that right ?

The nspire_emu / ncubate emulator doesn't communicate in any way with a real Nspire, and is not involved in making a real non-CAS calculator run the CAS OS.
Title: Re: TI-Nspire emulator
Post by: migasbr on November 14, 2011, 08:10:37 am
All right!! Now I know why I couldn't install it!  :P

I thought the emulator would change the original OS and make the CAS functions work on the actual non-cas calculator! But it's just a PC emulator...

Do you think it will possible someday to make the CAS work in a real calc?  that would be great!!  :thumbsup:
Title: Re: TI-Nspire emulator
Post by: Lionel Debroux on November 14, 2011, 08:43:27 am
Indeed, the third-party PC emulator is just a PC emulator, and the official TI Nspire Computer Software does not even emulate the calculator, it's a similar code base recompiled for Windows and MacOS X :)

Quote
Do you think it will possible someday to make the CAS work in a real calc?  that would be great!!
It became possible to hot-launch "other" OS during the spring of 2010, but "RunOS" was never released, for fear TI would lock down the calculators even further.
About one year later, and after TI added lots of lockdown, an independent reimplementation of RunOS was released as OSLauncher, which you can download from http://www.ticalc.org/archives/files/fileinfo/437/43701.html . OSLauncher itself did obviously not mention the dirty little secret that it could launch the CAS OS on the Nspire sold as non-CAS (but perfectly CAS-capable), but critor made a tutorial, which dramatically raised both usefulness and public awareness of OSLauncher. It can be downloaded from TI-Planet (http://tiplanet.org/forum/archives_voir.php?id=3517) , the required OS can be downloaded from TI-Planet again (http://tiplanet.org/forum/archives_list.php?id=OS%20Nspire), and you'll have to somehow find the "imgdump" tool :)

Several notes:
* OSLauncher requires Ndless 2.0, so it will work only on Clickpad & Touchpad calculators running OS 1.7.2741, 2.0.1.60 or 2.1.0.631;
* Ndless and OSLauncher must be launched again after every reboot;
* as is, OSLauncher cannot be used to cheat in standardized tests, unless said tests do not use the built-in Press To Test functionality (which triggers a reboot);
* due to changes in internal files across versions, it can launch only an OS of the same version as the host OS (1.7.2741, 2.0.1.60, 2.1.0.631);
* there will be some glitches, e.g. CAS functions not appearing in the functions catalog, odd display of the HOME screen on OS 1.7, etc.;
* and most of all, hot-launching the CAS OS on models sold as non-CAS can be extremely picky. It seems that it either works on the first or second try, or it might just happen to work, if you're lucky, after dozens of attempts...
Title: Re: TI-Nspire emulator
Post by: migasbr on November 14, 2011, 11:58:03 am
Thanks a lot for the info Lionel!   :thumbsup:

I will definitely give it a try! If by any chance the OSLAuncher doesn't work properly or if I decide to go back to the original OS, I can install it with no problems, right?
Title: Re: TI-Nspire emulator
Post by: Lionel Debroux on November 14, 2011, 12:28:44 pm
OSLauncher just launches the other OS, it does not install it in any way; just reboot the calculator and the effect of OSLauncher is gone :)
Title: Re: TI-Nspire emulator
Post by: migasbr on November 14, 2011, 01:37:44 pm
That's good news!  :D

I'll try it and will give my feedback!  :thumbsup:
Title: Re: TI-Nspire emulator
Post by: lkj on November 14, 2011, 02:08:02 pm
Is anyone making a CX emulator? Or is it similar enough to the old Nspire that it would be just an update with some changes of the nspire emulator?
Title: Re: TI-Nspire emulator
Post by: Lionel Debroux on November 14, 2011, 02:23:43 pm
Quote
Is anyone making a CX emulator?
For now, no, because:

Quote
Or is it similar enough to the old Nspire that it would be just an update with some changes of the nspire emulator?
The CX hardware is presumably reasonably similar to the Touchpad hardware (besides the difference in bpp for the screen), but there's a significant software difference: as mentioned by critor above, unlike the boot2 in Clickpad & Touchpad calculators, the boot2 in the CX is partially encrypted, and decrypted by the boot1.
This extra step is the cause of the noticeable delay (sigh) between 50% and 60% on the progress bar, a delay which doesn't exist on the older models...

In order to work correctly, an emulator for the CX would therefore require a boot1 image (*), unlike an emulator for the Clickpad & Touchpad... but the problem is, how to get that boot1 image ?
1) dumping the boot1 requires an arbitrary code execution exploit;
2) this hurdle will eventually be overcome in the future (like on pretty much any closed platform in the past two decades), but the result cannot be redistributed: the boot1 contains TI's copyrighted code...

Because of 2), users of a hypothetical CX emulator will have to go through the extra steps of dumping the boot1 of their own CX... but they cannot do that at the time of this writing, because there's no Ndless 3.0...


(*): embedding the boot2 decryption code into the emulator is not possible: circumventing protection measures would easily fall under the DMCA, and this time, TI would have a better case than they did for the signing key fiasco.
Title: Re: TI-Nspire emulator
Post by: DJ Omnimaga on November 14, 2011, 02:26:52 pm
So I'm betting there could be a Nspire CX emu, but finding the boot1 images or roms will be a major PITA, leading to many forum posts asking where can we find them?
Title: Re: TI-Nspire emulator
Post by: Lionel Debroux on November 14, 2011, 03:05:07 pm
Yeah, we'll probably have to tell a significant number of people that they need to perform their own dumps, when they can.
Title: Re: TI-Nspire emulator
Post by: ExtendeD on November 15, 2011, 08:28:13 am
(*): embedding the boot2 decryption code into the emulator is not possible: circumventing protection measures would easily fall under the DMCA, and this time, TI would have a better case than they did for the signing key fiasco.

Would it be more than a few calls to OpenSSL functions?
Title: Re: TI-Nspire emulator
Post by: Lionel Debroux on November 15, 2011, 10:55:46 am
If it's similar to the other pieces of the encryption infrastructure, indeed, decrypting the boot2 wouldn't require more than several calls to OpenSSL functions. However, my understanding is that even distributing the decryption key(s ?) isn't perfectly legal in some countries (for questionable reasons, but it's the law) :(
Title: Re: TI-Nspire emulator
Post by: lkj on November 15, 2011, 11:32:25 am
Quote
(*): embedding the boot2 decryption code into the emulator is not possible: circumventing protection measures would easily fall under the DMCA, and this time, TI would have a better case than they did for the signing key fiasco.
But aren't the os update files (.tnc/.tno) also encrypted in a weird way? And the imgdump tool was distributed without legal problems?

Quote
2) this hurdle will eventually be overcome in the future (like on pretty much any closed platform in the past two decades), but the result cannot be redistributed: the boot1 contains TI's copyrighted code...
I know the old boot1 was available on the internet because I've downloaded it myself, but that's certainly illegal.
Title: Re: TI-Nspire emulator
Post by: Lionel Debroux on November 15, 2011, 11:43:49 am
Quote
But aren't the os update files (.tnc/.tno) also encrypted in a weird way?
They're ZIP files with a weird header; the boot2 (if any) is compressed with a non-standard format; the OS is encrypted with a symmetric cipher whose name evocates fish.

Quote
And the imgdump tool was distributed without legal problems?
Well, the original author of imgdump removed all references to imgdump from his own posts, and all copies of imgdump able to decrypt the OS.
Title: Re: TI-Nspire emulator
Post by: lkj on November 15, 2011, 12:01:38 pm
So this means the current imgdump can't produce phoenix.raw files anymore?
Title: Re: TI-Nspire emulator
Post by: Lionel Debroux on November 15, 2011, 01:58:57 pm
The version of imgdump that supports only the boot2 decompression cannot produce phoenix.raw files anymore, indeed.
The other method for decompressing a Clickpad/Touchpad OS, which involves running the Clickpad/Touchpad boot2 in an arm-none-eabi-gdb, keeps working.
Title: Re: TI-Nspire emulator
Post by: lkj on November 15, 2011, 03:42:59 pm
Then I myself have a copy of the old imgdump.
Title: Re: TI-Nspire emulator
Post by: Lionel Debroux on November 15, 2011, 03:52:45 pm
Keep it preciously :)
Even if it wouldn't help for CX and CM OS, since they have got different decryption keys, one unique key per {calculator type, OS version} pair.
Title: Re: TI-Nspire emulator
Post by: migasbr on November 18, 2011, 12:26:56 pm
OSLauncher just launches the other OS, it does not install it in any way; just reboot the calculator and the effect of OSLauncher is gone :)

So I tried do install the OSLauncher... But because I'm a NOOBBB... I updated the SO when I purchase the calc... That means right now I have the "deadly" SO 3.1 and I'm stuck!...

I tried to find a solution to do a downgrade with this SO and found a software called TNOC that claims that removes the boot2 from the SO and generates a new file without the boot2. Tried that and installed the SO generated by TNOC but didn't find any difference and couldn't do the downgrade..

Then I also read that there is a way to "crash" the SO by installing it and during the instalation, swap the keypad to the TI-84 and swap back again.. or something like that..
That should crash the SO and then should be able to install any SO.. Well, I don't have the TI-84 keypad to try this, but I notice that Texas in Portugal was offering these keypads to whom purchased an Nspire calc... But that promotion was only untill June! (how lucky am I?...  <_< )... I've sent the coupon anyways, together with a nice letter see if I can convice them to send me the keypad!....  ::)

In the meantime, do you have any other sugestions of how to "kill the beast" SO 3.1?... 
Title: Re: TI-Nspire emulator
Post by: Lionel Debroux on November 18, 2011, 12:41:37 pm
Quote
That means right now I have the "deadly" SO 3.1 and I'm stuck!...
Yes, completely stuck, at the time of this writing...

Quote
I tried to find a solution to do a downgrade with this SO and found a software called TNOC that claims that removes the boot2 from the SO and generates a new file without the boot2. Tried that and installed the SO generated by TNOC but didn't find any difference and couldn't do the downgrade..
Well, TNOC avoids installation of the newer boot2 (with more lockdown) on calculators that still have the old boot2, but is obviously powerless for calculators which already received said newest boot2 through unmodified OS upgrades :)

Quote
Then I also read that there is a way to "crash" the SO by installing it and during the instalation, swap the keypad to the TI-84 and swap back again.. or something like that.. That should crash the SO and then should be able to install any SO.
No, not at all: even if you erase the OS completely, the anti-downgrade protection enforced by the boot2 won't allow you to downgrade to any OS version supported by Ndless - and thus, to use OSLauncher.

Quote
In the meantime, do you have any other sugestions of how to "kill the beast" SO 3.1?...
I don't, because there's no way to do that ;)
Title: Re: TI-Nspire emulator
Post by: renatose on November 18, 2011, 01:50:53 pm
Couldn't the downgrade be done using a TTL connection?

EDIT: if migasbr is in the region of Lisbon I can help him doing that, because I've got one.
Title: Re: TI-Nspire emulator
Post by: Jim Bauwens on November 18, 2011, 01:56:46 pm
I think its possible to downgrade the boot2 through the serial port (TTL), and then use downgradefix to remove 3.1.
But I'm not entirely sure.
Title: Re: TI-Nspire emulator
Post by: Lionel Debroux on November 18, 2011, 03:27:30 pm
If you manage to downgrade the boot2 to 1.4, indeed, you can use DowngradeFix, and the serial port lets this downgrade happen (critor did it on Levak's calculator shortly after the release of OS 3.0.1.1753)... but only a tiny minority of people have a USB TTL adapter, and I focused on solutions that don't require extra hardware.

I stand corrected, though - I should have mentioned the serial port :)
Title: Re: TI-Nspire emulator
Post by: renatose on November 18, 2011, 06:25:50 pm
I won't risk putting boot2 v3.xxx on my nspire cuz I don't want to live with the impossibility to downgrade to OS 2.1 however it looks that ndless3 is near from being out. So maybe it is wiser to wait a while and try all Lua programs out there until it is out that to spend the time and effort on downgrading for nothing...
Title: Re: TI-Nspire emulator
Post by: migasbr on November 18, 2011, 07:17:00 pm
Thank you all for the suggestions! At least there's some light at the end of the tunnel.. a very weak one, though..

I won't risk putting boot2 v3.xxx on my nspire cuz I don't want to live with the impossibility to downgrade to OS 2.1 however it looks that ndless3 is near from being out. So maybe it is wiser to wait a while and try all Lua programs out there until it is out that to spend the time and effort on downgrading for nothing...

I actually thought about that possibility... An update that will allow to go around the lockdown... We'll see what the "Gurus" come up with!.. :)

You're right! Don't to the upgrade! You loose too much and you gain almost nothing...   <_<
Title: Re: TI-Nspire emulator
Post by: renatose on November 18, 2011, 07:34:46 pm
anyway I have the OS 3.0.2 with the boot2 1.4 this way I can downgrade easily if I want/need and I am using the last major OS version without major bugs but with 3D graphing and lua games :P
Title: Re: TI-Nspire emulator
Post by: njaddison on November 19, 2011, 05:59:32 pm
When I open nspire_emu, a DS-MOS batch file pops up for about 1 second, and then closes out. What is wrong?
Title: Re: TI-Nspire emulator
Post by: Jonius7 on November 19, 2011, 06:00:34 pm
um yeah it's command line so you have to use it with commands, which is why it disappears. I usually use a batch file made by Levak to help. Ill post it on soon
But here are the basic setup instructions here (link from Deep Thought):
http://hackspire.unsads.com/wiki/index.php/Emulators#Setup
Title: Re: TI-Nspire emulator
Post by: Goplat on January 19, 2012, 04:00:06 pm
Here is the version capable of emulating the CX. Use the /M switch to specify the model of calculator to emulate:
/MC for CAS
/MX for CX
/MXC for CX CAS
/MM for CM
/MMC for CM CAS
For the CX/CM models, you can change the size of SDRAM to 64MB with the /R switch, and the size of NAND flash to 128MB with /N. (Both options are off by default just because they use a lot of memory and most programs won't need them)
Title: Re: TI-Nspire emulator
Post by: Jim Bauwens on January 19, 2012, 04:12:59 pm
Thank you!
Title: Re: TI-Nspire emulator
Post by: Wayne on January 20, 2012, 01:05:42 pm
Does it support the TI-NspireCAS-3.1.0.392.tnc ?
Title: Re: TI-Nspire emulator
Post by: Lionel Debroux on January 20, 2012, 01:10:49 pm
Yes, it does :)
Title: Re: TI-Nspire emulator
Post by: ExtendeD on January 20, 2012, 01:40:00 pm
Thanks again Goplat, Ndless wouldn't have been possible without it.
Title: Re: TI-Nspire emulator
Post by: Wayne on January 20, 2012, 01:43:53 pm
Code: [Select]
nspire_emu.exe /MC /N /F=emu.bin /PO=c:\nspire.tncThat's the command, isnt't it?
Title: Re: TI-Nspire emulator
Post by: Scipi on January 20, 2012, 01:51:01 pm
Code: [Select]
nspire_emu.exe /MC /N /F=emu.bin /PO=c:\nspire.tnc
That's the command, isnt't it?

What model are you trying to emulate, and what commands are you using? Perhaps we could help. :D

Edit: What error are you getting as well?
Title: Re: TI-Nspire emulator
Post by: Goplat on January 20, 2012, 02:19:36 pm
Code: [Select]
nspire_emu.exe /MC /N /F=emu.bin /PO=c:\nspire.tnc
I got rid of /N because it just adds an extra unnecessary step to the goal of creating a flash image with the OS installed. Here's a quick guide to getting set up without it.

TI-Nspire or TI-Nspire CAS, starting at boot2: (this will work with boot2 version 1.4 only; boot2 version 3.0 requires that you start at boot1. The newest OSes require boot2 version 3.0 unless you TNOC them.)
First run (non-CAS): nspire_emu /B=boot2.raw /PO=os.tno
First run (CAS): nspire_emu /B=boot2.raw /MC /PO=os.tnc
After installation is complete, go to "File -> Save As..." to save flash image
Subsequent runs: nspire_emu /B=boot2.raw /F=flashimage

TI-Nspire or TI-Nspire CAS, starting at boot1: (note that you must use the original boot2.img; don't decompress it)
First run (non-CAS): nspire_emu /1=boot1.raw /PB=boot2.img /PO=os.tno
First run (CAS): nspire_emu /1=boot1.raw /MC /PB=boot2.img /PO=os.tnc
After installation is complete, go to "File -> Save As..." to save flash image
Subsequent runs: nspire_emu /1=boot1.raw /F=flashimage

TI-Nspire CX or TI-Nspire CX CAS, starting at boot1: (this is the only way to run a CX OS - all versions of the CX boot2 require that you start at boot1. Again, you must use the original boot2.img; don't decompress it)
First run (non-CAS): nspire_emu /1=boot1cx.raw /MX /PB=boot2cx.img /PO=os.tco
First run (CAS): nspire_emu /1=boot1cx.raw /MXC /PB=boot2cx.img  /PO=os.tcc
After installation is complete, go to "File -> Save As..." to save flash image
Subsequent runs: nspire_emu /1=boot1cx.raw /F=flashimage
Title: Re: TI-Nspire emulator
Post by: Wayne on January 20, 2012, 02:58:28 pm
Thanks.
Code: [Select]
nspire_emu /B=boot2.raw /MC /PO=os.tnc(http://t.imgbox.com/aazw3n7Q.jpg) (http://imgbox.com/aazw3n7Q)
Who wants to help me with the problem?

Title: Re: TI-Nspire emulator
Post by: Reo on January 20, 2012, 03:50:39 pm
Is it possible to use the touchpad at all in CX emulation? Clicking the screen doesn't seem to work, so I was hoping I'm missing something important.
Title: Re: TI-Nspire emulator
Post by: calc84maniac on January 20, 2012, 03:52:53 pm
You can use the arrow keys to simulate pressing the touchpad in a certain spot. I'm not aware of any way to do anything more than that (even clicking!)
Title: Re: TI-Nspire emulator
Post by: sammyMaX on January 20, 2012, 04:30:37 pm
Please update the first page (which still gives version 0.53)

My advice for emulation is to download every single OS available, and keep it. (You never know when it might be useful.) I also have a shortcut to nspire_emu.exe for every single OS (each with different parameters), so I don't have to go into the console every single time I want to emulate the Nspire.
Title: Re: TI-Nspire emulator
Post by: Lionel Debroux on January 21, 2012, 02:48:15 am
Yeah, those are very sound suggestions indeed: download every version you can find, and make batch files to ease your life :)
Title: Re: TI-Nspire emulator
Post by: DJ Omnimaga on January 21, 2012, 04:48:08 am
This project definitively could use a sub-forum (especially for help), plus it deserves one.
Title: Re: TI-Nspire emulator
Post by: Wayne on January 21, 2012, 01:00:52 pm
Yes, it does :)
How did you do it?
Code: [Select]
nspire_emu.exe /MC /N /F=emu.bin /PO=c:\nspire.tnc
That's the command, isnt't it?

What model are you trying to emulate, and what commands are you using? Perhaps we could help. :D

Edit: What error are you getting as well?
I try to emulate the Touchpad CAS version with the command in your quote. I didn't get any error.
Title: Re: TI-Nspire emulator
Post by: annoyingcalc on January 22, 2012, 10:19:19 pm
Wow this works perfectly on my cx
Title: Re: TI-Nspire emulator
Post by: Scipi on January 23, 2012, 10:48:17 am
Quote
I try to emulate the Touchpad CAS version with the command in your quote. I didn't get any error.

Does it say anything in cmd? Also, the CX or the Original?
Title: Re: TI-Nspire emulator
Post by: Wayne on January 23, 2012, 04:50:34 pm
Thanks, but I solved it by myself ;)
I only need to know how to open a document or ndless in the emulator?

regards Wayne
Title: Re: TI-Nspire emulator
Post by: annoyingcalc on January 23, 2012, 08:26:27 pm
hit the option link and select your file
Title: Re: TI-Nspire emulator
Post by: Wayne on January 24, 2012, 11:19:23 am
It doesn't work.
Title: Re: TI-Nspire emulator
Post by: Cuervo on January 24, 2012, 11:58:37 am
Very nice..
It does not run extremely well in Wine..^^

Any plans to make this not Windows-only?
I know Xspire made that for GTK+, but it's outdated..
Title: Re: TI-Nspire emulator
Post by: Lionel Debroux on January 24, 2012, 01:06:56 pm
In my experience, nspire_emu works well in Wine, like many Windows programs anyway. Certainly well enough for nobody to bother maintaining non-Windows versions.
What doesn't work for you ? :)
Title: Re: TI-Nspire emulator
Post by: ExtendeD on January 24, 2012, 01:24:36 pm
Thanks, but I solved it by myself ;)
I only need to know how to open a document or ndless in the emulator?

regards Wayne

Set the target directory, use the Connect option, then use the Send file option.
Title: Re: TI-Nspire emulator
Post by: Cuervo on January 24, 2012, 01:59:21 pm
In my experience, nspire_emu works well in Wine, like many Windows programs anyway. Certainly well enough for nobody to bother maintaining non-Windows versions.
What doesn't work for you ? :)

Well..
In most cases I can start the OS, but sometimes it crashes, like here:
(http://www.fanofblitzbasic.de/imgs/nspire_emu_wine_1.png)

In most cases I can't reload Flash Memory I saved.

When emulating classic-OS (grayscale) it is required to enter the debugger, enter n 6 times and then continue execution to make it load, otherwise I get the same error as in the image.

Can you tell me why I can't compile the .S-File?
Code: [Select]
gcc -m32 -c asmcode.S -o asmcode.o
asmcode.S:204:Rest of line ignored. 1st junk character valued 64 (@).
asmcode.S:205:Alignment too large: 15. assumed.
asmcode.S:206:Junk character 64 (@).
asmcode.S:206:Rest of line ignored. 1st junk character valued 114 (r).
asmcode.S:229:invalid char '@' beginning operand 1 `@mmio_read_byte@4'
asmcode.S:232:invalid char '@' beginning operand 1 `@read_byte@4'
asmcode.S:235:Rest of line ignored. 1st junk character valued 64 (@).
asmcode.S:236:Alignment too large: 15. assumed.
asmcode.S:237:Junk character 64 (@).
asmcode.S:237:Rest of line ignored. 1st junk character valued 114 (r).
asmcode.S:259:invalid char '@' beginning operand 1 `@read_align_fail@4'
asmcode.S:263:invalid char '@' beginning operand 1 `@mmio_read_half@4'
asmcode.S:266:invalid char '@' beginning operand 1 `@read_half@4'
asmcode.S:269:Rest of line ignored. 1st junk character valued 64 (@).
asmcode.S:270:Alignment too large: 15. assumed.
asmcode.S:271:Junk character 64 (@).
asmcode.S:271:Rest of line ignored. 1st junk character valued 114 (r).
asmcode.S:291:invalid char '@' beginning operand 1 `@read_align_fail@4'
asmcode.S:295:invalid char '@' beginning operand 1 `@mmio_read_word@4'
asmcode.S:298:invalid char '@' beginning operand 1 `@read_word@4'
asmcode.S:318:Rest of line ignored. 1st junk character valued 64 (@).
asmcode.S:319:Alignment too large: 15. assumed.
asmcode.S:320:Junk character 64 (@).
asmcode.S:320:Rest of line ignored. 1st junk character valued 119 (w).
asmcode.S:343:invalid char '@' beginning operand 1 `@mmio_write_byte@8'
asmcode.S:346:invalid char '@' beginning operand 1 `@write_byte@8'
asmcode.S:349:Rest of line ignored. 1st junk character valued 64 (@).
asmcode.S:350:Alignment too large: 15. assumed.
asmcode.S:351:Junk character 64 (@).
asmcode.S:351:Rest of line ignored. 1st junk character valued 119 (w).
asmcode.S:373:invalid char '@' beginning operand 1 `@write_align_fail@4'
asmcode.S:377:invalid char '@' beginning operand 1 `@mmio_write_half@8'
asmcode.S:380:invalid char '@' beginning operand 1 `@write_half@8'
asmcode.S:383:Rest of line ignored. 1st junk character valued 64 (@).
asmcode.S:384:Alignment too large: 15. assumed.
asmcode.S:385:Junk character 64 (@).
asmcode.S:385:Rest of line ignored. 1st junk character valued 119 (w).
asmcode.S:405:invalid char '@' beginning operand 1 `@write_align_fail@4'
asmcode.S:409:invalid char '@' beginning operand 1 `@mmio_write_word@8'
asmcode.S:412:invalid char '@' beginning operand 1 `@write_word@8'
make: *** [asmcode.o] Error 1


TIA,
Cuervo
Title: Re: TI-Nspire emulator
Post by: Lionel Debroux on January 24, 2012, 02:32:05 pm
Your screenshots show that you're using MacOS X, where "gcc" is a quite old, and heavily patched, version of GCC, which will produce executables targetting MacOS X.
But what you want to do is to cross-compile, producing executables targetting Windows ;)
On Debian, installing a Win32/64 SDK takes only several clicks... but on MacOS X, unless someone provides ready-made DMG, it's probably going to be a major pain for you to install.

BTW, Goplat: when running "make" after replacing "gcc" with "$(CC)", where "CC = i686-w64-mingw32-gcc", and "windres" with "$(WINDRES)" where "WINDRES = i686-w64-mingw32-windres", i686-w64-mingw32-windres spits out:
Code: [Select]
i686-w64-mingw32-windres -v resource.rc -o resource.o
i686-w64-mingw32-windres: resource.rc:52: syntax error

Running it with -v provides the following additional clues:
Code: [Select]
Using `i686-w64-mingw32-gcc -E -xc -DRC_INVOKED  resource.rc'
Using popen to read preprocessor output

Running that command shows that DS_MODALFRAME and DS_CENTER are left unchanged by the preprocessor, so the SDK doesn't know about them. Ditto for IDOK and IDCANCEL at lines 57 and 58.

Those errors can be fixed by #include <windows.h> instead of just #include <winuser.h> :)
Title: Re: TI-Nspire emulator
Post by: Cuervo on January 24, 2012, 02:58:08 pm
Your screenshots show that you're using MacOS X, where "gcc" is a quite old, and heavily patched, version of GCC, which will produce executables targetting MacOS X.
But what you want to do is to cross-compile, producing executables targetting Windows ;)
On Debian, installing a Win32/64 SDK takes only several clicks... but on MacOS X, unless someone provides ready-made DMG, it's probably going to be a major pain for you to install.

I do have a mingw32-crosscompiler installed, but I do not want to do cross-compiling. As only very few files in nspire_emu contain Windows-specific code I was thinking about trying to replace them. But I am not able to write Assember-code. I never learned it.
I can also use gcc 4.6.2 for compiling, but it makes no difference. No wonder, because gcc just calles "as". I'll try to update it as it is not installed with binutils but cctools on Mac OS X..-.- Ok, that's really stupid. I already updated my binutils to 2.21..-.-
Title: Re: TI-Nspire emulator
Post by: Jim Bauwens on January 24, 2012, 04:10:04 pm
I have the same problem when trying to compile nspire_emu on Linux, not cross compiling but using the windows.h of wine.
Replace the @'s in asmcode.S with _'s works, but this will cause it to error in a later process.
Title: Re: TI-Nspire emulator
Post by: hoffa on January 24, 2012, 04:27:17 pm
There is an issue with documents not always sending although the user pressed "Connect". Although it's a bit of a surface fix, at least now every document should be sent once it's connected. (file attached)
It seems to have actually caused more of exactly what it was supposed to fix, at least on my side. Removed the attachment.
Title: Re: TI-Nspire emulator
Post by: Jonius7 on February 20, 2012, 12:31:00 am
EDITNOTE: I take some of what I said back.

As of nspire_emu_060, I think I need some explanation/help.
I decided to experiment more with this version since it is a major release, and start from scratch extracting boot2,files etc.
However when it came to creating a rom, it didn't work the same way it did in v053.
Some commands have changed since 053 and 060 (see screenshot)
Digging into Levak's batch file (from 2+ years ago, and I have edited for my own purposes), I found the /N command was used to create the rom image and it is different now as /N stands for Nand Flash (also was confused about what that meant until I read the v060 post today).
So as of v060, is there any way to create the rom using the command line nspire_emu.exe?

I could just run with boot 2 and install the OS and Save the flash within the emulator window, but since the /N does not mean create a new image anymore, is there any other way?
EDIT: I think /PB and /PO do the job, tho I'm not exactly sure what they do.

I may write a tutorial myself and put it in the Omnimaga Tutorials section for convenience.

Though, this is a great guide: http://hackspire.unsads.com/wiki/index.php/Emulators#Setup


Thanks everyone,
Jonius7
Title: Re: TI-Nspire emulator
Post by: Jonius7 on February 25, 2012, 05:49:23 am
Never mind I created a rom image using the way I said above, install OS and save Flash in the File-> menu. But it's a shame I can't create it directly commandline anymore. At least I think I can't
Title: Re: TI-Nspire emulator
Post by: Jonius7 on February 25, 2012, 07:03:37 pm
To put it directly, as of nspire_emu_060, there is no way to create and save a flash image in the Windows directory directly from the command line (nspire_emu.exe) anymore? You have to press file, Save Flash as from the emulator window?

Never mind, I found it somewhere in this thread. Perhaps all of this could be put on the first post?
Title: Re: TI-Nspire emulator
Post by: cyanophycean314 on March 02, 2012, 05:24:31 pm
Question: I have some code programmed with the notes application on the Nspire CX. I sent it through TiLP to my computer. Then I opened it with nspire_emu. Is there any way I can get the code out? Copying and pasting like with student software doesn't work...

Thank you!
Title: Re: TI-Nspire emulator
Post by: Jim Bauwens on March 02, 2012, 05:57:43 pm
It's hard, but possible. It involves setting a breakpoint in nspire_emu and dumping the xml in a file.
You can find the exact details on Ndlessy (can't link now since I'm on my phone).

If you don't get it working, send me the file and I'll extract the code out of it tomorrow :)
Title: Re: TI-Nspire emulator
Post by: cyanophycean314 on March 02, 2012, 09:34:12 pm
Would it be possible to use this notepad program http://ourl.ca/8679 (http://ourl.ca/8679) to create a .txt, then somehow save or "send" the document back onto the computer in a compatible format (for editing with Notepad++ per se)?

I didn't find the breakpoint and xml thingy...

I'll PM you the document, good luck and Thank you!

Edit: I guess you can't PM attachments, so um, I guess I'll just post it.
Title: Re: TI-Nspire emulator
Post by: Jonius7 on March 02, 2012, 11:46:48 pm
that would be mighty useful, to extract what you had typed in a Notes app into a .txt file onto your computer. And vice versa.
Title: Re: TI-Nspire emulator
Post by: Lionel Debroux on March 03, 2012, 01:37:16 am
Another way to get files off nspire_emu/Ncubate is to make a program that outputs the file to the RS232 port.
Title: Re: TI-Nspire emulator
Post by: bsl on March 03, 2012, 02:26:35 am
Another way is to open and load any file into a high memory location and use the debugger dump utility
The attached program does that, and breaks into the debugger for you.
You will have to concatenate the files made.





Title: Re: TI-Nspire emulator
Post by: Jim Bauwens on March 03, 2012, 06:11:10 am
Ok, the code is attached.
Since I run an OS in nspire_emu that doesn't support ndless, I sadly can't use bsl's or Lionel's way.
What I do is copy the content I need to the clipboard (of the nspire) and then dump the memory of nspire_emu using gcore :P
Sounds strange, but works good for me :P
Then I just use a hex editor to find the offset of the data and use dd to get it :)
Title: Re: TI-Nspire emulator
Post by: bsl on March 03, 2012, 10:50:36 am
easier yet:
debug> w nspirememory.bin 10000000 2000000

Then you dont have to look at the rest of the emulator code only what you are interested in.
Title: Re: TI-Nspire emulator
Post by: Jim Bauwens on March 03, 2012, 10:53:20 am
"w" never worked for me when using wine. It always creates and empty document, whatever I do :(
Title: Re: TI-Nspire emulator
Post by: cyanophycean314 on March 03, 2012, 10:20:54 pm
Thanks for the source, jimbauwens! I'm not using Ubuntu right now, so I don't think I can use gcore...

easier yet:
debug> w nspirememory.bin 10000000 2000000

Then you dont have to look at the rest of the emulator code only what you are interested in.
When I looked at nspirememory.bin through notepad, I got random symbols.

Another way to get files off nspire_emu/Ncubate is to make a program that outputs the file to the RS232 port.
I wouldn't know how to program something that would output through RS232. Not entirely sure what it is...  :P

Isn't there just a way to save a document outside of nspire_emu?
Title: Re: TI-Nspire emulator
Post by: cyanophycean314 on March 05, 2012, 05:40:49 pm
Sorry for the doublepost, but I just realized something really simple. You could just run Notepad, send the .txt file to your computer and then remove the .tns extension! I'm so stupid...  :banghead:  :banghead:

The only problem with that is notepad doesn't work on ndless 3.1...
Title: Re: TI-Nspire emulator
Post by: Jonius7 on March 06, 2012, 04:13:40 am
A few things about nspire_emu as of present.
The clickpad is fine but the Touchpad is horribly mapped to the keyboard. Nearly every key I press is wrongly mapped. I suspect this has been a problem for quite a while, and it's a shame I can't really try out the touchpad.
I plan to release my personal edited versions of Levak's batch file scripts that work with v060, if that's fine.
Title: Re: TI-Nspire emulator
Post by: Levak on March 06, 2012, 05:08:55 am
A few things about nspire_emu as of present.
The clickpad is fine but the Touchpad is horribly mapped to the keyboard. Nearly every key I press is wrongly mapped. I suspect this has been a problem for quite a while, and it's a shame I can't really try out the touchpad.
I plan to release my personal edited versions of Levak's batch file scripts that work with v060, if that's fine.
I've got one optimized for the Linux version.
I just didn't get the time to redo them all :D

Code: [Select]
#!/bin/bash

# Répertoire absolu du fichier
RELPAT="$(dirname $0)"

function menup {
select_menup=$(zenity --list --title="Menu Principal" \
--text="Veuillez choisir un item" \
--column="select" --column=" " \
"quit" "Quitter" \
"tnc" "TI-nSpire CAS" \
"tno" "TI-nSpire" \
"tcc" "TI-nSpire CAS CX" \
"tco" "TI-nSpire CX" \
"binrun" "Fichier bin" \
"aide" "Aide" \
--hide-column="1" \
--height="300" \
--width="500");
}

function calc {
# $1 = tnc tno tcc tco
if [ "$1" = "tno" ]; then
select_menuc=$(zenity --list --title="Menu TI-nSpire" \
--text="Veuillez choisir un item" \
--column="select" --column=" " \
"return" "Retour" \
"extboot2" "Extraire le boot2" \
"rom" "Créer une ROM" \
"runb1" "Lancer une ROM sur le boot1" \
"runb2" "Lancer une ROM sur le boot2" \
"run84b1" "Lancer une ROM en mode 84+ sur le boot1" \
"run84b2" "Lancer une ROM en mode 84+ sur le boot2" \
"dump" "Dumper un classeur (Ctrl+S -- dump.xml)" \
--hide-column="1" \
--height="300" \
--width="500");
else
select_menuc=$(zenity --list --title="Menu TI-nSpire" \
--text="Veuillez choisir un item" \
--column="select" --column=" " \
"return" "Retour" \
"extboot2" "Extraire le boot2" \
"rom" "Créer une ROM" \
"runb1" "Lancer une ROM sur le boot1" \
"runb2" "Lancer une ROM sur le boot2" \
--hide-column="1" \
--height="300" \
--width="500");
fi
}


function binrun {
binfile=$(zenity --file-selection --title="Sélectionnez un fichier *.bin"  --height="30" --width="500"  --filename="$RELPAT/");
if [ "$binfile" ]; then
"$RELPAT"/nspire_emu.exe /B="$binfile"
fi
}

function extboot2 {
clear
echo "#####################################################"
echo "#           Extraire le Boot2 de boot2.img          #"
echo "#####################################################"
wine "$RELPAT"/imgdump.exe boot2.img
}

function rom {
# $1 = tnc tno tcc tco
os=$(zenity --file-selection --title="Sélectionnez un fichier *.$1" --filename="$RELPAT/");
if [ "$os" ]; then
if [ "${os##*.}" = "$1" ]; then
rom=$(zenity --file-selection --title="Enregistrer une ROM" --save --confirm-overwrite --filename="$RELPAT/");
if [ "$rom" ]; then
if [ "${rom##*.}" != "rom" ]; then
rom="$rom.rom"
fi
if [ "$1" = "tno" ]; then
"$RELPAT"/nspire_emu.exe /F="$rom" /N /PB=boot2.img /PO="$os"
elif [ "$1" = "tnc" ]; then
"$RELPAT"/nspire_emu.exe /F="$rom" /N /PB=boot2.img /PO="$os" /C
elif [ "$1" = "tco" ]; then
"$RELPAT"/nspire_emu.exe /F="$rom" /N /PB=boot2.img /PO="$os" /X
elif [ "$1" = "tcc" ]; then
"$RELPAT"/nspire_emu.exe /F="$rom" /N /PB=boot2.img /PO="$os" /C /X
fi
fi
else
zenity --error --title="Erreur" --text="Veuillez sélectionner un fichier *.$1 et pas autre chose ! \n Opération annulée"
fi
fi
}

function runb1 {
# $1 = tnc tno tcc tco
rom=$(zenity --file-selection --title="Sélectionnez un fichier *.rom" --filename="$RELPAT/");
if [ "$rom" ]; then
if [ "${rom##*.}" = "rom" ]; then
boot1=$(zenity --file-selection --title="Sélectionnez un fichier BOOT1" --filename="$RELPAT/");
if [ "$boot1" ]; then
if [ "$1" = "tno" ]; then
"$RELPAT"/nspire_emu.exe /F="$rom" /1="$boot1"
elif [ "$1" = "tnc" ]; then
"$RELPAT"/nspire_emu.exe /F="$rom" /1="$boot1" /C
elif [ "$1" = "tco" ]; then
"$RELPAT"/nspire_emu.exe /F="$rom" /1="$boot1" /X
elif [ "$1" = "tcc" ]; then
"$RELPAT"/nspire_emu.exe /F="$rom" /1="$boot1" /C /X
fi
fi
else
zenity --error --title="Erreur" --text="Veuillez sélectionner un fichier *.rom et pas autre chose ! \n Opération annulée"
fi
fi
}

function runb2 {
# $1 = tnc tno tcc tco
rom=$(zenity --file-selection --title="Sélectionnez un fichier *.rom" --filename="$RELPAT/");
if [ "$rom" ]; then
if [ "${rom##*.}" = "rom" ]; then
if [ "$1" = "tno" ]; then
"$RELPAT"/nspire_emu.exe /F="$rom" /B=boot2.img.raw
elif [ "$1" = "tnc" ]; then
"$RELPAT"/nspire_emu.exe /F="$rom" /B=boot2.img.raw /C
elif [ "$1" = "tco" ]; then
"$RELPAT"/nspire_emu.exe /F="$rom" /B=boot2.img.raw /X
elif [ "$1" = "tcc" ]; then
"$RELPAT"/nspire_emu.exe /F="$rom" /B=boot2.img.raw /C /X
fi
else
zenity --error --title="Erreur" --text="Veuillez sélectionner un fichier *.rom et pas autre chose ! \n Opération annulée"
fi
fi
}

function run84b1 {
rom=$(zenity --file-selection --title="Sélectionnez un fichier *.rom" --filename="$RELPAT/");
if [ "$rom" ]; then
if [ "${rom##*.}" = "rom" ]; then
boot1=$(zenity --file-selection --title="Sélectionnez un fichier BOOT1" --filename="$RELPAT/");
if [ "$boot1" ]; then
"$RELPAT"/nspire_emu.exe /F="$rom" /1="$boot1" /K
fi
else
zenity --error --title="Erreur" --text="Veuillez sélectionner un fichier *.rom et pas autre chose ! \n Opération annulée"
fi
fi
}

function run84b2 {
rom=$(zenity --file-selection --title="Sélectionnez un fichier *.rom" --filename="$RELPAT/");
if [ "$rom" ]; then
if [ "${rom##*.}" = "rom" ]; then
"$RELPAT"/nspire_emu.exe /F="$rom" /B=boot2.img.raw /K
else
zenity --error --title="Erreur" --text="Veuillez sélectionner un fichier *.rom et pas autre chose ! \n Opération annulée"
fi
fi
}

function dump {
local winePath="$HOME/.wine/dosdevices/c:"
local rom=$(zenity --file-selection --title="Sélectionnez un fichier *.rom" --filename="$RELPAT/");
if [ "$rom" ]; then
if [ "${rom##*.}" = "rom" ]; then
local size=$(zenity --entry --title="Taille du classeur à dumper (octets)" --entry-text="0");
let num=$size/170
echo "k 10032AA0 +x" > "$RELPAT/commands.txt"
echo "c" >> "$RELPAT/commands.txt"
local i=0
while [ $i -le $num ]; do
# Complete tempory file names with zeros so that it's listed correclty
let local dif=${#num}-${#i}
local spaces=$(printf "%"$dif"s")
local zeros=${spaces// /0}
# Fill command list
echo "w C:\dump$zeros$i.xml r1 r2" >> "$RELPAT/commands.txt"
echo "c" >> "$RELPAT/commands.txt"
let i=$i+1
done

# Launch emulator with debug command list
"$RELPAT"/nspire_emu.exe /F="$rom" /B=boot2.img.raw /D < "$RELPAT/commands.txt"

# Concatenate final XML file using tempory files
echo -n "" > "$RELPAT/dump.xml"
for f in "$winePath/dump*"; do
cat $f >> "$RELPAT/dump.xml"
done
# rm -f "$winePath/dump"*
rm -f "$RELPAT/commands.txt"
else
zenity --error --title="Erreur" --text="Veuillez sélectionner un fichier *.rom et pas autre chose ! \n Opération annulée"
fi
fi
}

function aide {
clear
echo "#####################################################"
echo "#                      Aide                         #"
echo "#                   ----------                     ##"
echo "##    sur l'utilisation de l'emulateur en boot2    ##"
echo "#####################################################"
echo "- Recuperez le fichier de mise a jour TI (*.tnc/*.tno/*.tcc/*.tco) en le telechargeant  "
echo "  depuis le site de TI ou sur TI-bank, qui lui ressence une grande partie "
echo "  des OS ayant existes."
echo "- Copiez ce fichier dans la racine du dossier de l'emulateur."
echo "- Le renommer pour plus de simplicite (ex : 17.tnc) !"
echo "- L'assimiler a un format *.zip."
echo "- Ouvrir l'archive et en extraire 'boot2.img' et le placer dans la racine"
echo "  du dossier de l'emulateur."
echo "- Retablir l'extension du fichier de mise a jour TI (*.tnc/*.tno)."
echo "- Grace a ce fichier batch, decryptez le 'boot2.img'."
echo "- Grace a ce fichier batch, lancez l'emulation."
echo "### Pour regarder ce tutoriel en video : http://vimeo.com/8884626"
echo ""
echo "Appuyer la touche <Entrée> pour continuer..."
read touche
}

while [  "$select_menup" != "quit"  ]; do
menup
if [ "$select_menup" = "binrun" ]; then
binrun
elif [ "$select_menup" = "aide" ]; then
aide
elif [ "${select_menup:0:1}" = "t" ]; then
while [ "$select_menuc" != "return" ]; do
calc $select_menup
if [ "$select_menuc" = "extboot2" ]; then
extboot2
elif [ "$select_menuc" = "rom" ]; then
rom $select_menup
elif [ "$select_menuc" = "runb1" ]; then
runb1 $select_menup
elif [ "$select_menuc" = "runb2" ]; then
runb2 $select_menup
elif [ "$select_menuc" = "run84b1" ]; then
run84b1
elif [ "$select_menuc" = "run84b2" ]; then
run84b2
elif [ "$select_menuc" = "dump" ]; then
            dump
else break;
fi
done
select_menuc="none"
else break;
fi
done

# Credits
clear
zenity --info --title="Credits" \
--text=\
"Merci d'avoir utilisé ce shell Bash réalisé par Levak.
Un grand merci à Goplat pour son émulateur !"
clear

Title: Re: TI-Nspire emulator
Post by: Jonius7 on March 06, 2012, 05:18:21 am
Levak, Would it be ok if I worked on what was originally your v053 batch file in English/Windows, and released it as a Jonius7 edited version?
PS: I wouldn't know much about a French version.
Title: Re: TI-Nspire emulator
Post by: ash47 on March 10, 2012, 09:40:35 pm
Hi! I've been following this website for a long time, first time I've really had a question, I've searched the hell out of it, but I can't find boot1cx.raw anywhere, and I can't find instructions on how to make one, can someone please point me in the correct direction?

Might as well say you are all doing an amazing job here :P
Title: Re: TI-Nspire emulator
Post by: Jonius7 on March 10, 2012, 11:51:57 pm
You either have to use polydumper (available at tiplanet.org) on a real CX to get boot 1 in order to run nspire_emu, or ask someone else for a boot 1 raw file. However it technicially is considered illegal to distribute roms, it still happens sometime :P

Also welcome to Omnimaga!
Please introduce yourself in the Introduce Yourself Board http://www.omnimaga.org/index.php?board=10.0
Title: Re: TI-Nspire emulator
Post by: ash47 on March 14, 2012, 04:39:22 am
Damned, I don't own a CX, only got the normal TI-Nspire, would appreciate it if someone could send a PM my way as suggested above :P

Edit: No idea how to reply to PMs, but thanks :D If I could work out how to +rep you, I would :P
Title: Re: TI-Nspire emulator
Post by: Jonius7 on March 14, 2012, 04:59:08 am
A few things about nspire_emu as of present.
The clickpad is fine but the Touchpad is horribly mapped to the keyboard. Nearly every key I press is wrongly mapped. I suspect this has been a problem for quite a while, and it's a shame I can't really try out the touchpad.
I plan to release my personal edited versions of Levak's batch file scripts that work with v060, if that's fine.

I hope the Touchpad mapping is just wrongly configured for me, because it is quite confusing at the moment and nearly every key is mapped to another key that shouldn't be.
Title: Re: TI-Nspire emulator
Post by: SpiroH on March 14, 2012, 10:47:50 am
A few things about nspire_emu as of present.
The clickpad is fine but the Touchpad is horribly mapped to the keyboard. Nearly every key I press is wrongly mapped. I suspect this has been a problem for quite a while, and it's a shame I can't really try out the touchpad.
I plan to release my personal edited versions of Levak's batch file scripts that work with v060, if that's fine.

I hope the Touchpad mapping is just wrongly configured for me, because it is quite confusing at the moment and nearly every key is mapped to another key that shouldn't be.
Hi everyone, (my very first message here)

As far as i can figure, 'touchpad' only works with non-cas OSes.
Unfortunately, for cas Oses, only 'clickpad' seems to work.
The problem is we don't get certain touchpad's keys mapped at all, eg: "trig>"+ "frac" + "?!>" + "pi>" + "ctrl+>="

Maybe Goplat (he's the man!) could find sometime to fix it, notably because nowadays most of the folks only have/want cas-machines.

Cheers,
SpiroH
btw: thank you Jonius7 for your help.
Title: Re: TI-Nspire emulator
Post by: Jonius7 on March 19, 2012, 03:19:48 am
No problem SpiroH. I am glad i am able to help so many people! :D Also im using a non-cas os so? I may go back and double check. ;)
Title: Re: TI-Nspire emulator
Post by: lkj on October 08, 2012, 05:15:21 pm
Could you/someone implement the missing instructions which libndls' show_msg_user_input uses?
Title: Re: TI-Nspire emulator
Post by: Levak on October 08, 2012, 09:20:25 pm
Could you/someone implement the missing instructions which libndls' show_msg_user_input uses?
What missing instructions ?
Title: Re: TI-Nspire emulator
Post by: lkj on October 09, 2012, 07:22:09 am
Sorry, I was just stupid and had a wrong revision of ndless installed.
Although I still don't understand what I have to do in order to not make it crash if esc or cancel is pressed. But that isn't a problem of the emulator.
Title: Re: TI-Nspire emulator
Post by: Levak on October 09, 2012, 11:38:51 am
Although I still don't understand what I have to do in order to not make it crash if esc or cancel is pressed. But that isn't a problem of the emulator.
Oh ... =(
I know that bug and I have no idea at the moment why it is crashing.
I've changed the code from using dynamic strings (like internally) instead of char * in utf16 in order to support larger string, but I somehow broke the cancel feature and them BOOM, I had school stuff to do (still now). I know where to look but do not have currently the tools nor the time to look and fix it.
Title: Re: TI-Nspire emulator
Post by: lkj on October 10, 2012, 09:54:53 am
I think the only problem was that if cancel or esc is pressed, it doesn't malloc, and therefore you free a not allocated pointer if you don't check whether it returns -1. At least this solved the bug for me.

You should also mention in the documentation that it doesn't work if lcd_ingray() is called, or change this.
Title: Re: TI-Nspire emulator
Post by: Rhombicuboctahedron on October 22, 2012, 11:34:41 pm
Hey is it possible to access the scratchpad while in a calculator page, or really anywhere other than the home screen?
Because emulator screenshots are much prettier than handheld screenshots.
Title: Re: TI-Nspire emulator
Post by: Levak on October 23, 2012, 02:06:23 am
Hey is it possible to access the scratchpad while in a calculator page, or really anywhere other than the home screen?
Because emulator screenshots are much prettier than handheld screenshots.
Ctrl+0
Title: Re: TI-Nspire emulator
Post by: Rhombicuboctahedron on October 23, 2012, 07:30:03 am
Thank you
Title: Re: TI-Nspire emulator
Post by: Rhombicuboctahedron on October 26, 2012, 04:07:48 pm
Hey, how do you access the little box with pi and I in the emulator?
Title: Re: TI-Nspire emulator
Post by: lkj on October 26, 2012, 04:16:06 pm
Ctrl+cat opens a box with pi, but I think you're talking about the other one. I've no idea about that one.
Title: Re: TI-Nspire emulator
Post by: Rhombicuboctahedron on October 26, 2012, 04:52:11 pm
Yeah, I wanted the other one, but I’ll just go with the screenshot on my calculator
Title: Re: TI-Nspire emulator
Post by: Rhombicuboctahedron on November 06, 2012, 03:09:55 pm
Just wondering, if I have the nspire emulator on the sdk, is there a way to open that without going to tools, emulator in the sdk?
Title: Re: TI-Nspire emulator
Post by: ExtendeD on November 07, 2012, 03:57:10 pm
I suppose you mean the Ndless SDK.
You can run it with the Ctrl+2 keyboard shortcut.

Or you can alternatively create your own .bat file to run it outside of the editor.
The executable file is nspire_emu\nspire_emu.exe and the parameters must be /1=path/to/boot1.img.tns /F=path/to/nand.img /MX (or /MXC for CX CAS).
Title: Re: TI-Nspire emulator
Post by: Goplat on December 22, 2012, 02:08:28 pm
OK, it appears that keeping these features in beta has caused some drama (just so people know: the only real reasons behind the lack of public release are fear that I might have accidentally broken something, combined with a big dose of procrastination), so here's a new release.

Title: Re: TI-Nspire emulator
Post by: critor on December 22, 2012, 02:15:25 pm
OK, it appears that keeping these features in beta has caused some drama

Yeah, I was surprised to read that strange idea here some weeks ago...


here's a new release.

  • implement CAS+ emulation (just enough to get the OS to boot, so I could test dumpers before sending them to critor... this wasn't really intended as a public feature, but someone on the mailing list wanted to see it and now that word has gotten out I can't really remove it now :p)
  • implemented sending files via XMODEM (mainly for CAS+ prototype OSes (1.0.3xx/4xx) - each one needs a different header so /PO= won't cut it - but works for any model)
/me feels concerned :P

Great! Thank you very much - at last! :)

Let's start the fun now ;)
Title: Re: TI-Nspire emulator
Post by: calc84maniac on December 22, 2012, 03:06:20 pm
Quote
implement correct behavior of unaligned memory access and jumps

For those wondering what this accomplishes, now gpSP-Nspire should actually run in the emulator :D
Title: Re: TI-Nspire emulator
Post by: ElementCoder on December 22, 2012, 03:13:35 pm
You have made me so happy :D To be honest, I didn't even know where to look anymore for nspire_emu :P Awesome job as always, keep it up!
Title: Re: TI-Nspire emulator
Post by: Adriweb on December 22, 2012, 03:14:06 pm
Congratulations and thanks :D
Title: Re: TI-Nspire emulator
Post by: Lionel Debroux on December 22, 2012, 03:15:40 pm
So the period where there were effectively no public releases of upstream nspire_emu (though there were a number of private releases, obviously complete with source code) is over :)
The reorganizations and changes in the source code are quite massive.
Title: Re: TI-Nspire emulator
Post by: Adriweb on December 22, 2012, 03:16:59 pm
Posting this being completely outside of recent events :
Would there have been some possibility of implementing a license to this new version, by the way , especially since the amount of change, that Lionel said is massive?
Title: Re: TI-Nspire emulator
Post by: DJ Omnimaga on December 23, 2012, 12:23:41 am
Well I'm glad that holding up the release wasn't due to the other emulator. I feel it's best to release it for the rest of the community instead of delaying it just because of an issue with another program or user (unless of course the release wasn't complete and needed some time before coming out)

I might give this a try when I have some time, but I had so much troubles setting up nspire_emu in 2010 that it was finally Bwang who sent me a pre-set copy, so since then I have been using nspire_emu 0.20 >.< (and my real calcs). I'll need to find a few hours of free time to try to figure it out again with the latest build (which will take a while since I'm a bit busy helping Sorunome with Reuben Axe).

Will this build be posted on ticalc.org?
Title: Re: TI-Nspire emulator
Post by: Adriweb on December 23, 2012, 03:45:46 am
Well, this should help you once and for all ;)
http://tiplanet.org/forum/viewtopic.php?f=15&t=8698
Title: Re: TI-Nspire emulator
Post by: Hayleia on December 23, 2012, 04:01:12 am
Well, this should help you once and for all ;)
http://tiplanet.org/forum/viewtopic.php?f=15&t=8698
Yeah, thanks to that tutorial, even I managed to make the emulator work with only one question :P
Title: Re: TI-Nspire emulator
Post by: Darl181 on December 23, 2012, 04:06:31 am
Pretty cool, nice to see this updated again.

Is there any chance of an update for the linux version? I don't remember who was adapting it in the past but there don't seem to be any that can support the CX :/
(I guess one could just use wine tho..)
Title: Re: TI-Nspire emulator
Post by: Lionel Debroux on December 23, 2012, 04:13:32 am
nspire_emu has always worked pretty well under Wine, indeed :)
IIRC, the third-party Xspire version has been unmaintained since before the advent of the Nspire Touchpad.
Title: Re: TI-Nspire emulator
Post by: CompSystems on December 23, 2012, 08:18:35 am
IDEA: Please include communication ports  for support of projects with microcontroller

Emu48(+).exe support RS232 communication (virtually)

Screenshot HP50g as GUI interface and microcontroller

(http://img79.imageshack.us/img79/6532/capturazl6.jpg)

(http://img357.imageshack.us/img357/9319/captura2kt6.jpg)

(http://img81.imageshack.us/img81/1707/captura3pw0.jpg)
Title: Re: TI-Nspire emulator
Post by: DJ Omnimaga on December 23, 2012, 10:43:25 pm
Well, this should help you once and for all ;)
http://tiplanet.org/forum/viewtopic.php?f=15&t=8698
Thanks for the link. I bookmarked it earlier :)

Also @CompSystem this looks quite nice. I didn't know HP calcs had such advanced emulator. The last time I tried one it was for the 48G and it didn't seem very rich in features and I couldn't figure out how to get certain programs to run.
Title: Re: TI-Nspire emulator
Post by: fb39ca4 on January 04, 2013, 07:19:01 am
Is there any way for me to get a boot1 image without actually having a calculator?
Title: Re: TI-Nspire emulator
Post by: Lionel Debroux on January 04, 2013, 08:20:55 am
For a CX, nope.
Title: Re: TI-Nspire emulator
Post by: fb39ca4 on January 05, 2013, 09:32:16 pm
I'm trying to set up OS 3.1 (non CX) so I can get back into nspire programming. I forgot how to make new flash image files, so I have copied my OS 2.1 flash image and sent and installed OS 3.1 on it, but it gets stuck in an infinite reboot loop now. Can someone help me?
Title: Re: TI-Nspire emulator
Post by: Lionel Debroux on January 06, 2013, 03:02:26 am
You should start from a fresh image. The commands are listed at http://tiplanet.org/forum/viewtopic.php?f=57&t=8698&lang=en (partially translated to English) :)
Title: Re: TI-Nspire emulator
Post by: fb39ca4 on January 08, 2013, 07:16:34 pm
I've got it working now.

Suggestion: Have an option to automatically unthrottle the CPU while the OS is loading, and throttle it again when it is finished.
Title: Re: TI-Nspire emulator
Post by: TheNlightenedOne on January 08, 2013, 07:33:00 pm
I have a question for Goplat: how difficult would nspire_emu be to port, especially to Android? I might do that if the project is feasible.
Title: Re: TI-Nspire emulator
Post by: Goplat on January 08, 2013, 07:45:27 pm
I have a question for Goplat: how difficult would nspire_emu be to port, especially to Android? I might do that if the project is feasible.
Porting to another x86 OS like Linux or Mac OS X would require rewriting the GUI, and replacing some of the funky memory management code (I think I do have an unreleased Linux port of the memory code somewhere, but I never ported the GUI)

Since Android runs on ARM instead of x86, porting to Android would also require rewriting all the x86-specific code (asmcode.s, translate.c, and anywhere where I may have used inline assembly). I don't think the fact that it's an ARM CPU being emulated would help much, unfortunately.
Title: Re: TI-Nspire emulator
Post by: shagfriedjr on February 19, 2013, 06:15:00 pm
I am having a problem trying to launch the emulator. I click on the nspire_emu but a black box opens for 1 second then closes please help I cannot find a solution. I am using windows 8 if it has anything to do with that
Title: Re: TI-Nspire emulator
Post by: lkj on February 19, 2013, 06:56:42 pm
You have to start it from the command line.
There's a tutorial on how to use nspire_emu here (http://tiplanet.org/forum/viewtopic.php?f=15&t=8698).
Title: Re: TI-Nspire emulator
Post by: shagfriedjr on February 19, 2013, 06:58:44 pm
I cannot get the .img to convert to a .raw and I also cannot open the nspire_emu using the cmd promtp also the imgmanip is not working
Title: Re: TI-Nspire emulator
Post by: lkj on February 19, 2013, 07:15:57 pm
Why can't you open nspire_emu using the cmd prompt?
Title: Re: TI-Nspire emulator
Post by: shagfriedjr on February 19, 2013, 07:19:11 pm
I try opening it here is my code: users\shagfried\documents\nspire_emu_070 (1)\nspire.exe

Also the code they suggested to use did not work plz help

and lastly how do I convert .img to .raw? I have used the polydumper successfully but still do not know how to convert .img to .raw
 I did accomplish everything else except what is seen above
Title: Re: TI-Nspire emulator
Post by: lkj on February 19, 2013, 07:37:40 pm
You don't have to convert anything if you got the files with polydumper. Just rename the file extension from .img to .raw

It's probably: users\shagfried\documents\nspire_emu_070 (1)\nspire_emu.exe
Title: Re: TI-Nspire emulator
Post by: shagfriedjr on February 19, 2013, 07:53:45 pm
it works :) thanks you very much
Title: Re: TI-Nspire emulator
Post by: shagfriedjr on February 19, 2013, 08:04:10 pm
also 1 more thing....... the actual emulator will not open every command I give it just keeps repeating the same thing with the menu that was first pulled up and yes I removed the .exe for the programs that followed or it says invalid argument
or is says boot2.raw is an invalid directory or it says boot2.img is an invalid directory
now it is just saying that PO=os.tno is an invalid argument
or that PO is an invalid argument
Title: Re: TI-Nspire emulator
Post by: lkj on February 20, 2013, 09:07:34 am
The following would be a valid combination of options if your OS is a .tno:
nspire_emu /1=boot1.img /M /PB=boot2.img /PO=310.tno

Replace the names after the equal signs with your own ones, obviously.
Title: Re: TI-Nspire emulator
Post by: Lionel Debroux on February 20, 2013, 09:09:03 am
See also the TI-Planet tutorial, https://tiplanet.org/forum/viewtopic.php?f=57&t=8698
Title: Re: TI-Nspire emulator
Post by: lkj on February 20, 2013, 09:32:12 am
I already linked to that above ;)
Title: Re: TI-Nspire emulator
Post by: shagfriedjr on February 20, 2013, 12:19:55 pm
Thanks I hope it work I will try it when I get home
Title: Re: TI-Nspire emulator
Post by: shagfriedjr on February 24, 2013, 06:39:05 pm
Yeah well now it is saying that Permission is denied..... but otherwise it shows it is loading but says permissions denied
Title: Re: TI-Nspire emulator
Post by: shagfriedjr on February 24, 2013, 06:52:26 pm
oh and it just changes from permission denied to boot1.img/M/PB=boot2.img/PO=310.tno: No such files or directory
and I did change the names of the files so they would match yours so the codes would match and be easier to fix if any problems were to occur
or if i Input  boot1.img /M /PB=boot2.img /PO=310.tno it says that boot2.img no such files or directory
Title: Re: TI-Nspire emulator
Post by: fb39ca4 on February 24, 2013, 09:19:13 pm
oh and it just changes from permission denied to boot1.img/M/PB=boot2.img/PO=310.tno: No such files or directory
and I did change the names of the files so they would match yours so the codes would match and be easier to fix if any problems were to occur
or if i Input  boot1.img /M /PB=boot2.img /PO=310.tno it says that boot2.img no such files or directory

Is windows set to show file extensions?
Title: Re: TI-Nspire emulator
Post by: DJ Omnimaga on February 25, 2013, 12:07:51 am
By the way, is there a Linux version of Nspire_Emu? Because I am wondering if it would run a TI-Nspire CX with Debian installed?
Title: Re: TI-Nspire emulator
Post by: Lionel Debroux on February 25, 2013, 01:11:56 am
Quote
By the way, is there a Linux version of Nspire_Emu?
Nope.

Quote
Because I am wondering if it would run a TI-Nspire CX with Debian installed?
nspire_emu cannot run the Nspire port of Linux, as Linux uses the processor's features (especially the MMU) more extensively than TI's Nucleus-based OS does, and nspire_emu only implements what is needed for TI's OS to work.
Title: Re: TI-Nspire emulator
Post by: DJ Omnimaga on February 25, 2013, 02:29:30 am
Quote
Because I am wondering if it would run a TI-Nspire CX with Debian installed?
nspire_emu cannot run the Nspire port of Linux, as Linux uses the processor's features (especially the MMU) more extensively than TI's Nucleus-based OS does, and nspire_emu only implements what is needed for TI's OS to work.
[/quote]

I was actually asking if nspire_emu runs on the Nspire port of Linux :P (unless you made a typo and forgot "on"?)
Title: Re: TI-Nspire emulator
Post by: Lionel Debroux on February 25, 2013, 02:46:58 am
On my side, I meant that there's neither a version of nspire_emu which runs natively under Linux (in order to reply to your first question), nor a version of nspire_emu which can emulate Linux (in order to reply to your second question) :)
Title: Re: TI-Nspire emulator
Post by: DJ Omnimaga on February 25, 2013, 02:50:02 am
Aw ok, so it's not possible to emulate an Nspire on an Nspire, then. Btw I was kidding lol, but I thought this would be funny if this was actually possible. :P
Title: Re: TI-Nspire emulator
Post by: shagfriedjr on February 25, 2013, 06:44:45 am
I do not know if it is set to show file extensions
Title: Re: TI-Nspire emulator
Post by: Spenceboy98 on April 26, 2013, 10:05:58 pm
I can't get Ndless to set up on on this. Can someone help me?
Title: Re: TI-Nspire emulator
Post by: Lionel Debroux on April 27, 2013, 02:08:39 am
Which version of Ndless, on which OS version ?
Title: Re: TI-Nspire emulator
Post by: Spenceboy98 on April 27, 2013, 02:20:03 am
Which version of Ndless, on which OS version ?

OS 3.1 and Ndless 3.1.
Title: Re: TI-Nspire emulator
Post by: DJ Omnimaga on April 27, 2013, 02:34:35 am
In the menu I click connect after setting target folder to "My Documents" (without the quotes), then when I try sending a document, nothing happens at all ???. (Ndless 3.1 with OS 3.1 CX)

I think this is a bug with space characters in folder names, because sending to any folder with no space works fine.
Title: Re: TI-Nspire emulator
Post by: Lionel Debroux on April 27, 2013, 02:37:01 am
It has worked alright for me. What are you doing exactly, and what error message (if any) do you get ? ;)

FWIW, nLaunch provides an alternate way to use Ndless on OS 3.1, but the installation procedure is more complicated, and it wouldn't necessarily solve your problem anyway.
Title: Re: TI-Nspire emulator
Post by: DJ Omnimaga on April 27, 2013, 02:51:06 am
Actually nevermind, it just appears to require several tries until it works. I clicked connect, set folder to ndless, sent file, it worked. I then sent a second file successfully (and almost instantly). However the file I sent froze when I ran it so I restarted the emulator, but then when I tried to set folder to ndless then connect it didn't work. I tried again in reverse order, to no avail, then after 1 minute I changed target folder name to My Documents and suddenly it said it sent the file to ndless folder. It wouldn't let me send the 2nd file (the calcemu_cx ROM) until about 5 more tries.

I get no error message. It just seems to randomly not work (although more often than working), so I have to retry sending up to 10 times until it is successful, while other times it works on 2nd try. I didn't have this problem in Nspire_emu 0.20 (I now use the one on BrandonW's server).

I use Windows 7 by the way.

EDIT: By the way, any reason why this emulator wouldn't run Jacobly's Z80 emulator? ???
Title: Re: TI-Nspire emulator
Post by: Spenceboy98 on May 22, 2013, 07:59:41 pm
Is there anywhere that I can download the CX boot1cx.raw file?
Title: Re: TI-Nspire emulator
Post by: Levak on May 22, 2013, 08:16:34 pm
Is there anywhere that I can download the CX boot1cx.raw file?
No. Dump it with Polydumper.
Title: Re: TI-Nspire emulator
Post by: Spenceboy98 on May 22, 2013, 08:58:14 pm
Is there anywhere that I can download the CX boot1cx.raw file?
No. Dump it with Polydumper.

I don't have a CX to dump(and I would like to test color programs). D:
Title: Re: TI-Nspire emulator
Post by: crazyracer98 on June 03, 2013, 10:25:51 am
I have a problem with the boot1.img.tns. I cannot make this decompressed(I am not able to get an boot1.raw) :(
Title: Re: TI-Nspire emulator
Post by: Lionel Debroux on June 03, 2013, 12:12:14 pm
The boot1 dump is clear-binary, directly executable.
Title: Re: TI-Nspire emulator
Post by: lkj on June 03, 2013, 12:13:09 pm
You probably don't have to do anything with the boot1.img.tns, it's not compressed. You can just rename it to boot1.raw
Title: Re: TI-Nspire emulator
Post by: CompSystems on June 25, 2013, 04:59:22 pm
Sorry for my bad English

If you hold down a key on the PC for a short time (for example down key), very fast response emulator, you must wait ...

as you can fix it?
Title: Re: TI-Nspire emulator
Post by: Legimet on June 28, 2013, 08:21:51 pm
Is it possible to use GDB with nspire_emu on GNU/Linux?
Nspire_emu just crashes right after entering "target remote localhost:8000" in the GDB prompt when I try to follow the directions here (http://hackspire.unsads.com/wiki/index.php/Debugging_programs). (I'm using 8000 because the /G=1000 switch gives an error message when running nspire_emu.exe)
Title: Re: TI-Nspire emulator
Post by: Lionel Debroux on June 29, 2013, 01:46:26 am
Being under 1024, 1000 is a privileged port, so you cannot bind to it as easily as ports above 1024 (needs more privileges) :)
And yup, I use nspire_emu and its GDBstub exclusively under Wine under Linux, even if it's not very stable - crashes do occur, as you're experiencing.
Title: Re: TI-Nspire emulator
Post by: Legimet on June 29, 2013, 12:54:13 pm
Now I'm having some success, the nspire_emu doesn't crash, but it freezes after entering "target remote localhost:1024" (I'm trying port 1024 now), so I can't start the program in the emulator (using nTxt as an example)
I compiled it with "-O0 -g" in the GCCFLAGS.

This is the output of nspire_emu:
Spoiler For Spoiler:
(I have a bash alias called nspire_cxcas)
Code: [Select]
$ nspire_cxcas /G=1024



Boot Loader Stage 1 (3.00.99)
Build: 2010/9/9, 17:29:13
Copyright (c) 2006-2010 Texas Instruments Incorporated
Using production keys

Last boot progress: 65

Available system memory: 33196
Checking for NAND: NAND Flash ID: ST Micro NAND256R3A
SDRAM size: 64 MB
Wakeup Event: ON.
SDRAM memory test:   Pass
Clearing SDRAM...Done.
Clocks:  CPU = 132MHz   AHB = 66MHz   APB = 33MHz   
Clearing SDRAM...Done.
Clearing SDRAM...Done.
Boot option: Normal

Loading DIAGS software...

Error reading/validating DIAGS image

Error loading DIAGS. Switching to BOOT2.

Loading BOOT2 software...

99%
BOOT1: loading complete (177 ticks), launching image.



Boot Loader Stage 2 (3.10.16)
Build: 2011/7/6, 14:38:40
Copyright (c) 2006-2010 Texas Instruments Incorporated
Using production keys

Clocks:  CPU = 132MHz   AHB = 66MHz   APB = 33MHz
Checking for NAND: NAND Flash ID: ST Micro NAND256R3A


Initializing graphics subsystem.
Boot option: Normal


Initializing filesystem.
Datalight Reliance v2.10.1150
Copyright (c) 2003-2006 Datalight, Inc.
Datalight FlashFX Pro v3.00 Build 1358
Nucleus Edition for ARM9
Copyright (c) 1993-2006 Datalight, Inc.
Patents: US#5860082, US#6260156.
Filesystem ready.
Purging temporary files...
Deleting file [/tmp/TI-Nspire.tno]

Loading Operating System...

100%

BOOT2: loading complete (822 ticks), launching image.


Beginning system initialization.
Clocks:  CPU = 132 MHz AHB = 66 MHz APB = 33 MHz

Preparing file system. This takes a while...
   POSIX layer initialized.
   POSIX "NULL" device initialized.
   POSIX "CONSOLE" device initialized.
Datalight Reliance v2.10.1150
Copyright (c) 2003-2006 Datalight, Inc.
Datalight FlashFX Pro v3.00 Build 1358
Nucleus Edition for ARM9
Copyright (c) 1993-2006 Datalight, Inc.
Patents: US#5860082, US#6260156.

   POSIX file system initialized.
File system ready.
* No battery door detection
System build date: Aug 14 2011, 10:21:21
Available memory: 48294372 bytes
Purging temporary files...
Launching system...
WLAN Module detached!
------------------ Module is Gone!!
TouchPad Firmware Revision : 01060000

Created Execution Context
RET - Echo UDP: TI_Echo_UDP_Init called +++
RET - ECHO UDP: EchoUDPListenerThread. Inside Thread +++
NavNet Ready.
autodim_power_callback
GDB connected.
Reset

And this is my GDB prompt:
Code: [Select]
$ arm-none-eabi-gdb
GNU gdb (GDB) 7.6
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=x86_64-unknown-linux-gnu --target=arm-none-eabi".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
(gdb) file ~/nTxt15/src/nTxt15.elf
Reading symbols from /home/Legimet/nTxt15/src/nTxt15.elf...done.
(gdb) target remote localhost:1024
Remote debugging using localhost:1024
0x00000000 in _nspire_start ()
(gdb) break main
Breakpoint 1 at 0xad0: file texteditor.c, line 62.
(gdb)
Title: Re: TI-Nspire emulator
Post by: Lionel Debroux on June 29, 2013, 01:21:31 pm
Ah, so you actually want to debug a C / C++ program through GDB, not just use the GDBstub to benefit from an external GDB-interoperable debugger instead of the built-in debugger...
I've never done that, and from my work on forward-porting the GDBstub from Ncubate to nspire_emu, I'm not quite sure it's supposed to work (it requires extra support in the debugger, which wasn't updated for Ndless 3.1, IIRC).

ExtendeD (/ Goplat) ?
Title: Re: TI-Nspire emulator
Post by: Legimet on June 29, 2013, 01:34:01 pm
Well, http://hackspire.unsads.com/wiki/index.php/Debugging_programs says that Ncubate had support for GDB, so I assumed it would work in Nspire_emu.
Title: Re: TI-Nspire emulator
Post by: Lionel Debroux on June 29, 2013, 01:38:59 pm
It worked at some point and in some conditions, but the page indicates:
Quote
This page was last modified on 7 November 2010, at 19:56.
That was in the time of the second generation of Ndless, long before the release of OS 3.1 and the later release of Ndless 3.1.
I'm not authoritative enough on the matter for stating that it definitely does not work with Ndless 3.1, but I'd expect it not to... Sorry.
Title: Re: TI-Nspire emulator
Post by: ExtendeD on June 29, 2013, 05:44:25 pm
The GDB stub should work well, but the integration with the Ndless loader seems indeed to have been broken at some point, I'm sorry about that. I'll see what has gone wrong.
Title: Re: TI-Nspire emulator
Post by: ExtendeD on July 18, 2013, 03:39:11 pm
Legimet, everything has been fixed in the latest Ndless/SDK: http://ndlessly.wordpress.com/2013/07/18/gdb-debugging-now-available/
I'm not able to test in on Linux though.
Title: Re: TI-Nspire emulator
Post by: Legimet on July 19, 2013, 03:24:34 pm
I will soon install Ndless r848 in nspire_emu, and the Ndless SDK to see if it works.

EDIT: What commands have to be run in GDB?? Nspire_emu gives a segmentation fault, but I might be doing something wrong
Title: Re: TI-Nspire emulator
Post by: Legimet on July 23, 2013, 01:21:49 pm
Yes, it works now in r866 using the included nspire_emu.exe. :D

And this is unrelated, but in the nspire-gcc, nspire-g++, nspire-ld, and nspire-ld-bflt scripts, could you change $USERPROFILE in the last line (where gcc or g++ is called) to $home so Linux users can put static libraries in .ndless too?
Title: Re: TI-Nspire emulator
Post by: ExtendeD on July 23, 2013, 04:41:32 pm
Sure, sorry about that. It's commited to the SVN trunk.
Title: Re: TI-Nspire emulator
Post by: Boot1 on October 11, 2013, 10:09:02 am
This message is for Goplat and SpiroH, my humble contribution to these great emulators.

Testing nSpire_emu and kArmTI with some different ROMs I have found a problem emulating the CX prototype. Boot1CX-3.0.0.DEVBUILD rises a warning in the emulator and it breaks:
Code: [Select]
Boot Loader Stage 1 (3.00.DEVBUILD)
Build: 2010/9/14, 16:30:29
Copyright (c) 2006-2010 Texas Instruments Incorporated
Using developer keys

Last boot progress: 65
Warning at PC=00007718: Bad write_byte: 0001c634 00
debug> c

 I have to press c for continue the execution as a workaround.

Last night user fortytwo, in the IRC channel, helped on solving this issue. He changed line 47 of emu.c initializing the boolean break_on_warn flag as false in order to run smoothly. Maybe the emulator could include another command line argument such as /W in order to activate break_on_warn flag from the command line.

fortytwo compiled a test version and it runs smoothly.

The other issue I have is related to the Diags ROM. It can be executed using the following command line:

Code: [Select]
nspire_emu.exe /1=boot1cx.tns  /MX /PD=diagscx.tns
I can not go down and test other systems than memory. And when testing memory it reports a failure in the emulated flash. Is it a failure of the emulator or am I not configuring it correctly?

Thanks

Boot1
Title: Re: TI-Nspire emulator
Post by: antoniovazquezblanco on December 11, 2013, 02:43:59 pm
I would like to help developing this emulator. I have seen the source code and I think I can improve some bits.

Is there any repo where I can checkout the last version?
I do extensively use GitHub and AFAIK there's no clone of this project there. I would like to clone the source code there so people can also send patches through there.

Thanks for all your work!
Title: Re: TI-Nspire emulator
Post by: Legimet on December 11, 2013, 03:22:01 pm
I believe that the repo is private.
Title: Re: TI-Nspire emulator
Post by: Boot1 on December 11, 2013, 03:57:21 pm
I would like to help developing this emulator. I have seen the source code and I think I can improve some bits.

Is there any repo where I can checkout the last version?
I do extensively use GitHub and AFAIK there's no clone of this project there. I would like to clone the source code there so people can also send patches through there.

Thanks for all your work!

You can find the nspire_emu v0.60p1-gdb by Goplat repo clone here: http://goo.gl/E4uscN but I really do not know where is the latest code.

If you navigate a folder up you can also find the sources of other interesting tools like polydumper ( http://goo.gl/1QIgox ).

Legmet, AFAIK Goplat's nspire_emu source is accesible, while kArmTI is not.

Regards
Title: Re: TI-Nspire emulator
Post by: Levak on December 11, 2013, 04:27:06 pm
You can find the nspire_emu v0.60p1-gdb by Goplat repo clone here: http://goo.gl/E4uscN but I really do not know where is the latest code.

IIRC on Ndless trunk there is v0.96
https://www.unsads.com/scm/svn/nsptools/Ndless/trunk/Ndless-SDK/nspire_emu/
Title: Re: TI-Nspire emulator
Post by: antoniovazquezblanco on December 11, 2013, 04:27:17 pm
As it was GPL and code was provided I tought a repo was being used.

If there's a repo I would like to mirror it and if not, this may be a good moment to create one.

Lets see what the author thinks :)
Title: Re: TI-Nspire emulator
Post by: Legimet on December 11, 2013, 04:29:29 pm
Boot1, that's what I was saying, the repo is private, although the code for the latest stable version is released

antoniovazquezblanco: I don't think it's GPL. Actually, it has no license. I read once that no license makes it standard copyright, so nobody can redistribute or modify it. Goplat might want to change that.
Title: Re: TI-Nspire emulator
Post by: Boot1 on December 11, 2013, 05:28:12 pm
The copyright problem is then more complex since there are some forks of the original work done by Goplat like:
- ncubate (find the sources here http://www.ticalc.org/archives/files/fileinfo/433/43367.html ) based in Goplat's nspire_emu v0.32 (adds debug commands)
- kArmTI based in Goplat's nspire_emu v0.60 IIRC (adds skins)

It is sad not working together in different areas of the same emulator.

Regards
Title: Re: TI-Nspire emulator
Post by: antoniovazquezblanco on December 12, 2013, 03:09:53 am
I'm sorry, I don't know why I thought it was GPL.

I think that the main reason why there's so much forking is because of the repo issue and maybe licensing issue although the last one is not a problem for me. I just want to collaborate.

Title: Re: TI-Nspire emulator
Post by: antoniovazquezblanco on December 12, 2013, 04:42:08 am
Thanks Lionel Debroux for replaying. I'm sorry to say I could not answer because I'm not allowed to send PM.

For anyone interested, I have cloned the project in https://github.com/antoniovazquezblanco/nspire_emu (https://github.com/antoniovazquezblanco/nspire_emu).
I will be accepting changes! ;)

UPDATE:
I misunderstood that Lionel Debroux was one of the authors of this project. So although the mirror is up, I still waiting for the author to tell me if this is ok or not.

Thanks for your patience.
Title: Re: TI-Nspire emulator
Post by: Boot1 on December 12, 2013, 10:11:58 am
Antonio, The network already have mirrors of the 0.60 version of nspire_emu:
https://github.com/Nickorama21/Minecraft--TI-Nspire-CX-Port/tree/master/base/ndless%203.1%20sdk/nspire_emu
https://code.google.com/p/ndless/source/browse/Ndless-SDK/nspire_emu/

Nonetheless none of them are focused on the emulator. As I said before I would like your energy and interest in this project won't cause another fork but improve the current main source code another step forward keeping it as compact as possible.

In case that you want to contribute, the latest code I've found available is nspire_emu r96 inside ndless-​v3.​1-​beta-​r914-​sdk.​zip (http://www.unsads.com/projects/nsptools/downloader/download/category/1/file/83) that you can download from http://www.unsads.com/projects/nsptools/downloader/download/category/1




Regards and thanks to all people contributing to the community.

Boot1
Title: Re: TI-Nspire emulator
Post by: Boot1 on December 12, 2013, 11:11:00 am
There is also a WIP by ExtendeD, porting nspire_emu to Android:



The source seems to be "lockated" in http://bytecode.fr/nspire_emu

Regards
Title: Re: TI-Nspire emulator
Post by: antoniovazquezblanco on December 12, 2013, 11:13:31 am
That one is very interesting to me. It would be perfect to be able to see the source code.

Thanks Boot1, you're very helpful.
Title: Re: TI-Nspire emulator
Post by: antoniovazquezblanco on December 15, 2013, 12:58:18 pm
As it seems there's no public source code for that project.

I still waiting for a confirmation for finally leaving the repo where it is.
Please, let me know if that is ok.

Thanks.
Title: Re: TI-Nspire emulator
Post by: ExtendeD on December 15, 2013, 04:54:07 pm
The Ndless SDK integrates the latest public patches for nspire_emu I know of, that are Goplat's (the author of most of the code), Lionel Debroux's and mine, and is maintained with this goal in mind, it can be considered the most up-to-date. I'm not sure a GitHub repo is really what's missing, contributions are. But you may have a try with one.
Title: Re: TI-Nspire emulator
Post by: antoniovazquezblanco on December 16, 2013, 03:03:23 am
Thanks ExtendeD,

I've been looking around and I've found a Track page where I can't access the source code and a google project unoficial mirror. Where should I look for this?

Thanks in advance.
Title: Re: TI-Nspire emulator
Post by: ExtendeD on December 16, 2013, 04:22:52 am
I'm not sure who created the google project mirror and if it's still active.

The up-to-date source code can be found here: https://www.unsads.com/scm/svn/nsptools/Ndless/trunk/Ndless-SDK/nspire_emu/ (guest/guest).
Title: Re: TI-Nspire emulator
Post by: antoniovazquezblanco on December 16, 2013, 04:58:04 am
Thank you very much.

I will be looking at it.
Title: Re: TI-Nspire emulator
Post by: antoniovazquezblanco on December 25, 2013, 03:21:39 pm
Is there any chance of moving nspire_emu to a new location for itself? It is quite dificult to mirror it this way :(. I believe it is a project on its own.

Merry XMas
Title: Re: TI-Nspire emulator
Post by: antoniovazquezblanco on June 10, 2014, 03:28:09 pm
I've mirrored the project in Github https://github.com/antoniovazquezblanco/nspire_emu (https://github.com/antoniovazquezblanco/nspire_emu).

I've been trying to work on the sorce code for fixing warnings and for beeing able to compile it under both windows and linux.

After some work I realised that it no longer runs correctly under Windows and I don't know where I screwed up things so it would be very nice if any of you helped me find the mistake.

Here's a sample output:
Code: [Select]
./nspire_emu -1=Boot1cx.img -F=Flash.bin
Error at PC=00003B74: Invalid new processor mode

        Backtrace:
Frame     PrvFrame Self     Return   Start
00000000: invalid address
debug> d 3b74
00003B70              00 00 0F E1-1F 00 C0 E3 13 00 80 E3       ...ß..└π..Çπ
00003B80  C0 00 80 E3 00 F0 2F E1-AC D0 1F E5 00 00 A0 E3   └.Çπ.≡/ß¼╨.σ..áπ
00003B90  74 1D 9F E5 00 00 81 E5-70 1D 9F E5 00 00 81 E5   t.ƒσ..üσp.ƒσ..üσ
00003BA0  6C 0D 9F E5 6C 1D 9F E5-00 00 81 E5 08 03 00 EB   l.ƒσl.ƒσ..üσ...δ
00003BB0  6C 10 1F E5 00 10 91 E5-5C 0D 9F E5 00 00 11 E1   l..σ..æσ\.ƒσ...ß
00003BC0  08 00 00 0A 54 0D 9F E5-00 10 90 E5 02 10 81 E3   ....T.ƒσ..Éσ..üπ
00003BD0  00 10 80 E5 48 0D 9F E5-FD 10 A0 E3 00 10 80 E5   ..ÇσH.ƒσ².áπ..Çσ
00003BE0  B0 01 00 EB 00 00 00 EA-26 01 00 EB E8 00 00 EB   ░..δ...Ω&..δΦ..δ
00003BF0  F7 02 00 EB                                       ≈..δ
debug>

Any hint on this.

Thanks in advance.
Title: Re: TI-Nspire emulator
Post by: Vogtinator on June 10, 2014, 03:40:00 pm
nspire_emu's source moved to https://github.com/OlivierA/Ndless/tree/master/Ndless-SDK/nspire_emu, so consider forking the whole ndless repo for now.
Title: Re: TI-Nspire emulator
Post by: antoniovazquezblanco on June 10, 2014, 04:00:09 pm
Ouch! This is very frustrating... Although it wasn't a great job I spent quite some hours working on this... I find ndless repo very messy and I see different projets inside the same repo which in my opinion difficult to maintain...

If you accept sugestions git submodules and different repos will be easier to work with...

I don't know what I will be doing. I just feel I wasted a lot of time in this project for nothing. I will probably abandon it in its poor state because I see I'm too out of the development discussion...

Thanks
Title: Re: TI-Nspire emulator
Post by: Vogtinator on June 10, 2014, 04:05:30 pm
Just do a quick diff of the two source folders, there are no huge changes, really.
I totally agree with you, the ndless repo is indeed a big mess. I tried to clean up some parts on my fork (http://github.com/Vogtinator/ndless), but can't do anything as I can't really get nspire_emu to build under linux.. You might be able to fix this with your patches!
Title: Re: TI-Nspire emulator
Post by: antoniovazquezblanco on June 10, 2014, 04:11:53 pm
For being able to compile under linux you need to separate os dependent source files (gui and os) (done in my repo) and implement every function there for linux (not done). After that you should force 32bits compilation because of assembler (done) and you should add references for every symbol used both in c and asm to not include an underscore before them (done) so you will be able to compile in both platforms.

It is not very difficult to get done but it is sometimes tedious and ugly...

If I decide to continue on this I will probably try to clean up ndless repo first.

My patches are not difficult but they break the emulator in windows. If we are able to fix this issue it would be reasonable to merge my patches but not until then.
Do you feel in the mood for trying?

Thanks
Title: Re: TI-Nspire emulator
Post by: Legimet on June 10, 2014, 04:15:08 pm
I agree that it's very messy. IMO the Ndless installer/resources, Ndless SDK, Ndless editor, Luna, and nspire_emu should all be in different repos. Vogtinator has done some things to clean it up though, you should check out his repo at https://github.com/Vogtinator/Ndless (https://github.com/Vogtinator/Ndless).
Title: Re: TI-Nspire emulator
Post by: Vogtinator on June 10, 2014, 04:16:56 pm
Getting the nspire_emu kernel to run on anything else than win32 is a PITA. Just so overly many calls to windows-specific functions for which there isn't a simple equivalent in linux. I tried it once to remove the GUI stuff and get it to compile, but it stopped at an undefined reference in assembler to a win32 call. That was too much for me at that time and now I think it's easier to just use mingw and wine on linux..
Title: Re: TI-Nspire emulator
Post by: antoniovazquezblanco on June 10, 2014, 04:27:39 pm
Congrats Vogtinator for your work. Your repo looks quite good.

I've implemented some of the missing functions although there's a lot of missing work there but I meant to fix the emulator in win32 with mingw. It compiles but I'm stuck because it doesn't emulate as it is expected. If that worked I could be able to send the patches either to the main repo or to your fork.
 
Title: Re: TI-Nspire emulator
Post by: Vogtinator on June 10, 2014, 05:41:29 pm
Quote
Congrats Vogtinator for your work. Your repo looks quite good.
It looks good, but apart from the SDK part nothing works :)
Just try to execute the generated ndless installer or resources, instant crash..

I just created a nspire_emu repo and made an initial commit.
Also, with the latest mingw32-w64 version it seems to compile on linux, and boot1 executes successfully!
Title: Re: TI-Nspire emulator
Post by: Vogtinator on June 12, 2014, 07:20:36 pm
Bad news: With newer MinGW versions it compiles and runs sucessfully, but the 3.6 ndless_installer.tns segfaults the emulator.
Any ideas?
Title: Re: TI-Nspire emulator
Post by: antoniovazquezblanco on June 22, 2014, 03:37:17 pm
My version of the emulator works now on Windows. I fixed that anoying mistake I made. It compiles under linux with gcc but it is far from being usable as there are a lot of uninplemented functions.

I will have a look to your repo Vogtinator to see your changes but I want to make sure we will be all working toguether so I think we should talk about how things are going to be organised to avoid wasted hours.

Thanks for your time.
Title: Re: TI-Nspire emulator
Post by: Vogtinator on June 22, 2014, 04:39:50 pm
Can you install ndless 3.6 successfully on your build of nspire_emu?
Title: Re: TI-Nspire emulator
Post by: antoniovazquezblanco on June 22, 2014, 04:45:26 pm
I've never worked with ndless so you may have to guide me or point me to some documentation.
Title: Re: TI-Nspire emulator
Post by: Vogtinator on June 22, 2014, 04:57:34 pm
http://ndless.me
Title: Re: TI-Nspire emulator
Post by: antoniovazquezblanco on June 22, 2014, 05:42:46 pm
Sorry for the delay....  :)

Update: My latest commit (standard integer types) broke something. Use previous commit code...
 
Title: Re: TI-Nspire emulator
Post by: Vogtinator on June 23, 2014, 11:20:28 am
Compiles fine for me, but it's "nspire emulator v0.61", the latest is "nspire emulator v0.70[+Ndless-SDK patches]".
Also, why GTK for GUI? I'd use Qt for both platforms.
And could you include an option to do a windows build on linux, as it's impossible for me to test it?
Title: Re: TI-Nspire emulator
Post by: antoniovazquezblanco on June 23, 2014, 11:39:46 am
Yes it is v0.61 because I mirrored the old repo. As for the new repo I don't really know how to get a diff or a patch between 0.61 and 0.7 because I have changed a lot of files (although very little changes) and if I diff with the mirror version I don't know why it diffs the whole file. I have to look at it again (probably today).

I wanted to start with GTK because I use cinnamon and qt apps don't look that well... I also thought of leaving the windows gui as is for the windows platform...

About the windows build in linux I don't know how to do it... You will have to point me again in the right direction.

Thank you very much.
Title: Re: TI-Nspire emulator
Post by: Streetwalrus on June 23, 2014, 05:37:52 pm
Hmm qt apps can use the gtk theme. It just needs a couple seconds of googling and configuring but afterwards they look exactly the same.
Title: Re: TI-Nspire emulator
Post by: antoniovazquezblanco on June 24, 2014, 04:23:30 am
As it seems there's more people interested in a Qt gui I will think about it but a lot of work must be done before that.

When you talk about windows build in linux do you mean using mingw compiler in linux?

Thanks.
Title: Re: TI-Nspire emulator
Post by: antoniovazquezblanco on June 24, 2014, 05:52:27 am
Vogtinator, can you test the windows build trick?

Code: [Select]
cd src
OPTS=mingw make

I know this is not clean but I think it is better than the "prefix" solution there's in your makefile because prefix is tipically used for other things in a makefile.

Update: As I'm not able to get a clean diff (git and diff commands just diff the full code instead of the changed bits) of the changes between v0.61 and current version of the emulator, could anyone help me achieving this?

Update: It seems it is a file codification problem. Already working on it.

Thanks
Title: Re: TI-Nspire emulator
Post by: Vogtinator on June 24, 2014, 08:13:00 am
Quote
I know this is not clean but I think it is better than the "prefix" solution there's in your makefile because prefix is tipically used for other things in a makefile.
You did it almost like I'd have done it, I'd just have a common section for not linux-native Makefile lines and a section for both MinGW and windows native builds.
And I'm getting a message, that "_WIN32_WINNT" would be redefined in gui-windows.c, so you may want to surround it with #ifndef.

Also you could help me finding the bug that prevents me from installing ndles 3.6 on a mingw compiled nspire_emu.
Could you add
Code: [Select]
printf("Data abort: address=%08x status=%02x pc=%08x\n", mva, status, arm.reg[15]);at the top of data_abort in emu.c and launch ndless_installer?
For me it outputs
Code: [Select]
Data abort: address=0101010d status=01 pc=102fd8e4 before "Segmentation fault".

Quote
As it seems there's more people interested in a Qt gui I will think about it but a lot of work must be done before that.
The Qt GUI for linux could then be used as-is for windows as well, so not more work than removing gui-windows.c :P
Title: Re: TI-Nspire emulator
Post by: antoniovazquezblanco on June 24, 2014, 09:09:26 am
I've merged master changes so I'm now on version v0.7+Ndless patches and I could succesfully install ndless v3.6 in the emulator under windows.

I will have a look on the linux compiled version to help you with your bug.

Thanks
Title: Re: TI-Nspire emulator
Post by: antoniovazquezblanco on June 24, 2014, 09:36:10 am
Here's what gdb says:

Code: [Select]
Program received signal SIGSEGV, Segmentation fault.
0x004018e5 in write_word ()
(gdb)
Continuing.

Program received signal SIGSEGV, Segmentation fault.
main (argc=0, argv=0x0) at emu.c:551
551                     sched_process_pending_events();
(gdb) bt
#0  main (argc=0, argv=0x0) at emu.c:551
(gdb) s

Program received signal SIGSEGV, Segmentation fault.
main (argc=0, argv=0x0) at emu.c:551
551                     sched_process_pending_events();
(gdb) bt
#0  main (argc=0, argv=0x0) at emu.c:551
(gdb) s
[Inferior 1 (process 1516) exited with code 030000000005]
Title: Re: TI-Nspire emulator
Post by: antoniovazquezblanco on June 24, 2014, 10:36:37 am
Some things that I found:
-  This does not only happen in v0.7+Ndless patches, this also happens in previous versions (v0.61).
- It only happens if it was compiled with mingw under linux.
- I get no line with data abort information.
Title: Re: TI-Nspire emulator
Post by: Vogtinator on June 24, 2014, 11:43:28 am
Then it may just be my self-compiled ndless_installer which does something different then.
Could you try it on the not-mingw version with data abort printf()?

And I don't really know how to use GDB, but if I read it correctly the call to sched_process_pending_events() segfaults once before crashing the second time?
Title: Re: TI-Nspire emulator
Post by: antoniovazquezblanco on June 24, 2014, 12:15:06 pm
On linux:
- Your tns generates the same sigfault than the precompiled version.

On windows:
- Neither the original tns or your tns show that line of debug.
- Both install correctly.

And I don't really know how to use GDB, but if I read it correctly the call to sched_process_pending_events() segfaults once before crashing the second time?
It seems that it is true but the position of argv?? Argv is null?? I have to take a deeper look it must be in another point.
Title: Re: TI-Nspire emulator
Post by: Vogtinator on June 24, 2014, 01:08:48 pm
I found it: It's the call to longjmp that doesn't reach setjmp again.
But how can "restart_after_exception" get corrupted?

I found that some (older) MinGW versions have a bug that setjmp puts garbage into ebp, but the workaround -fno-omit-frame-pointer doesn't help so it's probably another bug.
Can you make a write breakpoint in gdb on restart_after_exception and longjmp in data_abort? The contents of restart_after_exceptions have to be the same as after the initial call to setjmp.

Edit: Set up a Win7 VM and compiled it. With gdb it outputs the same emu.c:551, argc = 65535, argv=something weird, and it indeed segfaults at main + 2088: call sched_process_pending_events(). As call pushes eip onto the stack ($esp), but $esp is somehow 0x10, it segfaults. That also explains why argc and argv are weird, they're stored on the stack.
Title: Re: TI-Nspire emulator
Post by: antoniovazquezblanco on June 24, 2014, 06:10:44 pm
Some debug as requested :)

Code: [Select]
Program received signal SIGSEGV, Segmentation fault.
0x004018e5 in write_word ()
(gdb) b data_abort
Breakpoint 1 at 0x40aa00: file emu.c, line 112.
(gdb) c
Continuing.
21:57:04.050,14-06-24,0000001605,refreshApList
←[0m21:57:04.160,14-06-24,0000001616,Doc open complete in 0.85000002 seconds for
: ndless/ndless_installer.tns
←[0m21:57:04.160,14-06-24,0000001616,Memory avail before open: 35822688.  Memory
 avail after open: 34665812.  Memory used: 1156876
←[0mIME: non-ALPHA key pressed

Program received signal SIGSEGV, Segmentation fault.
0x004018e5 in write_word ()
(gdb) c
Continuing.

Breakpoint 1, data_abort (mva=16843021, status=1 '\001') at emu.c:112
warning: Source file is more recent than executable.
112     void data_abort(u32 mva, u8 status) {
(gdb) n
113             logprintf(LOG_CPU, "Data abort: address=%08x status=%02x\n", mva
, status);
(gdb) n
114             fix_pc_for_fault();
(gdb) n
118             cpu_exception(EX_DATA_ABORT);
(gdb) print restart_after_exception
$1 = {2686664, 16, 10767564, 13045723, 2686540, 4276596, 2686616, 0,
  1447244336, 0, 0, 0, 0, 0, 0, 0}
(gdb) info registers
eax            0x4      4
ecx            0xc784e1e        209210910
edx            0x48dd8e4        76404964
ebx            0x1      1
esp            0x28fdec 0x28fdec
ebp            0x28fe04 0x28fe04
esi            0x101010d        16843021
edi            0xa44ccc 10767564
eip            0x40aa32 0x40aa32 <data_abort+50>
eflags         0x216    [ PF AF IF ]
cs             0x23     35
ss             0x2b     43
ds             0x2b     43
es             0x2b     43
fs             0x53     83
gs             0x2b     43
(gdb) n
115             arm.reg[15] += 8;
(gdb) n
116             arm.fault_address = mva;
(gdb) n
117             arm.data_fault_status = status;
(gdb) n
118             cpu_exception(EX_DATA_ABORT);
(gdb) n
119             longjmp(restart_after_exception, 0);
(gdb) print restart_after_exception
$2 = {2686664, 16, 10767564, 13045723, 2686540, 4276596, 2686616, 0,
  1447244336, 0, 0, 0, 0, 0, 0, 0}
(gdb) info registers
eax            0x102fd904       271571204
ecx            0x0      0
edx            0x20000013       536870931
ebx            0x1      1
esp            0x28fdec 0x28fdec
ebp            0x28fe04 0x28fe04
esi            0x101010d        16843021
edi            0xa44ccc 10767564
eip            0x40aa51 0x40aa51 <data_abort+81>
eflags         0x202    [ IF ]
cs             0x23     35
ss             0x2b     43
ds             0x2b     43
es             0x2b     43
fs             0x53     83
gs             0x2b     43
(gdb) n
0x00401982 in longjmp ()
(gdb) print restart_after_exception
$3 = {2686664, 16, 10767564, 13045723, 2686540, 4276596, 2686616, 0,
  1447244336, 0, 0, 0, 0, 0, 0, 0}
(gdb) info registers
eax            0x102fd904       271571204
ecx            0x40aa65 4237925
edx            0x20000013       536870931
ebx            0x1      1
esp            0x28fdec 0x28fdec
ebp            0x28fe04 0x28fe04
esi            0x101010d        16843021
edi            0xa44ccc 10767564
eip            0x401982 0x401982 <longjmp+1>
eflags         0x202    [ IF ]
cs             0x23     35
ss             0x2b     43
ds             0x2b     43
es             0x2b     43
fs             0x53     83
gs             0x2b     43
(gdb) n
Single stepping until exit from function longjmp,
which has no line number information.
main (argc=0, argv=0x0) at emu.c:550
550             while (!exiting) {
(gdb) print restart_after_exception
$4 = {2686664, 16, 10767564, 13045723, 2686540, 4276596, 2686616, 0,
  1447244336, 0, 0, 0, 0, 0, 0, 0}
(gdb) info registers
eax            0x0      0
ecx            0xa44040 10764352
edx            0x20000013       536870931
ebx            0x28fec8 2686664
esp            0x10     0x10
ebp            0xa44ccc 0xa44ccc <arm+204>
esi            0xc70fdb 13045723
edi            0x28fe4c 2686540
eip            0x414174 0x414174 <main+2068>
eflags         0x202    [ IF ]
cs             0x23     35
ss             0x2b     43
ds             0x2b     43
es             0x2b     43
fs             0x53     83
gs             0x2b     43
(gdb) n
551                     sched_process_pending_events();
(gdb) print restart_after_exception
$5 = {2686664, 16, 10767564, 13045723, 2686540, 4276596, 2686616, 0,
  1447244336, 0, 0, 0, 0, 0, 0, 0}
(gdb) info registers
eax            0x0      0
ecx            0xa44040 10764352
edx            0x20000013       536870931
ebx            0x28fec8 2686664
esp            0x10     0x10
ebp            0xa44ccc 0xa44ccc <arm+204>
esi            0xc70fdb 13045723
edi            0x28fe4c 2686540
eip            0x414181 0x414181 <main+2081>
eflags         0x246    [ PF ZF IF ]
cs             0x23     35
ss             0x2b     43
ds             0x2b     43
es             0x2b     43
fs             0x53     83
gs             0x2b     43
(gdb) n

Program received signal SIGSEGV, Segmentation fault.
main (argc=0, argv=0x0) at emu.c:551
551                     sched_process_pending_events();
(gdb)

It took me a while see it... I'm a noob with this code...
Now what? Have you reported to mingw? Any hotfix?

My version is the following in case it is useful:
Code: [Select]
Using built-in specs.
COLLECT_GCC=i686-w64-mingw32-gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-w64-mingw32/4.9.0/lto-wrapper
Target: i686-w64-mingw32
Configured with: /build/mingw-w64-gcc/src/gcc-4.9.0/configure --prefix=/usr --libexecdir=/usr/lib --target=i686-w64-mingw32 --enable-languages=c,lto,c++,objc,obj-c++,fortran,ada
--enable-shared --enable-static --enable-threads=posix --enable-fully-dynamic-string --enable-libstdcxx-time=yes --with-system-zlib --enable-cloog-backend=isl
--disable-cloog-version-check --disable-isl-version-check --enable-lto --disable-dw2-exceptions --enable-libgomp --disable-multilib --enable-checking=release

Thread model: posix
gcc version 4.9.0 (GCC)
Title: Re: TI-Nspire emulator
Post by: antoniovazquezblanco on June 25, 2014, 05:30:35 am
By the way. Given that we have two repos with similar content now, I think we should merge them into one and start working in one organization repo with some conventions like for example git-flow.

What do you think?

Title: Re: TI-Nspire emulator
Post by: Sorunome on June 25, 2014, 11:25:06 am
OMG anyone else getting the huge horizontal scrollbar on this page?
Title: Re: TI-Nspire emulator
Post by: Vogtinator on June 25, 2014, 11:51:22 am
I get it as well, three times my screen's size O.o
It also seems to happen for unusually big images.

Quote
By the way. Given that we have two repos with similar content now, I think we should merge them into one and start working in one organization repo with some conventions like for example git-flow.
Yup, I think the same. My changes are smaller: A message if ndless wasn't detected at gdb connection and prefixing emu output with "[nspire_emu]".

Quote
It took me a while see it... I'm a noob with this code...
Now what? Have you reported to mingw? Any hotfix?
Maybe it got corrupted somehow. Can you step through setjmp or look when 0x10/16 gets written into restart_after_exception[1]?
Title: Re: TI-Nspire emulator
Post by: antoniovazquezblanco on June 25, 2014, 02:17:42 pm
Wow... debuging... kills me...

Code: [Select]
Starting program: c:\Users\............................\nspire_emu\src/nspire_emu.exe -1=boot1cx.img -f=flash.bin
[New Thread 1600.0x710]
[New Thread 1600.0x884]
[New Thread 1600.0xa1c]
Hardware watchpoint 1: restart_after_exception[1]

Old value = 0
New value = 16
0x75e9e27e in setjmp3 () from C:\Windows\SysWOW64\msvcrt.dll
(gdb)
(gdb) c
Continuing.

...................................................................... (Tons of output...)


Program received signal SIGSEGV, Segmentation fault.
0x004018e5 in write_word ()
(gdb)
Continuing.

Program received signal SIGSEGV, Segmentation fault.
main (argc=0, argv=0x0) at emu.c:551
551                     sched_process_pending_events();
(gdb)

Ummm.... 0x75e9e27e in setjmp3 () from C:\Windows\SysWOW64\msvcrt.dll???????????

Code: [Select]
$ gdb nspire_emu.exe
GNU gdb (GDB) 7.6.1
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "mingw32".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from c:\Users\....................\nspire_emu\src\nspire_emu.exe...done.
(gdb) b main:546
Breakpoint 1 at 0x41396c: file emu.c, line 260.
(gdb) b emu.c:546
Breakpoint 2 at 0x414140: file emu.c, line 546.
(gdb) watch  restart_after_exception[1]
Hardware watchpoint 3: restart_after_exception[1]
(gdb) run -1=boot1cx.img -f=flash.bin
Starting program: c:\Users\..................\nspire_emu\src/ns
pire_emu.exe -1=boot1cx.img -f=flash.bin
[New Thread 2604.0x804]

Breakpoint 1, main (argc=3, argv=0xc429e0) at emu.c:260
warning: Source file is more recent than executable.
260             char *preload_filename[4] = { NULL };
(gdb) c
Continuing.
[New Thread 2604.0x3ac]
[New Thread 2604.0x94c]

Breakpoint 2, main (argc=3, argv=0xc429e0) at emu.c:546
546             sched_update_next_event(0);
(gdb) n
543             sched_items[SCHED_THROTTLE].clock = CLOCK_27M;
(gdb)
544             sched_items[SCHED_THROTTLE].proc = throttle_interval_event;
(gdb)
546             sched_update_next_event(0);
(gdb)
548             setjmp(restart_after_exception);
(gdb) si
0x00414168      548             setjmp(restart_after_exception);
(gdb)
0x0041416f      548             setjmp(restart_after_exception);
(gdb)
0x004138a8 in _setjmp3 ()
(gdb)
0x75e9e275 in setjmp3 () from C:\Windows\SysWOW64\msvcrt.dll
(gdb)
0x75e9e279 in setjmp3 () from C:\Windows\SysWOW64\msvcrt.dll
(gdb)
0x75e9e27b in setjmp3 () from C:\Windows\SysWOW64\msvcrt.dll
(gdb)
Hardware watchpoint 3: restart_after_exception[1]

Old value = 0
New value = 16
0x75e9e27e in setjmp3 () from C:\Windows\SysWOW64\msvcrt.dll
(gdb) disassemble setjmp3
Dump of assembler code for function setjmp3:
   0x75e9e275 <+0>:     mov    0x4(%esp),%edx
   0x75e9e279 <+4>:     mov    %ebp,(%edx)
   0x75e9e27b <+6>:     mov    %ebx,0x4(%edx)
=> 0x75e9e27e <+9>:     mov    %edi,0x8(%edx)
   0x75e9e281 <+12>:    mov    %esi,0xc(%edx)
   0x75e9e284 <+15>:    mov    %esp,0x10(%edx)
   0x75e9e287 <+18>:    mov    (%esp),%eax
   0x75e9e28a <+21>:    mov    %eax,0x14(%edx)
   0x75e9e28d <+24>:    movl   $0x56433230,0x20(%edx)
   0x75e9e294 <+31>:    movl   $0x0,0x24(%edx)
   0x75e9e29b <+38>:    mov    %fs:0x0,%eax
   0x75e9e2a1 <+44>:    mov    %eax,0x18(%edx)
   0x75e9e2a4 <+47>:    cmp    $0xffffffff,%eax
   0x75e9e2a7 <+50>:    je     0x75ed992d <setjmp+56>
   0x75e9e2ad <+56>:    mov    0x8(%esp),%ecx
   0x75e9e2b1 <+60>:    or     %ecx,%ecx
   0x75e9e2b3 <+62>:    jne    0x75ed9939 <setjmp+68>
   0x75e9e2b9 <+68>:    mov    0xc(%eax),%eax
   0x75e9e2bc <+71>:    mov    %eax,0x1c(%edx)
   0x75e9e2bf <+74>:    sub    %eax,%eax
   0x75e9e2c1 <+76>:    ret
   0x75e9e2c2 <+77>:    nop
   0x75e9e2c3 <+78>:    nop
   0x75e9e2c4 <+79>:    nop
   0x75e9e2c5 <+80>:    nop
   0x75e9e2c6 <+81>:    nop
End of assembler dump.
(gdb)

By the way, I've already merged your changes.
Sorry about the scroll. I'm going to edit my post now... xD
Title: Re: TI-Nspire emulator
Post by: Vogtinator on June 25, 2014, 02:24:32 pm
Hmm. do __builtin_setjmp and __builtin_longjmp work? I tried it, it didn't make any difference, but I'd want to know whether they also call msvcrt.dll., probably 'cause I forgot copying nspire_emu.exe..
On http://sourceforge.net/p/mingw-w64/mailman/message/31232870 (http://sourceforge.net/p/mingw-w64/mailman/message/31232870) someone seems to have the same issue, even with MinGW 4.8.2, where the bug should have been fixed. It also happens only on 64-bit..
Could you try using the __builtins and -fno-omit-frame-pointer just in case and then look at the write to restart_after_exception (or not, if it works :D )?

Edit: You forgot
Code: [Select]
emuprintf("Ndless not detected or too old. Debugging of applications not available!\n"); :P

Edit2: Compiled, tested: WORKS!
Title: Re: TI-Nspire emulator
Post by: antoniovazquezblanco on June 25, 2014, 02:42:43 pm
Compiled with __builtin_... + no -fno-omit-frame-pointer and it worked both in wine and windows 8.1  ;D

I will commit the mising line now.

We should report the issue...

Thanks! :)
Title: Re: TI-Nspire emulator
Post by: antoniovazquezblanco on June 25, 2014, 04:00:28 pm
Bug report:

https://sourceforge.net/p/mingw-w64/bugs/406/
Title: Re: TI-Nspire emulator
Post by: antoniovazquezblanco on June 26, 2014, 10:56:08 am
For those who know the code of the project better than me, is apb.c code any useful? Can it be deleted? Old makefile didnt compile it and all the functions defined in there are duplicated. It is something someone is actually working on or it is something outdated?

I would also like to specify some kind of coding guidelines as sometimes things are very messy because of a non unified style. What do you think?

Thanks!
Title: Re: TI-Nspire emulator
Post by: Streetwalrus on June 26, 2014, 12:56:52 pm
It's pretty awesome to see someone porting Nspire-emu to Linux by the way. You're doing a great job.
Title: Re: TI-Nspire emulator
Post by: antoniovazquezblanco on June 26, 2014, 01:00:59 pm
It's pretty awesome to see someone porting Nspire-emu to Linux by the way. You're doing a great job.

Lets say "trying to" port... :)

There's a long way ahead and any help would be apreciated. Really anything from suggestions, to actual code. Greetings help a lot :)
Title: Re: TI-Nspire emulator
Post by: Streetwalrus on June 26, 2014, 01:02:52 pm
Well I could do some testing if you tell me what you need but I can't contribute any code unfortunately. First because I don't know any x86, second because I'm not really interested in making more than scripts on PCs. :P
Title: Re: TI-Nspire emulator
Post by: Vogtinator on June 26, 2014, 01:04:36 pm
An important question is where to start. First GUI, then "kernel"?
I'd go for the first, as that could be tested with wine accurately.

Quote
Greetings help a lot :)
Well, have some:
Hi! Hi! Hi! Hi! Hello! Hello! Hello! Hello! Hello! Hello! Hey! Hey! Hey! 'sup? 'sup? 'sup? 'sup? :P
Title: Re: TI-Nspire emulator
Post by: Streetwalrus on June 26, 2014, 01:06:39 pm
Hum, I'd rather call it a core than a kernel. :P
Title: Re: TI-Nspire emulator
Post by: antoniovazquezblanco on June 26, 2014, 01:19:50 pm
An important question is where to start. First GUI, then "kernel"?
I'd go for the first, as that could be tested with wine accurately.

Quote
Greetings help a lot :)
Well, have some:
Hi! Hi! Hi! Hi! Hello! Hello! Hello! Hello! Hello! Hello! Hey! Hey! Hey! 'sup? 'sup? 'sup? 'sup? :P

How the hell could I have...??? Greetings instead of congratulations...?  ???

As for what first I think I have seen some code in your repo wich involved using Qt. I have very little idea about that so if you were able to start thinking about how things could be implemented it could help me a lot. On the other hand there are some ugly things around there and I feel like the code should be a bit more organized so I think I will be spending some time with that. apb.c code for example, I don't know if it is usefull for anyone, data types are a mess, I would like to parse arguments from command line with optarg for simplicity (maybe a gui if no argument is provided...), etc.

I've been filling some of this things in my repo issues list in order not to forguet them.
https://github.com/antoniovazquezblanco/nspire_emu/issues?state=open
Pick one if you feel in the mood :).

Some "core" code has ben initially ported to linux (see os/os-linux.c) but a lot is missing.
Title: Re: TI-Nspire emulator
Post by: Vogtinator on June 29, 2014, 07:12:06 am
When I have more time again I'll try to do something.
A few bugs: Newline after "GDB connected" and disconncted is missing and you put the "Ndless not detected" message at the wrong place.
Title: Re: TI-Nspire emulator
Post by: antoniovazquezblanco on June 30, 2014, 10:01:41 am
When I have more time again I'll try to do something.
A few bugs: Newline after "GDB connected" and disconncted is missing and you put the "Ndless not detected" message at the wrong place.

Fixed!

I'm going to be away for 2 or 3 days. After that I will get working again!
Title: Re: TI-Nspire emulator
Post by: antoniovazquezblanco on July 01, 2014, 01:18:16 pm
Wine was complaining about a missing libmpg123 lib. Installed it and now I can't use the emulator at all...

It seems to boot but at some point loading the os the window doesn't redraw anymore...

Anyone experiences anything similar?

PD: I've also updated my packages (Archlinux)...
Title: Re: TI-Nspire emulator
Post by: Streetwalrus on July 01, 2014, 02:00:25 pm
I use Arch too. Wine wants libmpg123 for some reason and this is not program specific.
Title: Re: TI-Nspire emulator
Post by: antoniovazquezblanco on July 02, 2014, 05:43:22 am
I use Arch too. Wine wants libmpg123 for some reason and this is not program specific.

I understand this but the only difference between working and not working was lib32-mpg123 + updates. Did this happen to you?

Thank you Streetwalrus.
Title: Re: TI-Nspire emulator
Post by: Streetwalrus on July 02, 2014, 08:24:25 am
I have no idea, I never tried to run nspire-emu on Arch. I just got started with Ndless so I still test on calc. :P
Title: Re: TI-Nspire emulator
Post by: antoniovazquezblanco on July 02, 2014, 09:52:32 am
I have no idea, I never tried to run nspire-emu on Arch. I just got started with Ndless so I still test on calc. :P

Ok. Thanks anyway. If you want to set it up just ask and if you ever try please give feedback :).
Title: Re: TI-Nspire emulator
Post by: Streetwalrus on July 02, 2014, 11:41:36 am
You can count on me ! ;)
Title: Re: TI-Nspire emulator
Post by: aeTIos on July 04, 2014, 10:45:10 am
This is pretty cool, I also just got started with nspire programming, and being able to test stuff on Linux would be a big plus :D
Title: Re: TI-Nspire emulator
Post by: Legimet on July 10, 2014, 04:31:50 pm
nspire_emu works in Wine, so for now, just use that.
Title: Re: TI-Nspire emulator
Post by: antoniovazquezblanco on September 28, 2014, 06:48:17 am
This has been quiet for a long time. The repo has also been moving slowly but after some commits I think the code is a bit more clean.

The emulator now uses a different method for parsing command line arguments. There was functionality that was not listed in command line options and now is. Parameters have changed a bit and testing is needed. It would be nice if any of you could test the devel branch of the emulator and report bugs if found.

The code is in https://github.com/antoniovazquezblanco/nspire_emu (https://github.com/antoniovazquezblanco/nspire_emu).

Thanks!
Title: Re: TI-Nspire emulator
Post by: DJ Omnimaga on September 28, 2014, 11:56:54 am
Oh wow I didn't know you started helping developing the emulator. Hopefully this helps the project moving forward faster, although it's already pretty good actually. :)
Title: Re: TI-Nspire emulator
Post by: antoniovazquezblanco on September 29, 2014, 09:26:16 am
Oh wow I didn't know you started helping developing the emulator. Hopefully this helps the project moving forward faster, although it's already pretty good actually. :)

I would like to have more time for it but from time to time I try to clean some code and improve some bits.
Some bugs were fixed and code is cleaner in my opinion. Argument parsing is better now but no new functionality yet. I hope this encourages people to start coding a bit :)
Title: Re: TI-Nspire emulator
Post by: jamesguessis on November 06, 2014, 04:57:24 pm
is there any way to emulate the nspire on an android?
Title: Re: TI-Nspire emulator
Post by: Vogtinator on November 06, 2014, 05:03:12 pm
In theory you could run X and wine with qemu and binfmt support in a chroot.
If you just want some calculating capabilities similiar to the nspire, there are some apps in the store.
Title: Re: TI-Nspire emulator
Post by: jamesguessis on November 06, 2014, 05:09:19 pm


In theory you could run X and wine with qemu and binfmt support in a chroot.

I understood none of that :P
Title: Re: TI-Nspire emulator
Post by: Vogtinator on November 09, 2014, 09:55:25 am
I've got a present for you :D
(http://zippy.gfycat.com/RevolvingAmbitiousAuklet.gif)
Far from complete, but works.
Using qt and running on linux natively.
Title: Re: TI-Nspire emulator
Post by: aeTIos on November 09, 2014, 12:15:25 pm
:drooooool:
Where is the drool icon when you need it.
Title: Re: TI-Nspire emulator
Post by: DJ Omnimaga on November 09, 2014, 12:17:07 pm
So you are taking over this project? :D
Title: Re: TI-Nspire emulator
Post by: Streetwalrus on November 09, 2014, 12:19:38 pm
:drooooool:
Where is the drool icon when you need it.
That exactly. Nspire-emu is like, the only thing I rely on Wine for atm. :P
Title: Re: TI-Nspire emulator
Post by: Vogtinator on November 09, 2014, 12:40:33 pm
:drooooool:
Where is the drool icon when you need it.
(http://www.confessionsofaninsomniac.com/wp-content/uploads/2010/05/homerdrool21.JPG)

So you are taking over this project? :D
Yes, in the way of "implementing support until it's usable", but not in the way of "I'll maintain it until we both are dead" :P
There is no current "maintainer", it's just floating around the internet.

Nspire-emu is like, the only thing I rely on Wine for atm. :P
I've still got IDA. It's a real PITA to use sometimes.
Title: Re: TI-Nspire emulator
Post by: Vogtinator on November 11, 2014, 10:26:11 am
Can someone install Qt for Android and try to cross-compile the code from http://github.com/Vogtinator/nspire_emu?
It should be possible now to run it on other platforms. It's probably a bit too slow to be usable, but it should work.

Edit: With some minimal changes it compiles and runs, but crashes somewhere in boot1. I'll debug it and upload for tests, if anybody wants to test nspire_emu on his android phone.
Title: Re: TI-Nspire emulator
Post by: Streetwalrus on November 11, 2014, 04:14:29 pm
I have a Nexus 4 (with CM11) and the Android SDK. I can give it a shot this weekend.
Title: Re: TI-Nspire emulator
Post by: Legimet on November 11, 2014, 06:26:11 pm
Nspire-emu is like, the only thing I rely on Wine for atm. :P
I've still got IDA. It's a real PITA to use sometimes.

You might want to try try radare2. You can import the Nspire .idc files using a script called idc2rdb. Although radare2 doesn't have a good GUI and it lacks decompilation support.

In theory you could run X and wine with qemu and binfmt support in a chroot.
If you just want some calculating capabilities similiar to the nspire, there are some apps in the store.
I tried that once, but apparently qemu required a patch for something called "NTPL support" to run wine :P
Title: Re: TI-Nspire emulator
Post by: Adriweb on November 11, 2014, 07:45:21 pm
BTW, what about QT for iOS ? It compiles fine (and runs almost fine, probably the same issue you mentioned) on Mac, so... maybe ?
I can try (sometime later....), I guess, as I have a iOS dev. account.

Anyway, ARM emu on ARM, though... :P
Title: Re: TI-Nspire emulator
Post by: Streetwalrus on November 12, 2014, 12:51:37 am
Anyway, ARM emu on ARM, though... :P
Does ARM support hardware virtualization ?
Title: Re: TI-Nspire emulator
Post by: Vogtinator on November 12, 2014, 01:14:16 pm
Nspire-emu is like, the only thing I rely on Wine for atm. :P
I've still got IDA. It's a real PITA to use sometimes.

You might want to try try radare2. You can import the Nspire .idc files using a script called idc2rdb. Although radare2 doesn't have a good GUI and it lacks decompilation support.
The core of a good reverse engineer tool is to provide a nice user interface. Decompilation is mostly useless anyway. I'll try it, do you use it?

Quote
In theory you could run X and wine with qemu and binfmt support in a chroot.
If you just want some calculating capabilities similiar to the nspire, there are some apps in the store.
I tried that once, but apparently qemu required a patch for something called "NTPL support" to run wine :P
You know, "there's an app for that" :P I'm sure that somewhere is wine on an android device on the internet. Wouldn't be much fun, though.

Quote
BTW, what about QT for iOS ? It compiles fine (and runs almost fine, probably the same issue you mentioned) on Mac, so... maybe ?
I can try (sometime later....), I guess, as I have a iOS dev. account.
It may work but be even slower as iOS has some massive restrictions. But I guess it would run on iOS as well if it works on android.

Anyway, ARM emu on ARM, though... :P
Does ARM support hardware virtualization ?
Most ARM processors in consumer devices don't, but AFAIK Aarch64 requires it. (Xen and KVM support the extensions already, they're quite new)
Some kind of accelleration would be needed, though, I had to wait for ~8m to boot this:
(http://img.ourl.ca/nspire_android.png)

Also, I had to do a quick hack to display the 4bit framebuffer, that's why it's blue for now.
I had to use a classic image as my device doesn't have enough RAM to allocate the various caches, flash and SDRAM, I'll have to change that to utilize nmap.
Title: Re: TI-Nspire emulator
Post by: mdr1 on November 12, 2014, 01:20:06 pm
Really, nspire_emu on Android phone would be amazing! :D
But I don't know how to perform what you're asking to do with Qt, Vogtinator.
Title: Re: TI-Nspire emulator
Post by: Vogtinator on November 12, 2014, 01:22:22 pm
Quote
Really, nspire_emu on Android phone would be amazing!
But I don't know how to perform what you're asking to do with Qt, Vogtinator.
Well, as you can see above, I couldn't resist so installed the Android SDK, NDK and Qt SDK for Android and it works already :P
Title: Re: TI-Nspire emulator
Post by: aeTIos on November 12, 2014, 01:23:55 pm
Dude, that's amazing. I wonder if you could compile it to run on the Nspire :P
[insert yo dawg meme here]
Title: Re: TI-Nspire emulator
Post by: mdr1 on November 12, 2014, 01:30:04 pm
Well, as you can see above, I couldn't resist so installed the Android SDK, NDK and Qt SDK for Android and it works already :P
Oh, I see, you spoke about Qt on computer, didn't you? Anyway, could you please upload the working app? :p
Title: Re: TI-Nspire emulator
Post by: Vogtinator on November 12, 2014, 01:32:58 pm
Yeah, I can upload the "working" app if you want to, but it'll take some minutes to fix some stupid issues (using "-Os" instead of "-Ofast" e.g.) and the framebuffer.
Also, as I have hardcoded the path to boot1 and flash, is "/sdcard" ok?
Title: Re: TI-Nspire emulator
Post by: mdr1 on November 12, 2014, 01:35:25 pm
Yeah, I can upload the "working" app if you want to, but it'll take some minutes to fix some stupid issues (using "-Os" instead of "-Ofast" e.g.) and the framebuffer.
Also, as I have hardcoded the path to boot1 and flash, is "/sdcard" ok?
For me, it's either /sdcard0 or /sdcard1, depending on if I use the flash or the SD card.
Title: Re: TI-Nspire emulator
Post by: aeTIos on November 12, 2014, 01:36:13 pm
For me, the path is /sdcard so it should definitely work ^^ I'd rather see it customizable tho so I can throw stuff on my SD card as my flash is only 1GB <_< but that's something for later.
Title: Re: TI-Nspire emulator
Post by: Vogtinator on November 12, 2014, 01:59:17 pm
I changed it and it runs a bit faster now, compiled for armeabi-v7a.
Links:
https://dl.dropboxusercontent.com/u/105478372/QtApp-debug-sdcard.apk
https://dl.dropboxusercontent.com/u/105478372/QtApp-debug-sdcard1.apk

If there are any errors, they will most likely appear on the debug tab.

Edit: "/<your path>/boot1_classic.img" and "/<your path>/flash_3.9_nothing.img"
Title: Re: TI-Nspire emulator
Post by: mdr1 on November 12, 2014, 02:08:31 pm
What is "flash_3.9._nothing.img" supposed to be?
Title: Re: TI-Nspire emulator
Post by: Vogtinator on November 12, 2014, 02:11:24 pm
The flash image that can be booted using the provided boot1. I called the file "flash_3.9_nothing.img" as I had "flash_3.9_cas.img" etc.
It doesn't matter whether it's 132MiB or 32MiB.

Edit: boot1 not boot2.
Title: Re: TI-Nspire emulator
Post by: lkj on November 12, 2014, 04:13:54 pm
Is it still supposed to crash in boot1 as you said earlier? Because for me it does.
Still, good job so far!
Title: Re: TI-Nspire emulator
Post by: Vogtinator on November 12, 2014, 04:16:46 pm
Quote
Is it still supposed to crash in boot1 as you said earlier? Because for me it does.
Still, good job so far!
Which version on which platform are you using? It should work just fine on linux, windows and android. Mac crashes due to some mmap weirdness. (https://github.com/Vogtinator/nspire_emu/issues/3)
Title: Re: TI-Nspire emulator
Post by: lkj on November 12, 2014, 04:19:34 pm
I changed it and it runs a bit faster now, compiled for armeabi-v7a.
Links:
https://dl.dropboxusercontent.com/u/105478372/QtApp-debug-sdcard.apk
Sorry, I was talking about this android app. It's emulating a non-cas classic nspire, right?
Title: Re: TI-Nspire emulator
Post by: Vogtinator on November 12, 2014, 04:33:58 pm
Oh, ok. I just read the last posts again and I don't know how I assumed you weren't running the android version  :banghead:
You need at least 1GB RAM and you definitely need to use a 32 MiB flash image if it crashes due to mem exhaustion.

If you can "adb logcat" your device, it should print some OOM kills and then a final SIGKILL to nspire_emu.
Title: Re: TI-Nspire emulator
Post by: lkj on November 12, 2014, 04:47:14 pm
It actually starts, but prints "Warning (00003c18): Bad write_word: 5480040c 00000000" in the debug tab. I'm being very imprecise today :banghead:
It expects a classic boot1 and a classic non-cas rom created with nspire_emu 096 on the PC, right?
Title: Re: TI-Nspire emulator
Post by: Vogtinator on November 12, 2014, 04:50:27 pm
As long as the flash is for the right model, it should automatically set the correct model number and id.
You can also try to run boot1 cx. I have never seen that error before, is it always the same?
Title: Re: TI-Nspire emulator
Post by: lkj on November 12, 2014, 05:06:46 pm
No, the error changes almost every time. It's always "Warning (00003c18): Bad write_word: [...] 00000000" but the [...] could be any of these (and more):
5480040c
6200040c
9940040c
5640040c
53c0040c
9700040c

It doesn't crash with the CX boot1. I don't know if it's loading very slowly or if it's hanging or what because I can't enter the debugger there.
Title: Re: TI-Nspire emulator
Post by: Vogtinator on November 13, 2014, 12:28:13 pm
If you enter the debugger, nothing will happen until you execute a command, like "s" or "r".
I have seriously no idea where the error comes from, are you sure you have the correct flash image?
I just flashed 4.2.2 to my tablet and it works without (major) issues there.

What I really don't like to see is that the write address changes everytime.
Title: Re: TI-Nspire emulator
Post by: lkj on November 13, 2014, 01:06:54 pm
I know, I tried to execute "r" and other commands but nothing happened. I'll try again with other CX flash images. It's strange that it seems to freeze with the CX boot1 while it just runs into an error with the classic boot1.
I'm pretty sure the flash images are correct (unless I should create them with another version of the emu on the pc side. I'm using the one from the latest prebuilt ndless sdk).
I have android 4.4.2 on my phone. It has a normal armv7 processor and much more RAM than needed.
Title: Re: TI-Nspire emulator
Post by: Vogtinator on November 13, 2014, 03:16:07 pm
I believe I found the issue:
In nspire_emu theres an array called addr_cache, which holds two values (read and write) for each 400 bytes of memory.
Each entry (For example, if you want to read at 18000020, its entry is addr_cache[(0x18000020 >> 10) << 1]) contains the following information:
-Pointer: If you add the address you want to access to the entry, bit 31 is clear and you can dereference the result directly
-Special entry: If you add the address you want to access to the entry, bit 31 is set
-MMIO: A special entry which (the entry itself, not the result of the addition) has bit 22 set
-Invalid entry: A special entry which has bit 22 clear.

The issue is, if the allocated memory is beyond 0x7CFFFFFF, you lose information and it crashes.
I expanded the entry format to 64 bits (but kept the bit positions!) and it works, except for rare occasions when the address itself has bit 31 already set!
So now I have to either:
-Fix the algorithm for computations
-Make a new format

This issue is also present on 32bit machines, but nspire_emu invoked VirtualAlloc with some parameter magic so it's always below 2GiB.
This "trick" also works on linux,  but not on mac.

I went for the latter, but it's slower, for now. I encode the 3 various kinds of entries in the lowest 2 bits.
Do you have a better suggestion?

I recompiled the App (https://dl.dropboxusercontent.com/u/105478372/QtApp-debug.apk) and it may work now, although I don't consider this as fixed.
I also solved the bug that you can't exit if the emulation thread enters an infinite loop (that's what happens if addr_cache overflows, what probably happened in your case).
Title: Re: TI-Nspire emulator
Post by: lkj on November 13, 2014, 04:19:30 pm
I can't think of a better solution that works in all cases...
Sounds like that was probably the problem with both errors for me, yes.
The directory is /sdcard/ on my phone instead of the /sdcard1/ in the current build, so I couldn't test if it's fixed.
Title: Re: TI-Nspire emulator
Post by: Vogtinator on November 13, 2014, 04:49:10 pm
Ok, I changed that: download (https://dl.dropboxusercontent.com/u/105478372/QtApp-debug.apk)
Title: Re: TI-Nspire emulator
Post by: lkj on November 13, 2014, 05:51:22 pm
Great! It really fixed everything, I could load a CX and a classic OS without any problems. Booting took about 2-3 minutes :)
The only thing that doesn't seem to work is the "Reset" menu entry, but that's a minor problem (actually not important at all as long as there's no input :P).
Oh, and the progress percentages are displayed after each other on a very long line instead of overwriting the old percentage as on the PC.
Title: Re: TI-Nspire emulator
Post by: Vogtinator on November 13, 2014, 05:58:27 pm
Quote
Great! It really fixed everything, I could load a CX and a classic OS without any problems. Booting took about 2-3 minutes
Same here. How much RAM do you have? Large or small NAND?

Quote
The only thing that doesn't seem to work is the "Reset" menu entry, but that's a minor problem (actually not important at all as long as there's no input ).
Not surprising, it's not implemented yet, like the file transfer and settings tabs.

Quote
Oh, and the progress percentages are displayed after each other on a very long line instead of overwriting the old percentage as on the PC.
That's a known bug, it's just appending the serial data to the QPlainTextEdit, '\b' and '\r' are ignored, like other ANSI escape sequences for colors.
Title: Re: TI-Nspire emulator
Post by: lkj on November 14, 2014, 03:00:00 pm
Same here. How much RAM do you have? Large or small NAND?
3GB RAM. Large or small NAND didn't make a big difference I think (didn't measure the time exactly).

Quote
That's a known bug, it's just appending the serial data to the QPlainTextEdit, '\b' and '\r' are ignored, like other ANSI escape sequences for colors.
Ah ok. Well, it's not important anyway.
Title: Re: TI-Nspire emulator
Post by: Vogtinator on November 14, 2014, 03:06:05 pm
Same here. How much RAM do you have? Large or small NAND?
3GB RAM. Large or small NAND didn't make a big difference I think (didn't measure the time exactly).
I've got less than a tenth.. Not a surprise that it works with 132MiB NAND for you...

Quote
Quote
That's a known bug, it's just appending the serial data to the QPlainTextEdit, '\b' and '\r' are ignored, like other ANSI escape sequences for colors.
Ah ok. Well, it's not important anyway.
It's already fixed :P
Title: Re: TI-Nspire emulator
Post by: Legimet on November 14, 2014, 09:23:36 pm
Strange, I get an ICE trying to compile it with GCC 4.8.
Code: [Select]
../emu.c:206:8: internal compiler error: in update_ssa_across_abnormal_edges, at tree-inline.c:1853
  memset(rom, -1, 0x80000);
        ^

I'll check with the newer version of GCC on my Debian Jessie system and if it doesn't work, I'll report it.

EDIT: Also, you should add armcode_bin.h to .gitignore.
Title: Re: TI-Nspire emulator
Post by: Adriweb on November 15, 2014, 12:47:09 am
Works for me with gcc 4.9, though it crashed clang now ("internal backend error" on linking emu.o)
Title: Re: TI-Nspire emulator
Post by: Vogtinator on November 15, 2014, 06:28:45 am
Strange, I get an ICE trying to compile it with GCC 4.8.
Code: [Select]
../emu.c:206:8: internal compiler error: in update_ssa_across_abnormal_edges, at tree-inline.c:1853
  memset(rom, -1, 0x80000);
        ^

I'll check with the newer version of GCC on my Debian Jessie system and if it doesn't work, I'll report it.[/quote]
I compile on my openSUSE 13.2 64-bit system with
Code: [Select]
gcc version 4.8.3 20140627 [gcc-4_8-branch revision 212064] (SUSE Linux)and
Code: [Select]
clang version 3.5.0 (tags/RELEASE_350/final 216961)just fine.
I use
Code: [Select]
gcc version 4.9 20140827 (prerelease) (GCC)to compile for android and it works well.

Quote
EDIT: Also, you should add armcode_bin.h to .gitignore.
I kept it in the repo as it's a PITA on some platforms to make the header. On windows there are some $PATH issues and xxd not available and on Mac it's not possible to create a 32bit mach file from a binary.

Quote
Works for me with gcc 4.9, though it crashed clang now ("internal backend error" on linking emu.o)
Report that, I assume you use lld?
Title: Re: TI-Nspire emulator
Post by: Legimet on November 16, 2014, 12:22:07 pm
OK, it works fine with the GCC 4.9.something in Debian jessie.
Title: Re: TI-Nspire emulator
Post by: Vogtinator on November 16, 2014, 02:30:28 pm
Does it work? Any bugs?

Currently I'm trying to implement some touchpad input. Clicking works already (right mouse button on LCD), but the nspire's cursor does not appear somehow if you try to move it by holding the left mouse button while moving the mouse above the LCD, nothing happens. The velocity and contact values are correctly set like it's described in the wiki (http://hackspire.unsads.com/wiki/index.php/Keypads#Touchpad_I.C2.B2C), but that doesn't seem to be enough. Does anyone have a clue?
Title: Re: TI-Nspire emulator
Post by: aeTIos on November 16, 2014, 02:32:34 pm
I haven't tried yet because I have no idea how to grab the ROM from my Nspire... TiLP doens't work :\
Title: Re: TI-Nspire emulator
Post by: Vogtinator on November 16, 2014, 02:33:41 pm
You can also download every ROM you'd ever want from tiplanet.org
Title: Re: TI-Nspire emulator
Post by: Legimet on November 16, 2014, 09:00:58 pm
I haven't tried yet because I have no idea how to grab the ROM from my Nspire... TiLP doens't work :\
TILP can't do it. You have to use polydumper.
Title: Re: TI-Nspire emulator
Post by: aeTIos on November 17, 2014, 04:55:45 am
Ah okay. Thanks for the info :)
Title: Re: TI-Nspire emulator
Post by: antoniovazquezblanco on November 17, 2014, 02:20:37 pm
WOW! Congrats! Sorry I've been missing for the last month because this is awesome.

It seems that I should delete my repo and start collaborating with the organization.

Thank you very much for your work.
Title: Re: TI-Nspire emulator
Post by: Vogtinator on November 17, 2014, 02:39:35 pm
Quote
It seems that I should delete my repo and start collaborating with the organization.
No, don't delete your repo, instead push upstream whenever you like to. If it's in any way a massive change, a pull request is the best way to avoid merge conflicts.
Branches on upstream work as well, but there are no pull requests for them. At least that's how it works now for ndless-nspire/Ndless and Vogtinator/Ndless.
Title: Re: TI-Nspire emulator
Post by: antoniovazquezblanco on November 18, 2014, 10:19:55 am
Quote
It seems that I should delete my repo and start collaborating with the organization.
No, don't delete your repo, instead push upstream whenever you like to. If it's in any way a massive change, a pull request is the best way to avoid merge conflicts.
Branches on upstream work as well, but there are no pull requests for them. At least that's how it works now for ndless-nspire/Ndless and Vogtinator/Ndless.

I think it would be better to fork the organization repo and just make the changes there. After that pull request...
Better, isn't it?
Title: Re: TI-Nspire emulator
Post by: Adriweb on November 18, 2014, 09:33:31 pm
you could rebase your repo to upstream (that's what I do now), and as Vogtinator said, push "small" changes to upstream directly but major one to yours, then with a PR to upstream, for review etc.
Title: Re: TI-Nspire emulator
Post by: antoniovazquezblanco on November 22, 2014, 02:19:30 pm
SHIT I THINK I DELETED THE ORG REPO!

I WANTED TO DELETE MINE AND CHANGED TAB ACCIDENTALLY!  :banghead: :banghead: :banghead: :banghead: :banghead:

Sorry!!!!!

What can I do?  :'(
Title: Re: TI-Nspire emulator
Post by: antoniovazquezblanco on November 22, 2014, 02:37:56 pm
SHIT I THINK I DELETED THE ORG REPO!

I WANTED TO DELETE MINE AND CHANGED TAB ACCIDENTALLY!  :banghead: :banghead: :banghead: :banghead: :banghead:

Sorry!!!!!

What can I do?  :'(


Thank you Vogtinator for setting the repo up again. Didn't want to make it worse...

Really embarrased...
Title: Re: TI-Nspire emulator
Post by: Adriweb on November 22, 2014, 03:02:45 pm
Oh, so that's what the automatic subscription was about.... :P
Title: Re: TI-Nspire emulator
Post by: Vogtinator on November 22, 2014, 03:03:59 pm
Let's forget about that (and your doublepost). When I read your message I just laughed really badly xD
It's not really bad to delete an upstream repository as someone will have a working copy with git history and thus every branch can be restored.
But still, it's not a bad idea to check everything twice before deleting...

Anyway, back to the code. How should the keymap be implemented? I thought about a direct mapping of characters, so to type a ( you just have to type (. For {, { and so on.
The downside to this is that the shift key can't be controlled anymore. What do you think about that?

Quote
Oh, so that's what the automatic subscription was about.... :P
Did you get a message? If antonio hadn't posted here, I wouldn't know about the accident..
Title: Re: TI-Nspire emulator
Post by: Adriweb on November 22, 2014, 03:51:47 pm
Anyway, back to the code. How should the keymap be implemented? I thought about a direct mapping of characters, so to type a ( you just have to type (. For {, { and so on.
Yeah, I think it would be a good idea. But we obviously still need buttons, too (for nspire-specific keys...)
When the core stuff are done, a skin-based thing (well, at least, a keyboard that looks like the real one) would be good too, like what KarmTI does (or to a lesser extent, nRemote (https://github.com/adriweb/nRemote#i---about-)).
I looked at Qt and frame/headless windows (such that custom window shape/frames could be done for the skin-based interface, if that's the plan) and it looked relatively easy (3-4 lines of code in mainwindow actually, for making the window "custom", with transparent background etc.). I think I have the details bookmarked somewhere...

The downside to this is that the shift key can't be controlled anymore. What do you think about that?
Hmm. Is there any specific application of this where it could be an annoyance ?
But once again, the mapping could be temp. disabled with an option, too... :P

Quote
Oh, so that's what the automatic subscription was about.... :P
Did you get a message? If antonio hadn't posted here, I wouldn't know about the accident..

Got this:
Spoiler For Spoiler:
Quote
GitHub <[email protected]>
14:35

Hey there, we're just writing to let you know that you've been automatically subscribed to a repository on GitHub.

    nspire-emus/nspire-emu created by Vogtinator
    Community emulator of TI nspire handhelds
    https://github.com/nspire-emus/nspire-emu (https://github.com/nspire-emus/nspire-emu)

You'll receive notifications for all issues, pull requests, and comments that happen inside the repository. If you would like to stop watching this repository, you can manage your settings here:

    https://github.com/nspire-emus/nspire-emu/subscription (https://github.com/nspire-emus/nspire-emu/subscription)

You can unwatch this repository immediately by clicking here:

    https://github.com/nspire-emus/nspire-emu/unsubscribe_via_email/ (https://github.com/nspire-emus/nspire-emu/unsubscribe_via_email/)....

You were automatically subscribed because you've been given push access to the repository.

Thanks!
Title: Re: TI-Nspire emulator
Post by: Vogtinator on November 22, 2014, 04:53:08 pm
Anyway, back to the code. How should the keymap be implemented? I thought about a direct mapping of characters, so to type a ( you just have to type (. For {, { and so on.
Yeah, I think it would be a good idea. But we obviously still need buttons, too (for nspire-specific keys...)
When the core stuff are done, a skin-based thing (well, at least, a keyboard that looks like the real one) would be good too, like what KarmTI does (or to a lesser extent, nRemote (https://github.com/adriweb/nRemote#i---about-)).
I looked at Qt and frame/headless windows (such that custom window shape/frames could be done for the skin-based interface, if that's the plan) and it looked relatively easy (3-4 lines of code in mainwindow actually, for making the window "custom", with transparent background etc.). I think I have the details bookmarked somewhere...
Hm, what about Qml/Qt Quick? It seems to be perfect for this, it supports SVG natively and makes design relatively easy.

Quote
The downside to this is that the shift key can't be controlled anymore. What do you think about that?
Hmm. Is there any specific application of this where it could be an annoyance ?
But once again, the mapping could be temp. disabled with an option, too... :P
Yeah, only double the work...

Quote
Quote
Oh, so that's what the automatic subscription was about.... :P
Did you get a message? If antonio hadn't posted here, I wouldn't know about the accident..

Got this:
Spoiler For Spoiler:
Quote
GitHub <[email protected]>
14:35

Hey there, we're just writing to let you know that you've been automatically subscribed to a repository on GitHub.

    nspire-emus/nspire-emu created by Vogtinator
    Community emulator of TI nspire handhelds
    https://github.com/nspire-emus/nspire-emu (https://github.com/nspire-emus/nspire-emu)

You'll receive notifications for all issues, pull requests, and comments that happen inside the repository. If you would like to stop watching this repository, you can manage your settings here:

    https://github.com/nspire-emus/nspire-emu/subscription (https://github.com/nspire-emus/nspire-emu/subscription)

You can unwatch this repository immediately by clicking here:

    https://github.com/nspire-emus/nspire-emu/unsubscribe_via_email/ (https://github.com/nspire-emus/nspire-emu/unsubscribe_via_email/)....

You were automatically subscribed because you've been given push access to the repository.

Thanks!
So they notify you about repo creation, but not deletion, wtf.
Title: Re: TI-Nspire emulator
Post by: Adriweb on November 22, 2014, 04:58:26 pm
Hm, what about Qml/Qt Quick? It seems to be perfect for this, it supports SVG natively and makes design relatively easy.
Ah, maybe. Cool then. I have never used it, so I didn't think about it.
As long as it still works on all platform without adding much size overhead (?)
Title: Re: TI-Nspire emulator
Post by: Vogtinator on November 22, 2014, 05:00:19 pm
Hm, what about Qml/Qt Quick? It seems to be perfect for this, it supports SVG natively and makes design relatively easy.
Ah, maybe. Cool then. I have never used it, so I didn't think about it.
As long as it still works on all platform without adding much size overhead (?)
Two seperate modules actually, one of them is WebKit's JavaScriptCore IIRC...
Title: Re: TI-Nspire emulator
Post by: antoniovazquezblanco on November 22, 2014, 06:13:04 pm
I've been touching the keymap because I wasn't able to use the calculator at all. I could add the remaining keys to the map if you want me to. What do you suggest for the special keys? F1-F12? Alt? Ctrl? ...

It would be very nice to detect mouse over the Lcd widget and send it to the emulator...
Title: Re: TI-Nspire emulator
Post by: Vogtinator on November 22, 2014, 06:17:57 pm
I've been touching the keymap because I wasn't able to use the calculator at all. I could add the remaining keys to the map if you want me to. What do you suggest for the special keys? F1-F12? Alt? Ctrl? ...
That's the problem. What about "easy", "normal" keys like (?
You can't assign it to "(" on the keyboard as it's Shift-8. (or Shift-9 for qwerty) and that means shift is active.
Maybe distinguish between left and right shift?

Quote
It would be very nice to detect mouse over the Lcd widget and send it to the emulator...
That's working already (LMB: touch, RMB: click), if you try pyWrite or crafti. Only the OS doesn't like it.
Title: Re: TI-Nspire emulator
Post by: antoniovazquezblanco on November 22, 2014, 06:28:29 pm
I've been touching the keymap because I wasn't able to use the calculator at all. I could add the remaining keys to the map if you want me to. What do you suggest for the special keys? F1-F12? Alt? Ctrl? ...
That's the problem. What about "easy", "normal" keys like (?
You can't assign it to "(" on the keyboard as it's Shift-8. (or Shift-9 for qwerty) and that means shift is active.
Maybe distinguish between left and right shift?

Qt::Key_Question among others is working for me...  :)
I cannot get the widget to capture Key_Tab... Selection is moved to the next widget. I know very little about Qt.

Quote
It would be very nice to detect mouse over the Lcd widget and send it to the emulator...
That's working already (LMB: touch, RMB: click), if you try pyWrite or crafti. Only the OS doesn't like it.
I'm not sure on how to investigate this... Any clue?
Title: Re: TI-Nspire emulator
Post by: Vogtinator on November 22, 2014, 06:30:30 pm
I've been touching the keymap because I wasn't able to use the calculator at all. I could add the remaining keys to the map if you want me to. What do you suggest for the special keys? F1-F12? Alt? Ctrl? ...
That's the problem. What about "easy", "normal" keys like (?
You can't assign it to "(" on the keyboard as it's Shift-8. (or Shift-9 for qwerty) and that means shift is active.
Maybe distinguish between left and right shift?

Qt::Key_Question among others is working for me...  :)
Of course, shift isn't implemented yet.

Quote
Quote
It would be very nice to detect mouse over the Lcd widget and send it to the emulator...
That's working already (LMB: touch, RMB: click), if you try pyWrite or crafti. Only the OS doesn't like it.
I'm not sure on how to investigate this... Any clue?
Right click the right edge in the center and the cursor moves.
Title: Re: TI-Nspire emulator
Post by: antoniovazquezblanco on November 22, 2014, 06:35:34 pm
An idea for the shift implementation based on the behavior of the calculator:
- Situation 1: Shift is pressed, another key is pressed and released, shift is released. Normal keyboard operation (produces symbols such as ? or {).
- Situation 2: Shift is pressed and released (activates calculator shift), and another key is pressed and released...

If the key release event is available shouldn't be to difficult to implement although it is not very intuitive...
Title: Re: TI-Nspire emulator
Post by: Vogtinator on November 22, 2014, 06:39:07 pm
That could work, what do you mean by normal keyboard emulation?
Title: Re: TI-Nspire emulator
Post by: antoniovazquezblanco on November 22, 2014, 06:45:36 pm
That could work, what do you mean by normal keyboard emulation?
"Operation"... May be Spanglish. I meant the computer OS handles the keypress.
Title: Re: TI-Nspire emulator
Post by: Vogtinator on November 22, 2014, 06:48:07 pm
Oops, of course, operation not emulation.
So if the { key is pressed, it triggers Ctrl and then the ( key on the calc?
Title: Re: TI-Nspire emulator
Post by: antoniovazquezblanco on November 22, 2014, 06:51:28 pm
Oops, of course, operation not emulation.
So if the { key is pressed, it triggers Ctrl and then the ( key on the calc?
That would be very nice... I think it would be a good idea to have a look on how the official emulator handles all this details.
Title: Re: TI-Nspire emulator
Post by: Vogtinator on November 22, 2014, 06:53:39 pm
It doesn't emulate at all. It's a port of the calc's engine to the pc. That's why for instance ndless_installer_3.6 crashes the PC software as well.
Title: Re: TI-Nspire emulator
Post by: Adriweb on November 22, 2014, 07:13:04 pm
There's also the far-fetched way to directly send the navnet keyevent corresponding to the key... but.. yeah :D

edit : oh wait, that'd mean OS mainly, though ^^
Title: Re: TI-Nspire emulator
Post by: jamesguessis on December 12, 2014, 07:53:37 pm
*can't get a nspire ROM and his email is [email protected]*
*hint hint*
Title: Re: TI-Nspire emulator
Post by: Vogtinator on December 13, 2014, 04:44:59 am
You can download from tiplanet "*hint hint*".
Title: Re: TI-Nspire emulator
Post by: Adriweb on December 13, 2014, 01:59:50 pm
Can download boot2 and OSes from TI-Planet, but boot1 you'll have to dump them yourself though :P
Title: Re: TI-Nspire emulator
Post by: Vogtinator on December 13, 2014, 02:04:19 pm
Oh, I saw boot1 for the classic calcs so I assumed there are also boot1's for newer models. There is a "Boot1 TI-Nspire CX prototype (v. 3.0.0.DEVBUILD)" though, that may work or did the keys change?
Title: Re: TI-Nspire emulator
Post by: Adriweb on December 14, 2014, 04:46:08 pm
I keep forgetting why the CX prototype one is there but I believe it won't work with newer stuff, so...
The old one for clickpad ( https://tiplanet.org/forum/archives_voir.php?id=13343 ) is for "debricking" some prototypes, I'm not even sure if it's useful anywhere else anyway.

Anyway, to dump your boot1, @jamesguessis, you can use PolyDumper (https://tiplanet.org/forum/archives_voir.php?id=3829).
Title: Re: TI-Nspire emulator
Post by: jamesguessis on December 15, 2014, 03:05:57 pm
Anyway, to dump your boot1, @jamesguessis, you can use PolyDumper (https://tiplanet.org/forum/archives_voir.php?id=3829).
I kinda lost my nspire, this is the only reason i'm trying to USE the emulator.

EDIT:so I've dumped my ROM, I was told I have to unpack it or whatever,  how do I do this??
Title: Re: TI-Nspire emulator
Post by: ajorians on December 31, 2014, 11:40:56 am
Hey Vogtinator and antoniovazquezblanco (and anybody I should have addressed),

Just wanted to say I was able to compile and run the emulator you are working on from source! :)

I am on Linux (OpenSuse), I got a TI-NSpire CX with 3.6.0.550 image running and installed NDless 3.6 on it :)

Thanks for working on this!  And have an amazing day!
Title: Re: TI-Nspire emulator
Post by: Vogtinator on January 01, 2015, 01:08:22 pm
Quote
Hey Vogtinator and antoniovazquezblanco (and anybody I should have addressed),

Just wanted to say I was able to compile and run the emulator you are working on from source! :)

I am on Linux (OpenSuse), I got a TI-NSpire CX with 3.6.0.550 image running and installed NDless 3.6 on it :)
Great! I assume you used a flash file createy by nspire_emu v0.70?

If you're running on 64bit, could you try the latest source with x86-64 JIT?

Quote
Thanks for working on this!  And have an amazing day!
Thanks, you too!
Title: Re: TI-Nspire emulator
Post by: ajorians on January 01, 2015, 03:56:29 pm
Great! I assume you used a flash file createy by nspire_emu v0.70?

Correct.  I don't know (and still don't) if it can create flash file.  But I figured I'd try with a nspire_emu v0.70 created flash file.

It did take me a couple of minutes to figure out how to use the program.  For instance to install Ndless 3.6 you need to press the 'menu' key; and I had to look at the source to see Alt + M (and to turn on the calculator after it went into sleep: Alt + Shift + Esc).  Also transferring a file is simple (drag-n-drop) though it did take me a minute to try that.  But got that all figured out! :)

If you're running on 64bit, could you try the latest source with x86-64 JIT?

Sure thing!  I got the latest and used QtCreator.  Below is a screenshot of it running as well as a screenshot of the QtCreator settings I had.  Thanks again!
Title: Re: TI-Nspire emulator
Post by: Legimet on January 07, 2015, 09:49:33 pm
That's awesome if you added a JIT! I'll try it soon.