mirror of
https://github.com/JetSetIlly/Gopher2600.git
synced 2024-05-20 05:40:49 -04:00
84ad23c03e
this means that a mapper only needs to implement the Patch() if it makes sense mappers that don't need it have had the Patch function removed. implemented function for SCABS and UA corrected error messages for atari mappers - some messages weren't referencing the correct atari mapper and simply stated "atari"
88 lines
2.4 KiB
Go
88 lines
2.4 KiB
Go
// 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}
|
|
}
|
|
|
|
// AccessPassive implements the mapper.CartMapper interface.
|
|
func (cart *ejected) AccessPassive(_ uint16, _ uint8) error {
|
|
return nil
|
|
}
|
|
|
|
// 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
|
|
}
|