1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-07-04 18:29:40 +00:00

Add bonus notes on VPOSR.

This commit is contained in:
Thomas Harte 2021-11-02 03:47:39 -07:00
parent 3976420b88
commit d989825216
2 changed files with 11 additions and 1 deletions

View File

@ -612,7 +612,16 @@ void Chipset::perform(const CPU::MC68000::Microcycle &cycle) {
// Raster position.
case Read(0x004): { // VPOSR; b15 = LOF, b0 = b8 of y position.
const uint16_t position = uint16_t(y_ >> 8);
cycle.set_value16(position);
cycle.set_value16(
position |
(is_long_field_ ? 0x8000 : 0x0000)
);
// b8b14 should be:
// 00 for PAL Agnus or fat Agnus
// 10 for NTSC Agnus or fat Agnus
// 20 for PAL high-res
// 30 for NTSC high-res
} break;
case Read(0x006): { // VHPOSR; b0b7 = horizontal; b8b15 = low bits of vertical position.
const uint16_t position = uint16_t(((line_cycle_ >> 1) & 0x00ff) | (y_ << 8));

View File

@ -253,6 +253,7 @@ class Chipset: private ClockingHint::Observer {
bool hold_and_modify_ = false;
bool dual_playfields_ = false;
bool interlace_ = false;
bool is_long_field_ = false;
class BitplaneShifter {
public: