1
0
mirror of https://github.com/TomHarte/CLK.git synced 2026-04-24 05:18:36 +00:00

As well as a bunch of logging, reinstated rotation position preservation across tracks.

This commit is contained in:
Thomas Harte
2016-12-02 18:36:47 -05:00
parent 93c573bfa9
commit 81ee834530
3 changed files with 21 additions and 8 deletions
+16 -1
View File
@@ -11,6 +11,10 @@
using namespace Oric;
namespace {
// The number below, in cycles against an 8Mhz clock, was arrived at fairly unscientifically,
// by comparing the amount of time this emulator took to show a directory versus a video of
// a real Oric. It therefore assumes all other timing measurements were correct on the day
// of the test. More work to do, I think.
const int head_load_request_counter_target = 7653333;
}
@@ -34,6 +38,16 @@ void Microdisc::set_disk(std::shared_ptr<Storage::Disk::Disk> disk, int drive)
void Microdisc::set_control_register(uint8_t control)
{
printf("control: %d%d%d%d%d%d%d%d\n",
(control >> 7)&1,
(control >> 6)&1,
(control >> 5)&1,
(control >> 4)&1,
(control >> 3)&1,
(control >> 2)&1,
(control >> 1)&1,
(control >> 0)&1);
// b2: data separator clock rate select (1 = double) [TODO]
// b65: drive select
@@ -41,9 +55,10 @@ void Microdisc::set_control_register(uint8_t control)
set_drive(drives_[selected_drive_]);
// b4: side select
unsigned int head = (control & 0x10) ? 1 : 0;
for(int c = 0; c < 4; c++)
{
if(drives_[c]) drives_[c]->set_head((control & 0x10) ? 1 : 0);
if(drives_[c]) drives_[c]->set_head(head);
}
// b3: double density select (0 = double)