#152 unaliged memory & render improvements

open
nobody
None
5
2012-09-07
2006-02-06
Keith
No

cut the number of calls in half, quarter for unaligned r/w.

changed strcopy, memcpy, block r/w to 16 bit blits.

seperated start/end update, getrgb by render type (removes overhead, cleaner code IMO).

Discussion

  • Keith

    Keith - 2006-02-07
     
    Attachments
  • Keith

    Keith - 2006-02-16

    Logged In: YES
    user_id=1008467

    Updated to latest CVS. Added changes to normal_loop: got
    rid of some unnecessrary jumps. To get rid of gotos could
    do nested while(1)s, though it makes the code wide from
    indention(reason why I stayed with goto).

     
  • Keith

    Keith - 2006-02-16
     
    Attachments
  • c2woody

    c2woody - 2006-05-19

    Logged In: YES
    user_id=1304940

    Thank you for your work!

    Some questions about the memory function changes:

    usage of mem_readd_inline(address-1) in mem_unalignedreadw
    can result in wrong linear addresses for pagefaults, might
    create problems when something checks against a forced
    value of cr2 (unlikely though).

    in mem_memcpy, you used size&1 followed by a 1-byte copy
    to get a word count, but this results in a lot of unaligned
    memory reads/writes if src and dest were word-aligned and
    size is a non-even value. Shouldn't alignment be done
    according to the src first, then the cutting with size&1?

     
  • Keith

    Keith - 2006-06-07

    Logged In: YES
    user_id=1008467

    Been a long time since I've look at this. I hadn't considered the first condition and the second, wouldn't it be virtual alignnment? I did a rewrite test like you described and it wasn't happy with the odd byte shore up, after the fact.

     
  • c2woody

    c2woody - 2006-06-08

    Logged In: YES
    user_id=1304940

    Virtual pages are always 4k-aligned, so it shouldn't matter.
    Or do you mean the word-strings at odd addresses?

     
  • Keith

    Keith - 2006-06-08

    Logged In: YES
    user_id=1008467

    Referring to dosbox virtual addressing vs real host addressing. If I recall, I profiled it at the time but to be sure you'd probably want to recheck it.

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks