Commit 83b8129e authored by Robert Sprowson's avatar Robert Sprowson
Browse files

Sync with trunk

Sources/SprOp - revision 4.10 copied
Sources/SprTrans - revision 4.16 copied
Sources/jdhuff - revision 4.7 copied
Also:
 DCI changed to instruction mnemonic for objasm 4
 Makefile excess '-c' removed
 Util.mk double inclusion of rules removed

Version 1.38, 1.35.2.16. Tagged as 'SprExtend-1_38-1_35_2_16'
parent c80a71a9
......@@ -86,7 +86,7 @@ CFSI-JPEG = data.CFSIjpeg
# Rule patterns
#
.SUFFIXES: .o .c
.c.o:; ${CC} -c ${CFLAGS} ${TFLAGS} -zps1 -o $@ $<
.c.o:; ${CC} ${CFLAGS} ${TFLAGS} -zps1 -o $@ $<
#
# Rules:
......
......@@ -175,7 +175,6 @@ cfsi_jpeg SETL {TRUE}
GET Sources.CSupport
GET jhdr.s
GET Sources.jdarith
GET Sources.jdhuff
GET Sources.jidctfst
GET Sources.jdcolor
......
......@@ -94,7 +94,8 @@ myjptable
My_SpriteExit
LDRVC R0,spritecode
01
Pull "R10-R11,LR,PC"
Pull "R10-R11,LR"
Pull "PC"
Go_SpriteOp
......@@ -2302,25 +2303,23 @@ badappend
LDR R14,sp2_next ; Merged from 0.62 (GPS)
SUB R3,R14,R3 ; R3 = size of mask2 (poss+) - From 0.62 (GPS)
ADD R3,R2,R3 ; R3 --> end of mask2
LDR R14,sp1_header
SUB R14,R1,R14
Push "R14" ; merged from 0.62 (GPS)
LDR R14, sp_mode ; merged from 0.62 (GPS)
MOVS R14, R14, LSR #27 ; Old or new? merged from 0.62 (GPS)
Pull "R14" ; merged from 0.62 (GPS)
DebugIf EQ,ag,"Old format mergeblocks to be executed" ; merged from 0.62 (GPS)
BLEQ mergeblocks ; if old format merged from 0.62 (GPS)
DebugIf NE,ag,"New format mergeblocks to be executed" ; merged from 0.62 (GPS)
BLNE maskmergeblocks ; if new format merged from 0.62 (GPS)
BNE %FT00
Debug ag,"Old format mergeblocks to be executed"
BL mergeblocks ; if old format merged from 0.62 (GPS)
B %FT02
00
Debug ag,"New format mergeblocks to be executed"
BL maskmergeblocks ; if new format merged from 0.62 (GPS)
B %FT02
01
;
; otherwise just merge the images
;
01
Debug ag,"These sprites don't have masks" ; merged from 0.62 (GPS)
LDR R1,sp1_header
LDR R14,sp1_image
......@@ -2342,20 +2341,22 @@ badappend
LDR R0,sp1_image
LDR R14,sp1_trans
TEQ R14,R0 ; was there a mask?
BEQ %FT10 ; if not, skip the next bit
BEQ %FT03 ; if not, skip the next bit
SUB R14,R3,R2 ; merged from 0.62 (GPS)
STR R14,[R2,#spTrans] ; point to mask merged from 0.62 (GPS)
LDR R14, sp_mode ; merged from 0.62 (GPS)
MOVS R14, R14, LSR #27 ; New or old format mask? merged from 0.62 (GPS)
DebugIf EQ,ag,"Old format chunterblock to be executed" ; merged from 0.62 (GPS)
BLEQ chunterblock ; process old format mask merged from 0.62 (GPS)
DebugIf EQ,ag,"New format chunterblock to be executed" ; merged from 0.62 (GPS)
BLNE maskchunterblock ; process new format mask merged from 0.62 (GPS)
BNE %FT05
03
Debug ag,"Old format chunterblock to be executed"
BL chunterblock ; process old format mask merged from 0.62 (GPS)
B %FT10
05
Debug ag,"New format chunterblock to be executed"
BL maskchunterblock ; process new format mask merged from 0.62 (GPS)
10
SUB R14,R3,R2
STR R14,[R2,#spNext] ; sprite size
LDR R2,sp1_areaCBptr
......
......@@ -133,8 +133,13 @@ $l TrnsAsmReg $reg,$size,$cc
ldmreg SETA $size:SHR:2
ldmreg3 SETA ldmreg+3
ldmreg2 SETS "$ldmreg3":RIGHT:1
[ ldmreg>1
$l LDM$cc.IA $reg,{R4-R$ldmreg2}
STM$cc.IA R10!,{R4-R$ldmreg2}
|
$l LDR$cc R4,[$reg]
STR$cc R4, [R10], #4
]
MEND
MACRO
......@@ -523,43 +528,41 @@ trns_notrans
; Set up input path for draw - move to R0,R8, move to R9,R14, end path
Push "R0,R1,R2,R3,R4,R5,R7,R8,R9,R10,R11,R12,R14"
SUB sp, sp, #64
Push "R12"
LDR R11, inlog2px
ADD R11, R11, #8
MOV R0, R0, ASL R11
MOV R9, R9, ASL R11
MOV R1, R0, ASL R11 ; R1 = R0 scaled x
MOV R9, R9, ASL R11 ; R9 = R9 scaled x
LDR R11, inlog2py
ADD R11, R11, #8
MOV R8, R8, ASL R11
MOV R14, R14, ASL R11
ADD R12, SP, #4
MOV R10, R12
MOV R8, R8, ASL R11 ; R8 = R8 scaled y
MOV R3, R14, ASL R11 ; R3 = R14 scaled y
SUB sp, sp, #64 ; Space for a path block
MOV R10, SP
MOV R11, #2
STMIA R10!, {R11}
STMIA R10!, {R0,R8,R11}
STMIA R10!, {R9}
STMIA R10!, {R8,R11}
MOV R0, #2
STMIA R10!, {R0,R1,R8} ; Move R1, R8.
STMIA R10!, {R0,R9} ; Move R9,
STMIA R10!, {R8,R11} ; R8. Move
MOV R11, #0
STMIA R10!, {R0,R14}
STMIA R10!, {R11}
STMIA R10!, {R1,R3,R11} ; R1, R3. End.
; Transform the path
; Transform the path
MOV R0, R12
MOV R0, SP
MOV R1, #0
MOV R2, R6
MOV R3, #0
SWI Draw_TransformPath
ADDVS sp, sp, #64+8
ADDVS sp, sp, #64+4
Pull "R1,R2,R3,R4,R5,R7,R8,R9,R10,R11,R12,R14",VS
BVS exitbiggie
; Recover R6
ADD R10, R12, #4
ADD R10, SP, #4 ; Get the transformed path (skipping 'Move')
LDMIA R10!, {R0,R3,R4,R6,R8,R9,R11,R14}
Pull "R12"
ADR R10, save_outoffset
STMIA R10!, {R0,R3,R6,R8}
ADD R6, R6, R11
......@@ -567,6 +570,8 @@ trns_notrans
SUB R6, R6, R0
SUB R8, R8, R3
STMIA R10!,{R6,R8,R11,R14}
; Recover R6
ADR R6, save_outoffset
ADD sp, sp, #64
Pull "R0,R1,R2,R3,R4,R5,R7,R8,R9,R10,R11,R12,R14"
......@@ -1915,14 +1920,14 @@ trnslp_eoloop_size * .-trnslp_eoloop
; Finished row so store last compiled output word and mask, if necessary
trnslp_lastword
CMP trns_out_word, #&80000000
LDMEQFD sp!, {PC}
Pull "PC",EQ
trnslp_lastword_size * .-trnslp_lastword
ASSERT (trnslp_lastword_size) = 2*4
; Stored last output word and mask on screen, so exit
trnslp_lastword2
STR trns_offset, [trns_out_ptr]
LDMFD sp!, {PC}
Pull "PC"
trnslp_lastword2_size * .-trnslp_lastword2
ASSERT (trnslp_lastword2_size) = 2*4
......
......@@ -38,7 +38,7 @@ ONE_HALF * 1:SHL:(SCALEBITS - 1)
MOVCS $r,#(1:SHL:$bits) - 1
]
| ; take a look at my funky USAT
DCI &E6E00010 :OR: ($bits:SHL:16) :OR: ($r:SHL:12) :OR: $r
USAT $r, #$bits, $r
]
MEND
......
......@@ -508,17 +508,21 @@ huff_skip_exit
huff_bad_stuff_byte
; attempt to get details out there of what the situation was when we went wrong.
SUB sp,sp,#16*4
STMDB sp,{r0-lr,pc} ; dump ALL the registers.
STMDB sp,{r0-r12} ; dump ALL the registers.
ADD r2,sp,#16*4
STR r2,[sp,#13*4]
STR lr,[sp,#14*4]
STR pc,[sp,#15*4]
MOV r2,#JWRN_TOO_MUCH_DATA ; r2 = panic type
B huff_panic_exit ; join common code
huff_badinput
; attempt to get details out there of what the situation was when we went wrong.
SUB sp,sp,#16*4
STMDB sp,{r0-lr,pc} ; dump ALL the registers.
STMDB sp,{r0-r12} ; dump ALL the registers.
ADD r2,sp,#16*4
STR r2,[sp,#13*4]
STR lr,[sp,#14*4]
STR pc,[sp,#15*4]
MOV r2,#JWRN_HUFF_BAD_CODE ; r2 = panic type
; Fall through
huff_panic_exit
......@@ -528,9 +532,10 @@ huff_panic_exit
MOV r1,sp ; r1 -> saved register block
BL panic_trace ; call dump routine, returns appropriate error code
ADD sp,sp,#(16*4)+4 ; set sp back to what it was (and junk r0)
ADD sp,sp,#16*4+1*4 ; set sp back to what it was (and junk r0)
LDMIA sp!,{r1-r12,lr} ; restore entry registers
MOV r0,#2 ; this is ERROR_BAD_JPEG
B exit
END
......@@ -13,11 +13,11 @@
GBLS Module_ComponentPath
Module_MajorVersion SETS "1.38"
Module_Version SETA 138
Module_MinorVersion SETS "1.35.2.15"
Module_Date SETS "06 Aug 2011"
Module_ApplicationDate SETS "06-Aug-11"
Module_MinorVersion SETS "1.35.2.16"
Module_Date SETS "28 Jul 2012"
Module_ApplicationDate SETS "28-Jul-12"
Module_ComponentName SETS "SprExtend"
Module_ComponentPath SETS "mixed/RiscOS/Sources/Video/Render/SprExtend"
Module_FullVersion SETS "1.38 (1.35.2.15)"
Module_HelpVersion SETS "1.38 (06 Aug 2011) 1.35.2.15"
Module_FullVersion SETS "1.38 (1.35.2.16)"
Module_HelpVersion SETS "1.38 (28 Jul 2012) 1.35.2.16"
END
......@@ -5,19 +5,19 @@
*
*/
#define Module_MajorVersion_CMHG 1.38
#define Module_MinorVersion_CMHG 1.35.2.15
#define Module_Date_CMHG 06 Aug 2011
#define Module_MinorVersion_CMHG 1.35.2.16
#define Module_Date_CMHG 28 Jul 2012
#define Module_MajorVersion "1.38"
#define Module_Version 138
#define Module_MinorVersion "1.35.2.15"
#define Module_Date "06 Aug 2011"
#define Module_MinorVersion "1.35.2.16"
#define Module_Date "28 Jul 2012"
#define Module_ApplicationDate "06-Aug-11"
#define Module_ApplicationDate "28-Jul-12"
#define Module_ComponentName "SprExtend"
#define Module_ComponentPath "mixed/RiscOS/Sources/Video/Render/SprExtend"
#define Module_FullVersion "1.38 (1.35.2.15)"
#define Module_HelpVersion "1.38 (06 Aug 2011) 1.35.2.15"
#define Module_FullVersion "1.38 (1.35.2.16)"
#define Module_HelpVersion "1.38 (28 Jul 2012) 1.35.2.16"
#define Module_LibraryVersionInfo "1:38"
......@@ -32,7 +32,7 @@ void panic_trace(j_decompress_ptr cinfo, int *regblock, int code);
int do_jpeg_scan_file_32(char *space, int space_size, const JOCTET *file_image, int image_length);
int do_jpeg_scan_file_16(char *space, int space_size, const JOCTET *file_image, int image_length);
/* Used by both CFSI and SpriteExtend assembler code */
/* Used by both CFSI and SpriteExtend assembler code */
typedef struct
{
int type; /* Bits 0 & 1: 1=monochrome, 3=colour
......
......@@ -19,8 +19,6 @@ OBJS = ${COMPONENT}
CDEFINES = -DRISCOS
include HostTools
include StdRules
include AppLibs
include CApp
# Dynamic dependencies:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment