diff --git a/extern/SDL b/extern/SDL index 2359383fc..ffa78e6be 160000 --- a/extern/SDL +++ b/extern/SDL @@ -1 +1 @@ -Subproject commit 2359383fc187386204c3bb22de89655a494cd128 +Subproject commit ffa78e6bead23e2ba3adf8ec2367ff2218d4343c diff --git a/extern/YM2608-LLE/README.md b/extern/YM2608-LLE/README.md index a605ff36d..4184ad60b 100644 --- a/extern/YM2608-LLE/README.md +++ b/extern/YM2608-LLE/README.md @@ -1,9 +1,11 @@ # YM2608-LLE -Very low-level Yamaha YM2608B(OPNA), YM2610(OPNB) and YM2612 (OPN2) emulator using die shots. +Very low-level Yamaha YM2608B(OPNA), YM2610/YM2610B(OPNB) and YM2612 (OPN2) emulator using die shots. -Special thanks to @ika-musume for decapping YM2608B, John McMaster for decapping YM2610, and HardWareMan for decapping YM2612. +Special thanks to @ika-musume for decapping YM2608B, John McMaster for decapping YM2610, HardWareMan for decapping YM2612, and furrtek for decapping YM2610B.. 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 a68e4c533..93daff11b 100644 --- a/extern/YM2608-LLE/fmopna_impl.c +++ b/extern/YM2608-LLE/fmopna_impl.c @@ -466,8 +466,6 @@ 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 @@ -573,8 +571,6 @@ 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 { @@ -583,8 +579,6 @@ 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) { @@ -636,6 +630,9 @@ 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; @@ -940,7 +937,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->ym2610b || (chip->reg_kon_channel[0] & 3) != 0) || chip->input.ym2610b) #endif ; @@ -1333,7 +1330,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->pg_reset[3] = chip->pg_reset[2] || (chip->reg_test_21[1] & 8) != 0; memcpy(&chip->pg_phase[0][1], &chip->pg_phase[1][0], 22 * sizeof(int)); @@ -2256,8 +2253,8 @@ void FMOPNA_2612_Clock(fmopna_2612_t* chip, int clk) break; #ifdef FMOPNA_YM2608 case 0xe: - chip->data_bus1 &= ~15; - chip->data_bus1 |= chip->input.gpio_a & 15; + chip->data_bus1 &= ~255; + chip->data_bus1 |= chip->input.gpio_a & 255; break; case 0xf: chip->data_bus1 &= ~255; @@ -2436,6 +2433,10 @@ 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 c076f0145..4e795ef9f 100644 --- a/extern/YM2608-LLE/fmopna_impl.h +++ b/extern/YM2608-LLE/fmopna_impl.h @@ -52,6 +52,7 @@ typedef struct { #ifdef FMOPNA_YM2610 int rad; int pad; + int ym2610b; #endif } #ifdef FMOPNA_YM2608