mirror of
https://github.com/callapple/Twilight_II.git
synced 2024-12-28 18:29:53 +00:00
Add files via upload
This commit is contained in:
parent
e6f1db1ecf
commit
20feb290ae
BIN
source/twilight/nm/SharksNFish.Dox
Normal file
BIN
source/twilight/nm/SharksNFish.Dox
Normal file
Binary file not shown.
2
source/twilight/nm/ToastEntry2.inf
Normal file
2
source/twilight/nm/ToastEntry2.inf
Normal file
@ -0,0 +1,2 @@
|
||||
Toast Entry by Joseph Lee.
|
||||
internet: jlee@bonnie.ics.uci.edu
|
BIN
source/twilight/nm/nu/FishPix
Normal file
BIN
source/twilight/nm/nu/FishPix
Normal file
Binary file not shown.
BIN
source/twilight/nm/nu/ToastPix
Normal file
BIN
source/twilight/nm/nu/ToastPix
Normal file
Binary file not shown.
BIN
source/twilight/nm/nu/nu2/FishPix
Normal file
BIN
source/twilight/nm/nu/nu2/FishPix
Normal file
Binary file not shown.
BIN
source/twilight/nm/nu/nu2/ToastPix
Normal file
BIN
source/twilight/nm/nu/nu2/ToastPix
Normal file
Binary file not shown.
BIN
source/twilight/nm/nu/nu2/World
Normal file
BIN
source/twilight/nm/nu/nu2/World
Normal file
Binary file not shown.
BIN
source/twilight/nm/nu/nu2/World1
Normal file
BIN
source/twilight/nm/nu/nu2/World1
Normal file
Binary file not shown.
BIN
source/twilight/nm/nu/nu2/World2
Normal file
BIN
source/twilight/nm/nu/nu2/World2
Normal file
Binary file not shown.
BIN
source/twilight/nm/nu/nu2/World3
Normal file
BIN
source/twilight/nm/nu/nu2/World3
Normal file
Binary file not shown.
165
source/twilight/nm/nu/nu2/njm.t2.ver.hist
Normal file
165
source/twilight/nm/nu/nu2/njm.t2.ver.hist
Normal file
@ -0,0 +1,165 @@
|
||||
Clocks
|
||||
v1.2b2 - First Tracked version...
|
||||
|
||||
Changes Since T2 1.1
|
||||
- Digital Clock now uses color cycling to draw things much more smoothly.
|
||||
- Timing should be much smoother for all modes
|
||||
|
||||
Want to do
|
||||
- Make Analog Clock use color cycling, too.
|
||||
- Clinton Clocks (run backwards)
|
||||
- Chimes on the hour/half?
|
||||
|
||||
Fish
|
||||
v1.2b2 - First Tracked version...
|
||||
|
||||
New for T2 1.2
|
||||
|
||||
v1.2b3
|
||||
|
||||
Changes Made
|
||||
- APF Support. (Finally!).
|
||||
|
||||
Want to do
|
||||
- Make even faster
|
||||
- Sounds
|
||||
- Bubbles?
|
||||
- Seafloor?
|
||||
|
||||
Flames
|
||||
v1.2b2 - First Tracked version
|
||||
|
||||
New for T2 1.2
|
||||
|
||||
Changes since earlier beta versions
|
||||
- New default option: bouncing around. (Not so if you've had an
|
||||
earlier Flames beta.)
|
||||
|
||||
Want to do
|
||||
- Make Twice as fast, and use 3200 colors, and cook eggs as well ;)
|
||||
|
||||
Globe
|
||||
v1.2b2 - First Tracked version
|
||||
|
||||
New for T2 1.2
|
||||
|
||||
Changes since earlier beta versions
|
||||
- Smoother error handling, no debugging crashes. (Whoooooops! :)
|
||||
- Default direction is correct for this planet
|
||||
|
||||
v1.2b3
|
||||
- 16 color APF support added
|
||||
|
||||
Want to do
|
||||
- 256 APF support (I promised it in the Toast Contest file)
|
||||
- Sounds? Can anyone thing of any?
|
||||
|
||||
LedMsg
|
||||
v1.2b2 - First Tracked version
|
||||
|
||||
Changes since T2 1.1
|
||||
- 2 New fonts, selectable from a pop-up menu
|
||||
- Slightly faster scrolling code
|
||||
- Default message is put in Setup menu if all text is deleted, and
|
||||
module re-selected. This text was being put on the screen anyways
|
||||
(in lieu of an error string), so I just put it in the setup.
|
||||
- Smart Timing of the scrolling ensures that the scrolling speed
|
||||
will be much better. Basically, it always waits the max time that
|
||||
it's taken so far to scroll.
|
||||
- Briefly experimented with fillmode; too slow. I have the source
|
||||
to pour over later, though.
|
||||
|
||||
MiniFireworks
|
||||
v1.2b2 - First Tracked version
|
||||
|
||||
Changes since T2 1.1
|
||||
- Up to 15 fireworks at once, and optional launching.
|
||||
|
||||
Modern Art
|
||||
v1.2b2 - First Tracked Version
|
||||
|
||||
No significant changes since T2 1.1. If anyone has any ideas, I'd love
|
||||
to hear them.
|
||||
|
||||
Perspective
|
||||
v1.2b2 - First Tracked Version
|
||||
|
||||
No significant changes since T2 1.1. If anyone has any ideas, I'd love
|
||||
to hear them. Don't ask about 640 mode; I think it stinks.
|
||||
|
||||
Sharks And Fish
|
||||
v1.2b2 - First Tracked Version
|
||||
|
||||
No significant changes since T2 1.1. If anyone has any ideas, I'd love
|
||||
to hear them.
|
||||
|
||||
Snowflakes
|
||||
v1.2b2 - First Tracked Version
|
||||
|
||||
New since T2 1.1
|
||||
|
||||
v1.2b3
|
||||
|
||||
Changes Made
|
||||
- About dialog changed to reflect the 2.10 * 10^90 possible snowflakes
|
||||
- Brighter snowflakes. (Before, they could be any color, including
|
||||
black).
|
||||
|
||||
Spirals
|
||||
v1.2b2 - First Tracked Version
|
||||
|
||||
New since T2 1.1
|
||||
|
||||
Swirls
|
||||
v1.2b2 - First Tracked Version
|
||||
|
||||
New since T2 1.1
|
||||
|
||||
Toast
|
||||
v1.2b2 - First Tracked Version
|
||||
|
||||
New since T2 1.1
|
||||
|
||||
Changes from earlier public release
|
||||
- Contest file approved by Jim.
|
||||
- Small memory-trashing bug fixed.
|
||||
- Error Handling nicened up
|
||||
|
||||
v1.2b3
|
||||
Changes Made
|
||||
- APF support
|
||||
|
||||
Want to do
|
||||
- Make even faster
|
||||
- Sounds
|
||||
- "Classic" movement
|
||||
|
||||
Tunnelgame
|
||||
v1.2b2 - First Tracked Version
|
||||
|
||||
No significant changes since T2 1.1. If anyone has any ideas, I'd love
|
||||
to hear them.
|
||||
|
||||
|
||||
Beta Testers:
|
||||
Have fun with these modules. If you want to get in contact with me
|
||||
directly, you can do so on the internet at nathan@cco.caltech.edu. If you're
|
||||
on AOL or GEnie, you can probably get in contact with me; bug Jim for details.
|
||||
Note: Jim may want bug reports funneled through him.
|
||||
|
||||
If you have any sound effects you think would just be the coolest
|
||||
thing for some module, please send it on. I'm always open to suggestions for
|
||||
improvements, and new modules, as well.
|
||||
|
||||
|
||||
Modules I want to do. Some of these things are just random notes, so don't
|
||||
expect to understand them.
|
||||
Clinton Clocks
|
||||
THX
|
||||
MineHunt (port from my NDA source)
|
||||
Power Grid (port from NDA)
|
||||
MultiTris (port from NDA)
|
||||
Randomness(statc)
|
||||
Silver
|
||||
Waves?
|
||||
Terraform?
|
BIN
source/twilight/nm/nu/world.bw
Normal file
BIN
source/twilight/nm/nu/world.bw
Normal file
Binary file not shown.
BIN
source/twilight/nm/nu/world.navy
Normal file
BIN
source/twilight/nm/nu/world.navy
Normal file
Binary file not shown.
BIN
source/twilight/nm/nu/world.navy.hi
Normal file
BIN
source/twilight/nm/nu/world.navy.hi
Normal file
Binary file not shown.
BIN
source/twilight/nm/nu/world.turq
Normal file
BIN
source/twilight/nm/nu/world.turq
Normal file
Binary file not shown.
BIN
source/twilight/nm/nu/world.weird
Normal file
BIN
source/twilight/nm/nu/world.weird
Normal file
Binary file not shown.
95
source/twilight/nm/public.toast/ReadME.Toast.c
Normal file
95
source/twilight/nm/public.toast/ReadME.Toast.c
Normal file
@ -0,0 +1,95 @@
|
||||
Toast Twilight II Module
|
||||
v0.1b1, By Nathan Mates
|
||||
What this is:
|
||||
This is a Freeware Demonstration of the Twilight II Toast Module. There are a number of known problems/limitations with this piece of software; most will be detailed below. This is PURELY an advance release in order to spark curiosity about the upcoming update to Twilight II v1.2, and get me some fan mail. :)
|
||||
|
||||
IMPORTANT NOTICE: There are sample pictures for Fish and Globe included here. Do not try and view them using the toast module; they cannot be properly viewed. They are included simply as samples for the artwork contest (see below). In addition, Jim Maricondo (the programmer of the Twilight II CDev, and person I said to send all the artwork to) hasnÕt given me any feedback on this yet at all. So, if thereÕs any problems, itÔs because this was done at the last moment, and itÕs all my fault. Hopefully, I got all the contest details right.
|
||||
|
||||
Basically, this is a module for Twilight II, so you must have Twilight II to be able to run this. After Christmas Vacation, I may make a GS/OS Application of Toast that does not require Twilight II, but donÕt count on it. To install this module, simply copy the included Toast module (filename: ÒToastÓ) into wherever you keep the other Twilight Modules (if you have a hard disk, this is probably in the Twilight folder in the CDevs folder in the System folder of your boot disk), and place the included picture file (filename: ÒToastPixÓ) somewhere, preferably in the same folder as this module. Then, set up the Toast module, and tell it where your picture file is. (This is important!). Finally, test the Toast module and enjoy!
|
||||
|
||||
After completing a Fish module (to be released with Twilight II 1.2) in about 8 hours, I decided to see exactly how long it would take me to do a Toast module. It only took about 30 minutes more, once the artwork was acquired. I have about 6 cool new modules for Twilight II v1.2, and IÕll only give the names as a teaser (Support the IIGS! Support Twilight II!): Fish, Flames, Globe, Spirals, Swirls, Toast, and maybe 1-2 more. :) IÕve got some ideas for 60fps 200 pt graphics thatÕll knock everyoneÕs socks off!
|
||||
|
||||
Known Problems/Limitations
|
||||
Well, if you havenÕt noticed yet, this is rather like Òthat other programÕsÓ screen saver. ItÕd be real nice to release Twilight II v1.2 with this set of artwork, but they might get ticked off. Therefore, weÕre having a contest for the best new original artwork for this and 2 other modules, see below.
|
||||
This is a beta version, so if there are any problems, thatÕs to be expected. IÕve tried this out on my system; it works, and thatÕs fine with me. If you run into any problems, feel free to contact me at the address below.
|
||||
Toast, at the moment, requires its artwork to be in a $c1 (one screen, unpacked) file. Since there are only 7 graphics frames, yes, this wastes a bit of disk space and all, but itÕs much easier for me to handle these files. The formal release of Toast will support both $c1 pictures and standard APF files. In the meantime, if you put the pictures on a ProDOS/GSOS disk, they will Óauto-sparseÓ the file, reducing it from 32K of disk space to about 21K. If you put this file on other media, such as HFS volumes, the picture file will use up 32K.
|
||||
Toast also only supports 320-mode pictures at the moment. You can tell it to display a 640-mode picture, but its colors will be off. This will change in the release.
|
||||
Toast really wants to have the ÒfastÓ SHR screen... The graphics are much smoother and nicer with that screen available. Most GS/OS programs, as long as there is enough memory, support and use the ÒfastÓ screen. If Twilight II is not in ÒLow Memory ModeÓ (see the setup screen), Toast will be able to use the ÒfastÓ screen. Certain programs, namely The Manager v1.0 (tm Seven Hills Software) deny programs the use of the fast screen. With the fast screen, everything is always in the same plane relative to everything elseÐ if at one time one shape is in front of another, it will be ahead of that shape all the time. Without the fast screen available, objects will come to the foreground as theyÕre drawn, which can look ugly. IÕll try to make the slow screen drawing much smoother and all, but it will be at the expense of about 32K of memory....
|
||||
Toast may not have the best error checking yet. It does require that it be able to load its picture file into memory when it runs. Toast should therefore complain if it canÕt find enough memory (32K in one chunk), and refuse to run. If it is told to display a bad file, or the file doesnÕt exist, then it will most likely put some sort of garbage on the screen, but nothing worse than that. This will all be fixed for the release.
|
||||
Toast has no cute sound effects. Tough. Wait for the release version.
|
||||
Toast also doesnÕt behave exactly like Òthat otherÓ screen saver, in that shapes can be on top of others, and so on. Once again, the final version will support this.
|
||||
|
||||
Why weÕre releasing this:
|
||||
I like just having this on my screen. But, the artwork is too reminiscent of Òthat other screen saverÕs.Ó Therefore, Jim Maricondo (the author of the Twilight II CDev and some modules) and I decided to have a contest for the best original artwork. Basically, weÕre looking for the coolest artwork that we could publish for Toast, Fish, and Globe, for Twilight II v1.2. All you have to do is submit your artwork, and give us permission to publish it if it wins.
|
||||
|
||||
As a teaser, here are the prizes. Since thereÕs 3 contests (one each for Fish, Toast & Globe), there are actually 3 first prizes (one in each), 3 second places, and so on
|
||||
1st Place: $75 + Twilight II v1.2
|
||||
2nd Place: $50 + Twilight II v1.2
|
||||
3rd Place: $25 + Twilight II v1.2
|
||||
Anything we decide to publish: Twilight II v1.2
|
||||
|
||||
Thus, even if you donÕt win first, second, or third, you still could have your name in print and get cool new software!
|
||||
|
||||
HereÕs the rules:
|
||||
1. Sumbit all pictures to:
|
||||
DigiSoft Innovations
|
||||
P.O. Box 380
|
||||
Trumbull, CT 06611
|
||||
or, electronically, at
|
||||
America Online: DigiSoft
|
||||
Delphi DYAJIM
|
||||
GEnie DYA
|
||||
Internet: digisoft@aol.com or afcdyajim@aol.com
|
||||
|
||||
If you want to submit electronically, itÕs best to send some email first arranging the submission, so that we can specify how the file will be transmitted, and so forth. All disks sumbitted will become properties of DigiSoft Innovations unless a SASE envelope is included to return the disk. Include a stamped postcard or email address if you want us to confirm that we received your disk.
|
||||
|
||||
2. All entries must be received by February 1st, 1994. The contest will be judged, and the winners announced by February 15, 1994. Entries will be judged on characteristics including, but not limited to, originality, quality of artwork, and design. Entries MUST be original; we do not want any ÒrippedÓ pictures from other copyrighted software.
|
||||
|
||||
3. Entries must be compatible with Fish, Toast and Globe. For Fish & Toast, this means that there must be a certain number of 32*40 pixel frames, and 16 colors only. GlobeÕs picture must be 140*60 pixels in size, and can be 16 or 256 colors. For examples of legitimate pictures, see the sample files included with this release of Toast.
|
||||
|
||||
4. By sumbitting a picture, if you are selected, you agree to let your picture be picture be released with Twilight II v1.2.
|
||||
|
||||
5. This contest is open to all who can submit, including DigiSoft members and associated programmers / staff.
|
||||
|
||||
5. Anything else I canÕt think of at the moment. (Finals just finished here, and my brainÕs not working too well)
|
||||
|
||||
|
||||
Miscellaneous Guidelines for Pictures
|
||||
For Globe, it should be a picture that looks nice when wrapped around a sphere. Yes, there is no way to see what Globe does to pictures at the moment, but if some quality sumbissions are received, DigiSoft will consider releasing a ÒtaggedÓ beta of Globe to let individual authors see how things are going. Your picture mut fit within the 140*60 area, no more, no less. You can use 16-256 colors; NO 3200 color pictures.
|
||||
|
||||
Toast and Fish both take pictures that consist of a certain # of 32*40 pixel frames. Each frame must fit in the specified cells exactly. One 16-color pallette is allowed. (There can be 20 shapes on one line; if they had different pallettes, itÕd get really ugly).
|
||||
|
||||
LetÕs take a look at ToastÕs pictures first: on the top line, there are 6 boxes, two of them XÕd out. These are the four frams of animation for the first kind of shape. Basically, if we number those 4 shapes in order, 1, 2, 3, 4, the frames will be shown on the screen in this order: 1-2-3-4-3-2-1-2-3-4-3-2-..... and so on. The second row contains 3 pictures and 3 XÕd out squares. Those 3 shapes are static shapes that will be put on the screen, unanimated. Just watch Toast if you have any problems.... Some ideas of my own (I canÕt draw anything, so itÕs up to you): Triplanes & (blimps/clouds/whatever). Cars & ?. People walking.... Whatever. IÕm great at cloning other things, maybe not imaginational. There is a Toast viewer T2 module, so you can see immediately what your creations are like.
|
||||
|
||||
Well, thereÕs a Fish screen here, but no fish viewer. Well, thereÕs a trick to check out some fish by using Toast. (The one remaining problem is that Fish move horizontally; Toast go diagonally). Each fish consists of only 2 frames, not four like Toast. Therefore, if you put the 2 frames, A & B into the Toast picture such that they go A B A B, Toast will play one frame, then the other, just like Fish does. Therefore, you can use this to test out how your fish look when animated. Fish also should be facing right in their picture file (otherwise theyÕll appear to swim backwards), but Toast face left. That should be no problem whatsoever. There should be 15 types of fish, each having 2 frames, for a total of 30 frames. If you develop your fish using Toast to view them, you can then put them into the Fish picture. If some quality submissions are received, we will consider releaseing tagged Fish betas so you can actually see what things will look like.
|
||||
|
||||
So, whip out that drawing program, and get started!
|
||||
|
||||
Legal stuff, etc.
|
||||
Toast was written by Nathan Mates in 100% IIGS Assembly. This version is classified FreewareÐ you can freely distribute it, but not sell it. Future versions of this program will not be Freeware; IÕm the author and can chose to have it sold as part of the Twilight II v1.2 package.
|
||||
The Toast beta may be distributed as long as the following conditions are met:
|
||||
1. All of the files in this archive remain untouched: Toast [T2 module], Read.Toast.Tch [This file], ToastPix [pictures for Toast], FishPix [pictures for Fish], and a picture for Globe.
|
||||
2. This archive (which can be unpacked) may not be sold. Permission is granted for online groups to make it a publically available download. This archive can be included on disk collections, so long as a charge of no more than $5 per disk is charged for distribution. Any other methods of distribution/modification must be cleard in advance with me.
|
||||
|
||||
DigiSoft Innovations., Inc. makes no claims regarding suitability of this release for use with anything. Please report any problems encountered directly to the author. Void where prohibited. Blah blah blah.....
|
||||
|
||||
Special Hellos go out to everyone on IRC: jsanford, B_Francis, RushServ, GSServ, Fever, Calamity, Mach, AutoMach (aka NickServ :), Bryer, Moet, Meekins, dwsSteve, Med, Janiee, and everyone on comp.sys.apple2. If I forgot your name, ooops. Oh yeah, no thanks to the people on IRC who constantly harsh on Twilight II: Abaddon (James Brookes), IRSMan (Ian Schmidt), and to a lesser degree, Bazyar (Da ÕWaid :). ÒExcept ye be nice to me, ye shall all likewise be dissed.Ó
|
||||
|
||||
How to contact me
|
||||
Well, IÕve been a IIGS software author for some time now, and frankly speaking, the user support IÕve gotten stinks. In my other programs, IÕve asked for something, even just a letter / postcard, and what do I get? Diddly Squat. (Those of you who have sent things, thank you from the bottom of my heart. ItÔs just that the number of responses that I get in relation to the total number of copies that must be floating around is pretty darn small). This is Freeware, but you are not disallowed to send me praises, complaints, whatever just so that I know youÕre out there and alive. If you really want to help support a IIGS author, you can check out my other IIGS programs (GameHacker, Mine Hunt, Multi Tris, Power Grid) and send in the shareware fees for a few of them.........
|
||||
|
||||
To get in contact with me, you can do it either by U.S. mail or electronically. My address is:
|
||||
|
||||
Nathan Mates
|
||||
MSC #850, Caltech
|
||||
Pasadena, CA 91126-0001
|
||||
|
||||
or, on the internet: nathan@cco.caltech.edu
|
||||
|
||||
(There are gateways from other online services (Compuserve, Genie, AOL, Delphi, and others) to the internet so ask a local expert if you want to send email from the non-internet).
|
||||
|
||||
IÕll be away from Caltech from December 12th to the 29th, just as a word of warning. (DonÕt expect an immediate reponse if you send mail during that time).
|
||||
|
||||
|
||||
Have fun, and APPLE II FOREVER!
|
||||
Nathan Mates. 12/10/93 17:52
|
BIN
source/twilight/nm/public.toast/SamplePix/FishPix
Normal file
BIN
source/twilight/nm/public.toast/SamplePix/FishPix
Normal file
Binary file not shown.
BIN
source/twilight/nm/public.toast/SamplePix/World
Normal file
BIN
source/twilight/nm/public.toast/SamplePix/World
Normal file
Binary file not shown.
BIN
source/twilight/nm/public.toast/ToastPix
Normal file
BIN
source/twilight/nm/public.toast/ToastPix
Normal file
Binary file not shown.
54
source/twilight/nm/t1/source/GO
Normal file
54
source/twilight/nm/t1/source/GO
Normal file
@ -0,0 +1,54 @@
|
||||
unset exit
|
||||
Set AuxType $5457
|
||||
Set KeepType RTL
|
||||
Set A */system/cdevs/twilight
|
||||
Echo Assembling {1}
|
||||
if {1} == "Boxes"
|
||||
asml +w -x boxes.asm
|
||||
delete {a}/boxes
|
||||
copy boxes {a}
|
||||
else if {1} == "DClock"
|
||||
asml +w -x DClock.Asm
|
||||
delete {a}/dclock
|
||||
copy DClock {a}
|
||||
else if {1} == "AClock"
|
||||
asml +w -x AClock.Asm
|
||||
delete {a}/aclock
|
||||
copy AClock {a}
|
||||
else if {1} == "LedMsg"
|
||||
asml +w -x LedMsg.Asm
|
||||
delete {a}/led.msg
|
||||
copy Led.Msg {a}
|
||||
else if {1} == "Comedy"
|
||||
asml +w -x Comedian.Asm
|
||||
delete {a}/Comedian
|
||||
copy Comedian {a}
|
||||
else if {1} == "Fire"
|
||||
asml +x -x Fireworks.Asm
|
||||
delete {a}/Fireworks
|
||||
copy Fireworks {a}
|
||||
else if {1} == "MSlides"
|
||||
asml +w -x MSlides.asm
|
||||
delete {a}/mslides
|
||||
copy MSlides {a}
|
||||
else if {1} == "Persp"
|
||||
asml +w -x Perspective.Asm
|
||||
copy -f persp.temp Perspective
|
||||
delete {A}/Perspective
|
||||
copy Perspective {A}
|
||||
else if {1} == "Tunnel"
|
||||
asml +w -x Tunnel.asm
|
||||
delete {a}/TunnelGame
|
||||
copy TunnelGame {A}
|
||||
else
|
||||
Echo Known programs:
|
||||
Echo " Aclock - AClock.Asm"
|
||||
Echo " Boxes - Boxes.Asm"
|
||||
Echo " Comedy - Comedian.Asm"
|
||||
Echo " DClock - DClock.Asm"
|
||||
Echo " Fire - Fireworks.Asm"
|
||||
Echo " LedMsg - LedMsg.Asm"
|
||||
Echo " MSlides - MSlides.Asm"
|
||||
Echo " Persp - Perspective.Asm"
|
||||
Echo " Tunnel - TunnelGame.Asm"
|
||||
end
|
376
source/twilight/nm/t1/source/LEDMsg.Asm
Normal file
376
source/twilight/nm/t1/source/LEDMsg.Asm
Normal file
@ -0,0 +1,376 @@
|
||||
keep Led.Msg
|
||||
mcopy LedMsg.macs
|
||||
|
||||
LedMessage Start
|
||||
Speed equ 2 ;1/20 second
|
||||
|
||||
phb ;Store old data bank
|
||||
|
||||
short M
|
||||
lda #$E1
|
||||
pha
|
||||
plb
|
||||
|
||||
lda $C034
|
||||
and #$0F
|
||||
sta >OldBorder
|
||||
lda $C034
|
||||
and #$F0
|
||||
sta $C034
|
||||
|
||||
Wait1 lda $C019 ;wait for start of next refresh
|
||||
bpl Wait1 ;so no-blink screen clear
|
||||
Wait2 lda $C019
|
||||
bmi Wait2
|
||||
|
||||
long M
|
||||
|
||||
ldx #$7FFE
|
||||
nextBlnk stz $2000,x
|
||||
dex
|
||||
dex
|
||||
bpl nextBlnk
|
||||
|
||||
mov #$F00,$9e02
|
||||
stz OnColor
|
||||
phk
|
||||
plb ;now set current bank for program
|
||||
|
||||
phd
|
||||
tsc
|
||||
inc a
|
||||
tcd
|
||||
|
||||
LongResult
|
||||
_GetPort
|
||||
WordResult
|
||||
_GetMasterSCB
|
||||
|
||||
MemId equ 6 ;passed in on stack
|
||||
DeRef equ 12 ;just a value to fry
|
||||
PushLong DeRef ;save values!
|
||||
|
||||
LongResult
|
||||
ldx #0
|
||||
phx ;upper word of length
|
||||
PushWord #$AA ;length of a GrafPort
|
||||
PushWord MemId ;user ID
|
||||
PushWord #$C010 ;locked, fixed, no cross bank
|
||||
phx
|
||||
phx ;no special address, so 0
|
||||
_NewHandle
|
||||
|
||||
lda 1,s
|
||||
sta DeRef
|
||||
lda 3,s
|
||||
sta DeRef+2
|
||||
lda [DeRef]
|
||||
tax
|
||||
ldy #2
|
||||
lda [DeRef],y
|
||||
pha
|
||||
phx
|
||||
pha
|
||||
phx ;push the pointer twice
|
||||
pushword #0
|
||||
_SetMasterSCB
|
||||
_OpenPort
|
||||
_SetPort
|
||||
PushLlcl #MyPortLoc
|
||||
_SetPortLoc
|
||||
plx
|
||||
ply
|
||||
PullLong DeRef
|
||||
phy
|
||||
phx
|
||||
|
||||
PushWord #1 ;mode or
|
||||
_SetPenMode
|
||||
PushWord #1 ;color #
|
||||
_SetSolidPenPat
|
||||
lda [12] ;len of pascal string
|
||||
and #$FF ;in lo byte only
|
||||
inc a ;account for len byte
|
||||
sta MsgLen
|
||||
|
||||
NewMessage WordResult
|
||||
_Random
|
||||
pla
|
||||
and #$7F
|
||||
clc
|
||||
adc #4 ;center from top to bottom of the screen
|
||||
sta TopY
|
||||
asl a
|
||||
asl a
|
||||
asl a
|
||||
asl a
|
||||
asl a
|
||||
pha
|
||||
asl a
|
||||
asl a
|
||||
clc
|
||||
adc 1,s
|
||||
adc #$2000 ;start of row on screen
|
||||
sta LineTarget ;save for MVN later
|
||||
inc a
|
||||
inc a
|
||||
sta LineStart
|
||||
plx
|
||||
mov #8,PartOfChar
|
||||
stz PlaceInMsg
|
||||
lda TopY
|
||||
clc
|
||||
adc #310 ;scan lines start at 256, 60 line wait
|
||||
sta WaitFor ;when to start the MVNs
|
||||
stz WasAbove
|
||||
|
||||
MainLoop anop
|
||||
lda [8]
|
||||
bne Done
|
||||
lda >$01C02E ;vertical counter, upper 8 bits of it
|
||||
and #$FF ;dump horiz count in upper 8 bits of a
|
||||
rol a ;insert a 0 or 1, for full 9 bits
|
||||
cmp WaitFor
|
||||
blt LessThan
|
||||
|
||||
lda WasAbove ;check position on screen
|
||||
beq MainLoop ;check if we've already displayed it...
|
||||
stz WasAbove
|
||||
NextCol ldx OnColor
|
||||
inx
|
||||
inx
|
||||
cpx #ColorsLen
|
||||
blt OkOffset
|
||||
ldx #0
|
||||
OkOffset stx OnColor
|
||||
lda Colors,x
|
||||
sta >$E19e02 ;to next color
|
||||
jsr ScrollMsg
|
||||
bcc MainLoop ;branch if still in message
|
||||
brl NewMessage
|
||||
LessThan mov #1,WasAbove
|
||||
bra MainLoop
|
||||
|
||||
done _DisposeHandle
|
||||
_SetMasterSCB
|
||||
_SetPort
|
||||
|
||||
short M
|
||||
lda >$E0C034
|
||||
and #$F0
|
||||
ora OldBorder
|
||||
sta >$E0C034
|
||||
long M
|
||||
|
||||
pld
|
||||
plb
|
||||
lda 2,s
|
||||
sta 12,s
|
||||
lda 1,s
|
||||
sta 11,s
|
||||
pla
|
||||
pla
|
||||
pla
|
||||
pla
|
||||
pla
|
||||
|
||||
rtl
|
||||
WaitFor ds 2
|
||||
WasAbove ds 2
|
||||
|
||||
ScrollMsg anop
|
||||
*
|
||||
* Handles the scrolling of the message
|
||||
*
|
||||
*
|
||||
phb
|
||||
lda #64 ;lines to move
|
||||
ldx LineStart
|
||||
ldy LineTarget
|
||||
PushWord #$E1E1
|
||||
plb
|
||||
plb ;pull bank byte twice (word pushed!)
|
||||
MoveLines pha
|
||||
phy
|
||||
phx
|
||||
lda #$a0-3 ;# bytes to move
|
||||
dc h'54e1e1' ;Mvn e1e1
|
||||
plx
|
||||
* stz |$0098,x
|
||||
stz |$009A,x
|
||||
pla
|
||||
clc
|
||||
adc #$a0
|
||||
tay
|
||||
txa
|
||||
clc
|
||||
adc #$a0
|
||||
tax
|
||||
pla
|
||||
dec a
|
||||
bne MoveLines
|
||||
plb
|
||||
lda posn
|
||||
eor #1
|
||||
sta Posn
|
||||
beq AnRts ;draw every other time (every 4 bytes of scroll)
|
||||
|
||||
lda ScrollingOff ;scrolling message off the screen
|
||||
bmi DoRun ;if not, go on
|
||||
dec ScrollingOff
|
||||
bpl NotOffYet
|
||||
sec ;flag all off screen
|
||||
rts
|
||||
NotOffYet clc
|
||||
AnRts rts
|
||||
Posn ds 2
|
||||
|
||||
DoRun inc PartOfChar
|
||||
lda PartOfChar
|
||||
cmp #9
|
||||
blt StillInChar ;in same character
|
||||
|
||||
mov #1,PartOfChar ;restart bit-shift ops
|
||||
inc PlaceInMsg
|
||||
lda PlaceInMsg
|
||||
cmp MsgLen
|
||||
blt StillInIt ;still within message, no wrap
|
||||
mov #41,ScrollingOff ;41 chars to move off
|
||||
clc ;still in message
|
||||
rts
|
||||
StillInIt ldy PlaceInMsg
|
||||
lda [12],y
|
||||
and #$FF
|
||||
cmp #127
|
||||
bge BadChar ;ignore IIGS special chars (accents, etc)
|
||||
cmp #32
|
||||
bge GoodChar ;branch if in 32-127
|
||||
BadChar lda #32 ;replace illegal stuff by space
|
||||
GoodChar sec
|
||||
sbc #32 ;first char defined is space
|
||||
asl a
|
||||
asl a
|
||||
asl a ;each char bitmap is 8 bytes long
|
||||
adc #CharSet
|
||||
sta CharStart+1 ;and save its place
|
||||
|
||||
StillInChar ldy #0 ;now, time to display a part of the char
|
||||
mov TopY,Oval2Make ;top coord of first one
|
||||
clc
|
||||
adc #7
|
||||
sta Oval2Make+4 ;bottom of first
|
||||
mov #307,Oval2Make+2 ;left coord
|
||||
clc
|
||||
adc #8
|
||||
sta Oval2Make+6 ;right coord
|
||||
DoRows sty RowNum
|
||||
CharStart lda |0000,y ;self-modified, start of char+y
|
||||
ldx PartOfChar
|
||||
GetBit lsr a ;shift bits
|
||||
dex
|
||||
bne GetBit ;get part of char
|
||||
bcc Ready4Next ;cc=don't draw pixel
|
||||
PushLlcl #Oval2Make
|
||||
_PaintOval ;and draw it
|
||||
Short M
|
||||
sta >$01c030
|
||||
Long M
|
||||
Ready4Next lda Oval2Make
|
||||
clc
|
||||
adc #8
|
||||
sta Oval2Make ;move next top down
|
||||
clc
|
||||
adc #7 ;bottom of next square
|
||||
sta Oval2Make+4
|
||||
lda Oval2Make+2
|
||||
dec a
|
||||
sta Oval2Make+2 ;adjust left
|
||||
lda Oval2Make+6
|
||||
dec a
|
||||
sta Oval2Make+6 ;adjust Right
|
||||
ldy RowNum
|
||||
iny
|
||||
cpy #8
|
||||
blt DoRows
|
||||
clc ;flag good results
|
||||
rts
|
||||
|
||||
;................................................................
|
||||
|
||||
MyPortLoc anop
|
||||
ScreenMode dc i'0'
|
||||
dc i4'$E12000'
|
||||
dc i'160'
|
||||
dc i'0,0,200,320'
|
||||
OldBorder ds 2
|
||||
|
||||
MsgLen ds 2
|
||||
PlaceInMsg ds 2
|
||||
PartOfChar ds 2
|
||||
Oval2Make ds 8
|
||||
Count dc i'2'
|
||||
TopY ds 2
|
||||
ScrollingOff dc i'-1'
|
||||
LineStart ds 2
|
||||
LineTarget ds 2
|
||||
|
||||
RowNum ds 2
|
||||
OnColor ds 2
|
||||
|
||||
CharSet anop
|
||||
dc h'00000000000000000404040400040400'
|
||||
dc h'1B1B12120000000000123F12123F1200'
|
||||
dc h'083E011E201F080027251708043A2939'
|
||||
dc h'0C1E021E01011E0C0303020000000000'
|
||||
dc h'0C02010101020C000304080808040300'
|
||||
dc h'150E1B0E150000000004041F04040000'
|
||||
dc h'00000000000303020000001F00000000'
|
||||
dc h'00000000000303000020100804020100'
|
||||
dc h'1E31292523211E000605040404040400' ;'0'
|
||||
dc h'1F20201E01003F003F10001C20201F00'
|
||||
dc h'080C0A003F0808003F001F2020201F00'
|
||||
dc h'1008041E21211E003F00100804020100'
|
||||
dc h'1E21211E21211E001E21211E08040200'
|
||||
dc h'00000303000303000000030300030302'
|
||||
dc h'000402010204000000001F001F000000'
|
||||
dc h'00010204020100000F10100C04000400'
|
||||
dc h'000F101615150E001F2020213F212100'
|
||||
dc h'1F20201F21211F003C02010101023C00' ;'@'
|
||||
dc h'0F10212121110F003F00003F01013F00'
|
||||
dc h'3F00003F010101003C02013901221C00'
|
||||
dc h'2121212F212121000700020202020700'
|
||||
dc h'1C000808080807002111090509112100'
|
||||
dc h'0101010101013F001F21252525252500'
|
||||
dc h'1F212121212121001E21212121211E00'
|
||||
dc h'1F20201F010101001E2121212121023C' ;'P'
|
||||
dc h'1F20201F212121003E01011E20201F00'
|
||||
dc h'3F000404040404002121212121213E00'
|
||||
dc h'21212112120C0C002525252525213A00'
|
||||
dc h'21120C0C0C1221001111110E00040400'
|
||||
dc h'3F00100804023F000F0101010101010F'
|
||||
dc h'00010204081020000F0808080808080F'
|
||||
dc h'0000040A11000000000000000000007F'
|
||||
dc h'0303020000000000 00003E2121212600' ;'`a'
|
||||
dc h'01011D2121211F0000003E0101013E00'
|
||||
dc h'20202E2121213E0000003E1109013E00'
|
||||
dc h'0E01010F0101010000001E212126201F'
|
||||
dc h'01011D21212121000400040404040400' ;'hi'
|
||||
dc h'04000404040404030101110907091100'
|
||||
dc h'040404040404040000001B2525252500'
|
||||
dc h'00001F212121210000001E2121211E00'
|
||||
dc h'00001F2121211D0100003E2121212E20'
|
||||
dc h'00001C020202020000003E011E201F00' ;'rs'
|
||||
dc h'01010F0101010E000000212121211E00'
|
||||
dc h'00001111110A04000000252525253A00'
|
||||
dc h'0000110A040A11000000192122140807'
|
||||
dc h'00003F100C023F000000000000000001'
|
||||
|
||||
Colors anop
|
||||
dc i'$F00,$F10,$F20,$F30,$F40,$F50,$F60,$F70,$F80,$F90,$FA0,$FB0,$FC0,$FD0,$FE0'
|
||||
dc i'$FF0,$EF0,$DF0,$CF0,$BF0,$AF0,$9F0,$8F0,$7F0,$6F0,$5F0,$4F0,$3F0,$2F0,$1F0'
|
||||
dc i'$0F0,$0F1,$0F2,$0F3,$0F4,$0F5,$0F6,$0F7,$0F8,$0F9,$0FA,$0FB,$0FC,$0FD,$0FE'
|
||||
dc i'$0FF,$0EF,$0DF,$0CF,$0BF,$0AF,$09F,$08F,$07F,$06F,$05F,$04F,$03F,$02F,$01F'
|
||||
dc i'$00F,$10F,$20F,$30F,$40F,$50F,$60F,$70F,$80F,$90F,$A0F,$B0F,$C0F,$D0F,$E0F'
|
||||
dc i'$F0F,$F0E,$F0D,$F0C,$F0B,$F0A,$F09,$F08,$F07,$F06,$F05,$F04,$F03,$F02,$F01'
|
||||
ColorsLen equ *-Colors
|
||||
end
|
9
source/twilight/nm/t1/source/Led.Msg.Rez
Normal file
9
source/twilight/nm/t1/source/Led.Msg.Rez
Normal file
@ -0,0 +1,9 @@
|
||||
#include "types.rez"
|
||||
|
||||
resource rPString (0x1) {
|
||||
"LED Message"
|
||||
};
|
||||
|
||||
resource rPString (0x2) {
|
||||
"Enter Message:"
|
||||
};
|
210
source/twilight/nm/t1/source/LedMsg.Macs
Normal file
210
source/twilight/nm/t1/source/LedMsg.Macs
Normal file
@ -0,0 +1,210 @@
|
||||
MACRO
|
||||
&lab _DisposeHandle
|
||||
&lab ldx #$1002
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&lab _NewHandle
|
||||
&lab ldx #$0902
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&LAB LONG &A,&B
|
||||
LCLB &I
|
||||
LCLB &M
|
||||
&A AMID &A,1,1
|
||||
&M SETB ("&A"="M").OR.("&A"="m")
|
||||
&I SETB ("&A"="I").OR.("&A"="i")
|
||||
AIF C:&B=0,.A
|
||||
&B AMID &B,1,1
|
||||
&M SETB ("&B"="M").OR.("&B"="m").OR.&M
|
||||
&I SETB ("&B"="I").OR.("&B"="i").OR.&I
|
||||
.A
|
||||
&LAB REP #&M*32+&I*16
|
||||
AIF .NOT.&M,.B
|
||||
LONGA ON
|
||||
.B
|
||||
AIF .NOT.&I,.C
|
||||
LONGI ON
|
||||
.C
|
||||
MEND
|
||||
MACRO
|
||||
&LAB SHORT &A,&B
|
||||
LCLB &I
|
||||
LCLB &M
|
||||
&A AMID &A,1,1
|
||||
&M SETB ("&A"="M").OR.("&A"="m")
|
||||
&I SETB ("&A"="I").OR.("&A"="i")
|
||||
AIF C:&B=0,.A
|
||||
&B AMID &B,1,1
|
||||
&M SETB ("&B"="M").OR.("&B"="m").OR.&M
|
||||
&I SETB ("&B"="I").OR.("&B"="i").OR.&I
|
||||
.A
|
||||
&LAB SEP #&M*32+&I*16
|
||||
AIF .NOT.&M,.B
|
||||
LONGA OFF
|
||||
.B
|
||||
AIF .NOT.&I,.C
|
||||
LONGI OFF
|
||||
.C
|
||||
MEND
|
||||
MACRO
|
||||
&lab WordResult
|
||||
&lab pha
|
||||
MEND
|
||||
MACRO
|
||||
&lab LongResult
|
||||
&lab pha
|
||||
pha
|
||||
MEND
|
||||
MACRO
|
||||
&lab PushLLcl &Num1
|
||||
&lab phb
|
||||
phb
|
||||
PushWord &Num1
|
||||
MEND
|
||||
MACRO
|
||||
&lab mov &num1,&num2
|
||||
&lab lda &num1
|
||||
sta &num2
|
||||
MEND
|
||||
MACRO
|
||||
&lab _GetMasterSCB
|
||||
&lab ldx #$1704
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&lab _GetPort
|
||||
&lab ldx #$1C04
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&lab _OpenPort
|
||||
&lab ldx #$1804
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&lab _PaintOval
|
||||
&lab ldx #$5904
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&lab _Random
|
||||
&lab ldx #$8604
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&lab _SetMasterSCB
|
||||
&lab ldx #$1604
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&lab _SetPenMode
|
||||
&lab ldx #$2E04
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&lab _SetPort
|
||||
&lab ldx #$1B04
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&lab _SetPortLoc
|
||||
&lab ldx #$1D04
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&lab _SetSolidPenPat
|
||||
&lab ldx #$3704
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&lab pulllong &addr1,&addr2
|
||||
&lab ANOP
|
||||
AIF C:&addr1=0,.a
|
||||
AIF C:&addr2=0,.b
|
||||
LCLC &C
|
||||
&C AMID &addr1,1,1
|
||||
AIF "&C"="[",.zeropage
|
||||
pullword &addr1
|
||||
sta &addr2
|
||||
pullword &addr1+2
|
||||
sta &addr2+2
|
||||
MEXIT
|
||||
.a
|
||||
pullword
|
||||
pullword
|
||||
MEXIT
|
||||
.b
|
||||
pullword &addr1
|
||||
pullword &addr1+2
|
||||
MEXIT
|
||||
.zeropage
|
||||
ldy #&addr2
|
||||
pullword &addr1,y
|
||||
ldy #&addr2+2
|
||||
pullword &addr1,y
|
||||
MEND
|
||||
MACRO
|
||||
&lab pullword &SYSOPR
|
||||
&lab ANOP
|
||||
pla
|
||||
AIF C:&SYSOPR=0,.end
|
||||
sta &SYSOPR
|
||||
.end
|
||||
MEND
|
||||
MACRO
|
||||
&lab pushlong &addr,&offset
|
||||
&lab ANOP
|
||||
LCLC &C
|
||||
LCLC &REST
|
||||
&C AMID &addr,1,1
|
||||
AIF "&C"="#",.immediate
|
||||
AIF "&C"="[",.zeropage
|
||||
AIF C:&offset=0,.nooffset
|
||||
AIF "&offset"="s",.stack
|
||||
pushword &addr+2,&offset
|
||||
pushword &addr,&offset
|
||||
MEXIT
|
||||
.nooffset
|
||||
pushword &addr+2
|
||||
pushword &addr
|
||||
MEXIT
|
||||
.immediate
|
||||
&REST AMID &addr,2,L:&addr-1
|
||||
dc I1'$F4',I2'(&REST)|-16'
|
||||
dc I1'$F4',I2'&REST'
|
||||
MEXIT
|
||||
.stack
|
||||
pushword &addr+2,s
|
||||
pushword &addr+2,s
|
||||
MEXIT
|
||||
.zeropage
|
||||
ldy #&offset+2
|
||||
pushword &addr,y
|
||||
ldy #&offset
|
||||
pushword &addr,y
|
||||
MEND
|
||||
MACRO
|
||||
&lab pushword &SYSOPR
|
||||
&lab ANOP
|
||||
AIF C:&SYSOPR=0,.b
|
||||
LCLC &C
|
||||
&C AMID "&SYSOPR",1,1
|
||||
AIF ("&C"="#").AND.(S:LONGA),.immediate
|
||||
lda &SYSOPR
|
||||
pha
|
||||
MEXIT
|
||||
.b
|
||||
pha
|
||||
MEXIT
|
||||
.immediate
|
||||
LCLC &REST
|
||||
LCLA &BL
|
||||
&BL ASEARCH "&SYSOPR"," ",1
|
||||
AIF &BL>0,.a
|
||||
&BL SETA L:&SYSOPR+1
|
||||
.a
|
||||
&REST AMID "&SYSOPR",2,&BL-2
|
||||
dc I1'$F4',I2'&REST'
|
||||
MEND
|
672
source/twilight/nm/t2.common.asm
Normal file
672
source/twilight/nm/t2.common.asm
Normal file
@ -0,0 +1,672 @@
|
||||
* T2 Common Module Equates. By Jim Maricondo.
|
||||
* v1.0 - 05/24/92 - Initial Version.
|
||||
* v1.1 - 05/29/92 - Revised 'cuz of new t2common.rez. - T2 v1.0d33
|
||||
* v1.2 - 10/24/92 - IPC equates added - T2 v1.0.1b1. - datafield added
|
||||
* v1.3 - 12/13/92 - mfOverrideSound added - T2 v1.0.1b2
|
||||
* v1.4 - 01/31/93 - bf bits added. - T2 v1.0.1f2.
|
||||
* v1.5 - 02/03/93 - (ROJAC!!) new IPC revised - T2 v1.0.1f2
|
||||
* v1.6 - 02/07/93 - $D001 - T2 v1.0.1f2
|
||||
* v1.7 - 03/02/93 - bmr, lmr, etc - T2 v1.1f3
|
||||
* v1.7a - 03/06/93 - bmi, lmi, etc - T2 v1.1f3
|
||||
|
||||
* Resources types.
|
||||
|
||||
rT2ModuleFlags gequ $D001
|
||||
rT2ExtSetup1 gequ $1001
|
||||
rT2ModuleWord gequ $1002 ; reztype for module words in T2 setup
|
||||
|
||||
* These have been changed to be things on the dp'd stack, so they're
|
||||
* commented out. Therefore, you will get an error when you first try to
|
||||
* use them to make sure you change these
|
||||
|
||||
* SUBLIMINAL MESSGAE: SEND ME THE ORIGINAL VALUES, JIM! :)
|
||||
|
||||
*T2Result gequ 16
|
||||
*T2Message gequ 14
|
||||
*T2Data1 gequ 10
|
||||
*T2Data2 gequ 6
|
||||
|
||||
* Action message codes sent to modules.
|
||||
|
||||
MakeT2 gequ 0 ; Make module-specific ctls.
|
||||
SaveT2 gequ 1 ; Save new preferences
|
||||
BlankT2 gequ 2 ; Blank the screen.
|
||||
LoadSetupT2 gequ 3 ; Load any resources from yo' fork
|
||||
UnloadSetupT2 gequ 4 ; Dispose of any resources from yo' fk.
|
||||
KillT2 gequ 5 ; Module setup being closed.
|
||||
HitT2 gequ 6 ; Setup window control hit.
|
||||
|
||||
* How the stack is setup when a module gets called.
|
||||
|
||||
*dp gequ 1 ; This is how the stack is set up
|
||||
*Bank gequ dp+2 ; with DP at the top and Result
|
||||
*rtlAddr gequ Bank+1 ; occuping the top 4 bytes
|
||||
*T2data2 gequ rtlAddr+3
|
||||
*T2data1 gequ T2data2+4
|
||||
*T2Message gequ T2data1+4
|
||||
*T2Result gequ T2Message+2
|
||||
*T2StackSize gequ T2Result+4
|
||||
|
||||
* Softswitches
|
||||
|
||||
KBD gequ >$E0C000
|
||||
KBDSTRB gequ >$E0C010
|
||||
RDVBLBAR gequ >$E0C019 ; bit 7 = 1 if not VBL
|
||||
TBCOLOR gequ >$E0C022
|
||||
KEYMODREG gequ >$E0C025 ; keyboard modifier register
|
||||
NEWVIDEO gequ >$E0C029
|
||||
VERTCNT gequ >$E0C02E
|
||||
SPKR gequ >$E0C030
|
||||
CLOCKCTL gequ >$E0C034 ; border color / rtc register
|
||||
SHADOW gequ >$E0C035
|
||||
INCBUSYFLG gequ >$E10064 ; increment busy flag
|
||||
DECBUSYFLG gequ >$E10068 ; decrement busy flag
|
||||
SHR gequ >$E12000
|
||||
SCBS gequ >$E19D00
|
||||
PALETTES gequ >$E19E00
|
||||
|
||||
* Boolean logic
|
||||
|
||||
FALSE gequ 0
|
||||
TRUE gequ 1
|
||||
|
||||
* T2 External IPC
|
||||
|
||||
t2TurnOn gequ $9000
|
||||
t2TurnOff gequ $9001
|
||||
t2BoxOverrideOff gequ $9002
|
||||
t2BoxOverrideOn gequ $9003
|
||||
t2GetInfo gequ $9004
|
||||
t2StartupTools gequ $9005
|
||||
t2ShutdownTools gequ $9006
|
||||
t2ShareMemory gequ $9007
|
||||
t2SetBlinkProc gequ $9008
|
||||
t2ForceBkgBlank gequ $9009
|
||||
t2BkgBlankNow gequ $900A
|
||||
t2GetBuffers gequ $900B
|
||||
t2Reserved1 gequ $900C ; was t2GetVersion
|
||||
t2CalsFreqOffset gequ $900D
|
||||
|
||||
* T2 Private IPC
|
||||
|
||||
reqDLZSS gequ $8007
|
||||
t2PrivGetProcs gequ $9020
|
||||
|
||||
* DataField equates.
|
||||
|
||||
SetFieldValue gequ $8000 0 0 ;custom control messages that are
|
||||
GetFieldValue gequ $8001 ; accepted by DataField
|
||||
|
||||
* Flag word passed to modules at loadsetupT2 time in T2data2 (lo)
|
||||
* (lmi = loadMessageInput)
|
||||
lmiOverrideSound gequ $0001 ; bit 0. 1=override sound, 0=sound ok
|
||||
|
||||
* Flag word passed to mdoules at blankT2 time in T2Data2 (lo)
|
||||
* (bmi = blankMessageInput)
|
||||
bmiBlankNow gequ $0001
|
||||
|
||||
* bits of BlankT2's T2Result - hi word (blankmessageresult)
|
||||
bmrNextModule gequ $0100
|
||||
bmrFadeIn gequ $0200
|
||||
bmrLeavesUsableScreen gequ $0400
|
||||
|
||||
* bits of LoadSetupT2's T2Result - lo word (loadmessageresult)
|
||||
lmrReqUsableScreen gequ $0001 ; requires usable screen
|
||||
lmrFadeOut gequ $0002 ; fade out after all
|
||||
|
||||
**********************************
|
||||
**********************************
|
||||
**********************************
|
||||
|
||||
*
|
||||
*
|
||||
* General T2 module code (at least for my modules) by Nathan Mates
|
||||
* Based heavily on source sent to me by Jim Maricondo; I made functions
|
||||
* out of a lot of things that got used a lot.
|
||||
*
|
||||
* Entry points in your code that need to be supported:
|
||||
* DoMakeT2,DoSaveT2,DoBlankT2,DoLoadSetupT2,DoUnloadT2,DoKillT2,DoHitT2
|
||||
*
|
||||
* A number of callbacks for common operations are given, with a _2 name.
|
||||
* See the included codefor their code and use.
|
||||
*
|
||||
* Code assumptions:
|
||||
* 1. You have at most 65535 item IDs in a setup window. Thus, the high word is
|
||||
* zero. If you want more, you know enough to make the necessary changes.
|
||||
* 2. There is only 1 code segment for the blanker.
|
||||
* Thus, if you use object-named segments (such as "Label start NukeIraq"),
|
||||
* you'll have to delete the names or make all the functions here with your
|
||||
* name.
|
||||
* This allows:
|
||||
* -jsr/rts around in the code
|
||||
* -words to be passed around for pointers to things. This is for things
|
||||
* like passing pointers to resName strings; the upper word is the
|
||||
* current bank.
|
||||
* 3. You have Orca, and have some understanding of my macros.
|
||||
*
|
||||
* You may use this code freely in your modules as long as this source file
|
||||
* retains my name in it. This is in the CommonData data segment; please don't
|
||||
* touch it.
|
||||
|
||||
* Equates used in here or one of my modules. From the e16.xxx files by
|
||||
* The Byteworks, Orca/M 2.0 disks. All rights reserved.
|
||||
|
||||
attrNoSpec GEQU $0008 ; may not use special memory
|
||||
attrNoCross GEQU $0010 ; may not cross banks
|
||||
singlePtr GEQU $0000
|
||||
rControlTemplate GEQU $8004 ; Control template type
|
||||
rC1OutputString GEQU $8023 ; GS/OS class 1 output string
|
||||
|
||||
|
||||
|
||||
Entry start
|
||||
using CommonData
|
||||
|
||||
T2Message equ 13
|
||||
|
||||
phb ;Store old data bank
|
||||
phk
|
||||
plb
|
||||
|
||||
phd
|
||||
tsc
|
||||
sta EntryStack
|
||||
inc a
|
||||
inc a ;account for phd on stack...
|
||||
tcd
|
||||
|
||||
lda <T2Message ;action code?
|
||||
cmp #7
|
||||
bge GetOut
|
||||
asl a
|
||||
tax
|
||||
jsr (Actions,x)
|
||||
GetOut lda EntryStack
|
||||
tcs
|
||||
pld
|
||||
plx ;this form is time-consuming, but bytes
|
||||
* ;shorter
|
||||
ply ;return address & bank
|
||||
pla
|
||||
pla ;T2data2
|
||||
pla
|
||||
pla ;T2data1
|
||||
pla ;Message
|
||||
phy
|
||||
phx
|
||||
plb
|
||||
rtl
|
||||
|
||||
Actions dc a'DoMakeT2,DoSaveT2,DoBlankT2,DoLoadSetupT2'
|
||||
dc a'DoUnloadSetupT2,DoKillT2,DoHitT2'
|
||||
end
|
||||
|
||||
*
|
||||
*
|
||||
CommonData data
|
||||
*
|
||||
* Common data to be accessed by things. Rename to suit your needs.
|
||||
*
|
||||
*
|
||||
MyID ds 2 ;variables used in various setup stuff...
|
||||
WindPtr ds 4
|
||||
RezFileID ds 2
|
||||
temp ds 4
|
||||
ResIOType ds 2
|
||||
StringPtr ds 2
|
||||
extraInfoPtr ds 4
|
||||
ResValue ds 2
|
||||
dfDefProc ds 4
|
||||
ThisProgBnk ds 2
|
||||
ResToLoadID ds 2
|
||||
EntryStack ds 2 ;so can get out in hurry from things
|
||||
|
||||
*
|
||||
* Some stuff about the author and all; please don't touch.
|
||||
*
|
||||
dc c'Common T2 funtions by Nathan Mates. Dedicated '
|
||||
dc c'to Ah-Ram Kim.' ;
|
||||
end
|
||||
|
||||
*
|
||||
*
|
||||
DoBlankT2_2 start
|
||||
*
|
||||
* Beta entry method for BlankT2, one that puts the move ptr on dp 4,
|
||||
* and gives you the regular DP. (Other functions have the stackframe as
|
||||
* as a DP). Integrate into DoBlankT2 if you want for speed, but this is for
|
||||
* all your calls.
|
||||
* I was too lazy to re-write one of my programs that uses DP of 0 (hard-
|
||||
* coded, not equates), so that's why it's at DP 4... :)
|
||||
*
|
||||
using CommonData
|
||||
|
||||
T2Data1 equ 9 ;on stacked dp
|
||||
T2Result equ 15
|
||||
MovePtr gequ 4
|
||||
|
||||
stz T2Result
|
||||
stz T2Result+2 ;clear result ptr...
|
||||
ldx <T2Data1
|
||||
ldy <T2Data1+2
|
||||
sty Temp ;in CommonData
|
||||
pla ;return address 1: DoBlackT2
|
||||
ply ;return address 2: Setup...
|
||||
pld ;Blanker's DP
|
||||
phd ;put back on DP to keep everybody happy
|
||||
stx <MovePtr
|
||||
ldx Temp ;other byte
|
||||
stx <MovePtr+2 ;change these if you want...
|
||||
phy
|
||||
pha
|
||||
rts
|
||||
end
|
||||
|
||||
*
|
||||
*
|
||||
DoHitT2_2 start
|
||||
*
|
||||
* Decides whether a item has been hit based on its item ids. Uses a
|
||||
* "MaxDHitable gequ [int]"; I use item ids 1-MaxDHitable as items that
|
||||
* can be hit; MaxDHitable+1->EndDItems are unhitable
|
||||
|
||||
* If there are special conditions, or whatever, make your own
|
||||
|
||||
T2Data2 equ 5
|
||||
T2Result equ 15
|
||||
|
||||
lda T2data2+2 ;ctlID hi word must be zero
|
||||
bne nothingHit
|
||||
lda T2data2 ;get ctlID
|
||||
cmp #MaxDHitable
|
||||
beq HitIt
|
||||
blt HitIt
|
||||
stz T2Result ;don't need to make "saveable"
|
||||
nothingHit rts
|
||||
|
||||
HitIt lda #TRUE
|
||||
sta T2Result
|
||||
rts
|
||||
end
|
||||
|
||||
*
|
||||
*
|
||||
DoMakeT2_2 start
|
||||
*
|
||||
* Entry code for make, which sets up variables that are used in a lot of
|
||||
* other setup places. If you use any other functions in here related to
|
||||
* setup and preferences, USE THIS FUNCTION BEFORE OTHERS!!!
|
||||
*
|
||||
using CommonData
|
||||
T2Data1 equ 9 ;on stacked dp
|
||||
T2Data2 equ 5 ; "
|
||||
T2Result equ 15 ; "
|
||||
|
||||
lda T2data1+2
|
||||
sta WindPtr+2
|
||||
lda T2data1
|
||||
sta WindPtr
|
||||
lda T2data2
|
||||
sta RezFileID
|
||||
lda #MaxDItemNum ;defined in your source
|
||||
sta T2Result
|
||||
phb
|
||||
phb ;get the current program bank
|
||||
pla
|
||||
and #$FF ;make it 8-bits only
|
||||
sta ThisProgBnk
|
||||
|
||||
PushWord
|
||||
_MMStartUp
|
||||
PullWord MyID
|
||||
|
||||
LongResult
|
||||
pei <T2data1+2
|
||||
pei <T2data1
|
||||
_GetWRefCon
|
||||
PullLong extraInfoPtr
|
||||
|
||||
rts
|
||||
end
|
||||
|
||||
*
|
||||
*
|
||||
LoadCtrlsByID start
|
||||
*
|
||||
* Load the controls by a passed in resource ID. This loads the the control
|
||||
* template with resource ID XXXXYYYY.
|
||||
*
|
||||
using CommonData
|
||||
|
||||
LongResult
|
||||
PushLong WindPtr
|
||||
PushWord #9 ;resource 2 resource
|
||||
phx
|
||||
phy ;resource ID # (long)
|
||||
_NewControl2
|
||||
plx
|
||||
plx ;chuck result out
|
||||
jmp MainErrChk ;jmp and MainErrChk will do our rts if
|
||||
* ; it's ok to do so
|
||||
end
|
||||
|
||||
*
|
||||
*
|
||||
MainErrChk start
|
||||
*
|
||||
* Simple Error Handler-- calls SysFailMgr.... Modify as to your liking
|
||||
*
|
||||
*
|
||||
bcs UhOh ;UhOh is kinda putting it mildly
|
||||
rts
|
||||
|
||||
UhOh pha ;save error # for SysDeath
|
||||
PushLong #0 ;normal message
|
||||
_SysFailMgr ;or brk into GSBug or whatever...
|
||||
end
|
||||
|
||||
*
|
||||
*
|
||||
SetCtlToVal start
|
||||
*
|
||||
* Sets a control with ID #0000YYYY to AAAA
|
||||
* Used a lot.
|
||||
*
|
||||
using CommonData
|
||||
|
||||
pha ;value to set it to
|
||||
LongResult
|
||||
PushLong WindPtr
|
||||
PushWord #0 ;high word of ID
|
||||
phy ;low word of ID
|
||||
_GetCtlHandleFromID
|
||||
_SetCtlValue
|
||||
jmp MainErrChk ;jmp and MainErrChk will do our rts if
|
||||
* ; it's ok to do so
|
||||
end
|
||||
|
||||
*
|
||||
*
|
||||
GetACtlVal start
|
||||
*
|
||||
* Gets the value from a control with id #0000YYYY, returns it in the A-register
|
||||
* The A-Reg is the last thing changed, so tests (beq and all) after this
|
||||
* function are ok.
|
||||
*
|
||||
using CommonData
|
||||
|
||||
WordResult
|
||||
LongResult
|
||||
PushLong WindPtr
|
||||
PushWord #0 ;high word of ItemID
|
||||
phy
|
||||
_GetCtlHandleFromID
|
||||
_GetCtlValue
|
||||
pla
|
||||
jmp MainErrChk ;jmp and MainErrChk will do our rts if
|
||||
* ; it's ok to do so
|
||||
end
|
||||
|
||||
*
|
||||
*
|
||||
makePdp start
|
||||
*
|
||||
* From Jim Maricondo: Makes a pointer from the handle on the dp, and
|
||||
* makes a dp for easy access. See its use for details
|
||||
*
|
||||
|
||||
TheHandle equ 3
|
||||
|
||||
plx ; yank return address
|
||||
phd
|
||||
tsc
|
||||
tcd
|
||||
ldy #2
|
||||
lda [TheHandle],y
|
||||
tay
|
||||
lda [TheHandle]
|
||||
sta <TheHandle
|
||||
sty <TheHandle+2
|
||||
phx ; push back return address
|
||||
rts
|
||||
end
|
||||
|
||||
*
|
||||
*
|
||||
LoadAPref start
|
||||
*
|
||||
* Loads a preference from disk and handles its not being there.
|
||||
|
||||
* Stack Just before Calling
|
||||
* Word : In1 Input #1
|
||||
* Word : In2 Input #2
|
||||
* <Stack Pointer>
|
||||
|
||||
* Also: Registers to pass in:
|
||||
* AAAA: Resource Type to load
|
||||
* XXXX: Pointer to rName pascal string
|
||||
* YYYY: Flag whether this is a 1-word resource
|
||||
*
|
||||
|
||||
* YYYY=1 = Not Word Resource
|
||||
* In1: Pointer to Function handling resource loaded from disk
|
||||
* When called, a pointer to the loaded resource is at
|
||||
* DP 3, so lda [3] is the first word of that resource.
|
||||
* Take nothing from the stack, put nothing on it, and
|
||||
* end with an rts. Also, don't mess with the DP.
|
||||
* In2: Pointer to Function handling first time (resource not yet created)
|
||||
* Called when the resource told to load is not around.
|
||||
* No defined DP, or whatever. End with an rts
|
||||
*
|
||||
* YYYY=0 = Word Resource
|
||||
* In1: Default value (for when resource is not on disk)
|
||||
* In2: Pointer to word variable to store the parameter in (output)
|
||||
*
|
||||
* See the included code for details.
|
||||
*
|
||||
* On exit, parameters are cleaned up from the stack, and the carry flag is
|
||||
* set according to whether the resource existed on disk (cc=yes, cs=no)
|
||||
|
||||
using CommonData
|
||||
sta ResIOType
|
||||
stx StringPtr
|
||||
sty DataType
|
||||
|
||||
phb ;have to define on entry!
|
||||
phb ;get the current program bank
|
||||
pla
|
||||
and #$FF ;make it 8-bits only
|
||||
sta ThisProgBnk
|
||||
|
||||
LongResult
|
||||
PushWord ResIOType ;resource type
|
||||
PushWord ThisProgBnk ;upper word of long pointer
|
||||
phx ;lower word of long pointer to rName string.
|
||||
_RMLoadNamedResource
|
||||
bcc IsOnDisk ;cc=was on disk...
|
||||
|
||||
plx ;not on disk here
|
||||
plx ;remove result from stack...
|
||||
ldy DataType
|
||||
bne NotDiskFcn
|
||||
lda 5,s ;default value
|
||||
sta (3,s),y ;Y guaranteed to be 0 coming in here
|
||||
bra DoneNotDisk
|
||||
|
||||
NotDiskFcn per DoneNotDisk-1 ;"rts" address
|
||||
lda 5,s ;"not loaded" function handler
|
||||
dec a ;-1 to make an rts pointer from it
|
||||
pha
|
||||
rts
|
||||
DoneNotDisk sec ;flag not on disk...
|
||||
DoneLoad pla ;return address
|
||||
plx
|
||||
plx ;remove
|
||||
pha
|
||||
rts
|
||||
|
||||
IsOnDisk jsr MakePDp ;make pointer to loaded resource on stack...
|
||||
ldy DataType
|
||||
bne OnDiskFcn ;passed in function ptr to handle loading
|
||||
lda [3] ;get what the pointer is pointing at
|
||||
sta (9,s),y ;y=0
|
||||
bra DoneDisk ;and handle the rest of the disk access...
|
||||
|
||||
OnDiskFcn per DoneDisk-1 ;"rts" address
|
||||
lda 13,s
|
||||
dec a ;-1 to make a rts pointer from it
|
||||
pha
|
||||
rts ;rts to the callback
|
||||
DoneDisk KillLDp ;pld/pla/pla or similar
|
||||
|
||||
PushWord #3 ;purge level
|
||||
PushWord ResIOType ;rtype for release
|
||||
|
||||
LongResult
|
||||
PushWord ResIOType
|
||||
PushWord ThisProgBnk ;upper word of long pointer
|
||||
PushWord StringPtr
|
||||
PushLong #Temp ;don't care about filenum, but toolbox does
|
||||
_RMFindNamedResource ;get it
|
||||
_ReleaseResource ;and throw it out. We have a copy now :)
|
||||
clc
|
||||
bra DoneLoad ;get out of here...
|
||||
|
||||
DataType ds 2
|
||||
end
|
||||
|
||||
*
|
||||
*
|
||||
SaveAPref start
|
||||
*
|
||||
* Saves a preference to disk, handles its not being there...
|
||||
|
||||
* Stack Just before Calling
|
||||
* Word : Length of resource
|
||||
* Word : In2
|
||||
* <Stack Pointer>
|
||||
|
||||
* Also: Registers to pass in:
|
||||
* AAAA: Resource Type to load
|
||||
* XXXX: Pointer to rName pascal string
|
||||
*
|
||||
|
||||
* Based on the Length of the resource, In2 should be:
|
||||
* Length=2 (1 word)
|
||||
* In2 should be the actual value to store.
|
||||
* Length not 2
|
||||
* In2 should be a pointer to a function
|
||||
* When called, a pointer to where to store the resource is at DP 3.
|
||||
* It is your responsibility not to touch the stack, and not write
|
||||
* beyond the size you specified for the resource. End your routine
|
||||
* with an rts.
|
||||
*
|
||||
* See the included code for details.
|
||||
*
|
||||
* On exit, parameters are cleaned up from the stack, and the carry flag is
|
||||
* set according to whether the resource existed on disk (cc=yes, cs=no)
|
||||
|
||||
using CommonData
|
||||
sta ResIOType
|
||||
stx StringPtr
|
||||
|
||||
phb ;have to define on entry!
|
||||
phb ;get the current program bank
|
||||
pla
|
||||
and #$FF ;make it 8-bits only
|
||||
sta ThisProgBnk
|
||||
|
||||
LongResult
|
||||
PushWord ResIOType ;resource type
|
||||
PushWord ThisProgBnk ;upper word of long pointer
|
||||
phx ;StringPtr
|
||||
_RMLoadNamedResource
|
||||
jcc HavePrefs1
|
||||
|
||||
* ;use trashed result from _RMLoadNamedResource
|
||||
* ;as space for output from _NewHandle
|
||||
PushWord #0 ;high word of
|
||||
PushWord 11,s ;length of block in bytes
|
||||
WordResult
|
||||
_GetCurResourceApp
|
||||
PushWord #attrNoCross+attrNoSpec
|
||||
phd
|
||||
phd
|
||||
_NewHandle
|
||||
lda 1,s
|
||||
sta temp
|
||||
lda 1+2,s
|
||||
sta temp+2
|
||||
jsr MakePdp
|
||||
|
||||
lda 11,s ;length on stack...
|
||||
cmp #2 ;word resource?
|
||||
bne FcnPtr1
|
||||
lda 9,s ;value to save to disk
|
||||
sta [3]
|
||||
bra FirstTime ;and go about getting out of here
|
||||
|
||||
FcnPtr1 per FirstTime-1
|
||||
lda 11,s
|
||||
dec a
|
||||
pha
|
||||
rts
|
||||
FirstTime KillLdp ;pld pla pla. Same # bytes as a jsr...
|
||||
|
||||
PushLong temp ;handle
|
||||
PushWord #attrNoSpec+attrNoCross ;attr
|
||||
PushWord ResIOType ;rtype
|
||||
LongResult
|
||||
PushWord #$FFFF
|
||||
PushWord ResIOType
|
||||
_UniqueResourceID
|
||||
lda 1,s
|
||||
sta temp
|
||||
lda 1+2,s
|
||||
sta temp+2
|
||||
_AddResource
|
||||
|
||||
PushWord ResIOType ;rType
|
||||
PushLong temp ;rID
|
||||
PushWord ThisProgBnk ;upper word of long pointer
|
||||
PushWord StringPtr
|
||||
_RMSetResourceName
|
||||
plx ;return address
|
||||
pla
|
||||
pla ;get stacked stuff off
|
||||
phx
|
||||
sec ;flag resource wasn't on disk
|
||||
rts ;out of here...
|
||||
|
||||
HavePrefs1 anop
|
||||
jsr MakePdp
|
||||
lda 11,s ;length byte on stack
|
||||
cmp #2
|
||||
bne FcnPtr2
|
||||
lda 09,s ;value to save to disk
|
||||
sta [3]
|
||||
bra AlreadyThere ;and go about getting out of here
|
||||
|
||||
FcnPtr2 per AlreadyThere-1
|
||||
lda 11,s
|
||||
dec a
|
||||
pha
|
||||
rts
|
||||
AlreadyThere KillLdp ;pld pla pla. Same # bytes as a jsr...
|
||||
|
||||
PushWord #TRUE ;changeflag: true
|
||||
PushWord ResIOType ;rtype
|
||||
|
||||
LongResult
|
||||
pha ;ResIOType from 2 lines up
|
||||
PushWord ThisProgBnk ;upper word of long pointer
|
||||
PushWord StringPtr
|
||||
PushLong #Temp ;don't care about filenum, but toolbox does
|
||||
_RMFindNamedResource ;get it
|
||||
_MarkResourceChange
|
||||
plx ;return address
|
||||
pla
|
||||
pla ;get stacked stuff off
|
||||
phx
|
||||
rts
|
||||
end
|
137
source/twilight/nm/t2.datactl.asm
Normal file
137
source/twilight/nm/t2.datactl.asm
Normal file
@ -0,0 +1,137 @@
|
||||
*
|
||||
*
|
||||
Mk1stDatactl start
|
||||
*
|
||||
* Makes the first (or only) Datactl; once it's made, subsequent calls can be
|
||||
* made to LoadDataCtl for the others.
|
||||
*
|
||||
* Pass In:
|
||||
* XXXX: Lower word of resource ID for control template of DataCrl to load
|
||||
* Upper word must be 0
|
||||
* YYYY: Value to set this control to after it's made.
|
||||
*
|
||||
using Globals
|
||||
using CommonData
|
||||
T2Data1 equ 9
|
||||
|
||||
stx ResToLoadId
|
||||
sty ResValue
|
||||
|
||||
LongResult ; for CallCtlDefProc
|
||||
LongResult ; for NewControl2
|
||||
pei <T2data1+2
|
||||
pei <T2data1
|
||||
PushWord #singlePtr
|
||||
LongResult
|
||||
PushWord #rControlTemplate
|
||||
PushWord #0 ;upper word of res id #
|
||||
PushWord ResToLoadID
|
||||
_LoadResource
|
||||
jsr makePdp
|
||||
PushLong extraInfoPtr
|
||||
makeDP ;phd/tsc/tcd
|
||||
ldy #2
|
||||
lda [3],y
|
||||
sta dfDefProc+2
|
||||
tax
|
||||
lda [3]
|
||||
sta dfDefProc
|
||||
pld
|
||||
ply
|
||||
ply ;keep a,x registers intact
|
||||
ldy #$0E ; procRef
|
||||
sta [3],y
|
||||
iny
|
||||
iny
|
||||
txa
|
||||
sta [3],y
|
||||
pld
|
||||
_NewControl2
|
||||
; plx
|
||||
; plx
|
||||
PushWord #SetFieldValue
|
||||
PushWord ResValue
|
||||
PushWord #34 ;field number - they start at 34
|
||||
_CallCtlDefProc
|
||||
plx ;always zero
|
||||
plx ;same
|
||||
rts
|
||||
end
|
||||
|
||||
*
|
||||
*
|
||||
LoadDataCtl start
|
||||
*
|
||||
* Loads subsequent DataCtls into memory.
|
||||
* Pass In:
|
||||
* XXXX: Lower word of resource ID for control template of DataCrl to load
|
||||
* Upper word must be 0
|
||||
* YYYY: Value to set this control to after it's made.
|
||||
*
|
||||
using Globals
|
||||
using CommonData
|
||||
T2Data1 equ 9
|
||||
|
||||
stx ResToLoadId
|
||||
sty ResValue
|
||||
LongResult ; for CallCtlDefProc
|
||||
LongResult ; for NewControl2
|
||||
pei <T2data1+2
|
||||
pei <T2data1
|
||||
PushWord #singlePtr
|
||||
LongResult
|
||||
PushWord #rControlTemplate
|
||||
PushWord #0 ;upper word of res id #
|
||||
PushWord ResToLoadId
|
||||
_LoadResource
|
||||
jsr makePdp
|
||||
ldy #$0E ; procRef
|
||||
lda dfDefProc
|
||||
sta [3],y
|
||||
iny
|
||||
iny
|
||||
lda dfDefProc+2
|
||||
sta [3],y
|
||||
pld
|
||||
_NewControl2
|
||||
lda 3,s
|
||||
pha
|
||||
lda 3,s
|
||||
pha
|
||||
_MakeThisCtlTarget
|
||||
PushWord #SetFieldValue
|
||||
PushWord ResValue
|
||||
PushWord #34 ;field number - they start at 34
|
||||
_CallCtlDefProc
|
||||
plx ;always zero
|
||||
plx ;same
|
||||
|
||||
rts
|
||||
end
|
||||
|
||||
*
|
||||
*
|
||||
ReadDataCtl start
|
||||
*
|
||||
* Reads a DataCtl's value.
|
||||
* Inputs:
|
||||
* YYYY: Low word of item ID for the DataCtl
|
||||
* Outputs:
|
||||
* AAAA: Current Value of DataCtl
|
||||
* Registers trashed in the process...
|
||||
using CommonData
|
||||
|
||||
LongResult
|
||||
LongResult
|
||||
PushLong WindPtr
|
||||
PushWord #0 ;upper word of DataCtl ID
|
||||
phy ;lower word
|
||||
_GetCtlHandleFromID
|
||||
PushWord #GetFieldValue
|
||||
PushWord #0 ;not used for GetFieldValue
|
||||
PushWord #34 ;field number - they start at 34
|
||||
_CallCtlDefProc
|
||||
pla ;this is the current tag
|
||||
plx ;always zero
|
||||
rts
|
||||
end
|
Loading…
Reference in New Issue
Block a user