Skip to content

Commit

Permalink
[C decompilation] [th02/op] [th03/op] [th04/op] Frame delay #1
Browse files Browse the repository at this point in the history
  • Loading branch information
nmlgc committed Mar 4, 2015
1 parent a8384c9 commit 404044f
Show file tree
Hide file tree
Showing 11 changed files with 56 additions and 11 deletions.
12 changes: 11 additions & 1 deletion Makefile.mak
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ bin\th01\fuuin.exe: bin\th01\fuuin.obj th01\fuuin_11.c th01\fuuin_13.c
$**
|

bin\th02\op.exe: bin\th02\op.obj th02\op_03.c th02\op_04.c th02\op_05.c th02\op_06.c
bin\th02\op.exe: bin\th02\op.obj th02\op_02.c th02\op_03.c th02\op_04.c th02\op_05.c th02\op_06.c
$(CC) $(CFLAGS) -ml -Z -DGAME=2 -nbin\th02\ -eOP.EXE @&&|
$**
|
Expand All @@ -48,3 +48,13 @@ bin\th02\maine.exe: bin\th02\maine.obj th02\maine_03.c th02\maine_04.c th02\main
$(CC) $(CFLAGS) -ml -3 -Z -DGAME=2 -nbin\th02\ -eMAINE.EXE @&&|
$**
|

bin\th03\op.exe: bin\th03\op.obj th03\op_02.c
$(CC) $(CFLAGS) -ml -DGAME=3 -nbin\th03\ -eOP.EXE @&&|
$**
|

bin\th04\op.exe: bin\th04\op.obj th04\op_02.c
$(CC) $(CFLAGS) -ml -DGAME=4 -nbin\th04\ -eOP.EXE @&&|
$**
|
5 changes: 3 additions & 2 deletions th02/hardware/frame_delay_.asm
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
frame_delay_ proc
public FRAME_DELAY_2
frame_delay_2 proc
frame_delay_macro
frame_delay_ endp
frame_delay_2 endp
5 changes: 5 additions & 0 deletions th02/hardware/frmdely1.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
void pascal frame_delay(int frames)
{
vsync_reset1();
while(vsync_Count1 < frames) {}
}
5 changes: 5 additions & 0 deletions th02/hardware/frmdely2.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
void pascal frame_delay_2(int frames)
{
vsync_reset1();
while(vsync_Count1 < frames) {}
}
8 changes: 8 additions & 0 deletions th02/op_02.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/* ReC98
* -----
* Code segment #2 of TH02's OP.EXE
*/

#include "th02/th02.h"

#include "th02/hardware/frmdely1.c"
1 change: 1 addition & 0 deletions th02/th02.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ extern input_t input;

void input_sense(void);
void pascal frame_delay(int frames);
void pascal frame_delay_2(int frames);

// Sound
#include "libs\kaja\kaja.h"
Expand Down
6 changes: 3 additions & 3 deletions th02_op.asm
Original file line number Diff line number Diff line change
Expand Up @@ -2347,14 +2347,14 @@ include th02/hardware/snd_kaja_func.asm
cmp _snd_active, 0
jnz short loc_B232
push 64h ; 'd'
nopcall frame_delay_
nopcall frame_delay_2
pop bp
retf
; ---------------------------------------------------------------------------

loc_B232:
push 1
nopcall frame_delay_
nopcall frame_delay_2
mov ah, KAJA_GET_SONG_MEASURE
cmp _snd_midi_active, 1
jz short loc_B246
Expand All @@ -2377,7 +2377,7 @@ loc_B24B:
; ---------------------------------------------------------------------------

include th02/hardware/snd_se.asm
include th02/hardware/frame_delay.asm
extern FRAME_DELAY:proc
op_02_TEXT ends

; ===========================================================================
Expand Down
8 changes: 8 additions & 0 deletions th03/op_02.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/* ReC98
* -----
* Code segment #2 of TH02's OP.EXE
*/

#include <master.h>

#include "th02/hardware/frmdely2.c"
5 changes: 2 additions & 3 deletions th03_op.asm
Original file line number Diff line number Diff line change
Expand Up @@ -2166,7 +2166,7 @@ sub_A899 proc near
mov dx, 0A6h ; 'ヲ'
out dx, al
push 1
call frame_delay_
call frame_delay_2
pop bp
retn
sub_A899 endp
Expand Down Expand Up @@ -6245,8 +6245,7 @@ loc_CB7D:
retf
sub_CB68 endp

include th02/hardware/frame_delay_.asm
db 0
extern FRAME_DELAY_2:proc
op_02_TEXT ends

.data
Expand Down
8 changes: 8 additions & 0 deletions th04/op_02.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/* ReC98
* -----
* Code segment #2 of TH02's OP.EXE
*/

#include <master.h>

#include "th02/hardware/frmdely2.c"
4 changes: 2 additions & 2 deletions th04_op.asm
Original file line number Diff line number Diff line change
Expand Up @@ -3438,7 +3438,7 @@ sub_C244 proc near
mov dx, 0A6h ; 'ヲ'
out dx, al
push 1
call frame_delay_
call frame_delay_2
pop bp
retn
sub_C244 endp
Expand Down Expand Up @@ -7492,7 +7492,7 @@ loc_E6D4:
retf
sub_E6D0 endp

include th02/hardware/frame_delay_.asm
extern FRAME_DELAY_2:proc

op_02_TEXT ends

Expand Down

0 comments on commit 404044f

Please sign in to comment.