Skip to content

Commit

Permalink
[go] fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
shish committed Sep 28, 2023
1 parent 8a44c35 commit 4624553
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions go/src/apu.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ var DUTY [][]uint8 = [][]uint8{
{0, 1, 1, 1, 1, 1, 1, 0},
}

////#[derive(Default, Debug, PackedStruct)]
//#[packed_struct(bit_numbering = "msb0")]
// //#[derive(Default, Debug, PackedStruct)]
// #[packed_struct(bit_numbering = "msb0")]
type Ch1Control struct {
// NR10
// The change of frequency (NR13,NR14) at each shift is calculated by the
Expand Down Expand Up @@ -55,7 +55,7 @@ type Ch1Control struct {
frequency_msb uint8 // 3
}

//#[derive(Default, Debug)]
// #[derive(Default, Debug)]
type Ch1State struct {
duty_pos uint8
envelope_timer int
Expand All @@ -68,8 +68,8 @@ type Ch1State struct {
sweep_timer int
}

//#[derive(Default, Debug, PackedStruct)]
//#[packed_struct(bit_numbering = "msb0")]
// #[derive(Default, Debug, PackedStruct)]
// #[packed_struct(bit_numbering = "msb0")]
type Ch2Control struct {
// NR20
//#[packed_field(bits = "0:7")]
Expand Down Expand Up @@ -103,7 +103,7 @@ type Ch2Control struct {
frequency_msb uint8 // 3
}

//#[derive(Default, Debug)]
// #[derive(Default, Debug)]
type Ch2State struct {
duty_pos uint8
envelope_timer int
Expand All @@ -113,8 +113,8 @@ type Ch2State struct {
length_timer int
}

//#[derive(Default, Debug, PackedStruct)]
//#[packed_struct(bit_numbering = "msb0")]
// #[derive(Default, Debug, PackedStruct)]
// #[packed_struct(bit_numbering = "msb0")]
type Ch3Control struct {
// NR30
//#[packed_field(bits = "0")]
Expand Down Expand Up @@ -145,16 +145,16 @@ type Ch3Control struct {
frequency_msb uint8 // 3
}

//#[derive(Default, Debug)]
// #[derive(Default, Debug)]
type Ch3State struct {
freq_timer int
length uint8
length_timer int
sample uint8
}

//#[derive(Default, Debug, PackedStruct)]
//#[packed_struct(bit_numbering = "msb0")]
// #[derive(Default, Debug, PackedStruct)]
// #[packed_struct(bit_numbering = "msb0")]
type Ch4Control struct {
// NR40
// //#[packed_field(bits="0:7")]
Expand Down Expand Up @@ -188,7 +188,7 @@ type Ch4Control struct {
// //#[packed_field(bits="34:39")]
}

//#[derive(Default, Debug)]
// #[derive(Default, Debug)]
type Ch4State struct {
// Internal state
envelope_timer int
Expand All @@ -199,8 +199,8 @@ type Ch4State struct {
lfsr uint16 // = 0xFFFF;
}

//#[derive(Default, Debug, PackedStruct)]
//#[packed_struct(bit_numbering = "msb0")]
// #[derive(Default, Debug, PackedStruct)]
// #[packed_struct(bit_numbering = "msb0")]
type Control struct {
// NR50
//#[packed_field(bits = "0")]
Expand Down

0 comments on commit 4624553

Please sign in to comment.