IO initial states are correct

This commit is contained in:
2025-05-31 09:47:01 -06:00
parent 8ef1a5cd60
commit 2543ba04b5
8 changed files with 76 additions and 33 deletions

View File

@ -85,33 +85,34 @@ void audio_init(){
memset(ctx.left_audio_buffer, 0, sizeof(float) * FRAMES_PER_BUFFER);
memset(ctx.right_audio_buffer, 0, sizeof(float) * FRAMES_PER_BUFFER);
ctx.audio_enabled = false;
ctx.ch1_left = false;
ctx.ch1_right = false;
ctx.ch2_left = false;
ctx.ch2_right = false;
ctx.ch3_left = false;
ctx.audio_enabled = true;
ctx.ch1_left = true;
ctx.ch1_right = true;
ctx.ch2_left = true;
ctx.ch2_right = true;
ctx.ch3_left = true;
ctx.ch3_right = false;
ctx.ch4_left = false;
ctx.ch4_left = true;
ctx.ch4_right = false;
ctx.volume_left = 0x1;
ctx.volume_right = 0x1;
ctx.volume_left = 0x7;
ctx.volume_right = 0x7;
ctx.sq1_duty = 0x0;
ctx.sq1_volume = 0x0;
ctx.sq1_duty = 0x2;
ctx.sq1_volume = 0xF;
ctx.sq1_sample = 0x0;
ctx.sq1_period_reset = 0x0;
ctx.sq1_period_timer = 0x0;
ctx.sq1_enable = false;
ctx.sq1_enable = true;
ctx.sq1_len_enable = false;
ctx.sq1_sweep_pace = 0x0;
ctx.sq1_sweep_direction = false;
ctx.sq1_initial_len = 0x0;
ctx.sq1_initial_len = 0x3F;
ctx.sq1_len = 0x0;
ctx.sq1_initial_volume = 0x0;
ctx.sq1_initial_volume = 0xF;
ctx.sq1_env_direction = false;
ctx.sq1_env_pace = 0x0;
ctx.sq1_env_pace = 0x3;
ctx.sq1_env_pace_buffer = 0x3;
ctx.sq1_env_timer = 0x0;
ctx.sq1_sweep_step = 0x0;
@ -122,7 +123,7 @@ void audio_init(){
ctx.sq2_period_timer = 0x0;
ctx.sq2_enable = false;
ctx.sq2_len_enable = false;
ctx.sq2_initial_len = 0x0;
ctx.sq2_initial_len = 0x3F;
ctx.sq2_len = 0x0;
ctx.sq2_initial_volume = 0x0;
ctx.sq2_env_direction = false;