From a3b77edbba28537f61fef63964527109d76014f7 Mon Sep 17 00:00:00 2001 From: tildearrow Date: Sun, 13 Apr 2025 15:38:43 -0500 Subject: [PATCH] Revert "update YM268-LLE" This reverts commit e4ffb2b3d37489e398d47e2e27edbc500198def8. --- extern/YM2608-LLE/README.md | 6 ++---- extern/YM2608-LLE/fmopna_impl.c | 21 ++++++++++----------- extern/YM2608-LLE/fmopna_impl.h | 1 - 3 files changed, 12 insertions(+), 16 deletions(-) diff --git a/extern/YM2608-LLE/README.md b/extern/YM2608-LLE/README.md index 4184ad60b..a605ff36d 100644 --- a/extern/YM2608-LLE/README.md +++ b/extern/YM2608-LLE/README.md @@ -1,11 +1,9 @@ # YM2608-LLE -Very low-level Yamaha YM2608B(OPNA), YM2610/YM2610B(OPNB) and YM2612 (OPN2) emulator using die shots. +Very low-level Yamaha YM2608B(OPNA), YM2610(OPNB) and YM2612 (OPN2) emulator using die shots. -Special thanks to @ika-musume for decapping YM2608B, John McMaster for decapping YM2610, HardWareMan for decapping YM2612, and furrtek for decapping YM2610B.. +Special thanks to @ika-musume for decapping YM2608B, John McMaster for decapping YM2610, and HardWareMan for decapping YM2612. https://siliconpr0n.org/map/yamaha/ym2610/ http://nemesis.hacking-cult.org/MegaDrive/Documentation/YM2612/YM2612_Stiched.jpg - -https://siliconpr0n.org/map/yamaha/ym2610b/ diff --git a/extern/YM2608-LLE/fmopna_impl.c b/extern/YM2608-LLE/fmopna_impl.c index 93daff11b..a68e4c533 100644 --- a/extern/YM2608-LLE/fmopna_impl.c +++ b/extern/YM2608-LLE/fmopna_impl.c @@ -466,6 +466,8 @@ void FMOPNA_2612_Clock(fmopna_2612_t* chip, int clk) chip->reg_timer_b_load[0] = 0; chip->reg_timer_a_enable[0] = 0; chip->reg_timer_b_enable[0] = 0; + chip->reg_timer_a_reset[0] = 0; + chip->reg_timer_b_reset[0] = 0; chip->reg_kon_operator[0] = 0; chip->reg_kon_channel[0] = 0; #ifdef FMOPNA_YM2608 @@ -571,6 +573,8 @@ void FMOPNA_2612_Clock(fmopna_2612_t* chip, int clk) chip->reg_timer_b_load[0] = (chip->data_bus1 >> 1) & 1; chip->reg_timer_a_enable[0] = (chip->data_bus1 >> 2) & 1; chip->reg_timer_b_enable[0] = (chip->data_bus1 >> 3) & 1; + chip->reg_timer_a_reset[0] = (chip->data_bus1 >> 4) & 1; + chip->reg_timer_b_reset[0] = (chip->data_bus1 >> 5) & 1; } else { @@ -579,6 +583,8 @@ void FMOPNA_2612_Clock(fmopna_2612_t* chip, int clk) chip->reg_timer_b_load[0] = chip->reg_timer_b_load[1]; chip->reg_timer_a_enable[0] = chip->reg_timer_a_enable[1]; chip->reg_timer_b_enable[0] = chip->reg_timer_b_enable[1]; + chip->reg_timer_a_reset[0] = 0; + chip->reg_timer_b_reset[0] = 0; } if (chip->addr_28[1] && (chip->data_bus1 & 0x100) == 0 && chip->write1_en) { @@ -630,9 +636,6 @@ void FMOPNA_2612_Clock(fmopna_2612_t* chip, int clk) #endif } - chip->reg_timer_a_reset[0] = chip->addr_27[1] && (chip->data_bus1 & 0x100) == 0 && chip->write1_en && ((chip->data_bus1 >> 4) & 1) != 0; - chip->reg_timer_b_reset[0] = chip->addr_27[1] && (chip->data_bus1 & 0x100) == 0 && chip->write1_en && ((chip->data_bus1 >> 5) & 1) != 0; - int rst1 = chip->reg_cnt_sync || chip->ic; int of = (chip->reg_cnt1[1] & 2) != 0; @@ -937,7 +940,7 @@ void FMOPNA_2612_Clock(fmopna_2612_t* chip, int clk) ) #ifdef FMOPNA_YM2610 // tildearrow: changed to allow YM2610B emulation - && (chip->ym2610b || (chip->reg_kon_channel[0] & 3) != 0) || chip->input.ym2610b) + && (chip->ym2610b || (chip->reg_kon_channel[0] & 3) != 0) #endif ; @@ -1330,7 +1333,7 @@ void FMOPNA_2612_Clock(fmopna_2612_t* chip, int clk) chip->pg_add[4] = chip->pg_add[3]; chip->pg_reset[1] = chip->pg_reset[0]; - chip->pg_reset[3] = chip->pg_reset[2] || (chip->reg_test_21[1] & 8) != 0; + chip->pg_reset[3] = chip->pg_reset[2]; memcpy(&chip->pg_phase[0][1], &chip->pg_phase[1][0], 22 * sizeof(int)); @@ -2253,8 +2256,8 @@ void FMOPNA_2612_Clock(fmopna_2612_t* chip, int clk) break; #ifdef FMOPNA_YM2608 case 0xe: - chip->data_bus1 &= ~255; - chip->data_bus1 |= chip->input.gpio_a & 255; + chip->data_bus1 &= ~15; + chip->data_bus1 |= chip->input.gpio_a & 15; break; case 0xf: chip->data_bus1 &= ~255; @@ -2433,10 +2436,6 @@ void FMOPNA_2612_Clock(fmopna_2612_t* chip, int clk) chip->o_analog += chip->o_analog_ch[0] = volume_lut[sign_a ? 0 : vol_a]; chip->o_analog += chip->o_analog_ch[1] = volume_lut[sign_b ? 0 : vol_b]; chip->o_analog += chip->o_analog_ch[2] = volume_lut[sign_c ? 0 : vol_c]; - - //please work - chip->o_gpio_a_d = (chip->ssg_mode & 64) == 0; - chip->o_gpio_b_d = (chip->ssg_mode & 128) == 0; } { diff --git a/extern/YM2608-LLE/fmopna_impl.h b/extern/YM2608-LLE/fmopna_impl.h index 4e795ef9f..c076f0145 100644 --- a/extern/YM2608-LLE/fmopna_impl.h +++ b/extern/YM2608-LLE/fmopna_impl.h @@ -52,7 +52,6 @@ typedef struct { #ifdef FMOPNA_YM2610 int rad; int pad; - int ym2610b; #endif } #ifdef FMOPNA_YM2608