ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/Frodo4/Src/VIC_SC.cpp
(Generate patch)

Comparing Frodo4/Src/VIC_SC.cpp (file contents):
Revision 1.1 by cebix, 2003-07-01T17:09:43Z vs.
Revision 1.5 by cebix, 2005-06-27T19:55:48Z

# Line 1 | Line 1
1   /*
2   *  VIC_SC.cpp - 6569R5 emulation (cycle based)
3   *
4 < *  Frodo (C) 1994-1997,2002 Christian Bauer
4 > *  Frodo (C) 1994-1997,2002-2005 Christian Bauer
5   *
6   *  This program is free software; you can redistribute it and/or modify
7   *  it under the terms of the GNU General Public License as published by
# Line 317 | Line 317 | void MOS6569::ReInitColors(void)
317          // Build inverse color table.
318          uint8 xlate_colors[256];
319          memset(xlate_colors, 0, sizeof(xlate_colors));
320 <        for (i = 0; i < 16; i++)
320 >        for (i=0; i<16; i++)
321                  xlate_colors[colors[i]] = i;
322  
323          // Get the new colors.
324          the_display->InitColors(colors);
325  
326          // Build color translation table.
327 <        for (i = 0; i < 256; i++)
327 >        for (i=0; i<256; i++)
328                  xlate_colors[i] = colors[xlate_colors[i]];
329  
330          // Translate all the old colors variables.
# Line 335 | Line 335 | void MOS6569::ReInitColors(void)
335          b3c_color = colors[b3c];
336          mm0_color = colors[mm0];
337          mm1_color = colors[mm1];
338 <        for (i = 0; i < 8; i++)
338 >        for (i=0; i<8; i++)
339                  spr_color[i] = colors[sc[i]];
340  
341          // Translate the border color sample buffer.
# Line 344 | Line 344 | void MOS6569::ReInitColors(void)
344  
345          // Translate the chunky buffer.
346          uint8 *scanline = the_display->BitmapBase();
347 <        for (int y = 0; y < DISPLAY_Y; y++) {
348 <                for (int x = 0; x < DISPLAY_X; x++)
347 >        for (int y=0; y<DISPLAY_Y; y++) {
348 >                for (int x=0; x<DISPLAY_X; x++)
349                          scanline[x] = xlate_colors[scanline[x]];
350                  scanline += xmod;
351          }
# Line 1842 | Line 1842 | bool MOS6569::EmulateCycle(void)
1842                          border_on_sample[4] = border_on;
1843  
1844                          // Sample spr_disp_on and spr_data for sprite drawing
1845 <                        if ((spr_draw = spr_disp_on))
1845 >                        if ((spr_draw = spr_disp_on) != 0)
1846                                  memcpy(spr_draw_data, spr_data, 8*4);
1847  
1848                          // Turn off sprite display if DMA is off

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines