Subversion Repositories Shiroi

Rev

Rev 10 | Rev 21 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 10 Rev 12
Line 1... Line 1...
1
/* $Id: shiroi.h 10 2024-08-29 01:39:27Z nishi $ */
1
/* $Id: shiroi.h 12 2024-08-29 04:19:08Z 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 20... Line 20...
20
	SHIROI_VIDEO_MARK_II,
20
	SHIROI_VIDEO_MARK_II,
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
};
27
};
27
 
28
 
28
typedef struct {
29
typedef struct {
29
	uint32_t fb[800 * 600];
30
	uint32_t fb[800 * 600];
30
	union {
31
	union {
Line 57... Line 58...
57
	bool caps;
58
	bool caps;
58
	int tick;
59
	int tick;
59
} shiroi_text_t;
60
} shiroi_text_t;
60
 
61
 
61
typedef struct {
62
typedef struct {
-
 
63
	unsigned char latch[4];
-
 
64
	int latch_addr;
-
 
65
	int tick;
-
 
66
} shiroi_debug_t;
-
 
67
 
-
 
68
typedef struct {
62
	union {
69
	union {
63
		shiroi_video_t video;
70
		shiroi_video_t video;
64
		shiroi_sound_t sound;
71
		shiroi_sound_t sound;
65
		shiroi_math_t math;
72
		shiroi_math_t math;
66
		shiroi_text_t text;
73
		shiroi_text_t text;
-
 
74
		shiroi_debug_t debug;
67
	};
75
	};
68
	shiroi_video_t* videoptr;
76
	shiroi_video_t* videoptr;
69
	shiroi_sound_t* soundptr;
77
	shiroi_sound_t* soundptr;
70
	shiroi_math_t* mathptr;
78
	shiroi_math_t* mathptr;
71
	shiroi_text_t* textptr;
79
	shiroi_text_t* textptr;
-
 
80
	shiroi_debug_t* debugptr;
72
	int type;
81
	int type;
73
} shiroi_card_t;
82
} shiroi_card_t;
74
 
83
 
75
typedef struct {
84
typedef struct {
76
	uint8_t ram[64 * 1024];
85
	uint8_t ram[64 * 1024];
Line 88... Line 97...
88
void shiroi_install(shiroi_t* shiroi, int slot, int card);
97
void shiroi_install(shiroi_t* shiroi, int slot, int card);
89
shiroi_card_t* shiroi_get_video_card(shiroi_t* shiroi);
98
shiroi_card_t* shiroi_get_video_card(shiroi_t* shiroi);
90
shiroi_card_t* shiroi_get_sound_card(shiroi_t* shiroi);
99
shiroi_card_t* shiroi_get_sound_card(shiroi_t* shiroi);
91
shiroi_card_t* shiroi_get_math_card(shiroi_t* shiroi);
100
shiroi_card_t* shiroi_get_math_card(shiroi_t* shiroi);
92
shiroi_card_t* shiroi_get_text_card(shiroi_t* shiroi);
101
shiroi_card_t* shiroi_get_text_card(shiroi_t* shiroi);
-
 
102
shiroi_card_t* shiroi_get_debug_card(shiroi_t* shiroi);
93
 
103
 
94
#endif
104
#endif