gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS development > No more wireless debugger

#96383 - simonjhall - Thu Aug 03, 2006 12:36 am

Sorry guys, but there won't be another version of the wireless debugger (even though I've got one here!). I've also had to stop hosting it. Basically, even though it's something I've made in my free time it's apparently "games related" and my employer technically owns the software. And they tell me that I'm not allowed to release it, so I've had to pull it.

I kinda thought this might happen when I originally released it, but with all the suggestions of adding it to the toolchain I thought I'd better check with the legal people here first. I didn't wanna pollute some open-source project with code owned (or in this case, pwned) by some big ol' corporation :-) And no, I don't think they're being arsey - it is written in my contract! (is debugging a game though? hmm...)

So for you professional programmers out there - make sure you check your contract before releasing software!

And people who wanted a debugger - sorry, but you're gonna have to (get someone (else) to) write one! And no, you're NOT allowed to use/modify my one.

For those people who do already have a copy, please don't distribute it.

Sorry again guys :-(

Mods: could you please lock the other two debugger threads?

#96388 - thehive - Thu Aug 03, 2006 12:56 am

That is a great shame.
Many thanks for you hard work though.

#96397 - HyperHacker - Thu Aug 03, 2006 2:09 am

How can they own something you made for yourself in your spare time?
_________________
I'm a PSP hacker now, but I still <3 DS.

#96398 - tepples - Thu Aug 03, 2006 2:16 am

HyperHacker wrote:
How can they own something you made for yourself in your spare time?

Non-compete agreement.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#96422 - Lynx - Thu Aug 03, 2006 7:09 am

Yeah.. it's pretty messed up.. but it could have been worse. They could have fired him and hunted down the people that have a copy and asked for liscense fees or threatened to sue.
_________________
NDS Homebrew Roms & Reviews

#96440 - masscat - Thu Aug 03, 2006 12:55 pm

It is a great shame.
I had done a port of the Java stub to use the serial port and was working of the DS side.

Simon, I suppose it leaves you a bit buggered for doing any DS homebrew stuff for public release. Very sad.

#96499 - simonjhall - Thu Aug 03, 2006 4:35 pm

masscat wrote:
It is a great shame.
I had done a port of the Java stub to use the serial port and was working of the DS side.

Simon, I suppose it leaves you a bit buggered for doing any DS homebrew stuff for public release. Very sad.

So I suppose that means you got to see the awful java I wrote then eh? :-) Anyone wanna buy my DS or gbamp?!

I don't think they liked the fact that it was on a DS, and that's why they called it game-related. I guess you could say that I really shouldn't have asked, but I felt a bit guilty adding my code to the toolchain knowing that I probably shouldn't do!

And yeah, it's definately better than me getting a message over the tannoy telling me to go collect my P45 :-) But seriously, I'm sure they wouldn't like it if people still do use and modify my code. If anyone did want any help writing their own then I could still give help (ie explaining the nasty bits of the GDB protocol) - I just can't write any code.

One final thing I could see coming was people trying to port it to other platforms. Yeah, it'd be cool to see it working other kit - but if it went onto a platform for which I have all the insider info then I'd definately be in the sh*t. Even if I didn't write the port!

#96516 - Abcd1234 - Thu Aug 03, 2006 5:54 pm

tepples wrote:
HyperHacker wrote:
How can they own something you made for yourself in your spare time?

Non-compete agreement.


Probably not. I suspect his employment contract simply states that anything he creates that's related to the company business is owned by the company. Most places have these (frankly ridiculous) clauses in their contracts (it's basically boilerplate). In essence, by accepting employment, the contract states that any of your creative output can technically be claimed by them (my own employment contract has a clause like this, but the company brass has stated they won't enforce it).

TBH, if I was Mr. Hall, I'd quit. Now. Clearly the company doesn't give a damn about it's employees. But, that's just MHO. ;)

#96518 - tepples - Thu Aug 03, 2006 6:00 pm

Abcd1234 wrote:
(my own employment contract has a clause like this, but the company brass has stated they won't enforce it).

Can you get statement that in writing? If so, it would be more enforceable.

In fact, Richard Stallman anticipated this situation:
In the GPL, RMS and Eben Moglen wrote:
You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names:
Quote:
Yoyodyne, Inc., hereby disclaims all copyright
interest in the program `Gnomovision'
(which makes passes at compilers) written
by James Hacker.

signature of Ty Coon, 1 April 1989
Ty Coon, President of Vice

_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#96536 - simonjhall - Thu Aug 03, 2006 6:37 pm

I had a separate booklet's-worth of contract which detailed exactly who owned what, but it was so contractictory that basically I think everything I make is owned by them! Let's say I make a sandwich (whilst at work) - they probably have the right to steal it right out of my mouth! I doubt they really would kick up a fuss about this project though as they have nothing to gain by firing me and hiring a new programmer.

It is nice going to work however and having real tools and real documentation. Although reverse-engineering stuff is a laugh :-) I don't ever get the chance to write assembly because I have to though, as when I do it's normally to get the frame rate up, which gets a bit dull. I certainly don't get to write code which rewrites other code!

Again, it's my own fault so I don't have any bad feelings towards the company. Does mean that I don't have to bother fix the THUMB support :-D

#96639 - masscat - Fri Aug 04, 2006 11:14 am

Is there a way of telling if the abort expection happened because of a data or prefetch abort?
They both end up in the Abort processor mode and the only way I can see of determining the difference is from which exception vector was taken. But the exception vectors jump to Nintendo code so this info is lost or does the nin code save it somewhere?

#96641 - Mighty Max - Fri Aug 04, 2006 11:26 am

They just jump to the same vector, there is no difference you can check.

But you should be able to tell if it is a prefetch abort by checking the abt's return address against memory regions code-protection.
_________________
GBAMP Multiboot

#96643 - masscat - Fri Aug 04, 2006 11:56 am

A couple of things about the exception handler in libnds:
Code:
// grab stored r12 and SPSR from bios exception stack
ldr    r0, =0x027FFD90
ldmia   r0,{r2,r12}

// grab banked registers from correct processor mode
mrs   r3,cpsr
bic   r4,r3,#0x1F
and   r2,r2,#0x1F
orr   r4,r4,r2
msr   cpsr,r4
ldr   r0,=reg12
stmia   r0,{r12-r14}
msr   cpsr,r3

If the ARM was running in User mode before the exception then will the code above not return it to User mode and therefore not allow it to get back to the previous exception mode?
Why is r12 being copied out - this is not a banked register.
What is the BIOS code for the abort vectors point to?

Is there a similar way to get the exceptions on the ARM7?

#96646 - Mighty Max - Fri Aug 04, 2006 12:12 pm

masscat wrote:

If the ARM was running in User mode before the exception then will the code above not return it to User mode and therefore not allow it to get back to the previous exception mode?


Correct, but the arm7 shouldn't be in user mode, using libnds/devkitarm. crt0 sets the default mode = 0x1F (system). For additional user mode support, you can just read the banked rN_usr

Quote:

Why is r12 being copied out - this is not a banked register.


r12 was used (and changed) by the bios handler, thus the saved version should be used

Quote:

What is the BIOS code for the abort vectors point to?


Sec, ill need a bit to search. :edit: http://forum.gbadev.org/viewtopic.php?t=9657&postdays=0&postorder=asc&highlight=exception+bios&start=19

Quote:

Is there a similar way to get the exceptions on the ARM7?


The arm7 has no mpu, i haven't looked if it handles the vectors that can still occure.

:update:
arm7 exceptions:
- set IRQ, FIQ bits in cpsr (thus disabling them)
- sets stack to 0x0380FFDC
- pushes {r12,r14} to stack (via STMDB)
- pushes spsr to stack
- loads r12 with the user exception vector at stack + 0xC
- BL r12
- restores the saved values
- jumps back

So you can just set 0x0380FFDC to your own handler, that can return. Breakpointing via undefined instructions should be no problem on arm7 too.
_________________
GBAMP Multiboot