Uzebox Bootloader V5

Topics related to the API, programming discussions & questions, coding tips, bugs, etc. should go here.
User avatar
nicksen782
Posts: 714
Joined: Wed Feb 01, 2012 8:23 pm
Location: Detroit, United States
Contact:

Re: New bootloader

Post by nicksen782 »

The bootloader has uppercase and lowercase letters. Perhaps remove the lowercase letters?

Seems like something you would have already thought of though...
User avatar
Jubatian
Posts: 1560
Joined: Thu Oct 01, 2015 9:44 pm
Location: Hungary
Contact:

Re: New bootloader

Post by Jubatian »

I went quite far sqeezing the last bytes out of this thing, it could be quite a feat to get any further. Maybe I will give it a try some day.

I really wouldn't like to remove the lowercase letters, it just wouldn't look right without them. And it wouldn't even change the world for the bootloader. That's 26 symbols, one symbol costs 5 bytes of ROM, so in total that would get 65 instructions. But then there would be that big gaping hole in the ASCII table which would have to be patched up with additional code either copying uppercase characters there or working out the remapping since texts from the UZE headers come in ASCII.

For me it seemed like one wouldn't come accross MMCs these days unless he purposely looked for them on Ebay and similar sites, so it felt like normally it shouldn't be an issue.
rv6502
Posts: 80
Joined: Mon Feb 11, 2019 4:27 am

Re: New bootloader

Post by rv6502 »

Jubatian wrote: Wed May 01, 2019 6:13 pm For me it seemed like one wouldn't come accross MMCs these days unless he purposely looked for them on Ebay and similar sites, so it felt like normally it shouldn't be an issue.
At $10 for an 8GB or 16GB SD card I don't think it's worth supporting MMCs.

Only issue is if an old game only supports MMCs and has no update but it should still be possible to flash the game using an SD card, set the bootloader to game instead of menu, launch the game (which would crash), swap for the MMC card, then hit reset, no?

There's 16MB SD cards on ebay for $1 which are most likely fine.
Even a fake-capacity SD card off an ebay scammer would have more than enough legit space to hold all the Uzebox games :lol:

It'd be cool to squeeze in the feature but it's not that exciting when SD cards are that cheap. (I do sympathise with whoever has a perfectly working MMC card in a drawer and no use for it)
User avatar
Jubatian
Posts: 1560
Joined: Thu Oct 01, 2015 9:44 pm
Location: Hungary
Contact:

Re: New bootloader

Post by Jubatian »

rv6502 wrote: Fri May 03, 2019 4:06 pmOnly issue is if an old game only supports MMCs and has no update but it should still be possible to flash the game using an SD card, set the bootloader to game instead of menu, launch the game (which would crash), swap for the MMC card, then hit reset, no?
I don't think we have any such game in existence: can you recall anything not working on SDSC? The SDSC supports both the MMC and the SD init protocol. The difficulty in finding actual SDSCs is that SD cards often don't carry any identification in this regard, I even have 256Mb cards here which are SDHCs, so would fail with the old bootloader or most of the games. If the card is labeled SDHC, then it is almost certainly an SDHC, but otherwise you can't be sure.

If you happen to have only SDHCs and MMCs around, and had the new bootloader, you could indeed do that of course to play games like Alter Ego or Chickens in Choppers.

There is something I just spotted today (after getting my broadband installed finally allowing me to screw around a bit on Youtube) which I feel more of a problem if it is common enough: https://www.youtube.com/watch?v=ydtDAn4TtaM , what shows in the bootloader. I have no idea how those numeruos messed up entries appear in it, I never experienced anything alike myself. Anyone had any similar experience? Any idea on the cause?
rv6502
Posts: 80
Joined: Mon Feb 11, 2019 4:27 am

Re: New bootloader

Post by rv6502 »

Jubatian wrote: Fri May 03, 2019 5:39 pm There is something I just spotted today (after getting my broadband installed finally allowing me to screw around a bit on Youtube) which I feel more of a problem if it is common enough: https://www.youtube.com/watch?v=ydtDAn4TtaM , what shows in the bootloader. I have no idea how those numeruos messed up entries appear in it, I never experienced anything alike myself. Anyone had any similar experience? Any idea on the cause?
Could they be FAT32 long filename entries? If I remember correctly long filenames were added by Microsoft as some hack by using a previously invalid file entry format/code in the directory file table alongside the 8.3 file entry.
I haven't written any code relating to FAT32 so I might be wrong.

I love the clickbait/SEO title on that video :D
"NES Nintendo CLASSIC Mini Console Clone" :lol:
Beautiful
<Leonardo_Di_Caprio_Hand_Clap.gif>
User avatar
Jubatian
Posts: 1560
Joined: Thu Oct 01, 2015 9:44 pm
Location: Hungary
Contact:

Re: New bootloader

Post by Jubatian »

rv6502 wrote: Fri May 03, 2019 7:17 pmCould they be FAT32 long filename entries? If I remember correctly long filenames were added by Microsoft as some hack by using a previously invalid file entry format/code in the directory file table alongside the 8.3 file entry.
I checked the specs back then to make sure those wouldn't interfere, Microsoft designed it so that even old DOS tools completely unaware of LFNs wouldn't screw up when encountering them. I have a bunch of long filenames on my cards, however I have to admit I don't have Windows at all here, so anything I put on my SD cards went through Linux FatFs. There are even some demos in the master repo which generate UZE filenames exceeding 8.3, someone should have spotted this problem even here long ago (or does everyone use Linux here :lol: ).

Clickbait title - eh, well, it may also have been that he is just interested in random oldschool hardware without knowing their exact capabilities or programming in general, and assumed it sort of fitting seeing a few NES ports.
User avatar
nicksen782
Posts: 714
Joined: Wed Feb 01, 2012 8:23 pm
Location: Detroit, United States
Contact:

Re: New bootloader

Post by nicksen782 »

Actually, he put the true Uzebox specs in the description.

Click-bait. He knew what he was doing. Plus, we don't need I.P. lawyers around wondering about some "NES Classic" system. Not the kind of publicity we need.
User avatar
Janka
Posts: 214
Joined: Fri Sep 21, 2012 10:46 pm
Location: inside Out

Re: New bootloader

Post by Janka »

Jubatian wrote: Fri May 03, 2019 5:39 pm I even have 256Mb cards here which are SDHCs, so would fail with the old bootloader or most of the games.
Well yes. Exactly what happened to me. Those MMCs I found had been a problem solver.
User avatar
Jubatian
Posts: 1560
Joined: Thu Oct 01, 2015 9:44 pm
Location: Hungary
Contact:

Re: New bootloader

Post by Jubatian »

nicksen782 wrote: Sat May 04, 2019 12:17 am Actually, he put the true Uzebox specs in the description. Click-bait. He knew what he was doing. Plus, we don't need I.P. lawyers around wondering about some "NES Classic" system. Not the kind of publicity we need.
Just gave him the benefit of doubt. This is his most clickbaity title, he doesn't appear to use such titles otherwise. He appears to be a HW builder, and might know very little of programming, so the specs can't tell him whether it could emulate a NES or not. Even here there were topics on emulating NES, and for example for Pokitto (some 48MHz Cortex-M0) it was raised whether it could emulate Uzebox. We can confidently say it is a big fat nope, but only because we know how these things work down to the bare metal. I was even somewhat shocked when at some point at work it revealed that somebody knew nothing about interrupts who was actually messing around with HW since many years, and had to explain him the concept. For me it seems like he might have picked word of Uzebox up from somewhere, possibly from someone referring to it exactly by NES ports, and took it by the word, assuming it just worked like you could run NES on tiny Raspberry Pi based things.

Sorry for OFF, just thought it important, people may just not have the skills necessary to spot such at glance nowadays, so be gentle and rather explain, I guess.

ON: So anyone ever experienced that problem happening? Any idea on what could cause it (if you had seen it, any particular details on what type of SD card it was, which filesystem, which operating system you used to copy the files on the card)?
Bootloader bug shown in the video
Bootloader bug shown in the video
bootloader_bug.png (76.29 KiB) Viewed 19711 times
User avatar
Jubatian
Posts: 1560
Joined: Thu Oct 01, 2015 9:44 pm
Location: Hungary
Contact:

Re: New bootloader

Post by Jubatian »

I got some info from him, most importantly, he used Mac OS X to populate the card. Poking around some I found a few references to that this system supposedly puts a bunch of hidden files on the card, it could be that the bootloader picks these up.

Does anyone here have a Mac to give it a try? Does the problem reproduce? If so, could you dig a bit deeper to check how those hidden files look alike, maybe even trying to look at the card using something not aware of long filenames? Maybe they could be detected with a few instructions which could still be shoehorned in the bootloader.
Post Reply