Source
...
Target
Commits (4)
  • Jeffrey Lee's avatar
    Fix null pointer access · a8f3d0b8
    Jeffrey Lee authored
    Detail:
      s/Fonts01 - hdr*_PixoPtr is optional, but SWIFont_CharBBox was loading from it without checking, causing random data to be read from zero page in some situations.
    Admin:
      Tested on rev C2 BB.
    
    
    Version 3.67. Tagged as 'Manager-3_67'
    a8f3d0b8
  • Jeffrey Lee's avatar
    Fix issues rendering Cyberbit font · 21614008
    Jeffrey Lee authored
    Detail:
      s/Fonts01 - Increase scratchsize from 8K to 12K. 8K was slightly too small for Cyberbit char 0x98f8.
      s/Fonts04 - Fix CachePixels to correctly return any errors generated by CacheChunk
    Admin:
      Tested on rev A2 BB-xM.
      Cyberbit char 0x98f8 now renders properly instead of returning a duff error pointer.
    
    
    Version 3.68. Tagged as 'Manager-3_68'
    21614008
  • Jeffrey Lee's avatar
    Fix objasm 4 warnings. Allow math code to make use of CLZ. Fix potential crash. · 34ca22f5
    Jeffrey Lee authored
    Detail:
      s/Font_BasFP - Uses Hdr:CPU.Arch to decide whether to use CLZ in IFLT routine. Also fixed nasty crash on 32bit systems where FNRMB tail-calls IFLTA; 32bit versions of IFLT stack the LR, but FNRMB wasn't stacking it before jumping into the middle of the code.
      s/Fonts01 - Split up an LDM to avoid deprecated LDM {LR,PC} warning
    Admin:
      Tested on rev A2 BB-xM
    
    
    Version 3.69. Tagged as 'Manager-3_69'
    34ca22f5
  • Jeffrey Lee's avatar
    Use correct CLZ check · 7040b866
    Jeffrey Lee authored
    Detail:
      s/Font_BasFP - Only look for ARMv5 support when deciding if CLZ is available, not ARMv5T
    Admin:
      Tested in OMAP3 ROM
    
    
    Version 3.70. Tagged as 'Manager-3_70'
    7040b866
......@@ -11,13 +11,13 @@
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "3.66"
Module_Version SETA 366
Module_MajorVersion SETS "3.70"
Module_Version SETA 370
Module_MinorVersion SETS ""
Module_Date SETS "02 Jan 2010"
Module_ApplicationDate SETS "02-Jan-10"
Module_Date SETS "06 Dec 2011"
Module_ApplicationDate SETS "06-Dec-11"
Module_ComponentName SETS "Manager"
Module_ComponentPath SETS "castle/RiscOS/Sources/Video/Render/Fonts/Manager"
Module_FullVersion SETS "3.66"
Module_HelpVersion SETS "3.66 (02 Jan 2010)"
Module_FullVersion SETS "3.70"
Module_HelpVersion SETS "3.70 (06 Dec 2011)"
END
/* (3.66)
/* (3.70)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 3.66
#define Module_MajorVersion_CMHG 3.70
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 02 Jan 2010
#define Module_Date_CMHG 06 Dec 2011
#define Module_MajorVersion "3.66"
#define Module_Version 366
#define Module_MajorVersion "3.70"
#define Module_Version 370
#define Module_MinorVersion ""
#define Module_Date "02 Jan 2010"
#define Module_Date "06 Dec 2011"
#define Module_ApplicationDate "02-Jan-10"
#define Module_ApplicationDate "06-Dec-11"
#define Module_ComponentName "Manager"
#define Module_ComponentPath "castle/RiscOS/Sources/Video/Render/Fonts/Manager"
#define Module_FullVersion "3.66"
#define Module_HelpVersion "3.66 (02 Jan 2010)"
#define Module_LibraryVersionInfo "3:66"
#define Module_FullVersion "3.70"
#define Module_HelpVersion "3.70 (06 Dec 2011)"
#define Module_LibraryVersionInfo "3:70"
......@@ -17,6 +17,10 @@
;..................................................................................
; float integer in FACC
; Note: Exits EQ if FACC==0, else flags preserved
GBLL UseCLZ
UseCLZ SETL :LNOT: NoARMv5
IFLT
Debug fp,"IFLT in : FACC =",FACC
......@@ -29,8 +33,14 @@ IFLT
BEQ IFLTZ ;exit if number 0
AND FSIGN,FSIGN,#&80000000
RSBMI FACC,FACC,#0 ;complement number if rqd
[ UseCLZ
CLZ FACCX,FACC
MOV FACC,FACC,LSL FACCX
RSB FACCX,FACCX,#&A0
|
MOV FACCX,#&A0 ;initial exponent
IFLTA CMP FACC,#&10000
IFLTA
CMP FACC,#&10000
MOVCC FACC,FACC,LSL #16
SUBCC FACCX,FACCX,#16
CMP FACC,#&1000000
......@@ -45,6 +55,7 @@ IFLTA CMP FACC,#&10000
CMP FACC,#&80000000
MOVCC FACC,FACC,LSL #1
SUBCC FACCX,FACCX,#1
]
Debug fp,"IFLT out: FACC,FACCX,FSIGN =",FACC,FACCX,FSIGN
[ No32bitCode
MOVS PC,LR
......@@ -361,11 +372,27 @@ FSWTOA MOV FSIGN,FWSIGN
FNRMB MOVS FACC,FGRD ; if facc zero then facc:=fgrd
BEQ FCLR
SUBS FACCX,FACCX,#32 ; exponent dec by word
[ UseCLZ
BMI FCLR
CLZ FGRD,FACC
MOV FACC,FACC,LSL FGRD
SUB FACCX,FACCX,FGRD
MOV PC,LR
|
[ :LNOT:No32bitCode
BMI FCLR
Push LR
SavePSR LR
B IFLTA
|
BPL IFLTA
]
]
;..................................................................................
; clear facc
; Note: Can fall through from above
FCLR MOV FACCX,#0
MOV FACC,#0
......
......@@ -1699,7 +1699,7 @@ oldpaintmatrix # 4 ; used to minimise calls to GetTransform
paintendaddress # 4 ; used for paintchars (set to &FFFFFFFF if no end)
scratchblock # 4 ; pointer to block used for Draw module stuff
scratchsize * 4096 *2 ; size of block
scratchsize * 4096 *3 ; size of block
relocSP # 4
......@@ -3891,7 +3891,8 @@ TryPrinterDriver Entry "R8"
MOV R8,R11 ; SWI offset (Font SWI)
SWI XPDriver_FontSWI
Pull "$Proc_RegList,LR,PC" ; ignore rest of font code
PullEnv
Pull "PC" ; ignore rest of font code
;;----------------------------------------------------------------------------
;; SWI decoding entry point
......@@ -5246,10 +5247,11 @@ SWIFont_CharBBox PEntry Metrics, "R0,R5-R12"
TEQ R7,#hdr1_leafname
LDREQ R14,[R6,#hdr1_PixoPtr]
LDRNE R14,[R6,#hdr4_PixoPtr]
ADD R14,R14,#pixo_pointers
Debug bb2,"Charbbox: pixelsptrs, R0, R1 =",R14,R0,R1
LDR R14,[R14,R0,LSL #2]
TEQ R14,#0
ADDNE R14,R14,#pixo_pointers
Debug bb2,"Charbbox: pixelsptrs, R0, R1 =",R14,R0,R1
LDRNE R14,[R14,R0,LSL #2]
TEQNE R14,#0
BNE bbox_fromdisc ; use directly if already there
LDRB R0,[R6,#hdr_masterfont]
......
......@@ -1232,6 +1232,8 @@ CachePixels Entry "R0-R4,cacheptr"
LDRB R4,[R6,R7] ; get flags from font header if no transform
01 BL CacheChunk
STRVS R0,[R13]
CheckCache "cachepixels untransformed exit"
EXIT
......@@ -1250,6 +1252,7 @@ CachePixels Entry "R0-R4,cacheptr"
STR R14,[R1,#std_size]
BL CacheChunk ; returns R6 -> chunk containing char (chunk younger than char)
STRVS R0,[R13]
LDR R1,transformptr ; relocated if nec.
LDR R14,[R1,#std_size]
......