> IDA Pro does not disassemble automatically; you must click on the starting address to
> disassemble and press C.
This trick covers adresses till 200A only.
> The semicolon means you or someone using your computer commented that line
> previously.
I looked inside MAME Debugger internal disassembler sources recently - and made sure that semicolon really means an auto-comment:
Code:
case 0x3a:
{
/* program counter with displacement */
u16 temp_value = read_imm_16();
return util::string_format("(%s,PC) ; ($%x)", make_signed_hex_str_16(temp_value), (make_int_16(temp_value) + m_cpu_pc-2) & 0xffffffff);
}
And now, here is a code executing after first joypad interaction string I found in KoF '94 disassembly (main1.asm file). Well, please check, did I understood all in the commented strings correctly.
Code:
0330B8: 1039 0010 FD96 move.b $10fd96.l, D0 ;P1_CURRENT value moving to D0
0330BE: 0240 000F andi.w #$f, D0 ;D0 first 4 bits (active joystick directions) check
0330C2: D040 add.w D0, D0 ;why this D0 self-doubling is need, prompt me please!
0330C4: 41FA 002C lea ($2c,PC) ; ($330f2), A0
0330C8: 4E71 nop
0330CA: 3230 0000 move.w (A0,D0.w), D1
0330CE: 6B20 bmi $330f0 ;end of suroutine if result of A0+D0 moving to D1 is negative
0330D0: 203C 0002 0000 move.l #$20000, D0
0330D6: 4EB9 0000 27EC jsr $27ec.l ;jump to $27ec subroutine (this subroutine code will be quoted separately)
0330DC: 2944 0050 move.l D4, ($50,A4)
0330E0: 2945 0058 move.l D5, ($58,A4)
0330E4: 4844 swap D4
0330E6: 4845 swap D5
0330E8: D96C 0024 add.w D4, ($24,A4)
0330EC: DB6C 0026 add.w D5, ($26,A4)
0330F0: 4E75 rts
Code:
0027EC: 2800 move.l D0, D4
0027EE: 3A01 move.w D1, D5
0027F0: 6100 0010 bsr $2802
0027F4: C144 exg D0, D4
0027F6: 1205 move.b D5, D1
0027F8: 6100 000C bsr $2806
0027FC: C145 exg D0, D5
0027FE: 4485 neg.l D5
002800: 4E75 rts
Code:
002802: 0601 0040 addi.b #$40, D1
002806: 0281 0000 00FF andi.l #$ff, D1
00280C: 4A01 tst.b D1
00280E: 6A02 bpl $2812
002810: 4480 neg.l D0
002812: D241 add.w D1, D1
002814: 41F9 00C0 4000 lea $c04000.l, A0
00281A: 3230 1000 move.w (A0,D1.w), D1
00281E: 0C41 0001 cmpi.w #$1, D1
002822: 6704 beq $2828
002824: 6000 0004 bra $282a
002828: 4E75 rts
Code:
00282A: 4A80 tst.l D0
00282C: 40C3 move SR, D3
00282E: 6722 beq $2852
002830: 6A02 bpl $2834
002832: 4480 neg.l D0
002834: 3400 move.w D0, D2
002836: 4840 swap D0
002838: C4C1 mulu.w D1, D2
00283A: 0682 0000 8000 addi.l #$8000, D2
002840: 4242 clr.w D2
002842: 4842 swap D2
002844: C0C1 mulu.w D1, D0
002846: D082 add.l D2, D0
002848: 44C3 move D3, CCR
00284A: 6A02 bpl $284e
00284C: 4480 neg.l D0
00284E: 4E75 rts
Edited by VasiliyFamiliya (02/27/19 05:07 AM)