Sunday, February 6, 2011

To get the plugin working: for PCSX2

To get the plugin working:

1- Put MegaDev9.dll in the plugins folder of PCSX2 (NOT THE ROOT FOLDER), otherwise it won't
show up in the plugins list. The plugin doesn't require any external DLL to work. (that may change in the future, namely, WinPcap
comes to mind when talking about ethernet support)

2- Make sure you've a DEV9-capable PS2 BIOS. Slim PS2 BIOSes aren't compatible (Thanks to
Suloku for this info), and BIOSes from old PS2s with PCMCIA aren't too (afaik). You must also
have the EROM, ROM1 and ROM2 files with your BIOS. In other words, you must have a
complete BIOS dump from your PS2. Don't complain that the plugin doesn't work if you're
using a downloaded (illegal) BIOS. (DEV9-capable BIOSes are SCPH-3XXXX and SCPH-5XXXX).

3- Configure the plugin. For that you must launch PCSX2,
select MegaDev9 in the DEV9 plugins
list and click on the Configure button. A GUI will show up, here's its description :
-Enable logging : this is only for debugging purposes. The plugin will write all events
to a file.
-HDD file : enter the path and the name of the HDD image (see below for more info about
HDD image). If you leave it, the image will be created in the PCSX2 root folder.
-HDD size : select the size you want for the emulated HDD (HDD image). You can choose
from 1 GB to 127 GBs. I recommend selecting at least 8 GBs, lower sizes could cause problems.

4- Launch your game/program in PCSX2. The first time, the HDD image will be created in the path that you
previously configured. This may take more or less time depending on the HDD size you've selected. Wait until
the progress bar gets complete (100%). Then your program will ask for formatting if it's able to do this. If
you followed the previous steps right, your program won't ask for formatting anymore, nor other
programs will do.

The HDD image is a file that will be used as a HDD, ie. when your program writes data in the
HDD, the plugin will write these data in this file. Don't delete or move it without
reconfiguring the HDD file path in the plugin, or you may cause problems.



Troubleshooting
Note : if your problem persists or if it's not described here, tell me. Attach a log file
if possible.

When I run HDLoader, I get a black screen.
If you're using GSDX, enable "Logarithmic Z" in its options (Thanks to tich). If you're using speed hacks, disable them.

My program always asks for formatting.
If you've this problem, make sure you've a complete BIOS dump from a DEV9-capable PS2. The
first models with PCMCIA aren't DEV9-capable, and the slim PS2s aren't too. Make sure the
console doesn't tell it couldn't find rom1, rom2 or erom, these files are needed.

My program fails writing to the HDD.
Make sure you've enough space on your real HDD and also that the HDD image is big enough. Make
sure the HDD image doesn't have read-only attribute.

When I use savestates, I've problems with HDD funcs in my program.
That's normal, savestates aren't supported yet.

When I use the HDD command X, it doesn't work, it reports an error.
The command you're trying to use isn't implemented, or you're passing invalid args.

How can I copy games with HDLoader ?
First, be sure to use at least PCSX2 0.9.6. Older versions have a CDVD timing bug which prevents HDLoader to work correctly.
You need to insert your game DVD in your drive (or opening the ISO if you're using an ISO CDVD plugin), and open the HDLoader
ELF file. This way, you should be able to copy your games smoothly. Pretty hacky, I know, but for the moment no CDVD plugin supports DVD hot swapping.
Anyway, keep this in mind: YOU CAN'T BOOT THE GAMES YOU COPIED IN THE HDD !!! Because of a bug I haven't found yet.



I need help !
If you can find me documents about the DEV9 device, you're highly welcome !
ATM, my only document for that ****ing device is the sources of PS2SDK. They actually helped me a lot as HDLoader uses
the same DEV9 code as PS2SDK !

Note:
I designed the plugin to be as many portable as possible. The only Win32-only thing is the GUI.
If somebody is interested in porting the plugin for Linux, he's free to do it. Isolate all the
Win32-specific code with #ifdef / #endif tags.

Changelog:

Version 1.0.0
-First version, support for HDD emulation.

Version 1.0.1
-Reduced the IRQ timings
-The minimal HDD size is now 8 GBs, lower sizes seem to cause problems
-Implemented the Idle command
-Implemented the nIen bit in control reg (disables IRQ)
-Fixed a bug occuring when pressing Escape then running another HDD-compliant program in PCSX2
-Implemented the Sony-specific security control command (0x8E), the programs that want a Sony HDD should now work without a patch
-Changed a bit the Identify device command, maybe it will fix Final Fantasy XII.

Download the plugin and its sources in the attachments.

Compatibility of the HDD image:
The HDD image can be mounted with Mount Image Pro or any other image mounter. After you mounted the image, you can use it with HD Handiness (see SKSApps). WinHIIP says that HDL file settings is corrupt, I don't know why, maybe this is because I used an image of 8 GBs. Simply click OK and you'll be able to use it without corrupting your HDD image. Make sure you unmount the image before launching PCSX2, otherwise the plugin won't success to open the HDD image.

What you must know about the Sony HDD:
The Sony HDD is a standard HDD, but its firmware has been modified by Sony in order to support a command that standard HDDs don't support. Sending this command to the HDD is the only way to distinguish if the HDD is Sony or not, if it reports an error, then it's not a Sony HDD. This command is implemented in version 1.0.1 and later, so Sony programs will work with it. This command is "SCE security control" (0x8E).

What is planned for next versions:
- More intelligent HDD image format (automatic compression of zero-filled blocks + LZ77 compression) (will be incompatible with WinHiip )
- Better implementation of SCE security command
- Better IRQ handling and such
- 48-bit support (no more 127 GBs limit, if you've a big HDD)
- EEPROM emulation
- The long-awaited Ethernet emulation

Credits to :
- Authors of PS2SDK and DEV9Linuz, without these source codes I couldn't have figured out how DEV9 works.
- Authors of various documents explaining how PC IDE controllers work.
- Suloku for pointing out the compatibility problems with slim PS2 BIOSes.
- KabooZ for the infos about the Sony HDD.
- MiKE41 for his great help (testing).
- tich for how to fix the black screen bug with HDLoader.
- kamilusPL for his help.
Attached Files
File Type: zip MegaDev9_1.0.0.zip (72.9 KB, 2747 views)
File Type: zip MegaDev9_1.0.1.zip (73.4 KB, 5885 views)

No comments:

Post a Comment