Login
Back to forumSee the full topicGo to last reply

Posted By

IstvanV
on 2019-09-18
13:05:52
 Re: Alpharay Plus/4 just released at Evoke 2019

@bubis:

> As for the HSP routine: Please don't ask me to explain how it works, because I don't fully understand yet. I am sure that there are some inner registers and states in TED what we don't see in the $FFxx area and some $FF1E values trigger some events like pointer incrementing start, pointer incrementing stop and pointer reload (there are things like that mentioned in some TED tech doc without explanation) and I am messing with these events by setting $FF1E to the right values at the right cycles.

If this is of any help, the following source file contains most of the TED event related code in plus4emu:
https://github.com/istvan-v/plus4emu/blob/master/src/ted_main.cpp
There is indeed a similar logic for two pointers, in the source code I named these DMA position (for color memory reads) and character position (for bitmaps). Each of these also has a "reload" register that latches the position at the end of a row of characters, writing $ff1a/$ff1b therefore changes the character position reload. At the beginning of each line, a few characters before the end of the left border, the positions are reloaded from the latched values, then they start incrementing for 40 characters. A few characters before the beginning of the right border, the incrementing stops, and depending on the current line within the character ($ff1f), the positions are stored in the reload registers. For the DMA position, this happens in line 6 of the character, while character position is latched if the previous line was 6. One more interesting bit is that with certain timings of writing, a "corrupted" value can be stored that is the result of a bitwise AND with the current position.



Back to top


Copyright © Plus/4 World Team, 2001-2024