mirror of
https://github.com/mi57730/a2d.git
synced 2024-06-18 01:29:31 +00:00
Compare commits
127 Commits
v1.2-preal
...
master
Author | SHA1 | Date | |
---|---|---|---|
|
ebb03dbb61 | ||
|
2415869008 | ||
|
daf6e87aec | ||
|
24d318c274 | ||
|
13c1f6166a | ||
|
ff2f652c96 | ||
|
157c6a3f0c | ||
|
6e96eae7ed | ||
|
e8a9add613 | ||
|
37091f842a | ||
|
a2659c7ae0 | ||
|
f96c43c3a3 | ||
|
92482500a6 | ||
|
25297ccb28 | ||
|
46e413f3f1 | ||
|
9e7fcdf9ea | ||
|
393bd12491 | ||
|
2d111d1771 | ||
|
1c10845cfd | ||
|
39260141e8 | ||
|
5efade0c6e | ||
|
dae33abc9a | ||
|
fbfca81acc | ||
|
0daa0f6184 | ||
|
e3424bde4f | ||
|
aa9194ad3f | ||
|
462d3e1914 | ||
|
e028076e0c | ||
|
f5b12036df | ||
|
83e5fe0af4 | ||
|
d324039d84 | ||
|
6a14ad7bf0 | ||
|
4eb5057831 | ||
|
1e162f3564 | ||
|
91d91d14c8 | ||
|
f4114b3900 | ||
|
4c875790b0 | ||
|
3e5bc7d5de | ||
|
bf3ab53af7 | ||
|
c5647d5007 | ||
|
ba8c5a7383 | ||
|
74f11c173d | ||
|
6304d4789d | ||
|
632cad07ee | ||
|
1189a3a275 | ||
|
f93b103687 | ||
|
9b2b361e90 | ||
|
1abe9dec39 | ||
|
7cf6f9406c | ||
|
b971f98a45 | ||
|
1db820679c | ||
|
345f08a5ab | ||
|
d15e52eb53 | ||
|
cb1394f70c | ||
|
05b1c02fe9 | ||
|
6abca47257 | ||
|
6d76fea638 | ||
|
2f2c4ba26b | ||
|
546c264d5e | ||
|
6800e008c3 | ||
|
a9e77de75c | ||
|
c03c12956a | ||
|
b906cbb338 | ||
|
45576a0a88 | ||
|
36439b1219 | ||
|
2905a5c930 | ||
|
b257e03fae | ||
|
6a88449189 | ||
|
a79eba08d1 | ||
|
088ee11777 | ||
|
07efa542fa | ||
|
8b66a9faa0 | ||
|
41cf8f5452 | ||
|
6edb9a3e22 | ||
|
c62ff1bf64 | ||
|
00200ccf59 | ||
|
4dfd612333 | ||
|
18f0749cbe | ||
|
cc1c3217de | ||
|
dd30201bcc | ||
|
0978840c10 | ||
|
a428ba81be | ||
|
efa6842ea9 | ||
|
17184ec4d2 | ||
|
a99b4f4412 | ||
|
b6bcb03a04 | ||
|
18f6a07216 | ||
|
ea44e37814 | ||
|
593bee912d | ||
|
f2830f2140 | ||
|
c81191651b | ||
|
bc56de6ce2 | ||
|
11102afd80 | ||
|
b5d76efcdd | ||
|
08a4ba970d | ||
|
ad75a611a6 | ||
|
63351ff35d | ||
|
b9208870ad | ||
|
a69a6de2e8 | ||
|
c1a32f1656 | ||
|
30e5cf4ea5 | ||
|
3770d0f24c | ||
|
2253754aa5 | ||
|
e41bc03c2e | ||
|
ca8c351d32 | ||
|
f7df942236 | ||
|
2b089124b9 | ||
|
5d35f104b3 | ||
|
9d623520c8 | ||
|
382763aec2 | ||
|
2546a639db | ||
|
910d11b688 | ||
|
411b0fda72 | ||
|
fa6abeffc8 | ||
|
e92822eb8d | ||
|
1bb9388d32 | ||
|
0c8835e6cf | ||
|
bb4adada38 | ||
|
bcebbf0d48 | ||
|
9a3463f37e | ||
|
b2a35e9a56 | ||
|
30b80ac253 | ||
|
101549d7dd | ||
|
24f1b2e993 | ||
|
3c14dfe9d1 | ||
|
82b183bf84 | ||
|
ba949cc02b |
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -5,5 +5,8 @@ out
|
|||
# Directory mounted in Virtual ][ as a ProDOS volume
|
||||
mount
|
||||
|
||||
# Shrinkit file
|
||||
A2D.SHK
|
||||
|
||||
# OS-specific files
|
||||
.DS_Store
|
||||
|
|
|
@ -16,6 +16,9 @@ script:
|
|||
- cd $TRAVIS_BUILD_DIR/desk.acc &&
|
||||
MAKE_FLAGS="CC65=/tmp/cc65/bin" res/go.sh
|
||||
|
||||
- cd $TRAVIS_BUILD_DIR/preview &&
|
||||
MAKE_FLAGS="CC65=/tmp/cc65/bin" res/go.sh
|
||||
|
||||
before_deploy:
|
||||
- git clone https://github.com/mach-kernel/cadius /tmp/cadius &&
|
||||
make -C /tmp/cadius
|
||||
|
@ -30,13 +33,14 @@ before_deploy:
|
|||
|
||||
deploy:
|
||||
provider: releases
|
||||
prerelease: true
|
||||
api_key:
|
||||
secure: GKESS8qxyVM+0LHVniDMIKLi3ACVXQnacUvzEb/Qn+1PEw6aJ43mv4CQ8E8WyDXSi6i0FXgf72ky+bqa5u/ziYLAwgbtyu3MibNYl2Ryx8B/jdUCQsUPPlf75uBRgQNPt8gj9oBfRFh5omhZdNRaX3VHCYqi1ZrbAO3e2nunhfwddwcMLjl8wnzaM1jdm46lfdvt++GeihqCycdKVOpc6GZQqwwVtrHt9315JCzPJ9BXALxaQL0QSCpJ5uQwVhTS0Sh/k+VqxZ/nUyJ5sqgOulBRHwE0bgqKPV6zrnqftCr1PNwRXkOJfY3eM7ZbWr/vH8TaKU/21fSOxr3NmK/mHqiDun5Sm4duIRl+fm9QAxH93uyxsqPeAmxxSfNnvq6G0k3zFXPiRVgy1ceSIvYFZyCjKQEg0FF+vup0NzP85k8TpX3G4CO/WTOwVvnXruomMO5XpR3bnF1TIffDkU4DGtSpCO7FXH/Kq/CVQw3k155DhXE3IsHCId3bxlFnP0YHk/MS6Unzmcc4DDQS8pIgQII7woMv3g8gYiRQvp4gHbNvDbVi0kyAlJYbQ9lvOWjoFYs+sfxKG6J7AgO4CJ0c10/GwitvzGw9CUeR2O2sgX3i4DUbQEDCKgOO8rj+DqNH70ZtwJZmGG1TZfv1Og+hdoz9rLaFXGw1iFJ5/OXsLK8=
|
||||
file:
|
||||
- $TRAVIS_BUILD_DIR/out/A2DeskTop.po
|
||||
- $TRAVIS_BUILD_DIR/desktop/out/DeskTop.po
|
||||
- $TRAVIS_BUILD_DIR/desk.acc/out/DeskAccessories.po
|
||||
- $TRAVIS_BUILD_DIR/desk.acc/out/Preview.po
|
||||
- $TRAVIS_BUILD_DIR/preview/out/Preview.po
|
||||
- $TRAVIS_BUILD_DIR/res/README.txt
|
||||
skip_cleanup: true
|
||||
on:
|
||||
|
|
71
APIs.md
71
APIs.md
|
@ -3,8 +3,8 @@
|
|||
There are three distinct API classes that need to be used:
|
||||
|
||||
* MouseGraphics ToolKit - graphics primitives, windowing and events
|
||||
* Icon TookKit - internal API, MLI-style interface providing icon services
|
||||
* DeskTop Jump Table - simple JSR calls starting at $4003 MAIN, no arguments
|
||||
* DeskTop API - another MLI-style interface starting at $8E00 AUX
|
||||
|
||||
In addition, some DeskTop data structures can be accessed directly.
|
||||
|
||||
|
@ -20,7 +20,7 @@ This is a complex API library written by Apple circa 1985. It consists of:
|
|||
|
||||
Entry point is fixed at $4000 AUX, called MLI-style (JSR followed by command type and address of param block).
|
||||
|
||||
See [MGTK.md](MGTK.md) for further documentation.
|
||||
See [MGTK.md](mgtk/MGTK.md) for further documentation.
|
||||
|
||||
<!-- ============================================================ -->
|
||||
|
||||
|
@ -68,9 +68,9 @@ Eject command
|
|||
Redraws all DeskTop windows. Required after a drag or resize.
|
||||
Follow with `DT_REDRAW_ICONS` call.
|
||||
|
||||
#### `JUMP_TABLE_DESKTOP_RELAY` ($4018)
|
||||
#### `JUMP_TABLE_ITK_RELAY` ($4018)
|
||||
|
||||
DESKTOP relay call (main>aux)
|
||||
Icon ToolKit relay call (main>aux)
|
||||
|
||||
#### `JUMP_TABLE_LOAD_OVL` ($401B)
|
||||
|
||||
|
@ -135,76 +135,80 @@ Used when exiting DeskTop; exit DHR mode, restores DHR mode to color, restores d
|
|||
|
||||
<!-- ============================================================ -->
|
||||
|
||||
## DeskTop API
|
||||
## Icon ToolKit
|
||||
|
||||
This is part of DeskTop (unlike MGTK), but is written to be (mostly) isolated from the rest of the application logic, depending only on MGTK.
|
||||
|
||||
* An internal table of icon number → IconEntry is maintained.
|
||||
* An internal list of highlighted (selected) icons is maintained.
|
||||
* Window-centric calls assume a GrafPort for the window is already the current GrafPort.
|
||||
|
||||
Call from AUX (RAMRDON/RAMWRTON). Call style:
|
||||
```
|
||||
jsr $8E00
|
||||
jsr IconTK::MLI
|
||||
.byte command
|
||||
.addr params
|
||||
```
|
||||
|
||||
Return value in A, 0=success.
|
||||
|
||||
> NOTE: Only some of the calls have been identified.
|
||||
|
||||
Commands:
|
||||
|
||||
### `DT_ADD_ICON` ($01)
|
||||
### `IconTK::ADD_ICON` ($01)
|
||||
|
||||
Parameters: { addr icondata }
|
||||
|
||||
Inserts an icon record into the table.
|
||||
|
||||
### `DT_HIGHLIGHT_ICON` ($02)
|
||||
### `IconTK::HIGHLIGHT_ICON` ($02)
|
||||
|
||||
Parameters: { byte icon }
|
||||
|
||||
Highlights (selects) an icon by number.
|
||||
|
||||
### `DT_REDRAW_ICON` ($03)
|
||||
### `IconTK::REDRAW_ICON` ($03)
|
||||
|
||||
Parameters: { byte icon }
|
||||
|
||||
Redraws an icon by number.
|
||||
|
||||
### `DT_REMOVE_ICON` ($04)
|
||||
### `IconTK::REMOVE_ICON` ($04)
|
||||
|
||||
Parameters: { byte icon }
|
||||
|
||||
Removes an icon by number.
|
||||
|
||||
### `DT_HIGHLIGHT_ALL` ($05)
|
||||
### `IconTK::HIGHLIGHT_ALL` ($05)
|
||||
|
||||
Parameters: { byte window_id }
|
||||
|
||||
Highlights (selects) all icons in a window.
|
||||
Highlights (selects) all icons in specified window (0 = desktop).
|
||||
|
||||
### `DT_UNHIGHLIGHT_ALL` ($06)
|
||||
|
||||
Parameters: _N/A_
|
||||
|
||||
Unhighlights (deselects) all icons.
|
||||
|
||||
### `DT_CLOSE_WINDOW` ($07)
|
||||
### `IconTK::REMOVE_ALL` ($06)
|
||||
|
||||
Parameters: { byte window_id }
|
||||
|
||||
Closes the specified window.
|
||||
Removes all icons from specified window (0 = desktop).
|
||||
|
||||
### `DT_GET_HIGHLIGHTED` ($08)
|
||||
### `IconTK::CLOSE_WINDOW` ($07)
|
||||
|
||||
Parameters: { byte window_id }
|
||||
|
||||
Remove all icons associated with the specified window. No redrawing is done.
|
||||
|
||||
### `IconTK::GET_HIGHLIGHTED` ($08)
|
||||
|
||||
Parameters: { .res 20 }
|
||||
|
||||
Copies the numbers of the first 20 selected icons to the given buffer.
|
||||
|
||||
### `DT_FIND_ICON` ($09)
|
||||
### `IconTK::FIND_ICON` ($09)
|
||||
|
||||
Parameters: { word mousex, word mousey, (out) byte result }
|
||||
|
||||
Find the icon number at the given coordinates.
|
||||
|
||||
### `DT_DRAG_HIGHLIGHTED` ($0A)
|
||||
### `IconTK::DRAG_HIGHLIGHTED` ($0A)
|
||||
|
||||
Parameters: { byte param }
|
||||
|
||||
|
@ -214,33 +218,30 @@ drop was on the desktop, high bit clear if the drop target was an icon
|
|||
(and the low bits are the icon number), high bit set if the drop
|
||||
target was a window (and the low bits are the window number).
|
||||
|
||||
### `DT_UNHIGHLIGHT_ICON` ($0B)
|
||||
### `IconTK::UNHIGHLIGHT_ICON` ($0B)
|
||||
|
||||
Parameters: { addr iconentry }
|
||||
|
||||
Unhighlights the specified icon. Note that the address of the icon
|
||||
entry is passed, not the number.
|
||||
Unhighlights the specified icon. Note that the address of the IconEntry is passed, not the number.
|
||||
|
||||
### `DT_REDRAW_ICONS` ($0C)
|
||||
### `IconTK::REDRAW_ICONS` ($0C)
|
||||
|
||||
Parameters: none (pass $0000 as address)
|
||||
|
||||
Redraws the icons on the desktop (mounted volumes, trash). This call
|
||||
is required after destroying, moving, or resizing a desk accessory window.
|
||||
|
||||
### `DT_ICON_IN_RECT` ($0D)
|
||||
### `IconTK::ICON_IN_RECT` ($0D)
|
||||
|
||||
Parameters: { byte icon, rect bounds }
|
||||
|
||||
Tests to see if the given icon (by number) overlaps the passed rect.
|
||||
|
||||
### `DT_REDRAW_ICON_IDX` ($0E)
|
||||
### `IconTK::ERASE_ICON` ($0E)
|
||||
|
||||
Parameters: { byte icon_index }
|
||||
|
||||
Redraws the icon at the given index in the icon list. Note that this
|
||||
is not the same as the icon number.
|
||||
Parameters: { byte icon }
|
||||
|
||||
Erases the specified icon by number. No error checking is done.
|
||||
|
||||
|
||||
<!-- ============================================================ -->
|
||||
|
|
48
README.md
48
README.md
|
@ -2,39 +2,49 @@
|
|||
|
||||
[![Build Status](https://travis-ci.org/inexorabletash/a2d.svg?branch=master)](https://travis-ci.org/inexorabletash/a2d)
|
||||
|
||||
Work-in-Progress disassembly of Apple II Desktop (a.k.a. MouseDesk)
|
||||
Work-in-Progress disassembly and enhancements for Apple II Desktop (a.k.a. MouseDesk)
|
||||
|
||||
💾 Disk images can be found on the [Releases](https://github.com/inexorabletash/a2d/releases) page 💾
|
||||
|
||||
## Background
|
||||
|
||||
Apple II Desktop started its life as "MouseDesk" by Version Soft. It
|
||||
This application started its life as **MouseDesk** by Version Soft. It
|
||||
is a mouse-driven Mac-like "Finder" GUI application for 8-bit Apples
|
||||
with 128k of memory (Enhanced Apple //e, Apple //c) using double-hires
|
||||
monochrome graphics (560x192) and the ProDOS operating system.
|
||||
and clones with 128k of memory, utilizing double-hires monochrome graphics
|
||||
(560x192), an optional mouse, and the ProDOS operating system.
|
||||
|
||||
Apple Computer acquired the software and released it - rebranded as
|
||||
Apple II Desktop - as the initial system software for the Apple IIgs
|
||||
**Apple II DeskTop** - as the initial
|
||||
[system software for the Apple IIgs](](http://www.whatisthe2gs.apple2.org.za/system-applications))
|
||||
before 16-bit GS/OS replaced it. The rebranded version still functions
|
||||
on 8-bit Apples.
|
||||
on 8-bit Apples, including the Apple IIe, Apple IIc, Apple IIc Plus,
|
||||
Apple IIe Option Card for Macintosh, and the Laser 128 family.
|
||||
|
||||
Overview: http://toastytech.com/guis/a2desk.html
|
||||
* [History of MouseDesk/Apple II DeskTop versions, by Jay Edwards](https://mirrors.apple2.org.za/ground.icaen.uiowa.edu/MiscInfo/Misc/mousedesk.info)
|
||||
* Overviews: [GUI Gallery](http://toastytech.com/guis/a2desk.html) — [GUIdebook](https://guidebookgallery.org/guis/apple2/mousedesk)
|
||||
* Manual: [Apple IIgs System Disk User’s Guide (1986)](https://mirrors.apple2.org.za/ftp.apple.asimov.net/documentation/misc/Apple%20IIgs%20System%20Disk%20Users%20Guide%20%281986%29.pdf) - Chapter 2 “The DeskTop”
|
||||
* [Disk Images](https://mirrors.apple2.org.za/ftp.apple.asimov.net/images/masters/other_os/gui/) for MouseDesk and Apple II DeskTop
|
||||
|
||||
Manual: [Apple IIgs System Disk User’s Guide (1986)](https://mirrors.apple2.org.za/ftp.apple.asimov.net/documentation/misc/Apple%20IIgs%20System%20Disk%20Users%20Guide%20%281986%29.pdf) - Chapter 2 “The DeskTop”
|
||||
|
||||
A pieced-together history, details of versions, bug reports and feature requests: https://mirrors.apple2.org.za/ground.icaen.uiowa.edu/MiscInfo/Misc/mousedesk.info
|
||||
|
||||
Disks can be found at:
|
||||
ftp://ftp.apple.asimov.net/pub/apple_II/images/masters/other_os/gui/
|
||||
|
||||
Other GUI environments exist for the 8-bit Apples, including GEOS (which includes
|
||||
productivity applications) and Quark Catalyst. While A2.Desktop is more limited -
|
||||
Other GUI environments exist for the 8-bit Apples, including
|
||||
[GEOS](http://toastytech.com/guis/a2geos.html) (which includes productivity applications) and
|
||||
[Quark Catalyst](http://toastytech.com/guis/qcat.html).
|
||||
While Apple II DeskTop is more limited -
|
||||
serving only as a file manager and application launcher - it is (subjectively)
|
||||
more visually appealing and better integrated with ProDOS.
|
||||
|
||||
## Goal
|
||||
## This Project
|
||||
|
||||
The goal of this project is to disassemble/reverse-engineer the suite
|
||||
with an eye towards understanding how it functions, and eventually fixing
|
||||
bugs and adding functionality.
|
||||
with an eye towards understanding how it functions, fixing bugs, and
|
||||
adding functionality.
|
||||
|
||||
See the [Release Notes](RELEASE-NOTES.md) for a list of enhancements and fixes so far.
|
||||
|
||||
[![Alt text](https://img.youtube.com/vi/zbElPj5zaBs/0.jpg)](https://www.youtube.com/watch?v=zbElPj5zaBs)
|
||||
<br>
|
||||
_KansasFest 2018 presentation by @mgcaret_
|
||||
|
||||
Additional help is welcome! See the guide for [Contributing](CONTRIBUTING.md).
|
||||
|
||||
## Tools
|
||||
|
||||
|
|
|
@ -7,43 +7,72 @@ https://github.com/inexorabletash/a2d/issues
|
|||
|
||||
## 1.2 - alpha
|
||||
|
||||
### Enhancements
|
||||
### DeskTop Enhancements
|
||||
|
||||
* Current time shown on right side of menu bar, if system has a clock. (#7)
|
||||
* Current day/time shown on right side of menu bar, if system has a clock. (#7, #142)
|
||||
* Up to 13 volumes are shown on the desktop (was 10). (#20)
|
||||
* Up to 12 Desk Accessories are shown in the menu (was 8). (#90)
|
||||
* Drag "unlimited" number of icons (was 20). (#18)
|
||||
* Menus allow click-to-drop, click-to-select interaction. (#104)
|
||||
* Dragging files to same volume moves instead of copies; use Open-Apple to force copy. (#8)
|
||||
* Menu bar menus are now drop-down in addition to pull-down. (#104)
|
||||
* Add Special > Check Drive command to refresh a single drive. (#97)
|
||||
* Show Text File DA: Keyboard support. Escape quits, arrows scroll. (#4)
|
||||
* Reorganized/renamed several menu items. (#13)
|
||||
* New icons for graphics, AppleWorks, relocatable, command, and IIgs-specific file types. (#105)
|
||||
* New file type icons: graphics, AppleWorks, relocatable, command, IIgs-specific, and DAs. (#105)
|
||||
* Desktop icon shown for AppleTalk file shares. (#88)
|
||||
* Improvements to several existing icon bitmaps. (#74)
|
||||
* DAs with high bit in aux-type set are skipped. (#102)
|
||||
* Icons for volumes positioned more predictably and sensibly. (#94)
|
||||
* GS/OS filenames (supported by ProDOS 2.5) are shown with correct case. (#64)
|
||||
* Text and Graphics files can be previewed without leaving DeskTop (File > Open, or double-click).
|
||||
* Tip about skipping copy to RAMCard is shown during startup. (#140)
|
||||
* Holding Apple while double-clicking or using File>Open closes parent folder. (#9)
|
||||
* Apple-` or Apple-Tab keypress cycles through open windows. (#143)
|
||||
* Apple-Delete deletes selected files. (#150)
|
||||
|
||||
### Desk Accessory Enhancements
|
||||
|
||||
* Up to 12 Desk Accessories are shown in the menu (was 8). (#90)
|
||||
* Desk accessory files can be executed directly. (#101)
|
||||
* Desk accessory files with high bit in aux-type set are hidden in Apple menu. (#102)
|
||||
* Show Text File DA: Keyboard support. Escape quits, arrows scroll. (#4)
|
||||
|
||||
### Additional Desk Accessories
|
||||
|
||||
* This Apple
|
||||
* Gives details about the computer, expanded memory, and what's in each slot. (#29)
|
||||
* Eyes
|
||||
* Eyes that follow the mouse. (#53)
|
||||
* Screen Dump
|
||||
* Dumps a screenshot to an ImageWriter II attached to a Super Serial Card in Slot 1. (#46)
|
||||
* Key Caps
|
||||
* Shows an on-screen keyboard map and indicates which key is pressed.
|
||||
* Control Panel
|
||||
* Allows editing the desktop pattern (#31), double-click speed (#2), insertion point blink speed. Also shows joystick calibration. (#72)
|
||||
* Run Basic Here
|
||||
* Launch BASIC.SYSTEM with PREFIX set to the current window's pathname. (#42)
|
||||
* Key Caps
|
||||
* Shows an on-screen keyboard map and indicates which key is pressed.
|
||||
* Screen Dump
|
||||
* Dumps a screenshot to an ImageWriter II attached to a Super Serial Card in Slot 1. (#46)
|
||||
* Eyes
|
||||
* Eyes that follow the mouse. (#53)
|
||||
* Screen Saver
|
||||
* Homage to the classic After Dark "Flying Toasters" by Jack Eastman. More to come. (#27)
|
||||
|
||||
Note that several of the new Desk Accessories will not work with older versions
|
||||
of Apple II DeskTop/MouseDesk, due to dependence on new APIs.
|
||||
|
||||
The former "Show Text File" DA is now part of automatic preview
|
||||
functionality (just use File > Open), and resides in the new `PREVIEW`
|
||||
subdirectory.
|
||||
functionality (see below).
|
||||
|
||||
### Automatic Preview
|
||||
|
||||
Text, Graphics and Font files with the correct file types can be
|
||||
previewed without leaving DeskTop; select the file icon then select
|
||||
File > Open, or double-click the file icon.
|
||||
|
||||
* Text files must be type TXT ($04).
|
||||
* Graphics files must be type FOT ($08), or BIN ($06) with an aux type
|
||||
of $2000 or $4000 and 17 or 33 blocks (hi-res/double hi-res) or $5800
|
||||
and 3 blocks (Minipix a.k.a. Print Shop).
|
||||
* Font files must be MGTK fonts with type FNT ($07).
|
||||
|
||||
To preview files of other types, you can copy the preview handlers
|
||||
named `SHOW.TEXT.FILE`, `SHOW.IMAGE.FILE`, etc. from the `PREVIEW`
|
||||
folder to the `DESK.ACC` folder, and restart DeskTop. To use them,
|
||||
select the file, then select the appropriate command from the Apple
|
||||
menu.
|
||||
|
||||
### Notable Fixes
|
||||
|
||||
|
@ -55,18 +84,27 @@ subdirectory.
|
|||
* Startup menu will include Slot 2. (#106)
|
||||
* Correct odd behavior for file type $08. (#103)
|
||||
* New Folder/Rename file dialog no longer truncated after IP. (#118)
|
||||
* Correct rendering issues with desktop volume icons. (#117)
|
||||
* Correct rendering issues with desktop volume icons. (#117, #152)
|
||||
* Prevent occasional rectangle drawn on desktop after window close. (#120)
|
||||
* Empty directories can be copied/moved. (#121)
|
||||
* Ctrl+Reset quits cleanly back to ProDOS (except buggy emulators). (#141)
|
||||
* Desk Accessories:
|
||||
* Date: Read-only on systems with a clock. On systems without a clock, date is saved for next session. (#30, #39)
|
||||
* Calculator: don't mis-paint when moved offscreen and other fixes. (#33, #34)
|
||||
* Sort Directory: don't need to click before sorting. (#17)
|
||||
* Hardware/Emulator Specific:
|
||||
* IIc Plus: don't spin slot 5 drives constantly. (Use Special > Check Drive) (#25)
|
||||
* Macintosh LC IIe Option Card: don't crash on startup. (#93)
|
||||
* Laser 128: avoid hangs checking SmartPort status. (Use Special > Check Drive) (#138)
|
||||
* IIgs: color DHR is re-enabled on exit. (#43)
|
||||
* Macintosh LC IIe Option Card: don't crash on startup. (#93)
|
||||
* Macintosh LC IIe Option Card: correct problems with interrupts affecting AppleTalk. (#129)
|
||||
* KEGS-based IIgs emulators no longer crash on startup. (#85)
|
||||
|
||||
### Known Issues
|
||||
|
||||
* Selector app is unmodified.
|
||||
* Special > Disk Copy app is not substantially modified, and may suffer bugs fixed in DeskTop (e.g. SmartPort behavior)
|
||||
|
||||
# 1.1
|
||||
|
||||
Final release by Apple Computer. November 26, 1986.
|
||||
|
|
|
@ -6,27 +6,28 @@ DAs are documented here.
|
|||
|
||||
### Desk Accessory Lifecycle
|
||||
|
||||
* DAs are loaded/invoked at $800 MAIN
|
||||
* Up to $1C00 MAIN is available
|
||||
* But AUX $1B00 and on must be preserved.
|
||||
* DAs are loaded/invoked at $800 Main
|
||||
* Up to $1C00 Main is available
|
||||
* But Aux $1B00 and on must be preserved.
|
||||
* Save stack pointer
|
||||
* Copy DA code from MAIN to AUX (e.g. using `AUXMOVE`) at same address.
|
||||
* Transfer control to the AUX copy
|
||||
* This allows direct access to MGTK/DeskTop MLI
|
||||
* Retaining a copy in MAIN allows easy access to ProDOS MLI
|
||||
* Turn on ALTZP and LCBANK1
|
||||
* Copy DA code from Main to Aux (e.g. using `AUXMOVE`) at same address.
|
||||
* Needed if any MGTK resources will be used (bitmaps, etc)
|
||||
* Transfer control to the Aux copy (`RAMRDON`/`RAMWRTON`)
|
||||
* This allows direct access to MGTK/IconTK MLI
|
||||
* Retaining a copy in Main allows easy access to ProDOS MLI
|
||||
* Turn on ALTZP and LCBANK1 (should already be the case)
|
||||
* Create window (`OpenWindow`)
|
||||
* Draw everything
|
||||
* Flush event queue (`FlushEvents`)
|
||||
* Run an event Loop (`GetEvent`, and subsequent processing, per MGTK)
|
||||
* Normal event processing per MGTK
|
||||
* In addition, following a window drag/resize, DeskTop calls must be made:
|
||||
* `JUMP_TABLE_REDRAW_ALL`
|
||||
* `DESKTOP_REDRAW_ICONS`
|
||||
* `JUMP_TABLE_REDRAW_ALL` - redraw all windows
|
||||
* `IconTK::REDRAW_ICONS` - redraw desktop (volume) icons
|
||||
* ...
|
||||
* Destroy window (`CloseWindow`)
|
||||
* Tell DeskTop to redraw desktop icons (`DESKTOP_REDRAW_ICONS`)
|
||||
* Switch control back to MAIN (`RAMRDOFF`/`RAMWRTOFF`)
|
||||
* Tell DeskTop to redraw desktop icons (`IconTK::REDRAW_ICONS`)
|
||||
* Switch control back to Main (`RAMRDOFF`/`RAMWRTOFF`)
|
||||
* Ensure ALTZP and LCBANK1 are still on
|
||||
* Restore stack pointer
|
||||
* `rts`
|
||||
|
|
|
@ -10,6 +10,8 @@ New desk accessories:
|
|||
|
||||
* [This Apple](this.apple.s)
|
||||
* Gives details about the computer, expanded memory, and what's in each slot.
|
||||
* [Control Panel](control.panel.s)
|
||||
* Modify DeskTop settings: desktop pattern, double-click speed, insertion point blink speed. Also shows joystick calibration.
|
||||
* [Eyes](eyes.s)
|
||||
* Eyes that follow the mouse.
|
||||
* [Screen Dump](screen.dump.s)
|
||||
|
@ -18,6 +20,10 @@ New desk accessories:
|
|||
* Shows an on-screen keyboard map, and indicates which key is pressed.
|
||||
* [Run Basic Here](run.basic.here.s)
|
||||
* Launches BASIC.SYSTEM with PREFIX set to current window's directory.
|
||||
* [Screen Saver](screen.saver.s)
|
||||
* Visual distractions.
|
||||
|
||||
Note that the new desk accessories require an updated version of Apple II DeskTop and **will not work** with DeskTop 1.1 or MouseDesk.
|
||||
|
||||
See [API.md](API.md) for programming details
|
||||
|
||||
|
|
|
@ -7,3 +7,5 @@ eyes
|
|||
screen.dump
|
||||
run.basic.here
|
||||
key.caps
|
||||
screen.saver
|
||||
control.panel
|
||||
|
|
|
@ -2,16 +2,14 @@
|
|||
|
||||
.include "apple2.inc"
|
||||
.include "../inc/apple2.inc"
|
||||
.include "../mgtk.inc"
|
||||
.include "../mgtk/mgtk.inc"
|
||||
.include "../desktop.inc"
|
||||
.include "../macros.inc"
|
||||
.include "../inc/macros.inc"
|
||||
|
||||
;;; ============================================================
|
||||
|
||||
.org $800
|
||||
|
||||
adjust_txtptr := $B1
|
||||
|
||||
;;; ============================================================
|
||||
;;; Start of the code
|
||||
|
||||
|
@ -27,68 +25,67 @@ save_stack: .byte 0
|
|||
tsx
|
||||
stx save_stack
|
||||
|
||||
start := call_init
|
||||
end := da_end
|
||||
dest := start
|
||||
|
||||
;; Copy the DA to AUX memory.
|
||||
lda ROMIN2
|
||||
copy16 #start, STARTLO
|
||||
copy16 #end, ENDLO
|
||||
copy16 #dest, DESTINATIONLO
|
||||
copy16 #da_end, ENDLO
|
||||
copy16 #start, DESTINATIONLO
|
||||
sec ; main>aux
|
||||
jsr AUXMOVE
|
||||
|
||||
;; Invoke it.
|
||||
copy16 #start, XFERSTARTLO
|
||||
php
|
||||
pla
|
||||
ora #$40 ; set overflow: use aux zp/stack
|
||||
pha
|
||||
plp
|
||||
sec ; control main>aux
|
||||
jmp XFER
|
||||
;; Fall through
|
||||
.endproc
|
||||
|
||||
;;; ============================================================
|
||||
|
||||
.proc init_da
|
||||
;; TODO: Should be unnecessary:
|
||||
sta ALTZPON
|
||||
lda LCBANK1
|
||||
lda LCBANK1
|
||||
|
||||
;; Run DA from Aux
|
||||
sta RAMRDON
|
||||
sta RAMWRTON
|
||||
|
||||
jmp init
|
||||
.endproc
|
||||
|
||||
|
||||
.proc exit_da
|
||||
;; Return to DeskTop running in Main
|
||||
sta RAMRDOFF
|
||||
sta RAMWRTOFF
|
||||
|
||||
;; TODO: Should be unnecessary:
|
||||
sta ALTZPON
|
||||
lda LCBANK1
|
||||
lda LCBANK1
|
||||
|
||||
ldx save_stack
|
||||
txs
|
||||
rts
|
||||
.endproc
|
||||
|
||||
;;; ============================================================
|
||||
;;; Used after a event_kind_drag is completed; redraws the window.
|
||||
|
||||
call_init:
|
||||
jmp init
|
||||
|
||||
;; Used after a event_kind_drag-and-drop is completed;
|
||||
;; redraws the window.
|
||||
.proc redraw_screen_and_window
|
||||
|
||||
;; Redraw the desktop (by copying trampoline to ZP)
|
||||
zp_routine := $20
|
||||
COPY_BYTES sizeof_routine+1, routine, zp_routine
|
||||
jsr zp_routine
|
||||
|
||||
DESKTOP_CALL DT_REDRAW_ICONS
|
||||
|
||||
;; Redraw window after event_kind_drag
|
||||
jsr draw_content
|
||||
rts
|
||||
|
||||
.proc routine
|
||||
;; Redraw DeskTop's windows.
|
||||
sta RAMRDOFF
|
||||
sta RAMWRTOFF
|
||||
jsr JUMP_TABLE_REDRAW_ALL
|
||||
sta RAMRDON
|
||||
sta RAMWRTON
|
||||
|
||||
;; Redraw DeskTop's icons.
|
||||
ITK_CALL IconTK::REDRAW_ICONS
|
||||
|
||||
;; Redraw window after event_kind_drag
|
||||
jsr draw_content
|
||||
rts
|
||||
.endproc
|
||||
sizeof_routine = * - routine
|
||||
|
||||
.endproc
|
||||
|
||||
;;; ============================================================
|
||||
|
@ -663,11 +660,7 @@ window_title:
|
|||
;;; ==================================================
|
||||
;;; DA Init
|
||||
|
||||
init: sta ALTZPON
|
||||
lda LCBANK1
|
||||
lda LCBANK1
|
||||
MGTK_CALL MGTK::SetZP1, preserve_zp_params
|
||||
MGTK_CALL MGTK::OpenWindow, winfo
|
||||
init: MGTK_CALL MGTK::OpenWindow, winfo
|
||||
MGTK_CALL MGTK::InitPort, grafport
|
||||
MGTK_CALL MGTK::SetPort, grafport
|
||||
MGTK_CALL MGTK::FlushEvents
|
||||
|
@ -689,15 +682,16 @@ init: sta ALTZPON
|
|||
sta calc_l
|
||||
|
||||
.proc copy_to_b1
|
||||
ldx #sizeof_adjust_txtptr_copied + 4 ; should be just + 1 ?
|
||||
loop: lda adjust_txtptr_copied-1,x
|
||||
sta adjust_txtptr-1,x
|
||||
ldx #sizeof_chrget_routine + 4 ; should be just + 1 ?
|
||||
loop: lda chrget_routine-1,x
|
||||
sta CHRGET-1,x
|
||||
dex
|
||||
bne loop
|
||||
.endproc
|
||||
|
||||
lda #0 ; Turn off errors
|
||||
sta ERRFLG
|
||||
lda #0
|
||||
sta ERRFLG ; Turn off errors
|
||||
sta SHIFT_SIGN_EXT ; Zero before using FP ops
|
||||
|
||||
copy16 #error_hook, COUT_HOOK ; set up FP error handler
|
||||
|
||||
|
@ -769,25 +763,10 @@ ignore_click:
|
|||
MGTK_CALL MGTK::TrackGoAway, trackgoaway_params
|
||||
lda trackgoaway_params::goaway
|
||||
beq ignore_click
|
||||
|
||||
exit: MGTK_CALL MGTK::CloseWindow, closewindow_params
|
||||
DESKTOP_CALL DT_REDRAW_ICONS
|
||||
lda ROMIN2
|
||||
MGTK_CALL MGTK::SetZP1, overwrite_zp_params
|
||||
|
||||
.proc do_close
|
||||
;; Copy following routine to ZP and invoke it
|
||||
zp_routine := $20
|
||||
|
||||
COPY_BYTES sizeof_routine+1, routine, zp_routine
|
||||
jmp zp_routine
|
||||
|
||||
.proc routine
|
||||
sta RAMRDOFF
|
||||
sta RAMWRTOFF
|
||||
ITK_CALL IconTK::REDRAW_ICONS
|
||||
jmp exit_da
|
||||
.endproc
|
||||
sizeof_routine = * - routine ; Can't use .sizeof before the .proc definition
|
||||
.endproc
|
||||
|
||||
: cmp #MGTK::Area::dragbar ; Title bar?
|
||||
bne ignore_click
|
||||
|
@ -1221,7 +1200,7 @@ rts3: rts
|
|||
jmp reset_buffer1_and_state
|
||||
|
||||
reparse:copy16 #text_buffer1, TXTPTR
|
||||
jsr adjust_txtptr
|
||||
jsr CHRGET
|
||||
jsr CALL_FIN
|
||||
|
||||
do_op: pla
|
||||
|
@ -1525,10 +1504,7 @@ draw_title_bar:
|
|||
jmp input_loop
|
||||
.endproc
|
||||
|
||||
;; Following proc is copied to $B1
|
||||
save_org := *
|
||||
.proc adjust_txtptr_copied
|
||||
.org $B1
|
||||
PROC_AT chrget_routine, $B1 ; CHRGET ("Constant expression expected" error if label used)
|
||||
dummy_addr := $EA60
|
||||
|
||||
loop: inc TXTPTR
|
||||
|
@ -1547,96 +1523,44 @@ loop: inc TXTPTR
|
|||
sec
|
||||
sbc #$D0 ; carry set if successful
|
||||
end: rts
|
||||
.endproc
|
||||
.org save_org + .sizeof(adjust_txtptr_copied)
|
||||
sizeof_adjust_txtptr_copied = .sizeof(adjust_txtptr_copied)
|
||||
END_PROC_AT
|
||||
sizeof_chrget_routine = .sizeof(chrget_routine)
|
||||
|
||||
.macro CALL_FP proc
|
||||
pha
|
||||
lda ROMIN2
|
||||
pla
|
||||
jsr proc
|
||||
pha
|
||||
lda LCBANK1
|
||||
lda LCBANK1
|
||||
pla
|
||||
rts
|
||||
.endmacro
|
||||
|
||||
|
||||
CALL_FLOAT:
|
||||
pha
|
||||
lda ROMIN2
|
||||
pla
|
||||
jsr FLOAT
|
||||
pha
|
||||
lda LCBANK1
|
||||
lda LCBANK1
|
||||
pla
|
||||
rts
|
||||
CALL_FP FLOAT
|
||||
|
||||
CALL_FADD:
|
||||
pha
|
||||
lda ROMIN2
|
||||
pla
|
||||
jsr FADD
|
||||
pha
|
||||
lda LCBANK1
|
||||
lda LCBANK1
|
||||
pla
|
||||
rts
|
||||
CALL_FP FADD
|
||||
|
||||
CALL_FSUB:
|
||||
pha
|
||||
lda ROMIN2
|
||||
jsr FSUB
|
||||
pha
|
||||
lda LCBANK1
|
||||
lda LCBANK1
|
||||
pla
|
||||
rts
|
||||
CALL_FP FSUB
|
||||
|
||||
CALL_FMULT:
|
||||
pha
|
||||
lda ROMIN2
|
||||
pla
|
||||
jsr FMULT
|
||||
pha
|
||||
lda LCBANK1
|
||||
lda LCBANK1
|
||||
pla
|
||||
rts
|
||||
CALL_FP FMULT
|
||||
|
||||
CALL_FDIV:
|
||||
pha
|
||||
lda ROMIN2
|
||||
pla
|
||||
jsr FDIV
|
||||
pha
|
||||
lda LCBANK1
|
||||
lda LCBANK1
|
||||
pla
|
||||
rts
|
||||
CALL_FP FDIV
|
||||
|
||||
CALL_FIN:
|
||||
pha
|
||||
lda ROMIN2
|
||||
pla
|
||||
jsr FIN
|
||||
pha
|
||||
lda LCBANK1
|
||||
lda LCBANK1
|
||||
pla
|
||||
rts
|
||||
CALL_FP FIN
|
||||
|
||||
CALL_FOUT:
|
||||
pha
|
||||
lda ROMIN2
|
||||
pla
|
||||
jsr FOUT
|
||||
pha
|
||||
lda LCBANK1
|
||||
lda LCBANK1
|
||||
pla
|
||||
rts
|
||||
CALL_FP FOUT
|
||||
|
||||
CALL_ROUND:
|
||||
pha
|
||||
lda ROMIN2
|
||||
pla
|
||||
jsr ROUND
|
||||
pha
|
||||
lda LCBANK1
|
||||
lda LCBANK1
|
||||
pla
|
||||
rts
|
||||
CALL_FP ROUND
|
||||
|
||||
da_end := *
|
||||
|
|
1631
desk.acc/control.panel.s
Normal file
1631
desk.acc/control.panel.s
Normal file
File diff suppressed because it is too large
Load Diff
|
@ -3,9 +3,9 @@
|
|||
.include "apple2.inc"
|
||||
.include "../inc/apple2.inc"
|
||||
.include "../inc/prodos.inc"
|
||||
.include "../mgtk.inc"
|
||||
.include "../mgtk/mgtk.inc"
|
||||
.include "../desktop.inc"
|
||||
.include "../macros.inc"
|
||||
.include "../inc/macros.inc"
|
||||
|
||||
;;; ============================================================
|
||||
|
||||
|
@ -631,7 +631,7 @@ dialog_result: .byte 0
|
|||
|
||||
.proc destroy
|
||||
MGTK_CALL MGTK::CloseWindow, closewindow_params
|
||||
DESKTOP_CALL DT_REDRAW_ICONS
|
||||
ITK_CALL IconTK::REDRAW_ICONS
|
||||
|
||||
;; Copy the relay routine to the zero page
|
||||
dest := $20
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
|
||||
.include "apple2.inc"
|
||||
.include "../inc/apple2.inc"
|
||||
.include "../mgtk.inc"
|
||||
.include "../mgtk/mgtk.inc"
|
||||
.include "../desktop.inc"
|
||||
.include "../macros.inc"
|
||||
.include "../inc/macros.inc"
|
||||
.include "../inc/fp_macros.inc"
|
||||
|
||||
;;; ============================================================
|
||||
|
@ -16,9 +16,9 @@ entry:
|
|||
;;; Copy the DA to AUX for easy bank switching
|
||||
.scope
|
||||
lda ROMIN2
|
||||
copy16 #$0800, STARTLO
|
||||
copy16 #entry, STARTLO
|
||||
copy16 #da_end, ENDLO
|
||||
copy16 #$0800, DESTINATIONLO
|
||||
copy16 #entry, DESTINATIONLO
|
||||
sec ; main>aux
|
||||
jsr AUXMOVE
|
||||
lda LCBANK1
|
||||
|
@ -26,17 +26,17 @@ entry:
|
|||
.endscope
|
||||
|
||||
.scope
|
||||
;; run the DA
|
||||
;; Run the DA
|
||||
sta RAMRDON
|
||||
sta RAMWRTON
|
||||
jsr init
|
||||
|
||||
;; tear down/exit
|
||||
;; TODO: Should be unnecessary:
|
||||
sta ALTZPON
|
||||
lda LCBANK1
|
||||
lda LCBANK1
|
||||
|
||||
;; back to main for exit
|
||||
;; Back to main for exit
|
||||
sta RAMRDOFF
|
||||
sta RAMWRTOFF
|
||||
rts
|
||||
|
@ -53,8 +53,6 @@ da_top = 50
|
|||
str_title:
|
||||
PASCAL_STRING "Eyes"
|
||||
|
||||
;;; TODO: Allow resizing
|
||||
|
||||
.proc winfo
|
||||
window_id: .byte da_window_id
|
||||
options: .byte MGTK::Option::go_away_box
|
||||
|
@ -189,8 +187,6 @@ grow_box_bitmap:
|
|||
lda LCBANK1
|
||||
lda LCBANK1
|
||||
|
||||
;; Don't let MGTK smash zero page
|
||||
MGTK_CALL MGTK::SetZP1, preserve_zp_params
|
||||
lda #0
|
||||
sta SHIFT_SIGN_EXT ; Must zero before using FP ops
|
||||
|
||||
|
@ -215,8 +211,7 @@ grow_box_bitmap:
|
|||
|
||||
.proc exit
|
||||
MGTK_CALL MGTK::CloseWindow, winfo
|
||||
DESKTOP_CALL DT_REDRAW_ICONS
|
||||
MGTK_CALL MGTK::SetZP1, overwrite_zp_params
|
||||
ITK_CALL IconTK::REDRAW_ICONS
|
||||
rts
|
||||
.endproc
|
||||
|
||||
|
@ -316,7 +311,7 @@ common: lda dragwindow_params::moved
|
|||
jsr draw_window
|
||||
|
||||
;; Draw DeskTop icons
|
||||
DESKTOP_CALL DT_REDRAW_ICONS
|
||||
ITK_CALL IconTK::REDRAW_ICONS
|
||||
|
||||
: jmp input_loop
|
||||
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
|
||||
.include "apple2.inc"
|
||||
.include "../inc/apple2.inc"
|
||||
.include "../mgtk.inc"
|
||||
.include "../mgtk/mgtk.inc"
|
||||
.include "../desktop.inc"
|
||||
.include "../macros.inc"
|
||||
.include "../inc/macros.inc"
|
||||
|
||||
;;; ============================================================
|
||||
|
||||
|
@ -592,7 +592,7 @@ continue:
|
|||
|
||||
.proc exit
|
||||
MGTK_CALL MGTK::CloseWindow, winfo
|
||||
DESKTOP_CALL DT_REDRAW_ICONS
|
||||
ITK_CALL IconTK::REDRAW_ICONS
|
||||
rts ; exits input loop
|
||||
.endproc
|
||||
|
||||
|
@ -693,7 +693,7 @@ return_flag:
|
|||
jsr draw_window
|
||||
|
||||
;; Draw DeskTop icons
|
||||
DESKTOP_CALL DT_REDRAW_ICONS
|
||||
ITK_CALL IconTK::REDRAW_ICONS
|
||||
|
||||
: jmp input_loop
|
||||
|
||||
|
@ -803,14 +803,21 @@ char: .byte 0
|
|||
rts
|
||||
:
|
||||
|
||||
;; Is IIgs?
|
||||
;; Bank in ROM and do check
|
||||
lda ROMIN2
|
||||
sec
|
||||
jsr check
|
||||
lda LCBANK1
|
||||
lda LCBANK1
|
||||
rts
|
||||
|
||||
;; --------------------------------------------------
|
||||
;; Do the check (with ROM banked in)
|
||||
|
||||
;; Is IIgs?
|
||||
check: sec
|
||||
jsr ID_BYTE_FE1F ; Clears carry if IIgs
|
||||
lda LCBANK1
|
||||
lda LCBANK1
|
||||
bcs :+ ; No, carry still set
|
||||
sec
|
||||
sec ; Yes, is a IIgs
|
||||
rts
|
||||
|
||||
;; Is IIc+?
|
||||
|
@ -819,10 +826,10 @@ char: .byte 0
|
|||
lda ID_BYTE_FBBF ; $05 = IIc Plus
|
||||
cmp #$05
|
||||
bne done
|
||||
sec
|
||||
sec ; Yes, is a IIc+
|
||||
rts
|
||||
|
||||
done: clc
|
||||
done: clc ; No - older layout
|
||||
rts
|
||||
.endproc
|
||||
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
|
||||
.include "apple2.inc"
|
||||
.include "../inc/apple2.inc"
|
||||
.include "../mgtk.inc"
|
||||
.include "../mgtk/mgtk.inc"
|
||||
.include "../desktop.inc"
|
||||
.include "../macros.inc"
|
||||
.include "../inc/macros.inc"
|
||||
|
||||
;;; ============================================================
|
||||
|
||||
|
@ -84,7 +84,7 @@ stash_stack: .byte 0
|
|||
bit window_pos_flag
|
||||
bmi skip
|
||||
|
||||
DESKTOP_CALL DT_REDRAW_ICONS
|
||||
ITK_CALL IconTK::REDRAW_ICONS
|
||||
|
||||
skip: lda #0
|
||||
sta window_pos_flag
|
||||
|
@ -732,7 +732,7 @@ bail: rts
|
|||
beq bail
|
||||
destroy:
|
||||
MGTK_CALL MGTK::CloseWindow, closewindow_params
|
||||
DESKTOP_CALL DT_REDRAW_ICONS
|
||||
ITK_CALL IconTK::REDRAW_ICONS
|
||||
|
||||
target = $20 ; copy following to ZP and run it
|
||||
COPY_BYTES sizeof_routine+1, routine, target
|
||||
|
|
|
@ -11,9 +11,9 @@
|
|||
.include "apple2.inc"
|
||||
.include "../inc/apple2.inc"
|
||||
.include "../inc/prodos.inc"
|
||||
.include "../mgtk.inc"
|
||||
.include "../mgtk/mgtk.inc"
|
||||
.include "../desktop.inc"
|
||||
.include "../macros.inc"
|
||||
.include "../inc/macros.inc"
|
||||
|
||||
;;; ============================================================
|
||||
|
||||
|
@ -97,7 +97,7 @@ quit: MLI_CALL QUIT, quit_params
|
|||
jmp got_prefix
|
||||
|
||||
get_current_prefix:
|
||||
axy_call JUMP_TABLE_MLI, GET_PREFIX, get_prefix_params
|
||||
yax_call JUMP_TABLE_MLI, GET_PREFIX, get_prefix_params
|
||||
bne no_bs
|
||||
|
||||
got_prefix:
|
||||
|
@ -114,7 +114,7 @@ loop: ldx path_length
|
|||
bne :-
|
||||
stx bs_path
|
||||
|
||||
axy_call JUMP_TABLE_MLI, GET_FILE_INFO, get_file_info_params
|
||||
yax_call JUMP_TABLE_MLI, GET_FILE_INFO, get_file_info_params
|
||||
bne not_found
|
||||
rts
|
||||
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
.include "apple2.inc"
|
||||
.include "../inc/apple2.inc"
|
||||
.include "../inc/prodos.inc"
|
||||
.include "../mgtk.inc"
|
||||
.include "../mgtk/mgtk.inc"
|
||||
.include "../desktop.inc"
|
||||
.include "../macros.inc"
|
||||
.include "../inc/macros.inc"
|
||||
|
||||
;;; ============================================================
|
||||
|
||||
|
@ -14,27 +14,14 @@
|
|||
;;; ============================================================
|
||||
|
||||
yax_call JUMP_TABLE_MGTK_RELAY, MGTK::HideCursor, 0
|
||||
jsr hilite_menu
|
||||
yax_call JUMP_TABLE_MGTK_RELAY, MGTK::HiliteMenu, last_menu_click_params
|
||||
jsr dump_screen
|
||||
jsr hilite_menu
|
||||
yax_call JUMP_TABLE_MGTK_RELAY, MGTK::HiliteMenu, last_menu_click_params
|
||||
yax_call JUMP_TABLE_MGTK_RELAY, MGTK::ShowCursor, 0
|
||||
rts
|
||||
|
||||
;;; ============================================================
|
||||
|
||||
.proc hilite_menu
|
||||
;; Use zero page, which is visible from MGTK
|
||||
menu_click_menu_id := $6
|
||||
|
||||
lda #1 ; ID of Apple menu
|
||||
sta menu_click_menu_id
|
||||
yax_call JUMP_TABLE_MGTK_RELAY, MGTK::HiliteMenu, menu_click_menu_id
|
||||
|
||||
rts
|
||||
.endproc
|
||||
|
||||
;;; ============================================================
|
||||
|
||||
.proc dump_screen
|
||||
|
||||
SLOT1 := $C100
|
||||
|
|
382
desk.acc/screen.saver.s
Normal file
382
desk.acc/screen.saver.s
Normal file
|
@ -0,0 +1,382 @@
|
|||
.setcpu "65C02"
|
||||
|
||||
.include "apple2.inc"
|
||||
.include "../inc/apple2.inc"
|
||||
.include "../mgtk/mgtk.inc"
|
||||
.include "../desktop.inc"
|
||||
.include "../inc/macros.inc"
|
||||
|
||||
|
||||
;;; ============================================================
|
||||
|
||||
.org $800
|
||||
|
||||
da_start:
|
||||
jmp start
|
||||
|
||||
save_stack:.byte 0
|
||||
|
||||
.proc start
|
||||
tsx
|
||||
stx save_stack
|
||||
|
||||
;; Copy DA to AUX
|
||||
copy16 #da_start, STARTLO
|
||||
copy16 #da_start, DESTINATIONLO
|
||||
copy16 #da_end, ENDLO
|
||||
sec ; main>aux
|
||||
jsr AUXMOVE
|
||||
|
||||
;; Transfer control to aux
|
||||
sta RAMWRTON
|
||||
sta RAMRDON
|
||||
|
||||
;; run the DA
|
||||
jsr init
|
||||
|
||||
;; tear down/exit
|
||||
sta RAMRDOFF
|
||||
sta RAMWRTOFF
|
||||
|
||||
ldx save_stack
|
||||
txs
|
||||
|
||||
rts
|
||||
.endproc
|
||||
|
||||
;;; ============================================================
|
||||
;;; Animation Resources
|
||||
|
||||
toaster_height = 32
|
||||
toaster_width = 64
|
||||
|
||||
toaster_count = 4
|
||||
|
||||
xpos_table:
|
||||
.word screen_width+toaster_width
|
||||
.word screen_width+toaster_width+150
|
||||
.word screen_width+toaster_width+300
|
||||
.word screen_width+toaster_width+450
|
||||
|
||||
ypos_table:
|
||||
.word AS_WORD(-toaster_height)
|
||||
.word AS_WORD(-toaster_height)+160
|
||||
.word AS_WORD(-toaster_height)+40
|
||||
.word AS_WORD(-toaster_height)+99
|
||||
|
||||
frame_table:
|
||||
.byte 0,1,2,3
|
||||
|
||||
;;; ============================================================
|
||||
;;; Graphics Resources
|
||||
|
||||
da_window_id = 100
|
||||
|
||||
event_params: .tag MGTK::Event
|
||||
|
||||
.proc window_title
|
||||
.byte 0 ; length
|
||||
.endproc
|
||||
|
||||
.proc winfo
|
||||
window_id: .byte da_window_id ; window identifier
|
||||
options: .byte MGTK::Option::dialog_box
|
||||
title: .addr window_title
|
||||
hscroll: .byte MGTK::Scroll::option_none
|
||||
vscroll: .byte MGTK::Scroll::option_none
|
||||
hthumbmax: .byte 32
|
||||
hthumbpos: .byte 0
|
||||
vthumbmax: .byte 32
|
||||
vthumbpos: .byte 0
|
||||
status: .byte 0
|
||||
reserved: .byte 0
|
||||
mincontwidth: .word screen_width
|
||||
mincontlength: .word screen_height
|
||||
maxcontwidth: .word screen_width
|
||||
maxcontlength: .word screen_height
|
||||
.proc port
|
||||
viewloc: DEFINE_POINT 0, 0
|
||||
mapbits: .addr MGTK::screen_mapbits
|
||||
mapwidth: .word MGTK::screen_mapwidth
|
||||
maprect: DEFINE_RECT 0, 0, screen_width, screen_height
|
||||
.endproc
|
||||
pattern: .res 8, 0
|
||||
colormasks: .byte MGTK::colormask_and, MGTK::colormask_or
|
||||
penloc: DEFINE_POINT 0, 0
|
||||
penwidth: .byte 1
|
||||
penheight: .byte 1
|
||||
penmode: .byte MGTK::notpencopy
|
||||
textback: .byte $7F
|
||||
textfont: .addr DEFAULT_FONT
|
||||
nextwinfo: .addr 0
|
||||
.endproc
|
||||
|
||||
.proc paintbits_params
|
||||
viewloc: DEFINE_POINT 0,0,viewloc
|
||||
mapbits: .addr 0
|
||||
mapwidth: .byte 10
|
||||
reserved: .byte 0
|
||||
maprect: DEFINE_RECT 0,0,toaster_width-1,toaster_height-1
|
||||
.endproc
|
||||
|
||||
notpencopy: .byte MGTK::notpencopy
|
||||
penXOR: .byte MGTK::penXOR
|
||||
|
||||
.proc getwinport_params
|
||||
window_id: .byte da_window_id
|
||||
.addr grafport
|
||||
.endproc
|
||||
|
||||
grafport: .tag MGTK::GrafPort
|
||||
|
||||
;;; ============================================================
|
||||
;;; DA Init
|
||||
|
||||
.proc init
|
||||
MGTK_CALL MGTK::HideCursor
|
||||
MGTK_CALL MGTK::OpenWindow, winfo
|
||||
MGTK_CALL MGTK::SetPort, winfo::port
|
||||
|
||||
MGTK_CALL MGTK::InitPort, grafport
|
||||
MGTK_CALL MGTK::SetPort, grafport
|
||||
MGTK_CALL MGTK::SetPenMode, notpencopy
|
||||
MGTK_CALL MGTK::PaintRect, grafport + MGTK::GrafPort::maprect
|
||||
|
||||
MGTK_CALL MGTK::FlushEvents
|
||||
.endproc
|
||||
|
||||
;;; ============================================================
|
||||
;;; Main Input Loop
|
||||
|
||||
.proc input_loop
|
||||
MGTK_CALL MGTK::GetEvent, event_params
|
||||
lda event_params + MGTK::Event::kind
|
||||
cmp #MGTK::EventKind::button_down ; was clicked?
|
||||
beq exit
|
||||
cmp #MGTK::EventKind::key_down ; any key?
|
||||
beq exit
|
||||
|
||||
jsr animate
|
||||
jmp input_loop
|
||||
|
||||
exit:
|
||||
MGTK_CALL MGTK::DrawMenu
|
||||
sta RAMWRTOFF
|
||||
sta RAMRDOFF
|
||||
yax_call JUMP_TABLE_MGTK_RELAY, MGTK::HiliteMenu, last_menu_click_params
|
||||
sta RAMWRTON
|
||||
sta RAMRDON
|
||||
|
||||
;; Force desktop redraw
|
||||
MGTK_CALL MGTK::CloseWindow, winfo
|
||||
ITK_CALL IconTK::REDRAW_ICONS
|
||||
|
||||
MGTK_CALL MGTK::ShowCursor
|
||||
rts ; exits input loop
|
||||
.endproc
|
||||
|
||||
;;; ============================================================
|
||||
;;; Animate
|
||||
|
||||
.proc animate
|
||||
MGTK_CALL MGTK::SetPort, grafport
|
||||
MGTK_CALL MGTK::SetPenMode, penXOR
|
||||
|
||||
;; For each toaster...
|
||||
copy #toaster_count-1, index
|
||||
loop:
|
||||
|
||||
;; Stash current toaster's values
|
||||
ldx index
|
||||
copy frame_table,x, frame
|
||||
txa
|
||||
asl
|
||||
tax
|
||||
copy16 xpos_table,x, xpos
|
||||
copy16 ypos_table,x, ypos
|
||||
|
||||
;; Erase previous pos
|
||||
copy16 xpos, paintbits_params::viewloc::xcoord
|
||||
copy16 ypos, paintbits_params::viewloc::ycoord
|
||||
lda frame
|
||||
asl ; *2
|
||||
tax
|
||||
copy16 toaster_frames,x, paintbits_params::mapbits
|
||||
|
||||
|
||||
MGTK_CALL MGTK::PaintBits, paintbits_params
|
||||
|
||||
;; Move
|
||||
add16 ypos, #1, ypos
|
||||
sub16 xpos, #4, xpos
|
||||
|
||||
;; Wrap Y
|
||||
cmp16 ypos, #screen_height
|
||||
bvc :+
|
||||
eor #$80
|
||||
: bmi :+
|
||||
copy16 #AS_WORD(-toaster_height), ypos
|
||||
:
|
||||
|
||||
;; Wrap X
|
||||
cmp16 xpos, #AS_WORD(-toaster_width)
|
||||
bvc :+
|
||||
eor #$80
|
||||
: bpl :+
|
||||
copy16 #screen_width+toaster_width, xpos
|
||||
:
|
||||
|
||||
;; Next frame
|
||||
inc frame
|
||||
lda frame
|
||||
cmp #4 ; num frames
|
||||
bne :+
|
||||
copy #0, frame
|
||||
:
|
||||
|
||||
;; Draw new pos
|
||||
copy16 xpos, paintbits_params::viewloc::xcoord
|
||||
copy16 ypos, paintbits_params::viewloc::ycoord
|
||||
lda frame
|
||||
asl ; *2
|
||||
tax
|
||||
copy16 toaster_frames,x, paintbits_params::mapbits
|
||||
MGTK_CALL MGTK::PaintBits, paintbits_params
|
||||
|
||||
;; Store updated values
|
||||
ldx index
|
||||
copy frame, frame_table,x
|
||||
txa
|
||||
asl
|
||||
tax
|
||||
copy16 xpos, xpos_table,x
|
||||
copy16 ypos, ypos_table,x
|
||||
|
||||
;; Next
|
||||
dec index
|
||||
bmi :+
|
||||
jmp loop
|
||||
: rts
|
||||
|
||||
|
||||
index: .byte 0
|
||||
xpos: .word 0
|
||||
ypos: .word 0
|
||||
frame: .byte 0
|
||||
|
||||
.endproc
|
||||
|
||||
|
||||
;;; ============================================================
|
||||
|
||||
toaster_frames:
|
||||
.addr toaster_bits1
|
||||
.addr toaster_bits2
|
||||
.addr toaster_bits3
|
||||
.addr toaster_bits2
|
||||
|
||||
toaster_bits1:
|
||||
.byte px(%0000000),px(%0000000),px(%0000001),px(%1110000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000)
|
||||
.byte px(%0000000),px(%0000000),px(%0011111),px(%1001100),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000)
|
||||
.byte px(%0000000),px(%0000000),px(%1111110),px(%0111100),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000)
|
||||
.byte px(%0000000),px(%0000011),px(%1100111),px(%1110011),px(%0000111),px(%1111100),px(%0000000),px(%0000000),px(%0000000),px(%0000000)
|
||||
.byte px(%0000000),px(%0001111),px(%1111111),px(%1001111),px(%1111111),px(%1111111),px(%1111000),px(%0000000),px(%0000000),px(%0000000)
|
||||
.byte px(%0000000),px(%0001111),px(%1111001),px(%1111111),px(%0000000),px(%0000000),px(%1111111),px(%1000000),px(%0000000),px(%0000000)
|
||||
.byte px(%0000000),px(%0111111),px(%1111111),px(%1000000),px(%0000001),px(%1111111),px(%1111111),px(%1111100),px(%0000000),px(%0000000)
|
||||
.byte px(%0000000),px(%0111111),px(%1111000),px(%0000000),px(%1111111),px(%1000000),px(%0000000),px(%0111111),px(%0000000),px(%0000000)
|
||||
.byte px(%0000001),px(%1111111),px(%0000000),px(%0001111),px(%1100000),px(%0000000),px(%1111110),px(%0000000),px(%1100000),px(%0000000)
|
||||
.byte px(%0000001),px(%1110000),px(%0000001),px(%1111100),px(%0000000),px(%0111111),px(%0000001),px(%1111111),px(%1111111),px(%1000000)
|
||||
.byte px(%0000111),px(%1000000),px(%0011111),px(%1000000),px(%0000111),px(%1111100),px(%1111111),px(%1110011),px(%0011000),px(%0000000)
|
||||
.byte px(%0011110),px(%0000000),px(%1111000),px(%0000000),px(%1111111),px(%1110011),px(%1111001),px(%1111111),px(%1111111),px(%1000000)
|
||||
.byte px(%0011111),px(%1110011),px(%1100000),px(%0001111),px(%1111111),px(%1001111),px(%1111111),px(%1001100),px(%1100000),px(%0000000)
|
||||
.byte px(%1100001),px(%1111111),px(%0000000),px(%0111100),px(%1111111),px(%1001111),px(%1100111),px(%1111111),px(%1111110),px(%0000000)
|
||||
.byte px(%1100000),px(%0001111),px(%1111001),px(%1110011),px(%1111110),px(%0111111),px(%1111110),px(%0110011),px(%0000000),px(%0000000)
|
||||
.byte px(%1100111),px(%1000000),px(%1111111),px(%1001111),px(%1111110),px(%0111111),px(%0011111),px(%1111111),px(%1100000),px(%0000000)
|
||||
.byte px(%1100110),px(%0111100),px(%0000111),px(%1001111),px(%1111001),px(%1111111),px(%1111000),px(%0000000),px(%0000000),px(%0000000)
|
||||
.byte px(%1100110),px(%0000011),px(%1100110),px(%0111111),px(%1111001),px(%1110011),px(%1111111),px(%1001100),px(%0000000),px(%0000000)
|
||||
.byte px(%1100000),px(%0000011),px(%1100110),px(%0111111),px(%1100111),px(%1111111),px(%0000000),px(%0111100),px(%1100000),px(%0000000)
|
||||
.byte px(%1100000),px(%0110011),px(%1100110),px(%0111111),px(%1100111),px(%1001111),px(%1111001),px(%1110000),px(%0000000),px(%0000000)
|
||||
.byte px(%1100000),px(%0000000),px(%0000110),px(%0001100),px(%1100111),px(%1111100),px(%0000111),px(%1110000),px(%1100000),px(%0000000)
|
||||
.byte px(%1100000),px(%0110000),px(%0000110),px(%0001111),px(%1111001),px(%1110011),px(%1111111),px(%1000000),px(%0000000),px(%0000000)
|
||||
.byte px(%1100000),px(%0000000),px(%0000110),px(%0001100),px(%1111110),px(%0001111),px(%1111110),px(%0000000),px(%1100000),px(%0000000)
|
||||
.byte px(%1100000),px(%0110000),px(%0000110),px(%0000011),px(%0000111),px(%1111111),px(%1100000),px(%0000011),px(%0000000),px(%0000000)
|
||||
.byte px(%1100000),px(%0000000),px(%0000110),px(%0000000),px(%1111111),px(%1111100),px(%0000000),px(%0001100),px(%0000000),px(%0000000)
|
||||
.byte px(%1100000),px(%0110000),px(%0000110),px(%0000000),px(%0000000),px(%0000000),px(%0000001),px(%1110000),px(%0000000),px(%0000000)
|
||||
.byte px(%1100000),px(%0000000),px(%0000110),px(%0000000),px(%0000000),px(%0000000),px(%0011110),px(%0000000),px(%0000000),px(%0000000)
|
||||
.byte px(%0011000),px(%0000000),px(%0000110),px(%0000000),px(%0000000),px(%0000011),px(%1100000),px(%0000000),px(%0000000),px(%0000000)
|
||||
.byte px(%0000110),px(%0000000),px(%0000110),px(%0000000),px(%0000000),px(%0111100),px(%0000000),px(%0000000),px(%0000000),px(%0000000)
|
||||
.byte px(%0000001),px(%1110000),px(%0000110),px(%0000000),px(%0011111),px(%1000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000)
|
||||
.byte px(%0000000),px(%0001111),px(%0000110),px(%0001111),px(%1100000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000)
|
||||
.byte px(%0000000),px(%0000000),px(%1111111),px(%1110000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000)
|
||||
|
||||
toaster_bits2:
|
||||
.byte px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000)
|
||||
.byte px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000)
|
||||
.byte px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000)
|
||||
.byte px(%0000000),px(%0000000),px(%0000001),px(%1110000),px(%0000111),px(%1111100),px(%0000000),px(%0000000),px(%0000000),px(%0000000)
|
||||
.byte px(%0000000),px(%0000000),px(%0011111),px(%1110011),px(%1111111),px(%1111111),px(%1111000),px(%0000000),px(%0000000),px(%0000000)
|
||||
.byte px(%0000000),px(%0000000),px(%1111001),px(%1111111),px(%0000000),px(%0000000),px(%1111111),px(%1000000),px(%0000000),px(%0000000)
|
||||
.byte px(%0000000),px(%0000011),px(%1111111),px(%1000000),px(%0000001),px(%1111111),px(%1111111),px(%1111100),px(%0000000),px(%0000000)
|
||||
.byte px(%0000000),px(%0001111),px(%1111000),px(%0000000),px(%1111111),px(%1000000),px(%0000000),px(%0111111),px(%0000000),px(%0000000)
|
||||
.byte px(%0000000),px(%0111111),px(%0000000),px(%0001111),px(%1100000),px(%0000000),px(%1111111),px(%1111111),px(%1100000),px(%0000000)
|
||||
.byte px(%0000001),px(%1110000),px(%0000001),px(%1111100),px(%0000000),px(%0111111),px(%1111000),px(%0000011),px(%1100000),px(%0000000)
|
||||
.byte px(%0000111),px(%1000000),px(%0011111),px(%1000000),px(%0000111),px(%1111111),px(%0000111),px(%1111100),px(%1100000),px(%0000000)
|
||||
.byte px(%0011110),px(%0000000),px(%1111000),px(%0000000),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1100000),px(%0000000)
|
||||
.byte px(%0011111),px(%1110011),px(%1100000),px(%0001111),px(%1111111),px(%1111111),px(%0000000),px(%0000000),px(%1100000),px(%0000000)
|
||||
.byte px(%1100001),px(%1111111),px(%0000000),px(%0111100),px(%1111111),px(%1110000),px(%1111111),px(%1111111),px(%0000000),px(%0000000)
|
||||
.byte px(%1100000),px(%0001111),px(%1111001),px(%1110011),px(%1111111),px(%1001111),px(%1111110),px(%0111111),px(%1111111),px(%1000000)
|
||||
.byte px(%1100111),px(%1000000),px(%1111111),px(%1001111),px(%1111110),px(%0111111),px(%1111111),px(%1110011),px(%0011000),px(%0000000)
|
||||
.byte px(%1100110),px(%0111100),px(%0000111),px(%1001111),px(%1111001),px(%1111111),px(%1111001),px(%1111111),px(%1111111),px(%1000000)
|
||||
.byte px(%1100110),px(%0000011),px(%1100110),px(%0111111),px(%1111001),px(%1111111),px(%1111111),px(%1001100),px(%0011110),px(%0000000)
|
||||
.byte px(%1100000),px(%0000011),px(%1100110),px(%0111111),px(%1100111),px(%1111111),px(%1100111),px(%1111111),px(%1100000),px(%0000000)
|
||||
.byte px(%1100000),px(%0110011),px(%1100110),px(%0111111),px(%1100111),px(%1001100),px(%1111110),px(%0110000),px(%0000000),px(%0000000)
|
||||
.byte px(%1100000),px(%0000000),px(%0000110),px(%0001100),px(%1100111),px(%1111100),px(%0000000),px(%0000000),px(%1100000),px(%0000000)
|
||||
.byte px(%1100000),px(%0110000),px(%0000110),px(%0001111),px(%1111001),px(%1110011),px(%1111111),px(%1000000),px(%0000000),px(%0000000)
|
||||
.byte px(%1100000),px(%0000000),px(%0000110),px(%0001100),px(%1111110),px(%0001111),px(%1111110),px(%0000000),px(%1100000),px(%0000000)
|
||||
.byte px(%1100000),px(%0110000),px(%0000110),px(%0000011),px(%0000111),px(%1111111),px(%1100000),px(%0000011),px(%0000000),px(%0000000)
|
||||
.byte px(%1100000),px(%0000000),px(%0000110),px(%0000000),px(%1111111),px(%1111100),px(%0000000),px(%0001100),px(%0000000),px(%0000000)
|
||||
.byte px(%1100000),px(%0110000),px(%0000110),px(%0000000),px(%0000000),px(%0000000),px(%0000001),px(%1110000),px(%0000000),px(%0000000)
|
||||
.byte px(%1100000),px(%0000000),px(%0000110),px(%0000000),px(%0000000),px(%0000000),px(%0011110),px(%0000000),px(%0000000),px(%0000000)
|
||||
.byte px(%0011000),px(%0000000),px(%0000110),px(%0000000),px(%0000000),px(%0000011),px(%1100000),px(%0000000),px(%0000000),px(%0000000)
|
||||
.byte px(%0000110),px(%0000000),px(%0000110),px(%0000000),px(%0000000),px(%0111100),px(%0000000),px(%0000000),px(%0000000),px(%0000000)
|
||||
.byte px(%0000001),px(%1110000),px(%0000110),px(%0000000),px(%0011111),px(%1000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000)
|
||||
.byte px(%0000000),px(%0001111),px(%0000110),px(%0001111),px(%1100000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000)
|
||||
.byte px(%0000000),px(%0000000),px(%1111111),px(%1110000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000)
|
||||
|
||||
toaster_bits3:
|
||||
.byte px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000)
|
||||
.byte px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000)
|
||||
.byte px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000)
|
||||
.byte px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000001),px(%1111111),px(%0000000),px(%0000000),px(%0000000),px(%0000000)
|
||||
.byte px(%0000000),px(%0000000),px(%0000000),px(%0000011),px(%1111111),px(%1111111),px(%1111000),px(%0000000),px(%0000000),px(%0000000)
|
||||
.byte px(%0000000),px(%0000000),px(%0000000),px(%0111111),px(%1100000),px(%0000000),px(%0011111),px(%1110000),px(%0000000),px(%0000000)
|
||||
.byte px(%0000000),px(%0000000),px(%0011111),px(%1000000),px(%0000001),px(%1111111),px(%1111111),px(%1111100),px(%0000000),px(%0000000)
|
||||
.byte px(%0000000),px(%0000011),px(%1111000),px(%0000000),px(%1111111),px(%1000000),px(%0000000),px(%0111111),px(%0000000),px(%0000000)
|
||||
.byte px(%0000000),px(%0111111),px(%0000000),px(%0001111),px(%1100000),px(%0000000),px(%1111111),px(%1111111),px(%1100000),px(%0000000)
|
||||
.byte px(%0000001),px(%1110000),px(%0000001),px(%1111100),px(%0000000),px(%0111111),px(%1111000),px(%0000011),px(%1100000),px(%0000000)
|
||||
.byte px(%0000111),px(%1000000),px(%0011111),px(%1000000),px(%0000111),px(%1111111),px(%0000111),px(%1111100),px(%1100000),px(%0000000)
|
||||
.byte px(%0011110),px(%0000000),px(%1111000),px(%0000000),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1100000),px(%0000000)
|
||||
.byte px(%0011111),px(%1110011),px(%1100000),px(%0001111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1100000),px(%0000000)
|
||||
.byte px(%1100001),px(%1111111),px(%0000000),px(%0111100),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%0000000),px(%0000000)
|
||||
.byte px(%1100000),px(%0001111),px(%1111001),px(%1110011),px(%1111111),px(%1111111),px(%1111111),px(%1111100),px(%1100000),px(%0000000)
|
||||
.byte px(%1100111),px(%1000000),px(%1111111),px(%1001111),px(%1111111),px(%1111111),px(%1111111),px(%1111100),px(%0000000),px(%0000000)
|
||||
.byte px(%1100110),px(%0111100),px(%0000111),px(%1001111),px(%1111110),px(%0001111),px(%1111111),px(%1000000),px(%1100000),px(%0000000)
|
||||
.byte px(%1100110),px(%0000011),px(%1100110),px(%0111111),px(%1111001),px(%1110000),px(%0000000),px(%0001111),px(%0011110),px(%0000000)
|
||||
.byte px(%1100000),px(%0000011),px(%1100110),px(%0111111),px(%1100111),px(%1111111),px(%0011110),px(%0111100),px(%1111001),px(%1000000)
|
||||
.byte px(%1100000),px(%0110011),px(%1100110),px(%0111111),px(%1100111),px(%1111100),px(%1111001),px(%1110011),px(%1100111),px(%1000000)
|
||||
.byte px(%1100000),px(%0000000),px(%0000110),px(%0001100),px(%1100111),px(%1111111),px(%1100111),px(%1001111),px(%0011110),px(%0000000)
|
||||
.byte px(%1100000),px(%0110000),px(%0000110),px(%0001111),px(%1111001),px(%1111111),px(%1111111),px(%1111100),px(%1111110),px(%0000000)
|
||||
.byte px(%1100000),px(%0000000),px(%0000110),px(%0001100),px(%1111110),px(%0111111),px(%1111001),px(%1111111),px(%1111000),px(%0000000)
|
||||
.byte px(%1100000),px(%0110000),px(%0000110),px(%0000011),px(%0000111),px(%1001111),px(%1111111),px(%1001111),px(%1111000),px(%0000000)
|
||||
.byte px(%1100000),px(%0000000),px(%0000110),px(%0000000),px(%1111111),px(%1110011),px(%1111111),px(%1111111),px(%1100000),px(%0000000)
|
||||
.byte px(%1100000),px(%0110000),px(%0000110),px(%0000000),px(%0000000),px(%0000000),px(%1111111),px(%1111111),px(%0000000),px(%0000000)
|
||||
.byte px(%1100000),px(%0000000),px(%0000110),px(%0000000),px(%0000000),px(%0000000),px(%0011111),px(%1111100),px(%0000000),px(%0000000)
|
||||
.byte px(%0011000),px(%0000000),px(%0000110),px(%0000000),px(%0000000),px(%0000011),px(%1100001),px(%1110000),px(%0000000),px(%0000000)
|
||||
.byte px(%0000110),px(%0000000),px(%0000110),px(%0000000),px(%0000000),px(%0111100),px(%0000000),px(%0000000),px(%0000000),px(%0000000)
|
||||
.byte px(%0000001),px(%1110000),px(%0000110),px(%0000000),px(%0011111),px(%1000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000)
|
||||
.byte px(%0000000),px(%0001111),px(%0000110),px(%0001111),px(%1100000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000)
|
||||
.byte px(%0000000),px(%0000000),px(%1111111),px(%1110000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000)
|
||||
|
||||
;;; ============================================================
|
||||
|
||||
da_end:
|
|
@ -3,9 +3,9 @@
|
|||
.include "apple2.inc"
|
||||
.include "../inc/apple2.inc"
|
||||
.include "../inc/prodos.inc"
|
||||
.include "../mgtk.inc"
|
||||
.include "../mgtk/mgtk.inc"
|
||||
.include "../desktop.inc"
|
||||
.include "../macros.inc"
|
||||
.include "../inc/macros.inc"
|
||||
|
||||
;;; ============================================================
|
||||
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
.include "apple2.inc"
|
||||
.include "../inc/apple2.inc"
|
||||
.include "../inc/prodos.inc"
|
||||
.include "../mgtk.inc"
|
||||
.include "../mgtk/mgtk.inc"
|
||||
.include "../desktop.inc"
|
||||
.include "../macros.inc"
|
||||
.include "../inc/macros.inc"
|
||||
|
||||
;;; ============================================================
|
||||
|
||||
|
@ -46,7 +46,7 @@ da_window_id = 60
|
|||
da_width = 400
|
||||
da_height = 118
|
||||
da_left = (screen_width - da_width)/2
|
||||
da_top = 50
|
||||
da_top = 45
|
||||
|
||||
.proc winfo
|
||||
window_id: .byte da_window_id
|
||||
|
@ -86,6 +86,14 @@ str_title:
|
|||
;;; ============================================================
|
||||
|
||||
.proc ii_bitmap
|
||||
viewloc: DEFINE_POINT 59, 8
|
||||
mapbits: .addr ii_bits
|
||||
mapwidth: .byte 8
|
||||
reserved: .res 1
|
||||
maprect: DEFINE_RECT 0, 0, 50, 18
|
||||
.endproc
|
||||
|
||||
.proc iie_bitmap
|
||||
viewloc: DEFINE_POINT 59, 5
|
||||
mapbits: .addr iie_bits
|
||||
mapwidth: .byte 8
|
||||
|
@ -133,177 +141,195 @@ reserved: .res 1
|
|||
maprect: DEFINE_RECT 0, 0, 47, 29
|
||||
.endproc
|
||||
|
||||
ii_bits:
|
||||
.byte px(%0000000),px(%1111111),px(%1111111),px(%1111111),px(%1000000),px(%0000000),px(%0000000),px(%0000000)
|
||||
.byte px(%0000001),px(%1000000),px(%0000000),px(%0000000),px(%1100000),px(%0000000),px(%0000000),px(%0000000)
|
||||
.byte px(%0000001),px(%1001111),px(%1111111),px(%1111100),px(%1100000),px(%0000000),px(%0000000),px(%0000000)
|
||||
.byte px(%0000001),px(%1001100),px(%0000000),px(%0001100),px(%1111111),px(%1111111),px(%1100000),px(%0000000)
|
||||
.byte px(%0000001),px(%1001100),px(%1100110),px(%0001100),px(%1100000),px(%0000000),px(%1100000),px(%0000000)
|
||||
.byte px(%0000001),px(%1001100),px(%0000000),px(%0001100),px(%1100111),px(%1111100),px(%1100000),px(%0000000)
|
||||
.byte px(%0000001),px(%1001100),px(%1100000),px(%0001100),px(%1100000),px(%0000000),px(%1100000),px(%0000000)
|
||||
.byte px(%0000001),px(%1001100),px(%0000000),px(%0001100),px(%1111111),px(%1111111),px(%1100000),px(%0000000)
|
||||
.byte px(%0000001),px(%1001100),px(%0000000),px(%0001100),px(%1100000),px(%0000000),px(%1100000),px(%0000000)
|
||||
.byte px(%0000001),px(%1001111),px(%1111111),px(%1111100),px(%1100111),px(%1111100),px(%1100000),px(%0000000)
|
||||
.byte px(%0000001),px(%1000000),px(%0000000),px(%0000000),px(%1100000),px(%0000000),px(%1100000),px(%0000000)
|
||||
.byte px(%0000000),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1000000),px(%0000000)
|
||||
.byte px(%0000011),px(%1000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%1110000),px(%0000000)
|
||||
.byte px(%0001110),px(%0001100),px(%1100110),px(%0110011),px(%0011001),px(%1001100),px(%0011100),px(%0000000)
|
||||
.byte px(%0111000),px(%0110011),px(%0011001),px(%1001100),px(%1100110),px(%0110011),px(%0000111),px(%0000000)
|
||||
.byte px(%1100001),px(%1001100),px(%1100110),px(%0110011),px(%0011001),px(%1001100),px(%1100001),px(%1000000)
|
||||
.byte px(%1100000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000001),px(%1000000)
|
||||
.byte px(%0111000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000111),px(%0000000)
|
||||
.byte px(%0001111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111100),px(%0000000)
|
||||
|
||||
iie_bits:
|
||||
.byte px(%1111111),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0111111),px(%1111111)
|
||||
.byte px(%1111110),px(%0111111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%0011111),px(%1111111)
|
||||
.byte px(%1111110),px(%0110000),px(%0000000),px(%0000000),px(%0000000),px(%0111111),px(%0011111),px(%1111111)
|
||||
.byte px(%1111110),px(%0110011),px(%1111111),px(%1111111),px(%1111110),px(%0111111),px(%0011111),px(%1111111)
|
||||
.byte px(%1111110),px(%0110011),px(%0011001),px(%1001100),px(%1111110),px(%0111111),px(%0011111),px(%1111111)
|
||||
.byte px(%1111110),px(%0110011),px(%1111111),px(%1111111),px(%1111110),px(%0111111),px(%0011111),px(%1111111)
|
||||
.byte px(%1111110),px(%0110011),px(%0011001),px(%1111111),px(%1111110),px(%0111111),px(%0011111),px(%1111111)
|
||||
.byte px(%1111110),px(%0110011),px(%1111111),px(%1111111),px(%1111110),px(%0111111),px(%0011111),px(%1111111)
|
||||
.byte px(%1111110),px(%0110011),px(%0011111),px(%1111111),px(%1111110),px(%0111111),px(%0011111),px(%1111111)
|
||||
.byte px(%1111110),px(%0110011),px(%1111111),px(%1111111),px(%1111110),px(%0111111),px(%0011111),px(%1111111)
|
||||
.byte px(%1111110),px(%0110011),px(%1111111),px(%1111111),px(%1111110),px(%0111111),px(%0011111),px(%1111111)
|
||||
.byte px(%1111110),px(%0110011),px(%1111111),px(%1111111),px(%1111110),px(%0110011),px(%0011111),px(%1111111)
|
||||
.byte px(%1111110),px(%0110000),px(%0000000),px(%0000000),px(%0000000),px(%0110011),px(%0011111),px(%1111111)
|
||||
.byte px(%1111110),px(%0111111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%0011111),px(%1111111)
|
||||
.byte px(%1111111),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0111111),px(%1111111)
|
||||
.byte px(%1111110),px(%0111111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%0011111),px(%1111111)
|
||||
.byte px(%1111110),px(%0111100),px(%0000000),px(%0111111),px(%0000000),px(%0001111),px(%0011111),px(%1111111)
|
||||
.byte px(%1111110),px(%0111111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%0011111),px(%1111111)
|
||||
.byte px(%1111111),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0111111),px(%1111111)
|
||||
.byte px(%1111100),px(%0111111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%0001111),px(%1111111)
|
||||
.byte px(%1110001),px(%1110011),px(%0011001),px(%1001100),px(%1100110),px(%0110011),px(%1100011),px(%1111111)
|
||||
.byte px(%1000111),px(%1001100),px(%1100110),px(%0110011),px(%0011001),px(%1001100),px(%1111000),px(%1111111)
|
||||
.byte px(%0011110),px(%0110011),px(%0011001),px(%1001100),px(%1100110),px(%0110011),px(%0011110),px(%0111111)
|
||||
.byte px(%0011111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111110),px(%0111111)
|
||||
.byte px(%1000111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111000),px(%1111111)
|
||||
.byte px(%1110000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000011),px(%1111111)
|
||||
|
||||
.byte px(%0000000),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1000000),px(%0000000)
|
||||
.byte px(%0000001),px(%1000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%1100000),px(%0000000)
|
||||
.byte px(%0000001),px(%1001111),px(%1111111),px(%1111111),px(%1111111),px(%1000000),px(%1100000),px(%0000000)
|
||||
.byte px(%0000001),px(%1001100),px(%0000000),px(%0000000),px(%0000001),px(%1000000),px(%1100000),px(%0000000)
|
||||
.byte px(%0000001),px(%1001100),px(%1100110),px(%0110011),px(%0000001),px(%1000000),px(%1100000),px(%0000000)
|
||||
.byte px(%0000001),px(%1001100),px(%0000000),px(%0000000),px(%0000001),px(%1000000),px(%1100000),px(%0000000)
|
||||
.byte px(%0000001),px(%1001100),px(%1100110),px(%0000000),px(%0000001),px(%1000000),px(%1100000),px(%0000000)
|
||||
.byte px(%0000001),px(%1001100),px(%0000000),px(%0000000),px(%0000001),px(%1000000),px(%1100000),px(%0000000)
|
||||
.byte px(%0000001),px(%1001100),px(%1100000),px(%0000000),px(%0000001),px(%1000000),px(%1100000),px(%0000000)
|
||||
.byte px(%0000001),px(%1001100),px(%0000000),px(%0000000),px(%0000001),px(%1000000),px(%1100000),px(%0000000)
|
||||
.byte px(%0000001),px(%1001100),px(%0000000),px(%0000000),px(%0000001),px(%1000000),px(%1100000),px(%0000000)
|
||||
.byte px(%0000001),px(%1001100),px(%0000000),px(%0000000),px(%0000001),px(%1001100),px(%1100000),px(%0000000)
|
||||
.byte px(%0000001),px(%1001111),px(%1111111),px(%1111111),px(%1111111),px(%1001100),px(%1100000),px(%0000000)
|
||||
.byte px(%0000001),px(%1000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%1100000),px(%0000000)
|
||||
.byte px(%0000000),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1000000),px(%0000000)
|
||||
.byte px(%0000001),px(%1000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%1100000),px(%0000000)
|
||||
.byte px(%0000001),px(%1000011),px(%1111111),px(%1000000),px(%1111111),px(%1110000),px(%1100000),px(%0000000)
|
||||
.byte px(%0000001),px(%1000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%1100000),px(%0000000)
|
||||
.byte px(%0000000),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1000000),px(%0000000)
|
||||
.byte px(%0000011),px(%1000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%1110000),px(%0000000)
|
||||
.byte px(%0001110),px(%0001100),px(%1100110),px(%0110011),px(%0011001),px(%1001100),px(%0011100),px(%0000000)
|
||||
.byte px(%0111000),px(%0110011),px(%0011001),px(%1001100),px(%1100110),px(%0110011),px(%0000111),px(%0000000)
|
||||
.byte px(%1100001),px(%1001100),px(%1100110),px(%0110011),px(%0011001),px(%1001100),px(%1100001),px(%1000000)
|
||||
.byte px(%1100000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000001),px(%1000000)
|
||||
.byte px(%0111000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000111),px(%0000000)
|
||||
.byte px(%0001111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111100),px(%0000000)
|
||||
|
||||
iic_bits:
|
||||
.byte px(%1111111),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000111),px(%1111111)
|
||||
.byte px(%1111110),px(%0111111),px(%1111111),px(%1111111),px(%1111111),px(%1110011),px(%1111111)
|
||||
.byte px(%1111110),px(%0111000),px(%0000000),px(%0000000),px(%0000000),px(%1110011),px(%1111111)
|
||||
.byte px(%1111110),px(%0110011),px(%1111111),px(%1111111),px(%1111110),px(%0110011),px(%1111111)
|
||||
.byte px(%1111110),px(%0110011),px(%0011001),px(%1001100),px(%1111110),px(%0110011),px(%1111111)
|
||||
.byte px(%1111110),px(%0110011),px(%1111111),px(%1111111),px(%1111110),px(%0110011),px(%1111111)
|
||||
.byte px(%1111110),px(%0110011),px(%0011001),px(%1111111),px(%1111110),px(%0110011),px(%1111111)
|
||||
.byte px(%1111110),px(%0110011),px(%1111111),px(%1111111),px(%1111110),px(%0110011),px(%1111111)
|
||||
.byte px(%1111110),px(%0110011),px(%0011111),px(%1111111),px(%1111110),px(%0110011),px(%1111111)
|
||||
.byte px(%1111110),px(%0110011),px(%1111111),px(%1111111),px(%1111110),px(%0110011),px(%1111111)
|
||||
.byte px(%1111110),px(%0110011),px(%1111111),px(%1111111),px(%1111110),px(%0110011),px(%1111111)
|
||||
.byte px(%1111110),px(%0110011),px(%1111111),px(%1111111),px(%1111110),px(%0110011),px(%1111111)
|
||||
.byte px(%1111110),px(%0111000),px(%0000000),px(%0000000),px(%0000000),px(%1110011),px(%1111111)
|
||||
.byte px(%1111110),px(%0111111),px(%1111111),px(%1111111),px(%1111111),px(%1110011),px(%1111111)
|
||||
.byte px(%1111111),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000111),px(%1111111)
|
||||
.byte px(%1111111),px(%1111100),px(%1111111),px(%1111111),px(%1111001),px(%1111111),px(%1111111)
|
||||
.byte px(%1110000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0111111)
|
||||
.byte px(%1100111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%0011111)
|
||||
.byte px(%1100110),px(%1101101),px(%1011011),px(%0110110),px(%1101101),px(%1011011),px(%0011111)
|
||||
.byte px(%1100110),px(%1101101),px(%1011011),px(%0110110),px(%1101101),px(%1011011),px(%0011111)
|
||||
.byte px(%1001110),px(%1101101),px(%1011011),px(%0110110),px(%1101101),px(%1011011),px(%1001111)
|
||||
.byte px(%1001110),px(%1101101),px(%1011011),px(%0110110),px(%1101101),px(%1011011),px(%1001111)
|
||||
.byte px(%1001111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1001111)
|
||||
.byte px(%0011110),px(%0110011),px(%0011001),px(%1001100),px(%1100110),px(%0110011),px(%1100111)
|
||||
.byte px(%0011001),px(%1001100),px(%1100110),px(%0110011),px(%0011001),px(%1001100),px(%1100111)
|
||||
.byte px(%0011110),px(%0110011),px(%0011001),px(%1001100),px(%1100110),px(%0110011),px(%1100111)
|
||||
.byte px(%0011111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1100111)
|
||||
.byte px(%1000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0001111)
|
||||
.byte px(%0000000),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111000),px(%0000000)
|
||||
.byte px(%0000001),px(%1000000),px(%0000000),px(%0000000),px(%0000000),px(%0001100),px(%0000000)
|
||||
.byte px(%0000001),px(%1000111),px(%1111111),px(%1111111),px(%1111111),px(%0001100),px(%0000000)
|
||||
.byte px(%0000001),px(%1001100),px(%0000000),px(%0000000),px(%0000001),px(%1001100),px(%0000000)
|
||||
.byte px(%0000001),px(%1001100),px(%1100110),px(%0110011),px(%0000001),px(%1001100),px(%0000000)
|
||||
.byte px(%0000001),px(%1001100),px(%0000000),px(%0000000),px(%0000001),px(%1001100),px(%0000000)
|
||||
.byte px(%0000001),px(%1001100),px(%1100110),px(%0000000),px(%0000001),px(%1001100),px(%0000000)
|
||||
.byte px(%0000001),px(%1001100),px(%0000000),px(%0000000),px(%0000001),px(%1001100),px(%0000000)
|
||||
.byte px(%0000001),px(%1001100),px(%1100000),px(%0000000),px(%0000001),px(%1001100),px(%0000000)
|
||||
.byte px(%0000001),px(%1001100),px(%0000000),px(%0000000),px(%0000001),px(%1001100),px(%0000000)
|
||||
.byte px(%0000001),px(%1001100),px(%0000000),px(%0000000),px(%0000001),px(%1001100),px(%0000000)
|
||||
.byte px(%0000001),px(%1001100),px(%0000000),px(%0000000),px(%0000001),px(%1001100),px(%0000000)
|
||||
.byte px(%0000001),px(%1000111),px(%1111111),px(%1111111),px(%1111111),px(%0001100),px(%0000000)
|
||||
.byte px(%0000001),px(%1000000),px(%0000000),px(%0000000),px(%0000000),px(%0001100),px(%0000000)
|
||||
.byte px(%0000000),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111000),px(%0000000)
|
||||
.byte px(%0000000),px(%0000011),px(%0000000),px(%0000000),px(%0000110),px(%0000000),px(%0000000)
|
||||
.byte px(%0001111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1000000)
|
||||
.byte px(%0011000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%1100000)
|
||||
.byte px(%0011001),px(%0010010),px(%0100100),px(%1001001),px(%0010010),px(%0100100),px(%1100000)
|
||||
.byte px(%0011001),px(%0010010),px(%0100100),px(%1001001),px(%0010010),px(%0100100),px(%1100000)
|
||||
.byte px(%0110001),px(%0010010),px(%0100100),px(%1001001),px(%0010010),px(%0100100),px(%0110000)
|
||||
.byte px(%0110001),px(%0010010),px(%0100100),px(%1001001),px(%0010010),px(%0100100),px(%0110000)
|
||||
.byte px(%0110000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0110000)
|
||||
.byte px(%1100001),px(%1001100),px(%1100110),px(%0110011),px(%0011001),px(%1001100),px(%0011000)
|
||||
.byte px(%1100110),px(%0110011),px(%0011001),px(%1001100),px(%1100110),px(%0110011),px(%0011000)
|
||||
.byte px(%1100001),px(%1001100),px(%1100110),px(%0110011),px(%0011001),px(%1001100),px(%0011000)
|
||||
.byte px(%1100000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0011000)
|
||||
.byte px(%0111111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1110000)
|
||||
|
||||
iigs_bits:
|
||||
.byte px(%1000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0011111)
|
||||
.byte px(%0011111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1001111)
|
||||
.byte px(%0011000),px(%0000000),px(%0000000),px(%0000000),px(%0000001),px(%1001111)
|
||||
.byte px(%0011001),px(%1111111),px(%1111111),px(%1111111),px(%1111001),px(%1001111)
|
||||
.byte px(%0011001),px(%1001100),px(%1100110),px(%0111111),px(%1111001),px(%1001111)
|
||||
.byte px(%0011001),px(%1111111),px(%1111111),px(%1111111),px(%1111001),px(%1001111)
|
||||
.byte px(%0011001),px(%1001100),px(%1111111),px(%1111111),px(%1111001),px(%1001111)
|
||||
.byte px(%0011001),px(%1111111),px(%1111111),px(%1111111),px(%1111001),px(%1001111)
|
||||
.byte px(%0011001),px(%1001111),px(%1111111),px(%1111111),px(%1111001),px(%1001111)
|
||||
.byte px(%0011001),px(%1111111),px(%1111111),px(%1111111),px(%1111001),px(%1001111)
|
||||
.byte px(%0011001),px(%1111111),px(%1111111),px(%1111111),px(%1111001),px(%1001111)
|
||||
.byte px(%0011001),px(%1111111),px(%1111111),px(%1111111),px(%1111001),px(%1001111)
|
||||
.byte px(%0011001),px(%1111111),px(%1111111),px(%1111111),px(%1111001),px(%1001111)
|
||||
.byte px(%0011000),px(%0000000),px(%0000000),px(%0000000),px(%0000001),px(%1001111)
|
||||
.byte px(%0011111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1001111)
|
||||
.byte px(%1000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0011111)
|
||||
.byte px(%1100111),px(%1111111),px(%1111111),px(%1111111),px(%1111110),px(%0111111)
|
||||
.byte px(%1100111),px(%1111111),px(%1111111),px(%1111111),px(%1111110),px(%0111111)
|
||||
.byte px(%1100111),px(%1111111),px(%1111111),px(%1111111),px(%1111110),px(%0111111)
|
||||
.byte px(%1100111),px(%1111111),px(%1111111),px(%1111111),px(%1111110),px(%0111111)
|
||||
.byte px(%1100110),px(%0110000),px(%0011111),px(%1111111),px(%1111110),px(%0111111)
|
||||
.byte px(%1100111),px(%1111111),px(%1111111),px(%1111111),px(%1111110),px(%0111111)
|
||||
.byte px(%1100000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0111111)
|
||||
.byte px(%1100111),px(%1111111),px(%1111111),px(%1111111),px(%1111110),px(%0111111)
|
||||
.byte px(%1100111),px(%1111111),px(%1111111),px(%1111111),px(%1111110),px(%0111111)
|
||||
.byte px(%1110000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%1111111)
|
||||
.byte px(%0111111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1100000)
|
||||
.byte px(%1100000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0110000)
|
||||
.byte px(%1100111),px(%1111111),px(%1111111),px(%1111111),px(%1111110),px(%0110000)
|
||||
.byte px(%1100110),px(%0000000),px(%0000000),px(%0000000),px(%0000110),px(%0110000)
|
||||
.byte px(%1100110),px(%0110011),px(%0011001),px(%1000000),px(%0000110),px(%0110000)
|
||||
.byte px(%1100110),px(%0000000),px(%0000000),px(%0000000),px(%0000110),px(%0110000)
|
||||
.byte px(%1100110),px(%0110011),px(%0000000),px(%0000000),px(%0000110),px(%0110000)
|
||||
.byte px(%1100110),px(%0000000),px(%0000000),px(%0000000),px(%0000110),px(%0110000)
|
||||
.byte px(%1100110),px(%0110000),px(%0000000),px(%0000000),px(%0000110),px(%0110000)
|
||||
.byte px(%1100110),px(%0000000),px(%0000000),px(%0000000),px(%0000110),px(%0110000)
|
||||
.byte px(%1100110),px(%0000000),px(%0000000),px(%0000000),px(%0000110),px(%0110000)
|
||||
.byte px(%1100110),px(%0000000),px(%0000000),px(%0000000),px(%0000110),px(%0110000)
|
||||
.byte px(%1100110),px(%0000000),px(%0000000),px(%0000000),px(%0000110),px(%0110000)
|
||||
.byte px(%1100111),px(%1111111),px(%1111111),px(%1111111),px(%1111110),px(%0110000)
|
||||
.byte px(%1100000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0110000)
|
||||
.byte px(%0111111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1100000)
|
||||
.byte px(%0011000),px(%0000000),px(%0000000),px(%0000000),px(%0000001),px(%1000000)
|
||||
.byte px(%0011000),px(%0000000),px(%0000000),px(%0000000),px(%0000001),px(%1000000)
|
||||
.byte px(%0011000),px(%0000000),px(%0000000),px(%0000000),px(%0000001),px(%1000000)
|
||||
.byte px(%0011000),px(%0000000),px(%0000000),px(%0000000),px(%0000001),px(%1000000)
|
||||
.byte px(%0011001),px(%1001111),px(%1100000),px(%0000000),px(%0000001),px(%1000000)
|
||||
.byte px(%0011000),px(%0000000),px(%0000000),px(%0000000),px(%0000001),px(%1000000)
|
||||
.byte px(%0011111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1000000)
|
||||
.byte px(%0011000),px(%0000000),px(%0000000),px(%0000000),px(%0000001),px(%1000000)
|
||||
.byte px(%0011000),px(%0000000),px(%0000000),px(%0000000),px(%0000001),px(%1000000)
|
||||
.byte px(%0001111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%0000000)
|
||||
|
||||
iii_bits:
|
||||
.byte px(%1111111),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000011),px(%1111111)
|
||||
.byte px(%1111110),px(%0111111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111001),px(%1111111)
|
||||
.byte px(%1111110),px(%0110000),px(%0000000),px(%0000000),px(%0000000),px(%0111111),px(%1111001),px(%1111111)
|
||||
.byte px(%1111110),px(%0110011),px(%1111111),px(%1111111),px(%1111110),px(%0111111),px(%1111001),px(%1111111)
|
||||
.byte px(%1111110),px(%0110011),px(%0011001),px(%1001100),px(%1111110),px(%0111111),px(%1111001),px(%1111111)
|
||||
.byte px(%1111110),px(%0110011),px(%1111111),px(%1111111),px(%1111110),px(%0111111),px(%1111001),px(%1111111)
|
||||
.byte px(%1111110),px(%0110011),px(%0011001),px(%1111111),px(%1111110),px(%0111111),px(%1111001),px(%1111111)
|
||||
.byte px(%1111110),px(%0110011),px(%1111111),px(%1111111),px(%1111110),px(%0111111),px(%1111001),px(%1111111)
|
||||
.byte px(%1111110),px(%0110011),px(%0011111),px(%1111111),px(%1111110),px(%0110011),px(%0011001),px(%1111111)
|
||||
.byte px(%1111110),px(%0110011),px(%1111111),px(%1111111),px(%1111110),px(%0110011),px(%0011001),px(%1111111)
|
||||
.byte px(%1111110),px(%0110000),px(%0000000),px(%0000000),px(%0000000),px(%0111111),px(%1111001),px(%1111111)
|
||||
.byte px(%1111110),px(%0111111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111001),px(%1111111)
|
||||
.byte px(%1111111),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000011),px(%1111111)
|
||||
.byte px(%1111110),px(%0111111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111001),px(%1111111)
|
||||
.byte px(%1111110),px(%0111111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111001),px(%1111111)
|
||||
.byte px(%1111110),px(%0111111),px(%1111111),px(%1111111),px(%1111000),px(%0000000),px(%1111001),px(%1111111)
|
||||
.byte px(%1111110),px(%0111100),px(%0000111),px(%1111111),px(%1111111),px(%0000111),px(%1111001),px(%1111111)
|
||||
.byte px(%1111110),px(%0111111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111001),px(%1111111)
|
||||
.byte px(%1111110),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000001),px(%1111111)
|
||||
.byte px(%1111100),px(%0111111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111000),px(%1111111)
|
||||
.byte px(%1110001),px(%1110011),px(%0011001),px(%1001100),px(%1100111),px(%1110011),px(%0011110),px(%0011111)
|
||||
.byte px(%1000111),px(%1001100),px(%1100110),px(%0110011),px(%0011001),px(%1111100),px(%1100111),px(%1000111)
|
||||
.byte px(%0011110),px(%0110011),px(%0011001),px(%1001100),px(%1100110),px(%0111111),px(%0011001),px(%1110011)
|
||||
.byte px(%0011111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1110011)
|
||||
.byte px(%1000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000111)
|
||||
.byte px(%0000000),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111100),px(%0000000)
|
||||
.byte px(%0000001),px(%1000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000110),px(%0000000)
|
||||
.byte px(%0000001),px(%1001111),px(%1111111),px(%1111111),px(%1111111),px(%1000000),px(%0000110),px(%0000000)
|
||||
.byte px(%0000001),px(%1001100),px(%0000000),px(%0000000),px(%0000001),px(%1000000),px(%0000110),px(%0000000)
|
||||
.byte px(%0000001),px(%1001100),px(%1100110),px(%0110011),px(%0000001),px(%1000000),px(%0000110),px(%0000000)
|
||||
.byte px(%0000001),px(%1001100),px(%0000000),px(%0000000),px(%0000001),px(%1000000),px(%0000110),px(%0000000)
|
||||
.byte px(%0000001),px(%1001100),px(%1100110),px(%0000000),px(%0000001),px(%1000000),px(%0000110),px(%0000000)
|
||||
.byte px(%0000001),px(%1001100),px(%0000000),px(%0000000),px(%0000001),px(%1000000),px(%0000110),px(%0000000)
|
||||
.byte px(%0000001),px(%1001100),px(%1100000),px(%0000000),px(%0000001),px(%1001100),px(%1100110),px(%0000000)
|
||||
.byte px(%0000001),px(%1001100),px(%0000000),px(%0000000),px(%0000001),px(%1001100),px(%1100110),px(%0000000)
|
||||
.byte px(%0000001),px(%1001111),px(%1111111),px(%1111111),px(%1111111),px(%1000000),px(%0000110),px(%0000000)
|
||||
.byte px(%0000001),px(%1000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000110),px(%0000000)
|
||||
.byte px(%0000000),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111100),px(%0000000)
|
||||
.byte px(%0000001),px(%1000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000110),px(%0000000)
|
||||
.byte px(%0000001),px(%1000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000110),px(%0000000)
|
||||
.byte px(%0000001),px(%1000000),px(%0000000),px(%0000000),px(%0000111),px(%1111111),px(%0000110),px(%0000000)
|
||||
.byte px(%0000001),px(%1000011),px(%1111000),px(%0000000),px(%0000000),px(%1111000),px(%0000110),px(%0000000)
|
||||
.byte px(%0000001),px(%1000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000110),px(%0000000)
|
||||
.byte px(%0000001),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111110),px(%0000000)
|
||||
.byte px(%0000011),px(%1000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000111),px(%0000000)
|
||||
.byte px(%0001110),px(%0001100),px(%1100110),px(%0110011),px(%0011000),px(%0001100),px(%1100001),px(%1100000)
|
||||
.byte px(%0111000),px(%0110011),px(%0011001),px(%1001100),px(%1100110),px(%0000011),px(%0011000),px(%0111000)
|
||||
.byte px(%1100001),px(%1001100),px(%1100110),px(%0110011),px(%0011001),px(%1000000),px(%1100110),px(%0001100)
|
||||
.byte px(%1100000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0001100)
|
||||
.byte px(%0111111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111000)
|
||||
|
||||
iie_card_bits:
|
||||
.byte px(%1110000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000111),px(%1111111)
|
||||
.byte px(%1100001),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1100111),px(%1111111)
|
||||
.byte px(%1100001),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1100111),px(%1100111),px(%1111111)
|
||||
.byte px(%1100001),px(%1111111),px(%1111111),px(%1111000),px(%0000011),px(%1100111),px(%1100111),px(%1111111)
|
||||
.byte px(%1100001),px(%1000111),px(%1100110),px(%0111000),px(%0000011),px(%1111111),px(%1100111),px(%1000011)
|
||||
.byte px(%1100001),px(%1000111),px(%1100110),px(%0111000),px(%0000011),px(%1111111),px(%1100111),px(%1000011)
|
||||
.byte px(%1110011),px(%1111111),px(%1100110),px(%0111000),px(%0000011),px(%1111111),px(%1100111),px(%1000011)
|
||||
.byte px(%1110011),px(%0000111),px(%1111111),px(%1111000),px(%0000011),px(%1100000),px(%1100110),px(%0000000)
|
||||
.byte px(%1110011),px(%0000111),px(%1000011),px(%1111111),px(%1111111),px(%1100000),px(%1100111),px(%0000001)
|
||||
.byte px(%1110011),px(%0000111),px(%1000011),px(%1111111),px(%1111111),px(%1100000),px(%1100111),px(%1000011)
|
||||
.byte px(%1110011),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1100111),px(%1100111)
|
||||
.byte px(%1110000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000111),px(%1111111)
|
||||
.byte px(%0001111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111000),px(%0000000)
|
||||
.byte px(%0011110),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0011000),px(%0000000)
|
||||
.byte px(%0011110),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0011000),px(%0011000),px(%0000000)
|
||||
.byte px(%0011110),px(%0000000),px(%0000000),px(%0000111),px(%1111100),px(%0011000),px(%0011000),px(%0000000)
|
||||
.byte px(%0011110),px(%0111000),px(%0011001),px(%1000111),px(%1111100),px(%0000000),px(%0011000),px(%0111100)
|
||||
.byte px(%0011110),px(%0111000),px(%0011001),px(%1000111),px(%1111100),px(%0000000),px(%0011000),px(%0111100)
|
||||
.byte px(%0001100),px(%0000000),px(%0011001),px(%1000111),px(%1111100),px(%0000000),px(%0011000),px(%0111100)
|
||||
.byte px(%0001100),px(%1111000),px(%0000000),px(%0000111),px(%1111100),px(%0011111),px(%0011001),px(%1111111)
|
||||
.byte px(%0001100),px(%1111000),px(%0111100),px(%0000000),px(%0000000),px(%0011111),px(%0011000),px(%1111110)
|
||||
.byte px(%0001100),px(%1111000),px(%0111100),px(%0000000),px(%0000000),px(%0011111),px(%0011000),px(%0111100)
|
||||
.byte px(%0001100),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0011000),px(%0011000)
|
||||
.byte px(%0001111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111000),px(%0000000)
|
||||
.byte px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000)
|
||||
.byte px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111111)
|
||||
.byte px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000)
|
||||
.byte px(%0011111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111100)
|
||||
.byte px(%0011111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111100)
|
||||
.byte px(%0011111),px(%1111111),px(%1111111),px(%1111111),px(%1111100),px(%0000000),px(%0000000),px(%0011100)
|
||||
.byte px(%0011111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111100)
|
||||
.byte px(%0011111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111100)
|
||||
.byte px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000)
|
||||
.byte px(%1110011),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1100111)
|
||||
.byte px(%1110000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000111)
|
||||
.byte px(%1100000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000011)
|
||||
.byte px(%1100000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000011)
|
||||
.byte px(%1100000),px(%0000000),px(%0000000),px(%0000000),px(%0000011),px(%1111111),px(%1111111),px(%1100011)
|
||||
.byte px(%1100000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000011)
|
||||
.byte px(%1100000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000011)
|
||||
.byte px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111111)
|
||||
.byte px(%0001100),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0011000)
|
||||
.byte px(%0001111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111000)
|
||||
|
||||
laser128_bits:
|
||||
.byte px(%1111111),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0111111)
|
||||
.byte px(%1111110),px(%0111111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%0011111)
|
||||
.byte px(%1111110),px(%0111000),px(%0000000),px(%0000000),px(%0000000),px(%1111111),px(%0011111)
|
||||
.byte px(%1111110),px(%0110011),px(%1111111),px(%1111111),px(%1111110),px(%0111111),px(%0011111)
|
||||
.byte px(%1111110),px(%0110011),px(%0011001),px(%1001100),px(%1111110),px(%0111111),px(%0011111)
|
||||
.byte px(%1111110),px(%0110011),px(%1111111),px(%1111111),px(%1111110),px(%0111111),px(%0011111)
|
||||
.byte px(%1111110),px(%0110011),px(%0011001),px(%1111111),px(%1111110),px(%0111111),px(%0011111)
|
||||
.byte px(%1111110),px(%0110011),px(%1111111),px(%1111111),px(%1111110),px(%0111111),px(%0011111)
|
||||
.byte px(%1111110),px(%0110011),px(%0011111),px(%1111111),px(%1111110),px(%0111111),px(%0011111)
|
||||
.byte px(%1111110),px(%0110011),px(%1111111),px(%1111111),px(%1111110),px(%0111111),px(%0011111)
|
||||
.byte px(%1111110),px(%0110011),px(%1111111),px(%1111111),px(%1111110),px(%0110011),px(%0011111)
|
||||
.byte px(%1111110),px(%0110011),px(%1111111),px(%1111111),px(%1111110),px(%0110011),px(%0011111)
|
||||
.byte px(%1111110),px(%0111000),px(%0000000),px(%0000000),px(%0000000),px(%1111111),px(%0011111)
|
||||
.byte px(%1111110),px(%0111111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%0011111)
|
||||
.byte px(%1111111),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0111111)
|
||||
.byte px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111111)
|
||||
.byte px(%1110000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000011)
|
||||
.byte px(%1100110),px(%0111001),px(%1100111),px(%1111111),px(%1111111),px(%1111111),px(%1111001)
|
||||
.byte px(%1100111),px(%0011100),px(%1110000),px(%0000000),px(%0000000),px(%0000000),px(%0000001)
|
||||
.byte px(%1100111),px(%1001110),px(%0111111),px(%1111111),px(%1111111),px(%1111111),px(%1111001)
|
||||
.byte px(%1100111),px(%1100111),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000001)
|
||||
.byte px(%1100111),px(%1110011),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111001)
|
||||
.byte px(%1100111),px(%1111000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000001)
|
||||
.byte px(%1100111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111001)
|
||||
.byte px(%1100111),px(%1001100),px(%1100110),px(%0110011),px(%1111111),px(%1111111),px(%1111001)
|
||||
.byte px(%1100110),px(%0110011),px(%0011001),px(%1001100),px(%1100110),px(%0110011),px(%0011001)
|
||||
.byte px(%1100111),px(%1001100),px(%1100110),px(%0110011),px(%0011001),px(%1001100),px(%1111001)
|
||||
.byte px(%1100110),px(%0110011),px(%0011001),px(%1001100),px(%1100110),px(%0110011),px(%0011001)
|
||||
.byte px(%1100111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111001)
|
||||
.byte px(%1110000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000011)
|
||||
|
||||
.byte px(%0000000),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1000000)
|
||||
.byte px(%0000001),px(%1000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%1100000)
|
||||
.byte px(%0000001),px(%1000111),px(%1111111),px(%1111111),px(%1111111),px(%0000000),px(%1100000)
|
||||
.byte px(%0000001),px(%1001100),px(%0000000),px(%0000000),px(%0000001),px(%1000000),px(%1100000)
|
||||
.byte px(%0000001),px(%1001100),px(%1100110),px(%0110011),px(%0000001),px(%1000000),px(%1100000)
|
||||
.byte px(%0000001),px(%1001100),px(%0000000),px(%0000000),px(%0000001),px(%1000000),px(%1100000)
|
||||
.byte px(%0000001),px(%1001100),px(%1100110),px(%0000000),px(%0000001),px(%1000000),px(%1100000)
|
||||
.byte px(%0000001),px(%1001100),px(%0000000),px(%0000000),px(%0000001),px(%1000000),px(%1100000)
|
||||
.byte px(%0000001),px(%1001100),px(%1100000),px(%0000000),px(%0000001),px(%1000000),px(%1100000)
|
||||
.byte px(%0000001),px(%1001100),px(%0000000),px(%0000000),px(%0000001),px(%1000000),px(%1100000)
|
||||
.byte px(%0000001),px(%1001100),px(%0000000),px(%0000000),px(%0000001),px(%1001100),px(%1100000)
|
||||
.byte px(%0000001),px(%1001100),px(%0000000),px(%0000000),px(%0000001),px(%1001100),px(%1100000)
|
||||
.byte px(%0000001),px(%1000111),px(%1111111),px(%1111111),px(%1111111),px(%0000000),px(%1100000)
|
||||
.byte px(%0000001),px(%1000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%1100000)
|
||||
.byte px(%0000000),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1000000)
|
||||
.byte px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000)
|
||||
.byte px(%0001111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111100)
|
||||
.byte px(%0011001),px(%1000110),px(%0011000),px(%0000000),px(%0000000),px(%0000000),px(%0000110)
|
||||
.byte px(%0011000),px(%1100011),px(%0001111),px(%1111111),px(%1111111),px(%1111111),px(%1111110)
|
||||
.byte px(%0011000),px(%0110001),px(%1000000),px(%0000000),px(%0000000),px(%0000000),px(%0000110)
|
||||
.byte px(%0011000),px(%0011000),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111110)
|
||||
.byte px(%0011000),px(%0001100),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000110)
|
||||
.byte px(%0011000),px(%0000111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111110)
|
||||
.byte px(%0011000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000110)
|
||||
.byte px(%0011000),px(%0110011),px(%0011001),px(%1001100),px(%0000000),px(%0000000),px(%0000110)
|
||||
.byte px(%0011001),px(%1001100),px(%1100110),px(%0110011),px(%0011001),px(%1001100),px(%1100110)
|
||||
.byte px(%0011000),px(%0110011),px(%0011001),px(%1001100),px(%1100110),px(%0110011),px(%0000110)
|
||||
.byte px(%0011001),px(%1001100),px(%1100110),px(%0110011),px(%0011001),px(%1001100),px(%1100110)
|
||||
.byte px(%0011000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000110)
|
||||
.byte px(%0001111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111100)
|
||||
|
||||
;;; ============================================================
|
||||
|
||||
|
@ -392,7 +418,8 @@ str_empty: PASCAL_STRING "(empty)"
|
|||
str_cpu_prefix: PASCAL_STRING " CPU: "
|
||||
str_6502: PASCAL_STRING "6502"
|
||||
str_65C02: PASCAL_STRING "65C02"
|
||||
str_658xx: PASCAL_STRING "658xx"
|
||||
str_65802: PASCAL_STRING "65802"
|
||||
str_65816: PASCAL_STRING "65816"
|
||||
|
||||
;;; ============================================================
|
||||
|
||||
|
@ -492,6 +519,15 @@ textfont: .addr 0
|
|||
;;; Laser 128 $06 $AC [$E0]
|
||||
;;;
|
||||
;;; (Values in [] are for reference, not needed for compatibility check)
|
||||
;;;
|
||||
;;; Location $FBBE is the version byte for the Apple IIe Card (just as $FBBF is
|
||||
;;; the version byte for the Apple IIc family) and is $00 for the first release
|
||||
;;; of the Apple IIe Card.
|
||||
|
||||
;;; Per MG: There is more than one release of the Apple IIe Card, so we do not
|
||||
;;; check $FBBE. If you are running the latest Apple release of "IIe Startup"
|
||||
;;; this byte is $03.
|
||||
|
||||
|
||||
.enum model
|
||||
ii ; Apple ][
|
||||
|
@ -528,8 +564,8 @@ model_str_table:
|
|||
model_pix_table:
|
||||
.addr ii_bitmap ; Apple ][
|
||||
.addr ii_bitmap ; Apple ][+
|
||||
.addr ii_bitmap ; Apple IIe (original)
|
||||
.addr ii_bitmap ; Apple IIe (enhanced)
|
||||
.addr iie_bitmap ; Apple IIe (original)
|
||||
.addr iie_bitmap ; Apple IIe (enhanced)
|
||||
.addr iic_bitmap ; Apple IIc
|
||||
.addr iic_bitmap ; Apple IIc (3.5 ROM)
|
||||
.addr iic_bitmap ; Apple IIc (Org. Mem. Exp.)
|
||||
|
@ -564,7 +600,7 @@ model_lookup_table:
|
|||
.byte $B3, $06, $C0, $EA, 0
|
||||
|
||||
.byte model::iie_card ; must check before IIe enhanced check
|
||||
.byte $B3, $06, $C0, $E0, $DD, $02, $BE, $00, 0
|
||||
.byte $B3, $06, $C0, $E0, $DD, $02, 0
|
||||
|
||||
.byte model::iie_enhanced
|
||||
.byte $B3, $06, $C0, $E0, 0
|
||||
|
@ -743,7 +779,7 @@ done: rts
|
|||
|
||||
.proc exit
|
||||
MGTK_CALL MGTK::CloseWindow, winfo
|
||||
DESKTOP_CALL DT_REDRAW_ICONS
|
||||
ITK_CALL IconTK::REDRAW_ICONS
|
||||
rts ; exits input loop
|
||||
.endproc
|
||||
|
||||
|
@ -806,7 +842,7 @@ done: rts
|
|||
jsr draw_window
|
||||
|
||||
;; Draw DeskTop icons
|
||||
DESKTOP_CALL DT_REDRAW_ICONS
|
||||
ITK_CALL IconTK::REDRAW_ICONS
|
||||
|
||||
: jmp input_loop
|
||||
|
||||
|
@ -862,6 +898,7 @@ egg: .byte 0
|
|||
MGTK_CALL MGTK::HideCursor
|
||||
|
||||
copy16 model_pix_ptr, bits_addr
|
||||
MGTK_CALL MGTK::SetPenMode, penmode
|
||||
MGTK_CALL MGTK::PaintBits, $0000, bits_addr
|
||||
|
||||
MGTK_CALL MGTK::MoveTo, model_pos
|
||||
|
@ -871,7 +908,6 @@ egg: .byte 0
|
|||
MGTK_CALL MGTK::MoveTo, pdver_pos
|
||||
addr_call draw_pascal_string, str_prodos_version
|
||||
|
||||
MGTK_CALL MGTK::SetPenMode, penmode
|
||||
MGTK_CALL MGTK::MoveTo, line1
|
||||
MGTK_CALL MGTK::LineTo, line2
|
||||
|
||||
|
@ -1169,18 +1205,25 @@ fail: clc
|
|||
asl16 memory
|
||||
ldax memory
|
||||
jsr int_to_string
|
||||
rts
|
||||
.endproc
|
||||
|
||||
;;; ============================================================
|
||||
;;; Calculate RamWorks memory; returns number of banks in Y
|
||||
;;; (256 banks = 0, since there must be at least 1)
|
||||
;;;
|
||||
;;; Note the bus floats for RamWorks RAM when the bank has no RAM,
|
||||
;;; or bank selection may wrap to an earlier bank.
|
||||
;;; or bank selection may wrap to an earlier bank. This requires
|
||||
;;; three passes (mark, count, restore); if count and restore are
|
||||
;;; combined, it will produce false-positives if wrapping occurs
|
||||
;;; (see https://github.com/inexorabletash/a2d/issues/131).
|
||||
;;;
|
||||
;;; RamWorks-style cards are not guaranteed to have contiguous banks.
|
||||
;;; a user can install 64Kb or 256Kb chips in a physical bank, in the
|
||||
;;; former case, a gap in banks will appear. Additionally, the piggy
|
||||
;;; back cards may not have contiguous banks depending on capacity
|
||||
;;; and installed chips.
|
||||
;;;
|
||||
;;; AE RamWorks cards can only support 8M max (banks $00-$7F), but
|
||||
;;; the various emulators support 16M max (banks $00-$FF).
|
||||
;;;
|
||||
|
@ -1206,8 +1249,11 @@ fail: clc
|
|||
;; Assumes ALTZPON on entry/exit
|
||||
RWBANK := $C073
|
||||
|
||||
ldy #0 ; populated bank count
|
||||
|
||||
;; Iterate downwards (in case unpopulated banks wrap to earlier ones),
|
||||
;; saving bytes and marking each bank.
|
||||
.scope
|
||||
ldx #255 ; bank we are checking
|
||||
: stx RWBANK
|
||||
copy sigb0, buf0,x ; preserve bytes
|
||||
|
@ -1219,10 +1265,11 @@ fail: clc
|
|||
dex
|
||||
cpx #255
|
||||
bne :-
|
||||
.endscope
|
||||
|
||||
;; Iterate upwards, tallying and restoring valid banks.
|
||||
;; Iterate upwards, tallying valid banks.
|
||||
.scope
|
||||
ldx #0 ; bank we are checking
|
||||
ldy #0 ; populated bank count
|
||||
loop: stx RWBANK ; select bank
|
||||
txa
|
||||
cmp sigb0 ; verify first signature
|
||||
|
@ -1230,11 +1277,26 @@ loop: stx RWBANK ; select bank
|
|||
eor #$FF
|
||||
cmp sigb1 ; verify second signature
|
||||
bne next
|
||||
iny ; match - count it, and restore
|
||||
copy buf0,x, sigb0
|
||||
iny ; match - count it
|
||||
next: inx ; next bank
|
||||
bne loop ; if we hit 256 banks, make sure we exit
|
||||
.endscope
|
||||
|
||||
;; Iterate upwards, restoring valid banks.
|
||||
.scope
|
||||
ldx #0 ; bank we are checking
|
||||
loop: stx RWBANK ; select bank
|
||||
txa
|
||||
cmp sigb0 ; verify first signature
|
||||
bne next
|
||||
eor #$FF
|
||||
cmp sigb1 ; verify second signature
|
||||
bne next
|
||||
copy buf0,x, sigb0 ; match - restore it
|
||||
copy buf1,x, sigb1
|
||||
next: inx ; next bank
|
||||
bne loop ; if we hit 256 banks, make sure we exit
|
||||
.endscope
|
||||
|
||||
;; Switch back to RW bank 0 (normal aux memory)
|
||||
lda #0
|
||||
|
@ -1354,7 +1416,16 @@ nonzero_flag: ; high bit set once a non-zero digit seen
|
|||
; 65C02
|
||||
result str_65C02
|
||||
p6502: result str_6502
|
||||
p658xx: result str_658xx
|
||||
|
||||
;; Distinguish 65802 and 65816 by machine ID
|
||||
p658xx: lda ROMIN2
|
||||
sec
|
||||
jsr ID_BYTE_FE1F
|
||||
lda LCBANK1
|
||||
lda LCBANK1
|
||||
bcs p65802
|
||||
result str_65816 ; Only IIgs supports 65816
|
||||
p65802: result str_65802 ; Other boards support 65802
|
||||
.endproc
|
||||
|
||||
;;; ============================================================
|
||||
|
|
129
desktop.inc
129
desktop.inc
|
@ -9,22 +9,36 @@ screen_height = 192
|
|||
|
||||
VERSION_MAJOR = 1
|
||||
VERSION_MINOR = 2
|
||||
.define VERSION_SUFFIX "-alpha1"
|
||||
.define VERSION_SUFFIX "-alpha8"
|
||||
.define RELEASE_DATE "July 30, 2019"
|
||||
|
||||
DA_FILE_TYPE = $F1
|
||||
DA_Aux_TYPE = $640 ; High bit set = don't show in Apple menu
|
||||
|
||||
APP_FILE_TYPE = $01 ; FT_SYS w/ ".SYSTEM" (FT_BAD mapped to FT_TYPELESS)
|
||||
|
||||
max_desk_acc_count = 12
|
||||
|
||||
INVOKER := $290 ; Invoke other programs
|
||||
INVOKER_FILENAME := $280 ; File to invoke (PREFIX must be set)
|
||||
|
||||
DA_LOAD_ADDRESS := $800 ; Loaded into MAIN
|
||||
;;; Desk Accessories are loaded in Main ($800-$1BFF) using
|
||||
;;; an I/O buffer (Main $1C00-1FFF). DAs often copy themselves
|
||||
;;; into Aux but can only use $800-$1AFF due to icon tables.
|
||||
|
||||
DA_LOAD_ADDRESS := $800 ; Loaded into Main
|
||||
DA_IO_BUFFER := $1C00 ; ...through $1FFF
|
||||
DA_MAX_SIZE = DA_IO_BUFFER - DA_LOAD_ADDRESS
|
||||
;; Can't load DA past I/O Buffer at MAIN $1C00,
|
||||
;; but icon tables start at AUX $1B00 so can't clone there.
|
||||
|
||||
;;; Memory in AUX - $80 bytes for desktop and 8 windows. First byte is a
|
||||
;;; Scratch area (in Aux) used during modal operations:
|
||||
;;; * Given to MGTK to save background when menus are shown
|
||||
;;; * Used by DeskTop to save background when alert dialog shown
|
||||
;;; * Used by DeskTop to store icon outline polygons during drag
|
||||
|
||||
SAVE_AREA_BUFFER := $800 ; through $1AFF
|
||||
SAVE_AREA_SIZE = $1300
|
||||
|
||||
;;; Memory in Aux - $80 bytes for desktop and 8 windows. First byte is a
|
||||
;;; count, up to 127 icon entries. $1F80-$1FFF is a map of used/free icon
|
||||
;;; numbers.
|
||||
WINDOW_ICON_TABLES := $1B00
|
||||
|
@ -47,7 +61,7 @@ JUMP_TABLE_SELECT_WINDOW:= $400C ; Select and refresh given window
|
|||
JUMP_TABLE_AUXLOAD := $400F ; Auxload
|
||||
JUMP_TABLE_EJECT := $4012 ; Eject command
|
||||
JUMP_TABLE_REDRAW_ALL := $4015 ; Redraw all windows (e.g. after a drag) *
|
||||
JUMP_TABLE_DESKTOP_RELAY:= $4018 ; DESKTOP relay call (main>aux)
|
||||
JUMP_TABLE_ITK_RELAY := $4018 ; Icon ToolKit relay call (main>aux)
|
||||
JUMP_TABLE_LOAD_OVL := $401B ; Load overlay routine
|
||||
JUMP_TABLE_CLEAR_SEL := $401E ; Clear DeskTop selection *
|
||||
JUMP_TABLE_MLI := $4021 ; ProDOS MLI call (Y=call, X,A=params addr) *
|
||||
|
@ -76,45 +90,47 @@ ERR_INSERT_DST_DISK = $FD
|
|||
ERR_BASIC_SYS_NOT_FOUND = $FE
|
||||
|
||||
;;; ============================================================
|
||||
;;; API Calls (from aux memory)
|
||||
;;; Icon ToolKit Calls (from aux memory)
|
||||
|
||||
.scope IconTK
|
||||
|
||||
;;; * = Used by Desk Accessories
|
||||
|
||||
DESKTOP := $8E00
|
||||
;; MLI-style call (jsr DEKSTOP ; .byte call ; .addr params)
|
||||
;; Call from AUX (RAMRDON/RAMWRTON)
|
||||
MLI := $8E00
|
||||
;; MLI-style call (jsr IconTK::MLI ; .byte call ; .addr params)
|
||||
;; Call from Aux (RAMRDON/RAMWRTON)
|
||||
|
||||
;; Implementation bounces to $93BC, uses jump table at $939E
|
||||
|
||||
DT_ADD_ICON = $01 ; { .addr icondata }
|
||||
DT_HIGHLIGHT_ICON = $02 ; { .byte icon }
|
||||
DT_REDRAW_ICON = $03 ; { .byte icon }
|
||||
DT_REMOVE_ICON = $04 ; { .byte icon }
|
||||
DT_HIGHLIGHT_ALL = $05 ; { .byte window_id }
|
||||
DT_UNHIGHLIGHT_ALL = $06
|
||||
DT_CLOSE_WINDOW = $07 ; { .byte window_id }
|
||||
DT_GET_HIGHLIGHTED = $08 ; { .res 20 }
|
||||
DT_FIND_ICON = $09 ; { .word mousex, .word mousey, .byte result }
|
||||
DT_DRAG_HIGHLIGHTED = $0A ; { .byte param }
|
||||
ADD_ICON = $01 ; { .addr icondata }
|
||||
HIGHLIGHT_ICON = $02 ; { .byte icon }
|
||||
REDRAW_ICON = $03 ; { .byte icon }
|
||||
REMOVE_ICON = $04 ; { .byte icon }
|
||||
HIGHLIGHT_ALL = $05 ; { .byte window_id }
|
||||
REMOVE_ALL = $06 ; { .byte window_id }
|
||||
CLOSE_WINDOW = $07 ; { .byte window_id }
|
||||
GET_HIGHLIGHTED = $08 ; { .res 20 }
|
||||
FIND_ICON = $09 ; { .word mousex, .word mousey, .byte result }
|
||||
DRAG_HIGHLIGHTED = $0A ; { .byte param }
|
||||
; Input: specific icon being dragged
|
||||
; Output: 0 = on desktop (no-op)
|
||||
; hi bit clear: low bits are target icon
|
||||
; hi bit set: low bits are target window
|
||||
DT_UNHIGHLIGHT_ICON = $0B ; { .addr iconentry }
|
||||
DT_REDRAW_ICONS = $0C ; Repaints desktop icons *
|
||||
DT_ICON_IN_RECT = $0D ; { .byte icon, rect bounds }
|
||||
DT_REDRAW_ICON_IDX = $0E ; { .byte icon_index }
|
||||
UNHIGHLIGHT_ICON = $0B ; { .addr iconentry }
|
||||
REDRAW_ICONS = $0C ; Repaints desktop icons *
|
||||
ICON_IN_RECT = $0D ; { .byte icon, rect bounds }
|
||||
ERASE_ICON = $0E ; { .byte icon }
|
||||
|
||||
;;; `icon` is the icon number, i.e. first field in icon entry
|
||||
;;; `icon_index` is the index in the icon table
|
||||
|
||||
;;; Call a DESKTOP entry point:
|
||||
;;; DESKTOP_CALL n - params is $0000
|
||||
;;; DESKTOP_CALL n, params_addr
|
||||
;;; DESKTOP_CALL m, params_addr, label - params_addr is labeled for modifying
|
||||
.endscope ; IconTK
|
||||
|
||||
.macro DESKTOP_CALL op, addr, label
|
||||
jsr DESKTOP
|
||||
;;; Call a IconTK entry point:
|
||||
;;; ITK_CALL n - params is $0000
|
||||
;;; ITK_CALL n, params_addr
|
||||
;;; ITK_CALL m, params_addr, label - params_addr is labeled for modifying
|
||||
|
||||
.macro ITK_CALL op, addr, label
|
||||
jsr IconTK::MLI
|
||||
.byte op
|
||||
|
||||
.if .paramcount > 2
|
||||
|
@ -133,7 +149,7 @@ label := *
|
|||
;;; Relays from Main to Aux (params must be in ZP or LC)
|
||||
|
||||
MGTK_RELAY := $D000
|
||||
DESKTOP_RELAY := $D040
|
||||
ITK_RELAY := $D040
|
||||
|
||||
.macro MGTK_RELAY_CALL call, addr
|
||||
.if .paramcount > 1
|
||||
|
@ -143,11 +159,11 @@ DESKTOP_RELAY := $D040
|
|||
.endif
|
||||
.endmacro
|
||||
|
||||
.macro DESKTOP_RELAY_CALL call, addr
|
||||
.macro ITK_RELAY_CALL call, addr
|
||||
.if .paramcount > 1
|
||||
yax_call DESKTOP_RELAY, (call), (addr)
|
||||
yax_call ITK_RELAY, (call), (addr)
|
||||
.else
|
||||
yax_call DESKTOP_RELAY, (call), 0
|
||||
yax_call ITK_RELAY, (call), 0
|
||||
.endif
|
||||
.endmacro
|
||||
|
||||
|
@ -168,6 +184,8 @@ path_table := $DFB3 ; window address table
|
|||
selected_file_list := $DF22 ; indexes of selected file (global, not w/in window, up to 127)
|
||||
file_table := $DD9F ; file address table
|
||||
|
||||
last_menu_click_params := $E23D
|
||||
|
||||
;;; Icon (file/volume) entries - length 27 bytes, maximum of 127
|
||||
;;; .byte icon icon index
|
||||
;;; .byte state $80 = highlighted, 0 = otherwise
|
||||
|
@ -190,14 +208,14 @@ file_table := $DD9F ; file address table
|
|||
;;; .res 17 name (name, with a space before and after)
|
||||
|
||||
.struct IconEntry
|
||||
id .byte
|
||||
state .byte
|
||||
win_type .byte
|
||||
iconx .word
|
||||
icony .word
|
||||
iconbits .addr
|
||||
len .byte
|
||||
name .res 17 ; 15 chars plus leading/trailing spaces
|
||||
id .byte ; 0
|
||||
state .byte ; 1
|
||||
win_type .byte ; 2
|
||||
iconx .word ; 3
|
||||
icony .word ; 5
|
||||
iconbits .addr ; 7
|
||||
len .byte ; 9
|
||||
name .res 17 ; 10 (15 chars plus leading/trailing spaces)
|
||||
.endstruct
|
||||
|
||||
max_icon_count = 127
|
||||
|
@ -296,5 +314,26 @@ GLYPH_SAPPLE = $1E
|
|||
modification_time .word ; 25 $19
|
||||
access .byte ; 27 $1B
|
||||
header_pointer .word ; 28 $1C
|
||||
reserved .word ; ???
|
||||
aux_type .word ; 30 $1E
|
||||
.endstruct
|
||||
|
||||
;;; ============================================================
|
||||
;;; Internals - Settings (modified by Control Panel)
|
||||
|
||||
DESKTOP2_SETTINGS_OFFSET = $A700
|
||||
|
||||
.scope DeskTop
|
||||
.scope Settings
|
||||
address := $FF80
|
||||
length = $80
|
||||
|
||||
pattern := $FF80 ; .res 8
|
||||
|
||||
dblclick_speed := $FF88 ; .word
|
||||
kDefaultDblClickSpeed = $12C
|
||||
|
||||
ip_blink_speed := $FF8A ; .byte
|
||||
kDefaultIPBlinkSpeed = 60
|
||||
|
||||
.endscope
|
||||
.endscope
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
.include "apple2.inc"
|
||||
.include "../inc/apple2.inc"
|
||||
.include "../inc/prodos.inc"
|
||||
.include "../macros.inc"
|
||||
.include "../inc/macros.inc"
|
||||
|
||||
;;; ============================================================
|
||||
;;; Locations in Main LC Bank 2 (past end of custom quit routines)
|
||||
|
@ -113,7 +113,7 @@ L23DF: .byte $00,$00,$00
|
|||
.byte 0
|
||||
|
||||
;; Files/Directories to copy
|
||||
str_f1: PASCAL_STRING "DESKTOP1"
|
||||
str_f1: PASCAL_STRING "DESKTOP.SYSTEM"
|
||||
str_f2: PASCAL_STRING "DESKTOP2"
|
||||
str_f3: PASCAL_STRING "DESK.ACC"
|
||||
str_f4: PASCAL_STRING "PREVIEW"
|
||||
|
@ -130,6 +130,9 @@ num_filenames = 8
|
|||
str_copying_to_ramcard:
|
||||
PASCAL_STRING "Copying Apple II DeskTop into RAMCard"
|
||||
|
||||
str_tip_skip_copying:
|
||||
PASCAL_STRING {"Tip: To skip copying to RAMCard, hold down ",15,27,65,24,14," when launching."}
|
||||
|
||||
;; Signature of block storage devices ($Cn0x)
|
||||
sig_bytes:
|
||||
.byte $20,$00,$03,$00
|
||||
|
@ -563,12 +566,32 @@ done: dex
|
|||
sta CV
|
||||
jsr VTAB
|
||||
ldy #0
|
||||
loop: iny
|
||||
: iny
|
||||
lda str_copying_to_ramcard,y
|
||||
ora #$80
|
||||
jsr COUT
|
||||
cpy str_copying_to_ramcard
|
||||
bne loop
|
||||
bne :-
|
||||
|
||||
;; Center string
|
||||
lda #80
|
||||
sec
|
||||
sbc str_tip_skip_copying
|
||||
clc
|
||||
adc #4 ; 4 control characters (for MouseText)
|
||||
lsr a ; / 2 to center
|
||||
sta CH
|
||||
lda #23
|
||||
sta CV
|
||||
jsr VTAB
|
||||
ldy #0
|
||||
: iny
|
||||
lda str_tip_skip_copying,y
|
||||
ora #$80
|
||||
jsr COUT
|
||||
cpy str_tip_skip_copying
|
||||
bne :-
|
||||
|
||||
rts
|
||||
.endproc
|
||||
|
||||
|
@ -863,7 +886,7 @@ str_desktop2:
|
|||
|
||||
DEFINE_OPEN_PARAMS open_params, str_desktop1_path, open_io_buffer
|
||||
str_desktop1_path:
|
||||
PASCAL_STRING "DeskTop/DESKTOP1"
|
||||
PASCAL_STRING "DeskTop/DESKTOP.SYSTEM"
|
||||
DEFINE_WRITE_PARAMS write_params, dt1_addr, dt1_size
|
||||
DEFINE_CLOSE_PARAMS close_params
|
||||
|
||||
|
@ -905,19 +928,19 @@ slot: .byte 0
|
|||
DEFINE_WRITE_BLOCK_PARAMS write_block2_params, prodos_loader_blocks + 512, 1
|
||||
write_block2_params_unit_num := write_block2_params::unit_num
|
||||
|
||||
PAD_TO $2C00
|
||||
PAD_TO $2D00
|
||||
|
||||
;;; ============================================================
|
||||
|
||||
prodos_loader_blocks:
|
||||
.assert * = $2C00, error, "Segment length mismatch"
|
||||
.assert * = $2D00, error, "Segment length mismatch"
|
||||
.incbin "../inc/pdload.dat"
|
||||
|
||||
.endproc ; copy_desktop_to_ramcard
|
||||
|
||||
;;; ============================================================
|
||||
|
||||
.assert * = $3000, error, "Segment length mismatch"
|
||||
.assert * = $3100, error, "Segment length mismatch"
|
||||
|
||||
;;; SPECULATION: This copies Selector entries marked
|
||||
;;; "Down load" / "At boot" to the RAMCard as well
|
||||
|
@ -2052,17 +2075,13 @@ done: rts
|
|||
|
||||
.endproc ; copy_selector_entries_to_ramcard
|
||||
|
||||
.assert * = $3AD8, error, "Segment size mismatch"
|
||||
|
||||
;;; ============================================================
|
||||
;;; Loaded at $1000 by DeskTop2 on Quit, and copies $1100-$13FF
|
||||
;;; to Language Card Bank 2 $D100-$D3FF, to restore saved quit
|
||||
;;; (selector/dispatch) handler, then does ProDOS QUIT.
|
||||
|
||||
str_quit_code: PASCAL_STRING "Quit.tmp"
|
||||
saved_org := *
|
||||
.proc quit_restore_proc
|
||||
.org $1000
|
||||
PROC_AT quit_restore_proc, $1000
|
||||
|
||||
lda LCBANK2
|
||||
lda LCBANK2
|
||||
|
@ -2081,9 +2100,8 @@ str_quit_code: PASCAL_STRING "Quit.tmp"
|
|||
DEFINE_QUIT_PARAMS quit_params
|
||||
|
||||
PAD_TO $1100
|
||||
.endproc
|
||||
END_PROC_AT
|
||||
.assert .sizeof(quit_restore_proc) = $100, error, "Proc length mismatch"
|
||||
.org (saved_org + .sizeof(quit_restore_proc))
|
||||
|
||||
.proc preserve_quit_code_impl
|
||||
quit_code_io := $800
|
||||
|
|
|
@ -5,7 +5,7 @@ CCFLAGS = --config asm.cfg
|
|||
|
||||
OUTDIR = out
|
||||
|
||||
HEADERS = $(wildcard ../*.inc) $(wildcard ../inc/*.inc) $(wildcard *.inc)
|
||||
HEADERS = $(wildcard ../*.inc) $(wildcard ../inc/*.inc) $(wildcard ../mgtk/*.inc) $(wildcard *.inc)
|
||||
|
||||
SEGMENTS = loader mgtk desktop
|
||||
|
||||
|
@ -23,6 +23,9 @@ clean:
|
|||
rm -f $(OUTDIR)/*.built
|
||||
rm -f $(TARGETS)
|
||||
|
||||
$(OUTDIR)/mgtk.o: ../mgtk/mgtk.s $(HEADERS)
|
||||
$(CC65)/ca65 $(CAFLAGS) --listing $(basename $@).list -o $@ $<
|
||||
|
||||
$(OUTDIR)/desktop.o: desktop.s $(HEADERS) desktop_* ovl*.s
|
||||
$(CC65)/ca65 $(CAFLAGS) --listing $(basename $@).list -o $@ $<
|
||||
|
||||
|
|
|
@ -79,7 +79,7 @@ run.
|
|||
|
||||
`mgtk.s`
|
||||
|
||||
Aux $4000-$8580 is the [MouseGraphics ToolKit](../MGTK.md) - a
|
||||
Aux $4000-$8580 is the [MouseGraphics ToolKit](../mgtk/MGTK.md) - a
|
||||
GUI library used for the DeskTop application.
|
||||
|
||||
Since this resides in Aux memory, DeskTop spends most of its time
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
.include "apple2.inc"
|
||||
.include "../inc/apple2.inc"
|
||||
.include "../inc/prodos.inc"
|
||||
.include "../mgtk.inc"
|
||||
.include "../mgtk/mgtk.inc"
|
||||
.include "../desktop.inc"
|
||||
.include "../macros.inc"
|
||||
.include "../inc/macros.inc"
|
||||
|
||||
|
||||
;;; ============================================================
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -53,15 +53,15 @@
|
|||
.endproc
|
||||
|
||||
;;; ============================================================
|
||||
;;; DESKTOP call from main>aux, call in Y params at (X,A)
|
||||
;;; IconTK call from main>aux, call in Y params at (X,A)
|
||||
|
||||
.proc DTRelayImpl
|
||||
.assert * = DESKTOP_RELAY, error, "Entry point mismatch"
|
||||
.proc ITKRelayImpl
|
||||
.assert * = ITK_RELAY, error, "Entry point mismatch"
|
||||
sty addr-1
|
||||
stax addr
|
||||
sta RAMRDON
|
||||
sta RAMWRTON
|
||||
DESKTOP_CALL 0, 0, addr
|
||||
ITK_CALL 0, 0, addr
|
||||
tay
|
||||
sta RAMRDOFF
|
||||
sta RAMWRTOFF
|
||||
|
@ -187,6 +187,17 @@ flag: .byte 0
|
|||
StoreWindowIconTable := XferWindowIconTable::from
|
||||
LoadWindowIconTable := XferWindowIconTable::to
|
||||
|
||||
.proc LoadActiveWindowIconTable
|
||||
copy active_window_id, cached_window_id
|
||||
jmp LoadWindowIconTable
|
||||
.endproc
|
||||
|
||||
.proc LoadDesktopIconTable
|
||||
copy #0, cached_window_id
|
||||
jmp LoadWindowIconTable
|
||||
.endproc
|
||||
|
||||
|
||||
;;; ============================================================
|
||||
;;; Assign active state to active_window_id window
|
||||
|
||||
|
@ -253,6 +264,83 @@ op: lda dummy1234
|
|||
rts
|
||||
.endproc
|
||||
|
||||
;;; ============================================================
|
||||
;;; Input: numbers in A,X, Y (all unsigned)
|
||||
;;; Output: number in A,X (unsigned)
|
||||
|
||||
.proc Multiply_16_8_16
|
||||
stax num1
|
||||
sty num2
|
||||
|
||||
;; Accumulate directly into A,X
|
||||
lda #0
|
||||
tax
|
||||
beq test
|
||||
|
||||
add: clc
|
||||
adc num1
|
||||
tay
|
||||
|
||||
txa
|
||||
adc num1+1
|
||||
tax
|
||||
tya
|
||||
|
||||
loop: asl num1
|
||||
rol num1+1
|
||||
test: lsr num2
|
||||
bcs add
|
||||
bne loop
|
||||
|
||||
rts
|
||||
|
||||
num1: .word 0
|
||||
num2: .byte 0
|
||||
.endproc
|
||||
|
||||
;;; ============================================================
|
||||
;;; Input: dividend in A,X, divisor in Y (all unsigned)
|
||||
;;; Output: quotient in A,X (unsigned)
|
||||
|
||||
.proc Divide_16_8_16
|
||||
result := dividend
|
||||
|
||||
stax dividend
|
||||
sty divisor
|
||||
lda #0
|
||||
sta divisor+1
|
||||
sta remainder
|
||||
sta remainder+1
|
||||
ldx #16
|
||||
|
||||
loop: asl dividend
|
||||
rol dividend+1
|
||||
rol remainder
|
||||
rol remainder+1
|
||||
lda remainder
|
||||
sec
|
||||
sbc divisor
|
||||
tay
|
||||
lda remainder+1
|
||||
sbc divisor+1
|
||||
bcc skip
|
||||
sta remainder+1
|
||||
sty remainder
|
||||
inc result
|
||||
|
||||
skip: dex
|
||||
bne loop
|
||||
ldax dividend
|
||||
rts
|
||||
|
||||
dividend:
|
||||
.word 0
|
||||
divisor:
|
||||
.word 0
|
||||
remainder:
|
||||
.word 0
|
||||
.endproc
|
||||
|
||||
;;; ============================================================
|
||||
|
||||
PAD_TO $D200
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -146,9 +146,6 @@ fontptr: .addr DEFAULT_FONT
|
|||
|
||||
;;; ============================================================
|
||||
|
||||
save_area_buffer := $800
|
||||
save_area_size = $1300
|
||||
|
||||
;; Copies of ROM bytes used for machine identification
|
||||
.proc startdesktop_params
|
||||
machine: .byte $06 ; ROM FBB3 ($06 = IIe or later)
|
||||
|
@ -157,8 +154,8 @@ op_sys: .byte 0 ; 0=ProDOS
|
|||
slot_num: .byte 0 ; Mouse slot, 0 = search
|
||||
use_interrupts: .byte 0 ; 0=passive
|
||||
sysfontptr: .addr DEFAULT_FONT
|
||||
savearea: .addr save_area_buffer
|
||||
savesize: .word save_area_size
|
||||
savearea: .addr SAVE_AREA_BUFFER
|
||||
savesize: .word SAVE_AREA_SIZE
|
||||
.endproc
|
||||
|
||||
zp_use_flag0:
|
||||
|
@ -171,7 +168,7 @@ LD2A9: .byte 0
|
|||
double_click_flag:
|
||||
.byte 0 ; high bit clear if double-clicked, set otherwise
|
||||
|
||||
;; Set to specific machine type; used for double-click timing.
|
||||
;; Set to specific machine type
|
||||
machine_type:
|
||||
.byte $00 ; Set to: $96 = IIe, $FA = IIc, $FD = IIgs
|
||||
|
||||
|
@ -297,6 +294,9 @@ alert_bitmap2_params:
|
|||
DEFINE_RECT 0, 0, 36, 23 ; maprect
|
||||
|
||||
.proc winfo_alert_dialog
|
||||
width = 400
|
||||
height = 107
|
||||
|
||||
window_id: .byte $0F
|
||||
options: .byte MGTK::Option::dialog_box
|
||||
title: .addr 0
|
||||
|
@ -313,10 +313,10 @@ mincontlength: .word 50
|
|||
maxcontwidth: .word 500
|
||||
maxcontlength: .word 140
|
||||
port:
|
||||
viewloc: DEFINE_POINT 75, 35
|
||||
viewloc: DEFINE_POINT (screen_width - width) / 2, (screen_height - height) / 2
|
||||
mapbits: .addr MGTK::screen_mapbits
|
||||
mapwidth: .word MGTK::screen_mapwidth
|
||||
cliprect: DEFINE_RECT 0, 0, 400, 100
|
||||
cliprect: DEFINE_RECT 0, 0, width, height
|
||||
penpattern: .res 8, $FF
|
||||
colormasks: .byte MGTK::colormask_and, MGTK::colormask_or
|
||||
penloc: DEFINE_POINT 0, 0
|
||||
|
@ -400,6 +400,7 @@ nextwinfo: .addr 0
|
|||
|
||||
.proc winfo_about_dialog
|
||||
width = 400
|
||||
height = 120
|
||||
|
||||
window_id: .byte $18
|
||||
options: .byte MGTK::Option::dialog_box
|
||||
|
@ -417,10 +418,11 @@ mincontlength: .word 50
|
|||
maxcontwidth: .word 500
|
||||
maxcontlength: .word 140
|
||||
port:
|
||||
viewloc: DEFINE_POINT (screen_width - width) / 2, 40
|
||||
viewloc: DEFINE_POINT (screen_width - width) / 2, (screen_height - height) / 2
|
||||
|
||||
mapbits: .addr MGTK::screen_mapbits
|
||||
mapwidth: .word MGTK::screen_mapwidth
|
||||
cliprect: DEFINE_RECT 0, 0, width, 110
|
||||
cliprect: DEFINE_RECT 0, 0, width, height
|
||||
penpattern: .res 8, $FF
|
||||
colormasks: .byte MGTK::colormask_and, MGTK::colormask_or
|
||||
penloc: DEFINE_POINT 0, 0
|
||||
|
@ -437,6 +439,7 @@ winfo_about_dialog_port := winfo_about_dialog::port
|
|||
|
||||
.proc winfo_entry_picker
|
||||
width = 350
|
||||
height = 118
|
||||
|
||||
window_id: .byte $1B
|
||||
options: .byte MGTK::Option::dialog_box
|
||||
|
@ -454,10 +457,10 @@ mincontlength: .word 50
|
|||
maxcontwidth: .word 500
|
||||
maxcontlength: .word 140
|
||||
port:
|
||||
viewloc: DEFINE_POINT (screen_width - width) / 2, 25
|
||||
viewloc: DEFINE_POINT (screen_width - width) / 2, (screen_height - height) / 2
|
||||
mapbits: .addr MGTK::screen_mapbits
|
||||
mapwidth: .word MGTK::screen_mapwidth
|
||||
cliprect: DEFINE_RECT 0, 0, width, 110
|
||||
cliprect: DEFINE_RECT 0, 0, width, height
|
||||
penpattern: .res 8, $FF
|
||||
colormasks: .byte MGTK::colormask_and, MGTK::colormask_or
|
||||
penloc: DEFINE_POINT 0, 0
|
||||
|
@ -469,55 +472,62 @@ fontptr: .addr DEFAULT_FONT
|
|||
nextwinfo: .addr 0
|
||||
.endproc
|
||||
|
||||
;; Coordinates for labels?
|
||||
.byte $28,$00,$25,$00,$68,$01,$2F,$00,$2D,$00,$2E,$00
|
||||
;; Unused rect/pos?
|
||||
.word 40,37,360,47
|
||||
.word 45,46
|
||||
|
||||
name_input_rect: DEFINE_RECT 40,61,360,71, name_input_rect
|
||||
name_input_textpos: DEFINE_POINT 45,70, name_input_textpos
|
||||
name_input_rect: DEFINE_RECT 40,61+6,360,71+6, name_input_rect
|
||||
name_input_textpos: DEFINE_POINT 45,70+6, name_input_textpos
|
||||
pos_dialog_title: DEFINE_POINT 0, 18, pos_dialog_title
|
||||
|
||||
point7: DEFINE_POINT 40,18, point7
|
||||
pointD: DEFINE_POINT 40,35, pointD
|
||||
|
||||
dialog_label_base_pos:
|
||||
DEFINE_POINT 40,35-5, dialog_label_base_pos
|
||||
|
||||
dialog_label_default_x = 40
|
||||
dialog_label_pos:
|
||||
DEFINE_POINT dialog_label_default_x,0, dialog_label_pos
|
||||
|
||||
.proc name_input_mapinfo
|
||||
DEFINE_POINT 75, 35
|
||||
DEFINE_POINT 80, 35+7
|
||||
.addr MGTK::screen_mapbits
|
||||
.byte MGTK::screen_mapwidth
|
||||
.byte 0
|
||||
DEFINE_RECT 0, 0, 358, 100
|
||||
.endproc
|
||||
|
||||
rect_D6D8:
|
||||
DEFINE_RECT 4,2,346,108
|
||||
rect_D6E0:
|
||||
DEFINE_RECT 5,3,345,107
|
||||
entry_picker_item_height = 9 ; default font height
|
||||
|
||||
entry_picker_outer_rect:
|
||||
DEFINE_RECT 4,2,winfo_entry_picker::width-4,winfo_entry_picker::height-2
|
||||
entry_picker_inner_rect:
|
||||
DEFINE_RECT 5,3,winfo_entry_picker::width-5,winfo_entry_picker::height-3
|
||||
|
||||
;; Line endpoints
|
||||
pos_D6E8:
|
||||
entry_picker_line1_start:
|
||||
DEFINE_POINT 6,22
|
||||
pos_D6EC:
|
||||
entry_picker_line1_end:
|
||||
DEFINE_POINT 344,22
|
||||
|
||||
;; Line endpoints
|
||||
pos_D6F0:
|
||||
DEFINE_POINT 6,89
|
||||
pos_D6F4:
|
||||
DEFINE_POINT 344,89
|
||||
entry_picker_line2_start:
|
||||
DEFINE_POINT 6,winfo_entry_picker::height-21
|
||||
entry_picker_line2_end:
|
||||
DEFINE_POINT 344,winfo_entry_picker::height-21
|
||||
|
||||
rect_D6F8:
|
||||
DEFINE_RECT 210,92,310,103
|
||||
entry_picker_ok_rect:
|
||||
DEFINE_RECT 210,winfo_entry_picker::height-18,310,winfo_entry_picker::height-7
|
||||
|
||||
rect_D700:
|
||||
DEFINE_RECT 40,92,140,103
|
||||
entry_picker_cancel_rect:
|
||||
DEFINE_RECT 40,winfo_entry_picker::height-18,140,winfo_entry_picker::height-7
|
||||
|
||||
pos_D708:
|
||||
DEFINE_POINT 215,102
|
||||
pos_D70C:
|
||||
DEFINE_POINT 45,102
|
||||
entry_picker_ok_pos:
|
||||
DEFINE_POINT 215,winfo_entry_picker::height-8
|
||||
entry_picker_cancel_pos:
|
||||
DEFINE_POINT 45,winfo_entry_picker::height-8
|
||||
|
||||
;; ???
|
||||
.word 130,7,220,19
|
||||
|
||||
add_an_entry_label:
|
||||
|
@ -543,7 +553,7 @@ run_list_label:
|
|||
other_run_list_label:
|
||||
PASCAL_STRING {GLYPH_OAPPLE,"2 Other Run list"}
|
||||
down_load_label:
|
||||
PASCAL_STRING "Down load:"
|
||||
PASCAL_STRING "Copy to RAMCard:"
|
||||
at_first_boot_label:
|
||||
PASCAL_STRING {GLYPH_OAPPLE,"3 at first boot"}
|
||||
at_first_use_label:
|
||||
|
@ -554,17 +564,17 @@ never_label:
|
|||
enter_the_full_pathname_label2:
|
||||
PASCAL_STRING "Enter the full pathname of the run list file:"
|
||||
|
||||
rect_D877:
|
||||
DEFINE_RECT 0,0,0,0
|
||||
entry_picker_item_rect:
|
||||
DEFINE_RECT 0,0,0,0,entry_picker_item_rect
|
||||
|
||||
rect_D87F:
|
||||
DEFINE_RECT 6,23,344,87
|
||||
entry_picker_all_items_rect:
|
||||
DEFINE_RECT 6,23,344,winfo_entry_picker::height-23
|
||||
|
||||
LD887:
|
||||
.byte 0
|
||||
|
||||
rect_D888:
|
||||
DEFINE_RECT 0,0,0,0
|
||||
select_volume_rect:
|
||||
DEFINE_RECT 0,0,0,0,select_volume_rect
|
||||
|
||||
LD890:
|
||||
.byte 0
|
||||
|
@ -590,11 +600,8 @@ LD8E7: .byte 0
|
|||
has_input_field_flag:
|
||||
.byte 0
|
||||
|
||||
|
||||
prompt_insertion_point_blink_count = $14
|
||||
|
||||
prompt_ip_counter:
|
||||
.byte prompt_insertion_point_blink_count
|
||||
.byte 1 ; immediately decremented to 0 and reset
|
||||
|
||||
prompt_ip_flag:
|
||||
.byte 0
|
||||
|
@ -793,15 +800,28 @@ file_to_delete_label:
|
|||
PASCAL_STRING "File to delete:"
|
||||
|
||||
;;; ============================================================
|
||||
;;; Resources for clock on menu bar
|
||||
|
||||
pos_clock:
|
||||
DEFINE_POINT 500, 10
|
||||
DEFINE_POINT 475, 10
|
||||
|
||||
str_clock:
|
||||
PASCAL_STRING "00:00 XM "
|
||||
str_colon:
|
||||
PASCAL_STRING ":"
|
||||
str_zero:
|
||||
PASCAL_STRING "0"
|
||||
str_am: PASCAL_STRING " AM"
|
||||
str_pm: PASCAL_STRING " PM"
|
||||
|
||||
is_iic_plus_flag:
|
||||
.byte 0
|
||||
dow_strings:
|
||||
.byte "Sun ", "Mon ", "Tue ", "Wed ", "Thu ", "Fri ", "Sat "
|
||||
|
||||
.proc dow_str_params
|
||||
addr: .addr 0
|
||||
length: .byte 4 ; includes trailing space
|
||||
.endproc
|
||||
|
||||
month_offset_table:
|
||||
.byte 1,5,6,3,1,5,3,0,4,2,6,4
|
||||
|
||||
;;; ============================================================
|
||||
|
||||
|
@ -903,7 +923,8 @@ window_path_addr_table:
|
|||
|
||||
;;; ============================================================
|
||||
|
||||
str_file_type: .res 4, 0
|
||||
str_file_type:
|
||||
PASCAL_STRING " $00"
|
||||
|
||||
;;; ============================================================
|
||||
|
||||
|
@ -958,30 +979,44 @@ devlst_backup:
|
|||
device_to_icon_map:
|
||||
.res 16, 0
|
||||
|
||||
LE1B0: .res 65, 0 ; path buffer?
|
||||
LE1F1: .res 15, 0 ; length-prefixed string
|
||||
LE200: .word 0
|
||||
LE202: .res 24, 0 ; addr table
|
||||
;;; Path buffer for open_directory logic
|
||||
open_dir_path_buf:
|
||||
.res 65, 0
|
||||
|
||||
.byte $00,$00,$00,$00,$7F,$64,$00,$1C ; ???
|
||||
;;; Icon to window file record mapping list. First byte is number of
|
||||
;;; entries, then each entry is an icon number. Position in the list
|
||||
;;; is the same as position in the subsequent file record list.
|
||||
window_icon_to_filerecord_list:
|
||||
.res 9, 0 ; 8 entries + length
|
||||
|
||||
.res 6 ; Unused ???
|
||||
|
||||
LE200: .word 0 ; Unused ???
|
||||
|
||||
;;; Mapping from position in above table to FileRecord entry
|
||||
window_filerecord_table:
|
||||
.res 8*2
|
||||
|
||||
.res 8, 0 ; Unused ???
|
||||
.byte $00,$00,$00,$00,$7F,$64,$00,$1C
|
||||
.byte $00,$1E,$00,$32,$00,$1E,$00,$40
|
||||
.byte $00
|
||||
|
||||
;; DT_HIGHLIGHT_ICON params
|
||||
;; IconTK::HIGHLIGHT_ICON params
|
||||
icon_param2:
|
||||
.byte 0
|
||||
|
||||
LE22C: .byte 0
|
||||
|
||||
;; DT_HIGHLIGHT_ICON params
|
||||
;; IconTK::HIGHLIGHT_ICON params
|
||||
icon_param3:
|
||||
.byte 0
|
||||
|
||||
redraw_icon_param:
|
||||
.byte 0
|
||||
|
||||
;; DT_HIGHLIGHT_ICON params
|
||||
;; DT_UNHIGHLIGHT_ICON params
|
||||
;; IconTK::HIGHLIGHT_ICON params
|
||||
;; IconTK::UNHIGHLIGHT_ICON params
|
||||
icon_param: .byte 0
|
||||
|
||||
;; Used for all sorts of temporary work
|
||||
|
@ -991,6 +1026,7 @@ tmp_rect:
|
|||
saved_stack:
|
||||
.byte 0
|
||||
|
||||
.assert * = last_menu_click_params, error, "Entry point mismatch"
|
||||
.proc menu_click_params
|
||||
menu_id:.byte 0
|
||||
item_num:.byte 0
|
||||
|
@ -1166,13 +1202,12 @@ blank_dd_label:
|
|||
dummy_dd_item:
|
||||
PASCAL_STRING "Rien" ; ???
|
||||
|
||||
;; DT_UNHIGHLIGHT_ICON params
|
||||
;; IconTK::UNHIGHLIGHT_ICON params
|
||||
icon_params2:
|
||||
.byte 0
|
||||
|
||||
LE6BF: .word 0
|
||||
|
||||
LE6C1:
|
||||
window_title_addr_table:
|
||||
.addr 0
|
||||
.addr winfo1title_ptr
|
||||
.addr winfo2title_ptr
|
||||
.addr winfo3title_ptr
|
||||
|
@ -1183,7 +1218,7 @@ LE6C1:
|
|||
.addr winfo8title_ptr
|
||||
|
||||
;; (low nibble must match menu order)
|
||||
view_by_icon = $80
|
||||
view_by_icon = $00
|
||||
view_by_name = $81
|
||||
view_by_date = $82
|
||||
view_by_size = $83
|
||||
|
@ -1337,18 +1372,110 @@ window_icon_list_table:
|
|||
active_window_id:
|
||||
.byte $00
|
||||
|
||||
;;; $00 = window not in use
|
||||
;;; $FF = window in use, but dir (vol/folder) icon deleted
|
||||
;;; Otherwise, dir (vol/folder) icon associated with window.
|
||||
window_to_dir_icon_table:
|
||||
.res 8, 0
|
||||
|
||||
LEC2E: .res 21, 0 ; ???
|
||||
num_open_windows:
|
||||
.byte 0
|
||||
|
||||
LEC2F: .res 20, 0 ; unreferenced???
|
||||
|
||||
LEC43: .res 16, 0 ; ???
|
||||
LEC53: .byte 0
|
||||
LEC54: .word 0
|
||||
.res 4, 0
|
||||
|
||||
date: .word 0
|
||||
date: .word 0
|
||||
|
||||
.res 7, 0 ; ???
|
||||
.res 7, 0 ; Used! But where ???
|
||||
|
||||
hex_digits:
|
||||
.byte "0123456789ABCDEF"
|
||||
|
||||
;;; Parent window to close after an Open action
|
||||
window_id_to_close:
|
||||
.byte 0
|
||||
|
||||
;;; High bit set if menu dispatch via keyboard accelerator, clear otherwise.
|
||||
menu_kbd_flag:
|
||||
.byte 0
|
||||
|
||||
;;; --------------------------------------------------
|
||||
|
||||
;;; Params for check_file_type_overrides
|
||||
fto_type: .byte 0
|
||||
fto_auxtype: .word 0
|
||||
fto_blocks: .word 0
|
||||
|
||||
;;; Data-driven remapping of file types - used for icons, open/preview, etc.
|
||||
;;;
|
||||
;;; The incoming type is compared (using a mask) against a type, and
|
||||
;;; optionally auxtype and block count. If matched, a replacement type
|
||||
;;; is used. All entries are processed, even if a match was found. This
|
||||
;;; allows inverted matches.
|
||||
|
||||
.struct FTORecord ; Offset
|
||||
mask .byte ; 0 incoming type masked before comparison
|
||||
type .byte ; 1 type for the record (must match)
|
||||
flags .byte ; 2 bit 7 = compare aux; 6 = compare blocks
|
||||
aux .word ; 3 optional aux type
|
||||
blocks .word ; 5 optional block count
|
||||
newtype .byte ; 7 replacement type
|
||||
.endstruct
|
||||
.macro DEFINE_FTORECORD mask, type, flags, aux, blocks, newtype
|
||||
.byte mask
|
||||
.byte type
|
||||
.byte flags
|
||||
.word aux
|
||||
.word blocks
|
||||
.byte newtype
|
||||
.endmacro
|
||||
FTO_FLAGS_NONE = %00000000
|
||||
FTO_FLAGS_AUX = %10000000
|
||||
FTO_FLAGS_BLOCKS = %01000000
|
||||
|
||||
fto_table_record_size = 8
|
||||
fto_table:
|
||||
DEFINE_FTORECORD $FF, FT_BAD, FTO_FLAGS_NONE, 0, 0, FT_TYPELESS ; Reserve BAD for tmp
|
||||
|
||||
;; Desk Accessories/Applets
|
||||
DEFINE_FTORECORD $FF, DA_FILE_TYPE, FTO_FLAGS_NONE, 0, 0, FT_BAD ; Remap $F1 by default...
|
||||
DEFINE_FTORECORD $FF, FT_BAD, FTO_FLAGS_AUX, $640, 0, DA_FILE_TYPE ; Restore $F1/$0640 as DA
|
||||
DEFINE_FTORECORD $FF, FT_BAD, FTO_FLAGS_AUX, $8640, 0, DA_FILE_TYPE ; Restore $F1/$8640 as DA
|
||||
DEFINE_FTORECORD $FF, FT_BAD, FTO_FLAGS_NONE, 0, 0, FT_TYPELESS ; Reserve BAD for tmp
|
||||
|
||||
;; Graphics Files
|
||||
DEFINE_FTORECORD $FF, FT_BINARY, FTO_FLAGS_AUX|FTO_FLAGS_BLOCKS, $2000, 17, FT_GRAPHICS ; HR image as FOT
|
||||
DEFINE_FTORECORD $FF, FT_BINARY, FTO_FLAGS_AUX|FTO_FLAGS_BLOCKS, $4000, 17, FT_GRAPHICS ; HR image as FOT
|
||||
DEFINE_FTORECORD $FF, FT_BINARY, FTO_FLAGS_AUX|FTO_FLAGS_BLOCKS, $2000, 33, FT_GRAPHICS ; DHR image as FOT
|
||||
DEFINE_FTORECORD $FF, FT_BINARY, FTO_FLAGS_AUX|FTO_FLAGS_BLOCKS, $4000, 33, FT_GRAPHICS ; DHR image as FOT
|
||||
DEFINE_FTORECORD $FF, FT_BINARY, FTO_FLAGS_AUX|FTO_FLAGS_BLOCKS, $5800, 3, FT_GRAPHICS ; Minipix as FOT
|
||||
|
||||
;; Applications
|
||||
DEFINE_FTORECORD $FF, FT_S16, FTO_FLAGS_NONE, 0, 0, APP_FILE_TYPE ; IIgs System => "App"
|
||||
|
||||
;; IIgs-Specific Files (ranges)
|
||||
DEFINE_FTORECORD $F0, $50, FTO_FLAGS_NONE, 0, 0, FT_SRC ; IIgs General => SRC
|
||||
DEFINE_FTORECORD $F0, $A0, FTO_FLAGS_NONE, 0, 0, FT_SRC ; IIgs BASIC => SRC
|
||||
DEFINE_FTORECORD $F0, $B0, FTO_FLAGS_NONE, 0, 0, FT_SRC ; IIgs System => SRC
|
||||
DEFINE_FTORECORD $F0, $C0, FTO_FLAGS_NONE, 0, 0, FT_SRC ; IIgs Graphics => SRC
|
||||
|
||||
.byte 0 ; sentinel at end of table
|
||||
|
||||
;;; --------------------------------------------------
|
||||
|
||||
checkerboard_pattern:
|
||||
.byte %01010101
|
||||
.byte %10101010
|
||||
.byte %01010101
|
||||
.byte %10101010
|
||||
.byte %01010101
|
||||
.byte %10101010
|
||||
.byte %01010101
|
||||
.byte %10101010
|
||||
|
||||
;;; --------------------------------------------------
|
||||
|
||||
|
@ -1364,7 +1491,7 @@ icon_entries:
|
|||
|
||||
.org $FB00
|
||||
|
||||
num_file_types = 14
|
||||
num_file_types = 15
|
||||
|
||||
type_table:
|
||||
.byte FT_TYPELESS ; typeless
|
||||
|
@ -1380,6 +1507,7 @@ type_table:
|
|||
.byte FT_ADB ; appleworks db
|
||||
.byte FT_AWP ; appleworks wp
|
||||
.byte FT_ASP ; appleworks sp
|
||||
.byte DA_FILE_TYPE ; desk accessory
|
||||
.byte FT_BAD ; bad block
|
||||
|
||||
type_names_table:
|
||||
|
@ -1396,6 +1524,7 @@ type_names_table:
|
|||
.byte " ADB" ; appleworks db
|
||||
.byte " AWP" ; appleworks wp
|
||||
.byte " ASP" ; appleworks sp
|
||||
.byte " $F1" ; desk accessory
|
||||
.byte " BAD" ; bad block
|
||||
|
||||
;;; The icon-related tables (below) use a distinguishing icon
|
||||
|
@ -1406,6 +1535,9 @@ type_names_table:
|
|||
;;; Similarly, IIgs-specific types ($5x, $Ax-$Cx) are all
|
||||
;;; mapped to $B0 (SRC).
|
||||
|
||||
.assert FT_BAD = APP_FILE_TYPE, error, "Mismatched file type remapping"
|
||||
|
||||
|
||||
icon_type_table:
|
||||
.byte icon_entry_type_generic ; typeless
|
||||
.byte icon_entry_type_generic ; src
|
||||
|
@ -1420,6 +1552,7 @@ icon_type_table:
|
|||
.byte icon_entry_type_generic ; appleworks db
|
||||
.byte icon_entry_type_generic ; appleworks wp
|
||||
.byte icon_entry_type_generic ; appleworks sp
|
||||
.byte icon_entry_type_generic ; desk accessory
|
||||
.byte icon_entry_type_system ; system (see below)
|
||||
|
||||
type_icons_table: ; map into definitions below
|
||||
|
@ -1436,6 +1569,7 @@ type_icons_table: ; map into definitions below
|
|||
.addr adb ; appleworks db
|
||||
.addr awp ; appleworks wp
|
||||
.addr asp ; appleworks sp
|
||||
.addr a2d ; desk accessory
|
||||
.addr app ; system (see below)
|
||||
|
||||
gen: DEFICON generic_icon, 4, 27, 15, generic_mask
|
||||
|
@ -1446,11 +1580,12 @@ txt: DEFICON text_icon, 4, 27, 15, generic_mask
|
|||
bin: DEFICON binary_icon, 4, 27, 14, binary_mask
|
||||
dir: DEFICON folder_icon, 4, 27, 11, folder_mask
|
||||
sys: DEFICON sys_icon, 4, 27, 17, sys_mask
|
||||
bas: DEFICON basic_icon, 4, 27, 14, basic_mask
|
||||
bas: DEFICON desktop_aux::basic_icon, 4, 27, 14, desktop_aux::basic_mask
|
||||
fot: DEFICON desktop_aux::graphics_icon, 4, 27, 12, desktop_aux::graphics_mask
|
||||
adb: DEFICON desktop_aux::adb_icon, 4, 27, 15, generic_mask
|
||||
awp: DEFICON desktop_aux::awp_icon, 4, 27, 15, generic_mask
|
||||
asp: DEFICON desktop_aux::asp_icon, 4, 27, 15, generic_mask
|
||||
a2d: DEFICON desktop_aux::a2d_file_icon, 4, 27, 15, generic_mask
|
||||
app: DEFICON app_icon, 5, 34, 16, app_mask
|
||||
|
||||
;;; Generic
|
||||
|
@ -1620,41 +1755,6 @@ sys_mask:
|
|||
.byte px(%0011111),px(%1111111),px(%1111111),px(%1111100)
|
||||
.byte px(%0000000),px(%0000000),px(%0000000),px(%0000000)
|
||||
|
||||
;;; Basic
|
||||
|
||||
basic_icon:
|
||||
.byte px(%0000000),px(%0000001),px(%1000000),px(%0000000)
|
||||
.byte px(%0000000),px(%0000110),px(%0110000),px(%0000000)
|
||||
.byte px(%0000000),px(%0011000),px(%0001100),px(%0000000)
|
||||
.byte px(%0000000),px(%1100000),px(%0000011),px(%0000000)
|
||||
.byte px(%0000000),px(%0000000),px(%0000000),px(%0000000)
|
||||
.byte px(%0111110),px(%0111000),px(%1111010),px(%0111100)
|
||||
.byte px(%0100010),px(%1000100),px(%1000010),px(%1000110)
|
||||
.byte px(%0111100),px(%1111100),px(%1111010),px(%1000000)
|
||||
.byte px(%0100010),px(%1000100),px(%0001010),px(%1000110)
|
||||
.byte px(%0111110),px(%1000100),px(%1111010),px(%0111100)
|
||||
.byte px(%0000000),px(%0000000),px(%0000000),px(%0000000)
|
||||
.byte px(%0000000),px(%1100000),px(%0000011),px(%0000000)
|
||||
.byte px(%0000000),px(%0011000),px(%0001100),px(%0000000)
|
||||
.byte px(%0000000),px(%0000110),px(%0110000),px(%0000000)
|
||||
.byte px(%0000000),px(%0000001),px(%1000000),px(%0000000)
|
||||
|
||||
basic_mask:
|
||||
.byte px(%0000000),px(%0000000),px(%0000000),px(%0000000)
|
||||
.byte px(%0000000),px(%0000001),px(%1000000),px(%0000000)
|
||||
.byte px(%0000000),px(%0000111),px(%1110000),px(%0000000)
|
||||
.byte px(%0000000),px(%0011111),px(%1111100),px(%0000000)
|
||||
.byte px(%1111111),px(%1111111),px(%1111111),px(%1111111)
|
||||
.byte px(%1111111),px(%1111111),px(%1111111),px(%1111111)
|
||||
.byte px(%1111111),px(%1111111),px(%1111111),px(%1111111)
|
||||
.byte px(%1111111),px(%1111111),px(%1111111),px(%1111111)
|
||||
.byte px(%1111111),px(%1111111),px(%1111111),px(%1111111)
|
||||
.byte px(%1111111),px(%1111111),px(%1111111),px(%1111111)
|
||||
.byte px(%1111111),px(%1111111),px(%1111111),px(%1111111)
|
||||
.byte px(%0000000),px(%0011111),px(%1111100),px(%0000000)
|
||||
.byte px(%0000000),px(%0000111),px(%1110000),px(%0000000)
|
||||
.byte px(%0000000),px(%0000001),px(%1000000),px(%0000000)
|
||||
.byte px(%0000000),px(%0000000),px(%0000000),px(%0000000)
|
||||
|
||||
;;; System (with .SYSTEM suffix)
|
||||
|
||||
|
@ -1699,4 +1799,34 @@ app_mask:
|
|||
;; Reserve $80 bytes for settings
|
||||
PAD_TO $FF80
|
||||
|
||||
PAD_TO $10000
|
||||
;;; ============================================================
|
||||
;;; Settings - modified by Control Panel
|
||||
;;; ============================================================
|
||||
|
||||
.scope settings
|
||||
.assert * = DeskTop::Settings::address, error, "Address mismatch"
|
||||
|
||||
;; This is offset $A700 into DESKTOP2 file
|
||||
|
||||
.assert * = DeskTop::Settings::pattern, error, "Address mismatch"
|
||||
.byte %01010101
|
||||
.byte %10101010
|
||||
.byte %01010101
|
||||
.byte %10101010
|
||||
.byte %01010101
|
||||
.byte %10101010
|
||||
.byte %01010101
|
||||
.byte %10101010
|
||||
|
||||
.assert * = DeskTop::Settings::dblclick_speed, error, "Address mismatch"
|
||||
.word 0 ; $12C * 1, * 4, or * 32, 0 if not set
|
||||
|
||||
.assert * = DeskTop::Settings::ip_blink_speed, error, "Address mismatch"
|
||||
.byte 60 ; 120, 60 or 30; lower is faster
|
||||
|
||||
;; Reserved for future use...
|
||||
|
||||
PAD_TO DeskTop::Settings::address + DeskTop::Settings::length
|
||||
.endscope
|
||||
|
||||
.assert * = $10000, error, "Segment length mismatch"
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
.include "apple2.inc"
|
||||
.include "../inc/apple2.inc"
|
||||
.include "../inc/prodos.inc"
|
||||
.include "../macros.inc"
|
||||
.include "../inc/macros.inc"
|
||||
|
||||
DESKTOP_INIT := $0800 ; init location
|
||||
L7ECA := $7ECA ; ???
|
||||
|
@ -265,21 +265,13 @@ start:
|
|||
bpl :-
|
||||
|
||||
;; Open this system file
|
||||
php
|
||||
sei
|
||||
MLI_CALL OPEN, open_params
|
||||
plp
|
||||
and #$FF ; ???
|
||||
beq :+
|
||||
brk ; crash
|
||||
: lda open_params::ref_num
|
||||
sta set_mark_params::ref_num
|
||||
sta read_params::ref_num
|
||||
php
|
||||
sei
|
||||
MLI_CALL SET_MARK, set_mark_params
|
||||
plp
|
||||
and #$FF ; ???
|
||||
beq :+
|
||||
brk ; crash
|
||||
: lda #0
|
||||
|
@ -290,11 +282,7 @@ loop: lda segment_num
|
|||
bne continue
|
||||
|
||||
;; Close and invoke DeskTop init routine
|
||||
php
|
||||
sei
|
||||
MLI_CALL CLOSE, close_params
|
||||
plp
|
||||
and #$FF ; ???
|
||||
beq :+
|
||||
brk ; crash
|
||||
: jmp DESKTOP_INIT
|
||||
|
@ -304,11 +292,7 @@ continue:
|
|||
tax
|
||||
copy16 segment_addr_table,x, read_params::data_buffer
|
||||
copy16 segment_size_table,x, read_params::request_count
|
||||
php
|
||||
sei
|
||||
MLI_CALL READ, read_params
|
||||
plp
|
||||
and #$FF ; ???
|
||||
beq :+
|
||||
brk ; crash
|
||||
: ldx segment_num
|
||||
|
|
|
@ -43,7 +43,7 @@ str_desktop2:
|
|||
|
||||
start: lda #$80
|
||||
sta ptr
|
||||
DESKTOP_RELAY_CALL DT_UNHIGHLIGHT_ALL
|
||||
ITK_RELAY_CALL IconTK::REMOVE_ALL, 0 ; volume icons
|
||||
MGTK_RELAY_CALL MGTK::CloseAll
|
||||
MGTK_RELAY_CALL MGTK::SetZP1, ptr
|
||||
|
||||
|
@ -81,8 +81,6 @@ start: lda #$80
|
|||
sty call
|
||||
sta params
|
||||
stx params+1
|
||||
php
|
||||
sei
|
||||
sta ALTZPOFF
|
||||
lda ROMIN2
|
||||
jsr MLI
|
||||
|
@ -92,7 +90,6 @@ params: .addr 0
|
|||
sta ALTZPON
|
||||
lda LCBANK1
|
||||
lda LCBANK1
|
||||
plp
|
||||
txa
|
||||
self: bne self ; hang on error?
|
||||
rts
|
||||
|
|
|
@ -59,7 +59,7 @@ L183F: sta BITMAP+1,x
|
|||
lda LCBANK1
|
||||
lda LCBANK1
|
||||
|
||||
jmp MGTK_RELAY
|
||||
jmp disk_copy_overlay3_start
|
||||
|
||||
;;; ============================================================
|
||||
;;; Copy first chunk to the Language Card
|
||||
|
@ -120,13 +120,9 @@ loop: lda (src),y
|
|||
.proc MLI_RELAY
|
||||
sty call
|
||||
stax params
|
||||
php
|
||||
sei
|
||||
jsr MLI
|
||||
call: .byte 0
|
||||
params: .addr 0
|
||||
plp
|
||||
and #$FF
|
||||
self: bne self ; hang if fails
|
||||
rts
|
||||
.endproc
|
||||
|
|
149
desktop/ovl1b.s
149
desktop/ovl1b.s
|
@ -5,38 +5,6 @@
|
|||
.proc disk_copy_overlay3
|
||||
.org $D000
|
||||
|
||||
.scope disk_copy_overlay4
|
||||
.scope on_line_params2
|
||||
unit_num := $0C42
|
||||
.endscope
|
||||
.scope on_line_params
|
||||
unit_num := $0C46
|
||||
.endscope
|
||||
on_line_buffer := $0C49
|
||||
.scope block_params
|
||||
unit_num := $0C5A
|
||||
data_buffer := $0C5B
|
||||
block_num := $0C5D
|
||||
.endscope
|
||||
|
||||
noop := $0C83
|
||||
quit := $0C84
|
||||
L0CAF := $0CAF
|
||||
eject_disk := $0CED
|
||||
unit_number_to_driver_address := $0D26
|
||||
L0D51 := $0D51
|
||||
L0D5F := $0D5F
|
||||
L0DB5 := $0DB5
|
||||
L0EB2 := $0EB2
|
||||
L0ED7 := $0ED7
|
||||
L10FB := $10FB
|
||||
L127E := $127E
|
||||
L1291 := $1291
|
||||
L129B := $129B
|
||||
L12A5 := $12A5
|
||||
L12AF := $12AF
|
||||
.endscope
|
||||
|
||||
.macro MGTK_RELAY_CALL2 call, params
|
||||
.if .paramcount > 1
|
||||
yax_call MGTK_RELAY2, call, params
|
||||
|
@ -45,7 +13,12 @@ L12AF := $12AF
|
|||
.endif
|
||||
.endmacro
|
||||
|
||||
jmp LD5E1
|
||||
;;; ============================================================
|
||||
|
||||
.assert *= $D000, error, "Entry point mismatch"
|
||||
|
||||
start:
|
||||
jmp init
|
||||
|
||||
;;; ============================================================
|
||||
;;; Resources
|
||||
|
@ -497,7 +470,8 @@ watch_cursor:
|
|||
;;; ============================================================
|
||||
|
||||
LD5E0: .byte 0
|
||||
LD5E1: jsr remove_ram_disk
|
||||
|
||||
init: jsr remove_ram_disk
|
||||
MGTK_RELAY_CALL2 MGTK::SetMenu, menu_definition
|
||||
jsr set_cursor_pointer
|
||||
copy #1, checkitem_params::menu_item
|
||||
|
@ -585,12 +559,12 @@ LD740: lda #$00
|
|||
sta LD44D
|
||||
ldx source_drive_index
|
||||
lda drive_unitnum_table,x
|
||||
sta disk_copy_overlay4::on_line_params2::unit_num
|
||||
jsr disk_copy_overlay4::L1291
|
||||
sta disk_copy_overlay4_on_line_params2_unit_num
|
||||
jsr disk_copy_overlay4_L1291
|
||||
beq LD77E
|
||||
cmp #$52
|
||||
bne LD763
|
||||
jsr disk_copy_overlay4::L0D5F
|
||||
jsr disk_copy_overlay4_L0D5F
|
||||
jsr LE674
|
||||
jsr LE559
|
||||
jmp LD7AD
|
||||
|
@ -607,7 +581,7 @@ LD77E: lda $1300
|
|||
lda $1301
|
||||
cmp #$52
|
||||
bne LD763
|
||||
jsr disk_copy_overlay4::L0D5F
|
||||
jsr disk_copy_overlay4_L0D5F
|
||||
jsr LE674
|
||||
jsr LE559
|
||||
jmp LD7AD
|
||||
|
@ -635,8 +609,8 @@ LD7AD: lda source_drive_index
|
|||
|
||||
LD7CC: ldx dest_drive_index
|
||||
lda drive_unitnum_table,x
|
||||
sta disk_copy_overlay4::on_line_params2::unit_num
|
||||
jsr disk_copy_overlay4::L1291
|
||||
sta disk_copy_overlay4_on_line_params2_unit_num
|
||||
jsr disk_copy_overlay4_L1291
|
||||
beq LD7E1
|
||||
cmp #$52
|
||||
beq LD7F2
|
||||
|
@ -655,7 +629,7 @@ LD7F2: ldx dest_drive_index
|
|||
and #$0F
|
||||
beq LD817
|
||||
lda drive_unitnum_table,x
|
||||
jsr disk_copy_overlay4::unit_number_to_driver_address
|
||||
jsr disk_copy_overlay4_unit_number_to_driver_address
|
||||
ldy #$FF
|
||||
lda ($06),y
|
||||
beq LD817
|
||||
|
@ -699,7 +673,7 @@ LD852: ldx dest_drive_index
|
|||
and #$0F
|
||||
beq LD87C
|
||||
lda drive_unitnum_table,x
|
||||
jsr disk_copy_overlay4::unit_number_to_driver_address
|
||||
jsr disk_copy_overlay4_unit_number_to_driver_address
|
||||
ldy #$FE
|
||||
lda ($06),y
|
||||
and #$08
|
||||
|
@ -716,7 +690,7 @@ LD852: ldx dest_drive_index
|
|||
|
||||
LD87C: MGTK_RELAY_CALL2 MGTK::MoveTo, point_formatting
|
||||
addr_call draw_text, str_formatting
|
||||
jsr disk_copy_overlay4::L0CAF
|
||||
jsr disk_copy_overlay4_L0CAF
|
||||
bcc LD8A9
|
||||
cmp #$2B
|
||||
beq LD89F
|
||||
|
@ -741,7 +715,7 @@ LD8A9: lda winfo_dialog::window_id
|
|||
tax
|
||||
lda drive_unitnum_table,x
|
||||
pha
|
||||
jsr disk_copy_overlay4::eject_disk
|
||||
jsr disk_copy_overlay4_eject_disk
|
||||
pla
|
||||
tay
|
||||
ldx #$80
|
||||
|
@ -750,7 +724,7 @@ LD8A9: lda winfo_dialog::window_id
|
|||
beq LD8DF
|
||||
jmp LD61C
|
||||
|
||||
LD8DF: jsr disk_copy_overlay4::L0DB5
|
||||
LD8DF: jsr disk_copy_overlay4_L0DB5
|
||||
lda #$00
|
||||
sta LD421
|
||||
sta LD421+1
|
||||
|
@ -762,7 +736,7 @@ LD8DF: jsr disk_copy_overlay4::L0DB5
|
|||
jsr LE694
|
||||
LD8FB: jsr LE4A8
|
||||
lda #$00
|
||||
jsr disk_copy_overlay4::L0ED7
|
||||
jsr disk_copy_overlay4_L0ED7
|
||||
cmp #$01
|
||||
beq LD97A
|
||||
jsr LE4EC
|
||||
|
@ -772,7 +746,7 @@ LD8FB: jsr LE4A8
|
|||
tax
|
||||
lda drive_unitnum_table,x
|
||||
pha
|
||||
jsr disk_copy_overlay4::eject_disk
|
||||
jsr disk_copy_overlay4_eject_disk
|
||||
pla
|
||||
tay
|
||||
ldx #$80
|
||||
|
@ -783,7 +757,7 @@ LD8FB: jsr LE4A8
|
|||
|
||||
LD928: jsr LE491
|
||||
lda #$80
|
||||
jsr disk_copy_overlay4::L0ED7
|
||||
jsr disk_copy_overlay4_L0ED7
|
||||
bmi LD955
|
||||
bne LD97A
|
||||
jsr LE507
|
||||
|
@ -793,7 +767,7 @@ LD928: jsr LE491
|
|||
tax
|
||||
lda drive_unitnum_table,x
|
||||
pha
|
||||
jsr disk_copy_overlay4::eject_disk
|
||||
jsr disk_copy_overlay4_eject_disk
|
||||
pla
|
||||
tay
|
||||
ldx #$80
|
||||
|
@ -803,20 +777,20 @@ LD928: jsr LE491
|
|||
jmp LD61C
|
||||
|
||||
LD955: jsr LE507
|
||||
jsr disk_copy_overlay4::L10FB
|
||||
jsr disk_copy_overlay4_L10FB
|
||||
ldx source_drive_index
|
||||
lda drive_unitnum_table,x
|
||||
jsr disk_copy_overlay4::eject_disk
|
||||
jsr disk_copy_overlay4_eject_disk
|
||||
ldx dest_drive_index
|
||||
cpx source_drive_index
|
||||
beq :+
|
||||
lda drive_unitnum_table,x
|
||||
jsr disk_copy_overlay4::eject_disk
|
||||
jsr disk_copy_overlay4_eject_disk
|
||||
: lda #9 ; Copy success
|
||||
jsr show_alert_dialog
|
||||
jmp LD61C
|
||||
|
||||
LD97A: jsr disk_copy_overlay4::L10FB
|
||||
LD97A: jsr disk_copy_overlay4_L10FB
|
||||
lda #10 ; Copy failed
|
||||
jsr show_alert_dialog
|
||||
jmp LD61C
|
||||
|
@ -842,13 +816,13 @@ LD9BA: cmp #MGTK::EventKind::key_down
|
|||
|
||||
menu_command_table:
|
||||
;; Apple menu
|
||||
.addr disk_copy_overlay4::noop
|
||||
.addr disk_copy_overlay4::noop
|
||||
.addr disk_copy_overlay4::noop
|
||||
.addr disk_copy_overlay4::noop
|
||||
.addr disk_copy_overlay4::noop
|
||||
.addr disk_copy_overlay4_noop
|
||||
.addr disk_copy_overlay4_noop
|
||||
.addr disk_copy_overlay4_noop
|
||||
.addr disk_copy_overlay4_noop
|
||||
.addr disk_copy_overlay4_noop
|
||||
;; File menu
|
||||
.addr disk_copy_overlay4::quit
|
||||
.addr disk_copy_overlay4_quit
|
||||
;; Facilities menu
|
||||
.addr cmd_quick_copy
|
||||
.addr cmd_disk_copy
|
||||
|
@ -1214,12 +1188,12 @@ state: .byte 0
|
|||
|
||||
;;; ============================================================
|
||||
|
||||
LDDFC: sta disk_copy_overlay4::block_params::unit_num
|
||||
LDDFC: sta disk_copy_overlay4_block_params_unit_num
|
||||
lda #$00
|
||||
sta disk_copy_overlay4::block_params::block_num
|
||||
sta disk_copy_overlay4::block_params::block_num+1
|
||||
copy16 #$1C00, disk_copy_overlay4::block_params::data_buffer
|
||||
jsr disk_copy_overlay4::L12AF
|
||||
sta disk_copy_overlay4_block_params_block_num
|
||||
sta disk_copy_overlay4_block_params_block_num+1
|
||||
copy16 #$1C00, disk_copy_overlay4_block_params_data_buffer
|
||||
jsr disk_copy_overlay4_L12AF
|
||||
beq LDE19
|
||||
return #$FF
|
||||
|
||||
|
@ -1257,7 +1231,7 @@ LDE4D: cmp #$A5
|
|||
lda $1C02
|
||||
cmp #$27
|
||||
bne LDE2E
|
||||
lda disk_copy_overlay4::block_params::unit_num
|
||||
lda disk_copy_overlay4_block_params_unit_num
|
||||
and #$70
|
||||
lsr a
|
||||
lsr a
|
||||
|
@ -1267,7 +1241,7 @@ LDE4D: cmp #$A5
|
|||
adc #'0'
|
||||
ldx slot_char
|
||||
sta str_dos33_s_d,x
|
||||
lda disk_copy_overlay4::block_params::unit_num
|
||||
lda disk_copy_overlay4_block_params_unit_num
|
||||
and #$80
|
||||
asl a
|
||||
rol a
|
||||
|
@ -1295,8 +1269,8 @@ LDE83: lda str_dos33_s_d,x
|
|||
|
||||
.byte 0
|
||||
LDE9F: stax $06
|
||||
copy16 #$0002, disk_copy_overlay4::block_params::block_num
|
||||
jsr disk_copy_overlay4::L12AF
|
||||
copy16 #$0002, disk_copy_overlay4_block_params_block_num
|
||||
jsr disk_copy_overlay4_L12AF
|
||||
beq LDEBE
|
||||
ldy #$00
|
||||
lda #$01
|
||||
|
@ -1606,8 +1580,8 @@ check_alpha:
|
|||
|
||||
LE16C: lda #$00
|
||||
sta LD44E
|
||||
sta disk_copy_overlay4::on_line_params2::unit_num
|
||||
jsr disk_copy_overlay4::L1291
|
||||
sta disk_copy_overlay4_on_line_params2_unit_num
|
||||
jsr disk_copy_overlay4_L1291
|
||||
beq LE17A
|
||||
.byte 0
|
||||
LE17A: lda #$00
|
||||
|
@ -1884,7 +1858,7 @@ LE3B8: pha
|
|||
beq LE3CC
|
||||
lda drive_unitnum_table,x
|
||||
and #$F0
|
||||
jsr disk_copy_overlay4::unit_number_to_driver_address
|
||||
jsr disk_copy_overlay4_unit_number_to_driver_address
|
||||
jmp LE3DA
|
||||
|
||||
LE3CC: pla
|
||||
|
@ -1968,7 +1942,7 @@ LE44A: ldy #$FF
|
|||
tax
|
||||
lda drive_unitnum_table,x
|
||||
and #$F0
|
||||
jsr disk_copy_overlay4::L0D51
|
||||
jsr disk_copy_overlay4_L0D51
|
||||
sta LE47D
|
||||
jsr indirect_jump
|
||||
.byte 0
|
||||
|
@ -2203,21 +2177,21 @@ LE6FD: stx LE765
|
|||
|
||||
cmp #$2B
|
||||
bne LE71A
|
||||
jsr disk_copy_overlay4::L127E
|
||||
jsr disk_copy_overlay4_L127E
|
||||
lda #5 ; Destination protected
|
||||
jsr show_alert_dialog
|
||||
bne LE714
|
||||
jsr LE491
|
||||
return #$01
|
||||
|
||||
LE714: jsr disk_copy_overlay4::L10FB
|
||||
LE714: jsr disk_copy_overlay4_L10FB
|
||||
return #$80
|
||||
|
||||
LE71A: jsr disk_copy_overlay4::L127E
|
||||
LE71A: jsr disk_copy_overlay4_L127E
|
||||
lda winfo_dialog::window_id
|
||||
jsr set_win_port
|
||||
lda disk_copy_overlay4::block_params::block_num
|
||||
ldx disk_copy_overlay4::block_params::block_num+1
|
||||
lda disk_copy_overlay4_block_params_block_num
|
||||
ldx disk_copy_overlay4_block_params_block_num+1
|
||||
jsr number_to_string
|
||||
lda LE765
|
||||
bne LE74B
|
||||
|
@ -2237,8 +2211,8 @@ LE766: sta $06
|
|||
stx $07
|
||||
stx $09
|
||||
inc $09
|
||||
copy16 #$1C00, disk_copy_overlay4::block_params::data_buffer
|
||||
LE77A: jsr disk_copy_overlay4::L12AF
|
||||
copy16 #$1C00, disk_copy_overlay4_block_params_data_buffer
|
||||
LE77A: jsr disk_copy_overlay4_L12AF
|
||||
beq LE789
|
||||
ldx #$00
|
||||
jsr LE6FD
|
||||
|
@ -2266,7 +2240,7 @@ LE7A8: sta $06
|
|||
stx $07
|
||||
stx $09
|
||||
inc $09
|
||||
copy16 #$1C00, disk_copy_overlay4::block_params::data_buffer
|
||||
copy16 #$1C00, disk_copy_overlay4_block_params_data_buffer
|
||||
.byte $8D
|
||||
.byte $03
|
||||
cpy #$8D
|
||||
|
@ -2282,7 +2256,7 @@ LE7C5: lda ($06),y
|
|||
bne LE7C5
|
||||
sta RAMRDOFF
|
||||
sta RAMWRTOFF
|
||||
LE7D8: jsr disk_copy_overlay4::L12A5
|
||||
LE7D8: jsr disk_copy_overlay4_L12A5
|
||||
beq LE7E6
|
||||
ldx #$80
|
||||
jsr LE6FD
|
||||
|
@ -3062,22 +3036,22 @@ state:
|
|||
|
||||
LF185: sty LD41D
|
||||
tya
|
||||
jsr disk_copy_overlay4::L0EB2
|
||||
jsr disk_copy_overlay4_L0EB2
|
||||
beq :+
|
||||
sta LD41E
|
||||
: rts
|
||||
|
||||
.proc LF192
|
||||
lda LD41D
|
||||
sta disk_copy_overlay4::on_line_params::unit_num
|
||||
jsr disk_copy_overlay4::L129B
|
||||
sta disk_copy_overlay4_on_line_params_unit_num
|
||||
jsr disk_copy_overlay4_L129B
|
||||
beq done
|
||||
cmp #$52
|
||||
beq done
|
||||
lda disk_copy_overlay4::on_line_buffer
|
||||
lda disk_copy_overlay4_on_line_buffer
|
||||
and #$0F
|
||||
bne done
|
||||
lda disk_copy_overlay4::on_line_buffer+1
|
||||
lda disk_copy_overlay4_on_line_buffer+1
|
||||
cmp #$52
|
||||
beq done
|
||||
MGTK_RELAY_CALL2 MGTK::GetEvent, event_params
|
||||
|
@ -3096,7 +3070,7 @@ LF1CC: cmp #$03
|
|||
bcc LF1D7
|
||||
cmp #$06
|
||||
bcs LF1D7
|
||||
jsr disk_copy_overlay4::L127E
|
||||
jsr disk_copy_overlay4_L127E
|
||||
LF1D7: rts
|
||||
|
||||
.endproc
|
||||
|
@ -3137,3 +3111,4 @@ show_alert_dialog := alert_dialog::show_alert_dialog
|
|||
PAD_TO $F200
|
||||
|
||||
.endproc
|
||||
disk_copy_overlay3_start := disk_copy_overlay3::start
|
||||
|
|
|
@ -630,8 +630,6 @@ on_line_buffer:
|
|||
.proc MLI_RELAY
|
||||
sty call
|
||||
stax params
|
||||
php
|
||||
sei
|
||||
sta ALTZPOFF
|
||||
lda ROMIN2
|
||||
jsr MLI
|
||||
|
@ -641,7 +639,6 @@ params: .addr 0
|
|||
sta ALTZPON
|
||||
lda LCBANK1
|
||||
lda LCBANK1
|
||||
plp
|
||||
txa
|
||||
rts
|
||||
.endproc
|
||||
|
@ -674,7 +671,7 @@ params: .addr 0
|
|||
|
||||
;;; ============================================================
|
||||
|
||||
ldx disk_copy_overlay3::dest_drive_index
|
||||
L0CAF: ldx disk_copy_overlay3::dest_drive_index
|
||||
lda disk_copy_overlay3::drive_unitnum_table,x
|
||||
sta unit_number
|
||||
and #$0F
|
||||
|
@ -1481,3 +1478,26 @@ L12B9: .byte 0
|
|||
.assert * = $1300, error, "Segment length mismatch"
|
||||
|
||||
.endproc
|
||||
|
||||
disk_copy_overlay4_L0CAF := disk_copy_overlay4::L0CAF
|
||||
disk_copy_overlay4_L0D51 := disk_copy_overlay4::L0D51
|
||||
disk_copy_overlay4_L0D5F := disk_copy_overlay4::L0D5F
|
||||
disk_copy_overlay4_L0DB5 := disk_copy_overlay4::L0DB5
|
||||
disk_copy_overlay4_L0EB2 := disk_copy_overlay4::L0EB2
|
||||
disk_copy_overlay4_L0ED7 := disk_copy_overlay4::L0ED7
|
||||
disk_copy_overlay4_L10FB := disk_copy_overlay4::L10FB
|
||||
disk_copy_overlay4_L127E := disk_copy_overlay4::L127E
|
||||
disk_copy_overlay4_L1291 := disk_copy_overlay4::L1291
|
||||
disk_copy_overlay4_L129B := disk_copy_overlay4::L129B
|
||||
disk_copy_overlay4_L12A5 := disk_copy_overlay4::L12A5
|
||||
disk_copy_overlay4_L12AF := disk_copy_overlay4::L12AF
|
||||
disk_copy_overlay4_block_params_block_num := disk_copy_overlay4::block_params::block_num
|
||||
disk_copy_overlay4_block_params_data_buffer := disk_copy_overlay4::block_params::data_buffer
|
||||
disk_copy_overlay4_block_params_unit_num := disk_copy_overlay4::block_params::unit_num
|
||||
disk_copy_overlay4_eject_disk := disk_copy_overlay4::eject_disk
|
||||
disk_copy_overlay4_noop := disk_copy_overlay4::noop
|
||||
disk_copy_overlay4_on_line_buffer := disk_copy_overlay4::on_line_buffer
|
||||
disk_copy_overlay4_on_line_params2_unit_num := disk_copy_overlay4::on_line_params2::unit_num
|
||||
disk_copy_overlay4_on_line_params_unit_num := disk_copy_overlay4::on_line_params::unit_num
|
||||
disk_copy_overlay4_quit := disk_copy_overlay4::quit
|
||||
disk_copy_overlay4_unit_number_to_driver_address := disk_copy_overlay4::unit_number_to_driver_address
|
||||
|
|
181
desktop/ovl2.s
181
desktop/ovl2.s
|
@ -22,7 +22,7 @@ L080C: copy #$00, has_input_field_flag
|
|||
lda winfo_alert_dialog
|
||||
jsr desktop_main::set_port_from_window_id
|
||||
addr_call desktop_main::draw_dialog_title, desktop_aux::str_format_disk
|
||||
axy_call desktop_main::draw_dialog_label, 1, desktop_aux::str_select_format
|
||||
yax_call desktop_main::draw_dialog_label, 1, desktop_aux::str_select_format
|
||||
jsr L0D31
|
||||
copy #$FF, LD887
|
||||
L0832: copy16 #L0B48, desktop_main::jump_relay+1
|
||||
|
@ -43,14 +43,14 @@ L085F: bit LD887
|
|||
lda winfo_alert_dialog
|
||||
jsr desktop_main::set_port_from_window_id
|
||||
MGTK_RELAY_CALL MGTK::SetPenMode, pencopy
|
||||
MGTK_RELAY_CALL MGTK::PaintRect, desktop_aux::press_ok_to_rect
|
||||
MGTK_RELAY_CALL MGTK::PaintRect, desktop_aux::clear_dialog_labels_rect
|
||||
MGTK_RELAY_CALL MGTK::SetPenMode, penXOR
|
||||
MGTK_RELAY_CALL MGTK::FrameRect, name_input_rect
|
||||
jsr desktop_main::clear_path_buf1
|
||||
copy #$80, has_input_field_flag
|
||||
copy #$00, format_erase_overlay_flag
|
||||
jsr desktop_main::clear_path_buf2
|
||||
axy_call desktop_main::draw_dialog_label, 3, desktop_aux::str_new_volume
|
||||
yax_call desktop_main::draw_dialog_label, 3, desktop_aux::str_new_volume
|
||||
L08A7: jsr desktop_main::prompt_input_loop
|
||||
bmi L08A7
|
||||
beq L08B7
|
||||
|
@ -67,14 +67,14 @@ L08B7: lda path_buf1
|
|||
lda winfo_alert_dialog
|
||||
jsr desktop_main::set_port_from_window_id
|
||||
MGTK_RELAY_CALL MGTK::SetPenMode, pencopy
|
||||
MGTK_RELAY_CALL MGTK::PaintRect, desktop_aux::press_ok_to_rect
|
||||
MGTK_RELAY_CALL MGTK::PaintRect, desktop_aux::clear_dialog_labels_rect
|
||||
ldx LD887
|
||||
lda DEVLST,x
|
||||
sta L09D8
|
||||
sta L09D7
|
||||
lda #$00
|
||||
sta has_input_field_flag
|
||||
axy_call desktop_main::draw_dialog_label, 3, desktop_aux::str_confirm_format
|
||||
yax_call desktop_main::draw_dialog_label, 3, desktop_aux::str_confirm_format
|
||||
lda L09D7
|
||||
jsr L1A2D
|
||||
addr_call desktop_main::draw_text1, ovl2_path_buf
|
||||
|
@ -86,8 +86,8 @@ L0902: jsr desktop_main::prompt_input_loop
|
|||
L090C: lda winfo_alert_dialog
|
||||
jsr desktop_main::set_port_from_window_id
|
||||
MGTK_RELAY_CALL MGTK::SetPenMode, pencopy
|
||||
MGTK_RELAY_CALL MGTK::PaintRect, desktop_aux::press_ok_to_rect
|
||||
axy_call desktop_main::draw_dialog_label, 1, desktop_aux::str_formatting
|
||||
MGTK_RELAY_CALL MGTK::PaintRect, desktop_aux::clear_dialog_labels_rect
|
||||
yax_call desktop_main::draw_dialog_label, 1, desktop_aux::str_formatting
|
||||
lda L09D7
|
||||
jsr L12C1
|
||||
and #$FF
|
||||
|
@ -99,8 +99,8 @@ L090C: lda winfo_alert_dialog
|
|||
L0942: lda winfo_alert_dialog
|
||||
jsr desktop_main::set_port_from_window_id
|
||||
MGTK_RELAY_CALL MGTK::SetPenMode, pencopy
|
||||
MGTK_RELAY_CALL MGTK::PaintRect, desktop_aux::press_ok_to_rect
|
||||
axy_call desktop_main::draw_dialog_label, 1, desktop_aux::str_erasing
|
||||
MGTK_RELAY_CALL MGTK::PaintRect, desktop_aux::clear_dialog_labels_rect
|
||||
yax_call desktop_main::draw_dialog_label, 1, desktop_aux::str_erasing
|
||||
addr_call upcase_string, path_buf1
|
||||
ldxy #path_buf1
|
||||
lda L09D7
|
||||
|
@ -119,7 +119,7 @@ L0980: cmp #$2B
|
|||
jmp L090C
|
||||
|
||||
L098C: jsr desktop_main::bell
|
||||
axy_call desktop_main::draw_dialog_label, 6, desktop_aux::str_erasing_error
|
||||
yax_call desktop_main::draw_dialog_label, 6, desktop_aux::str_erasing_error
|
||||
jmp L09B8
|
||||
|
||||
L099B: pha
|
||||
|
@ -132,7 +132,7 @@ L099B: pha
|
|||
jmp L090C
|
||||
|
||||
L09AC: jsr desktop_main::bell
|
||||
axy_call desktop_main::draw_dialog_label, 6, desktop_aux::str_formatting_error
|
||||
yax_call desktop_main::draw_dialog_label, 6, desktop_aux::str_formatting_error
|
||||
L09B8: jsr desktop_main::prompt_input_loop
|
||||
bmi L09B8
|
||||
bne L09C2
|
||||
|
@ -158,7 +158,7 @@ L09D9: lda #$00
|
|||
lda winfo_alert_dialog
|
||||
jsr desktop_main::set_port_from_window_id
|
||||
addr_call desktop_main::draw_dialog_title, desktop_aux::str_erase_disk
|
||||
axy_call desktop_main::draw_dialog_label, 1, desktop_aux::str_select_erase
|
||||
yax_call desktop_main::draw_dialog_label, 1, desktop_aux::str_select_erase
|
||||
jsr L0D31
|
||||
copy #$FF, LD887
|
||||
copy16 #L0B48, desktop_main::jump_relay+1
|
||||
|
@ -174,14 +174,14 @@ L0A18: bit LD887
|
|||
lda winfo_alert_dialog
|
||||
jsr desktop_main::set_port_from_window_id
|
||||
MGTK_RELAY_CALL MGTK::SetPenMode, pencopy
|
||||
MGTK_RELAY_CALL MGTK::PaintRect, desktop_aux::press_ok_to_rect
|
||||
MGTK_RELAY_CALL MGTK::PaintRect, desktop_aux::clear_dialog_labels_rect
|
||||
MGTK_RELAY_CALL MGTK::SetPenMode, penXOR
|
||||
MGTK_RELAY_CALL MGTK::FrameRect, name_input_rect
|
||||
jsr desktop_main::clear_path_buf1
|
||||
copy #$80, has_input_field_flag
|
||||
copy #$00, format_erase_overlay_flag
|
||||
jsr desktop_main::clear_path_buf2
|
||||
axy_call desktop_main::draw_dialog_label, 3, desktop_aux::str_new_volume
|
||||
yax_call desktop_main::draw_dialog_label, 3, desktop_aux::str_new_volume
|
||||
L0A6A: jsr desktop_main::prompt_input_loop
|
||||
bmi L0A6A
|
||||
beq L0A7A
|
||||
|
@ -198,13 +198,13 @@ L0A7A: lda path_buf1
|
|||
lda winfo_alert_dialog
|
||||
jsr desktop_main::set_port_from_window_id
|
||||
MGTK_RELAY_CALL MGTK::SetPenMode, pencopy
|
||||
MGTK_RELAY_CALL MGTK::PaintRect, desktop_aux::press_ok_to_rect
|
||||
MGTK_RELAY_CALL MGTK::PaintRect, desktop_aux::clear_dialog_labels_rect
|
||||
copy #$00, has_input_field_flag
|
||||
ldx LD887
|
||||
lda DEVLST,x
|
||||
sta L0B47
|
||||
sta L0B46
|
||||
axy_call desktop_main::draw_dialog_label, 3, desktop_aux::str_confirm_erase
|
||||
yax_call desktop_main::draw_dialog_label, 3, desktop_aux::str_confirm_erase
|
||||
lda L0B46
|
||||
and #$F0
|
||||
jsr L1A2D
|
||||
|
@ -217,8 +217,8 @@ L0AC7: jsr desktop_main::prompt_input_loop
|
|||
L0AD1: lda winfo_alert_dialog
|
||||
jsr desktop_main::set_port_from_window_id
|
||||
MGTK_RELAY_CALL MGTK::SetPenMode, pencopy
|
||||
MGTK_RELAY_CALL MGTK::PaintRect, desktop_aux::press_ok_to_rect
|
||||
axy_call desktop_main::draw_dialog_label, 1, desktop_aux::str_erasing
|
||||
MGTK_RELAY_CALL MGTK::PaintRect, desktop_aux::clear_dialog_labels_rect
|
||||
yax_call desktop_main::draw_dialog_label, 1, desktop_aux::str_erasing
|
||||
addr_call upcase_string, path_buf1
|
||||
jsr desktop_main::set_cursor_watch
|
||||
ldxy #path_buf1
|
||||
|
@ -238,7 +238,7 @@ L0B12: cmp #$2B
|
|||
jmp L0AD1
|
||||
|
||||
L0B1E: jsr desktop_main::bell
|
||||
axy_call desktop_main::draw_dialog_label, 6, desktop_aux::str_erasing_error
|
||||
yax_call desktop_main::draw_dialog_label, 6, desktop_aux::str_erasing_error
|
||||
L0B2A: jsr desktop_main::prompt_input_loop
|
||||
bmi L0B2A
|
||||
beq L0AD1
|
||||
|
@ -255,6 +255,8 @@ L0B47: .byte 0
|
|||
|
||||
;;; ============================================================
|
||||
|
||||
labels_voffset = 49
|
||||
|
||||
L0B48: cmp16 screentowindow_windowx, #40
|
||||
bpl :+
|
||||
return #$FF
|
||||
|
@ -263,18 +265,21 @@ L0B48: cmp16 screentowindow_windowx, #40
|
|||
return #$FF
|
||||
: lda screentowindow_windowy
|
||||
sec
|
||||
sbc #43
|
||||
sbc #labels_voffset
|
||||
sta screentowindow_windowy
|
||||
lda screentowindow_windowy+1
|
||||
sbc #0
|
||||
bpl :+
|
||||
return #$FF
|
||||
: sta screentowindow_windowy+1
|
||||
lsr16 screentowindow_windowy
|
||||
lsr16 screentowindow_windowy
|
||||
lsr16 screentowindow_windowy
|
||||
lda screentowindow_windowy
|
||||
cmp #$04
|
||||
|
||||
;; Divide by desktop_aux::dialog_label_height
|
||||
ldax screentowindow_windowy
|
||||
ldy #desktop_aux::dialog_label_height
|
||||
jsr Divide_16_8_16
|
||||
stax screentowindow_windowy
|
||||
|
||||
cmp #4
|
||||
bcc L0B98
|
||||
return #$FF
|
||||
|
||||
|
@ -295,7 +300,7 @@ L0BBB: lda L0C1F
|
|||
lda LD887
|
||||
bmi L0BD9
|
||||
lda LD887
|
||||
jsr L0C20
|
||||
jsr hilight_volume_label
|
||||
lda #$FF
|
||||
sta LD887
|
||||
L0BD9: return #$FF
|
||||
|
@ -313,72 +318,93 @@ L0C03: rts
|
|||
L0C04: sta L0C1E
|
||||
lda LD887
|
||||
bmi L0C0F
|
||||
jsr L0C20
|
||||
jsr hilight_volume_label
|
||||
L0C0F: lda L0C1E
|
||||
sta LD887
|
||||
jsr L0C20
|
||||
jsr hilight_volume_label
|
||||
jsr desktop_main::detect_double_click
|
||||
beq L0BE6
|
||||
rts
|
||||
|
||||
L0C1E: .byte 0
|
||||
L0C1F: .byte 0
|
||||
L0C20: ldy #$27
|
||||
sty rect_D888
|
||||
ldy #$00
|
||||
sty rect_D888+1
|
||||
|
||||
;;; ============================================================
|
||||
;;; Hilight volume label
|
||||
;;; Input: A = volume index
|
||||
|
||||
label_width = 120
|
||||
|
||||
.proc hilight_volume_label
|
||||
ldy #39
|
||||
sty select_volume_rect::x1
|
||||
ldy #0
|
||||
sty select_volume_rect::x1+1
|
||||
tax
|
||||
lsr a ; / 4
|
||||
lsr a
|
||||
lsr a
|
||||
sta L0CA9
|
||||
beq L0C5B
|
||||
add16 rect_D888, #$0078, rect_D888
|
||||
sta L0CA9 ; column (0, 1, or 2)
|
||||
beq :+
|
||||
add16 select_volume_rect::x1, #120, select_volume_rect::x1
|
||||
lda L0CA9
|
||||
cmp #$01
|
||||
beq L0C5B
|
||||
add16 rect_D888, #$0078, rect_D888
|
||||
L0C5B: asl L0CA9
|
||||
cmp #1
|
||||
beq :+
|
||||
add16 select_volume_rect::x1, #label_width, select_volume_rect::x1
|
||||
: asl L0CA9 ; * 4
|
||||
asl L0CA9
|
||||
txa
|
||||
sec
|
||||
sbc L0CA9
|
||||
asl a
|
||||
asl a
|
||||
asl a
|
||||
clc
|
||||
adc #$2B
|
||||
sta rect_D888+2
|
||||
lda #$00
|
||||
sta rect_D888+3
|
||||
add16 rect_D888, #$0077, rect_D888+4
|
||||
add16 rect_D888+2, #$0007, rect_D888+6
|
||||
sbc L0CA9 ; entry % 4
|
||||
ldx #0
|
||||
|
||||
ldy #desktop_aux::dialog_label_height
|
||||
jsr Multiply_16_8_16
|
||||
stax select_volume_rect::y1
|
||||
add16_8 select_volume_rect::y1, #labels_voffset, select_volume_rect::y1
|
||||
|
||||
add16 select_volume_rect::x1, #label_width-1, select_volume_rect::x2
|
||||
add16 select_volume_rect::y1, #desktop_aux::dialog_label_height-1, select_volume_rect::y2
|
||||
MGTK_RELAY_CALL MGTK::SetPenMode, penXOR
|
||||
MGTK_RELAY_CALL MGTK::PaintRect, rect_D888
|
||||
MGTK_RELAY_CALL MGTK::PaintRect, select_volume_rect
|
||||
rts
|
||||
|
||||
L0CA9: .byte 0
|
||||
L0CAA: lda LD887
|
||||
bmi L0CB7
|
||||
jsr L0C20
|
||||
.endproc
|
||||
|
||||
;;; ============================================================
|
||||
|
||||
.proc L0CAA
|
||||
lda LD887
|
||||
bmi :+
|
||||
jsr hilight_volume_label
|
||||
copy #$FF, LD887
|
||||
L0CB7: rts
|
||||
: rts
|
||||
.endproc
|
||||
|
||||
;;; ============================================================
|
||||
|
||||
;; Called from desktop_main
|
||||
L0CB8: lda LD887
|
||||
.proc prompt_handle_key_left
|
||||
lda LD887
|
||||
bpl L0CC1
|
||||
lda #$00
|
||||
lda #0
|
||||
beq L0CCE
|
||||
L0CC1: clc
|
||||
adc #$04
|
||||
adc #4
|
||||
cmp LD890
|
||||
bcs L0CD4
|
||||
pha
|
||||
jsr L0CAA
|
||||
pla
|
||||
L0CCE: sta LD887
|
||||
jsr L0C20
|
||||
jsr hilight_volume_label
|
||||
L0CD4: return #$FF
|
||||
.endproc
|
||||
|
||||
;;; ============================================================
|
||||
|
||||
;; Called from desktop_main
|
||||
.proc prompt_handle_key_right
|
||||
lda LD887
|
||||
bpl L0CE6
|
||||
lda LD890
|
||||
|
@ -389,28 +415,38 @@ L0CD4: return #$FF
|
|||
jmp L0CF0
|
||||
|
||||
L0CE6: sec
|
||||
sbc #$04
|
||||
sbc #4
|
||||
bmi L0CF6
|
||||
pha
|
||||
jsr L0CAA
|
||||
pla
|
||||
L0CF0: sta LD887
|
||||
jsr L0C20
|
||||
jsr hilight_volume_label
|
||||
L0CF6: return #$FF
|
||||
.endproc
|
||||
|
||||
;;; ============================================================
|
||||
|
||||
;; Called from desktop_main
|
||||
.proc prompt_handle_key_down
|
||||
lda LD887
|
||||
clc
|
||||
adc #$01
|
||||
adc #1
|
||||
cmp LD890
|
||||
bcc L0D06
|
||||
lda #$00
|
||||
lda #0
|
||||
L0D06: pha
|
||||
jsr L0CAA
|
||||
pla
|
||||
sta LD887
|
||||
jsr L0C20
|
||||
jsr hilight_volume_label
|
||||
return #$FF
|
||||
.endproc
|
||||
|
||||
;;; ============================================================
|
||||
|
||||
;; Called from desktop_main
|
||||
.proc prompt_handle_key_up
|
||||
lda LD887
|
||||
bmi L0D1E
|
||||
sec
|
||||
|
@ -423,8 +459,11 @@ L0D23: pha
|
|||
jsr L0CAA
|
||||
pla
|
||||
sta LD887
|
||||
jsr L0C20
|
||||
jsr hilight_volume_label
|
||||
return #$FF
|
||||
.endproc
|
||||
|
||||
;;; ============================================================
|
||||
|
||||
L0D31: ldx DEVCNT
|
||||
inx
|
||||
|
@ -477,6 +516,8 @@ L0D8D: .byte 0
|
|||
|
||||
PAD_TO $E00
|
||||
|
||||
; This is (probably) a Disk II formatter routine
|
||||
|
||||
L0E00: php
|
||||
sei
|
||||
jsr L0E3A
|
||||
|
@ -1024,8 +1065,6 @@ L124A: .byte $00
|
|||
.proc MLI_RELAY
|
||||
sty call
|
||||
stax params
|
||||
php
|
||||
sei
|
||||
sta ALTZPOFF
|
||||
lda ROMIN2
|
||||
jsr MLI
|
||||
|
@ -1035,7 +1074,6 @@ params: .addr 0
|
|||
sta ALTZPON
|
||||
lda LCBANK1
|
||||
lda LCBANK1
|
||||
plp
|
||||
txa
|
||||
rts
|
||||
.endproc
|
||||
|
@ -1518,3 +1556,8 @@ L1A6D: lda on_line_params::unit_num
|
|||
PAD_TO $1C00
|
||||
|
||||
.endproc ; format_erase_overlay
|
||||
|
||||
format_erase_overlay_prompt_handle_key_left := format_erase_overlay::prompt_handle_key_left
|
||||
format_erase_overlay_prompt_handle_key_right := format_erase_overlay::prompt_handle_key_right
|
||||
format_erase_overlay_prompt_handle_key_down := format_erase_overlay::prompt_handle_key_down
|
||||
format_erase_overlay_prompt_handle_key_up := format_erase_overlay::prompt_handle_key_up
|
||||
|
|
184
desktop/ovl3.s
184
desktop/ovl3.s
|
@ -407,16 +407,16 @@ L9390: MGTK_RELAY_CALL MGTK::OpenWindow, winfo_entry_picker
|
|||
lda winfo_entry_picker
|
||||
jsr desktop_main::set_port_from_window_id
|
||||
MGTK_RELAY_CALL MGTK::SetPenMode, penXOR
|
||||
MGTK_RELAY_CALL MGTK::FrameRect, rect_D6D8
|
||||
MGTK_RELAY_CALL MGTK::FrameRect, rect_D6E0
|
||||
MGTK_RELAY_CALL MGTK::MoveTo, pos_D6E8
|
||||
MGTK_RELAY_CALL MGTK::LineTo, pos_D6EC
|
||||
MGTK_RELAY_CALL MGTK::MoveTo, pos_D6F0
|
||||
MGTK_RELAY_CALL MGTK::LineTo, pos_D6F4
|
||||
MGTK_RELAY_CALL MGTK::FrameRect, entry_picker_outer_rect
|
||||
MGTK_RELAY_CALL MGTK::FrameRect, entry_picker_inner_rect
|
||||
MGTK_RELAY_CALL MGTK::MoveTo, entry_picker_line1_start
|
||||
MGTK_RELAY_CALL MGTK::LineTo, entry_picker_line1_end
|
||||
MGTK_RELAY_CALL MGTK::MoveTo, entry_picker_line2_start
|
||||
MGTK_RELAY_CALL MGTK::LineTo, entry_picker_line2_end
|
||||
MGTK_RELAY_CALL MGTK::SetPenMode, pencopy
|
||||
MGTK_RELAY_CALL MGTK::SetPenMode, penXOR
|
||||
MGTK_RELAY_CALL MGTK::FrameRect, rect_D6F8
|
||||
MGTK_RELAY_CALL MGTK::FrameRect, rect_D700
|
||||
MGTK_RELAY_CALL MGTK::FrameRect, entry_picker_ok_rect
|
||||
MGTK_RELAY_CALL MGTK::FrameRect, entry_picker_cancel_rect
|
||||
jsr L94A9
|
||||
jsr L94BA
|
||||
lda L938E
|
||||
|
@ -435,70 +435,70 @@ L9423: addr_call L94F0, run_an_entry_label
|
|||
|
||||
L942B: stx $07
|
||||
sta $06
|
||||
lda dialog_label_pos
|
||||
lda dialog_label_pos::xcoord
|
||||
sta L94A8
|
||||
tya
|
||||
pha
|
||||
cmp #$10
|
||||
cmp #16 ; 3rd column (16-24)
|
||||
bcc L9441
|
||||
sec
|
||||
sbc #$10
|
||||
sbc #16
|
||||
jmp L9448
|
||||
|
||||
L9441: cmp #$08
|
||||
;; 8 rows
|
||||
L9441: cmp #8 ; 2nd column (8-15)
|
||||
bcc L9448
|
||||
sec
|
||||
sbc #$08
|
||||
L9448: ldx #$00
|
||||
stx L94A7
|
||||
asl a
|
||||
rol L94A7
|
||||
asl a
|
||||
rol L94A7
|
||||
asl a
|
||||
rol L94A7
|
||||
sbc #8
|
||||
|
||||
;; A has row
|
||||
L9448: ldx #0
|
||||
ldy #entry_picker_item_height
|
||||
jsr Multiply_16_8_16 ; A,X = A,X * Y
|
||||
clc
|
||||
adc #$20
|
||||
sta dialog_label_pos+2
|
||||
lda L94A7
|
||||
adc #0
|
||||
sta dialog_label_pos+3
|
||||
pla
|
||||
cmp #$08
|
||||
bcs L9471
|
||||
lda #$00
|
||||
tax
|
||||
beq L947F
|
||||
L9471: cmp #$10
|
||||
bcs L947B
|
||||
ldx #$00
|
||||
lda #$73
|
||||
bne L947F
|
||||
L947B: ldax #220
|
||||
L947F: clc
|
||||
adc #$0A
|
||||
sta dialog_label_pos
|
||||
adc #32
|
||||
sta dialog_label_pos::ycoord
|
||||
txa
|
||||
adc #$00
|
||||
sta dialog_label_pos+1
|
||||
adc #0
|
||||
sta dialog_label_pos::ycoord+1
|
||||
pla
|
||||
|
||||
cmp #8
|
||||
bcs :+
|
||||
lda #0 ; col 1
|
||||
tax
|
||||
beq L947F ; always
|
||||
|
||||
: cmp #16
|
||||
bcs :+
|
||||
ldx #0
|
||||
lda #115 ; col 2
|
||||
bne L947F ; always
|
||||
|
||||
: ldax #220 ; col 3
|
||||
|
||||
L947F: clc
|
||||
adc #10
|
||||
sta dialog_label_pos::xcoord
|
||||
txa
|
||||
adc #0
|
||||
sta dialog_label_pos::xcoord+1
|
||||
MGTK_RELAY_CALL MGTK::MoveTo, dialog_label_pos
|
||||
lda $06
|
||||
ldx $07
|
||||
ldax $06
|
||||
jsr L94CB
|
||||
lda L94A8
|
||||
sta dialog_label_pos
|
||||
sta dialog_label_pos::xcoord
|
||||
lda #0
|
||||
sta dialog_label_pos+1
|
||||
sta dialog_label_pos::xcoord+1
|
||||
rts
|
||||
|
||||
L94A7: .byte 0
|
||||
L94A8: .byte 0
|
||||
|
||||
L94A9: MGTK_RELAY_CALL MGTK::MoveTo, pos_D708
|
||||
L94A9: MGTK_RELAY_CALL MGTK::MoveTo, entry_picker_ok_pos
|
||||
addr_call desktop_main::draw_text1, desktop_aux::str_ok_label
|
||||
rts
|
||||
|
||||
L94BA: MGTK_RELAY_CALL MGTK::MoveTo, pos_D70C
|
||||
L94BA: MGTK_RELAY_CALL MGTK::MoveTo, entry_picker_cancel_pos
|
||||
addr_call desktop_main::draw_text1, desktop_aux::str_cancel_label
|
||||
rts
|
||||
|
||||
|
@ -547,7 +547,7 @@ L953F: MGTK_RELAY_CALL MGTK::GetEvent, event_params
|
|||
sta screentowindow_window_id
|
||||
MGTK_RELAY_CALL MGTK::ScreenToWindow, screentowindow_params
|
||||
MGTK_RELAY_CALL MGTK::MoveTo, screentowindow_windowx
|
||||
MGTK_RELAY_CALL MGTK::InRect, rect_D6F8
|
||||
MGTK_RELAY_CALL MGTK::InRect, entry_picker_ok_rect
|
||||
cmp #MGTK::inrect_inside
|
||||
beq L957C
|
||||
lda L95BF
|
||||
|
@ -559,7 +559,7 @@ L957C: lda L95BF
|
|||
jmp L953F
|
||||
|
||||
L9584: MGTK_RELAY_CALL MGTK::SetPenMode, penXOR
|
||||
MGTK_RELAY_CALL MGTK::PaintRect, rect_D6F8
|
||||
MGTK_RELAY_CALL MGTK::PaintRect, entry_picker_ok_rect
|
||||
lda L95BF
|
||||
clc
|
||||
adc #$80
|
||||
|
@ -571,7 +571,7 @@ L95A2: lda L95BF
|
|||
return #$FF
|
||||
|
||||
L95AA: MGTK_RELAY_CALL MGTK::SetPenMode, penXOR
|
||||
MGTK_RELAY_CALL MGTK::PaintRect, rect_D6F8
|
||||
MGTK_RELAY_CALL MGTK::PaintRect, entry_picker_ok_rect
|
||||
return #$00
|
||||
|
||||
L95BF: .byte 0
|
||||
|
@ -585,7 +585,7 @@ L95C5: MGTK_RELAY_CALL MGTK::GetEvent, event_params
|
|||
sta screentowindow_window_id
|
||||
MGTK_RELAY_CALL MGTK::ScreenToWindow, screentowindow_params
|
||||
MGTK_RELAY_CALL MGTK::MoveTo, screentowindow_windowx
|
||||
MGTK_RELAY_CALL MGTK::InRect, rect_D700
|
||||
MGTK_RELAY_CALL MGTK::InRect, entry_picker_cancel_rect
|
||||
cmp #MGTK::inrect_inside
|
||||
beq L9602
|
||||
lda L9645
|
||||
|
@ -597,7 +597,7 @@ L9602: lda L9645
|
|||
jmp L95C5
|
||||
|
||||
L960A: MGTK_RELAY_CALL MGTK::SetPenMode, penXOR
|
||||
MGTK_RELAY_CALL MGTK::PaintRect, rect_D700
|
||||
MGTK_RELAY_CALL MGTK::PaintRect, entry_picker_cancel_rect
|
||||
lda L9645
|
||||
clc
|
||||
adc #$80
|
||||
|
@ -609,7 +609,7 @@ L9628: lda L9645
|
|||
return #$FF
|
||||
|
||||
L9630: MGTK_RELAY_CALL MGTK::SetPenMode, penXOR
|
||||
MGTK_RELAY_CALL MGTK::PaintRect, rect_D700
|
||||
MGTK_RELAY_CALL MGTK::PaintRect, entry_picker_cancel_rect
|
||||
return #$01
|
||||
|
||||
L9645: .byte 0
|
||||
|
@ -643,21 +643,21 @@ L9683: lda winfo_entry_picker
|
|||
sta screentowindow_window_id
|
||||
MGTK_RELAY_CALL MGTK::ScreenToWindow, screentowindow_params
|
||||
MGTK_RELAY_CALL MGTK::MoveTo, screentowindow_windowx
|
||||
MGTK_RELAY_CALL MGTK::InRect, rect_D6F8
|
||||
MGTK_RELAY_CALL MGTK::InRect, entry_picker_ok_rect
|
||||
cmp #MGTK::inrect_inside
|
||||
bne L96C8
|
||||
MGTK_RELAY_CALL MGTK::SetPenMode, penXOR
|
||||
MGTK_RELAY_CALL MGTK::PaintRect, rect_D6F8
|
||||
MGTK_RELAY_CALL MGTK::PaintRect, entry_picker_ok_rect
|
||||
jsr L953A
|
||||
bmi L96C7
|
||||
lda #$00
|
||||
L96C7: rts
|
||||
|
||||
L96C8: MGTK_RELAY_CALL MGTK::InRect, rect_D700
|
||||
L96C8: MGTK_RELAY_CALL MGTK::InRect, entry_picker_cancel_rect
|
||||
cmp #MGTK::inrect_inside
|
||||
bne L96EF
|
||||
MGTK_RELAY_CALL MGTK::SetPenMode, penXOR
|
||||
MGTK_RELAY_CALL MGTK::PaintRect, rect_D700
|
||||
MGTK_RELAY_CALL MGTK::PaintRect, entry_picker_cancel_rect
|
||||
jsr L95C0
|
||||
bmi L96EE
|
||||
lda #$01
|
||||
|
@ -668,33 +668,36 @@ L96EF: sub16 screentowindow_windowx, #10, screentowindow_windowx
|
|||
bpl L9716
|
||||
return #$FF
|
||||
|
||||
;; Determine column
|
||||
L9716: cmp16 screentowindow_windowx, #110
|
||||
bmi L9736
|
||||
cmp16 screentowindow_windowx, #220
|
||||
bmi L9732
|
||||
lda #$02
|
||||
lda #2
|
||||
bne L9738
|
||||
L9732: lda #$01
|
||||
L9732: lda #1
|
||||
bne L9738
|
||||
L9736: lda #$00
|
||||
L9736: lda #0
|
||||
|
||||
;; Determine row
|
||||
L9738: pha
|
||||
lsr16 screentowindow_windowy
|
||||
lsr16 screentowindow_windowy
|
||||
lsr16 screentowindow_windowy
|
||||
lda screentowindow_windowy
|
||||
ldax screentowindow_windowy
|
||||
ldy #entry_picker_item_height
|
||||
jsr Divide_16_8_16
|
||||
stax screentowindow_windowy
|
||||
cmp #8
|
||||
bcc L9756
|
||||
bcc :+
|
||||
pla
|
||||
return #$FF
|
||||
|
||||
L9756: pla
|
||||
: pla
|
||||
asl a
|
||||
asl a
|
||||
asl a
|
||||
clc
|
||||
adc screentowindow_windowy
|
||||
sta L979C
|
||||
cmp #$08
|
||||
cmp #8
|
||||
bcs L9782
|
||||
cmp L938B
|
||||
bcs L9790
|
||||
|
@ -709,11 +712,11 @@ L977E: jsr desktop_main::detect_double_click
|
|||
rts
|
||||
|
||||
L9782: sec
|
||||
sbc #$08
|
||||
sbc #8
|
||||
cmp L938C
|
||||
bcs L9790
|
||||
clc
|
||||
adc #$08
|
||||
adc #8
|
||||
jmp L976A
|
||||
|
||||
L9790: lda L938D
|
||||
|
@ -732,17 +735,17 @@ L97A0: pha
|
|||
lsr a
|
||||
tax
|
||||
beq L97B6
|
||||
cmp #$01
|
||||
cmp #1
|
||||
bne L97B2
|
||||
addr_jump L97B6, $0069
|
||||
|
||||
L97B2: ldax #210
|
||||
L97B6: clc
|
||||
adc #9
|
||||
sta rect_D877
|
||||
sta entry_picker_item_rect::x1
|
||||
txa
|
||||
adc #0
|
||||
sta rect_D877+1
|
||||
sta entry_picker_item_rect::x1+1
|
||||
pla
|
||||
cmp #8
|
||||
bcc L97D4
|
||||
|
@ -754,19 +757,19 @@ L97B6: clc
|
|||
|
||||
L97D1: sec
|
||||
sbc #16
|
||||
L97D4: asl a
|
||||
asl a
|
||||
asl a
|
||||
L97D4: ldx #0
|
||||
ldy #entry_picker_item_height
|
||||
jsr Multiply_16_8_16
|
||||
clc
|
||||
adc #24
|
||||
sta rect_D877+2
|
||||
lda #0
|
||||
sta entry_picker_item_rect::y1
|
||||
txa
|
||||
adc #0
|
||||
sta rect_D877+3
|
||||
add16 rect_D877, #106, rect_D877+4
|
||||
add16 rect_D877+2, #7, rect_D877+6
|
||||
sta entry_picker_item_rect::y1+1
|
||||
add16 entry_picker_item_rect::x1, #106, entry_picker_item_rect::x2
|
||||
add16 entry_picker_item_rect::y1, #entry_picker_item_height-1, entry_picker_item_rect::y2
|
||||
MGTK_RELAY_CALL MGTK::SetPenMode, penXOR
|
||||
MGTK_RELAY_CALL MGTK::PaintRect, rect_D877
|
||||
MGTK_RELAY_CALL MGTK::PaintRect, entry_picker_item_rect
|
||||
MGTK_RELAY_CALL MGTK::SetPenMode, pencopy
|
||||
rts
|
||||
|
||||
|
@ -805,15 +808,15 @@ L9822: lda event_modifiers
|
|||
: return #$FF
|
||||
|
||||
L985E: MGTK_RELAY_CALL MGTK::SetPenMode, penXOR
|
||||
MGTK_RELAY_CALL MGTK::PaintRect, rect_D6F8
|
||||
MGTK_RELAY_CALL MGTK::PaintRect, entry_picker_ok_rect
|
||||
MGTK_RELAY_CALL MGTK::SetPenMode, penXOR
|
||||
MGTK_RELAY_CALL MGTK::PaintRect, rect_D6F8
|
||||
MGTK_RELAY_CALL MGTK::PaintRect, entry_picker_ok_rect
|
||||
return #0
|
||||
|
||||
L9885: MGTK_RELAY_CALL MGTK::SetPenMode, penXOR
|
||||
MGTK_RELAY_CALL MGTK::PaintRect, rect_D700
|
||||
MGTK_RELAY_CALL MGTK::PaintRect, entry_picker_cancel_rect
|
||||
MGTK_RELAY_CALL MGTK::SetPenMode, penXOR
|
||||
MGTK_RELAY_CALL MGTK::PaintRect, rect_D700
|
||||
MGTK_RELAY_CALL MGTK::PaintRect, entry_picker_cancel_rect
|
||||
return #1
|
||||
|
||||
L98AC: lda L938B
|
||||
|
@ -987,7 +990,7 @@ L99ED: .byte 0
|
|||
.byte 0
|
||||
.byte 0
|
||||
L99F5: MGTK_RELAY_CALL MGTK::SetPenMode, pencopy
|
||||
MGTK_RELAY_CALL MGTK::PaintRect, rect_D87F
|
||||
MGTK_RELAY_CALL MGTK::PaintRect, entry_picker_all_items_rect
|
||||
rts
|
||||
|
||||
rts
|
||||
|
@ -1421,8 +1424,6 @@ L9DC8: .byte 0
|
|||
.proc MLI_RELAY
|
||||
sty call
|
||||
stax params
|
||||
php
|
||||
sei
|
||||
sta ALTZPOFF
|
||||
sta ROMIN2
|
||||
jsr MLI
|
||||
|
@ -1432,7 +1433,6 @@ params: .addr 0
|
|||
tax
|
||||
lda LCBANK1
|
||||
lda LCBANK1
|
||||
plp
|
||||
txa
|
||||
rts
|
||||
.endproc
|
||||
|
|
|
@ -43,7 +43,7 @@ routine_table: .addr $7000, $7000, $7000
|
|||
sta L5104
|
||||
sta L5103
|
||||
sta L5105
|
||||
lda #prompt_insertion_point_blink_count
|
||||
lda DeskTop::Settings::ip_blink_speed
|
||||
sta prompt_ip_counter
|
||||
lda #$FF
|
||||
sta LD920
|
||||
|
@ -76,7 +76,7 @@ L5106: bit LD8EC
|
|||
dec prompt_ip_counter
|
||||
bne :+
|
||||
jsr jt_blink_ip
|
||||
copy #prompt_insertion_point_blink_count, prompt_ip_counter
|
||||
copy DeskTop::Settings::ip_blink_speed, prompt_ip_counter
|
||||
|
||||
: MGTK_RELAY_CALL MGTK::GetEvent, event_params
|
||||
lda event_kind
|
||||
|
@ -88,7 +88,11 @@ L5106: bit LD8EC
|
|||
: cmp #MGTK::EventKind::key_down
|
||||
bne :+
|
||||
jsr L59B9
|
||||
: MGTK_RELAY_CALL MGTK::FindWindow, findwindow_params
|
||||
jmp L5106
|
||||
|
||||
: jsr desktop_main::check_mouse_moved
|
||||
bcc L5106
|
||||
MGTK_RELAY_CALL MGTK::FindWindow, findwindow_params
|
||||
lda findwindow_which_area
|
||||
bne :+
|
||||
jmp L5106
|
||||
|
@ -844,8 +848,6 @@ L5993: .byte 0
|
|||
.proc MLI_RELAY
|
||||
sty call
|
||||
stax params
|
||||
php
|
||||
sei
|
||||
sta ALTZPOFF
|
||||
lda ROMIN2
|
||||
jsr MLI
|
||||
|
@ -855,7 +857,6 @@ params: .addr 0
|
|||
tax
|
||||
lda LCBANK1
|
||||
lda LCBANK1
|
||||
plp
|
||||
txa
|
||||
rts
|
||||
.endproc
|
||||
|
|
|
@ -131,7 +131,7 @@ start: lda ptr
|
|||
|
||||
* Macro use is **encouraged**.
|
||||
* Use local macros to avoid repeating code.
|
||||
* Use `macros.inc` and extend as needed to capture patterns such as
|
||||
* Use `inc/macros.inc` and extend as needed to capture patterns such as
|
||||
16-bit operations
|
||||
* API calls such as ProDOS MLI calls should be done with macros
|
||||
|
|
@ -7,17 +7,24 @@ with the keyboard.
|
|||
|
||||
▲ = Solid Apple
|
||||
|
||||
## Mouse Keys
|
||||
|
||||
* To enter Mouse Keys mode, hold down △ and then press and release ▲.
|
||||
* While holding △ down, you can you can navigate the cursor with the Arrow keys, and click using ▲.
|
||||
* To exit Mouse Keys mode, release △.
|
||||
|
||||
## Windows
|
||||
|
||||
* △-W - Activate window; Left/Right Arrows to navigate
|
||||
* △-G - Resize window; Arrows to resize, Return to finish
|
||||
* △-M - Move window; Arrows to move, Return to finish
|
||||
* △-X - Scroll contents; Arrows to scroll, Esc or Return when done
|
||||
* △-` or △-Tab - Cycle through open windows
|
||||
|
||||
## Icons
|
||||
|
||||
* △-H - Highlight icon; Left/Right Arrows to navigate, Esc or Return when done
|
||||
* △-A - Select all icons
|
||||
* △-Delete - Delete selected icons (or eject volume)
|
||||
|
||||
## Menus
|
||||
|
||||
|
@ -28,25 +35,24 @@ with the keyboard.
|
|||
__File Menu__
|
||||
* △-F - New Folder
|
||||
* △-O - Open
|
||||
* △-C - Close
|
||||
* △-B - Close All
|
||||
* △-W - Close
|
||||
* △-A - Select All
|
||||
* △-I - Get Info
|
||||
* △-Y - Copy a File
|
||||
* △-D - Delete a File
|
||||
* △-E - Eject
|
||||
* △-Q - Quit
|
||||
|
||||
__View Menu__
|
||||
* △-J - View By Icon
|
||||
* △-J - View As Icons
|
||||
* △-N - View By Name
|
||||
* △-T - View By Date
|
||||
* △-K - View By Size
|
||||
* △-L - View By Type
|
||||
|
||||
__Special Menu__
|
||||
* △-E - Eject Disk
|
||||
* △-S - Format a Disk
|
||||
* △-Z - Erase a Disk
|
||||
* △-I - Get Info
|
||||
|
||||
__Selector Menu__
|
||||
* △-0 - Run Selector
|
||||
|
|
8
docs/Known_Issues.md
Normal file
8
docs/Known_Issues.md
Normal file
|
@ -0,0 +1,8 @@
|
|||
|
||||
# ProDOS Related
|
||||
|
||||
* Certain features are known to fail with versions of ProDOS before 1.1. Booting with a newer version is recommended.
|
||||
|
||||
# Hardware Specific
|
||||
|
||||
* The M0100 mouse is known to have compatibility issues with the //c and IIc+ where the mouse may not be detected, or one axis may stop being measured. This is due to a hardware problem affecting only some mice with that model number. Mice with models starting with A2 should function correctly. (This problem is not specific to Apple II DeskTop.) [More details](https://mirrors.apple2.org.za/ground.icaen.uiowa.edu/MiscInfo/Hardware/mouse.iic)
|
|
@ -2,15 +2,26 @@
|
|||
|
||||
▲ = Solid Apple
|
||||
|
||||
|
||||
# Undiscoverable Features
|
||||
|
||||
* Hold down **△** when launching `DESKTOP.SYSTEM` to prevent DeskTop from being copied to a RAM card.
|
||||
* Desk Accessory files with high bit set in the aux type field will not appear in the menu.
|
||||
* You can't run a Binary file by double-clicking, but you can run it with the **△-O** shortcut or holding down **△** or **▲** key while selecting **File > Open**.
|
||||
* When dragging a selection of files to a destination on the same volume, the files will be moved by default. Hold down **△** before letting go of the mouse button to force a copy instead. Files dragged to a different volume will always be copied.
|
||||
* Hold down **△** when launching `DESKTOP.SYSTEM` to prevent DeskTop from being copied to a RAM card. (A tip is now shown for this while copying.)
|
||||
* Desk Accessory files with high bit set in the aux type field ($8640) will not appear in the Apple menu.
|
||||
* You can't run a Binary file by double-clicking, but you can run it with the **△O** shortcut or holding down **△** or **▲** while selecting **File > Open**.
|
||||
* The Sort Directory desk accessory has two modes:
|
||||
* If any files are selected, these are moved to the start of the directory listing, in selection order; other files appear after, order unchanged.
|
||||
* If no files are selected, all files are sorted by type: DIR, then TXT, then SYS, then others in descending numeric order.
|
||||
* If no files are selected, all files are sorted by type: DIR, then TXT, then SYS, then others in descending (numeric) order.
|
||||
* Hold down **△** or **▲** when opening a folder using double-click or **File > Open** to close the parent folder.
|
||||
* Note: Does not work with the **△O** shortcut.
|
||||
* The Control Panel desk accessory writes settings back to the `DESKTOP2` file when it is closed. If it is not present, or is locked, the settings will not be saved for the next session.
|
||||
|
||||
|
||||
# File Types
|
||||
|
||||
* Binary files (type $06) with aux type $2000 or $4000 are treated as Graphics files (HR/DHR)
|
||||
* Binary files (type $06) with aux type $5800 are treated as Graphics files (Minipix/Print Shop)
|
||||
* Desk Accessory files have type $F1, and auxtype $640 or $8640
|
||||
|
||||
|
||||
# Secrets and Mysteries
|
||||
|
||||
|
|
|
@ -29,6 +29,8 @@ SHADOW := $C035 ; IIgs - inhibit shadowing
|
|||
AN3_ON := $C05F ; AppleColor Adapter Card / Le Chat Mauve
|
||||
AN3_OFF := $C05E
|
||||
|
||||
BUTN2 := $C063
|
||||
|
||||
RAMWORKS_BANK := $C071 ; RAMWorks bank selection ???
|
||||
|
||||
HR1_ON := $C0B3
|
||||
|
@ -45,6 +47,7 @@ HR3_OFF := $C0B6
|
|||
|
||||
;;; Monitor
|
||||
INIT := $FB2F
|
||||
SETPWRC := $FB6F
|
||||
VERSION := $FBB3
|
||||
BELL1 := $FBDD
|
||||
VTAB := $FC22
|
||||
|
@ -52,6 +55,7 @@ VTABZ := $FC24
|
|||
HOME := $FC58
|
||||
PRBYTE := $FDDA
|
||||
COUT := $FDED
|
||||
MOVE := $FE2C
|
||||
SETKBD := $FE89
|
||||
SETVID := $FE93
|
||||
MONZ := $FF69
|
||||
|
@ -61,6 +65,7 @@ F8VERSION := $06
|
|||
;;; Miscellaneous
|
||||
IRQ_VECTOR := $3FE
|
||||
|
||||
ID_BYTE_FB1E := $FB1E ; $AC = Laser 128
|
||||
ID_BYTE_FBB3 := $FBB3 ; $06 = IIe or later
|
||||
ID_BYTE_FBC0 := $FBC0 ; $EA = IIe, $E0 = IIe enh/IIgs, $00 = IIc/IIc+
|
||||
ID_BYTE_FBBF := $FBBF ; IIc ROM version ($05 = IIc+)
|
||||
|
@ -75,6 +80,7 @@ ID_BYTE_FE1F := $FE1F ; RTS ($60) on pre-IIgs, clears carry on IIgs
|
|||
|
||||
LINNUM := $50 ; Line number, unsigned word
|
||||
ERRFLG := $D8
|
||||
CHRGET := $B1 ; Routine called by ROM
|
||||
TXTPTR := $B8
|
||||
FAC := $9D
|
||||
SHIFT_SIGN_EXT := $A4 ; Zero before using FP ops
|
||||
|
@ -164,6 +170,9 @@ HIRESOFF := $C057
|
|||
DHIRESON := $C05E
|
||||
DHIRESOFF := $C05F
|
||||
|
||||
PADDL0 := $C064
|
||||
PTRIG := $C070
|
||||
|
||||
;;; Routines
|
||||
SLOT3ENTRY := $C300
|
||||
AUXMOVE := $C311 ; carry set main>aux, carry clear aux>main
|
||||
|
@ -180,6 +189,7 @@ DESTINATIONHI := $43
|
|||
;;; Other Locations
|
||||
XFERSTARTLO := $03ED
|
||||
XFERSTARTHI := $03EE
|
||||
RESETVEC := $03F2
|
||||
|
||||
|
||||
;;; ============================================================
|
||||
|
|
|
@ -108,14 +108,6 @@ end:
|
|||
|
||||
;;; ============================================================
|
||||
;;; Calls with two parameters (call # in y, address in A,X)
|
||||
;;; (various output orders to match original binary)
|
||||
|
||||
.macro axy_call target, yparam, addr
|
||||
lda #<addr
|
||||
ldx #>addr
|
||||
ldy #yparam
|
||||
jsr target
|
||||
.endmacro
|
||||
|
||||
.macro yax_call target, yparam, addr
|
||||
ldy #yparam
|
||||
|
@ -124,17 +116,10 @@ end:
|
|||
jsr target
|
||||
.endmacro
|
||||
|
||||
.macro yxa_call target, yparam, addr
|
||||
.macro yax_jump target, yparam, addr
|
||||
ldy #yparam
|
||||
ldx #>addr
|
||||
lda #<addr
|
||||
jsr target
|
||||
.endmacro
|
||||
|
||||
.macro yxa_jump target, yparam, addr
|
||||
ldy #yparam
|
||||
ldx #>addr
|
||||
lda #<addr
|
||||
jmp target
|
||||
.endmacro
|
||||
|
||||
|
@ -611,6 +596,10 @@ skip:
|
|||
skip: dec arg
|
||||
.endmacro
|
||||
|
||||
;;; ============================================================
|
||||
;;; Param Blocks
|
||||
;;; ============================================================
|
||||
|
||||
;;; Helper macros to set up a scoped block of parameters at a pre-determined
|
||||
;;; address.
|
||||
;;;
|
||||
|
@ -679,6 +668,48 @@ loop: lda src,x
|
|||
.endmacro
|
||||
|
||||
|
||||
;;; ============================================================
|
||||
;;; Placed Procedures
|
||||
;;; ============================================================
|
||||
;;; Usage:
|
||||
;;; PROC_AT relocated_proc, $300
|
||||
;;; .assert * = $300, ...
|
||||
;;; ...
|
||||
;;; END_PROC_AT
|
||||
;;; .assert * = back to normal
|
||||
|
||||
.macro PROC_AT name, addr
|
||||
.proc name
|
||||
saved_org := *
|
||||
.org addr
|
||||
.proc __inner__
|
||||
.endmacro
|
||||
|
||||
.macro END_PROC_AT
|
||||
.endproc ; __inner__
|
||||
.org saved_org + .sizeof(__inner__)
|
||||
.endproc
|
||||
.endmacro
|
||||
|
||||
|
||||
;;; ============================================================
|
||||
;;; Temporary org change, for relocated routines
|
||||
;;; ============================================================
|
||||
|
||||
__pushorg_depth__ .set 0
|
||||
|
||||
.macro pushorg addr
|
||||
::__pushorg_depth__ .set ::__pushorg_depth__ + 1
|
||||
.ident(.sprintf("__pushorg_saved__%d", ::__pushorg_depth__)) := *
|
||||
.org addr
|
||||
.ident(.sprintf("__pushorg_start__%d", ::__pushorg_depth__)) := *
|
||||
.endmacro
|
||||
|
||||
.macro poporg
|
||||
.org .ident(.sprintf("__pushorg_saved__%d", ::__pushorg_depth__)) + (* - .ident(.sprintf("__pushorg_start__%d", ::__pushorg_depth__)))
|
||||
::__pushorg_depth__ .set ::__pushorg_depth__ - 1
|
||||
.endmacro
|
||||
|
||||
;;; ============================================================
|
||||
;;; Flow Control
|
||||
;;; ============================================================
|
|
@ -94,6 +94,7 @@ FT_TYPELESS = $00
|
|||
FT_BAD = $01
|
||||
FT_TEXT = $04 ; ASCII Text File *
|
||||
FT_BINARY = $06 ; Generic Binary File *
|
||||
FT_FONT = $07 ; Font File
|
||||
FT_GRAPHICS = $08 ; Graphics File
|
||||
FT_DIRECTORY = $0F ; Directory *
|
||||
FT_ADB = $19 ; AppleWorks Database *
|
||||
|
|
|
@ -342,6 +342,13 @@ Parameters:
|
|||
|
||||
# Mouse Graphics
|
||||
|
||||
## Mouse Keys
|
||||
|
||||
* To enter Mouse Keys mode, hold down the Open-Apple key and then press and release the Solid-Apple key.
|
||||
* While holding the Open-Apple key down, you can you can navigate the cursor with the Arrow keys, and click using the Solid-Apple key.
|
||||
* To exit Mouse Keys mode, release the Open-Apple key.
|
||||
|
||||
|
||||
## Concepts
|
||||
|
||||
### Cursor
|
||||
|
@ -740,7 +747,7 @@ Parameters:
|
|||
.addr port address of GrafPort to populate
|
||||
```
|
||||
|
||||
Returns `error_window_obscured` if the content area of the window is completely offscreen and drawing should be skipped. (The port rect will be invalid.)
|
||||
Returns `Error::window_obscured` if the content area of the window is completely offscreen and drawing should be skipped. (The port rect will be invalid.)
|
||||
|
||||
|
||||
#### SetWinPort ($3D)
|
||||
|
@ -902,6 +909,35 @@ Parameters:
|
|||
.byte activate 0=deactivate, 1=activate
|
||||
```
|
||||
|
||||
|
||||
#### GetDeskPat ($4F)
|
||||
Get address of desktop pattern.
|
||||
|
||||
Parameters:
|
||||
```
|
||||
.addr pattern (out) 8x8 pixel pattern
|
||||
```
|
||||
|
||||
#### SetDeskPat ($50)
|
||||
Set new desktop pattern. Note that this does NOT redraw anything.
|
||||
Applications can show/hide a full-screen window to force a redraw.
|
||||
|
||||
Parameters:
|
||||
```
|
||||
.res 8 pattern 8x8 pixel pattern
|
||||
```
|
||||
|
||||
#### DrawMenu ($51)
|
||||
Redraws the current menu bar. Useful after full-screen operations.
|
||||
Note that hilite state of menu bar items is not restored; this must
|
||||
be done by manual calls to `HiliteMenu`
|
||||
|
||||
Parameters:
|
||||
```
|
||||
.res 8 pattern 8x8 pixel pattern
|
||||
```
|
||||
|
||||
|
||||
# Creating Applications and DeskTop Desk Accessories
|
||||
|
||||
### Application Use
|
||||
|
@ -945,7 +981,7 @@ _Notes specific to DeskTop Desk Accessories (DA) are included where usage differ
|
|||
#### Redraw window
|
||||
|
||||
* `GetWinPort` - populate a local GrafPort with an appropriately clipped port
|
||||
* if `error_window_obscured` is returned, abort these steps (port will be invalid)
|
||||
* if `Error::window_obscured` is returned, abort these steps (port will be invalid)
|
||||
* `SetPort` - make it current
|
||||
* optional: `HideCursor` - if multiple drawing calls will be made
|
||||
* ... draw ...
|
||||
|
@ -988,7 +1024,7 @@ _DA specific: Use the following steps instead:_
|
|||
* If not `moved` - done
|
||||
* Call `JUMP_TABLE_REDRAW_ALL` so DeskTop can redraw its windows
|
||||
* [Redraw](#redraw-window) window content
|
||||
* Call `DESKTOP_REDRAW_ICONS` so DeskTop can redraw the desktop (volume) icons
|
||||
* Call `IconTK::REDRAW_ICONS` so DeskTop can redraw the desktop (volume) icons
|
||||
|
||||
|
||||
#### Handle Window Close
|
||||
|
@ -1026,7 +1062,7 @@ _DA specific:_
|
|||
|
||||
In addition to the above steps:
|
||||
* Call `JUMP_TABLE_REDRAW_ALL` _before_ redrawing the DA window.
|
||||
* Call `DESKTOP_REDRAW_ICONS` _after_ redrawing the DA window.
|
||||
* Call `IconTK::REDRAW_ICONS` _after_ redrawing the DA window.
|
||||
|
||||
|
||||
#### Handle Update Events
|
7
mgtk/README.md
Normal file
7
mgtk/README.md
Normal file
|
@ -0,0 +1,7 @@
|
|||
# MouseGraphics ToolKit
|
||||
|
||||
* `mgtk.inc` - header file to include
|
||||
|
||||
* `mgtk.s` - toolkit source - build as part of application
|
||||
|
||||
* `MGTK.md` - ToolKit documentation
|
|
@ -45,20 +45,20 @@ MLI := $4000
|
|||
|
||||
.struct GrafPort
|
||||
;; MapInfo
|
||||
viewloc .tag Point
|
||||
mapbits .addr
|
||||
mapwidth .byte
|
||||
reserved .byte
|
||||
maprect .tag Rect
|
||||
viewloc .tag Point ; 0
|
||||
mapbits .addr ; 4
|
||||
mapwidth .byte ; 6
|
||||
reserved .byte ; 7
|
||||
maprect .tag Rect ; 8
|
||||
|
||||
pattern .tag Pattern
|
||||
colormasks .byte 2 ; colormask_and, colormask_or
|
||||
penloc .tag Point
|
||||
penwidth .byte ; horizontal pen thickness
|
||||
penheight .byte ; vertical pen thickness
|
||||
penmode .byte
|
||||
textback .byte ; text background
|
||||
textfont .addr
|
||||
pattern .tag Pattern ; 16
|
||||
colormasks .byte 2 ; 24 colormask_and, colormask_or
|
||||
penloc .tag Point ; 26
|
||||
penwidth .byte ; 30 horizontal pen thickness
|
||||
penheight .byte ; 31 vertical pen thickness
|
||||
penmode .byte ; 32
|
||||
textback .byte ; 33 text background
|
||||
textfont .addr ; 34
|
||||
.endstruct
|
||||
|
||||
;;; PolyList record:
|
||||
|
@ -376,10 +376,10 @@ SetMark = $37
|
|||
|
||||
.struct Winfo
|
||||
window_id .byte
|
||||
options .byte ; option_*
|
||||
options .byte ; Option::*
|
||||
title .addr
|
||||
hscroll .byte ; scroll_option_*
|
||||
vscroll .byte ; scroll_option_*
|
||||
hscroll .byte ; Scroll::option_*
|
||||
vscroll .byte ; Scroll::option_*
|
||||
hthumbmax .byte
|
||||
hthumbpos .byte
|
||||
vthumbmax .byte
|
||||
|
@ -490,12 +490,25 @@ ActivateCtl = $4C ; Activate/deactivate scroll bar
|
|||
;;; .byte which_ctl ctl_*_scroll_bar
|
||||
;;; .byte activate 0=deactivate, 1=activate
|
||||
|
||||
;;; $4D ???
|
||||
;;; --------------------------------------------------
|
||||
;;; Extra Calls
|
||||
|
||||
BitBlt = $4D
|
||||
;;; (input length: 16 bytes)
|
||||
|
||||
;;; $4E ???
|
||||
SetMenuSelection = $4E
|
||||
;;; (input length: 2 bytes)
|
||||
|
||||
GetDeskPat = $4F
|
||||
;;; .addr pattern (out) Address of desktop pattern
|
||||
|
||||
SetDeskPat = $50
|
||||
;;; .res 8 pattern 8x8 pixel pattern to use for desktop
|
||||
|
||||
DrawMenu = $51 ; Redraw menu bar
|
||||
;;; (no parameters)
|
||||
|
||||
|
||||
;;; ============================================================
|
||||
;;; Graphics Primitives Constants
|
||||
|
|
@ -3,9 +3,8 @@
|
|||
.include "apple2.inc"
|
||||
.include "../inc/apple2.inc"
|
||||
.include "../inc/prodos.inc"
|
||||
.include "../mgtk.inc"
|
||||
.include "../desktop.inc"
|
||||
.include "../macros.inc"
|
||||
.include "mgtk.inc"
|
||||
.include "../inc/macros.inc"
|
||||
|
||||
;;; ============================================================
|
||||
;;; MouseGraphics ToolKit
|
||||
|
@ -376,6 +375,9 @@ jump_table:
|
|||
;; Extra Calls
|
||||
.addr BitBltImpl ; $4D BitBlt
|
||||
.addr SetMenuSelectionImpl; $4E SetMenuSelection
|
||||
.addr GetDeskPatImpl ; $4F GetDeskPat
|
||||
.addr SetDeskPatImpl ; $50 SetDeskPat
|
||||
.addr DrawMenuImpl ; $51 DrawMenu
|
||||
|
||||
;; Entry point param lengths
|
||||
;; (length, ZP destination, hide cursor flag)
|
||||
|
@ -493,6 +495,9 @@ param_lengths:
|
|||
;; Extra Calls
|
||||
PARAM_DEFN 16, $8A, 0 ; $4D BitBlt
|
||||
PARAM_DEFN 2, $82, 0 ; $4E SetMenuSelection
|
||||
PARAM_DEFN 0, $00, 0 ; $4F GetDeskPat
|
||||
PARAM_DEFN 0, $00, 0 ; $50 SetDeskPat
|
||||
PARAM_DEFN 0, $00, 0 ; $51 DrawMenu
|
||||
|
||||
;;; ============================================================
|
||||
;;; Pre-Shift Tables
|
||||
|
@ -4939,6 +4944,7 @@ bottom: .word screen_height-1
|
|||
|
||||
.byte $00,$00,$00,$00,$00,$00,$00,$00
|
||||
|
||||
desktop_pattern:
|
||||
checkerboard_pattern:
|
||||
.byte %01010101
|
||||
.byte %10101010
|
||||
|
@ -5635,6 +5641,7 @@ need_savebehind:
|
|||
sta savebehind_usage+1
|
||||
copy16 params_addr, active_menu
|
||||
|
||||
draw_menu_impl:
|
||||
jsr get_menu_count ; into menu_count
|
||||
jsr hide_cursor_save_params
|
||||
jsr set_standard_port
|
||||
|
@ -5771,7 +5778,7 @@ filler: ldx menu_item_index
|
|||
|
||||
: rts
|
||||
.endproc
|
||||
|
||||
DrawMenuImpl := SetMenuImpl::draw_menu_impl
|
||||
|
||||
.proc get_menu_and_menu_item
|
||||
ldx menu_index
|
||||
|
@ -10300,10 +10307,31 @@ mouse_firmware_hi: ; e.g. if mouse is in slot 4, this is $C4
|
|||
mouse_operand: ; e.g. if mouse is in slot 4, this is $40
|
||||
.byte 0
|
||||
|
||||
.endproc ; mgtk
|
||||
|
||||
|
||||
;;; ============================================================
|
||||
;;; GetDeskPat
|
||||
|
||||
.proc GetDeskPatImpl
|
||||
ldax #desktop_pattern
|
||||
jmp store_xa_at_params
|
||||
.endproc
|
||||
|
||||
;;; ============================================================
|
||||
;;; SetDeskPat
|
||||
|
||||
.proc SetDeskPatImpl
|
||||
ldy #.sizeof(MGTK::Pattern)-1
|
||||
: lda (params_addr),y
|
||||
sta desktop_pattern,y
|
||||
dey
|
||||
bpl :-
|
||||
rts
|
||||
.endproc
|
||||
|
||||
;;; ============================================================
|
||||
|
||||
.endproc ; mgtk
|
||||
|
||||
;; Room for future expansion
|
||||
PAD_TO $8580
|
|
@ -10,6 +10,8 @@ File > Open is run or the files are double-clicked.
|
|||
* [show.image.file](show.image.file.s)
|
||||
* Handles image files (FOT $08)
|
||||
* 8k Hires or 16k Double Hires images are supported
|
||||
* [show.font.file](show.font.file.s)
|
||||
* Handles MGTK font files (FNT $07)
|
||||
|
||||
The files can optionally be copied into the `DESK.ACC` directory to
|
||||
allow direct invocation from the Apple menu. This can be useful to
|
||||
|
@ -20,3 +22,6 @@ See [API.md](../desk.acc/API.md) for programming details.
|
|||
|
||||
See the DA [README.md](../desk.acc/README.md) for build and installation
|
||||
details.
|
||||
|
||||
NOTE: ProDOS file type FNT $07 is reserved for Apple /// SOS font
|
||||
files, but given their scarcity the type is re-used here.
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
show.text.file
|
||||
show.image.file
|
||||
show.font.file
|
||||
|
|
450
preview/show.font.file.s
Normal file
450
preview/show.font.file.s
Normal file
|
@ -0,0 +1,450 @@
|
|||
.feature string_escapes
|
||||
.setcpu "6502"
|
||||
|
||||
.include "apple2.inc"
|
||||
.include "../inc/macros.inc"
|
||||
.include "../inc/apple2.inc"
|
||||
.include "../inc/prodos.inc"
|
||||
.include "../mgtk/mgtk.inc"
|
||||
.include "../desktop.inc"
|
||||
|
||||
;;; ============================================================
|
||||
|
||||
.org $800
|
||||
|
||||
jmp entry
|
||||
|
||||
;;; ============================================================
|
||||
|
||||
pathbuf: .res 65, 0
|
||||
|
||||
font_buffer := $D00
|
||||
io_buf := WINDOW_ICON_TABLES
|
||||
read_length = WINDOW_ICON_TABLES-font_buffer
|
||||
|
||||
DEFINE_OPEN_PARAMS open_params, pathbuf, io_buf
|
||||
DEFINE_READ_PARAMS read_params, font_buffer, read_length
|
||||
DEFINE_CLOSE_PARAMS close_params
|
||||
|
||||
;;; ============================================================
|
||||
;;; Get filename by checking DeskTop selected window/icon
|
||||
|
||||
entry:
|
||||
|
||||
.proc get_filename
|
||||
;; Check that an icon is selected
|
||||
lda #0
|
||||
sta pathbuf
|
||||
lda selected_file_count
|
||||
beq abort ; some file properties?
|
||||
lda path_index ; prefix index in table
|
||||
bne :+
|
||||
abort: rts
|
||||
|
||||
;; Copy path (prefix) into pathbuf.
|
||||
: src := $06
|
||||
dst := $08
|
||||
|
||||
asl a ; (since address table is 2 bytes wide)
|
||||
tax
|
||||
copy16 path_table,x, src
|
||||
ldy #0
|
||||
lda (src),y
|
||||
tax
|
||||
inc src
|
||||
bne :+
|
||||
inc src+1
|
||||
: copy16 #pathbuf+1, dst
|
||||
jsr copy_pathbuf ; copy x bytes (src) to (dst)
|
||||
|
||||
;; Append separator.
|
||||
lda #'/'
|
||||
ldy #0
|
||||
sta (dst),y
|
||||
inc pathbuf
|
||||
inc dst
|
||||
bne :+
|
||||
inc dst+1
|
||||
|
||||
;; Get file entry.
|
||||
: lda selected_file_list ; file index in table
|
||||
asl a ; (since table is 2 bytes wide)
|
||||
tax
|
||||
copy16 file_table,x, src
|
||||
|
||||
;; Exit if a directory.
|
||||
ldy #2 ; 2nd byte of entry
|
||||
lda (src),y
|
||||
and #icon_entry_type_mask
|
||||
bne :+
|
||||
rts ; 000 = directory
|
||||
|
||||
;; Set window title to point at filename (9th byte of entry)
|
||||
;; (title includes the spaces before/after from the icon)
|
||||
: clc
|
||||
lda src
|
||||
adc #IconEntry::len
|
||||
sta winfo_title
|
||||
lda src+1
|
||||
adc #0
|
||||
sta winfo_title+1
|
||||
|
||||
;; Append filename to path.
|
||||
ldy #IconEntry::len
|
||||
lda (src),y ; grab length
|
||||
tax ; name has spaces before/after
|
||||
dex ; so subtract 2 to get actual length
|
||||
dex
|
||||
clc
|
||||
lda src
|
||||
adc #11 ; 9 = length, 10 = space, 11 = name
|
||||
sta src
|
||||
bcc :+
|
||||
inc src+1
|
||||
: jsr copy_pathbuf ; copy x bytes (src) to (dst)
|
||||
|
||||
jmp load_file_and_run_da
|
||||
|
||||
.proc copy_pathbuf ; copy x bytes from src to dst
|
||||
ldy #0 ; incrementing path length and dst
|
||||
loop: lda (src),y
|
||||
sta (dst),y
|
||||
iny
|
||||
inc pathbuf
|
||||
dex
|
||||
bne loop
|
||||
tya
|
||||
clc
|
||||
adc dst
|
||||
sta dst
|
||||
bcc end
|
||||
inc dst+1
|
||||
end: rts
|
||||
.endproc
|
||||
|
||||
.endproc
|
||||
|
||||
;;; ============================================================
|
||||
;;; Load the file
|
||||
|
||||
.proc load_file_and_run_da
|
||||
;; TODO: Ensure there's enough room, fail if not
|
||||
|
||||
;; NOTE: This only leaves $1000-$1AFF (2816 bytes)
|
||||
;; which is not enough for all the wide fonts.
|
||||
|
||||
;; --------------------------------------------------
|
||||
;; Load the file
|
||||
|
||||
sta ALTZPOFF
|
||||
MLI_CALL OPEN, open_params ; TODO: Check for error
|
||||
lda open_params::ref_num
|
||||
sta read_params::ref_num
|
||||
sta close_params::ref_num
|
||||
MLI_CALL READ, read_params ; TODO: Check for error
|
||||
MLI_CALL CLOSE, close_params
|
||||
sta ALTZPON
|
||||
|
||||
|
||||
;; --------------------------------------------------
|
||||
;; Copy the DA code and loaded data to AUX
|
||||
|
||||
lda ROMIN2
|
||||
copy16 #DA_LOAD_ADDRESS, STARTLO
|
||||
copy16 #WINDOW_ICON_TABLES-1, ENDLO
|
||||
copy16 #DA_LOAD_ADDRESS, DESTINATIONLO
|
||||
sec ; main>aux
|
||||
jsr AUXMOVE
|
||||
lda LCBANK1
|
||||
lda LCBANK1
|
||||
|
||||
;; --------------------------------------------------
|
||||
;; Run the DA from Aux, back to Main when done
|
||||
|
||||
sta RAMRDON
|
||||
sta RAMWRTON
|
||||
jsr init
|
||||
sta RAMRDOFF
|
||||
sta RAMWRTOFF
|
||||
rts
|
||||
.endproc
|
||||
|
||||
;;; ============================================================
|
||||
|
||||
da_window_id = 60
|
||||
da_width = 380
|
||||
da_height = 140
|
||||
da_left = (screen_width - da_width)/2
|
||||
da_top = (screen_height - da_height)/2
|
||||
|
||||
.proc winfo
|
||||
window_id: .byte da_window_id
|
||||
options: .byte MGTK::Option::go_away_box
|
||||
title: .addr 0 ; overwritten to point at filename
|
||||
hscroll: .byte MGTK::Scroll::option_none
|
||||
vscroll: .byte MGTK::Scroll::option_none
|
||||
hthumbmax: .byte 32
|
||||
hthumbpos: .byte 0
|
||||
vthumbmax: .byte 32
|
||||
vthumbpos: .byte 0
|
||||
status: .byte 0
|
||||
reserved: .byte 0
|
||||
mincontwidth: .word da_width
|
||||
mincontlength: .word da_height
|
||||
maxcontwidth: .word da_width
|
||||
maxcontlength: .word da_height
|
||||
port:
|
||||
viewloc: DEFINE_POINT da_left, da_top
|
||||
mapbits: .addr MGTK::screen_mapbits
|
||||
mapwidth: .word MGTK::screen_mapwidth
|
||||
maprect: DEFINE_RECT 0, 0, da_width, da_height
|
||||
pattern: .res 8, $FF
|
||||
colormasks: .byte MGTK::colormask_and, MGTK::colormask_or
|
||||
penloc: DEFINE_POINT 0, 0
|
||||
penwidth: .byte 2
|
||||
penheight: .byte 1
|
||||
penmode: .byte 0
|
||||
textback: .byte $7F
|
||||
textfont: .addr font_buffer
|
||||
nextwinfo: .addr 0
|
||||
.endproc
|
||||
winfo_title := winfo::title
|
||||
|
||||
;;; ============================================================
|
||||
|
||||
.proc event_params
|
||||
kind: .byte 0
|
||||
;;; EventKind::key_down
|
||||
key := *
|
||||
modifiers := * + 1
|
||||
;;; EventKind::update
|
||||
window_id := *
|
||||
;;; otherwise
|
||||
xcoord := *
|
||||
ycoord := * + 2
|
||||
.res 4
|
||||
.endproc
|
||||
|
||||
.proc findwindow_params
|
||||
mousex: .word 0
|
||||
mousey: .word 0
|
||||
which_area: .byte 0
|
||||
window_id: .byte 0
|
||||
.endproc
|
||||
|
||||
.proc trackgoaway_params
|
||||
clicked: .byte 0
|
||||
.endproc
|
||||
|
||||
.proc dragwindow_params
|
||||
window_id: .byte 0
|
||||
dragx: .word 0
|
||||
dragy: .word 0
|
||||
moved: .byte 0
|
||||
.endproc
|
||||
|
||||
.proc winport_params
|
||||
window_id: .byte da_window_id
|
||||
port: .addr grafport
|
||||
.endproc
|
||||
|
||||
.proc grafport
|
||||
viewloc: DEFINE_POINT 0, 0
|
||||
mapbits: .word 0
|
||||
mapwidth: .word 0
|
||||
cliprect: DEFINE_RECT 0, 0, 0, 0
|
||||
pattern: .res 8, 0
|
||||
colormasks: .byte 0, 0
|
||||
penloc: DEFINE_POINT 0, 0
|
||||
penwidth: .byte 0
|
||||
penheight: .byte 0
|
||||
penmode: .byte 0
|
||||
textback: .byte 0
|
||||
textfont: .addr 0
|
||||
.endproc
|
||||
|
||||
.proc drawtext_params_char
|
||||
.addr char_label
|
||||
.byte 1
|
||||
.endproc
|
||||
char_label: .byte 0
|
||||
|
||||
;;; ============================================================
|
||||
|
||||
|
||||
;;; ============================================================
|
||||
|
||||
.proc init
|
||||
MGTK_CALL MGTK::OpenWindow, winfo
|
||||
jsr draw_window
|
||||
MGTK_CALL MGTK::FlushEvents
|
||||
;; fall through
|
||||
.endproc
|
||||
|
||||
.proc input_loop
|
||||
MGTK_CALL MGTK::GetEvent, event_params
|
||||
bne exit
|
||||
lda event_params::kind
|
||||
cmp #MGTK::EventKind::button_down ; was clicked?
|
||||
bne :+
|
||||
jmp handle_down
|
||||
|
||||
|
||||
: cmp #MGTK::EventKind::key_down ; any key?
|
||||
bne :+
|
||||
jmp handle_key
|
||||
|
||||
|
||||
: jmp input_loop
|
||||
.endproc
|
||||
|
||||
.proc exit
|
||||
MGTK_CALL MGTK::CloseWindow, winfo
|
||||
ITK_CALL IconTK::REDRAW_ICONS
|
||||
rts ; exits input loop
|
||||
.endproc
|
||||
|
||||
;;; ============================================================
|
||||
|
||||
.proc handle_key
|
||||
lda event_params::key
|
||||
cmp #CHAR_ESCAPE
|
||||
bne :+
|
||||
jmp exit
|
||||
: jmp input_loop
|
||||
.endproc
|
||||
|
||||
;;; ============================================================
|
||||
|
||||
.proc handle_down
|
||||
copy16 event_params::xcoord, findwindow_params::mousex
|
||||
copy16 event_params::ycoord, findwindow_params::mousey
|
||||
MGTK_CALL MGTK::FindWindow, findwindow_params
|
||||
bpl :+
|
||||
jmp exit
|
||||
: lda findwindow_params::window_id
|
||||
cmp winfo::window_id
|
||||
bpl :+
|
||||
jmp input_loop
|
||||
: lda findwindow_params::which_area
|
||||
cmp #MGTK::Area::close_box
|
||||
beq handle_close
|
||||
cmp #MGTK::Area::dragbar
|
||||
beq handle_drag
|
||||
jmp input_loop
|
||||
.endproc
|
||||
|
||||
;;; ============================================================
|
||||
|
||||
.proc handle_close
|
||||
MGTK_CALL MGTK::TrackGoAway, trackgoaway_params
|
||||
lda trackgoaway_params::clicked
|
||||
bne :+
|
||||
jmp input_loop
|
||||
: jmp exit
|
||||
.endproc
|
||||
|
||||
;;; ============================================================
|
||||
|
||||
.proc handle_drag
|
||||
copy winfo::window_id, dragwindow_params::window_id
|
||||
copy16 event_params::xcoord, dragwindow_params::dragx
|
||||
copy16 event_params::ycoord, dragwindow_params::dragy
|
||||
MGTK_CALL MGTK::DragWindow, dragwindow_params
|
||||
lda dragwindow_params::moved
|
||||
bpl :+
|
||||
|
||||
;; Draw DeskTop's windows (from Main)
|
||||
sta RAMRDOFF
|
||||
sta RAMWRTOFF
|
||||
jsr JUMP_TABLE_REDRAW_ALL
|
||||
sta RAMRDON
|
||||
sta RAMWRTON
|
||||
|
||||
;; Draw DA's window
|
||||
jsr draw_window
|
||||
|
||||
;; Draw DeskTop icons
|
||||
ITK_CALL IconTK::REDRAW_ICONS
|
||||
|
||||
: jmp input_loop
|
||||
|
||||
.endproc
|
||||
|
||||
;;; ============================================================
|
||||
|
||||
line1: PASCAL_STRING "\x00 \x01 \x02 \x03 \x04 \x05 \x06 \x07 \x08 \x09 \x0A \x0B \x0C \x0D \x0E \x0F"
|
||||
line2: PASCAL_STRING "\x10 \x11 \x12 \x13 \x14 \x15 \x16 \x17 \x18 \x19 \x1A \x1B \x1C \x1D \x1E \x1F"
|
||||
line3: PASCAL_STRING " ! \x22 # $ % & ' ( ) * + , - . /"
|
||||
line4: PASCAL_STRING "0 1 2 3 4 5 6 7 8 9 : ; < = > ?"
|
||||
line5: PASCAL_STRING "@ A B C D E F G H I J K L M N O"
|
||||
line6: PASCAL_STRING "P Q R S T U V W X Y Z [ \x5C ] ^ _"
|
||||
line7: PASCAL_STRING "` a b c d e f g h i j k l m n o"
|
||||
line8: PASCAL_STRING "p q r s t u v w x y z { | } ~ \x7F"
|
||||
|
||||
line_count = 8
|
||||
line_addrs:
|
||||
.addr line1, line2, line3, line4, line5, line6, line7, line8
|
||||
|
||||
pos: DEFINE_POINT 0,0, pos
|
||||
|
||||
initial_y = 5
|
||||
line_height = 15
|
||||
|
||||
|
||||
.proc draw_window
|
||||
ptr := $06
|
||||
|
||||
PARAM_BLOCK params, $06
|
||||
data: .addr 0
|
||||
len: .byte 0
|
||||
width: .word 0
|
||||
END_PARAM_BLOCK
|
||||
|
||||
MGTK_CALL MGTK::GetWinPort, winport_params
|
||||
cmp #MGTK::Error::window_obscured
|
||||
bne :+
|
||||
rts
|
||||
|
||||
: MGTK_CALL MGTK::SetPort, grafport
|
||||
MGTK_CALL MGTK::HideCursor
|
||||
|
||||
copy16 #initial_y, pos::ycoord
|
||||
|
||||
|
||||
copy #0, index
|
||||
loop: lda index
|
||||
asl
|
||||
tax
|
||||
copy16 line_addrs,x, ptr
|
||||
|
||||
ldy #0
|
||||
lda (ptr),y ; length
|
||||
sta params::len
|
||||
add16 ptr, #1, params::data ; offset past length
|
||||
|
||||
;; Position the string
|
||||
MGTK_CALL MGTK::TextWidth, params
|
||||
sub16 #da_width, params::width, pos::xcoord ; center it
|
||||
lsr16 pos::xcoord
|
||||
add16 pos::ycoord, #line_height, pos::ycoord ; next row
|
||||
|
||||
MGTK_CALL MGTK::MoveTo, pos
|
||||
MGTK_CALL MGTK::DrawText, params
|
||||
|
||||
inc index
|
||||
lda index
|
||||
cmp #line_count
|
||||
bne loop
|
||||
|
||||
MGTK_CALL MGTK::ShowCursor
|
||||
rts
|
||||
|
||||
index: .byte 0
|
||||
|
||||
.endproc
|
||||
|
||||
|
||||
;;; ============================================================
|
||||
|
||||
.assert * < font_buffer, error, "DA too big"
|
|
@ -3,48 +3,89 @@
|
|||
.include "apple2.inc"
|
||||
.include "../inc/apple2.inc"
|
||||
.include "../inc/prodos.inc"
|
||||
.include "../mgtk.inc"
|
||||
.include "../mgtk/mgtk.inc"
|
||||
.include "../desktop.inc"
|
||||
.include "../macros.inc"
|
||||
.include "../inc/macros.inc"
|
||||
|
||||
;;; ============================================================
|
||||
;;; Memory map
|
||||
;;;
|
||||
;;; Main Aux
|
||||
;;; : : : :
|
||||
;;; | | | |
|
||||
;;; | DHR | | DHR |
|
||||
;;; $2000 +-----------+ +-----------+
|
||||
;;; | IO Buffer | |Win Tables |
|
||||
;;; $1C00 +-----------+ | |
|
||||
;;; $1B00 | | +-----------+
|
||||
;;; | | | |
|
||||
;;; | | | |
|
||||
;;; | MP Dst | | MP Dst |
|
||||
;;; $1580 +-----------+ +-----------+
|
||||
;;; | | | |
|
||||
;;; | MP Src | | |
|
||||
;;; $1100 +-----------+ +-----------+
|
||||
;;; | | | |
|
||||
;;; | DA | | DA (Copy) |
|
||||
;;; $800 +-----------+ +-----------+
|
||||
;;; : : : :
|
||||
;;;
|
||||
|
||||
hires := $2000 ; HR/DHR images are loaded directly into screen buffer
|
||||
hires_size = $2000
|
||||
|
||||
;; Minipix/Print Shop images are loaded/converted
|
||||
minipix_src_buf = $1200 ; Load address
|
||||
minipix_src_size = 576
|
||||
minipix_dst_buf = $1580 ; Convert address
|
||||
minipix_dst_size = 26*52
|
||||
|
||||
.assert (minipix_src_buf + minipix_src_size) < minipix_dst_buf, error, "Not enough room for Minipix load buffer"
|
||||
.assert (minipix_dst_buf + minipix_dst_size) < WINDOW_ICON_TABLES, error, "Not enough room for Minipix convert buffer"
|
||||
|
||||
;;; ============================================================
|
||||
|
||||
.org $800
|
||||
|
||||
start: jmp copy2aux
|
||||
da_start:
|
||||
jmp start
|
||||
|
||||
save_stack:.byte 0
|
||||
|
||||
;;; Copy $800 through $13FF (the DA) to aux
|
||||
.proc copy2aux
|
||||
.proc start
|
||||
tsx
|
||||
stx save_stack
|
||||
|
||||
;; Copy DA to AUX
|
||||
copy16 #da_start, STARTLO
|
||||
copy16 #da_start, DESTINATIONLO
|
||||
copy16 #da_end, ENDLO
|
||||
sec ; main>aux
|
||||
jsr AUXMOVE
|
||||
|
||||
;; Transfer control to aux
|
||||
sta RAMWRTON
|
||||
ldy #0
|
||||
src: lda start,y ; self-modified
|
||||
dst: sta start,y ; self-modified
|
||||
dey
|
||||
bne src
|
||||
sta RAMRDON
|
||||
|
||||
;; Copy "call_main_template" routine to zero page
|
||||
COPY_BYTES sizeof_routine+1, routine, call_main_trampoline
|
||||
|
||||
;; run the DA
|
||||
jsr init
|
||||
|
||||
;; tear down/exit
|
||||
sta RAMRDOFF
|
||||
sta RAMWRTOFF
|
||||
inc src+2
|
||||
inc dst+2
|
||||
sta RAMWRTON
|
||||
lda dst+2
|
||||
cmp #$14
|
||||
bne src
|
||||
|
||||
ldx save_stack
|
||||
txs
|
||||
|
||||
rts
|
||||
.endproc
|
||||
|
||||
call_main_trampoline := $20 ; installed on ZP, turns off auxmem and calls...
|
||||
call_main_addr := call_main_trampoline+7 ; address patched in here
|
||||
|
||||
;;; Copy the following "call_main_template" routine to $20
|
||||
.scope
|
||||
sta RAMWRTON
|
||||
sta RAMRDON
|
||||
COPY_BYTES sizeof_routine+1, routine, call_main_trampoline
|
||||
jmp call_init
|
||||
.endscope
|
||||
|
||||
.proc routine
|
||||
sta RAMRDOFF
|
||||
sta RAMWRTOFF
|
||||
|
@ -56,21 +97,6 @@ call_main_addr := call_main_trampoline+7 ; address patched in here
|
|||
sizeof_routine = * - routine ; can't .sizeof(proc) before declaration
|
||||
;; https://github.com/cc65/cc
|
||||
|
||||
.proc call_init
|
||||
;; run the DA
|
||||
jsr init
|
||||
|
||||
;; tear down/exit
|
||||
sta ALTZPON
|
||||
lda LCBANK1
|
||||
lda LCBANK1
|
||||
sta RAMRDOFF
|
||||
sta RAMWRTOFF
|
||||
ldx save_stack
|
||||
txs
|
||||
rts
|
||||
.endproc
|
||||
|
||||
;;; ============================================================
|
||||
;;; ProDOS MLI calls
|
||||
|
||||
|
@ -101,6 +127,15 @@ call_main_addr := call_main_trampoline+7 ; address patched in here
|
|||
rts
|
||||
.endproc
|
||||
|
||||
.proc read_minipix_file
|
||||
jsr copy_params_aux_to_main
|
||||
sta ALTZPOFF
|
||||
MLI_CALL READ, read_minipix_params
|
||||
sta ALTZPON
|
||||
jsr copy_params_main_to_aux
|
||||
rts
|
||||
.endproc
|
||||
|
||||
.proc close_file
|
||||
jsr copy_params_aux_to_main
|
||||
sta ALTZPOFF
|
||||
|
@ -140,19 +175,17 @@ loop: lda params_start - 1,y
|
|||
rts
|
||||
.endproc
|
||||
|
||||
;;; ----------------------------------------
|
||||
|
||||
params_start:
|
||||
;;; This block gets copied between main/aux
|
||||
|
||||
;;; ProDOS MLI param blocks
|
||||
|
||||
hires := $2000
|
||||
hires_size = $2000
|
||||
|
||||
DEFINE_OPEN_PARAMS open_params, pathbuff, $C00
|
||||
DEFINE_OPEN_PARAMS open_params, pathbuff, DA_IO_BUFFER
|
||||
DEFINE_GET_EOF_PARAMS get_eof_params
|
||||
|
||||
DEFINE_READ_PARAMS read_params, hires, hires_size
|
||||
DEFINE_READ_PARAMS read_minipix_params, minipix_src_buf, minipix_src_size
|
||||
|
||||
DEFINE_CLOSE_PARAMS close_params
|
||||
|
||||
.proc pathbuff ; 1st byte is length, rest is full path
|
||||
|
@ -172,24 +205,7 @@ base: .word 0
|
|||
.endproc
|
||||
|
||||
|
||||
.proc event_params ; queried to track mouse-up
|
||||
kind: .byte $00
|
||||
|
||||
;;; if state is MGTK::EventKind::key_down
|
||||
key := *
|
||||
modifiers := *+1
|
||||
|
||||
;;; otherwise
|
||||
xcoord := *
|
||||
ycoord := *+2
|
||||
|
||||
.res 4 ; space for both
|
||||
.endproc
|
||||
|
||||
default_width = 560
|
||||
default_height = 192
|
||||
default_left = 0
|
||||
default_top = 0
|
||||
event_params: .tag MGTK::Event
|
||||
|
||||
.proc window_title
|
||||
.byte 0 ; length
|
||||
|
@ -207,16 +223,16 @@ vthumbmax: .byte 32
|
|||
vthumbpos: .byte 0
|
||||
status: .byte 0
|
||||
reserved: .byte 0
|
||||
mincontwidth: .word default_width
|
||||
mincontlength: .word default_height
|
||||
maxcontwidth: .word default_width
|
||||
maxcontlength: .word default_height
|
||||
mincontwidth: .word screen_width
|
||||
mincontlength: .word screen_height
|
||||
maxcontwidth: .word screen_width
|
||||
maxcontlength: .word screen_height
|
||||
|
||||
.proc port
|
||||
viewloc: DEFINE_POINT default_left, default_top
|
||||
viewloc: DEFINE_POINT 0, 0
|
||||
mapbits: .addr MGTK::screen_mapbits
|
||||
mapwidth: .word MGTK::screen_mapwidth
|
||||
maprect: DEFINE_RECT 0, 0, default_width, default_height
|
||||
maprect: DEFINE_RECT 0, 0, screen_width, screen_height
|
||||
.endproc
|
||||
|
||||
pattern:.res 8, 0
|
||||
|
@ -224,7 +240,7 @@ colormasks: .byte MGTK::colormask_and, MGTK::colormask_or
|
|||
penloc: DEFINE_POINT 0, 0
|
||||
penwidth: .byte 1
|
||||
penheight: .byte 1
|
||||
penmode: .byte 0
|
||||
penmode: .byte MGTK::notpencopy
|
||||
textback: .byte $7F
|
||||
textfont: .addr DEFAULT_FONT
|
||||
nextwinfo: .addr 0
|
||||
|
@ -232,10 +248,6 @@ nextwinfo: .addr 0
|
|||
|
||||
|
||||
.proc init
|
||||
sta ALTZPON
|
||||
lda LCBANK1
|
||||
lda LCBANK1
|
||||
|
||||
copy #0, mode
|
||||
|
||||
;; Get filename by checking DeskTop selected window/icon
|
||||
|
@ -329,10 +341,10 @@ end: rts
|
|||
lda open_params::ref_num
|
||||
sta get_eof_params::ref_num
|
||||
sta read_params::ref_num
|
||||
sta read_minipix_params::ref_num
|
||||
sta close_params::ref_num
|
||||
|
||||
MGTK_CALL MGTK::HideCursor
|
||||
jsr stash_menu
|
||||
MGTK_CALL MGTK::OpenWindow, winfo
|
||||
MGTK_CALL MGTK::SetPort, winfo::port
|
||||
jsr set_color_mode
|
||||
|
@ -350,7 +362,7 @@ end: rts
|
|||
|
||||
.proc input_loop
|
||||
MGTK_CALL MGTK::GetEvent, event_params
|
||||
lda event_params::kind
|
||||
lda event_params + MGTK::Event::kind
|
||||
cmp #MGTK::EventKind::button_down ; was clicked?
|
||||
beq exit
|
||||
cmp #MGTK::EventKind::key_down ; any key?
|
||||
|
@ -358,9 +370,9 @@ end: rts
|
|||
bne input_loop
|
||||
|
||||
on_key:
|
||||
lda event_params::modifiers
|
||||
lda event_params + MGTK::Event::modifiers
|
||||
bne input_loop
|
||||
lda event_params::key
|
||||
lda event_params + MGTK::Event::key
|
||||
cmp #CHAR_ESCAPE
|
||||
beq exit
|
||||
cmp #' '
|
||||
|
@ -371,11 +383,20 @@ on_key:
|
|||
exit:
|
||||
jsr set_bw_mode
|
||||
MGTK_CALL MGTK::HideCursor
|
||||
MGTK_CALL MGTK::CloseWindow, winfo
|
||||
DESKTOP_CALL DT_REDRAW_ICONS
|
||||
jsr unstash_menu
|
||||
MGTK_CALL MGTK::ShowCursor
|
||||
|
||||
;; Restore menu
|
||||
MGTK_CALL MGTK::DrawMenu
|
||||
sta RAMWRTOFF
|
||||
sta RAMRDOFF
|
||||
yax_call JUMP_TABLE_MGTK_RELAY, MGTK::HiliteMenu, last_menu_click_params
|
||||
sta RAMWRTON
|
||||
sta RAMRDON
|
||||
|
||||
;; Force desktop redraw
|
||||
MGTK_CALL MGTK::CloseWindow, winfo
|
||||
ITK_CALL IconTK::REDRAW_ICONS
|
||||
|
||||
MGTK_CALL MGTK::ShowCursor
|
||||
rts ; exits input loop
|
||||
.endproc
|
||||
|
||||
|
@ -390,15 +411,21 @@ exit:
|
|||
sbc #>(hires_size+1)
|
||||
lda get_eof_params::eof+2
|
||||
sbc #^(hires_size+1)
|
||||
bcs dhr
|
||||
bcc :+
|
||||
jmp show_dhr_file
|
||||
|
||||
jsr show_hr_file
|
||||
jmp close
|
||||
;; If bigger than 576, assume HR
|
||||
|
||||
dhr: jsr show_dhr_file
|
||||
: lda get_eof_params::eof
|
||||
cmp #<(minipix_src_size+1)
|
||||
lda get_eof_params::eof+1
|
||||
sbc #>(minipix_src_size+1)
|
||||
bcc :+
|
||||
jmp show_hr_file
|
||||
|
||||
close: jsr close_file
|
||||
rts
|
||||
;; Otherwise, assume Minipix
|
||||
|
||||
: jmp show_minipix_file
|
||||
.endproc
|
||||
|
||||
.proc show_hr_file
|
||||
|
@ -452,6 +479,48 @@ close: jsr close_file
|
|||
rts
|
||||
.endproc
|
||||
|
||||
|
||||
.proc show_minipix_file
|
||||
jsr set_bw_mode
|
||||
|
||||
;; Load file at minipix_src_buf (MAIN $1800)
|
||||
jsr read_minipix_file
|
||||
jsr close_file
|
||||
|
||||
;; Convert (in main)
|
||||
sta RAMWRTOFF
|
||||
sta RAMRDOFF
|
||||
jsr convert_minipix_to_bitmap
|
||||
sta RAMWRTON
|
||||
sta RAMRDON
|
||||
|
||||
;; Copy main>aux
|
||||
copy16 #minipix_dst_buf, STARTLO
|
||||
copy16 #minipix_dst_buf, DESTINATIONLO
|
||||
copy16 #(minipix_dst_buf+minipix_dst_size), ENDLO
|
||||
sec ; main>aux
|
||||
jsr AUXMOVE
|
||||
|
||||
;; Draw
|
||||
MGTK_CALL MGTK::PaintBits, paintbits_params
|
||||
|
||||
rts
|
||||
|
||||
minipix_width = 88 * 2
|
||||
minipix_height = 52
|
||||
|
||||
.proc paintbits_params
|
||||
viewloc: DEFINE_POINT (screen_width - minipix_width)/2, (screen_height - minipix_height)/2
|
||||
mapbits: .addr minipix_dst_buf
|
||||
mapwidth: .byte 26
|
||||
reserved: .byte 0
|
||||
maprect: DEFINE_RECT 0,0,minipix_width-1,minipix_height-1
|
||||
.endproc
|
||||
|
||||
.endproc
|
||||
|
||||
|
||||
|
||||
;;; ============================================================
|
||||
;;; Convert single hires to double hires
|
||||
|
||||
|
@ -520,77 +589,95 @@ done: sta PAGE2OFF
|
|||
.endproc
|
||||
|
||||
;;; ============================================================
|
||||
;;; Stash/Unstash Menu Bar
|
||||
;;; Minipix images
|
||||
|
||||
;;; Have not yet figured out how to force the menu to
|
||||
;;; redraw, so instead we save the top 13 rows of the
|
||||
;;; screen to a scratch buffer and restore after
|
||||
;;; destroying the window.
|
||||
.proc convert_minipix_to_bitmap
|
||||
rows = 52
|
||||
cols = 88 ; pixels
|
||||
|
||||
stash := $1200 ; Past DA code
|
||||
rows = 13
|
||||
cols = 40
|
||||
src := $06
|
||||
dst := $08
|
||||
|
||||
.proc stash_menu
|
||||
src := $08
|
||||
dst := $06
|
||||
copy16 #stash, dst
|
||||
copy16 #minipix_src_buf, src
|
||||
copy16 #minipix_dst_buf, dst
|
||||
|
||||
sta PAGE2ON
|
||||
jsr inner
|
||||
sta PAGE2OFF
|
||||
;; c/o Kent Dickey on comp.sys.apple2.programmer
|
||||
;; https://groups.google.com/d/msg/comp.sys.apple2.programmer/XB0jUEvrAhE/loRorS5fBwAJ
|
||||
|
||||
inner:
|
||||
ldx #rows
|
||||
stx row
|
||||
ldy #0 ; Y remains unchanged throughout
|
||||
|
||||
lda #0 ; row #
|
||||
rloop: pha
|
||||
tax
|
||||
copy hires_table_lo,x, src
|
||||
copy hires_table_hi,x, src+1
|
||||
ldy #cols-1
|
||||
cloop: lda (src),y
|
||||
sta (dst),y
|
||||
dey
|
||||
bpl cloop
|
||||
;; For each row...
|
||||
dorow: ldx #8
|
||||
stx srcbit
|
||||
ldx #7
|
||||
stx dstbit
|
||||
ldx #cols
|
||||
|
||||
add16 dst, #cols, dst
|
||||
;; Process each bit
|
||||
: jsr getbit
|
||||
jsr putbit2
|
||||
dex
|
||||
bne :-
|
||||
|
||||
pla
|
||||
inc
|
||||
cmp #rows
|
||||
bcc rloop
|
||||
;; We've written out 88*2 bits = 176 bits. This means 1 bit was shifted into
|
||||
;; the last bit. We need to get it from the MSB to the LSB, so it needs
|
||||
;; to be shifted down 7 bits
|
||||
: clc
|
||||
jsr putbit1
|
||||
dex
|
||||
cpx #AS_BYTE(-7) ; do 7 times == 7 bits
|
||||
bne :-
|
||||
|
||||
dec row
|
||||
bne dorow
|
||||
rts
|
||||
|
||||
.proc getbit
|
||||
lda (src),y
|
||||
rol
|
||||
sta (src),y
|
||||
dec srcbit
|
||||
bne done
|
||||
|
||||
inc src
|
||||
bne :+
|
||||
inc src+1
|
||||
: lda #8
|
||||
sta srcbit
|
||||
|
||||
done: rts
|
||||
.endproc
|
||||
|
||||
.proc unstash_menu
|
||||
src := $08
|
||||
dst := $06
|
||||
copy16 #stash, src
|
||||
|
||||
sta PAGE2ON
|
||||
jsr inner
|
||||
sta PAGE2OFF
|
||||
|
||||
inner:
|
||||
|
||||
lda #0 ; row #
|
||||
rloop: pha
|
||||
tax
|
||||
copy hires_table_lo,x, dst
|
||||
copy hires_table_hi,x, dst+1
|
||||
ldy #cols-1
|
||||
cloop: lda (src),y
|
||||
.proc putbit2
|
||||
php
|
||||
jsr putbit1
|
||||
plp
|
||||
;; fall through
|
||||
.endproc
|
||||
.proc putbit1
|
||||
lda (dst),y
|
||||
ror
|
||||
sta (dst),y
|
||||
dey
|
||||
bpl cloop
|
||||
dec dstbit
|
||||
bne done
|
||||
|
||||
add16 src, #cols, src
|
||||
ror ; shift once more to get bits in right place
|
||||
sta (dst),y
|
||||
inc dst
|
||||
bne :+
|
||||
inc dst+1
|
||||
: lda #7
|
||||
sta dstbit
|
||||
|
||||
done: rts
|
||||
.endproc
|
||||
|
||||
srcbit: .byte 0
|
||||
dstbit: .byte 0
|
||||
row: .byte 0
|
||||
|
||||
pla
|
||||
inc
|
||||
cmp #rows
|
||||
bcc rloop
|
||||
rts
|
||||
.endproc
|
||||
|
||||
;;; ============================================================
|
||||
|
@ -626,5 +713,11 @@ done: rts
|
|||
done: rts
|
||||
.endproc
|
||||
|
||||
;;; ============================================================
|
||||
|
||||
.include "inc/hires_table.inc"
|
||||
.include "inc/hr_to_dhr.inc"
|
||||
|
||||
;;; ============================================================
|
||||
|
||||
da_end:
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
.include "apple2.inc"
|
||||
.include "../inc/apple2.inc"
|
||||
.include "../inc/prodos.inc"
|
||||
.include "../mgtk.inc"
|
||||
.include "../mgtk/mgtk.inc"
|
||||
.include "../desktop.inc"
|
||||
.include "../macros.inc"
|
||||
.include "../inc/macros.inc"
|
||||
|
||||
;;; ============================================================
|
||||
|
||||
|
@ -557,7 +557,7 @@ no_mod:
|
|||
.proc do_close
|
||||
jsr close_file
|
||||
MGTK_CALL MGTK::CloseWindow, winfo
|
||||
DESKTOP_CALL DT_REDRAW_ICONS
|
||||
ITK_CALL IconTK::REDRAW_ICONS
|
||||
rts ; exits input loop
|
||||
.endproc
|
||||
|
||||
|
@ -839,7 +839,7 @@ end: rts
|
|||
.endproc
|
||||
|
||||
.proc finish_resize ; only called from dead code
|
||||
DESKTOP_CALL DT_REDRAW_ICONS
|
||||
ITK_CALL IconTK::REDRAW_ICONS
|
||||
MGTK_CALL MGTK::SetPort, winfo::port
|
||||
lda winfo::hscroll
|
||||
ror a ; check if low bit (track enabled) is set
|
||||
|
|
|
@ -1,29 +0,0 @@
|
|||
|
||||
CC65 = ~/dev/cc65/bin
|
||||
CAFLAGS = --target apple2enh --list-bytes 0
|
||||
CCFLAGS = --config apple2-asm.cfg
|
||||
|
||||
OUTDIR = out
|
||||
|
||||
HEADERS = $(wildcard ../*.inc)
|
||||
|
||||
TARGETS = $(OUTDIR)/ram.system.SYS
|
||||
|
||||
.PHONY: clean all
|
||||
all: $(OUTDIR) $(TARGETS)
|
||||
|
||||
$(OUTDIR):
|
||||
mkdir -p $(OUTDIR)
|
||||
|
||||
clean:
|
||||
rm -f $(OUTDIR)/*.o
|
||||
rm -f $(OUTDIR)/*.list
|
||||
rm -f $(TARGETS)
|
||||
|
||||
$(OUTDIR)/%.o: %.s $(HEADERS)
|
||||
$(CC65)/ca65 $(CAFLAGS) --listing $(basename $@).list -o $@ $<
|
||||
|
||||
# System Files .SYS
|
||||
$(OUTDIR)/%.SYS: $(OUTDIR)/%.o
|
||||
$(CC65)/ld65 $(CCFLAGS) -o '$@' $<
|
||||
xattr -wx prodos.AuxType '00 20' $@
|
Binary file not shown.
|
@ -1,780 +0,0 @@
|
|||
;;; Disassembly of "RAM.SYSTEM" found on Mouse Desk 2.0 images
|
||||
|
||||
.setcpu "6502"
|
||||
|
||||
.include "../macros.inc"
|
||||
.include "apple2.inc"
|
||||
.include "../inc/apple2.inc"
|
||||
.include "../inc/prodos.inc"
|
||||
.include "opcodes.inc"
|
||||
|
||||
|
||||
|
||||
zpproc_addr := $B0
|
||||
zpproc_relay_addr := $2D0
|
||||
chain_path := $280
|
||||
|
||||
driver_target = $FF00
|
||||
|
||||
kMaxUsableBanks = 24 ; Why is this capped so low???
|
||||
; (driver has room for another ~20?)
|
||||
|
||||
;;; ============================================================
|
||||
;;; RamWorks I/O
|
||||
|
||||
RWBANK := $C073
|
||||
|
||||
;;; ============================================================
|
||||
|
||||
.org $2000
|
||||
|
||||
jmp relocate_chain
|
||||
|
||||
;;; ============================================================
|
||||
|
||||
;; Interpreter signature
|
||||
.byte $EE,$EE
|
||||
|
||||
;; Buffer size
|
||||
.byte 64
|
||||
|
||||
chain_path_orig:
|
||||
PASCAL_STRING "/MOUSE.DESK/MD.SYSTEM", 63
|
||||
|
||||
.byte $FF, $FF
|
||||
|
||||
;;; Configuration Parameters
|
||||
|
||||
banks_to_reserve: .byte 0 ; banks to reserve (e.g. for AppleWorks)
|
||||
|
||||
slot: .byte 3 ; S3D1; could be $B for S3D2
|
||||
|
||||
|
||||
;;; ============================================================
|
||||
;;; Chain to the next system file (path above)
|
||||
;;; ============================================================
|
||||
;;;
|
||||
;;; Relocated to $BD00 to leave room at $2000 for the sys file.
|
||||
|
||||
chain_target = $BD00
|
||||
|
||||
saved_org .set *
|
||||
.proc chain
|
||||
.org ::chain_target
|
||||
|
||||
;; Copy path to $280
|
||||
ldx chain_path_orig
|
||||
beq quit
|
||||
: lda chain_path_orig,x
|
||||
sta chain_path,x
|
||||
dex
|
||||
bpl :-
|
||||
|
||||
MLI_CALL GET_FILE_INFO, get_file_info_params
|
||||
bcs quit
|
||||
|
||||
ldx get_file_info_params_file_type
|
||||
inx
|
||||
bne quit
|
||||
MLI_CALL OPEN, open_params
|
||||
bcs close
|
||||
lda open_params_ref_num
|
||||
sta read_params_ref_num
|
||||
sta get_eof_params_ref_num
|
||||
|
||||
MLI_CALL GET_EOF, get_eof_params
|
||||
bcs close
|
||||
|
||||
;; Ensure there is room for chained file
|
||||
lda get_eof_params_eof+2
|
||||
bne close
|
||||
lda get_eof_params_eof+1
|
||||
cmp #$98 ; $2000+$97FF=$B7FF (have up to $BF00)
|
||||
bcs close
|
||||
sta read_params_request_count+1
|
||||
lda get_eof_params_eof
|
||||
sta read_params_request_count
|
||||
|
||||
;; Read
|
||||
MLI_CALL READ, read_params
|
||||
bcs close
|
||||
|
||||
;; Close
|
||||
MLI_CALL CLOSE, close_params
|
||||
bcs close
|
||||
|
||||
;; Invoke it
|
||||
jmp sys_target
|
||||
|
||||
close: MLI_CALL CLOSE, close_params
|
||||
|
||||
quit: MLI_CALL QUIT, quit_params
|
||||
|
||||
DEFINE_QUIT_PARAMS quit_params
|
||||
|
||||
sys_target := $2000
|
||||
io_buff := $1C00
|
||||
|
||||
DEFINE_GET_FILE_INFO_PARAMS get_file_info_params, chain_path
|
||||
get_file_info_params_file_type := get_file_info_params::file_type
|
||||
|
||||
DEFINE_OPEN_PARAMS open_params, chain_path, io_buff
|
||||
open_params_ref_num := open_params::ref_num
|
||||
|
||||
DEFINE_CLOSE_PARAMS close_params
|
||||
|
||||
DEFINE_READ_PARAMS read_params, sys_target, 0
|
||||
read_params_ref_num := read_params::ref_num
|
||||
read_params_request_count := read_params::request_count
|
||||
|
||||
DEFINE_GET_EOF_PARAMS get_eof_params
|
||||
get_eof_params_ref_num := get_eof_params::ref_num
|
||||
get_eof_params_eof := get_eof_params::eof
|
||||
|
||||
.endproc
|
||||
.assert .sizeof(chain) <= $100, error, "Chain routine must fit in one page"
|
||||
.org (saved_org + .sizeof(chain))
|
||||
|
||||
;;; ============================================================
|
||||
;;; Copy chain code to final location
|
||||
|
||||
.proc relocate_chain
|
||||
ldy #$00
|
||||
: lda chain,y
|
||||
sta chain_target,y
|
||||
iny
|
||||
bne :-
|
||||
;; fall through
|
||||
.endproc
|
||||
|
||||
;;; ============================================================
|
||||
;;; Install the driver
|
||||
|
||||
.proc install_driver
|
||||
|
||||
sta CLR80COL
|
||||
ldy #0
|
||||
sty RWBANK
|
||||
sta ALTZPON ; Use ZP to probe banks
|
||||
|
||||
;; Clear map1 / map2 (256 bytes) to $FF
|
||||
lda #$FF
|
||||
: sta map1,y
|
||||
iny
|
||||
bne :-
|
||||
|
||||
;; Stash first two bytes of each bank (128 possible banks)
|
||||
: sty RWBANK
|
||||
lda $00
|
||||
sta stash_00,y
|
||||
lda $01
|
||||
sta stash_01,y
|
||||
iny
|
||||
bpl :-
|
||||
dey
|
||||
|
||||
;; Write bank num/complement at $0/$1
|
||||
: sty RWBANK
|
||||
sty $00
|
||||
tya
|
||||
eor #$FF
|
||||
sta $01
|
||||
dey
|
||||
bne :-
|
||||
|
||||
;; Y = 0
|
||||
|
||||
;; Reset signature bytes on main/aux banks
|
||||
sty RWBANK
|
||||
sty $00
|
||||
sty $01
|
||||
sta ALTZPOFF
|
||||
sty $00
|
||||
sty $01
|
||||
sta ALTZPON
|
||||
|
||||
lda banks_to_reserve
|
||||
sta reserved_banks
|
||||
|
||||
;;; ============================================================
|
||||
|
||||
;; Copy into every bank
|
||||
ldy #1
|
||||
bank_loop:
|
||||
;; Check bank for signature bytes (bank num/complement at $0/$1)
|
||||
sty RWBANK
|
||||
cpy $00
|
||||
bne next_bank
|
||||
tya
|
||||
eor #$FF
|
||||
eor $01
|
||||
bne next_bank
|
||||
cpy $00 ; Bank 0 (aux) is reserved for 128k apps
|
||||
bne next_bank
|
||||
|
||||
;; Flag as available in map2
|
||||
;; (map2,N = N if available, $FF otherwise)
|
||||
tya
|
||||
sta map2,y
|
||||
|
||||
;; Skip over reserved banks, then start storing them in the map
|
||||
ldx reserved_banks
|
||||
bne :+
|
||||
sta first_used_bank
|
||||
: dec reserved_banks
|
||||
bpl next_bank
|
||||
sta map1,y
|
||||
;; (map1,N = N if available, $FF otherwise - also???)
|
||||
|
||||
;; Copy helper proc into bank's ZP
|
||||
ldx #sizeof_zpproc
|
||||
: lda zpproc-1,x
|
||||
sta zpproc_addr-1,x
|
||||
dex
|
||||
bne :-
|
||||
|
||||
next_bank:
|
||||
iny
|
||||
bpl bank_loop
|
||||
|
||||
;;; ============================================================
|
||||
|
||||
;; Y = $80
|
||||
|
||||
;; Restore stashed $0/$1 bytes of back
|
||||
;; (except first, in first_used_bank ???)
|
||||
loop0: lda map2-1,y
|
||||
bmi :+
|
||||
cmp first_used_bank
|
||||
beq :+
|
||||
sta RWBANK
|
||||
lda stash_00-1,y
|
||||
sta $00
|
||||
lda stash_01-1,y
|
||||
sta $01
|
||||
: dey
|
||||
bne loop0
|
||||
|
||||
;; Y = 0
|
||||
sty RWBANK
|
||||
sty $00
|
||||
|
||||
;; Count number of available banks, and populate
|
||||
;; driver_bank_list with list of banks.
|
||||
ldx #$FF
|
||||
loop1: inx
|
||||
cpx #kMaxUsableBanks
|
||||
bcs break
|
||||
loop2: iny
|
||||
bmi break
|
||||
lda map1,y
|
||||
bmi loop2
|
||||
sta driver_bank_list,x
|
||||
bpl loop1
|
||||
break:
|
||||
;; Patch driver with block-specific data
|
||||
;; X = number of available banks
|
||||
|
||||
;; Compute number of blocks
|
||||
txa
|
||||
lsr a
|
||||
sta vol_dir_header+VolumeDirectoryHeader::total_blocks+1
|
||||
ror vol_dir_header+VolumeDirectoryHeader::total_blocks
|
||||
|
||||
stx driver_block_x ; num banks
|
||||
dex ; -1
|
||||
stx num_banks_minus_one
|
||||
|
||||
bmi fail ; 0 banks? give up.
|
||||
|
||||
lda vol_dir_header+VolumeDirectoryHeader::total_blocks
|
||||
sec
|
||||
sbc driver_block_x
|
||||
and #$F8
|
||||
sta vol_dir_header+VolumeDirectoryHeader::total_blocks
|
||||
sta driver_blocks_lo
|
||||
bcs :+
|
||||
dec vol_dir_header+VolumeDirectoryHeader::total_blocks+1
|
||||
: lda vol_dir_header+VolumeDirectoryHeader::total_blocks+1
|
||||
sta driver_blocks_hi
|
||||
|
||||
lda driver_bank_list
|
||||
sta RWBANK
|
||||
lda $00
|
||||
beq fail
|
||||
|
||||
;; Check for ZP signature - if not found, set it and install.
|
||||
ldx #2
|
||||
: lda L23A0,x
|
||||
cmp $06,x
|
||||
bne set_sig
|
||||
dex
|
||||
bpl :-
|
||||
|
||||
bit BUTN1 ; escape hatch in case of loop ???
|
||||
bmi L21F0
|
||||
jmp do_install
|
||||
|
||||
fail: jmp do_chain
|
||||
|
||||
sloop: lda L23A0,x
|
||||
set_sig:
|
||||
sta $06,x
|
||||
dex
|
||||
bpl sloop
|
||||
|
||||
;;; ============================================================
|
||||
|
||||
;;; Prepare key blocks in
|
||||
|
||||
L21F0: sta ALTZPOFF
|
||||
|
||||
;; Stamp current date/time into vol_dir_header
|
||||
ldy #3
|
||||
: lda DATELO,y
|
||||
sta vol_dir_header+VolumeDirectoryHeader::creation_date,y
|
||||
dey
|
||||
bpl :-
|
||||
|
||||
;; Fill pages $06-$0F with 00-FF
|
||||
sta RAMWRTON
|
||||
iny
|
||||
tya
|
||||
: sta $0600,y
|
||||
sta $0700,y
|
||||
sta $0800,y
|
||||
sta $0900,y
|
||||
sta $0A00,y
|
||||
sta $0B00,y
|
||||
sta $0C00,y
|
||||
sta $0D00,y
|
||||
sta $0E00,y
|
||||
sta $0F00,y
|
||||
iny
|
||||
bne :-
|
||||
|
||||
;; Copy vol_dir_header into page $06
|
||||
ldy #.sizeof(VolumeDirectoryHeader)-1
|
||||
: lda vol_dir_header,y
|
||||
sta $0600,y
|
||||
dey
|
||||
bpl :-
|
||||
|
||||
ldy #$02
|
||||
sty $0800
|
||||
iny
|
||||
sty $0A00
|
||||
iny
|
||||
sty $0C00
|
||||
sty $0802
|
||||
iny
|
||||
sty $0A02
|
||||
|
||||
ptr := $3C
|
||||
lda vol_dir_header+VolumeDirectoryHeader::total_blocks
|
||||
sta ptr
|
||||
lda vol_dir_header+VolumeDirectoryHeader::total_blocks+1
|
||||
lsr a
|
||||
ror ptr
|
||||
lsr a
|
||||
ror ptr
|
||||
lsr a
|
||||
ror ptr
|
||||
clc
|
||||
adc #$0E
|
||||
sta ptr+1
|
||||
|
||||
ldy #0
|
||||
tya
|
||||
: sta (ptr),y
|
||||
lda ptr
|
||||
sec
|
||||
sbc #1
|
||||
sta ptr
|
||||
lda #$FF
|
||||
bcs :-
|
||||
dec ptr+1
|
||||
ldx ptr+1
|
||||
cpx #$0E
|
||||
bcs :-
|
||||
lda #$01
|
||||
sta $0E00
|
||||
|
||||
;;; ============================================================
|
||||
|
||||
do_install:
|
||||
lda #0
|
||||
sta RAMWRTOFF
|
||||
sta ALTZPOFF
|
||||
sta RWBANK
|
||||
bit LCBANK1
|
||||
bit LCBANK1
|
||||
|
||||
lda #OPC_CLD ; signature
|
||||
cmp driver_target
|
||||
beq copy_driver
|
||||
sta ALTZPON ; Maybe in AUX?
|
||||
cmp driver_target
|
||||
beq copy_driver
|
||||
cmp $DE00 ; ???
|
||||
beq copy_driver
|
||||
sta ALTZPOFF
|
||||
|
||||
;; Copy driver into place
|
||||
copy_driver:
|
||||
ldy #0
|
||||
: lda driver_src,y
|
||||
sta driver_target,y
|
||||
iny
|
||||
cpy #sizeof_driver
|
||||
bcc :-
|
||||
|
||||
;; Check if slot already has a device
|
||||
ldy DEVCNT
|
||||
: lda DEVLST,y
|
||||
lsr a
|
||||
lsr a
|
||||
lsr a
|
||||
lsr a
|
||||
cmp slot
|
||||
beq install_device
|
||||
dey
|
||||
bpl :-
|
||||
|
||||
;; Shift devices up by one
|
||||
inc DEVCNT
|
||||
ldy DEVCNT
|
||||
: lda DEVLST-1,y
|
||||
sta DEVLST,y
|
||||
dey
|
||||
bne :-
|
||||
|
||||
;; Install device in ProDOS via DEVLST/DEVADR.
|
||||
;; (Y has index in DEVLST)
|
||||
install_device:
|
||||
lda slot
|
||||
asl a
|
||||
tax
|
||||
asl a
|
||||
asl a
|
||||
asl a
|
||||
sta on_line_params+1 ; unit_number
|
||||
ora #$0E ; $3E - signature byte used by DeskTop
|
||||
sta DEVLST,y
|
||||
copy16 #(driver_target+1), DEVADR,x
|
||||
|
||||
;; Did we install into S3D2?
|
||||
lda slot
|
||||
cmp #$0B ; Slot 3 Drive 2
|
||||
beq finish
|
||||
|
||||
;; No, so uninstall S3D2 (regular /RAM)
|
||||
ldy DEVCNT
|
||||
: lda DEVLST,y
|
||||
and #$F0
|
||||
cmp #$B0 ; Slot 3 drive 2 i.e. normal /RAM
|
||||
beq found
|
||||
dey
|
||||
bpl :-
|
||||
bmi finish ; always
|
||||
|
||||
;; Actually remove from DEVLST
|
||||
slot3d2_devadr := DEVADR + $10 + 3*2
|
||||
found: ldx slot3d2_devadr + 1
|
||||
inx
|
||||
bne finish
|
||||
: copy DEVLST+1,y, DEVLST,y
|
||||
iny
|
||||
cpy DEVCNT
|
||||
bcc :-
|
||||
beq :-
|
||||
dec DEVCNT
|
||||
copy16 NODEV, slot3d2_devadr ; clear driver
|
||||
|
||||
finish: bit ROMIN2
|
||||
MLI_CALL ON_LINE, on_line_params
|
||||
ldx #$00
|
||||
lda on_line_params_buffer
|
||||
ora L239F
|
||||
bne do_chain
|
||||
bcc do_chain
|
||||
copy #$FF, L239F
|
||||
sta ALTZPON
|
||||
copy driver_bank_list, RWBANK
|
||||
stx $06
|
||||
stx RWBANK
|
||||
stx vol_dir_header+VolumeDirectoryHeader::total_blocks
|
||||
jmp install_driver ; retry???
|
||||
|
||||
do_chain:
|
||||
sta ALTZPOFF
|
||||
jmp chain_target
|
||||
|
||||
;;; ============================================================
|
||||
;;; Installed on zero page of each bank at $B0
|
||||
|
||||
saved_org .set *
|
||||
.proc zpproc
|
||||
.org ::zpproc_addr
|
||||
|
||||
sta $E0 ; dst1 hi
|
||||
bcs :+
|
||||
sty $E0 ; dst1 hi
|
||||
tay
|
||||
: lda #$00
|
||||
sta RAMWRTON
|
||||
bcc :+
|
||||
txa
|
||||
ldx #$00
|
||||
sta RAMWRTOFF
|
||||
sta RAMRDON
|
||||
|
||||
;; One block = two pages
|
||||
: sty $DD ; src1 hi
|
||||
iny
|
||||
sty $E3 ; src2 hi
|
||||
|
||||
sta $DF ; dst1 lo
|
||||
sta $E5 ; dst2 lo
|
||||
|
||||
stx $DC ; src1 lo
|
||||
stx $E2 ; src2 lo
|
||||
|
||||
ldy $E0 ; dst1 hi
|
||||
iny
|
||||
sty $E6 ; dst2 hi
|
||||
|
||||
ldy #$00
|
||||
: lda $1000,y ; src1
|
||||
sta $1000,y ; dst1
|
||||
lda $1000,y ; src2
|
||||
sta $1000,y ; dst2
|
||||
iny
|
||||
bne :-
|
||||
|
||||
sta RAMWRTOFF
|
||||
sta RAMRDOFF
|
||||
clc
|
||||
bit $02E4
|
||||
rts
|
||||
.endproc
|
||||
sizeof_zpproc := .sizeof(zpproc)
|
||||
.org (saved_org + .sizeof(zpproc))
|
||||
|
||||
;;; ============================================================
|
||||
|
||||
on_line_params_buffer := $220
|
||||
DEFINE_ON_LINE_PARAMS on_line_params, $30, on_line_params_buffer
|
||||
|
||||
num_banks_minus_one:
|
||||
.byte 0
|
||||
|
||||
L239F: .byte 0
|
||||
L23A0: .byte $C7, $C5, $C2 ; signature sequence ???
|
||||
|
||||
;; Volume Directory Header
|
||||
.proc vol_dir_header
|
||||
.word 0 ; preceding block number
|
||||
.word $03 ; succeeding block number
|
||||
.byte ST_VOLUME_DIRECTORY << 4 | 3 ; storage type / name length
|
||||
.byte "RAM" ; name field is 15 bytes
|
||||
.res 15-3
|
||||
.res 8, 0 ; reserved (8 bytes)
|
||||
.word 0, 0 ; creation date/time
|
||||
.byte 1 ; version (1 = ProDOS 2.0)
|
||||
.byte 0 ; min_version
|
||||
.byte ACCESS_DEFAULT ; access
|
||||
.byte $27 ; entry_length
|
||||
.byte $D ; entries_per_block
|
||||
.word 0 ; file_count
|
||||
.word 6 ; bit_map_pointer
|
||||
blocks: .word 0 ; total_blocks
|
||||
.endproc
|
||||
.assert .sizeof(vol_dir_header) = .sizeof(VolumeDirectoryHeader), error, "Size mismatch"
|
||||
|
||||
.endproc
|
||||
|
||||
;;; ============================================================
|
||||
;;; Ram Disk Driver - installed at $FF00
|
||||
;;; ============================================================
|
||||
|
||||
saved_org .set *
|
||||
.proc driver_src
|
||||
.org ::driver_target
|
||||
driver_start := *
|
||||
|
||||
start: cld ; used as a signature
|
||||
|
||||
lda DRIVER_COMMAND
|
||||
bne not_status
|
||||
driver_blocks_lo := *+1
|
||||
ldx #0 ; self-modified - blocks low
|
||||
driver_blocks_hi := *+1
|
||||
ldy #0 ; self-modified - blocks high
|
||||
LFF09: clc
|
||||
bcc LFF83 ; always
|
||||
|
||||
not_status:
|
||||
cmp #DRIVER_COMMAND_FORMAT
|
||||
beq LFF09
|
||||
|
||||
;; COMMAND_READ or COMMAND_WRITE
|
||||
LFF10: lda #$27
|
||||
bcs rts1
|
||||
|
||||
lda RD80STORE
|
||||
pha
|
||||
sta CLR80COL
|
||||
|
||||
;; Save $40/41
|
||||
lda $40
|
||||
pha
|
||||
lda $41
|
||||
pha
|
||||
|
||||
lda DRIVER_BUFFER
|
||||
sta $40
|
||||
ldx DRIVER_BUFFER+1
|
||||
inx
|
||||
stx $41
|
||||
|
||||
jsr install_zpproc_relay
|
||||
|
||||
zpproc_relay_patch1_offset := $04
|
||||
stx zpproc_relay_addr + zpproc_relay_patch1_offset
|
||||
lda RDALTZP
|
||||
|
||||
zpproc_relay_patch2_offset := $14
|
||||
sta zpproc_relay_addr + zpproc_relay_patch2_offset
|
||||
lda DRIVER_BLOCK_NUMBER+1
|
||||
pha
|
||||
tax
|
||||
lda DRIVER_BLOCK_NUMBER
|
||||
LFF3C: sec
|
||||
: iny
|
||||
sbc #$7F
|
||||
bcs :-
|
||||
dex
|
||||
bpl LFF3C
|
||||
|
||||
tya
|
||||
adc DRIVER_BLOCK_NUMBER
|
||||
bcc :+
|
||||
inc DRIVER_BLOCK_NUMBER+1
|
||||
: asl a
|
||||
tay
|
||||
lda DRIVER_BLOCK_NUMBER+1
|
||||
rol a
|
||||
tax
|
||||
pla
|
||||
sta DRIVER_BLOCK_NUMBER+1
|
||||
driver_block_x := *+1
|
||||
cpx #$0 ; self-modified - ???
|
||||
bcs LFF74
|
||||
|
||||
tya
|
||||
sbc #191
|
||||
cmp #16
|
||||
bcs :+
|
||||
adc #208
|
||||
|
||||
tay
|
||||
bit LCBANK2
|
||||
: lda DRIVER_COMMAND
|
||||
lsr a ; carry set = READ, clear = WRITE
|
||||
lda bank_list,x
|
||||
ldx DRIVER_BUFFER
|
||||
jsr zpproc_relay_addr
|
||||
bit LCBANK1
|
||||
|
||||
LFF74: jsr install_zpproc_relay
|
||||
|
||||
;; Restore $40/41
|
||||
pla
|
||||
sta $41
|
||||
pla
|
||||
sta $40
|
||||
|
||||
pla
|
||||
bpl LFF83
|
||||
sta SET80COL
|
||||
LFF83: lda #$00
|
||||
bcs LFF10
|
||||
|
||||
rts1: rts
|
||||
|
||||
install_zpproc_relay:
|
||||
ldy #sizeof_zpproc_relay+1
|
||||
: ldx zpproc_relay-1,y
|
||||
lda zpproc_relay_addr-1,y
|
||||
sta zpproc_relay-1,y
|
||||
txa
|
||||
sta zpproc_relay_addr-1,y
|
||||
dey
|
||||
bne :-
|
||||
|
||||
ldx DRIVER_BUFFER+1
|
||||
bpl done
|
||||
bit DRIVER_BUFFER+1
|
||||
bvc done
|
||||
|
||||
: ldx $8000,y
|
||||
lda (DRIVER_BUFFER),y
|
||||
sta $8000,y
|
||||
txa
|
||||
sta (DRIVER_BUFFER),y
|
||||
ldx $8100,y
|
||||
lda ($40),y
|
||||
sta $8100,y
|
||||
txa
|
||||
sta ($40),y
|
||||
iny
|
||||
bne :-
|
||||
|
||||
ldx #$80
|
||||
done: rts
|
||||
|
||||
bank_list:
|
||||
.res ::kMaxUsableBanks, 0
|
||||
|
||||
.proc zpproc_relay
|
||||
sta RWBANK
|
||||
|
||||
patch_loc1 := *+1
|
||||
lda #$00
|
||||
sta ALTZPON
|
||||
jsr zpproc_addr
|
||||
sty RWBANK
|
||||
bmi :+
|
||||
sta ALTZPOFF
|
||||
: rts
|
||||
|
||||
patch_loc2 := *
|
||||
.endproc
|
||||
sizeof_zpproc_relay := .sizeof(zpproc_relay)
|
||||
patch_loc1_offset := zpproc_relay::patch_loc1 - zpproc_relay
|
||||
patch_loc2_offset := zpproc_relay::patch_loc2 - zpproc_relay
|
||||
;; These offsets can't be used directly due to ca65 addressing mode
|
||||
;; assumptions, so just verify they are correct.
|
||||
.assert zpproc_relay_patch1_offset = patch_loc1_offset, error, "Offset mismatch"
|
||||
.assert zpproc_relay_patch2_offset = patch_loc2_offset, error, "Offset mismatch"
|
||||
|
||||
.byte 0
|
||||
|
||||
.endproc
|
||||
sizeof_driver := .sizeof(driver_src)
|
||||
.org (saved_org + .sizeof(driver_src))
|
||||
|
||||
driver_blocks_lo := driver_src + driver_src::driver_blocks_lo - driver_src::driver_start
|
||||
driver_blocks_hi := driver_src + driver_src::driver_blocks_hi - driver_src::driver_start
|
||||
driver_block_x := driver_src + driver_src::driver_block_x - driver_src::driver_start
|
||||
driver_bank_list := driver_src + driver_src::bank_list - driver_src::driver_start
|
||||
|
||||
;;; Scratch space beyond code used during install
|
||||
|
||||
reserved_banks := *
|
||||
first_used_bank := *+1
|
||||
map1 := *+2
|
||||
map2 := *+2+$80
|
||||
stash_00 := *+2+$100
|
||||
stash_01 := *+2+$180
|
|
@ -1,9 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Run this from the ram.system directory
|
||||
|
||||
set -e
|
||||
source "../res/util.sh"
|
||||
|
||||
#do_make clean
|
||||
do_make all
|
BIN
res/BASIC.SYSTEM
Normal file
BIN
res/BASIC.SYSTEM
Normal file
Binary file not shown.
BIN
res/PRODOS
Normal file
BIN
res/PRODOS
Normal file
Binary file not shown.
|
@ -5,7 +5,7 @@ A2DeskTop.po is an 800k image containing the full application and
|
|||
all accessories. It can be transferred to an 3.5" floppy using ADTPro.
|
||||
|
||||
DeskTop.po, DeskAccessories.po and Preview.po are 140k images
|
||||
containing different parts of the application, and can be trasnferred to
|
||||
containing different parts of the application, and can be transferred to
|
||||
5.25" floppies using ADTPro.
|
||||
|
||||
Installation
|
||||
|
@ -31,12 +31,6 @@ directory:
|
|||
* `SELECTOR.LIST` holds the Selector menu entries, which allow
|
||||
for quick launching of other applications.
|
||||
|
||||
Other Files
|
||||
-----------
|
||||
|
||||
The `RAM.SYSTEM` file will create a RAM Disk on RamWorks drives. It can
|
||||
be run manually before launching `DeskTop`
|
||||
|
||||
Tips and Tricks
|
||||
---------------
|
||||
|
||||
|
|
|
@ -57,14 +57,16 @@ while (<STDIN>) {
|
|||
$_ .= ' ' while length($_) % $tab;
|
||||
$_ .= ':= ' . $expression . ' ';
|
||||
|
||||
} elsif (m/^(\.(?:end)?(?:proc|scope|macro|struct|enum)\b)\s*(.*)$/) {
|
||||
} elsif (m/^(\.(?:end)?(?:proc|scope|macro|struct|enum)\b)\s*(.*)$/ ||
|
||||
m/^(\b(?:END_)?(?:PROC_AT)\b)\s*(.*)$/) {
|
||||
|
||||
# scope - flush left
|
||||
my ($opcode, $arguments) = ($1 // '', $2 // '');
|
||||
|
||||
$_ = $opcode . ' ' . $arguments;
|
||||
|
||||
} elsif (m/^(\.(?:if\w*|elseif|else|endif)\b)\s*(.*)$/) {
|
||||
} elsif (m/^(\.(?:if\w*|elseif|else|endif)\b)\s*(.*)$/ ||
|
||||
m/^(\b(?:IF_\w+|ELSE|END_IF)\b)\s*(.*)$/) {
|
||||
|
||||
# conditional - half indent left
|
||||
my ($opcode, $arguments) = ($1 // '', $2 // '');
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
set -e
|
||||
source "res/util.sh"
|
||||
|
||||
for i in desktop desk.acc preview desktop.system ram.system; do
|
||||
for i in desktop desk.acc preview desktop.system; do
|
||||
cecho yellow Building: $i
|
||||
cd $i
|
||||
res/go.sh
|
||||
|
|
19
res/mount.sh
19
res/mount.sh
|
@ -7,7 +7,20 @@ source "res/util.sh"
|
|||
|
||||
mkdir -p mount/desk.acc || (cecho red "permission denied"; exit 1)
|
||||
|
||||
# Mount file xxx.built as $F1 file
|
||||
function mount_f1 {
|
||||
srcdir="$2"
|
||||
dstdir="$3"
|
||||
uppercase=$(echo "$1" | tr /a-z/ /A-Z/)
|
||||
src="$srcdir/out/$1.built"
|
||||
dst="$dstdir/$uppercase.\$F1"
|
||||
cp "$src" "$dst" \
|
||||
&& (cecho green "mounted $dst" ) \
|
||||
|| (cecho red "failed to mount $dst" ; return 1)
|
||||
}
|
||||
|
||||
# Mount file xxx.built as $F1 file, with DA auxtype
|
||||
function mount_da {
|
||||
srcdir="$2"
|
||||
dstdir="$3"
|
||||
uppercase=$(echo "$1" | tr /a-z/ /A-Z/)
|
||||
|
@ -19,6 +32,7 @@ function mount_f1 {
|
|||
|| (cecho red "failed to mount $dst" ; return 1)
|
||||
}
|
||||
|
||||
# Mount file xxx.SYS as SYS file
|
||||
function mount_sys {
|
||||
srcdir="$2"
|
||||
dstdir="$3"
|
||||
|
@ -35,14 +49,13 @@ mkdir -p mount
|
|||
|
||||
mount_f1 "desktop2" "desktop" "mount"
|
||||
mount_sys "desktop.system" "desktop.system" "mount"
|
||||
mount_sys "ram.system" "ram.system" "mount"
|
||||
|
||||
mkdir -p mount/desk.acc
|
||||
for file in $(cat desk.acc/TARGETS); do
|
||||
mount_f1 "$file" "desk.acc" "mount/desk.acc"
|
||||
mount_da "$file" "desk.acc" "mount/desk.acc"
|
||||
done
|
||||
|
||||
mkdir -p mount/preview
|
||||
for file in $(cat preview/TARGETS); do
|
||||
mount_f1 "$file" "preview" "mount/preview"
|
||||
mount_da "$file" "preview" "mount/preview"
|
||||
done
|
||||
|
|
|
@ -7,12 +7,16 @@ set -e
|
|||
|
||||
CADIUS="${CADIUS:-$HOME/dev/cadius/bin/release/cadius}"
|
||||
|
||||
DAS=$(cat desk.acc/TARGETS)
|
||||
DA_DIRS="desk.acc preview"
|
||||
|
||||
PACKDIR="out/package"
|
||||
FINFO="$PACKDIR/_FileInformation.txt"
|
||||
IMGFILE="out/A2DeskTop.po"
|
||||
VOLNAME="A2.DESKTOP"
|
||||
VOLNAME="A2.DeskTop"
|
||||
|
||||
function titlecase {
|
||||
echo "$@" | perl -pne 's/(^(.)|\.(.))/uc($1)/eg'
|
||||
}
|
||||
|
||||
mkdir -p "$PACKDIR"
|
||||
echo "" > "$FINFO"
|
||||
|
@ -20,32 +24,55 @@ echo "" > "$FINFO"
|
|||
# Prepare _FileInformation.txt file with extra ProDOS file entry data
|
||||
# and copy renamed files into package directory.
|
||||
|
||||
for file in $DAS; do
|
||||
ucfile=$(echo $file | tr a-z A-Z)
|
||||
echo "$ucfile=Type(F1),AuxType(0640),VersionCreate(00),MinVersion(B9),Access(E3),FolderInfo1(000000000000000000000000000000000000),FolderInfo2(000000000000000000000000000000000000)" >> "$FINFO"
|
||||
cp "desk.acc/out/$file.built" "out/package/$ucfile"
|
||||
for da_dir in $DA_DIRS; do
|
||||
for file in $(cat $da_dir/TARGETS); do
|
||||
tcfile=$(titlecase $file)
|
||||
echo "$tcfile=Type(F1),AuxType(0640),VersionCreate(00),MinVersion(00),Access(E3),FolderInfo1(000000000000000000000000000000000000),FolderInfo2(000000000000000000000000000000000000)" >> "$FINFO"
|
||||
cp "$da_dir/out/$file.built" "out/package/$tcfile"
|
||||
done
|
||||
done
|
||||
|
||||
cat > "$FINFO" <<EOF
|
||||
DESKTOP.SYSTEM=Type(FF),AuxType(0),VersionCreate(00),MinVersion(B9),Access(E3),FolderInfo1(000000000000000000000000000000000000),FolderInfo2(000000000000000000000000000000000000)
|
||||
DESKTOP2=Type(F1),AuxType(0),VersionCreate(00),MinVersion(B9),Access(E3),FolderInfo1(000000000000000000000000000000000000),FolderInfo2(000000000000000000000000000000000000)
|
||||
cat >> "$FINFO" <<EOF
|
||||
DeskTop.system=Type(FF),AuxType(0),VersionCreate(00),MinVersion(00),Access(E3),FolderInfo1(000000000000000000000000000000000000),FolderInfo2(000000000000000000000000000000000000)
|
||||
DeskTop2=Type(F1),AuxType(0),VersionCreate(00),MinVersion(00),Access(E3),FolderInfo1(000000000000000000000000000000000000),FolderInfo2(000000000000000000000000000000000000)
|
||||
ProDOS=Type(FF),AuxType(0),VersionCreate(00),MinVersion(00),Access(E3),FolderInfo1(000000000000000000000000000000000000),FolderInfo2(000000000000000000000000000000000000)
|
||||
BASIC.system=Type(FF),AuxType(0),VersionCreate(00),MinVersion(00),Access(E3),FolderInfo1(000000000000000000000000000000000000),FolderInfo2(000000000000000000000000000000000000)
|
||||
EOF
|
||||
|
||||
cp "desktop.system/out/desktop.system.SYS" "$PACKDIR/DESKTOP.SYSTEM"
|
||||
cp "desktop/out/DESKTOP2.built" "$PACKDIR/DESKTOP2"
|
||||
cp "desktop.system/out/desktop.system.SYS" "$PACKDIR/DeskTop.system"
|
||||
cp "desktop/out/DESKTOP2.built" "$PACKDIR/DeskTop2"
|
||||
|
||||
# If ProDOS/BASIC.system are present in res/, install them too.
|
||||
if [ -e "res/PRODOS" ]; then
|
||||
cp "res/PRODOS" "$PACKDIR/ProDOS"
|
||||
fi
|
||||
if [ -e "res/BASIC.SYSTEM" ]; then
|
||||
cp "res/BASIC.SYSTEM" "$PACKDIR/BASIC.system"
|
||||
fi
|
||||
|
||||
# Create a new disk image.
|
||||
|
||||
rm -f $IMGFILE
|
||||
|
||||
$CADIUS CREATEVOLUME $IMGFILE $VOLNAME 800KB
|
||||
$CADIUS CREATEFOLDER $IMGFILE "/$VOLNAME/DESK.ACC"
|
||||
for da_dir in $DA_DIRS; do
|
||||
$CADIUS CREATEFOLDER $IMGFILE "/$VOLNAME/$(titlecase $da_dir)"
|
||||
done
|
||||
|
||||
# Add the files into the disk image.
|
||||
|
||||
for file in $DAS; do
|
||||
ucfile=$(echo $file | tr a-z A-Z)
|
||||
$CADIUS ADDFILE $IMGFILE "/$VOLNAME/DESK.ACC" $PACKDIR/$ucfile
|
||||
for da_dir in $DA_DIRS; do
|
||||
for file in $(cat $da_dir/TARGETS); do
|
||||
$CADIUS ADDFILE $IMGFILE "/$VOLNAME/$(titlecase $da_dir)" "$PACKDIR/$(titlecase $file)"
|
||||
done
|
||||
done
|
||||
|
||||
for file in DESKTOP.SYSTEM DESKTOP2; do
|
||||
$CADIUS ADDFILE $IMGFILE "/$VOLNAME" $PACKDIR/$file
|
||||
for file in DeskTop.system DeskTop2; do
|
||||
$CADIUS ADDFILE $IMGFILE "/$VOLNAME" "$PACKDIR/$file"
|
||||
done
|
||||
|
||||
for file in ProDOS BASIC.system; do
|
||||
if [ -e "$PACKDIR/$file" ]; then
|
||||
$CADIUS ADDFILE $IMGFILE "/$VOLNAME" "$PACKDIR/$file"
|
||||
fi
|
||||
done
|
||||
|
|
80
res/shk.sh
Executable file
80
res/shk.sh
Executable file
|
@ -0,0 +1,80 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Run this from the top level directory
|
||||
|
||||
# Use nulib2 to create a ShrinkIt! archive for distribution
|
||||
# https://nulib.com
|
||||
|
||||
set -e
|
||||
|
||||
PNULIB2=`which nulib2`
|
||||
PNULIB2="${PNULIB2:-$HOME/dev/nulib2/nulib2/nulib2}"
|
||||
NULIB2="${NULIB2:-$PNULIB2}"
|
||||
|
||||
set -e
|
||||
source "res/util.sh"
|
||||
|
||||
tempdir=$(mktemp -d -t SHK)
|
||||
[ -d "${tempdir}" ] || (cecho red "cannot make tempdir"; exit 1)
|
||||
|
||||
mkdir -p "${tempdir}/desk.acc" || (cecho red "permission denied"; exit 1)
|
||||
|
||||
rm -f A2D.SHK
|
||||
|
||||
# With $F1 type, aux type $0000
|
||||
function mount_f1 {
|
||||
srcdir="$2"
|
||||
dstdir="$3"
|
||||
uppercase=$(echo "$1" | tr /a-z/ /A-Z/)
|
||||
src="$srcdir/out/$1.built"
|
||||
dst="$dstdir/$uppercase#F10000"
|
||||
cp "$src" "$dst" \
|
||||
&& (cecho green "wrote $dst" ) \
|
||||
|| (cecho red "failed to write $dst" ; return 1)
|
||||
}
|
||||
|
||||
# With $F1 type, aux type $0640
|
||||
function mount_da {
|
||||
srcdir="$2"
|
||||
dstdir="$3"
|
||||
uppercase=$(echo "$1" | tr /a-z/ /A-Z/)
|
||||
src="$srcdir/out/$1.built"
|
||||
dst="$dstdir/$uppercase#F10640"
|
||||
cp "$src" "$dst" \
|
||||
&& (cecho green "wrote $dst" ) \
|
||||
|| (cecho red "failed to write $dst" ; return 1)
|
||||
}
|
||||
|
||||
|
||||
function mount_sys {
|
||||
srcdir="$2"
|
||||
dstdir="$3"
|
||||
uppercase=$(echo "$1" | tr /a-z/ /A-Z/)
|
||||
src="$srcdir/out/$1.SYS"
|
||||
dst="$dstdir/$uppercase#FF0000"
|
||||
cp "$src" "$dst" \
|
||||
&& (cecho green "wrote $dst" ) \
|
||||
|| (cecho red "failed to write $dst" ; return 1)
|
||||
}
|
||||
|
||||
echo "Copying files to ${tempdir}/"
|
||||
mkdir -p mount
|
||||
|
||||
mount_f1 "desktop2" "desktop" "${tempdir}"
|
||||
mount_sys "desktop.system" "desktop.system" "${tempdir}"
|
||||
|
||||
mkdir -p "${tempdir}/desk.acc"
|
||||
for file in $(cat desk.acc/TARGETS); do
|
||||
mount_da "$file" "desk.acc" "${tempdir}/desk.acc"
|
||||
done
|
||||
|
||||
mkdir -p "${tempdir}/preview"
|
||||
for file in $(cat preview/TARGETS); do
|
||||
mount_da "$file" "preview" "${tempdir}/preview"
|
||||
done
|
||||
cdir=`pwd`
|
||||
cd "${tempdir}"
|
||||
nulib2 aer "${cdir}/A2D.SHK" * || (cecho red "failed to write ${cdir}/A2D.SHK" ; return 1)
|
||||
cd "${cdir}"
|
||||
rm -rf "${tempdir}"
|
||||
ls -l A2D.SHK
|
Loading…
Reference in New Issue
Block a user