Included Breadbox64 into cc65 binary relaease tools.
This additional application results in three disks for the Apple2, two disks for the C64 and one disk for the C128. Therefore the download page can't get along anymore without some JavaScript adjusting the number of downloadable disks depending on the selected machine. With JavaScript turned off access to non-existent disks (i.e. disk 3 for the C64) results in a successfull download of a zero byte sized file - not exactly great but at least a defined behaviour.
This commit is contained in:
parent
75de6f9fb0
commit
46b83d6ba4
3 changed files with 70 additions and 36 deletions
|
@ -1,5 +1,7 @@
|
|||
<?php
|
||||
|
||||
error_reporting(0);
|
||||
|
||||
$cfg = chr($_GET['addr-a']).chr($_GET['addr-b']).chr($_GET['addr-c']).chr($_GET['addr-d']);
|
||||
$cfg .= chr($_GET['mask-a']).chr($_GET['mask-b']).chr($_GET['mask-c']).chr($_GET['mask-d']);
|
||||
$cfg .= chr($_GET['dgw-a']). chr($_GET['dgw-b']). chr($_GET['dgw-c']). chr($_GET['dgw-d']);
|
||||
|
@ -8,22 +10,22 @@ $cfg .= chr($_GET['dns-a']). chr($_GET['dns-b']). chr($_GET['dns-c']). chr($_GET
|
|||
$dsk = $_GET['disk'];
|
||||
|
||||
switch ($_GET['machine']) {
|
||||
case "apple2":
|
||||
case 'apple2':
|
||||
$hex = $_GET['apple2-addr'];
|
||||
$drv = $_GET['apple2-drv'];
|
||||
$ext = '-' . $dsk . '.dsk';
|
||||
$ofs = 0x05B00;
|
||||
break;
|
||||
case "c64":
|
||||
case 'c64':
|
||||
$hex = strtok($_GET['c64-addr-drv'], '-');
|
||||
$drv = strtok('-');
|
||||
$ext = '-' . $dsk . '.d64';
|
||||
$ofs = 0x15002;
|
||||
break;
|
||||
case "c128":
|
||||
case 'c128':
|
||||
$hex = strtok($_GET['c128-addr-drv'], '-');
|
||||
$drv = strtok('-');
|
||||
$ext = '.d71';
|
||||
$ext = '-' . $dsk . '.d71';
|
||||
$ofs = 0x15002;
|
||||
break;
|
||||
}
|
||||
|
@ -33,7 +35,11 @@ $cfg .= chr($addr % 0x100).chr($addr / 0x100);
|
|||
$cfg .= $drv;
|
||||
|
||||
if ($dsk) {
|
||||
$out = substr_replace(file_get_contents('contiki'. $ext), $cfg, $ofs, strlen($cfg));
|
||||
$img = file_get_contents('contiki'. $ext);
|
||||
if ($img)
|
||||
$out = substr_replace($img, $cfg, $ofs, strlen($cfg));
|
||||
else
|
||||
$out = '';
|
||||
} else {
|
||||
$ext = '.cfg';
|
||||
$out = $cfg;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue