*---------------------------------------------------------------------- * File Name: main.asm * * Copyright (c) 1994 Sega of America, Inc. All Rights Reserved. * THIS FILE IS BASED ON SOJ MARS SAMPLE CODE * Author(s): Unni Pillai * Date: 6-03-94 * Description: * * History: * name date comments * ---- ---- -------------------------------------- * up 06/13/94 replaced soj SEGALOGO with SOA routine * *---------------------------------------------------------------------*/ section .text xdef MAIN ; global define xref ClearKeys xref InitCursor xref Mapp5 dc.l 0 * include "sega.i" ;contains macros used by SOJ startup code include "marequ.h" ;contains mars equates and masks include "main.i" ;contains references MAIN: bcs _error0 move #$2700,sr ; init 68k status reg (mask all INTS) *---------------------------------------------------------------------- * MD handshake with master and slave lea marsreg,a5 .w: cmp.l #'M_OK',comm0(a5) ; SH2 Master OK ? bne.b .w .w1: * cmp.l #'S_OK',comm4(a5) ; SH2 Slave OK ? * bne.b .w1 *--------------------------------- * Debug this. moveq #$5,d0 moveq #5,d0 move.b d0,comm0(a5) move.b d0,comm4(a5) jsr MSinit ;initialize the MD *---------------------------------------------------------------------------- * all these routines can be moved to m_start.asm jsr Mapp1 ;displays strings which undergo colorcycling jsr ClearKeys ;clear the Key Hit table jsr InitCursor ;initialize the cursor jsr WaitFrame ;sync with Vertical Interrupt *--------------------- *BEGIN MAIN GAME LOOP *--------------------- .main_lp: jsr WaitFrame ;limit frame rate jsr Mapp2 ;prints FP6B values * jsr Mapp3 ;prints the values from comm port jsr Mapp4 ;hilights the selected pad press jsr Mapp5 ;does cursor movement based on d-pad press bra .main_lp *---------------------------------------------------------------* * Error Routine *---------------------------------------------------------------* dc.l 0 _error0: move.w #$2700,sr .lp1: bra.b .lp1 end