follow-up, fix assembler errors
This commit is contained in:
parent
641bde75e5
commit
da8baeb549
|
@ -430,7 +430,7 @@ parse_fm_control_stream:
|
|||
; extract extch3 offset
|
||||
push hl
|
||||
ld a, [player_struct.chip_idx] : add a : ld e, a : ld d, 0
|
||||
ld hl, player_struct.ch3_ofs_ch0 : add hl, de
|
||||
ld hl, player_struct.ch3_ofs_chip0 : add hl, de
|
||||
ld e, [hl] : inc hl : ld d, [hl] ; de - channel 3 extch3 block
|
||||
pop hl
|
||||
|
||||
|
@ -470,18 +470,18 @@ parse_fm_control_stream:
|
|||
; opn_write_reg(chip_index, 0xAE, ctx->extch3_block[chip_index][2]);
|
||||
; opn_write_reg(chip_index, 0xAA, *data++);
|
||||
; }
|
||||
bit OPM_CTRL_EXTCH3_OP3_HIGH, b
|
||||
bit OPM_CTRL_EXTCH3_OP3_HIGH_BIT, b
|
||||
jp nz, 1f
|
||||
ld a, [hl] : ld [de], a : inc hl
|
||||
1:
|
||||
bit OPM_CTRL_EXTCH3_OP3_LOW, b
|
||||
bit OPM_CTRL_EXTCH3_OP3_LOW_BIT, b
|
||||
jp nz, 1f
|
||||
ldi [iy], 0xAE : ld a, [de] : ldi [iy], a
|
||||
ldi [iy], 0xAA : ldi a, [hl] : ldi [iy], a
|
||||
1:
|
||||
|
||||
; if (mask & OPM_CTRL_EXTCH3_EOF) endOfFrame = true;
|
||||
bit OPM_CTRL_EXTCH3_EOF, b
|
||||
bit OPM_CTRL_EXTCH3_EOF_BIT, b
|
||||
jp nz, 1f
|
||||
ld a, b : ld [player_struct.end_of_frame], a
|
||||
1:
|
||||
|
@ -491,11 +491,6 @@ parse_fm_control_stream:
|
|||
.not_extch3:
|
||||
ret
|
||||
|
||||
; c - channel offset
|
||||
macro FM_STREAM_EMIT bit_ofs, regbase
|
||||
|
||||
endm
|
||||
|
||||
; parse FM channel stream
|
||||
; HL - stream data, IX- channel context, IY - register buffer, CF - do next op
|
||||
parse_fm_channel_stream:
|
||||
|
@ -506,8 +501,9 @@ parse_fm_channel_stream:
|
|||
|
||||
inc hl
|
||||
; int regbase = (ch & 3) + ((mask & OPM_FM_CMD00_OP_MASK) >> 2);
|
||||
ld a, [player_struct.channel_idx] : ld c, a
|
||||
ld a, b : and OPM_FM_CMD00_OP_MASK : rrca : rrca
|
||||
ld c, [player_struct.channel_idx] : or c : ld c, a
|
||||
or c : ld c, a
|
||||
|
||||
;if (mask & OPM_FM_CMD00_REG50) opn_write_reg(chip_index, 0x50 + regbase, *data++);
|
||||
bit OPM_FM_CMD00_REG50_BIT, b
|
||||
|
@ -544,8 +540,9 @@ parse_fm_channel_stream:
|
|||
; multplier\TL\SSG-EG
|
||||
inc hl
|
||||
; int regbase = (ch & 3) + ((mask & OPM_FM_CMD40_OP_MASK) >> 2);
|
||||
ld a, [player_struct.channel_idx] : ld c, a
|
||||
ld a, b : and OPM_FM_CMD40_OP_MASK : rrca : rrca
|
||||
ld c, [player_struct.channel_idx] : or c : ld c, a
|
||||
or c : ld c, a
|
||||
|
||||
;if (mask & OPM_FM_CMD40_REG30) opn_write_reg(chip_index, 0x30 + regbase, *data++);
|
||||
bit OPM_FM_CMD40_REG30_BIT, b
|
||||
|
@ -579,12 +576,12 @@ parse_fm_channel_stream:
|
|||
jp nz, .not_freq_fb_pan
|
||||
|
||||
inc hl
|
||||
ld c, [player_struct.channel_idx]
|
||||
ld a, [player_struct.channel_idx] : ld c, a
|
||||
|
||||
; if (mask & OPM_FM_CMD80_REGA4) chctx->block = *data++;
|
||||
bit OPM_FM_CMD80_REGA4_BIT, b
|
||||
jp nz, 1f
|
||||
ldi a, [hl] : ld [ix + channel_context_t.reg_fhi], a
|
||||
ldi a, [hl] : ld [ix + channel_struct_t.reg_fhi], a
|
||||
1:
|
||||
; if (mask & OPM_FM_CMD80_REGA0) {
|
||||
; opn_write_reg(chip_index, 0xA4 + ch, chctx->block);
|
||||
|
@ -593,7 +590,7 @@ parse_fm_channel_stream:
|
|||
bit OPM_FM_CMD80_REGA0_BIT, b
|
||||
jp nz, 1f
|
||||
ld a, 0xA4 : add c : ldi [iy], a
|
||||
ld a, [ix + channel_context_t.reg_fhi] : ldi [iy], a
|
||||
ld a, [ix + channel_struct_t.reg_fhi] : ldi [iy], a
|
||||
ld a, 0xA0 : add c : ldi [iy], a
|
||||
ldi a, [hl] : ld [iy], a
|
||||
1:
|
||||
|
@ -623,7 +620,7 @@ parse_fm_channel_stream:
|
|||
jp nz, .not_key
|
||||
|
||||
; opn_write_reg(chip_index, 0x28, ((mask & OPM_FM_CMDA0_OP_MASK) << 4) + ch);
|
||||
ld c, [player_struct.channel_idx]
|
||||
ld a, [player_struct.channel_idx] : ld c, a
|
||||
ld a, b : and OPM_FM_CMDA0_OP_MASK
|
||||
add a, a : add a, a : add a, a : add a, a : add a, c
|
||||
ldi [iy], 0x28 : ldi [iy], a
|
||||
|
|
Loading…
Reference in a new issue