flamewing / mdcomp

Assorted compression formats for the Sega Mega Drive
Other
44 stars 4 forks source link

Add KosinskiPlusM asm code #30

Open kuroya2mouse opened 2 months ago

kuroya2mouse commented 2 months ago

Can you upload ASM-decoder for KosinskiPlusM?

flamewing commented 2 months ago

It is pretty much identical to KosM.asm except for:

  1. these lines:
        move.l  (Kos_decomp_source).w,d1
        sub.l   d1,d0
        andi.l  #$F,d0
        add.l   d0,d1                   ; round to the nearest $10 boundary
        move.l  d1,(Kos_module_queue).w ; and set new source

    should be changed to

        move.l  (Kos_decomp_source).w,(Kos_module_queue).w  ; set new source
  2. this line:
        include "_inc/Kosinski_internal.asm"

    should be changed to

        include "_inc/KosinskiPlus_internal.asm"
  3. This line
        movem.w (Kos_decomp_stored_Wregisters).w,d0-d6

    should be changed to

        movem.w (Kos_decomp_stored_Wregisters).w,d0/d2/d4-d7
  4. This line
        movem.w d0-d6,(Kos_decomp_stored_Wregisters).w

    should be changed to

        movem.w d0/d2/d4-d7,(Kos_decomp_stored_Wregisters).w
  5. You should create a file "_inc/KosM_internal.asm" modeled after "_inc/Kosinski_internal.asm" and use it on "KosinskiPlus.asm"

Optionally, you can also change all function names in the modified file to use "KosPlus" instead of "Kos", but this is only an issue if you want to use KosPlusM and KosM in the same hack.

kuroya2mouse commented 2 months ago

It's working! Thank you very much

Could you add asm files to the repository so that others can add it to their projects?