From 38515486842ceb366af13b90967d5c40a1d5da5a Mon Sep 17 00:00:00 2001 From: oliverschmidt Date: Thu, 30 Sep 2010 20:32:07 +0000 Subject: [PATCH] Added support for the Atari to the Contiki download page. The Atari disk image tools don't allow to place contiki.cfg at a fixed location. Therefore the byte offset of the contiki.cfg content isn't constant :-( However using the tool adir with the option -r allows to learn the block number of the contiki.cfg content. So this block number is stored for each Atari disk image in the PHP code (in the array $blk) and translated into the correct byte offset. --- tools/6502/contiki.html | 22 +++++++++++++++++----- tools/6502/download.php | 7 +++++++ 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/tools/6502/contiki.html b/tools/6502/contiki.html index b0d3eeec0..4c5784c37 100644 --- a/tools/6502/contiki.html +++ b/tools/6502/contiki.html @@ -30,8 +30,8 @@ @@ -51,7 +51,7 @@ - + - + + + + + + + + @@ -95,7 +107,7 @@ - + . . diff --git a/tools/6502/download.php b/tools/6502/download.php index a62f7dd66..b5e4f4ed7 100644 --- a/tools/6502/download.php +++ b/tools/6502/download.php @@ -28,6 +28,13 @@ case 'c128': $ext = '-' . $dsk . '.d71'; $ofs = 0x15002; break; +case 'atari': + $hex = strtok($_GET['atari-addr-drv'], '-'); + $drv = strtok('-'); + $ext = '-' . $dsk . '.atr'; + $blk = array(0, 5, 4, 0); + $ofs = 0x00010 + ($blk[$dsk] - 1) * 0x80; + break; } $addr = hexdec($hex);