Advertisement
Nightseeker

Sonic Clackers compression found in Tempo 32X

Oct 5th, 2020
3,246
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. The compression format used in Sonic Clackers for field art and SEGA logo art was found in Tempo for 32X. Unknown if it is used for graphics/data in Tempo.
  2.  
  3.  
  4. sc_dec.s
  5. ; ===========================================================================
  6. ; ---------------------------------------------------------------------------
  7. ; Crackers Decompression Algorithm
  8. ; ---------------------------------------------------------------------------
  9.  
  10. CracDec:
  11.         movem.l d1-d7/a2,-(sp)
  12.         move.w  (a0)+,d7
  13.         move.w  d7,d2
  14.         andi.w  #$3FFF,d7
  15.         eor.w   d7,d2
  16.         rol.w   #2,d2
  17.         moveq   #4,d1
  18.         sub.w   d2,d1
  19.         moveq   #1,d2
  20.         lsl.w   d1,d2
  21.         subq.w  #1,d2
  22.  
  23. loc_8856:
  24.         move.b  (a0)+,d5
  25.         moveq   #7,d6
  26.  
  27. loc_885A:
  28.         add.b   d5,d5
  29.         bcs.w   loc_8870
  30.         move.b  (a0)+,(a1)+
  31.         dbf d6,loc_885A
  32.         dbf d7,loc_8856
  33.         movem.l (sp)+,d1-d7/a2
  34.         rts
  35.  
  36. loc_8870:
  37.         moveq   #0,d3
  38.         move.b  (a0)+,d3
  39.         move.w  d3,d4
  40.         lsr.w   d1,d3
  41.         and.w   d2,d4
  42.         neg.w   d3
  43.         lea -1(a1,d3.w),a2
  44.         addq.w  #1,d4
  45.  
  46. loc_8882:
  47.         move.b  (a2)+,(a1)+
  48.         dbf d4,loc_8882
  49.         dbf d6,loc_885A
  50.         dbf d7,loc_8856
  51.         movem.l (sp)+,d1-d7/a2
  52.         rts
  53.  
  54.  
  55. sc_dec_code.bin
  56. 48E77F203E18340702473FFFBF42E55A720492427401E36A53421A187C07DA056500001212D851CEFFF651CFFFEE4CDF04FE4E75760016183803E26BC842444345F130FF524412DA51CCFFFC51CEFFD051CFFFC84CDF04FE4E75
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement