Results 1 to 6 of 6

Thread: FastCache040+ Released!

  1. #1
    VIP
    Amibayer!
    SpeedGeek's Avatar
    Join Date
    Jan 2011
    Country
    USA
    Region:
    Wisconsin
    Age
    54
    Posts
    848
    Feedback
    21 (100%)

    Lightbulb FastCache040+ Released!

    FastCache040+ 1.0 ©SpeedGeek 2017

    INTRODUCTION:
    FastCache040+ is a patch to replace the CachePreDMA() and
    CachePostDMA() functions of most 68040/060 libraries. While
    the old functions are adequate they are far from optimal.
    These old functions have 3x more code then the new ones
    provided with this patch!

    Also, the new functions implement a much more efficient method
    of managing the Copyback cache for DMA. While every system
    will have some CPU performance loss under DMA conditions, the
    new functions keep this performance loss to a bare minimum.

    FEATURES:
    - Replaces CachePreDMA() and CachePostDMA() with smaller
    and more efficient code
    - Replaces complex MMU code with simple and fast DTTR code
    - Temporarily changes Copyback mode to Write Through for DMA
    (but only when required!)
    - Never flushes the ATC!
    - Never flushes the DC for Chip RAM DMA!
    - Uses 68040/060 library detection code
    - Will not patch itself
    - 100% Assembler code

    CODE SIZE COMPARISONS:
    - FastCache040+ 1.0 (NewFunc 132 bytes)
    - 68060.library 46.7 (OldFunc 304 bytes)
    - 68040.library 44.2 (OldFunc 414 bytes)

    REQUIREMENTS:
    - Amiga with 68040 or 68060 CPU and MMU
    - 68040.library or 68060.library

    WARNING:
    Do NOT use this patch with GigaMEM, VMM or any similar
    virtual memory software! Do NOT use this patch with any
    code which uses the MMU to write protect or remap modified
    data structures!

    NOTES:
    Remapping a mirror image of the Kickstart ROM with the MMU
    is OK! The new functions still have one thing in common with
    the old functions. They do NOT translate virtual addresses
    as specified in the Amiga RKRM! For more info on the old
    functions see the Enforcer.guide by Michael Sinz.

    HISTORY:
    v1.0 - First release

    Here is the link:

    http://eab.abime.net/showthread.php?...90#post1189690

    Last edited by SpeedGeek; 11th October 2017 at 13:40.

  2. #2
    VIP
    Amibayer!
    SpeedGeek's Avatar
    Join Date
    Jan 2011
    Country
    USA
    Region:
    Wisconsin
    Age
    54
    Posts
    848
    Feedback
    21 (100%)

    Default

    ** NEWS UPDATE **

    Sorry, there was a bug in v1.0 with the patch install code.

    v1.1 - Fixed a bug which prevented the patch from installing
    - Added code to use OldCachePreDMA for MEMF_24BIT
    transfers (I don't know why errors occured here)
    Last edited by SpeedGeek; 6th October 2017 at 07:31.

  3. #3
    VIP
    Amibayer!
    SpeedGeek's Avatar
    Join Date
    Jan 2011
    Country
    USA
    Region:
    Wisconsin
    Age
    54
    Posts
    848
    Feedback
    21 (100%)

    Default

    ** 2ND NEWS UPDATE **

    v1.2 released (updated patch size info)
    - Added code to use OldCachePostDMA for MEMF_24BIT
    transfers (So MMU Pages can be restored to original)

    EDIT:
    OK, I believe I have found a solution to the MEMF_24BIT transfer
    error problem without OldPre/OldPost calls. Unfortunately, the cache mode would have to be changed to NoCache.

    This would make the NewFunc code a little smaller but could reduce CPU performance a little for MEMF_24BIT transfers.

    So it's a trade off situation... will give it some more thought!
    Last edited by SpeedGeek; 6th October 2017 at 16:38.

  4. #4
    VIP
    Amibayer!
    SpeedGeek's Avatar
    Join Date
    Jan 2011
    Country
    USA
    Region:
    Wisconsin
    Age
    54
    Posts
    848
    Feedback
    21 (100%)

    Default

    ** 3RD NEWS UPDATE **

    v1.3 Released!
    - Added code to change MEMF_24BIT transfers to NoCache.
    This eliminated all OldFunc calls. MEMF_24BIT transfers may have
    some CPU performance loss but the NewFunc code performance
    benefits should still justify this.

    NOTES: v1.2 will still be available for download for users if they
    believe using OldFunc calls is still justified. The v1.2 NewFuncSrc
    for lbC00004E should read as follows:
    CINVA NC ;Support 060, 040 not sure?

    EDIT:
    v1.4 Released!
    - Removed MEMF_24BIT code from PreDMA/PostDMA for the
    case of 16 byte aligned transfers. This will allow
    some MEMF_24BIT transfers to be cache enabled!

    EDIT2:
    The v1.4 NewFuncSrc for lbC000080 should read as follows:
    ORI.W #$8000,D1 ;Cache WT mode + User FC
    Last edited by SpeedGeek; 13th October 2017 at 16:32.

  5. #5
    VIP
    Amibayer!
    SpeedGeek's Avatar
    Join Date
    Jan 2011
    Country
    USA
    Region:
    Wisconsin
    Age
    54
    Posts
    848
    Feedback
    21 (100%)

    Default

    Ok guys, now it's your turn to post your compatibility results!

    Please provide information on 68040.library or 68060.library vendor and version. Also, accelerator card type and vendor is requested too. Thank you!

  6. #6
    VIP
    Amibayer!
    SpeedGeek's Avatar
    Join Date
    Jan 2011
    Country
    USA
    Region:
    Wisconsin
    Age
    54
    Posts
    848
    Feedback
    21 (100%)

    Default

    ** 4TH NEWS UPDATE **

    The was another stupid version bug in v1.4 which has now been fixed (It was a just a fully functional v1.4 reporting itself as v1.3).

    I now have a simple benchmark tool called "CacheDMAmips" (see attached image). I will probably release it when I am satisfied with the compatibility results.
    Attached Thumbnails Attached Thumbnails FASTCACHE040+.PNG  
    Last edited by SpeedGeek; 16th October 2017 at 05:00.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •