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:
oliverschmidt 2010-08-05 22:50:19 +00:00
parent 75de6f9fb0
commit 46b83d6ba4
3 changed files with 70 additions and 36 deletions

View File

@ -30,7 +30,7 @@
#
# Author: Oliver Schmidt <ol.sc@web.de>
#
# $Id: Makefile,v 1.4 2010/03/31 06:05:37 oliverschmidt Exp $
# $Id: Makefile,v 1.5 2010/08/05 22:50:19 oliverschmidt Exp $
#
ifndef CC65_HOME
@ -45,7 +45,7 @@ ifndef C1541
${error C1541 not defined! You must specify where VICE c1541 resides}
endif
disks: apple2enh-1-disk apple2enh-2-disk c64-1-disk c64-2-disk c128-disk
disks: apple2enh-1-disk apple2enh-2-disk apple2enh-3-disk c64-1-disk c64-2-disk c128-1-disk
apple2enh-1-disk:
cp ../apple2enh/prodos.dsk contiki-1.dsk
@ -69,16 +69,30 @@ apple2enh-2-disk:
cp ../apple2enh/prodos.dsk contiki-2.dsk
java -jar $(AC) -p contiki-2.dsk contiki.cfg bin 0 < dummy.cfg
java -jar $(AC) -p contiki-2.dsk menu.system sys 0 < ../apple2enh/menu.system
java -jar $(AC) -p contiki-2.dsk dhcp.system sys 0 < ../apple2enh/loader.system
java -jar $(AC) -cc65 contiki-2.dsk dhcp bin 0 < ../../cpu/6502/dhcp/dhcp-client.apple2enh
java -jar $(AC) -p contiki-2.dsk wget.system sys 0 < ../apple2enh/loader.system
java -jar $(AC) -cc65 contiki-2.dsk wget bin < ../../examples/wget/wget.apple2enh
java -jar $(AC) -p contiki-2.dsk irc.system sys 0 < ../apple2enh/loader.system
java -jar $(AC) -cc65 contiki-2.dsk irc bin < ../../examples/irc/irc-client.apple2enh
java -jar $(AC) -p contiki-2.dsk email.system sys 0 < ../apple2enh/loader.system
java -jar $(AC) -cc65 contiki-2.dsk email bin < ../../examples/email/email-client.apple2enh
java -jar $(AC) -p contiki-2.dsk cs8900a.eth rel 0 < ../../cpu/6502/dhcp/cs8900a.eth
java -jar $(AC) -p contiki-2.dsk lan91c96.eth rel 0 < ../../cpu/6502/dhcp/lan91c96.eth
java -jar $(AC) -p contiki-2.dsk a2e.stdmou.mou rel 0 < $(CC65_HOME)/mou/a2e.stdmou.mou
apple2enh-3-disk:
cp ../apple2enh/prodos.dsk contiki-3.dsk
java -jar $(AC) -p contiki-3.dsk contiki.cfg bin 0 < dummy.cfg
java -jar $(AC) -p contiki-3.dsk menu.system sys 0 < ../apple2enh/menu.system
java -jar $(AC) -p contiki-3.dsk dhcp.system sys 0 < ../apple2enh/loader.system
java -jar $(AC) -cc65 contiki-3.dsk dhcp bin 0 < ../../cpu/6502/dhcp/dhcp-client.apple2enh
java -jar $(AC) -p contiki-3.dsk email.system sys 0 < ../apple2enh/loader.system
java -jar $(AC) -cc65 contiki-3.dsk email bin < ../../examples/email/email-client.apple2enh
java -jar $(AC) -p contiki-3.dsk breadbox.system sys 0 < ../apple2enh/loader.system
java -jar $(AC) -cc65 contiki-3.dsk breadbox bin < ../../../../contikiprojects/vandenbrande.com/twitter/platform/apple2enh/breadbox64.apple2enh
java -jar $(AC) -p contiki-3.dsk cs8900a.eth rel 0 < ../../cpu/6502/dhcp/cs8900a.eth
java -jar $(AC) -p contiki-3.dsk lan91c96.eth rel 0 < ../../cpu/6502/dhcp/lan91c96.eth
java -jar $(AC) -p contiki-3.dsk a2e.stdmou.mou rel 0 < $(CC65_HOME)/mou/a2e.stdmou.mou
c64-1-disk:
$(C1541) -format contiki,00 d64 contiki-1.d64
$(C1541) -attach contiki-1.d64 -write dummy.cfg contiki.cfg,u
@ -100,23 +114,25 @@ c64-2-disk:
$(C1541) -attach contiki-2.d64 -write ../../cpu/6502/dhcp/dhcp-client.c64 dhcp,p
$(C1541) -attach contiki-2.d64 -write ../../examples/irc/irc-client.c64 irc,p
$(C1541) -attach contiki-2.d64 -write ../../examples/email/email-client.c64 email,p
$(C1541) -attach contiki-2.d64 -write ../../../../contikiprojects/vandenbrande.com/twitter/platform/c64/breadbox64.c64 breadbox64,p
$(C1541) -attach contiki-2.d64 -write ../../cpu/6502/dhcp/cs8900a.eth cs8900a.eth,u
$(C1541) -attach contiki-2.d64 -write ../../cpu/6502/dhcp/lan91c96.eth lan91c96.eth,u
$(C1541) -attach contiki-2.d64 -write $(CC65_HOME)/mou/c64-1351.mou c64-1351.mou,u
c128-disk:
$(C1541) -format contiki,00 d71 contiki.d71
$(C1541) -attach contiki.d71 -write dummy.cfg contiki.cfg,u
$(C1541) -attach contiki.d71 -write ../../cpu/6502/dhcp/dhcp-client.c128 dhcp,p
$(C1541) -attach contiki.d71 -write ../../examples/webserver/webserver-example.c128 webserver,p
$(C1541) -attach contiki.d71 -write ../../examples/webbrowser/webbrowser.c128 webbrowser,p
$(C1541) -attach contiki.d71 -write ../../examples/wget/wget.c128 wget,p
$(C1541) -attach contiki.d71 -write ../../examples/irc/irc-client.c128 irc,p
$(C1541) -attach contiki.d71 -write ../../examples/email/email-client.c128 email,p
$(C1541) -attach contiki.d71 -write ../../cpu/6502/dhcp/cs8900a.eth cs8900a.eth,u
$(C1541) -attach contiki.d71 -write ../../cpu/6502/dhcp/lan91c96.eth lan91c96.eth,u
$(C1541) -attach contiki.d71 -write $(CC65_HOME)/mou/c128-1351.mou c128-1351.mou,u
$(C1541) -attach contiki.d71 -write ../../examples/webserver/httpd-cfs/index.html index.html,u
$(C1541) -attach contiki.d71 -write ../../examples/webserver/httpd-cfs/background.gif background.gif,u
$(C1541) -attach contiki.d71 -write ../../examples/webserver/httpd-cfs/contiki.gif contiki.gif,u
$(C1541) -attach contiki.d71 -write ../../examples/webserver/httpd-cfs/notfound.html notfound.html,u
c128-1-disk:
$(C1541) -format contiki,00 d71 contiki-1.d71
$(C1541) -attach contiki-1.d71 -write dummy.cfg contiki.cfg,u
$(C1541) -attach contiki-1.d71 -write ../../cpu/6502/dhcp/dhcp-client.c128 dhcp,p
$(C1541) -attach contiki-1.d71 -write ../../examples/webserver/webserver-example.c128 webserver,p
$(C1541) -attach contiki-1.d71 -write ../../examples/webbrowser/webbrowser.c128 webbrowser,p
$(C1541) -attach contiki-1.d71 -write ../../examples/wget/wget.c128 wget,p
$(C1541) -attach contiki-1.d71 -write ../../examples/irc/irc-client.c128 irc,p
$(C1541) -attach contiki-1.d71 -write ../../examples/email/email-client.c128 email,p
$(C1541) -attach contiki-1.d71 -write ../../../../contikiprojects/vandenbrande.com/twitter/platform/c128/breadbox64.c128 breadbox64,p
$(C1541) -attach contiki-1.d71 -write ../../cpu/6502/dhcp/cs8900a.eth cs8900a.eth,u
$(C1541) -attach contiki-1.d71 -write ../../cpu/6502/dhcp/lan91c96.eth lan91c96.eth,u
$(C1541) -attach contiki-1.d71 -write $(CC65_HOME)/mou/c128-1351.mou c128-1351.mou,u
$(C1541) -attach contiki-1.d71 -write ../../examples/webserver/httpd-cfs/index.html index.html,u
$(C1541) -attach contiki-1.d71 -write ../../examples/webserver/httpd-cfs/background.gif background.gif,u
$(C1541) -attach contiki-1.d71 -write ../../examples/webserver/httpd-cfs/contiki.gif contiki.gif,u
$(C1541) -attach contiki-1.d71 -write ../../examples/webserver/httpd-cfs/notfound.html notfound.html,u

View File

@ -8,6 +8,16 @@
tr.pb { padding-bottom: 15px }
tr.bg { background-color: black; height: 1px }
</style>
<script type="text/javascript">
function disks(disks) {
for (var i = 3; i; i--) {
document.forms[0].disk[i].disabled = i > disks;
if (document.forms[0].disk[i].checked &&
document.forms[0].disk[i].disabled)
document.forms[0].disk[i-1].checked = true;
}
}
</script>
</head>
<body>
<form action="download.php">
@ -15,7 +25,7 @@
<table align="center" cellpadding="0" cellspacing="0">
<tr class="p">
<td>
<input type="radio" name="machine" id="apple2" value="apple2" checked="checked" />
<input type="radio" name="machine" id="apple2" value="apple2" onclick="disks(3)" checked="checked" />
<label for="apple2">Apple //e</label>
</td><td>
<label for="apple2-drv">Ethernet Card:</label>
@ -39,7 +49,7 @@
<td colspan="3" />
</tr><tr class="p">
<td>
<input type="radio" name="machine" id="c64" value="c64" />
<input type="radio" name="machine" id="c64" value="c64" onclick="disks(2)" />
<label for="c64">C64</label>
</td><td>
<label for="c64-drv">Ethernet Card:</label>
@ -53,7 +63,7 @@
<td colspan="3" />
</tr><tr class="p">
<td>
<input type="radio" name="machine" id="c128" value="c128" />
<input type="radio" name="machine" id="c128" value="c128" onclick="disks(1)" />
<label for="c128">C128</label>
</td><td>
<label for="c128-drv">Ethernet Card:</label>
@ -110,7 +120,9 @@
<input type="radio" name="disk" id="disk-1" value="1" checked="checked" />
<label for="disk-1">Complete Image Of Disk 1</label><br />
<input type="radio" name="disk" id="disk-2" value="2" />
<label for="disk-2">Complete Image Of Disk 2</label>
<label for="disk-2">Complete Image Of Disk 2</label><br />
<input type="radio" name="disk" id="disk-3" value="3" />
<label for="disk-3">Complete Image Of Disk 3</label>
</td>
</tr><tr class="bg">
<td colspan="3" />

View File

@ -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;