📄 make.sh
字号:
#
# In the old time, when we turn we MIC, we use software to do
# reference voltage calibration. We believe we don't have to do
# it anymore. However, the code is still there. In order to
# enable old style calibration, just add -DDSC_SW_DETECT_CENTER
# to your ES3207 version.
#
ES3207 = -DYUV8 -DDSC -DFILTER_CHROMA # ES3207
ES3207WC = -DYUV8 -DDSC # ES3207 (rev C+later)
ES3207VA = -DYUV8 -DDSC # ES3207 (rev VA+later)
ES3207VB = -DYUV8 -DDSC # ES3207 (rev VB)
# ES881 used to call ES3217. Always use analog bypass for echo.
ES3881 = -DYUV8 -DDSC -DECHO_ANALOG_BYPASS
ES3217 = -DYUV8 -DDSC -DECHO_ANALOG_BYPASS
#
# Audio DAC options
#
DAC_SONY = -DDACLAST -DINVATFS # Normal (Sony format)
DAC_I2S = -DDACLEFT # I2S (Philips format)
#
# Note: Some DAC makes poping noise when reset. PCM1710 and TC9434AFN
# are known offenders. For those DAC, if compiling for non-echo
# targets, -DZERO_BUFFER has to be defined.
#
PCM1710 = $(DAC_SONY)
PCM1717 = $(DAC_SONY)
PCM1718 = $(DAC_I2S)
PCM1725 = $(DAC_I2S)
ES3207A = -DES3207A -DINVATFS # Audio from 3207
TC9434AFN = $(DAC_SONY) # Toshiba DAC
#
# 3210 revisions
#
ES3210A = $(BF_FLAGS)
ES3210B = $(BF_FLAGS)
ES3210C = $(BF_FLAGS)
ES3210D = $(BF_FLAGS) -DCLKDIV -DTDMEDC
ES3210E = $(BF_FLAGS) -DCLKDIV -DTDMEDC
ES3210S = $(BF_FLAGS) -DCLKDIV -DTDMEDC
ES3210TA = $(BF_FLAGS) -DCLKDIV -DTDMEDC
#
# 3208 revisions. At present, no production VCD use 3208, so we can
# smoothly make a transition to go without $(BF_FLAGS)
#
ES3208A = $(BF_FLAGS)
#
# VFD flags
#
VFDCTL16312 = -DD16312
VFDCTL12510 = -DMN12510 -DVFD_RCV_MSB_FIRST -DVFD_XMIT_MSB_FIRST
VFDCTL2872 = -DBU2872 -DVFD_STB_ACTIVE_HIGH -DVFD_XMIT_MSB_FIRST
#
# Various debugging aids
#
DEBUG = -DKEYDEBUG
#-DDEBUG
#-DDIE_ON_FATAL
#-DMEASURE_TIMING
#-DDUMP_PCM_WHEN_FULL
#-DDUMP_ABV
#
# Power down clock frequency. 3207 can eventually provide very low
# frequency (the target is to run at 3.375 MHz (54/16)).
# At present, it can only run at 27MHz.
#
IDLE = -D_IDLECLK_=270 # 27MHz idle
#
# Starting location for data
#
DATA_START = 30
#
# Starting location for 2.0 stack. Stack is adjusted automatically when
# -DFOUR_LINE_OSD is defined.
#
# With 4-line OSD, we have 244 extra DWORD for stack. DVDVCD targets
# don't do this adjustment since their stack is 0xfffc.
#
STACKBASE = 0x20fc
ADJUST_STACK = 0x3d0
VCD20STACK = -DVCD20STACK=$(STACKBASE)
#
# Poor man's logic analyser
#
#TRACE= -DTRACE_ON -DLOG_ERR -DLOG_BUF
#TRACE= -DTRACE_ON -DLOG_ERR -DLOG_INT -DLOG_PIC -DLOG_TASK -DLOG_BEAM
#-DLOG_CMDQ is for low cmdq debugging in mpeg2vid
#-DLOG_BUF
#-DLOG_TASK
#-DSCALING_TIMING
#-DLOG_KARA for debugging karaoke pointer update
#
# setting for aux pin
#
# -DPROBE_VP
#
# Target specific flags for various different target
#
MPEG1FLAGS = -DMPEG1 -DMUSICAM -DONE_B_FRAME_ONLY # MPEG1 common
MPEG1TRICK1 = -DERROR_CONCEALMENT -DKARAOKE -DVSCALE \
-DWATCHDOG # Tiny (debug)
MPEG1TRICK2 = -DDIGEST -DNEW_DIGEST_OSD # Must have too
MPEG1TRICK3 = -DSPATIAL -DZOOM # Good to have
MPEG1TRICKS = $(MPEG1TRICK1) $(MPEG1TRICK2) $(MPEG1TRICK3) # Most tricks
CUST4_20 = $(MPEG1FLAGS) $(MPEG1TRICK1) -DSCENE \
-DJUMP_N_PAUSE -DPLAY20 -DXPORT20
PLAYER11 = $(MPEG1FLAGS) -DPLAYONLY -DXPORT11 -DIR \
$(MPEG1TRICKS) -DIRXMT -DIGNORE_POWERDOWN # 1.1 players
PLAYER20 = $(MPEG1FLAGS) -DPLAY20 -DXPORT20 \
$(MPEG1TRICKS) # 2.0 players
SPLAYER20 = $(MPEG1FLAGS) -DPLAY20 -DXPORT20 \
$(MPEG1TRICK1) # Small 2.0
PLAYER11ROM = $(PLAYER11) -DMKROM -DEMULATOR # 1.1 ROM
PLAYER11DBG = $(PLAYER11) $(DEBUG) -DUCODE_IN_DRAM # 1.1 on MVD
PLAYER20ROM = $(PLAYER20) -DMKROM -DEMULATOR # 2.0 256 ROM
SPLAYER20ROM = $(SPLAYER20) -DMKROM -DEMULATOR -DNOLOGO # 2.0 128 ROM
PLAYER20DBG = $(PLAYER20) $(DEBUG) -DUCODE_IN_DRAM # 2.0 on MVD
NEW20ROM = $(PLAYER20ROM) -DIR -DNO_MICRO # 2.0 (no 8051)
SNEW20ROM = $(SPLAYER20ROM) -DIR -DNO_MICRO # Small no 8051
CUST3210 = -DCUST3 -DNOHOSTPORT -DCODE_CUTTING
CUST4ROM = $(CUST4_20) $(MPEG1TRICK2) -DCUST4 -DMKROM \
-DZERO_BUFFER -DEMULATOR -DNOLOGO \
-DUSE_LOOK_DIV9 # 128K (cust4)
ACC20ROM = $(SPLAYER20) $(MPEG1TRICK2) -DMKROM -DNOLOGO \
-DIR -DNO_MICRO # Access board
DVDVCDFLAGS = -DDVD_VCD -DIGNORE_POWERDOWN -DSLAVE \
-DVCD_SLAVE -DZERO_BUFFER # DVDVCD
#
# Minimum for SERVO development (same as SPLAY20ROM without KARAOKE
#
SERVOROM = $(MPEG1FLAGS) -DPLAY20 -DXPORT20 \
-DDIGEST -DNEW_DIGEST_OSD -DERROR_CONCEALMENT \
-DVSCALE -DWATCHDOG \
-DMKROM -DEMULATOR -DNOLOGO \
-DSERVO
SERVOCD = -DSERVO -DIRQSHARE
#
# Code shared by all MVD applications. They are either time sensitive
# (and shall be in cachable region) or initialization code (which doesn't
# pollute cache anyway).
#
MVDSRC = buffer.c debug.c fsosd.c huffman.c display.c \
xfer.c xport.c sched.c spoolint.c \
int.c low.c osdcore.c util.c vcxi.c top.c \
init_t.c vp.c fractint.c fade.c zoom.c \
cd.c dsc.c i2ccntl.c dispcust.c spdif.c \
$(SERVO_CORE) blackbox.o
MVDSRC2 = $(MVDSRC) talk.c
DVD_JUMP_C = dvd_jump.c
I2CPROM_C = i2cprom.c
#
# MPEG-1 specific time-critical code (has to be in cachable region)
#
MPEG1SRC = mpeg1vid.c vscale.c tdm.c echo.c mzoom.c
#
# MPEG1 and customer specific, time-critical code
#
CUST6FASTSRC = $(MVDSRC) cust6/dsp_ctl.o cust6/svo_ctl.o \
cust6/cdmain.o cust6/ram_def.o cust6/sub_fun.o
#
# MPEG-1 specific non-time-sensitive code (i.e. shall be put in
# non-cachable region in order not to pollute the cache)
#
PLAYER11SRC = ir.c podigest.c podsa.c poshare.c # 1.1 specific
PLAYER20SRC = av_play.c digest.c drammem.c vcd.c # 2.0 specific
DVDPLAYER20SRC = dvd_av.c digest.c drammem.c vcd.c # dvd specific
MPEG1VSLOWSRC = digest.c simple.c # Development
PO2SLOWSRC = $(PLAYER11SRC) po2tact.c # P2O
PO4SLOWSRC = $(PLAYER11SRC) po4tact.c # 1.1 turnkey
MPEG20SLOWSRC = $(PLAYER20SRC) dsa.c micro.c panel.c play.c # 2.0 turnkey
CUST3SLOWSRC = $(PLAYER20SRC) dsa2.c micro.c panel2.c play2.c# Customer 3
CUST215SLOWSRC = $(PLAYER20SRC) dsa3.c micro.c panel2.c play3.c# Customer 215
CUST30SLOWSRC = $(PLAYER20SRC) dsa3.c micro.c panel2.c play3.c\
cdfs.c # Customer 3.0
NEW20SLOWSRC1 = $(PLAYER20SRC) dsas.c ir.c microvfd.c \
panelvfd.c plays.c realclk.c # 2.0 (no 8051)
NEW20SLOWSRC = $(PLAYER20SRC) dsa.c ir.c microvfd.c \
panelvfd.c play.c realclk.c # 2.0 (no 8051)
NEW30SLOWSRC = $(PLAYER20SRC) dsa.c ir.c microvfd.c \
panelvfd.c play.c realclk.c cdfs.c # 2.0 (no 8051)
NEW30SLOWSRC1 = $(PLAYER20SRC) dsas.c ir.c microvfd.c \
panelvfd.c plays.c realclk.c cdfs.c # 3.0 (no 8051)
NEW30SLOWSRC2 = $(PLAYER20SRC) dsat.c ir.c microvfd.c \
panelvfd.c playt.c realclk.c cdfs.c # 3.0 (no 8051)
TVM20SLOWSRC = $(PLAYER20SRC) dsa8.c ir.c microvfd.c \
panelvfd.c play.c realclk.c # 2.0 (no 8051)
P315SLOWSRC = $(PLAYER20SRC) dsa.c ir.c custvfd.c \
custpanl.c play5.c realclk.c # 2.0 (no 8051)
CUST4SLOWSRC = $(PLAYER20SRC) dsa4.c micro.c panel4.c play4.c# Customer 4
CUST6SLOWSRC = $(PLAYER20SRC) dsa6.c ir.c micrvfd6.c \
panlvfd6.c play6.c realclk.c # Customer 6
CUST7_30SLOWSRC = $(PLAYER20SRC) dsa7.c ir.c micrvfd7.c \
panlvfd7.c play7.c realclk.c cdfs.c \
cdmain.o auto.o # Customer 7
CUST7_SLOWSRC = $(PLAYER20SRC) dsa7.c ir.c micrvfd7.c \
panlvfd7.c play7.c realclk.c cdmain.o auto.o # Customer 7
CUST7P_SLOWSRC = $(PLAYER20SRC) dsa7.c ir.c micrvfd7.c \
panlvfd7.c play7.c realclk.c # Customer 7
# # philips
DVDVCDSLOWSRC = $(DVDPLAYER20SRC) dvddsa.c ir.c vfd_key.c \
panelvfd.c play.c realclk.c # DVD VCD
CUST_DVDVCDSLOWSRC = $(DVDPLAYER20SRC) dvddsa.c ir.c micrvfd8.c \
panlvfd8.c play8.c realclk.c # CUST DVD VCD
#
# MPEG1 audio and MPEG2 video
#
MUSICAMSRC = mpgaudio.c # MPEG1 audio
MPEG2VSRC = mpeg2vid.c # MPEG2 video
#
# Game
#
GAME_STUFF = game.dat gameboot
#
# Make automatically-generated files
#
DATAFILE = const.dat
const.dat const.h init_t.c : mktable
mktable
mktable: mktable.c wj.h hufftab.h xpucode.h audio.h $(VPUCODEH) \
smfont.c smfont1.c bcdhex.c e1logo.c e1logos.c \
font.h dgs_fnt.c vfd_tbl.c vfd_tbl6.c e2logo.c custfilt.c \
vfd_tbl1.c osdmsg.c c4logo.c misctbl.c common.h tdm.h \
cdconst.h cdtbl.c vfd_tbl7.c osdmsg7.c smfont7.c volume.c \
compfont.o font30.c ucode30.h servocmd.c keydef.h vfdshare.h
$(GCC) $(DFLAGS) $(JGAME) $(ENCODERFLAGS) $(SYSOPTIONS) \
$(CLK) $(IDLE) -DFAKE mktable.c compfont.o -o mktable
$(COFF2EXE) mktable
#
# Generate ROM profile
#
profile: genprof
genprof $(ROMBANK) $(ROMSIZE) > profile
genprof: genprof.c version.h
$(GCC) $(PROFFLAGS) -o genprof genprof.c
$(COFF2EXE) genprof
#
# Generate startup code
# vstartup.s for vcd running on DVD board.
#
startup1.s: startup.s vstartup.s dvdstart.s
$(SED) 's/_MEMWIDTH_/$(MEMWIDTH)/g' $(STARTUP_S) > temp1.sss
$(SED) 's/_MEMDELAYL_/$(MEMDELAYL)/g' temp1.sss > temp2.sss
$(SED) 's/_MEMDELAYH_/$(MEMDELAYH)/g' temp2.sss > temp1.sss
$(SED) 's/_WIDTH10_/$(WIDTH10)/g' temp1.sss > temp2.sss
$(SED) 's/_DRAM_CONTROL_/$(DRAM_CONTROL)/g' temp2.sss > startup1.s
$(RM) temp1.sss temp2.sss
dentry1.s: dentry.s
$(SED) 's/_STACKBASE_/$(STACKBASE)/g' dentry.s > temp1.sss
$(SED) 's/_ADJUST_STACK_/$(ADJUST_STACK)/g' temp1.sss > temp2.sss
$(CPP) -P $(BF_FLAGS) temp2.sss > dentry1.s
$(RM) temp1.sss temp2.sss
pentry1.s: pentry.s
$(SED) 's/_STACKBASE_/$(STACKBASE)/g' pentry.s > temp1.sss
$(SED) 's/_ADJUST_STACK_/$(ADJUST_STACK)/g' temp1.sss > temp2.sss
$(SED) 's/_HEAPL_/$(HEAPL)/g' temp2.sss > temp1.sss
$(SED) 's/_HEAPH_/$(HEAPH)/g' temp1.sss > temp2.sss
$(CPP) -P $(BF_FLAGS) temp2.sss > pentry1.s
$(RM) temp1.sss temp2.sss
sentry1.s: sentry.s
$(SED) 's/_STACKBASE_/$(STACKBASE)/g' sentry.s > sentry1.s
romentry1.s: romentry.s
$(SED) 's/_STACKBASE_/$(STACKBASE)/g' romentry.s > romentry1.s
boot: startup1.s
$(AX) -R startup1.s
$(LD) -Ttext $(BOOT_START) -e powerup -X -o boot startup1.o
#
# Make the VCD targets
#
$(VCDTARGETS): demux.sun rdsa.sun boot profile
$(RM) $(GAME_STUFF)
$(MAKEGAME)
$(CDDRIVER)
$(MAKEDRIVER)
$(CDROOT)
$(CDEXT)
$(MAKEEXT)
$(CDROOT)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -