Add files via upload

This commit is contained in:
Antoine Vignau 2020-06-08 22:45:44 +02:00 committed by GitHub
parent dd98c02b9a
commit 8b98405cea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 1370 additions and 0 deletions

View File

@ -0,0 +1,8 @@
asm Dissolve
lnk Dissolve.l
typ $BC
sav */system/cdevs/twilight/Dissolve
cmd auxtype */system/cdevs/twilight/Dissolve,$4004
cmd =2/twilight/rSoundBrowser

View File

@ -0,0 +1,132 @@
^NEWHANDLE MAC
P2SL ]1
PxW ]2;]3
PHL ]4
Tool $902
<<<
^DISPOSEHANDLE MAC
PHL ]1
Tool $1002
<<<
^PTRTOHAND MAC
PxL ]1;]2;]3
Tool $2802
<<<
PXW MAC
DO ]0/1
PHW ]1
DO ]0/2
PHW ]2
DO ]0/3
PHW ]3
DO ]0/4
PHW ]4
FIN
FIN
FIN
FIN
<<<
PXL MAC
DO ]0/1
PHL ]1
DO ]0/2
PHL ]2
DO ]0/3
PHL ]3
DO ]0/4
PHL ]4
FIN
FIN
FIN
FIN
<<<
P2SL MAC
PHA
PHA
IF #=]1
PEA ^]1
ELSE
PHW ]1+2
FIN
PHW ]1
<<<
PHL MAC
IF #=]1
PEA ^]1
ELSE
PHW ]1+2
FIN
PHW ]1
<<<
PHW mac
if #=]1
pea ]1
else
]D = *
lda ]1
do *-]d/3
if MX/2
ds -3
lda ]1+1
pha
lda ]1
fin
pha
else
ds -2
pei ]1
fin
fin
eom
PULLLONG MAC
DO ]0
PullWord ]1
PullWord ]1+2
ELSE
PullWord
PullWord
FIN
<<<
PULLWORD MAC
PLA
DO ]0
STA ]1
FIN
IF MX/2
PLA
DO ]0
STA ]1+1
FIN
FIN
<<<
TOOL MAC
LDX #]1
JSL $E10000
<<<
PUSHLONG MAC
IF #=]1
PushWord #^]1
ELSE
PushWord ]1+2
FIN
PushWord ]1
<<<
PUSHWORD MAC
IF #=]1
PEA ]1
ELSE
IF MX/2
LDA ]1+1
PHA
FIN
LDA ]1
PHA
FIN
<<<
^MMSTARTUP MAC
PHA
Tool $202
<<<
_SENDREQUEST MAC
Tool $1c01
<<<

View File

@ -0,0 +1,428 @@
*------------------------------------------------*
* *
* Dissolve *
* A T2 blanker by Derek Young, DYA *
* *
*------------------------------------------------*
xc
xc
mx %00
rel
lst off
cas IN
use Dissolve.Macs
dum 0
MovePtr adrl 0
RezFileID da 0
MasterID da 0
MyID da 0
PicHandle adrl 0
pixcount da 0
testbyte da 0
mirror adrl 0
normal adrl 0
DissolveScreen adrl 0
leaveflag da 0
dend
dum 1
Bank db 0 ;This is how the stack is set up
rtlAddr adr 0 ;with DP at the top and Result
T2data2 adrl 0 ;occupying the top four bytes
T2data1 adrl 0
T2Message da 0
T2Result adrl 0
T2StackSize adrl 0
dend
*-------------------------------------------------
* SendRequest sendHow values
stopAfterOne equ $8000
sendToAll equ 0
sendToName equ 1
sendToUserID equ 2
t2GetBuffers = $900B
Screen = $E12000
VBL = $C019
*-------------------------------------------------
* start of the blanker...
* this is a really simple blanker - no setup or
* anything else besides "T2Blank".
Start
phb
phk
plb
lda T2Message,s
cmp #2 ;must be BlankT2
beq :blank
brl Bye
:blank lda T2Data1,s
sta MovePtr ;save this in our own DP
lda T2Data1+2,s
sta MovePtr+2
lda T2Data2,s
sta RezFileID
~MMStartUp
pla
sta MasterID
ora #$0100
sta MyID
*-------------------------------------------------
* The start of the program...
Blank
PushWord #t2GetBuffers
PushWord #stopAfterOne+sendToName
PushLong #toT2String
PushLong #0
PushLong #getBuffersOut
_SendRequest
* To do this effect we black out the screen, then randomly
* add pixels from the source picture. The trick to making
* it look good is a fast random number generator.
* Only full 320 mode pixels are moved in, otherwise the
* whole thing would be too slow.
lda shr_main_bufferH
sta normal
lda shr_main_bufferH+2
sta normal+2
ldy #2
lda [normal],y
tax
lda [normal]
sta normal
stx normal+2
~NewHandle #32000;MyID;#$8010;#0
PullLong PicHandle ;can't cross bank boundary!
ldy #2
lda [PicHandle]
sta mirror
lda [PicHandle],y
sta mirror+2
* mirror the screen into the handle
ldal $E19D00
and #$80
beq :320
* flip a 640 mode byte (four pixels)
:640
ldx #0
ldy #32000-1
sep $20
]loop ldal Screen,x
pha
and #%11 ;flip the pixel over
asl
asl
asl
asl
asl
asl ;put it in bit 6 and 7
pha
lda 2,s
and #%1100
asl
asl ;bit 4 and 5
pha
lda 3,s
and #%1100_0000
lsr
lsr
lsr
lsr
lsr
lsr ;bit 0 and 1
pha
lda 4,s
and #%0011_0000
lsr
lsr ;bits 2 and 3
clc
adc 1,s
clc
adc 2,s
clc
adc 3,s
eor #$FF
sta [mirror],y
pla
pla
pla
pla
inx
dey
bpl ]loop
rep $20
bra Again
* flip a 320 mode byte (two pixels)
:320
ldx #0
ldy #32000-1
sep $20
]loop ldal Screen,x
pha
and #$F ;flip the pixel over
asl
asl
asl
asl
pha
lda 2,s
and #$F0
lsr
lsr
lsr
lsr
clc
adc 1,s
sta [mirror],y
pla
pla
inx
dey
bpl ]loop
rep $20
* fade in the mirrored screen
Again
lda mirror
sta DissolveScreen
lda mirror+2
sta DissolveScreen+2
lda #$FFFF
sta leaveflag
jsr DissolveIt
bcs :aborted ;the dissolve was aborted
lda normal
sta DissolveScreen
lda normal+2
sta DissolveScreen+2
lda #$FFFF
sta leaveflag
jsr DissolveIt
bcs :aborted
bra Again
:aborted
lda normal
sta DissolveScreen
lda normal+2
sta DissolveScreen+2
stz leaveflag
** jsr DissolveIt
~DisposeHandle PicHandle
Bye rep $30
lda RTLaddr,s ;move up RTL address
sta T2data1+3,s
lda RTLaddr+1,s
sta T2data1+3+1,s
lda #0
sta T2Result,s
sta T2Result+2,s ;the result (nil for no error)
plb ;restore the bank
tsc ;remove the input parameters.
clc
adc #10
tcs
clc
rtl
*-------------------------------------------------
* Dissolve the screen pointed to by
* "DissolveScreen" onto the current screen.
* Exits when movePtr is true only when leaveflag != 0
*-------------------------------------------------
DissolveIt
lda DissolveScreen
sta :loadbyte+1
sta :countbytes+1
lda DissolveScreen+1
sta :loadbyte+1+1
sta :countbytes+1+1
ldy #0 ;count of bytes
ldx #32000-1
]loop sep $20
:countbytes ldal $FFFFFF,x
cmpl Screen,x
rep $20
beq :1
iny
:1 dex
bpl ]loop
sty pixcount
:findbyte
rep $20 ;this is so we can loop here and be 16 bit
:reloop jsr Random
* we have make sure the number is between 0 and 32000-2 (31998)
and #$7FFF
cmp #32000
bge :reloop
tax ;this is the random number
sep $20
:loadbyte ldal $FFFFFF,x ;load from the source picture
cmpl Screen,x
beq :findbyte ;loop till we get something that hasn't been
;copied yet
stal Screen,x
lda [MovePtr]
bne :Bye
:keepgoing rep $20
dec pixcount ;need to dissolve the whole image
bne :reloop
clc ;no user input
rts
:Bye rep $30
** lda leaveflag
** beq :keepgoing
sec ;user aborted
rts
*------------------------------------------------*
* Random returns a random number in A *
* Randomize seeds the generator from the clock *
* *
* Adapted from the Merlin 16+ package *
*------------------------------------------------*
Random clc
phx
phy
ldx INDEXI
ldy INDEXJ
lda ARRAY-2,X
adc ARRAY-2,Y
sta ARRAY-2,X
dex
dex
bne :DY
ldx #17*2 ;Cycle index if at end of
:DY dey ; the array
dey
bne :SETIX
ldy #17*2
:SETIX stx INDEXI
sty INDEXJ
ply
plx
rts
INDEXI da 17*2 ;The relative positions of
INDEXJ da 5*2 ; these indexes is crucial
ARRAY da 1,1,2,3,5,8,13,21,54,75,129,204
da 323,527,850,1377,2227
Seed pha
ora #1 ;At least one must be odd
sta ARRAY
stx ARRAY+2
phx ;Push index regs on stack
phy
ldx #30
]LUP sta ARRAY+2,X
dex
dex
lda 1,S ;Was Y
sta ARRAY+2,X
dex
dex
lda 3,S ;Was X
sta ARRAY+2,X
lda 5,S ;Original A
dex
dex
bne ]LUP
lda #17*2
sta INDEXI ;Init proper indexes
lda #5*2 ; into array
sta INDEXJ
jsr Random ;Warm the generator up.
jsr Random
jsr Random
jsr Random
ply
plx
pla
rts
LineCounter = $E0C02E ;Vertical scanline counter
Randomize pha
pha
ldx #$2503
jsl $E10000
ply
pla
eor #'DY' ;mix X up a bit (it's not as random)
tax
ldal LineCounter
bra Seed
*=================================================
toT2String str 'DYA~Twilight II~'
getBuffersOut
ds 2 ; receive count
shr_main_bufferH ds 4
shr_aux_bufferH ds 4
palette_bufferH ds 4
*=================================================
sav Dissolve.l

View File

@ -0,0 +1,10 @@
nol ;turn listing off (NO List)
ovr ;always assemble
asm dissolve
lnk dissolve.l
typ EXE
sav dissolve.d

View File

@ -0,0 +1,83 @@
#include "types.rez"
#include "22:t2common.rez"
resource rT2ModuleFlags (moduleFlags) {
fReqUsableScreen +
fLeavesUsableScreen, // module flags word
$01, // enabled flag (unimplemented)
$0110, // minimum T2 version required
NIL, // reserved
"Dissolve" // module name
};
// --- Version resource
resource rVersion (moduleVersion) {
{1,0,0,release,0}, // Version
verUS, // US Version
"T2 Dissolve Module", // program's name
"By Derek Young\n" // copyright notice
"Copyr. 1993 DigiSoft Innovations."
};
// --- About icon resource
resource rIcon (moduleIcon) {
$8000, // kind
$0014, // height
$0016, // width
$"F0C000F0C0F000C000F00F"
$"0FFFFFFFFFFFFFFFFFFFF0"
$"FF0000F000F000F0F0F0FC"
$"0F044FFFFFFFFFFCFCF0F0"
$"FF0FBFFFFFFFFFFCFCFFF0"
$"0F0DCFCCDDDDDDDDFDD0F0"
$"FF0DFFFFDFDDFDDDDDD0FF"
$"0F0DFFFFDDDFDFDDDCD0F0"
$"0F0FFFFFDFDDDDDDFDD0F0"
$"CF0DFDFDFDDFDFFDDDDFFC"
$"0F0FDDFDFDDDFDDDDFD0F0"
$"CF000000000C00F00F00F0"
$"0FFFFFFFFFFFFFFFFAFFFF"
$"000C000F00000C0000F000"
$"F0FFFFFFFFFFFFFFFFFFFF"
$"FCFFFFFFFFFFFFFFFFFF0F"
$"F0FF4AFFFFFFFFFFFFFFFF"
$"FCCCFCCFCCFCCFCCCFCC0F"
$"F0FFFFFFFFFFFFFFFAFF0F"
$"F0F0F0C00F0C0F00C000FF",
$"0FFFFFFFFFFFFFFFFFFFF0"
$"FFFFFFFFFFFFFFFFFFFFFF"
$"FFFFFFFFFFFFFFFFFFFFFF"
$"FFFFFFFFFFFFFFFFFFFFFF"
$"FFFFFFFFFFFFFFFFFFFFFF"
$"FFFFFFFFFFFFFFFFFFFFFF"
$"FFFFFFFFFFFFFFFFFFFFFF"
$"FFFFFFFFFFFFFFFFFFFFFF"
$"FFFFFFFFFFFFFFFFFFFFFF"
$"FFFFFFFFFFFFFFFFFFFFFF"
$"FFFFFFFFFFFFFFFFFFFFFF"
$"FFFFFFFFFFFFFFFFFFFFFF"
$"FFFFFFFFFFFFFFFFFFFFFF"
$"FFFFFFFFFFFFFFFFFFFFFF"
$"0FFFFFFFFFFFFFFFFFFFF0"
$"0FFFFFFFFFFFFFFFFFFFF0"
$"0FFFFFFFFFFFFFFFFFFFF0"
$"0FFFFFFFFFFFFFFFFFFFF0"
$"0FFFFFFFFFFFFFFFFFFFF0"
$"0FFFFFFFFFFFFFFFFFFFF0";
};
// --- rTextForLETextBox2 Templates
resource rTextForLETextBox2 (moduleMessage) {
TBFont TBShaston "\$00\$08"
TBLeftJust
TBBackColor TBColorF
TBForeColor TBColor1 "Dissolve"
TBForeColor TBColor0
" will dissolve your screen in and out over and over again."
};

View File

@ -0,0 +1,14 @@
# dissolve makefile
# by Jim Maricondo
# v1.0 - 3/21/93 9:15pm - coded
dissolve.r: dissolve.rez 22/t2common.rez
compile dissolve.rez keep=dissolve.r
dissolve: dissolve.r dissolve.d
duplicate -d dissolve.d dissolve
duplicate -r dissolve.r dissolve
setfile -at $4004 -t $bc dissolve -m .
cp dissolve *:system:cdevs:twilight:dissolve
22:beep

13
source/twilight/dsdb.asm Normal file
View File

@ -0,0 +1,13 @@
aif t:debugSymbols="G",.begin
mnote '## Note - Debug Symbols: OFF'
ago .jet
.begin
mnote '## Note - Debug Symbols: ON'
.jet
aif t:debugBreaks="G",.begin2
mnote '## Note - Debugging Breaks: OFF'
ago .jet2
.begin2
mnote '## Note - Debugging Breaks: ON'
.jet2

4
source/twilight/dsdb.equ Normal file
View File

@ -0,0 +1,4 @@
debugSymbols gequ $BAD ; Put in debugging symbols ?
debugBreaks gequ $BAD ; Put in debugging breaks ?
debugCode gequ $BAD

View File

@ -0,0 +1,48 @@
*-----------------------------------------------------------------------------*
* makePdp. V1.00 - 12/08/91 by JRM.
*
* Dereference handle (make a pointer) on the stack.
*
* Inputs:
*
* |previous contents|
* |-----------------|
* | handle | Long - Handle to dereference.
* |-----------------|
* | rtsAddr | Word - Return address.
* |-----------------|
*
* Outputs:
*
* | |
* |previous contents|
* |-----------------|
* | pointer | Long - Dereferenced handle.
* |-----------------|
* | rtsAddr | Word - Return address.
* |-----------------|
*
makePdp Start
kind $1000 ; no special memory
debug 'makePdp'
TheHandle equ DP+2
DP equ 1
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
*-----------------------------------------------------------------------------*

120
source/twilight/makeall Normal file
View File

@ -0,0 +1,120 @@
* MakeAll
* v1.0 - 1/2-4/93 - JRM
* v1.1 - 1/9/93 - JRM (jg?!)
* v1.2 - 1/12/93 - ditto?!
* v1.3 - 2/7/93 - static, kalei, changed moviet - JRM
* v1.4 - 2/16/93 - updated parts in general - JRM (hB!!?)
unset exit
set Beep off
echo "## Dissolve..."
newer *:system:cdevs:twilight:dissolve 22:dissolve
if {Status} == 1
cd 22:dissolve
make
end
echo "## Impulse..."
newer *:system:cdevs:twilight:impulse 22:Impulse
if {Status} == 1
cd 22:impulse
make
end
echo "## Kaleidoscope..."
newer *:system:cdevs:twilight:kaleidoscope 22:kalei
if {Status} == 1
cd 22:kalei
make
end
echo "## Meltdown..."
newer *:system:cdevs:twilight:meltdown 22:Meltdown
if {Status} == 1
cd 22:meltdown
make
end
echo "## Moire..."
newer *:system:cdevs:twilight:moire 22:Moire
if {Status} == 1
cd 22:Moire
make
end
echo "## MovieTheater..."
newer *:system:cdevs:twilight:movieTheater 22:Movie
if {Status} == 1
cd 22:movie
make
end
echo "## Phantom..."
newer *:system:cdevs:twilight:phantom 22:phantom
if {Status} == 1
cd 22:phantom
make
end
echo "## Puzzling..."
newer *:system:cdevs:twilight:puzzling 22:puzzling
if {Status} == 1
cd 22:puzzling
make
end
echo "## Spirographics..."
newer *:system:cdevs:twilight:spirographics 22:spiro
if {Status} == 1
cd 22:spiro
make
end
echo "## Static..."
newer *:system:cdevs:twilight:static 22:static
if {Status} == 1
cd 22:static
make
end
echo "## Strobe..."
newer *:system:cdevs:twilight:strobe 22:strobe
if {Status} == 1
cd 22:strobe
make
end
echo "## Tiler..."
newer *:system:cdevs:twilight:tiler 22:tiler
if {Status} == 1
cd 22:tiler
make
end
echo "## Universe..."
newer *:system:cdevs:twilight:universe 22:universe
if {Status} == 1
cd 22:universe
make
end
echo "## Worms..."
newer *:system:cdevs:twilight:worms 22:worms
if {Status} == 1
cd 22:worms
make
end
echo "## YouDrawIt..."
newer *:system:cdevs:twilight:youdrawit 22:ydi
if {Status} == 1
cd 22:ydi
make
end
echo "## DONE! ##"
cd 22:
sysbeep
set Beep on

65
source/twilight/makeall0 Normal file
View File

@ -0,0 +1,65 @@
* MakeAll0
* v1.0 - 1/2-4/93 - JRM
* v1.1 - 1/9/93 - JRM (jg?!)
* v1.2 - 2/7/93 - JRM
unset exit
set Beep off
echo "## Impulse..."
cd 22:impulse
make
echo "## Kaleidoscope..."
cd 22:kalei
make
echo "## Meltdown..."
cd 22:meltdown
make
echo "## Moire..."
cd 22:Moire
make
echo "## MovieTheater..."
cd 22:movie
make
echo "## Puzzling..."
cd 22:puzzling
make
echo "## Spirographics..."
cd 22:spiro
make
echo "## Static..."
cd 22:static
make
echo "## Strobe..."
cd 22:strobe
make
echo "## Tiler..."
cd 22:tiler
make
echo "## Universe..."
cd 22:universe
make
echo "## Worms..."
cd 22:worms
make
echo "## YouDrawIt..."
cd 22:ydi
make
echo "## DONE! ##"
cd 22:
sysbeep
set Beep on

135
source/twilight/t2.h Normal file
View File

@ -0,0 +1,135 @@
/********************************************
* File: T2.h
*
* v1.0 - Josef W. Wankerl - 8 June 1992
* v1.0a - Jim R. Maricondo - 23 December 1992
* v1.0.1 - Jim R. Maricondo - 3 January 1993
* v1.0.2 - Jim R. Maricondo and James C. Smith - 9 January 1993
* v1.0.3 - Jim R. Maricondo - 31 January 1993 (bf)
* v1.0.4 - JRM - 03 Feb 1993 *ROJAC '93* - new ipc stuff
* v1.0.5 - JRM - 28 Feb 1993 *AFS_NYC!* - new blank_screen getbuffers..
* v1.0.6 - JRM - 03 Mar 1993 - new bmr and lmr, getinfo rec
* v1.0.7 - JRM - 06 Mar 1993 - (bmi/lmi/etc)
* v1.0.8 - JRM - 01 Apr 1993 - mcp lmr
* v1.0.9 - JRM - 31 May 1993 - new mr/mi for public release
* v1.1 - JRM 19 Jul 1993 - released to the public at KFest '93
*
********************************************/
#ifndef __TYPES__
#include <TYPES.h>
#endif
#ifndef __T2__
#define __T2__
#define toT2Str "\pDYA~Twilight II~"
/* Action message codes sent to modules. */
#define MakeT2 0
#define SaveT2 1
#define BlankT2 2
#define LoadSetupT2 3
#define UnloadSetupT2 4
#define KillT2 5
#define HitT2 6
/* Resources types. */
#define rT2ModuleFlags 0x1000u
#define rT2ExtSetup1 0x1001u
#define rT2ModuleWord 0x1002u
/* DataField equates. */
#define SetFieldValue 0x8000u /* custom control messages that are */
#define GetFieldValue 0x8001u /* accepted by DataField */
/* DataOut structure for t2StartupTools */
typedef struct startupToolsOut {
Word recvCount;
Word errors; /* returned errors */
};
/* t2StartupTools flag bits */
#define startshut_sane 1ul
#define startshut_sound 2ul
/* DataOut structure for t2GetBuffers */
typedef struct getBuffersOut {
Word recvCount;
void ** shr_main_bufferH; /* handle to bank E1 buffer */
void ** shr_aux_bufferH; /* handle to bank 01 buffer */
void ** palette_bufferH; /* handle to palette buffer */
};
/* this is wrigged to always return ALL info available */
/* to make it easier for C */
typedef struct getInfoOut {
Word recvCount;
Word start_offset; /* -- $0 -- copy from this byte of the buffer */
Word end_offset; /* -- $E -- to this byte of the buffer */
Word state_word; /* state word */
Word count_selected_modules; /* # selected modules */
Word tii_version; /* version of T2 in Toolbox TN 100 format */
void * noblank_cursor320P; /* pointers to noblank cursors */
void * noblank_cursor640P;
};
/*
* t2GetInfo -
* dataIn: reserved (pass zero)
* dataOut: pointer to structure
* +00 - word output - count
* +02 - word input - start buffer offset (FROM this byte)
* +04 - word input - end buffer offset (TO this byte)
* (end buffer offset minus start buffer offset = SIZE)
* +06 - byte array output - returned information output buffer
* +06+SIZE - eos - end of structure
*
* Buffer information available (`-`=through)
* 00,01= state word
* 02,03= number of modules selected in random mode (1 if rm off)
* 04,05= version of Twilight II
* 06,07,08,09= pointer to 320 mode don't blank cursor
* 0a,0b,0c,0d= pointer to 640 mode don't blank cursor
*/
/* T2 External IPC */
#define t2TurnOn 0x9000u
#define t2TurnOff 0x9001u
#define t2BoxOverrideOff 0x9002u
#define t2BoxOverrideOn 0x9003u
#define t2GetInfo 0x9004u
#define t2StartupTools 0x9005u
#define t2ShutdownTools 0x9006u
#define t2ShareMemory 0x9007u
#define t2SetBlinkProc 0x9008u
#define t2ForceBkgBlank 0x9009u
#define t2BkgBlankNow 0x900Au
#define t2GetBuffers 0x900Bu
#define t2Reserved1 0x900Cu
#define t2CalcFreqOffset 0x900Du
/* bits of BlankT2's T2Result [blankMessageResult] */
#define bmrNextModule 0x01000000ul /* goto next module */
#define bmrFadeIn 0x02000000ul /* fade in after all */
#define bmrLeavesUsableScreen 0x04000000ul /* leaves usable screen */
#define bmrLeavesCycleScreen 0x08000000ul /* leaves cycle-able screen */
/* bits of LoadSetupT2's T2Result [loadMessageResult] */
#define lmrReqUsableScreen 0x0001ul /* requires usable screen */
#define lmrFadeOut 0x0002ul /* fade out after all */
#define lmrMostCommonPalette 0x0004ul /* mcp after all */
#define lmrPrematureExit 0x0008ul /* exits before movePtr=true */
/* Bits of flag word passed to modules at loadsetupT2 time in T2data2 (lo) */
/* lmi = loadmessageinput */
#define lmiOverrideSound 0x0001u /* bit0- 1=override sound, 0=sound ok */
/* bits of flag word passed to mdoules at blankT2 time in T2Data2 (lo) */
/* (bmi = blankMessageInput) */
#define bmiBlankNow 0x0001u /* bit0- 1=from blank now, 0= not */
#define bmiCycleColors 0x0002u /* prev mdl left cycle-able screen */
#endif /* __T2__ */

View File

@ -0,0 +1,116 @@
* T2 Common Module Equates. By Jim Maricondo.
* Copyright DigiSoft Innovations 1993, All rights reserved.
* 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
* v1.7c - 03/28/93 - bytearray - T2 v1.1f5
* v1.8d - 04/01/93 - mcp lmr - T2 v1.1f5
* v1.8e - 05/31/93 - new mr/mi - T2 v1.1 release
* Resources types.
rT2ModuleFlags gequ $D001
rT2ExtSetup1 gequ $1001
rT2ModuleWord gequ $1002 ; reztype for module words in T2 setup
rT2String gequ $1010 ; used only by T2!
rByteArray gequ $1012
* 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
t2CalcFreqOffset gequ $900D
* T2 Private IPC
reqDLZSS gequ $8007
t2PrivGetProcs gequ $9020
* DataField equates.
SetFieldValue gequ $8000 ;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
bmiCycleColors gequ $0002 ; prev module left color cycle-able scrn
* bits of BlankT2's T2Result - _hi_ word (blankmessageresult)
bmrNextModule gequ $0100
bmrFadeIn gequ $0200
bmrLeavesUsableScreen gequ $0400
bmrLeavesCycleScreen gequ $0800 ; left color cycle-able screen after all
* bits of LoadSetupT2's T2Result - lo word (loadmessageresult)
lmrReqUsableScreen gequ $0001 ; requires usable screen
lmrFadeOut gequ $0002 ; fade out after all
lmrMostCommonPalette gequ $0004 ; mcp after all
lmrPrematureExit gequ $0008 ; exits before movePtr=true

View File

@ -0,0 +1,103 @@
// =====================================================
// T2 Common Module Resources.
// Copyright 1992-93 Jim Maricondo and DigiSoft Innovations.
//
// v1.0 - 05/24/92 - Initial Version.
// v1.1 - 05/29/92 - Cleaned up, revised module flags. - T2 v1.0d33
// v1.2 - 06/11/92 - Added fOpenRForkWriteEnabled - T2 v1.0d34
// v1.3 - 09/18/92 - v1.1 about string - T2 v1.0d37
// v1.4 - 11/28/92 - DC -> DSI - T2 v1.0.1b1
// v1.5 - 1/2/93 - Misc cleanup - T2 v1.0.1b3 (?)
// v1.5a - 1/9/93 - Changed comments - T2 v1.0.1b4
// v1.6 - 1/28/93 - Revised for _NEW_ rT2ModuleFlags format. - T2 v1.0.1f1
// v1.7 - 2/7/93 - "f" flag word names, $D001 - T2 v1.0.1f2
// v1.7a - 2/16/93 - $1000 -> $D001 - T2 v1.0.1f2
// v1.8 - 03/02/93 - new moduleflagword bits - T2 v1.1f3
// v1.9 - 03/28/93 - mostcommonpalette - t2 v1.1f4
// =====================================================
// =====================================================
// Module resource IDs.
// =====================================================
/***** Required *****/
// #define moduleName $00000001
#define moduleMessage $0010DD01
#define moduleIcon $0010DD01
#define moduleVersion $00000001
#define moduleFlags $00000001
/***** Added for you... *****/
#define moduleComment $00000001
#define moduleInfo $00000002
// =====================================================
// --- custom resource type defines
// =====================================================
#define rT2ModuleFlags $D001
#define rT2ExtSetup1 $1001
#define rT2ModuleWord $1002
#define rT2String $1010 // reserved for use by tii only!
#define rByteArray $1012
// =====================================================
// Defined bits of T2ModuleFlags module flag word.
// =====================================================
#define fSetup $0001
#define fFadeOut $0002
#define fFadeIn $0004
#define fGrafPort320 $0008
#define fGrafPort640 $0010
#define fLoadSetupBoot $0020
#define fLoadSetupBlank $0040
#define fOpenRForkWriteEnabled $0080
#define fMostCommonPalette $0100
#define fReqUsableScreen $0200
#define fLeavesUsableScreen $0400
#define fLeavesCycleScreen $0800
//#define fPrematureExit $1000
#define fForeground $0000
#define fBackground $4000
#define fInternal $8000
// =====================================================
// Custom resource type defines.
// =====================================================
type rT2ModuleFlags {
byte = $01; /* module flags version - use 1 */
hex unsigned word; /* module flags word */
byte; /* enabled flag (unimplemented) - use 1 now */
hex unsigned word; /* minimum T2 version required */
hex unsigned word; /* reserved */
pstring[25]; /* module name */
};
type rT2ModuleWord {
unsigned word;
};
// =====================================================
// Current common comments.
// =====================================================
resource rComment (ModuleComment) {
"\n"
"Twilight II\$AA Module.\n"
"Part of DYA\$D5s Twilight II Project.\n"
"\n"
"Twilight II, the ULTIMATE screen saver for your Apple IIgs!\n"
"\n"
"Twilight II: A quality DYA product, from DigiSoft Innovations. "
"Support the II: do not distribute any parts of Twilight II! "
"II Infinitum!"
"\n"
// "v5b"
};
resource rComment (moduleInfo) {
"This is a Twilight II\$AA screen saver module. "
"Place in the \$D2Twilight\$D3 module folder (located in the same directory "
"as the Twilight II control panel) and access via Twilight II!\n"
"For more information, refer to the Twilight II manual."
};

View File

@ -0,0 +1,91 @@
// =====================================================
// T2 Common Module Resources.
// Copyright 1992-93 Jim Maricondo and DigiSoft Innovations.
//
// v1.0 - 05/24/92 - Initial Version.
// v1.1 - 05/29/92 - Cleaned up, revised module flags. - T2 v1.0d33
// v1.2 - 06/11/92 - Added fOpenRForkWriteEnabled - T2 v1.0d34
// v1.3 - 09/18/92 - v1.1 about string - T2 v1.0d37
// v1.4 - 11/28/92 - DC -> DSI - T2 v1.0.1b1
// v1.5 - 1/2/93 - Misc cleanup - T2 v1.0.1b3 (?)
// v1.5a - 1/9/93 - Changed comments - T2 v1.0.1b4
// v1.6 - 1/28/93 - Revised for _NEW_ rT2ModuleFlags format. - T2 v1.0.1f1
// v1.7 - 2/7/93 - "f" flag word names, $D001 - T2 v1.0.1f2
// v1.7a - 2/16/93 - $1000 -> $D001 - T2 v1.0.1f2
// v1.8 - 03/02/93 - new moduleflagword bits - T2 v1.1f3
// v1.9 - 03/28/93 - mostcommonpalette - t2 v1.1f4
// v2.0 - 06/19/93 - fixed up for release at KFest '93
// =====================================================
// =====================================================
// Module resource IDs.
// =====================================================
/***** Required *****/
// #define moduleName $00000001
#define moduleMessage $0010DD01
#define moduleIcon $0010DD01
#define moduleVersion $00000001
#define moduleFlags $00000001
/***** Added for you... *****/
#define moduleComment $00000001
#define moduleInfo $00000002
// =====================================================
// --- custom resource type defines
// =====================================================
#define rT2ModuleFlags $D001
#define rT2ExtSetup1 $1001
#define rT2ModuleWord $1002
#define rT2String $1010 // reserved for use by tii only!
#define rByteArray $1012
// =====================================================
// Defined bits of T2ModuleFlags module flag word.
// =====================================================
#define fSetup $0001
#define fFadeOut $0002
#define fFadeIn $0004
#define fGrafPort320 $0008
#define fGrafPort640 $0010
#define fLoadSetupBoot $0020
#define fLoadSetupBlank $0040
#define fOpenRForkWriteEnabled $0080
#define fMostCommonPalette $0100
#define fReqUsableScreen $0200
#define fLeavesUsableScreen $0400
#define fLeavesCycleScreen $0800
#define fPrematureExit $1000
#define fForeground $0000
#define fBackground $4000
#define fInternal $8000
// =====================================================
// Custom resource type defines.
// =====================================================
type rT2ModuleFlags {
byte = $01; /* module flags version - use 1 */
hex unsigned word; /* module flags word */
byte; /* enabled flag (unimplemented) - use 1 now */
hex unsigned word; /* minimum T2 version required */
hex unsigned word; /* reserved */
pstring[25]; /* module name */
};
type rT2ModuleWord {
unsigned word;
};
// =====================================================
// Current common comments.
// =====================================================
resource rComment (moduleInfo) {
"This is a Twilight II\$AA screen saver module. "
"Place in the \$D2Twilight\$D3 module folder (located in the same directory "
"as the Twilight II control panel) and access via Twilight II!\n"
"For more information, refer to the Twilight II manual."
};