Skip to content

Commit

Permalink
Merge pull request ps2homebrew#24 from bignaux/fix_dma
Browse files Browse the repository at this point in the history
Fix: DMA argument is now optional
  • Loading branch information
AKuHAK authored Jan 2, 2021
2 parents 5623ae8 + 4f4eaf2 commit 923e9e0
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 15 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,6 @@ All new stuff can be used from HDDOSD or BB Navigator or XMB from PSX DVR.

This command will install games onto the hard disk.

_**Warning**: You need to specify a DMA mode (like `*u4`, `*m2`) or `hdl_dump` crashes._

_**Warning**: Be careful with `copy_hdd` - every HDLoader game will be given the same icon._

Optionally, you can place `boot.elf` (which is actually `miniopl.elf`) in the folder where `hdl_dump` is launched from.
Expand Down
37 changes: 24 additions & 13 deletions hdl_dump.c
Original file line number Diff line number Diff line change
Expand Up @@ -1469,25 +1469,27 @@ show_usage_and_exit (const char *app_path,
{ CMD_HDL_EXTRACT, "device name output_file",
"extract application image from HDL partition", NULL,
"hdd1: \"tekken tag tournament\" c:\\tekken.iso", NULL, 0 },
{ CMD_HDL_INJECT_CD, "target name source [startup] [flags] dma [@slice_index]",
{ CMD_HDL_INJECT_CD, "target name source [startup] [+flags] [*dma] [@slice_index]",
"create a new HDL partition from a CD",
"You can use boot.elf,list.cio, icon.sys. Check Readme\n"
"You can use boot.elf, list.cio, icon.sys. Check Readme\n"
"Supported inputs: plain ISO files, CDRWIN cuesheets, Nero images and tracks,\n"
"RecordNow! Global images, HDL partitions (PP.HDL.Xenosaga@hdd1:) and\n"
"Sony CD/DVD generator IML files (with full paths).\n"
"Startup file and compatibility flags are optional. Flags syntax is\n"
"`+#[+#[+#]]' or `0xNN', for example `+1', `+2+3', `0x00', `0x03', etc.",
"Startup file, dma and compatibility flags are optional.\n"
"Flags syntax is `+#[+#[+#]]' or `0xNN', for example `+1', `+2+3', `0x00', `0x03' etc.\n"
"DMA syntax is `*u4` for UDMA4 (default one).",
"192.168.0.10 \"Tekken Tag Tournament\" cd0: SCES_xxx.xx *u4",
"hdd1: \"Tekken\" c:\\tekken.iso SCES_xxx.xx +1+2 *u4", 1 },
{ CMD_HDL_INJECT_DVD, "target name source [startup] [flags] dma [@slice_index]",
{ CMD_HDL_INJECT_DVD, "target name source [startup] [+flags] [*dma] [@slice_index]",
"create a new HDL partition from a DVD",
"You can use boot.elf,list.cio, icon.sys. Check Readme\n"
"You can use boot.elf, list.cio, icon.sys. Check Readme\n"
"DVD-9 supports only ISO or IML.\n"
"Supported inputs: plain ISO files, CDRWIN cuesheets, Nero images and tracks,\n"
"RecordNow! Global images, HDL partitions (PP.HDL.Xenosaga@192....) and\n"
"Sony CD/DVD generator IML files (with full paths).\n"
"Startup file and compatibility flags are optional. Flags syntax is\n"
"`+#[+#[+#]]' or `0xNN',for example `+1', `+2+3', `0x00', `0x03', etc.",
"Startup file, dma and compatibility flags are optional.\n"
"Flags syntax is `+#[+#[+#]]' or `0xNN', for example `+1', `+2+3', `0x00', `0x03', etc.\n"
"DMA syntax is `*u4` for UDMA4 (default one).",
"192.168.0.10 \"Gran Turismo 3\" cd0: *u4",
"hdd1: \"Gran Turismo 3\" c:\\gt3.iso SCES_xxx.xx +2+3 *u4", 1 },
{ CMD_HDL_INSTALL, "target source [@slice_index]",
Expand Down Expand Up @@ -1585,24 +1587,33 @@ show_usage_and_exit (const char *app_path,
while (h->command_name != NULL)
{
if (strcmp(command, h->command_name) == 0) {
fprintf(stderr, "Usage:\t%s %s\n"
fprintf(stderr,
BOLD
"Usage:"
UNBOLD
"\t%s %s\n"
"\n"
"%s\n", h->command_name, h->command_arguments,
h->description);
if (h->details != NULL)
fprintf(stderr, "\n%s", h->details);
if (h->example1 != NULL)
fprintf(stderr, "\n"
"Example:\n"
fprintf(stderr, "\n\n"
BOLD
"Example:\n\n"
UNBOLD
"%s %s %s\n", app, h->command_name, h->example1);
if (h->example2 != NULL)
fprintf(stderr, "\tor\n"
"%s %s %s\n", app, h->command_name, h->example2);
if (h->dangerous != 0)
fprintf(stderr,
"\n"
"Warning: This command does write on the HDD\n"
" and could cause corruption. Use with care.\n");
BOLD
"Warning:\n\n"
UNBOLD
"This command does write on the HDD\n"
"and could cause corruption. Use with care.\n");
command_found = 1;
break;
}
Expand Down

0 comments on commit 923e9e0

Please sign in to comment.