out of the closet

Welcome to the GC-Forever forums, feel free to introduce yourself here!
Post Reply
User avatar
megalomaniac
Posts: 2480
Joined: Sun Aug 21, 2011 5:33 am
Location: Drunk in Texas
Contact:

out of the closet

Post by megalomaniac » Sun Aug 21, 2011 6:12 am

hello to everyone

i have been trolling this forum for quite a while and decided to register and become official.
I have not found a welcome / new members area so i am posting here

i have done my share of coding and dev in the past and have been idle with no real interest/time.
I have been following the XenoGC open source thread and decided to take some interest in this project. (im not promising anything, just feel an interest in opensource material)

based on the info here i have successfully (ptfff) flashed my atmega8 with the hex file and plan to develop a board for GC using the atmega. Minimal components have been successful for flashing and i have made a makefile to ease the pain for others. Currently the makefile is only limited to flashing the chip and setting/reading fuses.
From what i understand we still cannot compile without a rewrite.

The board i have im mind will allow serial port coms to flash future updates...just planning ahead just in case.
I currently do not own a GC at the moment but have 3 on the way to continue testing and hope to help out.



when i stated minimal components, i mean it. the programmer is simple but also needs a powersupply. ill have to test conditions to avoid burning out a GC when flashing but from past experience, it looks easy as pie and will work.
i have attached a horrid photo of my flashing kit i have used which can be built by anyone...
also attached is the AVRdude printout of the current programming progress. Next step, wait for my GC's to arrive to begin some real testing...

set fuse
set to
lfuse:c4
hfuse:d9

Code: Select all

megalomaniac@testbench:~/AVR/Xeno/XenoGC-Source$ make sfuse
/usr/bin/avrdude -p m8 -c ponyser -P /dev/ttyS0 -v -U lfuse:w:0xC4:m -U hfuse:w:0xD9:m  

avrdude: Version 5.10, compiled on Mar 23 2010 at 15:03:00
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "/etc/avrdude.conf"
         User configuration file is "/home/megalomaniac/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/ttyS0
         Using Programmer              : ponyser
         AVR Part                      : ATMEGA8
         Chip Erase delay              : 10000 us
         PAGEL                         : PD7
         BS2                           : PC2
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom         4    20   128    0 no        512    4      0  9000  9000 0xff 0xff
           flash         33    10    64    0 yes      8192   64    128  4500  4500 0xff 0x00
           lfuse          0     0     0    0 no          1    0      0  2000  2000 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  2000  2000 0x00 0x00
           lock           0     0     0    0 no          1    0      0  2000  2000 0x00 0x00
           calibration    0     0     0    0 no          4    0      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : SERBB
         Description     : design ponyprog serial, reset=!txd sck=rts mosi=dtr miso=cts

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e9307
avrdude: safemode: lfuse reads as C2
avrdude: safemode: hfuse reads as D1
avrdude: reading input file "0xC4"
avrdude: writing lfuse (1 bytes):

Writing | ################################################## | 100% 0.01s

avrdude: 1 bytes of lfuse written
avrdude: verifying lfuse memory against 0xC4:
avrdude: load data lfuse data from input file 0xC4:
avrdude: input file 0xC4 contains 1 bytes
avrdude: reading on-chip lfuse data:

Reading | ################################################## | 100% 0.00s

avrdude: verifying ...
avrdude: 1 bytes of lfuse verified
avrdude: reading input file "0xD9"
avrdude: writing hfuse (1 bytes):

Writing | ################################################## | 100% 0.01s

avrdude: 1 bytes of hfuse written
avrdude: verifying hfuse memory against 0xD9:
avrdude: load data hfuse data from input file 0xD9:
avrdude: input file 0xD9 contains 1 bytes
avrdude: reading on-chip hfuse data:

Reading | ################################################## | 100% 0.00s

avrdude: verifying ...
avrdude: 1 bytes of hfuse verified

avrdude: safemode: lfuse reads as C4
avrdude: safemode: hfuse reads as D9
avrdude: safemode: Fuses OK

avrdude done.  Thank you.
read fuse
expect to read
c4d9

Code: Select all

megalomaniac@testbench:~/AVR/Xeno/XenoGC-Source$ make rfuse
/usr/bin/avrdude -p m8 -c ponyser -P /dev/ttyS0 -U hfuse:r:-:r -U lfuse:r:-:r | hexdump

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e9307
avrdude: reading hfuse memory:

Reading | ################################################## | 100% 0.00s

avrdude: writing output file "<stdout>"
avrdude: reading lfuse memory:

Reading | ################################################## | 100% 0.00s

avrdude: writing output file "<stdout>"

avrdude: safemode: Fuses OK

avrdude done.  Thank you.

0000000 c4d9                                  
0000002
write flash

Code: Select all

megalomaniac@testbench:~/AVR/Xeno/XenoGC-Source$ make flash
/usr/bin/avrdude -p m8 -c ponyser -P /dev/ttyS0 -v -U flash:w:XenoAT.1.05.hex:i

avrdude: Version 5.10, compiled on Mar 23 2010 at 15:03:00
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "/etc/avrdude.conf"
         User configuration file is "/home/megalomaniac/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/ttyS0
         Using Programmer              : ponyser
         AVR Part                      : ATMEGA8
         Chip Erase delay              : 10000 us
         PAGEL                         : PD7
         BS2                           : PC2
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom         4    20   128    0 no        512    4      0  9000  9000 0xff 0xff
           flash         33    10    64    0 yes      8192   64    128  4500  4500 0xff 0x00
           lfuse          0     0     0    0 no          1    0      0  2000  2000 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  2000  2000 0x00 0x00
           lock           0     0     0    0 no          1    0      0  2000  2000 0x00 0x00
           calibration    0     0     0    0 no          4    0      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : SERBB
         Description     : design ponyprog serial, reset=!txd sck=rts mosi=dtr miso=cts

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e9307
avrdude: safemode: lfuse reads as C4
avrdude: safemode: hfuse reads as D9
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed
         To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "XenoAT.1.05.hex"
avrdude: writing flash (7762 bytes):

Writing | ################################################## | 100% 3.67s

avrdude: 7762 bytes of flash written
avrdude: verifying flash memory against XenoAT.1.05.hex:
avrdude: load data flash data from input file XenoAT.1.05.hex:
avrdude: input file XenoAT.1.05.hex contains 7762 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 2.95s

avrdude: verifying ...
avrdude: 7762 bytes of flash verified

avrdude: safemode: lfuse reads as C4
avrdude: safemode: hfuse reads as D9
avrdude: safemode: Fuses OK

avrdude done.  Thank you.
Attachments
atmega8.jpg
programmer w/separate 5v power supply
(1.92 MiB) Not downloaded yet
emu_kidid wrote: beer is like WD40 for megalomaniac's brain, gets the gears moving
>>> BadAssConsoles.com <<<

Image Image Image
User avatar
liquitt
Posts: 1810
Joined: Thu Apr 01, 2010 5:43 am
Location: neverland

Re: out of the closet

Post by liquitt » Sun Aug 21, 2011 8:54 am

hey there and welcome to the forums!
that looks like a nice piece of work you did there - seems like you and http://www.gc-forever.com/forums/viewto ... f=26&t=626 could be friends ;)

PS: Bock beer - win!
please search before you ask - a lot has been discussed already!
(or use google with "site:gc-forever.com *term*")
http://is.gd/MDmZcr

we also have a wiki filled with knowledge
http://is.gd/dX58Rm
User avatar
steffen
Posts: 41
Joined: Mon Jan 31, 2011 1:32 pm

Re: out of the closet

Post by steffen » Sun Aug 21, 2011 12:47 pm

I used an Arduino to flash the XenoGC sourcecode to an Atmega8L. Take care, an ordinary Atmega8 might need a higher voltage than the GC drive can supply!

http://code.google.com/p/mega-isp/ is very useful in case you have an Arduino :) You can flash the XenoGC hex like this (on Linux):

Code: Select all

avrdude -p m8 -c arduino -b 19200  -P /dev/ttyUSB0  -U flash:w:XenoAT.1.05.hex -U lfuse:w:0xC4:m -U hfuse:w:0xD9:m -U lock:w:0xCF:m -v -v -v
User avatar
megalomaniac
Posts: 2480
Joined: Sun Aug 21, 2011 5:33 am
Location: Drunk in Texas
Contact:

Re: out of the closet

Post by megalomaniac » Sun Aug 21, 2011 8:21 pm

steffen wrote:I used an Arduino to flash the XenoGC sourcecode to an Atmega8L. Take care, an ordinary Atmega8 might need a higher voltage than the GC drive can supply!
Thank you for the reinforcement, steffen.
Your post on the atmega was also motivation for me to get of my ass and start dev again.


As you stated, the Atmega8L will be necessary since the Atmega8 requires minimum 4.5v.
i had an atmega8 laying around so i decided to try flashing it to start the process of verifying minimal requirements to program/reprogram the chip. i am currently awaiting the arrival of some atmega8L's, until they get here i can always pull 5v from somewhere else (once my cubes arrive also.)

as for the Arduino, its a very nice device to have but its also a bit of overkill for this project considering the chip can be flashed using a simple handmade programmer/power supply consisting of only 5 resistors, 3 diodes, 2 caps, 1 7805, 1 BC547, 1 LED, 1 DB9, 1 power connector.
a programmer consisting of only 15 components total which can be bought for about 5$ -7$ or built practically free if the components are pulled from scrap boards laying around.

I question if the programmer will require on board power supply since the chip can receive power from the GC. This would require flashing the chip with the GC powered on...this might be unsafe (unlikely) but thats why i ordered more than one GC...just in case. Maybe add 2 extra diodes along the data line to isolate the programmer lines from the GC. This would be a simple addition but i would like to keep everything minimal.
Hopefully the power supply will not be necessary, this will reduce the total programmer requirements to only about 8 to 10 simple components.

The angle im working here is to create a ready to use hardware interface in the event we can actually recompile the source.
Who knows, its all speculation until i actually dive in (with my steady supply of bock beer in hand)
emu_kidid wrote: beer is like WD40 for megalomaniac's brain, gets the gears moving
>>> BadAssConsoles.com <<<

Image Image Image
User avatar
megalomaniac
Posts: 2480
Joined: Sun Aug 21, 2011 5:33 am
Location: Drunk in Texas
Contact:

Re: out of the closet

Post by megalomaniac » Sun Aug 21, 2011 8:56 pm

question for you steffen, i see your command line includes locking the bits down.
why would you want to lock em down?
its not nintendo is going to develop some line of code to erase the chip...or is there any other concern?




here is a cleaner way to read bits settings using uisp as opposed to using avrdude as i previously posted above. this makes it much more simple and easier on the eyes for beginners to check their fuses.

Code: Select all

megalomaniac@testbench:~/AVR/Xeno/XenoGC-Source$ make readfuse
uisp -dprog=dasa2 -dserial=/dev/ttyS0 --rd_fuses
Atmel AVR ATmega8 is found.

Fuse Low Byte      = 0xc4
Fuse High Byte     = 0xd9
Fuse Extended Byte = 0xff
Calibration Byte   = 0x9f  --  Read Only
Lock Bits          = 0xff
    BLB12 -> 1
    BLB11 -> 1
    BLB02 -> 1
    BLB01 -> 1
      LB2 -> 1
      LB1 -> 1
emu_kidid wrote: beer is like WD40 for megalomaniac's brain, gets the gears moving
>>> BadAssConsoles.com <<<

Image Image Image
sumas
Posts: 70
Joined: Thu Feb 17, 2011 8:29 pm
Location: Germany

Re: out of the closet

Post by sumas » Mon Aug 22, 2011 8:52 pm

Nice work mega

Is there no chance to use a atmega tiny(attiny?!?)or just the same methode like the jailbreak dongels.

The pic version of this dongles only have to be brund with a bood loader and could be updated via usb.

Hope u understand me.
User avatar
megalomaniac
Posts: 2480
Joined: Sun Aug 21, 2011 5:33 am
Location: Drunk in Texas
Contact:

Re: out of the closet

Post by megalomaniac » Tue Aug 23, 2011 2:41 am

sumas wrote:Nice work mega

Is there no chance to use a atmega tiny(attiny?!?)or just the same methode like the jailbreak dongels.

The pic version of this dongles only have to be brund with a bood loader and could be updated via usb.

Hope u understand me.
im not even start talking about PIC....but, the unfortunate truth to this is:
at the moment only an atmega8/L can accept the pre-compiled hex file which was provided with the original source. Until that source is able to be recompiled and successfully tested, there is no chance to cross compile for other types of chips.
(Just to add further clarification...) The XenoGC chip is a 32pin ATmega8L-8AC TQFP equivalent to the 28pin ATmega8L-8PC DIP.
Also keep in mind any substitute chip must also meet flash size requirements. The current compiled hex file occupies 7762B or 7.58KB of the host chip's flash.

attiny13 - no chance, only 1K flash
attiny2313 - no chance, only 2K flash
attiny25 - no chance, only 2K flash
attiny45 - no chance, only 4K flash
attiny85 - possible with no LED indicators, might not operate correctly at 3.3v since speed is affected by supplied voltage
attiny88 - best option of compatibility



based on this information...and IF the source is able to be compiled/cross-compiled in the future....
Do you have an attiny85 or attiny88 laying around?
Also, do you feel like waiting for the chance if the source is able to be cross-compiled?
If not, might as well just buy an atmega8L.
Maybe you could use that attiny with a ds1621 and LEDs for an internal GC temperature sensor. This should be a quick and easy project if you really wanna put that attiny to use.


I wish i could provide you with better options, but there are none at the moment.




as for the possibility of USB, well, sure, anything is possible.
However, that would require more hardware within the programmer and take away from the simplicity i had in mind for this project. Not to mention, add more cost for the DIY as well as add more complexity to the build. if USB is a requirement, there are many low cost USB-to-Serial adapters online. ~$2 USD with shipping on ebay from China. This is better than buying a USB-to-Serial converter IC with less headaches to build.

My target and focus is to keep this very low cost which could potentially motivate any beginner to read a tutorial, look at some diagrams, build the programmer, install a chip, flash the chip, and be happy with their accomplishment.

This is how i started out. I had a few key players point me in the right direction.
The potential is there for anyone willing to try something out and learn.
The main thing it to keep projects as simple as possible.
Complication only drives away those who want to learn.
emu_kidid wrote: beer is like WD40 for megalomaniac's brain, gets the gears moving
>>> BadAssConsoles.com <<<

Image Image Image
sumas
Posts: 70
Joined: Thu Feb 17, 2011 8:29 pm
Location: Germany

Re: out of the closet

Post by sumas » Tue Aug 23, 2011 12:23 pm

Up to now i only worked with pics.

But the first ps3 dongles was an attiny little and small with programmer via usb. And all PC´s have usb. That was my opinion.
So if there is no usb bootloader from factory installed a programmer must be added. And the project become bigger.
User avatar
megalomaniac
Posts: 2480
Joined: Sun Aug 21, 2011 5:33 am
Location: Drunk in Texas
Contact:

Re: out of the closet

Post by megalomaniac » Thu Aug 25, 2011 5:56 am

i finally put my hands on a GC today for the first time in about 5yrs.....There was a break in at my other home and they stole my original 1st day release GC. After such a loss with such a great companion, i just couldnt bring myself to get another GC...It just didnt feel right to have fun with some other strange GC.
Even the Wii didnt satisfy my needs. My relationship with the Wii was a mistake which was over almost as soon as it began.




So...since i have no emotional attachment to this GC i received today, i tore it apart for inspection. She was very dirty and in need of a proper douching to clean her out good. With all the dust dirt and grime removed i powered her on to see if she still worked after i fondled her insides for a while. There was still life in her and she appeared wanting and ready to receive the first of many surgical implant enhancements..

After the procedure, i put my hands all over her and started playing with her improvements to my delight. The surgery was a success with no side effects or complications. Its been a great first night. She is a fun and dirty little slut that likes to be treated bad...

...This might be the start of something special
here's the pics of our first night together...and i also made a low budget sex tape of us in action
Attachments
surgery.jpg
....Quiet!! Surgical procedure in progress...
(1.25 MiB) Not downloaded yet
before.jpg
Inspecting the enhancements
(1.84 MiB) Not downloaded yet
after.jpg
She is ready for some hot action
(2.01 MiB) Not downloaded yet
the_tape.mkv.zip
Caught on film, lower speaker volume
(2.85 MiB) Downloaded 410 times
emu_kidid wrote: beer is like WD40 for megalomaniac's brain, gets the gears moving
>>> BadAssConsoles.com <<<

Image Image Image
Post Reply