Skip to content

Commit

Permalink
Migrate to .NET 6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
andreasjhkarlsson committed Mar 16, 2022
1 parent 19d3b70 commit 414ad16
Show file tree
Hide file tree
Showing 21 changed files with 91 additions and 542 deletions.
37 changes: 31 additions & 6 deletions FunGBC.sln
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.27428.2037
# Visual Studio Version 17
VisualStudioVersion = 17.1.32228.430
MinimumVisualStudioVersion = 10.0.40219.1
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FunGBC-iOS", "src\ios\FunGBC-iOS.fsproj", "{7D43ECCF-08FC-4D8F-AD28-E8C913F46346}"
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FunGBC", "src\emulator\FunGBC.fsproj", "{B38FD6E3-991E-474C-B07F-9366960BC6CC}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FunGBC-Winforms", "src\winforms\FunGBC-Winforms.fsproj", "{42C63399-D57C-4E63-B460-266447021CF5}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FunGBC", "src\emulator\FunGBC.fsproj", "{B38FD6E3-991E-474C-B07F-9366960BC6CC}"
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Winforms", "src\winforms\Winforms.fsproj", "{DF787DFB-740A-46A9-A55C-158DD5228389}"
ProjectSection(ProjectDependencies) = postProject
{B38FD6E3-991E-474C-B07F-9366960BC6CC} = {B38FD6E3-991E-474C-B07F-9366960BC6CC}
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down Expand Up @@ -93,6 +94,30 @@ Global
{B38FD6E3-991E-474C-B07F-9366960BC6CC}.Release|iPhone.Build.0 = Release|Any CPU
{B38FD6E3-991E-474C-B07F-9366960BC6CC}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{B38FD6E3-991E-474C-B07F-9366960BC6CC}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{DF787DFB-740A-46A9-A55C-158DD5228389}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU
{DF787DFB-740A-46A9-A55C-158DD5228389}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU
{DF787DFB-740A-46A9-A55C-158DD5228389}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU
{DF787DFB-740A-46A9-A55C-158DD5228389}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU
{DF787DFB-740A-46A9-A55C-158DD5228389}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{DF787DFB-740A-46A9-A55C-158DD5228389}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|Any CPU
{DF787DFB-740A-46A9-A55C-158DD5228389}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU
{DF787DFB-740A-46A9-A55C-158DD5228389}.AppStore|Any CPU.Build.0 = Debug|Any CPU
{DF787DFB-740A-46A9-A55C-158DD5228389}.AppStore|iPhone.ActiveCfg = Debug|Any CPU
{DF787DFB-740A-46A9-A55C-158DD5228389}.AppStore|iPhone.Build.0 = Debug|Any CPU
{DF787DFB-740A-46A9-A55C-158DD5228389}.AppStore|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{DF787DFB-740A-46A9-A55C-158DD5228389}.AppStore|iPhoneSimulator.Build.0 = Debug|Any CPU
{DF787DFB-740A-46A9-A55C-158DD5228389}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DF787DFB-740A-46A9-A55C-158DD5228389}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DF787DFB-740A-46A9-A55C-158DD5228389}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{DF787DFB-740A-46A9-A55C-158DD5228389}.Debug|iPhone.Build.0 = Debug|Any CPU
{DF787DFB-740A-46A9-A55C-158DD5228389}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{DF787DFB-740A-46A9-A55C-158DD5228389}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
{DF787DFB-740A-46A9-A55C-158DD5228389}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DF787DFB-740A-46A9-A55C-158DD5228389}.Release|Any CPU.Build.0 = Release|Any CPU
{DF787DFB-740A-46A9-A55C-158DD5228389}.Release|iPhone.ActiveCfg = Release|Any CPU
{DF787DFB-740A-46A9-A55C-158DD5228389}.Release|iPhone.Build.0 = Release|Any CPU
{DF787DFB-740A-46A9-A55C-158DD5228389}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{DF787DFB-740A-46A9-A55C-158DD5228389}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
2 changes: 0 additions & 2 deletions src/emulator/Constants.fs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ type Dimension = {Width: int; Height: int}

let RESOLUTION = {Width = 160; Height = 144}

let APPLICATION_TITLE = "FunGBC"

type AudioConfig = {SampleRate: int<Hz>; BitDepth: int; Channels: int; BufferLength: int}

let AudioConfig = {SampleRate = 44100<Hz>; BitDepth = 8; Channels = 2; BufferLength = 100}
4 changes: 2 additions & 2 deletions src/emulator/Register.fs
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ type CombinedDataRegister16 (R1: Register<uint8>, R2: Register<uint8>) =
override this.Value
with get () = ((uint16 R1.Value) <<< 8) ||| (uint16 R2.Value)
and set (newValue) =
R1.Value <- uint8 ((newValue >>> 8) &&& 0xFFus) // No idea if this is correct
R2.Value <- uint8 (newValue &&& 0xFFus) // Nor this.
R1.Value <- uint8 ((newValue >>> 8) &&& 0xFFus)
R2.Value <- uint8 (newValue &&& 0xFFus)

// Collect a complete setup of cpu registers.
type RegisterSet () =
Expand Down
6 changes: 3 additions & 3 deletions src/emulator/Sound.fs
Original file line number Diff line number Diff line change
Expand Up @@ -210,9 +210,9 @@ module Mixer =
match msg with
| Process buffer when (!config).AudioDevice.Playing ->

do
Log.logf "Audio playback: device buffer = %f ms"
((float (!config).AudioDevice.Buffered) / (float Constants.AudioConfig.SampleRate) |> (*) 500.0)
// do
// Log.logf "Audio playback: device buffer = %f ms"
// ((float (!config).AudioDevice.Buffered) / (float Constants.AudioConfig.SampleRate) |> (*) 500.0)

if (!config).Speed.Normal then
do (!config).AudioDevice.PlaySamples buffer.Data buffer.Used
Expand Down
16 changes: 0 additions & 16 deletions src/ios/AppDelegate.fs

This file was deleted.

128 changes: 0 additions & 128 deletions src/ios/FunGBC-iOS.fsproj

This file was deleted.

81 changes: 0 additions & 81 deletions src/ios/GameboyView.fs

This file was deleted.

42 changes: 0 additions & 42 deletions src/ios/GameboyViewController.fs

This file was deleted.

Loading

0 comments on commit 414ad16

Please sign in to comment.