Re: [hatari-devel] VDI resolution limits

[ Thread Index | Date Index | More Archives ]


On 05/11/2018 05:00 PM, Eero Tamminen wrote:
I've been bisecting this, and it's actually a *very* old regression.

I had to go from current Hatari down to Hatari v0.40 from 2003, until
I started to get versions where this works.  During which time Hatari
build system (make -> autotools -> cmake), dependencies and command
line options options have changed *a lot*.

Latest Hatari version where 1024x768 VDI mode works with TOS v1.04
is v0.90, and it doesn't anymore work in v1.0.

Guilty commit is this one from 2007:
changeset:   829:363c98718f37
user:        thothy
date:        Sat Nov 24 19:45:49 2007 +0000
summary:     The VDI resolution screen size is now calculated in a more flexible way.

It removed padding between VDI screen and RAM end.

After this, TOS dies trying to access memory outside of RAM
(here, with 4MB):
     Bus error wget at 00400000

FYI: The TOS v1.04 code doing this is following:
$00fd0c52 : 3411       move.w    (a1),d2
$00fd0c54 : 4842       swap      d2
$00fd0c56 : 3431 3000  move.w    (a1,d3.w),d2  <= bus error
$00fd0c5a : 24c2       move.l    d2,(a2)+
$00fd0c5c : 4ed3       jmp       (a3)
$00fd0c5e : 3382 3000  move.w    d2,(a1,d3.w)
$00fd0c62 : 4842       swap      d2
$00fd0c64 : 3282       move.w    d2,(a1)
$00fd0c66 : d2c4       adda.w    d4,a1
$00fd0c68 : 51cd ffe8  dbra      d5,$fd0c52
$00fd0c6c : 4e75       rts
> r
  D0 00000008   D1 00010001   D2 55550000   D3 00000002
  D4 00000080   D5 00000000   D6 00000000   D7 003FFFFE
  A0 0000278E   A1 003FFFFE   A2 0000299A   A3 00FD0CA0
  A4 00FD0CC2   A5 00FD0C5E   A6 00FD0C68   A7 000065CA
USP  000061A0 ISP  000065CA
T=00 S=1 M=0 X=0 N=0 Z=0 V=0 C=0 IMASK=4 STP=0

The code at (a3) where it jumps, does a lot of bit rolling etc,
and looks something like I would expect mouse drawing with
masking to look like on CPU.

	- Eero

* It's not because missing mouse drawing clipping as mouse can
   move *within* the bottom right 16x16 area without a crash
* Crash happens when mouse hotspot is vertically within 16 pixels
   of the screen bottom and it crosses the 16 pixel offset from
   the right side of the screen in horizontal direction

-> I'll add a small buffer after VDI screen to avoid this, and
    remove the VDI screen size limits with old TOS versions.

Any idea why these mouse related reads happen only with VDI mode,
and only when mouse moves *horizontally* in this area?

     - Eero

PS. To facilitate the bisecting, I tagged all the Hatari releases
in repository (tags were missing for v0.x versions).

Mail converted by MHonArc 2.6.19+