shadow of the beast ST (Mark mc cubbin here)

All about ST/STE games

Moderators: simonsunnyboy, Mug UK, Doctor Bob Gordon, ICS, Moderator Team

swapd0
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 102
Joined: Thu Dec 13, 2007 8:56 pm

Re: shadow of the beast ST (Mark mc cubbin here)

Postby swapd0 » Tue Oct 15, 2019 3:37 pm

yeah, the movem it's in a weird format it's in my TODO list, and the cmp you have to include a '#', it looks that I've a bug in my disassembler and in my assembler XD.

User avatar
Dbug
Atari freak
Atari freak
Posts: 50
Joined: Tue Jan 28, 2003 8:42 pm
Location: Oslo (Norway)
Contact:

Re: shadow of the beast ST (Mark mc cubbin here)

Postby Dbug » Tue Oct 15, 2019 3:40 pm

Interesting, I've never seen this "d1234567/a0123456" syntax for movem, I've been used to things like:
- movem.l d0/d1/d2/a3/a6
- movem.l d0-d4/a0-a5

swapd0
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 102
Joined: Thu Dec 13, 2007 8:56 pm

Re: shadow of the beast ST (Mark mc cubbin here)

Postby swapd0 » Tue Oct 15, 2019 3:51 pm

Yes, I was lazy when I wrote the disassembler, anyway they are easy to fix.

User avatar
Dbug
Atari freak
Atari freak
Posts: 50
Joined: Tue Jan 28, 2003 8:42 pm
Location: Oslo (Norway)
Contact:

Re: shadow of the beast ST (Mark mc cubbin here)

Postby Dbug » Tue Oct 15, 2019 4:00 pm

Cool that you wrote one :)
Is it a disassembler running on PC or on the Atari itself?

swapd0
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 102
Joined: Thu Dec 13, 2007 8:56 pm

Re: shadow of the beast ST (Mark mc cubbin here)

Postby swapd0 » Tue Oct 15, 2019 4:52 pm

First version was in BeOS, now it runs in Mac, the buggy GUI it's done in Interface Builder.

User avatar
Dbug
Atari freak
Atari freak
Posts: 50
Joined: Tue Jan 28, 2003 8:42 pm
Location: Oslo (Norway)
Contact:

Re: shadow of the beast ST (Mark mc cubbin here)

Postby Dbug » Tue Oct 15, 2019 6:51 pm

Gosh, apparently the coder does not like the (an)+ addressing mode:

Code: Select all

l001807   move.w 2(a0),8(a1)
      move.w 4(a0),16(a1)
      move.w 6(a0),24(a1)
      move.w 8(a0),32(a1)
      move.w 10(a0),40(a1)
      move.w 12(a0),48(a1)
      move.w 14(a0),56(a1)
      move.w 16(a0),64(a1)
      move.w 18(a0),72(a1)
      move.w 20(a0),80(a1)
      move.w 22(a0),88(a1)
      move.w 24(a0),96(a1)
      move.w 26(a0),104(a1)
      move.w 28(a0),112(a1)
      move.w 30(a0),120(a1)
      move.w 32(a0),128(a1)
      move.w 34(a0),136(a1)
      move.w 36(a0),144(a1)
      rts

User avatar
Cyprian
10 GOTO 10
10 GOTO 10
Posts: 1741
Joined: Fri Oct 04, 2002 11:23 am
Location: Warsaw, Poland

Re: shadow of the beast ST (Mark mc cubbin here)

Postby Cyprian » Tue Oct 15, 2019 9:15 pm

Dbug wrote:Gosh, apparently the coder does not like the (an)+ addressing mode:


or he just likes "move.w" instruction :)
Image
Lynx II / Jaugar / TT030 / Mega STe / 800 XL / 1040 STe / Falcon030 / 65 XE / 520 STm / SM124 / SC1435
SDrive / PAK68/3 / Lynx Multi Card / LDW Super 2000 / XCA12 / SkunkBoard / CosmosEx / SatanDisk / UltraSatan / USB Floppy Drive Emulator / Eiffel / SIO2PC / Crazy Dots / PAM Net
Hatari / Steem SSE / Aranym / Saint
http://260ste.appspot.com/

User avatar
Dbug
Atari freak
Atari freak
Posts: 50
Joined: Tue Jan 28, 2003 8:42 pm
Location: Oslo (Norway)
Contact:

Re: shadow of the beast ST (Mark mc cubbin here)

Postby Dbug » Wed Oct 16, 2019 6:33 pm

@swapd0: Do you think you could make your disassembler generate the ":" at the end of labels, it's optional, but when searching in the code that makes it easier to find where the routine is actually located :)

swapd0
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 102
Joined: Thu Dec 13, 2007 8:56 pm

Re: shadow of the beast ST (Mark mc cubbin here)

Postby swapd0 » Wed Oct 16, 2019 8:23 pm

Yes, but maybe it will generate the code with different labels...

swapd0
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 102
Joined: Thu Dec 13, 2007 8:56 pm

Re: shadow of the beast ST (Mark mc cubbin here)

Postby swapd0 » Wed Oct 16, 2019 8:32 pm

F*ck, I didn't save the project and there are some missing entry points, so the code it's generated with different labels.

If you have changed a lot of code, maybe it's better if you use an editor with regular expression to match a label at the start of a line and replace it with a ':' at the end.

User avatar
Dbug
Atari freak
Atari freak
Posts: 50
Joined: Tue Jan 28, 2003 8:42 pm
Location: Oslo (Norway)
Contact:

Re: shadow of the beast ST (Mark mc cubbin here)

Postby Dbug » Thu Oct 17, 2019 6:25 am

I've not started anything, just looked at the existing disassembly :)

swapd0
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 102
Joined: Thu Dec 13, 2007 8:56 pm

Re: shadow of the beast ST (Mark mc cubbin here)

Postby swapd0 » Thu Oct 17, 2019 8:24 am

For fun XD, Ok, I'll fix a bug and disassembly it again, yesterday I put the ':' at the labels.

User avatar
Dbug
Atari freak
Atari freak
Posts: 50
Joined: Tue Jan 28, 2003 8:42 pm
Location: Oslo (Norway)
Contact:

Re: shadow of the beast ST (Mark mc cubbin here)

Postby Dbug » Thu Oct 17, 2019 8:43 am

One thing I'm wondering: Is there a way to detect that some labels are actually the same address?

Looking at the disassembly I see that you have different equates for hardware register addresses that were expressed as .w and .l, so we end up with these two sets of different values, some being correctly names with a symbolic name (eg: SOUND_REG or IKBD_CTRL) but some other are just normal labels:

Eg:
l000029 equ $00008800
SOUND_REG equ $00ff8800

(it happens for the video counter, dma, ym, and a few other).

swapd0
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 102
Joined: Thu Dec 13, 2007 8:56 pm

Re: shadow of the beast ST (Mark mc cubbin here)

Postby swapd0 » Thu Oct 17, 2019 10:37 am

This version has the labels with a ':' at the end.

About the last question... I need to think how to fix that, maybe tag each label with a size.
You do not have the required permissions to view the files attached to this post.

User avatar
Cyprian
10 GOTO 10
10 GOTO 10
Posts: 1741
Joined: Fri Oct 04, 2002 11:23 am
Location: Warsaw, Poland

Re: shadow of the beast ST (Mark mc cubbin here)

Postby Cyprian » Thu Oct 17, 2019 1:03 pm

unfortunately there are still some strange movem

Code: Select all

error 42 in line 2062 of "beast.s": division by zero
>l000335:       movem.l d01/a01,-(a7)

error 42 in line 2070 of "beast.s": division by zero
>               movem.l (a7)+,d01/a01

error 42 in line 7205 of "beast.s": division by zero
>l000748:       movem.l d123456/a0-a6,-(a7)

error 42 in line 7236 of "beast.s": division by zero
>               movem.l (a7)+,d123456/a0-a6


some hardware addresses are defined wrongly: $0000820a instead of $FFFF820a:

Code: Select all

l002099   equ $0000820a
l000016   equ $00008604
l000004   equ $00008606
l000014   equ $00008609
l000013   equ $0000860b
l000012   equ $0000860d
l001031   equ $000087f6
l000027   equ $00008800
l000028   equ $00008802


l000019   equ $0000fa01
l002076   equ $0000fa07
l002077   equ $0000fa09
l002078   equ $0000fa13
l002079   equ $0000fa15
l000152   equ $0000fa17
l002081   equ $0000fa19
l002080   equ $0000fa1f
l000190   equ $0000fc00
l000153   equ $0000fc04
l000154   equ $0000fc06


it generates following error:

Code: Select all

error 2033 in line 2063 of "beast.s": absolute short address out of range
>               lea l000019.w,a0

>l000020:   move.w l000016.w,d0


error 2033 in line 1172 of "beast.s": absolute short address out of range
>               bclr #$0003,l000152.w



there are some "displacement out of range". They can be generated because of previous errors.

Code: Select all

error 2030 in line 1343 of "beast.s": displacement out of range
>               movea.l l000222(pc,d0.w),a0

error 2030 in line 1420 of "beast.s": displacement out of range
>               movea.l l000240(pc,d0.w),a0

error 2030 in line 1533 of "beast.s": displacement out of range
>               movea.l l000285(pc,d0.w),a0

error 2030 in line 1577 of "beast.s": displacement out of range
>               movea.l l000290(pc,d0.w),a0
Lynx II / Jaugar / TT030 / Mega STe / 800 XL / 1040 STe / Falcon030 / 65 XE / 520 STm / SM124 / SC1435
SDrive / PAK68/3 / Lynx Multi Card / LDW Super 2000 / XCA12 / SkunkBoard / CosmosEx / SatanDisk / UltraSatan / USB Floppy Drive Emulator / Eiffel / SIO2PC / Crazy Dots / PAM Net
Hatari / Steem SSE / Aranym / Saint
http://260ste.appspot.com/

swapd0
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 102
Joined: Thu Dec 13, 2007 8:56 pm

Re: shadow of the beast ST (Mark mc cubbin here)

Postby swapd0 » Thu Oct 17, 2019 1:19 pm

Which assembler are you using? I need to make my assembler more robust.

swapd0
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 102
Joined: Thu Dec 13, 2007 8:56 pm

Re: shadow of the beast ST (Mark mc cubbin here)

Postby swapd0 » Thu Oct 17, 2019 2:58 pm

- Weird register list fixed
- labels at low memory are matched with hardware address before generation
- About errors like this:
error 2033 in line 1172 of "beast.s": absolute short address out of range
> bclr #$0003,l000152.w
Maybe it's because some address are like $00ff8240 instead of $ffff8240, I had to fix that in my assembler.

I was thinking which Atari ST game could be disassembled to improve it...

PD: thanks for the bugs report.
You do not have the required permissions to view the files attached to this post.

swapd0
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 102
Joined: Thu Dec 13, 2007 8:56 pm

Re: shadow of the beast ST (Mark mc cubbin here)

Postby swapd0 » Thu Oct 17, 2019 3:03 pm

Sorry, use this file, not the last one.
You do not have the required permissions to view the files attached to this post.

User avatar
Cyprian
10 GOTO 10
10 GOTO 10
Posts: 1741
Joined: Fri Oct 04, 2002 11:23 am
Location: Warsaw, Poland

Re: shadow of the beast ST (Mark mc cubbin here)

Postby Cyprian » Thu Oct 17, 2019 6:23 pm

swapd0 wrote:Which assembler are you using? I need to make my assembler more robust.


Devpac and VASM in devpac compatible mode. Below an example from Devpac:

Code: Select all

l000016   equ $00008604
        l000020:   move.w l000016.w,d0

Steem__00001.png


VASM: http://sun.hasenbraten.de/vasm/index.php?view=relsrc
Build:

Code: Select all

make CPU=m68k SYNTAX=mot


Assemble:

Code: Select all

vasmm68k_mot.exe -nocase -maxerrors=20 -devpac -m68000 -no-opt -nosym -Ftos -o TEST.TOS TEST.S
You do not have the required permissions to view the files attached to this post.
Lynx II / Jaugar / TT030 / Mega STe / 800 XL / 1040 STe / Falcon030 / 65 XE / 520 STm / SM124 / SC1435
SDrive / PAK68/3 / Lynx Multi Card / LDW Super 2000 / XCA12 / SkunkBoard / CosmosEx / SatanDisk / UltraSatan / USB Floppy Drive Emulator / Eiffel / SIO2PC / Crazy Dots / PAM Net
Hatari / Steem SSE / Aranym / Saint
http://260ste.appspot.com/

User avatar
Cyprian
10 GOTO 10
10 GOTO 10
Posts: 1741
Joined: Fri Oct 04, 2002 11:23 am
Location: Warsaw, Poland

Re: shadow of the beast ST (Mark mc cubbin here)

Postby Cyprian » Thu Oct 17, 2019 6:28 pm

swapd0 wrote:Sorry, use this file, not the last one.



Code: Select all

l000004   equ $00ff8606


to use .w mode it should be $ffff8606

after correcting, VASM generates that binary code:
beast.tos.zip
You do not have the required permissions to view the files attached to this post.
Lynx II / Jaugar / TT030 / Mega STe / 800 XL / 1040 STe / Falcon030 / 65 XE / 520 STm / SM124 / SC1435
SDrive / PAK68/3 / Lynx Multi Card / LDW Super 2000 / XCA12 / SkunkBoard / CosmosEx / SatanDisk / UltraSatan / USB Floppy Drive Emulator / Eiffel / SIO2PC / Crazy Dots / PAM Net
Hatari / Steem SSE / Aranym / Saint
http://260ste.appspot.com/

swapd0
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 102
Joined: Thu Dec 13, 2007 8:56 pm

Re: shadow of the beast ST (Mark mc cubbin here)

Postby swapd0 » Thu Oct 17, 2019 6:48 pm

The problem it's that, when it's accesses without .w it's stored as $00ff8606, if I expand the value to 32bits to have $ffff8606 the bin compare to test the disassembly will fail.

I've no idea how to fix it.
You do not have the required permissions to view the files attached to this post.

User avatar
Cyprian
10 GOTO 10
10 GOTO 10
Posts: 1741
Joined: Fri Oct 04, 2002 11:23 am
Location: Warsaw, Poland

Re: shadow of the beast ST (Mark mc cubbin here)

Postby Cyprian » Thu Oct 17, 2019 6:51 pm

Does this picture show original code?
If yes, there were no ".w" used there.

_TMP_Devpac.png
You do not have the required permissions to view the files attached to this post.
Lynx II / Jaugar / TT030 / Mega STe / 800 XL / 1040 STe / Falcon030 / 65 XE / 520 STm / SM124 / SC1435
SDrive / PAK68/3 / Lynx Multi Card / LDW Super 2000 / XCA12 / SkunkBoard / CosmosEx / SatanDisk / UltraSatan / USB Floppy Drive Emulator / Eiffel / SIO2PC / Crazy Dots / PAM Net
Hatari / Steem SSE / Aranym / Saint
http://260ste.appspot.com/

swapd0
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 102
Joined: Thu Dec 13, 2007 8:56 pm

Re: shadow of the beast ST (Mark mc cubbin here)

Postby swapd0 » Thu Oct 17, 2019 7:28 pm

For that value In some parts it's .w in other ".l", the palette never it's accessed with .w ...


Social Media

     

Return to “Games - General”

Who is online

Users browsing this forum: No registered users and 4 guests