mdcomp icon indicating copy to clipboard operation
mdcomp copied to clipboard

Add KosinskiPlusM asm code

Open Nichloya opened this issue 1 year ago • 2 comments

Can you upload ASM-decoder for KosinskiPlusM?

Nichloya avatar Jul 11 '24 10:07 Nichloya

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.

flamewing avatar Jul 13 '24 20:07 flamewing

It's working! Thank you very much

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

Nichloya avatar Jul 14 '24 10:07 Nichloya