The shoutbox is currently out of service. Join us on Discord instead.

SDL/n2DLib ports for TI Nspire

Started by gameblabla, August 19, 2015, 08:48:31 pm

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

DJ Omnimaga


gameblabla

Quote from: DJ Omnimaga on April 24, 2016, 03:18:39 am
I hope you didn't brick your Nspire @gameblabla O.O

It doesn't seem so but perhaps my nspire is having the same issues as yours...

DJ Omnimaga

April 24, 2016, 03:57:30 am #242 Last Edit: April 24, 2016, 04:15:23 am by DJ Omnimaga
Quote from: gameblabla on April 24, 2016, 02:57:20 am
Could anybody else give Wolfenstein 3D a try on their nspire ?


No.



Just kidding, I will load it now and then edit my post to tell you what happens. :3=


EDIT: Nope it just reboots immediately on launch @gameblabla . Maybe someone else could try it in case it's just my calc being dumb, though.


Vogtinator

QuoteWell, i can't even run your binary on firebird...

What happens?
Latest firebird version, latest ndless_installer and _resources (r2004)?
Any output on the serial console?

Duke "Tape" Eiyeron

Instacrash on 3.1.0.392 on ndless v5829093 (Commit short hash)

gameblabla

Quote from: Vogtinator on April 24, 2016, 08:42:32 am
What happens?
Latest firebird version, latest ndless_installer and _resources (r2004)?

It outright crashes... just like Duke and DJ are reporting.
And yes, latest stable version this time.

QuoteAny output on the serial console?

Well, it outputs this but i don't think that will be too useful :
Warning (120f0d20): Data abort: address=12272cc1 status=01 instruction at 120f0d20

Care to share your own ndless_installer and resources build as well, please ?
You're the only one here enjoying Wolfenstein here, that's not fair... :(

Vogtinator

April 24, 2016, 07:33:52 pm #246 Last Edit: April 24, 2016, 07:35:35 pm by Vogtinator
Quote from: gameblabla on April 24, 2016, 07:22:53 pm
QuoteAny output on the serial console?

Well, it outputs this but i don't think that will be too useful :
Warning (120f0d20): Data abort: address=12272cc1 status=01 instruction at 120f0d20

Care to share your own ndless_installer and resources build as well, please ?
You're the only one here enjoying Wolfenstein here, that's not fair... :(


I could, but that's highly unlikely to be the issue here.
I assume you're running 32-bit firebird on x86? That version has some checks for alignment built-in (much cheaper on 32-bit)
so it behaves more like a real calc. I see that this data abort is at an unaligned address.
You need to read the warnings gcc spits out! I guess I'll set "-Werror=align-cast" by default.

gameblabla

QuoteI assume you're running 32-bit firebird on x86? That version has some checks for alignment built-in (much cheaper on 32-bit)
so it behaves more like a real calc. I see that this data abort is at an unaligned address.

Yeah, i'm running a 32-bit nighly build.

QuoteYou need to read the warnings gcc spits out! I guess I'll set "-Werror=align-cast" by default.

I looked at the warnings using GCC 5.3.0 and turning on all the warnings, but i see nothing about unaligned cast,
only non handled switches and stuff.
I feel like this is going to take a lot of time to fix...

Vogtinator

Got it: I assumed that all relocation pointers are properly aligned, but in this case it seems to not be the case.
This crashes ndless' Zehn loader during relocation.
The cause for the bad alignment (which will cause slowdowns, so that should be fixed) is https://github.com/gameblabla/wolf4sdl_nspire/blob/master/src/wl_def.h#L721
Notice the boolean at the beginning.

Preliminary ndless r2005 with fix attached.

gameblabla

Quote from: Vogtinator on April 25, 2016, 02:01:58 pm
Got it: I assumed that all relocation pointers are properly aligned, but in this case it seems to not be the case.
This crashes ndless' Zehn loader during relocation.
The cause for the bad alignment (which will cause slowdowns, so that should be fixed) is https://github.com/gameblabla/wolf4sdl_nspire/blob/master/src/wl_def.h#L721
Notice the boolean at the beginning.

Preliminary ndless r2005 with fix attached.

How the hell you detected this ?
I can confirm it now works with the preliminary ndless_resources file.
That being said, i have no idea how to properly fix this...
Tried to change the variables types but to no avail, i hope this don't mean i need to completely redo the code...

I will give Mame a try on my calc to see if this works with the new ndless.

Vogtinator

Quote from: gameblabla on April 25, 2016, 03:17:33 pm
Quote from: Vogtinator on April 25, 2016, 02:01:58 pm
Got it: I assumed that all relocation pointers are properly aligned, but in this case it seems to not be the case.
This crashes ndless' Zehn loader during relocation.
The cause for the bad alignment (which will cause slowdowns, so that should be fixed) is https://github.com/gameblabla/wolf4sdl_nspire/blob/master/src/wl_def.h#L721
Notice the boolean at the beginning.

Preliminary ndless r2005 with fix attached.

How the hell you detected this ?

It was actually quite easy, the PC of the data abort was inside ndless_resources so I just looked up where exactly it is.
It was an ldr inside the relocation loop, which I replaced by several memcpy.

QuoteI can confirm it now works with the preliminary ndless_resources file.
That being said, i have no idea how to properly fix this...
Tried to change the variables types but to no avail, i hope this don't mean i need to completely redo the code...

The issue here is that declaring a struct like that in standard C would cause proper alignment of all members on ARM,
but for some reason it decides to not do it here. Either that's a side effect of "-Os" or some other compiler flag.

QuoteI will give Mame a try on my calc to see if this works with the new ndless.

I doubt it. If it were the same issue, the executable would've run fine on firebird.

DJ Omnimaga

@Vogtinator I know this isn't relates to Wolfeinstein 3D but do you know how I could check why PicoDrive won't run properly on only my Nspire CX, even though it runs on everyone else's?

Vogtinator

You can try to compare your manuf (read it using nsNandMgr) with a known working one. If there are no differences, it's definitely a hardware issue.
I can't tell which part is broken directly, but as it's practically impossible to repair anyway it's not worth it doing tests IMO.

Duke "Tape" Eiyeron

It didn't worked on my calc, do I need another binary or somethng with wolf?

DJ Omnimaga

Ok thanks. I'll have to check with nsNandMgr then. I hope it's not due to faulty hardware.

Powered by EzPortal