Subversion Repositories Shiroi

Rev

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

Rev 6 Rev 7
Line 1... Line 1...
1
/* $Id: shiroi.h 6 2024-08-28 10:29:32Z nishi $ */
1
/* $Id: shiroi.h 7 2024-08-28 14:02:52Z 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"
7
#include "z80.h"
7
#include "z80.h"
8
#include "ay38910.h"
8
#include "ay38910.h"
9
#include "tms9918.h"
9
#include "tms9918.h"
-
 
10
#include "mc6847.h"
10
 
11
 
11
#include <stdint.h>
12
#include <stdint.h>
12
#include <stdbool.h>
13
#include <stdbool.h>
13
 
14
 
14
#define SHIROI_IO_PORTS 3
15
#define SHIROI_IO_PORTS 3
15
 
16
 
16
enum SHIROI_CARD {
17
enum SHIROI_CARD {
17
	SHIROI_VIDEO = 0x00,
18
	SHIROI_VIDEO = 0x00,
18
	SHIROI_VIDEO_MARK_I,
19
	SHIROI_VIDEO_MARK_I,
-
 
20
	SHIROI_VIDEO_MARK_II,
19
	SHIROI_SOUND = 0x10,
21
	SHIROI_SOUND = 0x10,
20
	SHIROI_SOUND_MARK_I,
22
	SHIROI_SOUND_MARK_I,
21
	SHIROI_SYSTEM = 0x20,
23
	SHIROI_SYSTEM = 0x20,
22
	SHIROI_MATH_MARK_I,
24
	SHIROI_MATH_MARK_I,
23
	SHIROI_TEXT_MARK_I
25
	SHIROI_TEXT_MARK_I
24
};
26
};
25
 
27
 
26
typedef struct {
28
typedef struct {
27
	uint32_t* fb;
29
	uint32_t fb[800 * 600];
28
	union {
30
	union {
29
		VrEmuTms9918* vdp;
31
		VrEmuTms9918* vdp;
-
 
32
		mc6847_t mc6847;
30
	};
33
	};
-
 
34
	uint16_t vram_addr;
-
 
35
	uint8_t vram[64 * 1024];
31
	int width;
36
	int width;
32
	int height;
37
	int height;
33
	int tick;
38
	int tick;
34
} shiroi_video_t;
39
} shiroi_video_t;
35
 
40