Mercurial > hg > Members > kono > nitros9-code
changeset 2981:9550602c9a0b
sierra/objs_lsl/mnln.asm: Use division quotient, not remainder
It calls a routine twice to make a division (L125C) but doesn't check
the right register for the result. The result is returned in reg U and
the remainder in reg D but the procedure expect the result to be returned
in reg D. The divison routine seems to be correct because it is properly
used elsewhere in the code.
Patch by Guillaume Major and Robert Gault.
author | Guillaume Major <guillaume.major@gmail.com> |
---|---|
date | Sat, 12 Apr 2014 15:30:03 +0200 |
parents | f41c4caac519 |
children | 83f8f5e29ac5 |
files | 3rdparty/packages/sierra/objs_lsl/mnln.asm |
diffstat | 1 files changed, 7 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/3rdparty/packages/sierra/objs_lsl/mnln.asm Sat Apr 12 15:29:49 2014 +0200 +++ b/3rdparty/packages/sierra/objs_lsl/mnln.asm Sat Apr 12 15:30:03 2014 +0200 @@ -28,7 +28,7 @@ * This solves multiple problems with DW3 application. Robert Gault * April 28, 2010 - Adjusting the RS-232 input direction seems to cause other problems, probably at the other * end of the RS-232 connection. I've gone back to masking the bit at $FF20. RG - +* April 4, 2014 - Corrected the set.pri.base routine used in KQ4. GM & RG * >$0154 flag for using extended lookups * >$0541 joystick button status @@ -1993,7 +1993,7 @@ mul ldu #$000A lbsr L125C - std $02,s + stu $02,s * Save the division result clrb stb ,s L1178 subb $01,s @@ -2003,7 +2003,7 @@ L1180 lda #$A8 mul ldu $02,s - lbsr L125C + lbsr L125CB * perform tfr u,d as well addd #$0005 cmpd #$000F bls L1193 @@ -10758,6 +10758,10 @@ bra L6323 L6334 rts +L125CB lbsr L125C + tfr u,d + rts + fcb 0,0,0,0,0,0,0,0 L633D fcc /mnln/ fcb 0