Commit Graph

15 Commits

Author SHA1 Message Date
Joshua Bell
13c1f6166a Move macros.inc into inc/ to tidy top level dir 2019-07-27 10:49:13 -07:00
Joshua Bell
ff2f652c96 Move MGTK to mgtk/ dir to tidy up top level 2019-07-27 10:45:31 -07:00
Joshua Bell
25297ccb28 Simplify Calculator DA's init/exit/redraw logic 2019-07-11 16:43:15 -07:00
Joshua Bell
46e413f3f1 Prevent crashes in Calculator/Eyes DA using ROM FP routines
During calls, MGTK uses the top half of the zero page to hold the
active grafport and local variables. It normally saves/restores the ZP
on each call so that the application's ZP state is preserved. Per
docs, the ZP1 call with param $00 can be used to disable this; MGTK
will write its state to the ZP and assume the ZP is not touched until
a subsequent ZP1 call with param $80, allowing higher performance.

DeskTop would normally run in this state ($00), except when DAs were
invoked since they could use ROM routines (etc) and expect the top
half of the ZP to be preserved during MGTK calls. But it did this with
a toggle ($00, $80, run the DA, then $00 again). Confusingly, the Calc
(and Eyes, c/o copy/pasta) DA would also attempt to get to a normal
state when running ($80, run, $00).

In rev 30532c31 I disabled DeskTop's toggling around DAs to fix an
issue in the Sort Directory DA (see #119), which might have changed
the overall behavior. The result is that on the IIc+ (and possibly
other hardware, but not Virtual II or Laser 128EX) the Calc and Eyes
DAs would crash.

This change disables use of the ZP1 by DeskTop and the DAs. This will
likely impair performance somewhat due to the save/restore overhead on
each call, but at least this gets us to a "known good state".

Fixes #157, #158
2019-07-11 15:50:20 -07:00
Joshua Bell
83e5fe0af4 Remove obsolete comment 2019-04-23 21:20:08 -07:00
Joshua Bell
79040d3b46 Eyes DA: Tweak dimensions slightly to fill space better 2018-12-28 16:24:37 -08:00
Joshua Bell
63dd2e7585 Prefer = for constants and := for labels (new code too) 2018-12-28 16:18:08 -08:00
Joshua Bell
d8baeddbe0 Restore new DAs to fixes branch
This reverts commit 6788d153af.
2018-12-09 20:08:57 -08:00
Joshua Bell
6788d153af Remove new DAs from master branch 2018-12-09 20:08:30 -08:00
Joshua Bell
1bb2824ea5 MGTK: Start using enums/constants 2018-11-17 20:34:17 -08:00
Joshua Bell
7ac11c080d include tidying 2018-05-02 20:04:56 -07:00
Joshua Bell
f77932a28d Split desktop source into separate files 2018-05-02 19:58:17 -07:00
Joshua Bell
62139539d7 Eyes DA: Fix glitch on first run 2018-04-18 22:37:52 -07:00
Joshua Bell
cc2f1d13a8 Eyes DA: Make resizable 2018-04-17 22:31:23 -07:00
Joshua Bell
66cae9a01f Eyes DA 2018-04-16 21:26:52 -07:00