From e7617bcf94af9e31655f838bc343f0fea1e80eaa Mon Sep 17 00:00:00 2001 From: Javier Degirolmo Date: Wed, 20 Mar 2013 22:22:52 -0300 Subject: PCM is now buffered to improve performance somewhat. Version bumped up to 1.1. --- src-z80/core/main.z80 | 11 +++++------ src-z80/core/vars.z80 | 5 +++-- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'src-z80/core') diff --git a/src-z80/core/main.z80 b/src-z80/core/main.z80 index 82c6bb0..1bd6074 100644 --- a/src-z80/core/main.z80 +++ b/src-z80/core/main.z80 @@ -35,9 +35,7 @@ EntryPoint: ld iyh, $40 exx ; Init PCM playback status - ld bc, $0000 ; B = playing, C = bank - ld de, $0000 ; DE = address - ld hl, $6000 ; HL = always $6000 + ld b, $00 ; Not playing exx ld (ix+0), $2B ; Disable DAC by default @@ -203,7 +201,7 @@ BankSwitch: macro ld (hl), a rrca ld (hl), a - ld (hl), l + ld (hl), h rrca ld (hl), a endm @@ -265,9 +263,10 @@ GetParam: jp z, .noswitchp ld a, c ld (RAM_LastBank), a - exx + push hl + ld hl, $6000 BankSwitch - exx + pop hl .noswitchp: ld b, (hl) ; Get volume diff --git a/src-z80/core/vars.z80 b/src-z80/core/vars.z80 index c1dc8b5..9dcac4b 100644 --- a/src-z80/core/vars.z80 +++ b/src-z80/core/vars.z80 @@ -45,6 +45,9 @@ RAM_Scratch: ds 32 ; Scratch bytes, may be useful when ; buffering to speed up to avoid bank ; switching conflicts + ds $F0-($&$FF), $FF +RAM_PCMBuffer: ds 16 ; PCM buffer + ;**************************************************************************** ; Pointer list starts being stored from here ; $300 (768) bytes are needed to store the pointer list @@ -55,8 +58,6 @@ RAM_Scratch: ds 32 ; Scratch bytes, may be useful when ; RAM_PointerList[$200+n] = bank ;**************************************************************************** - ds $100-($&$FF), $FF - RAM_PointerList: equ $1C00 ;**************************************************************************** -- cgit v1.2.3