mirror of
https://github.com/wwarthen/RomWBW.git
synced 2026-02-06 22:13:13 -06:00
SN76489: Prevent and return error code if a pitch greater than 03FF is attempted to be set
This commit is contained in:
@@ -147,11 +147,19 @@ SN7_PITCH:
|
||||
AUDDEBUG("SN7PIT ")
|
||||
AUDTRACE_HL
|
||||
AUDDEBUG("\r\n")
|
||||
LD (PENDING_PITCH), HL
|
||||
|
||||
LD A, H
|
||||
CP $04
|
||||
JP NC, SN7_QUERY_PITCH1 ; RETURN NZ IF NUMBER TOO LARGE
|
||||
|
||||
LD (PENDING_PITCH), HL
|
||||
XOR A ; SIGNAL SUCCESS
|
||||
RET
|
||||
|
||||
SN7_QUERY_PITCH1:
|
||||
OR $FF
|
||||
RET
|
||||
|
||||
SN7_PLAY:
|
||||
AUDDEBUG("SN7PLY ")
|
||||
AUDTRACE_D
|
||||
@@ -188,7 +196,6 @@ SN7_QUERY_CHCNT:
|
||||
|
||||
SN7_QUERY_PITCH:
|
||||
LD HL, (PENDING_PITCH)
|
||||
|
||||
XOR A
|
||||
RET
|
||||
|
||||
|
||||
Reference in New Issue
Block a user