?? main.asm
字號:
/*****************************************************************************
** **
** Project Name: Video_Output **
** **
******************************************************************************
(C) Copyright 2003 - Analog Devices, Inc. All rights reserved.
File Name: Main.asm
Date Modified: 4/4/03 CL Rev 1.0
Software: VisualDSP++3.1
Hardware: ADSP-BF533 EZ-KIT Board
Special Connections: None
Purpose: This is an example ADSP-BF533 video output project that
initializes SDRAM memory, sets up the DMA configuration
registers to DMA data from SDRAM to the PPI, and configures
the PPI port for 656 output transmit mode.
This Main.asm file contains all the subroutine calls and
interrupt service handlers.
******************************************************************************/
#include "defBF533.h"
#include "startup.h"
.section L1_data_a;
.byte ADV7171_data[48] = "zero.dat";
// bit mapping of line type for PAL, 1 Vblank line 0 active line
// 0, 32, 64, 96
// 128, 160, 192, 224
// 256, 288, 320, 352
// 384, 416, 448, 480
// 512, 544, 576, 608
.byte4 PalLineMap[20] = 0x007FFFFF, 0x00000000, 0x00000000, 0x00000000, \
0x00000000, 0x00000000, 0x00000000, 0x00000000, \
0x00000000, 0xFF800000, 0x0000FFFF, 0x00000000, \
0x00000000, 0x00000000, 0x00000000, 0x00000000, \
0x00000000, 0x00000000, 0x00000000, 0xFFFF0000;
.global PalLineMap;
// bit mapping of line type for NTSC, 1 Vblank line 0 active line
// 0, 32, 64, 96
// 128, 160, 192, 224
// 256, 288, 320, 352
// 384, 416, 448, 480
// 512
.byte4 NtscLineMap[17] =
0x0007FFFF, 0x00000000, 0x00000000, 0x00000000, \
0x00000000, 0x00000000, 0x00000000, 0x00000000, \
0x03FFFF00, 0x00000000, 0x00000000, 0x00000000, \
0x00000000, 0x00000000, 0x00000000, 0x00000000, \
0x00010000;
.global NtscLineMap;
// SAV, EAV for active video in field 1
// SAV, EAV for vertical blank in field 1
// SAV, EAV for active video in field 2
// SAV, EAV for vertical blank in field 2
.byte4 SystemCodeMap[12] =
0xFF000080, 0xFF00009D, 1, \
0xFF0000AB, 0xFF0000B6, 0, \
0xFF0000C7, 0xFF0000DA, 1, \
0xFF0000EC, 0xFF0000F1, 0;
.global SystemCodeMap;
// black
// blue
// red
// magenta
// green
// cyan
// yellow
// white
.byte4 ColorBarTable[8] =
0x80108010, \
0xF0296E29, \
0x5A51F051, \
0xCA6ADE6A, \
0x36912291, \
0xA6AA10AA, \
0x10D292D2, \
0x80EB80EB;
.global ColorBarTable;
/*****************************************************************
Program Define Section
****************************************************************/
/****************************************************************
Main Program
****************************************************************/
.global _main;
.extern _NtscVideoOutFrameBuffInit;
.extern setup_sdram;
.extern setup_gptimer;
.extern config_dma;
.extern config_ppi;
.extern Flash_Setup_ADV_Reset;
.section L1_code;
_main:
// reset from ADV7171 device (flashA portA bit 2)
CALL Flash_Setup_ADV_Reset;
P0.L = lo(IMASK);
P0.H = hi(IMASK);
R0 = [P0];
BITSET(R0,8);
[P0] = R0; //Unmask DMA interrupt in Core Interrupt Controller.
P0.L = lo(SIC_IMASK);
P0.H = hi(SIC_IMASK);
R0 = [P0];
BITSET(R0,8);
[P0] = R0; //Unmask DMA interrupt in System Interrupt Controller.
//Setup PPI DMA interrupt vector location
P0.L = lo(EVT8);
P0.H = hi(EVT8);
R0.L = DMA_ISR;
R0.H = DMA_ISR;
[P0] = R0;
CALL setup_sdram;
CALL _NtscVideoOutFrameBuffInit;
CALL config_dma;
CALL config_ppi;
//Enable DMA
P0.L = lo(DMA0_CONFIG);
P0.H = hi(DMA0_CONFIG);
R0.L = W[P0];
bitset(R0,0);
W[P0] = R0.L;
ssync;
//Enable PPI
P0.L = lo(PPI_CONTROL);
P0.H = hi(PPI_CONTROL);
R0.L = W[P0];
bitset(R0,0);
W[P0] = R0.L;
IDLE;
do_nothing: jump do_nothing;
DMA_ISR:
//Clear DMA Interrupt.
P0.L = lo(DMA0_IRQ_STATUS);
P0.H = hi(DMA0_IRQ_STATUS);
R0.L = W[P0];
BITSET(R0,0);
W[P0] = R0.L;
RTI;
_main.END:
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -