Skip to content

Commit e44b917

Browse files
committed
[app-isoldr] Added option for alternative reading.
Also moved loader selection to new tab for future update.
1 parent b24aa69 commit e44b917

File tree

2 files changed

+54
-22
lines changed

2 files changed

+54
-22
lines changed

applications/iso_loader/app.xml

Lines changed: 39 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,23 @@
149149
<fill color="#61BDEC" height="86%" width="90%" x="5%" y="8%" />
150150
</surface>
151151

152+
<surface height="25" name="sw_btn_sm" width="40">
153+
<fill color="#FFFFFF" />
154+
<fill color="#31799F" height="86%" width="90%" x="7%" y="8%" />
155+
</surface>
156+
<surface height="25" name="sw_btn_sm_hl" width="40">
157+
<fill color="#FFFFFF" />
158+
<fill color="#61BDEC" height="86%" width="90%" x="7%" y="8%" />
159+
</surface>
160+
<surface height="25" name="sw_btn_sm_on" width="40">
161+
<fill color="#31799F" />
162+
<fill color="#61BDEC" height="86%" width="90%" x="7%" y="8%" />
163+
</surface>
164+
<surface height="25" name="sw_btn_sm_on_hl" width="40">
165+
<fill color="#31799F" />
166+
<fill color="#61BDEC" height="86%" width="90%" x="7%" y="8%" />
167+
</surface>
168+
152169
<surface height="50" width="50%" name="menu_bg">
153170
<fill color="#FFFFFF" />
154171
<fill color="#85C4E2" height="48" x="1" y="1" />
@@ -255,12 +272,12 @@
255272
<label align="left" color="#000000" font="arial" height="20" text="Save as preset" width="87%" x="17%" />
256273
</input>
257274

258-
<panel height="155" width="84%" x="13%" y="45">
275+
<panel height="190" width="84%" x="13%" y="45">
259276
<input height="25" name="dma-checkbox" onclick="export:isoLoader_toggleDMA()" type="checkbox">
260277
<label align="left" color="#000000" font="arial" height="20" text="Use DMA transfer (GD/IDE only)" x="9%" />
261278
</input>
262279

263-
<panel height="72" name="async-panel" width="100%">
280+
<panel height="80" name="async-panel" width="100%">
264281
<label align="left" color="#31799F" font="arial" height="22" text="Emulate async read (in sectors):" width="100%" />
265282
<input height="25" onclick="export:isoLoader_toggleAsync()" type="checkbox" width="26%">
266283
<label align="left" color="#000000" font="arial" height="20" name="async-label" text="none" width="86%" x="36%" />
@@ -294,6 +311,9 @@
294311
</input>
295312
</panel>
296313

314+
<input height="25" name="alt-read-checkbox" type="checkbox" width="100%">
315+
<label align="left" color="#000000" font="arial" height="20" text="Bypass pre-reading (IDE only)" x="9%" />
316+
</input>
297317
<input height="25" name="cdda-checkbox" onclick="export:isoLoader_toggleCDDA()" type="checkbox" width="100%">
298318
<label align="left" color="#000000" font="arial" height="20" text="Emulate CDDA audio" x="9%" />
299319
</input>
@@ -302,7 +322,7 @@
302322
</input>
303323
</panel>
304324

305-
<panel height="125" name="os-panel" width="84%" x="13%" y="187">
325+
<panel height="125" name="os-panel" width="84%" x="13%" y="227">
306326
<label align="left" color="#31799F" font="arial" height="25" text="Binary OS:" />
307327
<input checked="true" height="25" onclick="export:isoLoader_toggleOS()" type="checkbox" width="41%">
308328
<label align="left" color="#000000" font="arial" height="20" text="Auto" x="23%" />
@@ -317,14 +337,9 @@
317337
<label align="left" color="#000000" font="arial" height="20" text="WinCE" x="23%" />
318338
</input>
319339
</panel>
320-
321-
<panel height="45" width="52%" x="13%" y="257">
322-
<label align="left" color="#31799F" font="arial" height="22" text="Loader device:" width="100%" />
323-
<input font="arial" fontcolor="#000000" height="18" name="device" size="30" type="text" value="auto" width="100%" />
324-
</panel>
325340
</panel>
326341

327-
<panel height="370" width="55%" x="56%" y="10" name="container-panel" >
342+
<panel height="370" width="55%" x="49%" y="10" name="container-panel">
328343

329344
<panel height="30" name="switch-panel" width="100%" y="16">
330345
<input type="checkbox" checked="true" height="25" width="60" onclick="export:isoLoader_toggleOptions()" offhighlight="sw_btn_hl" offnormal="sw_btn" onhighlight="sw_btn_on_hl" onnormal="sw_btn_on">
@@ -339,16 +354,19 @@
339354
<input type="checkbox" height="25" width="60" x="191" onclick="export:isoLoader_toggleOptions()" offhighlight="sw_btn_hl" offnormal="sw_btn" onhighlight="sw_btn_on_hl" onnormal="sw_btn_on">
340355
<label align="center" color="#ffffff" font="m23" height="20" text="Patch" width="100%" y="3" />
341356
</input>
357+
<input type="checkbox" height="25" width="40" x="255" onclick="export:isoLoader_toggleOptions()" offhighlight="sw_btn_sm_hl" offnormal="sw_btn_sm" onhighlight="sw_btn_sm_on_hl" onnormal="sw_btn_sm_on">
358+
<label align="center" color="#ffffff" font="m23" height="20" text="FW" width="100%" y="3" />
359+
</input>
342360
</panel>
343361

344-
<cardstack height="330" width="100%" name="options-panel" y="48">
362+
<cardstack height="330" width="100%" name="options-panel" y="48" x="10">
345363
<panel name="boot-panel">
346364
<panel height="25" name="boot-mode-panel" width="100%">
347-
<input checked="true" height="25" onclick="export:isoLoader_toggleBootMode()" type="checkbox" width="22%">
348-
<label align="left" color="#000000" font="arial" height="20" text="Direct" width="81%" x="32%" />
365+
<input checked="true" height="25" onclick="export:isoLoader_toggleBootMode()" type="checkbox" width="23%">
366+
<label align="left" color="#000000" font="arial" height="20" text="Direct" width="81%" x="31%" />
349367
</input>
350-
<input height="25" onclick="export:isoLoader_toggleBootMode()" type="checkbox" width="21%">
351-
<label align="left" color="#000000" font="arial" height="20" text="IP.BIN" width="86%" x="34%" />
368+
<input height="25" onclick="export:isoLoader_toggleBootMode()" type="checkbox" width="23%">
369+
<label align="left" color="#000000" font="arial" height="20" text="IP.BIN" width="86%" x="31%" />
352370
</input>
353371
<input height="25" onclick="export:isoLoader_toggleBootMode()" type="checkbox" width="23%">
354372
<label align="left" color="#000000" font="arial" height="20" text="IP.BIN cut" width="113%" x="31%" />
@@ -539,6 +557,13 @@
539557
</panel>
540558
</panel>
541559

560+
<panel name="fw-panel">
561+
<panel height="250" width="80%">
562+
<label align="left" color="#31799F" font="arial" height="22" text="Loader device:" width="100%" />
563+
<input font="arial" fontcolor="#000000" height="18" name="device" size="30" type="text" value="auto" width="100%" />
564+
</panel>
565+
</panel>
566+
542567
</cardstack>
543568

544569
</panel>

applications/iso_loader/modules/module.c

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,12 @@ static struct {
7373
GUI_Widget *vmu_priv_1mb;
7474
GUI_Widget *screenshot;
7575
GUI_Widget *alt_boot;
76+
GUI_Widget *alt_read;
7677

7778
GUI_Widget *device;
7879
GUI_Widget *os_chk[4];
7980

80-
GUI_Widget *options_switch[4];
81+
GUI_Widget *options_switch[5];
8182
GUI_Widget *boot_mode_chk[3];
8283
GUI_Widget *memory_chk[16];
8384
GUI_Widget *memory_text;
@@ -405,11 +406,12 @@ void isoLoader_MakeShortcut(GUI_Widget *widget) {
405406
if(GUI_WidgetGetState(self.dma)) {
406407
strcat(cmd, " -a");
407408
}
408-
409+
if(GUI_WidgetGetState(self.alt_read)) {
410+
strcat(cmd, " -y");
411+
}
409412
if(GUI_WidgetGetState(self.irq)) {
410413
strcat(cmd, " -q");
411414
}
412-
413415
if(GUI_WidgetGetState(self.low)) {
414416
strcat(cmd, " -l");
415417
}
@@ -1054,11 +1056,9 @@ void isoLoader_Run(GUI_Widget *widget) {
10541056
if(GUI_WidgetGetState(self.irq)) {
10551057
self.isoldr->use_irq = 1;
10561058
}
1057-
10581059
if(GUI_WidgetGetState(self.low)) {
10591060
self.isoldr->syscalls = 1;
10601061
}
1061-
10621062
if(GUI_WidgetGetState(self.cdda)) {
10631063
self.isoldr->emu_cdda = getModeCDDA();
10641064
}
@@ -1086,7 +1086,9 @@ void isoLoader_Run(GUI_Widget *widget) {
10861086
if(GUI_WidgetGetState(self.dma)) {
10871087
self.isoldr->use_dma = 1;
10881088
}
1089-
1089+
if(GUI_WidgetGetState(self.alt_read)) {
1090+
self.isoldr->alt_read = 1;
1091+
}
10901092
if(GUI_WidgetGetState(self.fastboot)) {
10911093
self.isoldr->fast_boot = 1;
10921094
}
@@ -1348,6 +1350,7 @@ void isoLoader_DefaultPreset() {
13481350

13491351
setModeCDDA(CDDA_MODE_DISABLED);
13501352

1353+
GUI_WidgetSetState(self.alt_read, 0);
13511354
GUI_WidgetSetState(self.irq, 0);
13521355
GUI_WidgetSetState(self.low, 0);
13531356
isoLoader_toggleVMU(self.vmu_disabled);
@@ -1484,12 +1487,13 @@ int isoLoader_SavePreset() {
14841487
snprintf(result, sizeof(result),
14851488
"title = %s\ndevice = %s\ndma = %d\nasync = %d\ncdda = %08lx\n"
14861489
"irq = %d\nlow = %d\nheap = %08lx\nfastboot = %d\ntype = %d\nmode = %d\nmemory = %s\n"
1487-
"vmu = %d\nscrhotkey = %lx\n"
1490+
"vmu = %d\nscrhotkey = %lx\naltread = %d\n"
14881491
"pa1 = %08lx\npv1 = %08lx\npa2 = %08lx\npv2 = %08lx\n",
14891492
title, GUI_TextEntryGetText(self.device), GUI_WidgetGetState(self.dma), async,
14901493
cdda_mode, GUI_WidgetGetState(self.irq), GUI_WidgetGetState(self.low), heap,
14911494
GUI_WidgetGetState(self.fastboot), type, mode, memory,
14921495
vmu_num, (uint32)(GUI_WidgetGetState(self.screenshot) ? SCREENSHOT_HOTKEY : 0),
1496+
GUI_WidgetGetState(self.alt_read),
14931497
self.pa[0], self.pv[0], self.pa[1], self.pv[1]);
14941498

14951499
if(GUI_WidgetGetState(self.alt_boot)) {
@@ -1516,7 +1520,7 @@ int isoLoader_LoadPreset() {
15161520
return -1;
15171521
}
15181522

1519-
int use_dma = 0, emu_async = 16, use_irq = 0;
1523+
int use_dma = 0, emu_async = 16, use_irq = 0, alt_read = 0;
15201524
int fastboot = 0, low = 0, emu_vmu = 0, scr_hotkey = 0;
15211525
int boot_mode = BOOT_MODE_DIRECT;
15221526
int bin_type = BIN_TYPE_AUTO;
@@ -1535,6 +1539,7 @@ int isoLoader_LoadPreset() {
15351539

15361540
isoldr_conf options[] = {
15371541
{ "dma", CONF_INT, (void *) &use_dma },
1542+
{ "altread", CONF_INT, (void *) &alt_read },
15381543
{ "cdda", CONF_ULONG, (void *) &emu_cdda },
15391544
{ "irq", CONF_INT, (void *) &use_irq },
15401545
{ "low", CONF_INT, (void *) &low },
@@ -1564,6 +1569,7 @@ int isoLoader_LoadPreset() {
15641569

15651570
GUI_WidgetSetState(self.dma, use_dma);
15661571
isoLoader_toggleDMA(self.dma);
1572+
GUI_WidgetSetState(self.alt_read, alt_read);
15671573

15681574
if (emu_async == 0) {
15691575
GUI_WidgetSetState(self.async[0], 1);
@@ -1738,6 +1744,7 @@ void isoLoader_Init(App_t *app) {
17381744

17391745
self.preset = APP_GET_WIDGET("preset-checkbox");
17401746
self.dma = APP_GET_WIDGET("dma-checkbox");
1747+
self.alt_read = APP_GET_WIDGET("alt-read-checkbox");
17411748
self.cdda = APP_GET_WIDGET("cdda-checkbox");
17421749
self.irq = APP_GET_WIDGET("irq-checkbox");
17431750
self.low = APP_GET_WIDGET("low-checkbox");

0 commit comments

Comments
 (0)