Commit Graph

100 Commits

Author SHA1 Message Date
Joshua Bell
65d57412da Move MGTK to mgtk/ dir to tidy up top level 2019-07-27 10:45:31 -07:00
Joshua Bell
2730c96058 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
9d6e4ce835 Simplify Calculator DA's init/exit/redraw logic 2019-07-11 16:43:15 -07:00
Joshua Bell
d2f88aaed1 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
1879452886 Merge remote-tracking branch 'origin/disasm' 2019-03-30 08:23:51 -07:00
Joshua Bell
6ec0cf71e4 Macros for relocated procs 2019-03-30 08:21:34 -07:00
Joshua Bell
805d72b056 Merge remote-tracking branch 'origin/disasm' 2018-12-28 15:47:20 -08:00
Joshua Bell
65391b5888 Prefer = for constants and := for labels 2018-12-28 15:46:09 -08:00
Joshua Bell
7281eb2c52 Merge remote-tracking branch 'origin/disasm' 2018-12-24 18:23:34 -08:00
Joshua Bell
08f1901af5 disasm: misc macros, constants 2018-12-24 16:00:55 -08:00
Joshua Bell
550f94f8f6 Pick up MGTK enums 2018-12-09 20:08:38 -08:00
Joshua Bell
926c12f44e Calculator: remove offscreen flag 2018-12-09 20:08:37 -08:00
Joshua Bell
83561b495e Move calc fixes into original file 2018-12-09 20:08:37 -08:00
Joshua Bell
8f1ee6c26a disasm: block copy macros, rename pointers 2018-12-08 09:56:47 -08:00
Joshua Bell
b6546b7340 MGTK: Start using enums/constants 2018-11-17 20:34:17 -08:00
Joshua Bell
25c6caf9c3 Character masks, and sort directory DA identifications 2018-06-01 18:52:26 -07:00
Joshua Bell
d6816fb28c include tidying 2018-05-02 20:04:56 -07:00
Joshua Bell
778e19db19 Split desktop source into separate files 2018-05-02 19:58:17 -07:00
Joshua Bell
85e7478686 de-raw 2018-03-07 10:39:36 -08:00
Joshua Bell
0dfb61dc05 wider block separator comment 2018-03-04 21:36:00 -08:00
Joshua Bell
ede4b40c1c prodos macros for das 2018-02-26 20:51:23 -08:00
Joshua Bell
a82db335b1 Consolidate include files 2018-02-26 20:13:18 -08:00
Joshua Bell
a776e31561 macros for DAs 2018-02-06 18:42:00 -08:00
Joshua Bell
e2407cf726 Desktop API calls 2018-02-04 19:13:21 -08:00
Joshua Bell
fd3400c921 prefix event kind 2018-02-02 20:10:19 -08:00
Joshua Bell
762bfc3b92 param ids 2018-01-31 00:18:07 -08:00
Joshua Bell
fdf946d5dd DAs: winfo members 2018-01-29 21:11:32 -08:00
Joshua Bell
6696b70f94 DA: renames 2018-01-29 20:49:42 -08:00
Joshua Bell
d5ddfd4dab DAs: rename structs 2018-01-29 20:14:34 -08:00
Joshua Bell
eef99d8e8a MGTK call ids 2018-01-29 08:38:23 -08:00
Joshua Bell
c7523f0fb1 MGTK internal renames 2018-01-29 00:57:55 -08:00
Joshua Bell
2d2daeb9d0 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
Joshua Bell
4227be7825 Identify REDRAW_ALL entry point 2017-09-18 08:10:19 -07:00