Subversion Repositories Shiroi

Rev

Rev 22 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 22 Rev 34
Line 1... Line 1...
1
/* $Id: shiroi.h 22 2024-08-31 10:44:32Z nishi $ */
1
/* $Id: shiroi.h 34 2024-09-01 10:13:47Z nishi $ */
2
 
2
 
3
#ifndef __SHIROI_H__
3
#ifndef __SHIROI_H__
4
#define __SHIROI_H__
4
#define __SHIROI_H__
5
 
5
 
6
#include "chips_common.h"
6
#include "chips_common.h"
Line 21... Line 21...
21
	SHIROI_SOUND = 0x10,
21
	SHIROI_SOUND = 0x10,
22
	SHIROI_SOUND_MARK_I,
22
	SHIROI_SOUND_MARK_I,
23
	SHIROI_SYSTEM = 0x20,
23
	SHIROI_SYSTEM = 0x20,
24
	SHIROI_MATH_MARK_I,
24
	SHIROI_MATH_MARK_I,
25
	SHIROI_TEXT_MARK_I,
25
	SHIROI_TEXT_MARK_I,
26
	SHIROI_DEBUG
26
	SHIROI_DEBUG,
-
 
27
	SHIROI_ROMCARD_MARK_I
27
};
28
};
28
 
29
 
29
typedef struct {
30
typedef struct {
30
	uint32_t fb[800 * 600];
31
	uint32_t fb[800 * 600];
31
	union {
32
	union {
Line 64... Line 65...
64
	int latch_addr;
65
	int latch_addr;
65
	int tick;
66
	int tick;
66
} shiroi_debug_t;
67
} shiroi_debug_t;
67
 
68
 
68
typedef struct {
69
typedef struct {
-
 
70
	unsigned char* data;
-
 
71
	int latch_addr;
-
 
72
} shiroi_romcard_t;
-
 
73
 
-
 
74
typedef struct {
69
	union {
75
	union {
70
		shiroi_video_t video;
76
		shiroi_video_t video;
71
		shiroi_sound_t sound;
77
		shiroi_sound_t sound;
72
		shiroi_math_t math;
78
		shiroi_math_t math;
73
		shiroi_text_t text;
79
		shiroi_text_t text;
74
		shiroi_debug_t debug;
80
		shiroi_debug_t debug;
-
 
81
		shiroi_romcard_t romcard;
75
	};
82
	};
76
	shiroi_video_t* videoptr;
83
	shiroi_video_t* videoptr;
77
	shiroi_sound_t* soundptr;
84
	shiroi_sound_t* soundptr;
78
	shiroi_math_t* mathptr;
85
	shiroi_math_t* mathptr;
79
	shiroi_text_t* textptr;
86
	shiroi_text_t* textptr;
80
	shiroi_debug_t* debugptr;
87
	shiroi_debug_t* debugptr;
-
 
88
	shiroi_romcard_t* romcardptr;
81
	int type;
89
	int type;
82
} shiroi_card_t;
90
} shiroi_card_t;
83
 
91
 
84
typedef struct {
92
typedef struct {
85
	uint8_t ram[64 * 1024];
93
	uint8_t ram[64 * 1024];
Line 98... Line 106...
98
shiroi_card_t* shiroi_get_video_card(shiroi_t* shiroi);
106
shiroi_card_t* shiroi_get_video_card(shiroi_t* shiroi);
99
shiroi_card_t* shiroi_get_sound_card(shiroi_t* shiroi);
107
shiroi_card_t* shiroi_get_sound_card(shiroi_t* shiroi);
100
shiroi_card_t* shiroi_get_math_card(shiroi_t* shiroi);
108
shiroi_card_t* shiroi_get_math_card(shiroi_t* shiroi);
101
shiroi_card_t* shiroi_get_text_card(shiroi_t* shiroi);
109
shiroi_card_t* shiroi_get_text_card(shiroi_t* shiroi);
102
shiroi_card_t* shiroi_get_debug_card(shiroi_t* shiroi);
110
shiroi_card_t* shiroi_get_debug_card(shiroi_t* shiroi);
-
 
111
shiroi_card_t* shiroi_get_romcard_card(shiroi_t* shiroi);
103
 
112
 
104
#endif
113
#endif