()
| 149 | } |
| 150 | |
| 151 | @Override |
| 152 | public void tick() { |
| 153 | addWaitCycles(waitsPerCycle); |
| 154 | if (y < APPLE_SCREEN_LINES) setScannerLocation(currentWriter.getYOffset(y)); |
| 155 | setFloatingBus(getMemory().readRaw(scannerAddress + x)); |
| 156 | if (hPeriod > 0) { |
| 157 | hPeriod--; |
| 158 | if (hPeriod == 0) { |
| 159 | x = -1; |
| 160 | } |
| 161 | } else { |
| 162 | int xVal = x; |
| 163 | if (!isVblank && xVal < APPLE_CYCLES_PER_LINE && xVal >= 0) { |
| 164 | draw(xVal); |
| 165 | } |
| 166 | if (xVal >= APPLE_CYCLES_PER_LINE - 1) { |
| 167 | int yy = y + hblankOffsetY; |
| 168 | if (yy < 0) { |
| 169 | yy += APPLE_SCREEN_LINES; |
| 170 | } |
| 171 | if (yy >= APPLE_SCREEN_LINES) { |
| 172 | yy -= (TOTAL_LINES - APPLE_SCREEN_LINES); |
| 173 | } |
| 174 | x = hblankOffsetX - 1; |
| 175 | if (!isVblank) { |
| 176 | if (lineDirty) { |
| 177 | screenDirty = true; |
| 178 | currentWriter.clearDirty(y); |
| 179 | } |
| 180 | hblankStart(video, y, lineDirty); |
| 181 | lineDirty = false; |
| 182 | forceRedrawRowCount--; |
| 183 | } |
| 184 | hPeriod = HBLANK; |
| 185 | y++; |
| 186 | getCurrentWriter().setCurrentRow(y); |
| 187 | if (y >= APPLE_SCREEN_LINES) { |
| 188 | if (!isVblank) { |
| 189 | y = APPLE_SCREEN_LINES - (TOTAL_LINES - APPLE_SCREEN_LINES); |
| 190 | isVblank = true; |
| 191 | vblankStart(); |
| 192 | Emulator.withComputer(c->c.getMotherboard().vblankStart()); |
| 193 | } else { |
| 194 | y = 0; |
| 195 | isVblank = false; |
| 196 | vblankEnd(); |
| 197 | Emulator.withComputer(c->c.getMotherboard().vblankEnd()); |
| 198 | } |
| 199 | } |
| 200 | } |
| 201 | } |
| 202 | x++; |
| 203 | } |
| 204 | |
| 205 | abstract public void configureVideoMode(); |
| 206 |
nothing calls this directly
no test coverage detected