Commit Graph

101 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
92482500a6 Calculator DA: Fix FSUB call. Fixes #159
When updating how Calculator calls ROM routines in 88666311 the FSUB
wrapper was missing a PLA. Convert the wrappers into a macro to avoid
such mistakes (D.R.Y.)

Also, updated refs to CHRGET routine.
2019-07-11 21:18:48 -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
345f08a5ab Merge remote-tracking branch 'origin/disasm' 2019-03-30 08:23:51 -07:00
Joshua Bell
d15e52eb53 Macros for relocated procs 2019-03-30 08:21:34 -07:00
Joshua Bell
6e8e5a4cd4 Merge remote-tracking branch 'origin/disasm' 2018-12-28 15:47:20 -08:00
Joshua Bell
ceec6f41a4 Prefer = for constants and := for labels 2018-12-28 15:46:09 -08:00
Joshua Bell
ed464dd1fa Merge remote-tracking branch 'origin/disasm' 2018-12-24 18:23:34 -08:00
Joshua Bell
5233597109 disasm: misc macros, constants 2018-12-24 16:00:55 -08:00
Joshua Bell
d83b300eab Pick up MGTK enums 2018-12-09 20:08:38 -08:00
Joshua Bell
4db53ea196 Calculator: remove offscreen flag 2018-12-09 20:08:37 -08:00
Joshua Bell
8866631110 Move calc fixes into original file 2018-12-09 20:08:37 -08:00
Joshua Bell
adbd1c8fc7 disasm: block copy macros, rename pointers 2018-12-08 09:56:47 -08:00
Joshua Bell
1bb2824ea5 MGTK: Start using enums/constants 2018-11-17 20:34:17 -08:00
Joshua Bell
ad71d77c3d Character masks, and sort directory DA identifications 2018-06-01 18:52:26 -07: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
8fdf8addc3 de-raw 2018-03-07 10:39:36 -08:00
Joshua Bell
08a034911b wider block separator comment 2018-03-04 21:36:00 -08:00
Joshua Bell
f1bd7e8825 prodos macros for das 2018-02-26 20:51:23 -08:00
Joshua Bell
de85dad1c1 Consolidate include files 2018-02-26 20:13:18 -08:00
Joshua Bell
77bda904ab macros for DAs 2018-02-06 18:42:00 -08:00
Joshua Bell
faa22b2c2c Desktop API calls 2018-02-04 19:13:21 -08:00
Joshua Bell
6eee3b4ba4 prefix event kind 2018-02-02 20:10:19 -08:00
Joshua Bell
e8fa13c588 param ids 2018-01-31 00:18:07 -08:00
Joshua Bell
6315aab0f7 DAs: winfo members 2018-01-29 21:11:32 -08:00
Joshua Bell
76311ce501 DA: renames 2018-01-29 20:49:42 -08:00
Joshua Bell
6a2aa90656 DAs: rename structs 2018-01-29 20:14:34 -08:00
Joshua Bell
fa0126feac MGTK call ids 2018-01-29 08:38:23 -08:00
Joshua Bell
a63eca2a0e MGTK internal renames 2018-01-29 00:57:55 -08:00
Joshua Bell
1ae615fb20 Rename A2D to MGTK 2018-01-28 22:03:48 -08:00
Joshua Bell
a541023587 Pull the rogue DeskTop segment 51F-DFF into DeskTop, update include files 2018-01-20 10:40:48 -08:00
Joshua Bell
a513ac12d8 DeskTop: Start cleaning up Loader 2018-01-04 21:57:50 -08:00
Joshua Bell
8800a0a59b Split up include files for GUI library vs. DeskTop app 2017-10-11 20:45:58 -07:00
Joshua Bell
6bd9738e90 Standardize state label names a bit 2017-10-07 20:22:39 -07:00
Joshua Bell
e681879ede DeskTop Seg 1: various symbols 2017-10-07 13:59:25 -07:00
Joshua Bell
574d59072b Identify 'moved' output byte from DRAG 2017-09-24 21:02:13 -07:00
Joshua Bell
fa98ed8445 Identify 'next' member of window params 2017-09-24 19:59:49 -07:00
Joshua Bell
7da8d58ee0 Document offset params for DRAW_BITMAP 2017-09-24 17:57:57 -07:00
Joshua Bell
1d51caeea0 Identify 'tmask' property of window parans/state 2017-09-23 20:53:19 -07:00
Joshua Bell
e14adf3ffa Confirm font usage, add converter and a handful of fonts 2017-09-23 14:10:53 -07:00
Joshua Bell
13e8479fc5 Tentatively identify CONFIGURE_ZP_USE 2017-09-21 08:09:11 -07:00
Joshua Bell
bc47645c5f Add modified calc with bugs #33, #34 fixed 2017-09-20 19:54:19 -07:00
Joshua Bell
e94b6e7f2d Identify SET_INPUT 2017-09-19 07:58:17 -07:00
Joshua Bell
15e354c927 Identify SET_TEXT_MASK 2017-09-18 22:51:24 -07:00
Joshua Bell
aede1af6e9 Identify SET_CURSOR 2017-09-18 21:32:46 -07:00
Joshua Bell
c39a8a5816 Figured out $8E00 call - redraws desktop icons.
Also found a couple bugs:
https://github.com/inexorabletash/a2d/issues/33
https://github.com/inexorabletash/a2d/issues/34
2017-09-18 18:34:45 -07:00
Joshua Bell
c1ece9ad71 Standardize on sizeof_ hack 2017-09-18 17:17:30 -07:00