![]() |
![]() |
#61 | |
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,447
|
Quote:
Don't take it the wrong way. D0 - D7 are data registers. Dx would be a variable if declared. Last edited by jotd; 27 May 2024 at 23:06. |
|
![]() |
![]() |
#62 | |
Registered User
Join Date: Jul 2009
Location: Lala Land
Posts: 608
|
Quote:
![]() |
|
![]() |
![]() |
#63 |
Registered User
Join Date: Feb 2019
Location: USA/Texas
Posts: 81
|
I see but for example in this case the affected parts are this ones:
HTML Code:
_CD32_Common_Held ;Used for Pause button move.l joy1(pc),d1 lea _held_button(pc),a1 btst.l d2,d1 beq .NotPressed btst.l d2,(a1) bne .clrkey bset.l d2,(a1) move.b d3,d0 bra .exit HTML Code:
btst.l d2,(a1) HTML Code:
bset.l d2,(a1) |
![]() |
![]() |
#64 |
Registered User
Join Date: Feb 2019
Location: USA/Texas
Posts: 81
|
I made this test could figure to work?
HTML Code:
_CD32_Common_Held move.l joy1(pc),d1 lea _held_button(pc),a1 btst.l d2,d1 beq .NotPressed move.l (a1),d0 btst.l d2,d0 bne .clrkey move.l (a1),d0 bset.l d2,d0 move.l d0,(a1) move.b d3,d0 bra .exit |
![]() |
![]() |
#65 | |
Registered User
Join Date: Jul 2009
Location: Lala Land
Posts: 608
|
Quote:
If that is correct then "move.l (a1), d0; btst d2, d0" tests the longword at a1 and "btst d2, (a1)" tests the byte at a1. Hopefully someone will double check my logic. Last edited by copse; 28 May 2024 at 01:38. |
|
![]() |
![]() |
#66 |
Registered User
Join Date: Jul 2009
Location: Lala Land
Posts: 608
|
Since I no longer trust anything I have not seen run myself, I ran it through an m68k simulator (https://asm-editor.specy.app/):
Code:
lea $2000, a1 move.l #$FF000000, (a1)+ move.l #1, d1 lea $2000, a1 btst d1, (a1) ; N flag zero after this line (all flags zero) move.l (a1), d0 btst d1, d0 ; N and Z flags set after this line (others zero) |
![]() |
![]() |
#67 |
Registered User
Join Date: Feb 2019
Location: USA/Texas
Posts: 81
|
Oh excellent idea the simulator. I think is fine now.
|
![]() |
![]() |
#68 |
Registered User
Join Date: Jan 2008
Location: Warsaw/Poland
Age: 56
Posts: 2,125
|
Something like this:
Code:
_CD32_Common_Held ;Used for Pause button move.l joy1(pc),d1 lea _held_button(pc),a1 move.l (a1),d0 btst.l d2,d1 beq .NotPressed ; btst.l d2,(a1) btst d2,d0 bne .clrkey ; bset.l d2,(a1) bset d2,d0 move.l d0,(a1) move.b d3,d0 bra .exit .NotPressed ; bclr d2,(a1) bclr d2,d0 move.l d0,(a1) .clrkey moveq #0,d0 .exit rts Then bclr is also affected, not only btst, bset or bchg. Of course this is next bug in original code. |
![]() |
![]() |
#69 | |
Registered User
Join Date: Jan 2008
Location: Warsaw/Poland
Age: 56
Posts: 2,125
|
Quote:
Also new look at old code can be useful. I dont expected that many bugs exists in some WHDload slaves. For me joypad code and second fire code cant works correctly. If same code was reused in other slaves, then more slaves can be affected. |
|
![]() |
![]() |
#70 |
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,447
|
newest slaves with joypad code works properly since 2020 at least. He just picked an old one.
|
![]() |
![]() |
#71 |
Registered User
Join Date: Jan 2008
Location: Warsaw/Poland
Age: 56
Posts: 2,125
|
For this game, no new slave, since 2011 year
I dont have joypad for tests. But I remember some threads on EAB about strange working joypad buttons. |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
PPC crashes when WHDload is started | Hedeon | project.WHDLoad | 5 | 15 May 2012 14:32 |
n00b guide to getting whdload started please? | DoneYone | project.ClassicWB | 18 | 06 August 2009 14:40 |
Need a little help getting started... | stevecole | New to Emulation or Amiga scene | 20 | 18 April 2009 21:30 |
Getting started!! | thequeenfan | New to Emulation or Amiga scene | 14 | 18 December 2003 23:46 |
Getting started again | The Shadow | New to Emulation or Amiga scene | 1 | 07 April 2002 22:42 |
|
|