Subversion Repositories Shiroi

Rev

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

Rev 11 Rev 19
Line 1... Line 1...
1
/* $Id: shiroi_video_mk_i.c 11 2024-08-29 02:49:47Z nishi $ */
1
/* $Id: shiroi_video_mk_i.c 19 2024-08-29 07:16:04Z nishi $ */
2
#include "shiroi_video_mk_i.h"
2
#include "shiroi_video_mk_i.h"
3
 
3
 
4
#include "shiroi.h"
4
#include "shiroi.h"
5
 
5
 
6
#include "tms9918util.h"
6
#include "tms9918util.h"
Line 75... Line 75...
75
	uint8_t scanline[TMS9918_PIXELS_X];
75
	uint8_t scanline[TMS9918_PIXELS_X];
76
	int i, y, x;
76
	int i, y, x;
77
	for(i = 0; i < 256 / SHIROI_IO_PORTS; i++) {
77
	for(i = 0; i < 256 / SHIROI_IO_PORTS; i++) {
78
		if(shiroi->cards[i].type == SHIROI_VIDEO_MARK_I) {
78
		if(shiroi->cards[i].type == SHIROI_VIDEO_MARK_I) {
79
			shiroi->cards[i].video.tick++;
79
			shiroi->cards[i].video.tick++;
80
			if(shiroi->cards[i].video.tick == 256) {
80
			if(shiroi->cards[i].video.tick == 1024) {
81
				shiroi->cards[i].video.tick = 0;
81
				shiroi->cards[i].video.tick = 0;
82
				for(y = 0; y < TMS9918_PIXELS_Y; y++) {
82
				for(y = 0; y < TMS9918_PIXELS_Y; y++) {
83
					vrEmuTms9918ScanLine(shiroi->cards[i].video.vdp, y, scanline);
83
					vrEmuTms9918ScanLine(shiroi->cards[i].video.vdp, y, scanline);
84
					for(x = 0; x < TMS9918_PIXELS_X; x++) {
84
					for(x = 0; x < TMS9918_PIXELS_X; x++) {
85
						shiroi->cards[i].video.fb[y * TMS9918_PIXELS_X + x] = vrEmuTms9918Palette[scanline[x]];
85
						shiroi->cards[i].video.fb[y * TMS9918_PIXELS_X + x] = vrEmuTms9918Palette[scanline[x]];