Subversion Repositories Shiroi

Rev

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

Rev 21 Rev 22
Line 1... Line 1...
1
/* $Id: shiroi.c 21 2024-08-31 09:25:21Z nishi $ */
1
/* $Id: shiroi.c 22 2024-08-31 10:44:32Z 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_video_mk_ii.h"
Line 159... Line 159...
159
				Z80_SET_DATA(shiroi->z80_pins, data);
159
				Z80_SET_DATA(shiroi->z80_pins, data);
160
			} else if(shiroi->z80_pins & Z80_WR) {
160
			} else if(shiroi->z80_pins & Z80_WR) {
161
				if(addr >= 0x8000) {
161
				if(addr >= 0x8000) {
162
					uint8_t data = Z80_GET_DATA(shiroi->z80_pins);
162
					uint8_t data = Z80_GET_DATA(shiroi->z80_pins);
163
					shiroi->ram[addr] = data;
163
					shiroi->ram[addr] = data;
-
 
164
				}else{
-
 
165
					fprintf(stderr, "Illegal write at 0x%X\n", addr);
164
				}
166
				}
165
			}
167
			}
166
		} else if(shiroi->z80_pins & Z80_IORQ) {
168
		} else if(shiroi->z80_pins & Z80_IORQ) {
167
			uint16_t io = Z80_GET_ADDR(shiroi->z80_pins);
169
			uint16_t io = Z80_GET_ADDR(shiroi->z80_pins);
168
			uint16_t addr = io & 0xff;
170
			uint16_t addr = io & 0xff;
169
			uint16_t data = (io >> 8) & 0xff;
171
			uint16_t data = (io >> 8) & 0xff;
170
 
172
 
-
 
173
 
171
			if(shiroi->z80_pins & Z80_M1) {
174
			if(shiroi->z80_pins & Z80_M1) {
172
			} else {
175
			} else {
173
				if(addr == 0x80) printf("%d\n", data);
176
				Z80_SET_DATA(shiroi->z80_pins, 0);
174
				shiroi_video_mk_i(shiroi);
177
				shiroi_video_mk_i(shiroi);
175
				shiroi_video_mk_ii(shiroi);
178
				shiroi_video_mk_ii(shiroi);
176
				shiroi_sound_mk_i(shiroi);
179
				shiroi_sound_mk_i(shiroi);
177
				shiroi_math_mk_i(shiroi);
180
				shiroi_math_mk_i(shiroi);
178
				shiroi_text_mk_i(shiroi);
181
				shiroi_text_mk_i(shiroi);