Update README.md

This commit is contained in:
Oliver Schmidt 2018-08-12 12:53:02 +02:00 committed by GitHub
parent 7abb5d60cb
commit 4df78c6859
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,3 +18,17 @@ To run Play-BTc:
* Run __PLAY.BTC.SYSTEM__
The player loop is based on cycle counting. The slowest loop variant is when the reader needs to switch from the current memory page to the next. 31 cycles is the fastest I could come up with for that variant. The two other variants (just using the next bit from the current byte, reading the next byte from the current page) are padded with unnecessary operations to use 31 cycles too. Given the CPU freqency of a stock Apple II these 31 cycles lead to the 33kHz.
To play .btc files in your own Apple II program:
* Generate a .btc with the BTc Sound Encoder with _Algorithm_ set to _1 bit_, the _Frequency_ set to _33000Hz_ and the number of _Samples_ being a multiple of _2048_.
* Place the content of the .btc file in the Apple II memory starting __on a page boundary__ in one way or another.
* Place the [BTc player core](https://github.com/oliverschmidt/Play-BTc/blob/master/play-btc.s#L31-L277) in the Apple II memory. The player core source code deliberately doesn't make use of any advanced assembler features and should therefore assemble with any assembler (maybe with trivial adjustments).
* Replace the [visual feedback](https://github.com/oliverschmidt/Play-BTc/blob/master/play-btc.s#L275) with two _nop_s.
* Call the BTc player core with
* A set to the high byte of the memory address you placed the .btc file content on
* X set to the number of samples divided by 256