Author Topic: Grammer 2-The APP  (Read 48876 times)

0 Members and 1 Guest are viewing this topic.

Offline Stefan Bauwens

  • Creator of Myst 89 - סטיבן
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1799
  • Rating: +162/-24
  • 68k programmer
    • View Profile
    • Portfolio
Re: Grammer 2-The APP
« Reply #435 on: November 13, 2018, 02:19:36 pm »
Looking good Xeda :)

Very proud POTY winner (2011 68k) with Myst 89!
Very proud DBZ winner(2013)

Interview with me

Offline Art_of_camelot

  • ಠ_ಠ ( ͡° ͜ʖ ͡°)
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 6147
  • Rating: +191/-9
  • YouTube channel has my solo work and collaboration
    • View Profile
    • My YouTube page!
Re: Grammer 2-The APP
« Reply #436 on: November 14, 2018, 02:18:29 am »
Nice! I wonder why scrolling up is slower though...

Offline Eeems

  • Mr. Dictator
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6129
  • Rating: +317/-36
  • C'est la vie
    • View Profile
    • Eeems
Re: Grammer 2-The APP
« Reply #437 on: November 14, 2018, 09:59:18 am »
From a conversation on IRC it's due to searching through the VAT in reverse. I believe @Runer112 had some suggestions on how to speed it up though.

Offline Xeda112358

  • Xombie.
  • Project Author
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4460
  • Rating: +703/-6
  • meow :3
    • View Profile
Re: Grammer 2-The APP
« Reply #438 on: November 19, 2018, 03:44:40 pm »
Code: [Select]
13 Nov. 2018
  - Cleaning up code, removing (at least temporarily)
    routines that aren't vital, or useful.
      - Fire graphics code.     **Probably temporary.
      - Factoring code.         **Probably permanent.
  - Optimized CopyHex
  - ConvHexStr is reorganized to be smaller
14 Nov. 2018
  - Optimized ConvOP1 to be smaller, updated performance
  - Optimized GetPixelLoc 3 bytes smaller, 10cc faster
  - Optimized ReadArc routine. 3 bytes smaller, 18cc
    faster for archived data, 3cc slower for data in RAM.
  - Removed LoadTSA as the only internal usage was to load
    the ReadArc routine. Instead it is a specialized routine
    that no longer destroys IX. Next savings of 11 bytes,
    even after extended the mov9 LDI chain to a mov13. Saves
    172cc overall (186cc, actually, since no more ld ix,**)
  - Error also takes advantage of mov13, saving 2 bytes.
  - Added a few more fixed-size moves, including mov768.
    Total cost was 6 bytes.
  - ClrHome uses the faster SetSmallMem, saves a byte.
    Makes it 901cc faster, roughly 21% faster
  - I removed the unknown routine I labeled "lbl000", as it
    isn't used anywhere (or shouldn't be!) It looks like an
    attempt at making an off-page call, probably when the
    low mem scared me.
  - Optimized and fixed IsHexTok. It used to accept the
    ' and ' token as equivalent to 9. Saved a byte and 2cc
    when the token was 0~9.
  - Optimized DE_Times_BC. No change in size, 120cc faster
    in the average case. No longer leaves A=0.
  - optimized HL_Div_BC to be 264cc faster on average, with
    a net cost of five bytes. DE_Div_BC is now the
    subroutine, though, and is 272cc faster than if you had
    called it previously. Nearly 18% speed up
  - Fixed SearchString at a cost of 8 bytes, but should
    perform roughly 4 times faster. Also, there is now no
    risk of it entering an infinite loop, an issue the
    previous routine had.
  - SqrtHL is optimized. Actually replaced with SqrtDE.
    Saved 2 bytes, on average 261cc faster (20.17% faster).
    Worst case is still 165cc faster (12.75% faster).
15 Nov. 2018
  - I replaced the Sqrt routine with Runer112's from Axe.
    It is 221cc faster with the small modifications on my
    part to fit the output registers, and 2 bytes smaller.
    That's roughly 21.5% faster.
  - Removed ConvNumBase and HL_Div_C. HL_Div_C was only
    used by ConvNumBase, and ConvNumBase wasn't used
    anywhere in the code.
  - Changed Is_2_Byte. It's no faster or slower, just
    a little more sensible and readable.
  - Removed HexTok and GetHexAtDE.
  - Moved CompatCall so it didn't have to JP to
    IsOP1GrammerProg, saving 3 bytes and 10cc
  - Removed EndHook2 as it appears unused?
  - Optimized ONErr to be 1 byte less, 2cc faster.
  - Optimized TileMap1. 21cc faster, 2 bytes smaller.
  - Removed HL_SDiv_BC replacing the only use of it
    with a wrapper around a call to HL_Div_BC.
    Net 21 bytes smaller. Signed division command now
    averages about 47cc faster.
  - Removed PutIM, ParseFullArgI, CallI, CopyZStr,
    CreateZVar, FindVar.
  - Renamed memory addresses in the Menu command.
    May have messed something up.
  - vPutscr is 1 byte smaller, 3cc faster.
  - Optimized DrawRectToGraphI since it didn't need
    to preserve registers. Saved 9 bytes.
19 Nov. 2011
  - Did some testing and fixed some new bugs.
  - Fixed LoadReadArc. Needed 6 more bytes, saves
    another 76cc.
  - Opted to use interrupts for the Pause routine. It
    isn't as close to 1/100 seconds, but it is more
    energy efficient, smaller, and more reliable.
No screenshots as it's just behind-the-scenes code modifications.

Offline Xeda112358

  • Xombie.
  • Project Author
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4460
  • Rating: +703/-6
  • meow :3
    • View Profile
Re: Grammer 2-The APP
« Reply #439 on: November 23, 2018, 12:50:37 am »
I'm too tired for a full report, but I'll use this as a backup.
I fixed a few bugs introduced in the last version, optimized and cleaned up some more code, and most importantly, I totally overhauled the module system. I renamed the token to just '$'. By storing to it, you can basically register a module to be searched after the default one is searched. At the moment, up to 5 additional modules can be used, which could greatly extend the functionality of Grammer. They can be archived now, and I moved the Menu routine to an external module (appv Grampkg). I still need to do a lot of documentation, but not tonight. Attached is a screenshot of what the code looks like (with the token hook). Good night y'all.

Offline ClainBill

  • LV0 Newcomer (Next: 5)
  • Posts: 4
  • Rating: +0/-0
  • Nuckleheadmcspasatron
    • View Profile
Re: Grammer 2-The APP
« Reply #440 on: November 23, 2018, 03:29:48 pm »
Looks awesome
ClainBill YouTube