Jump to content
IGNORED

512K Cartridge Status


Ksarul

Recommended Posts

I have no idea if the file that Ksarul is distributing is valid... but the demonstration code (which is all I've ever sent out) requires the AVR Flash, AVR EEPROM, and flash ROM to all be present in order to work as in the video.

 

With just the AVR flash programmed, holding space bar should bring up the recovery options, yes, but a 50k hex file seems really small, nearly the full 128k of flash is filled in that demo, and hex files are much larger than the binary data. So I'm not sure what you have there. He may have an older test file which does not have any of the device or mapping functionality.

 

I have 1284P's in my current stock, although P is supposedly just a lower power part.

Link to comment
Share on other sites

I have no idea if the file that Ksarul is distributing is valid... but the demonstration code (which is all I've ever sent out) requires the AVR Flash, AVR EEPROM, and flash ROM to all be present in order to work as in the video.

 

With just the AVR flash programmed, holding space bar should bring up the recovery options, yes, but a 50k hex file seems really small, nearly the full 128k of flash is filled in that demo, and hex files are much larger than the binary data. So I'm not sure what you have there. He may have an older test file which does not have any of the device or mapping functionality.

 

I have 1284P's in my current stock, although P is supposedly just a lower power part.

 

So...

 

Can we get maybe a process and the files to try these out? Anxiously awaiting :) I will email you what he sent me..

 

Greg

Link to comment
Share on other sites

 

So...

 

Can we get maybe a process and the files to try these out? Anxiously awaiting :) I will email you what he sent me..

 

Greg

 

I'm 'gonna make another Rom game cart, as I feel productive doing that. I never liked the headaches from banging my head into the wall.

 

Lemme know when this gets sorted out and I'll be back. :) Being able to use this cart with GPL code controlling the process is an awesome thing to imagine considering the difficulties of doing that on ROM side of it.

 

Gazoo

Edited by Gazoo
Link to comment
Share on other sites

I have no idea if the file that Ksarul is distributing is valid... but the demonstration code (which is all I've ever sent out) requires the AVR Flash, AVR EEPROM, and flash ROM to all be present in order to work as in the video.

 

With just the AVR flash programmed, holding space bar should bring up the recovery options, yes, but a 50k hex file seems really small, nearly the full 128k of flash is filled in that demo, and hex files are much larger than the binary data. So I'm not sure what you have there. He may have an older test file which does not have any of the device or mapping functionality.

.

Just to add one more to the group of those unable to get the AVR running. Flashes just fine with ubergrom.hex file but no dice in getting it to run.

 

However, I think the problem lies in the fact the the file "ubergrom.hex" only contains TI code (from a quick browse of it). My guess is that file only contains the debug software (via the spacebar) and applicable TI code. So that tells me, we don't actually have the AVR microcode that does the GROM emulation nor the AVR bootloader. I'm pretty positive the 1284 will not run native TI code. And likely why the file size is so small.

 

So, I'm guessing we're missing the full AVR dump with embedded microcode and bootloader.

 

I'm shooting from the hip here but thoughts anyone?

  • Like 1
Link to comment
Share on other sites

As far as I know, only I have a "working" version... I hadn't intended any of this to be distributed yet. ;)

 

Looking at what Greg forwarded, that's actually not the final GROM code, it predates all the discussion here on AtariAge which led to further changes, as did some discoveries when I started writing the loader. However, I think it SHOULD work since it will have the correct pinout.

 

The TI code exists at the beginning, and is just a single-run test program (the same as in the gromtest.zip that it appears you got). The AVR code starts at $1C000, and I suspect therein lies your issues - you have to configure the chip itself for a bootloader as well as loading the flash (for this code, you don't need to load the EEPROM, leave it erased. This will also be true on the final).

 

I believe you are all using AVR studio, so I can just describe the fuses you need to set on the programming panel (on the 'fuses' tab):

 

First, using the Main tab, make SURE you are configured for the right AVR (use 'Read Signature' to make sure! If you have the right chip but get a bad signature, that means your communication is not stable, you can slow down the ISP speed under the settings button on that same tab. Before the fuses are set, you may have trouble getting much above 115k, depending on settings you may have to go down to 57.6k. You can turn it back up after the fuses are programmed).

 

So, fuses:

 

BODLevel: Brown-out detected at VCC=4.3V (optional, but a good idea)

OCDEN: Disabled

JTAGEN: Disabled (we need these pins!)

SPIEN: Enabled (it's what we are programming it with)

WDTON: Disabled (still deciding on this)

EESAVE: Disabled (probably optional, but it's cleaner this way)

BOOTSZ: Boot flash size=4096 words Boot address = $F000

BOOTRST: Enabled (else the BOOTSZ vector won't take effect)

CKDIV8: Disabled (we want the full clock)

CKOUT: Disabled (we need this pin too)

SUT_CKSEL: Int. RC Osc: Start-up time: 6CK + 0ms (this gives a fast start internal 8MHz clock)

 

That should get your code booting.

 

For those who feel adventurous, here's the files for the multicart demo in my video. You must program flash, eeprom, and the ROM side as well for this cart to do anything (although the space-bar powerup still works).

 

gromdemocart2013Hex.zip

 

I should make a note about the space bar powerup -- it just adds Easy Bug and Run Program File to the selection menu, so you won't see any changes on the title page. Make sure you hit a key to check. ;) Also it is /not/ a reset check, not even if you have a hardware reset button. It is checked at power on ONLY.

 

And finally, this is all prerelease code. My intention was that we'd have the GROM side programmed and tested, and you could just use the loader program on the TI to put whatever into it. Nobody was very interested in this code in 2010 so I didn't think anyone wanted to deal with AVR Studio and manual assembly of files. :)

  • Like 1
Link to comment
Share on other sites

As far as I know, only I have a "working" version... I hadn't intended any of this to be distributed yet. ;)

 

Looking at what Greg forwarded, that's actually not the final GROM code, it predates all the discussion here on AtariAge which led to further changes, as did some discoveries when I started writing the loader. However, I think it SHOULD work since it will have the correct pinout.

 

The TI code exists at the beginning, and is just a single-run test program (the same as in the gromtest.zip that it appears you got). The AVR code starts at $1C000, and I suspect therein lies your issues - you have to configure the chip itself for a bootloader as well as loading the flash (for this code, you don't need to load the EEPROM, leave it erased. This will also be true on the final).

 

I believe you are all using AVR studio, so I can just describe the fuses you need to set on the programming panel (on the 'fuses' tab):

 

First, using the Main tab, make SURE you are configured for the right AVR (use 'Read Signature' to make sure! If you have the right chip but get a bad signature, that means your communication is not stable, you can slow down the ISP speed under the settings button on that same tab. Before the fuses are set, you may have trouble getting much above 115k, depending on settings you may have to go down to 57.6k. You can turn it back up after the fuses are programmed).

 

So, fuses:

 

BODLevel: Brown-out detected at VCC=4.3V (optional, but a good idea)

OCDEN: Disabled

JTAGEN: Disabled (we need these pins!)

SPIEN: Enabled (it's what we are programming it with)

WDTON: Disabled (still deciding on this)

EESAVE: Disabled (probably optional, but it's cleaner this way)

BOOTSZ: Boot flash size=4096 words Boot address = $F000

BOOTRST: Enabled (else the BOOTSZ vector won't take effect)

CKDIV8: Disabled (we want the full clock)

CKOUT: Disabled (we need this pin too)

SUT_CKSEL: Int. RC Osc: Start-up time: 6CK + 0ms (this gives a fast start internal 8MHz clock)

 

That should get your code booting.

 

For those who feel adventurous, here's the files for the multicart demo in my video. You must program flash, eeprom, and the ROM side as well for this cart to do anything (although the space-bar powerup still works).

 

attachicon.gifgromdemocart2013Hex.zip

 

I should make a note about the space bar powerup -- it just adds Easy Bug and Run Program File to the selection menu, so you won't see any changes on the title page. Make sure you hit a key to check. ;) Also it is /not/ a reset check, not even if you have a hardware reset button. It is checked at power on ONLY.

 

And finally, this is all prerelease code. My intention was that we'd have the GROM side programmed and tested, and you could just use the loader program on the TI to put whatever into it. Nobody was very interested in this code in 2010 so I didn't think anyone wanted to deal with AVR Studio and manual assembly of files. :)

.

Ahh, that would explain a lot (not having officially distributed it). I'll quit trying to make the old hex file work now. I hope I didn't prod you into more workload than you probably already have BUT DAMN am I excited to get this going.

 

Thank you for the detailed explanation and generosity in helping me/us get this one step closer to utter-uber-ness!!!

 

Looks like I won't be chasing any women tonight but rather some solo bit-banging... thanks Tursi!

 

Oh, and I AM very interested so don't put me on the party-pooper list. It's just been a long time for the parts and pieces to come together for me, that and I'm a little slow...

 

Cheers!

 

-Dano

Link to comment
Share on other sites

Ahh, that would explain a lot (not having officially distributed it). I'll quit trying to make the old hex file work now.

No, follow the instructions, see if you can make the old hex file work! :) It will be a lot easier to troubleshoot than the full multicart setup which I don't even have 100% stable here yet. ;)

 

I'm sort of thinking, see if what you have there works first, THEN try the more complicated example.

 

All that said, neither will really be valuable for making your own carts yet, I hand assembled the binaries for them.

  • Like 1
Link to comment
Share on other sites

Ok well .. put the first one back in the programmer, it says "nope" cant put in programming mode.. (the one i flashed b4 and installed to no avail)

put in the 2nd one, stupidly did the fuse part first.. that one now cant be put in programming mode

 

so these guys recoverable? Or did i just make 15$ of plastic waste? guess I need to buy some more

 

G

Link to comment
Share on other sites

Ok well .. put the first one back in the programmer, it says "nope" cant put in programming mode.. (the one i flashed b4 and installed to no avail)

put in the 2nd one, stupidly did the fuse part first.. that one now cant be put in programming mode

 

so these guys recoverable? Or did i just make 15$ of plastic waste? guess I need to buy some more

 

G

 

Hang on to them, they can be recovered but you'll need a high voltage programmer to do it. The Atmel Dragon is probably your best bet.

 

Go order some more on DigiKey and you'll have them on Monday.

 

Cheers!

 

-Dano

Link to comment
Share on other sites

I'll have to quote Ksarul, don't mess with the fuses unless you have to!

 

From my recent reading, I see most people making the mistake of changing the crystal settings, and/or, the SPI settings, when changing the fuse settings. If you disable SPI, then you HAVE to program it via high voltage programmer via debugWIRE (I think it's called). If you mess up the crystal settings, you might be able to fix it by building a circuit with external crystal. This is glossing over the details because I've only just learnt this myself and have no real experience. I'm just being very cautious so I don't brick the two that I have. LOL

 

Greg; Are you using AVRDude or AVR Studio? AVRDude has WAY better debugging commands. You might have a chance at unbricking those guys on your own.

 

But seriously, I'd suggest you just order some more while you figure out the two you've bricked.

 

-Dano

Edited by CantStopClicking
Link to comment
Share on other sites

I'll have to quote Ksarul, don't mess with the fuses unless you have to!

 

From my recent reading, I see most people making the mistake of changing the crystal settings, and/or, the SPI settings, when changing the fuse settings. If you disable SPI, then you HAVE to program it via high voltage programmer via debugWIRE (I think it's called). If you mess up the crystal settings, you might be able to fix it by building a circuit with external crystal. This is glossing over the details because I've only just learnt this myself and have no real experience. I'm just being very cautious so I don't brick the two that I have. LOL

 

Greg; Are you using AVRDude or AVR Studio? AVRDude has WAY better debugging commands. You might have a chance at unbricking those guys on your own.

 

But seriously, I'd suggest you just order some more while you figure out the two you've bricked.

 

-Dano

 

studio.. I will try avrdude tomorrow and see where it gets me ..i have an avrispmk2 clone programmer too

Link to comment
Share on other sites

studio.. I will try avrdude tomorrow and see where it gets me ..i have an avrispmk2 clone programmer too

 

I warn you, it's command-line only. But, you have the power to change just about any possible setting between programmer and avr. And to be fair, I have not used AVR Studio yet, I finally just got my programmer to be recognized by Studio so, everything up to this point, for me, has been done with AVRDude.

 

If you get a chance, post your Fuse settings from AVRS (there's a handy "copy to clipboard" button) from one or both of your AVR's. I'd be curious to see what they're set to. If you're able to get that at this point.

 

Here are mine and they are default from factory (atmega1284p-pu):

BODLEVEL = DISABLED
OCDEN = [ ]
JTAGEN = [X]
SPIEN = [X]
WDTON = [ ]
EESAVE = [ ]
BOOTSZ = 4096W_F000
BOOTRST = [ ]
CKDIV8 = [X]
CKOUT = [ ]
SUT_CKSEL = INTRCOSC_6CK_65MS

EXTENDED = 0xFF (valid)
HIGH = 0x99 (valid)
LOW = 0x62 (valid)

Edited by CantStopClicking
Link to comment
Share on other sites

I don't know much about this design, but I do know quite a bit about AVRs. Does this design have a crystal as part of the design?

 

If not, then typically what has happened is the fuses have been set to one of the clock options that requires a crystal (I do that every once in a while) The solution is to get a 1MHz - 8MHz crystal, put it in the right place (attached to the two XTAL pins) and that should get you the ability to talk to the uC.

 

That said, I agree with the avrdude recommendation. I installed studio, to get the newest AVR GCC package, but I use the command line tools (make, et al) and avrdude (as part of the make process) on all my projects.

Link to comment
Share on other sites

Ok well .. put the first one back in the programmer, it says "nope" cant put in programming mode.. (the one i flashed b4 and installed to no avail)

put in the 2nd one, stupidly did the fuse part first.. that one now cant be put in programming mode

 

so these guys recoverable? Or did i just make 15$ of plastic waste? guess I need to buy some more

 

G

I dunno what you're using for programming, but (a) you SHOULD set the fuses first, and (b) should be no problem reprogramming them. Are you accidentally setting the lock bits?

 

In the worst case, if you accidentally set an external clock then you will need to provide a clock to change it back to internal clock.

Link to comment
Share on other sites

I don't know much about this design, but I do know quite a bit about AVRs. Does this design have a crystal as part of the design?

 

If not, then typically what has happened is the fuses have been set to one of the clock options that requires a crystal (I do that every once in a while) The solution is to get a 1MHz - 8MHz crystal, put it in the right place (attached to the two XTAL pins) and that should get you the ability to talk to the uC.

I listed the required fuse settings in my post (258) above. :)

Link to comment
Share on other sites

I dunno what you're using for programming, but (a) you SHOULD set the fuses first, and (b) should be no problem reprogramming them. Are you accidentally setting the lock bits?

 

In the worst case, if you accidentally set an external clock then you will need to provide a clock to change it back to internal clock.

 

i did your settings... in studio the clock and fuse are in the same place so it's prob the clock.

 

Greg

Link to comment
Share on other sites

The first chip all i did was program the flash memory.. then put it in the TI. and put it back in to check it out and it gives me the error,

Failed to enter programming mode. ispEnterProgMode: Error status received: Got 0xc0, expected 0x00

 

the 2nd went in.. read once.. i set the fuses and clock settings to your list.. now it says that too

 

Greg

Link to comment
Share on other sites

I use AVR studio too. Are you certain that you are programming for the right chip?

 

It is very important in the first step to READ SIGNATURE and make sure you have the right settings. There are two reasons: first, it verifies that communications are working. If the chip is running slower than expected or something is wrong with the connection, you won't get reliable communication. The second reason is that the fuse settings are different on different AVRs, and so if you set the wrong chip type, the values you write won't mean what the GUI says! I always do this first and when I forget, I usually regret it for an hour or so till I notice. ;) (My AVR Studio, at least, won't allow me to disable SPI programming.)

 

post-12959-0-11853800-1403412125_thumb.jpg

 

When setting the fuses, for this one at least, as long as the clock is left to internal, you should always be able to reprogram it. If you set it to external, you will need an external clock to read or program the chip any further (the STK500 has one onboard you can use, check the manual, or you can attach one externally). Also, although I didn't take a screenshot, if you (accidentally or intentionally) set any of the lock bits, you may have trouble reprogramming the chip, but you should still be able to erase it (at which point the problems should go away).

 

post-12959-0-16189600-1403412126_thumb.jpg

 

Finally, when programming the flash, make sure you have the right file. I use the Flash section of this tab. Note this screenshot has the wrong file loaded. ;)

 

post-12959-0-03091400-1403412127_thumb.jpg

 

Make sure you read the debug output in the text window at the bottom and that it verifies a successful compare (always verify!) :)

 

I just burned the files I was sent here, and they came up correctly. No need to hold space for the first boot, the GROM Test program is installed (after the first time you run it, it is self-deleted, though ;) ).

Link to comment
Share on other sites

The first chip all i did was program the flash memory.. then put it in the TI. and put it back in to check it out and it gives me the error,

Failed to enter programming mode. ispEnterProgMode: Error status received: Got 0xc0, expected 0x00

 

the 2nd went in.. read once.. i set the fuses and clock settings to your list.. now it says that too

 

Greg

 

I had exactly the same experience you had with your first chip, but I currently have only 1. Another is on the way.

Can't do anything to get rid of the 0xc0 error. :(

 

Gazoo

Edited by Gazoo
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...