Subversion Repositories Shiroi

Rev

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

Rev 1 Rev 3
Line 1... Line 1...
1
/* $Id: shiroi.h 1 2024-08-28 08:10:28Z nishi $ */
1
/* $Id: shiroi.h 3 2024-08-28 09:19:04Z 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 16... Line 16...
16
enum SHIROI_CARD {
16
enum SHIROI_CARD {
17
	SHIROI_VIDEO = 0x00,
17
	SHIROI_VIDEO = 0x00,
18
	SHIROI_VIDEO_MARK_I,
18
	SHIROI_VIDEO_MARK_I,
19
	SHIROI_SOUND = 0x10,
19
	SHIROI_SOUND = 0x10,
20
	SHIROI_SOUND_MARK_I,
20
	SHIROI_SOUND_MARK_I,
21
	SHIROI_MATH = 0x20,
21
	SHIROI_SYSTEM = 0x20,
22
	SHIROI_MATH_MARK_I
22
	SHIROI_MATH_MARK_I,
-
 
23
	SHIROI_TEXT_MARK_I
23
};
24
};
24
 
25
 
25
typedef struct {
26
typedef struct {
26
	uint32_t* fb;
27
	uint32_t* fb;
27
	union {
28
	union {
Line 45... Line 46...
45
	};
46
	};
46
	int tick;
47
	int tick;
47
} shiroi_math_t;
48
} shiroi_math_t;
48
 
49
 
49
typedef struct {
50
typedef struct {
-
 
51
	unsigned char key;
-
 
52
	int tick;
-
 
53
} shiroi_text_t;
-
 
54
 
-
 
55
typedef struct {
50
	union {
56
	union {
51
		shiroi_video_t video;
57
		shiroi_video_t video;
52
		shiroi_sound_t sound;
58
		shiroi_sound_t sound;
53
		shiroi_math_t math;
59
		shiroi_math_t math;
-
 
60
		shiroi_text_t text;
54
	};
61
	};
55
	shiroi_video_t* videoptr;
62
	shiroi_video_t* videoptr;
56
	shiroi_sound_t* soundptr;
63
	shiroi_sound_t* soundptr;
57
	shiroi_math_t* mathptr;
64
	shiroi_math_t* mathptr;
-
 
65
	shiroi_text_t* textptr;
58
	int type;
66
	int type;
59
} shiroi_card_t;
67
} shiroi_card_t;
60
 
68
 
61
typedef struct {
69
typedef struct {
62
	uint8_t ram[64 * 1024];
70
	uint8_t ram[64 * 1024];
Line 72... Line 80...
72
void shiroi_loop(shiroi_t* shiroi);
80
void shiroi_loop(shiroi_t* shiroi);
73
void shiroi_install(shiroi_t* shiroi, int slot, int card);
81
void shiroi_install(shiroi_t* shiroi, int slot, int card);
74
shiroi_card_t* shiroi_get_video_card(shiroi_t* shiroi);
82
shiroi_card_t* shiroi_get_video_card(shiroi_t* shiroi);
75
shiroi_card_t* shiroi_get_sound_card(shiroi_t* shiroi);
83
shiroi_card_t* shiroi_get_sound_card(shiroi_t* shiroi);
76
shiroi_card_t* shiroi_get_math_card(shiroi_t* shiroi);
84
shiroi_card_t* shiroi_get_math_card(shiroi_t* shiroi);
-
 
85
shiroi_card_t* shiroi_get_text_card(shiroi_t* shiroi);
77
 
86
 
78
#endif
87
#endif