0

I think this is related to this this question, but the consts in the example code don't exist in mine, so maybe it's a different level of compression, but I am unsure.

Can anyone provide me the right direction to take to get this code working?

My sample compressed data is 6F600020 D0F77B6A 7972F760 E62BE917 4E6FE968 9E0AC682 02E7EEE5 3D1F235E 8C63D0E0

The routine I found doing what I suspect is the decompression

It seems to go byte by byte in getting stuff from ROM, then popping it back to VRAM to be displayed, I've looked through the source of JCALG but I can't seem to make entire sense of what is going on infront of me.

030001F8 addcs   r9,r9,2h                                ;1  235
030001FC bcs     Lxx_3000224h                            ;3  238
03000200 ldr     r8,=Lxx_27Fh                            ;3  241
03000204 cmp     r12,r8                                  ;1  242
03000208 addcs   r9,r9,1h                                ;1  243
0300020C bcs     Lxx_3000224h                            ;3  246
03000210 cmp     r12,7Fh                                 ;1  247
03000214 bhi     Lxx_3000224h                            ;3  250
03000218 add     r9,r9,4h                                ;1  251
0300021C cmp     r12,1h                                  ;1  252
03000220 beq     Lxx_3000238h                            ;3  255
03000224 ldrb    r8,[r0,-r12]                            ;5  260
03000228 strb    r8,[r0],1h                              ;4  264
0300022C subs    r9,r9,1h                                ;1  265
03000230 bne     Lxx_3000224h                            ;3  268
03000234 b       Lxx_3000024h                            ;3  271
03000238 ldrb    r8,[r0,-r12]                            ;5  276
0300023C strb    r8,[r0],1h                              ;4  280
03000240 subs    r9,r9,1h                                ;1  281
03000244 bne     Lxx_300023Ch                            ;3  284
03000248 b       Lxx_3000024h                            ;3  287
0300024C cmp     r10,0h                                  ;1  288
03000250 ldreq   r6,[r1],4h                              ;8  296
03000254 moveq   r10,20h                                 ;1  297
03000258 mov     r11,r8                                  ;1  298
0300025C cmp     r11,r10                                 ;1  299
03000260 movhi   r11,r10                                 ;1  300
03000264 rsb     r7,r11,20h                              ;1  301
03000268 mov     r7,r6,lsr r7                            ;2  303
0300026C mov     r6,r6,lsl r11                           ;2  305
03000270 sub     r10,r10,r11                             ;1  306
03000274 subs    r8,r8,r11                               ;1  307
03000278 bxeq    r14                                     ;3  310
0300027C ldr     r6,[r1],4h                              ;8  318
03000280 rsb     r10,r8,20h                              ;1  319
03000284 mov     r11,r6,lsr r10                          ;2  321
03000288 add     r7,r11,r7,lsl r8                        ;2  323
0300028C mov     r6,r6,lsl r8                            ;2  325
03000290 bx      r14                                     ;3  328
03000294 pop     r4-r11,r14                              ;11 339
03000298 bx      r14                                     ;3  342
0300029C push    r4-r6                                   ;4  346
030002A0 mov     r12,0FFh                                ;1  347
030002A4 ldr     r4,[r1],4h                              ;8  355
030002A8 ands    r5,r12,r4,lsr 18h                       ;1  356
030002AC ldrbne  r5,[r2,r5]                              ;5  361
030002B0 ands    r6,r12,r4,lsr 10h                       ;1  362
030002B4 ldrbne  r6,[r2,r6]                              ;3  365
030002B8 orr     r5,r6,r5,lsl 8h                         ;1  366
030002BC ands    r6,r12,r4,lsr 8h                        ;1  367
030002C0 ldrbne  r6,[r2,r6]                              ;3  370
030002C4 orr     r5,r6,r5,lsl 8h                         ;1  371
030002C8 ands    r6,r12,r4                               ;1  372
030002CC ldrbne  r6,[r2,r6]                              ;3  375
030002D0 orr     r5,r6,r5,lsl 8h                         ;1  376
030002D4 str     r5,[r0],4h                              ;7  383
030002D8 subs    r3,r3,4h                                ;1  384
030002DC bne     Lxx_30002A4h                            ;3  387
030002E0 pop     r4-r6                                   ;5  392
030002E4 bx      r14                                     ;3  395
030002E8 ????                                            ;4  399
030002EC andeq   r0,r0,r15,ror r2                        ;2  401
030002F0 push    r4,r5                                   ;3  404
030002F4 ldr     r2,[r0,34h]                             ;8  412
030002F8 ldr     r0,[r0,24h]                             ;8  420
030002FC sub     r0,r0,4h                                ;1  421
03000300 mov     r4,0FFh                                 ;1  422
03000304 subs    r2,r2,4h                                ;1  423
03000308 bmi     Lxx_3000340h                            ;3  426
0300030C add     r0,r0,4h                                ;1  427
03000310 ldr     r3,[r1],4h                              ;8  435
03000314 cmp     r3,0h                                   ;1  436
03000318 beq     Lxx_3000304h                            ;3  439```
Johnathon
  • 1
  • 2

0 Answers0