-
Notifications
You must be signed in to change notification settings - Fork 1
/
rsp.cpp
72 lines (63 loc) · 2.36 KB
/
rsp.cpp
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"
unsigned long GenerateCRC (unsigned char *data, int size);
extern u8* idmem;
extern u8* SP;
extern u8* SP2;
extern u8* rdram;
HWND g_hWnd;
// pInterruptMask = (int*)Audio_Info.MI_INTR_REG;
BYTE *pRDRAM;
BYTE *pDMEM;
BYTE *pIMEM;
DWORD crclist[0x200];
void BeginRSP () {
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;
}
}
}