the cutting room mirror

Stratego (TurboGrafx-16)

This page contains no introduction.
What makes this game notable or what is it about? Are you a bad enough dude to save this article?

Source Code Fragments#

Various comments about the code and file listings are scattered throughout the game. These can be found at the hex addresses below in an unheadered ROM.

3A45A:

Text

Translation

NLIST
include maxmacro.inc
include maxlib.inc
include stratego.inc
include c62.inc
include 7up.inc
include banks.inc
include reset.inc
LIST

ifdef   DEBUG
ALLPUB
MSG 'ST_MENU の全てのラベルをパブリックにします'

endif

defseg  rseg
seg rseg

*** LZSS圧縮されたデータをメモリに展開する
; 圧縮されたデータのヘッダー(2 words)
; +0  圧縮データサイズ(ヘッダー自身も含む)(1 word) 
; +2  展開データサイズ(1 word)
; +4  圧縮データ... 
;;

void unpack( void * packed, void * expand );
; Input:
; zp0,1 ... 圧縮データのポインタ
; X:A   ... 展開先のポインタ
; Output
NLIST
include maxmacro.inc
include maxlib.inc
include stratego.inc
include c62.inc
include 7up.inc
include banks.inc
include reset.inc
LIST

ifdef   DEBUG
ALLPUB
MSG 'all labels of ST_MENU sets public'

endif

defseg  rseg
seg rseg

*** Expand LZSS compressed data to memory
; Header of compressed data(2 words)
; +0  Compressed data size(with header)(1 word) 
; +2  Expand data size(1 word)
; +4  Compressed data... 
;;

void unpack( void * packed, void * expand );
; Input:
; zp0,1 ... Pointer of compressed data
; X:A   ... Pointer of expand destination
; Output

3B20B:

Text

Translation

Black
jsr setBG_layoutBAT     ;そのまま次の setMap を実行する
;} end of displayGame    
;{

;*** boardNumber で指定されたマップをセットする

;;void setMap( void )
; Input:
;   無し
; Output:
;   無し
; Broken:
;   A, X, Y, zp0 11

setMap::
Black
jsr setBG_layoutBAT     ; Execute the next setMap as it is.
;} end of displayGame    
;{

;*** Set map to boardNumber

;;void setMap( void )
; Input:
;   Nothing
; Output:
;   Nothing
; Broken:
;   A, X, Y, zp0 11

setMap::

3D4D7:

Text

Translation

known pieces */
;;  long    estRankMoved;       
/* estimated rank of unknown, mobile piece */
;;  long    estRankUnmoved;
/* estimated rank of unknown, unmoved piece */
;;} ArmyRec, *ArmyPtr;
;;メンバ estRankMoved, estRankUnmoved は使用されていないようなのでPC-ENGINE版では省く
off_army_playerKind equ 0   ;(1 byte) human or computer
off_army_team       equ 1   ;(1 byte) red or blue army
off_army_pieces     equ 2   ;(size_pl bytes) the pieces that make up this army
off_army_stats      equ (2 + size_pl)   ;record of the army's stats
off_army_alivePieces    equ
known pieces */
;;  long    estRankMoved;       
/* estimated rank of unknown, mobile piece */
;;  long    estRankUnmoved;
/* estimated rank of unknown, unmoved piece */
;;} ArmyRec, *ArmyPtr;
;;Members estRankMoved, estRankUnmoved are unused, so Omit it in TurboGrafx-16 version
off_army_playerKind equ 0   ;(1 byte) human or computer
off_army_team       equ 1   ;(1 byte) red or blue army
off_army_pieces     equ 2   ;(size_pl bytes) the pieces that make up this army
off_army_stats      equ (2 + size_pl)   ;record of the army's stats
off_army_alivePieces    equ