Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[go] fmt #145

Merged
merged 1 commit into from
Sep 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading