Subversion Repositories Shiroi

Rev

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

Rev 22 Rev 32
Line 1... Line 1...
1
/* $Id: shiroi.c 22 2024-08-31 10:44:32Z nishi $ */
1
/* $Id: shiroi.c 32 2024-09-01 08:51:40Z 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{
164
				} else {
165
					fprintf(stderr, "Illegal write at 0x%X\n", addr);
165
					fprintf(stderr, "Illegal write at 0x%X\n", addr);
166
				}
166
				}
167
			}
167
			}
168
		} else if(shiroi->z80_pins & Z80_IORQ) {
168
		} else if(shiroi->z80_pins & Z80_IORQ) {
169
			uint16_t io = Z80_GET_ADDR(shiroi->z80_pins);
169
			uint16_t io = Z80_GET_ADDR(shiroi->z80_pins);
170
			uint16_t addr = io & 0xff;
170
			uint16_t addr = io & 0xff;
171
			uint16_t data = (io >> 8) & 0xff;
171
			uint16_t data = (io >> 8) & 0xff;
172
 
172
 
173
 
-
 
174
			if(shiroi->z80_pins & Z80_M1) {
173
			if(shiroi->z80_pins & Z80_M1) {
175
			} else {
174
			} else {
176
				Z80_SET_DATA(shiroi->z80_pins, 0);
175
				Z80_SET_DATA(shiroi->z80_pins, 0);
177
				shiroi_video_mk_i(shiroi);
176
				shiroi_video_mk_i(shiroi);
178
				shiroi_video_mk_ii(shiroi);
177
				shiroi_video_mk_ii(shiroi);