~ubuntu-branches/ubuntu/quantal/vice/quantal

« back to all changes in this revision

Viewing changes to src/c64dtv/c64dtv.h

  • Committer: Bazaar Package Importer
  • Author(s): Laszlo Boszormenyi (GCS)
  • Date: 2009-03-31 00:37:15 UTC
  • mfrom: (1.1.7 upstream) (9.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20090331003715-i5yisvcfv7mgz3eh
Tags: 2.1.dfsg-1
* New major upstream release (closes: #495937).
* Add desktop files (closes: #501181).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * c64dtv.h
 
3
 *
 
4
 * Written by
 
5
 *  Andreas Boose <viceteam@t-online.de>
 
6
 *  Ettore Perazzoli <ettore@comm2000.it>
 
7
 *
 
8
 * This file is part of VICE, the Versatile Commodore Emulator.
 
9
 * See README for copyright notice.
 
10
 *
 
11
 *  This program is free software; you can redistribute it and/or modify
 
12
 *  it under the terms of the GNU General Public License as published by
 
13
 *  the Free Software Foundation; either version 2 of the License, or
 
14
 *  (at your option) any later version.
 
15
 *
 
16
 *  This program is distributed in the hope that it will be useful,
 
17
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
18
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
19
 *  GNU General Public License for more details.
 
20
 *
 
21
 *  You should have received a copy of the GNU General Public License
 
22
 *  along with this program; if not, write to the Free Software
 
23
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
 
24
 *  02111-1307  USA.
 
25
 *
 
26
 */
 
27
 
 
28
#ifndef _C64DTV_H
 
29
#define _C64DTV_H
 
30
 
 
31
#define C64_PAL_CYCLES_PER_SEC  985248
 
32
#define C64_PAL_CYCLES_PER_LINE 63
 
33
#define C64_PAL_SCREEN_LINES    312
 
34
#define C64_PAL_CYCLES_PER_RFSH (C64_PAL_SCREEN_LINES \
 
35
                                 * C64_PAL_CYCLES_PER_LINE)
 
36
/* PAL refresh rate: 50.123432124542124 */
 
37
#define C64_PAL_RFSH_PER_SEC    (1.0 / ((double)C64_PAL_CYCLES_PER_RFSH \
 
38
                                        / (double)C64_PAL_CYCLES_PER_SEC))
 
39
 
 
40
#define C64_NTSC_CYCLES_PER_SEC  1022730
 
41
#define C64_NTSC_CYCLES_PER_LINE 65
 
42
#define C64_NTSC_SCREEN_LINES    263
 
43
#define C64_NTSC_CYCLES_PER_RFSH (C64_NTSC_SCREEN_LINES \
 
44
                                  * C64_NTSC_CYCLES_PER_LINE)
 
45
#define C64_NTSC_RFSH_PER_SEC    (1.0 / ((double)C64_NTSC_CYCLES_PER_RFSH \
 
46
                                        / (double)C64_NTSC_CYCLES_PER_SEC))
 
47
 
 
48
/* $01 bits 6 and 7 fall-off cycles (1->0), average is about 350 msec */
 
49
#define C64_CPU_DATA_PORT_FALL_OFF_CYCLES 350000
 
50
 
 
51
struct cia_context_s;
 
52
struct printer_context_s;
 
53
 
 
54
typedef struct machine_context_s {
 
55
    struct cia_context_s *cia1;
 
56
    struct cia_context_s *cia2;
 
57
    struct printer_context_s *printer[3];
 
58
} machine_context_t;
 
59
 
 
60
extern machine_context_t machine_context;
 
61
 
 
62
#endif