mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-29 12:50:28 +00:00
Merge pull request #1279 from TomHarte/NoMoreEmuTOS
Eliminate use of EmuTOS.
This commit is contained in:
commit
6c4905d961
@ -512,7 +512,6 @@ Description::Description(Name name) {
|
||||
|
||||
case Name::AtariSTTOS100: *this = Description(name, "AtariST", "the UK TOS 1.00 ROM", "tos100.img", 192*1024, 0x1a586c64u); break;
|
||||
case Name::AtariSTTOS104: *this = Description(name, "AtariST", "the UK TOS 1.04 ROM", "tos104.img", 192*1024, 0xa50d1d43u); break;
|
||||
case Name::AtariSTEmuTOS192: *this = Description(name, "AtariST", "the UK EmuTOS 1.92 ROM", "etos192uk.img", 192*1024, 0xfc3b9e61u); break;
|
||||
|
||||
case Name::ColecoVisionBIOS:
|
||||
*this = Description(name, "ColecoVision", "the ColecoVision BIOS", "coleco.rom", 8*1024, 0x3aa93ef3u);
|
||||
|
@ -71,7 +71,6 @@ enum Name {
|
||||
// Atari ST.
|
||||
AtariSTTOS100,
|
||||
AtariSTTOS104,
|
||||
AtariSTEmuTOS192,
|
||||
|
||||
// ColecoVision.
|
||||
ColecoVisionBIOS,
|
||||
|
@ -96,8 +96,8 @@ struct TestProcessor: public CPU::MC68000::BusHandler {
|
||||
if(!instructions_remaining_) comparitor();
|
||||
}
|
||||
|
||||
HalfCycles perform_bus_operation(const CPU::MC68000::Microcycle &cycle, int) {
|
||||
using Microcycle = CPU::MC68000::Microcycle;
|
||||
template <Microcycle::OperationT op> HalfCycles perform_bus_operation(const Microcycle &cycle, int) {
|
||||
if(cycle.data_select_active()) {
|
||||
cycle.apply(&ram[cycle.host_endian_byte_address()]);
|
||||
}
|
||||
|
@ -36,7 +36,8 @@ class EmuTOS: public ComparativeBusHandler {
|
||||
return m68000_.get_state();
|
||||
}
|
||||
|
||||
HalfCycles perform_bus_operation(const CPU::MC68000::Microcycle &cycle, int) {
|
||||
using Microcycle = CPU::MC68000::Microcycle;
|
||||
template <Microcycle::OperationT op> HalfCycles perform_bus_operation(const Microcycle &cycle, int) {
|
||||
const uint32_t address = cycle.word_address();
|
||||
uint32_t word_address = address;
|
||||
|
||||
@ -68,7 +69,8 @@ class EmuTOS: public ComparativeBusHandler {
|
||||
}
|
||||
}
|
||||
|
||||
switch(cycle.operation & (Microcycle::SelectWord | Microcycle::SelectByte | Microcycle::Read)) {
|
||||
const auto operation = (op != Microcycle::DecodeDynamically) ? op : cycle.operation;
|
||||
switch(operation & (Microcycle::SelectWord | Microcycle::SelectByte | Microcycle::Read)) {
|
||||
default: break;
|
||||
|
||||
case Microcycle::SelectWord | Microcycle::Read:
|
||||
@ -110,11 +112,6 @@ class EmuTOS: public ComparativeBusHandler {
|
||||
_machine->run_for(HalfCycles(length));
|
||||
}
|
||||
|
||||
- (void)testEmuTOSStartup {
|
||||
[self testImage:ROM::Name::AtariSTEmuTOS192 trace:@"etos192uk" length:313490];
|
||||
// TODO: assert that machine is now STOPped.
|
||||
}
|
||||
|
||||
- (void)testTOSStartup {
|
||||
[self testImage:ROM::Name::AtariSTTOS100 trace:@"tos100" length:54011091];
|
||||
}
|
||||
|
@ -39,7 +39,8 @@ class QL: public ComparativeBusHandler {
|
||||
return m68000_.get_state();
|
||||
}
|
||||
|
||||
HalfCycles perform_bus_operation(const CPU::MC68000::Microcycle &cycle, int) {
|
||||
using Microcycle = CPU::MC68000::Microcycle;
|
||||
template <Microcycle::OperationT op> HalfCycles perform_bus_operation(const Microcycle &cycle, int) {
|
||||
const uint32_t address = cycle.word_address();
|
||||
uint32_t word_address = address;
|
||||
|
||||
@ -56,11 +57,11 @@ class QL: public ComparativeBusHandler {
|
||||
word_address %= ram_.size();
|
||||
}
|
||||
|
||||
using Microcycle = CPU::MC68000::Microcycle;
|
||||
if(cycle.data_select_active()) {
|
||||
uint16_t peripheral_result = 0xffff;
|
||||
|
||||
switch(cycle.operation & (Microcycle::SelectWord | Microcycle::SelectByte | Microcycle::Read)) {
|
||||
const auto operation = (op != Microcycle::DecodeDynamically) ? op : cycle.operation;
|
||||
switch(operation & (Microcycle::SelectWord | Microcycle::SelectByte | Microcycle::Read)) {
|
||||
default: break;
|
||||
|
||||
case Microcycle::SelectWord | Microcycle::Read:
|
||||
|
Binary file not shown.
@ -78,16 +78,17 @@ class RAM68000: public CPU::MC68000::BusHandler {
|
||||
return &ram_[(address >> 1) % ram_.size()];
|
||||
}
|
||||
|
||||
HalfCycles perform_bus_operation(const CPU::MC68000::Microcycle &cycle, int) {
|
||||
using Microcycle = CPU::MC68000::Microcycle;
|
||||
template <Microcycle::OperationT op> HalfCycles perform_bus_operation(const Microcycle &cycle, int) {
|
||||
const uint32_t word_address = cycle.word_address();
|
||||
duration_ += cycle.length;
|
||||
|
||||
using Microcycle = CPU::MC68000::Microcycle;
|
||||
const auto operation = (op != Microcycle::DecodeDynamically) ? op : cycle.operation;
|
||||
if(cycle.data_select_active()) {
|
||||
if(cycle.operation & Microcycle::InterruptAcknowledge) {
|
||||
if(operation & Microcycle::InterruptAcknowledge) {
|
||||
cycle.value->b = 10;
|
||||
} else {
|
||||
switch(cycle.operation & (Microcycle::SelectWord | Microcycle::SelectByte | Microcycle::Read)) {
|
||||
switch(operation & (Microcycle::SelectWord | Microcycle::SelectByte | Microcycle::Read)) {
|
||||
default: break;
|
||||
|
||||
case Microcycle::SelectWord | Microcycle::Read:
|
||||
|
@ -3088,13 +3088,13 @@ void Processor<BusHandler, dtack_is_implicit, permit_overrun, signal_will_perfor
|
||||
captured_interrupt_level_ = bus_interrupt_level_;
|
||||
|
||||
read_program.value = &prefetch_.high;
|
||||
bus_handler_.perform_bus_operation<ReadProgramAnnounceOperation>(read_program_announce, is_supervisor_);
|
||||
bus_handler_.perform_bus_operation<ReadProgramOperation>(read_program, is_supervisor_);
|
||||
bus_handler_.template perform_bus_operation<ReadProgramAnnounceOperation>(read_program_announce, is_supervisor_);
|
||||
bus_handler_.template perform_bus_operation<ReadProgramOperation>(read_program, is_supervisor_);
|
||||
program_counter_.l += 2;
|
||||
|
||||
read_program.value = &prefetch_.low;
|
||||
bus_handler_.perform_bus_operation<ReadProgramAnnounceOperation>(read_program_announce, is_supervisor_);
|
||||
bus_handler_.perform_bus_operation<ReadProgramOperation>(read_program, is_supervisor_);
|
||||
bus_handler_.template perform_bus_operation<ReadProgramAnnounceOperation>(read_program_announce, is_supervisor_);
|
||||
bus_handler_.template perform_bus_operation<ReadProgramOperation>(read_program, is_supervisor_);
|
||||
program_counter_.l += 2;
|
||||
}
|
||||
|
||||
|
Binary file not shown.
@ -5,12 +5,3 @@ ROM files would ordinarily go here; the copyright status of these is uncertain s
|
||||
Expected files:
|
||||
|
||||
tos100.img; a 196kb image of the UK Atari ST TOS 1.00 ROM.
|
||||
|
||||
|
||||
# Test Cases.
|
||||
|
||||
Included here are Atari ST-targeted versions of EmuTOS, being a significant chunk of freely available and redistributable 68000 code that can be used to test the 68000-in-progress.
|
||||
|
||||
EmuTOS is distributed under the GPL. See its licence and other information within the doc/ subdirectory.
|
||||
|
||||
It was obtained via http://emutos.sourceforge.net/en/
|
Loading…
Reference in New Issue
Block a user