-
Notifications
You must be signed in to change notification settings - Fork 1
/
asic.c
47 lines (30 loc) · 1.28 KB
/
asic.c
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
#include "asic.h"
#include "config.h"
#include "z80.h"
#include "plateform.h"
#define ASIC_UNUSED_RAM_DATA 0x0b0
BOOL InitASIC(core_crocods_t *core) {
core->ASIC_Data.ASIC_Ram = NULL;
/* allocate ASIC Ram */
core->ASIC_Data.ASIC_Ram = (unsigned char *)malloc(16384);
if (core->ASIC_Data.ASIC_Ram==NULL)
return FALSE;
memset(core->ASIC_Data.ASIC_Ram, ASIC_UNUSED_RAM_DATA, 16384);
core->ASIC_Data.ASIC_Ram_Adjusted = core->ASIC_Data.ASIC_Ram-(unsigned long)0x04000;
/* Initialise cartridge pages */
// ASIC_InitCart();
/* initialise a table of colours and grey-scales. Given a ASIC
colour, this will give the new colour to pass to the render part
to give the appearance of a colour or grey-scale/paper-white display */
// ASIC_InitialiseMonitorColourModes();
/* initial analogue inputs */
core->ASIC_Data.AnalogueInputs[0] = 0x03f;
core->ASIC_Data.AnalogueInputs[1] = 0x03f;
core->ASIC_Data.AnalogueInputs[2] = 0x03f;
core->ASIC_Data.AnalogueInputs[3] = 0x03f;
core->ASIC_Data.AnalogueInputs[4] = 0x03f;
core->ASIC_Data.AnalogueInputs[5] = 0x000;
core->ASIC_Data.AnalogueInputs[6] = 0x03f;
core->ASIC_Data.AnalogueInputs[7] = 0x000;
return TRUE;
}