-
Notifications
You must be signed in to change notification settings - Fork 1
/
5bf10fd1.00
12042 lines (10850 loc) · 420 KB
/
5bf10fd1.00
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
.include "headers.s"
ROMBase:
.long 0x5bf10fd1 /* 40800000 5bf1 0fd1 */ /* checksum */
.long .L4080002a-ROMBase /* 40800004 0000 002a */
.short 0x077d /* 40800008 077d */
jmp %pc@(STARTBOOT) /* 4080000a 4efa 0068 */
jmp %pc@(STARTBOOT) /* 4080000e 4efa 0064 */
.short 0x10f3 /* 40800012 10f3 */ /* subversion */
.short 0x0000 /* 40800014 0000 */
.short 0x0000 /* 40800016 0000 */
.short 0x004e /* 40800018 004e */
.long _size-ROMBase /* 4080001a 0011 aec0 */ /* resource map */
jmp %pc@(.L4080006a) /* 4080001e 4efa 00fa */
DISPOFF:
.long DISPTABLE-ROMBase /* 40800022 0011 9ac0 */ /* trap tables */
CRITICAL:
jmp %pc@(.L40802680) /* 40800026 4efa 2658 */
.L4080002a:
jmp %pc@(STARTBOOT) /* 4080002a 4efa 0048 */
ROMLOC:
.short 0x0000 /* 4080002e 0000 */
.long 0x02ad33de /* 40800030 02ad 33de */
.long 0x02f965a4 /* 40800034 02f9 65a4 */
.long 0x02a8d710 /* 40800038 02a8 d710 */
.long 0x02eb2031 /* 4080003c 02eb 2031 */
.long 0x00200000 /* 40800040 0020 0000 */
.long ERASEMYICON-ROMBase /* 40800044 0000 188a */
.long INSTALLMGR-ROMBase /* 40800048 0000 2400 */
.short 0x0001 /* 4080004c 0001 */
.long INITDISPATCHER-ROMBase /* 4080004e 0001 3a56 */
.long DISPATCHER-ROMBase /* 40800052 0001 3960 */
.long BADTRAP-ROMBase /* 40800056 0001 3aba */
.long STARTSDECLMGR-ROMBase /* 4080005a 0001 57d0 */
.long INITMEMVECT-ROMBase /* 4080005e 0004 1c7c */
.long SWITCHMMU-ROMBase /* 40800062 0000 889a */
.long INITROMVECTORS-ROMBase /* 40800066 0000 5830 */
.L4080006a:
bral DOEJECT /* 4080006a 60ff 0002 c2c0 */
dword_40800070:
.long 0x00000000 /* 40800070 0000 0000 */
STARTBOOT:
movew #0x2700,%sr /* 40800074 46fc 2700 */
subl %d0,%d0 /* 40800078 9080 */
bset #31,%d0 /* 4080007a 08c0 001f */
movec %d0,%cacr /* 4080007e 4e7b 0002 */
movec %cacr,%d0 /* 40800082 4e7a 0002 */
btst #31,%d0 /* 40800086 0800 001f */
beqs .L408000ae /* 4080008a 6722 */
cinva %bc /* 4080008c f4d8 */
subl %d0,%d0 /* 4080008e 9080 */
movec %d0,%cacr /* 40800090 4e7b 0002 */
movec %d0,%tc /* 40800094 4e7b 0003 */
movel #0x807fc040,%d0 /* 40800098 203c */
movec %d0,%dtt0 /* 4080009e 4e7b 0006 */
movel #0x500fc040,%d0 /* 408000a2 203c */
movec %d0,%dtt1 /* 408000a8 4e7b 0007 */
bras .L408000c8 /* 408000ac 601a */
.L408000ae:
movel #0x2000,%d0 /* 408000ae 203c 0000 2000 */
movec %d0,%cacr /* 408000b4 4e7b 0002 */
movec %cacr,%d0 /* 408000b8 4e7a 0002 */
tstl %d0 /* 408000bc 4a80 */
beqs .L408000c8 /* 408000be 6708 */
lea dword_40800070,%a0 /* 408000c0 41fa ffae */
.long 0xf0104000 /* 408000c4 f010 4000 */ /* pmove %a0@,%tc */
.L408000c8:
reset /* 408000c8 4e70 */
bsr6 JUMPINTOROM /* 408000ca 4dfa 0008 60ff 0000 f100 */
bsr6 PORTABLECHECK /* 408000d4 4dfa 0008 60ff 0001 35b4 */
bral STARTTEST1 /* 408000de 60ff 000a 5116 */
STARTINIT1:
moveq #0,%d2 /* 408000e4 7400 */
movel %a6,%sp@- /* 408000e6 2f0e */
bsr6 GETHARDWAREINFO /* 408000e8 4df8 0008 60ff 0000 f5ac */
moveml %d0-%d1/%d7,%sp@- /* 408000f2 48e7 c100 */
bsr6 GETEXTHARDWAREINFO /* 408000f6 4dfa 0008 60ff 0000 f886 */
moveal %sp@(12),%fp /* 40800100 2c6f 000c */
moveml %d0-%d1/%d3-%d4,%fp@(-90) /* 40800104 48ee 001b ffa6 */
moveml %sp@+,%d0-%d1/%d7 /* 4080010a 4cdf 0083 */
bsr6 INITVIAS /* 4080010e 4dfa 0008 60ff 0000 f478 */
bsrl VALIDATEPRAM /* 40800118 61ff 0000 b540 */
moveal %sp@+,%fp /* 4080011e 2c5f */
bsrw sub_408006b0 /* 40800120 6100 058e */
bsrw sub_4080053a /* 40800124 6100 0414 */
bsrw sub_40800588 /* 40800128 6100 045e */
btst #27,%d2 /* 4080012c 0802 001b */
bnes .L40800138 /* 40800130 6606 */
bsrw sub_40800834 /* 40800132 6100 0700 */
bras .L40800148 /* 40800136 6010 */
.L40800138:
bsrl sub_4080a382 /* 40800138 61ff 0000 a248 */
moveal %a4@(-20),%fp /* 4080013e 2c6c ffec */
moveal %a4,%a5 /* 40800142 2a4c */
addal %a4@(-12),%a5 /* 40800144 dbec fff4 */
.L40800148:
moveml %a4@(-90),%d3-%d6 /* 40800148 4cec 0078 ffa6 */
moveml %d0-%d6/%a0-%a1,%sp@- /* 4080014e 48e7 fec0 */
lea 0x100,%a0 /* 40800152 41f8 0100 */
lea 0x2800,%a1 /* 40800156 43f8 2800 */
bsrw sub_4080068e /* 4080015a 6100 0532 */
bsrw INITROMVECTORS /* 4080015e 6100 56d0 */
moveml %sp@+,%d0-%d6/%a0-%a1 /* 40800162 4cdf 037f */
swap %d2 /* 40800166 4842 */
movew %d2,HWCWFlags /* 40800168 31c2 0b22 */
swap %d2 /* 4080016c 4842 */
movel %d0,0xdd0 /* 4080016e 21c0 0dd0 */
movel %d1,0xdd4 /* 40800172 21c1 0dd4 */
movel %a1,0xdd8 /* 40800176 21c9 0dd8 */
movel %d3,0x2400 /* 4080017a 21c3 2400 */
movel %d4,0x2408 /* 4080017e 21c4 2408 */
movel %d5,0x2404 /* 40800182 21c5 2404 */
movel %d6,0x240c /* 40800186 21c6 240c */
moveb %d7,CPUFlag /* 4080018a 11c7 012f */
swap %d7 /* 4080018e 4847 */
moveb %d7,0xcb3 /* 40800190 11c7 0cb3 */
movel %a4,0xddc /* 40800194 21cc 0ddc */
movel %a5,0x10c /* 40800198 21cd 010c */
movel %fp,0x108 /* 4080019c 21ce 0108 */
moveml %d0-%d6/%a0-%a4,%sp@- /* 408001a0 48e7 fef8 */
clrw %sp@- /* 408001a4 4267 */
moveal %sp,%a3 /* 408001a6 264f */
movel #0x1000b,%d3 /* 408001a8 263c 0001 000b */
bsrl PRAMIO /* 408001ae 61ff 0000 b45a */
movew %sp@+,%d0 /* 408001b4 301f */
andiw #256,%d0 /* 408001b6 0240 0100 */
beqw .L40800266 /* 408001ba 6700 00aa */
lea %pc@(ROMBase),%a0 /* 408001be 41fa fe40 */
movel %a0,0x2ae /* 408001c2 21c8 02ae */
movel %a0@(64),%d3 /* 408001c6 2628 0040 */
subal %d3,%a5 /* 408001ca 9bc3 */
movel %a5,%d0 /* 408001cc 200d */
andil #15,%d0 /* 408001ce 0280 0000 000f */
subal %d0,%a5 /* 408001d4 9bc0 */
movel %a5,0x10c /* 408001d6 21cd 010c */
moveal %a5,%a1 /* 408001da 224d */
movel %d3,%d0 /* 408001dc 2003 */
moveq #16,%d2 /* 408001de 7410 */
cmpib #4,CPUFlag /* 408001e0 0c38 0004 012f */
bnes .L40800216 /* 408001e6 662e */
moveq #32,%d2 /* 408001e8 7420 */
bras .L408001f0 /* 408001ea 6004 */
nop /* 408001ec 4e71 */
.align 16
.L408001f0:
move16 %a0@+,%a1@+ /* 408001f0 f620 9000 */
subl %d2,%d0 /* 408001f4 9082 */
move16 %a0@+,%a1@+ /* 408001f6 f620 9000 */
bgts .L408001f0 /* 408001fa 6ef4 */
.L408001fc:
lea %pc@(.L40800230),%a0 /* 408001fc 41fa 0032 */
movel 0x2ae,%d5 /* 40800200 2a38 02ae */
subal 0x2ae,%a0 /* 40800204 91f8 02ae */
moveal 0x10c,%a5 /* 40800208 2a78 010c */
movel %a5,0x2ae /* 4080020c 21cd 02ae */
addal %a0,%a5 /* 40800210 dbc8 */
jmp %a5@ /* 40800212 4ed5 */
nop /* 40800214 4e71 */
.L40800216:
movel %a0@+,%a1@+ /* 40800216 22d8 */
movel %a0@+,%a1@+ /* 40800218 22d8 */
movel %a0@+,%a1@+ /* 4080021a 22d8 */
movel %a0@+,%a1@+ /* 4080021c 22d8 */
subl %d2,%d0 /* 4080021e 9082 */
bgts .L40800216 /* 40800220 6ef4 */
bras .L408001fc /* 40800222 60d8 */
nop /* 40800224 4e71 */
.align 16
.L40800230:
bsrw INITROMVECTORS /* 40800230 6100 55fe */
movel #0x2010,%d0 /* 40800234 203c 0000 2010 */
subl 0x2ae,%d5 /* 4080023a 9ab8 02ae */
.L4080023e:
moveal %d0,%a0 /* 4080023e 2040 */
movel %a0@,%d1 /* 40800240 2210 */
cmpil #-1,%d1 /* 40800242 0c81 ffff ffff */
beqs .L40800258 /* 40800248 670e */
moveal %d1,%a1 /* 4080024a 2241 */
moveal %a1@,%a2 /* 4080024c 2451 */
movel %a2@(8),%d3 /* 4080024e 262a 0008 */
.L40800252:
subl %d5,%a1@+ /* 40800252 9b99 */
dbf %d3,.L40800252 /* 40800254 51cb fffc */
.L40800258:
addql #4,%d0 /* 40800258 5880 */
cmpil #8452,%d0 /* 4080025a 0c80 0000 2104 */
bnes .L4080023e /* 40800260 66dc */
subl %d5,0xdd8 /* 40800262 9bb8 0dd8 */
.L40800266:
moveml %sp@+,%d0-%d6/%a0-%a4 /* 40800266 4cdf 1f7f */
moveal 0xdd8,%a1 /* 4080026a 2278 0dd8 */
bsrw sub_40800acc /* 4080026e 6100 085c */
bsrw INITSCC /* 40800272 6100 0eb4 */
movew %d2,%sp@- /* 40800276 3f02 */
bsrw sub_4080114a /* 40800278 6100 0ed0 */
movew %sp@+,%d2 /* 4080027c 341f */
bsrl INITSCSIHW /* 4080027e 61ff 0001 b4ea */
bsrl sub_40807ece /* 40800284 61ff 0000 7c48 */
bsrl INITMMUGLOBALS /* 4080028a 61ff 0000 8440 */
bsr6 SYSERRINIT /* 40800290 4dfa 0008 60ff 0000 26ca */
cmpib #4,CPUFlag /* 4080029a 0c38 0004 012f */
bnes .L408002a8 /* 408002a0 6606 */
bsrl INSTALLFPSP /* 408002a2 61ff 000c 141c */
.L408002a8:
cmpib #4,CPUFlag /* 408002a8 0c38 0004 012f */
bnes .L408002be /* 408002ae 660e */
movel #32768,%d0 /* 408002b0 203c 0000 8000 */
oril #0x80000000,%d0 /* 408002b6 0080 8000 0000 */
bras .L408002c4 /* 408002bc 6006 */
.L408002be:
movel #14617,%d0 /* 408002be 203c 0000 3919 */
.L408002c4:
movec %d0,%cacr /* 408002c4 4e7b 0002 */
bsrl ENABLEEXTCACHE /* 408002c8 61ff 0000 e750 */
bsrl DISABLEINTSOURCES /* 408002ce 61ff 0000 fb24 */
bsrw sub_40800594 /* 408002d4 6100 02be */
bsrw sub_40800840 /* 408002d8 6100 0566 */
BOOTRETRY:
movew #9984,%sr /* 408002dc 46fc 2700 */
moveq #1,%d0 /* 408002e0 7001 */
moveal JSwapMMU,%a0 /* 408002e2 2078 0dbc */
jsr %a0@ /* 408002e6 4e90 */
bsrw sub_408008a4 /* 408002e8 6100 05ba */
bsrl DISABLEINTSOURCES /* 408002ec 61ff 0000 fb06 */
bsrl INITINTHANDLER /* 408002f2 61ff 0000 fadc */
bsrl INITDISPATCHER /* 408002f8 61ff 0001 375c */
bsrl INITMMUTRAP /* 408002fe 61ff 0000 83c0 */
cmpib #0,0xcb1 /* 40800304 0c38 0000 0cb1 */
beqs .L40800314 /* 4080030a 6708 */
cmpib #1,0xcb1 /* 4080030c 0c38 0001 0cb1 */
bnes .L40800320 /* 40800312 660c */
.L40800314:
movew #0xa89f,%d0 /* 40800314 303c a89f */
_GetToolboxTrapAddress /* 40800318 a746 */
movew #MemoryDispatch,%d0 /* 4080031a 303c a05c */
_SetOSTrapAddress /* 4080031e a247 */
.L40800320:
bsrw CHECKFOREGRET /* 40800320 6100 0f6a */
bnes .L4080033c /* 40800324 6616 */
subaw #100,%sp /* 40800326 9efc 0064 */
moveal %sp,%a0 /* 4080032a 204f */
moveq #99,%d0 /* 4080032c 7063 */
moveal %a0,%a1 /* 4080032e 2248 */
.L40800330:
clrb %a1@+ /* 40800330 4219 */
dbf %d0,.L40800330 /* 40800332 51c8 fffc */
bsrl INITEGRETALT /* 40800336 61ff 0000 dadc */
.L4080033c:
bsrw sub_408007d0 /* 4080033c 6100 0492 */
bsrl INITMEMMGR /* 40800340 61ff 0004 191e */
bsrl INSTALLPRIVTRAP /* 40800346 61ff 0004 113e */
btst #0,MMFlags /* 4080034c 0838 0000 1efc */
beqs .L4080035c /* 40800352 6708 */
lea %pc@(sub_4080067c),%a0 /* 40800354 41fa 0326 */
movel %a0,0x644 /* 40800358 21c8 0644 */
.L4080035c:
btst #7,0xdd7 /* 4080035c 0838 0007 0dd7 */
beqs .L40800372 /* 40800362 670e */
.L40800364:
lea (ELSIETRANSLATE24TO32-.),%a0 /* 40800364 41f9 0007 48ac */
lea %pc@(.L40800364,%a0:l),%a0 /* 4080036a 41fb 88f8 */
movel %a0,0x644 /* 4080036e 21c8 0644 */
.L40800372:
moveq #0,%d0 /* 40800372 7000 */
_SwapMMUMode /* 40800374 a05d */
bsrw sub_40800700 /* 40800376 6100 0388 */
movel #560,%d0 /* 4080037a 203c 0000 0230 */
_NewPtrSysClear /* 40800380 a71e */
movel %a0,0x2b6 /* 40800382 21c8 02b6 */
movew #304,%a0@+ /* 40800386 30fc 0130 */
movel #560,%a0@ /* 4080038a 20bc 0000 0230 */
bsrw sub_4080080e /* 40800390 6100 047c */
bsrl PSCINTINSTALL /* 40800394 61ff 0001 065e */
bsrw sub_40800ab8 /* 4080039a 6100 071c */
bsrl INITPMGRVARS /* 4080039e 61ff 0001 1ea0 */
bsrw CHECKFOREGRET /* 408003a4 6100 0ee6 */
bnes .L408003b4 /* 408003a8 660a */
lea %sp@(100),%sp /* 408003aa 4fef 0064 */
bsrl INITEGRET /* 408003ae 61ff 0000 da60 */
.L408003b4:
bsrl INITRSRCMGR /* 408003b4 61ff 0005 eeec */
bsrl NMINIT /* 408003ba 61ff 0005 5534 */
bsrl INITTIMEMGR /* 408003c0 61ff 0003 9f4e */
jsr %pc@(sub_40801310) /* 408003c6 4eba 0f48 */
clrw %sp@- /* 408003ca 4267 */
.short 0xa895 /* 408003cc a895 */
bsrw sub_40800b74 /* 408003ce 6100 07a4 */
bsrl sub_4080caf0 /* 408003d2 61ff 0000 c71c */
bsrl ENABLEONESECINTS /* 408003d8 61ff 0000 fa5a */
bsrl ENABLE60HZINTS /* 408003de 61ff 0000 fa20 */
movew #8192,%sr /* 408003e4 46fc 2000 */
bsrw sub_40800698 /* 408003e8 6100 02ae */
moveal %a0,%sp /* 408003ec 2e48 */
subaw #8192,%a0 /* 408003ee 90fc 2000 */
moveb MMFlags,%sp@- /* 408003f2 1f38 1efc */
btst #2,MMFlags /* 408003f6 0838 0002 1efc */
beqs .L40800406 /* 408003fc 6708 */
bset #0,MMFlags /* 408003fe 08f8 0000 1efc */
bras .L4080040c /* 40800404 6006 */
.L40800406:
bclr #0,MMFlags /* 40800406 08b8 0000 1efc */
.L4080040c:
_SetApplLimit /* 4080040c a02d */
moveb %sp@+,MMFlags /* 4080040e 11df 1efc */
moveb #1,%d0 /* 40800412 103c 0001 */
_SwapMMUMode /* 40800416 a05d */
.short 0x2230,0x81e2,0x0ddc,0xffba /* movel @(0xddc)@(-0x46),%d1 /* 40800418 2230 81e2 0ddc ffba */
.short 0xd2b0,0x81e2,0x0ddc,0xffec /* addl @(0xddc)@(-0x14),%d1 /* 40800420 d2b0 81e2 0ddc ffec */
movel %d1,0x1ef8 /* 40800428 21c1 1ef8 */
_SwapMMUMode /* 4080042c a05d */
bsrl INITGESTALT /* 4080042e 61ff 0005 1b96 */
lea 0x308,%a1 /* 40800434 43f8 0308 */
bsrl INITQUEUE /* 40800438 61ff 0001 0fae */
bsrw sub_40800b90 /* 4080043e 6100 0750 */
bsrl INITSCSIMGR /* 40800442 61ff 0001 af6c */
bsrl sub_4080c2be /* 40800448 61ff 0000 be74 */
bsrl INITADB /* 4080044e 61ff 0003 945c */
bsrw sub_408009ba /* 40800454 6100 0564 */
bsrl INITRELIABILITY /* 40800458 61ff 0001 1746 */
bsrl EGRETDFACANDPDM
bsrl TEGLOBALINIT /* 40800464 61ff 0003 ba78 */
moveal 0x2a6,%a0 /* 4080046a 2078 02a6 */
moveal %a0@,%a0 /* 4080046e 2050 */
addal #65536,%a0 /* 40800470 d1fc 0001 0000 */
.short 0xa057 /* 40800476 a057 */
moveal 0x2a6,%a0 /* 40800478 2078 02a6 */
movel %a0,0x118 /* 4080047c 21c8 0118 */
movel %a0,0x2aa /* 40800480 21c8 02aa */
movel %a0@,0x114 /* 40800484 21d0 0114 */
lea %sp@(1024),%fp /* 40800488 4def 0400 */
lea %sp@(400),%a5 /* 4080048c 4bef 0190 */
bsrl ENABLESLOTINTS /* 40800490 61ff 0000 f9b0 */
bsrl INITFASTERINVALS /* 40800496 61ff 0005 8808 */
bsrl POWERDOWNALL /* 4080049c 61ff 0001 31c4 */
bsrw sub_40800cb2 /* 408004a2 6100 080e */
btst #0,0x2402 /* 408004a6 0838 0000 2402 */
beqs .L408004b2 /* 408004ac 6704 */
bsrw sub_408012a2 /* 408004ae 6100 0df2 */
.L408004b2:
bsrw sub_40800778 /* 408004b2 6100 02c4 */
movel #1464619843,0xcfc /* 408004b6 21fc 574c 5343 0cfc */
moveq #1,%d0 /* 408004be 7001 */
_SwapMMUMode /* 408004c0 a05d */
moveal 0xddc,%a0 /* 408004c2 2078 0ddc */
movel #1464619843,%a0@(-4) /* 408004c6 217c 574c 5343 fffc */
_SwapMMUMode /* 408004ce a05d */
moveml %d0-%d2/%a0-%a2/%fp,%sp@- /* 408004d0 48e7 e0e2 */
bsrl INITGLOBALS /* 408004d4 61ff 0004 feda */
moveal 0xcc4,%a1 /* 408004da 2278 0cc4 */
movel %a2,%a1@(42) /* 408004de 234a 002a */
btst #4,0xdd2 /* 408004e2 0838 0004 0dd2 */
beqs .L408004f0 /* 408004e8 6706 */
bsrl INSTALLSOUNDINTHANDLER /* 408004ea 61ff 0005 12d0 */
.L408004f0:
bsrl INITSNDDISPATCH /* 408004f0 61ff 0004 cc42 */
bsrl INITMACEDISPATCH /* 408004f6 61ff 0004 cd8e */
bsrl INITIALIZESOUNDMGRCOMMON /* 408004fc 61ff 0004 ea6e */
bsrl DONTSIMPLEBEEPIFTHEHDWILLCRASH /* 40800502 61ff 0004 e9f6 */
bsrl INSTALLSNDPRIMITIVES /* 40800508 61ff 0004 eba6 */
moveml %sp@+,%d0-%d2/%a0-%a2/%fp /* 4080050e 4cdf 4707 */
movew #40,%d0 /* 40800512 303c 0028 */
_InitFS /* 40800516 a06c */
cmpib #4,CPUFlag /* 40800518 0c38 0004 012f */
blts .L40800530 /* 4080051e 6d10 */
movew #0xa02e,%d0 /* 40800520 303c a02e */
.L40800524:
lea (BLOCKMOVE68040-.L40800524),%a0 /* 40800524 41f9 0004 414c */
lea %pc@(.L40800524,%a0:l),%a0 /* 4080052a 41fb 88f8 */
.short 0xa047 /* 4080052e a047 */
.L40800530:
bsrl SETUPDOCKBASES /* 40800530 61ff 0000 cfd6 */
braw BOOTME /* 40800536 6000 1888 */
sub_4080053a:
moveq #2,%d7 /* 4080053a 7e02 */
.L4080053c:
jmp %pc@(%d7:w:2) /* 4080053c 4efb 7200 */
bras .L40800574 /* 40800540 6032 */
subl %d7,%d7 /* 40800542 9e87 */
bset #31,%d7 /* 40800544 08c7 001f */
movec %d7,%cacr /* 40800548 4e7b 7002 */
movec %cacr,%d7 /* 4080054c 4e7a 7002 */
bclr #31,%d7 /* 40800550 0887 001f */
movec %d7,%cacr /* 40800554 4e7b 7002 */
beqs .L40800560 /* 40800558 6706 */
cinva %bc /* 4080055a f4d8 */
moveq #4,%d7 /* 4080055c 7e04 */
rts /* 4080055e 4e75 */
.L40800560:
movew #10249,%d7 /* 40800560 3e3c 2809 */
movec %d7,%cacr /* 40800564 4e7b 7002 */
movec %cacr,%d7 /* 40800568 4e7a 7002 */
lslw #3,%d7 /* 4080056c e74f */
moveq #1,%d7 /* 4080056e 7e01 */
addxl %d7,%d7 /* 40800570 df87 */
rts /* 40800572 4e75 */
.L40800574:
movel %sp,%d7 /* 40800574 2e0f */
clrw %sp@- /* 40800576 4267 */
bsrs sub_40800584 /* 40800578 610a */
exg %d7,%sp /* 4080057a cf8f */
subl %sp,%d7 /* 4080057c 9e8f */
addql #2,%d7 /* 4080057e 5487 */
lsrl #1,%d7 /* 40800580 e28f */
rts /* 40800582 4e75 */
sub_40800584:
movew %sr,%sp@- /* 40800584 40e7 */
rte /* 40800586 4e73 */
sub_40800588:
swap %d7 /* 40800588 4847 */
clrw %d7 /* 4080058a 4247 */
moveb %a1@(18),%d7 /* 4080058c 1e29 0012 */
swap %d7 /* 40800590 4847 */
rts /* 40800592 4e75 */
sub_40800594:
movel 0x64,%sp@- /* 40800594 2f38 0064 */
movew %sr,%sp@- /* 40800598 40e7 */
oriw #1792,%sr /* 4080059a 007c 0700 */
moveal 0x1d4,%a1 /* 4080059e 2278 01d4 */
bclr #5,%a1@(5632) /* 408005a2 08a9 0005 1600 */
moveb #0xff,%a1@(4608) /* 408005a8 137c 00ff 1200 */
moveb #0xa0,%a1@(7168) /* 408005ae 137c 00a0 1c00 */
moveq #12,%d1 /* 408005b4 720c */
moveq #3,%d2 /* 408005b6 7403 */
moveal %sp,%a3 /* 408005b8 264f */
lea %pc@(.L408005fa),%a0 /* 408005ba 41fa 003e */
movel %a0,0x64 /* 408005be 21c8 0064 */
lea %pc@(word_40800602),%a4 /* 408005c2 49fa 003e */
.L408005c6:
moveal %a4,%a0 /* 408005c6 204c */
addaw %a4@,%a0 /* 408005c8 d0d4 */
moveq #2,%d0 /* 408005ca 7002 */
lea %pc@(.L408005d2),%a2 /* 408005cc 45fa 0004 */
jmp %a0@ /* 408005d0 4ed0 */
.L408005d2:
moveal %a4,%a0 /* 408005d2 204c */
addaw %a4@+,%a0 /* 408005d4 d0dc */
moveq #-1,%d0 /* 408005d6 70ff */
lea %pc@(.L408005e2),%a2 /* 408005d8 45fa 0008 */
andiw #-1793,%sr /* 408005dc 027c f8ff */
jmp %a0@ /* 408005e0 4ed0 */
.L408005e2:
notw %d0 /* 408005e2 4640 */
moveaw %a4@+,%a0 /* 408005e4 305c */
movew %d0,%a0@ /* 408005e6 3080 */
tstw %a4@ /* 408005e8 4a54 */
bnes .L408005c6 /* 408005ea 66da */
moveb #32,%a1@(7168) /* 408005ec 137c 0020 1c00 */
movew %sp@+,%sr /* 408005f2 46df */
movel %sp@+,0x64 /* 408005f4 21df 0064 */
rts /* 408005f8 4e75 */
.L408005fa:
tstb %a1@(4096) /* 408005fa 4a29 1000 */
moveal %a3,%sp /* 408005fe 2e4b */
jmp %a2@ /* 40800600 4ed2 */
word_40800602:
.short .L40800614-. /* 40800602 0012 */
.short 0x0d00 /* 40800604 0d00 */
.short .L40800622-. /* 40800606 001c */
.short 0x0d02 /* 40800608 0d02 */
.short .L40800638-. /* 4080060a 002e */
.short 0x0b24 /* 4080060c 0b24 */
.short .L40800664-. /* 4080060e 0056 */
.short 0x0cea /* 40800610 0cea */
.short 0x0000 /* 40800612 0000 */
.L40800614:
moveb %d1,%a1@(0x1000) /* 40800614 1341 1000 */
moveb %d2,%a1@(4608) /* 40800618 1342 1200 */
.L4080061c:
dbf %d0,.L4080061c /* 4080061c 51c8 fffe */
jmp %a2@ /* 40800620 4ed2 */
.L40800622:
moveal 0x1d8,%a0 /* 40800622 2078 01d8 */
moveb %d1,%a1@(4096) /* 40800626 1341 1000 */
moveb %d2,%a1@(4608) /* 4080062a 1342 1200 */
.L4080062e:
btst #0,%a0@ /* 4080062e 0810 0000 */
dbf %d0,.L4080062e /* 40800632 51c8 fffa */
jmp %a2@ /* 40800636 4ed2 */
.L40800638:
moveal 0xc00,%a0 /* 40800638 2078 0c00 */
moveb %d1,%a1@(4096) /* 4080063c 1341 1000 */
moveb %d2,%a1@(4608) /* 40800640 1342 1200 */
btst #0,0xdd0 /* 40800644 0838 0000 0dd0 */
beqs .L40800658 /* 4080064a 670c */
.L4080064c:
btst #0,%a0@(64) /* 4080064c 0828 0000 0040 */
dbf %d0,.L4080064c /* 40800652 51c8 fff8 */
jmp %a2@ /* 40800656 4ed2 */
.L40800658:
btst #0,%a0@(64) /* 40800658 0828 0000 0040 */
dbf %d0,.L40800658 /* 4080065e 51c8 fff8 */
jmp %a2@ /* 40800662 4ed2 */
.L40800664:
lea %a1@(7168),%a0 /* 40800664 41e9 1c00 */
moveb %d1,%a1@(4096) /* 40800668 1341 1000 */
moveb %d2,%a1@(4608) /* 4080066c 1342 1200 */
nop /* 40800670 4e71 */
.L40800672:
btst #0,%a0@ /* 40800672 0810 0000 */
dbf %d0,.L40800672 /* 40800676 51c8 fffa */
jmp %a2@ /* 4080067a 4ed2 */
sub_4080067c:
rts /* 4080067c 4e75 */
sub_4080067e:
movel %a0,%d0 /* 4080067e 2008 */
sub_40800680:
moveq #0,%d2 /* 40800680 7400 */
movew %a0@+,%d2 /* 40800682 3418 */
addl %d0,%d2 /* 40800684 d480 */
movel %d2,%a1@+ /* 40800686 22c2 */
dbf %d1,sub_40800680 /* 40800688 51c9 fff6 */
rts /* 4080068c 4e75 */
sub_4080068e:
moveq #-1,%d1 /* 4080068e 72ff */
.L40800690:
movel %d1,%a0@+ /* 40800690 20c1 */
cmpal %a1,%a0 /* 40800692 b1c9 */
bcss .L40800690 /* 40800694 65fa */
rts /* 40800696 4e75 */
sub_40800698:
movel 0x10c,%d0 /* 40800698 2038 010c */
moveal 0x2a6,%a0 /* 4080069c 2078 02a6 */
subl %a0,%d0 /* 408006a0 9088 */
lsrl #1,%d0 /* 408006a2 e288 */
andiw #-2,%d0 /* 408006a4 0240 fffe */
addal %d0,%a0 /* 408006a8 d1c0 */
subaw #1024,%a0 /* 408006aa 90fc 0400 */
rts /* 408006ae 4e75 */
sub_408006b0:
moveal %sp@+,%sp /* 408006b0 2e5f */
movel %fp@(4),%d7 /* 408006b2 2e2e 0004 */
cmpil #2097152,%d7 /* 408006b6 0c87 0020 0000 */
bges .L408006ca /* 408006bc 6c0c */
lsrl #2,%d7 /* 408006be e48f */
.short 0x4c3c,0x7007,0x0000,0x0003 /* mulul #3,%d7 /* 408006c0 4c3c 7007 0000 0003 */
bras .L408006d0 /* 408006c8 6006 */
.L408006ca:
movel #1572864,%d7 /* 408006ca 2e3c 0018 0000 */
.L408006d0:
exg %d7,%sp /* 408006d0 cf8f */
addal %fp@,%sp /* 408006d2 dfd6 */
movel %d7,%sp@- /* 408006d4 2f07 */
moveal %fp,%a3 /* 408006d6 264e */
.L408006d8:
moveal %a3,%a2 /* 408006d8 244b */
movel %a3@+,%d7 /* 408006da 2e1b */
.L408006dc:
addl %a3@+,%d7 /* 408006dc de9b */
cmpl %a3@+,%d7 /* 408006de be9b */
beqs .L408006dc /* 408006e0 67fa */
subl %a2@+,%d7 /* 408006e2 9e9a */
movel %d7,%a2@+ /* 408006e4 24c7 */
subql #4,%a3 /* 408006e6 598b */
cmpil #-1,%a3@ /* 408006e8 0c93 ffff ffff */
bnes .L408006d8 /* 408006ee 66e8 */
movel %a3@,%a2@+ /* 408006f0 24d3 */
.L408006f2:
clrl %a2@+ /* 408006f2 429a */
movew %a2,%d7 /* 408006f4 3e0a */
bnes .L408006f2 /* 408006f6 66fa */
subal %fp,%a2 /* 408006f8 95ce */
movel %a2,%fp@(-8) /* 408006fa 2d4a fff8 */
rts /* 408006fe 4e75 */
sub_40800700:
lea %pc@(word_4080075c),%a0 /* 40800700 41fa 005a */
moveb MMFlags,%sp@- /* 40800704 1f38 1efc */
btst #2,MMFlags /* 40800708 0838 0002 1efc */
beqs .L40800724 /* 4080070e 6714 */
bset #0,MMFlags /* 40800710 08f8 0000 1efc */
btst #4,MMFlags /* 40800716 0838 0004 1efc */
beqs .L4080072a /* 4080071c 670c */
lea %pc@(word_4080076a),%a0 /* 4080071e 41fa 004a */
bras .L4080072a /* 40800722 6006 */
.L40800724:
bclr #0,MMFlags /* 40800724 08b8 0000 1efc */
.L4080072a:
.short 0xa019 /* 4080072a a019 */
movel 0x118,0x2a6 /* 4080072c 21f8 0118 02a6 */
movel 0x2a6,0x2b2 /* 40800732 21f8 02a6 02b2 */
moveal 0x2a6,%a0 /* 40800738 2078 02a6 */
movel %a0,0x2aa /* 4080073c 21c8 02aa */
moveal %a0@,%a0 /* 40800740 2050 */
movel %a0,0x114 /* 40800742 21c8 0114 */
bsrw sub_40800698 /* 40800746 6100 ff50 */
cmpal %sp,%a0 /* 4080074a b1cf */
blss .L40800750 /* 4080074c 6302 */
moveal %sp,%a0 /* 4080074e 204f */
.L40800750:
subaw #8192,%a0 /* 40800750 90fc 2000 */
.short 0xa02d /* 40800754 a02d */
moveb %sp@+,MMFlags /* 40800756 11df 1efc */
rts /* 4080075a 4e75 */
word_4080075c:
.short 0x0000 /* 4080075c 0000 */
.short 0x2800 /* 4080075e 2800 */
.short 0x0000 /* 40800760 0000 */
.short 0x4000 /* 40800762 4000 */
.short 0x0080 /* 40800764 0080 */
.short 0x0000 /* 40800766 0000 */
.short 0x0000 /* 40800768 0000 */
word_4080076a:
.short 0x3800 /* 4080076a 3800 */
.short 0x0000 /* 4080076c 0000 */
.short 0x3800 /* 4080076e 3800 */
.short 0x1800 /* 40800770 1800 */
.short 0x0040 /* 40800772 0040 */
.short 0x0000 /* 40800774 0000 */
.short 0x0000 /* 40800776 0000 */
sub_40800778:
lea unk_408007b8,%a1 /* 40800778 43fa 003e */
lea 0x174,%a0 /* 4080077c 41f8 0174 */
moveq #3,%d0 /* 40800780 7003 */
.L40800782:
cmpml %a0@+,%a1@+ /* 40800782 b388 */
dbne %d0,.L40800782 /* 40800784 56c8 fffc */
beqs .L4080078c /* 40800788 6702 */
rts /* 4080078a 4e75 */
.L4080078c:
subqw #4,%sp /* 4080078c 594f */
moveal %sp,%a0 /* 4080078e 204f */
movel #262328,%d0 /* 40800790 203c 0004 00b8 */
_ReadXPRAM /* 40800796 a051 */
moveal %a1,%a0 /* 40800798 2049 */
movel %a0@+,%d0 /* 4080079a 2018 */
_WriteXPRAM
lea 0x1f8,%a0 /* 4080079e 41f8 01f8 */
moveq #-1,%d0 /* 408007a2 70ff */
moveb %d0,%a0@ /* 408007a4 1080 */
.short 0xa038 /* 408007a6 a038 */
.short 0xa03f /* 408007a8 a03f */
moveal %sp,%a0 /* 408007aa 204f */
movel #262328,%d0 /* 408007ac 203c 0004 00b8 */
_WriteXPRAM
jmp %pc@(STARTBOOT) /* 408007b4 4efa f8be */
unk_408007b8:
.short 0x0080 /* 408007b8 0080 */
.short 0x0000 /* 408007ba 0000 */
.short 0x0800 /* 408007bc 0800 */
.short 0x8004 /* 408007be 8004 */
.short 0x0000 /* 408007c0 0000 */
.short 0x0000 /* 408007c2 0000 */
.short 0x0000 /* 408007c4 0000 */
.short 0x0000 /* 408007c6 0000 */
.short 0x0004 /* 408007c8 0004 */
.short 0x000c /* 408007ca 000c */
.short 0x476f /* 408007cc 476f */
.short 0x6e65 /* 408007ce 6e65 */
sub_408007d0:
.short 0xa03f /* 408007d0 a03f */
moveq #0,%d1 /* 408007d2 7200 */
moveb 0x206,%d1 /* 408007d4 1238 0206 */
moveq #15,%d0 /* 408007d8 700f */
andw %d1,%d0 /* 408007da c041 */
bnes .L408007e0 /* 408007dc 6602 */
moveq #72,%d0 /* 408007de 7048 */
.L408007e0:
addw %d0,%d0 /* 408007e0 d040 */
movew %d0,0x190 /* 408007e2 31c0 0190 */
lsrw #4,%d1 /* 408007e6 e849 */
bnes .L408007ee /* 408007e8 6604 */
movew #8191,%d1 /* 408007ea 323c 1fff */
.L408007ee:
lslw #2,%d1 /* 408007ee e549 */
movew %d1,0x18e /* 408007f0 31c1 018e */
moveb 0x209,%d1 /* 408007f4 1238 0209 */
moveq #15,%d0 /* 408007f8 700f */
andb %d1,%d0 /* 408007fa c001 */
lslb #2,%d0 /* 408007fc e508 */
movel %d0,0x2f4 /* 408007fe 21c0 02f4 */
lsrb #2,%d1 /* 40800802 e409 */
moveq #60,%d0 /* 40800804 703c */
andb %d1,%d0 /* 40800806 c001 */
movel %d0,0x2f0 /* 40800808 21c0 02f0 */
rts /* 4080080c 4e75 */
sub_4080080e:
moveml %d0/%a0,%sp@- /* 4080080e 48e7 8080 */
subql #4,%sp /* 40800812 598f */
moveal %sp,%a0 /* 40800814 204f */
movel #65674,%d0 /* 40800816 203c 0001 008a */
_ReadXPRAM /* 4080081c a051 */
moveal %sp,%a0 /* 4080081e 204f */
orib #5,%a0@ /* 40800820 0010 0005 */
movel #65674,%d0 /* 40800824 203c 0001 008a */
_WriteXPRAM
addql #4,%sp /* 4080082c 588f */
moveml %sp@+,%d0/%a0 /* 4080082e 4cdf 0101 */
rts /* 40800832 4e75 */
sub_40800834:
moveal %fp,%a4 /* 40800834 284e */
moveal %a4@,%fp /* 40800836 2c54 */
addal %a4@(4),%fp /* 40800838 ddec 0004 */
moveal %fp,%a5 /* 4080083c 2a4e */
rts /* 4080083e 4e75 */
sub_40800840:
movew #-1,0x138 /* 40800840 31fc ffff 0138 */
moveal 0x10c,%a0 /* 40800846 2078 010c */
moveal 0x108,%a1 /* 4080084a 2278 0108 */
movel %a1,0x1ef8 /* 4080084e 21c9 1ef8 */
movel %a0,0x1ef4 /* 40800852 21c8 1ef4 */
.short 0x21f0,0x81e2,0x0ddc,0xffe8,0x1ef0 /* movel @(0xddc)@(0xffffffe8),0x1ef0 /* 40800856 */
moveq #0,%d1 /* 40800860 7200 */
.short 0x0830,0x0000,0x81e2,0x0ddc,0xffe7 /* btst #0,@(0xddc)@(-0x19) /* 40800862 */
bnes .L4080088a /* 4080086c 661c */
lea %pc@(ROMBase),%a2 /* 4080086e 45fa f790 */
movel %a2,%d0 /* 40800872 200a */
andil #16777215,%d0 /* 40800874 0280 00ff ffff */
cmpal %d0,%a0 /* 4080087a b1c0 */
blss .L40800882 /* 4080087c 6304 */
moveal %d0,%a0 /* 4080087e 2040 */
moveal %d0,%a1 /* 40800880 2240 */
.L40800882:
cmpl 0xddc,%d0 /* 40800882 b0b8 0ddc */
bgts .L4080088a /* 40800886 6e02 */
moveq #1,%d1 /* 40800888 7201 */
.L4080088a:
subaw #8192,%a1 /* 4080088a 92fc 2000 */
cmpal %a1,%a0 /* 4080088e b1c9 */
blss .L40800894 /* 40800890 6302 */
moveal %a1,%a0 /* 40800892 2049 */
.L40800894:
movel %a0,0x10c /* 40800894 21c8 010c */
tstl %d1 /* 40800898 4a81 */
beqs .L408008a2 /* 4080089a 6706 */
bsrl MMUCLEANUPFOR8MB /* 4080089c 61ff 0000 7e82 */
.L408008a2:
rts /* 408008a2 4e75 */
sub_408008a4:
lea %pc@(ROMBase),%a0 /* 408008a4 41fa f75a */
movel %a0,0x2ae /* 408008a8 21c8 02ae */
moveal 0xdd8,%a0 /* 408008ac 2078 0dd8 */
movew %a0@(20),0x28e /* 408008b0 31e8 0014 028e */
movel #65537,0xa02 /* 408008b6 21fc 0001 0001 0a02 */
moveq #-1,%d0 /* 408008be 70ff */
movel %d0,0xa06 /* 408008c0 21c0 0a06 */
movew %d0,0x3f6 /* 408008c4 31c0 03f6 */
movel %d0,0xcc4 /* 408008c8 21c0 0cc4 */
bsrw sub_40800acc /* 408008cc 6100 01fe */
clrl 0x13e /* 408008d0 42b8 013e */
clrl 0x2ba /* 408008d4 42b8 02ba */
.L408008d8:
lea (word_4080cb80-.L408008d8),%a0 /* 408008d8 41f9 0000 c2a8 */
lea %pc@(.L408008d8,%a0:l),%a0 /* 408008de 41fb 88f8 */
lea 0x8f4,%a1 /* 408008e2 43f8 08f4 */
moveq #2,%d1 /* 408008e6 7202 */
bsrw sub_4080067e /* 408008e8 6100 fd94 */
clrb 0x12c /* 408008ec 4238 012c */
clrb 0x12d /* 408008f0 4238 012d */
clrb 0x12e /* 408008f4 4238 012e */
clrw 0x144 /* 408008f8 4278 0144 */
clrl 0x21a /* 408008fc 42b8 021a */
clrl 0x110 /* 40800900 42b8 0110 */
.L40800904:
lea (MARIOBOOTSOUND-.L40800904),%a0 /* 40800904 41f9 000c 167c */
lea %pc@(.L40800904,%a0:l),%a0 /* 4080090a 41fb 88f8 */
btst #4,0xdd2 /* 4080090e 0838 0004 0dd2 */
beqs .L4080091a /* 40800914 6704 */
moveal 0xcc0,%a0 /* 40800916 2078 0cc0 */
.L4080091a:
movel %a0,0x266 /* 4080091a 21c8 0266 */
cmpil #1082130432,0x266 /* 4080091e 0cb8 4080 0000 0266 */
bgts .L40800930 /* 40800926 6e08 */
movel #1082130432,0x266 /* 40800928 21fc 4080 0000 0266 */
.L40800930:
lea 0x160,%a1 /* 40800930 43f8 0160 */
bsrl INITQUEUE /* 40800934 61ff 0001 0ab2 */
clrl 0x16a /* 4080093a 42b8 016a */
moveb #0x80,0x172 /* 4080093e 11fc 0080 0172 */
clrl 0x16e /* 40800944 42b8 016e */
clrl 0xba6 /* 40800948 42b8 0ba6 */
clrl 0xb2a /* 4080094c 42b8 0b2a */
clrw 0xbac /* 40800950 4278 0bac */
clrb 0xba5 /* 40800954 4238 0ba5 */
clrl 0xd32 /* 40800958 42b8 0d32 */
movew 0xa06,0xd42 /* 4080095c 31f8 0a06 0d42 */
bsrs sub_408009aa /* 40800962 6146 */
clrw 0x15a /* 40800964 4278 015a */
bclr #0,0x21f /* 40800968 08b8 0000 021f */
.L4080096e:
lea 0x5dad6,%a0 /* 4080096e 41f9 0005 dad6 */
lea %pc@(.L4080096e,%a0:l),%a0 /* 40800974 41fb 88f8 */
movel %a0,0x29a /* 40800978 21c8 029a */
clrl 0x33c /* 4080097c 42b8 033c */
movew #-129,0x25e /* 40800980 31fc ff7f 025e */
moveq #-1,%d0 /* 40800986 70ff */
movew %d0,0xd60 /* 40800988 31c0 0d60 */
movel %d0,0xd62 /* 4080098c 21c0 0d62 */
movel %d0,0xd66 /* 40800990 21c0 0d66 */
lea 0xc16,%a0 /* 40800994 41f8 0c16 */
movel %d0,%a0@+ /* 40800998 20c0 */
movew %d0,%a0@ /* 4080099a 3080 */
lea 0xc10,%a0 /* 4080099c 41f8 0c10 */
clrl %a0@+ /* 408009a0 4298 */
clrw %a0@ /* 408009a2 4250 */
clrl 0x1ff4 /* 408009a4 42b8 1ff4 */
rts /* 408009a8 4e75 */
sub_408009aa:
lea 0x800,%a0 /* 408009aa 41f8 0800 */
lea 0x8f2,%a1 /* 408009ae 43f8 08f2 */
.L408009b2:
clrw %a0@+ /* 408009b2 4258 */
cmpal %a1,%a0 /* 408009b4 b1c9 */
bcss .L408009b2 /* 408009b6 65fa */
rts /* 408009b8 4e75 */
sub_408009ba:
movel #983055,%d0 /* 408009ba 203c 000f 000f */
lea 0x828,%a0 /* 408009c0 41f8 0828 */
movel %d0,%a0@+ /* 408009c4 20c0 */
movel %d0,%a0@+ /* 408009c6 20c0 */
movel %d0,%a0@+ /* 408009c8 20c0 */
clrl %a0@+ /* 408009ca 4298 */
movew 0xc22,%a0@+ /* 408009cc 30f8 0c22 */
movew 0xc20,%a0@ /* 408009d0 30b8 0c20 */
moveq #28,%d0 /* 408009d4 701c */
_NewPtrSys /* 408009d6 a51e */
movel %a0,0xd6a /* 408009d8 21c8 0d6a */
movew #1,%a0@ /* 408009dc 30bc 0001 */
movew #8,%a0@(2) /* 408009e0 317c 0008 0002 */
clrw %a0@(18) /* 408009e6 4268 0012 */
lea %pc@(byte_40800a40),%a1 /* 408009ea 43fa 0054 */
lea %a0@(20),%a0 /* 408009ee 41e8 0014 */
movel %a1@+,%a0@+ /* 408009f2 20d9 */
movel %a1@,%a0@ /* 408009f4 2091 */
lea 0x8f2,%a1 /* 408009f6 43f8 08f2 */
.L408009fa:
lea sub_4080bda8-.L408009fa,%a0 /* 408009fa 41f9 0000 b3ae */
lea %pc@(.L408009fa,%a0:l),%a0 /* 40800a00 41fb 88f8 */
movel %a0,%a1@- /* 40800a04 2308 */
movew #6,%a1@- /* 40800a06 333c 0006 */
.L40800a0a:
lea off_408737e0-.L40800a0a,%a0 /* 40800a0a 41f9 0007 2dd6 */
lea %pc@(.L40800a0a,%a0:l),%a0 /* 40800a10 41fb 88f8 */
lea 0x800,%a1 /* 40800a14 43f8 0800 */
moveq #7,%d1 /* 40800a18 7207 */
bsrw sub_4080067e /* 40800a1a 6100 fc62 */
lea 0x88c,%a1 /* 40800a1e 43f8 088c */
moveq #1,%d1 /* 40800a22 7201 */
bsrw sub_40800680 /* 40800a24 6100 fc5a */
lea 0xda0,%a0 /* 40800a28 41f8 0da0 */
movel #393346,%d0 /* 40800a2c 203c 0006 0082 */
_ReadXPRAM /* 40800a32 a051 */
moveq #-1,%d0 /* 40800a34 70ff */
movew %d0,0x8ce /* 40800a36 31c0 08ce */
movel %d0,0x8d6 /* 40800a3a 21c0 08d6 */
rts /* 40800a3e 4e75 */
byte_40800a40:
.short 0x040a /* 40800a40 040a */
.short 0x0fff /* 40800a42 0fff */
.short 0xff53 /* 40800a44 ff53 */
.short 0x4d48 /* 40800a46 4d48 */
byte_40800a48:
.short 0x0400 /* 40800a48 0400 */
.short 0x0400 /* 40800a4a 0400 */
.short 0x0e00 /* 40800a4c 0e00 */
.short 0x1000 /* 40800a4e 1000 */
.short 0x0b80 /* 40800a50 0b80 */
.short 0x0026 /* 40800a52 0026 */
.short 0x0bae /* 40800a54 0bae */
.short 0x0052 /* 40800a56 0052 */
.short 0x0376 /* 40800a58 0376 */
.short 0x0002 /* 40800a5a 0002 */
.short 0x0384 /* 40800a5c 0384 */
.short 0x0002 /* 40800a5e 0002 */
.short 0x0352 /* 40800a60 0352 */
.short 0x0004 /* 40800a62 0004 */
.short 0x02f8 /* 40800a64 02f8 */
.short 0x0002 /* 40800a66 0002 */
.short 0x0398 /* 40800a68 0398 */
.short 0x0004 /* 40800a6a 0004 */
.short 0x0d54 /* 40800a6c 0d54 */
.short 0x0004 /* 40800a6e 0004 */
.short 0x0100 /* 40800a70 0100 */
.short 0x0002 /* 40800a72 0002 */
.short 0x0108 /* 40800a74 0108 */
.short 0x0014 /* 40800a76 0014 */
.short 0x015c /* 40800a78 015c */
.short 0x0004 /* 40800a7a 0004 */
.short 0x031e /* 40800a7c 031e */
.short 0x0022 /* 40800a7e 0022 */
.short 0x0800 /* 40800a80 0800 */
.short 0x02fc /* 40800a82 02fc */
.short 0x0130 /* 40800a84 0130 */
.short 0x0004 /* 40800a86 0004 */
.short 0x02aa /* 40800a88 02aa */
.short 0x0004 /* 40800a8a 0004 */
.short 0x0cd0 /* 40800a8c 0cd0 */
.short 0x0004 /* 40800a8e 0004 */
.short 0x0cd4 /* 40800a90 0cd4 */
.short 0x0004 /* 40800a92 0004 */
.short 0x0b60 /* 40800a94 0b60 */
.short 0x0004 /* 40800a96 0004 */
.short 0x0d50 /* 40800a98 0d50 */