56k help

GFA, ASM, STOS, ...

Moderators: simonsunnyboy, Mug UK, Zorro 2, Moderator Team

alain
Retro freak
Retro freak
Posts: 12
Joined: Sun Jun 24, 2018 6:57 am

56k help

Postby alain » Thu Sep 06, 2018 12:23 pm

Hello.
Long time ago I wrote a DSP program and I included it in the datas.
Now I lost the source and I'd like to desassemble it to improve it but I dont know how to proceed.
I don't remember what I've done to convert a lod or p56 into data. :oops:

ThorstenOtto
Captain Atari
Captain Atari
Posts: 400
Joined: Sun Aug 03, 2014 5:54 pm

Re: 56k help

Postby ThorstenOtto » Thu Sep 06, 2018 12:42 pm

alain wrote:I don't remember what I've done to convert a lod or p56 into data. :oops:


lod is ascii, so a shell script might do the trick. In what language is the data embedded? I've recently written a disasembler that outputs something like this:

Code: Select all

P:[0000] 0af080 000040    jmp       P:0x0040

P:[0028] 0bf080 007f00    jsr       P:0x7f00
P:[002a] 0bf080 007eef    jsr       P:0x7eef
P:[002c] 0bf080 007edc    jsr       P:0x7edc
P:[002e] 0bf080 007f00    jsr       P:0x7f00

P:[0040] 08f4a8 000004    movep     #0x000004,X:0xffe8
P:[0042] 08f4bf 000c00    movep     #0x000c00,X:0xffff
P:[0044] 00feb8           andi      #0xfe,mr
P:[0045] 08f4a0 000001    movep     #0x000001,X:0xffe0
P:[0047] 08f4be 000000    movep     #0x000000,X:0xfffe
P:[0049] 60f400 007ea9    move      #0x007ea9,r0
P:[004b] 319800           move      #0x98,r1
P:[004c] 06d100 000050    do        r1,P:0x0051
P:[004e] 0aa980 00004e    jclr      #0,X:0xffe9,P:0x004e
P:[0050] 08586b           movep     X:0xffeb,P:(r0)+
P:[0051] 0c0051           jmp       P:<0x0051


You would then have to reformat it (removing the addresses & opcodes at the start) and analyze it, to replace the addresses by symbolic values again. If its not too large, just send it per email.

alain
Retro freak
Retro freak
Posts: 12
Joined: Sun Jun 24, 2018 6:57 am

Re: 56k help

Postby alain » Thu Sep 06, 2018 12:53 pm

Here is what I have.
dsp_bin:
.DC.b 0,0,0,0,0,0,0,0,2,10,240,128,0,0,64,0
.DC.b 0,0,0,0,12,0,0,1,8,94,239,0,0,0,0,0
.DC.b 16,0,0,1,8,223,239,0,0,0,0,0,32,0,0,1
.DC.b 8,93,235,0,0,0,0,0,34,0,0,1,8,216,235,0
.DC.b 0,0,0,0,64,0,0,95,8,244,161,0,1,248,8,244
.DC.b 172,0,71,0,8,244,173,0,248,0,8,244,190,0,0,0
.DC.b 8,244,160,0,0,1,10,168,32,10,168,33,8,244,191,0
.DC.b 56,0,54,40,0,5,7,166,55,32,0,5,7,167,53,0
.DC.b 0,5,27,165,48,40,0,5,7,160,52,0,0,5,15,164
.DC.b 97,244,0,0,16,0,5,244,33,0,15,255,113,244,0,0
.DC.b 5,0,0,252,184,10,174,131,0,0,95,10,174,163,0,0
.DC.b 97,77,168,0,79,144,0,79,220,248,76,169,240,78,145,0
.DC.b 78,220,218,77,170,210,79,146,0,79,220,250,76,171,242,78
.DC.b 147,0,78,220,218,77,172,210,79,148,0,79,220,250,76,173
.DC.b 242,78,149,0,78,220,218,77,174,210,79,150,0,79,220,250
.DC.b 76,175,242,78,151,0,78,220,218,76,225,210,93,89,0,32
.DC.b 0,27,89,233,0,32,0,58,32,0,72,33,228,0,78,152
.DC.b 0,32,0,210,78,153,0,77,168,216,79,220,0,76,169,250
.DC.b 78,220,0,77,170,218,79,220,0,76,171,250,78,220,0,77
.DC.b 172,218,79,220,0,76,173,250,78,220,0,77,174,218,79,220
.DC.b 0,76,175,250,78,220,0,32,0,218,21,240,0,0,0,26
.DC.b 32,0,240,29,240,0,0,0,27,32,0,248,92,32,0,93
.DC.b 33,0,12,0,95
end_of_dspbin:

ThorstenOtto
Captain Atari
Captain Atari
Posts: 400
Joined: Sun Aug 03, 2014 5:54 pm

Re: 56k help

Postby ThorstenOtto » Thu Sep 06, 2018 1:37 pm

This is what i got

Code: Select all

  ORG P:0
P:[0000] 0af080 000040    jmp       P:0x0040

  ORG P:0x0c
P:[000c] 085eef           movep     X:0xffef,Y:(r6)+

  ORG P:0x10
P:[0010] 08dfef           movep     Y:(r7)+,X:0xffef

  ORG P:0x20
P:[0020] 085deb           movep     X:0xffeb,Y:(r5)+

  ORG P:0x22
P:[0022] 08d8eb           movep     Y:(r0)+,X:0xffeb

  ORG P:0x40
P:[0040] 08f4a1 0001f8    movep     #0x0001f8,X:0xffe1
P:[0042] 08f4ac 004700    movep     #0x004700,X:0xffec
P:[0044] 08f4ad 00f800    movep     #0x00f800,X:0xffed
P:[0046] 08f4be 000000    movep     #0x000000,X:0xfffe
P:[0048] 08f4a0 000001    movep     #0x000001,X:0xffe0
P:[004a] 0aa820           bset      #0,X:0xffe8
P:[004b] 0aa821           bset      #1,X:0xffe8
P:[004c] 08f4bf 003800    movep     #0x003800,X:0xffff
P:[004e] 362800           move      #0x28,r6
P:[004f] 0507a6           movec     #0x07,m6
P:[0050] 372000           move      #0x20,r7
P:[0051] 0507a7           movec     #0x07,m7
P:[0052] 350000           move      #0x00,r5
P:[0053] 051ba5           movec     #0x1b,m5
P:[0054] 302800           move      #0x28,r0
P:[0055] 0507a0           movec     #0x07,m0
P:[0056] 340000           move      #0x00,r4
P:[0057] 050fa4           movec     #0x0f,m4
P:[0058] 61f400 001000    move      #0x001000,r1
P:[005a] 05f421 000fff    movec     #0x000fff,m1
P:[005c] 71f400 000500    move      #0x000500,n1
P:[005e] 00fcb8           andi      #0xfc,mr
P:[005f] 0aae83 00005f    jclr      #3,X:0xffee,P:0x005f
P:[0061] 0aaea3 000061    jset      #3,X:0xffee,P:0x0061
P:[0063] 4da800           move      Y:0x0028,x1
P:[0064] 4f9000           move      Y:0x0010,y1
P:[0065] 4fdcf8           mpy       y1,x1,b Y:(r4)+,y1
P:[0066] 4ca9f0           mpy       y1,x1,a Y:0x0029,x0
P:[0067] 4e9100           move      Y:0x0011,y0
P:[0068] 4edcda           mac       y0,x0,b Y:(r4)+,y0
P:[0069] 4daad2           mac       y0,x0,a Y:0x002a,x1
P:[006a] 4f9200           move      Y:0x0012,y1
P:[006b] 4fdcfa           mac       y1,x1,b Y:(r4)+,y1
P:[006c] 4cabf2           mac       y1,x1,a Y:0x002b,x0
P:[006d] 4e9300           move      Y:0x0013,y0
P:[006e] 4edcda           mac       y0,x0,b Y:(r4)+,y0
P:[006f] 4dacd2           mac       y0,x0,a Y:0x002c,x1
P:[0070] 4f9400           move      Y:0x0014,y1
P:[0071] 4fdcfa           mac       y1,x1,b Y:(r4)+,y1
P:[0072] 4cadf2           mac       y1,x1,a Y:0x002d,x0
P:[0073] 4e9500           move      Y:0x0015,y0
P:[0074] 4edcda           mac       y0,x0,b Y:(r4)+,y0
P:[0075] 4daed2           mac       y0,x0,a Y:0x002e,x1
P:[0076] 4f9600           move      Y:0x0016,y1
P:[0077] 4fdcfa           mac       y1,x1,b Y:(r4)+,y1
P:[0078] 4caff2           mac       y1,x1,a Y:0x002f,x0
P:[0079] 4e9700           move      Y:0x0017,y0
P:[007a] 4edcda           mac       y0,x0,b Y:(r4)+,y0
P:[007b] 4ce1d2           mac       y0,x0,a Y:(r1),x0
P:[007c] 5d5900           move      b1,Y:(r1)+
P:[007d] 20001b           clr       b
P:[007e] 59e900           move      Y:(r1+n1),b0
P:[007f] 20003a           asl       b
P:[0080] 200048           add       x0,b
P:[0081] 21e400           move      b,x0
P:[0082] 4e9800           move      Y:0x0018,y0
P:[0083] 2000d2           mac       y0,x0,a
P:[0084] 4e9900           move      Y:0x0019,y0
P:[0085] 4da8d8           mpy       y0,x0,b Y:0x0028,x1
P:[0086] 4fdc00           move      Y:(r4)+,y1
P:[0087] 4ca9fa           mac       y1,x1,b Y:0x0029,x0
P:[0088] 4edc00           move      Y:(r4)+,y0
P:[0089] 4daada           mac       y0,x0,b Y:0x002a,x1
P:[008a] 4fdc00           move      Y:(r4)+,y1
P:[008b] 4cabfa           mac       y1,x1,b Y:0x002b,x0
P:[008c] 4edc00           move      Y:(r4)+,y0
P:[008d] 4dacda           mac       y0,x0,b Y:0x002c,x1
P:[008e] 4fdc00           move      Y:(r4)+,y1
P:[008f] 4cadfa           mac       y1,x1,b Y:0x002d,x0
P:[0090] 4edc00           move      Y:(r4)+,y0
P:[0091] 4daeda           mac       y0,x0,b Y:0x002e,x1
P:[0092] 4fdc00           move      Y:(r4)+,y1
P:[0093] 4caffa           mac       y1,x1,b Y:0x002f,x0
P:[0094] 4edc00           move      Y:(r4)+,y0
P:[0095] 2000da           mac       y0,x0,b
P:[0096] 15f000 00001a    move      a,x1 Y:0x001a,y1
P:[0098] 2000f0           mpy       y1,x1,a
P:[0099] 1df000 00001b    move      b,x1 Y:0x001b,y1
P:[009b] 2000f8           mpy       y1,x1,b
P:[009c] 5c2000           move      a1,Y:0x0020
P:[009d] 5d2100           move      b1,Y:0x0021
P:[009e] 0c005f           jmp       P:<0x005f

 END


alain
Retro freak
Retro freak
Posts: 12
Joined: Sun Jun 24, 2018 6:57 am

Re: 56k help

Postby alain » Thu Sep 06, 2018 1:50 pm

Whow 8O
Many thanks for the very fast help.

alain
Retro freak
Retro freak
Posts: 12
Joined: Sun Jun 24, 2018 6:57 am

Re: 56k help

Postby alain » Thu Sep 06, 2018 2:40 pm

A small information if it interest someone.
This program is mixing the 8 tracks from de DMA play. Each track as left and right level, also a send level to a small delay, level for left and right
return delay and level for left and right output.
I use it in my own digital 8 tracks .


Social Media

     

Return to “Coding”

Who is online

Users browsing this forum: No registered users and 3 guests