?? init.c
字號:
/* SCCSID @(#)init.c 1.20 7/9/98 */ /************************************************************************** * * Copyright 1996, ESS Technology, Inc. * *************************************************************************/#include <stdio.h>#include "../common.h"#include "util.h"#include "display.h"#include "dispinfo.h"#include "graapi.h"#include "palette.h"#include "buffer.h"#include "low.h"#include "../sysinfo.h"#ifdef OSD #include "osd.h" #endif#include "../vcxi.h"#include "../dsc.h"#ifdef DSC#define IS_POWER_DOWN (DSC_status == DSC_STATUS_STANDBY)#endif#define EPRINTF(a) /************************************************************************ * Function prototype ************************************************************************/void evd_trap0(void);/************************************************************************ * Global variables ************************************************************************/#if 0int vcx_standard = VCX_MPEG; /* Required by VC */int vcx_code_type = VCX_DECODE; /* Required by VC */#endifvoid (*fptr)() = evd_trap0; /* Point to the interrupt handler routine*/extern int mvd_version; /* Current chip version */extern int vcd30_cwdloc;/**/int init(){ int i, j=0, *a, *b; int xfer_mode, xport_type; int *ptr, *ptr2; int key; extern unsigned long _heapbase; extern int *RISC_cache_realtime, *RISC_ptr_realtime, vcx_timer_val;#ifdef COMPRESS { extern volatile unsigned long Decompress_code_start ; Decompress_code_start = Decompress_code_start>>2; decompress_ROMdata(vcx_drvdatastart, 0x1a000); vcx_drvdatastart = 0x1a000; }#endif /* All low level initialization. */ mvd[riface_irqmask] = 0xc000; /* disable irqs */ EVD_VP_init();#ifdef MIDI EVD_DISP_change_resolution(352, vcx_scn_height, RGB_NTSC);#else EVD_DISP_change_resolution(352, vcx_scn_height, RGB_PAL);#endif /* Close screen output */ mvd[vid_scn_vstart] = vcx_scn_vstart + vcx_scn_height ; mvd[vid_scn_vend] = vcx_scn_vstart + vcx_scn_height + 1;#ifdef MIDI PCM_init();#else EVD_PCM_clear_zero_buffer();#endif#if 0 CUST_init();#endif#ifdef OSD EVD_OSD_init();#endif /* Install interrupt handler */#ifdef MKROM b = (int*)((int)fptr<<2);#else b = (int*)((int)fptr);#endif b = (int*)((int)fptr<<2); /* * The DWORD at 0x18 is used for resume!! * The DWORD at 0x1c is used for real-time clock!! * * Don't read 0x10 to 0x1f, they meant to be noncachable. */ for (a = (int*)0, i = 0; i < 4; i++) *a++ = *b++;#ifdef IR enable_int(debug);#endif /* Start watch dog timer */ mvd[riface_clear_timer2] = 0; mvd[riface_timer2] = vcx_timer_val; #if 0 /* Mask off junk */ *RISC_cache_realtime = (*RISC_ptr_realtime &= x00ffffff); /* Enable interrupts: timer and suppress irq during opcode load */ RISC_start_timer2();#endif enable_int(tim2);#ifdef SERVO2545 RISC_start_timer1();#endif#if 0 /* * For safety! In case someone changed DSC_SELECT when setting * AUX pins, we want to set it bad (don't use DSC_getstatus since * status may have changed by DSC_init) */ DSC_SELECT; /* If we are in power down mode, stay here! */ if (IS_POWER_DOWN) { while (key != POWER_KEY) { if (key > 0x100) key &= 0xff;#ifdef NO_MICRO microEngine();#endif key = get_keycode(); }#ifdef ENREACH vcd30_cwdloc = 0;#endif#ifdef NO_MICRO Waiting_powerkey_up();#endif process_power_off_key(); }#endif WrPaletteToDM(); /* Paint screen black */ GPClearScrn(0); ShowPage(); Change_TV_Param(); /* Enable interrupts */ enable_int(vout); enable_int(buscon); enable_int(xport);#ifdef MIDI PCM_stop_take_out(); LOW_turn_off_audio(); LOW_turn_on_audio(); buscon_irq_disable(d2a);#endif#ifdef CD_LOAD#ifndef ENREACH initCD(); xfer_mode = XFER_init(-1); xport_type = XPORT_init(-1, xfer_mode);#endif#endif EVD_main(); return(0);}#if 0/* * Detect current TV mode setting and set vcx_scn_height */void Detect_TV_mode(){ PREPARE_DETECTION; if (DETECT_NTSC) vcx_scn_height = 240; else vcx_scn_height = 288;}#endif
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -