forked from nmlgc/ReC98
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathth03_op.asm
5133 lines (4501 loc) · 95.2 KB
/
th03_op.asm
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
;
; +-------------------------------------------------------------------------+
; | This file has been generated by The Interactive Disassembler (IDA) |
; | Copyright (c) 2009 by Hex-Rays, <[email protected]> |
; +-------------------------------------------------------------------------+
;
; Input MD5 : 661F4F8FFAF1F3274F503D154133DEF0
; File Name : th03/OP.EXE
; Format : MS-DOS executable (EXE)
; Base Address: 0h Range: 0h-FD80h Loaded length: E97Ah
; Entry Point : 0:0
; OS type : MS DOS
; Application type: Executable 16bit
.286 ; Force the .model directive to create 16-bit default segments...
.model large
__LARGE__ equ 1
.386 ; ... then switch to what we actually need.
; And yes, we can't move this to an include file for some reason.
include ReC98.inc
include th03/th03.asm
include th02/music/music.inc
extern SCOPY@:proc
extern __mbcjmstojis:proc
extern __mbctype:byte
extern _execl:proc
extern _getch:proc
extern _memcpy:proc
; ===========================================================================
; Segment type: Pure code
_TEXT segment word public 'CODE' use16
assume cs:_TEXT
assume es:nothing, ds:_DATA, fs:nothing, gs:nothing
include libs/master.lib/bfnt_entry_pat.asm
include libs/master.lib/bfnt_extend_header_skip.asm
include libs/master.lib/bfnt_header_read.asm
include libs/master.lib/bfnt_header_analysis.asm
include libs/master.lib/bcloser.asm
include libs/master.lib/bfill.asm
include libs/master.lib/bfnt_palette_set.asm
include libs/master.lib/bgetc.asm
include libs/master.lib/palette_black_out.asm
include libs/master.lib/bopenr.asm
include libs/master.lib/bread.asm
include libs/master.lib/bseek.asm
include libs/master.lib/bseek_.asm
include libs/master.lib/dos_axdx.asm
include libs/master.lib/dos_keyclear.asm
include libs/master.lib/dos_puts2.asm
include libs/master.lib/dos_setvect.asm
include libs/master.lib/egc.asm
include libs/master.lib/egc_shift_left_all.asm
include libs/master.lib/file_append.asm
include libs/master.lib/file_close.asm
include libs/master.lib/file_create.asm
include libs/master.lib/file_exist.asm
include libs/master.lib/file_read.asm
include libs/master.lib/file_ropen.asm
include libs/master.lib/file_seek.asm
include libs/master.lib/file_write.asm
include libs/master.lib/dos_close.asm
include libs/master.lib/dos_ropen.asm
include libs/master.lib/grcg_boxfill.asm
include libs/master.lib/grcg_byteboxfill_x.asm
include libs/master.lib/grcg_polygon_c.asm
include libs/master.lib/grcg_pset.asm
include libs/master.lib/grcg_setcolor.asm
include libs/master.lib/gaiji_backup.asm
include libs/master.lib/gaiji_entry_bfnt.asm
include libs/master.lib/gaiji_putsa.asm
include libs/master.lib/gaiji_read.asm
include libs/master.lib/gaiji_write.asm
include libs/master.lib/graph_400line.asm
include libs/master.lib/graph_clear.asm
include libs/master.lib/graph_copy_page.asm
include libs/master.lib/graph_extmode.asm
include libs/master.lib/graph_gaiji_puts.asm
include libs/master.lib/graph_pi_free.asm
include libs/master.lib/graph_pi_load_pack.asm
include libs/master.lib/graph_pack_put_8.asm
include libs/master.lib/graph_show.asm
include libs/master.lib/graph_start.asm
include libs/master.lib/js_end.asm
include libs/master.lib/keybeep.asm
include libs/master.lib/make_linework.asm
include libs/master.lib/palette_init.asm
include libs/master.lib/palette_show.asm
include libs/master.lib/pfclose.asm
include libs/master.lib/pfgetc.asm
include libs/master.lib/pfread.asm
include libs/master.lib/pfrewind.asm
include libs/master.lib/pfseek.asm
include libs/master.lib/random.asm
include libs/master.lib/palette_entry_rgb.asm
include libs/master.lib/rottbl.asm
include libs/master.lib/smem_release.asm
include libs/master.lib/smem_wget.asm
include libs/master.lib/soundio.asm
include libs/master.lib/text_clear.asm
include libs/master.lib/txesc.asm
include libs/master.lib/text_putsa.asm
include libs/master.lib/vsync.asm
include libs/master.lib/vsync_wait.asm
include libs/master.lib/palette_white_in.asm
include libs/master.lib/hmem_lallocate.asm
include libs/master.lib/mem_assign_dos.asm
include libs/master.lib/mem_assign.asm
include libs/master.lib/memheap.asm
include libs/master.lib/mem_unassign.asm
include libs/master.lib/super_free.asm
include libs/master.lib/super_entry_pat.asm
include libs/master.lib/super_entry_at.asm
include libs/master.lib/super_entry_bfnt.asm
include libs/master.lib/super_cancel_pat.asm
include libs/master.lib/super_put.asm
include libs/master.lib/respal_exist.asm
include libs/master.lib/respal_free.asm
include libs/master.lib/pfint21.asm
db 0
include libs/master.lib/js_start.asm
include libs/master.lib/js_sense.asm
db 0
include libs/master.lib/draw_trapezoid.asm
include th03/formats/pfopen.asm
include libs/master.lib/pf_str_ieq.asm
_TEXT ends
; ===========================================================================
; Segment type: Pure code
op_01_TEXT segment byte public 'CODE' use16
assume cs:op_01_TEXT
;org 8
assume es:nothing, ss:nothing, ds:_DATA, fs:nothing, gs:nothing
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
sub_9908 proc near
var_A = word ptr -0Ah
var_8 = byte ptr -8
var_7 = byte ptr -7
var_6 = byte ptr -6
var_3 = word ptr -3
enter 0Ah, 0
push ds
push offset aYume_cfg ; "YUME.CFG"
call file_ropen
push ss
lea ax, [bp+var_8]
push ax
push 8
call file_read
call file_close
mov ax, [bp+var_3]
mov [bp+var_A], ax
mov word ptr _yumeconfig+2, ax
mov word ptr _yumeconfig, 0
les bx, _yumeconfig
mov al, [bp+var_8]
mov es:[bx+15h], al
call snd_determine_mode
mov byte_D880, 0
cmp _snd_active, 0
jnz short loc_9961
les bx, _yumeconfig
mov byte ptr es:[bx+15h], 0
mov byte_D880, 1
jmp short loc_996C
; ---------------------------------------------------------------------------
loc_9961:
cmp [bp+var_8], 0
jnz short loc_996C
mov _snd_active, 0
loc_996C:
les bx, _yumeconfig
mov al, [bp+var_7]
mov es:[bx+16h], al
mov al, [bp+var_6]
mov es:[bx+0Bh], al
leave
retn
sub_9908 endp
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
sub_9980 proc near
var_8 = byte ptr -8
var_7 = byte ptr -7
var_6 = byte ptr -6
enter 8, 0
push ds
push offset aYume_cfg ; "YUME.CFG"
call file_append
pushd 0
push 0
call file_seek
les bx, _yumeconfig
mov al, es:[bx+15h]
mov [bp+var_8], al
mov al, es:[bx+16h]
mov [bp+var_7], al
mov al, es:[bx+0Bh]
mov [bp+var_6], al
push ss
lea ax, [bp+var_8]
push ax
push 4
call file_write
call file_close
leave
retn
sub_9980 endp
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
sub_99C3 proc near
var_8 = byte ptr -8
var_7 = byte ptr -7
var_6 = byte ptr -6
enter 8, 0
lea ax, [bp+var_8]
push ss
push ax
push ds
push offset unk_D881
mov cx, 8
call SCOPY@
push ds
push offset aYume_cfg ; "YUME.CFG"
call file_append
pushd 0
push 0
call file_seek
les bx, _yumeconfig
mov al, es:[bx+15h]
mov [bp+var_8], al
mov al, es:[bx+16h]
mov [bp+var_7], al
mov al, es:[bx+0Bh]
mov [bp+var_6], al
push ss
lea ax, [bp+var_8]
push ax
push 8
call file_write
call file_close
leave
retn
sub_99C3 endp
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
sub_9A17 proc near
var_4 = word ptr -4
var_2 = word ptr -2
enter 4, 0
push si
les bx, _yumeconfig
mov byte ptr es:[bx+39h], 0
mov byte ptr es:[bx+17h], 0
mov byte ptr es:[bx+33h], 0
mov byte ptr es:[bx+0Eh], 0
mov byte ptr es:[bx+0Fh], 1
mov byte ptr es:[bx+28h], 1
mov byte ptr es:[bx+34h], 2
mov byte ptr es:[bx+35h], 0
mov byte ptr es:[bx+0Dh], 0FFh
call sub_BD9A
or al, al
jz short loc_9A59
mov al, 1
jmp loc_9B9A
; ---------------------------------------------------------------------------
loc_9A59:
les bx, _yumeconfig
mov al, es:[bx+0Ch]
mov ah, 0
dec ax
cwd
sub ax, dx
mov bx, ax
sar bx, 1
mov al, [bx+0A0h]
mov ah, 0
mov [bp+var_4], ax
mov bx, word ptr _yumeconfig
mov eax, es:[bx+10h]
mov random_seed, eax
xor si, si
jmp short loc_9ADB
; ---------------------------------------------------------------------------
loc_9A85:
call IRand
mov bx, 7
cwd
idiv bx
mov [bp+var_2], dx
mov bx, [bp+var_2]
cmp byte ptr [bx+99h], 0
jnz short loc_9A85
mov ax, [bp+var_4]
cmp ax, [bp+var_2]
jz short loc_9A85
mov byte ptr [bx+99h], 1
mov ax, [bp+var_2]
add ax, ax
inc ax
mov [bp+var_2], ax
les bx, _yumeconfig
add bx, si
mov al, byte ptr [bp+var_2]
mov es:[bx+29h], al
mov bx, word ptr _yumeconfig
mov al, es:[bx+0Ch]
mov ah, 0
cmp ax, [bp+var_2]
jnz short loc_9ADA
add bx, si
mov al, byte ptr [bp+var_2]
inc al
mov es:[bx+29h], al
loc_9ADA:
inc si
loc_9ADB:
cmp si, 6
jl short loc_9A85
les bx, _yumeconfig
mov al, es:[bx+29h]
mov es:[bx+0Dh], al
mov al, byte ptr [bp+var_4]
add al, al
inc al
mov es:[bx+2Fh], al
mov byte ptr es:[bx+30h], 0Fh
cmp byte ptr es:[bx+0Ch], 0Fh
jnz short loc_9B07
inc byte ptr es:[bx+30h]
loc_9B07:
les bx, _yumeconfig
mov byte ptr es:[bx+31h], 11h
cmp byte ptr es:[bx+0Ch], 11h
jnz short loc_9B1B
inc byte ptr es:[bx+31h]
loc_9B1B:
xor si, si
jmp short loc_9B39
; ---------------------------------------------------------------------------
loc_9B1F:
les bx, _yumeconfig
add bx, si
mov al, es:[bx+29h]
mov ah, 0
dec ax
cwd
sub ax, dx
sar ax, 1
cmp ax, 9
jge loc_9A59
inc si
loc_9B39:
cmp si, 9
jl short loc_9B1F
xor si, si
jmp short loc_9B4E
; ---------------------------------------------------------------------------
loc_9B42:
les bx, _yumeconfig
add bx, si
mov byte ptr es:[bx+18h], 0
inc si
loc_9B4E:
cmp si, 10h
jl short loc_9B42
les bx, _yumeconfig
mov byte ptr es:[bx+36h], 3
mov byte ptr es:[bx+37h], 0
mov al, es:[bx+0Bh]
mov ah, 0
imul ax, 19h
add al, 46h ; 'F'
mov es:[bx+38h], al
call sub_9980
call gaiji_restore
kajacall KAJA_SONG_STOP
call sub_BFC2
pushd 0
push ds
push offset path ; "mainl"
push ds
push offset path ; "mainl"
call _execl
add sp, 0Ch
mov al, 0
loc_9B9A:
pop si
leave
retn
sub_9A17 endp
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
sub_9B9D proc near
arg_0 = word ptr 4
arg_2 = word ptr 6
push bp
mov bp, sp
push si
push di
mov di, [bp+arg_2]
mov si, [bp+arg_0]
or di, di
jnz short loc_9BB8
push 1B0012h
push ds
push offset gp1P_VS_CPU
jmp short loc_9BD3
; ---------------------------------------------------------------------------
loc_9BB8:
cmp di, 1
jnz short loc_9BC9
push 1B0013h
push ds
push offset gp1P_VS_2P
jmp short loc_9BD3
; ---------------------------------------------------------------------------
loc_9BC9:
push 1B0014h
push ds
push offset gpCPU_VS_CPU
loc_9BD3:
push si
call gaiji_putsa
pop di
pop si
pop bp
retn 4
sub_9B9D endp
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
sub_9BDF proc near
var_2 = word ptr -2
enter 2, 0
push si
xor si, si
les bx, _yumeconfig
cmp byte ptr es:[bx+28h], 80h
jnb loc_9C8B
call text_clear
call sub_B0AF
mov [bp+var_2], 0
pushd 0E1h
call sub_9B9D
push 10001h
call sub_9B9D
push 20001h
call sub_9B9D
loc_9C1B:
call _input_mode_interface
or si, si
jnz short loc_9C7E
test _input_sp.lo, low INPUT_UP
jz short loc_9C4A
push [bp+var_2]
push 1
call sub_9B9D
dec [bp+var_2]
cmp [bp+var_2], 0
jge short loc_9C41
mov [bp+var_2], 2
loc_9C41:
push [bp+var_2]
push 0E1h
call sub_9B9D
loc_9C4A:
test _input_sp.lo, low INPUT_DOWN
jz short loc_9C70
push [bp+var_2]
push 1
call sub_9B9D
inc [bp+var_2]
cmp [bp+var_2], 2
jle short loc_9C67
mov [bp+var_2], 0
loc_9C67:
push [bp+var_2]
push 0E1h
call sub_9B9D
loc_9C70:
test _input_sp.lo, low INPUT_SHOT
jnz short loc_9C9B
test _input_sp.hi, high INPUT_OK
jnz short loc_9C9B
loc_9C7E:
mov si, _input_sp
push 1
call frame_delay
jmp short loc_9C1B
; ---------------------------------------------------------------------------
loc_9C8B:
les bx, _yumeconfig
mov al, es:[bx+28h]
mov ah, 0
add ax, 0FF80h
mov [bp+var_2], ax
loc_9C9B:
cmp [bp+var_2], 2
jnz short loc_9CA5
mov al, 1
jmp short loc_9CA7
; ---------------------------------------------------------------------------
loc_9CA5:
mov al, 0
loc_9CA7:
les bx, _yumeconfig
mov es:[bx+0Eh], al
cmp [bp+var_2], 1
jz short loc_9CB9
mov al, 1
jmp short loc_9CBB
; ---------------------------------------------------------------------------
loc_9CB9:
mov al, 0
loc_9CBB:
les bx, _yumeconfig
mov es:[bx+0Fh], al
mov byte ptr es:[bx+39h], 0
mov byte ptr es:[bx+17h], 0
mov byte ptr es:[bx+33h], 0
mov al, byte ptr [bp+var_2]
add al, 80h
mov es:[bx+28h], al
mov byte ptr es:[bx+35h], 0
cmp [bp+var_2], 1
jnz short loc_9CEF
call sub_BA88
or al, al
jz short loc_9D03
jmp short loc_9CF6
; ---------------------------------------------------------------------------
loc_9CEF:
call sub_BC1F
or al, al
jz short loc_9D03
loc_9CF6:
les bx, _yumeconfig
mov byte ptr es:[bx+28h], 0
mov al, 1
jmp short loc_9D49
; ---------------------------------------------------------------------------
loc_9D03:
mov [bp+var_2], 0
jmp short loc_9D19
; ---------------------------------------------------------------------------
loc_9D0A:
les bx, _yumeconfig
add bx, [bp+var_2]
mov byte ptr es:[bx+18h], 0
inc [bp+var_2]
loc_9D19:
cmp [bp+var_2], 10h
jl short loc_9D0A
call sub_9980
call gaiji_restore
kajacall KAJA_SONG_STOP
call sub_BFC2
pushd 0
push ds
push offset path ; "mainl"
push ds
push offset path ; "mainl"
call _execl
add sp, 0Ch
mov al, 0
loc_9D49:
pop si
leave
retn
sub_9BDF endp
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
sub_9D4C proc near
push bp
mov bp, sp
push si
les bx, _yumeconfig
mov byte ptr es:[bx+0Eh], 1
mov byte ptr es:[bx+0Fh], 1
inc byte ptr es:[bx+39h]
cmp byte ptr es:[bx+39h], 4
jbe short loc_9D6E
mov byte ptr es:[bx+39h], 1
loc_9D6E:
les bx, _yumeconfig
mov byte ptr es:[bx+17h], 0
mov byte ptr es:[bx+33h], 0
mov byte ptr es:[bx+28h], 7Fh
mov byte ptr es:[bx+35h], 0
mov al, es:[bx+39h]
mov ah, 0
add ax, ax
mov bx, ax
mov al, [bx+0C2h]
mov bx, word ptr _yumeconfig
mov es:[bx+0Ch], al
mov al, es:[bx+39h]
mov ah, 0
add ax, ax
mov dx, 0C2h ; 'ツ'
inc dx
add ax, dx
mov bx, ax
mov al, [bx]
mov bx, word ptr _yumeconfig
mov es:[bx+0Dh], al
mov al, es:[bx+39h]
mov ah, 0
shl ax, 2
mov bx, ax
mov eax, [bx+0C8h]
mov bx, word ptr _yumeconfig
mov es:[bx+10h], eax
xor si, si
jmp short loc_9DDF
; ---------------------------------------------------------------------------
loc_9DD3:
les bx, _yumeconfig
add bx, si
mov byte ptr es:[bx+18h], 0
inc si
loc_9DDF:
cmp si, 10h
jl short loc_9DD3
push 1
call palette_black_out
call sub_9980
call gaiji_restore
kajacall KAJA_SONG_STOP
call sub_BFC2
pushd 0
push ds
push offset path ; "mainl"
push ds
push offset path ; "mainl"
call _execl
add sp, 0Ch
pop si
pop bp
retn
sub_9D4C endp
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
sub_9E16 proc near
push bp
mov bp, sp
push si
mov _input_sp, INPUT_NONE
xor si, si
jmp short loc_9E43
; ---------------------------------------------------------------------------
loc_9E24:
call _input_mode_interface
les bx, _yumeconfig
inc dword ptr es:[bx+10h]
inc si
cmp si, 208h
jle short loc_9E3C
call sub_9D4C
loc_9E3C:
push 1
call frame_delay
loc_9E43:
cmp _input_sp, INPUT_NONE
jz short loc_9E24
push 0A00100h
push 0
call super_put
mov si, 0B0h ; 'ー'
jmp short loc_9E76
; ---------------------------------------------------------------------------
loc_9E5C:
push si
call sub_B10A
push si
push 1000002h
call super_put
push 1
call frame_delay
add si, 8
loc_9E76:
cmp si, 120h
jl short loc_9E5C
pop si
pop bp
retn
sub_9E16 endp
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
sub_9E7F proc near
push bp
mov bp, sp
push si
les bx, _yumeconfig
mov byte ptr es:[bx+33h], 0FFh
mov byte ptr es:[bx+35h], 1
mov byte ptr es:[bx+28h], 0
xor si, si
jmp short loc_9EA6
; ---------------------------------------------------------------------------
loc_9E9A:
les bx, _yumeconfig
add bx, si
mov byte ptr es:[bx+18h], 0
inc si
loc_9EA6:
cmp si, 10h
jl short loc_9E9A
call sub_9980
call gaiji_restore
kajacall KAJA_SONG_STOP
call super_free
call sub_BFC2
pushd 0
push ds
push offset path ; "mainl"
push ds
push offset path ; "mainl"
call _execl
add sp, 0Ch
mov al, 0
pop si
pop bp
retn
sub_9E7F endp
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
sub_9EDD proc near
arg_0 = word ptr 4
arg_2 = word ptr 6
push bp
mov bp, sp
push si
push di
mov si, [bp+arg_2]
mov di, [bp+arg_0]
or si, si
jnz short loc_9EF8
push (25 shl 16) + 17
push ds
push offset gpSTART
jmp short loc_9F4B
; ---------------------------------------------------------------------------
loc_9EF8:
cmp si, 1
jnz short loc_9F09
push (23 shl 16) + 18
push ds
push offset gpVS_START
jmp short loc_9F4B
; ---------------------------------------------------------------------------
loc_9F09:
cmp si, 2
jnz short loc_9F1A
push (22 shl 16) + 19
push ds
push offset gpMUSIC_ROOM
jmp short loc_9F4B
; ---------------------------------------------------------------------------
loc_9F1A:
cmp si, 3
jnz short loc_9F2B
push (24 shl 16) + 20
push ds
push offset gpHISCORE
jmp short loc_9F4B
; ---------------------------------------------------------------------------
loc_9F2B:
cmp si, 4
jnz short loc_9F3C
push (25 shl 16) + 21
push ds
push offset gpOPTION
jmp short loc_9F4B
; ---------------------------------------------------------------------------
loc_9F3C:
cmp si, 5
jnz short loc_9F51
push (26 shl 16) + 22
push ds
push offset gpQUIT
loc_9F4B:
push di
call gaiji_putsa
loc_9F51:
pop di
pop si
pop bp
retn 4
sub_9EDD endp
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
sub_9F57 proc near
arg_0 = word ptr 4
arg_2 = word ptr 6
push bp
mov bp, sp
push si
push di
mov di, [bp+arg_2]
mov si, [bp+arg_0]
or di, di
jnz short loc_9FD6
call gaiji_putsa pascal, (25 shl 16) + 17, ds offset gpRANK, si
call text_putsa pascal, (37 shl 16) + 17, ds, offset asc_D965, TX_WHITE
les bx, _yumeconfig
mov al, es:[bx+0Bh]
mov ah, 0
mov bx, ax
cmp bx, 3
ja loc_A092
add bx, bx
jmp cs:off_A099[bx]
loc_9FA2:
push (38 shl 16) + 17
push ds
push offset gpEASY
jmp loc_A08C
; ---------------------------------------------------------------------------
loc_9FAF:
push (37 shl 16) + 17
push ds
push offset gpNORMAL
jmp loc_A08C
; ---------------------------------------------------------------------------
loc_9FBC:
push (38 shl 16) + 17
push ds
push offset gpHARD
jmp loc_A08C
; ---------------------------------------------------------------------------
loc_9FC9:
push (37 shl 16) + 17
push ds
push offset gpLUNATIC
jmp loc_A08C
; ---------------------------------------------------------------------------
loc_9FD6:
cmp di, 1
jnz short loc_A02A
call gaiji_putsa pascal, (25 shl 16) + 19, ds, offset gpMUSIC, si
les bx, _yumeconfig
mov al, es:[bx+15h]
mov ah, 0
or ax, ax
jz short loc_A006
cmp ax, 1
jz short loc_A012
cmp ax, 2
jz short loc_A01E
jmp loc_A092
; ---------------------------------------------------------------------------
loc_A006:
push (35 shl 16) + 19
push ds
push offset gpOFF
jmp short loc_A08C
; ---------------------------------------------------------------------------
loc_A012:
push (35 shl 16) + 19
push ds
push offset gpFM_86
jmp short loc_A08C
; ---------------------------------------------------------------------------
loc_A01E:
push (35 shl 16) + 19
push ds
push offset gpMIDI_SC88
jmp short loc_A08C
; ---------------------------------------------------------------------------
loc_A02A:
cmp di, 2