Re: [hatari-devel] New version of WinUAE's cpu core

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Am Mon, 24 Nov 2014 22:41:13 +0100
schrieb Thomas Huth <th.huth@xxxxxx>:

> Am Mon, 24 Nov 2014 13:59:18 +0100
> schrieb Nicolas Pomarède <npomarede@xxxxxxxxxxxx>:
> 
> > Le 24/11/2014 13:01, Troed Sångberg a écrit :
> > > (The space filling nop in region one might be needed to set d0 to
> > > 0 if later code relies upon it of course)
> > >
> > > I don't think region two can be solved (it's 7 words, not bytes
> > > as I wrote earlier) in the same amount of code space, which means
> > > a proper solution would need to jump to another part of memory to
> > > execute proper initialization and then back. The only solution
> > > that fits in seven words relies heavily on assumptions about (a0)
> > > not being used for subsequent code, that we're free to abuse the
> > > even memory locations (I'm unsure if that's valid on more modern
> > > Ataris)
> 
> Writing to the even addresses should be fine with Hatari (as long as
> the uneven address is written in the same access, too).
> 
> > > and that uninitialized means zero or at least a known static value
> > > (which is likely not true). That is - the following is not a real
> > > suggestion, it's just what's needed to get code to fit in the same
> > > space. Maybe it helps someone else coming up with something
> > > better.
> > >
> > > lea $fffffa26.w,a0
> > > clr.w (a0)+
> > > move.w #$88,(a0)+
> > > addq.w #1,(a0)+
> > > addq.w #5,(a0)
> > > /Troed
> 
> Right after the code, there is a:
> 
> $e02640 : 4a39 0000 0a87        tst.b     $a87
> 
> I think this also could be shortened by two bytes by using $a87.w
> instead? Of course, we would also have to make sure that no other code
> jumps to $e02640 directly.

FYI, by shortening the tst.b, I've fitted now the following code in the
area:

	lea $fffffa26.w,a0
	move.l	#$00000088,(a0)+
	move.l	#$00010005,(a0)
	tst.b	$a87.w

TOS 4.04 now reaches the desktop with a 68060 again, too.

 Thomas




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/