Re: [hatari-devel] a rare F030 incompatibility

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


...cont'd....

I found this in a later version of the source. I haven't checked the original, but I expect to find something similar...



*-------------------------------------------------------*
    text
*-------------------------------------------------------*

*-------------------------------------------------------*
expose_detect:
*-------------------------------------------------------*
*    Set up bus handler                *
*-------------------------------------------------------*
    move.l        $8.w,-(sp)
    move.l        #.bus_handler,$8.w
*-------------------------------------------------------*
*    Assume expose present                *
*-------------------------------------------------------*
    st        expose_flag
*-------------------------------------------------------*
*    Resynchronizing nop                *
*-------------------------------------------------------*
    nop
*-------------------------------------------------------*
*    Access error if Expose not available        *
*-------------------------------------------------------*
    tst.w        DIGICTRL
    bra.s        .bus_return
*-------------------------------------------------------*
*    Access error handler                *
*-------------------------------------------------------*
.bus_handler:
*-------------------------------------------------------*
    sf        expose_flag
*-------------------------------------------------------*
*    Get stack frame format                *
*-------------------------------------------------------*
    move.b        6(sp),d0
    lsr.b        #4,d0
*-------------------------------------------------------*
*    Handle 68020/30 short/long buserr formats    *
*-------------------------------------------------------*
    cmp.b        #7,d0
    beq.s        .bus40
    cmp.b        #10,d0
    beq.s        .bus30
    cmp.b        #11,d0
    beq.s        .bus30
*-------------------------------------------------------*
*    Unknown stackframe format            *
*-------------------------------------------------------*
    rte
*-------------------------------------------------------*
*    68020/30 buserr stackframe cleanup        *
*-------------------------------------------------------*
.bus30:    and.w        #$feff,10(sp)
    rte
*-------------------------------------------------------*
*    68040 access error stackframe cleanup        *
*-------------------------------------------------------*
.bus40:    move.l        #.bus_return,2(sp)
    rte
*-------------------------------------------------------*
*    68040 return address                *
*-------------------------------------------------------*
.bus_return:
*-------------------------------------------------------*
*    Restore bus handler                *
*-------------------------------------------------------*
    move.l        (sp)+,$8.w
*-------------------------------------------------------*
    rts

*-------------------------------------------------------*
    bss   
*-------------------------------------------------------*

expose_flag        ds.b    1
            even

*-------------------------------------------------------*
    text
*-------------------------------------------------------*


On 16 October 2015 at 10:46, Thomas Huth <th.huth@xxxxxx> wrote:
On 16/10/15 10:52, Douglas Little wrote:
> Hi,
>
> I was testing some old stuff (a prototype version of Apex) and noticed
> that it won't run under Hatari - it throws bus errors immediately.
>
> The same program runs ok on my F030.
>
> Looking more closely, the the code is checking for a HW digitizer using
> an unusual address range:
>
> *-------------------------------------------------------*
>
> DIGICTRL        =    $FFF20000
> DIGIPAGE        =    $FFF40000
>
>
>
> I think this was the address space for the F030 Expose digitizer which I
> did support in a few programs.
>
> I don't know if anyone else still has one of these - or more
> importantly, how many programs will try to check for it - but it might
> be nice to make that space readable in supervisor mode, as seems to be
> the case on real HW.

It's unfortunately not that easy - we had a look at this a couple of
years before already, see:

http://dhs.nu/bbs-coding/index.php?request=3055

and especially:

http://dhs.nu/bbs-coding/index.php?request=3058

tl;dr: This address normally causes a bus error - just in Apex it works
for some unknown magic reasons.

 Thomas






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