Source
...
Target
Commits (4)
  • Jeffrey Lee's avatar
    Avoid unnecesary remainder calculations · 29b09a9a
    Jeffrey Lee authored
    Detail:
      s/BlendingS, s/Font_Arith, s/Fonts03, s/Fonts04 - Avoid unnecessary remainder calculations in DivRem macro
    Admin:
      Tested on Cortex-A15
    
    
    Version 3.77. Tagged as 'Manager-3_77'
    29b09a9a
  • Robert Sprowson's avatar
    Fix for failure to plot bitmap fonts when the font cache is above 256MB · a90d895d
    Robert Sprowson authored
    The bitmapped font paintmagnified routine uses bit indexes, which needs an effective 35 bit address (for a 4bpp IntMetrics+x90y45 font).
    In preparation for Medusa (>=256MB machine) the top 3 bits are kept in paint_inptr and the bottom 32 bits in the inptr register (R4).
    However, a mixup meant the top 3 bits from paint_inptr were added before an extra 2 bit shift, so the font cache address becomes nonsense, leading to an abort.
    
    Fonts02.s: Reorder the calculation.
    
    Tested with Porterhouse bitmap font, with the font cache at &37000000 (ie. one of the top 3 bits are set), using it as the desktop font, in !Edit, printing to a PostScript and bit image printer, and in !TechWriter.
    
    Version 3.78. Tagged as 'Manager-3_78'
    a90d895d
  • Robert Sprowson's avatar
    Bitwise to logical AND · e05cf719
    Robert Sprowson authored
    Picked up by static analysis
      https://www.riscosopen.org/forum/forums/4/topics/9503#posts-72623
    Removed old 26b binary too.
    Not tagged or tested, this is an unused utility.
    e05cf719
  • Jeffrey Lee's avatar
    Fix bad error pointer returned by Font_LoseFont · 4fb6d1d2
    Jeffrey Lee authored
    Detail:
      s/Fonts01 - Change a TEQ to a CMP to ensure the V flag is cleared; if a font handle like &80000000 was supplied then the opening CMP would set the V flag, accidentally causing the code to return a garbage error pointer.
      s/Errors - Apparently AddError requires '$' to be doubly-escaped to '$$$$' to stop objasm from throwing a warning.
    Admin:
      Tested on wandboard
      Fixes AODT on SYS "Font_LoseFont",&80000000
    
    
    Version 3.79. Tagged as 'Manager-3_79'
    4fb6d1d2
File deleted
...@@ -79,7 +79,10 @@ int main(void) ...@@ -79,7 +79,10 @@ int main(void)
static BOOL match(int x,int y,pointstr p) static BOOL match(int x,int y,pointstr p)
{ {
if (abs((p.x>>8)-x) < 16 & abs((p.y>>8)-y) < 16) return(1); else return(0); if ((abs((p.x>>8) - x) < 16) && (abs((p.y>>8)-y) < 16))
return(1);
else
return(0);
} }
......
...@@ -11,13 +11,13 @@ ...@@ -11,13 +11,13 @@
GBLS Module_HelpVersion GBLS Module_HelpVersion
GBLS Module_ComponentName GBLS Module_ComponentName
GBLS Module_ComponentPath GBLS Module_ComponentPath
Module_MajorVersion SETS "3.76" Module_MajorVersion SETS "3.79"
Module_Version SETA 376 Module_Version SETA 379
Module_MinorVersion SETS "" Module_MinorVersion SETS ""
Module_Date SETS "23 Jul 2014" Module_Date SETS "04 Feb 2018"
Module_ApplicationDate SETS "23-Jul-14" Module_ApplicationDate SETS "04-Feb-18"
Module_ComponentName SETS "Manager" Module_ComponentName SETS "Manager"
Module_ComponentPath SETS "castle/RiscOS/Sources/Video/Render/Fonts/Manager" Module_ComponentPath SETS "castle/RiscOS/Sources/Video/Render/Fonts/Manager"
Module_FullVersion SETS "3.76" Module_FullVersion SETS "3.79"
Module_HelpVersion SETS "3.76 (23 Jul 2014)" Module_HelpVersion SETS "3.79 (04 Feb 2018)"
END END
/* (3.76) /* (3.79)
* *
* This file is automatically maintained by srccommit, do not edit manually. * This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1. * Last processed by srccommit version: 1.1.
* *
*/ */
#define Module_MajorVersion_CMHG 3.76 #define Module_MajorVersion_CMHG 3.79
#define Module_MinorVersion_CMHG #define Module_MinorVersion_CMHG
#define Module_Date_CMHG 23 Jul 2014 #define Module_Date_CMHG 04 Feb 2018
#define Module_MajorVersion "3.76" #define Module_MajorVersion "3.79"
#define Module_Version 376 #define Module_Version 379
#define Module_MinorVersion "" #define Module_MinorVersion ""
#define Module_Date "23 Jul 2014" #define Module_Date "04 Feb 2018"
#define Module_ApplicationDate "23-Jul-14" #define Module_ApplicationDate "04-Feb-18"
#define Module_ComponentName "Manager" #define Module_ComponentName "Manager"
#define Module_ComponentPath "castle/RiscOS/Sources/Video/Render/Fonts/Manager" #define Module_ComponentPath "castle/RiscOS/Sources/Video/Render/Fonts/Manager"
#define Module_FullVersion "3.76" #define Module_FullVersion "3.79"
#define Module_HelpVersion "3.76 (23 Jul 2014)" #define Module_HelpVersion "3.79 (04 Feb 2018)"
#define Module_LibraryVersionInfo "3:76" #define Module_LibraryVersionInfo "3:79"
...@@ -77,7 +77,7 @@ blend_putdata$routine._32bpp_nonopaque ...@@ -77,7 +77,7 @@ blend_putdata$routine._32bpp_nonopaque
; s := At / Ac ; s := At / Ac
MOV R2, outdata, LSL #16 ; R2 = At scaled 0-&100000 MOV R2, outdata, LSL #16 ; R2 = At scaled 0-&100000
DivRem outdata, R2, R3, outmask; outdata = At/Ac = s scaled 0-&100 DivRem outdata, R2, R3, outmask, norem; outdata = At/Ac = s scaled 0-&100
MOVS outdata, outdata, LSR #4; s scaled 0-&10 MOVS outdata, outdata, LSR #4; s scaled 0-&10
ADC outdata, outdata, #0 ; round ADC outdata, outdata, #0 ; round
MOVS R3, R3, LSR #4 ; R3 = Ac scaled 0-&100 MOVS R3, R3, LSR #4 ; R3 = Ac scaled 0-&100
...@@ -238,7 +238,7 @@ blend_putdataSA_4444_nonopaque ...@@ -238,7 +238,7 @@ blend_putdataSA_4444_nonopaque
; s := At / Ac ; s := At / Ac
MOV R2, R9, LSL #12 ; R2 = At scaled 0-&10000 MOV R2, R9, LSL #12 ; R2 = At scaled 0-&10000
DivRem R9, R2, R3, outmask ; R9 = At/Ac = s scaled 0-&100 DivRem R9, R2, R3, outmask, norem ; R9 = At/Ac = s scaled 0-&100
MOVS R9, R9, LSR #4 ; s scaled 0-&10 MOVS R9, R9, LSR #4 ; s scaled 0-&10
ADC R9, R9, #0 ; round ADC R9, R9, #0 ; round
MOVS R2, R3, LSR #4 ; R2 = Ac scaled 0-&10 MOVS R2, R3, LSR #4 ; R2 = Ac scaled 0-&10
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
AddError FontBadCtrlChar, "ErrBadCtrlChar:Illegal control character in font string" AddError FontBadCtrlChar, "ErrBadCtrlChar:Illegal control character in font string"
AddError FontsInUse, "ErrsInUse:Font manager in use" AddError FontsInUse, "ErrsInUse:Font manager in use"
AddError FontBadSegment, "ErrBadSegment:Illegal line segment in outline font" AddError FontBadSegment, "ErrBadSegment:Illegal line segment in outline font"
AddError FontBadPrefix, "ErrBadPrefix:%1 (while scanning Font$$Path)" AddError FontBadPrefix, "ErrBadPrefix:%1 (while scanning Font$$$$Path)"
AddError FontReserved, "ErrReserved:Reserved fields must be zero" AddError FontReserved, "ErrReserved:Reserved fields must be zero"
AddError FontBadCharCode, "ErrBadCharCode:Character code out of range" AddError FontBadCharCode, "ErrBadCharCode:Character code out of range"
AddError FontNoBitmaps, "ErrNoBitmaps:ROM font directory cannot contain bitmaps" AddError FontNoBitmaps, "ErrNoBitmaps:ROM font directory cannot contain bitmaps"
......
...@@ -405,7 +405,7 @@ transformxyscale Entry "R0-R11" ...@@ -405,7 +405,7 @@ transformxyscale Entry "R0-R11"
SUBS R1,R1,R2 SUBS R1,R1,R2
RSBLT R1,R1,#0 ; R1 = ABS(YY*XX-XY*YX) RSBLT R1,R1,#0 ; R1 = ABS(YY*XX-XY*YX)
DivRem R0,R1,R9, R14 DivRem R0,R1,R9,R14,norem
Debuga trn,"New pixel w,h =",R9,R0 Debuga trn,"New pixel w,h =",R9,R0
Debuga trn," - " Debuga trn," - "
......
...@@ -4180,7 +4180,7 @@ SWIFont_CacheAddr ROUT ...@@ -4180,7 +4180,7 @@ SWIFont_CacheAddr ROUT
SWIFont_LoseFont Entry "R1-R3,R6" SWIFont_LoseFont Entry "R1-R3,R6"
CMP R0,#maxf CMP R0,#maxf
TEQCS R0,R0 ; don't bother with handles > 255 CMPCS R0,R0 ; don't bother with handles > 255
TEQNE R0,#0 ; don't bother with handle 0 either TEQNE R0,#0 ; don't bother with handle 0 either
LDRNE R2,cacheindex LDRNE R2,cacheindex
TEQNE R2,#0 TEQNE R2,#0
......
...@@ -5382,9 +5382,9 @@ paintmagnified ROUT ...@@ -5382,9 +5382,9 @@ paintmagnified ROUT
MOV inptr,inptr,LSR #3 MOV inptr,inptr,LSR #3
LDR indata,paint_inptr LDR indata,paint_inptr
ORR inptr,inptr,indata
MOV inptr,inptr,LSL #2 ; inptr --> input word MOV inptr,inptr,LSL #2 ; inptr --> input word
ORR inptr,inptr,indata ; merge back top 3 bits lost
LDR indata,[inptr],#4 ; cache pixel data in a reg. LDR indata,[inptr],#4 ; cache pixel data in a reg.
MOV indata,indata,LSR incount MOV indata,indata,LSR incount
RSB incount,incount,#32 ; 32 bits per input word RSB incount,incount,#32 ; 32 bits per input word
......
...@@ -2357,7 +2357,7 @@ convertfilename Entry "R1-R4" ...@@ -2357,7 +2357,7 @@ convertfilename Entry "R1-R4"
convertcardinal_R3R4 Entry "R0" convertcardinal_R3R4 Entry "R0"
DivRem R0,R3,R4,R14 ; R4 preserved DivRem R0,R3,R4,R14,norem ; R4 preserved
SWI XOS_ConvertCardinal4 ; R1,R2 updated SWI XOS_ConvertCardinal4 ; R1,R2 updated
STRVS R0,[sp] STRVS R0,[sp]
......
...@@ -2093,7 +2093,7 @@ nodebug1 ...@@ -2093,7 +2093,7 @@ nodebug1
LDR Ra,TOTAL LDR Ra,TOTAL
LDR Rb,xftimesyf LDR Rb,xftimesyf
ADD Ra,Ra,Rb,ASR #1 ; round to nearest ADD Ra,Ra,Rb,ASR #1 ; round to nearest
DivRem Rc,Ra,Rb, R14 DivRem Rc,Ra,Rb,R14,norem
CMP Rc,#16 CMP Rc,#16
MOVCS Rc,#15 ; 4-bit answer MOVCS Rc,#15 ; 4-bit answer
...@@ -4254,7 +4254,7 @@ computelink Entry "R3,R4,R10" ...@@ -4254,7 +4254,7 @@ computelink Entry "R3,R4,R10"
CMP R14,#0 CMP R14,#0
RSBMI R14,R14,#0 ; ensure dividend +ve RSBMI R14,R14,#0 ; ensure dividend +ve
SavePSR R0 SavePSR R0
DivRem R4,R14,R3, R10 ; R4 = (o1-o2)(x-x2)/(x1-x2) DivRem R4,R14,R3,R10,norem ; R4 = (o1-o2)(x-x2)/(x1-x2)
RestPSR R0,,f RestPSR R0,,f
ADDPL R10,R11,R4 ADDPL R10,R11,R4
SUBMI R10,R11,R4 SUBMI R10,R11,R4
......