Login
Search for:


Previous | Next

From: indi (all posts)
Date: 1998-06-07
Subject: Re: Minus4 branch bug and fix
>The branch instructions take 4 cycles in the emulator,
>if they are at an address which equals or higher than $8000
>even when they are not crossing page boundaries.
>This happens because you defined NewPC as int16, and in
>the comparison this is sign extended to 32 bit (I checked the
>dissasembled code)
>The fix:
>you have to define NewPC as uint16.
>Affected files:
>bcc.c
>bcs.c
>beq.c
>bmi.c
>bne.c
>bpl.c
>bvc.c
>bvs.c

Bugger... another good one. :-) (fixed)
Well done... and...err... since your on a roll <g>
Theres STILL a CPU bug hidden somewhere... Mercenary doesn't quite work right. Lines don't draw correctly, and sometimes it just messes up. All this is CPU based... so theres still a problem in there..

My "guess" would be a carry or overflow being set/notset correctly..

Wanna find that one :-)

Mike
^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^
Mike Dailly mike@scotch.demon.co.uk http://www.scotch.demon.co.uk
(Please remove the <REMOVE_ME> from my e-mail address when replying)

Copyright © Plus/4 World Team, 2001-2024. Support Plus/4 World on Patreon