cave-story-randomizer/pre-edited-cs/data/ScriptSource/Head.txt
2021-03-25 20:29:23 -06:00

542 lines
12 KiB
Plaintext

#0,00
<END
7 bit + 3 bit adder using 2 full adders and 4 half adders
yes i just implemented a full on logic circuit in tsc using negative event numbers in order to count how many items the player collected. just wait until i have to parse it in the god forsaken credits using credit tsc
S = A^B S = (A^B)^C
C = A&B C = (A&B) | (C&(A^B))
A B | S C A B C | S C
--------- -----------
0 0 | 0 0 0 0 0 | 0 0
0 1 | 1 0 0 0 1 | 1 0
1 0 | 1 0 0 1 0 | 1 0
1 1 | 0 1 0 1 1 | 0 1
1 0 0 | 1 0
1 0 1 | 0 1
1 1 0 | 0 1
1 1 1 | 1 1
Flags
|item|regA|regB|life|dead
---------------------------
1 |4001|4201|4301|4011|4021
2 |4002|4202|4302|4012|4022
4 |4003|4203|4303|4013|4023
8 |4004|4204|----|4014|4024
16|4005|4205|----|4015|4025
32|4006|4206|----|4016|4026
64|4007|4207|----|----|4027
F |4009|4100|----|4019|4029 (with the exception of carry flag 4100, these flags are used after addition to determine where to put the output)
Not technically counters like these are but other relevant flags:
|pups|misl
-|----|----
1|5001|4031
2|5002|4032
3|5003|4033
4|5004|4034
5|5005|4035
x|----|4036 (24-pack)
A==0, B==0 : S1=0, C=0
#0-00
<FL-4100<FLJ4201:0001<FLJ4301:0002<EVE0-10
A==1, B==0 : S1=1, C=0
#0-01
<FLJ4301:0003<EVE0-10
A==0, B==1 : S1=1, C=0
#0-02
<FL+4201<EVE0-10
A==1, B==1 : S1=0, C=1
#0-03
<FL-4201<FL+4100<EVE0-10
A==0, B==0, C==0 : S2=0, C=0
#0-10
<FLJ4202:0011<FLJ4302:0012<FLJ4100:0013<EVE0-20
A==1, B==0, C==0 : S2=1, C=0
#0-11
<FLJ4302:0014<FLJ4100:0015<EVE0-20
A==0, B==1, C==0 : S2=1, C=0
#0-12
<FLJ4100:0016<FL+4202<EVE0-20
A==0, B==0, C==1 : S2=1, C=0
#0-13
<FL+4202<FL-4100<EVE0-20
A==1, B==1, C==0 : S2=0, C=1
#0-14
<FLJ4100:0017<FL-4202<FL+4100<EVE0-20
A==1, B==0, C==1 : S2=0, C=1
#0-15
<FL-4202<EVE0-20
A==0, B==1, C==1 : S2=0, C=1
#0-16
<EVE0-20
A==1, B==1, C==0 : S2=0, C=1
#0-17
<FLJ4100:0018<FL-4202<FL+4100<EVE0-20
A==1, B==1, C==1 : S2=1, C=1
#0-18
<EVE0-20
A==0, B==0, C==0 : S2=0, C=0
#0-20
<FLJ4203:0021<FLJ4303:0022<FLJ4100:0023<EVE0-30
A==1, B==0, C==0 : S2=1, C=0
#0-21
<FLJ4303:0024<FLJ4100:0025<EVE0-30
A==0, B==1, C==0 : S2=1, C=0
#0-22
<FLJ4100:0026<FL+4203<EVE0-30
A==0, B==0, C==1 : S2=1, C=0
#0-23
<FL+4203<FL-4100<EVE0-30
A==1, B==1, C==0 : S2=0, C=1
#0-24
<FLJ4100:0027<FL-4203<FL+4100<EVE0-30
A==1, B==0, C==1 : S2=0, C=1
#0-25
<FL-4203<EVE0-30
A==0, B==1, C==1 : S2=0, C=1
#0-26
<EVE0-30
A==1, B==1, C==0 : S2=0, C=1
#0-27
<FLJ4100:0028<FL-4203<FL+4100<EVE0-30
A==1, B==1, C==1 : S2=1, C=1
#0-28
<EVE0-30
A==0, C==0 : S3=0, C=0
#0-30
<FLJ4204:0031<FLJ4100:0032<EVE0-40
A==1, C==0 : S3=1, C=0
#0-31
<FLJ4100:0033<EVE0-40
A==0, C==1 : S3=1, C=0
#0-32
<FL+4204<FL-4100<EVE0-40
A==1, C==1 : C3=0, C=1
#0-33
<FL-4204<EVE0-40
same pattern proceeds
#0-40
<FLJ4205:0041<FLJ4100:0042<EVE0-50
#0-41
<FLJ4100:0043<EVE0-50
#0-42
<FL+4205<FL-4100<EVE0-50
#0-43
<FL-4205<EVE0-50
#0-50
<FLJ4206:0051<FLJ4100:0052<EVE0-60
#0-51
<FLJ4100:0053<EVE0-60
#0-52
<FL+4206<FL-4100<EVE0-60
#0-53
<FL-4206<EVE0-60
#0-60
<FLJ4207:0061<FLJ4100:0062<EVE0-70
#0-61
<FLJ4100:0063<EVE0-70
#0-62
<FL+4207<FL-4100<EVE0-70
#0-63
<FL-4207<EVE0-70
#0-70
<FLJ4009:0.00<FLJ4019:0.20<FLJ4029:0.30<END
#0.00
<FLJ4201:0.01<FL-4001<EVE0.02
#0.01
<FL+4001<EVE0.02
#0.02
<FLJ4202:0.03<FL-4002<EVE0.04
#0.03
<FL+4002<EVE0.04
#0.04
<FLJ4203:0.05<FL-4003<EVE0.06
#0.05
<FL+4003<EVE0.06
#0.06
<FLJ4204:0.07<FL-4004<EVE0.08
#0.07
<FL+4004<EVE0.08
#0.08
<FLJ4205:0.09<FL-4005<EVE0.10
#0.09
<FL+4005<EVE0.10
#0.10
<FLJ4206:0.11<FL-4006<EVE0.12
#0.11
<FL+4006<EVE0.12
#0.12
<FLJ4207:0.13<FL-4007<EVE0.14
#0.13
<FL+4007<EVE0.14
#0.14
<FL-4009<END
#0.20
<FLJ4201:0.21<FL-4011<EVE0.22
#0.21
<FL+4011<EVE0.22
#0.22
<FLJ4202:0.23<FL-4012<EVE0.24
#0.23
<FL+4012<EVE0.24
#0.24
<FLJ4203:0.25<FL-4013<EVE0.26
#0.25
<FL+4013<EVE0.26
#0.26
<FLJ4204:0.27<FL-4014<EVE0.28
#0.27
<FL+4014<EVE0.28
#0.28
<FLJ4205:0.29<FL-4015<EVE0.30
#0.29
<FL+4015<EVE0.30
#0.30
<FLJ4206:0.31<FL-4016<EVE0.32
#0.31
<FL+4016<EVE0.32
#0.32
<FL-4019<EVE0015 Increment item counter after collecting HP
#0/00
<FL+4009<FL+4301<FL-4302<FL-4303
<FLJ4001:0/01<FL-4201<EVE0/02
#0/01
<FL+4201<EVE0/02
#0/02
<FLJ4002:0/03<FL-4202<EVE0/04
#0/03
<FL+4202<EVE0/04
#0/04
<FLJ4003:0/05<FL-4203<EVE0/06
#0/05
<FL+4203<EVE0/06
#0/06
<FLJ4004:0/07<FL-4204<EVE0/08
#0/07
<FL+4204<EVE0/08
#0/08
<FLJ4005:0/09<FL-4205<EVE0/10
#0/09
<FL+4205<EVE0/10
#0/10
<FLJ4006:0/11<FL-4206<EVE0/12
#0/11
<FL+4206<EVE0/12
#0/12
<FLJ4007:0/13<FL-4207<EVE0/14
#0/13
<FL+4207<EVE0/14
#0/14
<EVE0-00
#0/20
<FL+4019
<FLJ4011:0/21<FL-4201<EVE0/22
#0/21
<FL+4201<EVE0/22
#0/22
<FLJ4012:0/23<FL-4202<EVE0/24
#0/23
<FL+4202<EVE0/24
#0/24
<FLJ4013:0/25<FL-4203<EVE0/26
#0/25
<FL+4203<EVE0/26
#0/26
<FLJ4014:0/27<FL-4204<EVE0/28
#0/27
<FL+4204<EVE0/28
#0/28
<FLJ4015:0/29<FL-4205<EVE0/30
#0/29
<FL+4205<EVE0/30
#0/30
<FLJ4016:0/31<FL-4206<EVE0/32
#0/31
<FL+4206<EVE0/32
#0/32
<EVE0-00
#0/40
<FLJ4035:0000<FLJ4034:0/44<FLJ4033:0/43<FLJ4032:0/42<FLJ4031:0/41
<FL+4031<EVE0015
#0/41
<FL+4032<EVE0015
#0/42
<FL+4033<EVE0015
#0/43
<FL+4034<EVE0015
#0/44
<FL+4035<EVE0015
#0000
<END
#0001
<PRI<MSG<TUREmpty.<NOD<END
#0002
<AMJ0002:0003<PRI<MSG<TUR<GIT0002<AM+0002:0000<FL+7000
Got the =Polar Star=!<WAI0025<NOD<EVE0015
#0003
<PRI<MSG<TUR<GIT0013<TAM0002:0013:0000<FL+7001
=Polar Star= became the =Spur=!<WAI0025<NOD<EVE0015
#0004
<PRI
<MSG<TUR<GIT0003<FL+7002
Got the =Fireball=!<WAI0025<NOD<CLR
<FLJ2801:0006<FL+2801<AM+0003:0000<EVE0015
#0005
<PRI
<MSG<TUR<GIT0001<FL+7003
Got the =Snake=!<WAI0025<NOD<CLR
<FLJ2801:0006<FL+2801<AM+0001:0000<EVE0015
#0006
<PRI<MSG<TURYou may trade the =Fireball=
with the =Snake= and vice-versa
at the computer in Arthur's House.<WAI0050<NOD<FL+2802<EVE0015
#0007
<PRI<MSG<TUR<GIT0007<AM+0007:0100<FL+2820<FL+7004
Got the =Bubbler=!<WAI0025<NOD<EVE0015
#0008
<PRI<MSG<TUR<GIT0004<AM+0004:0100<FL+7005
Got the =Machine Gun=!<WAI0025<NOD<EVE0015
#0009
<PRI
<MSG<TUR<GIT0009<FL+7006
Got the =Blade=!<WAI0025<NOD<CLR
<FLJ2810:0011<FL+2810<AM+0009:0000<EVE0015
#0010
<PRI
<MSG<TUR<GIT0012<FL+7007
Got the =Nemesis=!<WAI0025<NOD<CLR
<FLJ2810:0011<FL+2810<AM+0012:0000<EVE0015
#0011
<PRI<MSG<TURYou may trade the =Nemesis=
with the =Blade= and vice-versa
at the computer in Arthur's House.<WAI0050<NOD<FL+2811<EVE0015
#0012
<PRI<MSG<TUR<GIT1006Got a =Life Capsule=!<ML+0003
Max health increased by 3!<WAI0025<NOD<FL+4301<FL+4302<FL-4303<EVE0028
#0013
<PRI<MSG<TUR<GIT1006Got a =Life Capsule=!<ML+0004
Max health increased by 4!<WAI0025<NOD<FL-4301<FL-4302<FL+4303<EVE0028
#0014
<PRI<MSG<TUR<GIT1006Got a =Life Capsule=!<ML+0005
Max health increased by 5!<WAI0025<NOD<FL+4301<FL-4302<FL+4303<EVE0028
#0015
<EVE0/00 increment the item counter
#0016
<PRI<MSG<TUR
Do you want to save?<YNJ0000<FL+0431<SVP<CLRGame saved.<NOD<END
#0017
<PRI<SAT<FLJ0201:0018
<LI+1000<SOU0020<AE+<MSG
Health refilled.<NOD<END
#0018
<PRI
<LI+1000<SOU0020<AE+<MSG
Health and missiles refilled.<NOD<END
#0019
<KEY<MSG<TUR
Do you want to rest?<YNJ0000<FAO0004<CMU0000<WAI0020<CLR<TUR.....<NOD<CLO
<WAI0050
<LI+1000<SOU0020<MYD0002<MSG<TUR
Health restored.<NOD<CLO<RMU<FAI0004<END
#0020
<FL+0274<IT+0014<FLJ5006:0026<SNP0136:0000:0000:0000<EVE0021
#0021
<FLJ5004:0025<FLJ5003:0024<FLJ5002:0023<FLJ5001:0022
<PRI<MSG<TUR<GIT1014<FL+5001
Got a =Puppy=!<WAI0025<NOD<EVE0015
#0022
<PRI<MSG<TUR<GIT1014<FL+5002
Got a second =Puppy=!<WAI0025<NOD<EVE0015
#0023
<PRI<MSG<TUR<GIT1014<FL+5003
Got a third =Puppy=!<WAI0025<NOD<EVE0015
#0024
<PRI<MSG<TUR<GIT1014<FL+5004
Got a fourth =Puppy=!<WAI0025<NOD<EVE0015
#0025
<PRI<MSG<TUR<GIT1014<FL+5005<FL+0593
Got the last =Puppy=!<WAI0025<NOD<EVE0015
#0026
<CNP5274:0136:0000<EVE0021
#0028
<EVE0/20 Add to life counter
#0029
<EVE0/40 Set missile expansion count flags
#0030
<PRI<FLJ2420:0032<FLJ0201:0031<FL+0201<FL+7008<AM+0005:0010<MSG<TUR
<GIT0005Got the =Missile Launcher=!<WAI0025<NOD<EVE0029
#0031
<PRI<AM+0005:0005<MSG<TUR
<GIT0006Max missiles increased by 5!<WAI0025<NOD<EVE0029
#0032
<PRI<AM+0010:0005<MSG<TUR
<GIT0011Max missiles increased by 5!<WAI0025<NOD<EVE0029
#0033
<FL+2421<AMJ0005:0034<EVE0030
#0034
<PRI<FL+2420<FL-2421<FL+7009<MSG<TUR<GIT0010<TAM0005:0010:0000
Your Missiles have been powered up!<WAI0025<NOD<EVE0015
#0035
<PRI<FL+4036<FLJ2420:0037<FLJ0201:0036<FL+0201<MSG<TUR<GIT0005<AM+0005:0029
Got the =Missile Launcher=!<WAI0025<NOD<EVE0015
#0036
<PRI<AM+0005:0024<MSG<TUR<GIT0006Max missiles increased by 24!<WAI0025<NOD<EVE0015
#0037
<PRI<AM+0010:0024<MSG<TUR<GIT0011Max missiles increased by 24!<WAI0025<NOD<EVE0015
#0038
<FLJ2421:0034<EVE0030
#0040
<KEY<CMU0000<WAI0040<PRI<WAI0040<CMU0003
<MSG<TUR
You have died.<NOD<CLRWant to retry?<YNJ0049<CLO
<FAO0001<WAI0050<FLJ0431:0048<INI
#0041
<KEY<CMU0000<HMC<WAI0040<PRI<WAI0040<CMU0003
<MSG<TUR
You have drowned.<NOD<CLRWant to retry?<YNJ0049<CLO
<FAO0001<WAI0050<FLJ0431:0048<INI
#0042
<KEY<CMU0000<WAI0040<PRI<WAI0040<CMU0003
<MSG<TUR<HMC
You were never seen again...<NOD<CLRWant to retry?<YNJ0049<CLO
<FAO0001<WAI0050<FLJ0431:0048<INI
#0048
<SMC<LDP
#0049
<CLO<FAO0004<ESC
#0051
<PRI<MSG<TUR<GIT1001<IT+0001<FL+7100
Got =Arthur's Key=!<WAI0025<NOD<EVE0015
#0052
<PRI<MSG<TUR<GIT1002<IT+0002<EQ+0002<FL+7101
Got the =Map System=!<WAI0025<NOD<EVE0015
#0053
<PRI<MSG<TUR<GIT1003<IT+0003<FL+7102
Got =Santa's Key=!<WAI0025<NOD<EVE0015
#0054
<PRI<MSG<TUR<GIT1004<IT+0004<FL+7103
Got the =Silver Locket=!<WAI0025<NOD<EVE0015
#0055
<PRI<MSG<TUR<GIT1005<IT+0005<FL+7104
Got the =Beast Fang=!<WAI0025<NOD<EVE0015
#0057
<PRI<MSG<TUR<GIT1007<IT+0007<FL+7105
Got the =ID Card=!<WAI0025<NOD<EVE0015
#0058
<PRI<MSG<TUR<GIT1008<IT+0008<FL+7106
Got the =Jellyfish Juice=!<WAI0025<NOD<EVE0015
#0059
<PRI<MSG<TUR<GIT1009<IT+0009<FL+7107
Got the =Rusty Key=!<WAI0025<NOD<EVE0015
#0060
<PRI<MSG<TUR<GIT1010<IT+0010<FL+7108
Got the =Gum Key=!<WAI0025<NOD<EVE0015
#0061
<PRI<MSG<TUR<GIT1011<IT+0011<FL+7109
Got the =Gum Base=!<WAI0025<NOD<EVE0015
#0062
<PRI<MSG<TUR<GIT1012<IT+0012<FL+7110
Got the =Charcoal=!<WAI0025<NOD<EVE0015
#0063
<PRI<MSG<TUR<GIT1013<IT+0013<FL+7111
Got the =Explosive=!<WAI0025<NOD<EVE0015
#0064
<EVE0020<FL+7112 (Puppies have their own flags)
#0065
<PRI<MSG<TUR<GIT1015<IT+0015<FL+7113
Got the =Life Pot=!<WAI0025<NOD<EVE0015
#0066
<PRI<MSG<TUR<GIT1016<IT+0016<FL+7114
Got the =Cure-All=!<WAI0025<NOD<EVE0015
#0067
<PRI<MSG<TUR<GIT1017<IT+0017<FL+7115
Got the =Clinic Key=!<WAI0025<NOD<EVE0015
#0068
<ITJ0018:0073
<PRI<MSG<TUR<GIT1018<IT+0018<EQ+0001<FL+0742<FL+7116
Got the =Booster v0.8=!<WAI0025<NOD<EVE0015
#0069
<PRI<MSG<TUR<GIT1019<IT+0019<EQ+0004<FL+7117
Got the =Arms Barrier=!<WAI0025<NOD<EVE0015
#0070
<PRI<MSG<TUR<GIT1020<IT+0020<EQ+0008<FL+7118
Got the =Turbocharge=!<WAI0025<NOD<EVE0015
#0071
<PRI<MSG<TUR<GIT1021<IT+0021<EQ+0016<FL+2900<FL+7119
Got =Curly's Air Tank=!<WAI0025<NOD<EVE0015
#0072
<PRI<MSG<TUR<GIT1022<IT+0022<FL+7120
Got the =Nikumaru Counter=!<WAI0025<NOD<EVE0015
#0073
<PRI<MSG<TUR<GIT1023<IT+0023<IT-0018<EQ+0032<EQ-0001<FL+0743<FL-0742<FL+7121
Got the =Booster v2.0=!<WAI0025<NOD<EVE0015
#0074
<IT+0024<EQ+0064<FL+1020<FL+7122
<PRI<MSG<TUR<GIT1024
Got the =Mimiga Mask=!<WAI0025<NOD<EVE0015
#0075
<PRI<MSG<TUR<GIT1025<IT+0025<FL+7123
Got the =Teleporter Room Key=!<WAI0025<NOD<EVE0015
#0076
<PRI<MSG<TUR<GIT1026<IT+0026<FL+7124
Got =Sue's Letter=!<WAI0025<NOD<EVE0015
#0077
<PRI<MSG<TUR<GIT1027<IT+0027<FL+7125
Got the =Controller=!<WAI0025<NOD<EVE0015
#0078
<PRI<MSG<TUR<GIT1028<IT+0028<FL+7126
Got the =Broken Sprinkler=!<WAI0025<NOD<EVE0015
#0079
<PRI<MSG<TUR<GIT1029<IT+0029<FL+7127
Got the =Sprinkler=!<WAI0025<NOD<EVE0015
#0080
<PRI<MSG<TUR<GIT1030<IT+0030<FL+7128
Got the =Tow Rope=!<WAI0025<NOD<EVE0015
#0081
<PRI<MSG<TUR<GIT1031<IT+0031<FL+7129
Got the =Clay Figure Medal=!<WAI0025<NOD<EVE0015
#0082
<PRI<MSG<TUR<GIT1032<IT+0032<FL+7130
Got the =Little Man=!<WAI0025<NOD<EVE0015
#0083
<PRI<MSG<TUR<GIT1033<IT+0033<FL+7131
Got the =Mushroom Badge=!<WAI0025<NOD<EVE0015
#0084
<PRI<MSG<TUR<GIT1034<IT+0034<FL+7132
Got =Ma Pignon=!<WAI0025<NOD<EVE0015
#0085
<PRI<MSG<TUR<GIT1035<IT+0035<FL+7133
Got =Curly's Underwear=!<WAI0025<NOD<EVE0015
#0086
<PRI<MSG<TUR<GIT1036<IT+0036<FL+7134
Got the =Alien Medal=!<WAI0025<NOD<EVE0015
#0087
<PRI<MSG<TUR<GIT1037<IT+0037<FL+7135
Got =Chaco's Lipstick=!<WAI0025<NOD<EVE0015
#0088
<PRI<MSG<TUR<GIT1038<IT+0038<EQ+0128<FL+0722<FL+7136
Got the =Whimsical Star=!<WAI0025<NOD<EVE0015
#0089
<PRI<MSG<TUR<GIT1039<IT+0039<FL+7137
Got the =Iron Bond=!<WAI0025<NOD<EVE0015