Source
...
Target
Commits (4)
  • Robert Sprowson's avatar
    Correction to help lookup · e88365d1
    Robert Sprowson authored
    Broken since version 1.75, ColourTrans' internal commands were trying to use the non internationalised text as the token name to lookup due to a bit of conditional assembly that got reversed.
    Spotted by Andrew Conroy.
    
    Version 1.92. Tagged as 'Colours-1_92'
    e88365d1
  • Jeffrey Lee's avatar
    Fix DecodeSprite potentially corrupting the ColourTrans_GenerateTable flags · a8ba1dc9
    Jeffrey Lee authored
    Detail:
      s/MainSWIs - DecodeSprite updates R11 with extra flags which describe the palette format used by the sprite. However the first time ColourTrans_GenerateTable calls DecodeSprite it does so with R11 set to the SWI flags, potentially corrupting them. Preserve R11 to make sure this doesn't happen.
    Admin:
      Fixes issue spotted by Willi Theiss; if ColourTrans was given the name of a 256 colour sprite with only a partial (64 entry) palette it was getting confused and trying to treat the name pointer as a sprite pointer, leading to a crash
      Tested on Raspberry Pi 3
    
    
    Version 1.93. Tagged as 'Colours-1_93'
    a8ba1dc9
  • Jeffrey Lee's avatar
    Avoid unnecessary remainder calculations · 35110c85
    Jeffrey Lee authored
    Detail:
      s/Commons, s/DevicePal, s/Dither, s/FontColour - Avoid unnecessary remainder calculations in DivRem macro
      s/Header - Remove unused Divide macro
    Admin:
      Tested on Cortex-A15
    
    
    Version 1.94. Tagged as 'Colours-1_94'
    35110c85
  • Robert Sprowson's avatar
    Remove use of RESOURCEEXTRA · 6250b733
    Robert Sprowson authored
    Requires BuildSys-6_91.
    
    Version 1.95. Tagged as 'Colours-1_95'
    6250b733
ColourTransMap/ColourTransMapSize/ColourTransLoadings:ColourTrans commands are for internal use only.
......@@ -26,44 +26,32 @@
COMPONENT = ColourTrans
TARGET = Colours
ROM_SOURCE = MakeNew
HEADER1 = ColourTran
RESOURCEEXTRA = resources-colourtrans
INSTRES_FILES = Tables.4greys:Tables Palettes.4greys:Palettes \
Tables.8greys:Tables Palettes.8greys:Palettes \
Tables.4desktop:Tables Palettes.4desktop:Palettes \
Tables.8desktop:Tables Palettes.8desktop:Palettes
INSTRES_DEPENDS = MakeTables
include StdTools
include AAsmModule
#
# Binary build environment
#
# Enhance the export rule to include the Tables and MkTables directories
BBETYPE = local
bbe-local: bbe-generic
BBE_Export_Dir Tables
BBE_Export_Dir MkTables
BBE_Export_Dir Palettes
#
# Generic rules:
#
clean::
${XWIPE} Tables.* ${WFLAGS}
${XWIPE} Palettes.* ${WFLAGS}
${XWIPE} MkTables.o.* ${WFLAGS}
${RM} MkTables.maketables
resources-colourtrans: MkTables.maketables
#
# Static dependencies:
#
MakeTables: MkTables.maketables
${XWIPE} Tables.* ${WFLAGS}
${RUN}MkTables.maketables @
${SQUASH} Tables.4greys
${SQUASH} Tables.8greys
${SQUASH} Tables.4desktop
${MKDIR} ${RESFSDIR}
${CP} Palettes ${RESFSDIR}.* ${CPFLAGS}
${CP} Tables ${RESFSDIR}.* ${CPFLAGS}
@echo ${COMPONENT}: extra resource files copied
MkTables.maketables: MkTables.c.maketables
${CD} MkTables
......
......@@ -11,13 +11,13 @@
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "1.91"
Module_Version SETA 191
Module_MajorVersion SETS "1.95"
Module_Version SETA 195
Module_MinorVersion SETS ""
Module_Date SETS "06 Apr 2014"
Module_ApplicationDate SETS "06-Apr-14"
Module_Date SETS "29 May 2016"
Module_ApplicationDate SETS "29-May-16"
Module_ComponentName SETS "Colours"
Module_ComponentPath SETS "castle/RiscOS/Sources/Video/Render/Colours"
Module_FullVersion SETS "1.91"
Module_HelpVersion SETS "1.91 (06 Apr 2014)"
Module_FullVersion SETS "1.95"
Module_HelpVersion SETS "1.95 (29 May 2016)"
END
/* (1.91)
/* (1.95)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 1.91
#define Module_MajorVersion_CMHG 1.95
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 06 Apr 2014
#define Module_Date_CMHG 29 May 2016
#define Module_MajorVersion "1.91"
#define Module_Version 191
#define Module_MajorVersion "1.95"
#define Module_Version 195
#define Module_MinorVersion ""
#define Module_Date "06 Apr 2014"
#define Module_Date "29 May 2016"
#define Module_ApplicationDate "06-Apr-14"
#define Module_ApplicationDate "29-May-16"
#define Module_ComponentName "Colours"
#define Module_ComponentPath "castle/RiscOS/Sources/Video/Render/Colours"
#define Module_FullVersion "1.91"
#define Module_HelpVersion "1.91 (06 Apr 2014)"
#define Module_LibraryVersionInfo "1:91"
#define Module_FullVersion "1.95"
#define Module_HelpVersion "1.95 (29 May 2016)"
#define Module_LibraryVersionInfo "1:95"
......@@ -1285,7 +1285,7 @@ worst_colour256_safe
best_colour256_grey
Entry "r0-r1,r3-r5"
Find256Grey_Core
DivRem r2, lr, r0, r1
DivRem r2, lr, r0, r1, norem
EXIT
;
......
......@@ -173,7 +173,7 @@ found_next_highest
SUB r3, r5, r3
; Now get 2^16*r3/r4 = r6
MOV r3, r3, LSL #16
DivRem r6, r3, r4, r5
DivRem r6, r3, r4, r5, norem
; Now r8 += r0*r3/r4, r9+=r1*r3/r4, etc.
MLA r8, r6, r0, r8
MLA r9, r6, r1, r9
......
......@@ -318,8 +318,7 @@ getpatterncolour ROUT
MOV LR,LR,LSR #8
ADD LR,LR,R6,LSR #8
ADD LR,LR,R7,LSR #8
MOV R6,#3
DivRem R4,LR,R6,R7 ;Howible divide by 3!!!!
DivRem R4,LR,#3,R7,norem ;Howible divide by 3!!!!
SUBS R9,R2,R4
MOVMI R9,#0
CMP R9,#255
......@@ -334,8 +333,7 @@ getpatterncolour ROUT
MOV LR,LR,LSR #16
ADD LR,LR,R6,LSR #16
ADD LR,LR,R7,LSR #16
MOV R6,#3
DivRem R4,LR,R6,R7
DivRem R4,LR,#3,R7,norem
SUBS R2,R2,R4
MOVMI R2,#0
CMP R2,#&FF
......@@ -347,8 +345,7 @@ getpatterncolour ROUT
MOV LR,R8,LSR #24
ADD LR,LR,R10,LSR #24
ADD LR,LR,R11,LSR #24
MOV R6,#3
DivRem R4,LR,R6,R7
DivRem R4,LR,#3,R7,norem
SUBS R2,R2,R4
MOVMI R2,#0
CMP R2,#&FF
......@@ -633,8 +630,7 @@ getpatterncolour16 ROUT
AND R7,R11,#&FF
ADD LR,LR,R6
ADD LR,LR,R7
MOV R6,#3
DivRem R4,LR,R6,R7 ;Howible divide by 3!!!!
DivRem R4,LR,#3,R7,norem ;Howible divide by 3!!!!
SUBS R9,R2,R4
MOVMI R9,#0
CMP R9,#255
......@@ -649,8 +645,7 @@ getpatterncolour16 ROUT
MOV LR,LR,LSR #8
ADD LR,LR,R6,LSR #8
ADD LR,LR,R7,LSR #8
MOV R6,#3
DivRem R4,LR,R6,R7
DivRem R4,LR,#3,R7,norem
SUBS R2,R2,R4
MOVMI R2,#0
CMP R2,#&FF
......@@ -662,8 +657,7 @@ getpatterncolour16 ROUT
MOV LR,R8,LSR #16
ADD LR,LR,R10,LSR #16
ADD LR,LR,R11,LSR #16
MOV R6,#3
DivRem R4,LR,R6,R7
DivRem R4,LR,#3,R7,norem
SUBS R2,R2,R4
MOVMI R2,#0
CMP R2,#&FF
......
......@@ -313,7 +313,7 @@ returnfontcolours_loop
ADD R3,R3,#1 ;Try offset of n+1
AND R2,R4,#&FF00 ;Get the red starting point
DivRem R11,R8,R3,LR ;..divide by the step value
DivRem R11,R8,R3,LR,norem ;..divide by the step value
ORR R8,R2,R11,LSL #16 ;..combine to make an nice happy value
[ :LNOT: checkluminance
......@@ -327,7 +327,7 @@ returnfontcolours_loop
MOV R2,R4,LSR #8
AND R2,R2,#&FF00
DivRem R11,R9,R3,LR
DivRem R11,R9,R3,LR,norem
ORR R9,R2,R11,LSL #16 ;Get the green step and combine with starting green
[ :LNOT: checkluminance
......@@ -340,7 +340,7 @@ returnfontcolours_loop
MOV R2,R4,LSR #16
AND R2,R2,#&FF00
DivRem R11,R10,R3,LR
DivRem R11,R10,R3,LR,norem
ORR R10,R2,R11,LSL #16 ;Do the same again but this time for the blue (calculate the step)
[ :LNOT: checkluminance
......
......@@ -392,13 +392,6 @@ calib_gammasize * 256
;
;------------------------------------------------------------------------------
MACRO
$l Divide $ra,$rb,$rc,$temp,$temp2
$l SavePSR $temp2
DivRem $ra,$rb,$rc,$temp
RestPSR $temp2,,f ;Preserve flags around divides
MEND
MACRO ; Compile a suitable error block for international versions
$l MakeEitherErrorBlock $name, $noalign
[ international
......@@ -529,9 +522,9 @@ HelpStarCommands
= "ColourTrans commands are for internal use only",0
|
[ international
= "ColourTrans commands are for internal use only",0
|
= "HCLTINT", 0
|
= "ColourTrans commands are for internal use only",0
]
]
......
......@@ -598,7 +598,9 @@ selecttable_palettedontcare2
BNE got_mode_number
95
Push "r11"
BL DecodeSprite
Pull "r11"
STRVS R0,[R13]
LDMVSFD R13!,{R0-R4}
BVS selecttable_return
......