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

« back to all changes in this revision

Viewing changes to src/emucore/CartF8SC.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: CartF8SC.hxx,v 1.10 2008/02/06 13:45:21 stephena Exp $
 
17
// $Id: CartF8SC.hxx 2001 2010-04-10 21:37:23Z stephena $
17
18
//============================================================================
18
19
 
19
20
#ifndef CARTRIDGEF8SC_HXX
29
30
  128 bytes of RAM.  There are two 4K banks.
30
31
 
31
32
  @author  Bradford W. Mott
32
 
  @version $Id: CartF8SC.hxx,v 1.10 2008/02/06 13:45:21 stephena Exp $
 
33
  @version $Id: CartF8SC.hxx 2001 2010-04-10 21:37:23Z stephena $
33
34
*/
34
35
class CartridgeF8SC : public Cartridge
35
36
{
50
51
    /**
51
52
      Reset device to its power-on state
52
53
    */
53
 
    virtual void reset();
 
54
    void reset();
54
55
 
55
56
    /**
56
57
      Install cartridge in the specified system.  Invoked by the system
58
59
 
59
60
      @param system The system the device should install itself in
60
61
    */
61
 
    virtual void install(System& system);
 
62
    void install(System& system);
62
63
 
63
64
    /**
64
65
      Install pages for the specified bank in the system.
65
66
 
66
67
      @param bank The bank that should be installed in the system
67
68
    */
68
 
    virtual void bank(uInt16 bank);
 
69
    void bank(uInt16 bank);
69
70
 
70
71
    /**
71
72
      Get the current bank.
72
 
 
73
 
      @return  The current bank, or -1 if bankswitching not supported
74
73
    */
75
 
    virtual int bank();
 
74
    uInt16 bank() const;
76
75
 
77
76
    /**
78
77
      Query the number of banks supported by the cartridge.
79
78
    */
80
 
    virtual int bankCount();
 
79
    uInt16 bankCount() const;
81
80
 
82
81
    /**
83
82
      Patch the cartridge ROM.
86
85
      @param value    The value to place into the address
87
86
      @return    Success or failure of the patch operation
88
87
    */
89
 
    virtual bool patch(uInt16 address, uInt8 value);
 
88
    bool patch(uInt16 address, uInt8 value);
90
89
 
91
90
    /**
92
91
      Access the internal ROM image for this cartridge.
94
93
      @param size  Set to the size of the internal ROM image data
95
94
      @return  A pointer to the internal ROM image data
96
95
    */
97
 
    virtual uInt8* getImage(int& size);
 
96
    const uInt8* getImage(int& size) const;
98
97
 
99
98
    /**
100
99
      Save the current state of this cart to the given Serializer.
102
101
      @param out  The Serializer object to use
103
102
      @return  False on any errors, else true
104
103
    */
105
 
    virtual bool save(Serializer& out) const;
 
104
    bool save(Serializer& out) const;
106
105
 
107
106
    /**
108
 
      Load the current state of this cart from the given Deserializer.
 
107
      Load the current state of this cart from the given Serializer.
109
108
 
110
 
      @param in  The Deserializer object to use
 
109
      @param in  The Serializer object to use
111
110
      @return  False on any errors, else true
112
111
    */
113
 
    virtual bool load(Deserializer& in);
 
112
    bool load(Serializer& in);
114
113
 
115
114
    /**
116
115
      Get a descriptor for the device name (used in error checking).
117
116
 
118
117
      @return The name of the object
119
118
    */
120
 
    virtual string name() const { return "CartridgeF8SC"; }
 
119
    string name() const { return "CartridgeF8SC"; }
121
120
 
122
121
  public:
123
122
    /**
125
124
 
126
125
      @return The byte at the specified address
127
126
    */
128
 
    virtual uInt8 peek(uInt16 address);
 
127
    uInt8 peek(uInt16 address);
129
128
 
130
129
    /**
131
130
      Change the byte at the specified address to the given value
132
131
 
133
132
      @param address The address where the value should be stored
134
133
      @param value The value to be stored at the address
 
134
      @return  True if the poke changed the device address space, else false
135
135
    */
136
 
    virtual void poke(uInt16 address, uInt8 value);
 
136
    bool poke(uInt16 address, uInt8 value);
137
137
 
138
138
  private:
139
139
    // Indicates which bank is currently active