Skip to content

Commit

Permalink
fix ppu crash bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
miochen1226 committed Aug 11, 2023
1 parent 24f18f3 commit bd51abf
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
8 changes: 4 additions & 4 deletions NES_EMU.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,7 @@
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_IDENTITY = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 1;
CURRENT_PROJECT_VERSION = 2;
DEVELOPMENT_TEAM = 82Q375NBS9;
ENABLE_PREVIEWS = YES;
GCC_OPTIMIZATION_LEVEL = 3;
Expand Down Expand Up @@ -781,7 +781,7 @@
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_IDENTITY = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 1;
CURRENT_PROJECT_VERSION = 2;
DEVELOPMENT_TEAM = 82Q375NBS9;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = iOS/Info.plist;
Expand Down Expand Up @@ -810,7 +810,7 @@
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 1;
CURRENT_PROJECT_VERSION = 2;
DEVELOPMENT_TEAM = 82Q375NBS9;
ENABLE_HARDENED_RUNTIME = YES;
ENABLE_PREVIEWS = YES;
Expand All @@ -837,7 +837,7 @@
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 1;
CURRENT_PROJECT_VERSION = 2;
DEVELOPMENT_TEAM = 82Q375NBS9;
ENABLE_HARDENED_RUNTIME = YES;
ENABLE_PREVIEWS = YES;
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@
filePath = "Shared/NES/PPU/Ppu.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "1480"
endingLineNumber = "1480"
startingLineNumber = "1487"
endingLineNumber = "1487"
landmarkName = "MapPpuToVRam(_:)"
landmarkType = "7">
</BreakpointContent>
Expand Down
7 changes: 7 additions & 0 deletions Shared/NES/PPU/Ppu.swift
Original file line number Diff line number Diff line change
Expand Up @@ -662,6 +662,13 @@ class Ppu:IPpu{

if (flipVert)
{
if(yOffset>7)
{
//Bug
print("Err->"+String(yOffset))
yOffset = yOffset%8
print("Err->->"+String(yOffset))
}
yOffset = 7 - yOffset
}
assert(yOffset < 8)
Expand Down

0 comments on commit bd51abf

Please sign in to comment.