
   About.

 SAP Library is a software emulation of CPU 6502 microprocessor and Pokey chip.
Those two chips are used in Atari XL/XE computers. SAP Library is used to
to run programs written in 6502 machine language, programs that are using
Pokey chip to play tunes and sounds.

 What's new.

Version 1.1

- low-pass filter. Makes sound smoother and more comparable with original
  Atari sound
- now sapRenderBuffer fills buffer with 16bit signed samples instead of
  8bit unsigned
- 9bit noise generation (bit 7 in $D208)
- in sapPokey.cpp, pus_???? functions repleaced with new pus_???? functions.
  Now all combinations of channels clocking are supported (check Games/Microx.sap
  for example).

Version 1.0

This is a first official release of SAP Library. This is (probably) fully
operational, unoptimized library. What now I must explain is a "strange"
CPU emulation. This emulation I took, from my AtariXL/XE emulator. In contrast
with other CPU emulators, this is a cycle exact emulator. What's the
difference ?:
- in indexed modes in all load instructions, any page crossing load, takes
  1 cycle more
- in conditional jumps, any jump takes 1 cycle more, any page crossing jump
  takes additionaly 1 cycle more
- any modify-write instructions, in last but one cycle, writes old-unmodified
  value, then (in last cycle) writes new-modified value

I think that we can assume that conditional jumps, always takes 2 cycles,
all load instructions takes always the same number of cycles, all modify-write
instructions, writes only once.

And some words about Pokey emulation. This is also cycle exact emulation.
In each cycle, I am emulating Pokey counters, and (if any counter reaches 0)
I am emulating Audio Control Block (ACB contains 3 switches J for tone output,
one switch J for hi-pas filter and one 4bit DA converter). For Pokey block
scheme, look into pokey.png distributed with SAP Library source.




