- Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrsp.cpp
More file actions
Latest commit
72 lines (63 loc) · 2.36 KB
/
Copy pathrsp.cpp
File metadata and controls
72 lines (63 loc) · 2.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/****************************************************************************
* *
* Copyright (C) 2000, Eclipse Productions *
* *
* Offical Source code of the Apollo Project. DO NOT DISTRIBUTE! Any *
* unauthorized distribution of these files in any way, shape, or form *
* is a direct infringement on the copyrights entitled to Eclipse *
* Productions and you will be prosecuted to the fullest extent of *
* the law. Have a nice day... ^_^ *
* *
****************************************************************************/
/****************************************************************************
* rsp.cpp - Reality Signal Processor Emulation *
* *
* Revision History: *
* *
* Name Date Comment *
* ------------------------------------------------------------- *
* Azimer 01-05-01 Initial Version *
* *
****************************************************************************/
/****************************************************************************
* *
* Notes: *
* *
* *
****************************************************************************/
#include<windows.h>
#include<windowsx.h>
#include<commctrl.h>// For status window
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include"WinMain.h"
#include"EmuMain.h"
#include"resource.h"
unsignedlongGenerateCRC (unsignedchar *data, int size);
externu8* idmem;
externu8* SP;
externu8* SP2;
externu8* rdram;
HWND g_hWnd;
// pInterruptMask = (int*)Audio_Info.MI_INTR_REG;
BYTE *pRDRAM;
BYTE *pDMEM;
BYTE *pIMEM;
DWORD crclist[0x200];
voidBeginRSP () {
pRDRAM = rdram;
pIMEM = idmem+0x1000;
pDMEM = idmem;
g_hWnd = GhWnd;
for (int x=0; x < 0x200; x++) {
if (crclist[x] == 0) {
crclist[x] = GenerateCRC ((idmem+0x1000), 0x1000);
Debug (0, "RSP Sound UCode CRC: %08X", crclist[x]);
return;
} else {
if (crclist[x] == GenerateCRC ((idmem+0x1000), 0x1000))
return;
}
}
}