From RoadsideThoughts ...
A Bit of Vectrex History
 
Introduction
Programmer's
Guide
 
The RUM
 
Mine Storm
Fortress of
Narzod
 
Dark Tower
   
Sitemap
     
 

Vectrex 6809 Source Code

Dark Tower




Index of Dark Tower Files

The top most file for Dark Tower:

DRKTWR.ASM

The associated files:

BRGAND.DRK FRGMNTE.DRK MAP.DRK TOWER.DRK
COLIDE.DRK GOBLIN.DRK PACKS.DRK WARIOR.DRK
FIGHT.DRK GRDSCN.DRK SCENRY.DRK WIZARD.DRK
FLAMER.DRK INVENT.DRK SOUND.DRK  
FOREST.DRK MAGIC.DRK SUBR.DRK  

FLAMER.DRK - Rev. A


;
;
         IF      L.FLM = OFF      ;-------------------------------------------
         LIST    -L               ;--  FLAMER  -------------------------------
         ENDIF                    ;-------------------------------------------
;
;
;
;
;  HANDLE FLAMOID GAME LOGIC
;  =========================
;
         SETDP   $C8
;        =====   ===
;
FLAMER   PSHS    DP               ;  SAVE ENTRY VALUES
         LDA     #$C8             ;  .    SETP 'DP' = RAM
         TFR     A,DP             ;  .    .
;
         LDX     #PFLAME          ;  ROTATE FLAMOID EACH FRAME
         LDU     #RFLAME          ;  .    SET DESTINATION POINTER
         LDA     FRAME            ;  .    FETCH FRAME FOR ROTATION VALUE
         LSLA                     ;  .    .    SPEED-UP ROTATION RATE
         LSLA                     ;  .    .    .
         LDB     X+               ;  .    FETCH NUMBER OF VECTORS
         STB     U+               ;  .    .
         JSR     DROT             ;  .    ROTATE FLAMOID
;
         LDD     #$0080           ;  SET SINE / COSINE FOR 'PRJCTN'
         STD     WSINE            ;  .
         LDD     #$FF81           ;  .
         STD     WCSINE           ;  .
;
         LDU     #FLMTBL          ;  HANDLE FLAMOID MOVEMENT
         LDA     #FLMCNT          ;  .
         STA     TEMP1            ;  .
;
FLMR1    LDA     FLMFLG,U         ;  .    IS ENTRY ACTIVE ?
         BEQ     FLMR3            ;  .    .
;
         JSR     MOVOBJ           ;  .    MOVE FLAMOID ALONG 'Y / X' AXIS
         BVS     FLMR2            ;  .    .    HAS FLAMOID MOVED OFF-SCREEN ?
         BCS     FLMR2            ;  .    .    .
;
         LDA     FLMYW,U          ;  .    PROJECT FLAMOID INTO 3-D
         LDB     FLMXW,U          ;  .    .
         STA     RZPOS            ;  .    .
         STB     RXPOS            ;  .    .
         LDA     FLMZW,U          ;  .    .
         STA     RYPOS            ;  .    .
         JSR     PRJCTN           ;  .    .    CALCULATE SCREEN CO-ORDINATES
         BVS     FLMR3            ;  .    .    .    SKIP IF OUT-OF-RANGE
;
;
         DEC     FLMTMR,U         ;  DISPLAY FLAMOID FLAMES
         BEQ     FLMR2            ;  .    RESET FLAMOID ?
;
         PSHS    DP               ;  .    SET 'DP' = I/O
         LDA     #$D0             ;  .    .
         TFR     A,DP             ;  .    .
         SETDP   $D0              ;  .    .
;
         LDX     #RFLAME          ;  .    DRAW FLAMOID
         LDD     #$7F7F           ;  .    .    SET INTENSITY
         SUBB    DRWSCZ           ;  .    .    SET SIZE
         LDY     #DRWSCY          ;  .    .    SET ABSOLUTE POSITION
         JSR     SDIFFY           ;  .    .
;
         PULS    DP               ;  .    SET 'DP' = RAM
         BRA     FLMR3            ;  .    .
;
;
         SETDP   $C8
;
FLMR2    CLR     FLMFLG,U         ;  RESET CURRENT FLAMOID ENTRY
;
FLMR3    LEAU    FLMLEN,U         ;  BUMP TO NEXT ENTRY
         DEC     TEMP1            ;  .
         BNE     FLMR1            ;  .
;
         PULS    DP,PC            ;  RETURN TO CALLER
;
         IF      L.FLM = OFF      ;-------------------------------------------
         LIST    *                ;-------------------------------------------
         ENDIF                    ;-------------------------------------------



 
 
 
 
 
 

Home
Page
Sitemap Privacy
Statement
Terms
of Use
Feedback

 
 

Please keep in mind that we can not guarantee the accuracy or timeliness of the information on this website, so use with care. We encourage you to double-check the information that is critical to you.

If you've found an error or have additional information that you would like to share, please don't hesitate to write. Click here to contact us.

Copyright 2016
All Rights Reserved
This page was last modified: 12 Jan 2017
By John Hall