Subversion Repositories Shiroi

Rev

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

Rev 3 Rev 7
Line 1... Line 1...
1
/* $Id: shiroi.c 3 2024-08-28 09:19:04Z nishi $ */
1
/* $Id: shiroi.c 7 2024-08-28 14:02:52Z nishi $ */
2
 
2
 
3
#include "shiroi.h"
3
#include "shiroi.h"
4
 
4
 
5
#include "card/shiroi_video_mk_i.h"
5
#include "card/shiroi_video_mk_i.h"
-
 
6
#include "card/shiroi_video_mk_ii.h"
6
#include "card/shiroi_sound_mk_i.h"
7
#include "card/shiroi_sound_mk_i.h"
7
#include "card/shiroi_math_mk_i.h"
8
#include "card/shiroi_math_mk_i.h"
8
#include "card/shiroi_text_mk_i.h"
9
#include "card/shiroi_text_mk_i.h"
9
 
10
 
10
#include <stdio.h>
11
#include <stdio.h>
Line 66... Line 67...
66
}
67
}
67
 
68
 
68
void shiroi_install(shiroi_t* shiroi, int slot, int card) {
69
void shiroi_install(shiroi_t* shiroi, int slot, int card) {
69
	if(card == SHIROI_VIDEO_MARK_I) {
70
	if(card == SHIROI_VIDEO_MARK_I) {
70
		shiroi_video_mk_i_install(shiroi, slot);
71
		shiroi_video_mk_i_install(shiroi, slot);
-
 
72
	} else if(card == SHIROI_VIDEO_MARK_II) {
-
 
73
		shiroi_video_mk_ii_install(shiroi, slot);
71
	} else if(card == SHIROI_SOUND_MARK_I) {
74
	} else if(card == SHIROI_SOUND_MARK_I) {
72
		shiroi_sound_mk_i_install(shiroi, slot);
75
		shiroi_sound_mk_i_install(shiroi, slot);
73
	} else if(card == SHIROI_MATH_MARK_I) {
76
	} else if(card == SHIROI_MATH_MARK_I) {
74
		shiroi_math_mk_i_install(shiroi, slot);
77
		shiroi_math_mk_i_install(shiroi, slot);
75
	} else if(card == SHIROI_TEXT_MARK_I) {
78
	} else if(card == SHIROI_TEXT_MARK_I) {
Line 111... Line 114...
111
			uint16_t data = (io >> 8) & 0xff;
114
			uint16_t data = (io >> 8) & 0xff;
112
 
115
 
113
			if(shiroi->z80_pins & Z80_M1) {
116
			if(shiroi->z80_pins & Z80_M1) {
114
			} else {
117
			} else {
115
				shiroi_video_mk_i(shiroi);
118
				shiroi_video_mk_i(shiroi);
-
 
119
				shiroi_video_mk_ii(shiroi);
116
				shiroi_sound_mk_i(shiroi);
120
				shiroi_sound_mk_i(shiroi);
117
				shiroi_math_mk_i(shiroi);
121
				shiroi_math_mk_i(shiroi);
118
				shiroi_text_mk_i(shiroi);
122
				shiroi_text_mk_i(shiroi);
119
			}
123
			}
120
		}
124
		}
121
 
125
 
122
		shiroi_video_mk_i_tick(shiroi);
126
		shiroi_video_mk_i_tick(shiroi);
-
 
127
		shiroi_video_mk_ii_tick(shiroi);
123
		shiroi_sound_mk_i_tick(shiroi);
128
		shiroi_sound_mk_i_tick(shiroi);
124
		shiroi_math_mk_i_tick(shiroi);
129
		shiroi_math_mk_i_tick(shiroi);
125
		shiroi_text_mk_i_tick(shiroi);
130
		shiroi_text_mk_i_tick(shiroi);
126
	}
131
	}
127
}
132
}