NSF: Fixed issues with some FDS NSF files

$5FF6/$5FF7 were not being set to the values in $76/$77 if the value was 0
This commit is contained in:
Sour 2019-12-29 10:32:19 -05:00
parent 70fa5a0ad7
commit 8cd0d14fdf

View file

@ -80,8 +80,8 @@ private:
0xA8,0xA2,0x27,0x91,0x00,0xC8,0xD0,0xFB,0xCA,0x30,0x0A,0xC6,0x01,0xE0,0x07,0xD0,
0xF2,0x86,0x01,0xF0,0xEE,0xA2,0x14,0xCA,0x9D,0x00,0x40,0xD0,0xFA,0xA2,0x07,0xBD,
0x08,0x3E,0x9D,0xF8,0x5F,0xCA,0x10,0xF7,0xA0,0x0F,0x8C,0x15,0x40,0xAD,0x13,0x3E,
0x29,0x04,0xF0,0x10,0xAD,0x0E,0x3E,0xF0,0x03,0x8D,0xF6,0x5F,0xAD,0x0F,0x3E,0xF0,
0x03,0x8D,0xF7,0x5F,0xAE,0x11,0x3E,0xBD,0x04,0x3E,0x8D,0x10,0x3E,0xBD,0x06,0x3E,
0x29,0x04,0xF0,0x10,0xAD,0x0E,0x3E,0xEA,0xEA,0x8D,0xF6,0x5F,0xAD,0x0F,0x3E,0xEA,
0xEA,0x8D,0xF7,0x5F,0xAE,0x11,0x3E,0xBD,0x04,0x3E,0x8D,0x10,0x3E,0xBD,0x06,0x3E,
0x8D,0x11,0x3E,0x8C,0x12,0x3E,0xAD,0x12,0x3E,0x58,0xAD,0x10,0x3E,0x20,0xF6,0x3F,
0x8D,0x13,0x3E,0x4C,0x17,0x3F,0x6C,0x00,0x3E,0x6C,0x02,0x3E,0x03,0x3F,0x1A,0x3F
};
@ -258,11 +258,15 @@ _4: LDA $3E08,X ;5) If this is a banked tune, load the bank values from the hea
LDA $3E13 ;For FDS games, banks E/F also get mapped to 6/7
AND #$04 ;For non-FDS games, we don't want to do this
BEQ _6
LDA $3E0E ;if these are zero, let's leave them as plain RAM
BEQ _5
LDA $3E0E ;if these are zero, let's leave them as plain RAM (EDIT: Always write the value, even if it's 0)
;BEQ _5
NOP
NOP
STA $5FF6
_5: LDA $3E0F ;TODO - need to allow FDS NSF data to be writeable
BEQ _6
;BEQ _6 ;EDIT: Always write the value, even if it's 0
NOP
NOP
STA $5FF7
_6: LDX $3E11 ;4.5) Set up the PLAY timer. Which word to use is determined by which mode you are in - PAL or NTSC.