aboutsummaryrefslogtreecommitdiff
path: root/src-z80/core
diff options
context:
space:
mode:
authorsik2018-01-22 19:19:19 -0300
committersik2018-01-22 19:19:19 -0300
commit8fdf49b8e53fd3063ccc2eb51c49c3b6e4d073bb (patch)
treeaddb91518f99d4df76986d3e282e41cd6baf077e /src-z80/core
parenta2f67fbe8fe6b27f661e70ce2b6b75c17cd1fe54 (diff)
Echo 1.6 release... kind of a mess, will clean up in further commits I guess
Diffstat (limited to 'src-z80/core')
-rw-r--r--src-z80/core/bgm.z803
-rw-r--r--src-z80/core/main.z8017
-rw-r--r--src-z80/core/sfx.z802
-rw-r--r--src-z80/core/vars.z803
4 files changed, 15 insertions, 10 deletions
diff --git a/src-z80/core/bgm.z80 b/src-z80/core/bgm.z80
index b48d87a..c043616 100644
--- a/src-z80/core/bgm.z80
+++ b/src-z80/core/bgm.z80
@@ -376,10 +376,11 @@ ClearBGM:
ld a, b ; Reset panning
and $04
+ rrca
ld iyl, a
ld a, b
and $03
- add $B4
+ add a, $B4
ld (iy+0), a
ld (iy+1), $C0
diff --git a/src-z80/core/main.z80 b/src-z80/core/main.z80
index 387b879..1de8930 100644
--- a/src-z80/core/main.z80
+++ b/src-z80/core/main.z80
@@ -20,6 +20,11 @@ EntryPoint:
ld (RAM_PSGData+16), a
ld (RAM_PSGData+32), a
ld (RAM_PSGData+48), a
+ dec a
+ ld (RAM_PSGData+11), a
+ ld (RAM_PSGData+11+16), a
+ ld (RAM_PSGData+11+32), a
+ ld (RAM_PSGData+11+48), a
ld hl, $6000 ; Set default bank
ld (hl), l
@@ -114,6 +119,8 @@ RunCommand:
jp z, SetPCMRate
dec a ; Command $08: pause BGM
jp z, PauseBGM
+ dec a ; Command $09: set stereo
+ jp z, SetStereo
PollPCM
@@ -207,17 +214,11 @@ DoTick_PSGSkip:
;****************************************************************************
; LoadList [command $01]
; Loads the pointer list
+;----------------------------------------------------------------------------
+; notes: doesn't return
;****************************************************************************
LoadList:
-; ld hl, RAM_ComBank ; Get command parameters
-; ld c, (hl)
-; inc l
-; ld e, (hl)
-; inc l
-; ld d, (hl)
-; ex de, hl
-
ld hl, (RAM_ComAddr) ; Get command parameters
ld a, (RAM_ComBank)
ld c, a
diff --git a/src-z80/core/sfx.z80 b/src-z80/core/sfx.z80
index 8c5e7dd..2430b74 100644
--- a/src-z80/core/sfx.z80
+++ b/src-z80/core/sfx.z80
@@ -281,6 +281,8 @@ ClearSFX:
PollPCM
dec b ; Restore FM channel
+ ld a, b
+ call KillFM
call RestoreFM
inc b
diff --git a/src-z80/core/vars.z80 b/src-z80/core/vars.z80
index 79e4a1d..321d552 100644
--- a/src-z80/core/vars.z80
+++ b/src-z80/core/vars.z80
@@ -9,7 +9,7 @@ RAM_PSGData: ds 4*16 ; PSG envelope data
; ds 3 ... Current address
; ds 3 ... Looping address
; ds 3 ... Start address
- ; ds 1 ... Padding
+ ; ds 1 ... Semitone ($FF if void)
; ds 3 ... BGM instrument address
; ds 1 ... BGM channel volume
@@ -45,6 +45,7 @@ RAM_SFXAddress: ds 2 ; Current SFX address
RAM_SFXLoopPoint: ds 3 ; SFX loop point
RAM_Paused: ds 1 ; Set if BGM stream is paused
+RAM_Mono: ds 1 ; Set if panning is disabled
RAM_PCMBank1: db 1 ; (not implemented yet)
RAM_PCMAddr1: dw 1 ; (not implemented yet)