View Full Version : Mediagate MG-35 -- new firmware available


Pages : 1 2 3 4 5 6 [7] 8 9 10 11 12 13 14 15 16 17

gadgetmind
08-20-06, 06:49 AM
Yes...My share is called "Netdisk" in Windows...

The command you need is -

smbmount //192.168.1.5/XPDESKTOP/netdisk /mnt rw

The machine is is called XPDESKTOP and the share netdisk.

Ian

davei1
08-20-06, 07:27 AM
Thanks Ian...I had already tried that though...Doesn't work...

Sash command shell (version 1.1.1)
/> smbmount //192.168.1.5/XPDESKTOP/netdisk /mnt rw
error connecting to 192.168.1.5:139 (Invalid argument)
Connection to 192.168.1.5 failed
SMB connection failed
pid 67: failed 256
/> mount
/dev/root on / type cramfs (ro)
none on /dev type devfs (rw)
proc on /proc type proc (rw,nosuid)
ramfs on /hosts type ramfs (rw,nosuid,nodev)
ramfs on /usb type ramfs (rw,nosuid,nodev)
ramfs on /net type ramfs (rw,nosuid,nodev)
/>


The command you need is -

smbmount //192.168.1.5/XPDESKTOP/netdisk /mnt rw

The machine is is called XPDESKTOP and the share netdisk.

Ian

nhousty
08-20-06, 07:33 AM
Ian, have you tried compiling one of the config files that come with the ALtech gpl source? I have had a look through the source and the only driver it seams to have is the net driver.

If you have some time could you have a look at trying the config-net-16MB config file to see it that will run.

Cheers

Nick

gadgetmind
08-20-06, 07:51 AM
Thanks Ian...I had already tried that though...Doesn't work...

Sash command shell (version 1.1.1)
/> smbmount //192.168.1.5/XPDESKTOP/netdisk /mnt rw


Um, I actually mean to not hit post for my message as it's wrong!

The 192.168.1.5 is the IP of XPDESKTOP. So you need -
smbmount //192.168.1.5/netdisk /mnt/rw
but I guess you also tried that!

Ian

gadgetmind
08-20-06, 07:55 AM
Ian, have you tried compiling one of the config files that come with the ALtech gpl source? I have had a look through the source and the only driver it seams to have is the net driver.


Looking at the config files that come with the Sigma source, those with the KiSS source, and those that came with the Al Tek source, I came up with one that stands a good chance on the MG-35.

But the Al Tek modules won't insmod due to missing symbols (from memory, gpio_enable_irq is one of them - search this thread or see here - http://mediagate.pbwiki.com/KissKernelSoFar)

Note that I don't think I've yet tried to build a kernel from the Al Tek sources - once it was obvious that this source is also missing the eeential code/symbols, there didn't seem to be much point.

Ian

davei1
08-20-06, 08:34 AM
Sorry Ian...The only experience I have with linux was messing around on a Shell acount like almost 10 years ago...
Just tried that one as well...but same thing..

/> smbmount //192.168.1.5/netdisk /mnt/rw
error connecting to 192.168.1.5:139 (Invalid argument)
Connection to 192.168.1.5 failed
SMB connection failed
pid 103: failed 256
/>


Um, I actually mean to not hit post for my message as it's wrong!

The 192.168.1.5 is the IP of XPDESKTOP. So you need -
smbmount //192.168.1.5/netdisk /mnt/rw
but I guess you also tried that!

Ian

pbarrette
08-20-06, 09:14 AM
Hi Davei,

It's not a unix thing. It's a command line and basic networking thing.

To be honest, there isn't much that you can break via the telnet interface, but it's always better to be safe than sorry.

Now, regarding your mounting problem... You need to use the IP address of your PC. NOT the IP address of your Netdisk.

Remember that the MG-35 doesn't know that your Netdisk exists. It only sees a share on your PC. It just so happens that you used the Ximeta software on your PC to connect via NDAS to a totally separate Netdisk, then you shared that out from your PC. But the MG-35 doesn't know anything about this. The MG-35 is looking at your computer for shared folders. Not at the netdisk..

So:
smbmount //IP-ADDRESS-OF-PC/Share-Name /mnt rw

pb

pbarrette
08-20-06, 09:36 AM
Ian,

I found a copy of smbmount from one of the kiss sources that also has smbmnt with it. Smbmnt is normally used in situations where you want users to be able to mount smb shares with smbmount, but you keep smbmnt suid to prevent privilege escalation.

The interesting thing is that while it complains a lot while being run, the pair correctly mounts SMB shares when fed with a non-guest username-password pair. The problem is that it adds nearly half a meg to the cramfs image.

I've been doing some research and found that we can probably rebuild smbmount for the MG-35 so it doesn't require smbmnt. We could probably store a username/password pair in NVRAM where the tftp strings normally go. Yes, they'd still be in plain-text, but I don't see a simple way around that.

I've also managed to remount my internal HDD with the fmask allowing file execution. I'm not entirely sure why it didn't work before, but it probably has something to do with the mount command wrangling that got ISO's working again. With execute on the HDD, we should be able to set up a designated binaries dir on the HDD for stuff that may be too large for the cramfs.

Of course, if we go that route, then everyone will need to have an internal HDD formatted as NTFS with the same bin dir.

I also just took the time to download and peruse the ALTech GPL sources. They seem to have included a lot more than most vendors, but it's obviously far from complete. For example, I looked at all the config files and they're all missing basics like NTFS, cramfs and ramfs support enabled.

Ayway, I guess I'm going to have to build the arm-elf toolchain and start compiling kernels at some point. As I said, I only know C#, which is a far cry from C, so don't expect much on the linux development side from me.

pb

EmuMannen
08-20-06, 10:19 AM
#1 Red
#2 Purple
#3 Green
#4 Green
#5 Red
#6 Purple
#7 Red
#8 Purple
#9 Green
#10 Sea Green
...
Just back from Côte d'Azur... Looks like I have some "catching up" to do!

Super thanks for the colors above, I will go through it tonight when the family has gone to bed (so I can start work...)...

EmuMannen
08-20-06, 10:30 AM
...
As for another deamon I see being potentially useful could be something like Hypertext Transfer Protocol deamon, ...
I have been playing with thttpd (http://www.acme.com/software/thttpd/) and Mathopd (http://www.mathopd.org/) in my Dreambox. Pretty compact deamons... Here is a nice web server comparison chart... (http://www.acme.com/software/thttpd/benchmarks.html)

J. L.
08-20-06, 10:30 AM
I've also managed to remount my internal HDD with the fmask allowing file execution. I'm not entirely sure why it didn't work before, but it probably has something to do with the mount command wrangling that got ISO's working again. With execute on the HDD, we should be able to set up a designated binaries dir on the HDD for stuff that may be too large for the cramfs.

Of course, if we go that route, then everyone will need to have an internal HDD formatted as NTFS with the same bin dir.
Couldn't we add a "/local/bin" mount point to the cramfs image, and then add /local/bin to the $PATH? At that point, if we have a folder on the NTFS disk, or on a SMB share it could be mounted and/or linked to the /local/bin directory and be available regardless of a specific user's configuration.

Joe L.

gadgetmind
08-20-06, 10:44 AM
It took some fiddling, but I'm writing to flash.

The ARM fires /WE to both flash chips during a word write, so my initial effort wrote the same thing to both chips! I've now changed all the knock accesses to uint32_t types and it works much better.

Writing to the other flash should just be a case of shifting the knock/command values up by 16 bits.


#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>

#define fwb 0x8000
/* This value isn't zero as the bottom of flash has RAM mapped over it.
But as the upper address lines are "don't care" during the command sequence,
this value works just fine. No idea how you write to the base of the flash!
*/

// Define knock values
#define kv1 0xAA
#define kv2 0x55

// Define command values
#define com_id (0x90)
#define com_res (0xF0)
#define com_prog (0xA0)

int main (int argc, char *argv[])
{
uint16_t r1, r2, r3;
// Define knock addresses - these are 2x the datasheet values due to the paired word flash.
uint16_t * ka0 = (uint16_t *) (fwb);
uint32_t * ka1 = (uint32_t *) (fwb+0x1554); /* AAA */
uint32_t * ka2 = (uint32_t *) (fwb+0xAA8); /* 555 */
uint32_t * ka3 = (uint32_t *) (fwb+0x1554); /* AAA */
// Address and value to try writing
uint16_t * wa = (uint16_t *) (0x1FF08); /* Above config, below kernel. */
uint16_t wv = 0x1234;

int i;

// ID Check !!

// Knock
*ka1 = (uint32_t) (kv1);
*ka2 = (uint32_t) (kv2);
// Auto ID mode
*ka3 = (uint32_t) (com_id);
// Read manufacturer
r1 = *ka0;
// Read device code
r2 = *(ka0+2);
// Reset to read mode
*ka0 = (uint32_t) (com_res);
// Print Manufacturer and ID code
printf("ID = %04x\n", r1);
printf("Dev code = %04x \n", r2);

// Write test !!!!! //

// Report value in memory before we start
// Should not bother writing if it's already there
r3 = *wa;
printf("Start value = %04x\n", r3);

// Knock
*ka1 = (uint32_t) (kv1);
*ka2 = (uint32_t) (kv2);
// Prog mode
*ka3 = (uint32_t) (com_prog);
// Write word
*wa = wv;
// Read until the value has been written (should check toggle bits, errors, etc.)
for (i = 0; i<1000; i++) {
r3 = *wa;
if (r3 == wv) break;
printf ("%04x ", r3);
}
// Reset to read mode
*ka0 = (uint16_t) (com_res);

// Report value in memory at end
r3 = *wa;
printf("\nEnd value = %04x\n", r3);

exit(EXIT_SUCCESS);
}



Here is the output from a successful run -


# ./peek 0x1ff08
Value at 0x01ff08 = 0xff
# ./peek 0x1ff09
Value at 0x01ff09 = 0xff
# ./peek 0x1ff0a
Value at 0x01ff0a = 0xff
# ./peek 0x1ff0b
Value at 0x01ff0b = 0xff
# ./fw
ID = 00ec
Dev code = 2275
Start value = ffff
edc7
End value = 1234
# ./peek 0x1ff08
Value at 0x01ff08 = 0x34
# ./peek 0x1ff09
Value at 0x01ff09 = 0x12
# ./peek 0x1ff0a
Value at 0x01ff0a = 0xff
# ./peek 0x1ff0b
Value at 0x01ff0b = 0xff

Getting this code into a nice function to write a structure to memory isn't much more work but I'm not going to have any time until next weekend.

Ian
P.S. If you're going to play with this, note I was in an 0xFF filled are just below the config data, not at the top of it as the comment says. A better wa address is 0x3F000 assuming you don't fancy writing to the top of your BIOS area.
P.P.S. Edit to say that the lunchtime wine just wore off enough for me to add the logic to this to check bit 1 of the address and shift the knocks to hit the right flash chip. This code can now be bundled into a flash_write function and we can then do config_write.

gadgetmind
08-20-06, 10:53 AM
Couldn't we add a "/local/bin" mount point to the cramfs image, and then add /local/bin to the $PATH? At that point, if we have a folder on the NTFS disk, or on a SMB share it could be mounted and/or linked to the /local/bin directory and be available regardless of a specific user's configuration.

Joe L.

This is why I'm working on the config file format and flash writing. We want everyone to be able to use the same .upgrade files but have their own configuration.

Off the top of my head, I see us having the following configuration options -
1) String - path to preferred server in the form //server/share
2) Boolean - "single server" When the "single server" flag is set, our replacement nbtscan will lookup the name of "server" to populate /hosts/hosts and to create the directory in /net. (Otherwise our replacement will invoke nbtscan)
3) String - Path to custom startup script on HD or and smb share. If the latter, the //server/share will be mounted onto /mnt automagically.

Note that dvdplayer.bin is responsible for mounting lots of shares and bringing up the network. My thought is for sashrc to launch dvdplayer and then wait a set time (or for the network to come up) before running the startup script, which I guess will kick off ftpd and httpd.

Thoughts

Ian

gadgetmind
08-20-06, 10:59 AM
I've been doing some research and found that we can probably rebuild smbmount for the MG-35 so it doesn't require smbmnt. We could probably store a username/password pair in NVRAM where the tftp strings normally go. Yes, they'd still be in plain-text, but I don't see a simple way around that.


I haven't looked at an smbmount at all. Do you have a link to some source?


I've also managed to remount my internal HDD with the fmask allowing file execution.


What was your command line?


Of course, if we go that route, then everyone will need to have an internal HDD formatted as NTFS with the same bin dir.


See my comments regards extra configuration.


Ayway, I guess I'm going to have to build the arm-elf toolchain and start compiling kernels at some point. As I said, I only know C#, which is a far cry from C, so don't expect much on the linux development side from me.


Bite the bullet! I'm still having to look up nearly *everything* when writing C, but slowly I'm starting to be able to just snip bits from other stuff I've already written.

Sadly, I'm not going to be the person doing heavy-duty coding, either. I'm happy sniffing around, and using my mix of hardware and software knowledge to figure stuff out, but we need some experienced C coders to step up to the bar.

Ian

pbarrette
08-20-06, 11:52 AM
Hi all,

Ok, in order now...

@EmuMannen,

Welcome back!

Someone noticed an issue with the location of an image during photo thumbnail previews.. I'll see if I can get a picture up for you.

----------------------------------------

@JL,

My concern is with the limited size of the flash memory and what we can fit in the cramfs image. If we want to reference binaries in a startup script that aren't located in the cramfs image, we will need to have a way to make sure that those binaries are available. Either on an SMB share or on a remounted HDD. Either way, if the script kicks off without the binaries available, and those binaries are needed for proper function, that would be a bad situation.

----------------------------------------

@Ian,

That's good news on the flash writing. It opens up a lot of posibilities for us.

For smbmount sources, take a look at the ALTech GPL package. They include a copy of samba, including both smbmount and smbd. The server isn't really that helpful until we get a rw copy of ntfs in the kernel, but it may come in handy later.

My command line for remounting the HDD is:
mount -t ntfs /dev/discs/disc0/part1 /cdrom -o fmask=0000

It never seemed to work before, but I'm guessing it had something to do with the replacement of "mount" with a busybox symlink in my older firmware versions. The latest firmware uses the stock firmware's busybox, renamed to "mount" as its mount command. A bit of bloat, I know, but it seems to be working for now.

Since dvdplayer.bin handles the smb mounts as well, I was thinking that we could replace "smbmount" with a pass-through. It could take the hostname, sharename and mountpoint and pass those to a properly written smbmount command along with the correct username/password options. Obviously it would have to read the uname/pword combo from somewhere. The nvram being the obvious choice.

I've been doing some file comparisons trying to look for your missing gpio_enable_irq and haven't had much luck. The KiSS modules don't mention this function at all, while both fipmodule and khwl on the MG35 need it. I'm beginning to think that the function is present in the kernel sources, but is called something else. It would be a hell of a lot nicer if ALTech would just give us working kernel sources instead of playing this BS cat and mouse crap.

I think we should also take a look at building ZFLAT support into the kernel. The config option "CONFIG_BINFMT_ZFLAT" doesn't seem to be present in the Sigma config files, but it would be interesting to see if it will build it. If we could compress our binaries, we may be able to recover more space. Of course, our cramfs image is also compressed so the space savings may not be that great, but it would be worth a shot.

pb

gadgetmind
08-20-06, 12:49 PM
Of course, our cramfs image is also compressed so the space savings may not be that great, but it would be worth a shot.


I don't think it will gain us anything. It might even increase size, and the double decompress will certainly slow program loading.

Ian

teddystacker
08-20-06, 01:04 PM
@EmuMannen

Welcome back,hope you had a good holiday..

Loaded up you Gui - this is totally amazing being as you did it totally blind - so many thanks for your efforts on this one,it must have too many hours...

I just wish I could contribute more here - but my skiills in certain areas are so limited..

Here is my feedback on the GUI..

My only real niggle (apart from the ones you already know), I noticed that in the file list (the final one where you select the actual files to be played) - the yellow text shows up quite blurred on my TV and the standard white txt looked so much more clearer and easy to read... its amazing that this is my only real critizem and I am sure it wil be a easy fix..

Thanks again to you all for your outstanding work..

EmuMannen
08-20-06, 01:07 PM
...
I just found this about KiSS played, I thought maybe it could be useful for the graphics. Hope it's not old news.
...Great information (especially the KiSS dev docs.). I have guessed most of it but I am really pi55ed off that they didn’t use one of the default OSD 8-bit palette with "all primary and secondary colors with intensity and saturation gradients" etc. (instead of a brain-dead hard coded one in dvdplayer.bin). And that they had made use of the built-in 4 bit alpha channel using alpha channel support in PNG-images on the overlay, especially since it’s already supported by the hardware and open source libs!

I will try to make a summery of all this information on the Wiki as soon as I get some spare time…

EmuMannen
08-20-06, 01:32 PM
@EmuMannen
Welcome back,hope you had a good holiday..

Thanks still trying to catch up but wife and kids are efficiently hogging my event queue with interrupt calls…

Loaded up you Gui - this is totally amazing being as you did it totally blind - so many thanks for your efforts on this one,it must have too many hours...

I now got it all in different Photoshop layers and some scripts for automation. My work up to now is just scribbling to try out the boundaries of this box. I will make a new and improved version of the original GUI (using some custom graphics and nicer colors). The hardware could handle a much more advanced GUI (if able to load new palettes on the fly and using alpha). A scriptable theme engine would be nice (and could have been part of the original device) but I guess it might be over-the-top unless AL Tech changed their mind and released their code…


My only real niggle (apart from the ones you already know), I noticed that in the file list (the final one where you select the actual files to be played) - the yellow text shows up quite blurred on my TV and the standard white txt looked so much more clearer and easy to read... its amazing that this is my only real critizem and I am sure it wil be a easy fix..

I might have to rethink how different states should be indicated (it’s a mixture of text color, outlining, embossing etc. in the original GUI). I already got some ideas how the GUI could get a bit more consistent. I would also like to make another color scheme but I know you want a blue-gold looking thing so I’ll try to finalize one such first (but I will alter the boot screen so that it blends in to that scheme etc.). Glad you like what you see so far…

mpjohnst
08-20-06, 01:44 PM
@mpjohnst.

1) Yes. You can always revert back to the old firmware if you don't like the new one.

In fact, the latest firmware image should be MUCH safer to load than the stock firmware. Just be sure that your current firmware is at least 1.4.x as the bootloader for the 1.3.x series seems to be slightly different.

Since the NewGui firmware doesn't erase the bootloader, it should be possible to recover the device even in the case of a power outage during the firmware upgrade.

2) With the latest "NewGui-144a-eng" firmware, playback has not been changed or limited in any way.

Previous changes to the firmware broke ISO support, and one firmware I had up for a couple of hours accidentally broke network playback. This latest firmware should support all of the original file types and playback modes that the original, stock firmware supports. If anything is broken, please let me know so I can figure out what went wrong and how to fix it.

3) There are some test shots of the new GUI somewhere earlier in this thread, but there are no pictures up in the Yahoo groups area.

I should really get on that. Suffice it to say that the new GUI is in exactly the same format as the old GUI. The difference is that the new GUI has a nicer color scheme and the exact images displayed have been made to look a lot better. Functionality, however, is exactly the same as stock. So you could say that the new GUI is basically a new skin for the original GUI.

4) Yes. Browsing files is done exactly the same as the original firmware.

At some point, we hope to be able to completely replace the GUI with our own. At that point, we would hopefully have support for browsing by cover art. However, as stated earlier, the new GUI is really just a new skin.

5) It doesn't take much..

I only code in C#, which means that my programs are basically limited to Windows support utilities and I do not know how to write programs that will run on the MG-35. In addition, my linux skills are fairly limited, yet I think that I've still been able to contribute a lot of knowledge to the project. So what I'm saying is, every little bit helps.

If you do get an MG-35 and wish to contribute to the fund via PayPal, send teddystacker a PM and I'm sure he can give you the details.

pb
Thanks pb!

gadgetmind
08-20-06, 02:22 PM
Since dvdplayer.bin handles the smb mounts as well, I was thinking that we could replace "smbmount" with a pass-through. It could take the hostname, sharename and mountpoint and pass those to a properly written smbmount command along with the correct username/password options. Obviously it would have to read the uname/pword combo from somewhere. The nvram being the obvious choice.


Yup, we can pull this from flash. It would be easy to write a utility that returns strings at a given address in the config area so it could be back-quoted so smbmount would be a script. But our shells seem a bit limited, so perhaps it needs to be a bit of C.

Searching dvdplayer.bin for "pass" shows -
password=,username=administrator,ro
password=,username=Guest,ro
password=gate,username=Media,ro

So, I guess it tries administrator and password without any password and also "Media" with password "gate". I have a utility called "echocli" that saves the cli it's called with to /hosts so I can give it a go.

Is there a lot of demand for such an smbmount smart passthrough?
More than for a nbtscan smart pass-through?

But both require that we have our own config read/write system (hence my recent focus)

Ian

gadgetmind
08-20-06, 02:24 PM
I know you want a blue-gold looking thing

I really like your new graphics. The only adverse comment (yeah, from my wife, good guess) was regards legibility of the black on blue of unselected text when choosing a file.

Ian

EmuMannen
08-20-06, 02:25 PM
I'm pretty sure it uses MicroWindows aka nano-x. The KiSS certainly does (part of their GPL release) and there are nano-x strings in dvdplayer.binMakes much more sense than Java, why would it use a memory hog like Java (haven’t seen any traces of a Java VM)? Vector and Flash is nice and anything would be possible if we (ever) decide on replacing the GUI with a new custom made. Anyway, if memory is limited Java or Flash might be too bloated…

EmuMannen
08-20-06, 02:27 PM
I think I'm going to have to write peek and poke!Brings my mind right back to my old CBM VIC-20! :D

EmuMannen
08-20-06, 02:37 PM
Also, I'm sorry you have to keep switching over to windows. I really can't write an OS portable utility since I basically know C# only. This limits my programming abilities to .NET apps.Easy to fix, switch to Python, as easy as C# (you learn it in minutes) and really portable between platforms (HW and SW). I would give it a go if only the GUI was finished (but I stick to the GUI for now on until it's properly done)...

EmuMannen
08-20-06, 02:43 PM
3. Do you have pics of the new menu system out yet? I just signed up for the Yahoo groups but didn't see them in the picture area..."New GUI" is still in "Alpha state". I have just setup my old frame grabbing hardware so I could easily produce screen dumps as son as I got a finalized and fully working "new GUI" running on my MG-35...

EmuMannen
08-20-06, 02:44 PM
Found one sorta flaw with the new graphics in the firmware...

If you are in PHOTOS...And you have the Thumbnail preview turned on...
The little graphic of the camera is right over top the thumbnail preview so
you can't see it...The little graphic of the camera should be moved so it's
not over the thumbnail preview...A screenshot would be extremely valuable...

icabrindus
08-20-06, 02:44 PM
Hi!

I'm trying to connect to my XP Pro computer, and all that I get is:

/> smbmount //192.168.0.13/mg35 /hosts/ttt

session request to 192.168.0.13 failed
tree connect failed: ERRDOS - ERRnoaccess (Access denied.)
SMB connection failed

Granted everyone full access to the share, and the path is correct. Tried to change some settings in Local policy, but no result.

Any idea?

Vasile

J. L.
08-20-06, 03:17 PM
I've been doing some file comparisons trying to look for your missing gpio_enable_irq and haven't had much luck. The KiSS modules don't mention this function at all, while both fipmodule and khwl on the MG35 need it. I'm beginning to think that the function is present in the kernel sources, but is called something else. It would be a hell of a lot nicer if ALTech would just give us working kernel sources instead of playing this BS cat and mouse crap.
pb

You may have already found this in your search for gpio_enable_irq, but these links give a few pointers in this area:

http://raph.people.8d.com/arm-linux-notes.html

and here

http://lwn.net/Articles/184750/

As you said, it would be nice if AlTech shared the complete set of source files as required under the terms of the GPL.

Joe L.

gadgetmind
08-20-06, 03:35 PM
You may have already found this in your search for gpio_enable_irq, but these links give a few pointers in this area:


The general principle of enabling a GPIO pin to generate a (edge or level triggered) irq isn't a bit issue. Given good docs, it's pretty easy.

But given no docs, and there being a goodly half dozen such missing functions, we're into some good fun reverse engineering.

Ian

EmuMannen
08-20-06, 05:10 PM
#1 Red
#2 Purple
#3 Green
#4 Green
#5 Red
#6 Purple
#7 Red
#8 Purple
#9 Green
#10 Sea Green

Shaky pics hopefully attached.

By the way, with the spectrum palette loaded, the graphics at power up/down still look normal. I guess these use a different palette.

Ian
Thanks again Ian, screenshots helped a lot, can you do it again with the new, attached, custom palette ("MG35_color_hunt_2.act")? The same procedure, just name the color of the elements (#01..#10) using this new palette...

Thanks in advance / Rob

Ps. I think I can do without screenshots this time (but it would be nice if you could separate light colors from dark ones (e.g. bright red (#FF0000) vs. burgundy (#800000) etc.), it's not an requirement, just handy)...

andy666
08-20-06, 05:21 PM
Just registered here after lurking for ages so I can thank you guys for the work you've done.

I've just installed the latest upgrade and I'm very impressed. Graphically the only problem on my setup (component 480p --> aging Fujitsu Plasma) is that I can't read the text on the setup screens at all - just appears white on white to me!

As for telnet, I'll confess to being a Linux novice, although I did quite a lot of shell scripting, high level C (mostly string manipulation and DB stuff) and database programming on various Unixes (mostly SCO) in the early 90s. I found a few problems - mainly due to the limited command set. I was unable to set variables (a=b) or export anything to a lash shell (including $path) - stty isn't available so I couldn't remap the backspace key, and nohup would be useful for playing with ftpd...

I'm tempted to repartition my drive now so I've got ISO files on the NTFS partition and the rest on FAT32 so I can at least upload files with ftp.

After a bit of following the links on the wiki mixed with a bit of googling I just wanted to be sure that I've got the rw ntfs situation clear? Am I right in thinking that "full" ntfs drivers require fuse, so they can be loaded in user space rather than compiled into the kernel, and the kernel version we're running doesn't include fuse? Also that to compile fuse into the kernel we need the full kernel source and/or config which isn't available?

(I still have horrific memories of SCO requiring a kernel rebuild after the slightest change, and the config files becoming corrupted with the least provocation so a rebuild wouldn't work!)

Is there an alternative "loadable module" (like khwl.o using insmod?) version of fuse or ntfsmount? Is it possible to build one?

Lastly - can I run the cross-compiler etc under cygwin or (insert name of other emulator I forgot) under Windows so I can see if I can remember any C and have a play?

gadgetmind
08-20-06, 05:46 PM
Thanks again Ian, screenshots helped a lot, can you do it again with the new, attached, custom palette ("MG35_color_hunt_2.act")? The same procedure, just name the color of the elements (#01..#10) using this new palette...

Ps. I think I can do without screenshots this time (but it would be nice if you could separate light colors from dark ones (e.g. bright red (#FF0000) vs. burgundy (#800000) etc.), it's not an requirement, just handy)...

Ok, I'll try, but I'm away until next weekend. It would make sense for someone else to have a crack at it - all the tools are around.

And I'm not right good with colours. I only know the names of a dozen or so, which is another thing my wife isn't very understanding about!

Ian

gadgetmind
08-20-06, 05:48 PM
Am I right in thinking that "full" ntfs drivers require fuse, so they can be loaded in user space rather than compiled into the kernel, and the kernel version we're running doesn't include fuse? Also that to compile fuse into the kernel we need the full kernel source and/or config which isn't available?


Getting fuse going requires a lot of work. Better kernel and/or fuse backporting.

But ntfsmount might work with our kernel. But I downloaded it and it needs a more up to date toolkit (2.96 or 3.0+) so yet more work!

Ian

EmuMannen
08-20-06, 05:52 PM
Ok, I'll try, but I'm away until next weekend. It would make sense for someone else to have a crack at it - all the tools are around.
One can always hope...


And I'm not right good with colours. I only know the names of a dozen or so, which is another thing my wife isn't very understanding about!
Ok, black, white, gray, red, green, yellow, blue, magenta or cyan in enough for me then...

julian2875
08-20-06, 07:43 PM
pretty cool firmware.........anebodee can help me with ndas??????????? none of my pc's see the mg-35 any ideea why?,what should i do.................thx


emunamen...........great firmware by the way :cool:

nhousty
08-21-06, 03:13 AM
You enabbled it under the setup options on the MG-35?

gadgetmind
08-21-06, 04:17 AM
My current mg35config utility is rather primitive - it just writes a numbered config-xxx.bin file to /hosts and has no command line.

I'm no great whizz with C, and at my current stage it takes me a frustratingly long time to convince the compiler of what I want to do, but I'm prepared to take this one a bit further.

How about this for a few example command lines. (Oh, and I'm open to better names for the utility!)

Read the current config and output all 1000 bytes into a file -
mg35config -r -f /hosts/config.bin

Same but number the file with the config number -
mg35config -r -f /hosts/config-%03d.bin

Read the four parts of the IP address from the config and print in normal
IP format -
mg35config -r "%3d.%3d.%3d.%3d" b:220 b:221 b;222 b:223

Print the tftp path to the romfs
mg35config -r "ROMFS path = %s" s:316

Turn on the power LED
mg35config -w b:172=1

I think we'll only need b: w: and s: but I guess we'll know more when the config has been more thoroughly reverse engineered.

The write will allow multiple values to be written in one config update. I probably won't code write from a file as I don't see much point to it.

Oh, and the write will fail if the config area needs erasing (once per 128 writes) as I'm really not feeling brave enough to code a sector erase that will work across multiple flash devices.

Thoughts?

Ian

gadgetmind
08-21-06, 04:22 AM
One can always hope...


I think that pb and myself are the only ones who've made .upgrades so far.

I have a "stub" of the file, so all you do is "copy/B romfs.stub+cramFS.img new.upgrade" and then use mgcheck on it. Would making this available encourage others to try new firmware? Or is the fear of needing a serial lead to recover from a "suboptimal" cramFS the barrier?

Ian

pbarrette
08-21-06, 07:12 AM
Hi Ian,

First 6 bytes after CONF = MAC address

I haven't looked at much else, but that one was just staring me in the face.

pb

tohands
08-21-06, 07:24 AM
Yeah for sure that will encourage me to help you guys with that.

gadgetmind
08-21-06, 09:06 AM
First 6 bytes after CONF = MAC address


I found some "MACish" things but they didn't match the MAC that the serial console was reporting. Or maybe I was just going mad.

Ian

tohands
08-21-06, 09:24 AM
I tried to figure out how to flash the chip with serial, but on the wiki page, when i click on serial needed, it asked me for a username/password (and I tried to register, but after the register is done, I'm still not able to see how the serial stuff work). I really want to start helping you guy cracking that mediagate

teddystacker
08-21-06, 09:27 AM
I tried to figure out how to flash the chip with serial, but on the wiki page, when i click on serial needed, it asked me for a username/password (and I tried to register, but after the register is done, I'm still not able to see how the serial stuff work). I really want to start helping you guy cracking that mediagate

You only need a password when trying to edit the Wiki , you dont need the password to just read the info..

You need a special serial lead to be able to re-program , do you have this? ,Are you a programmer / coder?

gadgetmind
08-21-06, 09:40 AM
I tried to figure out how to flash the chip with serial, but on the wiki page, when i click on serial needed, it asked me for a username/password (and I tried to register, but after the register is done, I'm still not able to see how the serial stuff work). I really want to start helping you guy cracking that mediagate

I used to have everything on serial reflash on one page, but it's currently all moving around. I guess you have hit a broken link.

Here are the main debricking instructions.
http://mediagate.pbwiki.com/Debricking

and here is the info on the required serial lead.
http://mediagate.pbwiki.com/MG35Hardware#SerialheaderJ9

Note that you only need this approach if you have flashed a bad .upgrade into your unit.

Ian

tohands
08-21-06, 09:41 AM
Yup I know, that why I want the serial thing, cause if I want to help you with the firmware, I need a way to fix my mg35 in case of bad upgrade.

tohands
08-21-06, 09:45 AM
Yup I'm a programmer with 5 year of experience on developping stuff for Windows/Unix/Linux with C, C++ and Java

icabrindus
08-21-06, 09:48 AM
I tried to figure out how to flash the chip with serial, but on the wiki page, when i click on serial needed, it asked me for a username/password (and I tried to register, but after the register is done, I'm still not able to see how the serial stuff work).

My mistake, it was a broken link on the Hardware page (I assume this is what you tried). Fixed now, please try again. Just in case it doesn't work, the page you are looking for is probably http://mediagate.pbwiki.com/Debricking but you can also find it using the "Table of contents" sidebar on the right side of every wiki page. You are probably interested in "Debricking" and "Bootloader console".

Vasile

teddystacker
08-21-06, 09:52 AM
Yup I'm a programmer with 5 year of experience on developping stuff for Windows/Unix/Linux with C, C++ and Java

Welcome onboard , we will all be very grateful of any input you can provide..

kind regards

Teddy..

gadgetmind
08-21-06, 10:06 AM
Yup I know, that why I want the serial thing, cause if I want to help you with the firmware, I need a way to fix my mg35 in case of bad upgrade.

Yup, makes sense. Your steps need to be -
1) Source a serial cable and get it working in some terminal package that has ymodem.
2) Get into the serial loader and have a poke around.
3) Try flashing the romfs.m35 file I provided.

Once you get to this stage, the utilities and bits and pieces on Yahoo can be used to create new .upgrade files. I'll upload my stub and a short text file of instructions as soon as I get a chance.

Ian

gadgetmind
08-21-06, 10:17 AM
I'll upload my stub and a short text file of instructions as soon as I get a chance.


Now done. The text file explains things, but basically you just join the stub and your cramFS with copy /B and then run MGCheck.

Ian

gadgetmind
08-21-06, 10:19 AM
Yup I'm a programmer with 5 year of experience on developping stuff for Windows/Unix/Linux with C, C++ and Java

Great stuff, just let us know how best to help you get up to speed.

Ian

tohands
08-21-06, 11:34 AM
I bought the cable RS232 TTL from ebay, so I'm waiting for it. Maybe I will try to create one myself until I receive my real one.

icabrindus
08-21-06, 11:42 AM
I bought the cable RS232 TTL from ebay, so I'm waiting for it. Maybe I will try to create one myself until I receive my real one.

You can still try things before having the serial cable... V1.4.4a firmware lacks a BOOT section, so it is pretty safe. I was reluctant too to update the firmware, but things worked ok and now I can telnet and look at the things on the device.

Vasile

tohands
08-21-06, 11:45 AM
You can still try things before having the serial cable... V1.4.4a firmware lacks a BOOT section, so it is pretty safe. I was reluctant too to update the firmware, but things worked ok and now I can telnet and look at the things on the device.

Vasile

I already have the firmware from the yahoo group on my mediagate, it work good. But thats not the point, I want to compile my own firmware, so I need that cable if I screw up something. Better having a backup than screw up everything on my MG35 and not able to flash it back until my cable arrive (I only have 1 MG35).

pbarrette
08-21-06, 11:49 AM
Hi Tohands,

I bought a standard USB to serial adaptor based on the Prolific PL2303 at a local store. I then had to tear it apart to remove the charge-pump voltage converter and rewire the pins directly to the PL2303. Then I had to hardwire the DTR/DSR/CD and RTS/CTS lines to avoid detection problems on the PC.

So the serial TTL cable you show is probably the same thing I hacked up without all the extra work. Note that you'll only need the TX, RX and GND lines and the +5v will have to be pulled out of the connector. The good news is that the connector shown looks perfect for a connection to the MG-35's serial header.

pb

tohands
08-21-06, 11:54 AM
Hey PB,
Yeah that what I heard about that usb, that why I removed my post. Better going with something already tested, than trying to get something else and having trouble figure how to make it work.

EDIT I didnt read carefully what you wrote. I thought you said that I maybe need to hardwire stuff to make it work, but I was wrong. You said that what I post was pretty much the same thing that what you did with some modification. Thats good to know, but I'm still going with the serial adapter, I just dont want to waste time on something not working.

For those who want to know http://www.avitresearch.co.uk/usb_to_ttl.htm thats what I was asking about.

tohands
08-21-06, 12:03 PM
Nyway I tried to find that usb to ttl, but it hard to find, so lets go with the serial one.

teddystacker
08-21-06, 12:19 PM
Nyway I tried to find that usb to ttl, but it hard to find, so lets go with the serial one.

@tohands I got my serial from the ebay seller in Canada , even though I am located in the US , it still took about 10 days to arrive.

I am not a programmer,but just wanted it as a "safety Net" incase of a bad Flash like the one PB had that totally bricked his MG - he did nothing wrong and never found out why it went wrong.. (I know it would be no use with a totally bricked mg , but now we are not flashing boot loaders , it makes stuff much safer)

I would gladly lend it out to any person we have known a while , should they mess up their machine,but would want it returned , as my wife and kids would be VERY upset without their MG-35..

pbarrette
08-21-06, 12:22 PM
Hi Tohands,

If you decide to hack apart a standard USB->Serial cable, you'll need to remove or bypass the voltage convertor and rewire it yourself.

Your best bet would be to look for a cable that is easy to get into. The one I bought had a totally form molded shroud that contained the IC's. So I had to do a lot of careful cutting to reach the electronics. Then the solder pads were very small and very fine pitched.

If I had to do it all over again, I'd probably just buy the IC and build a board around it. Failing that, I'd go for something like this (http://catalog.belkin.com/IWCatProductPage.process?Product_Id=91042#) from Belkin that is easy to get into.

Some people are using USB->Serial adaptors made for cell-phones since most of those also use 3.3v signaling. The truth is, if you want to go USB, virtually any USB->Serial adaptor could be modified to do the job.

You really only need RX/TX/GND pins. It's a nice touch to tie CD/DTR/DSR and RTS/CTS together for PC terminal software compatibility. If you don't have good access to the CD, etc pins then you'd need a terminal program that can ignore them.

pb

tohands
08-21-06, 12:38 PM
Hey PB,
its good to know I will try to make something until my real cable arrive.

tohands
08-21-06, 12:39 PM
@tohands I got my serial from the ebay seller in Canada , even though I am located in the US , it still took about 10 days to arrive.

I am not a programmer,but just wanted it as a "safety Net" incase of a bad Flash like the one PB had that totally bricked his MG - he did nothing wrong and never found out why it went wrong.. (I know it would be no use with a totally bricked mg , but now we are not flashing boot loaders , it makes stuff much safer)

I would gladly lend it out to any person we have known a while , should they mess up their machine,but would want it returned , as my wife and kids would be VERY upset without their MG-35..


Yeah that where I found mine. Thanks for the info though

tohands
08-21-06, 12:46 PM
I'm from Canada and the seller was in Canada too, so I hope to get that cable for next week

teddystacker
08-21-06, 12:47 PM
Yeah that where I found mine. Thanks for the info though

No problem , we have a really good bunch of guys here , no ego's etc etc , everyone just helping with what they are best at , overall the project is in its early stages,but we are all getting there..

Any idea what area you want to work on once you have your serial sorted out?

tohands
08-21-06, 12:59 PM
Yeah I first want to make my first .upgrade, that would be the first step. After that me and one friend of mine (A Linux/Unix geek) will try to figure out what we can add to the firmware without screwing up the box. I have a lot of idea, but too soon to know if those idea is doable. So testing will be one of my priority. After that well that another story.

teddystacker
08-21-06, 01:11 PM
Yeah I first want to make my first .upgrade, that would be the first step. After that me and one friend of mine (A Linux/Unix geek) will try to figure out what we can add to the firmware without screwing up the box. I have a lot of idea, but too soon to know if those idea is doable. So testing will be one of my priority. After that well that another story.

Great news to have another programmer / tester onboard..

gadgetmind
08-21-06, 01:13 PM
I've half written "mgnv", which is my MG-35 NV reader/writer. Specifically I have written the easy bit, that being the reading. :-)

So, I can issue a command such as -
mgnv "%d.%d.%d.%d= %s" b:223 b:222 b:221 b:220 s:316
(print four bytes at addresses 223, 222, 221 and 220 in the config data in decimal with dots between and then the string at offset 316)

And I get this -
192.168.0.4 = /tftpboot/mg35/romfs.m35

Another example -
mgnv "%02x:%02x:%02x:%02x:%02x:%02x" b:200 b:201 b:202 b:203 b:204 b:205

00:02:a8:11:d8:c9

It can also dump a config into a file, with optional sequence numbering.

My command line parser also understands what I need for assigning values to locations, so the write shouldn't be too scary.

Ian
P.S. The code is a right mess of casts, as anyone familiar with what I'll be having to throw at sprintf might imagine!

gadgetmind
08-21-06, 01:15 PM
Yeah I first want to make my first .upgrade, that would be the first step. After that me and one friend of mine (A Linux/Unix geek) will try to figure out what we can add to the firmware without screwing up the box. I have a lot of idea, but too soon to know if those idea is doable. So testing will be one of my priority. After that well that another story.

Dunno if it helps, but I've built a fair few bits of existing code for the MG-35 (including BusyBox) and have now written 4-5 general utilities, and am happy to share info on toolkits, command lines, and whatever source I have.

Now we have pb's base "working box with telnet" we maybe need to discuss where we can save flash/memory and what else we want to drop in.

Ian

julian2875
08-21-06, 02:27 PM
anebodee khow/where do i get the ndas scsi controller driver?............i get an error and none of my pc's see the mg-35 plus it show's on my system as a code 10 error?????????

any help..thx

PBee
08-21-06, 02:35 PM
anebodee khow/where do i get the ndas scsi controller driver?............i get an error and none of my pc's see the mg-35 plus it show's on my system as a code 10 error?????????

any help..thx

over here ....

http://web.newsguy.com/confused/

Frenik
08-21-06, 02:45 PM
First up, thanks guys for all your hard work so far...

EmuMannen, nice work on the updated GUI.

Had a quick look through it, and so far so good, except 2 minor things.

With the overscan on my CRT tv, the text/icons at the top are outside the "title safe area", and are only 50% visible. From memory, I think the "Mode Selection" text on the first menu is also off the screen a little.

And just in my opinion, when viewing file lists, the non selected items colours blend a little too much with the background and are kind of hard to read.

EmuMannen
08-21-06, 05:57 PM
First up, thanks guys for all your hard work so far...

EmuMannen, nice work on the updated GUI.

Had a quick look through it, and so far so good, except 2 minor things.

With the overscan on my CRT tv, the text/icons at the top are outside the "title safe area", and are only 50% visible. From memory, I think the "Mode Selection" text on the first menu is also off the screen a little.

And just in my opinion, when viewing file lists, the non selected items colours blend a little too much with the background and are kind of hard to read.
Frenik, I am aware of the overscan problem and I will try to do something about it but space is really limited (as long as we have to use the original layout).

The GUI mod is not finalized and font colors are my major concern right now. I still don’t know the exact palette indexes used for all text elements etc. drawn in runtime. I will make an updated mod of the GUI (trying to tackle any issues reported) as soon as I figured out these palette indexes. We already made a first run with a custom “all spectrum palette” indicating that black and white colors come from the start and end of the palette (probably index 0 and 255) and the rest somewhere in the “green spectrum”. My guess is that we need two additional runs with custom palettes until we mapped them all out for sure. The second run (with the custom palette I submitted yesterday) should nail black and white and narrow the scoop down to a span of 8 to 16 colors for the rest. The last run (with a new custom palette that can be made as soon as I get the results from the second run) will give us the final indexes.

So it’s now down to whomever have the knowledge and time to modify dvdplayer.bin palette with my custom palettes, test and observe the results according to the description in my PDF-file (describing the graphical elements I’m interested in) and finally reporting the results back top me at this board.

I can promise you that the result will make the current GUI much more usable and also provide us with enough information to start making real custom mods of the default GUI. I will try to make a short guide how to do it (maybe encouraging others to try) but not until I got all the information needed...

pbarrette
08-21-06, 07:47 PM
Hi EmuMannen,

The results of Color-Hunt-2:
1) Black
2) White
3) Green (0,153,0)
4) Green (0,153,0)
5) Black
6) White
7) Black
8) White
9) Blue (0,0,255)*
10) Pink (255,0,255)*

About the green.. I'm positive it's the darker one (153). On the blue and pink (magenta, whatever) I'm pretty sure they're both the brighter (255) ones, but I can't be 100% positive.

pb

EmuMannen
08-22-06, 01:07 AM
The results of Color-Hunt-2:
...
Perfect! White is index 0 and black is index 255 then. I will make a new palette during the day with unique values in the green, blue and magenta fields. That should give us the last missing indexes...

Thanks pb. :)

rowe001
08-22-06, 03:01 AM
Gday all,

I have been following your efforts and its looking good. I'm hoping to have spare time in about 1 month. (We are currently building and have to move house soon).

I have 10 years of programming experience in c, c++, java and c# on windows, linux and wince on an embedded device. I havn't done much work on uclinux, but happy to learn.

Keep up the great work and I will be on board to help shortly.

The only thing that was holding me back previously was having no way of debricking my only MediaGate. Now you can flash without the boot loader and able to reflash using a serial, I'm happy to start looking at how we can get some new functionality.

I would like to investigate interpreting the remote signals. Also has anyone investigated
how to start a video or mp3 playing from the command line? I figure once we have some of this base functionality worked out we might be able to start developing a frontend from scratch and possibly bypass the need to reverse engineer too much of the original.

gadgetmind
08-22-06, 03:05 AM
I currently have three custom BusyBox builds -

1)
lash only

2)
telnetd only

3)
[, [[, busybox, cat, cp, dd, dmesg, false, hexdump, ifconfig,
insmod, kill, ln, ls, lsmod, mkdir, mknod, mount, mv, ping, ps,
rm, rmdir, rmmod, route, sleep, echo, test, top, true, umount

Questions:
A) Do we want custom builds or are we happy as we are?
B) Anything missing from (3) ? I'll probably include chmod and I also plan to try and find time to work out why neither my mount nor the one in the KiSS sourced BusyBox will work with ISOs. I can drop extra debug into the source of the mount applet to see what's going on.

I'll also have a play with httpd but want to finish some of the things I've started first!

Ian

gadgetmind
08-22-06, 04:36 AM
I have 10 years of programming experience in c, c++, java and c# on windows, linux and wince on an embedded device. I havn't done much work on uclinux, but happy to learn.


Given what you've done already, you won't find there's a huge amount to learn regards uClinux. But the mysteries of the Sigma/Al Tek hardware/software are many!


The only thing that was holding me back previously was having no way of debricking my only MediaGate. Now you can flash without the boot loader and able to reflash using a serial, I'm happy to start looking at how we can get some new functionality.


Yes, it makes a big difference. Not that it helps when you're experimenting with direct flash writing ...


Also has anyone investigated
how to start a video or mp3 playing from the command line?


Yes, but I haven't documented it. But all you do is start something playing and type ps !


I figure once we have some of this base functionality worked out we might be able to start developing a frontend from scratch and possibly bypass the need to reverse engineer too much of the original.

dvdplayer interacts with the system to do at least the following -
1) Mount of /net and /hosts
2) insmod of khwl and fipmodule (and others if NDAS is enabled)
3) Calling ifconfig to bring up ethernet using NV data
4) Interacting with khwl to configure video.
5) Interacting with fipmodule for remote and front panel.
6) Using nano-x to (directly?) hit the frame buffer in the top 512k of memory.
7) Calling nbtscan and smbmount to handle network shares.
8) Calling mount to handle HD and ISOs.
9) Calling upgrader to handle .upgrade files.
10) Directly accessing flash to perform NV read/write.
11) Calling fileplayer, mpegplayer and mp3play and mp4play.
12) Directly displaying jpegs.
13) Other things that I have probably forgotten!

(4) and (5) will require reverse engineering.
(1), (2), (7), (8), (9) are trivial
(6) and (12) Shouldn't be too difficult
(3) and (10) are easy now I've reverse engineered the config format and mostly written flash read/write.
(11) Should "just work" though these maybe hit the frame buffer for OSD?

Hell, that's starting to look like a task list! :-)

Regards (4) and (5), the KiSS guys and Bravo guys have done a lot of this, though the details will be different for the MG-35.

Ian

EmuMannen
08-22-06, 06:06 AM
11) Calling fileplayer, mpegplayer and mp3play and mp4play.

Anyone investigated if there are any other (enhanced) versions of these binaries in other Sigma based firmwares? I wonder if they contain customized code or if they are just stock copies out of some Sigma dev. kit?

gadgetmind
08-22-06, 06:18 AM
dvdplayer interacts with the system to do at least the following -
1) Mount of /net and /hosts
2) insmod of khwl and fipmodule (and others if NDAS is enabled)
3) Calling ifconfig to bring up ethernet using NV data


Hmmm, all of those are done by setup, which I guess we can use as-is. I'll try some firmware that doesn't run dvdplayer and try calling setup directly.


(3) and (10) are easy now I've reverse engineered the config format and mostly written flash read/write.


But, of course, if we totally dump dvdplayer.bin, then I also need to be able to erase the config area when it fills. Now that's a job for the person with the development box!

My thinking so far has been to see how pleasant we can make things while using dvdplayer as-is (well, with palette patching) but if we can manage to dump it, then life gets interesting.

Of course, getting the various codec players up-to-scratch is also a major prize, even bigger than getting a better GUI in my book.

Ian

EmuMannen
08-22-06, 06:32 AM
New custom palette attached for a last run...

EmuMannen
08-22-06, 06:40 AM
My thinking so far has been to see how pleasant we can make things while using dvdplayer as-is (well, with palette patching) but if we can manage to dump it, then life gets interesting.

My thoughts also, first make custom firmwares with a modified stock GUI using dvdplayer.bin (inheriting restrictions but making the most out of it).

Next step could be (if doable) a new front-end (supporting themes, scripting, plug-ins, whatever...).

First step would be the quick win, low-hanging fruits kind of approach and the second some sort of long term vision to strive against. Seems like a reasonable strategy to me...

tohands
08-22-06, 06:59 AM
Ok Yesterday I tried to compile my own .upgrade, so I took the one you guys created (3.15 meg) I decompile it, extract it, put a text file, compress it, compile it... Now my .upgrade is 3.14 meg... Thats kind of weird, I didnt try it on my mediagate yet cause I dont have the cable to reflash it.

pbarrette
08-22-06, 07:00 AM
Hi rowe001,

Glad to have you on board. I really only do C#, so it's good that we're getting more people versed in C on linux.

I understand about the moving house issue. I've only got a few more days left before movers come to my house, pack up everything I own, then ship it by slow-boat across the Atlantic.

Like Ian said, finding the command line parameters of the various file playing helper apps is as simple as a 'ps' command. The difficulty comes in determining which app listens to the remote control for things like ff, rw, pause and such.

I've been looking at some strings in dvdplayer.bin and a quick google search turns up some interesting posts by the people at MPlayer. Their detailed analysis shows that the binaries from the KiSS player have stolen GPL'ed MPlayer code. A cursory glance at our dvdplayer.bin shows the exact same strings in the exact same order. So there's yet another GPL license violation.

This ties directly to EmuMannen's question: The binaries are likely a barely customized version of stuff contained in the Sigma development kit. Some of them (like the KiSS fileplayer.bin) have additional features like internet radio, but I haven't checked to see whether there are any enhanced versions that will run on our box.

----------------------------

@Ian,

"8) Calling mount to handle HD and ISOs."

I don't think this is entirely correct and that's why we're having issues with replacing the mount command. I think that the HD is mounted directly with standard "mount" code, which is why we aren't seeing problems there. But I think that the MG-35's "mount" command also has some sort of interprocess communication with dvdplayer.bin, which is why ISO's fail when we replace it.

I've probably started and stopped an ISO file about a hundred times now, all while logging a "ps" loop and haven't seen a single mount command issued. I do, however, see a process launched called "[loop0]" and the ISO gets mounted at /iso, but I haven't actually seen the command. So I really don't think that there's a shell based ISO mount going on. I think that dvdplayer.bin is launching mount for ISO's in some special way that allows more control.

Since dvdplayer.bin seems to contain code from the GPL'ed project libdvdcss, I'm guessing that it is handling the ISO mounting and IFO parsing on its own. Yet another issue we'll have to deal with if ALTech continues with their code theft.

pb

gadgetmind
08-22-06, 08:20 AM
Ok Yesterday I tried to compile my own .upgrade, so I took the one you guys created (3.15 meg) I decompile it, extract it, put a text file, compress it, compile it... Now my .upgrade is 3.14 meg... Thats kind of weird, I didnt try it on my mediagate yet cause I dont have the cable to reflash it.

I'll happily take a look at it and see how/where it's different. I'm guessing that the first 665,637 bytes will be the same other than the checksum at the start.

After that, the cramFS will be different and I guess the exact size might depend on the version of mkcramfs and what algorithm it uses.

Ian

EmuMannen
08-22-06, 08:26 AM
I do, however, see a process launched called "[loop0]" and the ISO gets mounted at /iso
A command like "losetup" (e.g. losetup /dev/loop0 /mnt/smb/computerName/shareName/file.iso) would show up as process [loop0] if you run ps ax (I guess). Maybe it is launched before something like a "mount /dev/loop/0 /mnt -o ro -t iso9660" command (I dont know if it is needed to mount a DVD as a whole disk and to handle decryption for encrypted DVDs, maybe via libdvdcss). If that is the case maybe mount fail if losetup is broken? Wild guessing but just had to think out loud (prepared to be flamed as the über noob I am regarding loopback mount of ISO DVDs)... :o

gadgetmind
08-22-06, 08:29 AM
But I think that the MG-35's "mount" command also has some sort of interprocess communication with dvdplayer.bin, which is why ISO's fail when we replace it.

I've probably started and stopped an ISO file about a hundred times now, all while logging a "ps" loop and haven't seen a single mount command issued. I do, however, see a process launched called "[loop0]" and the ISO gets mounted at /iso, but I haven't actually seen the command.


One string in dvdplayer.bin is
mount -i iso9660 -o loop,ro "%s/%s" /iso
but this doesn't mean it's being used. But if this mount isn't used at all, why does having a different version make any difference?

I've written a program called "echocli" that copies its command line to /hosts. I really need to make this launch the original program afterwards and we could then see what's going on.

However, I'm on holiday until the weekend.

Ian

TheKrell
08-22-06, 08:45 AM
... needed to mount a DVD as a whole disk and to handle decryption for encrypted DVDs...Huh? I tried sharing a whole commercial DVD and then playing it with my Mediagate, and I was rewarded with a blank screen and no sound for long enough I decided it would never work. Or were you just commenting about excess baggage left over from the codebase for hardware DVD players?

EmuMannen
08-22-06, 09:14 AM
Huh? I tried sharing a whole commercial DVD and then playing it with my Mediagate, and I was rewarded with a blank screen and no sound for long enough I decided it would never work. Or were you just commenting about excess baggage left over from the codebase for hardware DVD players?Oups... Sorry just thinking out loud... All my DVDs are ripped without encryption, never thought of MG-35 supporting decryption or not, off course it doesn’t! That would be almost as illegal as stealing (open) source code... :eek:

gadgetmind
08-22-06, 09:16 AM
One way to try and diagnose the ISO mount issue would be to link /bin/mount to /hosts/mount We can then make this a softlink to the original busybox or the new one.

We should then try to mount an ISO and see what we get mounted to /iso and what "mount" reports.

BTW, does the behaviour of mounting ISOs with the "broken" firmware vary between HD and SMB shares?

Ian

tohands
08-22-06, 09:38 AM
Hey gadget,
I sent my .upgrade to my webserver, if you want to take a look at it to see if the first 665kb is the same. The url is http://156.34.254.234/cramFS.zip

teddystacker
08-22-06, 09:46 AM
BTW, does the behaviour of mounting ISOs with the "broken" firmware vary between HD and SMB shares?

Ian

Nope , both were broken...

gadgetmind
08-22-06, 09:49 AM
Hey gadget,
I sent my .upgrade to my webserver, if you want to take a look at it to see if the first 665kb is the same. The url is http://156.34.254.234/cramFS.zip

In the first 665637 bytes, these are the only differences -
00000010: C6 61
00000011: BF 67
00000012: C8 09
00000013: 16 C0
00000019: 88 58
0000001A: 2D 32
so just size and checksum.

Your cramFS looks OK, with a hex editor, but I didn't unpack it.

Ian

gadgetmind
08-22-06, 09:50 AM
Nope , both were broken...

OK, guess I'll do some digging when I get a chance. The mount might have changed between BusyBox 0.63 and 1.00

Ian

tohands
08-22-06, 10:07 AM
Ok so I will try to broke one of my serial cable to create the serial to TTL, cause I really want to try it to see if my package work, if that work like it should, I'm in business.

bombur
08-22-06, 11:24 AM
I dont know if it is needed to mount a DVD as a whole disk and to handle decryption for encrypted DVDs, maybe via libdvdcss
DVD CSS is handled by EM85xx (via khwl.o): the challenge keys are passed as setproperty/getproperty ioctls, and decryption is done in h/w; libdvdcss is used as a wrapper only.

gadgetmind
08-22-06, 11:26 AM
DVD CSS is handled by EM85xx (via khwl.o): the challenge keys are passed as setproperty/getproperty ioctls, and decryption is done in h/w; libdvdcss is used as a wrapper only.

But isn't all the CSS stuff just hanging around from this box's DVD heritage?

Ian

teddystacker
08-22-06, 11:35 AM
But isn't all the CSS stuff just hanging around from this box's DVD heritage?

Ian

My guees would be that the box would be capable of doing de-CSS stuff , but I doubt it would be enabled,due to the fact that they would never get a license to include such a feature from the DVD forum..

This is Exactly what Sampo ran into a couple of years back , when they produced the Sampo 631cf - which was the very 1st dvd player that you could also add a hard disk to , it de-coded Vobs directly from hard disk (the never sadly enabled ISO play),which was a clear violation.They stopped production of it in the end,but was a huge seller and "cult" machine (and still is ) - There was a huge firmware mossing program that really did get every ounce out of the ESS Processor..
Thank God I managed to grab 3 units before they did he he...

I see little point on us Enabling that as a feature , as most people that would want to load their MG with isos,would know about de-crypting first..

bombur
08-22-06, 12:04 PM
One string in dvdplayer.bin is
mount -i iso9660 -o loop,ro "%s/%s" /iso
but this doesn't mean it's being used.
It is definitely used. The approximate usage is:
-
show "img/lib/black.jpg"
call "mount -t iso9660 -o loop,ro "%s/%s" /iso"
chdir "/iso/video_ts" or "/iso/VIDEO_TS" or "/iso"
stat "VIDEO_TS.IFO" or "video_ts.ifo"
chdir "/"
if file extention == ".IFO" then
...read IFO file...
...
display "img/play.png" on OSD

At the end:
...
display "img/stop.png" on OSD
call "umount /iso"
...

bombur
08-22-06, 12:27 PM
But isn't all the CSS stuff just hanging around from this box's DVD heritage?
Sure it is. Although it may come in handy if someone connects a DVD-ROM - I don't know (personally, I don't have MG-35)...

tohands
08-22-06, 12:37 PM
Is someone know how much watt there is in the the power supply of the MG35?

icabrindus
08-22-06, 01:01 PM
5V 1.5A /12V 1.5A

http://mediagate.pbwiki.com/MG35Hardware#Powersupply

pbarrette
08-22-06, 02:56 PM
Hi Tohands,

DO NOT load that image. It's hosed.

Somehow you managed to turn all the symlinks into separate ".lnk" files. On top of that, the CramFS structure is hosed to the point where FSExtractor creates 0-byte files on extraction.

So, take "/sbin/insmod" for example. In the official firmware, it's a hardlink to busybox. In my firmware, it's a symlink to busybox. In your firmware it's a file called "/sbin/insmod.lnk" and that's bad.

Also, if you download FSExtractor from SourceForge's WIFI-BOX project, you can examine the image and extract/inject single files into the cramfs image. If you open your cramfs image in it and extract a file, the file will be extracted but will be 0 bytes. That's also bad.

My second box was soft-killed because I loaded a bad cramfs image. That's what made me start seriously hunting for the serial port in the first place.

Originally, I had been building my cramfs images by replacing single files with FSExtractor. When it came time to replace the GUI images, I needed a better way. That's when I started building my cramfs images in a Debian session under QEMU. I would mount the cramfs in debian, then "cp -a" all the files to a working directory, then make the changes, then "mkcramfs" on the working directory to get a cramfs image. The problem was that debian's mkcramfs was creating corrupted images and I soft-bricked my box.

Now I use a different method for building my cramfs images.

I start in a cygwin shell.
I then use "cramfsck -x" to extract the starting image into a directory.
Next, I make the changes that I need.
Finally, I create the cramfs image with:
mkcramfs -e 0 -n Compressed -v -q directory cramfs.img

Since your image is littered with ".lnk" files, I'll assume you're using Windows. If that's the case, you may want to try that procedure.

pb

tohands
08-22-06, 03:17 PM
Hmm weird, I used the mkcramfs from Fedora, I tried to use cygwin but I didnt saw any mkcramfs in it. and I did exactly what gadgetmind say in his text file.

gadgetmind
08-22-06, 03:18 PM
Since your image is littered with ".lnk" files, I'll assume you're using Windows.


I do use cygwin, and QEMU, but compared to having a real Linux box to work on, it is hard work.

You don't need anything fancy, and the machine doesn't even need a keyboard, mouse or monitor. I do most of what I do on an AMD Athlon 1600 that's my DHCP/DNS/samba/whatever server and I just ssh to it from home or work to fiddle around. However, I currently make the cramFS on Linux and then have to use scp to get them to a Windows machine for the mgcheck stage.

I guess we need tools for both Linux peeps and Windows ones, but there really is an upper limit to what you can do with Windows. While BusyBox and kernel builds aren't impossible with Windows, they are such hard work that it's easier just to pop open a Linux shell and do it properly.

Has anyone got arm-elf-gcc working under Windows?

Ian

gadgetmind
08-22-06, 03:21 PM
Hmm weird, I used the mkcramfs from Fedora, I tried to use cygwin but I didnt saw any mkcramfs in it. and I did exactly what gadgetmind say in his text file.

I'm using Debian, and the "cramfsck -x dir file.img" and "mkcramfs dir file.img" works just fine for me.

I just did what I should have done earlier (but was at work an going to a meeting) and used cramfsck to split the .img - yes, well broken.

Ian

tohands
08-22-06, 03:23 PM
So the step I did, first I extract the firmware coming from yahoo group (New 144a) with mgsplit (on windows) after I did cramfsck -x newfw cramFS.img (on windows).

I added a blank text file in /bin just for a test

I uploaded everything on my Fedora box

I did mkcramfs newfw newFS.img (on Fedora)

After I created the batch file like gadget said in is text file

copy /B new.stub+%1.img %1.up
MgCheck.exe -f %1.up -p
move %1.up.fix %1.upgrade
rm %1.up

and I run that batch file (on windows) with the image name, and thats it

tohands
08-22-06, 03:24 PM
So by what I saw, my problem was the cramfsck. I ran the one from the Yahoo group, the one in the extractor stuff.

I should run that from linux instead ?

tohands
08-22-06, 03:26 PM
Ok so I will try to run the cramfsck from my box after my work day is done.

gadgetmind
08-22-06, 03:29 PM
So the step I did, first I extract the firmware coming from yahoo group (New 144a) with mgsplit (on windows) after I did cramfsck -x newfw cramFS.img (on windows).


After splitting the .upgrade, I move the img to Linux to do everything else. I only move things back to Windows for the mgcheck.

Roll on a splitter/joiner for Linux!

Ian

pbarrette
08-22-06, 04:23 PM
Hi Tohands,

You may have to run the cygwin setup program and add the Devel->cramfs package.

I do everything from Windows. I don't have the time nor a spare box at the moment for a dedicated linux machine. I'm sure I'll have to build one at some point, but even my mini-itx based HTPC has been repurposed as a CNC lathe controller.

If you use cramfsck in the windows command prompt, it will create ".lnk" files instead of true unix based symbolic links. If you use the same executable in a cygwin shell, cygwin will see them as symlinks and act on them accordingly. So I just do all of my cramfs rebuilding in cygwin and haven't had any problems.

Another thing I've noticed. If you have multiple copies of the exact same file, whether or not they have the same name, mkcramfs will compact it as a single file and turn the others into hardlinks. Take "/bin/init" and "/bin/sh" for example. Identical files, but they have the same inode on the MG-35. They have different inodes on my PC, but mkcramfs is apparently intelligent enough to turn them into hardlinks to save space.

-----------------------------------

@Ian, Bombur,

Apparently our later copies of "mount" are a problem. I ran some tests with the MG-35 default "mount" and with our newer busybox version.

Mounting an ISO with the stock copy and the "-o loop" option produces the same results in the shell as playing an ISO through the GUI. The mount is successful and I'm left with a "[loop0]" process running in the background.

Attempting to mount an ISO with our new busybox results in a "mount failed: Block device required" message.

Interestingly, I found this (http://bugs.busybox.net/view.php?id=498) on the busybox bugs list. Basically, loop device support was broken for a while.

pb

gadgetmind
08-22-06, 04:28 PM
Interestingly, I found this (http://bugs.busybox.net/view.php?id=498) on the busybox bugs list. Basically, loop device support was broken for a while.


Yes, I saw that earlier today, but couldn't get it to tally with my experiments - I'm sure that when I selected an ISO via to GUI I got the ISO mounted.

I'll grab and ISO to play with and try a BusyBox without devfs support.

Next week ...

EmuMannen
08-22-06, 05:31 PM
I do use cygwin, and QEMU, but compared to having a real Linux box to work on, it is hard work.
I can recommend VMware. I always install VMware on every Windows box I'm using. Cygwin is nice but as you say, there is no substitute for the real thing. With VMware I can have several images of Linux distributions. It's the easiest way to try out new distributions, backup or distribute default installations or move a complete system from one hardware platform to another.

VMware is handing out VMware Player (http://www.vmware.com/products/player/) and VMware Server (http://www.vmware.com/products/server/) for free these days. A preconfigured virtual machine running Linux with all tools needed for MG-35 development could be put together by anyone with the knowledge and a VMware Workstation license. That preconfigured virtual machine could then be used by anyone using VMware Player for free. That would get anyone started in no time with a default and well known environment.

Another option is for anyone to install VMware Server and use it to create a Linux virtual machine and use that as their development box. Could be an alternative or complement to Cygwin.

EmuMannen
08-22-06, 05:43 PM
Anyone got time to make the last “color hunt test” with my latest custom palette (MG35_color_hunt_3.act) (http://www.avsforum.com/avs-vb/attachment.php?attachmentid=62532)?

I would also like to ask if anyone got any additional issues that they would like me to correct in the next version. This is what I got so far (off the top of my head):

1. Proper text colors (as soon as text colors palette indexes are all mapped out)
2. Make boot logo more in line with the blue-gold color schema
3. Change “smiley” into something else (like a ring or dot)
4. Stop “camera image” from interference with photo previews
5. Try to keep text inside “over scan bounding box“

There was also something about clear white text vs. fuzzy yellow one, was it the yellow outline vs. blue outline (because I cant find any yellow text)?

icabrindus
08-22-06, 06:04 PM
I would also like to ask if anyone got any additional issues that they would like me to correct in the next version. This is what I got so far (off the top of my head):

1. Proper text colors (as soon as text colors palette indexes are all mapped out)


Probably in the same category, on Setup/LED, the On/Off settings are "all white" on my TV.

Vasile

EmuMannen
08-22-06, 06:07 PM
Probably in the same category, on Setup/LED, the On/Off settings are "all white" on my TV.
Yes it is the same, it's because we dont know what palette indexes are used for text and the filled round rects behind text in the settings menu. Easy to fix as soon as we got all palette indexes sorted out...

pbarrette
08-22-06, 06:29 PM
Hi EmuMannen,

Actually, it's not exactly the same. I think the text is pure white while the background is a very light grey.

Anyway, the results of color hunt 3 are:
1) Black
2) White
3) Grey
4) Black
5) Black
6) White
7) Black
8) White
9) Dark Yellow (153,153,0)
10) Blue

I think #10 is (0,0,255) but nothing else was blue, so I didn't have a good comparison between the bright blue and the dark blue in your palette.

Also, I don't know if this helps, but I also looked at the OSD colors between the NewGui palette and CH3:

1) Grey background rectangle.
2) Normal menu text
3) Selected menu text
4) Normal Icon
5) Selected Icon
6) Wholly transparent bkg screen text (like the text that says "Change screen position")

NewGUI:
1) Bluish grey
2) White
3) Brght Green
4) White
5) Green
6) Reddish (slightly dark)

CH3:
1) Grey
2) White
3) White with reduced edges (like contract selection, crop outside)
4) White
5) White with reducded edges
6) Black

Anyway.. That's it.

pb

J. L.
08-22-06, 06:34 PM
Anyone got time to make the last “color hunt test” with my latest custom palette (MG35_color_hunt_3.act) (http://www.avsforum.com/avs-vb/attachment.php?attachmentid=62532)?

I would also like to ask if anyone got any additional issues that they would like me to correct in the next version. This is what I got so far (off the top of my head):

1. Proper text colors (as soon as text colors palette indexes are all mapped out)
2. Make boot logo more in line with the blue-gold color schema
3. Change “smiley” into something else (like a ring or dot)
4. Stop “camera image” from interference with photo previews
5. Try to keep text inside “over scan bounding box“

There was also something about clear white text vs. fuzzy yellow one, was it the yellow outline vs. blue outline (because I cant find any yellow text)?
Might I add one here.

Others have described a lack of contrast between the dark blue screen background and the black color of unselected file names. I would like to point out a similar issue, but with the white highlighted selection in the file explorer.

Many of my MP3 names are long enough to extend the entire width of the screen. As such, some of the names of the files extend over the "speaker" graphic image.

It is currently very difficult for me to read white text (of the currently highlighted selection) over a "speaker" image that is also mostly shades of white and light grey.

I'm not sure what would work, perhaps enbossed images of a speaker, movie reel, etc in the same general dark blue you used for the background, then the text will be visible in shades of white and grey over them.

Thanks for all your work. My wife likes the blue color scheme.

Joe L.

teddystacker
08-22-06, 06:41 PM
There was also something about clear white text vs. fuzzy yellow one, was it the yellow outline vs. blue outline (because I cant find any yellow text)?

Yep , I know it was me that suggested using the "Gold and Blue" Scheme , but having seen the yellow on the blue Background in the File list selection screen , it might be a good idea to revert that selection txt back to white to make it more easy to read.Having said that just a "toned down" (Not so bright) yellow might look ok.I guess its just a case of many tests until we all agree what looks the best.I understand its so hard todo all this Blind..

supermegaultra
08-23-06, 01:00 AM
Hey there all,

Anyone know how to reset the mg-35?

I accidently set the screen size to 720p when my monitor cant accept that range. Need to set it back to 'off'

But thought there maybe an easy way to reset the thing.

Looking forward to your replies!

jeff.

Frenik
08-23-06, 01:21 AM
Hi Jeff

If you hit the Video button on your remote (may need to do it a couple of times), that should cycle through the various video modes.

mikes42
08-23-06, 02:08 AM
Time to chime in again and pat a few people on the back.

pb, gadget, teddy emumannen ..... great work guys, your really doing well I just wish I could contribute half as much as you guys have.

Anyway, a thought just occured to me.... I have a 'Laser' (brand) network storage device with samba and ftp configured via a web interface. it also can act as a USB drive.
laserco com au (the CASE-3UNT model)

I was just wondering if we could learn anthing from the firmware on this device to help with achieving samba/ftp on the MG350. Or maybe its just not worth the effort to disassemble the firmware of another box. I'm willing to take it apart and take photos of the circuit board so that someone might be able to identify components and see if there are any parallels.
Forgive me if this is a dumb idea but .....

I know its a bit premature but I'd really like this box to handle MP3s better. Is anyone familiar with the Zensonic range of media players, the Z400 that I have really does it well, sorting MP3s according to their ID3 tag data ie Genre, Year, Artist, Album etc. Will this eventually be possible on the MG35 ???? Or am I asking too much. Unfortunately the Z400's firmware is downloaded autimatically from the Zensonic website, so it might be a touch more difficult to get at it to have a look.

BTW, is anywhereus still with us? He's been very quiet, maybe he/she has given up trying to sell us the newer model :)

Mike

EmuMannen
08-23-06, 02:40 AM
Finally the result from our "color hunt":

Numbers refer to elements defined in my PDF-file (MG-35_color_hunt.pdf):

Item Description Original Color Palette Index
-------------------------------------------------------------
01. Backdrop Text #000000 255
02. Selected Text #FFFFFF 0
03. Grey Browser Text #7A7A7A 168
04. Normal Browser Text #818181 175
05. Black Footer Text #000000 255
06. White Footer Text #FFFFFF 0
07. Setup Desc. Text #000000 255
08. Setup Selected Text #FFFFFF 0
09. Setup Rounded Rect. #2E2E2E 140
10. Setup Editing Text #3CC5D7 115

Thanks all (you know who you are) for your help! Will update wiki as soon as I get the time...

zzo
08-23-06, 02:52 AM
Just got mine & am miffed that my ripped DVDs (VOBs & IFOs - ripped via DVD Shrink) stutter SO BADLY over the network they're unwatchable. The MG-35 is on the same wired subnet as my ReadyNAS NV connected via a Netgear WGR614.
I have an Avel LinkPlayer2 connected the exact same way & it plays the VOBs fine. Of course it's using the media streaming option of the ReadyNAS vs. the direct SMB mounts that the MG-35 is doing. But still - unwatchable. Horrific.
I'm running the 1.4.5 firmware.
I'll toss a hard drive into the MG-35 & verify it can play the DVDs locally but this REALLY SUCKS if that's the way it has to be.
Alls I wanted was a box that could play IFOs over a wired 100Mbs network... jeez...
Any Ideas anyone??

thanks!!
Mark

pbarrette
08-23-06, 03:00 AM
Hi zzo,

Allz yous gotsta do is gets yoself baks ta 1.44.

Jeez.

pb

EmuMannen
08-23-06, 06:11 AM
... REALLY SUCKS ...
Had the same problem when initially running against SMB shares on my Ubuntu server. Got better after tweaking Samba on that box. No problems from a SMB share on any of my Windows XP boxes (don't know why XP is serving SMB better than Samba in this case). Looks like the troughput using SMB on a 100Mbs network (especially home networks running cheap network devices like the WGR614, standard or sub-standard wiring, non professional configuration etc.) is close to whats needed for ISO-, IFO-, VOB-streaming. This is not an exclusive MG-35 problem, it is shared by most players using the same or similar hardware platform and SMB (it's a combination of flaws in both hardware and software, not only in your MG-35 but also in the SMB protocol, network infrastructure etc.).

umtauscher
08-23-06, 07:21 AM
Hi,

I think this is definately NOT a network problem. I found it depends on which player (in the MG35) is playing the file. If I manage to start the VOB file directly it plays without stutter. If I play via the .ifo file DVDplayer is started an then its really unusable.
Normally the stuttering begins, after about 10 sec. If you hit the pause button you will see, that it takes a fair amount of time, until the buffer is filled again.

I think this is either a priority problem between the network and dvdplayer binaries or dvdplayer simply is too slow.

Anyway, just my 2 ct.

Umtauscher

icabrindus
08-23-06, 08:14 AM
Hi, all!

Did anyone manage to modify the PATH? I tried "export" and "set", but none seem to work.

Vasile

dontod
08-23-06, 08:31 AM
Hi,

I think this is definately NOT a network problem.

Umtauscher

I posted (http://www.avsforum.com/avs-vb/showthread.php?p=6354586#post6354586) about this waaaaaaaay back last november.

I was having the same problem of stuttering playback from ISO files. Changing my network hardware solved that. However occasionally I still get stuttering problems playing ISO files from a samba share on my linux server. I think the server simply cannot keep up - never had any problems playing ISO files from the internal HD.

Great work on the firmware upgrades. I have been following this thread avidly and was hoping that development would commence.

I was wondering if there was a central to-do list with features that people would like to see and how close they are to being achieved / are they even realistic.

From reading the thread the first 2 seem to be the improved GUI graphics and FTP / Samba write access to the internal hard drive.

Don.

icabrindus
08-23-06, 08:35 AM
I was wondering if there was a central to-do list with features that people would like to see and how close they are to being achieved / are they even realistic.

From reading the thread the first 2 seem to be the improved GUI graphics and FTP / Samba write access to the internal hard drive.

Don.

Hi, Don!
There is a Wishlist page on the wiki http://mediagate.pbwiki.com/wishlist

Vasile

zzo
08-23-06, 11:13 AM
Thanks for the replies - it was originalloy running 1.44 out of the box but I 'upgraded' to 1.45 thinking that would fix the stuttering problem - but it didn't help.
Guess I'll try to get back to 1.44.
BTW I see the exact same behavior playing either the IFO or VOB files directly.
Will rig up the internal hard drive today & try that out.
thanks,
Mark

andy666
08-23-06, 11:35 AM
Hi, all!

Did anyone manage to modify the PATH? I tried "export" and "set", but none seem to work.

Vasile

I got stuck here, but assumed it was my rusty Unix...

tried

var=value
export var = value
export var (hoping it would be available in a lash shell)
set (should show all variables?)

...all to no avail.

zzo
08-23-06, 12:20 PM
Hey does this thing support 'jumbo' frames?
Just curioius,
thanks,
Mark

PS Also great work on the firmware stuff - looking forward to using it someday.
If I wanted to copy files off of my NAS onto a local drive on the box - since it's already SMB mounted - that should be very straightforward via the shell ja?

J. L.
08-23-06, 12:35 PM
If I wanted to copy files off of my NAS onto a local drive on the box - since it's already SMB mounted - that should be very straightforward via the shell ja?Short answer... not straightforward.

The internal drive is mounted read-only in Linux, the NDAS driver hits it at the raw device, so it can read or write to an NTFS formatted drive, but not through SAMBA, but its own software loaded on your PC. If you have a FAT formatted drive, you are limited to files 2Gig or less, so no ISO images for full length movies will fit. Might be fine for MP3s. When you use the USB cable the box behaves like an external USB hard disk. This is the most straightforward way to copy your media to the internal drive.

Joe L.

zzo
08-23-06, 12:40 PM
yikes! Once we have smbmount access can we just re-mount it r/w?
thanks,
Mark

zzo
08-23-06, 12:44 PM
Ok I'll also dig out a 'classier' switch & isolate the NAS & MG-35 from my Netgear router & see if that helps the stuttering.
thanks,
Mark

J. L.
08-23-06, 12:52 PM
yikes! Once we have smbmount access can we just re-mount it r/w?
thanks,
MarkOnce we have built a loadable module that can read and write NTFS volumes, yes. That goal is a bit elusive, as the kernel sources supplied thus far by AlTech do not expose the symbols needed for the existing loadable modules (used to access the hardware) AND an open-source full read/write NTFS driver is only recently been developed, and it is still in its early alpha testing, and it needs to be ported to the MG-35.

So, some day we hope to re-mount the NTFS volume as r/w, but that won't occur until several breakthroughs are made on the software front.

Joe L.

zzo
08-23-06, 01:06 PM
hm, just bag the NTFS garbage & use ext2 as that's got to be available (???) via the kernel - wouldn't be able to use the NDAS stuff but who would need it at that point.
What file systems are supported by the AlTech kernel?
thanks,
Mark

andy666
08-23-06, 01:26 PM
Hmm - never thought of using ext2/3

I'll have a quick rummage around to see if I can find tools to format and read an ext2/3 partion over a usb connection using windows - I know there's drivers available - not sure about formatting in the first place though...

pbarrette
08-23-06, 01:27 PM
Hi zzo,

Sorry about the short, odd remark earlier. The "Alls" got to me a bit more than it probably should have.

Seriously though, it could be an encoding issue.

All of my ISO's play fine over the network and my MG35 is connected via 802.11g on a WDS link. Then again, my ISO's were all created with the same software, using the same profile and none are particularly high bandwidth.

I tried the 1.4.5 firmware and had issues with various media formats. I didn't try ISO's on 1.4.5 because it had so many other issues that I felt it wasn't worth it.

Some encoding schemes will never play properly on the MG-35 because of limitations in the EM8511 chipset. However, there are many media issues that are directly related to the pre-processing done in the software beforehand. These issues are what ALTech should be addressing with their firmware updates, but they haven't been very good at it so far.

The reality is probably that ALTech doesn't know a whole lot about programming for the device and instead relies on updates to the base development kit from Sigma Designs. Sigma is notoriously bad when it comes to support, especially for hardware that is no longer part of their current line.

Unfortunately, the kernel doesn't support much in the way of filesystems. Aside from the needed ones like devfs, ramfs and the like, we're left with only 2 real disk filesystems: NTFS and VFAT. The NTFS driver is read-only and VFAT has a 4GB filesize limit and a ~130GB partition size limit IIRC. To get ext2 or any other filesystem, we would need to build a kernel module or a new kernel.

Building a new kernel is problematic because we don't have valid source code from ALTech. This is an issue because the kernel has some gpio calls built in that are both non-standard and required by the khwl.o and fipmodule.o modules. Without these modules, the device hardware layer and the IR/control panel input don't work.

So the only way to add new filesystem support is via a kernel module. The current idea is to figure out how to compile fuse for our current kernel, then try to compile the new ntfs-3g to add full NTFS read-write support.

If we can get a decent filesystem on the box with good rw support, then we can start looking at adding NFS or SMB servers.

pb

pbarrette
08-23-06, 01:48 PM
Oh...

And you can set environment variables in sash with "setenv VAR value". List them with "printenv".

It's all available in "help"

pb

zzo
08-23-06, 02:03 PM
Heh no problem.
Bummer no ext2 - I would think getting ext2 support would be much easier than dealing with the new ntfs-3g - then samba & we're golden.
I need to dig into this more but if it's 'just' a matter of getting the kernel source & cross-compiling the ext2 module against those sources that seems straightforward.
As for formatting the drive - is make2fs part of busybox? That bit could already be done.
You'd need fsck on there too I suppose. Regardless those can be cross-compiled easily enough.
Guess I need to poke around on the twiki & find the kernel sources & get a development environment set up...
Mark

edited as I see pbarrette mentioned 'SMB servers'/samba above...

TheKrell
08-23-06, 03:09 PM
Hey does this thing support 'jumbo' frames?
No it does not! The network interface inside the Mediagate MG-35 is at best fast Ethernet full duplex. If your server is set up GigE w/Jumbo frames, that might be the cause of your troubles right there.

TheKrell
08-23-06, 03:19 PM
The reality is probably that ALTech doesn't know a whole lot about programming for the device and instead relies on updates to the base development kit from Sigma Designs. That would explain the bug-for-bug compatability I see in the Video Cowboy firmware. So... Doesn't Sigma Designs owe the community the GPL portions of their SDK for the 8511? You can try to find something on http://www.sigmadesigns.com, but you will find that the Developer Support area requires a login, and those appear to be given only to buyers of their SDK. :mad:

gkinma
08-23-06, 03:45 PM
You can try to find something on http://www.sigmadesigns.com, but you will find that the Developer Support area requires a login, and those appear to be given only to buyers of their SDK. :mad:

So, just out of curiosity, has anyone looked into purchasing the SDK from Sigma? Any idea how much it would cost? I know they also sell development boards, which would be fun to have, but are probably prohibitively priced. I actually emailed them about it once, but got no reply.

And just to re-iterate - you folks are doing a great job, this is very cool stuff. If I ever have time, I'd love to help out. I spent 12 years doing development of medical devices, which are very much embedded systems. For the past 6 years I've been doing more general software development, but I think I can still find my way around embedded systems hardware/software. Fun stuff.

One other thing - one person mentioned using VMWare to create a virtual Linux machine for development. We use this on a daily basis at my workplace, since we develop cross platform software. You can also try the FREE VirtualPC from MS. It does not work as well as VMWare Workstation, in my opinion, but may work well enough.

zzo
08-23-06, 04:04 PM
No it does not! The network interface inside the Mediagate MG-35 is at best fast Ethernet full duplex. If your server is set up GigE w/Jumbo frames, that might be the cause of your troubles right there.

Unfortunately I enabled Jumbo frames after I saw the stuttering to see if that would help - but got the same results.
Guess I'll turn the Jumbo frames off...
thanks,
Mark

gkinma
08-23-06, 04:04 PM
OK - SO I decided to ask Sigma again. I'll let you know if I get any response.

Also - they seem to have updated the 8620 chip series recently. The 8621 is no longer listed in their products page, but has been replaced on the web site by the 8622, which looks like it adds H.264 deocding to the package. They also changed the dev kit that is listed to use this new chip.

Finally, they have a newer line, the 8630 series, which seems to be more powerful and uses a MIPS processor instead of the ARM. I do not know of any media players using this chip yet, but I suppose we can dream.

Anyway this was all just fyi, if a bit off topic. I'll let you know if I hear back from Sigma Designs about their dev kits.

dontod
08-23-06, 04:12 PM
All of my ISO's play fine over the network and my MG35 is connected via 802.11g on a WDS link. Then again, my ISO's were all created with the same software, using the same profile and none are particularly high bandwidth.

pb

Hi PB,

Aren't all ISOs just complete rips of the original DVD - surely there is no 'profile' and the bandwidth is whatever the original DVD was encoded with.

I rip my ISOs with DVD Decrypter (read here (http://www.afterdawn.com/software/video_software/dvd_rippers/dvd_decrypter.cfm) for what has happened to this software) and as far as I remember there aren't many options when ripping in ISO mode.

Can you tell us how you create your ISOs ?

TIA,

Don.

teddystacker
08-23-06, 04:18 PM
Don.

Hi Don,

I know PB must be busy atm with his Transatlantic move (did it myself 7 years ago) , so maybe I can help..

You are correct in what you say , but to save space many people also "shrink" down their iso's with utils like "Dvd Shrink" , "Clone DVD" etc , its a bit off topic for discussion here , but if you want to know more , please feel free to send me a pm and I wil help you the best I can...

dontod
08-23-06, 04:38 PM
No worries.

I know all about DVD Shrink etc - I was assuming that those tools were mainly used to get dual layer DVDs onto a single layer DVD and that with an internal HD / network storage most people would just rip uncompressed.

I know this is a little off topic, but the reason I got my MG35 was to rip my entire library of DVDs and have them all available with full menu structure - at the time this was one of the only units that could do that.

Don.

teddystacker
08-23-06, 04:48 PM
No worries.

I know all about DVD Shrink etc - I was assuming that those tools were mainly used to get dual layer DVDs onto a single layer DVD and that with an internal HD / network storage most people would just rip uncompressed.

I know this is a little off topic, but the reason I got my MG35 was to rip my entire library of DVDs and have them all available with full menu structure - at the time this was one of the only units that could do that.

Don.

He he, Same here , I wanted todo that also , but with over 1500 original dvds I kinda realised (before I even brought MY MG-35) that this would not be possible even with a 750gb hard disk.So I have mostly resulted to putting mine and the kids "most used" DVDS in ISO format on the MG , and then converted stuff like TV shows to Xvid / DIVX , even all of Star Trek TOS at a decent birate takes up almost 50 gig - a 350 gig disk soon becomes very little..

EmuMannen
08-23-06, 05:50 PM
Took me hours but finally done. Just uploaded a new set of graphics (http://f1.grp.yahoofs.com/v1/4M_sRCob4zPl9BlEG24pdLMvPD9hFSHxxyK6h7gaamDky9tBu8s6FS7GPd8A fpC4e1wpowKgD6AQxS8xIU1op7UyhbQQUG-x4Q/MG-35%20Graphics/MG35-144-ENG-THEME-NG.zip) to Yahoo Groups. Still working "blind" but a lot of the guesswork is gone at least. I think I managed to sort out all issues. I altered text colors and also added some 50% diffusion dither. Looks quite nasty on my high res. screen but I hope it will turn out for the better in NTSC or PAL. Please let me know if there is any need for further tweaks...

Ps. Sorry, just had to make one final adjustment. New file uploaded again...

zzo
08-23-06, 06:45 PM
Any idea which kernel config file AlTech used? 5 came with the kernel sources.
Guess it would have to be either config-net-16MB or config-net-16MB-himem (if either).
thanks!
Mark

teddystacker
08-24-06, 11:07 AM
@EmuMannen

Again, many thanks for your hard work on this , cant wait to test out , as soon as one of the guys has a chance to assemble it into the 1.4.4A Firmware..

Will give you a ful test report when possible...

J. L.
08-24-06, 11:47 AM
I just ordered a serial-ttl cable. I think it is from the same source that gadgetmind ordered his.
His ebay store link is:

http://stores.ebay.com/CoolMCU

The price is very reasonable.

Eventually I would like to get myself configured to where I can compile programs for the MG-35 too. I do have a software development background including (rusty) kernel level Sys-V unix experience, so the source code does not frighten me off.

I have two MG-35 units. One in my bedroom currently has an internal HD, the other in my den does not. Both are connected to SD televisions, neither are in our home theater. (I use an HTPC in our theater for movies)

The MG-35 in my bedroom, like the MG-35 used by gadgetmind's family will get upgraded as stable versions of firmware are produced. The other MG-35, in my den, is where I can play without incurring my wife's wrath if I brick it. I am getting the serial cable as insurance. With any luck, I won't have to join the "debrick club" Odds are high that I'll never need to use the cable to debrick, but I've read of several very smart people who have created badly formed cramfs images... hopefully I'll be prepared if I do make a mistake.

Should be fun. At least I can try my hand at reverse-engineering and contribute something back to this thread.

Joe L.

EmuMannen
08-24-06, 12:19 PM
Will give you a ful test report when possible...
I seek feedback on text colors. I am planning for at least one more update (got a couple of ideas for improvments after finishing yesterday). That would be the perfect opportunity for a palette update (text colors) if needed...

icabrindus
08-24-06, 01:03 PM
I seek feedback on text colors. I am planning for at least one more update (got a couple of ideas for improvments after finishing yesterday). That would be the perfect opportunity for a palette update (text colors) if needed...

Hi!

Can I test this without reflashing? E.g. mounting a new cramfs instead of the original one, killing dvdplayer and starting the one with the modified palette. If yes, I can help you.

The only thing I couldn't do yet was to unmount/remount the cramfs, and I'm not sure it is possible.

Vasile

EmuMannen
08-24-06, 01:55 PM
Holly crap! Just noticed a text color we haven’t mapped out yet! The text is turning pale yellow when playing an MP3 file in the "file browser" menu. So black (#4) as normal, white (#2) as selected, and pale yellow when playing. It’s fortunate that the stock palette doesn’t contain many yellows (only one pale) and my guess is therefore that it is palette number 234. I haven’t accounted for that one in the current palette! It will therefore show up as “army green” if my guessing is right. This is a problem that I will correct as soon as possible. Please look for other weird colors since it is quite some work to remap all graphics towards a new system palette. I would like to correct as many errors as possible in every run…

teddystacker
08-24-06, 02:00 PM
Ok, I have created a General MG-350HD Yahoo group for anyone interested..

Its not intended to compete in anyway with our MG-35 stuff , but at some point people will want dedicated MG-350HD info ,so I thought I had better create one ,before anyone else did :-)

Not much there at the moment,apart from links back to this project,but hopefully it may well attract more people to help here in the end,as there are so many common things to both machines..

Located here and of course everyone is welcome:-

http://groups.yahoo.com/group/MG-350HD_Support/

pbarrette
08-24-06, 03:16 PM
Hi all,

I don't have a whole lot of time left. However, I have created an updated firmware based on EmuMannen's new palette and graphics.

The file is available here (http://groups.yahoo.com/group/mg-35_firmware_mods/files/MG-35%20Beta%20Firmware/NewGui-2-144-eng/) on the yahoo group.

Since we now know that the ISO issues weren't related to available memory, I have re-enabled the ftp server. Since I am also still concerned about memory usage, I also changed the telnet server to gadgetmind's version. The result is that this firmware build uses ~100k more memory than the last, but has both telnet and ftp enabled by default.

This version also contains gadgetmind's mg35config utility. Actually, the last one also contained the utility, but I had renamed it to mconfig to shorten my typing requirements while testing.

If there's anything non-GUI related that's broken or wrong, let me know real quick because I likely won't be able to fix it for at least a month.

This means that any other updates will have to be handled by someone else if you want them in a reasonable amount of time.

pb

EmuMannen
08-24-06, 03:37 PM
I have now documented how the stock MG-35 GUI can be modified. It's all up on the wiki... (http://mediagate.pbwiki.com/MoreOnUserInterface)

icabrindus
08-24-06, 04:07 PM
If there's anything non-GUI related that's broken or wrong, let me know real quick because I likely won't be able to fix it for at least a month.



Hi, pbarette!

Can you please add some lines to sashrc? Here is what I think we need to speed up development/search:

.........
/cdrom/init/phase1
/dvdplayer.bin &
/hosts/phase2
.........

If you have no hdd in your mg35, the effect should be null. But if you have one, those scripts can help the development and testing.

phase1 can be used to get the state of the mg35 at bootup, before dvdplayer.bin was executed. This way we can better look on the effects of dvdplayer.

The script also creates the /hosts/phase2 script which will be executed after dvdplayer. I use phase2 to unmount /cdrom and remount it as rw. That's why it has be executed from ramdisk (otherwise we cannot umount /cdrom).

A further use for phase1/phase2 could be to enumerate and mount the hdd partitions, or even execute a user-specific smbmount.

The great advantage is that we can test a lot more using just the HDD and without reflashing. E.g. phase2 could mount a different /img, kill the initial dvdplayer and run a customized dvdplayer. This way, EmuMannen could (probably) test the graphics without any reflash.

I did the tests with those scripts using a 16MB CF card connected in MG35 through a CF-IDE adaptor. So I can confirm it is seen by linux and seems to work OK. I transferred the scripts via ftp.

Regards,
Vasile

icabrindus
08-24-06, 04:48 PM
Ooops! What happens if /cdrom is mounted by dvdplayer? Then we will not be able to execute /cdrom/phase1 and create the /hosts/phase2 script. So this is even better:

.........
/cdrom/init/phase1
/dvdplayer.bin &
/cdrom/init/phase2
/hosts/phase3
.........

pbarrette
08-24-06, 05:19 PM
Hi icabrindus,

Done. I replaced the file on yahoo groups, but it has the same file name.

There are some changes, though. I have added "/cdrom/init/phase1" before dvdplayer.bin launches, as requested.

However, I have created a new directory called "/phase2" and added a line to sashrc that mounts a ramfs over /phase2. The line is "mount -t ramfs ramfs /phase2" and runs before the phase1 script.

This is because before dvdplayer runs, /hosts is not writable. Secondly, even if it were, it would get re-mounted after dvdplayer.bin executes. So writing a script into the /hosts directory pre-dvdplayer launch is probably not the right way to do it.

Finally, after dvdplayer, telnetd and ftpd are launched, there is a line in sashrc to run "/phase2/phase2".

Just note that I didn't end the commands with "&", so if phase1 fails to terminate, dvdplayer won't be launched and you'll have to modify or delete it via the USB drive functionality. I figured if it launched as a bg process, there wouldn't be enough time to do what you need to do before dvdplayer takes over.

------------------------------------

Note to everyone else.

These have been added for debugging and development purposes and have no effect on functionality. Just don't go adding a file called "/init/phase1" to your internal HDD if you don't know what you're doing.

-----------------------------

Also of note..

The /bin/setup command is responsible for mounting "/net", "/hosts" and "/usb" and not dvdplayer.bin as I had previously thought. So I don't think that /bin/setup is used for the MG-35's GUI setup menu. Instead, it's probably used as an initial parameters setup to get things into the state that dvdplayer expects them to be in.

pb

[EDIT]

I see you beat me to the punch on this while I was making, uploading and posting about the fw. But I still liked the 2-phase idea so I just added another dir and mounted it as ramfs.

pbarrette
08-24-06, 05:24 PM
Ah crap..

So there's yet another problem.. I forgot that /cdrom is mounted by dvdplayer.bin.. I know it is, you can tell from the order of the mounts.

How about if I mount the HDD, then umount it again before dvdplayer runs?

I'll do the firmware on that one.

pb

icabrindus
08-24-06, 05:43 PM
However, I have created a new directory called "/phase2" and added a line to sashrc that mounts a ramfs over /phase2. The line is "mount -t ramfs ramfs /phase2" and runs before the phase1 script.

That's a better idea than mine!


Note to everyone else.

These have been added for debugging and development purposes and have no effect on functionality. Just don't go adding a file called "/init/phase1" to your internal HDD if you don't know what you're doing.

The recovery should be very easy: just connect via USB and rename/remove the file. That's the advantage of this method: if you screw it, it's dead easy to correct the mistake.


The /bin/setup command is responsible for mounting "/net", "/hosts" and "/usb" and not dvdplayer.bin as I had previously thought. So I don't think that /bin/setup is used for the MG-35's GUI setup menu. Instead, it's probably used as an initial parameters setup to get things into the state that dvdplayer expects them to be in.

I'll check to see who calls /bin/setup...

P.S. Sorry for the quick sequence of messages, I'm still afraid to flash my own firmware image :-)

pbarrette
08-24-06, 06:02 PM
Ok everyone..

I think I've got this straight now.

The new file has replaced the old and is now called:
NewGui-2b-144-eng.upgrade (note the "2b" as opposed to "2")

The relevent portions of sashrc now look like this:
mount -t ramfs ramfs /phase2
mount -t vfat /dev/discs/disc0/part1 /cdrom -o ro,fmask=0000
mount -t ntfs /dev/discs/disc0/part1 /cdrom -o ro,fmask=0000
/cdrom/init/phase1
umount /cdrom
/dvdplayer.bin &
/bin/telnetd -l /bin/sh &
/bin/pure-ftpd -H -D -M -z &
/phase2/phase2

So:
1) Make a ram-disk at "/phase2"
2) Try to mount the disk as vfat, then NTFS. (one should work, the other should fail depending on how the disk is formatted).
3) Execute "/cdrom/init/phase1"
4) Un-mount "/cdrom" so as not to confuse dvdplayer.
5) Launch dvdplayer.bin, telnetd and ftpd.
6) Execute "/phase2/phase2"

If "/cdrom/init/phase1" and/or "/phase2/phase2" don't exist, then everything happens as normal.

It looks like "/proc" is being mounted after the execution of "dvdplayer.bin" though... So it's going to be hard to get good debugging info out of the box before the GUI is launched.

I also managed to launch a shell script with "#! /bin/lash" as the header. I'm not sure if sash allows redirection etc in scripts, but lash certainly seems to work.

--------------------------------------------------

Again, if you don't plan on doing development or debugging, then just ignore all this stuff and download the firmware for the new GUI interface fixes.

pb

andy666
08-24-06, 06:11 PM
This is why we need to sort out the config stuff - I re-partitioned my HD yesterday so I'd have a rw FAT32 partition to mount over bin, but the "automatic" mounts are now:

/dev/discs/disc0/part5 on /cdrom/Partition5 type vfat
/dev/discs/disc0/part1 on /cdrom/Partition1 type ntfs


Will it be safe for me to load the new firmware or are you making assumptions about the /cdrom mount?

[Edit]Just seen the latest post - it looks like it should be safe but I wouldn't be able to run any debug scripts in phase1/2 ... ?

pbarrette
08-24-06, 06:33 PM
Hi andy,

You should have no problems using this firmware or running phase1/2 scripts.

The mount is specific to "part1" on the HD. So your NTFS partition will be mounted to run "phase1" then umounted.

If you like, your "phase1" script could mount your VFAT partition over the top of "/bin". If you do this, then the device will be in use when dvdplayer attempts to mount it later. What that should mean is that the GUI will not see your VFAT partition, but will see your NTFS partition.

Obviously we need to work out the config stuff in the NVRAM config area. At that point we'll probably have a wholly different scheme.

But in the mean time, this gives people a way to run programs/scripts or test new GUI skins right now without having to re-flash the box for each new skin, etc.

The real issue is that my computer goes on a slow boat to the US on Monday morning. Since there hasn't been anyone else building firmware images for the masses, this becomes an easy way for EmuMannen to test his GUI, or icabrindus to test scripts, or whomever to test whatever without having to rely on someone to build them a firmware image.

pb

andy666
08-24-06, 06:39 PM
Thanks for the info. Hopefully I'll get the time to do something useful soon...

animatt
08-24-06, 08:13 PM
Just a comment about graphics they are very nice definately added some life into this machine. I did not have high hope but was very amazed at what some effort will do. I know it has taken awhile but altech could have done it in no time. It is a shame how that culture thinks

One thing, not to any one but, telneting is a pain with that shell. Never thought I had it so good with bash. Not that there is much to do once I in the system. I am just to dependant on tab completions and also not being able to get the previous command by pushing up arrow. I understand really can not store the last 5000 lines like some systems are setup for, but being able to scroll through last few commands could save lots of time

Anyway wonderful work guys.

J. L.
08-24-06, 09:50 PM
These have been added for debugging and development purposes and have no effect on functionality. Just don't go adding a file called "/init/phase1" to your internal HDD if you don't know what you're doing.
pbarrette,
It might be a bit late for another release, but there is one issue I can foresee on MG-35's that are shared with family members.

If I'm experimenting, and added a folder /init to my first partition it will be seen in the file browser along with my current "Movies", "MP3" and "TV" folders. In fact, it might be first in the folder listing as it is sorted alphabetically.

This might be a bother to some family members to see the /init folder.

I wonder... what if it is named ".init" (leading period) it might not show up in the MG-35 file explorer. Or, if it still shows, how about a folder name with a "$" in it. The file explorer seems to not show shares with a "$", it might not show folders with a "$" in their name either. so "init$" might be a possibility.

The idea is to not see the init folder in the file explorer, but still be able to get to it via telnet/ftp/USB cable.

Thanks again for all your work and have a safe trip to the US.

Joe L.

icabrindus
08-24-06, 09:58 PM
One thing, not to any one but, telneting is a pain with that shell. Never thought I had it so good with bash. Not that there is much to do once I in the system. I am just to dependant on tab completions and also not being able to get the previous command by pushing up arrow. I understand really can not store the last 5000 lines like some systems are setup for, but being able to scroll through last few commands could save lots of time


Just start "lash" at telnet prompt. It has command history. You can later close lash and return to sash by typing Ctrl+D.

Or, if you are brave, try to build a bash. Or recompile busybox to include ash.

icabrindus
08-24-06, 10:20 PM
I wonder... what if it is named ".init" (leading period) it might not show up in the MG-35 file explorer. Or, if it still shows, how about a folder name with a "$" in it. The file explorer seems to not show shares with a "$", it might not show folders with a "$" in their name either. so "init$" might be a possibility.


.init is seen on the TV, and it's the first entry. Unfortunately, it is not visible in some ftp client (at least in TotalCommander). Probably it's just a client configuration issue, because FileZilla shows it.

Using init$ could confuse the shell, since $ is used for variables.

So probably we could use xxx_init. Any better idea?

icabrindus
08-24-06, 10:29 PM
Hi, pb!

The real issue is that my computer goes on a slow boat to the US on Monday morning.
pb

Done that too, some time ago :-) To be on the safe side, I took my hard drive in my luggage, and only the rest of the computer traveled by sea.

Bon voyage!

zzo
08-25-06, 01:32 AM
Magic!!
I don't know what magic mojo you packed into that firmware image but my unwatchable stuttering is now GONE (Recap I tried both 1.44 & 1.45 but the stuttering was unwatchable)!! Ahhh... THIS is why I bought this box - awesome! Watching DVD Shrink'ed & uncompressed DVDs via the network is indeed awesome. Very strange that this would make it work BUT am NOT complaining.
And the GUI -really- looks good too - much better than stock.
One thing - when ya hit 'stop' while watching a DVD the message in the box is not very readable, white text of bright yellow background is hard to see (it's that message about its saved the DVD's position & hit [stop] to go to the beginning).
Now if we can just see jpeg's of DVDs & can select them to play the movie... that'd be living.

THANKS!!!
Mark

oneworld
08-25-06, 03:03 AM
.init is seen on the TV, and it's the first entry. Unfortunately, it is not visible in some ftp client (at least in TotalCommander). Probably it's just a client configuration issue, because FileZilla shows it.

Using init$ could confuse the shell, since $ is used for variables.

So probably we could use xxx_init. Any better idea?

(You can have folder/files with '$' in the name. You just have to
be careful when using them in scripts.)


There seems to be hidden folder already.
My internal disk contains the folders
System Volume Information
Recycled


These are not shown by the GUI. I guess these (Windows specific?) folders
are hidden by the GUI. Perhaps this is configurable in some way?

EmuMannen
08-25-06, 03:52 AM
One thing - when ya hit 'stop' while watching a DVD the message in the box is not very readable, white text of bright yellow background is hard to see (it's that message about its saved the DVD's position & hit [stop] to go to the beginning).
I had it on my task list, changing the background color of that dialog box. But I forgot why I had to do it so I kept it yellow. I now know why I really need to turn it into something darker. I probably stick to the "bluish" theme. Will be corrected togheter with a new palette (correcting army-green text while playing)... Thanks for the observation...

EmuMannen
08-25-06, 04:05 AM
If I was to put together a VMware based virtual develop machine, what would you like to go into that?


What Linux distribution (Ubuntu, PCLinuxOS, insertYourFavoriteHere)?
Include a desktop (yes | no | maybe | don't care)?
If including desktop, which one (Gnome, KDE, Xfce, insertYourFavoriteHere)?
Development tools (what is needed for MG-35 development)?
Additional applications (keep it a bare minimum to minimize size or not)?


Would there be anywhere to host the virtual machine image?

This would get anyone a “standardized” development platform that they could use free of charge using VMware Player or VMware Server under Windows or Linux, without having to risk the stability of any already installed OS...

icabrindus
08-25-06, 07:54 AM
There seems to be hidden folder already.
My internal disk contains the folders
System Volume Information
Recycled


These are not shown by the GUI. I guess these (Windows specific?) folders
are hidden by the GUI. Perhaps this is configurable in some way?

These folders probably have the "hidden" attribute on the disk. I cannot check that, since my harddrive is a 16MB CF and is not "seen" over NDAS.

Can you please post the result of the "ls -a -l /cdrom" command? Also, can you tell us what filesystem do you have on that drive (FAT/NTFS)?

icabrindus
08-25-06, 08:08 AM
If I was to put together a VMware based virtual develop machine, what would you like to go into that?

Great idea! You could start using one already built, and add our specific packages (arm tools, cramfs suport in the kernel). I was thinking of doing it. There are quite a few images on vmwarez.com


Would there be anywhere to host the virtual machine image?

Maybe vmwarez.com?

icabrindus
08-25-06, 08:30 AM
I discovered a device at /dev/realmagichwl0, which seems to be used to decode the media. There are a few programs using this device:


/dvdplayer.bin
/fileplayer.bin
/khwl.o
/mp4play
/mpegplayer.bin
/bin/mp3play


I think kwhl.o defines the device, all the others are using it. This could allow us to use players from other firmwares, e.g. KiSS. The use of this would be to try to see if we can play streamed media (internet radio).

OTOH, does anybody have any idea how dvdplayer "talks" with the players after they are launched (e.g. for getting the IR events)?

tohands
08-25-06, 09:19 AM
dr-x------ 1 0 0 4096 Aug 9 2006 Scrubs
dr-x------ 1 0 0 4096 Jul 18 2006 System Volume Information

Thats the result of ls -lart

and I'm using NTFS

tohands
08-25-06, 09:20 AM
I also tried to put a folder with the Hidden permission (In Windows) but the folder still appear.

J. L.
08-25-06, 09:29 AM
I also tried to put a folder with the Hidden permission (In Windows) but the folder still appear.Can you try a folder name with a leading "$" and also a folder name with trailing "$" in them and let us know if they show up in the file explorer.

Joe L.

animatt
08-25-06, 09:55 AM
EmuMannen,

To your virtual machine post.
I would steer clear for gnome and kde. Really no need for those. They are big and I doubt anything in them would help. Really not sure if any desktop is needed but I believe people would probably atleast want a simple one. I think xfce would be the biggest you would want. Something like fluxbox should even be suffiecant for most people. Just if fluxbox make sure there are good menus.

For the purposes of what we need I would suggest fluxbox purely on it's size. This makes distrobution much easier, and you can run vmware on a system with not as much resources. I know computers are cheap but some people still have older computers around that they use.

As for the actual important developemental stuff I have no idea.

icabrindus
08-25-06, 10:11 AM
dr-x------ 1 0 0 4096 Aug 9 2006 Scrubs
dr-x------ 1 0 0 4096 Jul 18 2006 System Volume Information


Is "Scrubs" accessible via TV interface? If so, then it could be a filesystem permission.

tohands
08-25-06, 10:12 AM
J.L. I tried a folder name $Scrub$ and I see the folder

tohands
08-25-06, 10:13 AM
icabrindus yup it accessible

tohands
08-25-06, 10:14 AM
I tried to put the attrib to +S, and also tried to put a

desktop.ini with this in it
[.ShellClassInfo]
UICLSID={7BD29E00-76C1-11CF-9DD0-00A0C9034933}


in that folder (like the hidden folder in Temporated Internet File) But I still see that Scrub folder

teddystacker
08-25-06, 11:01 AM
@EmuMannen

Ok,Here is my Report on Version 2 of your GUI Update...

Again many congrats on this , very much improved..

Just Four comments really....

1) On the "file info" screen that you can get to display (on pics and Movies) The Info txt is hard to read against the Background..

2) In the File Selection screen,the txt is now alot more easy to read,but still not as clear is if it were white on the blue background.Yes, I know I suggested the Yellow txt,I guess I was just wrong.But another thing I just thought of, is that some people will want to have their own mybg.jpg background on their MG , so if you change this File selection txt colour to white it should display well on whatever background they choose - just a idea , but will gladly go for what you think is best..

3)JPG "previews" no longer work - Not sure if this is a GUI problem or not - would like someone else like confirm this on this firmware? - I checked the preview option in settings and its on - so not sure - at some point I may put stock 1.4.4 back on and see if it works on there.. - Might have got broken somehow like .iso playback did.. or might just be me..


4)Txt on "File Stop" box is hard to read (already reported here).

Just imagine what you could do with this , should Al Tech Help us with bits of source etc...

EmuMannen
08-25-06, 11:45 AM
About the dollar sign. Isn't that a SMB-thing? A share ending with a dollar sign will be hidden in a Windows network. I thought it was done on an application level but maybe it's part of the SMB protocol (affecting all platforms implementing SMB)...

Microsoft Knowledge Base Article: 314984 - This step-by-step article describes how to create and delete hidden or administrative shares on Windows XP Professional-based, Windows 2000 Professional-based, and Windows NT 4.0 Workstation-based computers. A hidden share is identified by a dollar sign ($) at the end of the share name. Hidden shares are not listed when you look through the shares on a computer or use the net view command. The versions of Windows that are listed at the beginning of this article create hidden administrative shares that administrators, programs, and services can use to manage the computer environment on the network.

EmuMannen
08-25-06, 11:51 AM
1) On the "file info" screen that you can get to display (on pics and Movies) The Info txt is hard to read against the Background..
What's the text color and whats the background color?

2) In the File Selection screen,the txt is now alot more easy to read,but still not as clear is if it were white on the blue background.Yes, I know I suggested the Yellow txt,I guess I was just wrong.
What colors do you got now in the "file browser"? Is "normal" text white, "selected" yellow and "playing" text army-green?

3)JPG "previews" no longer work
Probably not my fault...

tohands
08-25-06, 11:56 AM
Yeah I know the rules for the dollar sign, but it doesnt seem to work on the internal HD, neither the hidden file/folder with the dot (linux style), neither the hidden attribute (windows style), neither the secret attribute (windows style) neither the desktop.ini style (windows style). What else we got ?

J. L.
08-25-06, 12:06 PM
Yeah I know the rules for the dollar sign, but it doesnt seem to work on the internal HD, neither the hidden file/folder with the dot (linux style), neither the hidden attribute (windows style), neither the secret attribute (windows style) neither the desktop.ini style (windows style). What else we got ?Exactly,
We were just exploring the various possibilities. I did not know if the folders with the "$" were blocked by the SMB protocol, or masked in the MG-35. It was worth a try to verify.
There does not seem to be much left without having access to the source code of the MG-35 file explorer.

Thanks anyway for trying.

EmuMannen,
The new set of images/colors look great. Many thanks. It is much easier to read the longer names of the MP3's over the "Speaker" (My wife loves the blue color scheme)

Joe L.

icabrindus
08-25-06, 12:18 PM
I did not know if the folders with the "$" were blocked by the SMB protocol, or masked in the MG-35. It was worth a try to verify.


The $ thing it's not about the folder names, it's about the share names. Shares ending in $ are "hidden". They can be accessed only by specifying their full name (including $). They do not appear in the browsing list (e.g. Network neighborhood), but otherwise they are regular shares.

tohands
08-25-06, 12:34 PM
I wonder whats the hidden stuff in mac os, but I guess its pretty much the same as linux

teddystacker
08-25-06, 12:35 PM
What's the text color and whats the background color?

Backgroud is the Army Green colour which is semi transparent.

File Name
File size
Play Time
Audio Quality
Video Quality

In All the above the txt appear to be gray (hard to tell exact colour agaist the Army green) and is not easy to read..

The rest of the txt (the actual info) is in yellow and is easy to read


What colors do you got now in the "file browser"? Is "normal" text white, "selected" yellow and "playing" text army-green?

Ok,The txt itself is yellow , but appears to have a blue border (different shade to the Background blue) around each letter.It does not highlight at all (ie remians just the same when selected)
When you press play "loading file" appears at the top on the screen and is Yellow on the Army green background


Probably not my fault...

Thought as much , as i say just waiting for someone else to comfirm I am correct..

J. L.
08-25-06, 12:45 PM
The $ thing it's not about the folder names, it's about the share names. Shares ending in $ are "hidden". They can be accessed only by specifying their full name (including $). They do not appear in the browsing list (e.g. Network neighborhood), but otherwise they are regular shares.
I understand exactly how it works with share names. I use them every day in my work environment.

What I did not know, was if shared folders with the '$" are not enumerated when a folder listing is requested via SMB, or simply blocked by the program requesting the shared folder list from a given server. (never needed to look into SMB protocol at that level of detail)

There was the off-chance that the file-explorer in the MG-35 was coded to not display those folders and that they were enumerated... and that their improperly coded explorer would do the same with local folders. Clearly, I was wrong.

Unfortunately, we do not have a solution to the issue I was describing, that of hiding our customization scripts from the file-explorer of the MG-35 so family members do not have to see the folder that contains them as we experiment.

Perhaps some combination of file attributes available under NTFS will work, perhaps not. We will not know for sure till somebody trys, or until we can compile our own file explorer, or obtain the AlTech/Sigma source and see ourselves what it is doing when browsing.

Joe L.

tohands
08-25-06, 01:43 PM
I wonder if someone already tried a 750 gb in the mediagate (cause on Altech they said that the mediagate is able to go up to 500gb) I dont really want to buy a 750 gb and it doesnt work in the mg35

J. L.
08-25-06, 02:15 PM
I wonder if someone already tried a 750 gb in the mediagate (cause on Altech they said that the mediagate is able to go up to 500gb) I dont really want to buy a 750 gb and it doesnt work in the mg35Someone on the Mediagate forum tried a 750 gig drive whan the question was posed to them and they said it worked. I think the AlTech "ad" copy was written before 750G drives were available.

Check out the thread here http://mediagateusa.s10.forumsplace.com/viewtopic.php?t=7

Joe L.

gadgetmind
08-25-06, 02:20 PM
Any idea which kernel config file AlTech used? 5 came with the kernel sources.
Guess it would have to be either config-net-16MB or config-net-16MB-himem (if either).
thanks!
Mark

None of the configs are spot on. I cobbled together something by reading the KiSS configs and various others but lost interest when it became clear that the kernel source wasn't complete. I have booted a KiSS config on the box and it got about as far as you'd expect given the missing symbols (proprietary modules wouldn't load)

But I did get full console output as it booted and a working shell.

Ian

gadgetmind
08-25-06, 02:23 PM
Can I test this without reflashing? E.g. mounting a new cramfs instead of the original one, killing dvdplayer and starting the one with the modified palette. If yes, I can help you.

The only thing I couldn't do yet was to unmount/remount the cramfs, and I'm not sure it is possible.


I tried killing dvdplayer but restaring it causes problems as it errors out due to modules already being loaded. Removing the modules causes crashing.

Replacing dvdplayer.bin is tricky as it's in root. If we move this elsewhere, you can mount an smb or HD share to somewhere else, perhaps directly over the dir dvdplayer is in, or maybe do a mount -o bind afterwards.

I successfully replaced bin using this approach but root/dvdplayer is harder. Also note that dvdplayer calls setup to get the networking going, so yet another hoop!

Ian


Ian

gadgetmind
08-25-06, 02:37 PM
Obviously we need to work out the config stuff in the NVRAM config area. At that point we'll probably have a wholly different scheme.


That's kind of my priority.


Since there hasn't been anyone else building firmware images for the masses, this becomes an easy way for EmuMannen to test his GUI, or icabrindus to test scripts, or whomever to test whatever without having to rely on someone to build them a firmware image.


I'm happy to build them but have never had anything that's a major step ahead of what you've released.

Here is my current MG-35 task list -
1) Work out what setup does - we really want to do mounts/ifup ourselves and nobble the setup that dvdplayer calls.
2) Track down the ISO mount problem - need to save cramFS room.
3) Track down the telnetd -> lash problem (low priority but maybe easy)
4) Build a new BusyBox with mount/lash/telnetd fixes, add chmod, and release a bundle of BusyBox, lash, init and telnetd (all BusyBox builds)
5) Finish mgnv - add flash writing, sector erase and config recreate. High risk of box stuffage.
6) Write an nbtscan replacement that supports "NAS mode"

Of these, (2) and (3) are the most interesting, and I'm always drawn to interesting. But (5) is maybe the most important - this will let us write our own programs that read the config to see what to do. (6) is one such thing, and is pretty easy once mgnv is available.

My 1st pass at mgnv won't need the sector erase - while DVD player is around people can always turn the power LED on->off to get it to refresh the NV area (it only needs doing once per 128 NV writes)

Ian

gadgetmind
08-25-06, 02:40 PM
Or, if you are brave, try to build a bash. Or recompile busybox to include ash.

I built a BusyBox with msh and it took the MG-35 out immediately it was run. The KiSS guys had the self same experiences. They also saw the lash issue we have seen.

I'll try various other BusyBox shells but lash is pretty close to 100%.

Ian

icabrindus
08-25-06, 03:48 PM
Replacing dvdplayer.bin is tricky as it's in root. If we move this elsewhere, you can mount an smb or HD share to somewhere else, perhaps directly over the dir dvdplayer is in, or maybe do a mount -o bind afterwards.


We have the same problem to replace any of the programs in /. Just an idea, can you try to replace /dvdplayer with a symlink to /bin/dvdplayer? If it works, we could mount /bin to our development dir in the phase1 script.

Even better, we could try to replace /sbin/init (which is now sash) with a script which can load a startup script from the hdd/network. Not sure if a script will do the trick, but we can write a small init app to do it:
- if there is an init script on the hdd, run it
- else fallback to built-in sash

This way we can do whatever we want with our box!

adi999999999
08-25-06, 04:08 PM
Hi

I just upgraded to the new firmware with the upgraded graphics and I wanted to congratulate everybody ,it looks so much better I only wish I understood all the things you are doing and could help in some way but all I can do is offer my thanks for all your hard work

Thanks
Adi999999999

EmuMannen
08-25-06, 04:47 PM
Backgroud is the Army Green colour which is semi transparent.

File Name
File size
Play Time
Audio Quality
Video Quality

In All the above the txt appear to be gray (hard to tell exact colour agaist the Army green) and is not easy to read..

The rest of the txt (the actual info) is in yellow and is easy to read
Outch, thought guesswork was over but great feedback. Went back to my stock GUI and made a quick comparison. I thought all "normal" text in file browser was black (index 255) but it is not. File names might but directories are using index 168. This came as a surprise but I should have seen it coming! Times like this calls for a glass of single malt whiskey...

Ok,The txt itself is yellow , but appears to have a blue border (different shade to the Background blue) around each letter.It does not highlight at all (ie remians just the same when selected)
When you press play "loading file" appears at the top on the screen and is Yellow on the Army green backgroundThis is really strange! "Normal" text is black in stock firmware (I assumed palette index 255, but tests point at index 175, grey in original firmware). Selected text is white (I assumed palette index 0) and the file beeing played is pale yellow (I assumed palette index 234). Index 0 is orange in my palette, index 255 is white and 234 is army-green. Now you say that text color (in file browser) doesen't change for the selected item while moving up and down in list (I dont get it), "normal" text should be white and the "selected" item should be orange, that what I thought anyway...

I hadent notised the information dialog. Sounds like "label" text is index 234 and "value" text is palette 0. The problem is the frame behind it. What color is used to draw it? My guess is index 158 (#2C565C in original firmware). Yet another color I haven't accouted for...

I really need to be able to test on my own MG-35 before I can get this perfect...

tohands
08-25-06, 05:49 PM
I love the new color, good job guy

tohands
08-25-06, 05:52 PM
I also tried to put an hidden folder from mac to see if that will make a different, but not.

pbarrette
08-25-06, 07:31 PM
Hi EmuMannen,

I'm not sure what's up with Teddy's box, but the file browser on mine is not the same.

File Browser:
Directories = Pale blue
Normal Files = White
Selected files = Yellowish.. I guess it could be a pale orange though.

The rest is correct.. When you start to play a video file, the text is a yellowish text on a translucent green background. Also, the file info screen has the item names in a green or grey that has very low contrast with the background while the file specifics are in a yellow (possibly your orange) that contrasts well.

pb

pbarrette
08-25-06, 10:00 PM
Hi EmuMannen,

I've uploaded a file to the yahoo groups. It's in the graphics section and called "StripPal.zip".

This program will strip the palette chunk out of our PNG images to gain back a few kb in our cramfs images.

To run it against a directory full of images, do something like this:
FOR %F IN (*.png) DO (strippal %F)

I still need to test the stripped images on the MG35, but it should be fine.

pb

julian2875
08-26-06, 02:17 AM
hi anebodee know how do i update my ndas sci controller it shows ! sign i've tryed to update it just doesn;t work for this reason none of my pc's see the mg-35 thanx.......

EmuMannen
08-26-06, 02:22 AM
Hi EmuMannen,

I'm not sure what's up with Teddy's box, but the file browser on mine is not the same.

File Browser:
Directories = Pale blue
Normal Files = White
Selected files = Yellowish.. I guess it could be a pale orange though.

The rest is correct.. When you start to play a video file, the text is a yellowish text on a translucent green background. Also, the file info screen has the item names in a green or grey that has very low contrast with the background while the file specifics are in a yellow (possibly your orange) that contrasts well.

pb
That sounds exactly as I planned it to be in the first place. The only problem in that case is the "label" color in the info dialog. My guess was that it uses index 234 and that could be correct because it is green-gray in the new palette. I will update it to something else (maybe white) in next update run...

My "orange" must be the same as your "yellow", it's palette index 0 in my palette. Is pale blue working for directories (does it look good)?

EmuMannen
08-26-06, 02:31 AM
Hi EmuMannen,

I've uploaded a file to the yahoo groups. It's in the graphics section and called "StripPal.zip".

This program will strip the palette chunk out of our PNG images to gain back a few kb in our cramfs images.

To run it against a directory full of images, do something like this:
FOR %F IN (*.png) DO (strippal %F)

I still need to test the stripped images on the MG35, but it should be fine.

pb
Thats nice, it will save space but make them unbrowsable on anything but the MG-35 (but that doesent matter for the final set of gfx.). Thanks again pb!

EmuMannen
08-26-06, 03:26 AM
I think I got a picture now of what needs to be fixed in the GUI, this is what I got on my list right now:

0. Make some cosmetical changes to config menu (already done)
1. Fix "stop box" issue
2. Change color on "setup rounded rect." (to dark blue insted of light blue)
3. Take another look at text color assignment (maybe rearrange some)
4. Fix palette index 234 (should be something other than "army-green")
5. Strip palette chunks from PNG files (if possible)

Got a pretty hectic weekend but will try to do it ASAP. Anyone got anything else for the GUI?

gadgetmind
08-26-06, 05:07 AM
I really need to be able to test on my own MG-35 before I can get this perfect...

It shouldn't be hard to mount a HD or SMB share over the graphics in /img You can do this post-boot via the telnet shell. Changing palette is harder - either a reflash or some very fancy footwork with soft links and pre-dvdplayer mounts.

But I don't think anyone is in a screaming hurry for perfection on the new graphics, and having others viewing them early on has advantages.

At least you get to see the fruits of your labour - everything I'm doing is down at the "foundations" and there are a couple of layers to go on top of this before there is anything to show!

Ian

zand
08-26-06, 05:46 AM
@ EmuMannen

Great job, really great job!

Feedback from italy:

- jpegs preview works fine
- when I choose "play all" under photos, now I can hear songs from my music folder (with original freecom 1.4.4 song started playing, but suddenly stop)
- file info is difficult to read (army green etc..)
- white message over yellow are difficult to read
- "time search": the black "zero" remains under the number entered from the remote. Very difficult to read.
- iso files playback still works ok.
- "crystallyzed" icons look great.

Thanks again!

gadgetmind
08-26-06, 07:42 AM
OK, I now have a BusyBox with a built-in mount that seems to handle ISOs just fine. I haven't made a .upgrade with it in, but it mounts ISOs when run from telnet, which previous versions didn't.

The fix was dead easy - just build with devfs, which makes sense as the kernel is built with devfs. It's all deeply obsolete, but it works.

I also tried some other shells. ASH tells you not to bother when using uClinux. HUSH builds and runs but suffers the same problems as LASH when run from telnetd. This suggests the problem is in telnetd, which makes sense as I had to hack this to fix the fork versus vfork issue. I guess some of the wrangling of the stdin and stdout to get the pipe to telnet isn't quite right.

I'll try and fix this before pushing any new firmware out. I'll also try and totally ditch sash by using the BusyBox init. This will mean that we'll run /etc/init.d/rcS rather than /etc/sashrc but mainly it will mean that we get a good shell for running the startup scripts.

Ian

gadgetmind
08-26-06, 07:44 AM
- when I choose "play all" under photos, now I can hear songs from my music folder (with original freecom 1.4.4 song started playing, but suddenly stop)


This is very worrying. Nothing has been changed that should have fixed this. Ditto the stuttering on ISOs.

OK, things getting better is good, but if you don't understand the whole cause->effect thing then it's just as likely that things will regress for no good reason.

:-(

Ian

pbarrette
08-26-06, 08:01 AM
Hi gadgetmind,

I wanted to say something about that as well, but forgot.

The media playing functionality of my modded firmware images has not changed one bit from the ALTech v1.4.4 firmware. Zand mentioned "original Freecom" firmware, which is actually v1.4.3, so that could explain the change. Zzo however, had a fixed stuttering issue. That doesn't make any sense to me either, but if it works, it works.

The lash issue is strange. If you have telnetd start lash as the shell, it doesn't properly parse command line options or redirect stdin/out. However, if you have telnetd start sash, it parses command lines properly but doesn't handle stdin/out.

What I normally do is have telnetd start sash, then launch lash after I log in. Once you launch lash manually, you get proper command line parsing and redirection. With lash, you also get command line history and tab completion.

I don't know exactly how sash works, but perhaps we could have a telnet start-up script that launches lash automatically. That would probably be the easiest way to handle it.

If you get time, take a look at the "Stage2" firmware for the KiSS boxes. It's a custom firmware that connects to the internet to handle various config options. Their startup scripts and executables could give us a good idea on how to handle shells and init.

pb

J. L.
08-26-06, 08:43 AM
Changing palette is harder - either a reflash or some very fancy footwork with soft links and pre-dvdplayer mounts.
IanActually, Ian, there is one other method, and I don't think it is too difficult to figure out. Take advantage of the lack of a MMU.

Since dydplayer is read into memory when it is initially invoked, and since we know it is not going to be moved by the OS while in use, could we write a short script, even a shell script perhaps, to read the memory map in /proc, locate the starting address of dvdplayer in ram, and then add in the offset for the palette and "poke" the byte in ram you want changed (if a single color). We might even be able to invoke a program similar to the one pbarrette wrote to merge the palette in the executable, but instead, to merge the palette in the dvdplayer image in memory after it is invoked.

Advantages are... you can play as often as you like with the colors and changes will likely be immediate. No need to reflash, and very little risk to bricking the MG-35.

So... how about it, patching the running dvdplayer process, in memory. Gutsy, but because there is no MMU it might just work. Might even be possible ito patch the in-memory dvdplayer image in the start-up "phase2" script for those who want to try a different scheme for a few days without re-flashing.

Joe L.

TheKrell
08-26-06, 09:12 AM
when I choose "play all" under photos, now I can hear songs from my music folder (with original freecom 1.4.4 song started playing, but suddenly stop) Hmmm. Are you sure you aren't remembering the Al Tech 1.4.5 firmware, rather than 1.4.4? 1.4.5 had this (new) bug.

gadgetmind
08-26-06, 10:15 AM
The lash issue is strange. If you have telnetd start lash as the shell, it doesn't properly parse command line options or redirect stdin/out. However, if you have telnetd start sash, it parses command lines properly but doesn't handle stdin/out.


I think I have fixed this. I changed how telnetd opens the new TTY and lash now seems to work properly when launched and I also have /bin/sh as a soft link to busybox.

[edit - I actually forgot to change /bin/sh so this was still sash, but probably not used. Will test with /bin/sh pointing at lash later - got to go out now]

I have attached the new BusyBox, telnetd and lash to this message. Note this BusyBox also has a mount that handles our loop device and this ISOs.

BTW, I just tried using BusyBox as init - this failed miserably!


If you get time, take a look at the "Stage2" firmware for the KiSS boxes. It's a custom firmware that connects to the internet to handle various config options. Their startup scripts and executables could give us a good idea on how to handle shells and init.


OK, I'll try and find it. But I should be able to make our init work. I might have to try flashing in my firmware that dies, and then running a kernel from ram that has a working console. This might be to only way to get good debug.

But the sash init is pretty compact so there's no harm in using this.

Ian

EmuMannen
08-26-06, 10:19 AM
Just managed to finish a set of new graphics and a new palette. It's uploaded to Yahoo Groups (using the same file-name). Will check the "black text" in time-search (another dialog I havent checked) ASAP, I'm now off for a traditional Swedish crayfish party (so don't expect much from me tomorrow!)... :D

zand
08-26-06, 10:30 AM
No, I'm sure. I bought my Freecom in july, it came with 1.4.4 firmware plus key and id written on a stick (I wrote it in an italian forum).
I know it's strange, because I remeber that I was looking for new firmware and I found only the 1.4.3 on uk freecom site.

teddystacker
08-26-06, 10:38 AM
Hi EmuMannen,

I'm not sure what's up with Teddy's box, but the file browser on mine is not the same.



Hehe , Well I know now - Thankgod I found out the cause , thought I had summat corrupt somewhere..

All txt in the File Browser is ok now and is just as PB reports - ie Perfect..

My problem was that I has a mybg.jpg file loading at boot up , this background was the same one as EmuMannen now uses as he dufault!! - For some reason it screwed up the file browser colours and also stopped jpg previews from working.

@EmuMannen - I am so sorry that I have lead you on a "Wild Goose Chase" here ref the txt colours on the file Browser, I really had forgot that I had my own BG file loading.

Boy , Now I am even more impressed with Ver 2 of your gui - hope V3.0 is not messed up as a result of my reporting..

EmuMannen
08-26-06, 10:44 AM
Boy , Now I am even more impressed with Ver 2 of your gui - hope V3.0 is not messed up as a result of my reporting..No I guess not, just a bit better anyway... ;)

pbarrette
08-26-06, 02:45 PM
Hi all,

Ok.. I've built the new firmware with some changes, but I'm still doing some testing.

So far, I've got:
The latest graphics from EmuMannen (with PLTE chunks stripped)
The latest busybox from Ian
The latest lash from Ian
/dvdplayer.bin moved to /bin/dvdplayer.bin
Phase1/2 support still built in.

The graphics seem to be fine. I haven't done a whole lot of testing, but it looks like the "File info" label text is now a bright green on a darker green background. Not exactly the best color scheme, but it's definitely readable now.

Ian. The busybox seems to work ok. The "ls" command has lost the ansi color display that was a nice to have feature. Perhaps that can be added back in. Ctrl-C doesn't seem to kill the "top" command, but IIRC that was broken on the old shells as well. Mount works fine and smbmount still works as always. Lash launched from telnetd seems to work great. Redirection is fine and we have the command line history and tab completion working as well.

The stock "sh" remains in place. When I replaced "sh" with either a symlink or a hardlink to lash, the network interface failed to initialize. For some reason dvdplayer.bin needs to have sash for, at least, the network initialization.

Dvdplayer.bin has been moved to /bin and the sashrc file has been modified accordingly. It starts up just fine and everything seems to function correctly. This should make it easier to mount over /bin and test palette patched dvdplayer.bin's.

Phase1/2 support is still there.. No changes.

If there's anything else that should be done, let me know.

pb

Zappacat
08-26-06, 03:35 PM
This new GUI is great!
Nice work guys!
However I found one strange color in subtitels (.srt files) the textcolor is light blue in stead of white.

T.

gadgetmind
08-26-06, 05:47 PM
The latest busybox from Ian
The latest lash from Ian


The lash is probably the same as last time - what about the new telnetd?


Ian. The busybox seems to work ok. The "ls" command has lost the ansi color display that was a nice to have feature. Perhaps that can be added back in. Ctrl-C doesn't seem to kill the "top" command, but IIRC that was broken on the old shells as well. Mount works fine and smbmount still works as always. Lash launched from telnetd seems to work great. Redirection is fine and we have the command line history and tab completion working as well.


OK, that's mostly good. Colour is easy to compile back onto ls - it's all really just me figuring out what people want. It's maybe worth downloading the BusyBox source so that you can run "make menuconfig" - browsing the menus is a grewat way to see what's what.

Oh, and if lash from telnetd is OK for you, I'm guessing you have my new telnetd?


The stock "sh" remains in place. When I replaced "sh" with either a symlink or a hardlink to lash, the network interface failed to initialize. For some reason dvdplayer.bin needs to have sash for, at least, the network initialization.


Yes, I found the same. I'm going to try a new kernel with console to see what's going on. I'm happy to have sash as init but would like a better shell running /etc/sashrc.

I'll do some more playing tomorrow. But I probably ought to concentrate on mgnv and the config writing.

Still, I seem to have managed to knock off a couple of my "to do" items today!

Ian
P.S. New "bbpackage" attached - the only change is that the BusyBox ls should have colour - untested as I need to go to bed!

NerdBoy
08-27-06, 07:15 AM
Firstly, great effort guys on the GUI. Looks a lot more professional than the default interface. I loaded out of curiosity with no real intension of using it until I saw just how clean and professional it looked ... so it stays.

Secondly, the ftp and telnet imbedding is great. So even if the inferface was a interfarce I would probably have kept it anyway just for the ftp.

Thirdly, my ignorance is right up there (last used unix when nobody had ever heard of linux back in early 90's) an I have only just had my curiosity about potential changes to MG-35 firmware stoked after reading a few posts in this thread, but I have thick skin, so if I say something mind blowingly stupid, feel free to say so, but any feedback on my questions will be much appreciated.

Xvid ... I have seen complaints resembling my own (ie. some Xvids jumpy ... others not) but no solutions (which could be my own blindness). Anyway, when I first noticed it, I noticed it on a Xvid which I knew had previously played cleanly in the past. So I reverted back a firmware version or 3 until it played cleanly again. That was 1.3.2. But 1.3.2 does not have the NAS stuff ... very annoying.

So, I was wondering (ignorance alert!!!) how hard it would be to extract whatever program or codec is handling the Xvid playing from 1.3.2 and injecting it into 1.4.4? Obviously if it is a stand-alone executable it should be easy, but if it is tied in with kernel changes or tied in with other indirect influences, this is not such a bright idea.

Anyway, I would like to give it a try, but have no idea where to start with regards to extracting something out of the 1.3.2 (whatever that something might be) and then firstly testing it with 1.4.4 and then making it more permanent.

So any pointers or assistance would be muchly appreciated.

Cheers,

NerdBoy

gadgetmind
08-27-06, 07:21 AM
The "ls" command has lost the ansi color display that was a nice to have feature.


OK, I've just tested my new BusyBox and ls now has colour again.


Ctrl-C doesn't seem to kill the "top" command, but IIRC that was broken on the old shells as well.


OK, I'll have a think about this.


The stock "sh" remains in place. When I replaced "sh" with either a symlink or a hardlink to lash, the network interface failed to initialize. For some reason dvdplayer.bin needs to have sash for, at least, the network initialization.


Oops, my fault. I sent a kernel down to ram and when init (sash!) tried to run sashrc, our lash reported "applet not found". I hadn't noticed the settings to say which shell you want to pretend to be sh ! New bundle of BusyBox, lash, telnetd, etc. on the way. I'll also include hush. This shell could be useful for scripts such as the replacement nbtscan.

Note that when using anything other than sash as /bin/sh you need to add -
export PATH=/bin:/sbin:/etc
to sashrc as other shells don't have a default path.

BTW, I have decided against using the BusyBox init as, 1) I can see no value, 2) I can't seem to make it work. :) I'm sure I could use the replacement kernel trick to debug it, but other than saving a tiny shred of cramFS and RAM, there is no other advantage. I'll give it another go if we get really tight.

Ian

gadgetmind
08-27-06, 07:44 AM
From the .txt file that's included -
------------------------------------------
This BusyBox is built with devfs so the mount handles ISOs.
And the ls command now has colour.
The telnetd has been hacked so that it seems to launch lash correctly.
The lash now can be used as /bin/sh
hush has been added as it could be useful for scripts (but doesn't work interactively!)

Put everything in /bin and create soft links for -
1) /bin/telnetd to this telnetd
2) /bin/sh to this lash
3) All of the below to BusyBox.

Currently defined functions:
[, [[, busybox, cat, chmod, cp, dd, devfsd, dmesg, echo, false,
hexdump, ifconfig, insmod, kill, ln, ls, lsmod, mkdir, mknod,
mount, mv, ping, ps, rm, rmdir, rmmod, route, sleep, test, top,
true, umount
------------------------------------------

I have tested a .upgrade that uses lash as /bin/sh and it works fine. Remember to add the export line to sashrc!

I'll see why top can't be exited later on today, or maybe get back to work on mgnv. If I complete this we can then replace nbtscan with a hush shell that grabs a machine name from NV, or maybe a replacement scan range.

Thoughts?

Ian

pbarrette
08-27-06, 07:50 AM
Hi Ian,

I am uploading the new firmware to the yahoo groups files area.

At the moment, it should be considered as very beta since I have not actually loaded it on my MG35 and tested it. It should work just fine since the only difference between it and my mostly tested version is your new busybox.

This will likely be the last firmware image I create for some time.

For those wishing to patch dvdplayer.bin with new palettes, the command for the v1.4.4 binary is:
mgpalswap -p palette.act -o 0xF8A60

0xF8A60 is the starting offset to dvdplayer.bin's system palette. I kept meaning to test the palette entry's 4th byte (currently, always zero) for alpha blending, but never got around to it. If there's anyone out there who feels comfortable patching dvdplayer.bin, it would be nice for EmuMannen if you could put a non-zero value in one or more of the 4th byte positions. The value of 0x80 (128 decimal) would be a good one since it "should" make that color 50% transparent.

If there's any more info you need, I may be online at random times for the next month or so, but I don't expect to be fully operational for at least one month, possibly two.

pb

pbarrette
08-27-06, 07:51 AM
Argh..

So.. It doesn't have your "latest" busybox anymore.. But it does have the one from post #1730.

pb

gadgetmind
08-27-06, 09:44 AM
Argh..
So.. It doesn't have your "latest" busybox anymore.. But it does have the one from post #1730.


(edit as I misunderstood your post!)

The BusyBox is the same. lash has changed so that it works when linked from /bin/sh rather than saying "applet not found". If you also add the export to sashrc, then you can now ditch sash.

Ian

gadgetmind
08-27-06, 09:47 AM
This will likely be the last firmware image I create for some time.


OK, I'll probably grab this one and use it as the starting point for all my future firmware builds.

But we could really do with someone who'll volunteer to take all the bits from various people and make releases as you've been doing.

Ian

gadgetmind
08-27-06, 10:23 AM
Oh, and I now know why the BusyBox init won't work. It needs argv[0]="init" to know which applet to run. Due to a bug in our kernel version, this argument isn't present.

Still, sash seems to do an OK job as init. I just wish I knew where control-c is going wrong.

Ian

tohands
08-27-06, 10:53 AM
I volunteer as soon as I got my serial cable. Unless someone have one and want to try the .upgrade before we release it.

EmuMannen
08-27-06, 11:16 AM
This new GUI is great!
Nice work guys!
However I found one strange color in subtitels (.srt files) the textcolor is light blue in stead of white.

T.
Nice finding! Newer thought of it, that subs. would use a color from the palette. My guess is that it uses index 168 (but that one should be #7A7A7A in the deafult firmware so it might be any white index in the original palette) but we might need another "color hunt" if not (white in the original palette is mostly in the beginning of it at index 0..15, there are 4 different lighter blue in the current palette in those positions, could you describe the color a bit better?). Might have to overhault the palette once we know for sure what colors goes where... Keep it coming...

EmuMannen
08-27-06, 11:19 AM
Hi all,The graphics seem to be fine. I haven't done a whole lot of testing, but it looks like the "File info" label text is now a bright green on a darker green background. Not exactly the best color scheme, but it's definitely readable now.
Yupp, that was my quick fix (making it bright green). I am pleased with the graphics now but the assignment of colors for text etc. probably needs another iteration. I will take some time and se if I can come up with a better scheme. So still seeking information about "wierd stuff" in the GUI, especially strange colors showing up in dialogs or whatever...

EmuMannen
08-27-06, 12:44 PM
- "time search": the black "zero" remains under the number entered from the remote. Very difficult to read.
New background overlay should make it easier to read, but I noticed that input text in that dialog uses bright green in the stock firmware. That would hint index 247 (yet another index used) and that one is light gray in my current palette. I have added index 247 to the wiki and will account for it in future palettes...

zand
08-27-06, 12:45 PM
@ EmuMannen

When I stop playing a video, then re-play it, in the message I can see black background around the X, the V and the green dot.

EmuMannen
08-27-06, 12:45 PM
- "time search": the black "zero" remains under the number entered from the remote. Very difficult to read.
New background overlay should make it easier to read, but I noticed that input text in that dialog uses bright green in the stock firmware. That would hint index 247 (yet another index used) and that one is light gray in my current palette. I have added index 247 to the wiki and will account for it in future palettes...

zand
08-27-06, 12:46 PM
@ EmuMannen

When I stop playing a video, then re-play it, in the message I can see black background around the X, the V and the green dot.

EmuMannen
08-27-06, 12:57 PM
- "time search": the black "zero" remains under the number entered from the remote. Very difficult to read.

New background overlay should make it easier to read, but I noticed that input text in that dialog uses bright green in the stock firmware. That would hint index 247 (yet another index used) and that one is light gray in my current palette. I have added index 247 to the wiki and will account for it in future palettes...

EmuMannen
08-27-06, 12:58 PM
Is it echoing in here?!? :D

EmuMannen
08-27-06, 01:00 PM
@ EmuMannen

When I stop playing a video, then re-play it, in the message I can see black background around the X, the V and the green dot.
Against what background color? Maybe I have to keep the black frames from the original firmware...

gadgetmind
08-27-06, 01:28 PM
After a couple more hours of happy hacking, our NV config read/write utility seems to be working.

It's reading and writing bytes, words and strings to/from the flash NV config area. It marks another config as used whenever it does a write (could improve on this) and will only sulk if all 128 configs are used.

It needs a right good test, and a read through getting rid of the fixme's, but is looking pretty good.

This should let us have utilities (even shell scripts) that read the config to see what to do. With the hush shell, we should be able to back-quote invocations of mgnv to use values from NV without any hassle.

I'd appreciate an experienced C coder having a read through. I don't write C. But I have just written 400+ lines of C that does heavy pointer wrangling to access the flash, and it could all do with a sanity check.

Ian

TheKrell
08-27-06, 01:49 PM
Against what background color? Maybe I have to keep the black frames from the original firmware... It's not clear to me which version of the firmware zand is discussing. But in my case, 3b shows up with a medium blue background in that popup window. You never see these dialog boxes at all unless you are using the DVD Wizard. This is activated by using the Select button on the video_ts.ifo file, not the Play button. (Playback of an mpeg program stream, or a VOB file played via Play button, cannot be resumed.)