-
Notifications
You must be signed in to change notification settings - Fork 20
/
mapper_ejected.go
91 lines (74 loc) · 2.51 KB
/
mapper_ejected.go
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
// This file is part of Gopher2600.
//
// Gopher2600 is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Gopher2600 is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Gopher2600. If not, see <https://www.gnu.org/licenses/>.
package cartridge
import (
"github.com/jetsetilly/gopher2600/environment"
"github.com/jetsetilly/gopher2600/hardware/memory/cartridge/mapper"
)
// ejected implements the mapper.CartMapper interface.
type ejected struct {
}
func newEjected() *ejected {
return &ejected{}
}
// MappedBanks implements the mapper.CartMapper interface.
func (cart *ejected) MappedBanks() string {
return "ejected"
}
// ID implements the mapper.CartMapper interface.
func (cart *ejected) ID() string {
return "-"
}
// Snapshot implements the mapper.CartMapper interface.
func (cart *ejected) Snapshot() mapper.CartMapper {
return &ejected{}
}
// Plumb implements the mapper.CartMapper interface.
func (cart *ejected) Plumb(_ *environment.Environment) {
}
// Reset implements the mapper.CartMapper interface.
func (cart *ejected) Reset() {
}
// Access implements the mapper.CartMapper interface.
func (cart *ejected) Access(_ uint16, _ bool) (uint8, uint8, error) {
// return undriven pins
return 0, 0, nil
}
// AccessVolatile implements the mapper.CartMapper interface.
func (cart *ejected) AccessVolatile(_ uint16, _ uint8, _ bool) error {
return nil
}
// NumBanks implements the mapper.CartMapper interface.
func (cart *ejected) NumBanks() int {
return 1
}
// GetBank implements the mapper.CartMapper interface.
func (cart *ejected) GetBank(_ uint16) mapper.BankInfo {
return mapper.BankInfo{Number: 0, IsRAM: false}
}
// Patch implements the mapper.CartMapper interface.
func (cart *ejected) Patch(_ int, _ uint8) error {
return Ejected
}
// AccessPassive implements the mapper.CartMapper interface.
func (cart *ejected) AccessPassive(_ uint16, _ uint8) {
}
// Step implements the mapper.CartMapper interface.
func (cart *ejected) Step(_ float32) {
}
// IterateBank implements the mapper.CartMapper interface.
func (cart *ejected) CopyBanks() []mapper.BankContent {
return nil
}