~ubuntu-branches/ubuntu/precise/vice/precise

« back to all changes in this revision

Viewing changes to src/vic20/vic20mem.h

  • Committer: Bazaar Package Importer
  • Author(s): Laszlo Boszormenyi (GCS)
  • Date: 2010-02-11 18:30:16 UTC
  • mfrom: (1.1.8 upstream) (9.2.2 sid)
  • Revision ID: james.westby@ubuntu.com-20100211183016-f6n8usn3tzp0u6dp
Tags: 2.2.dfsg-1
* New upstream release, C64 DTV is included so update package description
  and add it to the menu.
* Drop patch fixing build failure with gcc-4.4 , applied upstream.
* Fix some lintian problems and clean up debian/rules .

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
 *
4
4
 * Written by
5
5
 *  Ettore Perazzoli <ettore@comm2000.it>
 
6
 *  Daniel Kahlin <daniel@kahlin.net>
6
7
 *
7
8
 * Memory configuration handling by
8
9
 *  Alexander Lehmann <alex@mathematik.th-darmstadt.de>
27
28
 *
28
29
 */
29
30
 
30
 
#ifndef _VIC20MEM_H
31
 
#define _VIC20MEM_H
 
31
#ifndef VICE_VIC20MEM_H
 
32
#define VICE_VIC20MEM_H
32
33
 
 
34
#include "mem.h"
33
35
#include "types.h"
34
36
 
35
37
#define VIC20_RAM_SIZE                  0x10000 /* Kludged... */
40
42
#define VIC20_BASIC_CHECKSUM            33073
41
43
#define VIC20_KERNAL_CHECKSUM           38203
42
44
 
43
 
#define VIC_ROM_BLK1A   1
44
 
#define VIC_ROM_BLK1B   2
45
 
#define VIC_ROM_BLK2A   4
46
 
#define VIC_ROM_BLK2B   8
47
 
#define VIC_ROM_BLK3A   16
48
 
#define VIC_ROM_BLK3B   32
49
 
#define VIC_ROM_BLK5A   64
50
 
#define VIC_ROM_BLK5B   128
51
 
 
52
 
#define VIC_ROM_BLK0A   0
53
 
#define VIC_ROM_BLK0B   0
54
 
 
55
45
/* VIC20 memory-related resources.  */
56
46
#define VIC_BLK0 1
57
47
#define VIC_BLK1 2
60
50
#define VIC_BLK5 16
61
51
#define VIC_BLK_ALL (VIC_BLK0 | VIC_BLK1 | VIC_BLK2 | VIC_BLK3 | VIC_BLK5)
62
52
 
63
 
extern BYTE mem_cartrom[0x10000];
 
53
/* new cart system */
 
54
#define VIC_CART_RAM123  (1<<0)
 
55
#define VIC_CART_BLK1    (1<<1)
 
56
#define VIC_CART_BLK2    (1<<2)
 
57
#define VIC_CART_BLK3    (1<<3)
 
58
#define VIC_CART_BLK5    (1<<4)
 
59
#define VIC_CART_IO2     (1<<5)
 
60
#define VIC_CART_IO3     (1<<6)
64
61
 
65
62
extern int vic20_mem_init_resources(void);
66
63
extern int vic20_mem_init_cmdline_options(void);
67
64
extern int vic20_mem_disable_ram_block(int num);
68
65
extern int vic20_mem_enable_ram_block(int num);
69
66
 
 
67
/* this should go away */
70
68
extern void mem_attach_cartridge(int type, BYTE *rawcart);
71
69
extern void mem_detach_cartridge(int type);
72
70
 
73
71
extern int mem_patch_kernal(void);
74
72
 
 
73
/* Last data read/write by the cpu, this value lingers on the C(PU)-bus and 
 
74
   gets used when the CPU reads from unconnected space on the C(PU)-bus */
 
75
extern BYTE vic20_cpu_last_data;
 
76
/* Last read data on V-bus (VD0-VD7) */
 
77
extern BYTE vic20_v_bus_last_data;
 
78
/* Last read data on V-bus (VD8-VD11) */
 
79
extern BYTE vic20_v_bus_last_high;
 
80
 
 
81
/* Update V-bus values after V-bus read ($0000-$1FFF, $8000-$9FFF) */
 
82
inline static void REGPARM1 vic20_mem_v_bus_read(WORD addr)
 
83
{
 
84
    vic20_v_bus_last_data = vic20_cpu_last_data;
 
85
    vic20_v_bus_last_high = mem_ram[0x9400 + (addr & 0x3ff)];
 
86
}
 
87
 
 
88
/* Update V-bus values after V-bus write ($0000-$1FFF, $8000-$9FFF) */
 
89
/* TODO: same as vic20_mem_v_bus_read? */
 
90
inline static void REGPARM1 vic20_mem_v_bus_store(WORD addr)
 
91
{
 
92
    vic20_v_bus_last_data = vic20_cpu_last_data;
 
93
}
 
94
 
75
95
#endif
76
96