aboutsummaryrefslogtreecommitdiff
path: root/source/seta.h
blob: 339ba05f185511235a5dd58e59fa83d408580b20 (plain)
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
#include "../copyright"

#ifndef NO_SETA
#ifndef _seta_h
#define _seta_h

#include "port.h"

#define ST_010 0x01
#define ST_011 0x02
#define ST_018 0x03

uint8_t S9xGetSetaDSP(uint32_t Address);
void S9xSetSetaDSP(uint8_t byte, uint32_t Address);
uint8_t S9xGetST018(uint32_t Address);
void S9xSetST018(uint8_t Byte, uint32_t Address);

uint8_t S9xGetST010(uint32_t Address);
void S9xSetST010(uint32_t Address, uint8_t Byte);
uint8_t S9xGetST011(uint32_t Address);
void S9xSetST011(uint32_t Address, uint8_t Byte);

extern void (*SetSETA)(uint32_t, uint8_t);
extern uint8_t(*GetSETA)(uint32_t);

typedef struct
{
   uint8_t input_params [16];
   uint8_t output_params[16];
   uint8_t op_reg;
   uint8_t execute;
   bool    control_enable;
} ST010_Regs;

typedef struct
{
   bool     waiting4command;
   uint8_t  status;
   uint8_t  command;
   uint32_t in_count;
   uint32_t in_index;
   uint32_t out_count;
   uint32_t out_index;
   uint8_t  parameters [512];
   uint8_t  output     [512];
} ST011_Regs;

typedef struct
{
   bool     waiting4command;
   uint8_t  status;
   uint8_t  part_command;
   uint8_t  pass;
   uint32_t command;
   uint32_t in_count;
   uint32_t in_index;
   uint32_t out_count;
   uint32_t out_index;
   uint8_t  parameters [512];
   uint8_t  output     [512];
} ST018_Regs;

#endif
#endif