Linux 2.6 on PS2
Yes but you said "use a disc" and by that, I assume you meant a read-only Linux system burnt to a CD or DVD. Even after you start homebrew stuff like uLaunchELF or MegaMan's RTE, the PS2's copy protection is still active and consequently you need to do the swap trick in order for a burnt disc to be recognised by the RTE or Linux.
-
- Posts: 22
- Joined: Sat Feb 24, 2007 7:20 am
Oh ok. I was just wondering, if I have a WiFi adapter (USB) and a WiFi network, is their some sort of way of bootloading from the network?Chewi wrote:Yes but you said "use a disc" and by that, I assume you meant a read-only Linux system burnt to a CD or DVD. Even after you start homebrew stuff like uLaunchELF or MegaMan's RTE, the PS2's copy protection is still active and consequently you need to do the swap trick in order for a burnt disc to be recognised by the RTE or Linux.
Booting wirelessly in general is quite hard and a quick search didn't turn up anything. Since wireless generally needs stuff from userspace in order to work, you'd need to put the necessary programs and libraries on an initrd/initramfs. I wouldn't bother trying this with Linux 2.4 and 2.6 on the PS2 is still vapourware at this point. Overall, it's more hassle than it's worth.
Oh and you'd need a device AND driver that works with USB1.1. The only time I ever tried wireless with USB1.1, it didn't work because the driver appeared to assume USB2 even though the device itself did support USB1.1.
Oh and you'd need a device AND driver that works with USB1.1. The only time I ever tried wireless with USB1.1, it didn't work because the driver appeared to assume USB2 even though the device itself did support USB1.1.
Just use the DVD trick SMS uses - DVD-Rs are recognized and mounted just fine as long as they appear to be a video DVD. On the SMS site, there's a minimal set of DVD files (a few hundred KBs) that makes the DVD look like a video DVD. You can then fill up the rest of the DVD with whatever you like. With SMS, that's AVIs. With this, it would be your linux distro.Chewi wrote:Yes but you said "use a disc" and by that, I assume you meant a read-only Linux system burnt to a CD or DVD. Even after you start homebrew stuff like uLaunchELF or MegaMan's RTE, the PS2's copy protection is still active and consequently you need to do the swap trick in order for a burnt disc to be recognised by the RTE or Linux.
Of course the PS2 won't boot it as it's a video DVD. You still need the boot loader run by something like ule or the ID exploit. This just saves having to do the swap trick or needing a modchip to get the distro DVD mounted.
-
- Posts: 22
- Joined: Sat Feb 24, 2007 7:20 am
Yes, I think it does. Resetting the IOP causes NapLink to disconnect I think, though.Mega Man wrote:I think I can load the naplink modules in kernelloader, but I don't have USB->USB cable. So I can't test it and I don't know if naplink has "host:" file system support like ps2link. Does it behave the same way?
I'll be happy to test.
I decided to build a version with deactivated IOP reset. Please test if this is working with naplink. When you select a file you can also select "Host" to access the host. Please post the output of kernelloader printed through naplink.
http://mitglied.lycos.de/ps2dev/kernell ... aplink.elf
http://mitglied.lycos.de/ps2dev/kernell ... aplink.elf
-
- Posts: 22
- Joined: Sat Feb 24, 2007 7:20 am
It fails to start with NapLink.Mega Man wrote:I decided to build a version with deactivated IOP reset. Please test if this is working with naplink. When you select a file you can also select "Host" to access the host. Please post the output of kernelloader printed through naplink.
http://mitglied.lycos.de/ps2dev/kernell ... aplink.elf
Peer exist.
Ps2 connected.
Send execute command.
loadelf: fname host:/exec/elf secname all
loadelf version 3.30
Input ELF format filename = host:/exec/elf
0 01b00000 00199318 ..........................
Loaded, host:/exec/elf
start address 0x1b00008
gp address 00000000
Now I made a version with IOP reset and naplink modules loaded. I want know If there is more debug output and whether you can access the host device. USB will not work with Linux, because I activated the debug output (which uses naplink USB).
http://mitglied.lycos.de/ps2dev/kernell ... plink2.elf
http://mitglied.lycos.de/ps2dev/kernell ... plink2.elf
-
- Posts: 22
- Joined: Sat Feb 24, 2007 7:20 am
Nope, same output as the first one.Mega Man wrote:Now I made a version with IOP reset and naplink modules loaded. I want know If there is more debug output and whether you can access the host device. USB will not work with Linux, because I activated the debug output (which uses naplink USB).
http://mitglied.lycos.de/ps2dev/kernell ... plink2.elf
This sounds like you can run nothing. So I have the following questions:
Can you run the normal version of kernelloader?
Can you see anything on the screen?
Can you run simple ps2sdk example programs like "Hello World"?
Did you need to replace printf by nprintf in example programs?
Can you start my last version with something else than naplink, but start naplink on your PC in listen mode?
Can you run the normal version of kernelloader?
Can you see anything on the screen?
Can you run simple ps2sdk example programs like "Hello World"?
Did you need to replace printf by nprintf in example programs?
Can you start my last version with something else than naplink, but start naplink on your PC in listen mode?
-
- Posts: 22
- Joined: Sat Feb 24, 2007 7:20 am
yes, perfectlyMega Man wrote:Can you run the normal version of kernelloader?
Whilst running the naplink version it shows the naplink main screen, then simply a blank screenMega Man wrote:Can you see anything on the screen?
yesMega Man wrote:Can you run simple ps2sdk example programs like "Hello World"?
no, they printed the messages with normal printfMega Man wrote:Did you need to replace printf by nprintf in example programs?
no, the naplink2 version will not boot normally, it will just freeze at the loading, please wait screenMega Man wrote:Can you start my last version with something else than naplink, but start naplink on your PC in listen mode?
My assumption is that nprintf leads to a deadlock, although nprintf is intented for naplink. I disabled nprintf and use normal printf. To be sure I removed printf before IOP reset.
http://mitglied.lycos.de/ps2dev/kernell ... plink3.elf
http://mitglied.lycos.de/ps2dev/kernell ... plink3.elf
-
- Posts: 22
- Joined: Sat Feb 24, 2007 7:20 am
Sorry, still no success loading it.Mega Man wrote:My assumption is that nprintf leads to a deadlock, although nprintf is intented for naplink. I disabled nprintf and use normal printf. To be sure I removed printf before IOP reset.
http://mitglied.lycos.de/ps2dev/kernell ... plink3.elf
There should be no difference between the normal version and this version at startup. I don't know what is wrong. I think it's better when you try to compile kernelloader and check in which line a printf is still working. A complete description is included in the README file.
http://mitglied.lycos.de/ps2dev/kernell ... link.patch
http://mitglied.lycos.de/ps2dev/kernelloader1.5.tgz
Apply patch with:
http://mitglied.lycos.de/ps2dev/kernell ... link.patch
http://mitglied.lycos.de/ps2dev/kernelloader1.5.tgz
Apply patch with:
Code: Select all
patch -p0 <../../naplink.patch
Good news. I've got GCC to build for the first time in months. I had trouble with it ever since I started adding 128-bit support. The bad news is that madplay doesn't behave any differently. I'm not sure if it's using the 128-bit stuff at all. There are 128-bit instructions in the resulting binaries but I think these are just from the assembly used in ps2sdk. That's okay though, the 128-bit instructions aren't actually needed so I can always fix that later if there really is a problem.
I tried to take some of the alignment stuff from 3.2.2 and found that it made madplay fail earlier. Alignment is the only issue I can think of that I haven't tackled properly so I'm fairly sure this is where the problem lies. I wish I understood it better.
I'll probably put out a commit soon.
I tried to take some of the alignment stuff from 3.2.2 and found that it made madplay fail earlier. Alignment is the only issue I can think of that I haven't tackled properly so I'm fairly sure this is where the problem lies. I wish I understood it better.
I'll probably put out a commit soon.
RESULT!! I got madplay to make some sound!! :D We're not there yet but this is very encouraging. I decided to track down exactly where madplay was failing using some humble printfs. I didn't realise that madplay carried its own copy of the isjpcm IRX and it was the loading of this module that was failing. For some reason, the SifWriteBackDCache function would just hang. I took this code out of madplay and ran it independently. It worked. Hmm. I then inserted it into the beginning of madplay's main function. It still worked. Hmm. I then tried it at various points, all the way up until the original location. For some bizarre reason, it works everywhere but there. With that part working, I was actually able to play some sound, much to my amazement. It only plays one file at the moment though, all the others fail with various exceptions. It simply must have something to do with the alignment! I'll keep digging.
I've submitted new ebuilds for PCSX2 so that I could use it to help me debug this stuff. Check out http://bugs.gentoo.org/show_bug.cgi?id=141626 if you're interested.
I've submitted new ebuilds for PCSX2 so that I could use it to help me debug this stuff. Check out http://bugs.gentoo.org/show_bug.cgi?id=141626 if you're interested.
News!
Firstly, I've ditched the 128-bit stuff for now. It wasn't working out and it's just not needed. Maybe I'll revisit it sometime or someone else can have a go.
Secondly, I have a confession to make. Everything is suddenly working a lot better. I've thrown three MP3s at madplay and it plays all of them. I tried to run Mega Man's Ballion game. It crashes but it gets quite far through the startup before it dies. I haven't seen what happens on screen and I haven't tested much else because my girlfriend is using the GameCube and we only have a universal cable! This is obviously great news but I'm feeling silly because all I did was change all the CFLAGS from -O2 to -O0, which is something I should have done from the start. I've tried to pin down exactly which optimisation is causing problems but it doesn't appear to be one that's controlled with a command line option and that makes finding it extremely awkward.
Firstly, I've ditched the 128-bit stuff for now. It wasn't working out and it's just not needed. Maybe I'll revisit it sometime or someone else can have a go.
Secondly, I have a confession to make. Everything is suddenly working a lot better. I've thrown three MP3s at madplay and it plays all of them. I tried to run Mega Man's Ballion game. It crashes but it gets quite far through the startup before it dies. I haven't seen what happens on screen and I haven't tested much else because my girlfriend is using the GameCube and we only have a universal cable! This is obviously great news but I'm feeling silly because all I did was change all the CFLAGS from -O2 to -O0, which is something I should have done from the start. I've tried to pin down exactly which optimisation is causing problems but it doesn't appear to be one that's controlled with a command line option and that makes finding it extremely awkward.