Vous êtes sur la page 1sur 2

Change subtitle's position on the fly.

To understand this doc knowledge of the ARM processor is needed, especially:


- MPEG4 Subtitle Display in ARM (RISC) Code doc created by New Age,
- Info – ARM,
- Info Code8032.

Find documents at:


http://personal.inet.fi/cool/mediatek/documents/index.html
http:// newage.mpeg4-players.info

At first find SUB_CalcStartPosY and go at the end of the function, in my fw it is:

SUBS_CalcStartPosY:

ROM:000151F2 F8 B5 PUSH {R3-R7,LR}


ROM:000151F4 A3 4F LDR R7, =SUB_Mpeg4SubtitleParamsRecord
ROM:000151F6 7E 88 LDRH R6, [R7,#2] ; Top
ROM:000151F8 B9 7A LDRB R1, [R7,#0xA] ; Settings = Alignment
...
...
loc_1524E:

ROM:0001524E 30 1C ADD R0, R6, #0 ; R0=R6 } BL to new code


ROM:00015250 F8 BC POP {R3-R7} }
ROM:00015252 08 BC POP {R3}
ROM:00015254 18 47 BX R3

End of function SUBS_CalcStartPosY

As can be seen the position of showing subtitles is handed over from the R6 register to R0. In this place we need to add the new code.
Put BL in here using the BL calculator. New code is needed to create in some epty space in resized ARM, or in C-Compiler error message parts
in ARM.
New Code:

ROM:0008B7F0 03 48 LDR R0, =unk_XXXXXXXX - read value from EEPROM


ROM:0008B7F2 00 78 LDRB R0, [R0]
ROM:0008B7F4 30 1A SUB R0, R6, R0
ROM:0008B7F6 00 D5 BPL loc_8B7FA
ROM:0008B7F8 00 20 MOV R0, #0
ROM:0008B7FA
loc_8B7FA
ROM:0008B7FA C0 46 NOP
ROM:0008B7FC F8 BC POP {R3-R7} ; code copied from ROM:00015250
ROM:0008B7FE 70 47 BX LR

End of function New Code

ROM:0008B800 XX XX XX XX DCD unk_XXXXXXXX

XX XX XX XX - put in here correct address (EEPROM + offset)

read value from EEPROM: / suggested value: 0, 0xA, 0x14, 0x1E, 0x28, 0x32, 0x3C/

Now You have to add new menu item like Vartical Position (setting subtitles higher or lower on a screen) which will change it value in eeprom
or add this function to the remote control, eg. 'Arrow up' or 'Arrow down' keys. Now you can verticaly change position of subtitles while .avi
movie is played - isn't necessary to stop the film! Changes are visible after new line of subtitle is displayed.

Don't forget to change the size of the subtitle window and subtitle area in subtitle window. / resize up=0x3C/

Seb@stian 23.01.2008

Vous aimerez peut-être aussi