File: Cart3F.hxx

package info (click to toggle)
stella 0.7-2
  • links: PTS
  • area: non-free
  • in suites: hamm, slink
  • size: 864 kB
  • ctags: 1,158
  • sloc: cpp: 6,615; ansic: 492; makefile: 224; asm: 31
file content (57 lines) | stat: -rw-r--r-- 1,655 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
//============================================================================
//
//    SSSS    tt          lll  lll              
//   SS  SS   tt           ll   ll                
//   SS     tttttt  eeee   ll   ll   aaaa    "An Atari 2600 VCS Emulator"
//    SSSS    tt   ee  ee  ll   ll      aa      
//       SS   tt   eeeeee  ll   ll   aaaaa   Copyright (c) 1995,1996,1997
//   SS  SS   tt   ee      ll   ll  aa  aa         Bradford W. Mott
//    SSSS     ttt  eeeee llll llll  aaaaa    
//
//============================================================================

#ifndef CARTRIDGE3F_HXX
#define CARTRIDGE3F_HXX

class Cartridge3F;

#include "machine.hxx"
#include "Cart.hxx"

/**
  The 8K cartridge class for Tigervision games.  There are four
  2K banks while two 2K segments are visible to the 2600.  The
  last 2K bank is always mapped into the second segment.  Banks
  can be switched by preforming an STA $3F instruction with the
  bank number in the lower two bits of the acuumulator.
  
  @author  Bradford W. Mott
  @version $Id: Cart3F.hxx,v 1.1 1997/05/17 19:04:12 bwmott Exp $
*/
class Cartridge3F : public Cartridge
{
  public:
    /// Constructor
    Cartridge3F(System& system, uByte* image);
 
    /// Destructor
    virtual ~Cartridge3F();

    /// Answer the byte at the given address
    virtual uByte peek(uWord addr);

    /// Store value in the given address
    virtual void poke(uWord addr, uByte value);

    /// Reset to power on state
    virtual void reset();
 
  private:
    // Addressing offsets in ROM image
    uWord myImageOffset[2];

    // 8k ROM Image of the cartridge
    uByte myImage[8192];
};
#endif