2014-08-05 19:24:06 +00:00
|
|
|
|
;
|
|
|
|
|
; +-------------------------------------------------------------------------+
|
|
|
|
|
; | This file has been generated by The Interactive Disassembler (IDA) |
|
|
|
|
|
; | Copyright (c) 2009 by Hex-Rays, <support@hex-rays.com> |
|
|
|
|
|
; +-------------------------------------------------------------------------+
|
|
|
|
|
;
|
|
|
|
|
; Input MD5 : AD4E53E1F1A042FBDA82F86B9BD6728C
|
|
|
|
|
|
|
|
|
|
; File Name : th01/OP.EXE
|
|
|
|
|
; Format : MS-DOS executable (EXE)
|
|
|
|
|
; Base Address: 0h Range: 0h-14040h Loaded length: 13418h
|
|
|
|
|
; Entry Point : 0:0
|
|
|
|
|
; OS type : MS DOS
|
|
|
|
|
; Application type: Executable 16bit
|
|
|
|
|
|
2021-03-29 17:16:49 +00:00
|
|
|
|
.386
|
|
|
|
|
.model use16 large
|
2014-08-05 19:24:06 +00:00
|
|
|
|
|
2020-03-12 21:14:23 +00:00
|
|
|
|
BINARY = 'O'
|
|
|
|
|
|
2014-08-22 15:06:33 +00:00
|
|
|
|
include ReC98.inc
|
2019-09-20 19:02:20 +00:00
|
|
|
|
include th01/th01.inc
|
2020-10-26 13:30:35 +00:00
|
|
|
|
include th01/hardware/grppsafx.inc
|
2020-05-06 18:21:39 +00:00
|
|
|
|
include th01/formats/cfg.inc
|
Include RULES.ASI from every executable's dump file.
Having thought this over for a while, I've decided to stay with the "include
slice" model for now, due to various bugs and other reasons.
We need to compile for the 386 CPU, but this causes TASM to automatically
default every segment to 32-bit mode, which of course is not what we want (and
no, .MODEL USE16 sadly does not help either). Appending USE16 to every segment
declaration in all included files seems to work, but for some reason, this
messes up certain jump instructions. WTF? And even if it did work, we would
still have to do this for every single file we include.
The alternative would be to build proper libraries and let the linker merge
all the code. This would add a lot of unwarranted complexity to the build
process. Not to mention all the EXTERN statements we'd have to maintain.
Ultimately, all of the C runtime ASM code is going to vanish anyway once we've
completed the reduction step. Once we're there, we can simply link to the
original version of the library. These initial dumps are not pretty, and I see
no point in wasting time on making intermediary stages of development look
pretty.
Since including RULES.ASI from every slice seems a bit inefficient (and even
potentiall harmful, considering the age of the development tools we have to
work with), we'll only include it once at the top of every main dump file.
[Binary change] Relocations in TH01's REIIDEN.EXE, again.
2014-08-14 06:01:36 +00:00
|
|
|
|
|
2015-02-19 06:46:36 +00:00
|
|
|
|
extern SCOPY@:proc
|
|
|
|
|
extern __setargv__:proc ; main() needs both to be set
|
|
|
|
|
extern __setenvp__:proc
|
|
|
|
|
extern _atol:proc
|
|
|
|
|
extern _execl:proc
|
|
|
|
|
extern _int86:proc
|
|
|
|
|
extern _memcmp:proc
|
|
|
|
|
extern _printf:proc
|
|
|
|
|
|
2020-05-05 17:55:33 +00:00
|
|
|
|
op_01 group op_01_TEXT, op_01__TEXT
|
|
|
|
|
|
2014-08-05 19:24:06 +00:00
|
|
|
|
; ===========================================================================
|
|
|
|
|
|
|
|
|
|
; Segment type: Pure code
|
2015-02-18 11:07:37 +00:00
|
|
|
|
_TEXT segment word public 'CODE' use16
|
|
|
|
|
assume cs:_TEXT
|
2015-02-19 06:46:36 +00:00
|
|
|
|
assume es:nothing, ds:DGROUP, fs:nothing, gs:nothing
|
2014-08-05 19:24:06 +00:00
|
|
|
|
|
2014-08-27 22:58:40 +00:00
|
|
|
|
include libs/master.lib/graph_400line.asm
|
2014-08-27 04:03:08 +00:00
|
|
|
|
include libs/master.lib/graph_clear.asm
|
2014-08-27 03:18:17 +00:00
|
|
|
|
include libs/master.lib/graph_show.asm
|
2014-08-27 23:16:54 +00:00
|
|
|
|
include libs/master.lib/graph_start.asm
|
2014-08-23 14:11:16 +00:00
|
|
|
|
include libs/master.lib/palette_show.asm
|
2014-08-23 14:18:30 +00:00
|
|
|
|
include libs/master.lib/palette_init.asm
|
2014-09-03 13:23:51 +00:00
|
|
|
|
include libs/master.lib/respal_exist.asm
|
2014-09-03 13:41:25 +00:00
|
|
|
|
include libs/master.lib/respal_free.asm
|
2014-09-07 13:47:50 +00:00
|
|
|
|
include libs/master.lib/resdata.asm
|
2014-08-30 07:00:31 +00:00
|
|
|
|
include libs/master.lib/file_read.asm
|
2014-08-30 06:15:42 +00:00
|
|
|
|
include libs/master.lib/file_close.asm
|
2014-08-30 07:12:17 +00:00
|
|
|
|
include libs/master.lib/file_ropen.asm
|
2014-08-30 07:21:44 +00:00
|
|
|
|
include libs/master.lib/file_seek.asm
|
2014-09-07 13:21:23 +00:00
|
|
|
|
include libs/master.lib/dos_free.asm
|
2014-09-07 15:01:58 +00:00
|
|
|
|
include libs/master.lib/keystart.asm
|
2014-09-07 14:21:01 +00:00
|
|
|
|
include libs/master.lib/keybios.asm
|
2014-08-21 20:07:58 +00:00
|
|
|
|
include libs/master.lib/dos_ropen.asm
|
2014-08-20 20:24:05 +00:00
|
|
|
|
include libs/master.lib/egc.asm
|
2014-08-30 10:13:04 +00:00
|
|
|
|
include libs/master.lib/random.asm
|
2015-02-18 11:07:37 +00:00
|
|
|
|
_TEXT ends
|
2014-08-05 19:24:06 +00:00
|
|
|
|
|
|
|
|
|
; ---------------------------------------------------------------------------
|
|
|
|
|
; ===========================================================================
|
|
|
|
|
|
|
|
|
|
; Segment type: Pure code
|
2015-02-21 11:47:24 +00:00
|
|
|
|
op_01_TEXT segment byte public 'CODE' use16
|
2020-05-05 17:55:33 +00:00
|
|
|
|
op_01_TEXT ends
|
|
|
|
|
|
|
|
|
|
op_01__TEXT segment byte public 'CODE' use16
|
|
|
|
|
assume cs:op_01
|
2014-08-05 19:24:06 +00:00
|
|
|
|
;org 4
|
2015-02-18 11:07:37 +00:00
|
|
|
|
assume es:nothing, ss:nothing, ds:_DATA, fs:nothing, gs:nothing
|
2014-08-05 19:24:06 +00:00
|
|
|
|
|
2020-05-06 18:21:39 +00:00
|
|
|
|
extern _cfg_load:proc
|
|
|
|
|
extern _cfg_save:proc
|
2020-05-08 19:03:18 +00:00
|
|
|
|
extern _main_input_sense:proc
|
|
|
|
|
extern _option_input_sense:proc
|
2020-05-27 19:31:39 +00:00
|
|
|
|
extern _whitelines_animate:proc
|
2014-08-05 19:24:06 +00:00
|
|
|
|
|
|
|
|
|
; =============== S U B R O U T I N E =======================================
|
|
|
|
|
|
|
|
|
|
; Attributes: bp-based frame
|
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
sub_A719 proc far
|
2014-08-05 19:24:06 +00:00
|
|
|
|
push bp
|
|
|
|
|
mov bp, sp
|
|
|
|
|
push ds
|
|
|
|
|
push offset aReimu_mdt ; "reimu.mdt"
|
2015-02-21 19:45:02 +00:00
|
|
|
|
call _mdrv2_bgm_load
|
2014-08-05 19:24:06 +00:00
|
|
|
|
add sp, 4
|
2015-02-21 19:45:02 +00:00
|
|
|
|
call _mdrv2_bgm_play
|
2014-08-05 19:24:06 +00:00
|
|
|
|
push 1
|
2015-02-27 22:11:47 +00:00
|
|
|
|
call _graph_accesspage_func
|
2014-08-05 19:24:06 +00:00
|
|
|
|
pop cx
|
2020-03-12 23:54:35 +00:00
|
|
|
|
call _grp_put_palette_show c, offset aReiiden2_grp, ds ; "REIIDEN2.grp"
|
2020-01-05 12:08:24 +00:00
|
|
|
|
call _z_palette_black
|
2021-11-07 17:26:03 +00:00
|
|
|
|
call _graph_copy_accessed_page_to_othe
|
2020-03-12 23:54:35 +00:00
|
|
|
|
call _grp_put c, offset aReiiden3_grp, ds ; "REIIDEN3.grp"
|
2014-08-05 19:24:06 +00:00
|
|
|
|
push 0
|
2015-02-27 22:11:47 +00:00
|
|
|
|
call _graph_accesspage_func
|
2014-08-05 19:24:06 +00:00
|
|
|
|
pop cx
|
2020-03-01 11:24:01 +00:00
|
|
|
|
call _z_palette_black_in
|
2014-08-05 19:24:06 +00:00
|
|
|
|
push 64h ; 'd'
|
2019-11-18 07:28:39 +00:00
|
|
|
|
call _frame_delay
|
2014-08-05 19:24:06 +00:00
|
|
|
|
pop cx
|
2020-05-27 19:31:39 +00:00
|
|
|
|
call _whitelines_animate
|
2014-08-05 19:24:06 +00:00
|
|
|
|
pop bp
|
|
|
|
|
retf
|
|
|
|
|
sub_A719 endp
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
; =============== S U B R O U T I N E =======================================
|
|
|
|
|
|
|
|
|
|
; Attributes: bp-based frame
|
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
sub_A772 proc far
|
2014-08-05 19:24:06 +00:00
|
|
|
|
push bp
|
|
|
|
|
mov bp, sp
|
|
|
|
|
push 1
|
2015-02-27 22:11:47 +00:00
|
|
|
|
call _graph_accesspage_func
|
2014-08-05 19:24:06 +00:00
|
|
|
|
pop cx
|
2021-11-07 17:26:03 +00:00
|
|
|
|
call _graph_copy_accessed_page_to_othe
|
2014-08-05 19:24:06 +00:00
|
|
|
|
push 0
|
2015-02-27 22:11:47 +00:00
|
|
|
|
call _graph_accesspage_func
|
2014-08-05 19:24:06 +00:00
|
|
|
|
pop cx
|
2020-03-12 23:54:35 +00:00
|
|
|
|
call _grp_put_colorkey c, offset aOp_win_grp, ds ; "op_win.grp"
|
2021-11-07 17:26:03 +00:00
|
|
|
|
call _graph_copy_accessed_page_to_othe
|
2014-08-05 19:24:06 +00:00
|
|
|
|
pop bp
|
|
|
|
|
retf
|
|
|
|
|
sub_A772 endp
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
; =============== S U B R O U T I N E =======================================
|
|
|
|
|
|
|
|
|
|
; Attributes: bp-based frame
|
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
sub_A79D proc far
|
2014-08-05 19:24:06 +00:00
|
|
|
|
push bp
|
|
|
|
|
mov bp, sp
|
|
|
|
|
mov al, byte_1232F
|
|
|
|
|
cbw
|
|
|
|
|
cmp ax, 1
|
|
|
|
|
jnz short loc_A7AE
|
2015-03-07 16:35:30 +00:00
|
|
|
|
call _resident_free
|
2014-08-05 19:24:06 +00:00
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
loc_A7AE:
|
2014-09-07 15:01:58 +00:00
|
|
|
|
call key_end
|
2014-08-05 19:24:06 +00:00
|
|
|
|
pop bp
|
|
|
|
|
retf
|
|
|
|
|
sub_A79D endp
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
; =============== S U B R O U T I N E =======================================
|
|
|
|
|
|
|
|
|
|
; Attributes: bp-based frame
|
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
sub_A7B5 proc far
|
2014-08-05 19:24:06 +00:00
|
|
|
|
push bp
|
|
|
|
|
mov bp, sp
|
|
|
|
|
push si
|
2020-05-06 18:21:39 +00:00
|
|
|
|
call _cfg_save
|
|
|
|
|
call _resident_stuff_set c, word ptr _opts.O_rank, word ptr _opts.O_bgm_mode, word ptr _opts.O_bombs, word ptr _opts.O_lives_extra, large [_rand]
|
2014-10-07 04:32:20 +00:00
|
|
|
|
call sub_A79D
|
2015-02-21 19:45:02 +00:00
|
|
|
|
call _mdrv2_bgm_fade_out_nonblock
|
2020-03-02 19:22:10 +00:00
|
|
|
|
call _game_switch_binary
|
2015-03-06 22:04:25 +00:00
|
|
|
|
mov al, _mode
|
2014-08-05 19:24:06 +00:00
|
|
|
|
cbw
|
|
|
|
|
cmp ax, 2
|
|
|
|
|
jnz short loc_A7FC
|
2019-12-30 14:48:17 +00:00
|
|
|
|
les bx, _resident
|
2021-10-14 20:09:23 +00:00
|
|
|
|
mov es:[bx+reiidenconfig_t.debug_mode], DM_TEST
|
2014-08-05 19:24:06 +00:00
|
|
|
|
jmp short loc_A820
|
|
|
|
|
; ---------------------------------------------------------------------------
|
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
loc_A7FC:
|
2015-03-06 22:04:25 +00:00
|
|
|
|
mov al, _mode
|
2014-08-05 19:24:06 +00:00
|
|
|
|
cbw
|
|
|
|
|
cmp ax, 3
|
|
|
|
|
jnz short loc_A810
|
2019-12-30 14:48:17 +00:00
|
|
|
|
les bx, _resident
|
2021-10-14 20:09:23 +00:00
|
|
|
|
mov es:[bx+reiidenconfig_t.debug_mode], DM_FULL
|
2014-08-05 19:24:06 +00:00
|
|
|
|
jmp short loc_A820
|
|
|
|
|
; ---------------------------------------------------------------------------
|
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
loc_A810:
|
2015-03-06 22:04:25 +00:00
|
|
|
|
cmp _mode, 0
|
2014-08-05 19:24:06 +00:00
|
|
|
|
jnz short loc_A820
|
2019-12-30 14:48:17 +00:00
|
|
|
|
les bx, _resident
|
2021-10-14 20:09:23 +00:00
|
|
|
|
mov es:[bx+reiidenconfig_t.debug_mode], DM_OFF
|
2014-08-05 19:24:06 +00:00
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
loc_A820:
|
2019-12-30 14:48:17 +00:00
|
|
|
|
les bx, _resident
|
2015-03-06 22:04:25 +00:00
|
|
|
|
mov es:[bx+reiidenconfig_t.route], 0
|
|
|
|
|
mov es:[bx+reiidenconfig_t.stage], 0
|
2020-05-06 18:21:39 +00:00
|
|
|
|
mov al, _opts.O_lives_extra
|
2014-08-05 19:24:06 +00:00
|
|
|
|
add al, 2
|
2015-03-06 22:04:25 +00:00
|
|
|
|
mov es:[bx+reiidenconfig_t.rem_lives], al
|
|
|
|
|
mov es:[bx+reiidenconfig_t.p_value], 0
|
2014-08-05 19:24:06 +00:00
|
|
|
|
xor si, si
|
|
|
|
|
jmp short loc_A867
|
|
|
|
|
; ---------------------------------------------------------------------------
|
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
loc_A842:
|
2014-08-05 19:24:06 +00:00
|
|
|
|
mov ax, si
|
|
|
|
|
add ax, ax
|
2019-12-30 14:48:17 +00:00
|
|
|
|
les bx, _resident
|
2014-08-05 19:24:06 +00:00
|
|
|
|
add bx, ax
|
2015-03-06 22:04:25 +00:00
|
|
|
|
mov es:[bx+reiidenconfig_t.continues_per_scene], 0
|
2014-08-05 19:24:06 +00:00
|
|
|
|
mov ax, si
|
|
|
|
|
shl ax, 2
|
2019-12-30 14:48:17 +00:00
|
|
|
|
mov bx, word ptr _resident
|
2014-08-05 19:24:06 +00:00
|
|
|
|
add bx, ax
|
2015-03-06 22:04:25 +00:00
|
|
|
|
mov es:[bx+reiidenconfig_t.bonus_per_stage], 0
|
2014-08-05 19:24:06 +00:00
|
|
|
|
inc si
|
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
loc_A867:
|
2014-08-05 19:24:06 +00:00
|
|
|
|
cmp si, 4
|
|
|
|
|
jl short loc_A842
|
2019-12-30 14:48:17 +00:00
|
|
|
|
les bx, _resident
|
2015-03-06 22:04:25 +00:00
|
|
|
|
mov es:[bx+reiidenconfig_t.score_highest], 0
|
|
|
|
|
mov es:[bx+reiidenconfig_t.continues_total], 0
|
|
|
|
|
mov es:[bx+reiidenconfig_t.end_flag], 0
|
|
|
|
|
mov es:[bx+reiidenconfig_t.unused_1], 0
|
|
|
|
|
mov es:[bx+reiidenconfig_t.snd_need_init], 1
|
|
|
|
|
mov es:[bx+reiidenconfig_t.bullet_speed], -4
|
2014-11-19 11:09:22 +00:00
|
|
|
|
pushd 0
|
2014-08-05 19:24:06 +00:00
|
|
|
|
push ds
|
|
|
|
|
push offset aReiiden_0 ; "reiiden"
|
|
|
|
|
push ds
|
|
|
|
|
push offset aReiiden_0 ; "reiiden"
|
|
|
|
|
call _execl
|
|
|
|
|
add sp, 0Ch
|
|
|
|
|
pop si
|
|
|
|
|
pop bp
|
|
|
|
|
retf
|
|
|
|
|
sub_A7B5 endp
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
; =============== S U B R O U T I N E =======================================
|
|
|
|
|
|
|
|
|
|
; Attributes: bp-based frame
|
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
sub_A8AD proc far
|
2014-08-05 19:24:06 +00:00
|
|
|
|
push bp
|
|
|
|
|
mov bp, sp
|
2020-05-06 18:21:39 +00:00
|
|
|
|
call _cfg_save
|
|
|
|
|
call _resident_stuff_set c, word ptr _opts.O_rank, word ptr _opts.O_bgm_mode, word ptr _opts.O_bombs, word ptr _opts.O_lives_extra, large [_rand]
|
2019-12-30 14:48:17 +00:00
|
|
|
|
les bx, _resident
|
2015-03-06 22:04:25 +00:00
|
|
|
|
cmp es:[bx+reiidenconfig_t.stage], 0
|
2014-08-05 19:24:06 +00:00
|
|
|
|
jnz short loc_A8E1
|
2020-05-05 17:55:33 +00:00
|
|
|
|
mov ax, seg op_01
|
2014-08-05 19:24:06 +00:00
|
|
|
|
mov es, ax
|
2020-05-05 17:55:33 +00:00
|
|
|
|
assume es:op_01
|
2014-08-05 19:24:06 +00:00
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
loc_A8E1:
|
2014-10-07 04:32:20 +00:00
|
|
|
|
call sub_A79D
|
2015-02-21 19:45:02 +00:00
|
|
|
|
call _mdrv2_bgm_fade_out_nonblock
|
2020-03-02 19:22:10 +00:00
|
|
|
|
call _game_switch_binary
|
2019-12-30 14:48:17 +00:00
|
|
|
|
les bx, _resident
|
2014-08-05 19:24:06 +00:00
|
|
|
|
assume es:nothing
|
2021-10-14 20:09:23 +00:00
|
|
|
|
mov es:[bx+reiidenconfig_t.debug_mode], DM_OFF
|
2015-03-06 22:04:25 +00:00
|
|
|
|
mov es:[bx+reiidenconfig_t.snd_need_init], 1
|
2020-05-06 18:21:39 +00:00
|
|
|
|
mov al, _opts.O_lives_extra
|
2014-08-05 19:24:06 +00:00
|
|
|
|
add al, 2
|
2015-03-06 22:04:25 +00:00
|
|
|
|
mov es:[bx+reiidenconfig_t.rem_lives], al
|
|
|
|
|
mov es:[bx+reiidenconfig_t.unused_1], 0
|
|
|
|
|
mov es:[bx+reiidenconfig_t.bullet_speed], -4
|
|
|
|
|
mov es:[bx+reiidenconfig_t.p_value], 0
|
2020-05-06 18:21:39 +00:00
|
|
|
|
call _execl c, offset _REIIDEN, ds, offset _REIIDEN, ds, large 0
|
2014-08-05 19:24:06 +00:00
|
|
|
|
pop bp
|
|
|
|
|
retf
|
|
|
|
|
sub_A8AD endp
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
; =============== S U B R O U T I N E =======================================
|
|
|
|
|
|
|
|
|
|
; Attributes: bp-based frame
|
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
sub_A92C proc far
|
2014-08-05 19:24:06 +00:00
|
|
|
|
|
|
|
|
|
arg_0 = word ptr 6
|
|
|
|
|
|
|
|
|
|
push bp
|
|
|
|
|
mov bp, sp
|
|
|
|
|
mov ax, [bp+arg_0]
|
2019-12-21 17:08:24 +00:00
|
|
|
|
mov bx, 70
|
2014-08-05 19:24:06 +00:00
|
|
|
|
cwd
|
|
|
|
|
idiv bx
|
2019-12-21 17:08:24 +00:00
|
|
|
|
cmp dx, 50
|
2014-08-05 19:24:06 +00:00
|
|
|
|
jge short loc_A954
|
2020-10-26 13:30:35 +00:00
|
|
|
|
call _graph_putsa_fx c, 244, ((15 or FX_WEIGHT_BOLD) shl 16) or 306, offset aVgvhvsb@vjvdvx, ds ; " <20>g<EFBFBD>h<EFBFBD>s<EFBFBD>@<40>j<EFBFBD>d<EFBFBD>x"
|
2014-08-05 19:24:06 +00:00
|
|
|
|
pop bp
|
|
|
|
|
retf
|
|
|
|
|
; ---------------------------------------------------------------------------
|
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
loc_A954:
|
2020-07-04 18:20:51 +00:00
|
|
|
|
call _egc_copy_rect_1_to_0_16 c, large (306 shl 16) or 244, large (16 shl 16) or 128
|
2014-08-05 19:24:06 +00:00
|
|
|
|
pop bp
|
|
|
|
|
retf
|
|
|
|
|
sub_A92C endp
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
; =============== S U B R O U T I N E =======================================
|
|
|
|
|
|
|
|
|
|
; Attributes: bp-based frame
|
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
sub_A96A proc far
|
2014-08-05 19:24:06 +00:00
|
|
|
|
|
|
|
|
|
var_14 = byte ptr -14h
|
2019-12-21 17:08:24 +00:00
|
|
|
|
@@y = word ptr -4
|
|
|
|
|
@@x = word ptr -2
|
2014-08-05 19:24:06 +00:00
|
|
|
|
arg_0 = word ptr 6
|
|
|
|
|
arg_2 = word ptr 8
|
|
|
|
|
|
|
|
|
|
enter 14h, 0
|
|
|
|
|
push si
|
|
|
|
|
mov si, [bp+arg_0]
|
|
|
|
|
lea ax, [bp+var_14]
|
|
|
|
|
push ss
|
|
|
|
|
push ax
|
|
|
|
|
push ds
|
|
|
|
|
push offset off_124CD
|
|
|
|
|
mov cx, 10h
|
|
|
|
|
call SCOPY@
|
2019-12-21 17:08:24 +00:00
|
|
|
|
mov [bp+@@x], 244
|
2014-08-05 19:24:06 +00:00
|
|
|
|
mov ax, si
|
|
|
|
|
imul ax, 14h
|
2019-12-21 17:08:24 +00:00
|
|
|
|
add ax, 276
|
|
|
|
|
mov [bp+@@y], ax
|
2014-08-05 19:24:06 +00:00
|
|
|
|
mov bx, si
|
|
|
|
|
shl bx, 2
|
|
|
|
|
lea ax, [bp+var_14]
|
|
|
|
|
add bx, ax
|
2014-11-19 11:09:22 +00:00
|
|
|
|
pushd dword ptr ss:[bx]
|
2014-08-05 19:24:06 +00:00
|
|
|
|
mov ax, [bp+arg_2]
|
2020-10-26 13:30:35 +00:00
|
|
|
|
or ax, FX_WEIGHT_BLACK
|
2014-08-05 19:24:06 +00:00
|
|
|
|
push ax
|
2019-12-21 17:08:24 +00:00
|
|
|
|
push [bp+@@y]
|
|
|
|
|
push [bp+@@x]
|
2020-01-11 19:07:06 +00:00
|
|
|
|
call _graph_putsa_fx
|
2014-08-05 19:24:06 +00:00
|
|
|
|
add sp, 0Ah
|
|
|
|
|
pop si
|
|
|
|
|
leave
|
|
|
|
|
retf
|
|
|
|
|
sub_A96A endp
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
; =============== S U B R O U T I N E =======================================
|
|
|
|
|
|
|
|
|
|
; Attributes: bp-based frame
|
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
sub_A9B9 proc far
|
2014-08-05 19:24:06 +00:00
|
|
|
|
|
|
|
|
|
var_42 = byte ptr -42h
|
|
|
|
|
var_2E = byte ptr -2Eh
|
|
|
|
|
var_1E = byte ptr -1Eh
|
|
|
|
|
var_A = word ptr -0Ah
|
|
|
|
|
var_8 = byte ptr -8
|
|
|
|
|
arg_0 = word ptr 6
|
|
|
|
|
arg_2 = word ptr 8
|
|
|
|
|
|
|
|
|
|
enter 42h, 0
|
|
|
|
|
push si
|
|
|
|
|
push di
|
|
|
|
|
mov si, [bp+arg_0]
|
|
|
|
|
lea ax, [bp+var_1E]
|
|
|
|
|
push ss
|
|
|
|
|
push ax
|
|
|
|
|
push ds
|
|
|
|
|
push offset off_124DD
|
|
|
|
|
mov cx, 14h
|
|
|
|
|
call SCOPY@
|
|
|
|
|
lea ax, [bp+var_2E]
|
|
|
|
|
push ss
|
|
|
|
|
push ax
|
|
|
|
|
push ds
|
|
|
|
|
push offset off_124F1
|
|
|
|
|
mov cx, 10h
|
|
|
|
|
call SCOPY@
|
|
|
|
|
lea ax, [bp+var_8]
|
|
|
|
|
push ss
|
|
|
|
|
push ax
|
|
|
|
|
push ds
|
|
|
|
|
push offset off_12501
|
|
|
|
|
mov cx, 8
|
|
|
|
|
call SCOPY@
|
|
|
|
|
lea ax, [bp+var_42]
|
|
|
|
|
push ss
|
|
|
|
|
push ax
|
|
|
|
|
push ds
|
|
|
|
|
push offset off_12509
|
|
|
|
|
mov cx, 14h
|
|
|
|
|
call SCOPY@
|
2020-03-18 17:54:51 +00:00
|
|
|
|
mov di, 228
|
2014-08-05 19:24:06 +00:00
|
|
|
|
mov ax, si
|
2020-03-18 17:54:51 +00:00
|
|
|
|
imul ax, 20
|
|
|
|
|
add ax, 266
|
2014-08-05 19:24:06 +00:00
|
|
|
|
mov [bp+var_A], ax
|
2020-07-04 18:20:51 +00:00
|
|
|
|
call _egc_copy_rect_1_to_0_16 c, di, ax, large (16 shl 16) or 176
|
2014-08-05 19:24:06 +00:00
|
|
|
|
or si, si
|
|
|
|
|
jnz short loc_AA34
|
2020-05-06 18:21:39 +00:00
|
|
|
|
mov al, _opts.O_rank
|
2014-08-05 19:24:06 +00:00
|
|
|
|
cbw
|
|
|
|
|
shl ax, 2
|
|
|
|
|
lea dx, [bp+var_2E]
|
|
|
|
|
jmp short loc_AA54
|
|
|
|
|
; ---------------------------------------------------------------------------
|
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
loc_AA34:
|
2014-08-05 19:24:06 +00:00
|
|
|
|
cmp si, 1
|
|
|
|
|
jnz short loc_AA45
|
2020-05-06 18:21:39 +00:00
|
|
|
|
mov al, _opts.O_bgm_mode
|
2014-08-05 19:24:06 +00:00
|
|
|
|
cbw
|
|
|
|
|
shl ax, 2
|
|
|
|
|
lea dx, [bp+var_8]
|
|
|
|
|
jmp short loc_AA54
|
|
|
|
|
; ---------------------------------------------------------------------------
|
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
loc_AA45:
|
2014-08-05 19:24:06 +00:00
|
|
|
|
cmp si, 2
|
|
|
|
|
jnz short loc_AA83
|
2020-05-06 18:21:39 +00:00
|
|
|
|
mov al, _opts.O_lives_extra
|
2014-08-05 19:24:06 +00:00
|
|
|
|
cbw
|
|
|
|
|
shl ax, 2
|
|
|
|
|
lea dx, [bp+var_42]
|
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
loc_AA54:
|
2014-08-05 19:24:06 +00:00
|
|
|
|
add ax, dx
|
|
|
|
|
mov bx, ax
|
2014-11-19 11:09:22 +00:00
|
|
|
|
pushd dword ptr ss:[bx]
|
2014-08-05 19:24:06 +00:00
|
|
|
|
mov bx, si
|
|
|
|
|
shl bx, 2
|
|
|
|
|
lea ax, [bp+var_1E]
|
|
|
|
|
add bx, ax
|
2014-11-19 11:09:22 +00:00
|
|
|
|
pushd dword ptr ss:[bx] ; arglist
|
2014-08-05 19:24:06 +00:00
|
|
|
|
push ds
|
|
|
|
|
push offset aSS ; "%s%s"
|
|
|
|
|
mov ax, [bp+arg_2]
|
|
|
|
|
or ax, 30h
|
|
|
|
|
push ax ; int
|
|
|
|
|
push [bp+var_A] ; int
|
|
|
|
|
push di ; int
|
2019-12-18 05:45:08 +00:00
|
|
|
|
call _graph_printf_fx
|
2014-08-05 19:24:06 +00:00
|
|
|
|
add sp, 12h
|
|
|
|
|
jmp short loc_AAB2
|
|
|
|
|
; ---------------------------------------------------------------------------
|
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
loc_AA83:
|
2014-08-05 19:24:06 +00:00
|
|
|
|
cmp si, 3
|
|
|
|
|
jz short loc_AA8D
|
|
|
|
|
cmp si, 4
|
|
|
|
|
jnz short loc_AAB2
|
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
loc_AA8D:
|
2014-08-05 19:24:06 +00:00
|
|
|
|
mov bx, si
|
|
|
|
|
shl bx, 2
|
|
|
|
|
lea ax, [bp+var_1E]
|
|
|
|
|
add bx, ax
|
2014-11-19 11:09:22 +00:00
|
|
|
|
pushd dword ptr ss:[bx] ; arglist
|
2014-08-05 19:24:06 +00:00
|
|
|
|
push ds
|
|
|
|
|
push (offset aSS+2) ; format
|
|
|
|
|
mov ax, [bp+arg_2]
|
|
|
|
|
or ax, 30h
|
|
|
|
|
push ax ; int
|
|
|
|
|
push [bp+var_A] ; int
|
|
|
|
|
push di ; int
|
2019-12-18 05:45:08 +00:00
|
|
|
|
call _graph_printf_fx
|
2014-08-05 19:24:06 +00:00
|
|
|
|
add sp, 0Eh
|
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
loc_AAB2:
|
2014-08-05 19:24:06 +00:00
|
|
|
|
pop di
|
|
|
|
|
pop si
|
|
|
|
|
leave
|
|
|
|
|
retf
|
|
|
|
|
sub_A9B9 endp
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
; =============== S U B R O U T I N E =======================================
|
|
|
|
|
|
|
|
|
|
; Attributes: bp-based frame
|
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
sub_AAB6 proc far
|
2014-08-05 19:24:06 +00:00
|
|
|
|
|
|
|
|
|
var_46 = byte ptr -46h
|
|
|
|
|
var_A = word ptr -0Ah
|
|
|
|
|
var_8 = byte ptr -8
|
|
|
|
|
arg_0 = word ptr 6
|
|
|
|
|
arg_2 = word ptr 8
|
|
|
|
|
|
|
|
|
|
enter 46h, 0
|
|
|
|
|
push si
|
|
|
|
|
push di
|
|
|
|
|
mov si, [bp+arg_0]
|
|
|
|
|
lea ax, [bp+var_8]
|
|
|
|
|
push ss
|
|
|
|
|
push ax
|
|
|
|
|
push ds
|
|
|
|
|
push offset off_1251E
|
|
|
|
|
mov cx, 8
|
|
|
|
|
call SCOPY@
|
|
|
|
|
lea ax, [bp+var_46]
|
|
|
|
|
push ss
|
|
|
|
|
push ax
|
|
|
|
|
push ds
|
|
|
|
|
push offset off_12526
|
|
|
|
|
mov cx, 3Ch ; '<'
|
|
|
|
|
call SCOPY@
|
2020-03-18 17:54:51 +00:00
|
|
|
|
mov di, 228
|
2014-08-05 19:24:06 +00:00
|
|
|
|
mov ax, si
|
2020-03-18 17:54:51 +00:00
|
|
|
|
imul ax, 40
|
|
|
|
|
add ax, 286
|
2014-08-05 19:24:06 +00:00
|
|
|
|
mov [bp+var_A], ax
|
2020-07-04 18:20:51 +00:00
|
|
|
|
call _egc_copy_rect_1_to_0_16 c, di, ax, large (16 shl 16) or 176
|
2014-08-05 19:24:06 +00:00
|
|
|
|
or si, si
|
|
|
|
|
jnz short loc_AB69
|
2020-03-18 17:54:51 +00:00
|
|
|
|
push (16 shl 16) or 192
|
2014-08-05 19:24:06 +00:00
|
|
|
|
mov ax, [bp+var_A]
|
2020-03-18 17:54:51 +00:00
|
|
|
|
add ax, 20
|
2014-08-05 19:24:06 +00:00
|
|
|
|
push ax
|
|
|
|
|
push di
|
2020-07-04 18:20:51 +00:00
|
|
|
|
call _egc_copy_rect_1_to_0_16
|
2014-08-05 19:24:06 +00:00
|
|
|
|
add sp, 8
|
|
|
|
|
mov al, byte_1251D
|
|
|
|
|
cbw
|
|
|
|
|
push ax
|
|
|
|
|
mov bx, si
|
|
|
|
|
shl bx, 2
|
|
|
|
|
lea ax, [bp+var_8]
|
|
|
|
|
add bx, ax
|
2014-11-19 11:09:22 +00:00
|
|
|
|
pushd dword ptr ss:[bx] ; arglist
|
2014-08-05 19:24:06 +00:00
|
|
|
|
push ds
|
|
|
|
|
push offset aS_2d ; "%s%.2d"
|
|
|
|
|
mov ax, [bp+arg_2]
|
|
|
|
|
or ax, 30h
|
|
|
|
|
push ax ; int
|
|
|
|
|
push [bp+var_A] ; int
|
|
|
|
|
push di ; int
|
2019-12-18 05:45:08 +00:00
|
|
|
|
call _graph_printf_fx
|
2014-08-05 19:24:06 +00:00
|
|
|
|
add sp, 10h
|
|
|
|
|
mov al, byte_1251D
|
|
|
|
|
cbw
|
|
|
|
|
shl ax, 2
|
|
|
|
|
lea dx, [bp+var_46]
|
|
|
|
|
add ax, dx
|
|
|
|
|
mov bx, ax
|
2014-11-19 11:09:22 +00:00
|
|
|
|
pushd dword ptr ss:[bx]
|
2014-08-05 19:24:06 +00:00
|
|
|
|
push ds
|
|
|
|
|
push (offset aSS+2)
|
|
|
|
|
mov ax, [bp+arg_2]
|
|
|
|
|
or ax, 30h
|
|
|
|
|
push ax
|
|
|
|
|
mov ax, [bp+var_A]
|
|
|
|
|
add ax, 14h
|
|
|
|
|
push ax
|
|
|
|
|
jmp short loc_AB8A
|
|
|
|
|
; ---------------------------------------------------------------------------
|
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
loc_AB69:
|
2014-08-05 19:24:06 +00:00
|
|
|
|
cmp si, 1
|
|
|
|
|
jnz short loc_AB93
|
|
|
|
|
mov bx, si
|
|
|
|
|
shl bx, 2
|
|
|
|
|
lea ax, [bp+var_8]
|
|
|
|
|
add bx, ax
|
2014-11-19 11:09:22 +00:00
|
|
|
|
pushd dword ptr ss:[bx] ; arglist
|
2014-08-05 19:24:06 +00:00
|
|
|
|
push ds
|
|
|
|
|
push (offset aSS+2) ; format
|
|
|
|
|
mov ax, [bp+arg_2]
|
|
|
|
|
or ax, 30h
|
|
|
|
|
push ax ; int
|
|
|
|
|
push [bp+var_A] ; int
|
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
loc_AB8A:
|
2014-08-05 19:24:06 +00:00
|
|
|
|
push di ; int
|
2019-12-18 05:45:08 +00:00
|
|
|
|
call _graph_printf_fx
|
2014-08-05 19:24:06 +00:00
|
|
|
|
add sp, 0Eh
|
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
loc_AB93:
|
2014-08-05 19:24:06 +00:00
|
|
|
|
pop di
|
|
|
|
|
pop si
|
|
|
|
|
leave
|
|
|
|
|
retf
|
|
|
|
|
sub_AAB6 endp
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
; =============== S U B R O U T I N E =======================================
|
|
|
|
|
|
|
|
|
|
; Attributes: bp-based frame
|
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
sub_AB97 proc far
|
2014-08-05 19:24:06 +00:00
|
|
|
|
push bp
|
|
|
|
|
mov bp, sp
|
|
|
|
|
cmp word_12564, 0
|
|
|
|
|
jnz short loc_AC04
|
2020-07-04 18:20:51 +00:00
|
|
|
|
call _egc_copy_rect_1_to_0_16 c, large (266 shl 16) or 220, large (100 shl 16) or 176
|
2014-11-19 11:09:22 +00:00
|
|
|
|
push 50000h
|
2014-10-07 04:32:20 +00:00
|
|
|
|
call sub_A96A
|
2014-08-05 19:24:06 +00:00
|
|
|
|
add sp, 4
|
2014-11-19 11:09:22 +00:00
|
|
|
|
push 50001h
|
2014-10-07 04:32:20 +00:00
|
|
|
|
call sub_A96A
|
2014-08-05 19:24:06 +00:00
|
|
|
|
add sp, 4
|
2014-11-19 11:09:22 +00:00
|
|
|
|
push 50002h
|
2014-10-07 04:32:20 +00:00
|
|
|
|
call sub_A96A
|
2014-08-05 19:24:06 +00:00
|
|
|
|
add sp, 4
|
2014-11-19 11:09:22 +00:00
|
|
|
|
push 50003h
|
2014-10-07 04:32:20 +00:00
|
|
|
|
call sub_A96A
|
2014-08-05 19:24:06 +00:00
|
|
|
|
add sp, 4
|
|
|
|
|
push 0Fh
|
2020-05-08 19:03:18 +00:00
|
|
|
|
mov al, _menu_sel
|
2014-08-05 19:24:06 +00:00
|
|
|
|
cbw
|
|
|
|
|
push ax
|
2014-10-07 04:32:20 +00:00
|
|
|
|
call sub_A96A
|
2014-08-05 19:24:06 +00:00
|
|
|
|
add sp, 4
|
|
|
|
|
mov word_12564, 1
|
2020-05-08 19:03:18 +00:00
|
|
|
|
mov al, _menu_sel
|
2014-08-05 19:24:06 +00:00
|
|
|
|
cbw
|
|
|
|
|
mov word_12562, ax
|
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
loc_AC04:
|
2020-05-08 19:03:18 +00:00
|
|
|
|
mov al, _menu_sel
|
2014-08-05 19:24:06 +00:00
|
|
|
|
cbw
|
|
|
|
|
cmp ax, word_12562
|
|
|
|
|
jz short loc_AC30
|
|
|
|
|
push 5
|
|
|
|
|
push word_12562
|
2014-10-07 04:32:20 +00:00
|
|
|
|
call sub_A96A
|
2014-08-05 19:24:06 +00:00
|
|
|
|
add sp, 4
|
|
|
|
|
push 0Fh
|
2020-05-08 19:03:18 +00:00
|
|
|
|
mov al, _menu_sel
|
2014-08-05 19:24:06 +00:00
|
|
|
|
cbw
|
|
|
|
|
push ax
|
2014-10-07 04:32:20 +00:00
|
|
|
|
call sub_A96A
|
2014-08-05 19:24:06 +00:00
|
|
|
|
add sp, 4
|
2020-05-08 19:03:18 +00:00
|
|
|
|
mov al, _menu_sel
|
2014-08-05 19:24:06 +00:00
|
|
|
|
cbw
|
|
|
|
|
mov word_12562, ax
|
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
loc_AC30:
|
2020-05-08 19:03:18 +00:00
|
|
|
|
cmp _input_ok, 0
|
2014-08-05 19:24:06 +00:00
|
|
|
|
jnz short loc_AC3E
|
2020-05-08 19:03:18 +00:00
|
|
|
|
cmp _input_shot, 0
|
2014-08-05 19:24:06 +00:00
|
|
|
|
jz short loc_AC6E
|
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
loc_AC3E:
|
2020-05-08 19:03:18 +00:00
|
|
|
|
mov al, _menu_sel
|
2014-08-05 19:24:06 +00:00
|
|
|
|
cbw
|
|
|
|
|
mov bx, ax
|
|
|
|
|
cmp bx, 3
|
|
|
|
|
ja short loc_AC6E
|
|
|
|
|
add bx, bx
|
|
|
|
|
jmp cs:off_AC7C[bx]
|
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
loc_AC50:
|
2014-10-07 04:32:20 +00:00
|
|
|
|
call sub_A7B5
|
2014-08-05 19:24:06 +00:00
|
|
|
|
jmp short loc_AC6E
|
|
|
|
|
; ---------------------------------------------------------------------------
|
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
loc_AC56:
|
2014-10-07 04:32:20 +00:00
|
|
|
|
call sub_A8AD
|
2014-08-05 19:24:06 +00:00
|
|
|
|
jmp short loc_AC6E
|
|
|
|
|
; ---------------------------------------------------------------------------
|
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
loc_AC5C:
|
2014-08-05 19:24:06 +00:00
|
|
|
|
mov byte_1232A, 1
|
|
|
|
|
mov word_12564, 0
|
|
|
|
|
jmp short loc_AC6E
|
|
|
|
|
; ---------------------------------------------------------------------------
|
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
loc_AC69:
|
2014-08-05 19:24:06 +00:00
|
|
|
|
mov byte_1232C, 1
|
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
loc_AC6E:
|
2020-05-08 19:03:18 +00:00
|
|
|
|
cmp _input_cancel, 0
|
2014-08-05 19:24:06 +00:00
|
|
|
|
jz short loc_AC7A
|
|
|
|
|
mov byte_1232C, 1
|
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
loc_AC7A:
|
2014-08-05 19:24:06 +00:00
|
|
|
|
pop bp
|
|
|
|
|
retf
|
|
|
|
|
sub_AB97 endp
|
|
|
|
|
|
|
|
|
|
; ---------------------------------------------------------------------------
|
2014-08-10 01:44:54 +00:00
|
|
|
|
off_AC7C dw offset loc_AC50
|
2014-08-05 19:24:06 +00:00
|
|
|
|
dw offset loc_AC56
|
|
|
|
|
dw offset loc_AC5C
|
|
|
|
|
dw offset loc_AC69
|
|
|
|
|
|
|
|
|
|
; =============== S U B R O U T I N E =======================================
|
|
|
|
|
|
|
|
|
|
; Attributes: bp-based frame
|
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
sub_AC84 proc far
|
2014-08-05 19:24:06 +00:00
|
|
|
|
push bp
|
|
|
|
|
mov bp, sp
|
|
|
|
|
cmp word_12566, 0
|
|
|
|
|
jnz short loc_ACF9
|
2020-05-08 19:03:18 +00:00
|
|
|
|
mov _menu_sel, 0
|
2014-08-05 19:24:06 +00:00
|
|
|
|
mov word_12568, 0
|
|
|
|
|
mov word_12566, 1
|
2020-05-08 19:03:18 +00:00
|
|
|
|
mov _option_rows, 4
|
2020-07-04 18:20:51 +00:00
|
|
|
|
call _egc_copy_rect_1_to_0_16 c, large (276 shl 16) or 220, large (80 shl 16) or 176
|
2014-11-19 11:09:22 +00:00
|
|
|
|
push 0F0000h
|
2014-10-07 04:32:20 +00:00
|
|
|
|
call sub_A9B9
|
2014-08-05 19:24:06 +00:00
|
|
|
|
add sp, 4
|
2014-11-19 11:09:22 +00:00
|
|
|
|
push 50001h
|
2014-10-07 04:32:20 +00:00
|
|
|
|
call sub_A9B9
|
2014-08-05 19:24:06 +00:00
|
|
|
|
add sp, 4
|
2014-11-19 11:09:22 +00:00
|
|
|
|
push 50002h
|
2014-10-07 04:32:20 +00:00
|
|
|
|
call sub_A9B9
|
2014-08-05 19:24:06 +00:00
|
|
|
|
add sp, 4
|
2014-11-19 11:09:22 +00:00
|
|
|
|
push 50003h
|
2014-10-07 04:32:20 +00:00
|
|
|
|
call sub_A9B9
|
2014-08-05 19:24:06 +00:00
|
|
|
|
add sp, 4
|
2014-11-19 11:09:22 +00:00
|
|
|
|
push 50004h
|
2014-10-07 04:32:20 +00:00
|
|
|
|
call sub_A9B9
|
2014-08-05 19:24:06 +00:00
|
|
|
|
add sp, 4
|
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
loc_ACF9:
|
2020-05-08 19:03:18 +00:00
|
|
|
|
mov al, _menu_sel
|
2014-08-05 19:24:06 +00:00
|
|
|
|
cbw
|
|
|
|
|
cmp ax, word_12568
|
|
|
|
|
jz short loc_AD25
|
|
|
|
|
push 5
|
|
|
|
|
push word_12568
|
2014-10-07 04:32:20 +00:00
|
|
|
|
call sub_A9B9
|
2014-08-05 19:24:06 +00:00
|
|
|
|
add sp, 4
|
|
|
|
|
push 0Fh
|
2020-05-08 19:03:18 +00:00
|
|
|
|
mov al, _menu_sel
|
2014-08-05 19:24:06 +00:00
|
|
|
|
cbw
|
|
|
|
|
push ax
|
2014-10-07 04:32:20 +00:00
|
|
|
|
call sub_A9B9
|
2014-08-05 19:24:06 +00:00
|
|
|
|
add sp, 4
|
2020-05-08 19:03:18 +00:00
|
|
|
|
mov al, _menu_sel
|
2014-08-05 19:24:06 +00:00
|
|
|
|
cbw
|
|
|
|
|
mov word_12568, ax
|
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
loc_AD25:
|
2020-05-08 19:03:18 +00:00
|
|
|
|
mov al, _input_left
|
2014-08-05 19:24:06 +00:00
|
|
|
|
cbw
|
|
|
|
|
cmp ax, 1
|
|
|
|
|
jnz short loc_AD96
|
|
|
|
|
cmp word_1256A, 0
|
|
|
|
|
jnz short loc_AD9C
|
2020-05-08 19:03:18 +00:00
|
|
|
|
mov al, _menu_sel
|
2014-08-05 19:24:06 +00:00
|
|
|
|
cbw
|
|
|
|
|
or ax, ax
|
|
|
|
|
jz short loc_AD49
|
|
|
|
|
cmp ax, 1
|
|
|
|
|
jz short loc_AD5C
|
|
|
|
|
cmp ax, 2
|
|
|
|
|
jz short loc_AD6F
|
|
|
|
|
jmp short loc_AD80
|
|
|
|
|
; ---------------------------------------------------------------------------
|
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
loc_AD49:
|
2020-05-06 18:21:39 +00:00
|
|
|
|
dec _opts.O_rank
|
|
|
|
|
mov al, _opts.O_rank
|
2014-08-05 19:24:06 +00:00
|
|
|
|
cbw
|
|
|
|
|
or ax, ax
|
|
|
|
|
jge short loc_AD80
|
2020-05-06 18:21:39 +00:00
|
|
|
|
mov _opts.O_rank, RANK_LUNATIC
|
2014-08-05 19:24:06 +00:00
|
|
|
|
jmp short loc_AD80
|
|
|
|
|
; ---------------------------------------------------------------------------
|
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
loc_AD5C:
|
2020-05-06 18:21:39 +00:00
|
|
|
|
dec _opts.O_bgm_mode
|
|
|
|
|
mov al, _opts.O_bgm_mode
|
2014-08-05 19:24:06 +00:00
|
|
|
|
cbw
|
|
|
|
|
or ax, ax
|
|
|
|
|
jge short loc_AD80
|
2020-05-06 18:21:39 +00:00
|
|
|
|
mov _opts.O_bgm_mode, 1
|
2014-08-05 19:24:06 +00:00
|
|
|
|
jmp short loc_AD80
|
|
|
|
|
; ---------------------------------------------------------------------------
|
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
loc_AD6F:
|
2020-05-06 18:21:39 +00:00
|
|
|
|
dec _opts.O_lives_extra
|
|
|
|
|
mov al, _opts.O_lives_extra
|
2014-08-05 19:24:06 +00:00
|
|
|
|
cbw
|
|
|
|
|
or ax, ax
|
|
|
|
|
jge short loc_AD80
|
2020-05-06 18:21:39 +00:00
|
|
|
|
mov _opts.O_lives_extra, CFG_LIVES_EXTRA_MAX
|
2014-08-05 19:24:06 +00:00
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
loc_AD80:
|
2014-08-05 19:24:06 +00:00
|
|
|
|
push 0Fh
|
2020-05-08 19:03:18 +00:00
|
|
|
|
mov al, _menu_sel
|
2014-08-05 19:24:06 +00:00
|
|
|
|
cbw
|
|
|
|
|
push ax
|
2014-10-07 04:32:20 +00:00
|
|
|
|
call sub_A9B9
|
2014-08-05 19:24:06 +00:00
|
|
|
|
add sp, 4
|
|
|
|
|
mov word_1256A, 1
|
|
|
|
|
jmp short loc_AD9C
|
|
|
|
|
; ---------------------------------------------------------------------------
|
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
loc_AD96:
|
2014-08-05 19:24:06 +00:00
|
|
|
|
mov word_1256A, 0
|
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
loc_AD9C:
|
2020-05-08 19:03:18 +00:00
|
|
|
|
mov al, _input_right
|
2014-08-05 19:24:06 +00:00
|
|
|
|
cbw
|
|
|
|
|
cmp ax, 1
|
|
|
|
|
jnz short loc_AE10
|
|
|
|
|
cmp word_1256C, 0
|
|
|
|
|
jnz short loc_AE16
|
2020-05-08 19:03:18 +00:00
|
|
|
|
mov al, _menu_sel
|
2014-08-05 19:24:06 +00:00
|
|
|
|
cbw
|
|
|
|
|
or ax, ax
|
|
|
|
|
jz short loc_ADC0
|
|
|
|
|
cmp ax, 1
|
|
|
|
|
jz short loc_ADD4
|
|
|
|
|
cmp ax, 2
|
|
|
|
|
jz short loc_ADE8
|
|
|
|
|
jmp short loc_ADFA
|
|
|
|
|
; ---------------------------------------------------------------------------
|
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
loc_ADC0:
|
2020-05-06 18:21:39 +00:00
|
|
|
|
inc _opts.O_rank
|
|
|
|
|
mov al, _opts.O_rank
|
2014-08-05 19:24:06 +00:00
|
|
|
|
cbw
|
2020-05-06 18:21:39 +00:00
|
|
|
|
cmp ax, RANK_LUNATIC
|
2014-08-05 19:24:06 +00:00
|
|
|
|
jle short loc_ADFA
|
2020-05-06 18:21:39 +00:00
|
|
|
|
mov _opts.O_rank, RANK_EASY
|
2014-08-05 19:24:06 +00:00
|
|
|
|
jmp short loc_ADFA
|
|
|
|
|
; ---------------------------------------------------------------------------
|
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
loc_ADD4:
|
2020-05-06 18:21:39 +00:00
|
|
|
|
inc _opts.O_bgm_mode
|
|
|
|
|
mov al, _opts.O_bgm_mode
|
2014-08-05 19:24:06 +00:00
|
|
|
|
cbw
|
|
|
|
|
cmp ax, 1
|
|
|
|
|
jle short loc_ADFA
|
2020-05-06 18:21:39 +00:00
|
|
|
|
mov _opts.O_bgm_mode, 0
|
2014-08-05 19:24:06 +00:00
|
|
|
|
jmp short loc_ADFA
|
|
|
|
|
; ---------------------------------------------------------------------------
|
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
loc_ADE8:
|
2020-05-06 18:21:39 +00:00
|
|
|
|
inc _opts.O_lives_extra
|
|
|
|
|
mov al, _opts.O_lives_extra
|
2014-08-05 19:24:06 +00:00
|
|
|
|
cbw
|
2020-05-06 18:21:39 +00:00
|
|
|
|
cmp ax, CFG_LIVES_EXTRA_MAX
|
2014-08-05 19:24:06 +00:00
|
|
|
|
jle short loc_ADFA
|
2020-05-06 18:21:39 +00:00
|
|
|
|
mov _opts.O_lives_extra, 0
|
2014-08-05 19:24:06 +00:00
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
loc_ADFA:
|
2014-08-05 19:24:06 +00:00
|
|
|
|
push 0Fh
|
2020-05-08 19:03:18 +00:00
|
|
|
|
mov al, _menu_sel
|
2014-08-05 19:24:06 +00:00
|
|
|
|
cbw
|
|
|
|
|
push ax
|
2014-10-07 04:32:20 +00:00
|
|
|
|
call sub_A9B9
|
2014-08-05 19:24:06 +00:00
|
|
|
|
add sp, 4
|
|
|
|
|
mov word_1256C, 1
|
|
|
|
|
jmp short loc_AE16
|
|
|
|
|
; ---------------------------------------------------------------------------
|
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
loc_AE10:
|
2014-08-05 19:24:06 +00:00
|
|
|
|
mov word_1256C, 0
|
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
loc_AE16:
|
2020-05-08 19:03:18 +00:00
|
|
|
|
cmp _input_ok, 0
|
2014-08-05 19:24:06 +00:00
|
|
|
|
jnz short loc_AE24
|
2020-05-08 19:03:18 +00:00
|
|
|
|
cmp _input_shot, 0
|
2014-08-05 19:24:06 +00:00
|
|
|
|
jz short loc_AE2D
|
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
loc_AE24:
|
2020-05-08 19:03:18 +00:00
|
|
|
|
mov al, _menu_sel
|
2014-08-05 19:24:06 +00:00
|
|
|
|
cbw
|
|
|
|
|
cmp ax, 4
|
|
|
|
|
jz short loc_AE34
|
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
loc_AE2D:
|
2020-05-08 19:03:18 +00:00
|
|
|
|
cmp _input_cancel, 0
|
2014-08-05 19:24:06 +00:00
|
|
|
|
jz short loc_AE44
|
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
loc_AE34:
|
2014-08-05 19:24:06 +00:00
|
|
|
|
mov byte_1232A, 3
|
|
|
|
|
mov word_12566, 0
|
2020-05-08 19:03:18 +00:00
|
|
|
|
mov _menu_sel, 2
|
2014-08-05 19:24:06 +00:00
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
loc_AE44:
|
2020-05-08 19:03:18 +00:00
|
|
|
|
cmp _input_ok, 0
|
2014-08-05 19:24:06 +00:00
|
|
|
|
jnz short loc_AE52
|
2020-05-08 19:03:18 +00:00
|
|
|
|
cmp _input_shot, 0
|
2014-08-05 19:24:06 +00:00
|
|
|
|
jz short loc_AE6B
|
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
loc_AE52:
|
2020-05-08 19:03:18 +00:00
|
|
|
|
mov al, _menu_sel
|
2014-08-05 19:24:06 +00:00
|
|
|
|
cbw
|
|
|
|
|
cmp ax, 3
|
|
|
|
|
jnz short loc_AE6B
|
|
|
|
|
mov byte_1232A, 2
|
|
|
|
|
mov word_12566, 0
|
2020-05-08 19:03:18 +00:00
|
|
|
|
mov _menu_sel, 0
|
2014-08-05 19:24:06 +00:00
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
loc_AE6B:
|
2014-08-05 19:24:06 +00:00
|
|
|
|
pop bp
|
|
|
|
|
retf
|
|
|
|
|
sub_AC84 endp
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
; =============== S U B R O U T I N E =======================================
|
|
|
|
|
|
|
|
|
|
; Attributes: bp-based frame
|
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
sub_AE6D proc far
|
2014-08-05 19:24:06 +00:00
|
|
|
|
|
|
|
|
|
var_3C = byte ptr -3Ch
|
|
|
|
|
|
|
|
|
|
enter 3Ch, 0
|
|
|
|
|
lea ax, [bp+var_3C]
|
|
|
|
|
push ss
|
|
|
|
|
push ax
|
|
|
|
|
push ds
|
|
|
|
|
push offset off_1256E
|
|
|
|
|
mov cx, 3Ch ; '<'
|
|
|
|
|
call SCOPY@
|
2015-02-21 19:45:02 +00:00
|
|
|
|
call _mdrv2_bgm_stop
|
2014-08-05 19:24:06 +00:00
|
|
|
|
mov al, byte_1251D
|
|
|
|
|
cbw
|
|
|
|
|
shl ax, 2
|
|
|
|
|
lea dx, [bp+var_3C]
|
|
|
|
|
add ax, dx
|
|
|
|
|
mov bx, ax
|
2014-11-19 11:09:22 +00:00
|
|
|
|
pushd dword ptr ss:[bx] ; path
|
2015-02-21 19:45:02 +00:00
|
|
|
|
call _mdrv2_bgm_load
|
2014-08-05 19:24:06 +00:00
|
|
|
|
add sp, 4
|
2015-02-21 19:45:02 +00:00
|
|
|
|
call _mdrv2_bgm_play
|
2014-08-05 19:24:06 +00:00
|
|
|
|
leave
|
|
|
|
|
retf
|
|
|
|
|
sub_AE6D endp
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
; =============== S U B R O U T I N E =======================================
|
|
|
|
|
|
|
|
|
|
; Attributes: bp-based frame
|
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
sub_AEA8 proc far
|
2014-08-05 19:24:06 +00:00
|
|
|
|
push bp
|
|
|
|
|
mov bp, sp
|
|
|
|
|
cmp word_125AA, 0
|
|
|
|
|
jnz short loc_AF00
|
2020-05-08 19:03:18 +00:00
|
|
|
|
mov _menu_sel, 0
|
2014-08-05 19:24:06 +00:00
|
|
|
|
mov word_125AC, 0
|
|
|
|
|
mov word_125AA, 1
|
2020-05-08 19:03:18 +00:00
|
|
|
|
mov _input_ok, 0
|
|
|
|
|
mov _input_shot, 0
|
|
|
|
|
mov _option_rows, 1
|
2020-07-04 18:20:51 +00:00
|
|
|
|
call _egc_copy_rect_1_to_0_16 c, large (266 shl 16) or 220, large (100 shl 16) or 176
|
2014-11-19 11:09:22 +00:00
|
|
|
|
push 0F0000h
|
2014-10-07 04:32:20 +00:00
|
|
|
|
call sub_AAB6
|
2014-08-05 19:24:06 +00:00
|
|
|
|
add sp, 4
|
2014-11-19 11:09:22 +00:00
|
|
|
|
push 50001h
|
2014-10-07 04:32:20 +00:00
|
|
|
|
call sub_AAB6
|
2014-08-05 19:24:06 +00:00
|
|
|
|
add sp, 4
|
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
loc_AF00:
|
2020-05-08 19:03:18 +00:00
|
|
|
|
mov al, _menu_sel
|
2014-08-05 19:24:06 +00:00
|
|
|
|
cbw
|
|
|
|
|
cmp ax, word_125AC
|
|
|
|
|
jz short loc_AF2C
|
|
|
|
|
push 5
|
|
|
|
|
push word_125AC
|
2014-10-07 04:32:20 +00:00
|
|
|
|
call sub_AAB6
|
2014-08-05 19:24:06 +00:00
|
|
|
|
add sp, 4
|
|
|
|
|
push 0Fh
|
2020-05-08 19:03:18 +00:00
|
|
|
|
mov al, _menu_sel
|
2014-08-05 19:24:06 +00:00
|
|
|
|
cbw
|
|
|
|
|
push ax
|
2014-10-07 04:32:20 +00:00
|
|
|
|
call sub_AAB6
|
2014-08-05 19:24:06 +00:00
|
|
|
|
add sp, 4
|
2020-05-08 19:03:18 +00:00
|
|
|
|
mov al, _menu_sel
|
2014-08-05 19:24:06 +00:00
|
|
|
|
cbw
|
|
|
|
|
mov word_125AC, ax
|
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
loc_AF2C:
|
2020-05-08 19:03:18 +00:00
|
|
|
|
mov al, _input_left
|
2014-08-05 19:24:06 +00:00
|
|
|
|
cbw
|
|
|
|
|
cmp ax, 1
|
|
|
|
|
jnz short loc_AF69
|
|
|
|
|
cmp word_125AE, 0
|
|
|
|
|
jnz short loc_AF6F
|
2020-05-08 19:03:18 +00:00
|
|
|
|
cmp _menu_sel, 0
|
2014-08-05 19:24:06 +00:00
|
|
|
|
jnz short loc_AF53
|
|
|
|
|
dec byte_1251D
|
|
|
|
|
cmp byte_1251D, 0
|
|
|
|
|
jge short loc_AF53
|
|
|
|
|
mov byte_1251D, 0Eh
|
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
loc_AF53:
|
2014-08-05 19:24:06 +00:00
|
|
|
|
push 0Fh
|
2020-05-08 19:03:18 +00:00
|
|
|
|
mov al, _menu_sel
|
2014-08-05 19:24:06 +00:00
|
|
|
|
cbw
|
|
|
|
|
push ax
|
2014-10-07 04:32:20 +00:00
|
|
|
|
call sub_AAB6
|
2014-08-05 19:24:06 +00:00
|
|
|
|
add sp, 4
|
|
|
|
|
mov word_125AE, 1
|
|
|
|
|
jmp short loc_AF6F
|
|
|
|
|
; ---------------------------------------------------------------------------
|
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
loc_AF69:
|
2014-08-05 19:24:06 +00:00
|
|
|
|
mov word_125AE, 0
|
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
loc_AF6F:
|
2020-05-08 19:03:18 +00:00
|
|
|
|
mov al, _input_right
|
2014-08-05 19:24:06 +00:00
|
|
|
|
cbw
|
|
|
|
|
cmp ax, 1
|
|
|
|
|
jnz short loc_AFAC
|
|
|
|
|
cmp word_125B0, 0
|
|
|
|
|
jnz short loc_AFB2
|
2020-05-08 19:03:18 +00:00
|
|
|
|
cmp _menu_sel, 0
|
2014-08-05 19:24:06 +00:00
|
|
|
|
jnz short loc_AF96
|
|
|
|
|
inc byte_1251D
|
|
|
|
|
cmp byte_1251D, 0Fh
|
|
|
|
|
jl short loc_AF96
|
|
|
|
|
mov byte_1251D, 0
|
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
loc_AF96:
|
2014-08-05 19:24:06 +00:00
|
|
|
|
push 0Fh
|
2020-05-08 19:03:18 +00:00
|
|
|
|
mov al, _menu_sel
|
2014-08-05 19:24:06 +00:00
|
|
|
|
cbw
|
|
|
|
|
push ax
|
2014-10-07 04:32:20 +00:00
|
|
|
|
call sub_AAB6
|
2014-08-05 19:24:06 +00:00
|
|
|
|
add sp, 4
|
|
|
|
|
mov word_125B0, 1
|
|
|
|
|
jmp short loc_AFB2
|
|
|
|
|
; ---------------------------------------------------------------------------
|
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
loc_AFAC:
|
2014-08-05 19:24:06 +00:00
|
|
|
|
mov word_125B0, 0
|
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
loc_AFB2:
|
2020-05-08 19:03:18 +00:00
|
|
|
|
cmp _input_ok, 0
|
2014-08-05 19:24:06 +00:00
|
|
|
|
jnz short loc_AFC0
|
2020-05-08 19:03:18 +00:00
|
|
|
|
cmp _input_shot, 0
|
2014-08-05 19:24:06 +00:00
|
|
|
|
jz short loc_AFC9
|
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
loc_AFC0:
|
2020-05-08 19:03:18 +00:00
|
|
|
|
mov al, _menu_sel
|
2014-08-05 19:24:06 +00:00
|
|
|
|
cbw
|
|
|
|
|
cmp ax, 1
|
|
|
|
|
jz short loc_AFD0
|
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
loc_AFC9:
|
2020-05-08 19:03:18 +00:00
|
|
|
|
cmp _input_cancel, 0
|
2014-08-05 19:24:06 +00:00
|
|
|
|
jz short loc_AFE0
|
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
loc_AFD0:
|
2014-08-05 19:24:06 +00:00
|
|
|
|
mov byte_1232A, 4
|
|
|
|
|
mov word_125AA, 0
|
2020-05-08 19:03:18 +00:00
|
|
|
|
mov _menu_sel, 3
|
2014-08-05 19:24:06 +00:00
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
loc_AFE0:
|
2020-05-08 19:03:18 +00:00
|
|
|
|
cmp _input_ok, 0
|
2014-08-05 19:24:06 +00:00
|
|
|
|
jnz short loc_AFEE
|
2020-05-08 19:03:18 +00:00
|
|
|
|
cmp _input_shot, 0
|
2014-08-05 19:24:06 +00:00
|
|
|
|
jz short loc_AFF9
|
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
loc_AFEE:
|
2020-05-08 19:03:18 +00:00
|
|
|
|
cmp _menu_sel, 0
|
2014-08-05 19:24:06 +00:00
|
|
|
|
jnz short loc_AFF9
|
2014-10-07 04:32:20 +00:00
|
|
|
|
call sub_AE6D
|
2014-08-05 19:24:06 +00:00
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
loc_AFF9:
|
2014-08-05 19:24:06 +00:00
|
|
|
|
pop bp
|
|
|
|
|
retf
|
|
|
|
|
sub_AEA8 endp
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
; =============== S U B R O U T I N E =======================================
|
|
|
|
|
|
|
|
|
|
; Attributes: bp-based frame
|
|
|
|
|
|
|
|
|
|
; int __cdecl main(int argc, const char **argv, const char **envp)
|
2015-02-19 06:46:36 +00:00
|
|
|
|
public _main
|
2014-08-19 20:33:43 +00:00
|
|
|
|
_main proc far
|
2014-08-05 19:24:06 +00:00
|
|
|
|
|
|
|
|
|
outregs = REGS ptr -2Ch
|
|
|
|
|
inregs = REGS ptr -1Ch
|
2020-05-28 19:52:18 +00:00
|
|
|
|
@@kb_buf = word ptr -0Ch
|
2014-08-05 19:24:06 +00:00
|
|
|
|
var_9 = byte ptr -9
|
|
|
|
|
var_8 = dword ptr -8
|
|
|
|
|
var_4 = dword ptr -4
|
|
|
|
|
_argc = word ptr 4
|
|
|
|
|
_argv = dword ptr 6
|
|
|
|
|
_envp = dword ptr 0Ah
|
|
|
|
|
|
|
|
|
|
enter 2Ch, 0
|
|
|
|
|
push si
|
|
|
|
|
push di
|
|
|
|
|
xor si, si
|
|
|
|
|
xor di, di
|
2015-02-21 19:45:02 +00:00
|
|
|
|
call _mdrv2_resident
|
2014-08-05 19:24:06 +00:00
|
|
|
|
or ax, ax
|
|
|
|
|
jnz short loc_B015
|
|
|
|
|
push ds
|
|
|
|
|
push offset aGogbgGtg@gcglv ; "<22>o<EFBFBD>b<EFBFBD>`<60>t<EFBFBD>@<40>C<EFBFBD><43><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>N<EFBFBD><4E><EFBFBD><EFBFBD><EFBFBD>Ă<EFBFBD>"
|
|
|
|
|
jmp loc_B25D
|
|
|
|
|
; ---------------------------------------------------------------------------
|
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
loc_B015:
|
2014-08-05 19:24:06 +00:00
|
|
|
|
mov byte_1232D, 0
|
|
|
|
|
mov dword_12330, 0
|
|
|
|
|
mov byte_1232E, 0
|
|
|
|
|
cmp word ptr [bp+_argv], 1
|
|
|
|
|
jle loc_B0D6
|
|
|
|
|
les bx, [bp+_argv+2]
|
|
|
|
|
les bx, es:[bx+4]
|
|
|
|
|
mov al, es:[bx]
|
|
|
|
|
cbw
|
|
|
|
|
cmp ax, 73h ; 's'
|
|
|
|
|
jnz short loc_B045
|
2015-03-06 22:04:25 +00:00
|
|
|
|
mov _mode, 1
|
2014-08-05 19:24:06 +00:00
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
loc_B045:
|
2014-08-05 19:24:06 +00:00
|
|
|
|
les bx, [bp+_argv+2]
|
|
|
|
|
les bx, es:[bx+4]
|
|
|
|
|
mov al, es:[bx]
|
|
|
|
|
cbw
|
|
|
|
|
cmp ax, 74h ; 't'
|
|
|
|
|
jnz short loc_B05A
|
2015-03-06 22:04:25 +00:00
|
|
|
|
mov _mode, 2
|
2014-08-05 19:24:06 +00:00
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
loc_B05A:
|
2014-08-05 19:24:06 +00:00
|
|
|
|
les bx, [bp+_argv+2]
|
|
|
|
|
les bx, es:[bx+4]
|
|
|
|
|
mov al, es:[bx]
|
|
|
|
|
cbw
|
|
|
|
|
cmp ax, 64h ; 'd'
|
|
|
|
|
jnz short loc_B06F
|
2015-03-06 22:04:25 +00:00
|
|
|
|
mov _mode, 3
|
2014-08-05 19:24:06 +00:00
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
loc_B06F:
|
2014-08-05 19:24:06 +00:00
|
|
|
|
push 3 ; n
|
|
|
|
|
push ds
|
|
|
|
|
push offset aCon ; "CON"
|
|
|
|
|
les bx, [bp+_argv+2]
|
2014-11-19 11:09:22 +00:00
|
|
|
|
pushd dword ptr es:[bx+4] ; s1
|
2014-08-05 19:24:06 +00:00
|
|
|
|
call _memcmp
|
|
|
|
|
add sp, 0Ah
|
|
|
|
|
or ax, ax
|
|
|
|
|
jnz short loc_B0D6
|
|
|
|
|
les bx, [bp+_argv+2]
|
|
|
|
|
mov eax, es:[bx+8]
|
|
|
|
|
mov [bp+var_4], eax
|
2014-11-19 11:09:22 +00:00
|
|
|
|
pushd [bp+var_4]
|
2014-09-28 03:04:24 +00:00
|
|
|
|
call _atol
|
2014-08-05 19:24:06 +00:00
|
|
|
|
add sp, 4
|
|
|
|
|
mov byte_1232D, al
|
|
|
|
|
les bx, [bp+_argv+2]
|
2014-11-19 11:09:22 +00:00
|
|
|
|
pushd dword ptr es:[bx+0Ch]
|
2014-09-28 03:04:24 +00:00
|
|
|
|
call _atol
|
2014-08-05 19:24:06 +00:00
|
|
|
|
add sp, 4
|
|
|
|
|
mov word ptr dword_12330+2, dx
|
|
|
|
|
mov word ptr dword_12330, ax
|
|
|
|
|
les bx, [bp+_argv+2]
|
|
|
|
|
mov eax, es:[bx+10h]
|
|
|
|
|
mov [bp+var_8], eax
|
2014-11-19 11:09:22 +00:00
|
|
|
|
pushd [bp+var_8]
|
2014-09-28 03:04:24 +00:00
|
|
|
|
call _atol
|
2014-08-05 19:24:06 +00:00
|
|
|
|
add sp, 4
|
|
|
|
|
mov byte_1232E, al
|
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
loc_B0D6:
|
2015-02-21 19:45:02 +00:00
|
|
|
|
call _mdrv2_check_board
|
2020-03-02 19:22:10 +00:00
|
|
|
|
call _game_init
|
2020-05-06 18:21:39 +00:00
|
|
|
|
call _cfg_load
|
|
|
|
|
mov al, _opts.O_bgm_mode
|
2014-08-05 19:24:06 +00:00
|
|
|
|
cbw
|
|
|
|
|
mov si, ax
|
|
|
|
|
mov byte ptr [bp+inregs+1], 3
|
|
|
|
|
push ss
|
|
|
|
|
lea ax, [bp+outregs]
|
|
|
|
|
push ax ; outregs
|
|
|
|
|
push ss
|
|
|
|
|
lea ax, [bp+inregs]
|
|
|
|
|
push ax ; inregs
|
|
|
|
|
push 18h ; intno
|
|
|
|
|
call _int86
|
|
|
|
|
add sp, 0Ah
|
2014-09-07 15:01:58 +00:00
|
|
|
|
call key_start
|
2014-10-07 04:32:20 +00:00
|
|
|
|
call sub_A719
|
2014-08-05 19:24:06 +00:00
|
|
|
|
xor ax, ax
|
|
|
|
|
mov es, ax
|
2020-05-28 19:52:18 +00:00
|
|
|
|
mov al, es:((50h shl 4) + 00h) ; BIOS_FLAG
|
|
|
|
|
or al, 20h ; Do not beep when key buffer overflows
|
2014-08-05 19:24:06 +00:00
|
|
|
|
mov [bp+var_9], al
|
|
|
|
|
xor ax, ax
|
|
|
|
|
mov dl, [bp+var_9]
|
|
|
|
|
mov es, ax
|
2020-05-28 19:52:18 +00:00
|
|
|
|
mov es:((50h shl 4) + 00h), dl ; BIOS_FLAG
|
2014-08-05 19:24:06 +00:00
|
|
|
|
jmp short loc_B135
|
|
|
|
|
; ---------------------------------------------------------------------------
|
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
loc_B126:
|
2014-08-05 19:24:06 +00:00
|
|
|
|
push 1
|
2019-11-18 07:28:39 +00:00
|
|
|
|
call _frame_delay
|
2014-08-05 19:24:06 +00:00
|
|
|
|
pop cx
|
|
|
|
|
push di
|
2014-10-07 04:32:20 +00:00
|
|
|
|
call sub_A92C
|
2014-08-05 19:24:06 +00:00
|
|
|
|
pop cx
|
|
|
|
|
inc di
|
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
loc_B135:
|
2014-09-07 14:21:01 +00:00
|
|
|
|
call key_sense_bios
|
2014-08-05 19:24:06 +00:00
|
|
|
|
or ax, ax
|
|
|
|
|
jz short loc_B126
|
2014-10-07 04:32:20 +00:00
|
|
|
|
call sub_A772
|
2020-05-06 18:21:39 +00:00
|
|
|
|
mov eax, _rand
|
2014-08-30 10:13:04 +00:00
|
|
|
|
mov random_seed, eax
|
2014-08-05 19:24:06 +00:00
|
|
|
|
jmp loc_B21A
|
|
|
|
|
; ---------------------------------------------------------------------------
|
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
loc_B14D:
|
2014-08-05 19:24:06 +00:00
|
|
|
|
cmp byte_1232A, 0
|
|
|
|
|
jnz short loc_B15F
|
2020-05-08 19:03:18 +00:00
|
|
|
|
call _main_input_sense
|
2014-10-07 04:32:20 +00:00
|
|
|
|
call sub_AB97
|
2014-08-05 19:24:06 +00:00
|
|
|
|
jmp loc_B1EE
|
|
|
|
|
; ---------------------------------------------------------------------------
|
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
loc_B15F:
|
2014-08-05 19:24:06 +00:00
|
|
|
|
mov al, byte_1232A
|
|
|
|
|
cbw
|
|
|
|
|
cmp ax, 1
|
|
|
|
|
jnz short loc_B172
|
2020-05-08 19:03:18 +00:00
|
|
|
|
call _option_input_sense
|
2014-10-07 04:32:20 +00:00
|
|
|
|
call sub_AC84
|
2014-08-05 19:24:06 +00:00
|
|
|
|
jmp short loc_B1EE
|
|
|
|
|
; ---------------------------------------------------------------------------
|
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
loc_B172:
|
2014-08-05 19:24:06 +00:00
|
|
|
|
mov al, byte_1232A
|
|
|
|
|
cbw
|
|
|
|
|
cmp ax, 2
|
|
|
|
|
jnz short loc_B185
|
2020-05-08 19:03:18 +00:00
|
|
|
|
call _option_input_sense
|
2014-10-07 04:32:20 +00:00
|
|
|
|
call sub_AEA8
|
2014-08-05 19:24:06 +00:00
|
|
|
|
jmp short loc_B1EE
|
|
|
|
|
; ---------------------------------------------------------------------------
|
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
loc_B185:
|
2014-08-05 19:24:06 +00:00
|
|
|
|
mov al, byte_1232A
|
|
|
|
|
cbw
|
|
|
|
|
cmp ax, 3
|
|
|
|
|
jnz short loc_B1D8
|
2020-05-06 18:21:39 +00:00
|
|
|
|
mov al, _opts.O_bgm_mode
|
2014-08-05 19:24:06 +00:00
|
|
|
|
cbw
|
|
|
|
|
cmp ax, si
|
|
|
|
|
jz short loc_B1C9
|
2020-05-06 18:21:39 +00:00
|
|
|
|
cmp _opts.O_bgm_mode, 0
|
2014-08-05 19:24:06 +00:00
|
|
|
|
jnz short loc_B1A4
|
2015-02-21 19:45:02 +00:00
|
|
|
|
call _mdrv2_bgm_stop
|
2014-08-05 19:24:06 +00:00
|
|
|
|
jmp short loc_B1C3
|
|
|
|
|
; ---------------------------------------------------------------------------
|
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
loc_B1A4:
|
2020-05-06 18:21:39 +00:00
|
|
|
|
mov al, _opts.O_bgm_mode
|
2014-08-05 19:24:06 +00:00
|
|
|
|
cbw
|
|
|
|
|
cmp ax, 1
|
|
|
|
|
jnz short loc_B1C3
|
2015-02-21 19:45:02 +00:00
|
|
|
|
call _mdrv2_bgm_stop
|
2014-08-05 19:24:06 +00:00
|
|
|
|
push ds
|
|
|
|
|
push offset aReimu_mdt ; "reimu.mdt"
|
2015-02-21 19:45:02 +00:00
|
|
|
|
call _mdrv2_bgm_load
|
2014-08-05 19:24:06 +00:00
|
|
|
|
add sp, 4
|
2015-02-21 19:45:02 +00:00
|
|
|
|
call _mdrv2_bgm_play
|
2014-08-05 19:24:06 +00:00
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
loc_B1C3:
|
2020-05-06 18:21:39 +00:00
|
|
|
|
mov al, _opts.O_bgm_mode
|
2014-08-05 19:24:06 +00:00
|
|
|
|
cbw
|
|
|
|
|
mov si, ax
|
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
loc_B1C9:
|
2014-08-05 19:24:06 +00:00
|
|
|
|
push 0Fh
|
2019-11-18 07:28:39 +00:00
|
|
|
|
call _frame_delay
|
2014-08-05 19:24:06 +00:00
|
|
|
|
pop cx
|
|
|
|
|
mov byte_1232A, 0
|
|
|
|
|
jmp short loc_B1EE
|
|
|
|
|
; ---------------------------------------------------------------------------
|
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
loc_B1D8:
|
2014-08-05 19:24:06 +00:00
|
|
|
|
mov al, byte_1232A
|
|
|
|
|
cbw
|
|
|
|
|
cmp ax, 4
|
|
|
|
|
jnz short loc_B1EE
|
|
|
|
|
push 0Fh
|
2019-11-18 07:28:39 +00:00
|
|
|
|
call _frame_delay
|
2014-08-05 19:24:06 +00:00
|
|
|
|
pop cx
|
|
|
|
|
mov byte_1232A, 1
|
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
loc_B1EE:
|
2014-08-05 19:24:06 +00:00
|
|
|
|
xor ax, ax
|
|
|
|
|
mov es, ax
|
2020-05-28 19:52:18 +00:00
|
|
|
|
mov ax, word ptr es:[((50h shl 4) + 24h)] ; KB_BUF_HEAD
|
|
|
|
|
mov [bp+@@kb_buf], ax
|
2014-08-05 19:24:06 +00:00
|
|
|
|
xor ax, ax
|
2020-05-28 19:52:18 +00:00
|
|
|
|
mov dx, [bp+@@kb_buf]
|
2014-08-05 19:24:06 +00:00
|
|
|
|
mov es, ax
|
2020-05-28 19:52:18 +00:00
|
|
|
|
mov word ptr es:[((50h shl 4) + 26h)], dx ; KB_BUF_TAIL
|
2014-08-05 19:24:06 +00:00
|
|
|
|
mov es, ax
|
2020-05-28 19:52:18 +00:00
|
|
|
|
mov byte ptr es:[((50h shl 4) + 28h)], 0 ; KB_COUNT
|
2020-05-06 18:21:39 +00:00
|
|
|
|
inc _rand
|
2014-08-05 19:24:06 +00:00
|
|
|
|
push 1
|
2019-11-18 07:28:39 +00:00
|
|
|
|
call _frame_delay
|
2014-08-05 19:24:06 +00:00
|
|
|
|
pop cx
|
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
loc_B21A:
|
2014-08-05 19:24:06 +00:00
|
|
|
|
cmp byte_1232C, 0
|
|
|
|
|
jz loc_B14D
|
2020-05-06 18:21:39 +00:00
|
|
|
|
call _cfg_save
|
2014-08-05 19:24:06 +00:00
|
|
|
|
mov byte_1232F, 1
|
2015-02-21 19:45:02 +00:00
|
|
|
|
call _mdrv2_bgm_stop
|
2014-10-07 04:32:20 +00:00
|
|
|
|
call sub_A79D
|
2014-08-05 19:24:06 +00:00
|
|
|
|
push 1
|
2015-02-27 22:11:47 +00:00
|
|
|
|
call _graph_accesspage_func
|
2014-08-05 19:24:06 +00:00
|
|
|
|
pop cx
|
2020-03-01 16:15:24 +00:00
|
|
|
|
call _z_graph_clear
|
2014-08-05 19:24:06 +00:00
|
|
|
|
push 0
|
2015-02-27 22:11:47 +00:00
|
|
|
|
call _graph_accesspage_func
|
2014-08-05 19:24:06 +00:00
|
|
|
|
pop cx
|
2020-03-01 16:15:24 +00:00
|
|
|
|
call _z_graph_clear
|
2020-03-02 19:22:10 +00:00
|
|
|
|
call _game_exit
|
2015-02-21 19:45:02 +00:00
|
|
|
|
call _mdrv2_bgm_stop
|
2014-08-05 19:24:06 +00:00
|
|
|
|
push ds
|
|
|
|
|
push offset format ; "<22><><EFBFBD><EFBFBD><C282>ꂳ<EFBFBD>܂ł<DC82><C582><EFBFBD><EFBFBD>I<EFBFBD>I\n"
|
|
|
|
|
|
2014-08-10 01:44:54 +00:00
|
|
|
|
loc_B25D:
|
2014-08-05 19:24:06 +00:00
|
|
|
|
call _printf
|
|
|
|
|
add sp, 4
|
|
|
|
|
pop di
|
|
|
|
|
pop si
|
|
|
|
|
leave
|
|
|
|
|
retf
|
2015-02-19 06:46:36 +00:00
|
|
|
|
_main endp
|
2020-05-05 17:55:33 +00:00
|
|
|
|
op_01__TEXT ends
|
2014-08-05 19:24:06 +00:00
|
|
|
|
|
|
|
|
|
; ===========================================================================
|
|
|
|
|
|
|
|
|
|
; Segment type: Pure code
|
2021-05-16 18:28:13 +00:00
|
|
|
|
frmdelay_TEXT segment byte public 'CODE' use16
|
2019-11-18 07:28:39 +00:00
|
|
|
|
extern _frame_delay:proc
|
2021-05-16 18:28:13 +00:00
|
|
|
|
frmdelay_TEXT ends
|
2014-08-05 19:24:06 +00:00
|
|
|
|
|
|
|
|
|
; ===========================================================================
|
|
|
|
|
|
|
|
|
|
; Segment type: Pure code
|
2020-11-04 13:47:52 +00:00
|
|
|
|
vsync_TEXT segment byte public 'CODE' use16
|
|
|
|
|
vsync_TEXT ends
|
2014-08-05 19:24:06 +00:00
|
|
|
|
|
|
|
|
|
; ===========================================================================
|
|
|
|
|
|
2020-11-04 13:47:52 +00:00
|
|
|
|
ztext_TEXT segment byte public 'CODE' use16
|
|
|
|
|
ztext_TEXT ends
|
2014-08-05 19:24:06 +00:00
|
|
|
|
|
|
|
|
|
; ===========================================================================
|
|
|
|
|
|
|
|
|
|
; Segment type: Pure code
|
2020-11-04 13:47:52 +00:00
|
|
|
|
initexit_TEXT segment byte public 'CODE' use16
|
2020-03-02 19:22:10 +00:00
|
|
|
|
extern _game_init:proc
|
|
|
|
|
extern _game_exit:proc
|
|
|
|
|
extern _game_switch_binary:proc
|
2020-11-04 13:47:52 +00:00
|
|
|
|
initexit_TEXT ends
|
2014-08-05 19:24:06 +00:00
|
|
|
|
|
|
|
|
|
; ---------------------------------------------------------------------------
|
|
|
|
|
; ===========================================================================
|
|
|
|
|
|
|
|
|
|
; Segment type: Pure code
|
2020-11-04 13:47:52 +00:00
|
|
|
|
graph_TEXT segment byte public 'CODE' use16
|
2020-03-01 19:48:24 +00:00
|
|
|
|
extern _graph_accesspage_func:proc
|
2020-03-01 16:15:24 +00:00
|
|
|
|
extern _z_graph_clear:proc
|
2021-11-07 17:26:03 +00:00
|
|
|
|
extern _graph_copy_accessed_page_to_othe:proc
|
2020-03-01 11:24:01 +00:00
|
|
|
|
extern _z_palette_black:proc
|
|
|
|
|
extern _z_palette_black_in:proc
|
2020-01-11 20:06:26 +00:00
|
|
|
|
extern _graph_putsa_fx:proc
|
2020-11-04 13:47:52 +00:00
|
|
|
|
graph_TEXT ends
|
2014-08-05 19:24:06 +00:00
|
|
|
|
|
|
|
|
|
; ---------------------------------------------------------------------------
|
|
|
|
|
; ===========================================================================
|
|
|
|
|
|
|
|
|
|
; Segment type: Pure code
|
[Separate translation units] [th01] ptn_copy_8_0_to_1()
So, we have a problem. The ridiculously optimized graph_putsa_fx() used
in TH04 and TH05 swaps out the target of two CALL instructions at
run-time… because there *really* wasn't any free register left for an
indirect CALL, eh? Therefore, the necessary relative addresses have to
be calculated at assembly time, by subtracting the target function
label from the call site label.
Unfortunately, the resulting values are stored in the .DATA segment,
which we can't move out right now. Declaring the labels as EXTERN
wouldn't work either, since the linker can't do fancy arithmetic and is
limited to simply replacing address placeholders with one single
address. This is explained pretty well at:
http://computer-programming-forum.com/46-asm/48f3d4a463bb38d1.htm
Which means we're stuck, and can't separate out this function for the
foreseeable future.
So, time to approach the SHARED segment from the top instead, to at
least get everything around graph_putsa_fx() done now. 🤷
vram_planes_set() is the first common function there. But since it was
introduced in TH01, we've got some maintenance to do for that game
first…
Part of P0138, funded by [Anonymous] and Blue Bolt.
2021-04-11 12:24:21 +00:00
|
|
|
|
SHARED segment byte public 'CODE' use16
|
2020-07-04 18:20:51 +00:00
|
|
|
|
extern _egc_copy_rect_1_to_0_16:proc
|
[Separate translation units] [th01] ptn_copy_8_0_to_1()
So, we have a problem. The ridiculously optimized graph_putsa_fx() used
in TH04 and TH05 swaps out the target of two CALL instructions at
run-time… because there *really* wasn't any free register left for an
indirect CALL, eh? Therefore, the necessary relative addresses have to
be calculated at assembly time, by subtracting the target function
label from the call site label.
Unfortunately, the resulting values are stored in the .DATA segment,
which we can't move out right now. Declaring the labels as EXTERN
wouldn't work either, since the linker can't do fancy arithmetic and is
limited to simply replacing address placeholders with one single
address. This is explained pretty well at:
http://computer-programming-forum.com/46-asm/48f3d4a463bb38d1.htm
Which means we're stuck, and can't separate out this function for the
foreseeable future.
So, time to approach the SHARED segment from the top instead, to at
least get everything around graph_putsa_fx() done now. 🤷
vram_planes_set() is the first common function there. But since it was
introduced in TH01, we've got some maintenance to do for that game
first…
Part of P0138, funded by [Anonymous] and Blue Bolt.
2021-04-11 12:24:21 +00:00
|
|
|
|
SHARED ends
|
2014-08-05 19:24:06 +00:00
|
|
|
|
|
|
|
|
|
; ===========================================================================
|
|
|
|
|
|
|
|
|
|
; Segment type: Pure code
|
2020-11-04 13:47:52 +00:00
|
|
|
|
grppffx_TEXT segment byte public 'CODE' use16
|
2019-12-18 05:45:08 +00:00
|
|
|
|
extern _graph_printf_fx:proc
|
2020-11-04 13:47:52 +00:00
|
|
|
|
grppffx_TEXT ends
|
2014-08-05 19:24:06 +00:00
|
|
|
|
|
|
|
|
|
; ===========================================================================
|
|
|
|
|
|
|
|
|
|
; Segment type: Pure code
|
2021-01-22 11:56:24 +00:00
|
|
|
|
PTN_GRP_GRZ segment byte public 'CODE' use16
|
2020-03-12 23:54:35 +00:00
|
|
|
|
extern _grp_put_palette_show:proc
|
|
|
|
|
extern _grp_put:proc
|
|
|
|
|
extern _grp_put_colorkey:proc
|
2021-01-22 11:56:24 +00:00
|
|
|
|
PTN_GRP_GRZ ends
|
2014-08-05 19:24:06 +00:00
|
|
|
|
|
2020-03-03 18:41:02 +00:00
|
|
|
|
; ===========================================================================
|
2014-08-05 19:24:06 +00:00
|
|
|
|
|
2020-03-03 18:41:02 +00:00
|
|
|
|
; Segment type: Pure code
|
2020-11-04 13:47:52 +00:00
|
|
|
|
resstuff_TEXT segment byte public 'CODE' use16
|
2020-03-03 18:41:02 +00:00
|
|
|
|
extern _resident_stuff_set:proc
|
|
|
|
|
extern _resident_free:proc
|
2020-11-04 13:47:52 +00:00
|
|
|
|
resstuff_TEXT ends
|
2014-08-05 19:24:06 +00:00
|
|
|
|
|
2020-03-03 18:41:02 +00:00
|
|
|
|
; ===========================================================================
|
2014-08-05 19:24:06 +00:00
|
|
|
|
|
2020-03-03 18:41:02 +00:00
|
|
|
|
; Segment type: Pure code
|
2020-11-04 13:47:52 +00:00
|
|
|
|
mdrv2_TEXT segment byte public 'CODE' use16
|
2020-03-03 18:41:02 +00:00
|
|
|
|
extern _mdrv2_resident:proc
|
|
|
|
|
extern _mdrv2_bgm_load:proc
|
|
|
|
|
extern _mdrv2_bgm_play:proc
|
|
|
|
|
extern _mdrv2_bgm_stop:proc
|
|
|
|
|
extern _mdrv2_bgm_fade_out_nonblock:proc
|
|
|
|
|
extern _mdrv2_check_board:proc
|
2020-11-04 13:47:52 +00:00
|
|
|
|
mdrv2_TEXT ends
|
2014-08-05 19:24:06 +00:00
|
|
|
|
|
2020-03-03 18:41:02 +00:00
|
|
|
|
; ===========================================================================
|
2014-08-05 19:24:06 +00:00
|
|
|
|
|
2020-03-03 18:41:02 +00:00
|
|
|
|
op_12_TEXT segment byte public 'CODE' use16
|
|
|
|
|
op_12_TEXT ends
|
2014-08-05 19:24:06 +00:00
|
|
|
|
|
2020-03-03 18:41:02 +00:00
|
|
|
|
; ===========================================================================
|
2014-08-05 19:24:06 +00:00
|
|
|
|
|
2020-03-03 18:41:02 +00:00
|
|
|
|
.data
|
2014-08-19 20:33:43 +00:00
|
|
|
|
|
2020-05-06 18:21:39 +00:00
|
|
|
|
public _opts
|
|
|
|
|
_opts cfg_options_t <CFG_RANK_DEFAULT, CFG_BGM_MODE_DEFAULT, CFG_BOMBS_DEFAULT, CFG_LIVES_EXTRA_DEFAULT>
|
2015-03-06 22:04:25 +00:00
|
|
|
|
_mode db 0
|
2020-05-08 19:03:18 +00:00
|
|
|
|
public _menu_sel, _option_rows
|
|
|
|
|
public _input_left, _input_right, _input_ok, _input_shot, _input_cancel
|
|
|
|
|
public _main_input_prev, _option_input_prev
|
|
|
|
|
_menu_sel db 0
|
|
|
|
|
_input_left db 0
|
|
|
|
|
_input_ok db 0
|
|
|
|
|
_input_shot db 0
|
|
|
|
|
_input_cancel db 0
|
2014-08-10 01:44:54 +00:00
|
|
|
|
byte_1232A db 0
|
2020-05-08 19:03:18 +00:00
|
|
|
|
_input_right db 0
|
2014-08-10 01:44:54 +00:00
|
|
|
|
byte_1232C db 0
|
|
|
|
|
byte_1232D db 0
|
|
|
|
|
byte_1232E db 0
|
|
|
|
|
byte_1232F db 0
|
|
|
|
|
dword_12330 dd 0
|
2020-05-08 19:03:18 +00:00
|
|
|
|
_main_input_prev dw 2 dup (0)
|
|
|
|
|
_option_rows db 3
|
|
|
|
|
_option_input_prev dw 2 dup (0)
|
2020-05-27 19:31:39 +00:00
|
|
|
|
public _WHITELINES_DRAWN_AT
|
|
|
|
|
_WHITELINES_DRAWN_AT db RES_Y dup(0)
|
2020-03-03 18:41:02 +00:00
|
|
|
|
off_124CD dd aVrvsvVqvs
|
|
|
|
|
; " <20>r<EFBFBD>s<EFBFBD>`<60>q<EFBFBD>s "
|
|
|
|
|
dd aVbvnvmvsvhvmvt ; "<22>b<EFBFBD>n<EFBFBD>m<EFBFBD>s<EFBFBD>h<EFBFBD>m<EFBFBD>t<EFBFBD>d"
|
|
|
|
|
dd aB@vnvovsvhvnvm ; "<22>@<40>n<EFBFBD>o<EFBFBD>s<EFBFBD>h<EFBFBD>n<EFBFBD>m<EFBFBD>@"
|
|
|
|
|
dd aB@b@vpvtvhvsb@ ; "<22>@<40>@<40>p<EFBFBD>t<EFBFBD>h<EFBFBD>s<EFBFBD>@<40>@"
|
|
|
|
|
off_124DD dd aB@vqvVmvjb@
|
|
|
|
|
; "<22>@<40>q<EFBFBD>`<60>m<EFBFBD>j<EFBFBD>@ "
|
|
|
|
|
dd aVlvtvrvhvb ; " <20>l<EFBFBD>t<EFBFBD>r<EFBFBD>h<EFBFBD>b "
|
|
|
|
|
dd aVovkvVxvdvq ; "<22>o<EFBFBD>k<EFBFBD>`<60>x<EFBFBD>d<EFBFBD>q "
|
|
|
|
|
dd aVlbdvsvdvrvs ; "<22>l<EFBFBD>D<EFBFBD>s<EFBFBD>d<EFBFBD>r<EFBFBD>s "
|
|
|
|
|
dd aB@vpvtvhvsb@ ; "<22>@<40>p<EFBFBD>t<EFBFBD>h<EFBFBD>s<EFBFBD>@ "
|
|
|
|
|
off_124F1 dd aEasy
|
|
|
|
|
; " EASY "
|
|
|
|
|
dd aNormal ; "NORMAL"
|
|
|
|
|
dd aHard ; " HARD "
|
|
|
|
|
dd aLunatic ; "LUNATIC"
|
|
|
|
|
off_12501 dd aOff
|
|
|
|
|
; " OFF "
|
|
|
|
|
dd aFm ; " FM "
|
|
|
|
|
off_12509 dd a3
|
|
|
|
|
; " 3 "
|
|
|
|
|
dd a4 ; " 4 "
|
|
|
|
|
dd a5 ; " 5 "
|
|
|
|
|
dd a6 ; " 6 "
|
|
|
|
|
dd a7 ; " 7 "
|
|
|
|
|
byte_1251D db 0
|
|
|
|
|
off_1251E dd aVlvtvrvhvbb@vm
|
|
|
|
|
; "<22>l<EFBFBD>t<EFBFBD>r<EFBFBD>h<EFBFBD>b<EFBFBD>@<40>m<EFBFBD><6D><EFBFBD>D"
|
|
|
|
|
dd aB@b@vpvxvivf ; "<22>@<40>@<40>p<EFBFBD><70><EFBFBD><EFBFBD><EFBFBD><EFBFBD> "
|
|
|
|
|
off_12526 dd aASacretLot
|
|
|
|
|
; " A Sacret Lot"
|
|
|
|
|
dd aXcvR_o ; " <20><><EFBFBD>̐_<CC90><5F> "
|
|
|
|
|
dd aIiiuvIPc ; " <09>i<EFBFBD><69><EFBFBD>̛ޏ<CC9B> "
|
|
|
|
|
dd aHighlyResponsi ; " Highly Responsive"
|
|
|
|
|
dd aUmx
|
|
|
|
|
dd aOrientalMagici ; " Oriental Magician"
|
|
|
|
|
dd aB@FjoVPmsUbb@ ; "<22>@ <20>j<EFBFBD>ׂ̏<D782><CC8F><EFBFBD><EFBFBD><EFBFBD><EFBFBD>@ "
|
|
|
|
|
dd aTheLegendOfKag ; " The Legend of KAGE"
|
|
|
|
|
dd aPositiveAndNeg ; "Positive and Negative"
|
|
|
|
|
dd aB@b@UvoguRrb@b ; "<22>@<40>@ <20>V<EFBFBD>g<EFBFBD>`<60><><EFBFBD>@<40>@ "
|
|
|
|
|
dd aB@b@b@CvlB@b@b ; "<22>@<40>@<40>@ <20><><EFBFBD><EFBFBD><EFBFBD>@<40>@<40>@ "
|
|
|
|
|
dd aVvvUVRVnvVOuvV ; "<22><><EFBFBD><EFBFBD><EFBFBD>|<7C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̎<EFBFBD><CC8E>܂<EFBFBD>"
|
|
|
|
|
dd aB@b@oavVVrvivV ; "<22>@<40>@<40><><EFBFBD>Ȃ<C882><CE82><EFBFBD><EFBFBD>Ƃ<EFBFBD><C682>@<40>@"
|
|
|
|
|
dd aB@b@Rpchmxom ; "<22>@<40>@ <20><><EFBFBD>H<EFBFBD><48><EFBFBD>m"
|
|
|
|
|
dd aB@b@b@gagcgkgx ; "<22>@<40>@<40>@<40>A<EFBFBD>C<EFBFBD><43><EFBFBD>X"
|
|
|
|
|
word_12562 dw 63h
|
|
|
|
|
word_12564 dw 0
|
|
|
|
|
word_12566 dw 0
|
|
|
|
|
word_12568 dw 0
|
|
|
|
|
word_1256A dw 0
|
|
|
|
|
word_1256C dw 0
|
|
|
|
|
off_1256E dd aReimu_mdt
|
|
|
|
|
; "reimu.mdt"
|
|
|
|
|
dd aZipangu_mdt ; "ZIPANGU.mdt"
|
|
|
|
|
dd aSt0_mdt ; "st0.mdt"
|
|
|
|
|
dd aSt1_mdt ; "st1.mdt"
|
|
|
|
|
dd aSt2_mdt ; "st2.mdt"
|
|
|
|
|
dd aSt3_mdt ; "st3.mdt"
|
|
|
|
|
dd aSt4_mdt ; "st4.mdt"
|
|
|
|
|
dd aSt5_mdt ; "st5.mdt"
|
|
|
|
|
dd aPositive_mdt ; "positive.mdt"
|
|
|
|
|
dd aLegend_mdt ; "legend.mdt"
|
|
|
|
|
dd aKami_mdt ; "kami.mdt"
|
|
|
|
|
dd aTensi_mdt ; "tensi.mdt"
|
|
|
|
|
dd aSyugen_mdt ; "syugen.mdt"
|
|
|
|
|
dd aAlice_mdt ; "alice.mdt"
|
|
|
|
|
dd aIris_mdt ; "iris.mdt"
|
|
|
|
|
word_125AA dw 0
|
|
|
|
|
word_125AC dw 0
|
|
|
|
|
word_125AE dw 0
|
|
|
|
|
word_125B0 dw 0
|
2020-05-06 18:21:39 +00:00
|
|
|
|
include th01/formats/cfg[data].asm
|
2020-03-03 18:41:02 +00:00
|
|
|
|
; char aReimu_mdt[]
|
|
|
|
|
aReimu_mdt db 'reimu.mdt',0
|
|
|
|
|
aReiiden2_grp db 'REIIDEN2.grp',0
|
|
|
|
|
aReiiden3_grp db 'REIIDEN3.grp',0
|
|
|
|
|
aOp_win_grp db 'op_win.grp',0
|
|
|
|
|
; char aReiiden_0[]
|
|
|
|
|
aReiiden_0 db 'reiiden',0
|
|
|
|
|
aVgvhvsb@vjvdvx db ' <20>g<EFBFBD>h<EFBFBD>s<EFBFBD>@<40>j<EFBFBD>d<EFBFBD>x',0
|
|
|
|
|
aVrvsvVqvs db ' <20>r<EFBFBD>s<EFBFBD>`<60>q<EFBFBD>s ',0
|
|
|
|
|
aVbvnvmvsvhvmvt db '<27>b<EFBFBD>n<EFBFBD>m<EFBFBD>s<EFBFBD>h<EFBFBD>m<EFBFBD>t<EFBFBD>d',0
|
|
|
|
|
aB@vnvovsvhvnvm db '<27>@<40>n<EFBFBD>o<EFBFBD>s<EFBFBD>h<EFBFBD>n<EFBFBD>m<EFBFBD>@',0
|
|
|
|
|
aB@b@vpvtvhvsb@ db '<27>@<40>@<40>p<EFBFBD>t<EFBFBD>h<EFBFBD>s<EFBFBD>@<40>@',0
|
|
|
|
|
aB@vqvVmvjb@ db '<27>@<40>q<EFBFBD>`<60>m<EFBFBD>j<EFBFBD>@ ',0
|
|
|
|
|
aVlvtvrvhvb db ' <20>l<EFBFBD>t<EFBFBD>r<EFBFBD>h<EFBFBD>b ',0
|
|
|
|
|
aVovkvVxvdvq db '<27>o<EFBFBD>k<EFBFBD>`<60>x<EFBFBD>d<EFBFBD>q ',0
|
|
|
|
|
aVlbdvsvdvrvs db '<27>l<EFBFBD>D<EFBFBD>s<EFBFBD>d<EFBFBD>r<EFBFBD>s ',0
|
|
|
|
|
aB@vpvtvhvsb@ db '<27>@<40>p<EFBFBD>t<EFBFBD>h<EFBFBD>s<EFBFBD>@ ',0
|
|
|
|
|
aEasy db ' EASY ',0
|
|
|
|
|
aNormal db 'NORMAL',0
|
|
|
|
|
aHard db ' HARD ',0
|
|
|
|
|
aLunatic db 'LUNATIC',0
|
|
|
|
|
aOff db ' OFF ',0
|
|
|
|
|
aFm db ' FM ',0
|
|
|
|
|
a3 db ' 3 ',0
|
|
|
|
|
a4 db ' 4 ',0
|
|
|
|
|
a5 db ' 5 ',0
|
|
|
|
|
a6 db ' 6 ',0
|
|
|
|
|
a7 db ' 7 ',0
|
|
|
|
|
; char aSS[]
|
|
|
|
|
aSS db '%s%s',0
|
|
|
|
|
aVlvtvrvhvbb@vm db '<27>l<EFBFBD>t<EFBFBD>r<EFBFBD>h<EFBFBD>b<EFBFBD>@<40>m<EFBFBD><6D><EFBFBD>D',0
|
|
|
|
|
aB@b@vpvxvivf db '<27>@<40>@<40>p<EFBFBD><70><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ',0
|
|
|
|
|
aASacretLot db ' A Sacret Lot',0
|
|
|
|
|
aXcvR_o db ' <20><><EFBFBD>̐_<CC90><5F> ',0
|
|
|
|
|
aIiiuvIPc db ' <20>i<EFBFBD><69><EFBFBD>̛ޏ<CC9B> ',0
|
|
|
|
|
aHighlyResponsi db ' Highly Responsive',0
|
|
|
|
|
aUmx db ' <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>k ',0
|
|
|
|
|
aOrientalMagici db ' Oriental Magician',0
|
|
|
|
|
aB@FjoVPmsUbb@ db '<27>@ <20>j<EFBFBD>ׂ̏<D782><CC8F><EFBFBD><EFBFBD><EFBFBD><EFBFBD>@ ',0
|
|
|
|
|
aTheLegendOfKag db ' The Legend of KAGE',0
|
|
|
|
|
aPositiveAndNeg db 'Positive and Negative',0
|
|
|
|
|
aB@b@UvoguRrb@b db '<27>@<40>@ <20>V<EFBFBD>g<EFBFBD>`<60><><EFBFBD>@<40>@ ',0
|
|
|
|
|
aB@b@b@CvlB@b@b db '<27>@<40>@<40>@ <20><><EFBFBD><EFBFBD><EFBFBD>@<40>@<40>@ ',0
|
|
|
|
|
aVvvUVRVnvVOuvV db '<27><><EFBFBD><EFBFBD><EFBFBD>|<7C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̎<EFBFBD><CC8E>܂<EFBFBD>',0
|
|
|
|
|
aB@b@oavVVrvivV db '<27>@<40>@<40><><EFBFBD>Ȃ<C882><CE82><EFBFBD><EFBFBD>Ƃ<EFBFBD><C682>@<40>@',0
|
|
|
|
|
aB@b@Rpchmxom db '<27>@<40>@ <20><><EFBFBD>H<EFBFBD><48><EFBFBD>m',0
|
|
|
|
|
aB@b@b@gagcgkgx db '<27>@<40>@<40>@<40>A<EFBFBD>C<EFBFBD><43><EFBFBD>X',0
|
|
|
|
|
; char aS_2d[]
|
|
|
|
|
aS_2d db '%s%.2d',0
|
|
|
|
|
aZipangu_mdt db 'ZIPANGU.mdt',0
|
|
|
|
|
aSt0_mdt db 'st0.mdt',0
|
|
|
|
|
aSt1_mdt db 'st1.mdt',0
|
|
|
|
|
aSt2_mdt db 'st2.mdt',0
|
|
|
|
|
aSt3_mdt db 'st3.mdt',0
|
|
|
|
|
aSt4_mdt db 'st4.mdt',0
|
|
|
|
|
aSt5_mdt db 'st5.mdt',0
|
|
|
|
|
aPositive_mdt db 'positive.mdt',0
|
|
|
|
|
aLegend_mdt db 'legend.mdt',0
|
|
|
|
|
aKami_mdt db 'kami.mdt',0
|
|
|
|
|
aTensi_mdt db 'tensi.mdt',0
|
|
|
|
|
aSyugen_mdt db 'syugen.mdt',0
|
|
|
|
|
aAlice_mdt db 'alice.mdt',0
|
|
|
|
|
aIris_mdt db 'iris.mdt',0
|
|
|
|
|
aGogbgGtg@gcglv db '<27>o<EFBFBD>b<EFBFBD>`<60>t<EFBFBD>@<40>C<EFBFBD><43><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>N<EFBFBD><4E><EFBFBD><EFBFBD><EFBFBD>Ă<EFBFBD>',0
|
|
|
|
|
aCon db 'CON',0
|
|
|
|
|
; char format[]
|
|
|
|
|
format db '<27><><EFBFBD><EFBFBD><C282>ꂳ<EFBFBD>܂ł<DC82><C582><EFBFBD><EFBFBD>I<EFBFBD>I',0Ah,0
|
|
|
|
|
include th01/hardware/vsync[data].asm
|
|
|
|
|
include th01/hardware/ztext[data].asm
|
|
|
|
|
include th01/core/initexit[data].asm
|
|
|
|
|
include th01/hardware/palette[data].asm
|
|
|
|
|
include th01/hardware/graph_r[data].asm
|
|
|
|
|
include th01/hardware/respal[data].asm
|
2020-03-12 21:14:23 +00:00
|
|
|
|
include th01/formats/grp_ptn[data].asm
|
2020-03-03 18:41:02 +00:00
|
|
|
|
include th01/formats/grz[data].asm
|
|
|
|
|
include libs/master.lib/version[data].asm
|
|
|
|
|
include libs/master.lib/grp[data].asm
|
|
|
|
|
include libs/master.lib/pal[data].asm
|
|
|
|
|
include libs/master.lib/respal_exist[data].asm
|
|
|
|
|
include libs/master.lib/resdata[data].asm
|
|
|
|
|
include libs/master.lib/fil[data].asm
|
|
|
|
|
include libs/master.lib/keytable[data].asm
|
|
|
|
|
include libs/master.lib/keystart[data].asm
|
|
|
|
|
include libs/master.lib/keyback[data].asm
|
|
|
|
|
include libs/master.lib/dos_ropen[data].asm
|
|
|
|
|
include libs/master.lib/clip[data].asm
|
|
|
|
|
include libs/master.lib/rand[data].asm
|
|
|
|
|
public _res_id
|
|
|
|
|
_res_id db 'ReiidenConfig',0
|
2020-06-10 18:10:32 +00:00
|
|
|
|
include th01/snd/mdrv2[data].asm
|
2020-03-03 18:41:02 +00:00
|
|
|
|
.data?
|
|
|
|
|
|
2020-05-06 18:21:39 +00:00
|
|
|
|
public _rand
|
|
|
|
|
_rand dd ?
|
2020-05-05 17:55:33 +00:00
|
|
|
|
public _columns
|
|
|
|
|
_columns dd ROW_SIZE dup (?)
|
2020-03-03 18:41:02 +00:00
|
|
|
|
include th01/hardware/vsync[bss].asm
|
2020-03-21 15:21:33 +00:00
|
|
|
|
db 191 dup (?)
|
2020-03-03 18:41:02 +00:00
|
|
|
|
word_13627 dw ?
|
2020-03-21 15:21:33 +00:00
|
|
|
|
db 60 dup (?)
|
2020-03-03 18:41:02 +00:00
|
|
|
|
word_13665 dw ?
|
|
|
|
|
db ?
|
|
|
|
|
include th01/core/initexit[bss].asm
|
|
|
|
|
include th01/hardware/graph[bss].asm
|
|
|
|
|
include th01/hardware/vram_planes[bss].asm
|
2020-03-21 15:21:33 +00:00
|
|
|
|
db 80 dup(?)
|
2020-03-10 22:10:36 +00:00
|
|
|
|
include th01/formats/grp_palette[bss].asm
|
2020-03-14 13:36:17 +00:00
|
|
|
|
include th01/formats/ptn_grz[bss].asm
|
2020-03-12 23:54:35 +00:00
|
|
|
|
include th01/formats/grp_buf[bss].asm
|
2014-08-23 13:47:05 +00:00
|
|
|
|
include libs/master.lib/pal[bss].asm
|
2014-08-30 05:49:51 +00:00
|
|
|
|
include libs/master.lib/fil[bss].asm
|
2014-09-07 15:01:58 +00:00
|
|
|
|
include libs/master.lib/keystart[bss].asm
|
2020-09-29 05:02:45 +00:00
|
|
|
|
include libs/master.lib/clip[bss].asm
|
2019-12-30 14:48:17 +00:00
|
|
|
|
public _resident
|
|
|
|
|
_resident dd ?
|
2015-02-19 06:46:36 +00:00
|
|
|
|
|
|
|
|
|
end
|