2018-08-11 21:33:18 +00:00
|
|
|
#include "types.rez"
|
|
|
|
|
|
|
|
resource rVersion (1) {
|
2019-07-16 01:26:22 +00:00
|
|
|
{ 1,0,0,release,0 },
|
2018-08-11 21:33:18 +00:00
|
|
|
verUS,
|
|
|
|
"NetDisk",
|
|
|
|
"By Stephen Heumann"
|
|
|
|
};
|
|
|
|
|
|
|
|
resource rComment (1) {
|
|
|
|
"The NetDisk control panel allows you to mount disk images "
|
|
|
|
"hosted on HTTP servers.\n"
|
|
|
|
"\n"
|
2019-07-16 01:26:22 +00:00
|
|
|
"Copyright 2018-2019 Stephen Heumann\n"
|
2018-08-11 21:33:18 +00:00
|
|
|
"\n"
|
|
|
|
"This program contains material from the ORCA/C Run-Time Libraries, "
|
|
|
|
"copyright 1987-1996 by Byte Works, Inc. Used with permission."
|
|
|
|
};
|
|
|
|
|
|
|
|
resource rCDEVFlags (1) {
|
|
|
|
wantMachine+wantHit+wantClose+wantEdit+wantCreate,
|
|
|
|
1, /* enabled */
|
|
|
|
1, /* version */
|
|
|
|
1, /* min ROM version */
|
|
|
|
0, /* reserved */
|
2018-10-08 03:22:09 +00:00
|
|
|
{0, 0, 71, 320}, /* rectangle */
|
2018-08-11 21:33:18 +00:00
|
|
|
"NetDisk", /* name */
|
|
|
|
"Stephen Heumann", /* author */
|
2019-07-16 01:26:22 +00:00
|
|
|
"v1.0" /* version string */
|
2018-08-11 21:33:18 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
read rCDevCode (0x1,convert,locked) "cdev.obj";
|
|
|
|
|
|
|
|
resource rIcon (1) {
|
|
|
|
0x8000, /* color icon */
|
|
|
|
20, /* dimensions */
|
|
|
|
28,
|
2018-09-26 03:07:25 +00:00
|
|
|
$"FFFFF000000000000000000FFFFF"
|
|
|
|
$"FFFFF0F0FFFFFFFFFFFF0F0FFFFF"
|
|
|
|
$"FFFFF0F0F33333F333FF0F0FFFFF"
|
|
|
|
$"FFFFF0F0FFFFFFFFFFFF0F0FFFFF"
|
|
|
|
$"FFFFF0F0F333F333333F0F0FFFFF"
|
|
|
|
$"FFFFF0F0FFFFFFFFFFFF0F0FFFFF"
|
|
|
|
$"FFFFF0F0FFFFFFFFFFFF0F0FFFFF"
|
|
|
|
$"FFFFF0F00000000000000F0FFFFF"
|
|
|
|
$"FFFFF0FFFFFFFFFFFFFFFF0FFFFF"
|
|
|
|
$"FFFFF0FFFFCCCCCCCCFFFF0FFFFF"
|
|
|
|
$"FFFFF0FFFFCCFCCCCCFFFF0FFFFF"
|
|
|
|
$"FFFFFF0FFFCCFCCCCCFFFF0FFFFF"
|
|
|
|
$"FFFFFFF0000000000000000FFFFF"
|
|
|
|
$"FFFFFFFFFFFFF0F0FFFFFFFFFFFF"
|
|
|
|
$"FFFFFFFFFFFF00000FFFFFFFFFFF"
|
|
|
|
$"FFFFFFFFFFFF0FFF0FFFFFFFFFFF"
|
|
|
|
$"FFFFFFFFFFFF00000FFFFFFFFFFF"
|
|
|
|
$"F0F00000000000F0000000000F0F"
|
|
|
|
$"FFFFFFFFFFFFFF0FFFFFFFFFFFFF"
|
|
|
|
$"F0F00000000000F0000000000F0F",
|
|
|
|
|
|
|
|
$"00000FFFFFFFFFFFFFFFFFF00000"
|
|
|
|
$"00000FFFFFFFFFFFFFFFFFF00000"
|
|
|
|
$"00000FFFFFFFFFFFFFFFFFF00000"
|
|
|
|
$"00000FFFFFFFFFFFFFFFFFF00000"
|
|
|
|
$"00000FFFFFFFFFFFFFFFFFF00000"
|
|
|
|
$"00000FFFFFFFFFFFFFFFFFF00000"
|
|
|
|
$"00000FFFFFFFFFFFFFFFFFF00000"
|
|
|
|
$"00000FFFFFFFFFFFFFFFFFF00000"
|
|
|
|
$"00000FFFFFFFFFFFFFFFFFF00000"
|
|
|
|
$"00000FFFFFFFFFFFFFFFFFF00000"
|
|
|
|
$"00000FFFFFFFFFFFFFFFFFF00000"
|
|
|
|
$"000000FFFFFFFFFFFFFFFFF00000"
|
|
|
|
$"0000000FFFFFFFFFFFFFFFF00000"
|
|
|
|
$"0000000000000FFF000000000000"
|
|
|
|
$"000000000000FFFFF00000000000"
|
|
|
|
$"000000000000FFFFF00000000000"
|
|
|
|
$"000000000000FFFFF00000000000"
|
|
|
|
$"0F0FFFFFFFFFFFFFFFFFFFFFF0F0"
|
|
|
|
$"0F0FFFFFFFFFFFFFFFFFFFFFF0F0"
|
|
|
|
$"0F0FFFFFFFFFFF0FFFFFFFFFF0F0"
|
|
|
|
|
2018-08-11 21:33:18 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#define cdevWindow 1000
|
|
|
|
#define helpWindow 2000
|
|
|
|
|
|
|
|
#define imageURLTxt 2
|
|
|
|
#define urlLine 3
|
|
|
|
#define mountBtn 1
|
|
|
|
//#define optionsPopUp 6
|
|
|
|
//#define trianglePic 7
|
2018-10-02 03:42:33 +00:00
|
|
|
#define useCacheChk 8
|
2018-08-11 21:33:18 +00:00
|
|
|
|
|
|
|
#define helpTxt 5
|
|
|
|
|
2018-10-08 03:22:09 +00:00
|
|
|
#define imageFormatMenu 300
|
|
|
|
#define formatAutoDetectItem 301
|
|
|
|
#define format2mgItem 302
|
|
|
|
#define formatRawItem 303
|
|
|
|
#define formatDOSOrderItem 304
|
2018-10-18 01:14:40 +00:00
|
|
|
#define formatDiskCopy42Item 305
|
2018-08-11 21:33:18 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Controls in the control panel window (for 640 mode or 320 mode)
|
|
|
|
*/
|
|
|
|
resource rControlList (640) {
|
|
|
|
{
|
|
|
|
cdevWindow+imageURLTxt,
|
|
|
|
cdevWindow+urlLine,
|
2018-10-02 03:42:33 +00:00
|
|
|
cdevWindow+useCacheChk,
|
2018-08-11 21:33:18 +00:00
|
|
|
cdevWindow+mountBtn,
|
2018-10-08 03:22:09 +00:00
|
|
|
cdevWindow+imageFormatMenu
|
2018-08-11 21:33:18 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
resource rControlList (320) {
|
|
|
|
{
|
|
|
|
cdevWindow+imageURLTxt,
|
|
|
|
cdevWindow+urlLine,
|
2018-10-02 03:42:33 +00:00
|
|
|
cdevWindow+useCacheChk,
|
2018-08-11 21:33:18 +00:00
|
|
|
cdevWindow+mountBtn,
|
2018-10-08 23:14:12 +00:00
|
|
|
cdevWindow+imageFormatMenu
|
2018-08-11 21:33:18 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
resource rControlTemplate (cdevWindow+imageURLTxt) {
|
|
|
|
imageURLTxt, /* control ID */
|
2018-10-08 03:22:09 +00:00
|
|
|
{4, 9, 15, 270}, /* control rect */
|
2018-08-11 21:33:18 +00:00
|
|
|
statTextControl {{
|
|
|
|
fBlastText, /* flags */
|
|
|
|
$1000+RefIsResource, /* moreFlags */
|
|
|
|
0, /* refCon */
|
|
|
|
cdevWindow+imageURLTxt /* title ref */
|
|
|
|
}};
|
|
|
|
};
|
|
|
|
|
|
|
|
resource rTextForLETextBox2 (cdevWindow+imageURLTxt) {
|
|
|
|
"Disk Image URL:"
|
|
|
|
};
|
|
|
|
|
|
|
|
resource rControlTemplate (cdevWindow+urlLine) {
|
|
|
|
urlLine,
|
|
|
|
{15, 10, 28, 310},
|
|
|
|
editLineControl {{
|
|
|
|
0,
|
|
|
|
$7000+RefIsResource,
|
|
|
|
0,
|
|
|
|
255, /* max size */
|
|
|
|
cdevWindow+urlLine /* text ref */
|
|
|
|
}};
|
|
|
|
};
|
|
|
|
|
|
|
|
resource rPString (cdevWindow+urlLine) { "http://" };
|
|
|
|
|
|
|
|
resource rControlTemplate (cdevWindow+mountBtn) {
|
|
|
|
mountBtn,
|
2018-10-08 03:22:09 +00:00
|
|
|
{50, 156, 0, 0},
|
2018-08-11 21:33:18 +00:00
|
|
|
SimpleButtonControl {{
|
|
|
|
DefaultButton,
|
|
|
|
$3000+RefIsResource,
|
|
|
|
0,
|
|
|
|
cdevWindow+mountBtn,
|
|
|
|
0, /* color table ref */
|
|
|
|
{"\$0D","\$0D",0,0} /* key equivalent = Return */
|
|
|
|
}};
|
|
|
|
};
|
|
|
|
|
|
|
|
resource rPString(cdevWindow+mountBtn) { "Mount Disk Image" };
|
|
|
|
|
2018-10-02 03:42:33 +00:00
|
|
|
resource rControlTemplate (cdevWindow+useCacheChk) {
|
|
|
|
useCacheChk,
|
2018-10-08 03:22:09 +00:00
|
|
|
{52,10,0,0},
|
2018-10-02 03:42:33 +00:00
|
|
|
CheckControl {{
|
|
|
|
$0000,
|
|
|
|
$1002,
|
|
|
|
0,
|
|
|
|
cdevWindow+useCacheChk, /* Title ref */
|
|
|
|
1 /* initial value */
|
|
|
|
}};
|
|
|
|
};
|
|
|
|
resource rPString (cdevWindow+useCacheChk) {"Use Disk Cache"};
|
|
|
|
|
2018-10-08 03:22:09 +00:00
|
|
|
|
|
|
|
/* Disk image format pop-up menu */
|
|
|
|
|
|
|
|
resource rControlTemplate (cdevWindow+imageFormatMenu) {
|
|
|
|
imageFormatMenu,
|
2018-10-08 23:14:12 +00:00
|
|
|
{31, 9, 43, 277},
|
2018-08-11 21:33:18 +00:00
|
|
|
PopUpControl {{
|
|
|
|
0,
|
2018-10-08 03:22:09 +00:00
|
|
|
fCtlProcNotPtr+RefIsResource+fDrawPopDownIcon,
|
2018-08-11 21:33:18 +00:00
|
|
|
0,
|
2018-10-08 23:14:12 +00:00
|
|
|
0, /* title width */
|
2018-10-08 03:22:09 +00:00
|
|
|
imageFormatMenu, /* menu ref */
|
|
|
|
formatAutoDetectItem, /* initial value */
|
2018-08-11 21:33:18 +00:00
|
|
|
0
|
|
|
|
}};
|
|
|
|
};
|
|
|
|
|
2018-10-08 03:22:09 +00:00
|
|
|
resource rMenu (imageFormatMenu) {
|
|
|
|
imageFormatMenu, /* menu ID */
|
|
|
|
refIsResource*menuTitleRefShift + refIsResource*itemRefShift,
|
|
|
|
imageFormatMenu, /* menu title ref (not drawn) */
|
|
|
|
{
|
|
|
|
formatAutoDetectItem,
|
|
|
|
format2mgItem,
|
|
|
|
formatRawItem,
|
2018-10-18 01:14:40 +00:00
|
|
|
formatDOSOrderItem,
|
|
|
|
formatDiskCopy42Item,
|
2018-10-08 03:22:09 +00:00
|
|
|
};
|
2018-08-11 21:33:18 +00:00
|
|
|
};
|
2018-10-08 23:14:12 +00:00
|
|
|
resource rPString(imageFormatMenu,noCrossBank) { "Format: " };
|
2018-08-11 21:33:18 +00:00
|
|
|
|
2018-10-08 03:22:09 +00:00
|
|
|
resource rMenuItem (formatAutoDetectItem) {
|
|
|
|
formatAutoDetectItem, /* menu item ID */
|
|
|
|
"","",
|
|
|
|
0,
|
|
|
|
refIsResource*itemTitleRefShift,
|
|
|
|
formatAutoDetectItem /* menu item title ref */
|
2018-08-11 21:33:18 +00:00
|
|
|
};
|
2018-10-08 03:22:09 +00:00
|
|
|
resource rPString(formatAutoDetectItem,noCrossBank) { "Auto-Detect" };
|
2018-08-11 21:33:18 +00:00
|
|
|
|
2018-10-08 03:22:09 +00:00
|
|
|
resource rMenuItem (format2mgItem) {
|
|
|
|
format2mgItem, /* menu item ID */
|
|
|
|
"","",
|
|
|
|
0,
|
|
|
|
refIsResource*itemTitleRefShift,
|
|
|
|
format2mgItem /* menu item title ref */
|
2018-08-11 21:33:18 +00:00
|
|
|
};
|
2018-10-08 03:22:09 +00:00
|
|
|
resource rPString(format2mgItem,noCrossBank) { "Universal Disk Image (2MG)" };
|
2018-08-11 21:33:18 +00:00
|
|
|
|
2018-10-08 03:22:09 +00:00
|
|
|
resource rMenuItem (formatRawItem) {
|
|
|
|
formatRawItem, /* menu item ID */
|
|
|
|
"","",
|
|
|
|
0,
|
|
|
|
refIsResource*itemTitleRefShift,
|
|
|
|
formatRawItem /* menu item title ref */
|
|
|
|
};
|
|
|
|
resource rPString(formatRawItem,noCrossBank) { "ProDOS Order/Raw/ISO" };
|
|
|
|
|
|
|
|
resource rMenuItem (formatDOSOrderItem) {
|
|
|
|
formatDOSOrderItem, /* menu item ID */
|
|
|
|
"","",
|
|
|
|
0,
|
|
|
|
refIsResource*itemTitleRefShift,
|
|
|
|
formatDOSOrderItem /* menu item title ref */
|
2018-08-11 21:33:18 +00:00
|
|
|
};
|
2018-10-08 03:22:09 +00:00
|
|
|
resource rPString(formatDOSOrderItem,noCrossBank) { "DOS Order" };
|
2018-08-11 21:33:18 +00:00
|
|
|
|
2018-10-18 01:14:40 +00:00
|
|
|
resource rMenuItem (formatDiskCopy42Item) {
|
|
|
|
formatDiskCopy42Item, /* menu item ID */
|
|
|
|
"","",
|
|
|
|
0,
|
|
|
|
refIsResource*itemTitleRefShift,
|
|
|
|
formatDiskCopy42Item /* menu item title ref */
|
|
|
|
};
|
|
|
|
resource rPString(formatDiskCopy42Item,noCrossBank) { "DiskCopy 4.2" };
|
|
|
|
|
2018-08-11 21:33:18 +00:00
|
|
|
/*
|
|
|
|
* Controls in the help window
|
|
|
|
*/
|
|
|
|
resource rControlList (2) {
|
|
|
|
{
|
|
|
|
helpWindow+helpTxt
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
resource rControlTemplate (helpWindow+helpTxt) {
|
|
|
|
helpTxt,
|
|
|
|
{38, 5, 138, 280},
|
|
|
|
statTextControl {{
|
|
|
|
0, /* flags */
|
|
|
|
$1000+RefIsResource, /* moreFlags */
|
|
|
|
0, /* refCon */
|
|
|
|
helpWindow+helpTxt /* title ref */
|
|
|
|
}};
|
|
|
|
};
|
|
|
|
|
|
|
|
resource rTextForLETextBox2 (helpWindow+helpTxt) {
|
|
|
|
"The NetDisk control panel allows you to mount disk images "
|
|
|
|
"hosted on HTTP servers.\n"
|
|
|
|
};
|
|
|
|
|
2018-08-13 03:01:25 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Error messages
|
|
|
|
*/
|
|
|
|
|
2018-08-13 03:44:05 +00:00
|
|
|
#define netDiskMissingError 3000
|
|
|
|
#define mountURLError 3001
|
2018-10-01 03:47:43 +00:00
|
|
|
#define unsupportedProtocolAlert 3002
|
2019-07-15 21:44:57 +00:00
|
|
|
#define marinettiMissingError 3003
|
2019-07-16 01:13:11 +00:00
|
|
|
#define marinettiVersionWarning 3004
|
2018-08-13 03:44:05 +00:00
|
|
|
|
|
|
|
resource rAlertString (netDiskMissingError) {
|
|
|
|
"62/"
|
|
|
|
"To use this control panel, you must have NetDiskInit installed "
|
|
|
|
"in the System:System.Setup folder on the boot disk."
|
|
|
|
"/^#0\$00"
|
|
|
|
};
|
2018-08-13 03:01:25 +00:00
|
|
|
|
2019-07-15 21:44:57 +00:00
|
|
|
resource rAlertString (marinettiMissingError) {
|
|
|
|
"62/"
|
|
|
|
"Marinetti is not available. You must install Marinetti to use NetDisk."
|
|
|
|
"/^#0\$00"
|
|
|
|
};
|
|
|
|
|
2018-08-13 03:01:25 +00:00
|
|
|
resource rAlertString (mountURLError) {
|
|
|
|
"32:"
|
|
|
|
"MountURL error *0."
|
|
|
|
":^#0\$00"
|
|
|
|
};
|
2018-10-01 03:47:43 +00:00
|
|
|
|
|
|
|
resource rAlertString (unsupportedProtocolAlert) {
|
|
|
|
"64:"
|
|
|
|
"NetDisk does not support the *0 protocol. Do you want to try "
|
|
|
|
"connecting using unencrypted HTTP instead? (The server may "
|
|
|
|
"or may not support this.)"
|
|
|
|
":#3:^#2\$00"
|
|
|
|
};
|
|
|
|
|
2019-07-16 01:13:11 +00:00
|
|
|
resource rAlertString (marinettiVersionWarning) {
|
|
|
|
"84:"
|
|
|
|
"NetDisk is designed for use with Marinetti 3.0b11 or later.\n"
|
|
|
|
"You are currently using an older version of Marinetti.\n"
|
|
|
|
"You can try to use NetDisk with your current Marinetti version,\n"
|
|
|
|
"but you may experience I/O errors or other problems.\n"
|
|
|
|
"To ensure proper operation, please upgrade Marinetti."
|
|
|
|
":^#6\$00"
|
|
|
|
};
|
|
|
|
|
|
|
|
|