mirror of
https://github.com/TomHarte/CLK.git
synced 2024-09-05 13:29:06 +00:00
Tigervision paging returns.
This commit is contained in:
parent
df6861c9dc
commit
0b611a14b9
@ -16,6 +16,7 @@
|
|||||||
#include "CartridgeActivisionStack.hpp"
|
#include "CartridgeActivisionStack.hpp"
|
||||||
#include "CartridgeCommaVid.hpp"
|
#include "CartridgeCommaVid.hpp"
|
||||||
#include "CartridgeParkerBros.hpp"
|
#include "CartridgeParkerBros.hpp"
|
||||||
|
#include "CartridgeTigervision.hpp"
|
||||||
#include "CartridgeUnpaged.hpp"
|
#include "CartridgeUnpaged.hpp"
|
||||||
|
|
||||||
using namespace Atari2600;
|
using namespace Atari2600;
|
||||||
@ -109,6 +110,9 @@ void Machine::configure_as_target(const StaticAnalyser::Target &target) {
|
|||||||
case StaticAnalyser::Atari2600PagingModel::ParkerBros:
|
case StaticAnalyser::Atari2600PagingModel::ParkerBros:
|
||||||
bus_.reset(new CartridgeParkerBros(rom));
|
bus_.reset(new CartridgeParkerBros(rom));
|
||||||
break;
|
break;
|
||||||
|
case StaticAnalyser::Atari2600PagingModel::Tigervision:
|
||||||
|
bus_.reset(new CartridgeTigervision(rom));
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* switch(target.atari.paging_model) {
|
/* switch(target.atari.paging_model) {
|
||||||
|
40
Machines/Atari2600/CartridgeTigervision.hpp
Normal file
40
Machines/Atari2600/CartridgeTigervision.hpp
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
//
|
||||||
|
// CartridgeTigervision.h
|
||||||
|
// Clock Signal
|
||||||
|
//
|
||||||
|
// Created by Thomas Harte on 18/03/2017.
|
||||||
|
// Copyright © 2017 Thomas Harte. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef Atari2600_CartridgeTigervision_hpp
|
||||||
|
#define Atari2600_CartridgeTigervision_hpp
|
||||||
|
|
||||||
|
#include "Cartridge.hpp"
|
||||||
|
|
||||||
|
namespace Atari2600 {
|
||||||
|
|
||||||
|
class CartridgeTigervision: public Cartridge<CartridgeTigervision> {
|
||||||
|
public:
|
||||||
|
CartridgeTigervision(const std::vector<uint8_t> &rom) :
|
||||||
|
Cartridge(rom) {
|
||||||
|
rom_ptr_[0] = rom_.data() + rom_.size() - 4096;
|
||||||
|
rom_ptr_[1] = rom_ptr_[0] + 2048;
|
||||||
|
}
|
||||||
|
|
||||||
|
void perform_bus_operation(CPU6502::BusOperation operation, uint16_t address, uint8_t *value) {
|
||||||
|
if((address&0x1fff) == 0x3f) {
|
||||||
|
int offset = ((*value) * 2048) & (rom_.size() - 1);
|
||||||
|
rom_ptr_[0] = rom_.data() + offset;
|
||||||
|
return;
|
||||||
|
} else if((address&0x1000) && isReadOperation(operation)) {
|
||||||
|
*value = rom_ptr_[(address >> 11)&1][address & 2047];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
uint8_t *rom_ptr_[2];
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* Atari2600_CartridgeTigervision_hpp */
|
@ -948,6 +948,7 @@
|
|||||||
4BEAC0791E7DD86E00EE56B2 /* CartridgeAtari32k.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = CartridgeAtari32k.hpp; sourceTree = "<group>"; };
|
4BEAC0791E7DD86E00EE56B2 /* CartridgeAtari32k.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = CartridgeAtari32k.hpp; sourceTree = "<group>"; };
|
||||||
4BEAC07A1E7DDFDA00EE56B2 /* CartridgeActivisionStack.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = CartridgeActivisionStack.hpp; sourceTree = "<group>"; };
|
4BEAC07A1E7DDFDA00EE56B2 /* CartridgeActivisionStack.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = CartridgeActivisionStack.hpp; sourceTree = "<group>"; };
|
||||||
4BEAC07B1E7DE74200EE56B2 /* CartridgeParkerBros.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = CartridgeParkerBros.hpp; sourceTree = "<group>"; };
|
4BEAC07B1E7DE74200EE56B2 /* CartridgeParkerBros.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = CartridgeParkerBros.hpp; sourceTree = "<group>"; };
|
||||||
|
4BEAC07C1E7DEA6B00EE56B2 /* CartridgeTigervision.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = CartridgeTigervision.hpp; sourceTree = "<group>"; };
|
||||||
4BEE0A6A1D72496600532C7B /* Cartridge.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Cartridge.cpp; sourceTree = "<group>"; };
|
4BEE0A6A1D72496600532C7B /* Cartridge.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Cartridge.cpp; sourceTree = "<group>"; };
|
||||||
4BEE0A6B1D72496600532C7B /* Cartridge.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = Cartridge.hpp; sourceTree = "<group>"; };
|
4BEE0A6B1D72496600532C7B /* Cartridge.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = Cartridge.hpp; sourceTree = "<group>"; };
|
||||||
4BEE0A6D1D72496600532C7B /* PRG.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PRG.cpp; sourceTree = "<group>"; };
|
4BEE0A6D1D72496600532C7B /* PRG.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PRG.cpp; sourceTree = "<group>"; };
|
||||||
@ -1126,6 +1127,7 @@
|
|||||||
4BEA52671DF34909007E74F2 /* PIA.hpp */,
|
4BEA52671DF34909007E74F2 /* PIA.hpp */,
|
||||||
4BEA52651DF3472B007E74F2 /* Speaker.hpp */,
|
4BEA52651DF3472B007E74F2 /* Speaker.hpp */,
|
||||||
4BE7C9171E3D397100A5496D /* TIA.hpp */,
|
4BE7C9171E3D397100A5496D /* TIA.hpp */,
|
||||||
|
4BEAC07C1E7DEA6B00EE56B2 /* CartridgeTigervision.hpp */,
|
||||||
);
|
);
|
||||||
path = Atari2600;
|
path = Atari2600;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
|
Loading…
Reference in New Issue
Block a user