Uzebox DTV

Topics regarding the Uzebox hardware/AVCore/BaseBoard (i.e: PCB, resistors, connectors, part list, schematics, hardware issues, etc.) should go here.
CunningFellow
Posts: 1445
Joined: Mon Feb 11, 2013 8:08 am
Location: Brisbane, Australia

Re: Uzebox DTV

Post by CunningFellow »

@Artcfox

Yes - please send through any changes you feel are needed to the grammar to make it clearer.

I didn't even realise the T2K screen shown was not showing 28Mhz. That must have been taken a long time ago. Shows how slow I have been.

@Jubatian

The current bootloader is fine. People have been using it for years and it already ships in the Uzebox and EUzebox.

There are a whole lot of other reasons that make this a bad time to launch, including being too close to Christmas and being a bad time in the north American school calendar. However for my own personal circumstances I have to launch this now.

If it doesn't launch now, it never will. I just have to ignore that it is bad timing and have my fingers crossed it succeeds.
User avatar
Jubatian
Posts: 1564
Joined: Thu Oct 01, 2015 9:44 pm
Location: Hungary
Contact:

Re: Uzebox DTV

Post by Jubatian »

OK, I really have to admit I neglected all the bootloader things. And truly these aren't really what bug me the most about it (that it could have more features).

I am seriously on the verge of adding a ROM self-check to my game since it is driving me nuts that like half the time I get one or another manner broken upload, subtle things, usually in the game data (since it is larger than the code).

If there is nothing else, no delay, I think I will rather throw away all else for the moment to return to the bootloader, this issue simply has to be fixed if it is anything common. I am just seriously worried that I will brick my Uzebox in the process having no hardware skills and nobody at all to help me if I break anything.
CunningFellow
Posts: 1445
Joined: Mon Feb 11, 2013 8:08 am
Location: Brisbane, Australia

Re: Uzebox DTV

Post by CunningFellow »

I am part way through a new bootloader that inits the SD card with with same code as SD_Simple and has CRC and flash checking. If it is ready by November/December then I can include that.

If it is not, the old bootloader works just fine, and we now know how we can write a (dot)UZE file to flash a new bootloader anyways - so user upgrades are possible.

I am most concerned with spreading word about the kickstarter launch next friday though.
User avatar
D3thAdd3r
Posts: 3222
Joined: Wed Apr 29, 2009 10:00 am
Location: Minneapolis, United States

Re: Uzebox DTV

Post by D3thAdd3r »

Hey not trying to sidetrack the thread, but I missed seeing anyone talk about an exact(only heard/thought of some basic concepts) solution that can upgrade the bootloader from a .UZE. Is this 100% sure concept and can someone point me to the info or PM me about it? Thank you.
User avatar
Jubatian
Posts: 1564
Joined: Thu Oct 01, 2015 9:44 pm
Location: Hungary
Contact:

Re: Uzebox DTV

Post by Jubatian »

I guess the Lock bits are all left unprogrammed (here only the fuses are defined, omitting those, it is at 25.1 in the ATMega644 datasheet). If so, an SPM instruction can be issued anywhere, so you can program from application section. Otherwise as I examined the bootloader's code it wouldn't be possible (unless you could devise some clever exploit, such as jumping directly onto the section which does the programming, bypassing the size check).

CunningFellow: If you go by the CRC path, don't forget that you need to enable it both ways (so also enabling the CRC of the commands by CMD59). Otherwise if you went for just checking the CRC of what you read, if the command had a fault in the address, it would read from somewhere else, and the sector CRC would be correct. For my own experimenting I rather tried verifying the read by re-reading, which can also detect this type of fault. I guess it isn't slower unless you can afford to have a CRC table (you would have to calculate a 16 bit CRC for a byte in less than 34 cycles along with the other necessities of looping through the sector to equal the maximal performance of a verify by re-reading; you might even be able to afford a CRC table though if it was set up in RAM).

Anyway, possibly the DTV will be reliable enough with the original bootloader. At least here sloppy SD to Micro SD converters are definitely ruled out.

(I have to admit it way my flaw to assume what I experienced on my Uzebox was coming from faulty programming possibly due to the overclocking. I assumed that any failure mode of the SD card would most commonly turn entire sectors into garbage or even completely deadlocking since the SPI communication would fall out of sync. The type of failure I actually had is evil: the MISO contact is poor in the SD to Micro SD converter which occasionally causes it coming up with zero bits instead of ones while the clock and the MOSI is seemingly stable, so the communication process itself never fails)
User avatar
D3thAdd3r
Posts: 3222
Joined: Wed Apr 29, 2009 10:00 am
Location: Minneapolis, United States

Re: Uzebox DTV

Post by D3thAdd3r »

Jubatian wrote:Otherwise as I examined the bootloader's code it wouldn't be possible (unless you could devise some clever exploit, such as jumping directly onto the section which does the programming, bypassing the size check).
This is the answer most likely. Shouldn't matter the version of bootloader or state of lock bits.
CunningFellow
Posts: 1445
Joined: Mon Feb 11, 2013 8:08 am
Location: Brisbane, Australia

Re: Uzebox DTV

Post by CunningFellow »

I would just calculate the CRC the slow normal way. I does not need to be done in that 34 clocks and achieve full speed for the bootloader. The user can wait the extra microseconds :)

With Respect to the bootloader. I have been discussing with Artcfox how to hijack the SPM instructions. We concluded that it would require a different Hijack for each version of the bootloader in the wild.

Then just today D3thAdd3r showed me this

http://oneweekwonder.blogspot.com.au/20 ... -hack.html

Someone has already solved the problem more thoroughly than I was proposing.

Anyway - The AVR BootJacker totally removes any question about shipping the DTV with the old bootloader :)

I can concentrate on my secret Uze project for the time being :)

Oh and total respect to Uze and others who have done highly polished videos on youtube. Just making the animated GIF on the kickstarter page here

https://www.kickstarter.com/projects/si ... n=5d549b70

Took me about 4 hours today.
User avatar
Jubatian
Posts: 1564
Joined: Thu Oct 01, 2015 9:44 pm
Location: Hungary
Contact:

Re: Uzebox DTV

Post by Jubatian »

Wild stuff! It also relies on the correct setting of the Lock bits, though, since it executes LPM instructions to find that SPM it could exploit, which can be disabled even selectively for the bootloader section (at least this can be done for the ATMega644). Of course with the DTV, you have control over what you put in those Lock bits, and I presume they are all unprogrammed on every Uzebox in existence (at least I didn't find any reference here on setting them to anything, and by default they are unprogrammed). If this holds, you don't even need the exploit (as you can just "SPM" from application section), so it is possible to devise rather ordinary ways to update the bootloader (not that interesting, though).

So indeed it isn't such a great problem after all like I thought (because I didn't know how the ATMega644 behaves on this term, assuming protections were in place by default which truly aren't).
CunningFellow
Posts: 1445
Joined: Mon Feb 11, 2013 8:08 am
Location: Brisbane, Australia

Re: Uzebox DTV

Post by CunningFellow »

I have finished the video for the kickstarter now.

https://www.kickstarter.com/projects/si ... n=5d549b70

Could you guys look at it all and give me some feedback.

Thanks :)
User avatar
D3thAdd3r
Posts: 3222
Joined: Wed Apr 29, 2009 10:00 am
Location: Minneapolis, United States

Re: Uzebox DTV

Post by D3thAdd3r »

Watched the video, nice! It covers enough details/highlights to differentiate it from other things and gain interest. It is also compact in time, so I think people will actually watch the whole pitch. I would say job well done here.
Post Reply