PDA

View Full Version : enag, programming harness?



GT
11-21-2004, 10:05 PM
just wondering if anyone has built there own harness to access the boards programming?

RRfireblade
11-21-2004, 10:12 PM
You pretty much have to since they're not anything 'standard'.

So, yeah. ;)

GT
11-21-2004, 10:36 PM
You pretty much have to since they're not anything 'standard'.

So, yeah. ;)


I was hoping i could get more "guidance" on the issue, on the forum or pm. ;)

Steelrat
11-21-2004, 10:38 PM
I know of a person who did, but no one has seen him for a while. Clever guy, was actually able to program the emag to do full auto and some other cool stuff.

RRfireblade
11-21-2004, 10:49 PM
Basically you have hack up and old ACE board and and Old Emag Wire Harness to get the plugs. After that you'll have to get the board pinouts that I won't give out since Tom would likely have my head BUT they have been posted around the net if you look in the right places.Then you'll have to purchase a programmer.....and it has to be the 'correct' programmer for the Emag chip,and then a hex edittor of some type if your going to try and write your own code,and then....if you don't already know it, you'll have to learn 'binary' code as well as how to program in 'assembly' language.

Simple really. ;)

Anything else? :D

MonsterMag
11-21-2004, 10:53 PM
Heres a pic if it helps ;)

http://www.tunamart.com/images/tunacable.jpg

RRfireblade
11-21-2004, 10:57 PM
Oh yeah, don't plan on using a compiler to write the code either as it 'bloats' the code far to much for the amount of board memory you have available to work with.

Steelrat
11-21-2004, 10:59 PM
Slightly off topic, but I wonder why some companies (AGD, Planet Eclipse, Dye) do not have a provision for user update of software, while others (WAS, Vapor, AKA, Race) do.

GT
11-21-2004, 11:13 PM
Slightly off topic, but I wonder why some companies (AGD, Planet Eclipse, Dye) do not have a provision for user update of software, while others (WAS, Vapor, AKA, Race) do.


My guess,
you have to develope a non-geek friendly software interface. Alot less headache to take some of that out of hands of the end user.

I found a post by bil mils on shocker owners and an article he wrote on analog "stamp". got some reading to do.

Tunaman
11-21-2004, 11:33 PM
Heres a pic if it helps ;)

http://www.tunamart.com/images/tunacable.jpgHEY! That is MY Prototype cable! JONAGD has that one now. The new ones are alot nicer. :D

Caffiend
11-22-2004, 01:38 AM
Which software version could you change the start up text?

White_Noise
11-22-2004, 01:55 AM
im pretty sure the start up text can be change in 4.2, i think it can in 4.01

Caffiend
11-22-2004, 02:06 AM
I know you can in 4.x, I'm hoping you can do it in 3.2 also :)

FallNAngel
11-22-2004, 03:01 AM
Basically you have hack up and old ACE board and and Old Emag Wire Harness to get the plugs.

Or you could probably just order them from Mouser or Digikey..


Then you'll have to purchase a programmer.....and it has to be the 'correct' programmer for the Emag chip,and then a hex edittor of some type if your going to try and write your own code

Well, I'm not sure what chip the board has on it (though I could find out), I have a small feeling that there's a free programmer out there somewhere for it. I also have a strong feeling that the chip is locked and you will have no choice but to write your own code.


and then....if you don't already know it, you'll have to learn 'binary' code as well as how to program in 'assembly' language.

You don't "learn" binary. Binary is just 1's and 0's. There's really no way to learn that. I mean, you'll have to know what binary is, how to move individual bits, knowledge of hex, etc; but you won't have to be able to read a program that's been compiled into binary form. You will have to learn a higher level language such as C or ASM though, which isn't an overnight job.


Oh yeah, don't plan on using a compiler to write the code either as it 'bloats' the code far to much for the amount of board memory you have available to work with.

Actually, most often compilers try to do just the opposite and optimize the code. That's one of the benefits (or detriments) to programming in ASM, usually it takes what you have an that's it... which is one of the reasons you'd actually *use* ASM... it's a fast, low level language. Past that, compilers are an essential part of any programming task. I'm not quite sure how you'd go about programming easily without one...

MindJob
11-22-2004, 05:48 AM
All of this should be available from AGD. It would save them the time and trouble of flashing the boards. I watched Tunaman flash mine, and there really is nothing to it, They should sell a harness/interface kit, alons with a cd with ALL ot the available software on it,

A little off topic, but I think E-mag owners are chomping at the bit for new software.

GT
11-22-2004, 09:56 AM
Even if AGD doesnt offer it, it would be nice if some of our more savy AO'ers help build a harness and compile a few different firing programs. I for one think it would be fun to have a ramping board to compete with out timmy brethren.

athomas
11-22-2004, 11:22 AM
The emag IC is a AT90S2313, which is an Atmel AVR.

It can be programmed with an AVR ISP programmer from Atmel or you can build a compatible programmer yourself. There are diagrams on the internet. You will need a harness made for the pinouts from the ISP to match the pinouts from the IC.

Next, you will need to write your own program to operate the emag since AGD does not release their code. The IC is locked so you cannot read the existing program, but you can reprogram the IC with a new program if you have one.

Here is the pinout of the sockets on the emag board as per Have_Blue - Nov-2001.

MindJob
11-22-2004, 11:55 AM
Even if AGD doesnt offer it, it would be nice if some of our more savy AO'ers help build a harness and compile a few different firing programs. I for one think it would be fun to have a ramping board to compete with out timmy brethren.

I concure.

Even though I am competant enough to build and maintain computer networks, A+ & N+ certified, I would never even attempt something like building my own, or messing around with programing.

However, like GTRSI said, there is a nice market out here on AO of people who would be willing to BUY the nessasary equipment and software.


:spit_take

TAG
11-22-2004, 12:05 PM
crap....I read the title of this thread and I thought someone made a harness so I could reprogram my wife when she is running on battery power :)

I'm sorry my post was no help at all :(

RRfireblade
11-22-2004, 12:13 PM
FallnAngel:

Trust me, I know of what I speak. When you have actually written code for and programmed an Emag,Atmel 2313 BTW, then perhaps my statements will be more understandable to you.

Let me know how it goes and then we'll talk. ;)

sig11
11-22-2004, 12:42 PM
Next, you will need to write your own program to operate the emag since AGD does not release their code. The IC is locked so you cannot read the existing program, but you can reprogram the IC with a new program if you have one.

You can read the EEPROM and the microcontroller. It won't help you much really though. :) You can still use those images to re-flash your gun after playing with your own code. I used those images to verify the initialization for the display for instance... (I was backwards : )

I've come as far as getting the gun to fire and the display printing out my name. Then school started back up and I've had no time.

The problem with high level languages is that compilers do not produce small code and the processor in the emag has a very limited amount of memory.

Have to cut this short... my oven calls. ;)

Lee

FallNAngel
11-22-2004, 02:20 PM
Trust me, I know of what I speak. When you have actually written code for and programmed an Emag,Atmel 2313 BTW, then perhaps my statements will be more understandable to you.

So, how is it that you programmed for a chip without a compiler? A compilers sole purpose is to translate what you have coded (in whatever language it supports) into machine code. Now how well it efficiently translates are based on a few things. 1) what language it was originally written in 2) how well the compiler was optimized for that language

If you write the program in C, it has to break it down to assembly, then to machine code. #1 and #2 determine how well it's done in this case. If you write it in ASM, there's nothing to translate and very little to optimize. Unless you're crazy, you won't be coding the chip in machine code, you'll more than likely just learn the instruction set in ASM and use a compiler to create the machine code. That way you get what you want... very little bloat and fast code.


You can read the EEPROM and the microcontroller. It won't help you much really though. :) You can still use those images to re-flash your gun after playing with your own code. I used those images to verify the initialization for the display for instance... (I was backwards : )

How do you figure? If the EEPROM is locked, you'll read zero's from it. You won't get an image of the chip at all. That's the whole point of having the chip locked... you *can't* read anything useful from it.

athomas
11-22-2004, 02:45 PM
You can read the EEPROM and the microcontroller. ....I used those images to verify the initialization for the display for instance... (I was backwards : )

I've come as far as getting the gun to fire and the display printing out my name.....

Lee

What version of firmware was in your emag to start with? Ver. 1.35 wasn't locked and could be loaded into a computer in hex. Ver 1.37, unfortunately for us, was locked as far as I know. I personally haven't tried it although I do have all the gear except the connectors for the emag board.




BTW, does anyone have the emag board connector manufacturer/sizes/specs so I can order a couple.

RRfireblade
11-22-2004, 02:49 PM
First off let's keep this in context. We're not talking in general programming terms or trying to debate the benifits and requirements of a variety of languages.This is not what this thread was intended to do.We're specifically talking about the E/Xmag Atmel and it's specific set of instructions. This is done in assembly and is simply done far more efficient when 'written' directly than using a compiler.This is the primary benefit of writing to that language than some of the more 'advanced' others.If you want to smallest most efficient code possible,assembly is one of the best choices and is used in this case precisely for that purpose.

Beyond that, there is little else to debate in regards to the point of this thread.

GT
11-22-2004, 03:06 PM
I concure.

However, like GTRSI said, there is a nice market out here on AO of people who would be willing to BUY the nessasary equipment and software.


:spit_take


Hell yea,
TO be honest I am suprised this thread has survived this long. Or maybe TK is waiting for more replies and then assemble the "black choppers" to take us out for "hacking" an emag.

Since AGD no longer makes and emag I thought it would be cool if there were a band of users that could trade and share different firing modes, neat graphic things, and scrolling text across the LED's. I understand the possible implications, however again, since the E is no longer in production I thought this would be ok.

gt

GT
11-22-2004, 03:09 PM
crap....I read the title of this thread and I thought someone made a harness so I could reprogram my wife when she is running on battery power :)

I'm sorry my post was no help at all :(


yea I just noticed that the thread title was enag instead of emag. My typing is pretty crappy.

sig11
11-22-2004, 03:48 PM
How do you figure? If the EEPROM is locked, you'll read zero's from it. You won't get an image of the chip at all. That's the whole point of having the chip locked... you *can't* read anything useful from it.
The program is not written into the EEPROM. It is loaded into the program flash on the AT90S2313. ;) There is 2k bytes of memory for program storage. The EEPROM has 128bytes of data memory that can only be read from/written to one byte at a time. You CAN read the EEPROM and you CAN read the program memory. Check out the mu's manual.



What version of firmware was in your emag to start with? Ver. 1.35 wasn't locked and could be loaded into a computer in hex. Ver 1.37, unfortunately for us, was locked as far as I know. I personally haven't tried it although I do have all the gear except the connectors for the emag board.
I got my Xmag used... No idea what the original software was. It has 3.2 now. I do not believe the memory protection bits are set. Anyway, they just prevent writes as I understand the datasheet. The fuse bits can block data downloading but they can be changed without modifying the EEPROM or the program memory.

I was going to check that, but I didn't feel like tearing my gun apart to plug it in. ;)
I believe that parallel programming mode is the default with the AVRStudio programmer. I have hex dumps of 3.2 and of the EEPROM data. I really haven't ever played with them because I think it would be more work to try modifying them than to write my own software...

Lee

Caffiend
11-22-2004, 04:05 PM
scrolling text across the LED's.

I don't even want scrolling, just TEXT :)

Korrosion
11-22-2004, 04:21 PM
The program is not written into the EEPROM. It is loaded into the program flash on the AT90S2313. ;) There is 2k bytes of memory for program storage. The EEPROM has 128bytes of data memory that can only be read from/written to one byte at a time. You CAN read the EEPROM and you CAN read the program memory. Check out the mu's manual.


I got my Xmag used... No idea what the original software was. It has 3.2 now. I do not believe the memory protection bits are set. Anyway, they just prevent writes as I understand the datasheet. The fuse bits can block data downloading but they can be changed without modifying the EEPROM or the program memory.

I was going to check that, but I didn't feel like tearing my gun apart to plug it in. ;)
I believe that parallel programming mode is the default with the AVRStudio programmer. I have hex dumps of 3.2 and of the EEPROM data. I really haven't ever played with them because I think it would be more work to try modifying them than to write my own software...

Lee

Any chance you'd host the hex dumps for the curious? How hard could it be to replace "AGD 3.2" with "my name 5.0"? And if it does not work... just reflash to 3.2
:cheers:

sig11
11-22-2004, 05:01 PM
Any chance you'd host the hex dumps for the curious? How hard could it be to replace "AGD 3.2" with "my name 5.0"? And if it does not work... just reflash to 3.2
:cheers:

Nope, sorry. Someone asked about that before and Tom said no. :)

Lee

FallNAngel
11-22-2004, 06:03 PM
We're specifically talking about the E/Xmag Atmel and it's specific set of instructions. This is done in assembly and is simply done far more efficient when 'written' directly than using a compiler.This is the primary benefit of writing to that language than some of the more 'advanced' others.If you want to smallest most efficient code possible,assembly is one of the best choices and is used in this case precisely for that purpose.

I agree that coding in ASM leads to small, efficient code. However, you can't just take that code and burn it to the chip. You *will* have to compile it, which *will* require a compiler. Any program, in any compiled language you write (ASM, C, C++, etc) *will* require you to compile it, no matter what platform it's for.


The program is not written into the EEPROM. It is loaded into the program flash on the AT90S2313. ;)

You are correct, I misspoke when I said EEPROM.


I got my Xmag used... No idea what the original software was. It has 3.2 now. I do not believe the memory protection bits are set. Anyway, they just prevent writes as I understand the datasheet. The fuse bits can block data downloading but they can be changed without modifying the EEPROM or the program memory.

Ahh, that would explain things. Honestly, I'm not very familiar with AVR's, as I've only really messed with programming PIC16F84's in my spare time. With PIC chips, you can lock the chip from being read, any attemps to read from it will just return 0's. I find it a bit odd that AVR's would allow you to do what you say, but I suppose that's how they were designed.

athomas
11-22-2004, 09:13 PM
If the lock bits are programmed as they are supposed to be then you cannot read the flash memory or the EEprom memory of an AVR. If the lock bits weren't programmed, then it is quite easy to read the program. I suspect that there may be a few emags/xmags kicking around that didn't have the fuse bits properly programmed. I don't think its a big issue personally.