*---------------------------------------------------------------------- * File Name: m_start.asm * * Copyright (c) 1994 Sega of America, Inc. All Rights Reserved. * * Author(s): Unni Pillai * Date: 6-06-94 * Description: Contains Start UP routines executed immediately * after ICD_MARS, and start up handshake with the MASTER * and slave SH2 * * History: * name date comments * ---- ---- -------------------------------------- * up 07/14/94 modified location of print strings * * Note: lbeven is a dummy label. This label is needed since the * Sierra Assembler 3.1 needs absolute addresses for * conditional statements. All files with print strings * must have this label at the begining of the section. *---------------------------------------------------------------------* nolist section .text lbeven: SPACE equ 32 xref chrattr xref selected include "vdp.h" include "m_start.i" include "mdcon.mac" xref LoadCellMap list *-------------------------------------------------------------------- * _MSinit: Does initialization for MD VDP, MD IO, * loads character set * * void _MSinit( ) * MODS * name date comments * ---- -------- ------------------------------------- * UP 06/06/94 created * UP 07/14/94 scripted out color cycling related stuff * also scripted out initstr *---------------------------------------------------------------------- xdef MSinit ; global define dc.l 0 MSinit: sf mflag jsr initMDIO ; initialize MD I/O jsr initVDP ; initialize VDP move.l #No_Poll,PollAddress move.w #$2300,sr ; enable interrupts temproarily jsr WaitFrame ; delay for one frame to let all IO settle move.w #$2700,sr ; disable all interrupts jsr initIDCMP ; initial ID checking move.l #No_Poll,PollAddress move.w #$2300,sr ; all interrupts are a go! jsr WaitFrame ; sync with vbl jsr ShowLogo ; display logo jsr BlackOut ; black out the display screen jsr ClearVRAM2 ; clear VRAM without DMA jsr ClearScrolls ; clear all scrrolls moveq #1,d0 ; load cell address moveq #96,d1 ; characters moveq #15,d2 ; foreground color moveq #8,d3 ; background color lea AsciiChars,a0 ; data pointer jsr LoadChars ; load characters move.w #100*32,d0 ;VRAM address of character 100 move.w #endpiano-pianocells,d1 ;length of sprite data lea pianocells,a0 ;point to sprite data jsr CopyToVRAM2 ;load sprite data into VRAM lea palette1,a0 ; data pointer jsr SetPalette ; set up palette buffer * lea initstr,a0 ; data pointer lea padstr,a0 ; data pointer jsr console ; write data onto screen * move.w #0,twinklecol ; set initial colour for cycling * move.w #$011,twinklech ; set cycle value * move.l #ChgCol,PollAddress ;call routine to do color cycle from vbl jsr JumpIn ; display instantaneously rts xdef padstr dc.l 0 initstr: C_SCR ScrollA C_ATTR 1+Pal0 C_POS 2,2 dc.b 'PROJECT DOOM PROTOTYPE' C_POS 2,3 dc.b 'MARS INIT OK' padstr: C_SCR ScrollA C_ATTR 1+Pal0 C_POS 26,1 C_CALL hilight0 dc.b 'MODE' C_POS 26,2 C_CALL hilight1 dc.b 'TRG-X' C_POS 26,3 C_CALL hilight2 dc.b 'TRG-Y' C_POS 26,4 C_CALL hilight3 dc.b 'TRG-Z' C_POS 20,1 C_CALL hilight4 dc.b 'START' C_POS 20,2 C_CALL hilight5 dc.b 'TRG-A' C_POS 20,3 C_CALL hilight6 dc.b 'TRG-B' C_POS 20,4 C_CALL hilight7 dc.b 'TRG-C' C_POS 14,1 C_CALL hilight8 dc.b 'RIGHT' C_POS 14,2 C_CALL hilight9 dc.b 'LEFT' C_POS 14,3 C_CALL hilight10 dc.b 'DOWN' C_POS 14,4 C_CALL hilight11 dc.b 'UP' C_STOP hilight0 moveq #0,d0 jmp hijoin hilight1 moveq #1,d0 jmp hijoin hilight2 moveq #2,d0 jmp hijoin hilight3 moveq #3,d0 jmp hijoin hilight4 moveq #4,d0 jmp hijoin hilight5 moveq #5,d0 jmp hijoin hilight6 moveq #6,d0 jmp hijoin hilight7 moveq #7,d0 jmp hijoin hilight8 moveq #8,d0 jmp hijoin hilight9 moveq #9,d0 jmp hijoin hilight10 moveq #10,d0 jmp hijoin hilight11 moveq #11,d0 hijoin move.w #Pal1+1-SPACE,chrattr ;set console attribute cmp.w selected,d0 ;see if this entry is to be hilighted beq h_done ;yes so done move.w #Pal0+1-SPACE,chrattr ;else set hilight console attribute h_done rts nolist include "data.s" ;contains ASCII & Palette data