Diff for /xmil/io/pcg.c between versions 1.3 and 1.6

version 1.3, 2004/08/04 15:18:26 version 1.6, 2004/08/12 13:32:52
Line 2 Line 2
 #include        "z80core.h"  #include        "z80core.h"
 #include        "pccore.h"  #include        "pccore.h"
 #include        "iocore.h"  #include        "iocore.h"
 #include        "x1_io.h"  
 #include        "x1_crtc.h"  
 #include        "vram.h"  #include        "vram.h"
 #include        "font.h"  #include        "font.h"
   
Line 51  static UINT knj_offset(void) { Line 49  static UINT knj_offset(void) {
 static UINT nowsyncoffset(void) {  static UINT nowsyncoffset(void) {
   
         UINT    ret;          UINT    ret;
           UINT    h;
           UINT    v;
   
         ret = (((v_cnt - crtc.CRT_YL) / crtc.fnty) + crtc.TXT_YL) * crtc.TXT_XL          v = pccore_getraster(&h);
                                                                                                                         + crtc.TXT_TOP;  
         if (pccore.HSYNC_CLK) {          ret = ((v / crtc.e.fonty) * crtc.s.TXT_XL) + crtc.s.TXT_TOP;
                 ret += (h_cnt * crtc.TXT_XL) / pccore.HSYNC_CLK;          ret += (h * crtc.s.TXT_XL) / 250;
         }  
   
         if (ret >= 0x0800) {          if (ret >= 0x0800) {
                 ret = 0x07ff;           // オーバーフロー                  ret = 0x07ff;           // オーバーフロー
Line 71  void IOOUTCALL pcg_o(UINT port, REG8 val Line 70  void IOOUTCALL pcg_o(UINT port, REG8 val
         UINT    off;          UINT    off;
         UINT    l;          UINT    l;
   
         if (crtc.SCRN_BITS & SCRN_PCGMODE) {          if (crtc.s.SCRN_BITS & SCRN_PCGMODE) {
                 off = pcg_offset();                  off = pcg_offset();
                 chr = tram[TRAM_ANK + off];                  chr = tram[TRAM_ANK + off];
                 if (tram[TRAM_KNJ + off] & 0x90) {                  if (tram[TRAM_KNJ + off] & 0x90) {
Line 127  REG8 IOINPCALL pcg_i(UINT port) { Line 126  REG8 IOINPCALL pcg_i(UINT port) {
         BYTE    chr,knj,val;          BYTE    chr,knj,val;
   
         val = 0xff;          val = 0xff;
         if (crtc.SCRN_BITS & SCRN_PCGMODE) {          if (crtc.s.SCRN_BITS & SCRN_PCGMODE) {
                 l = port & 0x0f;                  l = port & 0x0f;
                 if ((port & 0xff00) == 0x1400) {                  if ((port & 0xff00) == 0x1400) {
                         off = knj_offset();                          off = knj_offset();
Line 143  REG8 IOINPCALL pcg_i(UINT port) { Line 142  REG8 IOINPCALL pcg_i(UINT port) {
                                         val = font_knjx1t[p + l];                                          val = font_knjx1t[p + l];
                                 }                                  }
                         }                          }
                         else if (crtc.SCRN_BITS & SCRN_CPUFONT) {                          else if (crtc.s.SCRN_BITS & SCRN_CPUFONT) {
                                 val = font_txt[(chr << 4) + l];                                  val = font_txt[(chr << 4) + l];
                         }                          }
                         else {                          else {

Removed from v.1.3  
changed lines
  Added in v.1.6


RetroPC.NET-CVS <cvs@retropc.net>