Re: Mix LGR and Text?



Linards Ticmanis wrote:
Jorge Chamorro Bieling wrote:

In order to switch in/out a *known*, fixed band of every single picture
frame you'd need to be able to lock to the vertical sync. If not, you
can only be sure that you're switching in/out a certain portion of the
frame at the right frequency. I believe IIe's have had vsync
memory-mapped, but i can not figure out how did you manage to know when
it's vsync-time on an a2, a2+ ?


AFAIK, you store certain values in the last few bytes of the visible screen and make sure those values are nowhere else in your screen. Then you keep reading some unconnected I/O location. Since nothing is driving the data bus when you read those, the data that the video display circuitry put on the bus will still be there for the CPU to see. As soon as you see your data, you're locked in and then you only have to keep your cycle counts.

Also, being such a time-critical loop, if not interrupt-driven, there's
not much you can do while in-the-loop, or the whole thing stops being
in-sync... ?


Given that for example on the Atari 2600, all programs have to do stuff like this to get anything to display at all, and given that people nevertheless managed to cook up about a thousand games for the thing, I'd say there is quite a lot you can do -- if you're masochistic enough for this kind of coding, that is.

Indeed!

RT.SYNTH and CrateSynth both must maintain a continuous stream of
6-cycle pulses every 46 cycles when not playing a sound. When a
sound is played, the pulses still must occur every 46 cycles, but
their widths vary with the sample values.

NadaNet data sending and receiving is another extremely time-critical
situation.  I invite interested readers to take a look at the *very*
clever SENDPKT routine devised by Stephen Thomas for NadaNet 2.0.

Another such example, using the DPLL technique, is his 5.25" disk
track read routine, posted here recently.

Programming in such a rigid timing environment is a very interesting
challenge, which causes one to prefer "constant time" algorithms for
incrementing pointers, range-checking, etc.  It is more difficult,
but the problems are quite entertaining for the devious mind.  ;-)

-michael

Music synthesis for 8-bit Apple II's!
Home page:  http://members.aol.com/MJMahon/

"The wastebasket is our most important design
tool--and it is seriously underused."
.



Relevant Pages

  • Re: Sync question.
    ... AT half a frame you get a distinct echo. ... A, variable, half frame sync error at aquistion is not acceptable in my ... we are talking about syncing sound to picture. ...
    (rec.arts.movies.production.sound)
  • Re: The Emission Theory of Androcles
    ... absolute spatial interval that is not frame dependent. ... applies to light and sound ... The infinite intensity light is a lumic boom, ... Einstein said you couldn't reach lightspeed so you ...
    (sci.physics.relativity)
  • Re: The Emission Theory of Androcles
    ... absolute spatial interval that is not frame dependent. ... applies to light and sound ... The ship moving toward the star causes ...
    (sci.physics.relativity)
  • Re: The Emission Theory of Androcles
    ... absolute spatial interval that is not frame dependent. ... applies to light and sound ... couldn't reach the lumic boom. ...
    (sci.physics.relativity)
  • Re: need a program take 2
    ... Unfortunately my current skills prevent me from doing this myself, so I thought I'd ask if someone here would be able to do this for me. ... calculate the total intensity of the entire image, frame by frame, perhaps by summing up the gray level values for all the pixels in the image. ... Converting that sum to a sound, where the sound is a sine wave tone, with variable amplitude or frequency, with that parameter set by the total luminance of the image from moment to moment. ...
    (comp.soft-sys.matlab)

Loading