~ubuntu-branches/debian/squeeze/stella/squeeze

« back to all changes in this revision

Viewing changes to src/emucore/Cart3F.hxx

  • Committer: Bazaar Package Importer
  • Author(s): Stephen Kitt
  • Date: 2010-07-12 23:49:36 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20100712234936-juawrr3etzhr2qpv
Tags: 3.1.2-1
* New maintainer (closes: #532039).
* New upstream version (closes: #461121):
  - includes launcher (closes: #396058).
* Fix the reference to the X Window System in the description (closes:
  #411815).
* Move to main, DFSG-free ROMs are available (see README.Debian).
* Enhance the package description.
* Drop the libslang2-dev dependency (closes: #560274).
* Remove the Encoding entry from stella.desktop.
* Avoid ignoring errors when cleaning.
* Add ${misc:Depends} to the package dependencies.
* Provide a doc-base file to install the documentation using doc-base.
* Switch to debhelper 7 with a simplified rules file.
* Use autotools-dev to provide updated configuration files.
* Update to Standards-Version 3.9.0:
  - Move to menu section Applications/Emulators.
  - Move the homepage declaration.
* Re-write the manpage.

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
//  SS  SS   tt   ee      ll   ll  aa  aa
9
9
//   SSSS     ttt  eeeee llll llll  aaaaa
10
10
//
11
 
// Copyright (c) 1995-2008 by Bradford W. Mott and the Stella team
 
11
// Copyright (c) 1995-2010 by Bradford W. Mott, Stephen Anthony
 
12
// and the Stella Team
12
13
//
13
 
// See the file "license" for information on usage and redistribution of
 
14
// See the file "License.txt" for information on usage and redistribution of
14
15
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
15
16
//
16
 
// $Id: Cart3F.hxx,v 1.13 2008/02/19 12:33:03 stephena Exp $
 
17
// $Id: Cart3F.hxx 2001 2010-04-10 21:37:23Z stephena $
17
18
//============================================================================
18
19
 
19
20
#ifndef CARTRIDGE3F_HXX
35
36
  only used 8K this bankswitching scheme supports up to 512K.
36
37
   
37
38
  @author  Bradford W. Mott
38
 
  @version $Id: Cart3F.hxx,v 1.13 2008/02/19 12:33:03 stephena Exp $
 
39
  @version $Id: Cart3F.hxx 2001 2010-04-10 21:37:23Z stephena $
39
40
*/
40
41
class Cartridge3F : public Cartridge
41
42
{
57
58
    /**
58
59
      Reset device to its power-on state
59
60
    */
60
 
    virtual void reset();
 
61
    void reset();
61
62
 
62
63
    /**
63
64
      Install cartridge in the specified system.  Invoked by the system
65
66
 
66
67
      @param system The system the device should install itself in
67
68
    */
68
 
    virtual void install(System& system);
 
69
    void install(System& system);
69
70
 
70
71
    /**
71
72
      Install pages for the specified bank in the system.
72
73
 
73
74
      @param bank The bank that should be installed in the system
74
75
    */
75
 
    virtual void bank(uInt16 bank);
 
76
    void bank(uInt16 bank);
76
77
 
77
78
    /**
78
79
      Get the current bank.
79
 
 
80
 
      @return  The current bank, or -1 if bankswitching not supported
81
80
    */
82
 
    virtual int bank();
 
81
    uInt16 bank() const;
83
82
 
84
83
    /**
85
84
      Query the number of banks supported by the cartridge.
86
85
    */
87
 
    virtual int bankCount();
 
86
    uInt16 bankCount() const;
88
87
 
89
88
    /**
90
89
      Patch the cartridge ROM.
93
92
      @param value    The value to place into the address
94
93
      @return    Success or failure of the patch operation
95
94
    */
96
 
    virtual bool patch(uInt16 address, uInt8 value);
 
95
    bool patch(uInt16 address, uInt8 value);
97
96
 
98
97
    /**
99
98
      Access the internal ROM image for this cartridge.
101
100
      @param size  Set to the size of the internal ROM image data
102
101
      @return  A pointer to the internal ROM image data
103
102
    */
104
 
    virtual uInt8* getImage(int& size);
 
103
    const uInt8* getImage(int& size) const;
105
104
 
106
105
    /**
107
106
      Save the current state of this cart to the given Serializer.
109
108
      @param out  The Serializer object to use
110
109
      @return  False on any errors, else true
111
110
    */
112
 
    virtual bool save(Serializer& out) const;
 
111
    bool save(Serializer& out) const;
113
112
 
114
113
    /**
115
 
      Load the current state of this cart from the given Deserializer.
 
114
      Load the current state of this cart from the given Serializer.
116
115
 
117
 
      @param in  The Deserializer object to use
 
116
      @param in  The Serializer object to use
118
117
      @return  False on any errors, else true
119
118
    */
120
 
    virtual bool load(Deserializer& in);
 
119
    bool load(Serializer& in);
121
120
 
122
121
    /**
123
122
      Get a descriptor for the device name (used in error checking).
124
123
 
125
124
      @return The name of the object
126
125
    */
127
 
    virtual string name() const { return "Cartridge3F"; }
 
126
    string name() const { return "Cartridge3F"; }
128
127
 
129
128
  public:
130
129
    /**
132
131
 
133
132
      @return The byte at the specified address
134
133
    */
135
 
    virtual uInt8 peek(uInt16 address);
 
134
    uInt8 peek(uInt16 address);
136
135
 
137
136
    /**
138
137
      Change the byte at the specified address to the given value
139
138
 
140
139
      @param address The address where the value should be stored
141
140
      @param value The value to be stored at the address
 
141
      @return  True if the poke changed the device address space, else false
142
142
    */
143
 
    virtual void poke(uInt16 address, uInt8 value);
 
143
    bool poke(uInt16 address, uInt8 value);
144
144
 
145
145
  private:
146
146
    // Indicates which bank is currently active for the first segment