From 0b1e70c703ab7b768c2dfc4ebe08c3e38ecb9a1f Mon Sep 17 00:00:00 2001 From: wsxyz Date: Thu, 3 Mar 2011 04:10:31 +0000 Subject: [PATCH] GPL Licensing made explicit in new source files. --- source/Video.cpp | 1 + source/cs.cpp | 27 +++++++++++++------ source/cs.h | 27 +++++++++++++------ source/wsvideo.cpp | 66 ++++++++++++++++++++++++++++------------------ source/wsvideo.h | 22 +++++++++++++--- 5 files changed, 98 insertions(+), 45 deletions(-) diff --git a/source/Video.cpp b/source/Video.cpp index fd90d716..5bcb0c3f 100644 --- a/source/Video.cpp +++ b/source/Video.cpp @@ -5,6 +5,7 @@ Copyright (C) 1994-1996, Michael O'Brien Copyright (C) 1999-2001, Oliver Schmidt Copyright (C) 2002-2005, Tom Charlesworth Copyright (C) 2006-2010, Tom Charlesworth, Michael Pohoreski, Nick Westgate +Copyright (C) 2011, William S Simms AppleWin is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/source/cs.cpp b/source/cs.cpp index d5d541b4..cd3b251e 100644 --- a/source/cs.cpp +++ b/source/cs.cpp @@ -1,11 +1,22 @@ -/* - * cs.c - * video - * - * Created by Sheldon Simms on 12/4/10. - * Copyright 2010 __MyCompanyName__. All rights reserved. - * - */ +/* +AppleWin : An Apple //e emulator for Windows + +Copyright (C) 2010-2011, William S Simms + +AppleWin is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +AppleWin is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with AppleWin; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ #include "cs.h" diff --git a/source/cs.h b/source/cs.h index 9e75784d..e62088dc 100644 --- a/source/cs.h +++ b/source/cs.h @@ -1,11 +1,22 @@ -/* - * cs.h - * video - * - * Created by Sheldon Simms on 12/4/10. - * Copyright 2010 __MyCompanyName__. All rights reserved. - * - */ +/* +AppleWin : An Apple //e emulator for Windows + +Copyright (C) 2010-2011, William S Simms + +AppleWin is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +AppleWin is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with AppleWin; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ #ifndef INCLUDED_CS_H #define INCLUDED_CS_H diff --git a/source/wsvideo.cpp b/source/wsvideo.cpp index 1fcc5e57..065858e4 100644 --- a/source/wsvideo.cpp +++ b/source/wsvideo.cpp @@ -1,19 +1,31 @@ -// -// wsvideo.cpp -// ntsc video -// -// Created by Sheldon Simms on 11/19/10. -// Copyright 2010 __MyCompanyName__. All rights reserved. -// +/* +AppleWin : An Apple //e emulator for Windows + +Copyright (C) 2010-2011, William S Simms + +AppleWin is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +AppleWin is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with AppleWin; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ #include "cs.h" #include "wsvideo.h" #include #include #include - -// from Frame.h (Must keep in sync!) -#define FRAMEBUFFER_W 600 + +// from Frame.h (Must keep in sync!) +#define FRAMEBUFFER_W 600 #define FRAMEBUFFER_H 420 // prototype from CPU.h @@ -436,15 +448,16 @@ static int sbits = 0; #define SINGLETVPIXEL(signal,table) \ do { \ - unsigned int mm; \ - unsigned int *cp, *np, *mp; \ + unsigned int ntscp, prevp, betwp; \ + unsigned int *prevlin, *between; \ sbits = ((sbits << 1) | signal) & 0xFFF; \ - cp = (unsigned int *)(&(table[sbits][0])); \ - *((unsigned int *)vbp0) = *cp; \ - mp = (unsigned int *)(vbp0 - 4 * FRAMEBUFFER_W); \ - np = (unsigned int *)(vbp0 - 8 * FRAMEBUFFER_W); \ - mm = ((*cp & 0x00fcfcfc) >> 2) + ((*np & 0x00fcfcfc) >> 2); \ - *mp = mm + ((mm & 0x00fefefe) >> 1) + 0xff000000; \ + prevlin = (unsigned int *)(vbp0 + 8 * FRAMEBUFFER_W); \ + between = (unsigned int *)(vbp0 + 4 * FRAMEBUFFER_W); \ + ntscp = *(unsigned int *)(&(table[sbits][0])); /* raw current NTSC color */ \ + prevp = *prevlin; \ + betwp = ntscp - ((ntscp & 0x00fcfcfc) >> 2); \ + *between = betwp | 0xff000000; \ + *((unsigned int *)vbp0) = ntscp; \ vbp0 += 4; \ } while(0) @@ -460,15 +473,16 @@ static int sbits = 0; #define DOUBLETVPIXEL(signal,table) \ do { \ - unsigned int mm; \ - unsigned int *cp, *np, *mp; \ + unsigned int ntscp, prevp, betwp; \ + unsigned int *prevlin, *between; \ sbits = ((sbits << 1) | signal) & 0xFFF; \ - cp = (unsigned int *)(&(table[sbits][0])); \ - *((unsigned int *)vbp0) = *cp; \ - mp = (unsigned int *)(vbp0 - 4 * FRAMEBUFFER_W); \ - np = (unsigned int *)(vbp0 - 8 * FRAMEBUFFER_W); \ - mm = ((*cp & 0x00fefefe) >> 1); \ - *mp = mm + ((mm & 0x00fefefe) >> 1) + ((*np & 0x00fcfcfc) >> 2) + 0xff000000; \ + prevlin = (unsigned int *)(vbp0 + 8 * FRAMEBUFFER_W); \ + between = (unsigned int *)(vbp0 + 4 * FRAMEBUFFER_W); \ + ntscp = *(unsigned int *)(&(table[sbits][0])); /* raw current NTSC color */ \ + prevp = *prevlin; \ + betwp = ((ntscp & 0x00fefefe) >> 1) + ((prevp & 0x00fefefe) >> 1); \ + *between = betwp | 0xff000000; \ + *((unsigned int *)vbp0) = ntscp; \ vbp0 += 4; \ } while(0) diff --git a/source/wsvideo.h b/source/wsvideo.h index 99ff8435..27a2298e 100644 --- a/source/wsvideo.h +++ b/source/wsvideo.h @@ -1,6 +1,22 @@ -// -// WS_VIDEO -// +/* +AppleWin : An Apple //e emulator for Windows + +Copyright (C) 2010-2011, William S Simms + +AppleWin is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +AppleWin is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with AppleWin; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ #ifndef WS_VIDEO #define WS_VIDEO