From 7057bfcf05401de57c0331891a0edf6a35323348 Mon Sep 17 00:00:00 2001 From: b1ackmai1er Date: Tue, 21 Sep 2021 23:02:22 +0800 Subject: [PATCH] Speaker updates CPU MHz is now rounded at hbios initialization. --- Source/Doc/Architecture.md | 2 +- Source/HBIOS/spk.asm | 9 +-------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/Source/Doc/Architecture.md b/Source/Doc/Architecture.md index a77dbcc1..7c4ca5e3 100644 --- a/Source/Doc/Architecture.md +++ b/Source/Doc/Architecture.md @@ -1476,7 +1476,7 @@ This function applies the previously specified volume and period by programming the sound chip with the appropriate values. The values are applied to the specified channel of the chip. -For example, to play a specific note on Audio Device UNit 0, +For example, to play a specific note on Audio Device Unit 0, the following HBIOS calls would need to be made: ``` diff --git a/Source/HBIOS/spk.asm b/Source/HBIOS/spk.asm index 2cee6a99..ee3b803c 100644 --- a/Source/HBIOS/spk.asm +++ b/Source/HBIOS/spk.asm @@ -160,14 +160,7 @@ SP_QUERY_DEV: ;====================================================================== ; SP_SETTBL: - LD HL,(CB_CPUKHZ) ; GET CPU SPEED. - LD DE,1000 ; CONVERT TO MHZ - CALL DIV16 -; - LD DE,900 ; IF MHZ IS WITHIN 10% OF - SBC HL,DE ; NEXT INTEGER INCREMENT - JP M,SP_SETTBL3 ; THEN BUMP UP. I.E. 9.928MHZ - INC C ; BECOMES 10MHZ + LD BC,(CB_CPUMHZ) ; GET MHZ CPU SPEED (IN C). ; SP_SETTBL3: LD B,SP_NOTCNT ; SET NUMBER OF NOTES TO