Index du Forum
IDENTIFICATION SERVEUR : 10.0.97.1 - CLIENT : 54.235.48.106

 FAQFAQ   RechercherRechercher   Liste des MembresListe des Membres   Groupes d'utilisateursGroupes d'utilisateurs   S'enregistrerS'enregistrer 
 ProfilProfil   Se connecter pour vérifier ses messages privésSe connecter pour vérifier ses messages privés   ConnexionConnexion 

Joust (Atari, 1983)

 
Poster un nouveau sujet   Répondre au sujet     Index du Forum -> PROTECTION MALEFIQUE
Voir le sujet précédent :: Voir le sujet suivant  
Auteur Message
toinet
Site Admin


Inscrit le: 15 Juin 2007
Messages: 2949
Localisation: Le Chesnay, France

MessagePosté le: Ven 10 Aoû 2007, 20:24    Sujet du message: Joust (Atari, 1983) Répondre en citant

Ride gallant birds into knightly combat!

Joust is a trademark and (c) Williams 1982, manufactured under license from Williams Electronics Inc.


PROTECTION TYPE
A non standard diskette:
- One big sector of $1000 4*4 nibbles per track

That protection has also been used for Moon Patrol, please refer to that topic for info (in French only): http://www.hackzapple.com/phpBB2/viewtopic.php?t=13


BOOT TRACE
- 9600<C600.C6FFM
- 96FB: 4C 59 FF
- 9600G

Let's examine the code at $0800:
- the arm is moved to track 1 (routine in $804, in A the phase you want to go to)
- data is loaded from $B000 to $B7FF
- $08FB is a JMP $B000

Let's break that:
- 96FB: A9 98 8D FD 08 4C 01 08
- 9800: 4C 59 FF
- 9600G

Let's examine the code at $B000:
- clear the screen,
- set $CC = 0
- load data at $B100 (1)
- execute code loaded at $7000
- set $CC = 1
- load data at $B100 (2)
- execute code loaded at $0800

(1) The first tables that load data per $800 bytes are located at:
- phase to move the arm to (equals to track *2): $B0CD
- address to load data into memory: $B0DB
- checksum of read data: $B0E9
=> data is read from track 3 to E from $2000 to $7FFF because $CC = 0

(2) The second tables that load data per $800 bytes are located at:
- phase to move the arm to (equals to track *2): $B0F7
- address to load data into memory: $B0FA
- checksum of read data: $B0FD
=> data is read from track 2 from $0800 to $0FFF because $CC = 1

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.

As you may see, the remaining free space is $1000..$1FFF or the $0200.$07FF space, that may be useful for your own routines...



READ ROUTINE
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!

Entry parameters at $B13D
A: phase you want to you (one phase = track number * 2)
phase 2 means track 1, phase E means track 7
$C9..$CA: address of data to load

Other parameters:
$50: checksum value
$C2: target phase
$C7: current phase

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.


DISK COPY
Let's use what Atari offers us: its own routine in $B100 but we need to modify it slightly:
- read one track
- copy to the IIgs memory
- loop until the end of the disk

Here is the code:

Code:
    LDA #$18  ; $1800 is our Mount Paramount
    STA $B202
    LDA #$60  ; the RTS opcode
    STA $B205

    LDA $C0E9  ; turn drive on and wait a little bit
    LDA #$FF
    JSR $FCA8

    LDA $00  ; we'll begin on track 0
    STA $FF
    STA $C9

]LP LDA #$10  ; we'll load data at $1000
    STA $CA

    LDA $FF    ; please read
    JSR $B13D

    LDA $FF
    JSR $FDDA  ; print out current phase
    LDA #$8D
    JSR $FDED  ; carriage return (hum)

    LDY #$10  ; or 8 for those you shrink space
]LQ LDX #$00 ; let's store read data into our IIgs memory
]LR LDA $1000,X
]LS STAL $100000,X
    INX
    BNE ]LR
    INC ]LR+2
    INC ]LS+2
    BNE *+3
    INC ]LS+3
    DEY
    BNE ]LQ

    LDA #$10  ; re-init buffer
    STA ]LR+2

    INC $FF  ; next track please
    INC $FF
    LDA $FF
    CMP #$46 ; why not check the use of track $23 ;-)
    BEQ EXIT
    JMP ]LP
EXIT RTS



RE'WRITE' THE 'READ' ROUTINES
As with Moon Patrol, you are free to use your own read routine, the one from the $C600 space or whatever you like.

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.

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.

As that is a tricky stuff to do, please refer to the DSK image and read:
- T0/S0 is the boot loader of track 1 => The code is loaded at $0800
- T1/S0..S2 contains the modified read routines (T1/S8..SA for the original ones) => The code is loaded at $B000
- T2/S0..S2 contains the modified second read routines (T2/S8..SA for the original ones) => The code is loaded at $0800


Your backup copy is now available...

Toinet
Revenir en haut de page
Voir le profil de l'utilisateur Envoyer un message privé Visiter le site web de l'utilisateur
qkumba



Inscrit le: 29 Jan 2012
Messages: 176

MessagePosté le: Jeu 28 Mar 2013, 22:01    Sujet du message: Répondre en citant

I just had a look at this - the game hangs shortly after the "prepare to joust" text appears, because there's an seemingly infinite loop in the code.
I tried on II+ and IIe.
Does it actually play on your system?
Revenir en haut de page
Voir le profil de l'utilisateur Envoyer un message privé Visiter le site web de l'utilisateur
toinet
Site Admin


Inscrit le: 15 Juin 2007
Messages: 2949
Localisation: Le Chesnay, France

MessagePosté le: Ven 29 Mar 2013, 3:51    Sujet du message: Répondre en citant

qkumba a écrit:
I just had a look at this - the game hangs shortly after the "prepare to joust" text appears, because there's an seemingly infinite loop in the code.
I tried on II+ and IIe.
Does it actually play on your system?


Yes, it does.
My cracked version, available at http://www.brutaldeluxe.fr/crack/, works fine in my IIgs machines either real of emulated.

antoine
Revenir en haut de page
Voir le profil de l'utilisateur Envoyer un message privé Visiter le site web de l'utilisateur
qkumba



Inscrit le: 29 Jan 2012
Messages: 176

MessagePosté le: Ven 29 Mar 2013, 6:19    Sujet du message: Répondre en citant

that's the one that I'm using.
Interestingly, the file version that I just created from that image works perfectly. The dsk version hangs every time.
There's a hidden dependency somewhere for Apple II systems, probably a zero-page location.
Revenir en haut de page
Voir le profil de l'utilisateur Envoyer un message privé Visiter le site web de l'utilisateur
qkumba



Inscrit le: 29 Jan 2012
Messages: 176

MessagePosté le: Ven 29 Mar 2013, 6:31    Sujet du message: Répondre en citant

the byte at memory offset $4d must not be zero.
I have no idea why, but the game hangs if it is.
Revenir en haut de page
Voir le profil de l'utilisateur Envoyer un message privé Visiter le site web de l'utilisateur
toinet
Site Admin


Inscrit le: 15 Juin 2007
Messages: 2949
Localisation: Le Chesnay, France

MessagePosté le: Sam 26 Avr 2014, 18:55    Sujet du message: Répondre en citant

Disk image updated and available at http://www.brutaldeluxe.fr/crack/

LoGo
4/2014
Revenir en haut de page
Voir le profil de l'utilisateur Envoyer un message privé Visiter le site web de l'utilisateur
Montrer les messages depuis:   
Poster un nouveau sujet   Répondre au sujet     Index du Forum -> PROTECTION MALEFIQUE Toutes les heures sont au format GMT + 1 Heure
Page 1 sur 1

 
Sauter vers:  
Vous ne pouvez pas poster de nouveaux sujets dans ce forum
Vous ne pouvez pas répondre aux sujets dans ce forum
Vous ne pouvez pas éditer vos messages dans ce forum
Vous ne pouvez pas supprimer vos messages dans ce forum
Vous ne pouvez pas voter dans les sondages de ce forum


Powered by phpBB © 2001, 2005 phpBB Group
Traduction par : phpBB-fr.com