Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PoroCYon
oidos
Commits
a51a2497
Commit
a51a2497
authored
May 10, 2019
by
PoroCYon
Browse files
make player code portable
parent
c1bb2393
Changes
7
Hide whitespace changes
Inline
Side-by-side
player/oidos.asm
View file @
a51a2497
...
@@ -9,28 +9,33 @@
...
@@ -9,28 +9,33 @@
; Set to 0 if you don't care about Oidos_GenerateMusic preserving registers
; Set to 0 if you don't care about Oidos_GenerateMusic preserving registers
%define OIDOS_SAVE_REGISTERS 1
%define OIDOS_SAVE_REGISTERS 1
%include "
music.asm
"
%include "
platform.inc
"
%include "music.asm"
;; ********** Definitions **********
;; ********** Definitions **********
global
_Oidos_GenerateMusic
global
PUBLIC_FN
(
Oidos_GenerateMusic
)
global
_Oidos_StartMusic
%ifdef WIN32
global
_Oidos_GetPosition
global
PUBLIC_FN
(
Oidos_StartMusic
)
global
PUBLIC_FN
(
Oidos_GetPosition
)
%endif
global
_
Oidos_MusicBuffer
global
PUBLIC_FN
(
Oidos_MusicBuffer
)
global
_
Oidos_TicksPerSecond
global
PUBLIC_FN
(
Oidos_TicksPerSecond
)
global
_
Oidos_MusicLength
global
PUBLIC_FN
(
Oidos_MusicLength
)
global
_
Oidos_WavFileHeader
global
PUBLIC_FN
(
Oidos_WavFileHeader
)
%ifdef WIN32
extern
__imp__waveOutOpen@24
extern
__imp__waveOutOpen@24
extern
__imp__waveOutPrepareHeader@12
extern
__imp__waveOutPrepareHeader@12
extern
__imp__waveOutWrite@12
extern
__imp__waveOutWrite@12
extern
__imp__waveOutGetPosition@12
extern
__imp__waveOutGetPosition@12
%endif
extern
_
Oidos_RandomData
extern
PUBLIC_FN
(
Oidos_RandomData
)
%define SAMPLE_RATE 44100
%define SAMPLE_RATE 44100
%define BASE_FREQ 0.00232970791933
; 440/((2^(1/12))^(9+12*4))/44100*(2*3.14159265358979)
%define BASE_FREQ 0.00232970791933
; 440/((2^(1/12))^(9+12*4))/44100*(2*3.14159265358979)
...
@@ -38,21 +43,21 @@ extern _Oidos_RandomData
...
@@ -38,21 +43,21 @@ extern _Oidos_RandomData
;; ********** Public variables **********
;; ********** Public variables **********
section
tps
rdata
al
ign
=
4
SECT_RDATA
(
tps
)
al
ign
=
4
_
Oidos_TicksPerSecond:
PUBLIC_FN
(
Oidos_TicksPerSecond
)
:
dd
TICKS_PER_SECOND
dd
TICKS_PER_SECOND
section
muslen
rdata
al
ign
=
4
SECT_DATA
(
muslen
)
al
ign
=
4
_
Oidos_MusicLength:
PUBLIC_FN
(
Oidos_MusicLength
)
:
dd
MUSIC_LENGTH
dd
MUSIC_LENGTH
section
MusBuf
bss
al
ign
=
4
SECT_BSS
(
MusBuf
)
al
ign
=
4
_
Oidos_MusicBuffer:
PUBLIC_FN
(
Oidos_MusicBuffer
)
:
.align24
;
.align24
resw
TOTAL_SAMPLES
*
2
resw
TOTAL_SAMPLES
*
2
section
WavFile
rdata
al
ign
=
4
SECT_DATA
(
WavFile
)
al
ign
=
4
_
Oidos_WavFileHeader:
PUBLIC_FN
(
Oidos_WavFileHeader
)
:
db
"RIFF"
db
"RIFF"
dd
36
+
TOTAL_SAMPLES
*
4
dd
36
+
TOTAL_SAMPLES
*
4
db
"WAVE"
db
"WAVE"
...
@@ -68,53 +73,53 @@ _Oidos_WavFileHeader:
...
@@ -68,53 +73,53 @@ _Oidos_WavFileHeader:
;; ********** System structures **********
;; ********** System structures **********
section
WaveForm
rdata
al
ign
=
1
SECT_DATA
(
WaveForm
)
al
ign
=
1
_
WaveFormat:
WaveFormat:
dw
1
,
2
dw
1
,
2
dd
SAMPLE_RATE
dd
SAMPLE_RATE
dd
SAMPLE_RATE
*
4
dd
SAMPLE_RATE
*
4
dw
4
,
16
,
0
dw
4
,
16
,
0
section
WaveHdr
data
al
ign
=
4
SECT_DATA
(
WaveHdr
)
al
ign
=
4
_
WaveHdr:
WaveHdr:
dd
_
Oidos_MusicBuffer
dd
PUBLIC_FN
(
Oidos_MusicBuffer
)
dd
(
TOTAL_SAMPLES
*
4
)
dd
(
TOTAL_SAMPLES
*
4
)
dd
0
,
0
,
0
,
0
,
0
,
0
dd
0
,
0
,
0
,
0
,
0
,
0
section
wavehand
bss
al
ign
=
4
SECT_BSS
(
wavehand
)
al
ign
=
4
_
WaveOutHandle:
WaveOutHandle:
.align16
.align16
:
resd
1
resd
1
section
WaveTime
data
al
ign
=
4
SECT_DATA
(
WaveTime
)
al
ign
=
4
_
WaveTime:
WaveTime:
dd
4
,
0
,
0
,
0
,
0
,
0
,
0
,
0
dd
4
,
0
,
0
,
0
,
0
,
0
,
0
,
0
;; ********** Internal buffers **********
;; ********** Internal buffers **********
section
freqarr
bss
al
ign
=
16
SECT_BSS
(
freqarr
)
al
ign
=
16
PartialArray:
PartialArray:
.align16:
.align16:
resq
10000
*
3
*
2
resq
10000
*
3
*
2
section
sampbuf
bss
al
ign
=
16
SECT_BSS
(
sampbuf
)
al
ign
=
16
SampleBuffer:
SampleBuffer:
.align24:
.align24:
reso
MAX_TOTAL_INSTRUMENT_SAMPLES
reso
MAX_TOTAL_INSTRUMENT_SAMPLES
section
mixbuf
bss
al
ign
=
16
SECT_BSS
(
mixbuf
)
al
ign
=
16
MixingBuffer:
MixingBuffer:
.align24:
.align24:
reso
TOTAL_SAMPLES
reso
TOTAL_SAMPLES
%if NUM_TRACKS_WITH_REVERB > 0
%if NUM_TRACKS_WITH_REVERB > 0
section
revbuf
bss
al
ign
=
16
SECT_BSS
(
revbuf
)
al
ign
=
16
ReverbBuffer:
ReverbBuffer:
.align24:
.align24:
reso
TOTAL_SAMPLES
reso
TOTAL_SAMPLES
section
delbuf
bss
al
ign
=
8
SECT_BSS
(
delbuf
)
al
ign
=
8
DelayBuffer:
DelayBuffer:
.align16:
.align16:
resq
25600
resq
25600
...
@@ -150,7 +155,7 @@ struc params
...
@@ -150,7 +155,7 @@ struc params
;; ********** Internal constants and tables **********
;; ********** Internal constants and tables **********
section
base
data
al
ign
=
16
SECT_DATA
(
base
)
al
ign
=
16
baseptr:
baseptr:
c_oneone:
dq
1.0
,
1.0
c_oneone:
dq
1.0
,
1.0
...
@@ -168,11 +173,11 @@ ReverbParams:
...
@@ -168,11 +173,11 @@ ReverbParams:
dd
REVERB_FILTER_HIGH
,
REVERB_FILTER_LOW
,
REVERB_DAMPEN_HIGH
,
REVERB_DAMPEN_LOW
,
REVERB_VOLUME_LEFT
dd
REVERB_FILTER_HIGH
,
REVERB_FILTER_LOW
,
REVERB_DAMPEN_HIGH
,
REVERB_DAMPEN_LOW
,
REVERB_VOLUME_LEFT
%endif
%endif
ParamsPtr:
dd
_
InstrumentParams
ParamsPtr:
dd
InstrumentParams
TonesPtr:
dd
_
InstrumentTones
TonesPtr:
dd
InstrumentTones
TovelPtr:
dd
_
TrackData
TovelPtr:
dd
TrackData
LengthPtr:
dd
_
NoteLengths
LengthPtr:
dd
NoteLengths
NotePtr:
dd
_
NoteSamples
NotePtr:
dd
NoteSamples
MixingPtr:
dd
0
MixingPtr:
dd
0
%if NUM_TRACKS_WITH_REVERB > 0
%if NUM_TRACKS_WITH_REVERB > 0
...
@@ -180,11 +185,11 @@ ReverbState:
...
@@ -180,11 +185,11 @@ ReverbState:
dq
0.0
,
0.0
,
0.0
,
0.0
dq
0.0
,
0.0
,
0.0
,
0.0
%endif
%endif
section
offset
rdata
al
ign
=
4
SECT_RDATA
(
offset
)
al
ign
=
4
c_timeoffset:
c_timeoffset:
dd
OIDOS_TIMER_OFFSET
*
4
dd
OIDOS_TIMER_OFFSET
*
4
section
tempo
rdata
al
ign
=
4
SECT_RDATA
(
tempo
)
al
ign
=
4
c_ticklength:
c_ticklength:
dd
SAMPLES_PER_TICK
*
4
dd
SAMPLES_PER_TICK
*
4
...
@@ -233,7 +238,7 @@ c_ticklength:
...
@@ -233,7 +238,7 @@ c_ticklength:
;; ********** Instrument calculation **********
;; ********** Instrument calculation **********
section
makeinst
text
al
ign
=
1
SECT_TEXT
(
makeinst
)
al
ign
=
1
MakeInstrument:
MakeInstrument:
mov
PARAMS
,
[
BASE
+
ParamsPtr
]
mov
PARAMS
,
[
BASE
+
ParamsPtr
]
...
@@ -255,7 +260,7 @@ MakeInstrument:
...
@@ -255,7 +260,7 @@ MakeInstrument:
add
RANDOM
,
[
PARAMS
]
; seed
add
RANDOM
,
[
PARAMS
]
; seed
add
PARAMS
,
byte
4
add
PARAMS
,
byte
4
shl
RANDOM
,
2
shl
RANDOM
,
2
add
RANDOM
,
_
Oidos_RandomData
add
RANDOM
,
PUBLIC_FN
(
Oidos_RandomData
)
GETRANDOM
; subtone
GETRANDOM
; subtone
fabs
fabs
...
@@ -437,7 +442,7 @@ MakeInstrument:
...
@@ -437,7 +442,7 @@ MakeInstrument:
;; ********** Track mixing **********
;; ********** Track mixing **********
section
makechan
text
al
ign
=
1
SECT_TEXT
(
makechan
)
al
ign
=
1
MakeChannel:
MakeChannel:
mov
SAMPLE
,
SampleBuffer
mov
SAMPLE
,
SampleBuffer
push
byte
0
push
byte
0
...
@@ -589,8 +594,8 @@ MakeChannel:
...
@@ -589,8 +594,8 @@ MakeChannel:
;; ********** Main **********
;; ********** Main **********
section
synth
text
al
ign
=
1
SECT_TEXT
(
synth
)
al
ign
=
1
_
Oidos_GenerateMusic:
PUBLIC_FN
(
Oidos_GenerateMusic
)
:
%if OIDOS_SAVE_REGISTERS
%if OIDOS_SAVE_REGISTERS
pusha
pusha
%endif
%endif
...
@@ -615,7 +620,7 @@ _Oidos_GenerateMusic:
...
@@ -615,7 +620,7 @@ _Oidos_GenerateMusic:
%if REVERB_MIN_DELAY != 0
%if REVERB_MIN_DELAY != 0
sub
eax
,
REVERB_MIN_DELAY
sub
eax
,
REVERB_MIN_DELAY
%endif
%endif
mul
dword
[
_
Oidos_RandomData
+
REVERB_RANDOMSEED
*
4
+
ecx
*
4
]
mul
dword
[
PUBLIC_FN
(
Oidos_RandomData
)
+
REVERB_RANDOMSEED
*
4
+
ecx
*
4
]
cmp
edx
,
esi
cmp
edx
,
esi
jae
short
.skip
jae
short
.skip
...
@@ -692,7 +697,7 @@ _Oidos_GenerateMusic:
...
@@ -692,7 +697,7 @@ _Oidos_GenerateMusic:
fcmovnb
st0
,
st1
fcmovnb
st0
,
st1
fchs
fchs
fistp
word
[
_
Oidos_MusicBuffer
+
ebx
*
2
]
fistp
word
[
PUBLIC_FN
(
Oidos_MusicBuffer
)
+
ebx
*
2
]
add
ebx
,
byte
1
add
ebx
,
byte
1
cmp
ebx
,
TOTAL_SAMPLES
*
2
cmp
ebx
,
TOTAL_SAMPLES
*
2
...
@@ -704,7 +709,7 @@ _Oidos_GenerateMusic:
...
@@ -704,7 +709,7 @@ _Oidos_GenerateMusic:
%endif
%endif
ret
ret
section
rfilter
text
al
ign
=
1
SECT_TEXT
(
rfilter
)
al
ign
=
1
ReverbFilter:
ReverbFilter:
%macro FILTER 0
%macro FILTER 0
; Basic low-pass filter
; Basic low-pass filter
...
@@ -731,40 +736,43 @@ ReverbFilter:
...
@@ -731,40 +736,43 @@ ReverbFilter:
ret
ret
;
; ********** Play **********
; ********** Play **********
section
startsnd
text
al
ign
=
1
%ifdef WIN32
_Oidos_StartMusic:
SECT_TEXT
(
startsnd
)
al
ign
=
1
PUBLIC_FN
(
Oidos_StartMusic
):
; Start music
; Start music
push
byte
0
push
byte
0
push
byte
0
push
byte
0
push
byte
0
push
byte
0
push
_
WaveFormat
push
WaveFormat
push
byte
-
1
push
byte
-
1
push
_
WaveOutHandle
push
WaveOutHandle
call
[
__imp__waveOutOpen@24
]
call
[
__imp__waveOutOpen@24
]
push
byte
32
; sizeof(WAVEHDR)
push
byte
32
; sizeof(WAVEHDR)
push
_
WaveHdr
push
WaveHdr
push
dword
[
_
WaveOutHandle
]
; waveOutHandle
push
dword
[
WaveOutHandle
]
; waveOutHandle
call
[
__imp__waveOutPrepareHeader@12
]
call
[
__imp__waveOutPrepareHeader@12
]
push
byte
32
; sizeof(WAVEHDR)
push
byte
32
; sizeof(WAVEHDR)
push
_
WaveHdr
push
WaveHdr
push
dword
[
_
WaveOutHandle
]
push
dword
[
WaveOutHandle
]
call
[
__imp__waveOutWrite@12
]
call
[
__imp__waveOutWrite@12
]
ret
ret
section
getpos
text
al
ign
=
1
SECT_TEXT
(
getpos
)
al
ign
=
1
_
Oidos_GetPosition:
PUBLIC_FN
(
Oidos_GetPosition
)
:
push
byte
32
; sizeof(MMTIME)
push
byte
32
; sizeof(MMTIME)
push
_
WaveTime
push
WaveTime
push
dword
[
_
WaveOutHandle
]
push
dword
[
WaveOutHandle
]
call
[
__imp__waveOutGetPosition@12
]
call
[
__imp__waveOutGetPosition@12
]
fild
dword
[
_
WaveTime
+
4
]
fild
dword
[
WaveTime
+
4
]
%if OIDOS_TIMER_OFFSET>0
%if OIDOS_TIMER_OFFSET>0
fiadd
dword
[
c_timeoffset
]
fiadd
dword
[
c_timeoffset
]
%endif
%endif
fidiv
dword
[
c_ticklength
]
fidiv
dword
[
c_ticklength
]
ret
ret
%endif
player/oidos.h
View file @
a51a2497
#ifndef _OIDOS_H_
#ifndef _OIDOS_H_
#define _OIDOS_H_
#define _OIDOS_H_
#include <stdint.h>
struct
sample
{
struct
sample
{
short
left
,
right
;
short
left
,
right
;
};
};
#ifdef __cplusplus
extern
"C"
{
extern
"C"
{
#endif
// Fill the block of random data used by Oidos.
// Fill the block of random data used by Oidos.
// Must be called before Oidos_GenerateMusic.
// Must be called before Oidos_GenerateMusic.
void
Oidos_FillRandomData
();
void
Oidos_FillRandomData
();
...
@@ -15,6 +19,9 @@ extern "C" {
...
@@ -15,6 +19,9 @@ extern "C" {
// and Oidos_StartMusic can be called.
// and Oidos_StartMusic can be called.
void
Oidos_GenerateMusic
();
void
Oidos_GenerateMusic
();
// On Linux, there are too many sound APIs to choose from,
// so I can't just force anyone to use a specific one. -pcy
#ifdef WIN32
// Play the music
// Play the music
void
Oidos_StartMusic
();
void
Oidos_StartMusic
();
...
@@ -22,6 +29,7 @@ extern "C" {
...
@@ -22,6 +29,7 @@ extern "C" {
// Use this function as the timer for the visuals in your intro.
// Use this function as the timer for the visuals in your intro.
// Returned value is measured in music ticks (pattern rows).
// Returned value is measured in music ticks (pattern rows).
float
Oidos_GetPosition
();
float
Oidos_GetPosition
();
#endif
// Buffer containing the music.
// Buffer containing the music.
extern
struct
sample
Oidos_MusicBuffer
[];
extern
struct
sample
Oidos_MusicBuffer
[];
...
@@ -41,11 +49,10 @@ extern "C" {
...
@@ -41,11 +49,10 @@ extern "C" {
// Can also be useful as a 3D noise texture.
// Can also be useful as a 3D noise texture.
#define NOISESIZE 64
#define NOISESIZE 64
extern
unsigned
Oidos_RandomData
[
NOISESIZE
*
NOISESIZE
*
NOISESIZE
];
extern
unsigned
Oidos_RandomData
[
NOISESIZE
*
NOISESIZE
*
NOISESIZE
];
#ifdef __cplusplus
};
};
// If you are using D3D11, you can re-use this GUID.
#ifdef GUID_DEFINED
extern
GUID
ID3D11Texture2D_ID
;
#endif
#endif
extern
uint32_t
ID3D11Texture2D_ID
[
4
];
#endif
#endif
player/oidos.inc
View file @
a51a2497
;
See
oidos
.
h
for
documentation
.
;
See
oidos
.
h
for
documentation
.
%
include
"platform.inc"
;
Functions
;
Functions
extern
_
Oidos_FillRandomData
extern
PUBLIC_FN
(
Oidos_FillRandomData
)
extern
_
Oidos_GenerateMusic
extern
PUBLIC_FN
(
Oidos_GenerateMusic
)
extern
_
Oidos_StartMusic
extern
PUBLIC_FN
(
Oidos_StartMusic
)
extern
_
Oidos_GetPosition
extern
PUBLIC_FN
(
Oidos_GetPosition
)
;
Variables
;
Variables
extern
_
Oidos_MusicBuffer
extern
PUBLIC_FN
(
Oidos_MusicBuffer
)
extern
_
Oidos_TicksPerSecond
extern
PUBLIC_FN
(
Oidos_TicksPerSecond
)
extern
_
Oidos_MusicLength
extern
PUBLIC_FN
(
Oidos_MusicLength
)
extern
_
Oidos_WavFileHeader
extern
PUBLIC_FN
(
Oidos_WavFileHeader
)
extern
_
Oidos_RandomData
extern
PUBLIC_FN
(
Oidos_RandomData
)
;
GUID
;
GUID
extern
?
ID3D11Texture2D_ID
@@
3
U_GUID
@@
A
extern
ID3D11Texture2D_ID
;
vim
:
set
ft
=
asm
player/platform.inc
0 → 100644
View file @
a51a2497
%
ifdef
LINUX
%
define
PUBLIC_FN
(
n
)
n
%
else
%
define
PUBLIC_FN
(
n
)
_
%+
n
%
endif
%
ifdef
WIN32
%
define
ID3D11Texture2D_ID
?
ID3D11Texture2D_ID
@@
3
U_GUID
@@
A
%
endif
%
ifdef
LINUX
%
define
SECT_BSS
(
n
)
section
.
bss
.
oidos
.
%+
n
nobits
alloc
noexec
write
%
define
SECT_DATA
(
n
)
section
.
data
.
oidos
.
%+
n
progbits
alloc
noexec
write
%
define
SECT_RDATA
(
n
)
section
.
rodata
.
oidos
.
%+
n
progbits
alloc
noexec
nowrite
%
define
SECT_TEXT
(
n
)
section
.
text
.
oidos
.
%+
n
progbits
alloc
exec
nowrite
%
else
%
define
SECT_BSS
(
n
)
section
.
oidos
.
%+
n
bss
%
define
SECT_DATA
(
n
)
section
.
oidos
.
%+
n
data
%
define
SECT_RDATA
(
n
)
section
.
oidos
.
%+
n
rdata
%
define
SECT_TEXT
(
n
)
section
.
oidos
.
%+
n
code
%
endif
player/play.asm
View file @
a51a2497
; Stand-alone executable for playing an Oidos song.
; Stand-alone executable for playing an Oidos song.
; (Windows-only)
%include "oidos.inc"
%include "oidos.inc"
global
_main
global
_main
...
...
player/play.c
0 → 100644
View file @
a51a2497
#include <unistd.h>
#include "oidos.h"
int
main
()
{
Oidos_FillRandomData
();
Oidos_GenerateMusic
();
#ifndef NO_WAV_HEADER
write
(
STDOUT_FILENO
,
Oidos_WavFileHeader
,
sizeof
(
Oidos_WavFileHeader
));
#endif
write
(
STDOUT_FILENO
,
Oidos_MusicBuffer
,
Oidos_WavFileHeader
[
10
]);
}
player/random.asm
View file @
a51a2497
; Block of random data used by Oidos.
; Block of random data used by Oidos.
; Can also be useful as a 3D noise texture.
; Can also be useful as a 3D noise texture.
global
_Oidos_FillRandomData
%include "platform.inc"
global
_Oidos_RandomData
global
?ID3D11Texture2D_ID@@3U_GUID@@A
global
PUBLIC_FN
(
Oidos_FillRandomData
)
global
PUBLIC_FN
(
Oidos_RandomData
)
global
ID3D11Texture2D_ID
%define NOISESIZE 64
%define NOISESIZE 64
section
guid
data
al
ign
=
4
SECT_DATA
(
d3dtex
)
al
ign
=
4
; If you are using D3D11, you can re-use this GUID.
; If you are using D3D11, you can re-use this GUID.
?ID3D11Texture2D_ID@@3U_GUID@@A:
; It's used as a rng seed, so this can't simply be thrown out on Linux -pcy
ID3D11Texture2D_ID:
db
0xF2
,
0xAA
,
0x15
,
0x6F
,
0x08
,
0xD2
,
0x89
,
0x4E
,
0x9A
,
0xB4
,
0x48
,
0x95
,
0x35
,
0xD3
,
0x4F
,
0x9C
db
0xF2
,
0xAA
,
0x15
,
0x6F
,
0x08
,
0xD2
,
0x89
,
0x4E
,
0x9A
,
0xB4
,
0x48
,
0x95
,
0x35
,
0xD3
,
0x4F
,
0x9C
section
randdat
a
bss
al
ign
=
4
SECT_BSS
(
rand
om
dat
)
al
ign
=
4
_Oidos_RandomData:
PUBLIC_FN
(
Oidos_RandomData
):
.align16
resd
NOISESIZE
*
NOISESIZE
*
NOISESIZE
resd
NOISESIZE
*
NOISESIZE
*
NOISESIZE
section
fillrand
text
al
ign
=
1
SECT_TEXT
(
fillrand
om
)
al
ign
=
1
_
Oidos_FillRandomData:
PUBLIC_FN
(
Oidos_FillRandomData
)
:
mov
eax
,
_
Oidos_RandomData
mov
eax
,
PUBLIC_FN
(
Oidos_RandomData
)
.loop:
.loop:
mov
edx
,
?
ID3D11Texture2D_ID
@@3U_GUID@@A
mov
edx
,
ID3D11Texture2D_ID
mov
ecx
,
[
edx
]
mov
ecx
,
[
edx
]
ror
ecx
,
cl
ror
ecx
,
cl
...
@@ -49,6 +51,6 @@ _Oidos_FillRandomData:
...
@@ -49,6 +51,6 @@ _Oidos_FillRandomData:
xor
[
eax
],
ecx
xor
[
eax
],
ecx
add
eax
,
byte
4
add
eax
,
byte
4
cmp
eax
,
_
Oidos_RandomData
+
NOISESIZE
*
NOISESIZE
*
NOISESIZE
*
4
cmp
eax
,
PUBLIC_FN
(
Oidos_RandomData
)
+
NOISESIZE
*
NOISESIZE
*
NOISESIZE
*
4