Uzebox SD Gameloader V0.4.5

Topics related to the API, programming discussions & questions, coding tips, bugs, etc. should go here.
CunningFellow
Posts: 1174
Joined: Mon Feb 11, 2013 8:08 am
Location: Brisbane, Australia

Re: Uzebox SD Gameloader V0.4.5

Post by CunningFellow » Wed Sep 23, 2015 12:56 am

Am now fully convinced about the MISO pull up.

Have an SD card that will not work with the latest bootloader at all and the original SD card I had that would not work with the bootloader first few resets after flashing.

Change the MMC_INIT code to put a weak pull up on MISO until

mmcinit_cmd1_loop:

Now both cards will boot to the game menu. Almost first time every time. The original card still fails about 1/20 boots.

I also removed the extra NOPs and it had no ill effects. However till Harty gets back to us about the SD cards he had that failed, may as well leave them there for the bootloader.

User avatar
Artcfox
Posts: 945
Joined: Thu Jun 04, 2015 5:35 pm
Contact:

Re: Uzebox SD Gameloader V0.4.5

Post by Artcfox » Wed Sep 23, 2015 1:49 am

CunningFellow wrote:Am now fully convinced about the MISO pull up.

Have an SD card that will not work with the latest bootloader at all and the original SD card I had that would not work with the bootloader first few resets after flashing.

Change the MMC_INIT code to put a weak pull up on MISO until

mmcinit_cmd1_loop:

Now both cards will boot to the game menu. Almost first time every time. The original card still fails about 1/20 boots.

I also removed the extra NOPs and it had no ill effects. However till Harty gets back to us about the SD cards he had that failed, may as well leave them there for the bootloader.
Sweet! I hope this will fix my SD card not being recognized some of the times when I power up my Uzebox. Often I have to power cycle it 2 or 3 times for it to recognize the card.

xiaolong
Posts: 12
Joined: Thu Nov 19, 2015 7:40 am

Re: Uzebox SD Gameloader V0.4.5

Post by xiaolong » Thu Nov 19, 2015 7:59 am

Has anybody else had a problem that bootloader picture is twitching, ie. moving randomly but constantly up and down? All the games are ok, though. This has been a problem on my Euzebox and finally checking with oscilloscope showed that vertical sync is not identical with games. Games have nice pattern of 6-6-6 pulses of pre-eq, eq and post-eq. But gameloader sync has shorter first pulse for post-eq.
Attachments
bootloader.JPG
Bootloader vertical sync
bootloader.JPG (99.13 KiB) Viewed 5294 times

User avatar
uze6666
Site Admin
Posts: 4449
Joined: Tue Aug 12, 2008 9:13 pm
Location: Montreal, Canada
Contact:

Re: Uzebox SD Gameloader V0.4.5

Post by uze6666 » Thu Nov 19, 2015 5:28 pm

I never noticed on my tv but that is quite possible since the gamloader is independent of games and has its own video code. Before uzem supported SD correctly it was not possible to debug and trace the bootloader, but now it is possible. I will check it out.

xiaolong
Posts: 12
Joined: Thu Nov 19, 2015 7:40 am

Re: Uzebox SD Gameloader V0.4.5

Post by xiaolong » Fri Nov 20, 2015 5:46 am

Thanks, meanwhile tried a quick hack and replaced 6-6-6 vsync with old skool home computer style one long low pulse and that did help to stabilize picture.

CunningFellow
Posts: 1174
Joined: Mon Feb 11, 2013 8:08 am
Location: Brisbane, Australia

Re: Uzebox SD Gameloader V0.4.5

Post by CunningFellow » Fri Jan 06, 2017 12:08 am

Unable to compile a working bootloader.

Just did a fresh git fetch, make clean and then make.

I get a HEX file, but it does not work.

Am I doing something wrong? has something change? Does the bootloader not compile with 4.9.2 ? Am I just stupid?

User avatar
Jubatian
Posts: 1355
Joined: Thu Oct 01, 2015 9:44 pm
Location: Hungary
Contact:

Re: Uzebox SD Gameloader V0.4.5

Post by Jubatian » Fri Jan 06, 2017 9:04 am

CunningFellow wrote:Unable to compile a working bootloader.
No, I got the same. Removing the progress bar fixes it, you will get a functional bootloader for experimenting. At some point I located the race condition which kills the bootloader, but forgot later. It is not trivial, as I remember it relates to the programming process itself.

CunningFellow
Posts: 1174
Joined: Mon Feb 11, 2013 8:08 am
Location: Brisbane, Australia

Re: Uzebox SD Gameloader V0.4.5

Post by CunningFellow » Fri Jan 06, 2017 12:34 pm

When I try to compile - I get no picture at all. No menu to even select what to flash.

I don't know if it is a change in the source code or a change in my dev environment.

Last time I compiled the bootloader I was still using WinAVR. Now I have GCC4.9.2 from Atmel Standalone Toolchain.

CunningFellow
Posts: 1174
Joined: Mon Feb 11, 2013 8:08 am
Location: Brisbane, Australia

Re: Uzebox SD Gameloader V0.4.5

Post by CunningFellow » Sun Jan 08, 2017 11:24 pm

@Jubitian - what toolchain are you using?

I have now tried 4.9.2 and 4.7.x both with a clean clone of the source from GIT.

Neither of the hex files makes a TV picture. There is not even a 14mhz clock on VidCLK pin.

Can anyone else compile the bootloader now? Two other people I asked sent me a HEX file and theirs had the same symptoms.

User avatar
Jubatian
Posts: 1355
Joined: Thu Oct 01, 2015 9:44 pm
Location: Hungary
Contact:

Re: Uzebox SD Gameloader V0.4.5

Post by Jubatian » Mon Jan 09, 2017 8:31 am

Mine is avr-gcc 4.8.1. It is what comes as Debian's official package for Jessie, right now I have no simple way to test with others (I have no established method for setting up a local compiler install, paths, overrides and all). I wish to pass this for now, for me things are usually just like "if it doesn't work with most (reasonably current) versions of a compiler, it doesn't work".

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests