That protection has also been used for Moon Patrol, please refer to that topic for info (in French only): <a href="http://www.hackzapple.com/phpBB2/viewtopic.php?t=13" target="_blank">http://www.hackzapple.com/phpBB2/viewtopic.php?t=13</a>
<br />
<br />
<br />
<span style="font-weight: bold">BOOT TRACE</span>
<br />
- 9600<C600.C6FFM
<br />
- 96FB: 4C 59 FF
<br />
- 9600G
<br />
<br />
Let's examine the code at $0800:
<br />
- the arm is moved to track 1 (routine in $804, in A the phase you want to go to)
<br />
- data is loaded from $B000 to $B7FF
<br />
- $08FB is a JMP $B000
<br />
<br />
Let's break that:
<br />
- 96FB: A9 98 8D FD 08 4C 01 08
<br />
- 9800: 4C 59 FF
<br />
- 9600G
<br />
<br />
Let's examine the code at $B000:
<br />
- clear the screen,
<br />
- set $CC = 0
<br />
- load data at $B100 (1)
<br />
- execute code loaded at $7000
<br />
- set $CC = 1
<br />
- load data at $B100 (2)
<br />
- execute code loaded at $0800
<br />
<br />
(1) The first tables that load data per $800 bytes are located at:
<br />
- phase to move the arm to (equals to track *2): $B0CD
<br />
- address to load data into memory: $B0DB
<br />
- checksum of read data: $B0E9
<br />
=> data is read from track 3 to E from $2000 to $7FFF because $CC = 0
<br />
<br />
(2) The second tables that load data per $800 bytes are located at:
<br />
- phase to move the arm to (equals to track *2): $B0F7
<br />
- address to load data into memory: $B0FA
<br />
- checksum of read data: $B0FD
<br />
=> data is read from track 2 from $0800 to $0FFF because $CC = 1
<br />
<br />
Code at $0800 loads data to the $2000.$BFFF space from phase 1E to phase 44. Then final code execution is passed to $3E00. For those of you who would like to make a ProDOS version of the game, the program is from $2000 to $BFFF.
<br />
<br />
As you may see, the remaining free space is $1000..$1FFF or the $0200.$07FF space, that may be useful for your own routines...
The read routine located at $B100 zeroes its index at $C8 and depending on the value of $CC sets parameters from table 1 or table 2. The routine uses the $C0Ex softswitch and not the $C08x,X softswitches!
<br />
<br />
Entry parameters at $B13D
<br />
A: phase you want to you (one phase = track number * 2)
<br />
phase 2 means track 1, phase E means track 7
<br />
$C9..$CA: address of data to load
<br />
<br />
Other parameters:
<br />
$50: checksum value
<br />
$C2: target phase
<br />
$C7: current phase
<br />
<br />
The routine loads data for 8 pages of $100 bytes (or $800 bytes, or $1000 nibbles), then compares the checksum between data read and $50, then increments the index at $C8.
<br />
<br />
<br />
<span style="font-weight: bold">DISK COPY</span>
<br />
Let's use what Atari offers us: its own routine in $B100 but we need to modify it slightly:
<br />
- read one track
<br />
- copy to the IIgs memory
<br />
- loop until the end of the disk
<br />
<br />
Here is the code:
<br />
<br />
</span><table width="90%" cellspacing="1" cellpadding="3" border="0" align="center"><tr> <td><span class="genmed"><b>Code:</b></span></td> </tr> <tr> <td class="code"> LDA #$18 ; $1800 is our Mount Paramount
<br />
STA $B202
<br />
LDA #$60 ; the RTS opcode
<br />
STA $B205
<br />
<br />
LDA $C0E9 ; turn drive on and wait a little bit
<br />
LDA #$FF
<br />
JSR $FCA8
<br />
<br />
LDA $00 ; we'll begin on track 0
<br />
STA $FF
<br />
STA $C9
<br />
<br />
]LP LDA #$10 ; we'll load data at $1000
<br />
STA $CA
<br />
<br />
LDA $FF ; please read
<br />
JSR $B13D
<br />
<br />
LDA $FF
<br />
JSR $FDDA ; print out current phase
<br />
LDA #$8D
<br />
JSR $FDED ; carriage return (hum)
<br />
<br />
LDY #$10 ; or 8 for those you shrink space
<br />
]LQ LDX #$00 ; let's store read data into our IIgs memory
<span style="font-weight: bold">RE'WRITE' THE 'READ' ROUTINES</span>
<br />
As with Moon Patrol, you are free to use your own read routine, the one from the $C600 space or whatever you like.
<br />
<br />
At first, I use the $C65C read routine ($26..$27 is pointer to the buffer, $3D the sector, $41 the track), that is the one on the DSK image.
<br />
<br />
Then, I had fun including the $C65C code within the $B100..$B2FF space. It also worked, that's quite fun. For those of you interested, I may send info on that one.
<br />
<br />
As that is a tricky stuff to do, please refer to the DSK image and read:
<br />
- T0/S0 is the boot loader of track 1 => The code is loaded at $0800
<br />
- T1/S0..S2 contains the modified read routines (T1/S8..SA for the original ones) => The code is loaded at $B000
<br />
- T2/S0..S2 contains the modified second read routines (T2/S8..SA for the original ones) => The code is loaded at $0800
<br />
<br />
<br />
Your backup copy is now available...
<br />
<br />
Toinet</span><span class="gensmall"></span></td>
</tr>
</table></td>
</tr>
<tr>
<td class="row1" width="150" align="left" valign="middle"><span class="nav"><a href="#top" class="nav">Revenir en haut de page</a></span></td>
<td valign="middle" nowrap="nowrap"><a href="profile.php?mode=viewprofile&u=4"><img src="templates/subSilver/images/lang_french/icon_profile.gif" alt="Voir le profil de l'utilisateur" title="Voir le profil de l'utilisateur" border="0" /></a> <a href="privmsg.php?mode=post&u=4"><img src="templates/subSilver/images/lang_french/icon_pm.gif" alt="Envoyer un message privΘ" title="Envoyer un message privΘ" border="0" /></a> <a href="http://www.oss117.org/" target="_userwww"><img src="templates/subSilver/images/lang_french/icon_www.gif" alt="Visiter le site web de l'utilisateur" title="Visiter le site web de l'utilisateur" border="0" /></a> <script language="JavaScript" type="text/javascript"><!--
<td align="right" valign="top" nowrap="nowrap"><span class="gensmall">Toutes les heures sont au format GMT + 1 Heure</span><br /><span class="nav"></span>
</td>
</tr>
<tr>
<td align="left" colspan="3"><span class="nav">Page <b>1</b> sur <b>1</b></span></td>
<td nowrap="nowrap"><span class="gensmall">Sauter vers: <select name="f" onchange="if(this.options[this.selectedIndex].value != -1){ forms['jumpbox'].submit() }"><option value="-1">SΘlectionner un forum</option><option value="-1"> </option><option value="-1">GENERALITES</option><option value="-1">----------------</option><option value="1">REGLES DE BASE DU FORUM</option><option value="2">PRESENTATION DES MEMBRES</option><option value="3">FAQ</option><option value="24">LES VENDEURS DE Q et assimilΘs...</option><option value="-1"> </option><option value="-1">La ligne des APPLE II</option><option value="-1">----------------</option><option value="4">APPLE II et II+</option><option value="5">APPLE IIe</option><option value="6">APPLE IIc et IIc Plus</option><option value="7">APPLE IIGS</option><option value="8">ITT2020</option><option value="9">BELL & HOWELL</option><option value="-1"> </option><option value="-1">ON AIME AUSSI...</option><option value="-1">----------------</option><option value="25">APPLE I</option><option value="10">APPLE /// et ///Plus</option><option value="11">LISA 1, 2, 2/5, 2/10 et ... XL</option><option value="-1"> </option><option value="-1">LOGICIELS</option><option value="-1">----------------</option><option value="12">PROBLEMES DIVERS</option><option value="13"selected="selected">PROTECTION MALEFIQUE</option><option value="23">EMULATION</option><option value="-1"> </option><option value="-1">LES CARTES ET PERIPHERIQUES</option><option value="-1">----------------</option><option value="14">CARTES COPROCESSEUR</option><option value="15">CARTES MEMOIRE</option><option value="16">CARTES POUR DISQUES</option><option value="17">AUTRES CARTES</option><option value="18">PERIPHERIQUES</option><option value="-1"> </option><option value="-1">EN VRAC ET DIVERS</option><option value="-1">----------------</option><option value="19">Recherches techniques (hard ou soft)</option><option value="20">ACHATS,VENTES ET/OU ECHANGES</option><option value="21">DIVERS...MAIS TOUJOURS EN RELATION AVEC APPLE!</option><option value="22">LES PETITS MAUDITS A EVITER</option></select><input type="hidden" name="sid" value="88dc291636b558c274916ca04b217a32" /> <input type="submit" value="Aller" class="liteoption" /></span></td>
</tr>
</table></form>
<span class="gensmall">Vous <b>ne pouvez pas</b> poster de nouveaux sujets dans ce forum<br />Vous <b>ne pouvez pas</b> rΘpondre aux sujets dans ce forum<br />Vous <b>ne pouvez pas</b> Θditer vos messages dans ce forum<br />Vous <b>ne pouvez pas</b> supprimer vos messages dans ce forum<br />Vous <b>ne pouvez pas</b> voter dans les sondages de ce forum<br /></span></td>